summaryrefslogtreecommitdiff
path: root/editeng/source/editeng/impedit3.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'editeng/source/editeng/impedit3.cxx')
-rw-r--r--editeng/source/editeng/impedit3.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index 0265c819facd..211fa6387c2c 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -1515,7 +1515,7 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, sal_uInt32 nStartPosY )
{
long n;
if(IsHoriAlignIgnoreTrailingWhitespace())
- n = ( nMaxLineWidth - CalcTextWidth( true, true ) ) / 2;
+ n = ( nMaxLineWidth - CalcLineWidth( pParaPortion, pLine, false, true ) ) / 2;
else
n = ( nMaxLineWidth - aTextSize.Width() ) / 2;
n += nStartX; // Indentation is kept.
@@ -1528,7 +1528,7 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, sal_uInt32 nStartPosY )
// the blank must not be displayed!
long n;
if(IsHoriAlignIgnoreTrailingWhitespace())
- n = nMaxLineWidth - CalcTextWidth( true, true );
+ n = nMaxLineWidth - CalcLineWidth( pParaPortion, pLine, false, true );
else
n = nMaxLineWidth - aTextSize.Width();
n += nStartX; // Indentation is kept.