[Libreoffice-commits] .: sc/source
Kohei Yoshida
kohei at kemper.freedesktop.org
Thu May 12 23:21:27 PDT 2011
sc/source/core/tool/rangeutl.cxx | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
New commits:
commit a8384828566b864e226f8c8897a6b0861571d910
Author: Kohei Yoshida <kyoshida at novell.com>
Date: Fri May 13 02:20:12 2011 -0400
We are supposed to do the 2nd parse using the UI address convention.
diff --git a/sc/source/core/tool/rangeutl.cxx b/sc/source/core/tool/rangeutl.cxx
index 72bd8d6..dc3e93f 100644
--- a/sc/source/core/tool/rangeutl.cxx
+++ b/sc/source/core/tool/rangeutl.cxx
@@ -504,9 +504,10 @@ sal_Bool ScRangeStringConverter::GetRangeFromString(
if ( aUIString.GetChar(0) == (sal_Unicode) '.' )
aUIString.Erase( 0, 1 );
bResult = ((rRange.aStart.Parse( aUIString, const_cast<ScDocument*> (pDocument), eConv) & SCA_VALID) == SCA_VALID);
- if (!bResult && eConv != eConv)
+ ::formula::FormulaGrammar::AddressConvention eConvUI = pDocument->GetAddressConvention();
+ if (!bResult && eConv != eConvUI)
bResult = ((rRange.aStart.Parse(
- aUIString, const_cast<ScDocument*>(pDocument), eConv) & SCA_VALID) == SCA_VALID);
+ aUIString, const_cast<ScDocument*>(pDocument), eConvUI) & SCA_VALID) == SCA_VALID);
rRange.aEnd = rRange.aStart;
}
else
@@ -531,12 +532,14 @@ sal_Bool ScRangeStringConverter::GetRangeFromString(
eConv) & SCA_VALID) == SCA_VALID) &&
((rRange.aEnd.Parse( aUIString.Copy((xub_StrLen)nIndex+1), const_cast<ScDocument*>(pDocument),
eConv) & SCA_VALID) == SCA_VALID);
- if (!bResult && eConv != eConv)
+
+ ::formula::FormulaGrammar::AddressConvention eConvUI = pDocument->GetAddressConvention();
+ if (!bResult && eConv != eConvUI)
{
bResult = ((rRange.aStart.Parse( aUIString.Copy(0, (xub_StrLen)nIndex), const_cast<ScDocument*>(pDocument),
- eConv) & SCA_VALID) == SCA_VALID) &&
+ eConvUI) & SCA_VALID) == SCA_VALID) &&
((rRange.aEnd.Parse( aUIString.Copy((xub_StrLen)nIndex+1), const_cast<ScDocument*>(pDocument),
- eConv) & SCA_VALID) == SCA_VALID);
+ eConvUI) & SCA_VALID) == SCA_VALID);
}
}
}
More information about the Libreoffice-commits
mailing list