summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2012-10-05 17:17:18 +0200
committerMiklos Vajna <vmiklos@suse.cz>2012-10-05 17:20:00 +0200
commitf3905ac09a6f37615d1335c7d2d50bd00c07b920 (patch)
tree8a27fff4821e32aa8bf726a7706ed4c274a3e2ee /sw
parent5c19b8701c58fbb49188ce2210879ce6f4431471 (diff)
ItemSetToPageDesc: don't call SwPageDesc::ChgFirstShare twice
Change-Id: I241858b0d8920187e21dcdb9fd4aac9e4d9054ba
Diffstat (limited to 'sw')
-rw-r--r--sw/source/ui/utlui/uitool.cxx17
1 files changed, 13 insertions, 4 deletions
diff --git a/sw/source/ui/utlui/uitool.cxx b/sw/source/ui/utlui/uitool.cxx
index 64469417451d..a220a9f9f22a 100644
--- a/sw/source/ui/utlui/uitool.cxx
+++ b/sw/source/ui/utlui/uitool.cxx
@@ -164,6 +164,7 @@ void FillHdFt(SwFrmFmt* pFmt, const SfxItemSet& rSet)
void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
{
SwFrmFmt& rMaster = rPageDesc.GetMaster();
+ int nFirstShare = -1;
// alle allgemeinen Rahmen-Attribute uebertragen
//
@@ -219,8 +220,12 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
rPageDesc.ChgHeaderShare(((const SfxBoolItem&)
rHeaderSet.Get(SID_ATTR_PAGE_SHARED)).GetValue());
- rPageDesc.ChgFirstShare(((const SfxBoolItem&)
- rHeaderSet.Get(SID_ATTR_PAGE_SHARED_FIRST)).GetValue());
+ if (nFirstShare < 0)
+ {
+ rPageDesc.ChgFirstShare(((const SfxBoolItem&)
+ rHeaderSet.Get(SID_ATTR_PAGE_SHARED_FIRST)).GetValue());
+ nFirstShare = rPageDesc.IsFirstShared();
+ }
}
else
{ // Header ausschalten
@@ -257,8 +262,12 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
rPageDesc.ChgFooterShare(((const SfxBoolItem&)
rFooterSet.Get(SID_ATTR_PAGE_SHARED)).GetValue());
- rPageDesc.ChgFirstShare(((const SfxBoolItem&)
- rFooterSet.Get(SID_ATTR_PAGE_SHARED_FIRST)).GetValue());
+ if (nFirstShare < 0)
+ {
+ rPageDesc.ChgFirstShare(((const SfxBoolItem&)
+ rFooterSet.Get(SID_ATTR_PAGE_SHARED_FIRST)).GetValue());
+ nFirstShare = rPageDesc.IsFirstShared();
+ }
}
else
{ // Footer ausschalten