diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2021-02-02 12:22:15 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2021-02-02 14:17:28 +0100 |
commit | 48829edfb148ff61d1e03319547151380899ba63 (patch) | |
tree | 2cb3b04f1bfeafda86d5b45b5f29fecc5326e6df /editeng/source/items | |
parent | cabe1726796517b8f87bceb26bba23818558814a (diff) |
sw page gutter margin: add doc model
The page gutter defines the amount of extra space added to the specified
margin, above any existing margin values. This can be helpful in case of
printed books: e.g. 1cm left margin, 1cm right margin, then some
additional gutter margin on the left can mean that once the book is
printed and binding consumes its space, the remaining left/right margin
is matching.
This is just the doc model, other parts will come in follow-up commits.
Change-Id: Ibd3e836ced664b57e817f5c0952098460b683089
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110290
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'editeng/source/items')
-rw-r--r-- | editeng/source/items/frmitems.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx index 184bf21cd994..e1520735d804 100644 --- a/editeng/source/items/frmitems.cxx +++ b/editeng/source/items/frmitems.cxx @@ -289,6 +289,7 @@ SvxLRSpaceItem::SvxLRSpaceItem( const sal_uInt16 nId ) : nTxtLeft ( 0 ), nLeftMargin ( 0 ), nRightMargin ( 0 ), + m_nGutterMargin(0), nPropFirstLineOffset( 100 ), nPropLeftMargin( 100 ), nPropRightMargin( 100 ), @@ -308,6 +309,7 @@ SvxLRSpaceItem::SvxLRSpaceItem( const tools::Long nLeft, const tools::Long nRigh nTxtLeft ( nTLeft ), nLeftMargin ( nLeft ), nRightMargin ( nRight ), + m_nGutterMargin(0), nPropFirstLineOffset( 100 ), nPropLeftMargin( 100 ), nPropRightMargin( 100 ), @@ -472,6 +474,7 @@ bool SvxLRSpaceItem::operator==( const SfxPoolItem& rAttr ) const return ( nFirstLineOffset == rOther.GetTextFirstLineOffset() && nTxtLeft == rOther.GetTextLeft() && + m_nGutterMargin == rOther.GetGutterMargin() && nLeftMargin == rOther.GetLeft() && nRightMargin == rOther.GetRight() && nPropFirstLineOffset == rOther.GetPropTextFirstLineOffset() && @@ -594,6 +597,8 @@ void SvxLRSpaceItem::dumpAsXml(xmlTextWriterPtr pWriter) const xmlTextWriterWriteAttribute(pWriter, BAD_CAST("nTxtLeft"), BAD_CAST(OString::number(nTxtLeft).getStr())); xmlTextWriterWriteAttribute(pWriter, BAD_CAST("nLeftMargin"), BAD_CAST(OString::number(nLeftMargin).getStr())); xmlTextWriterWriteAttribute(pWriter, BAD_CAST("nRightMargin"), BAD_CAST(OString::number(nRightMargin).getStr())); + xmlTextWriterWriteAttribute(pWriter, BAD_CAST("m_nGutterMargin"), + BAD_CAST(OString::number(m_nGutterMargin).getStr())); xmlTextWriterWriteAttribute(pWriter, BAD_CAST("nPropFirstLineOffset"), BAD_CAST(OString::number(nPropFirstLineOffset).getStr())); xmlTextWriterWriteAttribute(pWriter, BAD_CAST("nPropLeftMargin"), BAD_CAST(OString::number(nPropLeftMargin).getStr())); xmlTextWriterWriteAttribute(pWriter, BAD_CAST("nPropRightMargin"), BAD_CAST(OString::number(nPropRightMargin).getStr())); |