diff options
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/tabpages/numfmt.cxx | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx index 52d23567c2b7..d4af55c7883e 100644 --- a/cui/source/tabpages/numfmt.cxx +++ b/cui/source/tabpages/numfmt.cxx @@ -112,9 +112,21 @@ void SvxNumberPreview::NotifyChange( const OUString& rPrevStr, mnPos = aPrevStr.indexOf( 0x1B ); if ( mnPos != -1 ) { - mnChar = aPrevStr[ mnPos + 1 ]; - // delete placeholder and char to repeat - aPrevStr = aPrevStr.replaceAt( mnPos, 2, "" ); + // Right during user input the star symbol is the very + // last character before the user enters another one. + if (mnPos < aPrevStr.getLength() - 1) + { + mnChar = aPrevStr[ mnPos + 1 ]; + // delete placeholder and char to repeat + aPrevStr = aPrevStr.replaceAt( mnPos, 2, "" ); + } + else + { + // delete placeholder + aPrevStr = aPrevStr.replaceAt( mnPos, 1, "" ); + // do not attempt to draw a 0 fill character + mnPos = -1; + } } svtools::ColorConfig aColorConfig; Color aWindowTextColor( aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor ); |