summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2021-02-02 15:49:16 +0100
committerMiklos Vajna <vmiklos@collabora.com>2021-02-02 19:30:33 +0100
commit947277146e4c1ff7544371095fcc6bd5842b2d98 (patch)
treea7dc2430aac4c58bf9a6dc9f780d2202e7130b92 /editeng
parent85c5c168f00bb1f8571834587f3693efdfc2e4b3 (diff)
sw page gutter margin: add UNO API
SvxLRSpaceItem is used for all sorts of left/right margins, but gutter only makes sense for pages, so only expose the gutter margin in the page properties. Change-Id: Icfca2499e944081b70bbdbc4c62e78cade25f5c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110322 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/items/frmitems.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx
index e1520735d804..c6b26c1c03a5 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -372,6 +372,11 @@ bool SvxLRSpaceItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
rVal <<= IsAutoFirst();
break;
+ case MID_GUTTER_MARGIN:
+ rVal <<= static_cast<sal_Int32>(bConvert ? convertTwipToMm100(m_nGutterMargin)
+ : m_nGutterMargin);
+ break;
+
default:
bRet = false;
// SfxDispatchController_Impl::StateChanged calls this with hardcoded 0 triggering this; there used to be a MID_LR_MARGIN 0 but what type would it have?
@@ -447,6 +452,10 @@ bool SvxLRSpaceItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
SetAutoFirst( Any2Bool(rVal) );
break;
+ case MID_GUTTER_MARGIN:
+ SetGutterMargin(bConvert ? convertMm100ToTwip(nVal) : nVal);
+ break;
+
default:
OSL_FAIL("unknown MemberId");
return false;