summaryrefslogtreecommitdiff
path: root/sw/source/core/layout/frmtool.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/layout/frmtool.cxx')
-rw-r--r--sw/source/core/layout/frmtool.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index 550e54c05f70..fa8603bcc9b3 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -2252,6 +2252,19 @@ long SwBorderAttrs::CalcRight( const SwFrame* pCaller ) const
nRight += static_cast<const SwTextFrame*>(pCaller)->GetTextNodeForParaProps()->GetLeftMarginWithNum();
}
+ if (pCaller->IsPageFrame() && m_rLR)
+ {
+ const auto pPageFrame = static_cast<const SwPageFrame*>(pCaller);
+ bool bGutterAtTop = pPageFrame->GetFormat()->getIDocumentSettingAccess().get(
+ DocumentSettingId::GUTTER_AT_TOP);
+ if (!bGutterAtTop)
+ {
+ // Decrease the print area: the right space is the sum of right and right gutter
+ // margins.
+ nRight += m_rLR->GetRightGutterMargin();
+ }
+ }
+
return nRight;
}