summaryrefslogtreecommitdiffstats
path: root/editeng
diff options
context:
space:
mode:
authorAlexandre Vicenzi <vicenzi.alexandre@gmail.com>2014-01-31 04:53:17 -0200
committerMarcos Souza <marcos.souza.org@gmail.com>2014-02-02 17:38:09 +0000
commit93ef9a43a53218bdfbdea2ec20fba73fef08db75 (patch)
tree02536ba1f94b8712372f33be509ad1e68086844c /editeng
parentPrint fair message from CPPUnitTest (diff)
downloadcore-93ef9a43a53218bdfbdea2ec20fba73fef08db75.tar.gz
core-93ef9a43a53218bdfbdea2ec20fba73fef08db75.zip
fdo#54938 Convert bridges, editeng and others to cppu::supportsService
Change-Id: I7ff5189473c3e0831c2f1e95264d1a04f3b716a9 Reviewed-on: https://gerrit.libreoffice.org/7761 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 'editeng')
-rw-r--r--editeng/source/uno/unonrule.cxx13
-rw-r--r--editeng/source/uno/unopracc.cxx34
2 files changed, 7 insertions, 40 deletions
diff --git a/editeng/source/uno/unonrule.cxx b/editeng/source/uno/unonrule.cxx
index 7e12f9737a6b..5a4832d6fcda 100644
--- a/editeng/source/uno/unonrule.cxx
+++ b/editeng/source/uno/unonrule.cxx
@@ -19,7 +19,7 @@
#include <com/sun/star/text/HoriOrientation.hpp>
#include <com/sun/star/awt/XBitmap.hpp>
-
+#include <cppuhelper/supportsservice.hxx>
#include <vcl/svapp.hxx>
#include <osl/mutex.hxx>
#include <vcl/graph.hxx>
@@ -79,10 +79,6 @@ unsigned short ConvertUnoAdjust( SvxAdjust eAdjust )
return aSvxToUnoAdjust[eAdjust];
}
-/******************************************************************
- * SvxUnoNumberingRules
- ******************************************************************/
-
UNO3_GETIMPLEMENTATION_IMPL( SvxUnoNumberingRules );
SvxUnoNumberingRules::SvxUnoNumberingRules( const SvxNumRule& rRule ) throw()
@@ -163,7 +159,7 @@ OUString SAL_CALL SvxUnoNumberingRules::getImplementationName( ) throw(RuntimeE
sal_Bool SAL_CALL SvxUnoNumberingRules::supportsService( const OUString& ServiceName ) throw(RuntimeException)
{
- return ServiceName == pSvxUnoNumberingRulesService;
+ return cppu::supportsService(this, ServiceName);
}
Sequence< OUString > SAL_CALL SvxUnoNumberingRules::getSupportedServiceNames( ) throw(RuntimeException)
@@ -472,8 +468,6 @@ void SvxUnoNumberingRules::setNumberingRuleByIndex( const Sequence< beans::Prope
maRule.SetLevel( (sal_uInt16)nIndex, aFmt );
}
-///////////////////////////////////////////////////////////////////////
-
const SvxNumRule& SvxGetNumRule( Reference< XIndexReplace > xRule ) throw( IllegalArgumentException )
{
SvxUnoNumberingRules* pRule = SvxUnoNumberingRules::getImplementation( xRule );
@@ -497,9 +491,6 @@ com::sun::star::uno::Reference< com::sun::star::container::XIndexReplace > SvxCr
}
}
-
-///////////////////////////////////////////////////////////////////////
-
class SvxUnoNumberingRulesCompare : public ::cppu::WeakAggImplHelper1< XAnyCompare >
{
public:
diff --git a/editeng/source/uno/unopracc.cxx b/editeng/source/uno/unopracc.cxx
index 37600abdfce4..bbd77cdf25a4 100644
--- a/editeng/source/uno/unopracc.cxx
+++ b/editeng/source/uno/unopracc.cxx
@@ -18,36 +18,19 @@
*/
-//------------------------------------------------------------------------
-//
-// Global header
-//
-//------------------------------------------------------------------------
-#include <osl/mutex.hxx>
+#include <cppuhelper/typeprovider.hxx>
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/uno/Reference.hxx>
-#include <cppuhelper/weakref.hxx>
#include <com/sun/star/lang/XComponent.hpp>
-#include <cppuhelper/typeprovider.hxx>
#include <comphelper/servicehelper.hxx>
-
-
-//------------------------------------------------------------------------
-//
-// Project-local header
-//
-//------------------------------------------------------------------------
-
+#include <cppuhelper/supportsservice.hxx>
+#include <cppuhelper/weakref.hxx>
#include <editeng/unopracc.hxx>
#include <editeng/unoedsrc.hxx>
+#include <osl/mutex.hxx>
using namespace ::com::sun::star;
-//------------------------------------------------------------------------
-//
-// SvxAccessibleTextPropertySet implementation
-//
-//------------------------------------------------------------------------
SvxAccessibleTextPropertySet::SvxAccessibleTextPropertySet( const SvxEditSource* pEditSrc, const SvxItemPropertySet* pPropSet )
: SvxUnoTextRangeBase( pEditSrc, pPropSet )
@@ -136,14 +119,7 @@ OUString SAL_CALL SAL_CALL SvxAccessibleTextPropertySet::getImplementationName (
sal_Bool SAL_CALL SvxAccessibleTextPropertySet::supportsService (const OUString& sServiceName) throw (uno::RuntimeException)
{
- // 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 SvxAccessibleTextPropertySet::getSupportedServiceNames (void) throw (uno::RuntimeException)