diff options
author | Noel Grandin <noel@peralex.com> | 2013-11-15 11:05:19 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-11-19 10:29:31 +0200 |
commit | 610b2b94b33b0fc2d79cd515f9e293ca1c2610e8 (patch) | |
tree | 6eab2639cb8104ca54daa3f7a2ebd83ef1566cf0 /filter | |
parent | 2c35fff7eca3a143d28dc75e6a73fe1101d2af77 (diff) |
remove unnecessary use of OUString constructor when assigning
change code like
aStr = OUString("xxxx");
to
aStr = "xxxx";
Change-Id: Ib981a5cc735677ec5dba76ef9279a107d22e99d4
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/config/cache/filterfactory.cxx | 16 | ||||
-rw-r--r-- | filter/source/config/cache/typedetection.cxx | 2 | ||||
-rw-r--r-- | filter/source/graphic/GraphicExportDialog.cxx | 12 | ||||
-rw-r--r-- | filter/source/msfilter/escherex.cxx | 4 | ||||
-rw-r--r-- | filter/source/msfilter/msdffimp.cxx | 6 | ||||
-rw-r--r-- | filter/source/msfilter/msoleexp.cxx | 6 | ||||
-rw-r--r-- | filter/source/odfflatxml/OdfFlatXml.cxx | 4 | ||||
-rw-r--r-- | filter/source/xmlfilterdetect/filterdetect.cxx | 4 | ||||
-rw-r--r-- | filter/source/xsltdialog/xmlfilterdialogcomponent.cxx | 2 | ||||
-rw-r--r-- | filter/source/xsltdialog/xmlfilterjar.cxx | 4 | ||||
-rw-r--r-- | filter/source/xsltdialog/xmlfiltersettingsdialog.cxx | 6 | ||||
-rw-r--r-- | filter/source/xsltfilter/XSLTFilter.cxx | 22 |
12 files changed, 42 insertions, 46 deletions
diff --git a/filter/source/config/cache/filterfactory.cxx b/filter/source/config/cache/filterfactory.cxx index 07559b1cbad0..de9872b74402 100644 --- a/filter/source/config/cache/filterfactory.cxx +++ b/filter/source/config/cache/filterfactory.cxx @@ -259,37 +259,37 @@ OUStringList FilterFactory::impl_queryMatchByDocumentService(const QueryTokenize if ( sDocumentService == "writer" ) { OSL_FAIL("DEPRECATED!\nPlease use right document service for filter query!"); - sDocumentService = OUString( "com.sun.star.text.TextDocument" ); + sDocumentService = "com.sun.star.text.TextDocument"; } else if ( sDocumentService == "web" ) { OSL_FAIL("DEPRECATED!\nPlease use right document service for filter query!"); - sDocumentService = OUString( "com.sun.star.text.WebDocument" ); + sDocumentService = "com.sun.star.text.WebDocument"; } else if ( sDocumentService == "global" ) { OSL_FAIL("DEPRECATED!\nPlease use right document service for filter query!"); - sDocumentService = OUString( "com.sun.star.text.GlobalDocument" ); + sDocumentService = "com.sun.star.text.GlobalDocument"; } else if ( sDocumentService == "calc" ) { OSL_FAIL("DEPRECATED!\nPlease use right document service for filter query!"); - sDocumentService = OUString( "com.sun.star.sheet.SpreadsheetDocument" ); + sDocumentService = "com.sun.star.sheet.SpreadsheetDocument"; } else if ( sDocumentService == "draw" ) { OSL_FAIL("DEPRECATED!\nPlease use right document service for filter query!"); - sDocumentService = OUString( "com.sun.star.drawing.DrawingDocument" ); + sDocumentService = "com.sun.star.drawing.DrawingDocument"; } else if ( sDocumentService == "impress" ) { OSL_FAIL("DEPRECATED!\nPlease use right document service for filter query!"); - sDocumentService = OUString( "com.sun.star.presentation.PresentationDocument" ); + sDocumentService = "com.sun.star.presentation.PresentationDocument"; } else if ( sDocumentService == "math" ) { OSL_FAIL("DEPRECATED!\nPlease use right document service for filter query!"); - sDocumentService = OUString( "com.sun.star.formula.FormulaProperties" ); + sDocumentService = "com.sun.star.formula.FormulaProperties"; } #endif @@ -582,7 +582,7 @@ OUString FilterFactory::impl_getImplementationName() css::uno::Sequence< OUString > FilterFactory::impl_getSupportedServiceNames() { css::uno::Sequence< OUString > lServiceNames(1); - lServiceNames[0] = OUString( "com.sun.star.document.FilterFactory" ); + lServiceNames[0] = "com.sun.star.document.FilterFactory"; return lServiceNames; } diff --git a/filter/source/config/cache/typedetection.cxx b/filter/source/config/cache/typedetection.cxx index c6258e6cb227..d0bd8cf50c19 100644 --- a/filter/source/config/cache/typedetection.cxx +++ b/filter/source/config/cache/typedetection.cxx @@ -1232,7 +1232,7 @@ OUString TypeDetection::impl_getImplementationName() css::uno::Sequence< OUString > TypeDetection::impl_getSupportedServiceNames() { css::uno::Sequence< OUString > lServiceNames(1); - lServiceNames[0] = OUString( "com.sun.star.document.TypeDetection" ); + lServiceNames[0] = "com.sun.star.document.TypeDetection"; return lServiceNames; } diff --git a/filter/source/graphic/GraphicExportDialog.cxx b/filter/source/graphic/GraphicExportDialog.cxx index d26339420811..7ad8f339878d 100644 --- a/filter/source/graphic/GraphicExportDialog.cxx +++ b/filter/source/graphic/GraphicExportDialog.cxx @@ -70,7 +70,7 @@ Sequence<PropertyValue> GraphicExportDialog::getPropertyValues() throw ( Runtime maMediaDescriptor.realloc( nCount ); } - maMediaDescriptor[ i ].Name = OUString( "FilterData" ); + maMediaDescriptor[ i ].Name = "FilterData"; maMediaDescriptor[ i ].Value <<= maFilterDataSequence; return maMediaDescriptor; } @@ -128,15 +128,15 @@ void GraphicExportDialog::setSourceDocument( const Reference<XComponent>& xDocum { if ( xServiceInfo->supportsService("com.sun.star.presentation.PresentationDocument") ) { - aConfigPath = OUString( "Office.Impress/Layout/Other/MeasureUnit" ); + aConfigPath = "Office.Impress/Layout/Other/MeasureUnit"; } else if ( xServiceInfo->supportsService("com.sun.star.drawing.DrawingDocument") ) { - aConfigPath = OUString( "Office.Draw/Layout/Other/MeasureUnit" ); + aConfigPath = "Office.Draw/Layout/Other/MeasureUnit"; } else if ( xServiceInfo->supportsService("com.sun.star.text.TextDocument") ) { - aConfigPath = OUString( "Office.Writer/Layout/Other/MeasureUnit" ); + aConfigPath = "Office.Writer/Layout/Other/MeasureUnit"; } if ( !aConfigPath.isEmpty() ) { @@ -146,11 +146,11 @@ void GraphicExportDialog::setSourceDocument( const Reference<XComponent>& xDocum if ( aSysLocale.GetLocaleDataPtr()->getMeasurementSystemEnum() == MEASURE_METRIC ) { - aPropertyName = OUString( "Metric" ); + aPropertyName = "Metric"; } else { - aPropertyName = OUString( "NonMetric" ); + aPropertyName = "NonMetric"; } meFieldUnit = (FieldUnit) aConfigItem.ReadInt32( aPropertyName, FUNIT_CM ); } diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index 06575d09b1d7..7318de19195d 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -4308,10 +4308,10 @@ sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream& rPicOutStrm, const OStrin aGIFStream.Seek( STREAM_SEEK_TO_BEGIN ); aGIFStream.Read( pSeq, nGIFSreamLen ); com::sun::star::beans::PropertyValue aChunkProp, aFilterProp; - aChunkProp.Name = OUString( "msOG" ); + aChunkProp.Name = "msOG"; aChunkProp.Value <<= aGIFSeq; aAdditionalChunkSequence[ 0 ] = aChunkProp; - aFilterProp.Name = OUString( "AdditionalChunks" ); + aFilterProp.Name = "AdditionalChunks"; aFilterProp.Value <<= aAdditionalChunkSequence; aFilterData[ 0 ] = aFilterProp; nErrCode = rFilter.ExportGraphic( aGraphic, OUString(), aStream, diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index 71b0456a754c..27ca4a9813b8 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -6881,15 +6881,15 @@ com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > SvxMS aFilterName = GetFilterNameFromClassID_Impl( aStgNm ); uno::Sequence < beans::PropertyValue > aMedium( aFilterName.isEmpty() ? 2 : 3); - aMedium[0].Name = OUString( "InputStream" ); + aMedium[0].Name = "InputStream"; uno::Reference < io::XInputStream > xStream = new ::utl::OSeekableInputStreamWrapper( *xMemStream ); aMedium[0].Value <<= xStream; - aMedium[1].Name = OUString( "URL" ); + aMedium[1].Name = "URL"; aMedium[1].Value <<= OUString( "private:stream" ); if ( !aFilterName.isEmpty() ) { - aMedium[2].Name = OUString( "FilterName" ); + aMedium[2].Name = "FilterName"; aMedium[2].Value <<= aFilterName; } diff --git a/filter/source/msfilter/msoleexp.cxx b/filter/source/msfilter/msoleexp.cxx index 82cb589e719f..541c0097bce3 100644 --- a/filter/source/msfilter/msoleexp.cxx +++ b/filter/source/msfilter/msoleexp.cxx @@ -191,10 +191,10 @@ void SvxMSExportOLEObjects::ExportOLEObject( svt::EmbeddedObjectRef& rObj, SvSto //TODO/LATER: a "StoreTo" method at embedded object would be nice uno::Sequence < beans::PropertyValue > aSeq(2); SvStream* pStream = new SvMemoryStream; - aSeq[0].Name = OUString( "OutputStream" ); + aSeq[0].Name = "OutputStream"; ::uno::Reference < io::XOutputStream > xOut = new ::utl::OOutputStreamWrapper( *pStream ); aSeq[0].Value <<= xOut; - aSeq[1].Name = OUString( "FilterName" ); + aSeq[1].Name = "FilterName"; aSeq[1].Value <<= OUString( pExpFilter->GetName() ); uno::Reference < frame::XStorable > xStor( rObj->getComponent(), uno::UNO_QUERY ); try @@ -291,7 +291,7 @@ void SvxMSExportOLEObjects::ExportOLEObject( svt::EmbeddedObjectRef& rObj, SvSto //TODO/LATER: is stream instead of outputstream a better choice?! //TODO/LATER: a "StoreTo" method at embedded object would be nice uno::Sequence < beans::PropertyValue > aSeq(1); - aSeq[0].Name = OUString( "OutputStream" ); + aSeq[0].Name = "OutputStream"; ::uno::Reference < io::XOutputStream > xOut = new ::utl::OOutputStreamWrapper( *xEmbStm ); aSeq[0].Value <<= xOut; uno::Reference < frame::XStorable > xStor( rObj->getComponent(), uno::UNO_QUERY ); diff --git a/filter/source/odfflatxml/OdfFlatXml.cxx b/filter/source/odfflatxml/OdfFlatXml.cxx index 13de4875affb..a45aaade3b0f 100644 --- a/filter/source/odfflatxml/OdfFlatXml.cxx +++ b/filter/source/odfflatxml/OdfFlatXml.cxx @@ -190,8 +190,8 @@ OUString OdfFlatXml::impl_getImplementationName() Sequence< OUString > OdfFlatXml::impl_getSupportedServiceNames() { Sequence< OUString > lServiceNames(2); - lServiceNames[0] = OUString( "com.sun.star.document.ImportFilter" ); - lServiceNames[1] = OUString( "com.sun.star.document.ExportFilter" ); + lServiceNames[0] = "com.sun.star.document.ImportFilter"; + lServiceNames[1] = "com.sun.star.document.ExportFilter"; return lServiceNames; } diff --git a/filter/source/xmlfilterdetect/filterdetect.cxx b/filter/source/xmlfilterdetect/filterdetect.cxx index e665f9d738b9..60681d2d4343 100644 --- a/filter/source/xmlfilterdetect/filterdetect.cxx +++ b/filter/source/xmlfilterdetect/filterdetect.cxx @@ -106,7 +106,7 @@ bool isXMLStream(const OString& aHeaderStrm) OUString supportedByType( const OUString clipBoardFormat , const OString resultString, const OUString checkType) { OUString sTypeName; - if ( clipBoardFormat.match(OUString("doctype:")) ) + if ( clipBoardFormat.match("doctype:") ) { OString tryStr = OUStringToOString(clipBoardFormat.copy(8),RTL_TEXTENCODING_ASCII_US).getStr(); if (resultString.indexOf(tryStr) >= 0) @@ -207,7 +207,7 @@ OUString SAL_CALL FilterDetect::detect( com::sun::star::uno::Sequence< com::sun: if (location == aArguments.getLength()) { aArguments.realloc(nLength+1); - aArguments[location].Name = OUString( "TypeName" ); + aArguments[location].Name = "TypeName"; } aArguments[location].Value <<=sTypeName; } diff --git a/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx b/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx index 6aa7ace9f884..4fe62c9339a5 100644 --- a/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx +++ b/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx @@ -198,7 +198,7 @@ OUString XMLFilterDialogComponent_getImplementationName() throw ( RuntimeExcepti Sequence< OUString > SAL_CALL XMLFilterDialogComponent_getSupportedServiceNames() throw ( RuntimeException ) { Sequence< OUString > aSupported(1); - aSupported[0] = OUString( "com.sun.star.ui.dialogs.XSLTFilterDialog" ); + aSupported[0] = "com.sun.star.ui.dialogs.XSLTFilterDialog"; return aSupported; } diff --git a/filter/source/xsltdialog/xmlfilterjar.cxx b/filter/source/xsltdialog/xmlfilterjar.cxx index edb18f7d4047..fb916b035a31 100644 --- a/filter/source/xsltdialog/xmlfilterjar.cxx +++ b/filter/source/xsltdialog/xmlfilterjar.cxx @@ -152,7 +152,7 @@ bool XMLFilterJarHelper::savePackage( const OUString& rPackageURL, const XMLFilt // let ZipPackage be used ( no manifest.xml is required ) beans::NamedValue aArg; - aArg.Name = OUString( "StorageFormat" ); + aArg.Name = "StorageFormat"; aArg.Value <<= ZIP_STORAGE_FORMAT_STRING; aArguments[ 1 ] <<= aArg; @@ -251,7 +251,7 @@ void XMLFilterJarHelper::openPackage( const OUString& rPackageURL, XMLFilterVect // let ZipPackage be used ( no manifest.xml is required ) beans::NamedValue aArg; - aArg.Name = OUString( "StorageFormat" ); + aArg.Name = "StorageFormat"; aArg.Value <<= ZIP_STORAGE_FORMAT_STRING; aArguments[ 1 ] <<= aArg; diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx index dca58231f665..bfd172dd7906 100644 --- a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx +++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx @@ -1507,9 +1507,9 @@ OUString XMLFilterListBox::getEntryString( const filter_info_impl* pInfo ) const { OUString aEntryStr( pInfo->maFilterName + "\t"); if ( !pInfo->maExportService.isEmpty() ) - aEntryStr += OUString( getApplicationUIName( pInfo->maExportService ) ); + aEntryStr += getApplicationUIName( pInfo->maExportService ); else - aEntryStr += OUString( getApplicationUIName( pInfo->maImportService ) ); + aEntryStr += getApplicationUIName( pInfo->maImportService ); aEntryStr += " - "; if( pInfo->maFlags & 1 ) @@ -1604,7 +1604,7 @@ Sequence< OUString > filter_info_impl::getFilterUserData() const { Sequence< OUString > aUserData(8); - aUserData[0] = OUString( "com.sun.star.documentconversion.XSLTFilter" ); + aUserData[0] = "com.sun.star.documentconversion.XSLTFilter"; aUserData[1] = OUString::boolean( mbNeedsXSLT2 ); aUserData[2] = maImportService; aUserData[3] = maExportService; diff --git a/filter/source/xsltfilter/XSLTFilter.cxx b/filter/source/xsltfilter/XSLTFilter.cxx index 140713fa0635..ff9aca316e62 100644 --- a/filter/source/xsltfilter/XSLTFilter.cxx +++ b/filter/source/xsltfilter/XSLTFilter.cxx @@ -319,13 +319,13 @@ namespace XSLT Sequence<Any> args(3); NamedValue nv; - nv.Name = OUString( "StylesheetURL" ); + nv.Name = "StylesheetURL"; nv.Value <<= expandUrl(udStyleSheet); args[0] <<= nv; - nv.Name = OUString( "SourceURL" ); + nv.Name = "SourceURL"; nv.Value <<= aURL; args[1] <<= nv; - nv.Name = OUString( "SourceBaseURL" ); + nv.Name = "SourceBaseURL"; nv.Value <<= OUString(INetURLObject(aURL).getBase()); args[2] <<= nv; @@ -461,16 +461,16 @@ namespace XSLT // create transformer Sequence<Any> args(4); NamedValue nv; - nv.Name = OUString( "StylesheetURL" ); + nv.Name = "StylesheetURL"; nv.Value <<= expandUrl(udStyleSheet); args[0] <<= nv; - nv.Name = OUString( "TargetURL" ); + nv.Name = "TargetURL"; nv.Value <<= sURL; args[1] <<= nv; - nv.Name = OUString( "DoctypePublic" ); + nv.Name = "DoctypePublic"; nv.Value <<= aDoctypePublic; args[2] <<= nv; - nv.Name = OUString( "TargetBaseURL" ); + nv.Name = "TargetBaseURL"; INetURLObject ineturl(sURL); ineturl.removeSegment(); m_aExportBaseUrl = ineturl.GetMainURL(INetURLObject::NO_DECODE); @@ -581,9 +581,7 @@ extern "C" if (rtl_str_compare(pImplName, FILTER_IMPL_NAME) == 0) { Sequence<OUString> serviceNames(1); - serviceNames.getArray()[0] - = OUString( - FILTER_SERVICE_NAME ); + serviceNames.getArray()[0] = FILTER_SERVICE_NAME; css::uno::Reference<XSingleServiceFactory> xFactory( @@ -603,9 +601,7 @@ extern "C" else if (rtl_str_compare(pImplName, TRANSFORMER_IMPL_NAME) == 0) { Sequence<OUString> serviceNames(1); - serviceNames.getArray()[0] - = OUString( - TRANSFORMER_SERVICE_NAME ); + serviceNames.getArray()[0] = TRANSFORMER_SERVICE_NAME; css::uno::Reference<XSingleServiceFactory> xFactory( createSingleFactory( |