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 0cac4ad2ca96..baf24ba82a96 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -2263,6 +2263,19 @@ tools::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;
}