summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-03-05 13:28:44 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-03-05 14:47:40 +0100
commitf7ac78f90868a21c480e9b1d9389b36427f097c4 (patch)
tree0234444366e41f78e9db5e5d26050986d1080b32 /sc
parenta8886a6224a0649cd5b48d3874ab960487f17c1d (diff)
fix ScDetOpList::operator==
should be comparing the values of the elements, not the pointers. Regression from commit 927447356fb7025d2b61073f525adc24643c7925 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: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/detdata.hxx3
-rw-r--r--sc/source/core/tool/detdata.cxx2
2 files changed, 4 insertions, 1 deletions
diff --git a/sc/inc/detdata.hxx b/sc/inc/detdata.hxx
index 688fff0b490a..e2be0c46b4f9 100644
--- a/sc/inc/detdata.hxx
+++ b/sc/inc/detdata.hxx
@@ -51,6 +51,9 @@ public:
// for UpdateRef:
void SetPos(const ScAddress& rNew) { aPos=rNew; }
+
+ bool operator== ( const ScDetOpData& r ) const
+ { return eOperation == r.eOperation && aPos == r.aPos; }
};
// list of operators
diff --git a/sc/source/core/tool/detdata.cxx b/sc/source/core/tool/detdata.cxx
index aec1d032d0c2..d1233e0cf609 100644
--- a/sc/source/core/tool/detdata.cxx
+++ b/sc/source/core/tool/detdata.cxx
@@ -79,7 +79,7 @@ bool ScDetOpList::operator==( const ScDetOpList& r ) const
size_t nCount = Count();
bool bEqual = ( nCount == r.Count() );
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;
return bEqual;