summaryrefslogtreecommitdiff
path: root/include/editeng
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2021-02-08 16:49:45 +0100
committerMiklos Vajna <vmiklos@collabora.com>2021-02-08 17:53:27 +0100
commitffe7fd5c3f3de474b201fbb1e25b8251cb13574d (patch)
tree9a2abf5e1324a6eea30038bfcee3c2b5da2f7d87 /include/editeng
parent741c1b6bb1d10ab217c084278cd8ad5263a1a323 (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 'include/editeng')
-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 9b3ec7734a8e..0510ee47d521 100644
--- a/include/editeng/lrspitem.hxx
+++ b/include/editeng/lrspitem.hxx
@@ -53,6 +53,8 @@ class EDITENG_DLLPUBLIC SvxLRSpaceItem final : public SfxPoolItem
tools::Long nRightMargin; // The unproblematic right edge
/// The amount of extra space added to the left margin.
tools::Long m_nGutterMargin;
+ /// The amount of extra space added to the right margin, on mirrored pages.
+ tools::Long m_nRightGutterMargin;
sal_uInt16 nPropFirstLineOffset, nPropLeftMargin, nPropRightMargin;
short nFirstLineOffset; // First-line indent _always_ relative to nTxtLeft
@@ -120,6 +122,8 @@ public:
{ nFirstLineOffset = nValue; }
void SetGutterMargin(const tools::Long nGutterMargin) { m_nGutterMargin = nGutterMargin; }
tools::Long GetGutterMargin() const { return m_nGutterMargin; }
+ void SetRightGutterMargin(const tools::Long nRightGutterMargin) { m_nRightGutterMargin = nRightGutterMargin; }
+ tools::Long GetRightGutterMargin() const { return m_nRightGutterMargin; }
void dumpAsXml(xmlTextWriterPtr pWriter) const override;
virtual boost::property_tree::ptree dumpAsJSON() const override;