diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2013-03-19 09:22:44 +0100 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2013-03-19 09:00:26 +0000 |
commit | 8b27d78b4afaa9c47ca0fda144c8060f2f14046b (patch) | |
tree | 2dbddceebf0f96492adc5652697e8efce8a8ba06 /reportdesign/source/filter | |
parent | fe8eba5faa59ddf9ee82f3eb009daac72a0ec846 (diff) |
automated removal of RTL_CONSTASCII_USTRINGPARAM for quoted OUStrings
Done with a perl regex:
s/OUString\s*\(\s*RTL_CONSTASCII_USTRINGPARAM\s*\((\s*"[^")]*?"\s*)\)\s*\)/OUString\($1\)/gms
Change-Id: Idf28320817cdcbea6d0f7ec06a9bf51bd2c3b3ec
Reviewed-on: https://gerrit.libreoffice.org/2832
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
Diffstat (limited to 'reportdesign/source/filter')
-rw-r--r-- | reportdesign/source/filter/xml/dbloader2.cxx | 10 | ||||
-rw-r--r-- | reportdesign/source/filter/xml/dbloader2.hxx | 2 | ||||
-rw-r--r-- | reportdesign/source/filter/xml/xmlCell.cxx | 2 | ||||
-rw-r--r-- | reportdesign/source/filter/xml/xmlExport.cxx | 72 | ||||
-rw-r--r-- | reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx | 14 | ||||
-rw-r--r-- | reportdesign/source/filter/xml/xmlFixedContent.cxx | 4 | ||||
-rw-r--r-- | reportdesign/source/filter/xml/xmlGroup.cxx | 20 | ||||
-rw-r--r-- | reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx | 12 | ||||
-rw-r--r-- | reportdesign/source/filter/xml/xmlStyleImport.cxx | 10 | ||||
-rw-r--r-- | reportdesign/source/filter/xml/xmlfilter.cxx | 22 |
10 files changed, 84 insertions, 84 deletions
diff --git a/reportdesign/source/filter/xml/dbloader2.cxx b/reportdesign/source/filter/xml/dbloader2.cxx index 72408c52d3a5..62c17447fd12 100644 --- a/reportdesign/source/filter/xml/dbloader2.cxx +++ b/reportdesign/source/filter/xml/dbloader2.cxx @@ -49,13 +49,13 @@ ORptTypeDetection::ORptTypeDetection(Reference< XComponentContext > const & xCon { ::comphelper::SequenceAsHashMap aTemp(Descriptor); - ::rtl::OUString sTemp = aTemp.getUnpackedValueOrDefault(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("URL")),::rtl::OUString()); + ::rtl::OUString sTemp = aTemp.getUnpackedValueOrDefault(::rtl::OUString("URL"),::rtl::OUString()); if ( !sTemp.isEmpty() ) { INetURLObject aURL(sTemp); if ( aURL.GetExtension().equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("orp")) ) - return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("StarBaseReport")); + return ::rtl::OUString("StarBaseReport"); else { try @@ -64,9 +64,9 @@ ORptTypeDetection::ORptTypeDetection(Reference< XComponentContext > const & xCon if ( xProp.is() ) { ::rtl::OUString sMediaType; - xProp->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")) ) >>= sMediaType; + xProp->getPropertyValue( ::rtl::OUString("MediaType") ) >>= sMediaType; if ( sMediaType == MIMETYPE_OASIS_OPENDOCUMENT_REPORT_ASCII ) - return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("StarBaseReport")); + return ::rtl::OUString("StarBaseReport"); ::comphelper::disposeComponent(xProp); } } @@ -107,7 +107,7 @@ Sequence< ::rtl::OUString > SAL_CALL ORptTypeDetection::getSupportedServiceNames Sequence< ::rtl::OUString > ORptTypeDetection::getSupportedServiceNames_Static(void) throw( RuntimeException ) { Sequence< ::rtl::OUString > aSNS( 1 ); - aSNS.getArray()[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.ExtendedTypeDetection")); + aSNS.getArray()[0] = ::rtl::OUString("com.sun.star.document.ExtendedTypeDetection"); return aSNS; } // ----------------------------------------------------------------------------- diff --git a/reportdesign/source/filter/xml/dbloader2.hxx b/reportdesign/source/filter/xml/dbloader2.hxx index ea6623d2f9d7..33dcfe8769f5 100644 --- a/reportdesign/source/filter/xml/dbloader2.hxx +++ b/reportdesign/source/filter/xml/dbloader2.hxx @@ -80,7 +80,7 @@ public: // static methods static ::rtl::OUString getImplementationName_Static(void) throw( ::com::sun::star::uno::RuntimeException ) { - return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.report.ORptTypeDetection")); + return ::rtl::OUString("com.sun.star.comp.report.ORptTypeDetection"); } static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static(void) throw( ::com::sun::star::uno::RuntimeException ); static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL diff --git a/reportdesign/source/filter/xml/xmlCell.cxx b/reportdesign/source/filter/xml/xmlCell.cxx index 87df50d2b6ab..650b1c49cc46 100644 --- a/reportdesign/source/filter/xml/xmlCell.cxx +++ b/reportdesign/source/filter/xml/xmlCell.cxx @@ -204,7 +204,7 @@ void OXMLCell::EndElement() Reference<XMultiServiceFactory> xFactor(rImport.GetModel(),uno::UNO_QUERY); uno::Reference< uno::XInterface> xInt = xFactor->createInstance(SERVICE_FORMATTEDFIELD); Reference< report::XFormattedField > xControl(xInt,uno::UNO_QUERY); - xControl->setDataField(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("rpt:")) + m_sText); + xControl->setDataField(::rtl::OUString("rpt:") + m_sText); OSL_ENSURE(xControl.is(),"Could not create FormattedField!"); setComponent(xControl.get()); diff --git a/reportdesign/source/filter/xml/xmlExport.cxx b/reportdesign/source/filter/xml/xmlExport.cxx index 781c71304269..47327352352c 100644 --- a/reportdesign/source/filter/xml/xmlExport.cxx +++ b/reportdesign/source/filter/xml/xmlExport.cxx @@ -78,13 +78,13 @@ namespace rptxml //--------------------------------------------------------------------- ::rtl::OUString ORptExportHelper::getImplementationName_Static( ) throw (RuntimeException) { - return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.report.XMLSettingsExporter")); + return ::rtl::OUString("com.sun.star.comp.report.XMLSettingsExporter"); } //--------------------------------------------------------------------- Sequence< ::rtl::OUString > ORptExportHelper::getSupportedServiceNames_Static( ) throw(RuntimeException) { Sequence< ::rtl::OUString > aSupported(1); - aSupported[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.ExportFilter")); + aSupported[0] = ::rtl::OUString("com.sun.star.document.ExportFilter"); return aSupported; } //--------------------------------------------------------------------- @@ -95,13 +95,13 @@ namespace rptxml //--------------------------------------------------------------------- ::rtl::OUString ORptContentExportHelper::getImplementationName_Static( ) throw (RuntimeException) { - return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.report.XMLContentExporter")); + return ::rtl::OUString("com.sun.star.comp.report.XMLContentExporter"); } //--------------------------------------------------------------------- Sequence< ::rtl::OUString > ORptContentExportHelper::getSupportedServiceNames_Static( ) throw(RuntimeException) { Sequence< ::rtl::OUString > aSupported(1); - aSupported[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.ExportFilter")); + aSupported[0] = ::rtl::OUString("com.sun.star.document.ExportFilter"); return aSupported; } @@ -114,13 +114,13 @@ namespace rptxml //--------------------------------------------------------------------- ::rtl::OUString ORptStylesExportHelper::getImplementationName_Static( ) throw (RuntimeException) { - return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.report.XMLStylesExporter")); + return ::rtl::OUString("com.sun.star.comp.report.XMLStylesExporter"); } //--------------------------------------------------------------------- Sequence< ::rtl::OUString > ORptStylesExportHelper::getSupportedServiceNames_Static( ) throw(RuntimeException) { Sequence< ::rtl::OUString > aSupported(1); - aSupported[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.ExportFilter")); + aSupported[0] = ::rtl::OUString("com.sun.star.document.ExportFilter"); return aSupported; } @@ -132,13 +132,13 @@ namespace rptxml //--------------------------------------------------------------------- ::rtl::OUString ORptMetaExportHelper::getImplementationName_Static( ) throw (RuntimeException) { - return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.report.XMLMetaExporter")); + return ::rtl::OUString("com.sun.star.comp.report.XMLMetaExporter"); } //--------------------------------------------------------------------- Sequence< ::rtl::OUString > ORptMetaExportHelper::getSupportedServiceNames_Static( ) throw(RuntimeException) { Sequence< ::rtl::OUString > aSupported(1); - aSupported[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.ExportFilter")); + aSupported[0] = ::rtl::OUString("com.sun.star.document.ExportFilter"); return aSupported; } @@ -150,13 +150,13 @@ namespace rptxml //--------------------------------------------------------------------- ::rtl::OUString ODBFullExportHelper::getImplementationName_Static( ) throw (RuntimeException) { - return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.report.XMLFullExporter")); + return ::rtl::OUString("com.sun.star.comp.report.XMLFullExporter"); } //--------------------------------------------------------------------- Sequence< ::rtl::OUString > ODBFullExportHelper::getSupportedServiceNames_Static( ) throw(RuntimeException) { Sequence< ::rtl::OUString > aSupported(1); - aSupported[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.ExportFilter")); + aSupported[0] = ::rtl::OUString("com.sun.star.document.ExportFilter"); return aSupported; } @@ -311,7 +311,7 @@ Reference< XInterface > ORptExport::create(Reference< XComponentContext > const // ----------------------------------------------------------------------------- ::rtl::OUString ORptExport::getImplementationName_Static( ) throw(uno::RuntimeException) { - return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.report.ExportFilter")); + return ::rtl::OUString("com.sun.star.comp.report.ExportFilter"); } //-------------------------------------------------------------------------- @@ -323,7 +323,7 @@ Reference< XInterface > ORptExport::create(Reference< XComponentContext > const uno::Sequence< ::rtl::OUString > ORptExport::getSupportedServiceNames_Static( ) throw(uno::RuntimeException) { uno::Sequence< ::rtl::OUString > aServices(1); - aServices.getArray()[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.ExportFilter")); + aServices.getArray()[0] = ::rtl::OUString("com.sun.star.document.ExportFilter"); return aServices; } @@ -1440,12 +1440,12 @@ void ORptExport::exportParagraph(const Reference< XReportControlModel >& _xRepor static const ::rtl::OUString s_sCurrent(RTL_CONSTASCII_USTRINGPARAM("current")); AddAttribute(XML_NAMESPACE_TEXT, XML_SELECT_PAGE, s_sCurrent ); SvXMLElementExport aPageNumber(*this,XML_NAMESPACE_TEXT, XML_PAGE_NUMBER, sal_False, sal_False); - Characters(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("1"))); + Characters(::rtl::OUString("1")); } else if ( sToken == s_sPageCount ) { SvXMLElementExport aPageNumber(*this,XML_NAMESPACE_TEXT, XML_PAGE_COUNT, sal_False, sal_False); - Characters(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("1"))); + Characters(::rtl::OUString("1")); } else { @@ -1497,7 +1497,7 @@ void ORptExport::exportShapes(const Reference< XSection>& _xSection,bool _bAddPa SAL_WNODEPRECATED_DECLARATIONS_PUSH ::std::auto_ptr<SvXMLElementExport> pSubDocument; SAL_WNODEPRECATED_DECLARATIONS_POP - uno::Reference< frame::XModel> xModel(xShape->getPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Model"))),uno::UNO_QUERY); + uno::Reference< frame::XModel> xModel(xShape->getPropertyValue(::rtl::OUString("Model")),uno::UNO_QUERY); if ( xModel.is() ) // special handling for chart object { pSubDocument.reset(new SvXMLElementExport(*this,XML_NAMESPACE_REPORT, XML_SUB_DOCUMENT, sal_False, sal_False)); @@ -1531,55 +1531,55 @@ void ORptExport::exportGroupsExpressionAsFunction(const Reference< XGroups>& _xG switch(nGroupOn) { case report::GroupOn::PREFIX_CHARACTERS: - sFunction = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LEFT")); - sPrefix = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(";")) + ::rtl::OUString::valueOf(xGroup->getGroupInterval()); + sFunction = ::rtl::OUString("LEFT"); + sPrefix = ::rtl::OUString(";") + ::rtl::OUString::valueOf(xGroup->getGroupInterval()); break; case report::GroupOn::YEAR: - sFunction = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("YEAR")); + sFunction = ::rtl::OUString("YEAR"); break; case report::GroupOn::QUARTAL: - sFunction = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("INT((MONTH")); + sFunction = ::rtl::OUString("INT((MONTH"); sPostfix = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-1)/3)+1")); - sFunctionName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("QUARTAL_")) + sExpression; + sFunctionName = ::rtl::OUString("QUARTAL_") + sExpression; break; case report::GroupOn::MONTH: - sFunction = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MONTH")); + sFunction = ::rtl::OUString("MONTH"); break; case report::GroupOn::WEEK: - sFunction = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("WEEK")); + sFunction = ::rtl::OUString("WEEK"); break; case report::GroupOn::DAY: - sFunction = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DAY")); + sFunction = ::rtl::OUString("DAY"); break; case report::GroupOn::HOUR: - sFunction = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HOUR")); + sFunction = ::rtl::OUString("HOUR"); break; case report::GroupOn::MINUTE: - sFunction = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MINUTE")); + sFunction = ::rtl::OUString("MINUTE"); break; case report::GroupOn::INTERVAL: { - sFunction = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("INT")); + sFunction = ::rtl::OUString("INT"); uno::Reference< XFunction> xCountFunction = xFunctions->createFunction(); - xCountFunction->setInitialFormula(beans::Optional< ::rtl::OUString>(sal_True,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("rpt:0")))); - ::rtl::OUString sCountName = sFunction + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_count_")) + sExpression; + xCountFunction->setInitialFormula(beans::Optional< ::rtl::OUString>(sal_True,::rtl::OUString("rpt:0"))); + ::rtl::OUString sCountName = sFunction + ::rtl::OUString("_count_") + sExpression; xCountFunction->setName(sCountName); - xCountFunction->setFormula(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("rpt:[")) + sCountName + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("] + 1"))); + xCountFunction->setFormula(::rtl::OUString("rpt:[") + sCountName + ::rtl::OUString("] + 1")); exportFunction(xCountFunction); sExpression = sCountName; // The reference to sCountName in the formula of sFunctionName refers to the *old* value // so we need to expand the the formula of sCountName sPrefix = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" + 1) / ")) + ::rtl::OUString::valueOf(xGroup->getGroupInterval()); - sFunctionName = sFunction + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_")) + sExpression; - sFunction = sFunction + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("(")); - sInitialFormula = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("rpt:0")); + sFunctionName = sFunction + ::rtl::OUString("_") + sExpression; + sFunction = sFunction + ::rtl::OUString("("); + sInitialFormula = ::rtl::OUString("rpt:0"); } break; default: ; } if ( sFunctionName.isEmpty() ) - sFunctionName = sFunction + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_")) + sExpression; + sFunctionName = sFunction + ::rtl::OUString("_") + sExpression; if ( !sFunction.isEmpty() ) { sal_Unicode pReplaceChars[] = { '(',')',';',',','+','-','[',']','/','*'}; @@ -1589,10 +1589,10 @@ void ORptExport::exportGroupsExpressionAsFunction(const Reference< XGroups>& _xG xFunction->setName(sFunctionName); if ( !sInitialFormula.isEmpty() ) xFunction->setInitialFormula(beans::Optional< ::rtl::OUString>(sal_True, sInitialFormula)); - sFunction = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("rpt:")) + sFunction; - sFunction += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("([")); + sFunction = ::rtl::OUString("rpt:") + sFunction; + sFunction += ::rtl::OUString("(["); sFunction += sExpression; - sFunction += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("]")); + sFunction += ::rtl::OUString("]"); if ( !sPrefix.isEmpty() ) sFunction += sPrefix; diff --git a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx index 94b44f9288ee..5762acc5d6e6 100644 --- a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx +++ b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx @@ -66,7 +66,7 @@ void lcl_correctCellAddress(const ::rtl::OUString & _sName, const uno::Reference if ( nPos != -1 ) { sCellAddress = sCellAddress.copy(0,nPos); - sCellAddress += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("$65535")); + sCellAddress += ::rtl::OUString("$65535"); pList->RemoveAttribute(_sName); pList->AddAttribute(_sName,sCellAddress); } @@ -117,14 +117,14 @@ uno::Sequence< ::rtl::OUString > SAL_CALL ExportDocumentHandler::getSupportedSer //------------------------------------------------------------------------ ::rtl::OUString ExportDocumentHandler::getImplementationName_Static( ) throw(uno::RuntimeException) { - return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.report.ExportDocumentHandler")); + return ::rtl::OUString("com.sun.star.comp.report.ExportDocumentHandler"); } //------------------------------------------------------------------------ uno::Sequence< ::rtl::OUString > ExportDocumentHandler::getSupportedServiceNames_static( ) throw(uno::RuntimeException) { uno::Sequence< ::rtl::OUString > aSupported(1); - aSupported[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.report.ExportDocumentHandler")); + aSupported[0] = ::rtl::OUString("com.sun.star.report.ExportDocumentHandler"); return aSupported; } @@ -182,7 +182,7 @@ void SAL_CALL ExportDocumentHandler::startElement(const ::rtl::OUString & _sName m_xDelegatee->startElement(sTableCalc,NULL); pList = new SvXMLAttributeList(); uno::Reference< xml::sax::XAttributeList > xNullAttr = pList; - pList->AddAttribute(lcl_createAttribute(XML_NP_TABLE,XML_DATE_VALUE),::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("1900-01-01"))); + pList->AddAttribute(lcl_createAttribute(XML_NP_TABLE,XML_DATE_VALUE),::rtl::OUString("1900-01-01")); const ::rtl::OUString sNullDate = lcl_createAttribute(XML_NP_TABLE,XML_NULL_DATE); m_xDelegatee->startElement(sNullDate,xNullAttr); @@ -216,7 +216,7 @@ void SAL_CALL ExportDocumentHandler::startElement(const ::rtl::OUString & _sName else if ( _sName == "chart:plot-area" ) { SvXMLAttributeList* pList = SvXMLAttributeList::getImplementation(xAttribs); - pList->RemoveAttribute(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("table:cell-range-address"))); + pList->RemoveAttribute(::rtl::OUString("table:cell-range-address")); } else if ( _sName == "chart:categories" ) { @@ -306,8 +306,8 @@ void SAL_CALL ExportDocumentHandler::initialize( const uno::Sequence< uno::Any > { ::osl::MutexGuard aGuard(m_aMutex); comphelper::SequenceAsHashMap aArgs(_aArguments); - m_xDelegatee = aArgs.getUnpackedValueOrDefault(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DocumentHandler")),m_xDelegatee); - m_xModel = aArgs.getUnpackedValueOrDefault(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Model")),m_xModel); + m_xDelegatee = aArgs.getUnpackedValueOrDefault(::rtl::OUString("DocumentHandler"),m_xDelegatee); + m_xModel = aArgs.getUnpackedValueOrDefault(::rtl::OUString("Model"),m_xModel); OSL_ENSURE(m_xDelegatee.is(),"No document handler avialable!"); if ( !m_xDelegatee.is() || !m_xModel.is() ) diff --git a/reportdesign/source/filter/xml/xmlFixedContent.cxx b/reportdesign/source/filter/xml/xmlFixedContent.cxx index 01afab511ff3..523d4f6f4319 100644 --- a/reportdesign/source/filter/xml/xmlFixedContent.cxx +++ b/reportdesign/source/filter/xml/xmlFixedContent.cxx @@ -92,7 +92,7 @@ void OXMLCharContent::InsertControlCharacter(sal_Int16 _nControl) switch( _nControl ) { case ControlCharacter::LINE_BREAK: - m_pFixedContent->Characters(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n"))); + m_pFixedContent->Characters(::rtl::OUString("\n")); break; default: OSL_FAIL("Not supported control character"); @@ -189,7 +189,7 @@ void OXMLFixedContent::EndElement() { uno::Reference< uno::XInterface> xInt = xFactor->createInstance(SERVICE_FORMATTEDFIELD); Reference< report::XFormattedField > xControl(xInt,uno::UNO_QUERY); - xControl->setDataField(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("rpt:")) + m_sPageText); + xControl->setDataField(::rtl::OUString("rpt:") + m_sPageText); OSL_ENSURE(xControl.is(),"Could not create FormattedField!"); m_pInP->m_xComponent = xControl.get(); m_xComponent = xControl.get(); diff --git a/reportdesign/source/filter/xml/xmlGroup.cxx b/reportdesign/source/filter/xml/xmlGroup.cxx index 90bcba28d0d2..240a03830c16 100644 --- a/reportdesign/source/filter/xml/xmlGroup.cxx +++ b/reportdesign/source/filter/xml/xmlGroup.cxx @@ -125,7 +125,7 @@ OXMLGroup::OXMLGroup( ORptFilter& _rImport const ::rtl::OUString sFormula = sCompleteFormula.getToken(0,'(',nIndex); ::sal_Int16 nGroupOn = report::GroupOn::DEFAULT; - if ( sFormula ==::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("rpt:LEFT"))) + if ( sFormula ==::rtl::OUString("rpt:LEFT")) { nGroupOn = report::GroupOn::PREFIX_CHARACTERS; ::rtl::OUString sInterval = sCompleteFormula.getToken(1,';',nIndex); @@ -133,30 +133,30 @@ OXMLGroup::OXMLGroup( ORptFilter& _rImport sInterval = sInterval.getToken(0,')',nIndex); m_xGroup->setGroupInterval(sInterval.toInt32()); } - else if ( sFormula == ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("rpt:YEAR"))) + else if ( sFormula == ::rtl::OUString("rpt:YEAR")) nGroupOn = report::GroupOn::YEAR; - else if ( sFormula == ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("rpt:MONTH"))) + else if ( sFormula == ::rtl::OUString("rpt:MONTH")) { nGroupOn = report::GroupOn::MONTH; } - else if ( sCompleteFormula.matchIgnoreAsciiCase(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("rpt:INT((MONTH")),0) + else if ( sCompleteFormula.matchIgnoreAsciiCase(::rtl::OUString("rpt:INT((MONTH"),0) && sCompleteFormula.endsWithIgnoreAsciiCaseAsciiL("-1)/3)+1",8) ) { nGroupOn = report::GroupOn::QUARTAL; } - else if ( sFormula ==::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("rpt:WEEK"))) + else if ( sFormula ==::rtl::OUString("rpt:WEEK")) nGroupOn = report::GroupOn::WEEK; - else if ( sFormula ==::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("rpt:DAY"))) + else if ( sFormula ==::rtl::OUString("rpt:DAY")) nGroupOn = report::GroupOn::DAY; - else if ( sFormula ==::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("rpt:HOUR"))) + else if ( sFormula ==::rtl::OUString("rpt:HOUR")) nGroupOn = report::GroupOn::HOUR; - else if ( sFormula ==::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("rpt:MINUTE"))) + else if ( sFormula ==::rtl::OUString("rpt:MINUTE")) nGroupOn = report::GroupOn::MINUTE; - else if ( sFormula ==::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("rpt:INT"))) + else if ( sFormula ==::rtl::OUString("rpt:INT")) { nGroupOn = report::GroupOn::INTERVAL; _rImport.removeFunction(sExpression); - sExpression = sExpression.copy(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("INT_count_")).getLength()); + sExpression = sExpression.copy(::rtl::OUString("INT_count_").getLength()); nIndex = 0; ::rtl::OUString sInterval = sCompleteFormula.getToken(1,'/',nIndex); diff --git a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx index 3892346c5997..51ea7ebb5303 100644 --- a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx +++ b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx @@ -87,14 +87,14 @@ uno::Sequence< ::rtl::OUString > SAL_CALL ImportDocumentHandler::getSupportedSer //------------------------------------------------------------------------ ::rtl::OUString ImportDocumentHandler::getImplementationName_Static( ) throw(uno::RuntimeException) { - return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.report.ImportDocumentHandler")); + return ::rtl::OUString("com.sun.star.comp.report.ImportDocumentHandler"); } //------------------------------------------------------------------------ uno::Sequence< ::rtl::OUString > ImportDocumentHandler::getSupportedServiceNames_static( ) throw(uno::RuntimeException) { uno::Sequence< ::rtl::OUString > aSupported(1); - aSupported[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.report.ImportDocumentHandler")); + aSupported[0] = ::rtl::OUString("com.sun.star.report.ImportDocumentHandler"); return aSupported; } @@ -117,7 +117,7 @@ void SAL_CALL ImportDocumentHandler::endDocument() throw (uno::RuntimeException, { // this fills the chart again ::comphelper::NamedValueCollection aArgs; - aArgs.put( "CellRangeRepresentation", ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("all")) ); + aArgs.put( "CellRangeRepresentation", ::rtl::OUString("all") ); aArgs.put( "HasCategories", uno::makeAny( sal_True ) ); aArgs.put( "FirstCellAsLabel", uno::makeAny( sal_True ) ); aArgs.put( "DataRowSource", uno::makeAny( chart::ChartDataRowSource_COLUMNS ) ); @@ -270,7 +270,7 @@ void SAL_CALL ImportDocumentHandler::startElement(const ::rtl::OUString & _sName SvXMLAttributeList* pList = new SvXMLAttributeList(); xNewAttribs = pList; pList->AppendAttributeList(_xAttrList); - pList->AddAttribute(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("table:cell-range-address")),::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("local-table.$A$1:.$Z$65536"))); + pList->AddAttribute(::rtl::OUString("table:cell-range-address"),::rtl::OUString("local-table.$A$1:.$Z$65536")); } @@ -328,8 +328,8 @@ void SAL_CALL ImportDocumentHandler::initialize( const uno::Sequence< uno::Any > { ::osl::MutexGuard aGuard(m_aMutex); comphelper::SequenceAsHashMap aArgs(_aArguments); - m_xDelegatee = aArgs.getUnpackedValueOrDefault(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DocumentHandler")),m_xDelegatee); - m_xModel = aArgs.getUnpackedValueOrDefault(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Model")),m_xModel); + m_xDelegatee = aArgs.getUnpackedValueOrDefault(::rtl::OUString("DocumentHandler"),m_xDelegatee); + m_xModel = aArgs.getUnpackedValueOrDefault(::rtl::OUString("Model"),m_xModel); OSL_ENSURE(m_xDelegatee.is(),"No document handler avialable!"); if ( !m_xDelegatee.is() || !m_xModel.is() ) diff --git a/reportdesign/source/filter/xml/xmlStyleImport.cxx b/reportdesign/source/filter/xml/xmlStyleImport.cxx index c6da98c813c1..14d8a4ee9f56 100644 --- a/reportdesign/source/filter/xml/xmlStyleImport.cxx +++ b/reportdesign/source/filter/xml/xmlStyleImport.cxx @@ -78,7 +78,7 @@ OControlStyleContext::OControlStyleContext( ORptFilter& rImport, const Reference< XAttributeList > & xAttrList, SvXMLStylesContext& rStyles, sal_uInt16 nFamily, sal_Bool bDefaultStyle ) : XMLPropStyleContext( rImport, nPrfx, rLName, xAttrList, rStyles, nFamily, bDefaultStyle ), - sNumberFormat(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NumberFormat"))), + sNumberFormat(rtl::OUString("NumberFormat")), pStyles(&rStyles), m_nNumberFormat(-1), m_rImport(rImport), @@ -319,7 +319,7 @@ Reference < XNameContainer > xStyles.set(m_xTableStyles); else sName = - ::rtl::OUString( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "TableStyles" ) )); + ::rtl::OUString( rtl::OUString( "TableStyles" )); } break; case XML_STYLE_FAMILY_TABLE_CELL: @@ -328,7 +328,7 @@ Reference < XNameContainer > xStyles.set(m_xCellStyles); else sName = - ::rtl::OUString( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "CellStyles" ) )); + ::rtl::OUString( rtl::OUString( "CellStyles" )); } break; case XML_STYLE_FAMILY_TABLE_COLUMN: @@ -337,7 +337,7 @@ Reference < XNameContainer > xStyles.set(m_xColumnStyles); else sName = - ::rtl::OUString( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ColumnStyles" ) )); + ::rtl::OUString( rtl::OUString( "ColumnStyles" )); } break; case XML_STYLE_FAMILY_TABLE_ROW: @@ -346,7 +346,7 @@ Reference < XNameContainer > xStyles.set(m_xRowStyles); else sName = - ::rtl::OUString( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "RowStyles" ) )); + ::rtl::OUString( rtl::OUString( "RowStyles" )); } break; case XML_STYLE_FAMILY_SD_GRAPHICS_ID: diff --git a/reportdesign/source/filter/xml/xmlfilter.cxx b/reportdesign/source/filter/xml/xmlfilter.cxx index 71c8e679c577..b557e839af7f 100644 --- a/reportdesign/source/filter/xml/xmlfilter.cxx +++ b/reportdesign/source/filter/xml/xmlfilter.cxx @@ -247,7 +247,7 @@ sal_Int32 ReadThroughComponent( xDocStream = xStorage->openStreamElement( sStreamName, embed::ElementModes::READ ); uno::Reference< beans::XPropertySet > xProps( xDocStream, uno::UNO_QUERY_THROW ); - xProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Encrypted") ) ) >>= bEncrypted; + xProps->getPropertyValue( ::rtl::OUString("Encrypted") ) >>= bEncrypted; } catch (const packages::WrongPasswordException&) { @@ -408,7 +408,7 @@ uno::Reference< XInterface > ORptFilter::create(uno::Reference< XComponentContex // ----------------------------------------------------------------------------- ::rtl::OUString ORptFilter::getImplementationName_Static( ) throw(uno::RuntimeException) { - return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.report.OReportFilter")); + return ::rtl::OUString("com.sun.star.comp.report.OReportFilter"); } //-------------------------------------------------------------------------- @@ -535,8 +535,8 @@ sal_Bool ORptFilter::implImport( const Sequence< PropertyValue >& rDescriptor ) uno::UNO_QUERY ); uno::Reference< lang::XMultiServiceFactory > xReportServiceFactory( m_xReportDefinition, uno::UNO_QUERY); - aArgs[0] <<= beans::NamedValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Storage")),uno::makeAny(xStorage)); - xEmbeddedObjectResolver.set( xReportServiceFactory->createInstanceWithArguments(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.ImportEmbeddedObjectResolver")),aArgs) , uno::UNO_QUERY); + aArgs[0] <<= beans::NamedValue(::rtl::OUString("Storage"),uno::makeAny(xStorage)); + xEmbeddedObjectResolver.set( xReportServiceFactory->createInstanceWithArguments(::rtl::OUString("com.sun.star.document.ImportEmbeddedObjectResolver"),aArgs) , uno::UNO_QUERY); static const ::rtl::OUString s_sOld(RTL_CONSTASCII_USTRINGPARAM("OldFormat")); static comphelper::PropertyMapEntry pMap[] = @@ -551,9 +551,9 @@ sal_Bool ORptFilter::implImport( const Sequence< PropertyValue >& rDescriptor ) ::comphelper::MediaDescriptor aDescriptor(rDescriptor); uno::Reference<beans::XPropertySet> xProp = comphelper::GenericPropertySet_CreateInstance(new comphelper::PropertySetInfo(pMap)); const ::rtl::OUString sVal( aDescriptor.getUnpackedValueOrDefault(aDescriptor.PROP_DOCUMENTBASEURL(),::rtl::OUString()) ); - xProp->setPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BaseURI")), uno::makeAny(sVal)); - const ::rtl::OUString sHierarchicalDocumentName( aDescriptor.getUnpackedValueOrDefault(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HierarchicalDocumentName")),::rtl::OUString()) ); - xProp->setPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("StreamRelPath")), uno::makeAny(sHierarchicalDocumentName)); + xProp->setPropertyValue(rtl::OUString("BaseURI"), uno::makeAny(sVal)); + const ::rtl::OUString sHierarchicalDocumentName( aDescriptor.getUnpackedValueOrDefault(rtl::OUString("HierarchicalDocumentName"),::rtl::OUString()) ); + xProp->setPropertyValue(rtl::OUString("StreamRelPath"), uno::makeAny(sHierarchicalDocumentName)); uno::Reference<XComponent> xModel(GetModel(),UNO_QUERY); static const ::rtl::OUString s_sMeta(RTL_CONSTASCII_USTRINGPARAM("meta.xml")); @@ -582,7 +582,7 @@ sal_Bool ORptFilter::implImport( const Sequence< PropertyValue >& rDescriptor ) if ( nRet == 0 ) { - xProp->setPropertyValue(s_sStreamName, uno::makeAny(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("settings.xml")))); + xProp->setPropertyValue(s_sStreamName, uno::makeAny(::rtl::OUString("settings.xml"))); nRet = ReadThroughComponent( xStorage ,xModel ,"settings.xml" @@ -596,7 +596,7 @@ sal_Bool ORptFilter::implImport( const Sequence< PropertyValue >& rDescriptor ) } if ( nRet == 0 ) { - xProp->setPropertyValue(s_sStreamName, uno::makeAny(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("styles.xml")))); + xProp->setPropertyValue(s_sStreamName, uno::makeAny(::rtl::OUString("styles.xml"))); nRet = ReadThroughComponent(xStorage ,xModel ,"styles.xml" @@ -610,7 +610,7 @@ sal_Bool ORptFilter::implImport( const Sequence< PropertyValue >& rDescriptor ) if ( nRet == 0 ) { - xProp->setPropertyValue(s_sStreamName, uno::makeAny(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("content.xml")))); + xProp->setPropertyValue(s_sStreamName, uno::makeAny(::rtl::OUString("content.xml"))); nRet = ReadThroughComponent( xStorage ,xModel ,"content.xml" @@ -674,7 +674,7 @@ SvXMLImportContext* ORptFilter::CreateContext( sal_uInt16 nPrefix, const SvXMLStylesContext* pAutoStyles = GetAutoStyles(); if ( pAutoStyles ) { - XMLPropStyleContext* pAutoStyle = PTR_CAST(XMLPropStyleContext,pAutoStyles->FindStyleChildContext(XML_STYLE_FAMILY_PAGE_MASTER,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("pm1")))); + XMLPropStyleContext* pAutoStyle = PTR_CAST(XMLPropStyleContext,pAutoStyles->FindStyleChildContext(XML_STYLE_FAMILY_PAGE_MASTER,::rtl::OUString("pm1"))); if ( pAutoStyle ) { pAutoStyle->FillPropertySet(getReportDefinition().get()); |