summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-10-11 10:52:34 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-10-11 10:54:23 +0100
commit0a0248f89048fb3d85696eddbbcb2c176bc468c5 (patch)
tree60451ce37a6c43ffd601dd59435acca8be9a5e92 /editeng
parent3700700982f49d5e1dc599791517abc31c38dbf8 (diff)
Resolves: fdo#69467 nTxtLeft not compared in operator==
so the maLRSpaceItem( 0, 0, 2000, 0, EE_PARA_OUTLLRSPACE ) in sd is considered the same value as the default all 0 EE_PARA_OUTLLRSPACE. But why the change of the Which id triggers this apparently always there underlying problem needs further investigation Change-Id: I41ef93cf8992f2b5cc72ddb474c54525415657b4
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/items/frmitems.cxx17
1 files changed, 10 insertions, 7 deletions
diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx
index 0d194b19d7f6..18c6caea9999 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -561,14 +561,17 @@ int SvxLRSpaceItem::operator==( const SfxPoolItem& rAttr ) const
{
DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+ const SvxLRSpaceItem& rOther = (const SvxLRSpaceItem&)rAttr;
+
return (
- nLeftMargin == ((SvxLRSpaceItem&)rAttr).GetLeft() &&
- nRightMargin == ((SvxLRSpaceItem&)rAttr).GetRight() &&
- nFirstLineOfst == ((SvxLRSpaceItem&)rAttr).GetTxtFirstLineOfst() &&
- nPropLeftMargin == ((SvxLRSpaceItem&)rAttr).GetPropLeft() &&
- nPropRightMargin == ((SvxLRSpaceItem&)rAttr).GetPropRight() &&
- nPropFirstLineOfst == ((SvxLRSpaceItem&)rAttr).GetPropTxtFirstLineOfst() &&
- bAutoFirst == ((SvxLRSpaceItem&)rAttr).IsAutoFirst() );
+ nFirstLineOfst == rOther.GetTxtFirstLineOfst() &&
+ nTxtLeft == rOther.GetTxtLeft() &&
+ nLeftMargin == rOther.GetLeft() &&
+ nRightMargin == rOther.GetRight() &&
+ nPropFirstLineOfst == rOther.GetPropTxtFirstLineOfst() &&
+ nPropLeftMargin == rOther.GetPropLeft() &&
+ nPropRightMargin == rOther.GetPropRight() &&
+ bAutoFirst == rOther.IsAutoFirst() );
}
// -----------------------------------------------------------------------