diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-07-30 17:43:51 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-07-31 12:51:59 +0200 |
commit | ad99664931154a2999bef8d0cfd1b1c44f0109ee (patch) | |
tree | 70fc3ca300f82b766e7b9c250a1fadcf429e154b /xmloff | |
parent | af896b031cf9ac2d35bdf6570c6a451fd00a0d1c (diff) |
Improved loplugin:stringconstant (now that GCC 7 supports it): xmloff
Change-Id: I0791c0df1793e05900a32fcdb6d32831bbbe3f9a
Reviewed-on: https://gerrit.libreoffice.org/76623
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/chart/SchXMLExport.cxx | 14 | ||||
-rw-r--r-- | xmloff/source/chart/SchXMLImport.cxx | 8 | ||||
-rw-r--r-- | xmloff/source/core/unoatrcn.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/draw/animationimport.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/draw/sdxmlexp.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/forms/elementimport.cxx | 6 | ||||
-rw-r--r-- | xmloff/source/forms/gridcolumnproptranslator.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/meta/MetaExportComponent.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/meta/xmlversion.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/style/XMLFontAutoStylePool.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/text/XMLAutoTextEventExport.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/text/XMLAutoTextEventImport.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/text/XMLPropertyBackpatcher.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/text/XMLTextMarkImportContext.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/transform/OOo2Oasis.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/transform/Oasis2OOo.cxx | 2 |
16 files changed, 30 insertions, 30 deletions
diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx index 0f8cf19221bc..90e0adcb1f1e 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -3643,7 +3643,7 @@ Sequence< OUString > SchXMLExport_getSupportedServiceNames() throw() OUString SchXMLExport_getImplementationName() throw() { - return OUString( "SchXMLExport.Compact" ); + return "SchXMLExport.Compact"; } Reference< uno::XInterface > SchXMLExport_createInstance(const Reference< lang::XMultiServiceFactory > & rSMgr) @@ -3660,7 +3660,7 @@ Sequence< OUString > SchXMLExport_Oasis_getSupportedServiceNames() throw() OUString SchXMLExport_Oasis_getImplementationName() throw() { - return OUString( "SchXMLExport.Oasis.Compact" ); + return "SchXMLExport.Oasis.Compact"; } Reference< uno::XInterface > SchXMLExport_Oasis_createInstance(const Reference< lang::XMultiServiceFactory > & rSMgr) @@ -3680,7 +3680,7 @@ Sequence< OUString > SchXMLExport_Styles_getSupportedServiceNames() throw() OUString SchXMLExport_Styles_getImplementationName() throw() { - return OUString( "SchXMLExport.Styles" ); + return "SchXMLExport.Styles"; } Reference< uno::XInterface > SchXMLExport_Styles_createInstance(const Reference< lang::XMultiServiceFactory >& rSMgr) @@ -3696,7 +3696,7 @@ Sequence< OUString > SchXMLExport_Oasis_Styles_getSupportedServiceNames() throw( OUString SchXMLExport_Oasis_Styles_getImplementationName() throw() { - return OUString( "SchXMLExport.Oasis.Styles" ); + return "SchXMLExport.Oasis.Styles"; } Reference< uno::XInterface > SchXMLExport_Oasis_Styles_createInstance(const Reference< lang::XMultiServiceFactory > & rSMgr) @@ -3711,7 +3711,7 @@ Sequence< OUString > SchXMLExport_Content_getSupportedServiceNames() throw() OUString SchXMLExport_Content_getImplementationName() throw() { - return OUString( "SchXMLExport.Content" ); + return "SchXMLExport.Content"; } Reference< uno::XInterface > SchXMLExport_Content_createInstance(const Reference< lang::XMultiServiceFactory > & rSMgr) @@ -3727,7 +3727,7 @@ Sequence< OUString > SchXMLExport_Oasis_Content_getSupportedServiceNames() throw OUString SchXMLExport_Oasis_Content_getImplementationName() throw() { - return OUString( "SchXMLExport.Oasis.Content" ); + return "SchXMLExport.Oasis.Content"; } Reference< uno::XInterface > SchXMLExport_Oasis_Content_createInstance(const Reference< lang::XMultiServiceFactory > & rSMgr) @@ -3743,7 +3743,7 @@ Sequence< OUString > SchXMLExport_Oasis_Meta_getSupportedServiceNames() throw() OUString SchXMLExport_Oasis_Meta_getImplementationName() throw() { - return OUString( "SchXMLExport.Oasis.Meta" ); + return "SchXMLExport.Oasis.Meta"; } Reference< uno::XInterface > SchXMLExport_Oasis_Meta_createInstance(const Reference< lang::XMultiServiceFactory > & rSMgr) diff --git a/xmloff/source/chart/SchXMLImport.cxx b/xmloff/source/chart/SchXMLImport.cxx index a571ecc636a1..5f4c92f3501a 100644 --- a/xmloff/source/chart/SchXMLImport.cxx +++ b/xmloff/source/chart/SchXMLImport.cxx @@ -626,7 +626,7 @@ Sequence< OUString > SchXMLImport_getSupportedServiceNames() throw() OUString SchXMLImport_getImplementationName() throw() { - return OUString( "SchXMLImport" ); + return "SchXMLImport"; } Reference< uno::XInterface > SchXMLImport_createInstance(const Reference< lang::XMultiServiceFactory > & rSMgr) @@ -643,7 +643,7 @@ Sequence< OUString > SchXMLImport_Styles_getSupportedServiceNames() throw() OUString SchXMLImport_Styles_getImplementationName() throw() { - return OUString( "SchXMLImport.Styles" ); + return "SchXMLImport.Styles"; } Reference< uno::XInterface > SchXMLImport_Styles_createInstance(const Reference< lang::XMultiServiceFactory > & rSMgr) @@ -658,7 +658,7 @@ Sequence< OUString > SchXMLImport_Content_getSupportedServiceNames() throw() OUString SchXMLImport_Content_getImplementationName() throw() { - return OUString( "SchXMLImport.Content" ); + return "SchXMLImport.Content"; } Reference< uno::XInterface > SchXMLImport_Content_createInstance(const Reference< lang::XMultiServiceFactory > & rSMgr) @@ -673,7 +673,7 @@ Sequence< OUString > SchXMLImport_Meta_getSupportedServiceNames() throw() OUString SchXMLImport_Meta_getImplementationName() throw() { - return OUString( "SchXMLImport.Meta" ); + return "SchXMLImport.Meta"; } Reference< uno::XInterface > SchXMLImport_Meta_createInstance(const Reference< lang::XMultiServiceFactory > & rSMgr) diff --git a/xmloff/source/core/unoatrcn.cxx b/xmloff/source/core/unoatrcn.cxx index f142e8f60d39..50aaedfdd7c1 100644 --- a/xmloff/source/core/unoatrcn.cxx +++ b/xmloff/source/core/unoatrcn.cxx @@ -236,7 +236,7 @@ void SAL_CALL SvUnoAttributeContainer::removeByName(const OUString& Name) //XServiceInfo OUString SAL_CALL SvUnoAttributeContainer::getImplementationName() { - return OUString( "SvUnoAttributeContainer" ); + return "SvUnoAttributeContainer"; } uno::Sequence< OUString > SvUnoAttributeContainer::getSupportedServiceNames() diff --git a/xmloff/source/draw/animationimport.cxx b/xmloff/source/draw/animationimport.cxx index e6f8156fc58f..ec503602ee26 100644 --- a/xmloff/source/draw/animationimport.cxx +++ b/xmloff/source/draw/animationimport.cxx @@ -95,7 +95,7 @@ Sequence< OUString > AnimationsImport_getSupportedServiceNames() throw() OUString AnimationsImport_getImplementationName() throw() { - return OUString( "xmloff::AnimationsImport" ); + return "xmloff::AnimationsImport"; } static OUString diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx index 2ab0161e8b5e..182fa660a119 100644 --- a/xmloff/source/draw/sdxmlexp.cxx +++ b/xmloff/source/draw/sdxmlexp.cxx @@ -2602,7 +2602,7 @@ uno::Sequence< OUString > classname##_getSupportedServiceNames() throw()\ }\ OUString classname##_getImplementationName() throw()\ {\ - return OUString( implementationname );\ + return implementationname;\ }\ uno::Reference< uno::XInterface > classname##_createInstance(const uno::Reference< lang::XMultiServiceFactory > & rSMgr)\ {\ diff --git a/xmloff/source/forms/elementimport.cxx b/xmloff/source/forms/elementimport.cxx index 3329dffd750c..bf213dd8b5bf 100644 --- a/xmloff/source/forms/elementimport.cxx +++ b/xmloff/source/forms/elementimport.cxx @@ -435,7 +435,7 @@ namespace xmloff static const char sUnnamedName[] = "unnamed"; OSL_ENSURE(m_xParentContainer.is(), "OElementImport::implGetDefaultName: no parent container!"); if (!m_xParentContainer.is()) - return OUString(sUnnamedName); + return sUnnamedName; Sequence< OUString > aNames = m_xParentContainer->getElementNames(); for (sal_Int32 i=0; i<32768; ++i) // the limit is nearly arbitrary ... @@ -448,7 +448,7 @@ namespace xmloff return sReturn; } OSL_FAIL("OElementImport::implGetDefaultName: did not find a free name!"); - return OUString(sUnnamedName); + return sUnnamedName; } PropertyGroups::const_iterator OElementImport::impl_matchPropertyGroup( const PropertyGroups& i_propertyGroups ) const @@ -2042,7 +2042,7 @@ namespace xmloff OUString OFormImport::determineDefaultServiceName() const { - return OUString("com.sun.star.form.component.Form"); + return "com.sun.star.form.component.Form"; } } // namespace xmloff diff --git a/xmloff/source/forms/gridcolumnproptranslator.cxx b/xmloff/source/forms/gridcolumnproptranslator.cxx index 707e5dfca336..f1f8abad8948 100644 --- a/xmloff/source/forms/gridcolumnproptranslator.cxx +++ b/xmloff/source/forms/gridcolumnproptranslator.cxx @@ -41,12 +41,12 @@ namespace xmloff { OUString getParaAlignProperty() { - return OUString( "ParaAdjust" ); + return "ParaAdjust"; } OUString getAlignProperty() { - return OUString( "Align" ); + return "Align"; } sal_Int32 findStringElement( const Sequence< OUString >& _rNames, const OUString& _rName ) diff --git a/xmloff/source/meta/MetaExportComponent.cxx b/xmloff/source/meta/MetaExportComponent.cxx index ffddc8c90f16..3c1c4225d5cb 100644 --- a/xmloff/source/meta/MetaExportComponent.cxx +++ b/xmloff/source/meta/MetaExportComponent.cxx @@ -196,7 +196,7 @@ XMLMetaExportComponent_get_implementation( OUString XMLMetaExportOOO_getImplementationName() throw() { - return OUString( "XMLMetaExportOOo" ); + return "XMLMetaExportOOo"; } uno::Reference< uno::XInterface > XMLMetaExportOOO_createInstance( diff --git a/xmloff/source/meta/xmlversion.cxx b/xmloff/source/meta/xmlversion.cxx index 27fca376f195..37e84ee3fcfe 100644 --- a/xmloff/source/meta/xmlversion.cxx +++ b/xmloff/source/meta/xmlversion.cxx @@ -425,7 +425,7 @@ uno::Sequence< util::RevisionTag > SAL_CALL XMLVersionListPersistence::load( con OUString XMLVersionListPersistence::getImplementationName() { - return OUString("XMLVersionListPersistence"); + return "XMLVersionListPersistence"; } sal_Bool XMLVersionListPersistence::supportsService( diff --git a/xmloff/source/style/XMLFontAutoStylePool.cxx b/xmloff/source/style/XMLFontAutoStylePool.cxx index b89525f75442..d9b205b1c7df 100644 --- a/xmloff/source/style/XMLFontAutoStylePool.cxx +++ b/xmloff/source/style/XMLFontAutoStylePool.cxx @@ -554,7 +554,7 @@ static OString convertToHashString(std::vector<unsigned char> const & rHash) aStringStream << std::setw(2) << std::setfill('0') << std::hex << int(rByte); } - return OString(aStringStream.str().c_str()); + return aStringStream.str().c_str(); } static OString getFileHash(OUString const & rFileUrl) diff --git a/xmloff/source/text/XMLAutoTextEventExport.cxx b/xmloff/source/text/XMLAutoTextEventExport.cxx index 68735eabde38..fbda4e38039f 100644 --- a/xmloff/source/text/XMLAutoTextEventExport.cxx +++ b/xmloff/source/text/XMLAutoTextEventExport.cxx @@ -212,7 +212,7 @@ Sequence< OUString > XMLAutoTextEventExport_getSupportedServiceNames() OUString XMLAutoTextEventExport_getImplementationName() throw() { - return OUString( "com.sun.star.comp.Writer.XMLOasisAutotextEventsExporter" ); + return "com.sun.star.comp.Writer.XMLOasisAutotextEventsExporter"; } Reference< XInterface > XMLAutoTextEventExport_createInstance( @@ -232,7 +232,7 @@ Sequence< OUString > XMLAutoTextEventExportOOO_getSupportedServiceNames() OUString XMLAutoTextEventExportOOO_getImplementationName() throw() { - return OUString( "com.sun.star.comp.Writer.XMLAutotextEventsExporter" ); + return "com.sun.star.comp.Writer.XMLAutotextEventsExporter"; } Reference< XInterface > XMLAutoTextEventExportOOO_createInstance( diff --git a/xmloff/source/text/XMLAutoTextEventImport.cxx b/xmloff/source/text/XMLAutoTextEventImport.cxx index 385aa707ffd3..818f52ef4818 100644 --- a/xmloff/source/text/XMLAutoTextEventImport.cxx +++ b/xmloff/source/text/XMLAutoTextEventImport.cxx @@ -112,7 +112,7 @@ Sequence< OUString > OUString XMLAutoTextEventImport_getImplementationName() throw() { - return OUString( "com.sun.star.comp.Writer.XMLOasisAutotextEventsImporter" ); + return "com.sun.star.comp.Writer.XMLOasisAutotextEventsImporter"; } Reference< XInterface > XMLAutoTextEventImport_createInstance( diff --git a/xmloff/source/text/XMLPropertyBackpatcher.cxx b/xmloff/source/text/XMLPropertyBackpatcher.cxx index e5f18a7b25c3..5437cd4cfe22 100644 --- a/xmloff/source/text/XMLPropertyBackpatcher.cxx +++ b/xmloff/source/text/XMLPropertyBackpatcher.cxx @@ -126,7 +126,7 @@ XMLTextImportHelper::MakeBackpatcherImpl() static OUString GetSequenceNumber() { - return OUString("SequenceNumber"); + return "SequenceNumber"; } diff --git a/xmloff/source/text/XMLTextMarkImportContext.cxx b/xmloff/source/text/XMLTextMarkImportContext.cxx index 62e58c8a84c1..a4f047097099 100644 --- a/xmloff/source/text/XMLTextMarkImportContext.cxx +++ b/xmloff/source/text/XMLTextMarkImportContext.cxx @@ -145,7 +145,7 @@ static OUString lcl_getFieldmarkName(OUString const& name) { if (name == "msoffice.field.FORMTEXT" || name == "ecma.office-open-xml.field.FORMTEXT") - return OUString(ODF_FORMTEXT); + return ODF_FORMTEXT; else return name; } diff --git a/xmloff/source/transform/OOo2Oasis.cxx b/xmloff/source/transform/OOo2Oasis.cxx index 1cd92c99c89e..65320ff36813 100644 --- a/xmloff/source/transform/OOo2Oasis.cxx +++ b/xmloff/source/transform/OOo2Oasis.cxx @@ -1980,7 +1980,7 @@ Sequence< css::uno::Type > SAL_CALL OOo2OasisTransformer::getTypes() OUString OOo2OasisTransformer_getImplementationName() throw() { - return OUString( "com.sun.star.comp.OOo2OasisTransformer" ); + return "com.sun.star.comp.OOo2OasisTransformer"; } Sequence< OUString > OOo2OasisTransformer_getSupportedServiceNames() throw() @@ -1999,7 +1999,7 @@ Reference< XInterface > OOo2OasisTransformer_createInstance( #define OOO_IMPORTER( className, implName, subServiceName ) \ OUString className##_getImplementationName() throw() \ { \ - return OUString(implName); \ + return implName; \ } \ \ Sequence< OUString > className##_getSupportedServiceNames() throw()\ diff --git a/xmloff/source/transform/Oasis2OOo.cxx b/xmloff/source/transform/Oasis2OOo.cxx index 5a73c1e86f02..46b3e748cfbe 100644 --- a/xmloff/source/transform/Oasis2OOo.cxx +++ b/xmloff/source/transform/Oasis2OOo.cxx @@ -1962,7 +1962,7 @@ Sequence< OUString > SAL_CALL Oasis2OOoTransformer::getSupportedServiceNames( ) OUString Oasis2OOoTransformer_getImplementationName() throw() { - return OUString( "com.sun.star.comp.Oasis2OOoTransformer" ); + return "com.sun.star.comp.Oasis2OOoTransformer"; } Sequence< OUString > Oasis2OOoTransformer_getSupportedServiceNames() |