LibreOffice Module filter (master) 1
Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
SVGFilter Class Reference

#include <svgfilter.hxx>

Inheritance diagram for SVGFilter:
[legend]
Collaboration diagram for SVGFilter:
[legend]

Public Types

typedef std::unordered_map< Reference< XInterface >, ObjectRepresentationObjectMap
 
typedef std::unordered_set< Reference< XInterface > > ObjectSet
 
typedef std::unordered_set< sal_Unicode, HashUCharUCharSet
 
typedef std::unordered_map< OUString, UCharSetUCharSetMap
 
typedef std::unordered_map< Reference< XInterface >, UCharSetMapUCharSetMapMap
 
typedef std::unordered_set< ObjectRepresentation, HashBitmap, EqualityBitmapMetaBitmapActionSet
 

Public Member Functions

 SVGFilter (const Reference< XComponentContext > &rxCtx)
 
virtual ~SVGFilter () override
 
virtual sal_Bool SAL_CALL supportsService (const OUString &sServiceName) override
 
virtual OUString SAL_CALL getImplementationName () override
 
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames () override
 

Protected Member Functions

virtual sal_Bool SAL_CALL filter (const Sequence< PropertyValue > &rDescriptor) override
 
virtual void SAL_CALL cancel () override
 
virtual void SAL_CALL setTargetDocument (const Reference< XComponent > &xDoc) override
 
virtual void SAL_CALL setSourceDocument (const Reference< XComponent > &xDoc) override
 
virtual OUString SAL_CALL detect (Sequence< PropertyValue > &io_rDescriptor) override
 

Private Member Functions

bool implExport (const Sequence< PropertyValue > &rDescriptor)
 
bool implExportImpressOrDraw (const Reference< XOutputStream > &rxOStm)
 
bool implExportWriterOrCalc (const Reference< XOutputStream > &rxOStm)
 
bool implExportWriterTextGraphic (const Reference< view::XSelectionSupplier > &xSelectionSupplier)
 
void implGetPagePropSet (const Reference< css::drawing::XDrawPage > &rxPage)
 We collect info on master page elements visibility, and placeholder text shape content. More...
 
void implGenerateMetaData ()
 
void implExportTextShapeIndex ()
 
void implEmbedBulletGlyphs ()
 
void implEmbedBulletGlyph (sal_Unicode cBullet, const OUString &sPathData)
 
void implExportTextEmbeddedBitmaps ()
 SVGFilter::implExportTextEmbeddedBitmaps We export bitmaps embedded into text shapes, such as those used by list items with image style, only once in a specific defs element. More...
 
void implExportBackgroundBitmaps ()
 
void implExportTiledBackground ()
 
void implGenerateScript ()
 
bool implExportDocument ()
 
void implExportDocumentHeaderImpressOrDraw (sal_Int32 nDocX, sal_Int32 nDocY, sal_Int32 nDocWidth, sal_Int32 nDocHeight)
 
void implExportDocumentHeaderWriterOrCalc (sal_Int32 nDocX, sal_Int32 nDocY, sal_Int32 nDocWidth, sal_Int32 nDocHeight)
 
void implExportAnimations ()
 
bool implExportMasterPages (const std::vector< Reference< css::drawing::XDrawPage > > &rxPages, sal_Int32 nFirstPage, sal_Int32 nLastPage)
 
void implExportDrawPages (const std::vector< Reference< css::drawing::XDrawPage > > &rxPages, sal_Int32 nFirstPage, sal_Int32 nLastPage)
 
bool implExportPage (std::u16string_view sPageId, const Reference< css::drawing::XDrawPage > &rxPage, const Reference< css::drawing::XShapes > &xShapes, bool bMaster)
 
bool implExportShapes (const Reference< css::drawing::XShapes > &rxShapes, bool bMaster)
 
bool implExportShape (const Reference< css::drawing::XShape > &rxShape, bool bMaster)
 
bool implCreateObjects ()
 
bool implCreateObjectsFromShapes (const Reference< css::drawing::XDrawPage > &rxPage, const Reference< css::drawing::XShapes > &rxShapes)
 
