summaryrefslogtreecommitdiff
path: root/reportdesign/source/filter/xml/xmlGroup.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'reportdesign/source/filter/xml/xmlGroup.cxx')
-rw-r--r--reportdesign/source/filter/xml/xmlGroup.cxx15
1 files changed, 12 insertions, 3 deletions
diff --git a/reportdesign/source/filter/xml/xmlGroup.cxx b/reportdesign/source/filter/xml/xmlGroup.cxx
index 9fb6b4239e76..e6c001a9ce62 100644
--- a/reportdesign/source/filter/xml/xmlGroup.cxx
+++ b/reportdesign/source/filter/xml/xmlGroup.cxx
@@ -102,6 +102,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 )
@@ -109,7 +110,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();
@@ -139,8 +148,8 @@ OXMLGroup::OXMLGroup( ORptFilter& _rImport
{
nGroupOn = report::GroupOn::MONTH;
}
- else if ( sCompleteFormula.matchAsciiL("rpt:INT((MONTH",sizeof("rpt:INT((MONTH"),0)
- && sCompleteFormula.endsWithIgnoreAsciiCaseAsciiL("-1)/3)+1",sizeof("-1)/3)+1")) )
+ else if ( sCompleteFormula.matchIgnoreAsciiCase(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("rpt:INT((MONTH")),0)
+ && sCompleteFormula.endsWithIgnoreAsciiCaseAsciiL("-1)/3)+1",8) )
{
nGroupOn = report::GroupOn::QUARTAL;
}