summaryrefslogtreecommitdiff
path: root/vcl/source/components/dtranscomp.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-10-25 11:24:19 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-10-26 06:49:31 +0000
commitfe1f1247fad782bdf43322532fdeb1ba9f03135a (patch)
treec8dfc79901c98bb69c3dd5e2a8ea5ab8cbbe6360 /vcl/source/components/dtranscomp.cxx
parent9c34797cc98030614b384b6ea0f233d59ae82253 (diff)
loplugin:expandablemethods in vcl
Change-Id: I1876e203d3a3a5fa36d83a9b282ba49429c1da2a Reviewed-on: https://gerrit.libreoffice.org/30261 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/components/dtranscomp.cxx')
-rw-r--r--vcl/source/components/dtranscomp.cxx68
1 files changed, 22 insertions, 46 deletions
diff --git a/vcl/source/components/dtranscomp.cxx b/vcl/source/components/dtranscomp.cxx
index c58835b32b2b..9456ca5789a5 100644
--- a/vcl/source/components/dtranscomp.cxx
+++ b/vcl/source/components/dtranscomp.cxx
@@ -78,7 +78,6 @@ public:
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw( RuntimeException, std::exception ) override;
virtual Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( RuntimeException, std::exception ) override;
- static OUString getImplementationName_static();
static Sequence< OUString > getSupportedServiceNames_static();
/*
@@ -119,11 +118,6 @@ GenericClipboard::~GenericClipboard()
{
}
-OUString GenericClipboard::getImplementationName_static()
-{
- return OUString( "com.sun.star.datatransfer.VCLGenericClipboard" );
-}
-
Sequence< OUString > GenericClipboard::getSupportedServiceNames_static()
{
Sequence< OUString > aRet { "com.sun.star.datatransfer.clipboard.SystemClipboard" };
@@ -132,7 +126,7 @@ Sequence< OUString > GenericClipboard::getSupportedServiceNames_static()
OUString GenericClipboard::getImplementationName() throw( RuntimeException, std::exception )
{
- return getImplementationName_static();
+ return OUString("com.sun.star.datatransfer.VCLGenericClipboard");
}
Sequence< OUString > GenericClipboard::getSupportedServiceNames() throw( RuntimeException, std::exception )
@@ -243,17 +237,15 @@ Reference< XInterface > ClipboardFactory::createInstanceWithArguments( const Seq
OUString SAL_CALL Clipboard_getImplementationName()
{
- #if defined UNX
return OUString(
- #if ! defined MACOSX
+ #if defined MACOSX
+ "com.sun.star.datatransfer.clipboard.AquaClipboard"
+ #elif defined UNX
"com.sun.star.datatransfer.X11ClipboardSupport"
#else
- "com.sun.star.datatransfer.clipboard.AquaClipboard"
+ "com.sun.star.datatransfer.VCLGenericClipboard"
#endif
);
- #else
- return GenericClipboard::getImplementationName_static();
- #endif
}
Reference< XSingleServiceFactory > SAL_CALL Clipboard_createFactory( const Reference< XMultiServiceFactory > & )
@@ -290,7 +282,7 @@ public:
OUString SAL_CALL getImplementationName()
throw (css::uno::RuntimeException, std::exception) override
- { return getImplementationName_static(); }
+ { return OUString("com.sun.star.datatransfer.dnd.VclGenericDragSource"); }
sal_Bool SAL_CALL supportsService(OUString const & ServiceName)
throw (css::uno::RuntimeException, std::exception) override
@@ -305,11 +297,6 @@ public:
Sequence<OUString> aRet { "com.sun.star.datatransfer.dnd.GenericDragSource" };
return aRet;
}
-
- static OUString getImplementationName_static()
- {
- return OUString("com.sun.star.datatransfer.dnd.VclGenericDragSource");
- }
};
GenericDragSource::~GenericDragSource()
@@ -345,27 +332,23 @@ void GenericDragSource::initialize( const Sequence< Any >& ) throw( Exception, s
Sequence< OUString > SAL_CALL DragSource_getSupportedServiceNames()
{
#if defined MACOSX
- return Sequence< OUString > { "com.sun.star.datatransfer.dnd.OleDragSource" };
+ return { "com.sun.star.datatransfer.dnd.OleDragSource" };
#elif defined UNX
- return Sequence< OUString > { "com.sun.star.datatransfer.dnd.X11DragSource" };
+ return { "com.sun.star.datatransfer.dnd.X11DragSource" };
#else
- return GenericDragSource::getSupportedServiceNames_static();
+ return { "com.sun.star.datatransfer.dnd.VclGenericDragSource" };
#endif
}
OUString SAL_CALL DragSource_getImplementationName()
{
- #if defined UNX
- return OUString(
- #if ! defined MACOSX
- "com.sun.star.datatransfer.dnd.XdndSupport"
- #else
- "com.sun.star.comp.datatransfer.dnd.OleDragSource_V1"
- #endif
- );
- #else
- return GenericDragSource::getImplementationName_static();
- #endif
+#if defined MACOSX
+ return OUString("com.sun.star.comp.datatransfer.dnd.OleDragSource_V1");
+#elif defined UNX
+ return OUString("com.sun.star.datatransfer.dnd.XdndSupport");
+#else
+ return OUString("com.sun.star.datatransfer.dnd.VclGenericDragSource");
+#endif
}
Reference< XInterface > SAL_CALL DragSource_createInstance( const Reference< XMultiServiceFactory >& )
@@ -404,7 +387,7 @@ public:
OUString SAL_CALL getImplementationName()
throw (css::uno::RuntimeException, std::exception) override
- { return getImplementationName_static(); }
+ { return OUString("com.sun.star.datatransfer.dnd.VclGenericDropTarget"); }
sal_Bool SAL_CALL supportsService(OUString const & ServiceName)
throw (css::uno::RuntimeException, std::exception) override
@@ -419,11 +402,6 @@ public:
Sequence<OUString> aRet { "com.sun.star.datatransfer.dnd.GenericDropTarget" };
return aRet;
}
-
- static OUString getImplementationName_static()
- {
- return OUString("com.sun.star.datatransfer.dnd.VclGenericDropTarget");
- }
};
GenericDropTarget::~GenericDropTarget()
@@ -473,17 +451,15 @@ Sequence< OUString > SAL_CALL DropTarget_getSupportedServiceNames()
OUString SAL_CALL DropTarget_getImplementationName()
{
- #if defined UNX
return OUString(
- #if ! defined MACOSX
- "com.sun.star.datatransfer.dnd.XdndDropTarget"
- #else
+ #if defined MACOSX
"com.sun.star.comp.datatransfer.dnd.OleDropTarget_V1"
- #endif
- );
+ #elif defined UNX
+ "com.sun.star.datatransfer.dnd.XdndDropTarget"
#else
- return GenericDropTarget::getImplementationName_static();
+ "com.sun.star.datatransfer.dnd.VclGenericDropTarget"
#endif
+ );
}
Reference< XInterface > SAL_CALL DropTarget_createInstance( const Reference< XMultiServiceFactory >& )