diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2021-02-08 16:49:45 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2021-04-01 08:57:35 +0200 |
commit | db2be921e277e6231c43bf64166cb1154579135f (patch) | |
tree | 472dcfc0c65f2c6ad0424d42b817c7bebc2d9672 /editeng | |
parent | d12dc5511cef4f867e0acd76448d543dde2c0abf (diff) |
tdf#91920 sw page gutter margin: handle mirrored margins
- SwPageDesc::Mirror: generate "right gutter margin" from gutter margin
for mirrored pages, we just lost the gutter margin here previously
- SwBorderAttrs::CalcRight: handle right gutter margin, so gutter
increases the right margin, not the left margin on mirrored pages
- lcl_CalcBorderRect: similar to left and top margins, compensate for
right margin gutter as well, so borders are independent from the gutter
margin (Word compat)
Change-Id: Ie4d3459ab6edcc60b20c2fed08dbf45060ca9828
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110585
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'editeng')
-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 0d147f6204c7..a3968e39a186 100644 --- a/editeng/source/items/frmitems.cxx +++ b/editeng/source/items/frmitems.cxx @@ -289,6 +289,7 @@ SvxLRSpaceItem::SvxLRSpaceItem( const sal_uInt16 nId ) : nLeftMargin ( 0 ), nRightMargin ( 0 ), m_nGutterMargin(0), + m_nRightGutterMargin(0), nPropFirstLineOffset( 100 ), nPropLeftMargin( 100 ), nPropRightMargin( 100 ), @@ -309,6 +310,7 @@ SvxLRSpaceItem::SvxLRSpaceItem( const tools::Long nLeft, const tools::Long nRigh nLeftMargin ( nLeft ), nRightMargin ( nRight ), m_nGutterMargin(0), + m_nRightGutterMargin(0), nPropFirstLineOffset( 100 ), nPropLeftMargin( 100 ), nPropRightMargin( 100 ), @@ -483,6 +485,7 @@ bool SvxLRSpaceItem::operator==( const SfxPoolItem& rAttr ) const nFirstLineOffset == rOther.GetTextFirstLineOffset() && nTxtLeft == rOther.GetTextLeft() && m_nGutterMargin == rOther.GetGutterMargin() && + m_nRightGutterMargin == rOther.GetRightGutterMargin() && nLeftMargin == rOther.GetLeft() && nRightMargin == rOther.GetRight() && nPropFirstLineOffset == rOther.GetPropTextFirstLineOffset() && @@ -607,6 +610,8 @@ void SvxLRSpaceItem::dumpAsXml(xmlTextWriterPtr pWriter) const 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("m_nRightGutterMargin"), + BAD_CAST(OString::number(m_nRightGutterMargin).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())); |