summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2021-02-08 16:49:45 +0100
committerMiklos Vajna <vmiklos@collabora.com>2021-02-10 12:12:17 +0100
commit3010ee15889a52b23aef278300e29f06739882d6 (patch)
tree466e2b315afa1b8938a02328f16d2ace770074c4 /include
parent9dc25ec68f3342f257ac0b0a6ed2f7165473ed3d (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) (cherry picked from commit ffe7fd5c3f3de474b201fbb1e25b8251cb13574d) Conflicts: editeng/source/items/frmitems.cxx include/editeng/lrspitem.hxx sw/source/core/layout/paintfrm.cxx Change-Id: Ie4d3459ab6edcc60b20c2fed08dbf45060ca9828 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110692 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'include')
-rw-r--r--include/editeng/lrspitem.hxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/editeng/lrspitem.hxx b/include/editeng/lrspitem.hxx
index b31a5c6de1d6..ce3f23f0d89f 100644
--- a/include/editeng/lrspitem.hxx
+++ b/include/editeng/lrspitem.hxx
@@ -53,6 +53,8 @@ class EDITENG_DLLPUBLIC SvxLRSpaceItem final : public SfxPoolItem
long nRightMargin; // The unproblematic right edge
/// The amount of extra space added to the left margin.
long m_nGutterMargin;
+ /// The amount of extra space added to the right margin, on mirrored pages.
+ long m_nRightGutterMargin;
sal_uInt16 nPropFirstLineOfst, nPropLeftMargin, nPropRightMargin;
short nFirstLineOfst; // First-line indent _always_ relative to nTxtLeft
@@ -120,6 +122,8 @@ public:
{ nFirstLineOfst = nValue; }
void SetGutterMargin(const long nGutterMargin) { m_nGutterMargin = nGutterMargin; }
long GetGutterMargin() const { return m_nGutterMargin; }
+ void SetRightGutterMargin(const long nRightGutterMargin) { m_nRightGutterMargin = nRightGutterMargin; }
+ long GetRightGutterMargin() const { return m_nRightGutterMargin; }
void dumpAsXml(xmlTextWriterPtr pWriter) const override;
virtual boost::property_tree::ptree dumpAsJSON() const override;