summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorTamás Zolnai <tamas.zolnai@collabora.com>2019-06-20 16:43:28 +0200
committerTamás Zolnai <tamas.zolnai@collabora.com>2019-06-20 18:05:15 +0200
commit02aa81895c77bf84f9d9ad2ccfee9355839ac0d1 (patch)
tree2e67ef2eb808044c6c9dbe2d68143f1f497a5ad3 /filter
parent43777b9d951ae2925129c4056c44cb6c2d539fb6 (diff)
lok: Implement SVG export for Writer (SelectionOnly mode)
Separate generic code from Impress / Draw specific code and implement shape selection handling in case of Writer. This is an internal filter, so it can be called only from the code. (cherry picked from commit e54700c45b22b10ec4f364800e0ad7c0627a6d3b) Change-Id: I807e04a0949530d6029037bb964c10c80197ff33
Diffstat (limited to 'filter')
-rw-r--r--filter/Configuration_filter.mk2
-rw-r--r--filter/source/config/fragments/filters/writer_svg_Export.xcu30
-rw-r--r--filter/source/svg/svgexport.cxx232
-rw-r--r--filter/source/svg/svgfilter.cxx82
-rw-r--r--filter/source/svg/svgfilter.hxx42
5 files changed, 304 insertions, 84 deletions
diff --git a/filter/Configuration_filter.mk b/filter/Configuration_filter.mk
index d7a6322e5564..b56e0ae39bc8 100644
--- a/filter/Configuration_filter.mk
+++ b/filter/Configuration_filter.mk
@@ -790,11 +790,13 @@ $(eval $(call filter_Configuration_add_filters,fcfg_langpack,fcfg_impressgraphic
$(eval $(call filter_Configuration_add_types,fcfg_langpack,fcfg_writergraphics_types.xcu,filter/source/config/fragments/types,\
jpg_JPEG \
png_Portable_Network_Graphic \
+ svg_Scalable_Vector_Graphics \
))
$(eval $(call filter_Configuration_add_filters,fcfg_langpack,fcfg_writergraphics_filters.xcu,filter/source/config/fragments/filters,\
writer_jpg_Export \
writer_png_Export \
+ writer_svg_Export \
))
# fcfg_calcgraphics
diff --git a/filter/source/config/fragments/filters/writer_svg_Export.xcu b/filter/source/config/fragments/filters/writer_svg_Export.xcu
new file mode 100644
index 000000000000..c08576cdd69b
--- /dev/null
+++ b/filter/source/config/fragments/filters/writer_svg_Export.xcu
@@ -0,0 +1,30 @@
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+-->
+ <node oor:name="writer_svg_Export" oor:op="replace">
+ <prop oor:name="Flags"><value>EXPORT ALIEN 3RDPARTYFILTER INTERNAL NOTINFILEDIALOG</value></prop>
+ <prop oor:name="UIComponent"/>
+ <prop oor:name="FilterService"><value>com.sun.star.comp.Draw.SVGFilter</value></prop>
+ <prop oor:name="UserData"><value></value></prop>
+ <prop oor:name="UIName">
+ <value xml:lang="en-US">SVG - Scalable Vector Graphics</value>
+ </prop>
+ <prop oor:name="FileFormatVersion"><value>0</value></prop>
+ <prop oor:name="Type"><value>svg_Scalable_Vector_Graphics</value></prop>
+ <prop oor:name="TemplateName"/>
+ <prop oor:name="DocumentService"><value>com.sun.star.text.TextDocument</value></prop>
+ </node>
diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx
index 8ebeb51a2c2f..be397e7ac74e 100644
--- a/filter/source/svg/svgexport.cxx
+++ b/filter/source/svg/svgexport.cxx
@@ -505,12 +505,10 @@ bool EqualityBitmap::operator()( const ObjectRepresentation& rObjRep1,
bool SVGFilter::implExport( const Sequence< PropertyValue >& rDescriptor )
{
- Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext() ) ;
Reference< XOutputStream > xOStm;
std::unique_ptr<SvStream> pOStm;
sal_Int32 nLength = rDescriptor.getLength();
const PropertyValue* pValue = rDescriptor.getConstArray();
- bool bRet = false;
maFilterData.realloc( 0 );
@@ -534,11 +532,22 @@ bool SVGFilter::implExport( const Sequence< PropertyValue >& rDescriptor )
}
}
- if( xOStm.is() )
+ if(mbWriterFilter)
+ return implExportWriter(xOStm);
+
+ return implExportImpressDraw(xOStm);
+}
+
+bool SVGFilter::implExportImpressDraw( const Reference< XOutputStream >& rxOStm)
+{
+ Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext() ) ;
+ bool bRet = false;
+
+ if( rxOStm.is() )
{
if( !mSelectedPages.empty() && !mMasterPageTargets.empty() )
{
- Reference< XDocumentHandler > xDocHandler( implCreateExportDocumentHandler( xOStm ), UNO_QUERY );
+ Reference< XDocumentHandler > xDocHandler( implCreateExportDocumentHandler( rxOStm ), UNO_QUERY );
if( xDocHandler.is() )
{
@@ -617,7 +626,51 @@ bool SVGFilter::implExport( const Sequence< PropertyValue >& rDescriptor )
}
}
}
+ return bRet;
+}
+
+
+bool SVGFilter::implExportWriter( const Reference< XOutputStream >& rxOStm )
+{
+ Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext() ) ;
+ bool bRet = false;
+
+ if( rxOStm.is() )
+ {
+ Reference< XDocumentHandler > xDocHandler( implCreateExportDocumentHandler( rxOStm ), UNO_QUERY );
+ if( xDocHandler.is() )
+ {
+ mpObjects = new ObjectMap;
+
+ // mpSVGExport = new SVGExport( xDocHandler );
+ mpSVGExport = new SVGExport( xContext, xDocHandler, maFilterData );
+
+ // xSVGExport is set up only to manage the life-time of the object pointed by mpSVGExport,
+ // and in order to prevent that it is destroyed when passed to AnimationExporter.
+ Reference< XInterface > xSVGExport = static_cast< css::document::XFilter* >( mpSVGExport );
+
+ try
+ {
+ mxDefaultPage = mSelectedPages[0];
+ bRet = implExportDocument();
+ }
+ catch( ... )
+ {
+ delete mpSVGDoc;
+ mpSVGDoc = nullptr;
+ OSL_FAIL( "Exception caught" );
+ }
+
+ delete mpSVGWriter;
+ mpSVGWriter = nullptr;
+ mpSVGExport = nullptr; // pointed object is released by xSVGExport dtor at the end of this scope
+ delete mpSVGFontExport;
+ mpSVGFontExport = nullptr;
+ delete mpObjects;
+ mpObjects = nullptr;
+ }
+ }
return bRet;
}
@@ -640,6 +693,11 @@ bool SVGFilter::implLookForFirstVisiblePage()
{
sal_Int32 nCurPage = 0, nLastPage = mSelectedPages.size() - 1;
+ if(!mbPresentation || mbSinglePage)
+ {
+ mnVisiblePage = nCurPage;
+ }
+
while( ( nCurPage <= nLastPage ) && ( -1 == mnVisiblePage ) )
{
const Reference< css::drawing::XDrawPage > & xDrawPage = mSelectedPages[nCurPage];
@@ -652,8 +710,7 @@ bool SVGFilter::implLookForFirstVisiblePage()
{
bool bVisible = false;
- if( !mbPresentation || mbSinglePage ||
- ( ( xPropSet->getPropertyValue( "Visible" ) >>= bVisible ) && bVisible ) )
+ if( ( xPropSet->getPropertyValue( "Visible" ) >>= bVisible ) && bVisible )
{
mnVisiblePage = nCurPage;
}
@@ -668,17 +725,15 @@ bool SVGFilter::implLookForFirstVisiblePage()
bool SVGFilter::implExportDocument()
{
- OUString aAttr;
sal_Int32 nDocX = 0, nDocY = 0; // #i124608#
sal_Int32 nDocWidth = 0, nDocHeight = 0;
- bool bRet = false;
+ bool bRet = false;
sal_Int32 nLastPage = mSelectedPages.size() - 1;
mbSinglePage = (nLastPage == 0);
mnVisiblePage = -1;
const Reference< XPropertySet > xDefaultPagePropertySet( mxDefaultPage, UNO_QUERY );
- const Reference< XExtendedDocumentHandler > xExtDocHandler( mpSVGExport->GetDocHandler(), UNO_QUERY );
// #i124608#
mbExportShapeSelection = mbSinglePage && maShapeSelection.is() && maShapeSelection->getCount();
@@ -703,23 +758,19 @@ bool SVGFilter::implExportDocument()
if(xPrimitiveFactory.is())
{
Reference< css::drawing::XShape > xShapeCandidate;
- const Sequence< PropertyValue > aViewInformation;
- const Sequence< PropertyValue > aParams;
for(sal_Int32 a(0); a < maShapeSelection->getCount(); a++)
{
if((maShapeSelection->getByIndex(a) >>= xShapeCandidate) && xShapeCandidate.is())
{
- const Sequence< Reference< XPrimitive2D > > aPrimitiveSequence(
- xPrimitiveFactory->createPrimitivesFromXShape( xShapeCandidate, aParams ));
- const sal_Int32 nCount(aPrimitiveSequence.getLength());
- for(sal_Int32 nIndex = 0; nIndex < nCount; nIndex++)
+ Reference< XPropertySet > xShapePropSet( xShapeCandidate, UNO_QUERY );
+ css::awt::Rectangle aBoundRect;
+ if( xShapePropSet.is() && ( xShapePropSet->getPropertyValue( "BoundRect" ) >>= aBoundRect ))
{
- const RealRectangle2D aRect(aPrimitiveSequence[nIndex]->getRange(aViewInformation));
-
- aShapeRange.expand(basegfx::B2DTuple(aRect.X1, aRect.Y1));
- aShapeRange.expand(basegfx::B2DTuple(aRect.X2, aRect.Y2));
+ aShapeRange.expand(basegfx::B2DTuple(aBoundRect.X, aBoundRect.Y));
+ aShapeRange.expand(basegfx::B2DTuple(aBoundRect.X + aBoundRect.Width,
+ aBoundRect.Y + aBoundRect.Height));
}
}
}
@@ -734,6 +785,74 @@ bool SVGFilter::implExportDocument()
}
}
+ if(mbWriterFilter)
+ implExportDocumentHeaderWriter(nDocX, nDocY, nDocWidth, nDocHeight);
+ else
+ implExportDocumentHeaderImpressDraw(nDocX, nDocY, nDocWidth, nDocHeight);
+
+
+ if( implLookForFirstVisiblePage() ) // OK! We found at least one visible page.
+ {
+ if( mbPresentation && !mbExportShapeSelection )
+ {
+ implGenerateMetaData();
+ implExportAnimations();
+ }
+ else
+ {
+ implGetPagePropSet( mSelectedPages[0] );
+ }
+
+ // Create the (Shape, GDIMetaFile) map
+ if( implCreateObjects() )
+ {
+ ObjectMap::const_iterator aIter( mpObjects->begin() );
+ ::std::vector< ObjectRepresentation > aObjects( mpObjects->size() );
+ sal_uInt32 nPos = 0;
+
+ while( aIter != mpObjects->end() )
+ {
+ aObjects[ nPos++ ] = (*aIter).second;
+ ++aIter;
+ }
+
+ mpSVGFontExport = new SVGFontExport( *mpSVGExport, aObjects );
+ mpSVGWriter = new SVGActionWriter( *mpSVGExport, *mpSVGFontExport );
+
+ if( mpSVGExport->IsEmbedFonts() )
+ {
+ mpSVGFontExport->EmbedFonts();
+ }
+ if( !mpSVGExport->IsUsePositionedCharacters() )
+ {
+ implExportTextShapeIndex();
+ implEmbedBulletGlyphs();
+ implExportTextEmbeddedBitmaps();
+ }
+
+ // #i124608# export a given object selection, so no MasterPage export at all
+ if (!mbExportShapeSelection)
+ implExportMasterPages( mMasterPageTargets, 0, mMasterPageTargets.size() - 1 );
+ implExportDrawPages( mSelectedPages, 0, nLastPage );
+
+ if( mbPresentation && !mbExportShapeSelection )
+ {
+ implGenerateScript();
+ }
+
+ delete mpSVGDoc;
+ mpSVGDoc = nullptr;
+ bRet = true;
+ }
+ }
+
+ return bRet;
+}
+
+void SVGFilter::implExportDocumentHeaderImpressDraw(sal_Int32 nDocX, sal_Int32 nDocY,
+ sal_Int32 nDocWidth, sal_Int32 nDocHeight)
+{
+ const Reference< XExtendedDocumentHandler > xExtDocHandler( mpSVGExport->GetDocHandler(), UNO_QUERY );
if( xExtDocHandler.is() && !mpSVGExport->IsUseTinyProfile() )
{
xExtDocHandler->unknown( SVG_DTD_STRING );
@@ -747,6 +866,7 @@ bool SVGFilter::implExportDocument()
// The following if block means that the slide size is not adapted
// to the size of the browser window, moreover the slide is top left aligned
// instead of centered:
+ OUString aAttr;
if( !mbPresentation )
{
aAttr = OUString::number( nDocWidth * 0.01 ) + "mm";
@@ -820,64 +940,40 @@ bool SVGFilter::implExportDocument()
}
}
}
+}
- if( implLookForFirstVisiblePage() ) // OK! We found at least one visible page.
- {
- if( mbPresentation && !mbExportShapeSelection )
- {
- implGenerateMetaData();
- implExportAnimations();
- }
- else
- {
- implGetPagePropSet( mSelectedPages[0] );
- }
+void SVGFilter::implExportDocumentHeaderWriter(sal_Int32 nDocX, sal_Int32 nDocY,
+ sal_Int32 nDocWidth, sal_Int32 nDocHeight)
+{
+ OUString aAttr;
+ mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "version", "1.2" );
- // Create the (Shape, GDIMetaFile) map
- if( implCreateObjects() )
- {
- ::std::vector< ObjectRepresentation > aObjects( mpObjects->size() );
- sal_uInt32 nPos = 0;
+ aAttr = OUString::number( nDocWidth * 0.01 ) + "mm";
+ mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "width", aAttr );
- for (auto const& elem : *mpObjects)
- {
- aObjects[ nPos++ ] = elem.second;
- }
+ aAttr = OUString::number( nDocHeight * 0.01 ) + "mm";
+ mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "height", aAttr );
- mpSVGFontExport = new SVGFontExport( *mpSVGExport, aObjects );
- mpSVGWriter = new SVGActionWriter( *mpSVGExport, *mpSVGFontExport );
-
- if( mpSVGExport->IsEmbedFonts() )
- {
- mpSVGFontExport->EmbedFonts();
- }
- if( !mpSVGExport->IsUsePositionedCharacters() )
- {
- implExportTextShapeIndex();
- implEmbedBulletGlyphs();
- implExportTextEmbeddedBitmaps();
- }
-
- // #i124608# export a given object selection, so no MasterPage export at all
- if (!mbExportShapeSelection)
- implExportMasterPages( mMasterPageTargets, 0, mMasterPageTargets.size() - 1 );
- implExportDrawPages( mSelectedPages, 0, nLastPage );
+ aAttr = OUString::number(nDocX) + " " + OUString::number(nDocY) + " ";
+ aAttr += OUString::number(nDocWidth) + " " + OUString::number(nDocHeight);
- if( mbPresentation && !mbExportShapeSelection )
- {
- implGenerateScript();
- }
+ mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "viewBox", aAttr );
+ mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "preserveAspectRatio", "xMidYMid" );
+ mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "fill-rule", "evenodd" );
- delete mpSVGDoc;
- mpSVGDoc = nullptr;
- bRet = true;
- }
- }
+ // standard line width is based on 1 pixel on a 90 DPI device (0.28222mmm)
+ mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "stroke-width", OUString::number( 28.222 ) );
+ mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "stroke-linejoin", "round" );
+ mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "xmlns", constSvgNamespace );
+ mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "xmlns:ooo", "http://xml.openoffice.org/svg/export" );
+ mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "xmlns:xlink", "http://www.w3.org/1999/xlink" );
+ mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "xmlns:office", "urn:oasis:names:tc:opendocument:xmlns:office:1.0" );
+ mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "xmlns:smil", "urn:oasis:names:tc:opendocument:xmlns:smil-compatible:1.0" );
+ mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "xml:space", "preserve" );
- return bRet;
+ mpSVGDoc = new SvXMLElementExport( *mpSVGExport, XML_NAMESPACE_NONE, "svg", true, true );
}
-
/// Append aField to aFieldSet if it is not already present in the set and create the field id sFieldId
template< typename TextFieldType >
static OUString implGenerateFieldId( std::vector< TextField* > & aFieldSet,
diff --git a/filter/source/svg/svgfilter.cxx b/filter/source/svg/svgfilter.cxx
index ebcc522fbbca..f3bbe783f3ac 100644
--- a/filter/source/svg/svgfilter.cxx
+++ b/filter/source/svg/svgfilter.cxx
@@ -24,6 +24,7 @@
#include <comphelper/lok.hxx>
#include <comphelper/servicedecl.hxx>
#include <uno/environment.h>
+#include <com/sun/star/text/XTextDocument.hpp>
#include <com/sun/star/drawing/XDrawPage.hpp>
#include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
#include <com/sun/star/drawing/XDrawView.hpp>
@@ -78,17 +79,19 @@ SVGFilter::SVGFilter( const Reference< XComponentContext >& rxCtx ) :
mpSVGExport( nullptr ),
mpSVGFontExport( nullptr ),
mpSVGWriter( nullptr ),
- mpDefaultSdrPage( nullptr ),
- mbPresentation( false ),
mbSinglePage( false ),
mnVisiblePage( -1 ),
mpObjects( nullptr ),
mxSrcDoc(),
mxDstDoc(),
- mxDefaultPage(),
- maFilterData(),
maShapeSelection(),
mbExportShapeSelection(false),
+ maFilterData(),
+ mxDefaultPage(),
+ mbWriterFilter(false),
+ mpDefaultSdrPage( nullptr ),
+ mpSdrModel( nullptr ),
+ mbPresentation( false ),
maOldFieldHdl()
{
}
@@ -104,6 +107,34 @@ SVGFilter::~SVGFilter()
sal_Bool SAL_CALL SVGFilter::filter( const Sequence< PropertyValue >& rDescriptor )
{
+ mbWriterFilter = false;
+
+ if(mxDstDoc.is()) // Import works for Impress / draw only
+ return filterImpressDraw(rDescriptor);
+
+ if(mxSrcDoc.is())
+ {
+ for (sal_Int32 nInd = 0; nInd < rDescriptor.getLength(); nInd++)
+ {
+ if (rDescriptor[nInd].Name == "FilterName")
+ {
+ OUString sFilterName;
+ rDescriptor[nInd].Value >>= sFilterName;
+ if(sFilterName == "writer_svg_Export")
+ {
+ mbWriterFilter = true;
+ return filterWriter(rDescriptor);
+ }
+ break;
+ }
+ }
+ return filterImpressDraw(rDescriptor);
+ }
+ return false;
+}
+
+sal_Bool SVGFilter::filterImpressDraw( const Sequence< PropertyValue >& rDescriptor )
+{
SolarMutexGuard aGuard;
vcl::Window* pFocusWindow(Application::GetFocusWindow());
bool bRet(false);
@@ -505,6 +536,49 @@ sal_Bool SAL_CALL SVGFilter::filter( const Sequence< PropertyValue >& rDescripto
return bRet;
}
+sal_Bool SVGFilter::filterWriter( const Sequence< PropertyValue >& rDescriptor )
+{
+ bool bSelectionOnly = false;
+
+ for (sal_Int32 nInd = 0; nInd < rDescriptor.getLength(); nInd++)
+ {
+ if (rDescriptor[nInd].Name == "SelectionOnly")
+ {
+ rDescriptor[nInd].Value >>= bSelectionOnly;
+ break;
+ }
+ }
+
+ if(!bSelectionOnly) // For Writer onéy the selection-only mode is supported
+ return false;
+
+ uno::Reference<frame::XDesktop2> xDesktop(frame::Desktop::create(mxContext));
+ uno::Reference<frame::XController > xController;
+ if (xDesktop->getCurrentFrame().is())
+ {
+ uno::Reference<frame::XFrame> xFrame(xDesktop->getCurrentFrame(), uno::UNO_QUERY_THROW);
+ xController.set(xFrame->getController(), uno::UNO_QUERY_THROW);
+ }
+
+ Reference< view::XSelectionSupplier > xSelection (xController, UNO_QUERY);
+ if (!xSelection.is())
+ return false;
+
+ xSelection->getSelection() >>= maShapeSelection;
+
+ if (!maShapeSelection)
+ return false;
+
+ // Select only one draw page
+ uno::Reference< drawing::XDrawPagesSupplier > xDrawPagesSupplier( mxSrcDoc, uno::UNO_QUERY );
+ uno::Reference<drawing::XDrawPages> xDrawPages = xDrawPagesSupplier->getDrawPages();
+ uno::Reference< drawing::XDrawPage > xDrawPage( xDrawPages->getByIndex(0), uno::UNO_QUERY );
+ mSelectedPages.resize( 1 );
+ mSelectedPages[0] = xDrawPage;
+
+ return implExport( rDescriptor );
+}
+
void SAL_CALL SVGFilter::cancel( )
{
}
diff --git a/filter/source/svg/svgfilter.hxx b/filter/source/svg/svgfilter.hxx
index 1b5254e25469..77e9b607c57f 100644
--- a/filter/source/svg/svgfilter.hxx
+++ b/filter/source/svg/svgfilter.hxx
@@ -192,31 +192,40 @@ public:
private:
+ /// Generally use members
+
Reference< XComponentContext > mxContext;
SvXMLElementExport* mpSVGDoc;
SVGExport* mpSVGExport;
SVGFontExport* mpSVGFontExport;
SVGActionWriter* mpSVGWriter;
- SdrPage* mpDefaultSdrPage;
- bool mbPresentation;
- bool mbSinglePage;
+ bool mbSinglePage;
sal_Int32 mnVisiblePage;
- PagePropertySet mVisiblePagePropSet;
- OUString msClipPathId;
- UCharSetMapMap mTextFieldCharSets;
- Reference< XInterface > mCreateOjectsCurrentMasterPage;
- UOStringMap mTextShapeIdListMap;
- MetaBitmapActionSet mEmbeddedBitmapActionSet;
- ObjectMap mEmbeddedBitmapActionMap;
ObjectMap* mpObjects;
Reference< XComponent > mxSrcDoc;
Reference< XComponent > mxDstDoc;
- Reference< css::drawing::XDrawPage > mxDefaultPage;
- Sequence< PropertyValue > maFilterData;
// #i124608# explicit ShapeSelection for export when export of the selection is wanted
Reference< css::drawing::XShapes > maShapeSelection;
bool mbExportShapeSelection;
+ Sequence< PropertyValue > maFilterData;
+ Reference< css::drawing::XDrawPage > mxDefaultPage;
std::vector< Reference< css::drawing::XDrawPage > > mSelectedPages;
+
+ bool mbWriterFilter;
+
+
+ /// Impress / draw only members
+
+ SdrPage* mpDefaultSdrPage;
+ SdrModel* mpSdrModel;
+ bool mbPresentation;
+ PagePropertySet mVisiblePagePropSet;
+ OUString msClipPathId;
+ UCharSetMapMap mTextFieldCharSets;
+ Reference< XInterface > mCreateOjectsCurrentMasterPage;
+ UOStringMap mTextShapeIdListMap;
+ MetaBitmapActionSet mEmbeddedBitmapActionSet;
+ ObjectMap mEmbeddedBitmapActionMap;
std::vector< Reference< css::drawing::XDrawPage > > mMasterPageTargets;
Link<EditFieldInfo*,void> maOldFieldHdl;
@@ -224,6 +233,8 @@ private:
/// @throws css::uno::RuntimeException
bool implExport( const Sequence< PropertyValue >& rDescriptor );
+ bool implExportImpressDraw( const Reference< XOutputStream >& rxOStm );
+ bool implExportWriter( const Reference< XOutputStream >& rxOStm );
static Reference< XWriter > implCreateExportDocumentHandler( const Reference< XOutputStream >& rxOStm );
void implGetPagePropSet( const Reference< css::drawing::XDrawPage > & rxPage );
@@ -235,6 +246,10 @@ private:
void implGenerateScript();
bool implExportDocument();
+ void implExportDocumentHeaderImpressDraw(sal_Int32 nDocX, sal_Int32 nDocY,
+ sal_Int32 nDocWidth, sal_Int32 nDocHeight);
+ void implExportDocumentHeaderWriter(sal_Int32 nDocX, sal_Int32 nDocY,
+ sal_Int32 nDocWidth, sal_Int32 nDocHeight);
void implExportAnimations();
bool implExportMasterPages( const std::vector< Reference< css::drawing::XDrawPage > >& rxPages,
@@ -266,6 +281,9 @@ private:
const Reference< XPropertySetInfo > & rxPropSetInfo );
DECL_LINK( CalcFieldHdl, EditFieldInfo*, void );
+ sal_Bool filterImpressDraw( const Sequence< PropertyValue >& rDescriptor );
+ sal_Bool filterWriter( const Sequence< PropertyValue >& rDescriptor );
+
protected:
// XFilter