sw/source/core/text/itrform2.cxx | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
New commits: commit 5dc729cae00e6ea35f5dde13eba89434be2d7dc5 Author: Miklos Vajna <vmik...@suse.cz> Date: Tue Mar 5 16:25:57 2013 +0100 bnc#793998 SwTxtFormatter::FormatLine: fix missing repaints The incorrect SwLineLayout width caused a missing repaint when a character is inserted after the tab in the bugdoc, see the already existing sw/qa/extras/ooxmlimport/data/n793998.docx. Change-Id: I685203eeb2ed4236758d65132069cd894ece488c diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx index 4cee223..04cb5a3 100644 --- a/sw/source/core/text/itrform2.cxx +++ b/sw/source/core/text/itrform2.cxx @@ -1597,6 +1597,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 ) { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits