diff options
author | Tamás Zolnai <tamas.zolnai@collabora.com> | 2018-11-16 17:06:02 +0100 |
---|---|---|
committer | Tamás Zolnai <tamas.zolnai@collabora.com> | 2018-11-16 18:22:04 +0100 |
commit | cb1d625aee558c9aa3c0bf3ea44b65f37dca48a8 (patch) | |
tree | c711b9932b44cb1132311df696f138d8aa601e1a /editeng/source/editeng/impedit2.cxx | |
parent | c4c1636b5132261e64492de38f252b19b77e69b8 (diff) |
Revert "tdf#115639: Align right/center with trailing spaces the same"
.. as MS PowerPoint"
This reverts commit 1da3a3cb74a415a76fa547ef0c8f61780e260e7f.
It was a bad solution for the problem.
Change-Id: I6f6fecb7c74a884fbfb04c6e7204eb8bf347a272
Reviewed-on: https://gerrit.libreoffice.org/63473
Tested-by: Jenkins
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Diffstat (limited to 'editeng/source/editeng/impedit2.cxx')
-rw-r--r-- | editeng/source/editeng/impedit2.cxx | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx index 2ddf104fdb46..6f3a8557e95c 100644 --- a/editeng/source/editeng/impedit2.cxx +++ b/editeng/source/editeng/impedit2.cxx @@ -104,7 +104,6 @@ ImpEditEngine::ImpEditEngine( EditEngine* pEE, SfxItemPool* pItemPool ) : bFirstWordCapitalization(true), mbLastTryMerge(false), mbReplaceLeadingSingleQuotationMark(true), - mbHoriAlignIgnoreTrailingWhitespace(false), mbNbspRunNext(false) { pEditEngine = pEE; @@ -3166,7 +3165,7 @@ sal_uInt32 ImpEditEngine::CalcParaWidth( sal_Int32 nPara, bool bIgnoreExtraSpace return static_cast<sal_uInt32>(nMaxWidth); } -sal_uInt32 ImpEditEngine::CalcLineWidth( ParaPortion* pPortion, EditLine* pLine, bool bIgnoreExtraSpace, bool bIgnoreTrailingWhiteSpaces ) +sal_uInt32 ImpEditEngine::CalcLineWidth( ParaPortion* pPortion, EditLine* pLine, bool bIgnoreExtraSpace ) { sal_Int32 nPara = GetEditDoc().GetPos( pPortion->GetNode() ); @@ -3195,7 +3194,7 @@ sal_uInt32 ImpEditEngine::CalcLineWidth( ParaPortion* pPortion, EditLine* pLine, break; case PortionKind::TEXT: { - if ( (( eJustification != SvxAdjust::Block ) || ( !bIgnoreExtraSpace )) && !bIgnoreTrailingWhiteSpaces ) + if ( ( eJustification != SvxAdjust::Block ) || ( !bIgnoreExtraSpace ) ) { nWidth += rTextPortion.GetSize().Width(); } @@ -3205,10 +3204,7 @@ sal_uInt32 ImpEditEngine::CalcLineWidth( ParaPortion* pPortion, EditLine* pLine, SeekCursor( pPortion->GetNode(), nPos+1, aTmpFont ); aTmpFont.SetPhysFont( GetRefDevice() ); ImplInitDigitMode(GetRefDevice(), aTmpFont.GetLanguage()); - if (bIgnoreTrailingWhiteSpaces) - nWidth += aTmpFont.QuickGetTextSize( GetRefDevice(), pPortion->GetNode()->GetString().trim(), nPos, rTextPortion.GetLen() ).Width(); - else - nWidth += aTmpFont.QuickGetTextSize( GetRefDevice(), pPortion->GetNode()->GetString(), nPos, rTextPortion.GetLen() ).Width(); + nWidth += aTmpFont.QuickGetTextSize( GetRefDevice(), pPortion->GetNode()->GetString(), nPos, rTextPortion.GetLen() ).Width(); } } break; |