[Libreoffice-commits] core.git: 3 commits - xmloff/source xmlscript/source xmlsecurity/source
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Wed Jul 31 10:52:35 UTC 2019
xmloff/source/chart/SchXMLExport.cxx | 14 ++++----
xmloff/source/chart/SchXMLImport.cxx | 8 ++---
xmloff/source/core/unoatrcn.cxx | 2 -
xmloff/source/draw/animationimport.cxx | 2 -
xmloff/source/draw/sdxmlexp.cxx | 2 -
xmloff/source/forms/elementimport.cxx | 6 +--
xmloff/source/forms/gridcolumnproptranslator.cxx | 4 +-
xmloff/source/meta/MetaExportComponent.cxx | 2 -
xmloff/source/meta/xmlversion.cxx | 2 -
xmloff/source/style/XMLFontAutoStylePool.cxx | 2 -
xmloff/source/text/XMLAutoTextEventExport.cxx | 4 +-
xmloff/source/text/XMLAutoTextEventImport.cxx | 2 -
xmloff/source/text/XMLPropertyBackpatcher.cxx | 2 -
xmloff/source/text/XMLTextMarkImportContext.cxx | 2 -
xmloff/source/transform/OOo2Oasis.cxx | 4 +-
xmloff/source/transform/Oasis2OOo.cxx | 2 -
xmlscript/source/xml_helper/xml_impctx.cxx | 2 -
xmlscript/source/xmlflat_imexp/xmlbas_export.cxx | 4 +-
xmlscript/source/xmlflat_imexp/xmlbas_import.cxx | 4 +-
xmlsecurity/source/component/certificatecontainer.cxx | 2 -
xmlsecurity/source/component/documentdigitalsignatures.cxx | 2 -
xmlsecurity/source/framework/saxeventkeeperimpl.cxx | 2 -
xmlsecurity/source/framework/signaturecreatorimpl.cxx | 2 -
xmlsecurity/source/framework/signatureverifierimpl.cxx | 2 -
xmlsecurity/source/framework/xmlsignaturetemplateimpl.cxx | 2 -
xmlsecurity/source/gpg/CertificateImpl.cxx | 2 -
xmlsecurity/source/gpg/SEInitializer.cxx | 2 -
xmlsecurity/source/gpg/XMLSecurityContext.cxx | 2 -
xmlsecurity/source/gpg/xmlsignature_gpgimpl.cxx | 2 -
xmlsecurity/source/helper/documentsignaturehelper.cxx | 6 +--
xmlsecurity/source/helper/xsecctl.cxx | 16 +++++-----
xmlsecurity/source/xmlsec/nss/nssinitializer.cxx | 4 +-
xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx | 2 -
xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx | 4 +-
xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx | 2 -
xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx | 2 -
xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx | 2 -
xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx | 2 -
xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.cxx | 2 -
39 files changed, 66 insertions(+), 66 deletions(-)
New commits:
commit ad99664931154a2999bef8d0cfd1b1c44f0109ee
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue Jul 30 17:43:51 2019 +0200
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Wed Jul 31 12:51:59 2019 +0200
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 at redhat.com>
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()
commit af896b031cf9ac2d35bdf6570c6a451fd00a0d1c
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue Jul 30 17:43:36 2019 +0200
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Wed Jul 31 12:51:48 2019 +0200
Improved loplugin:stringconstant (now that GCC 7 supports it): xmlscript
Change-Id: Ic294ce631c87f2a7ecbcec69f9ecd38183d7dd45
Reviewed-on: https://gerrit.libreoffice.org/76622
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/xmlscript/source/xml_helper/xml_impctx.cxx b/xmlscript/source/xml_helper/xml_impctx.cxx
index acdb002b6ec2..00a6de79a7af 100644
--- a/xmlscript/source/xml_helper/xml_impctx.cxx
+++ b/xmlscript/source/xml_helper/xml_impctx.cxx
@@ -54,7 +54,7 @@ Sequence< OUString > getSupportedServiceNames_DocumentHandlerImpl()
OUString getImplementationName_DocumentHandlerImpl()
{
- return OUString( "com.sun.star.comp.xml.input.SaxDocumentHandler" );
+ return "com.sun.star.comp.xml.input.SaxDocumentHandler";
}
typedef std::unordered_map< OUString, sal_Int32 > t_OUString2LongMap;
diff --git a/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx b/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx
index ed1ca3da901e..76a20aa3a5a5 100644
--- a/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx
+++ b/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx
@@ -337,7 +337,7 @@ sal_Bool XMLBasicExporterBase::filter( const Sequence< beans::PropertyValue >& /
OUString XMLBasicExporter::getImplementationName( )
{
- return OUString( "com.sun.star.comp.xmlscript.XMLBasicExporter" );
+ return "com.sun.star.comp.xmlscript.XMLBasicExporter";
}
Sequence< OUString > XMLBasicExporter::getSupportedServiceNames( )
@@ -361,7 +361,7 @@ sal_Bool XMLBasicExporterBase::filter( const Sequence< beans::PropertyValue >& /
OUString XMLOasisBasicExporter::getImplementationName( )
{
- return OUString( "com.sun.star.comp.xmlscript.XMLOasisBasicExporter" );
+ return "com.sun.star.comp.xmlscript.XMLOasisBasicExporter";
}
Sequence< OUString > XMLOasisBasicExporter::getSupportedServiceNames( )
diff --git a/xmlscript/source/xmlflat_imexp/xmlbas_import.cxx b/xmlscript/source/xmlflat_imexp/xmlbas_import.cxx
index 4c7b4bf39876..f39f4ffef3b4 100644
--- a/xmlscript/source/xmlflat_imexp/xmlbas_import.cxx
+++ b/xmlscript/source/xmlflat_imexp/xmlbas_import.cxx
@@ -594,7 +594,7 @@ void BasicImport::setDocumentLocator( const Reference< xml::sax::XLocator >& /*x
OUString XMLBasicImporter::getImplementationName( )
{
- return OUString( "com.sun.star.comp.xmlscript.XMLBasicImporter" );
+ return "com.sun.star.comp.xmlscript.XMLBasicImporter";
}
Sequence< OUString > XMLBasicImporter::getSupportedServiceNames( )
@@ -618,7 +618,7 @@ void BasicImport::setDocumentLocator( const Reference< xml::sax::XLocator >& /*x
OUString XMLOasisBasicImporter::getImplementationName( )
{
- return OUString( "com.sun.star.comp.xmlscript.XMLOasisBasicImporter" );
+ return "com.sun.star.comp.xmlscript.XMLOasisBasicImporter";
}
Sequence< OUString > XMLOasisBasicImporter::getSupportedServiceNames( )
commit d55e9567b5e0f5fa0499ccfabee6b756dff0ad7e
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue Jul 30 17:43:11 2019 +0200
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Wed Jul 31 12:51:43 2019 +0200
Improved loplugin:stringconstant (now that GCC 7 supports it): xmlsecurity
Change-Id: I47c93247b9a34abf4b95966833664e63eb57f133
Reviewed-on: https://gerrit.libreoffice.org/76621
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/xmlsecurity/source/component/certificatecontainer.cxx b/xmlsecurity/source/component/certificatecontainer.cxx
index e8482d328511..648d72c13c20 100644
--- a/xmlsecurity/source/component/certificatecontainer.cxx
+++ b/xmlsecurity/source/component/certificatecontainer.cxx
@@ -122,7 +122,7 @@ CertificateContainer::hasCertificate( const OUString & url, const OUString & cer
OUString SAL_CALL
CertificateContainer::getImplementationName( )
{
- return OUString("com.sun.star.security.CertificateContainer");
+ return "com.sun.star.security.CertificateContainer";
}
sal_Bool SAL_CALL
diff --git a/xmlsecurity/source/component/documentdigitalsignatures.cxx b/xmlsecurity/source/component/documentdigitalsignatures.cxx
index bca8c68b45de..dcfaad0af773 100644
--- a/xmlsecurity/source/component/documentdigitalsignatures.cxx
+++ b/xmlsecurity/source/component/documentdigitalsignatures.cxx
@@ -230,7 +230,7 @@ void DocumentDigitalSignatures::initialize( const Sequence< Any >& aArguments)
OUString DocumentDigitalSignatures::getImplementationName()
{
- return OUString("com.sun.star.security.DocumentDigitalSignatures");
+ return "com.sun.star.security.DocumentDigitalSignatures";
}
sal_Bool DocumentDigitalSignatures::supportsService(
diff --git a/xmlsecurity/source/framework/saxeventkeeperimpl.cxx b/xmlsecurity/source/framework/saxeventkeeperimpl.cxx
index a0d77ce3fcef..945280d8b55d 100644
--- a/xmlsecurity/source/framework/saxeventkeeperimpl.cxx
+++ b/xmlsecurity/source/framework/saxeventkeeperimpl.cxx
@@ -1138,7 +1138,7 @@ void SAL_CALL SAXEventKeeperImpl::initialize( const cssu::Sequence< cssu::Any >&
OUString SAXEventKeeperImpl_getImplementationName ()
{
- return OUString ( IMPLEMENTATION_NAME );
+ return IMPLEMENTATION_NAME;
}
cssu::Sequence< OUString > SAXEventKeeperImpl_getSupportedServiceNames( )
diff --git a/xmlsecurity/source/framework/signaturecreatorimpl.cxx b/xmlsecurity/source/framework/signaturecreatorimpl.cxx
index 95e17b646cb0..131365ac9fb0 100644
--- a/xmlsecurity/source/framework/signaturecreatorimpl.cxx
+++ b/xmlsecurity/source/framework/signaturecreatorimpl.cxx
@@ -154,7 +154,7 @@ void SAL_CALL SignatureCreatorImpl::initialize( const cssu::Sequence< cssu::Any
OUString SignatureCreatorImpl_getImplementationName ()
{
- return OUString ( IMPLEMENTATION_NAME );
+ return IMPLEMENTATION_NAME;
}
cssu::Sequence< OUString > SignatureCreatorImpl_getSupportedServiceNames( )
diff --git a/xmlsecurity/source/framework/signatureverifierimpl.cxx b/xmlsecurity/source/framework/signatureverifierimpl.cxx
index bafaaf8df5b3..7a697f355b0c 100644
--- a/xmlsecurity/source/framework/signatureverifierimpl.cxx
+++ b/xmlsecurity/source/framework/signatureverifierimpl.cxx
@@ -109,7 +109,7 @@ void SAL_CALL SignatureVerifierImpl::initialize(
OUString SignatureVerifierImpl_getImplementationName ()
{
- return OUString( IMPLEMENTATION_NAME );
+ return IMPLEMENTATION_NAME;
}
cssu::Sequence< OUString > SignatureVerifierImpl_getSupportedServiceNames( )
diff --git a/xmlsecurity/source/framework/xmlsignaturetemplateimpl.cxx b/xmlsecurity/source/framework/xmlsignaturetemplateimpl.cxx
index 869f1bf26371..586a8f70c7a1 100644
--- a/xmlsecurity/source/framework/xmlsignaturetemplateimpl.cxx
+++ b/xmlsecurity/source/framework/xmlsignaturetemplateimpl.cxx
@@ -113,7 +113,7 @@ Sequence< OUString > XMLSignatureTemplateImpl::impl_getSupportedServiceNames() {
}
OUString XMLSignatureTemplateImpl::impl_getImplementationName() {
- return OUString("com.sun.star.xml.security.framework.XMLSignatureTemplateImpl") ;
+ return "com.sun.star.xml.security.framework.XMLSignatureTemplateImpl" ;
}
//Helper for registry
diff --git a/xmlsecurity/source/gpg/CertificateImpl.cxx b/xmlsecurity/source/gpg/CertificateImpl.cxx
index 3e0ba3fe0e25..3b005629ba7a 100644
--- a/xmlsecurity/source/gpg/CertificateImpl.cxx
+++ b/xmlsecurity/source/gpg/CertificateImpl.cxx
@@ -255,7 +255,7 @@ const GpgME::Key* CertificateImpl::getCertificate() const
/* XServiceInfo */
OUString SAL_CALL CertificateImpl::getImplementationName()
{
- return OUString("com.sun.star.xml.security.gpg.XCertificate_GpgImpl");
+ return "com.sun.star.xml.security.gpg.XCertificate_GpgImpl";
}
/* XServiceInfo */
diff --git a/xmlsecurity/source/gpg/SEInitializer.cxx b/xmlsecurity/source/gpg/SEInitializer.cxx
index f11ad59d8ba1..cb502e8c9793 100644
--- a/xmlsecurity/source/gpg/SEInitializer.cxx
+++ b/xmlsecurity/source/gpg/SEInitializer.cxx
@@ -68,7 +68,7 @@ uno::Sequence< OUString > SAL_CALL SEInitializerGpg::getSupportedServiceNames()
OUString SAL_CALL SEInitializerGpg::getImplementationName()
{
- return OUString("com.sun.star.xml.security.SEInitializer_Gpg");
+ return "com.sun.star.xml.security.SEInitializer_Gpg";
}
extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
diff --git a/xmlsecurity/source/gpg/XMLSecurityContext.cxx b/xmlsecurity/source/gpg/XMLSecurityContext.cxx
index 460ed94dbfc7..d27e552829d1 100644
--- a/xmlsecurity/source/gpg/XMLSecurityContext.cxx
+++ b/xmlsecurity/source/gpg/XMLSecurityContext.cxx
@@ -68,7 +68,7 @@ void SAL_CALL XMLSecurityContextGpg::setDefaultSecurityEnvironmentIndex(sal_Int3
/* XServiceInfo */
OUString SAL_CALL XMLSecurityContextGpg::getImplementationName() {
- return OUString("com.sun.star.xml.security.gpg.XMLSecurityContext_GpgImpl");
+ return "com.sun.star.xml.security.gpg.XMLSecurityContext_GpgImpl";
}
/* XServiceInfo */
diff --git a/xmlsecurity/source/gpg/xmlsignature_gpgimpl.cxx b/xmlsecurity/source/gpg/xmlsignature_gpgimpl.cxx
index f836eca9cf02..62c188eff244 100644
--- a/xmlsecurity/source/gpg/xmlsignature_gpgimpl.cxx
+++ b/xmlsecurity/source/gpg/xmlsignature_gpgimpl.cxx
@@ -516,7 +516,7 @@ Sequence< OUString > XMLSignature_GpgImpl::impl_getSupportedServiceNames() {
}
OUString XMLSignature_GpgImpl::impl_getImplementationName() {
- return OUString("com.sun.star.xml.security.bridge.xmlsec.XMLSignature_GpgImpl") ;
+ return "com.sun.star.xml.security.bridge.xmlsec.XMLSignature_GpgImpl" ;
}
//Helper for registry
diff --git a/xmlsecurity/source/helper/documentsignaturehelper.cxx b/xmlsecurity/source/helper/documentsignaturehelper.cxx
index 6e173afdebff..ee5fb4989ec1 100644
--- a/xmlsecurity/source/helper/documentsignaturehelper.cxx
+++ b/xmlsecurity/source/helper/documentsignaturehelper.cxx
@@ -470,17 +470,17 @@ bool DocumentSignatureHelper::equalsReferenceUriManifestPath(
OUString DocumentSignatureHelper::GetDocumentContentSignatureDefaultStreamName()
{
- return OUString("documentsignatures.xml");
+ return "documentsignatures.xml";
}
OUString DocumentSignatureHelper::GetScriptingContentSignatureDefaultStreamName()
{
- return OUString("macrosignatures.xml");
+ return "macrosignatures.xml";
}
OUString DocumentSignatureHelper::GetPackageSignatureDefaultStreamName()
{
- return OUString("packagesignatures.xml");
+ return "packagesignatures.xml";
}
void DocumentSignatureHelper::writeDigestMethod(
diff --git a/xmlsecurity/source/helper/xsecctl.cxx b/xmlsecurity/source/helper/xsecctl.cxx
index 83396b5e7312..6dbd44b091be 100644
--- a/xmlsecurity/source/helper/xsecctl.cxx
+++ b/xmlsecurity/source/helper/xsecctl.cxx
@@ -54,13 +54,13 @@ OUString getDigestURI(sal_Int32 nID)
switch( nID )
{
case cssxc::DigestID::SHA1:
- return OUString(ALGO_XMLDSIGSHA1);
+ return ALGO_XMLDSIGSHA1;
case cssxc::DigestID::SHA256:
- return OUString(ALGO_XMLDSIGSHA256);
+ return ALGO_XMLDSIGSHA256;
case cssxc::DigestID::SHA512:
- return OUString(ALGO_XMLDSIGSHA512);
+ return ALGO_XMLDSIGSHA512;
default:
- return OUString(ALGO_XMLDSIGSHA1);
+ return ALGO_XMLDSIGSHA1;
}
}
OUString getSignatureURI(svl::crypto::SignatureMethodAlgorithm eAlgorithm, sal_Int32 nDigestID)
@@ -91,13 +91,13 @@ OUString getSignatureURI(svl::crypto::SignatureMethodAlgorithm eAlgorithm, sal_I
switch (nDigestID)
{
case cssxc::DigestID::SHA1:
- return OUString(ALGO_RSASHA1);
+ return ALGO_RSASHA1;
case cssxc::DigestID::SHA256:
- return OUString(ALGO_RSASHA256);
+ return ALGO_RSASHA256;
case cssxc::DigestID::SHA512:
- return OUString(ALGO_RSASHA512);
+ return ALGO_RSASHA512;
default:
- return OUString(ALGO_RSASHA1);
+ return ALGO_RSASHA1;
}
}
}
diff --git a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
index 4813d9cac10c..4288e1ed426d 100644
--- a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
+++ b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
@@ -243,7 +243,7 @@ OString getMozillaCurrentProfile( const css::uno::Reference< css::uno::XComponen
SAL_INFO(
"xmlsecurity.xmlsec",
"Using Mozilla profile from MOZILLA_CERTIFICATE_FOLDER=" << pEnv);
- return OString(pEnv);
+ return pEnv;
}
// second, try to get saved user-preference
@@ -582,7 +582,7 @@ css::uno::Reference< css::xml::crypto::XCipherContext > SAL_CALL ONSSInitializer
/* XServiceInfo */
OUString SAL_CALL ONSSInitializer::getImplementationName()
{
- return OUString("com.sun.star.xml.crypto.NSSInitializer");
+ return "com.sun.star.xml.crypto.NSSInitializer";
}
sal_Bool SAL_CALL ONSSInitializer::supportsService( const OUString& rServiceName )
diff --git a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx
index 7c0b4f2af489..a703fb79be7f 100644
--- a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx
@@ -136,7 +136,7 @@ SecurityEnvironment_NssImpl::~SecurityEnvironment_NssImpl() {
/* XServiceInfo */
OUString SAL_CALL SecurityEnvironment_NssImpl::getImplementationName() {
- return OUString("com.sun.star.xml.crypto.SecurityEnvironment");
+ return "com.sun.star.xml.crypto.SecurityEnvironment";
}
/* XServiceInfo */
diff --git a/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx
index 7795d76a1ed2..707f050330f1 100644
--- a/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx
@@ -92,7 +92,7 @@ void SAL_CALL SEInitializer_NssImpl::freeSecurityContext( const uno::Reference<
/* XServiceInfo */
OUString SAL_CALL SEInitializer_NssImpl::getImplementationName( )
{
- return OUString("com.sun.star.xml.crypto.SEInitializer");
+ return "com.sun.star.xml.crypto.SEInitializer";
}
sal_Bool SAL_CALL SEInitializer_NssImpl::supportsService( const OUString& rServiceName )
{
@@ -119,7 +119,7 @@ NSSInitializer_NssImpl::NSSInitializer_NssImpl(const uno::Reference<uno::XCompon
OUString NSSInitializer_NssImpl::getImplementationName()
{
- return OUString("com.sun.star.xml.crypto.NSSInitializer");
+ return "com.sun.star.xml.crypto.NSSInitializer";
}
uno::Sequence<OUString> SAL_CALL NSSInitializer_NssImpl::getSupportedServiceNames()
diff --git a/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx
index fb68b0cac410..374c9f83671e 100644
--- a/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx
@@ -521,7 +521,7 @@ sal_Int32 SAL_CALL X509Certificate_NssImpl::getCertificateUsage( )
/* XServiceInfo */
OUString SAL_CALL X509Certificate_NssImpl::getImplementationName()
{
- return OUString("com.sun.star.xml.security.gpg.XCertificate_NssImpl");
+ return "com.sun.star.xml.security.gpg.XCertificate_NssImpl";
}
/* XServiceInfo */
diff --git a/xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx
index 1ed575e92300..18c0bd3ecd5e 100644
--- a/xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/xmlsecuritycontext_nssimpl.cxx
@@ -122,7 +122,7 @@ void SAL_CALL XMLSecurityContext_NssImpl::setDefaultSecurityEnvironmentIndex( sa
/* XServiceInfo */
OUString SAL_CALL XMLSecurityContext_NssImpl::getImplementationName() {
- return OUString("com.sun.star.xml.crypto.XMLSecurityContext");
+ return "com.sun.star.xml.crypto.XMLSecurityContext";
}
/* XServiceInfo */
diff --git a/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx
index 7ad39d3a765a..19818823980b 100644
--- a/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx
@@ -282,7 +282,7 @@ SAL_CALL XMLSignature_NssImpl::validate(
/* XServiceInfo */
OUString SAL_CALL XMLSignature_NssImpl::getImplementationName()
{
- return OUString("com.sun.star.xml.crypto.XMLSignature");
+ return "com.sun.star.xml.crypto.XMLSignature";
}
/* XServiceInfo */
diff --git a/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx b/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx
index b8479fc5afae..8f9ebb1c18e4 100644
--- a/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx
+++ b/xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx
@@ -887,7 +887,7 @@ void SAL_CALL XMLDocumentWrapper_XmlSecImpl::compressedSetDocumentLocator( sal_I
/* XServiceInfo */
OUString SAL_CALL XMLDocumentWrapper_XmlSecImpl::getImplementationName( )
{
- return OUString("com.sun.star.xml.wrapper.XMLDocumentWrapper");
+ return "com.sun.star.xml.wrapper.XMLDocumentWrapper";
}
sal_Bool SAL_CALL XMLDocumentWrapper_XmlSecImpl::supportsService( const OUString& rServiceName )
diff --git a/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.cxx b/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.cxx
index 60b9714256b7..31085431b453 100644
--- a/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.cxx
+++ b/xmlsecurity/source/xmlsec/xmlelementwrapper_xmlsecimpl.cxx
@@ -59,7 +59,7 @@ sal_Int64 SAL_CALL XMLElementWrapper_XmlSecImpl::getSomething( const uno::Sequen
/* XServiceInfo */
OUString SAL_CALL XMLElementWrapper_XmlSecImpl::getImplementationName( )
{
- return OUString("com.sun.star.xml.wrapper.XMLElementWrapper");
+ return "com.sun.star.xml.wrapper.XMLElementWrapper";
}
sal_Bool SAL_CALL XMLElementWrapper_XmlSecImpl::supportsService( const OUString& rServiceName )
More information about the Libreoffice-commits
mailing list