diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-10-20 22:41:00 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-10-20 22:41:00 +0200 |
commit | a242f53c0435d270ce2297acaf80dba0775dbd92 (patch) | |
tree | 0cb024bc790e0ff7dd9b6af0d10befad79e3816a /stoc | |
parent | 68c3efccbee39a036895275e5cc4f483ec6fcff7 (diff) |
Clean up stoc::uriproc::supportsService
Change-Id: I1f324aae149e766d4755dc06ac5793c218ed5cf7
Diffstat (limited to 'stoc')
8 files changed, 10 insertions, 97 deletions
diff --git a/stoc/Library_stocservices.mk b/stoc/Library_stocservices.mk index fc39ef6050f4..9c0cb8431460 100644 --- a/stoc/Library_stocservices.mk +++ b/stoc/Library_stocservices.mk @@ -34,7 +34,6 @@ $(eval $(call gb_Library_add_exception_objects,stocservices,\ stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTexpand \ stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript \ stoc/source/uriproc/VndSunStarPkgUrlReferenceFactory \ - stoc/source/uriproc/supportsService \ )) # vim:set noet sw=4 ts=4: diff --git a/stoc/source/uriproc/ExternalUriReferenceTranslator.cxx b/stoc/source/uriproc/ExternalUriReferenceTranslator.cxx index fde82194d410..5f758873cc02 100644 --- a/stoc/source/uriproc/ExternalUriReferenceTranslator.cxx +++ b/stoc/source/uriproc/ExternalUriReferenceTranslator.cxx @@ -20,8 +20,6 @@ #include "stocservices.hxx" -#include "supportsService.hxx" - #include "com/sun/star/lang/XServiceInfo.hpp" #include "com/sun/star/uno/Exception.hpp" #include "com/sun/star/uno/Reference.hxx" @@ -31,6 +29,7 @@ #include "com/sun/star/uno/XInterface.hpp" #include "com/sun/star/uri/XExternalUriReferenceTranslator.hpp" #include "cppuhelper/implbase2.hxx" +#include "cppuhelper/supportsservice.hxx" #include "cppuhelper/weak.hxx" #include "osl/thread.h" #include "rtl/string.h" @@ -89,8 +88,7 @@ OUString Translator::getImplementationName() sal_Bool Translator::supportsService(OUString const & serviceName) throw (css::uno::RuntimeException) { - return stoc::uriproc::supportsService( - getSupportedServiceNames(), serviceName); + return cppu::supportsService(this, serviceName); } css::uno::Sequence< OUString > Translator::getSupportedServiceNames() diff --git a/stoc/source/uriproc/UriReferenceFactory.cxx b/stoc/source/uriproc/UriReferenceFactory.cxx index 5088ba1a7e33..13e54533e48c 100644 --- a/stoc/source/uriproc/UriReferenceFactory.cxx +++ b/stoc/source/uriproc/UriReferenceFactory.cxx @@ -42,6 +42,7 @@ #include "com/sun/star/uri/XUriSchemeParser.hpp" #include "cppuhelper/implbase1.hxx" #include "cppuhelper/implbase2.hxx" +#include "cppuhelper/supportsservice.hxx" #include "cppuhelper/weak.hxx" #include "rtl/character.hxx" #include "rtl/ustrbuf.hxx" @@ -50,7 +51,6 @@ #include "UriReference.hxx" #include "stocservices.hxx" -#include "supportsService.hxx" namespace { @@ -320,8 +320,7 @@ OUString Factory::getImplementationName() sal_Bool Factory::supportsService(OUString const & serviceName) throw (css::uno::RuntimeException) { - return stoc::uriproc::supportsService( - getSupportedServiceNames(), serviceName); + return cppu::supportsService(this, serviceName); } css::uno::Sequence< OUString > Factory::getSupportedServiceNames() diff --git a/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTexpand.cxx b/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTexpand.cxx index ee95a0c08344..1b3034e25576 100644 --- a/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTexpand.cxx +++ b/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTexpand.cxx @@ -36,6 +36,7 @@ #include "com/sun/star/util/XMacroExpander.hpp" #include "cppuhelper/implbase1.hxx" #include "cppuhelper/implbase2.hxx" +#include "cppuhelper/supportsservice.hxx" #include "cppuhelper/weak.hxx" #include "rtl/textenc.h" #include "rtl/uri.h" @@ -45,7 +46,6 @@ #include "sal/types.h" #include "UriReference.hxx" -#include "supportsService.hxx" namespace { @@ -192,8 +192,7 @@ OUString Parser::getImplementationName() ::sal_Bool Parser::supportsService(OUString const & serviceName) throw (css::uno::RuntimeException) { - return ::stoc::uriproc::supportsService( - getSupportedServiceNames(), serviceName); + return cppu::supportsService(this, serviceName); } css::uno::Sequence< OUString > Parser::getSupportedServiceNames() diff --git a/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.cxx b/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.cxx index 3351390fb288..3ee11ed5b8bf 100644 --- a/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.cxx +++ b/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTscript.cxx @@ -21,7 +21,6 @@ #include "stocservices.hxx" #include "UriReference.hxx" -#include "supportsService.hxx" #include "com/sun/star/lang/IllegalArgumentException.hpp" #include "com/sun/star/lang/XServiceInfo.hpp" @@ -34,6 +33,7 @@ #include "com/sun/star/uri/XVndSunStarScriptUrlReference.hpp" #include "cppuhelper/implbase1.hxx" #include "cppuhelper/implbase2.hxx" +#include "cppuhelper/supportsservice.hxx" #include "cppuhelper/weak.hxx" #include "osl/mutex.hxx" #include "rtl/uri.hxx" @@ -414,8 +414,7 @@ OUString Parser::getImplementationName() sal_Bool Parser::supportsService(OUString const & serviceName) throw (css::uno::RuntimeException) { - return stoc::uriproc::supportsService( - getSupportedServiceNames(), serviceName); + return cppu::supportsService(this, serviceName); } css::uno::Sequence< OUString > Parser::getSupportedServiceNames() diff --git a/stoc/source/uriproc/VndSunStarPkgUrlReferenceFactory.cxx b/stoc/source/uriproc/VndSunStarPkgUrlReferenceFactory.cxx index 2dd5ac6f472d..88d5883570f8 100644 --- a/stoc/source/uriproc/VndSunStarPkgUrlReferenceFactory.cxx +++ b/stoc/source/uriproc/VndSunStarPkgUrlReferenceFactory.cxx @@ -20,8 +20,6 @@ #include "stocservices.hxx" -#include "supportsService.hxx" - #include "com/sun/star/lang/XServiceInfo.hpp" #include "com/sun/star/uno/Exception.hpp" #include "com/sun/star/uno/Reference.hxx" @@ -34,6 +32,7 @@ #include "com/sun/star/uri/XUriReferenceFactory.hpp" #include "com/sun/star/uri/XVndSunStarPkgUrlReferenceFactory.hpp" #include "cppuhelper/implbase2.hxx" +#include "cppuhelper/supportsservice.hxx" #include "cppuhelper/weak.hxx" #include "rtl/string.h" #include "rtl/textenc.h" @@ -89,8 +88,7 @@ OUString Factory::getImplementationName() sal_Bool Factory::supportsService(OUString const & serviceName) throw (css::uno::RuntimeException) { - return stoc::uriproc::supportsService( - getSupportedServiceNames(), serviceName); + return cppu::supportsService(this, serviceName); } css::uno::Sequence< OUString > Factory::getSupportedServiceNames() diff --git a/stoc/source/uriproc/supportsService.cxx b/stoc/source/uriproc/supportsService.cxx deleted file mode 100644 index b5a835f47c0d..000000000000 --- a/stoc/source/uriproc/supportsService.cxx +++ /dev/null @@ -1,43 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - - -#include "supportsService.hxx" - -#include "com/sun/star/uno/Sequence.hxx" -#include "rtl/ustring.hxx" -#include "sal/types.h" - -namespace stoc { namespace uriproc { - -bool supportsService( - com::sun::star::uno::Sequence< OUString > const & serviceNames, - OUString const & serviceName) -{ - for (sal_Int32 i = 0; i < serviceNames.getLength(); ++i) { - if (serviceNames[i] == serviceName) { - return true; - } - } - return false; -} - -} } - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/stoc/source/uriproc/supportsService.hxx b/stoc/source/uriproc/supportsService.hxx deleted file mode 100644 index ba9383781226..000000000000 --- a/stoc/source/uriproc/supportsService.hxx +++ /dev/null @@ -1,36 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef INCLUDED_stoc_source_uriproc_supportsService_hxx -#define INCLUDED_stoc_source_uriproc_supportsService_hxx - -#include "com/sun/star/uno/Sequence.hxx" - - -namespace stoc { namespace uriproc { - -bool supportsService( - com::sun::star::uno::Sequence< OUString > const & serviceNames, - OUString const & serviceName); - -} } - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |