From ed9ff1a397c7eeb7eefbef0ba633a62f6f42bef1 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Fri, 26 Mar 2021 15:49:52 +0300 Subject: Drop these defines Change-Id: I7ff56d6f016ea90c4b5cdcbbb36141627037c0ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113125 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- basegfx/source/tools/unopolypolygon.cxx | 6 ++---- io/source/TextInputStream/TextInputStream.cxx | 7 ++----- io/source/TextOutputStream/TextOutputStream.cxx | 7 ++----- io/source/acceptor/acceptor.cxx | 7 ++----- io/source/connector/connector.cxx | 7 ++----- io/source/stm/opipe.cxx | 5 +---- io/test/stm/pipetest.cxx | 6 ++---- lotuswordpro/source/filter/lwpresource.hxx | 4 +--- xmlsecurity/source/framework/saxeventkeeperimpl.cxx | 4 +--- xmlsecurity/source/framework/signaturecreatorimpl.cxx | 4 +--- xmlsecurity/source/framework/signatureverifierimpl.cxx | 4 +--- 11 files changed, 17 insertions(+), 44 deletions(-) diff --git a/basegfx/source/tools/unopolypolygon.cxx b/basegfx/source/tools/unopolypolygon.cxx index c05f50f62684..0d1696783c9f 100644 --- a/basegfx/source/tools/unopolypolygon.cxx +++ b/basegfx/source/tools/unopolypolygon.cxx @@ -424,11 +424,9 @@ namespace basegfx::unotools return aSubsetPoly; } -#define IMPLEMENTATION_NAME "gfx::internal::UnoPolyPolygon" -#define SERVICE_NAME "com.sun.star.rendering.PolyPolygon2D" OUString SAL_CALL UnoPolyPolygon::getImplementationName() { - return IMPLEMENTATION_NAME; + return "gfx::internal::UnoPolyPolygon"; } sal_Bool SAL_CALL UnoPolyPolygon::supportsService( const OUString& ServiceName ) @@ -438,7 +436,7 @@ namespace basegfx::unotools uno::Sequence< OUString > SAL_CALL UnoPolyPolygon::getSupportedServiceNames() { - return { SERVICE_NAME }; + return { "com.sun.star.rendering.PolyPolygon2D" }; } B2DPolyPolygon UnoPolyPolygon::getPolyPolygon() const diff --git a/io/source/TextInputStream/TextInputStream.cxx b/io/source/TextInputStream/TextInputStream.cxx index 644db6fb3177..9f7c884725cd 100644 --- a/io/source/TextInputStream/TextInputStream.cxx +++ b/io/source/TextInputStream/TextInputStream.cxx @@ -36,9 +36,6 @@ namespace com::sun::star::uno { class XComponentContext; } -#define IMPLEMENTATION_NAME "com.sun.star.comp.io.TextInputStream" -#define SERVICE_NAME "com.sun.star.io.TextInputStream" - using namespace ::osl; using namespace ::cppu; using namespace ::com::sun::star::uno; @@ -378,7 +375,7 @@ Reference< XInputStream > OTextInputStream::getInputStream() OUString OTextInputStream::getImplementationName() { - return IMPLEMENTATION_NAME; + return "com.sun.star.comp.io.TextInputStream"; } sal_Bool OTextInputStream::supportsService(const OUString& ServiceName) @@ -388,7 +385,7 @@ sal_Bool OTextInputStream::supportsService(const OUString& ServiceName) Sequence< OUString > OTextInputStream::getSupportedServiceNames() { - return { SERVICE_NAME }; + return { "com.sun.star.io.TextInputStream" }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* diff --git a/io/source/TextOutputStream/TextOutputStream.cxx b/io/source/TextOutputStream/TextOutputStream.cxx index 2700ec1e415a..1271c4d09c96 100644 --- a/io/source/TextOutputStream/TextOutputStream.cxx +++ b/io/source/TextOutputStream/TextOutputStream.cxx @@ -31,9 +31,6 @@ namespace com::sun::star::uno { class XComponentContext; } -#define IMPLEMENTATION_NAME "com.sun.star.comp.io.TextOutputStream" -#define SERVICE_NAME "com.sun.star.io.TextOutputStream" - using namespace ::osl; using namespace ::cppu; using namespace ::com::sun::star::uno; @@ -217,7 +214,7 @@ Reference< XOutputStream > OTextOutputStream::getOutputStream() OUString OTextOutputStream::getImplementationName() { - return IMPLEMENTATION_NAME; + return "com.sun.star.comp.io.TextOutputStream"; } sal_Bool OTextOutputStream::supportsService(const OUString& ServiceName) @@ -227,7 +224,7 @@ sal_Bool OTextOutputStream::supportsService(const OUString& ServiceName) Sequence< OUString > OTextOutputStream::getSupportedServiceNames() { - return { SERVICE_NAME }; + return { "com.sun.star.io.TextOutputStream" }; } diff --git a/io/source/acceptor/acceptor.cxx b/io/source/acceptor/acceptor.cxx index 1be39b4cb7d3..79af13d385b9 100644 --- a/io/source/acceptor/acceptor.cxx +++ b/io/source/acceptor/acceptor.cxx @@ -35,9 +35,6 @@ #include #include -#define IMPLEMENTATION_NAME "com.sun.star.comp.io.Acceptor" -#define SERVICE_NAME "com.sun.star.connection.Acceptor" - using namespace ::osl; using namespace ::cppu; using namespace ::com::sun::star::uno; @@ -234,7 +231,7 @@ void SAL_CALL OAcceptor::stopAccepting( ) OUString OAcceptor::getImplementationName() { - return IMPLEMENTATION_NAME; + return "com.sun.star.comp.io.Acceptor"; } sal_Bool OAcceptor::supportsService(const OUString& ServiceName) @@ -244,7 +241,7 @@ sal_Bool OAcceptor::supportsService(const OUString& ServiceName) Sequence< OUString > OAcceptor::getSupportedServiceNames() { - return { SERVICE_NAME }; + return { "com.sun.star.connection.Acceptor" }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* diff --git a/io/source/connector/connector.cxx b/io/source/connector/connector.cxx index 87e60934cfb6..0f5a547e6ff3 100644 --- a/io/source/connector/connector.cxx +++ b/io/source/connector/connector.cxx @@ -34,9 +34,6 @@ #include "connector.hxx" -#define IMPLEMENTATION_NAME "com.sun.star.comp.io.Connector" -#define SERVICE_NAME "com.sun.star.connection.Connector" - using namespace ::osl; using namespace ::cppu; using namespace ::com::sun::star::uno; @@ -154,7 +151,7 @@ Reference< XConnection > SAL_CALL OConnector::connect( const OUString& sConnecti OUString OConnector::getImplementationName() { - return IMPLEMENTATION_NAME; + return "com.sun.star.comp.io.Connector"; } sal_Bool OConnector::supportsService(const OUString& ServiceName) @@ -164,7 +161,7 @@ sal_Bool OConnector::supportsService(const OUString& ServiceName) Sequence< OUString > OConnector::getSupportedServiceNames() { - return { SERVICE_NAME }; + return { "com.sun.star.connection.Connector" }; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* diff --git a/io/source/stm/opipe.cxx b/io/source/stm/opipe.cxx index 732daafecaed..07e203bf0c05 100644 --- a/io/source/stm/opipe.cxx +++ b/io/source/stm/opipe.cxx @@ -46,9 +46,6 @@ using namespace ::com::sun::star::lang; namespace com::sun::star::uno { class XComponentContext; } -// Implementation and service names -#define IMPLEMENTATION_NAME "com.sun.star.comp.io.stm.Pipe" - namespace io_stm{ namespace { @@ -333,7 +330,7 @@ Reference < XConnectable > OPipeImpl::getPredecessor() // XServiceInfo OUString OPipeImpl::getImplementationName() { - return IMPLEMENTATION_NAME; + return "com.sun.star.comp.io.stm.Pipe"; } // XServiceInfo diff --git a/io/test/stm/pipetest.cxx b/io/test/stm/pipetest.cxx index 77c333b0dc80..46637f3f245a 100644 --- a/io/test/stm/pipetest.cxx +++ b/io/test/stm/pipetest.cxx @@ -44,8 +44,6 @@ using namespace ::com::sun::star::test; // streams #include "testfactreg.hxx" -#define IMPLEMENTATION_NAME "test.com.sun.star.comp.extensions.stm.Pipe" -#define SERVICE_NAME "test.com.sun.star.io.Pipe" class WriteToStreamThread : @@ -409,12 +407,12 @@ Sequence OPipeTest_getSupportedServiceNames() throw() OUString OPipeTest_getServiceName() throw() { - return OUString( SERVICE_NAME ); + return OUString( "test.com.sun.star.io.Pipe" ); } OUString OPipeTest_getImplementationName() throw() { - return OUString( IMPLEMENTATION_NAME ); + return OUString( "test.com.sun.star.comp.extensions.stm.Pipe" ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/lwpresource.hxx b/lotuswordpro/source/filter/lwpresource.hxx index 4683fe3e1f41..e381edc41ae7 100644 --- a/lotuswordpro/source/filter/lwpresource.hxx +++ b/lotuswordpro/source/filter/lwpresource.hxx @@ -56,10 +56,8 @@ #ifndef INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_LWPRESOURCE_HXX #define INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_LWPRESOURCE_HXX -#define IMPLEMENTATION_NAME "com.ibm.ILWPImportFilter" - const char STR_WORDPRO[] = "Wordpro"; -const char STR_IMPLEMENTATION_NAME[] = IMPLEMENTATION_NAME; +const char STR_IMPLEMENTATION_NAME[] = "com.ibm.ILWPImportFilter"; const char STR_SERVICE_NAME[] = "com.sun.star.document.ImportFilter"; const char STR_WRITER_IMPORTER_NAME[] = "com.sun.star.comp.Writer.XMLImporter"; diff --git a/xmlsecurity/source/framework/saxeventkeeperimpl.cxx b/xmlsecurity/source/framework/saxeventkeeperimpl.cxx index fee60ce925bd..b0c03880348f 100644 --- a/xmlsecurity/source/framework/saxeventkeeperimpl.cxx +++ b/xmlsecurity/source/framework/saxeventkeeperimpl.cxx @@ -30,8 +30,6 @@ #include #include -#define IMPLEMENTATION_NAME "com.sun.star.xml.security.framework.SAXEventKeeperImpl" - SAXEventKeeperImpl::SAXEventKeeperImpl( ) :m_pCurrentBufferNode(nullptr), m_nNextElementMarkId(1), @@ -1128,7 +1126,7 @@ void SAL_CALL SAXEventKeeperImpl::initialize( const css::uno::Sequence< css::uno OUString SAXEventKeeperImpl_getImplementationName () { - return IMPLEMENTATION_NAME; + return "com.sun.star.xml.security.framework.SAXEventKeeperImpl"; } css::uno::Sequence< OUString > SAXEventKeeperImpl_getSupportedServiceNames( ) diff --git a/xmlsecurity/source/framework/signaturecreatorimpl.cxx b/xmlsecurity/source/framework/signaturecreatorimpl.cxx index bba7b9eb3933..826f800409f6 100644 --- a/xmlsecurity/source/framework/signaturecreatorimpl.cxx +++ b/xmlsecurity/source/framework/signaturecreatorimpl.cxx @@ -29,8 +29,6 @@ namespace com::sun::star::xml::wrapper { class XXMLElementWrapper; } using namespace com::sun::star::uno; -#define IMPLEMENTATION_NAME "com.sun.star.xml.security.framework.SignatureCreatorImpl" - SignatureCreatorImpl::SignatureCreatorImpl() : SignatureCreatorImpl_Base(), m_nIdOfBlocker(-1) { @@ -150,7 +148,7 @@ void SAL_CALL SignatureCreatorImpl::initialize( const css::uno::Sequence< css::u OUString SignatureCreatorImpl_getImplementationName () { - return IMPLEMENTATION_NAME; + return "com.sun.star.xml.security.framework.SignatureCreatorImpl"; } css::uno::Sequence< OUString > SignatureCreatorImpl_getSupportedServiceNames( ) diff --git a/xmlsecurity/source/framework/signatureverifierimpl.cxx b/xmlsecurity/source/framework/signatureverifierimpl.cxx index c00086adee9b..4e9dc08af972 100644 --- a/xmlsecurity/source/framework/signatureverifierimpl.cxx +++ b/xmlsecurity/source/framework/signatureverifierimpl.cxx @@ -26,8 +26,6 @@ #include -#define IMPLEMENTATION_NAME "com.sun.star.xml.security.framework.SignatureVerifierImpl" - SignatureVerifierImpl::SignatureVerifierImpl() : SignatureVerifierImpl_Base() { @@ -106,7 +104,7 @@ void SAL_CALL SignatureVerifierImpl::initialize( OUString SignatureVerifierImpl_getImplementationName () { - return IMPLEMENTATION_NAME; + return "com.sun.star.xml.security.framework.SignatureVerifierImpl"; } css::uno::Sequence< OUString > SignatureVerifierImpl_getSupportedServiceNames( ) -- cgit