summaryrefslogtreecommitdiff
path: root/svx/source/unodraw/UnoGraphicExporter.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/unodraw/UnoGraphicExporter.cxx')
-rw-r--r--svx/source/unodraw/UnoGraphicExporter.cxx48
1 files changed, 27 insertions, 21 deletions
diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx
index 365ba925377e..0c83a677b248 100644
--- a/svx/source/unodraw/UnoGraphicExporter.cxx
+++ b/svx/source/unodraw/UnoGraphicExporter.cxx
@@ -83,14 +83,15 @@ 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 {
-
+namespace svx
+{
struct ExportSettings
{
OUString maFilterName;
@@ -179,6 +180,26 @@ namespace {
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 )
@@ -279,6 +300,7 @@ namespace {
return &aOutSize;
}
+}
class ImplExportCheckVisisbilityRedirector : public ::sdr::contact::ViewObjectContactRedirector
{
@@ -329,7 +351,7 @@ drawinglayer::primitive2d::Primitive2DSequence ImplExportCheckVisisbilityRedirec
}
}
-// using namespace ::svx;
+using namespace ::svx;
GraphicExporter::GraphicExporter()
: mpUnoPage( NULL ), mnPageNumber(-1), mpCurrentPage(0), mpDoc( NULL )
@@ -1202,7 +1224,7 @@ void SAL_CALL GraphicExporter::setSourceDocument( const Reference< lang::XCompon
OUString SAL_CALL GraphicExporter::getImplementationName( )
throw(RuntimeException)
{
- return OUString( "com.sun.star.comp.Draw.GraphicExporter" );
+ return GraphicExporter_getImplementationName();
}
sal_Bool SAL_CALL GraphicExporter::supportsService( const OUString& ServiceName )
@@ -1214,9 +1236,7 @@ sal_Bool SAL_CALL GraphicExporter::supportsService( const OUString& ServiceName
Sequence< OUString > SAL_CALL GraphicExporter::getSupportedServiceNames( )
throw(RuntimeException)
{
- Sequence< OUString > aSupportedServiceNames( 1 );
- aSupportedServiceNames[0] = "com.sun.star.drawing.GraphicExportFilter";
- return aSupportedServiceNames;
+ return GraphicExporter_getSupportedServiceNames();
}
// XMimeTypeInfo
@@ -1264,8 +1284,6 @@ Sequence< OUString > SAL_CALL GraphicExporter::getSupportedMimeTypeNames( ) thr
return aSeq;
}
-}
-
Graphic SvxGetGraphicForShape( SdrObject& rShape, bool bVector )
{
Graphic aGraphic;
@@ -1284,16 +1302,4 @@ 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: */