[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - sw/source

Oliver Specht oliver.specht at cib.de
Sun Feb 28 10:23:25 UTC 2016


 sw/source/core/text/itrform2.cxx |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 05818ce01f1d4aa693235f46b6b4b922dffe648b
Author: Oliver Specht <oliver.specht at cib.de>
Date:   Tue Feb 23 12:13:21 2016 +0100

    tdf#97139: prevent loop while formatting small text lines
    
    when text is inserted at the end of a line then text formatting
    starts some characters (platform and ENABLE_GRAPHITE dependent)
    before the insert position. In case of small lines this might even
    be the start of the line. To prevent going back to the previous
    line the cursor right margin flag needs to be reset.
    
    Change-Id: I73a62ce6c7707469fddeeffe0d7eec064c5989ea
    Reviewed-on: https://gerrit.libreoffice.org/22641
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Oliver Specht <oliver.specht at cib.de>
    Reviewed-on: https://gerrit.libreoffice.org/22663
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index f232459..c6864e8 100644
--- a/sw/source/core/text/itrform2.cxx
+++ b/sw/source/core/text/itrform2.cxx
@@ -2686,7 +2686,7 @@ namespace {
                          const sal_Int32 nOldLineEnd,
                          const std::vector<long> &rFlyStarts )
     {
-        SwTextFormatInfo txtFormatInfo = rThis.GetInfo();
+        SwTextFormatInfo& txtFormatInfo = rThis.GetInfo();
         if ( txtFormatInfo.GetIdx() < txtFormatInfo.GetReformatStart() )
         // the reformat position is behind our new line, that means
         // something of our text has moved to the next line
@@ -2733,7 +2733,11 @@ namespace {
                 if ( nReformat > txtFormatInfo.GetLineStart() + nMaxContext )
                     nReformat = nReformat - nMaxContext;
                 else
+                {
                     nReformat = txtFormatInfo.GetLineStart();
+                    //reset the margin flag - prevent loops
+                    SwTextCursor::SetRightMargin(false);
+                }
             }
 
             // Weird situation: Our line used to end with a hole portion


More information about the Libreoffice-commits mailing list