bool implCreateObjectsFromShape (const Reference< css::drawing::XDrawPage > &rxPage, const Reference< css::drawing::XShape > &rxShape)
 
void implCreateObjectsFromBackground (const Reference< css::drawing::XDrawPage > &rxMasterPage)
 
void implRegisterInterface (const Reference< XInterface > &rxIf)
 
const OUString & implGetValidIDFromInterface (const Reference< XInterface > &rxIf)
 
bool implLookForFirstVisiblePage ()
 
 DECL_LINK (CalcFieldHdl, EditFieldInfo *, void)
 
bool filterImpressOrDraw (const Sequence< PropertyValue > &rDescriptor)
 
bool filterWriterOrCalc (const Sequence< PropertyValue > &rDescriptor)
 

Static Private Member Functions

static Reference< XWriter > implCreateExportDocumentHandler (const Reference< XOutputStream > &rxOStm)
 
static OUString implGetClassFromShape (const Reference< css::drawing::XShape > &rxShape)
 
static OUString implGetInterfaceName (const Reference< XInterface > &rxIf)
 
static Any implSafeGetPagePropSet (const OUString &sPropertyName, const Reference< XPropertySet > &rxPropSet, const Reference< XPropertySetInfo > &rxPropSetInfo)
 

Private Attributes

Reference< XComponentContext > mxContext
 Generally use members. More...
 
SvXMLElementExportmpSVGDoc
 
rtl::Reference< SVGExportmpSVGExport
 
SVGFontExportmpSVGFontExport
 
SVGActionWritermpSVGWriter
 
bool mbSinglePage
 
sal_Int32 mnVisiblePage
 
ObjectMapmpObjects
 
Reference< XComponent > mxSrcDoc
 
Reference< XComponent > mxDstDoc
 
Reference< css::drawing::XShapes > maShapeSelection
 
bool mbExportShapeSelection
 
Sequence< PropertyValue > maFilterData
 
Reference< css::drawing::XDrawPage > mxDefaultPage
 
std::vector< Reference< css::drawing::XDrawPage > > mSelectedPages
 
bool mbIsPreview
 
bool mbShouldCompress
 
bool mbWriterFilter
 
bool mbCalcFilter
 
bool mbImpressFilter
 
SdrPagempDefaultSdrPage
 Impress / draw only members. More...
 
bool mbPresentation
 
PagePropertySet mVisiblePagePropSet
 
OUString msClipPathId
 
UCharSetMapMap mTextFieldCharSets
 
Reference< XInterfacemCreateOjectsCurrentMasterPage
 
std::unordered_map< Reference< XInterface >, OUString > mTextShapeIdListMap
 
MetaBitmapActionSet mEmbeddedBitmapActionSet
 
ObjectMap mEmbeddedBitmapActionMap
 
MetaBitmapActionMap maBitmapActionMap
 
PatternPropertySet maPatterProps
 
std::vector< Reference< css::drawing::XDrawPage > > mMasterPageTargets
 
Link< EditFieldInfo *, void > maOldFieldHdl
 
Link< EditFieldInfo *, void > maNewFieldHdl
 

Detailed Description

Definition at line 177 of file svgfilter.hxx.

Member Typedef Documentation

◆ MetaBitmapActionSet

Definition at line 190 of file svgfilter.hxx.

◆ ObjectMap

Definition at line 183 of file svgfilter.hxx.

◆ ObjectSet

typedef std::unordered_set< Reference< XInterface > > SVGFilter::ObjectSet

Definition at line 184 of file svgfilter.hxx.

◆ UCharSet

typedef std::unordered_set< sal_Unicode, HashUChar > SVGFilter::UCharSet

Definition at line 186 of file svgfilter.hxx.

◆ UCharSetMap

typedef std::unordered_map< OUString, UCharSet > SVGFilter::UCharSetMap

Definition at line 187 of file svgfilter.hxx.

◆ UCharSetMapMap

typedef std::unordered_map< Reference< XInterface >, UCharSetMap > SVGFilter::UCharSetMapMap

Definition at line 188 of file svgfilter.hxx.

Constructor & Destructor Documentation

◆ SVGFilter()

SVGFilter::SVGFilter ( const Reference< XComponentContext > &  rxCtx)
explicit

Definition at line 71 of file svgfilter.cxx.

References mxContext.

◆ ~SVGFilter()

SVGFilter::~SVGFilter ( )
overridevirtual

Definition at line 90 of file svgfilter.cxx.

References DBG_ASSERT, mpObjects, mpSVGDoc, mpSVGExport, mpSVGFontExport, and mpSVGWriter.

Member Function Documentation

◆ cancel()

void SAL_CALL SVGFilter::cancel ( )
overrideprotectedvirtual

Definition at line 599 of file svgfilter.cxx.

◆ DECL_LINK()

SVGFilter::DECL_LINK ( CalcFieldHdl  ,
EditFieldInfo ,
void   
)
private

◆ detect()

OUString SAL_CALL SVGFilter::detect ( Sequence< PropertyValue > &  io_rDescriptor)
overrideprotectedvirtual

Definition at line 788 of file svgfilter.cxx.

References utl::MediaDescriptor::PROP_INPUTSTREAM, and TOOLS_WARN_EXCEPTION.

◆ filter()

sal_Bool SAL_CALL SVGFilter::filter ( const Sequence< PropertyValue > &  rDescriptor)
overrideprotectedvirtual

◆ filterImpressOrDraw()

bool SVGFilter::filterImpressOrDraw ( const Sequence< PropertyValue > &  rDescriptor)
private

◆ filterWriterOrCalc()

bool SVGFilter::filterWriterOrCalc ( const Sequence< PropertyValue > &  rDescriptor)
private

◆ getImplementationName()

OUString SVGFilter::getImplementationName ( )
overridevirtual

Definition at line 833 of file svgfilter.cxx.

◆ getSupportedServiceNames()

css::uno::Sequence< OUString > SVGFilter::getSupportedServiceNames ( )
overridevirtual

Definition at line 837 of file svgfilter.cxx.

◆ implCreateExportDocumentHandler()

Reference< XWriter > SVGFilter::implCreateExportDocumentHandler ( const Reference< XOutputStream > &  rxOStm)
staticprivate

Definition at line 886 of file svgexport.cxx.

Referenced by implExportImpressOrDraw(), and implExportWriterOrCalc().

◆ implCreateObjects()

bool SVGFilter::implCreateObjects ( )
private

◆ implCreateObjectsFromBackground()

void SVGFilter::implCreateObjectsFromBackground ( const Reference< css::drawing::XDrawPage > &  rxMasterPage)
private

◆ implCreateObjectsFromShape()

bool SVGFilter::implCreateObjectsFromShape ( const Reference< css::drawing::XDrawPage > &  rxPage,
const Reference< css::drawing::XShape > &  rxShape 
)
private

◆ implCreateObjectsFromShapes()

bool SVGFilter::implCreateObjectsFromShapes ( const Reference< css::drawing::XDrawPage > &  rxPage,
const Reference< css::drawing::XShapes > &  rxShapes 
)
private

Definition at line 2362 of file svgexport.cxx.

References gentoken::i, implCreateObjectsFromShape(), and nCount.

Referenced by implCreateObjects(), and implCreateObjectsFromShape().

◆ implEmbedBulletGlyph()

void SVGFilter::implEmbedBulletGlyph ( sal_Unicode  cBullet,
const OUString &  sPathData 
)
private

Definition at line 1570 of file svgexport.cxx.

References mpSVGExport, sId, and XML_NAMESPACE_NONE.

Referenced by implEmbedBulletGlyphs().

◆ implEmbedBulletGlyphs()

void SVGFilter::implEmbedBulletGlyphs ( )
private

Definition at line 1542 of file svgexport.cxx.

References implEmbedBulletGlyph(), mpSVGExport, and XML_NAMESPACE_NONE.

Referenced by implExportDocument().

◆ implExport()

bool SVGFilter::implExport ( const Sequence< PropertyValue > &  rDescriptor)
private

◆ implExportAnimations()

void SVGFilter::implExportAnimations ( )
private

◆ implExportBackgroundBitmaps()

void SVGFilter::implExportBackgroundBitmaps ( )
private

◆ implExportDocument()

bool SVGFilter::implExportDocument ( )
private

◆ implExportDocumentHeaderImpressOrDraw()

void SVGFilter::implExportDocumentHeaderImpressOrDraw ( sal_Int32  nDocX,
sal_Int32  nDocY,
sal_Int32  nDocWidth,
sal_Int32  nDocHeight 
)
private

◆ implExportDocumentHeaderWriterOrCalc()

void SVGFilter::implExportDocumentHeaderWriterOrCalc ( sal_Int32  nDocX,
sal_Int32  nDocY,
sal_Int32  nDocWidth,
sal_Int32  nDocHeight 
)
private

Definition at line 1150 of file svgexport.cxx.

References constSvgNamespace, mpSVGDoc, mpSVGExport, and XML_NAMESPACE_NONE.

Referenced by implExportDocument().

◆ implExportDrawPages()

void SVGFilter::implExportDrawPages ( const std::vector< Reference< css::drawing::XDrawPage > > &  rxPages,
sal_Int32  nFirstPage,
sal_Int32  nLastPage 
)
private

◆ implExportImpressOrDraw()

bool SVGFilter::implExportImpressOrDraw ( const Reference< XOutputStream > &  rxOStm)
private

◆ implExportMasterPages()

bool SVGFilter::implExportMasterPages ( const std::vector< Reference< css::drawing::XDrawPage > > &  rxPages,
sal_Int32  nFirstPage,
sal_Int32  nLastPage 
)
private

◆ implExportPage()

bool SVGFilter::implExportPage ( std::u16string_view  sPageId,
const Reference< css::drawing::XDrawPage > &  rxPage,
const Reference< css::drawing::XShapes > &  xShapes,
bool  bMaster 
)
private

◆ implExportShape()

bool SVGFilter::implExportShape ( const Reference< css::drawing::XShape > &  rxShape,
bool  bMaster 
)
private

◆ implExportShapes()

bool SVGFilter::implExportShapes ( const Reference< css::drawing::XShapes > &  rxShapes,
bool  bMaster 
)
private

Definition at line 2095 of file svgexport.cxx.

References gentoken::i, implExportShape(), and nCount.

Referenced by implExportPage(), and implExportShape().

◆ implExportTextEmbeddedBitmaps()

void SVGFilter::implExportTextEmbeddedBitmaps ( )
private

SVGFilter::implExportTextEmbeddedBitmaps We export bitmaps embedded into text shapes, such as those used by list items with image style, only once in a specific defs element.

Definition at line 1688 of file svgexport.cxx.

References GDIMetaFile::GetAction(), GDIMetaFile::GetActionSize(), mEmbeddedBitmapActionSet, MetaAction::Move(), mpSVGExport, mpSVGWriter, nId, sId, SVGActionWriter::WriteMetaFile(), Point::X(), XML_NAMESPACE_NONE, and Point::Y().

Referenced by implExportDocument().

◆ implExportTextShapeIndex()

void SVGFilter::implExportTextShapeIndex ( )
private

◆ implExportTiledBackground()

void SVGFilter::implExportTiledBackground ( )
private

◆ implExportWriterOrCalc()

bool SVGFilter::implExportWriterOrCalc ( const Reference< XOutputStream > &  rxOStm)
private

◆ implExportWriterTextGraphic()

bool SVGFilter::implExportWriterTextGraphic ( const Reference< view::XSelectionSupplier > &  xSelectionSupplier)
private

◆ implGenerateMetaData()

void SVGFilter::implGenerateMetaData ( )
private

◆ implGenerateScript()

void SVGFilter::implGenerateScript ( )
private

Definition at line 1752 of file svgexport.cxx.

References gentoken::i, mpSVGExport, and XML_NAMESPACE_NONE.

Referenced by implExportDocument().

◆ implGetClassFromShape()

OUString SVGFilter::implGetClassFromShape ( const Reference< css::drawing::XShape > &  rxShape)
staticprivate

Definition at line 2634 of file svgexport.cxx.

Referenced by implExportShape().

◆ implGetInterfaceName()

OUString SVGFilter::implGetInterfaceName ( const Reference< XInterface > &  rxIf)
staticprivate

Definition at line 2679 of file svgexport.cxx.

Referenced by implExportPage().

◆ implGetPagePropSet()

void SVGFilter::implGetPagePropSet ( const Reference< css::drawing::XDrawPage > &  rxPage)
private

◆ implGetValidIDFromInterface()

const OUString & SVGFilter::implGetValidIDFromInterface ( const Reference< XInterface > &  rxIf)
private

◆ implLookForFirstVisiblePage()

bool SVGFilter::implLookForFirstVisiblePage ( )
private

Definition at line 900 of file svgexport.cxx.

References bVisible, mbPresentation, mbSinglePage, mnVisiblePage, and mSelectedPages.

Referenced by implExportDocument().

◆ implRegisterInterface()

void SVGFilter::implRegisterInterface ( const Reference< XInterface > &  rxIf)
private

Definition at line 2666 of file svgexport.cxx.

References mpSVGExport.

Referenced by implCreateObjectsFromShape(), and implExportImpressOrDraw().

◆ implSafeGetPagePropSet()

Any SVGFilter::implSafeGetPagePropSet ( const OUString &  sPropertyName,
const Reference< XPropertySet > &  rxPropSet,
const Reference< XPropertySetInfo > &  rxPropSetInfo 
)
staticprivate

Definition at line 1771 of file svgexport.cxx.

References Any, and result.

Referenced by implGetPagePropSet().

◆ setSourceDocument()

void SAL_CALL SVGFilter::setSourceDocument ( const Reference< XComponent > &  xDoc)
overrideprotectedvirtual

Definition at line 603 of file svgfilter.cxx.

References mxSrcDoc.

◆ setTargetDocument()

void SAL_CALL SVGFilter::setTargetDocument ( const Reference< XComponent > &  xDoc)
overrideprotectedvirtual

Definition at line 608 of file svgfilter.cxx.

References mxDstDoc.

◆ supportsService()

sal_Bool SVGFilter::supportsService ( const OUString &  sServiceName)
overridevirtual

Definition at line 829 of file svgfilter.cxx.

References sServiceName, and cppu::supportsService().

Member Data Documentation

◆ maBitmapActionMap

MetaBitmapActionMap SVGFilter::maBitmapActionMap
private

◆ maFilterData

Sequence< PropertyValue > SVGFilter::maFilterData
private

Definition at line 209 of file svgfilter.hxx.

Referenced by implExport(), implExportImpressOrDraw(), and implExportWriterOrCalc().

◆ maNewFieldHdl

Link<EditFieldInfo*,void> SVGFilter::maNewFieldHdl
private

Definition at line 237 of file svgfilter.hxx.

Referenced by implExportImpressOrDraw().

◆ maOldFieldHdl

Link<EditFieldInfo*,void> SVGFilter::maOldFieldHdl
private

Definition at line 236 of file svgfilter.hxx.

Referenced by implExportImpressOrDraw().

◆ maPatterProps

PatternPropertySet SVGFilter::maPatterProps
private

Definition at line 233 of file svgfilter.hxx.

Referenced by implCreateObjectsFromBackground(), and implExportTiledBackground().

◆ maShapeSelection

Reference< css::drawing::XShapes > SVGFilter::maShapeSelection
private

◆ mbCalcFilter

bool SVGFilter::mbCalcFilter
private

Definition at line 216 of file svgfilter.hxx.

Referenced by filter(), implExport(), and implExportDocument().

◆ mbExportShapeSelection

bool SVGFilter::mbExportShapeSelection
private

◆ mbImpressFilter

bool SVGFilter::mbImpressFilter
private

Definition at line 217 of file svgfilter.hxx.

Referenced by filter().

◆ mbIsPreview

bool SVGFilter::mbIsPreview
private

Definition at line 212 of file svgfilter.hxx.

Referenced by filter(), implExportDocument(), and implExportWriterTextGraphic().

◆ mbPresentation

bool SVGFilter::mbPresentation
private

◆ mbShouldCompress

bool SVGFilter::mbShouldCompress
private

Definition at line 213 of file svgfilter.hxx.

Referenced by filter(), and implExportImpressOrDraw().

◆ mbSinglePage

bool SVGFilter::mbSinglePage
private

Definition at line 201 of file svgfilter.hxx.

Referenced by implExportDocument(), and implLookForFirstVisiblePage().

◆ mbWriterFilter

bool SVGFilter::mbWriterFilter
private

◆ mCreateOjectsCurrentMasterPage

Reference< XInterface > SVGFilter::mCreateOjectsCurrentMasterPage
private

Definition at line 227 of file svgfilter.hxx.

Referenced by implCreateObjects().

◆ mEmbeddedBitmapActionMap

ObjectMap SVGFilter::mEmbeddedBitmapActionMap
private

Definition at line 231 of file svgfilter.hxx.

Referenced by implCreateObjectsFromShape(), and implExportShape().

◆ mEmbeddedBitmapActionSet

MetaBitmapActionSet SVGFilter::mEmbeddedBitmapActionSet
private

Definition at line 230 of file svgfilter.hxx.

Referenced by implCreateObjectsFromShape(), and implExportTextEmbeddedBitmaps().

◆ mMasterPageTargets

std::vector< Reference< css::drawing::XDrawPage > > SVGFilter::mMasterPageTargets
private

◆ mnVisiblePage

sal_Int32 SVGFilter::mnVisiblePage
private

◆ mpDefaultSdrPage

SdrPage* SVGFilter::mpDefaultSdrPage
private

Impress / draw only members.

Definition at line 222 of file svgfilter.hxx.

Referenced by implExportImpressOrDraw().

◆ mpObjects

ObjectMap* SVGFilter::mpObjects
private

◆ mpSVGDoc

SvXMLElementExport* SVGFilter::mpSVGDoc
private

◆ mpSVGExport

rtl::Reference<SVGExport> SVGFilter::mpSVGExport
private

◆ mpSVGFontExport

SVGFontExport* SVGFilter::mpSVGFontExport
private

◆ mpSVGWriter

SVGActionWriter* SVGFilter::mpSVGWriter
private

◆ msClipPathId

OUString SVGFilter::msClipPathId
private

Definition at line 225 of file svgfilter.hxx.

Referenced by implExportDocumentHeaderImpressOrDraw(), and implExportDrawPages().

◆ mSelectedPages

std::vector< Reference< css::drawing::XDrawPage > > SVGFilter::mSelectedPages
private

◆ mTextFieldCharSets

UCharSetMapMap SVGFilter::mTextFieldCharSets
private

Definition at line 226 of file svgfilter.hxx.

Referenced by implGenerateMetaData().

◆ mTextShapeIdListMap

std::unordered_map< Reference< XInterface >, OUString > SVGFilter::mTextShapeIdListMap
private

Definition at line 229 of file svgfilter.hxx.

Referenced by implCreateObjectsFromShape(), and implExportTextShapeIndex().

◆ mVisiblePagePropSet

PagePropertySet SVGFilter::mVisiblePagePropSet
private

Definition at line 224 of file svgfilter.hxx.

Referenced by implExportPage(), implGenerateMetaData(), and implGetPagePropSet().

◆ mxContext

Reference< XComponentContext > SVGFilter::mxContext
private

Generally use members.

Definition at line 196 of file svgfilter.hxx.

Referenced by filterImpressOrDraw(), filterWriterOrCalc(), and implCreateObjectsFromBackground().

◆ mxDefaultPage

Reference< css::drawing::XDrawPage > SVGFilter::mxDefaultPage
private

◆ mxDstDoc

Reference< XComponent > SVGFilter::mxDstDoc
private

Definition at line 205 of file svgfilter.hxx.

Referenced by filter(), filterImpressOrDraw(), and setTargetDocument().

◆ mxSrcDoc

Reference< XComponent > SVGFilter::mxSrcDoc
private

The documentation for this class was generated from the following files: