summaryrefslogtreecommitdiff
path: root/oox/source/core/fasttokenhandler.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'oox/source/core/fasttokenhandler.cxx')
-rw-r--r--oox/source/core/fasttokenhandler.cxx16
1 files changed, 2 insertions, 14 deletions
diff --git a/oox/source/core/fasttokenhandler.cxx b/oox/source/core/fasttokenhandler.cxx
index c71f966b587c..f57739c92d1c 100644
--- a/oox/source/core/fasttokenhandler.cxx
+++ b/oox/source/core/fasttokenhandler.cxx
@@ -22,17 +22,13 @@
#include <com/sun/star/uno/XComponentContext.hpp>
#include "oox/helper/helper.hxx"
#include "oox/token/tokenmap.hxx"
+#include <cppuhelper/supportsservice.hxx>
namespace oox {
namespace core {
-// ============================================================================
-
using namespace ::com::sun::star::uno;
-
-// ============================================================================
-
OUString SAL_CALL FastTokenHandler_getImplementationName()
{
return OUString( "com.sun.star.comp.oox.core.FastTokenHandler" );
@@ -50,8 +46,6 @@ Reference< XInterface > SAL_CALL FastTokenHandler_createInstance( const Referenc
return static_cast< ::cppu::OWeakObject* >( new FastTokenHandler );
}
-// ============================================================================
-
FastTokenHandler::FastTokenHandler() :
mrTokenMap( StaticTokenMap::get() )
{
@@ -62,7 +56,6 @@ FastTokenHandler::~FastTokenHandler()
}
// XServiceInfo
-
OUString SAL_CALL FastTokenHandler::getImplementationName() throw (RuntimeException)
{
return FastTokenHandler_getImplementationName();
@@ -70,11 +63,7 @@ OUString SAL_CALL FastTokenHandler::getImplementationName() throw (RuntimeExcept
sal_Bool SAL_CALL FastTokenHandler::supportsService( const OUString& rServiceName ) throw (RuntimeException)
{
- Sequence< OUString > aServiceNames = FastTokenHandler_getSupportedServiceNames();
- for( sal_Int32 nIndex = 0, nLength = aServiceNames.getLength(); nIndex < nLength; ++nIndex )
- if( aServiceNames[ nIndex ] == rServiceName )
- return sal_True;
- return sal_False;
+ return cppu::supportsService(this, rServiceName);
}
Sequence< OUString > SAL_CALL FastTokenHandler::getSupportedServiceNames() throw (RuntimeException)
@@ -83,7 +72,6 @@ Sequence< OUString > SAL_CALL FastTokenHandler::getSupportedServiceNames() throw
}
// XFastTokenHandler
-
sal_Int32 FastTokenHandler::getToken( const OUString& rIdentifier ) throw( RuntimeException )
{
return mrTokenMap.getTokenFromUnicode( rIdentifier );