summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/text/itrform2.cxx18
1 files changed, 18 insertions, 0 deletions
diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index b36aa42d9690..60c17daa74ed 100644
--- a/sw/source/core/text/itrform2.cxx
+++ b/sw/source/core/text/itrform2.cxx
@@ -1595,6 +1595,24 @@ xub_StrLen SwTxtFormatter::FormatLine( const xub_StrLen nStartPos )
}
}
+ // In case of compat mode, it's possible that a tab portion is wider after
+ // formatting than before. If this is the case, we also have to make sure
+ // the SwLineLayout is wider as well.
+ if (GetInfo().GetTxtFrm()->GetTxtNode()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::TAB_OVER_MARGIN))
+ {
+ sal_uInt16 nSum = 0;
+ SwLinePortion* pPor = pCurr->GetFirstPortion();
+
+ while (pPor)
+ {
+ nSum += pPor->Width();
+ pPor = pPor->GetPortion();
+ }
+
+ if (nSum > pCurr->Width())
+ pCurr->Width(nSum);
+ }
+
// calculate optimal repaint rectangle
if ( bOptimizeRepaint )
{