summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sfx2/source/view/viewfrm.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index e8eeb3979ff7..f6944a9d3dee 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -2570,7 +2570,7 @@ void CutLines( OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines, sal_Bool
rStr = rStr.copy( 0, nStartPos );
rStr += aEndStr;
}
- if ( bEraseTrailingEmptyLines )
+ if ( bEraseTrailingEmptyLines && nStartPos != -1 )
{
sal_Int32 n = nStartPos;
sal_Int32 nLen = rStr.getLength();