diff options
author | Noel Grandin <noel@peralex.com> | 2013-10-25 17:35:42 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-11-04 10:11:08 +0200 |
commit | 5285beeaa49f6678b471d472868c305c7d9da5f9 (patch) | |
tree | a3dbd28995142ab16b448f28e95821115ef5408f /reportdesign | |
parent | aeb41c9b9b7559c6d87bf92807acdc0df9e104cc (diff) |
remove redundant calls to OUString constructor in if expression
Convert code like:
if( aStr == OUString("xxxx") )
to this:
if( aStr == "xxxx" )
Change-Id: I8d201f048477731eff590fb988259ef0935c080c
Diffstat (limited to 'reportdesign')
-rw-r--r-- | reportdesign/source/filter/xml/xmlGroup.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/reportdesign/source/filter/xml/xmlGroup.cxx b/reportdesign/source/filter/xml/xmlGroup.cxx index 6fc2f92018e0..602caf9e181d 100644 --- a/reportdesign/source/filter/xml/xmlGroup.cxx +++ b/reportdesign/source/filter/xml/xmlGroup.cxx @@ -125,7 +125,7 @@ OXMLGroup::OXMLGroup( ORptFilter& _rImport const OUString sFormula = sCompleteFormula.getToken(0,'(',nIndex); ::sal_Int16 nGroupOn = report::GroupOn::DEFAULT; - if ( sFormula ==OUString("rpt:LEFT")) + if ( sFormula == "rpt:LEFT") { nGroupOn = report::GroupOn::PREFIX_CHARACTERS; OUString sInterval = sCompleteFormula.getToken(1,';',nIndex); @@ -133,26 +133,26 @@ OXMLGroup::OXMLGroup( ORptFilter& _rImport sInterval = sInterval.getToken(0,')',nIndex); m_xGroup->setGroupInterval(sInterval.toInt32()); } - else if ( sFormula == OUString("rpt:YEAR")) + else if ( sFormula == "rpt:YEAR") nGroupOn = report::GroupOn::YEAR; - else if ( sFormula == OUString("rpt:MONTH")) + else if ( sFormula == "rpt:MONTH") { nGroupOn = report::GroupOn::MONTH; } - else if ( sCompleteFormula.matchIgnoreAsciiCase(OUString("rpt:INT((MONTH"),0) + else if ( sCompleteFormula.matchIgnoreAsciiCase("rpt:INT((MONTH",0) && sCompleteFormula.endsWithIgnoreAsciiCaseAsciiL("-1)/3)+1",8) ) { nGroupOn = report::GroupOn::QUARTAL; } - else if ( sFormula ==OUString("rpt:WEEK")) + else if ( sFormula == "rpt:WEEK") nGroupOn = report::GroupOn::WEEK; - else if ( sFormula ==OUString("rpt:DAY")) + else if ( sFormula == "rpt:DAY") nGroupOn = report::GroupOn::DAY; - else if ( sFormula ==OUString("rpt:HOUR")) + else if ( sFormula == "rpt:HOUR") nGroupOn = report::GroupOn::HOUR; - else if ( sFormula ==OUString("rpt:MINUTE")) + else if ( sFormula == "rpt:MINUTE") nGroupOn = report::GroupOn::MINUTE; - else if ( sFormula ==OUString("rpt:INT")) + else if ( sFormula == "rpt:INT") { nGroupOn = report::GroupOn::INTERVAL; _rImport.removeFunction(sExpression); |