From 8acf24d89235675cdd3ab4c819b580d943f740f9 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Thu, 12 Nov 2015 22:48:30 +0100 Subject: there are no significant brackets in an ODF cellRangeAddress Change-Id: Id606fb432073b37354f37ace05a3574ab00e1fa7 --- sc/source/filter/xml/XMLConverter.cxx | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/sc/source/filter/xml/XMLConverter.cxx b/sc/source/filter/xml/XMLConverter.cxx index 6be03e6b5e19..50a15267bd6e 100644 --- a/sc/source/filter/xml/XMLConverter.cxx +++ b/sc/source/filter/xml/XMLConverter.cxx @@ -284,7 +284,6 @@ void ScXMLConverter::ConvertCellRangeAddress(OUString& sFormula) OUStringBuffer sBuffer(sFormula.getLength()); bool bInQuotationMarks(false); bool bInDoubleQuotationMarks(false); - sal_Int16 nCountBraces(0); sal_Unicode chPrevious('='); for (sal_Int32 i = 0; i < sFormula.getLength(); ++i) { @@ -295,17 +294,12 @@ void ScXMLConverter::ConvertCellRangeAddress(OUString& sFormula) bInDoubleQuotationMarks = !bInDoubleQuotationMarks; if (bInQuotationMarks || bInDoubleQuotationMarks) sBuffer.append(sFormula[i]); - else if (sFormula[i] == '[') - ++nCountBraces; - else if (sFormula[i] == ']') - nCountBraces--; else if ((sFormula[i] != '.') || - !((chPrevious == '[') || (chPrevious == ':') || (chPrevious == ' ') || (chPrevious == '='))) + !((chPrevious == ':') || (chPrevious == ' ') || (chPrevious == '='))) sBuffer.append(sFormula[i]); chPrevious = sFormula[i]; } - OSL_ENSURE(nCountBraces == 0, "there are some braces still open"); sFormula = sBuffer.makeStringAndClear(); } -- cgit