summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/text/itrform2.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index a8f5ff228ddd..f1937ca3cd2f 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