[Libreoffice-commits] core.git: Branch 'libreoffice-4-0' - svl/source
Eike Rathke
erack at redhat.com
Mon Mar 18 10:35:57 PDT 2013
svl/source/numbers/zformat.cxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 6690e18c5f45e24d013bcccdc47a2d32a3b2f050
Author: Eike Rathke <erack at redhat.com>
Date: Mon Mar 18 18:24:24 2013 +0100
make empty subformat code work again
Broken with 842c95519a35174238c728784662f854031993d7 were things like
;;;@ or _;0
Change-Id: Idf99378beedacf97a0376d1cd11ee78d3f7c9aff
Signed-off-by: Fridrich Å trba <fridrich.strba at bluewin.ch>
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index 3aeb686..1b12669 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -1295,7 +1295,7 @@ sal_Unicode toUniChar(sal_uInt8 n)
bool IsSingleSymbol(OUStringBuffer& rStringBuffer, sal_Int32 nPos)
{
bool ret = false;
- while(nPos > 0)
+ while (nPos >= 0)
{
if(rStringBuffer[nPos] == '*' || rStringBuffer[nPos] == '\\' || rStringBuffer[nPos] == '_')
{
@@ -1556,7 +1556,7 @@ short SvNumberformat::ImpNextSymbol(OUStringBuffer& rString,
}
break;
case SsGetString:
- if (cToken == ';' && (nPos>=2) && !IsSingleSymbol(rString, nPos-2))
+ if (cToken == ';' && (nPos < 2 || !IsSingleSymbol(rString, nPos-2)))
{
eState = SsStop;
}
More information about the Libreoffice-commits
mailing list