Restore and fix and fix harder the EditTextObject::operator==()
... chaining down to EditTextObjectImpl::operator==() that compared unique_ptr instead of content with ContentInfo::operator==() that needed to use XEditAttribute::operator==() instead of comparing pointers. That resulted in always false.. Wrong as a chain of commit 5a7a4325 Date: Tue Nov 10 14:59:05 2015 +0200 editeng: boost::ptr_vector->std::vector<std::unique_ptr> and commit 4ff5a555 Date: Tue Jan 19 15:17:30 2016 +0200 loplugin:unusedmethods Plus XEditAttribute::operator==() was wrong since commit 71158788 Date: Thu May 4 08:11:41 2006 +0000 INTEGRATION: CWS impressc03u3 (1.8.40); FILE MERGED 2006/04/27 12:33:10 cl 1.8.40.1: #i64360# fixed operator== that (to fix a crash comparing items of different types) changed - ( (pItem == rCompare.pItem) || (*pItem == *rCompare.pItem)); + ( (pItem == rCompare.pItem) || + ( pItem->Which() != rCompare.pItem->Which()) || + (*pItem == *rCompare.pItem)); so returning true if Which-IDs differed, instead of + ((pItem == rCompare.pItem) || + ((pItem->Which() == rCompare.pItem->Which()) && + (*pItem == *rCompare.pItem))); Change-Id: I8300c04001e98cb71e520bbe2c180aec0c0a3333 Reviewed-on: https://gerrit.libreoffice.org/40455Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
Showing
Please
register
or
sign in
to comment