fdo#54938: Convert some places to use cppu::supportsService
The last cases are non obvious, so it's pratically done Change-Id: Icae1da8e238f516eaed0f7fbdf96fff778eac547 Reviewed-on: https://gerrit.libreoffice.org/8445 Reviewed-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com> Tested-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
This commit is contained in:
@@ -19,11 +19,12 @@
|
||||
#ifndef INCLUDED_CHART2_SOURCE_MODEL_MAIN_PAGEBACKGROUND_HXX
|
||||
#define INCLUDED_CHART2_SOURCE_MODEL_MAIN_PAGEBACKGROUND_HXX
|
||||
|
||||
#include <com/sun/star/lang/XServiceInfo.hpp>
|
||||
#include <com/sun/star/uno/XComponentContext.hpp>
|
||||
#include <com/sun/star/util/XCloneable.hpp>
|
||||
#include "MutexContainer.hxx"
|
||||
#include "OPropertySet.hxx"
|
||||
#include <cppuhelper/implbase3.hxx>
|
||||
#include <cppuhelper/implbase4.hxx>
|
||||
|
||||
#include "ServiceMacros.hxx"
|
||||
#include "ModifyListenerHelper.hxx"
|
||||
@@ -34,10 +35,11 @@ namespace chart
|
||||
|
||||
namespace impl
|
||||
{
|
||||
typedef ::cppu::WeakImplHelper3<
|
||||
typedef ::cppu::WeakImplHelper4<
|
||||
::com::sun::star::util::XCloneable,
|
||||
::com::sun::star::util::XModifyBroadcaster,
|
||||
::com::sun::star::util::XModifyListener >
|
||||
::com::sun::star::util::XModifyListener,
|
||||
::com::sun::star::lang::XServiceInfo >
|
||||
PageBackground_Base;
|
||||
}
|
||||
|
||||
|
@@ -29,6 +29,7 @@
|
||||
#include <unotools/accessiblerelationsethelper.hxx>
|
||||
#include <comphelper/accessibleeventnotifier.hxx>
|
||||
#include <comphelper/servicehelper.hxx>
|
||||
#include <cppuhelper/supportsservice.hxx>
|
||||
#include <osl/mutex.hxx>
|
||||
|
||||
#include <utility>
|
||||
@@ -465,11 +466,7 @@ void SAL_CALL AccessibleContextBase::removeAccessibleEventListener (
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//===== XServiceInfo ========================================================
|
||||
|
||||
OUString SAL_CALL AccessibleContextBase::getImplementationName (void)
|
||||
throw (::com::sun::star::uno::RuntimeException, std::exception)
|
||||
{
|
||||
@@ -477,27 +474,12 @@ OUString SAL_CALL AccessibleContextBase::getImplementationName (void)
|
||||
return OUString("AccessibleContextBase");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
sal_Bool SAL_CALL
|
||||
AccessibleContextBase::supportsService (const OUString& sServiceName)
|
||||
sal_Bool SAL_CALL AccessibleContextBase::supportsService (const OUString& sServiceName)
|
||||
throw (::com::sun::star::uno::RuntimeException, std::exception)
|
||||
{
|
||||
ThrowIfDisposed ();
|
||||
// Iterate over all supported service names and return true if on of them
|
||||
// matches the given name.
|
||||
uno::Sequence< OUString > aSupportedServices (
|
||||
getSupportedServiceNames ());
|
||||
for (int i=0; i<aSupportedServices.getLength(); i++)
|
||||
if (sServiceName == aSupportedServices[i])
|
||||
return sal_True;
|
||||
return sal_False;
|
||||
return cppu::supportsService(this, sServiceName);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
uno::Sequence< OUString > SAL_CALL
|
||||
AccessibleContextBase::getSupportedServiceNames (void)
|
||||
throw (::com::sun::star::uno::RuntimeException, std::exception)
|
||||
|
@@ -18,7 +18,6 @@
|
||||
*/
|
||||
|
||||
#include <vcl/waitobj.hxx>
|
||||
#include <cppuhelper/interfacecontainer.hxx>
|
||||
#include <com/sun/star/util/URL.hpp>
|
||||
#include <vcl/msgbox.hxx>
|
||||
#include <tools/debug.hxx>
|
||||
@@ -46,6 +45,8 @@
|
||||
#include <com/sun/star/sdb/RowChangeAction.hpp>
|
||||
#include <com/sun/star/frame/CommandGroup.hpp>
|
||||
#include <com/sun/star/datatransfer/clipboard/XClipboard.hpp>
|
||||
#include <cppuhelper/interfacecontainer.hxx>
|
||||
#include <cppuhelper/supportsservice.hxx>
|
||||
#include <sot/exchange.hxx>
|
||||
#include <sot/formats.hxx>
|
||||
#include <vcl/edit.hxx>
|
||||
@@ -208,7 +209,7 @@ OUString SAL_CALL BibFrameController_Impl::getImplementationName() throw (::com:
|
||||
|
||||
sal_Bool SAL_CALL BibFrameController_Impl::supportsService( const OUString& sServiceName ) throw (::com::sun::star::uno::RuntimeException, std::exception)
|
||||
{
|
||||
return ( sServiceName == "com.sun.star.frame.Bibliography" || sServiceName == "com.sun.star.frame.Controller" );
|
||||
return cppu::supportsService( this, sServiceName );
|
||||
}
|
||||
|
||||
::com::sun::star::uno::Sequence< OUString > SAL_CALL BibFrameController_Impl::getSupportedServiceNames() throw (::com::sun::star::uno::RuntimeException, std::exception)
|
||||
|
@@ -57,6 +57,8 @@
|
||||
#include "com/sun/star/container/XIndexAccess.hpp"
|
||||
#include "com/sun/star/loader/XImplementationLoader.hpp"
|
||||
|
||||
#include <cppuhelper/supportsservice.hxx>
|
||||
|
||||
PluginManager* PluginManager::pManager = NULL;
|
||||
|
||||
PluginManager& PluginManager::get()
|
||||
@@ -115,12 +117,7 @@ OUString XPluginManager_Impl::getImplementationName() throw( )
|
||||
// ::com::sun::star::lang::XServiceInfo
|
||||
sal_Bool XPluginManager_Impl::supportsService(const OUString& ServiceName) throw( )
|
||||
{
|
||||
Sequence< OUString > aSNL = getSupportedServiceNames();
|
||||
const OUString * pArray = aSNL.getConstArray();
|
||||
for( sal_Int32 i = 0; i < aSNL.getLength(); i++ )
|
||||
if( pArray[i] == ServiceName )
|
||||
return sal_True;
|
||||
return sal_False;
|
||||
return cppu::supportsService(this, ServiceName);
|
||||
}
|
||||
|
||||
// ::com::sun::star::lang::XServiceInfo
|
||||
|
@@ -288,7 +288,8 @@ public:
|
||||
};
|
||||
|
||||
class XPluginManager_Impl :
|
||||
public cppu::WeakAggImplHelper1< com::sun::star::plugin::XPluginManager >
|
||||
public cppu::WeakAggImplHelper2< com::sun::star::plugin::XPluginManager,
|
||||
com::sun::star::lang::XServiceInfo >
|
||||
{
|
||||
Reference< com::sun::star::uno::XComponentContext > m_xContext;
|
||||
public:
|
||||
|
@@ -18,6 +18,7 @@
|
||||
*/
|
||||
|
||||
#include <cppuhelper/implbase1.hxx>
|
||||
#include <cppuhelper/supportsservice.hxx>
|
||||
#include <comphelper/processfactory.hxx>
|
||||
#include <framework/menuconfiguration.hxx>
|
||||
#include <rtl/ref.hxx>
|
||||
@@ -46,7 +47,11 @@ using namespace framework;
|
||||
|
||||
namespace {
|
||||
|
||||
class PopupMenuToolbarController : public svt::ToolboxController
|
||||
typedef cppu::ImplInheritanceHelper1< svt::ToolboxController,
|
||||
css::lang::XServiceInfo >
|
||||
ToolBarBase;
|
||||
|
||||
class PopupMenuToolbarController : public ToolBarBase
|
||||
{
|
||||
public:
|
||||
virtual ~PopupMenuToolbarController();
|
||||
@@ -80,8 +85,7 @@ private:
|
||||
PopupMenuToolbarController::PopupMenuToolbarController(
|
||||
const css::uno::Reference< css::uno::XComponentContext >& xContext,
|
||||
const OUString &rPopupCommand )
|
||||
: svt::ToolboxController()
|
||||
, m_xContext( xContext )
|
||||
: m_xContext( xContext )
|
||||
, m_bHasController( sal_False )
|
||||
, m_aPopupCommand( rPopupCommand )
|
||||
{
|
||||
@@ -249,14 +253,11 @@ public:
|
||||
WizardsToolbarController( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
|
||||
|
||||
// XServiceInfo
|
||||
OUString SAL_CALL getImplementationName()
|
||||
throw (css::uno::RuntimeException);
|
||||
virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException);
|
||||
|
||||
sal_Bool SAL_CALL supportsService(OUString const & rServiceName)
|
||||
throw (css::uno::RuntimeException);
|
||||
virtual sal_Bool SAL_CALL supportsService(OUString const & rServiceName) throw (css::uno::RuntimeException);
|
||||
|
||||
css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
|
||||
throw (css::uno::RuntimeException);
|
||||
virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException);
|
||||
|
||||
private:
|
||||
sal_uInt16 getDropDownStyle() const;
|
||||
@@ -277,7 +278,7 @@ OUString WizardsToolbarController::getImplementationName()
|
||||
sal_Bool WizardsToolbarController::supportsService(OUString const & rServiceName)
|
||||
throw (css::uno::RuntimeException)
|
||||
{
|
||||
return rServiceName == "com.sun.star.frame.ToolbarController";
|
||||
return cppu::supportsService( this, rServiceName );
|
||||
}
|
||||
|
||||
css::uno::Sequence<OUString> WizardsToolbarController::getSupportedServiceNames()
|
||||
@@ -300,14 +301,11 @@ public:
|
||||
OpenToolbarController( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
|
||||
|
||||
// XServiceInfo
|
||||
OUString SAL_CALL getImplementationName()
|
||||
throw (css::uno::RuntimeException);
|
||||
virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException);
|
||||
|
||||
sal_Bool SAL_CALL supportsService(OUString const & rServiceName)
|
||||
throw (css::uno::RuntimeException);
|
||||
virtual sal_Bool SAL_CALL supportsService(OUString const & rServiceName) throw (css::uno::RuntimeException);
|
||||
|
||||
css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
|
||||
throw (css::uno::RuntimeException);
|
||||
virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException);
|
||||
};
|
||||
|
||||
OpenToolbarController::OpenToolbarController(
|
||||
@@ -325,7 +323,7 @@ OUString OpenToolbarController::getImplementationName()
|
||||
sal_Bool OpenToolbarController::supportsService(OUString const & rServiceName)
|
||||
throw (css::uno::RuntimeException)
|
||||
{
|
||||
return rServiceName == "com.sun.star.frame.ToolbarController";
|
||||
return cppu::supportsService( this, rServiceName );
|
||||
}
|
||||
|
||||
css::uno::Sequence<OUString> OpenToolbarController::getSupportedServiceNames()
|
||||
@@ -346,8 +344,7 @@ public:
|
||||
OUString SAL_CALL getImplementationName()
|
||||
throw (css::uno::RuntimeException);
|
||||
|
||||
sal_Bool SAL_CALL supportsService(OUString const & rServiceName)
|
||||
throw (css::uno::RuntimeException);
|
||||
virtual sal_Bool SAL_CALL supportsService(OUString const & rServiceName) throw (css::uno::RuntimeException);
|
||||
|
||||
css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
|
||||
throw (css::uno::RuntimeException);
|
||||
@@ -378,7 +375,7 @@ OUString NewToolbarController::getImplementationName()
|
||||
sal_Bool NewToolbarController::supportsService(OUString const & rServiceName)
|
||||
throw (css::uno::RuntimeException)
|
||||
{
|
||||
return rServiceName == "com.sun.star.frame.ToolbarController";
|
||||
return cppu::supportsService( this, rServiceName );
|
||||
}
|
||||
|
||||
css::uno::Sequence<OUString> NewToolbarController::getSupportedServiceNames()
|
||||
|
@@ -24,6 +24,7 @@
|
||||
#include <cppuhelper/queryinterface.hxx>
|
||||
#include <cppuhelper/factory.hxx>
|
||||
#include <cppuhelper/weakref.hxx>
|
||||
#include <cppuhelper/supportsservice.hxx>
|
||||
#include <cppuhelper/typeprovider.hxx>
|
||||
|
||||
#include <osl/mutex.hxx>
|
||||
@@ -625,16 +626,7 @@ sal_Bool SAL_CALL \
|
||||
Class::supportsService( const OUString& ServiceName ) \
|
||||
throw( com::sun::star::uno::RuntimeException, std::exception ) \
|
||||
{ \
|
||||
com::sun::star::uno::Sequence< OUString > aSNL = \
|
||||
getSupportedServiceNames(); \
|
||||
const OUString* pArray = aSNL.getArray(); \
|
||||
for( sal_Int32 i = 0; i < aSNL.getLength(); i++ ) \
|
||||
{ \
|
||||
if( pArray[ i ] == ServiceName ) \
|
||||
return sal_True; \
|
||||
} \
|
||||
\
|
||||
return sal_False; \
|
||||
return cppu::supportsService( this, ServiceName ); \
|
||||
} \
|
||||
\
|
||||
com::sun::star::uno::Sequence< OUString > SAL_CALL \
|
||||
|
@@ -108,11 +108,9 @@ OUString SAL_CALL MysqlCDriver::getImplementationName()
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ MysqlCDriver::supportsService() -I- */
|
||||
sal_Bool SAL_CALL MysqlCDriver::supportsService(const OUString& _rServiceName)
|
||||
throw(RuntimeException, std::exception)
|
||||
{
|
||||
OSL_TRACE("MysqlCDriver::supportsService");
|
||||
return cppu::supportsService(this, _rServiceName);
|
||||
}
|
||||
/* }}} */
|
||||
|
@@ -70,11 +70,9 @@ Sequence< OUString > SAL_CALL OResultSet::getSupportedServiceNames()
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ OResultSet::supportsService() -I- */
|
||||
sal_Bool SAL_CALL OResultSet::supportsService(const OUString& _rServiceName)
|
||||
throw(RuntimeException, std::exception)
|
||||
{
|
||||
OSL_TRACE("OResultSet::supportsService");
|
||||
return cppu::supportsService(this, _rServiceName);
|
||||
}
|
||||
/* }}} */
|
||||
|
@@ -157,7 +157,6 @@ uno::Sequence< OUString > SAL_CALL OShape::getSupportedServiceNames( ) throw(un
|
||||
|
||||
sal_Bool SAL_CALL OShape::supportsService(const OUString& ServiceName) throw( uno::RuntimeException, std::exception )
|
||||
{
|
||||
|
||||
return cppu::supportsService(this, ServiceName);
|
||||
}
|
||||
|
||||
|
@@ -35,6 +35,7 @@
|
||||
#include <rtl/math.hxx>
|
||||
#include <rtl/ustrbuf.hxx>
|
||||
#include <cppuhelper/factory.hxx>
|
||||
#include <cppuhelper/supportsservice.hxx>
|
||||
#include <vector>
|
||||
#include <unordered_map>
|
||||
|
||||
@@ -577,8 +578,6 @@ void SAL_CALL SolverComponent::solve() throw(uno::RuntimeException, std::excepti
|
||||
CoinUnloadProblem( hProb );
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
// XServiceInfo
|
||||
|
||||
uno::Sequence< OUString > SolverComponent_getSupportedServiceNames()
|
||||
@@ -600,10 +599,7 @@ OUString SAL_CALL SolverComponent::getImplementationName() throw(uno::RuntimeExc
|
||||
|
||||
sal_Bool SAL_CALL SolverComponent::supportsService( const OUString& rServiceName ) throw(uno::RuntimeException, std::exception)
|
||||
{
|
||||
const uno::Sequence< OUString > aServices = SolverComponent_getSupportedServiceNames();
|
||||
const OUString* pArray = aServices.getConstArray();
|
||||
const OUString* pArrayEnd = pArray + aServices.getLength();
|
||||
return ::std::find( pArray, pArrayEnd, rServiceName ) != pArrayEnd;
|
||||
return cppu::supportsService( this, rServiceName );
|
||||
}
|
||||
|
||||
uno::Sequence<OUString> SAL_CALL SolverComponent::getSupportedServiceNames() throw(uno::RuntimeException, std::exception)
|
||||
@@ -617,8 +613,6 @@ uno::Reference<uno::XInterface> SolverComponent_createInstance( const uno::Refer
|
||||
return (cppu::OWeakObject*) new SolverComponent( rSMgr );
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
extern "C"
|
||||
{
|
||||
SAL_DLLPUBLIC_EXPORT void* SAL_CALL solver_component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ )
|
||||
|
@@ -21,6 +21,7 @@
|
||||
|
||||
#include <com/sun/star/uri/XVndSunStarScriptUrl.hpp>
|
||||
#include <com/sun/star/uri/UriReferenceFactory.hpp>
|
||||
#include <cppuhelper/supportsservice.hxx>
|
||||
#include <rtl/ustrbuf.hxx>
|
||||
#include "URIHelper.hxx"
|
||||
|
||||
@@ -272,14 +273,7 @@ sal_Bool SAL_CALL
|
||||
ScriptingFrameworkURIHelper::supportsService( const OUString& serviceName )
|
||||
throw( uno::RuntimeException, std::exception )
|
||||
{
|
||||
OUString m_sServiceName(
|
||||
"com.sun.star.script.provider.ScriptURIHelper" );
|
||||
|
||||
if ( serviceName.equals( m_sServiceName ) )
|
||||
{
|
||||
return sal_True;
|
||||
}
|
||||
return sal_False;
|
||||
return cppu::supportsService( this, serviceName );
|
||||
}
|
||||
|
||||
uno::Sequence< OUString > SAL_CALL
|
||||
|
@@ -4071,7 +4071,7 @@ uno::Sequence< OUString > SAL_CALL SvxShapeText::getSupportedServiceNames() thro
|
||||
|
||||
sal_Bool SAL_CALL SvxShapeText::supportsService( const OUString& ServiceName ) throw ( uno::RuntimeException, std::exception )
|
||||
{
|
||||
return SvxShape::supportsService(ServiceName);
|
||||
return cppu::supportsService(static_cast<SvxShape*>(this), ServiceName);
|
||||
}
|
||||
|
||||
// XTypeProvider
|
||||
|
@@ -34,6 +34,7 @@
|
||||
#include <com/sun/star/beans/PropertySetInfoChange.hpp>
|
||||
#include <com/sun/star/ucb/ContentAction.hpp>
|
||||
#include <com/sun/star/ucb/NameClash.hpp>
|
||||
#include <cppuhelper/supportsservice.hxx>
|
||||
#include "filglob.hxx"
|
||||
#include "filid.hxx"
|
||||
#include "filrow.hxx"
|
||||
@@ -251,12 +252,7 @@ BaseContent::dispose()
|
||||
delete pPropertySetInfoChangeListeners;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// XServiceInfo
|
||||
|
||||
|
||||
OUString SAL_CALL
|
||||
BaseContent::getImplementationName()
|
||||
throw( RuntimeException, std::exception)
|
||||
@@ -264,20 +260,13 @@ BaseContent::getImplementationName()
|
||||
return OUString("com.sun.star.comp.ucb.FileContent");
|
||||
}
|
||||
|
||||
|
||||
|
||||
sal_Bool SAL_CALL
|
||||
BaseContent::supportsService( const OUString& ServiceName )
|
||||
throw( RuntimeException, std::exception)
|
||||
{
|
||||
if ( ServiceName == "com.sun.star.ucb.FileContent" )
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
return cppu::supportsService( this, ServiceName );
|
||||
}
|
||||
|
||||
|
||||
|
||||
Sequence< OUString > SAL_CALL
|
||||
BaseContent::getSupportedServiceNames()
|
||||
throw( RuntimeException, std::exception )
|
||||
@@ -287,12 +276,7 @@ BaseContent::getSupportedServiceNames()
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// XTypeProvider
|
||||
|
||||
|
||||
XTYPEPROVIDER_IMPL_10( BaseContent,
|
||||
lang::XComponent,
|
||||
lang::XTypeProvider,
|
||||
|
@@ -21,10 +21,11 @@
|
||||
#include <osl/file.hxx>
|
||||
#include <osl/socket.h>
|
||||
#include <comphelper/processfactory.hxx>
|
||||
#include <cppuhelper/factory.hxx>
|
||||
#include <com/sun/star/beans/PropertyAttribute.hpp>
|
||||
#include <com/sun/star/ucb/FileSystemNotation.hpp>
|
||||
#include <com/sun/star/beans/PropertyState.hpp>
|
||||
#include <cppuhelper/factory.hxx>
|
||||
#include <cppuhelper/supportsservice.hxx>
|
||||
#include "filglob.hxx"
|
||||
#include "filid.hxx"
|
||||
#include "shell.hxx"
|
||||
@@ -183,7 +184,6 @@ XTYPEPROVIDER_IMPL_7( FileProvider,
|
||||
|
||||
|
||||
// XServiceInfo methods.
|
||||
|
||||
OUString SAL_CALL
|
||||
FileProvider::getImplementationName()
|
||||
throw( RuntimeException, std::exception )
|
||||
@@ -191,16 +191,12 @@ FileProvider::getImplementationName()
|
||||
return fileaccess::shell::getImplementationName_static();
|
||||
}
|
||||
|
||||
|
||||
sal_Bool SAL_CALL
|
||||
FileProvider::supportsService(
|
||||
const OUString& ServiceName )
|
||||
sal_Bool SAL_CALL FileProvider::supportsService(const OUString& ServiceName )
|
||||
throw( RuntimeException, std::exception )
|
||||
{
|
||||
return ServiceName == "com.sun.star.ucb.FileContentProvider";
|
||||
return cppu::supportsService(this, ServiceName);
|
||||
}
|
||||
|
||||
|
||||
Sequence< OUString > SAL_CALL
|
||||
FileProvider::getSupportedServiceNames(
|
||||
void )
|
||||
@@ -209,8 +205,6 @@ FileProvider::getSupportedServiceNames(
|
||||
return fileaccess::shell::getSupportedServiceNames_static();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference< XSingleServiceFactory > SAL_CALL
|
||||
FileProvider::createServiceFactory(
|
||||
const Reference< XMultiServiceFactory >& rxServiceMgr )
|
||||
|
@@ -21,6 +21,7 @@
|
||||
#include <com/sun/star/container/XHierarchicalNameAccess.hpp>
|
||||
#include <com/sun/star/beans/PropertyValue.hpp>
|
||||
#include <comphelper/processfactory.hxx>
|
||||
#include <cppuhelper/supportsservice.hxx>
|
||||
#include "tvfactory.hxx"
|
||||
#include "tvread.hxx"
|
||||
|
||||
@@ -87,14 +88,10 @@ TVFactory::getImplementationName()
|
||||
return TVFactory::getImplementationName_static();
|
||||
}
|
||||
|
||||
sal_Bool SAL_CALL
|
||||
TVFactory::supportsService(
|
||||
const OUString& ServiceName )
|
||||
sal_Bool SAL_CALL TVFactory::supportsService( const OUString& ServiceName )
|
||||
throw( RuntimeException, std::exception )
|
||||
{
|
||||
return
|
||||
ServiceName.equalsAscii( "com.sun.star.help.TreeView" ) ||
|
||||
ServiceName.equalsAscii( "com.sun.star.ucb.HiearchyDataSource" );
|
||||
return cppu::supportsService( this, ServiceName );
|
||||
}
|
||||
|
||||
Sequence< OUString > SAL_CALL
|
||||
|
@@ -18,6 +18,7 @@
|
||||
*/
|
||||
|
||||
#include <certificatecontainer.hxx>
|
||||
#include <cppuhelper/supportsservice.hxx>
|
||||
|
||||
#include <sal/config.h>
|
||||
|
||||
@@ -96,10 +97,7 @@ sal_Bool SAL_CALL
|
||||
CertificateContainer::supportsService( const OUString& ServiceName )
|
||||
throw(::com::sun::star::uno::RuntimeException, std::exception)
|
||||
{
|
||||
if ( ServiceName.equalsAscii("com.sun.star.security.CertificateContainer") )
|
||||
return sal_True;
|
||||
else
|
||||
return sal_False;
|
||||
return cppu::supportsService( this, ServiceName );
|
||||
}
|
||||
|
||||
Sequence< OUString > SAL_CALL
|
||||
|
@@ -27,6 +27,7 @@
|
||||
#include "com/sun/star/xml/crypto/SecurityEnvironment.hpp"
|
||||
#include "com/sun/star/xml/crypto/XMLSecurityContext.hpp"
|
||||
#include "comphelper/processfactory.hxx"
|
||||
#include <cppuhelper/supportsservice.hxx>
|
||||
|
||||
namespace cssu = com::sun::star::uno;
|
||||
namespace cssl = com::sun::star::lang;
|
||||
@@ -152,12 +153,6 @@ OUString SEInitializer_MSCryptImpl_getImplementationName()
|
||||
return OUString( "com.sun.star.xml.security.bridge.xmlsec.SEInitializer_MSCryptImpl" );
|
||||
}
|
||||
|
||||
sal_Bool SAL_CALL SEInitializer_MSCryptImpl_supportsService( const OUString& rServiceName )
|
||||
throw (cssu::RuntimeException)
|
||||
{
|
||||
return rServiceName == "com.sun.star.xml.crypto.SEInitializer";
|
||||
}
|
||||
|
||||
cssu::Sequence< OUString > SAL_CALL SEInitializer_MSCryptImpl_getSupportedServiceNames()
|
||||
throw (cssu::RuntimeException)
|
||||
{
|
||||
@@ -183,7 +178,7 @@ OUString SAL_CALL SEInitializer_MSCryptImpl::getImplementationName()
|
||||
sal_Bool SAL_CALL SEInitializer_MSCryptImpl::supportsService( const OUString& rServiceName )
|
||||
throw (cssu::RuntimeException)
|
||||
{
|
||||
return SEInitializer_MSCryptImpl_supportsService( rServiceName );
|
||||
return cppu::supportsService( this, rServiceName );
|
||||
}
|
||||
|
||||
cssu::Sequence< OUString > SAL_CALL SEInitializer_MSCryptImpl::getSupportedServiceNames()
|
||||
|
@@ -34,6 +34,7 @@
|
||||
#include <osl/thread.h>
|
||||
#include <com/sun/star/xml/crypto/SecurityEnvironment.hpp>
|
||||
#include <com/sun/star/xml/crypto/XMLSecurityContext.hpp>
|
||||
#include <cppuhelper/supportsservice.hxx>
|
||||
|
||||
#include "seinitializer_nssimpl.hxx"
|
||||
#include "securityenvironment_nssimpl.hxx"
|
||||
@@ -51,7 +52,6 @@ namespace cssxc = css::xml::crypto;
|
||||
|
||||
using namespace com::sun::star;
|
||||
|
||||
#define SE_SERVICE_NAME "com.sun.star.xml.crypto.SEInitializer"
|
||||
|
||||
SEInitializer_NssImpl::SEInitializer_NssImpl( const css::uno::Reference< css::uno::XComponentContext > &rxContext )
|
||||
{
|
||||
@@ -117,18 +117,12 @@ OUString SEInitializer_NssImpl_getImplementationName ()
|
||||
return OUString ("com.sun.star.xml.security.bridge.xmlsec.SEInitializer_NssImpl" );
|
||||
}
|
||||
|
||||
sal_Bool SAL_CALL SEInitializer_NssImpl_supportsService( const OUString& ServiceName )
|
||||
throw (uno::RuntimeException)
|
||||
{
|
||||
return ( ServiceName == SE_SERVICE_NAME || ServiceName == NSS_SERVICE_NAME );
|
||||
}
|
||||
|
||||
uno::Sequence< OUString > SAL_CALL SEInitializer_NssImpl_getSupportedServiceNames( )
|
||||
throw (uno::RuntimeException)
|
||||
{
|
||||
uno::Sequence < OUString > aRet(2);
|
||||
OUString* pArray = aRet.getArray();
|
||||
pArray[0] = OUString ( SE_SERVICE_NAME );
|
||||
pArray[0] = "com.sun.star.xml.crypto.SEInitializer";
|
||||
pArray[1] = OUString ( NSS_SERVICE_NAME );
|
||||
return aRet;
|
||||
}
|
||||
@@ -148,7 +142,7 @@ OUString SAL_CALL SEInitializer_NssImpl::getImplementationName( )
|
||||
sal_Bool SAL_CALL SEInitializer_NssImpl::supportsService( const OUString& rServiceName )
|
||||
throw (uno::RuntimeException, std::exception)
|
||||
{
|
||||
return SEInitializer_NssImpl_supportsService( rServiceName );
|
||||
return cppu::supportsService( this, rServiceName );
|
||||
}
|
||||
uno::Sequence< OUString > SAL_CALL SEInitializer_NssImpl::getSupportedServiceNames( )
|
||||
throw (uno::RuntimeException, std::exception)
|
||||
|
@@ -17,7 +17,7 @@
|
||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||
*/
|
||||
|
||||
|
||||
#include <cppuhelper/supportsservice.hxx>
|
||||
#include "xmldocumentwrapper_xmlsecimpl.hxx"
|
||||
|
||||
#include <xmloff/attrlist.hxx>
|
||||
@@ -43,7 +43,6 @@ namespace cssxcsax = com::sun::star::xml::csax;
|
||||
namespace cssxs = com::sun::star::xml::sax;
|
||||
namespace cssxw = com::sun::star::xml::wrapper;
|
||||
|
||||
#define SERVICE_NAME "com.sun.star.xml.wrapper.XMLDocumentWrapper"
|
||||
#define IMPLEMENTATION_NAME "com.sun.star.xml.security.bridge.xmlsec.XMLDocumentWrapper_XmlSecImpl"
|
||||
|
||||
#define STRXMLNS "xmlns"
|
||||
@@ -1061,21 +1060,14 @@ OUString XMLDocumentWrapper_XmlSecImpl_getImplementationName ()
|
||||
return OUString ( IMPLEMENTATION_NAME );
|
||||
}
|
||||
|
||||
sal_Bool SAL_CALL XMLDocumentWrapper_XmlSecImpl_supportsService( const OUString& ServiceName )
|
||||
throw (cssu::RuntimeException)
|
||||
{
|
||||
return ServiceName == SERVICE_NAME;
|
||||
}
|
||||
|
||||
cssu::Sequence< OUString > SAL_CALL XMLDocumentWrapper_XmlSecImpl_getSupportedServiceNames( )
|
||||
throw (cssu::RuntimeException)
|
||||
{
|
||||
cssu::Sequence < OUString > aRet(1);
|
||||
OUString* pArray = aRet.getArray();
|
||||
pArray[0] = OUString ( SERVICE_NAME );
|
||||
pArray[0] = "com.sun.star.xml.wrapper.XMLDocumentWrapper";
|
||||
return aRet;
|
||||
}
|
||||
#undef SERVICE_NAME
|
||||
|
||||
cssu::Reference< cssu::XInterface > SAL_CALL XMLDocumentWrapper_XmlSecImpl_createInstance(
|
||||
const cssu::Reference< cssu::XComponentContext > &)
|
||||
@@ -1093,7 +1085,7 @@ OUString SAL_CALL XMLDocumentWrapper_XmlSecImpl::getImplementationName( )
|
||||
sal_Bool SAL_CALL XMLDocumentWrapper_XmlSecImpl::supportsService( const OUString& rServiceName )
|
||||
throw (cssu::RuntimeException, std::exception)
|
||||
{
|
||||
return XMLDocumentWrapper_XmlSecImpl_supportsService( rServiceName );
|
||||
return cppu::supportsService( this, rServiceName );
|
||||
}
|
||||
cssu::Sequence< OUString > SAL_CALL XMLDocumentWrapper_XmlSecImpl::getSupportedServiceNames( )
|
||||
throw (cssu::RuntimeException, std::exception)
|
||||
|
@@ -20,11 +20,11 @@
|
||||
#include <string.h>
|
||||
|
||||
#include "xmlelementwrapper_xmlsecimpl.hxx"
|
||||
#include <cppuhelper/supportsservice.hxx>
|
||||
#include <cppuhelper/typeprovider.hxx>
|
||||
|
||||
namespace cssu = com::sun::star::uno;
|
||||
|
||||
#define SERVICE_NAME "com.sun.star.xml.wrapper.XMLElementWrapper"
|
||||
#define IMPLEMENTATION_NAME "com.sun.star.xml.security.bridge.xmlsec.XMLElementWrapper_XmlSecImpl"
|
||||
|
||||
XMLElementWrapper_XmlSecImpl::XMLElementWrapper_XmlSecImpl(const xmlNodePtr pNode)
|
||||
@@ -76,21 +76,14 @@ OUString XMLElementWrapper_XmlSecImpl_getImplementationName ()
|
||||
return OUString ( IMPLEMENTATION_NAME );
|
||||
}
|
||||
|
||||
sal_Bool SAL_CALL XMLElementWrapper_XmlSecImpl_supportsService( const OUString& ServiceName )
|
||||
throw (cssu::RuntimeException)
|
||||
{
|
||||
return ServiceName == SERVICE_NAME;
|
||||
}
|
||||
|
||||
cssu::Sequence< OUString > SAL_CALL XMLElementWrapper_XmlSecImpl_getSupportedServiceNames( )
|
||||
throw (cssu::RuntimeException)
|
||||
{
|
||||
cssu::Sequence < OUString > aRet(1);
|
||||
OUString* pArray = aRet.getArray();
|
||||
pArray[0] = OUString ( SERVICE_NAME );
|
||||
pArray[0] = "com.sun.star.xml.wrapper.XMLElementWrapper";
|
||||
return aRet;
|
||||
}
|
||||
#undef SERVICE_NAME
|
||||
|
||||
cssu::Reference< cssu::XInterface > SAL_CALL
|
||||
XMLElementWrapper_XmlSecImpl_createInstance(
|
||||
@@ -109,7 +102,7 @@ OUString SAL_CALL XMLElementWrapper_XmlSecImpl::getImplementationName( )
|
||||
sal_Bool SAL_CALL XMLElementWrapper_XmlSecImpl::supportsService( const OUString& rServiceName )
|
||||
throw (cssu::RuntimeException, std::exception)
|
||||
{
|
||||
return XMLElementWrapper_XmlSecImpl_supportsService( rServiceName );
|
||||
return cppu::supportsService( this, rServiceName );
|
||||
}
|
||||
cssu::Sequence< OUString > SAL_CALL XMLElementWrapper_XmlSecImpl::getSupportedServiceNames( )
|
||||
throw (cssu::RuntimeException, std::exception)
|
||||
|
Reference in New Issue
Block a user