svl/source/items/itemset.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit 8aae35170281c8b8799f64db749d89155315cf7d Author: Michael Stahl <mst...@redhat.com> Date: Tue Aug 15 21:49:01 2017 +0200 SfxItemSet::Equal: ignore parents if the pools are different If there are parents, they are necessarily different pointers for different pools; the only sensible way to compare them is by-value, which is a bit tricky because the items overwritten in the child should of course be ignored. Rather than rewrite the whole function, just ignore the parents for now, because this comparison is currently used to replace compares of the serializations of item sets, and SfxItemSet::Store() completely ignores the m_pParent, so this looks like the best replacement. Change-Id: I0a4bf44d4fef49e47a3ec78bc7d977a6fcbd789d Reviewed-on: https://gerrit.libreoffice.org/41186 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Michael Stahl <mst...@redhat.com> diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx index 72ae16c836bb..19e3f7a0cb12 100644 --- a/svl/source/items/itemset.cxx +++ b/svl/source/items/itemset.cxx @@ -1453,12 +1453,13 @@ bool SfxItemSet::Equals(const SfxItemSet &rCmp, bool bComparePool) const { // Values we can get quickly need to be the same const bool bDifferentPools = (m_pPool != rCmp.m_pPool); - if ( m_pParent != rCmp.m_pParent || + if ( (bComparePool && m_pParent != rCmp.m_pParent) || (bComparePool && bDifferentPools) || Count() != rCmp.Count() ) return false; // If we reach here and bDifferentPools==true that means bComparePool==false. + assert(!bDifferentPools || !bComparePool); // Counting Ranges takes longer; they also need to be the same, however sal_uInt16 nCount1 = TotalCount(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits