summaryrefslogtreecommitdiff
path: root/svx/source/unogallery/unogalthemeprovider.cxx
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@collabora.com>2013-12-20 22:41:38 +0100
committerMatúš Kukan <matus.kukan@collabora.com>2013-12-20 22:58:29 +0100
commit09af884e7b5712e0311a4c122a5213e7c89f626e (patch)
treef4291ccbae836111fa05ff6404f1b53d1ca94450 /svx/source/unogallery/unogalthemeprovider.cxx
parentbe053c9a80ad237afc6da0b4174e1c7afc94ed92 (diff)
Revert "svx: split into direct implementation getFactories"
Also reverts "These services are in fact implemented in svxcore library." This reverts commit 090674dcb085cd41f4628e4f07c9a2268a18e862 and commit 4a969ac35174520f1ffeb4f919f5d7bb6d99a628. This is embarrassing; needs more work.
Diffstat (limited to 'svx/source/unogallery/unogalthemeprovider.cxx')
-rw-r--r--svx/source/unogallery/unogalthemeprovider.cxx71
1 files changed, 54 insertions, 17 deletions
diff --git a/svx/source/unogallery/unogalthemeprovider.cxx b/svx/source/unogallery/unogalthemeprovider.cxx
index 75049ccc5bab..e5ad2d89002a 100644
--- a/svx/source/unogallery/unogalthemeprovider.cxx
+++ b/svx/source/unogallery/unogalthemeprovider.cxx
@@ -30,7 +30,38 @@
using namespace ::com::sun::star;
-namespace {
+namespace unogallery {
+
+// --------------------
+// - Helper functions -
+// --------------------
+
+uno::Reference< uno::XInterface > SAL_CALL GalleryThemeProvider_createInstance(
+ const uno::Reference< lang::XMultiServiceFactory > & )
+ throw( uno::Exception )
+{
+ return *( new GalleryThemeProvider() );
+}
+
+// -----------------------------------------------------------------------------
+
+uno::Sequence< OUString > SAL_CALL GalleryThemeProvider_getSupportedServiceNames()
+ throw()
+{
+ return GalleryThemeProvider::getSupportedServiceNames_Static();
+}
+
+// -----------------------------------------------------------------------------
+
+OUString SAL_CALL GalleryThemeProvider_getImplementationName()
+ throw()
+{
+ return GalleryThemeProvider::getImplementationName_Static();
+}
+
+// -----------------
+// - GalleryThemeProvider -
+// -----------------
GalleryThemeProvider::GalleryThemeProvider() :
mbHiddenThemes( sal_False )
@@ -46,10 +77,30 @@ GalleryThemeProvider::~GalleryThemeProvider()
// ------------------------------------------------------------------------------
+SVX_DLLPUBLIC OUString GalleryThemeProvider::getImplementationName_Static()
+ throw()
+{
+ return OUString( "com.sun.star.comp.gallery.GalleryThemeProvider" );
+}
+
+// ------------------------------------------------------------------------------
+
+SVX_DLLPUBLIC uno::Sequence< OUString > GalleryThemeProvider::getSupportedServiceNames_Static()
+ throw()
+{
+ uno::Sequence< OUString > aSeq( 1 );
+
+ aSeq.getArray()[ 0 ] = "com.sun.star.gallery.GalleryThemeProvider";
+
+ return aSeq;
+}
+
+// ------------------------------------------------------------------------------
+
OUString SAL_CALL GalleryThemeProvider::getImplementationName()
throw( uno::RuntimeException )
{
- return OUString( "com.sun.star.comp.gallery.GalleryThemeProvider" );
+ return getImplementationName_Static();
}
// ------------------------------------------------------------------------------
@@ -72,9 +123,7 @@ sal_Bool SAL_CALL GalleryThemeProvider::supportsService( const OUString& Service
uno::Sequence< OUString > SAL_CALL GalleryThemeProvider::getSupportedServiceNames()
throw( uno::RuntimeException )
{
- uno::Sequence< OUString > aSeq( 1 );
- aSeq.getArray()[ 0 ] = "com.sun.star.gallery.GalleryThemeProvider";
- return aSeq;
+ return getSupportedServiceNames_Static();
}
// ------------------------------------------------------------------------------
@@ -248,16 +297,4 @@ void SAL_CALL GalleryThemeProvider::removeByName( const OUString& rName )
}
-extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
-com_sun_star_comp_gallery_GalleryThemeProvider_implementation_getFactory(
- SAL_UNUSED_PARAMETER css::uno::XComponentContext *,
- uno_Sequence * arguments)
-{
- assert(arguments != 0 && arguments->nElements == 0); (void) arguments;
- css::uno::Reference<css::uno::XInterface> x(
- static_cast<cppu::OWeakObject *>(new GalleryThemeProvider));
- x->acquire();
- return x.get();
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */