summaryrefslogtreecommitdiff
path: root/framework/source/fwe
diff options
context:
space:
mode:
authorAlexandre Vicenzi <vicenzi.alexandre@gmail.com>2014-01-31 02:23:12 -0200
committerMarcos Souza <marcos.souza.org@gmail.com>2014-02-02 14:59:51 +0000
commita91de8efc9b99cedb917203e3255d55a514fb8a3 (patch)
tree1b1629098bd2b7d349fd7e0aa6510bc9c5aed374 /framework/source/fwe
parent22d80c90c83fd1f819f6a208b09bedf7117c6611 (diff)
fdo#54938 Convert framework to cppu::supportsService
Change-Id: Id0c7c845d128920ba278de4208f5c32dcf83ecb1 Reviewed-on: https://gerrit.libreoffice.org/7754 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Marcos Souza <marcos.souza.org@gmail.com> Tested-by: Marcos Souza <marcos.souza.org@gmail.com>
Diffstat (limited to 'framework/source/fwe')
-rw-r--r--framework/source/fwe/classes/actiontriggercontainer.cxx12
-rw-r--r--framework/source/fwe/classes/actiontriggerpropertyset.cxx17
-rw-r--r--framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx17
-rw-r--r--framework/source/fwe/classes/rootactiontriggercontainer.cxx17
4 files changed, 12 insertions, 51 deletions
diff --git a/framework/source/fwe/classes/actiontriggercontainer.cxx b/framework/source/fwe/classes/actiontriggercontainer.cxx
index 1d4813597331..9889ed9bbae7 100644
--- a/framework/source/fwe/classes/actiontriggercontainer.cxx
+++ b/framework/source/fwe/classes/actiontriggercontainer.cxx
@@ -18,10 +18,10 @@
*/
#include <classes/actiontriggercontainer.hxx>
-#include <cppuhelper/typeprovider.hxx>
-
#include <classes/actiontriggerpropertyset.hxx>
#include <classes/actiontriggerseparatorpropertyset.hxx>
+#include <cppuhelper/supportsservice.hxx>
+#include <cppuhelper/typeprovider.hxx>
using namespace cppu;
using namespace com::sun::star::uno;
@@ -69,7 +69,6 @@ void ActionTriggerContainer::release() throw()
PropertySetContainer::release();
}
-
// XMultiServiceFactory
Reference< XInterface > SAL_CALL ActionTriggerContainer::createInstance( const OUString& aServiceSpecifier )
throw ( ::com::sun::star::uno::Exception, RuntimeException)
@@ -84,14 +83,12 @@ throw ( ::com::sun::star::uno::Exception, RuntimeException)
throw com::sun::star::uno::RuntimeException("Unknown service specifier!", (OWeakObject *)this );
}
-
Reference< XInterface > SAL_CALL ActionTriggerContainer::createInstanceWithArguments( const OUString& ServiceSpecifier, const Sequence< Any >& /*Arguments*/ )
throw ( Exception, RuntimeException)
{
return createInstance( ServiceSpecifier );
}
-
Sequence< OUString > SAL_CALL ActionTriggerContainer::getAvailableServiceNames()
throw ( RuntimeException )
{
@@ -114,10 +111,7 @@ throw ( RuntimeException )
sal_Bool SAL_CALL ActionTriggerContainer::supportsService( const OUString& ServiceName )
throw ( RuntimeException )
{
- if ( ServiceName.equalsAscii( SERVICENAME_ACTIONTRIGGERCONTAINER ))
- return sal_True;
-
- return sal_False;
+ return cppu::supportsService(this, ServiceName);
}
Sequence< OUString > SAL_CALL ActionTriggerContainer::getSupportedServiceNames()
diff --git a/framework/source/fwe/classes/actiontriggerpropertyset.cxx b/framework/source/fwe/classes/actiontriggerpropertyset.cxx
index 8bbf7f3439ab..228345e4c72a 100644
--- a/framework/source/fwe/classes/actiontriggerpropertyset.cxx
+++ b/framework/source/fwe/classes/actiontriggerpropertyset.cxx
@@ -21,6 +21,7 @@
#include <classes/actiontriggerpropertyset.hxx>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <cppuhelper/proptypehlp.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <cppuhelper/typeprovider.hxx>
#include <vcl/svapp.hxx>
@@ -97,7 +98,6 @@ void SAL_CALL ActionTriggerPropertySet::release() throw ()
OWeakObject::release();
}
-
// XServiceInfo
OUString SAL_CALL ActionTriggerPropertySet::getImplementationName()
throw ( RuntimeException )
@@ -108,10 +108,7 @@ throw ( RuntimeException )
sal_Bool SAL_CALL ActionTriggerPropertySet::supportsService( const OUString& ServiceName )
throw ( RuntimeException )
{
- if ( ServiceName.equalsAscii( SERVICENAME_ACTIONTRIGGER ))
- return sal_True;
-
- return sal_False;
+ return cppu::supportsService(this, ServiceName);
}
Sequence< OUString > SAL_CALL ActionTriggerPropertySet::getSupportedServiceNames()
@@ -182,10 +179,6 @@ Sequence< sal_Int8 > SAL_CALL ActionTriggerPropertySet::getImplementationId() th
return pID->getImplementationId() ;
}
-//---------------------------------------------------------------------------------------------------------
-// OPropertySetHelper implementation
-//---------------------------------------------------------------------------------------------------------
-
sal_Bool SAL_CALL ActionTriggerPropertySet::convertFastPropertyValue(
Any& aConvertedValue,
Any& aOldValue,
@@ -227,7 +220,6 @@ throw( IllegalArgumentException )
return bReturn;
}
-
void SAL_CALL ActionTriggerPropertySet::setFastPropertyValue_NoBroadcast(
sal_Int32 nHandle, const Any& aValue )
throw( Exception )
@@ -357,10 +349,6 @@ const Sequence< Property > ActionTriggerPropertySet::impl_getStaticPropertyDescr
return seqActionTriggerPropertyDescriptor ;
}
-
-//******************************************************************************************************************************
-// private method
-//******************************************************************************************************************************
sal_Bool ActionTriggerPropertySet::impl_tryToChangeProperty(
const OUString& sCurrentValue ,
const Any& aNewValue ,
@@ -396,7 +384,6 @@ throw( IllegalArgumentException )
return bReturn;
}
-
sal_Bool ActionTriggerPropertySet::impl_tryToChangeProperty(
const Reference< XBitmap > aCurrentValue ,
const Any& aNewValue ,
diff --git a/framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx b/framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx
index 9307dc641d91..c234772b8ce3 100644
--- a/framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx
+++ b/framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx
@@ -21,6 +21,7 @@
#include <classes/actiontriggerseparatorpropertyset.hxx>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <cppuhelper/proptypehlp.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <cppuhelper/typeprovider.hxx>
#include <vcl/svapp.hxx>
@@ -48,7 +49,7 @@ namespace framework
ActionTriggerSeparatorPropertySet::ActionTriggerSeparatorPropertySet()
: ThreadHelpBase ( &Application::GetSolarMutex() )
, OBroadcastHelper ( m_aLock.getShareableOslMutex() )
- , OPropertySetHelper ( *(static_cast< OBroadcastHelper * >(this)) )
+ , OPropertySetHelper ( *(static_cast< OBroadcastHelper * >(this)) )
, OWeakObject ( )
, m_nSeparatorType( 0 )
{
@@ -100,10 +101,7 @@ throw ( RuntimeException )
sal_Bool SAL_CALL ActionTriggerSeparatorPropertySet::supportsService( const OUString& ServiceName )
throw ( RuntimeException )
{
- if ( ServiceName.equalsAscii( SERVICENAME_ACTIONTRIGGERSEPARATOR ))
- return sal_True;
-
- return sal_False;
+ return cppu::supportsService(this, ServiceName);
}
Sequence< OUString > SAL_CALL ActionTriggerSeparatorPropertySet::getSupportedServiceNames()
@@ -174,10 +172,6 @@ Sequence< sal_Int8 > SAL_CALL ActionTriggerSeparatorPropertySet::getImplementati
return pID->getImplementationId() ;
}
-//---------------------------------------------------------------------------------------------------------
-// OPropertySetHelper implementation
-//---------------------------------------------------------------------------------------------------------
-
sal_Bool SAL_CALL ActionTriggerSeparatorPropertySet::convertFastPropertyValue(
Any& aConvertedValue,
Any& aOldValue,
@@ -203,7 +197,6 @@ throw( IllegalArgumentException )
return bReturn;
}
-
void SAL_CALL ActionTriggerSeparatorPropertySet::setFastPropertyValue_NoBroadcast(
sal_Int32 nHandle, const Any& aValue )
throw( Exception )
@@ -297,10 +290,6 @@ const Sequence< Property > ActionTriggerSeparatorPropertySet::impl_getStaticProp
return seqActionTriggerPropertyDescriptor ;
}
-
-//******************************************************************************************************************************
-// private method
-//******************************************************************************************************************************
sal_Bool ActionTriggerSeparatorPropertySet::impl_tryToChangeProperty(
sal_Int16 aCurrentValue ,
const Any& aNewValue ,
diff --git a/framework/source/fwe/classes/rootactiontriggercontainer.cxx b/framework/source/fwe/classes/rootactiontriggercontainer.cxx
index b64d2ea39be4..45802e16a0b6 100644
--- a/framework/source/fwe/classes/rootactiontriggercontainer.cxx
+++ b/framework/source/fwe/classes/rootactiontriggercontainer.cxx
@@ -22,12 +22,12 @@
#include <classes/actiontriggercontainer.hxx>
#include <classes/actiontriggerpropertyset.hxx>
#include <classes/actiontriggerseparatorpropertyset.hxx>
+#include <cppuhelper/supportsservice.hxx>
+#include <cppuhelper/typeprovider.hxx>
#include <framework/actiontriggerhelper.hxx>
-#include <threadhelp/resetableguard.hxx>
#include <osl/mutex.hxx>
+#include <threadhelp/resetableguard.hxx>
#include <vcl/svapp.hxx>
-#include <cppuhelper/typeprovider.hxx>
-
using namespace cppu;
using namespace com::sun::star::uno;
@@ -46,7 +46,6 @@ static Sequence< sal_Int8 > impl_getStaticIdentifier()
return seqID ;
}
-
RootActionTriggerContainer::RootActionTriggerContainer( const Menu* pMenu, const OUString* pMenuIdentifier ) :
PropertySetContainer()
, m_bContainerCreated( sal_False )
@@ -123,7 +122,6 @@ throw ( RuntimeException )
return aSeq;
}
-
// XIndexContainer
void SAL_CALL RootActionTriggerContainer::insertByIndex( sal_Int32 Index, const Any& Element )
throw ( IllegalArgumentException, IndexOutOfBoundsException, WrappedTargetException, RuntimeException )
@@ -151,7 +149,6 @@ throw ( IndexOutOfBoundsException, WrappedTargetException, RuntimeException )
PropertySetContainer::removeByIndex( Index );
}
-
// XIndexReplace
void SAL_CALL RootActionTriggerContainer::replaceByIndex( sal_Int32 Index, const Any& Element )
throw ( IllegalArgumentException, IndexOutOfBoundsException, WrappedTargetException, RuntimeException )
@@ -166,7 +163,6 @@ throw ( IllegalArgumentException, IndexOutOfBoundsException, WrappedTargetExcept
PropertySetContainer::replaceByIndex( Index, Element );
}
-
// XIndexAccess
sal_Int32 SAL_CALL RootActionTriggerContainer::getCount()
throw ( RuntimeException )
@@ -200,7 +196,6 @@ throw ( IndexOutOfBoundsException, WrappedTargetException, RuntimeException )
return PropertySetContainer::getByIndex( Index );
}
-
// XElementAccess
Type SAL_CALL RootActionTriggerContainer::getElementType()
throw (::com::sun::star::uno::RuntimeException)
@@ -220,7 +215,6 @@ throw (::com::sun::star::uno::RuntimeException)
return sal_False;
}
-
// XServiceInfo
OUString SAL_CALL RootActionTriggerContainer::getImplementationName()
throw ( RuntimeException )
@@ -231,10 +225,7 @@ throw ( RuntimeException )
sal_Bool SAL_CALL RootActionTriggerContainer::supportsService( const OUString& ServiceName )
throw ( RuntimeException )
{
- if ( ServiceName.equalsAscii( SERVICENAME_ACTIONTRIGGERCONTAINER ))
- return sal_True;
-
- return sal_False;
+ return cppu::supportsService(this, ServiceName);
}
Sequence< OUString > SAL_CALL RootActionTriggerContainer::getSupportedServiceNames()