diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2021-04-01 10:09:45 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2021-04-01 12:42:53 +0200 |
commit | d48a4174708ce0850577dba76dccaf85c4f6ffa1 (patch) | |
tree | 70d7e7ec4ed2df41bbd1688236dfd1999a17f733 /sw/source | |
parent | a66653805782df67431c462bf8f890a154066cf0 (diff) |
tdf#140343 sw page rtl gutter margin: add UI
And extend SwFrame::UpdateAttrFrame() so that the layout is updated when
the UI mutates the doc model.
Change-Id: I4112388981187226f97ec39f4c44ffb3cc1e5253
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113440
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/layout/wsfrm.cxx | 1 | ||||
-rw-r--r-- | sw/source/uibase/utlui/uitool.cxx | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx index fccf94925187..631d728ba4bd 100644 --- a/sw/source/core/layout/wsfrm.cxx +++ b/sw/source/core/layout/wsfrm.cxx @@ -536,6 +536,7 @@ void SwFrame::UpdateAttrFrame( const SfxPoolItem *pOld, const SfxPoolItem *pNew, [[fallthrough]]; case RES_LR_SPACE: case RES_UL_SPACE: + case RES_RTL_GUTTER: rInvFlags |= 0x0B; break; diff --git a/sw/source/uibase/utlui/uitool.cxx b/sw/source/uibase/utlui/uitool.cxx index 24dc581bac2f..b971dc95bb2c 100644 --- a/sw/source/uibase/utlui/uitool.cxx +++ b/sw/source/uibase/utlui/uitool.cxx @@ -282,6 +282,10 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc ) { rMaster.SetFormatAttr(SfxBoolItem(RES_BACKGROUND_FULL_SIZE, bValue)); } + if (pGrabBag->GetGrabBag().find("RtlGutter")->second >>= bValue) + { + rMaster.SetFormatAttr(SfxBoolItem(RES_RTL_GUTTER, bValue)); + } } // Transfer all general frame attributes @@ -593,6 +597,8 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet) } oGrabBag->GetGrabBag()["BackgroundFullSize"] <<= rMaster.GetAttrSet().GetItem<SfxBoolItem>(RES_BACKGROUND_FULL_SIZE)->GetValue(); + oGrabBag->GetGrabBag()["RtlGutter"] <<= + rMaster.GetAttrSet().GetItem<SfxBoolItem>(RES_RTL_GUTTER)->GetValue(); rSet.Put(*oGrabBag); } |