diff options
author | Tobias Lippert <drtl@fastmail.fm> | 2015-09-27 21:30:20 +0200 |
---|---|---|
committer | Oliver Specht <oliver.specht@cib.de> | 2015-11-04 14:30:17 +0000 |
commit | 20538f233fe120b33a23d594458d4639b0c9670e (patch) | |
tree | bdb24e0c6c6a10f1bb002ccee8e4eec4e773eccb /sw/source/core/text | |
parent | aa334d55ee34c125f6f4fdfaadbc1ed8fa33f5bc (diff) |
tdf#83910 Formatting of lines which consist of a single dummy line only
The document which is attached to the ticket runs into an infinite
loop because GetLineNr() does not increase since
only dummy lines are added during formatting.
Change-Id: I92689c776fe69bb6f62af26b577989db7f34de43
Reviewed-on: https://gerrit.libreoffice.org/18896
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Oliver Specht <oliver.specht@cib.de>
Diffstat (limited to 'sw/source/core/text')
-rw-r--r-- | sw/source/core/text/widorp.hxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sw/source/core/text/widorp.hxx b/sw/source/core/text/widorp.hxx index 18e80f1abe95..8541848517b7 100644 --- a/sw/source/core/text/widorp.hxx +++ b/sw/source/core/text/widorp.hxx @@ -71,7 +71,14 @@ public: // method <SwTextFrmBreak::IsBreakNow>, which isn't virtual. bool IsBreakNowWidAndOrp( SwTextMargin &rLine ) { - return ( rLine.GetLineNr() > nOrphLines ) && IsBreakNow( rLine ); + bool isOnFirstLine = (rLine.GetLineNr() == 1 && !rLine.GetPrev()); + if ( isOnFirstLine && rLine.GetCurr()->IsDummy()) { + return IsBreakNow( rLine ); + } + if ( rLine.GetLineNr() > nOrphLines ) { + return IsBreakNow( rLine ); + } + return false; } }; |