[Libreoffice-commits] core.git: sc/source
Eike Rathke
erack at redhat.com
Tue Oct 6 07:56:07 PDT 2015
sc/source/ui/view/output2.cxx | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
New commits:
commit 815b6162cb5df4aa79e889a352dcf3bfa69bdd09
Author: Eike Rathke <erack at redhat.com>
Date: Tue Oct 6 16:48:44 2015 +0200
formatted string could contain a trailing 0x1B, though very unlikely
Change-Id: Ie95b168ee7c4101d7a9ee45d5753ea8ff557e00a
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index 6c44bf3..605e487 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -504,12 +504,17 @@ bool ScDrawStringsVars::SetText( ScRefCellValue& rCell )
nPos = aString.indexOf( 0x1B );
if ( nPos != -1 )
{
- nChar = aString[ nPos + 1 ];
- // delete placeholder and char to repeat
- aString = aString.replaceAt( nPos, 2, "" );
- // Do not cache/reuse a repeat-filled string, column widths
- // or fonts or sizes may differ.
- maLastCell.clear();
+ if (nPos + 1 == aString.getLength())
+ nPos = -1;
+ else
+ {
+ nChar = aString[ nPos + 1 ];
+ // delete placeholder and char to repeat
+ aString = aString.replaceAt( nPos, 2, "" );
+ // Do not cache/reuse a repeat-filled string, column
+ // widths or fonts or sizes may differ.
+ maLastCell.clear();
+ }
}
}
else
More information about the Libreoffice-commits
mailing list