diff options
author | Ocke Janssen [oj] <Ocke.Janssen@sun.com> | 2010-01-07 09:18:48 +0100 |
---|---|---|
committer | Ocke Janssen [oj] <Ocke.Janssen@sun.com> | 2010-01-07 09:18:48 +0100 |
commit | 339ff079289802afdc69207364bb987955819a27 (patch) | |
tree | 49f51efffd8a6d0452433ed1190bd96ff680a299 /reportdesign | |
parent | 1eac49df5c337a5832231514c7e352009f0295fd (diff) | |
parent | c2e5ecc21502279bc009185ecb17dfb3c9df65f6 (diff) |
Automated merge with http://hg.services.openoffice.org/cws/dba33e
Diffstat (limited to 'reportdesign')
-rw-r--r-- | reportdesign/source/filter/xml/xmlExport.cxx | 7 | ||||
-rw-r--r-- | reportdesign/source/filter/xml/xmlGroup.cxx | 11 |
2 files changed, 17 insertions, 1 deletions
diff --git a/reportdesign/source/filter/xml/xmlExport.cxx b/reportdesign/source/filter/xml/xmlExport.cxx index aff63a9eb6f8..3cb44abcc17a 100644 --- a/reportdesign/source/filter/xml/xmlExport.cxx +++ b/reportdesign/source/filter/xml/xmlExport.cxx @@ -1117,6 +1117,13 @@ sal_Bool ORptExport::exportGroup(const Reference<XReportDefinition>& _xReportDef ::rtl::OUString sExpression = xGroup->getExpression(); if ( sExpression.getLength() ) { + static ::rtl::OUString s_sQuote(RTL_CONSTASCII_USTRINGPARAM("\"\"")); + sal_Int32 nIndex = sExpression.indexOf('"'); + while ( nIndex > -1 ) + { + sExpression = sExpression.replaceAt(nIndex,1,s_sQuote); + nIndex = sExpression.indexOf('"',nIndex+2);SELECT "D4 Product"."P10 Color" || ',' || "D2 Market"."M04 Region" , "F1 Revenue"."1-01 Revenue (Sum All)" FROM "Sample Sales" + } ::rtl::OUString sFormula(RTL_CONSTASCII_USTRINGPARAM("rpt:HASCHANGED(\"")); TGroupFunctionMap::iterator aGroupFind = m_aGroupFunctionMap.find(xGroup); diff --git a/reportdesign/source/filter/xml/xmlGroup.cxx b/reportdesign/source/filter/xml/xmlGroup.cxx index 195b41aaa3c0..b49f6b0e7b9c 100644 --- a/reportdesign/source/filter/xml/xmlGroup.cxx +++ b/reportdesign/source/filter/xml/xmlGroup.cxx @@ -105,6 +105,7 @@ OXMLGroup::OXMLGroup( ORptFilter& _rImport sal_Int32 nLen = sValue.getLength(); if ( nLen ) { + const static ::rtl::OUString s_sChanged(RTL_CONSTASCII_USTRINGPARAM("rpt:HASCHANGED(\"")); sal_Int32 nPos = sValue.indexOf(s_sChanged); if ( nPos == -1 ) @@ -112,7 +113,15 @@ OXMLGroup::OXMLGroup( ORptFilter& _rImport else { nPos = s_sChanged.getLength(); - --nLen; + static ::rtl::OUString s_sQuote(RTL_CONSTASCII_USTRINGPARAM("\"\"")); + static ::rtl::OUString s_sSingleQuote(RTL_CONSTASCII_USTRINGPARAM("\"")); + sal_Int32 nIndex = sValue.indexOf(s_sQuote,nPos); + while ( nIndex > -1 ) + { + sValue = sValue.replaceAt(nIndex,2,s_sSingleQuote); + nIndex = sValue.indexOf(s_sQuote,nIndex+2); + } + nLen = sValue.getLength() - 1; } sValue = sValue.copy(nPos,nLen-nPos-1); const ORptFilter::TGroupFunctionMap& aFunctions = _rImport.getFunctions(); |