summaryrefslogtreecommitdiff
path: root/svx/source/unodraw/UnoGraphicExporter.cxx
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@collabora.com>2013-12-17 21:59:50 +0100
committerMatúš Kukan <matus.kukan@collabora.com>2013-12-20 16:26:35 +0100
commit4a969ac35174520f1ffeb4f919f5d7bb6d99a628 (patch)
tree887738c0aeae027c1067e7c1092d5c7ef401d654 /svx/source/unodraw/UnoGraphicExporter.cxx
parent296b1e76071698c990e726d2f7935cef9ca07fbe (diff)
svx: split into direct implementation getFactories
Change-Id: I888f10a923dc2b97247b2a66cc6bd116eee280a7
Diffstat (limited to 'svx/source/unodraw/UnoGraphicExporter.cxx')
-rw-r--r--svx/source/unodraw/UnoGraphicExporter.cxx48
1 files changed, 21 insertions, 27 deletions
diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx
index 0c83a677b248..365ba925377e 100644
--- a/svx/source/unodraw/UnoGraphicExporter.cxx
+++ b/svx/source/unodraw/UnoGraphicExporter.cxx
@@ -83,15 +83,14 @@ using namespace ::com::sun::star::document;
using namespace ::com::sun::star::frame;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::task;
-#include <svx/sdr/contact/viewobjectcontactredirector.hxx>
// #i102251#
#include <editeng/editstat.hxx>
//////////////////////////////////////////////////////////////////////////////
-namespace svx
-{
+namespace {
+
struct ExportSettings
{
OUString maFilterName;
@@ -180,26 +179,6 @@ namespace svx
SdrModel* mpDoc;
};
- SVX_DLLPUBLIC Reference< XInterface > SAL_CALL GraphicExporter_createInstance(const Reference< XMultiServiceFactory > & )
- throw( Exception )
- {
- return (XWeak*)new GraphicExporter();
- }
-
- SVX_DLLPUBLIC Sequence< OUString > SAL_CALL GraphicExporter_getSupportedServiceNames()
- throw()
- {
- Sequence< OUString > aSupportedServiceNames( 1 );
- aSupportedServiceNames[0] = "com.sun.star.drawing.GraphicExportFilter";
- return aSupportedServiceNames;
- }
-
- SVX_DLLPUBLIC OUString SAL_CALL GraphicExporter_getImplementationName()
- throw()
- {
- return OUString( "com.sun.star.comp.Draw.GraphicExporter" );
- }
-
/** creates a bitmap that is optionaly transparent from a metafile
*/
BitmapEx GetBitmapFromMetaFile( const GDIMetaFile& rMtf, sal_Bool bTransparent, const Size* pSize )
@@ -300,7 +279,6 @@ namespace svx
return &aOutSize;
}
-}
class ImplExportCheckVisisbilityRedirector : public ::sdr::contact::ViewObjectContactRedirector
{
@@ -351,7 +329,7 @@ drawinglayer::primitive2d::Primitive2DSequence ImplExportCheckVisisbilityRedirec
}
}
-using namespace ::svx;
+// using namespace ::svx;
GraphicExporter::GraphicExporter()
: mpUnoPage( NULL ), mnPageNumber(-1), mpCurrentPage(0), mpDoc( NULL )
@@ -1224,7 +1202,7 @@ void SAL_CALL GraphicExporter::setSourceDocument( const Reference< lang::XCompon
OUString SAL_CALL GraphicExporter::getImplementationName( )
throw(RuntimeException)
{
- return GraphicExporter_getImplementationName();
+ return OUString( "com.sun.star.comp.Draw.GraphicExporter" );
}
sal_Bool SAL_CALL GraphicExporter::supportsService( const OUString& ServiceName )
@@ -1236,7 +1214,9 @@ sal_Bool SAL_CALL GraphicExporter::supportsService( const OUString& ServiceName
Sequence< OUString > SAL_CALL GraphicExporter::getSupportedServiceNames( )
throw(RuntimeException)
{
- return GraphicExporter_getSupportedServiceNames();
+ Sequence< OUString > aSupportedServiceNames( 1 );
+ aSupportedServiceNames[0] = "com.sun.star.drawing.GraphicExportFilter";
+ return aSupportedServiceNames;
}
// XMimeTypeInfo
@@ -1284,6 +1264,8 @@ Sequence< OUString > SAL_CALL GraphicExporter::getSupportedMimeTypeNames( ) thr
return aSeq;
}
+}
+
Graphic SvxGetGraphicForShape( SdrObject& rShape, bool bVector )
{
Graphic aGraphic;
@@ -1302,4 +1284,16 @@ Graphic SvxGetGraphicForShape( SdrObject& rShape, bool bVector )
return aGraphic;
}
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+com_sun_star_comp_Draw_GraphicExporter_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 GraphicExporter));
+ x->acquire();
+ return x.get();
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */