summaryrefslogtreecommitdiff
path: root/sw/source/core/text/guess.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/text/guess.cxx')
-rw-r--r--sw/source/core/text/guess.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/sw/source/core/text/guess.cxx b/sw/source/core/text/guess.cxx
index 03628da8dc90..37baa9ec0368 100644
--- a/sw/source/core/text/guess.cxx
+++ b/sw/source/core/text/guess.cxx
@@ -112,6 +112,12 @@ sal_Bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
if ( nLineWidth < 0 ) nLineWidth = 0;
}
+ // Decrease the line width with the right and left border width
+ if( rInf.GetFont()->GetRightBorder() )
+ nLineWidth -= rInf.GetFont()->GetRightBorder().get().GetScaledWidth();
+ if( rInf.GetFont()->GetLeftBorder() )
+ nLineWidth -= rInf.GetFont()->GetLeftBorder().get().GetScaledWidth();
+
const bool bUnbreakableNumberings = rInf.GetTxtFrm()->GetTxtNode()->
getIDocumentSettingAccess()->get(IDocumentSettingAccess::UNBREAKABLE_NUMBERINGS);