Kaydet (Commit) f7ac78f9 authored tarafından Noel Grandin's avatar Noel Grandin

fix ScDetOpList::operator==

should be comparing the values of the elements, not the pointers.

Regression from
    commit 92744735
    Date:   Sat Sep 12 16:49:29 2015 -0600
    replace boost::ptr_container with std::container<std::unique_ptr>

noticed while doing some other plugin work

Change-Id: I96230e52571e9a96e1c96f53f61bbc5afe902b31
Reviewed-on: https://gerrit.libreoffice.org/68738
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst a8886a62
...@@ -51,6 +51,9 @@ public: ...@@ -51,6 +51,9 @@ public:
// for UpdateRef: // for UpdateRef:
void SetPos(const ScAddress& rNew) { aPos=rNew; } void SetPos(const ScAddress& rNew) { aPos=rNew; }
bool operator== ( const ScDetOpData& r ) const
{ return eOperation == r.eOperation && aPos == r.aPos; }
}; };
// list of operators // list of operators
......
...@@ -79,7 +79,7 @@ bool ScDetOpList::operator==( const ScDetOpList& r ) const ...@@ -79,7 +79,7 @@ bool ScDetOpList::operator==( const ScDetOpList& r ) const
size_t nCount = Count(); size_t nCount = Count();
bool bEqual = ( nCount == r.Count() ); bool bEqual = ( nCount == r.Count() );
for (size_t i=0; i<nCount && bEqual; i++) // order has to be the same for (size_t i=0; i<nCount && bEqual; i++) // order has to be the same
if ( aDetOpDataVector[i] != r.aDetOpDataVector[i] ) // entries are different ? if ( !(*aDetOpDataVector[i] == *r.aDetOpDataVector[i]) ) // entries are different ?
bEqual = false; bEqual = false;
return bEqual; return bEqual;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment