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 /filter/source/xmlfilteradaptor | |
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 'filter/source/xmlfilteradaptor')
-rw-r--r-- | filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx b/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx index ed2901bfbbed..f32c3dd85922 100644 --- a/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx +++ b/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx @@ -82,7 +82,7 @@ sal_Bool SAL_CALL XmlFilterAdaptor::importImpl( const Sequence< ::com::sun::star comphelper::MediaDescriptor::PROP_STATUSINDICATOR(), Reference< XStatusIndicator >())); if (xStatusIndicator.is()){ - xStatusIndicator->start(OUString( RTL_CONSTASCII_USTRINGPARAM( "Loading :" )),nProgressRange); + xStatusIndicator->start(OUString( "Loading :" ),nProgressRange); } OUString sXMLImportService ( udImport ); @@ -90,7 +90,7 @@ sal_Bool SAL_CALL XmlFilterAdaptor::importImpl( const Sequence< ::com::sun::star Sequence< Any > aAnys(1); OUString aBaseURI; - if (aMediaMap.find(OUString( RTL_CONSTASCII_USTRINGPARAM( "URL" )))->second >>= aBaseURI) + if (aMediaMap.find(OUString( "URL" ))->second >>= aBaseURI) { INetURLObject aURLObj(aBaseURI); // base URI in this case is the URI of the actual saving location @@ -108,7 +108,7 @@ sal_Bool SAL_CALL XmlFilterAdaptor::importImpl( const Sequence< ::com::sun::star Reference< XPropertySet > xInfoSet( GenericPropertySet_CreateInstance( new PropertySetInfo( aImportInfoMap ) ) ); xInfoSet->setPropertyValue( - OUString( RTL_CONSTASCII_USTRINGPARAM( "BaseURI" )), makeAny( aBaseURI )); + OUString( "BaseURI" ), makeAny( aBaseURI )); aAnys[0] <<= xInfoSet; @@ -159,12 +159,12 @@ sal_Bool SAL_CALL XmlFilterAdaptor::importImpl( const Sequence< ::com::sun::star Sequence<com::sun::star::beans::PropertyValue> pValue=xstyleLoader->getStyleLoaderOptions(); //Load the Styles from the Template URL Supplied in the TypeDetection file - if(msTemplateName.indexOf(OUString( RTL_CONSTASCII_USTRINGPARAM( "file:" )))==-1) + if(msTemplateName.indexOf(OUString( "file:" ))==-1) { Reference< XConfigManager >xCfgMgr ( mxMSF->createInstance( - OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.config.SpecialConfigManager" )) ), UNO_QUERY ); + OUString( "com.sun.star.config.SpecialConfigManager" ) ), UNO_QUERY ); OUString PathString(xCfgMgr->substituteVariables(OUString(RTL_CONSTASCII_USTRINGPARAM("$(progurl)")))); - PathString = PathString.concat(OUString( RTL_CONSTASCII_USTRINGPARAM( "/" ))); + PathString = PathString.concat(OUString( "/" )); msTemplateName=PathString.concat(msTemplateName); } @@ -221,7 +221,7 @@ sal_Bool SAL_CALL XmlFilterAdaptor::exportImpl( const Sequence< ::com::sun::star comphelper::MediaDescriptor::PROP_STATUSINDICATOR(), Reference< XStatusIndicator >())); if (xStatusIndicator.is()) - xStatusIndicator->start(OUString( RTL_CONSTASCII_USTRINGPARAM( "Saving :" )),nProgressRange); + xStatusIndicator->start(OUString( "Saving :" ),nProgressRange); // Set up converter bridge. Reference< com::sun::star::xml::XExportFilter > xConverter(mxMSF->createInstance(udConvertClass ), UNO_QUERY); @@ -261,7 +261,7 @@ sal_Bool SAL_CALL XmlFilterAdaptor::exportImpl( const Sequence< ::com::sun::star // get the base URI, so we can use relative links OUString aBaseURI; - if (aMediaMap.find(OUString( RTL_CONSTASCII_USTRINGPARAM( "URL" )))->second >>= aBaseURI) + if (aMediaMap.find(OUString( "URL" ))->second >>= aBaseURI) { INetURLObject aURLObj(aBaseURI); // base URI in this case is the URI of the actual saving location @@ -281,12 +281,12 @@ sal_Bool SAL_CALL XmlFilterAdaptor::exportImpl( const Sequence< ::com::sun::star Reference< XPropertySet > xInfoSet( GenericPropertySet_CreateInstance( new PropertySetInfo( aImportInfoMap ) ) ); xInfoSet->setPropertyValue( - OUString( RTL_CONSTASCII_USTRINGPARAM( "UsePrettyPrinting" )), makeAny( bPrettyPrint )); + OUString( "UsePrettyPrinting" ), makeAny( bPrettyPrint )); xInfoSet->setPropertyValue( - OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportTextNumberElement" )), + OUString( "ExportTextNumberElement" ), makeAny( bExportTextNumberElementForListItems )); xInfoSet->setPropertyValue( - OUString( RTL_CONSTASCII_USTRINGPARAM( "BaseURI" )), makeAny( aBaseURI )); + OUString( "BaseURI" ), makeAny( aBaseURI )); aAnys[1] <<= xInfoSet; Reference< XExporter > xExporter( mxMSF->createInstanceWithArguments ( @@ -365,17 +365,17 @@ void SAL_CALL XmlFilterAdaptor::initialize( const Sequence< Any >& aArguments ) { comphelper::SequenceAsHashMap aMap(aAnySeq); msFilterName = aMap.getUnpackedValueOrDefault( - OUString( RTL_CONSTASCII_USTRINGPARAM( "Type" )), OUString()); + OUString( "Type" ), OUString()); msUserData = aMap.getUnpackedValueOrDefault( - OUString( RTL_CONSTASCII_USTRINGPARAM( "UserData" )), Sequence< OUString >()); + OUString( "UserData" ), Sequence< OUString >()); msTemplateName = aMap.getUnpackedValueOrDefault( - OUString( RTL_CONSTASCII_USTRINGPARAM( "TemplateName" )), OUString()); + OUString( "TemplateName" ), OUString()); } } OUString XmlFilterAdaptor_getImplementationName () throw (RuntimeException) { - return OUString ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.comp.Writer.XmlFilterAdaptor" ) ); + return OUString( "com.sun.star.comp.Writer.XmlFilterAdaptor" ); } #define SERVICE_NAME1 "com.sun.star.document.ExportFilter" #define SERVICE_NAME2 "com.sun.star.document.ImportFilter" |