summaryrefslogtreecommitdiff
path: root/sc/source/filter/xml/XMLConverter.cxx
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-06-06 05:41:42 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-06-11 08:01:25 +0200
commitc41ee0d526c6d105d53cace1c81e43a9cc519c2d (patch)
tree7b0e4b2c41ed5dfdd9108664cbae7096ed1fbb5d /sc/source/filter/xml/XMLConverter.cxx
parent306f586453aa90eb29ae95770f84a13ead056b7c (diff)
fix cond format import from ods
Change-Id: I974c46fad862edd320b54d4c7e72807dd715dfb1
Diffstat (limited to 'sc/source/filter/xml/XMLConverter.cxx')
-rw-r--r--sc/source/filter/xml/XMLConverter.cxx32
1 files changed, 16 insertions, 16 deletions
diff --git a/sc/source/filter/xml/XMLConverter.cxx b/sc/source/filter/xml/XMLConverter.cxx
index aa67e5502b2a..b475c174e694 100644
--- a/sc/source/filter/xml/XMLConverter.cxx
+++ b/sc/source/filter/xml/XMLConverter.cxx
@@ -546,19 +546,6 @@ void lclSkipExpression( const sal_Unicode*& rpcString, const sal_Unicode* pcEnd,
@param cEndChar
The termination character following the expression.
*/
-OUString lclGetExpression( const sal_Unicode*& rpcString, const sal_Unicode* pcEnd, sal_Unicode cEndChar )
-{
- OUString aExp;
- const sal_Unicode* pcExpStart = rpcString;
- lclSkipExpression( rpcString, pcEnd, cEndChar );
- if( rpcString < pcEnd )
- {
- aExp = OUString( pcExpStart, static_cast< sal_Int32 >( rpcString - pcExpStart ) ).trim();
- ++rpcString;
- }
- return aExp;
-}
-
/** Tries to skip an empty pair of parentheses (which may contain whitespace
characters).
@@ -634,7 +621,7 @@ void ScXMLConditionHelper::parseCondition(
// format is <condition>(<expression>)
if( (pcString < pcEnd) && (*pcString == '(') )
{
- rParseResult.maOperand1 = lclGetExpression( ++pcString, pcEnd, ')' );
+ rParseResult.maOperand1 = getExpression( ++pcString, pcEnd, ')' );
if( !rParseResult.maOperand1.isEmpty() )
rParseResult.meToken = pCondInfo->meToken;
}
@@ -644,10 +631,10 @@ void ScXMLConditionHelper::parseCondition(
// format is <condition>(<expression1>,<expression2>)
if( (pcString < pcEnd) && (*pcString == '(') )
{
- rParseResult.maOperand1 = lclGetExpression( ++pcString, pcEnd, ',' );
+ rParseResult.maOperand1 = getExpression( ++pcString, pcEnd, ',' );
if( !rParseResult.maOperand1.isEmpty() )
{
- rParseResult.maOperand2 = lclGetExpression( pcString, pcEnd, ')' );
+ rParseResult.maOperand2 = getExpression( pcString, pcEnd, ')' );
if( !rParseResult.maOperand2.isEmpty() )
rParseResult.meToken = pCondInfo->meToken;
}
@@ -658,6 +645,19 @@ void ScXMLConditionHelper::parseCondition(
}
}
+OUString ScXMLConditionHelper::getExpression( const sal_Unicode*& rpcString, const sal_Unicode* pcEnd, sal_Unicode cEndChar )
+{
+ OUString aExp;
+ const sal_Unicode* pcExpStart = rpcString;
+ lclSkipExpression( rpcString, pcEnd, cEndChar );
+ if( rpcString < pcEnd )
+ {
+ aExp = OUString( pcExpStart, static_cast< sal_Int32 >( rpcString - pcExpStart ) ).trim();
+ ++rpcString;
+ }
+ return aExp;
+}
+
// ============================================================================
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */