24#include <com/sun/star/document/XFilter.hpp>
25#include <com/sun/star/document/XImporter.hpp>
26#include <com/sun/star/document/XExporter.hpp>
27#include <com/sun/star/document/XExtendedFilterDetection.hpp>
28#include <com/sun/star/beans/XPropertySet.hpp>
29#include <com/sun/star/lang/XComponent.hpp>
30#include <com/sun/star/lang/XServiceInfo.hpp>
32#include <com/sun/star/xml/sax/XWriter.hpp>
33#include <com/sun/star/view/XSelectionSupplier.hpp>
42#include <unordered_set>
43#include <unordered_map>
53#define SVG_EXPORT_ALLPAGES ((sal_Int32)-1)
73 SVGExport(
const css::uno::Reference< css::uno::XComponentContext >& rContext,
74 const Reference< XDocumentHandler >& rxHandler,
75 const Sequence< PropertyValue >& rFilterData );
180 XExtendedFilterDetection, XServiceInfo >
184 typedef std::unordered_set< Reference< XInterface > >
ObjectSet;
186 typedef std::unordered_set< sal_Unicode, HashUChar >
UCharSet;
228 std::unordered_map< Reference< XInterface >, OUString >
240 bool implExport(
const Sequence< PropertyValue >& rDescriptor );
259 sal_Int32 nDocWidth, sal_Int32 nDocHeight);
261 sal_Int32 nDocWidth, sal_Int32 nDocHeight);
265 sal_Int32 nFirstPage, sal_Int32 nLastPage );
266 void implExportDrawPages(
const std::vector< Reference< css::drawing::XDrawPage > >& rxPages,
267 sal_Int32 nFirstPage, sal_Int32 nLastPage );
269 const Reference< css::drawing::XDrawPage > & rxPage,
270 const Reference< css::drawing::XShapes > & xShapes,
275 bool implExportShape(
const Reference< css::drawing::XShape >& rxShape,
279 bool implCreateObjectsFromShapes(
const Reference< css::drawing::XDrawPage > & rxPage,
const Reference< css::drawing::XShapes >& rxShapes );
280 bool implCreateObjectsFromShape(
const Reference< css::drawing::XDrawPage > & rxPage,
const Reference< css::drawing::XShape >& rxShape );
289 const Reference< XPropertySet > & rxPropSet,
290 const Reference< XPropertySetInfo > & rxPropSetInfo );
299 virtual sal_Bool SAL_CALL
filter(
const Sequence< PropertyValue >& rDescriptor )
override;
300 virtual void SAL_CALL
cancel( )
override;
303 virtual void SAL_CALL
setTargetDocument(
const Reference< XComponent >& xDoc )
override;
306 virtual void SAL_CALL
setSourceDocument(
const Reference< XComponent >& xDoc )
override;
309 virtual OUString SAL_CALL
detect( Sequence< PropertyValue >& io_rDescriptor )
override;
313 explicit SVGFilter(
const Reference< XComponentContext >& rxCtx );
sal_uInt64 BitmapChecksum
const Reference< XInterface > & GetObject() const
std::unique_ptr< GDIMetaFile > mxMtf
Reference< XInterface > mxObject
bool HasRepresentation() const
const GDIMetaFile & GetRepresentation() const
ObjectRepresentation & operator=(const ObjectRepresentation &rPresentation)
virtual ~SVGExport() override
bool IsEmbedFonts() const
std::set< sal_Unicode > maEmbeddedBulletGlyphs
bool IsUseNativeTextDecoration() const
virtual void ExportMasterStyles_() override
void writeMtf(const GDIMetaFile &rMtf)
bool IsUseTinyProfile() const
virtual void ExportStyles_(bool) override
bool IsUseOpacity() const
virtual void ExportAutoStyles_() override
virtual void ExportContent_() override
bool mbIsUseNativeTextDecoration
void SetEmbeddedBulletGlyph(sal_Unicode cBullet)
bool mbIsUsePositionedCharacters
SVGExport(const css::uno::Reference< css::uno::XComponentContext > &rContext, const Reference< XDocumentHandler > &rxHandler, const Sequence< PropertyValue > &rFilterData)
virtual ErrCode exportDoc(enum ::xmloff::token::XMLTokenEnum) override
bool IsEmbeddedBulletGlyph(sal_Unicode cBullet) const
bool IsUseDTDString() const
bool IsUsePositionedCharacters() const
bool filterImpressOrDraw(const Sequence< PropertyValue > &rDescriptor)
void implGetPagePropSet(const Reference< css::drawing::XDrawPage > &rxPage)
We collect info on master page elements visibility, and placeholder text shape content.
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
SVGFontExport * mpSVGFontExport
MetaBitmapActionMap maBitmapActionMap
void implExportTiledBackground()
bool implCreateObjectsFromShapes(const Reference< css::drawing::XDrawPage > &rxPage, const Reference< css::drawing::XShapes > &rxShapes)
UCharSetMapMap mTextFieldCharSets
bool implExportImpressOrDraw(const Reference< XOutputStream > &rxOStm)
const OUString & implGetValidIDFromInterface(const Reference< XInterface > &rxIf)
void implEmbedBulletGlyphs()
void implExportBackgroundBitmaps()
void implExportTextShapeIndex()
bool filterWriterOrCalc(const Sequence< PropertyValue > &rDescriptor)
virtual void SAL_CALL cancel() override
Link< EditFieldInfo *, void > maOldFieldHdl
SVGActionWriter * mpSVGWriter
std::vector< Reference< css::drawing::XDrawPage > > mMasterPageTargets
bool implExportPage(std::u16string_view sPageId, const Reference< css::drawing::XDrawPage > &rxPage, const Reference< css::drawing::XShapes > &xShapes, bool bMaster)
virtual void SAL_CALL setTargetDocument(const Reference< XComponent > &xDoc) override
void implExportDocumentHeaderImpressOrDraw(sal_Int32 nDocX, sal_Int32 nDocY, sal_Int32 nDocWidth, sal_Int32 nDocHeight)
MetaBitmapActionSet mEmbeddedBitmapActionSet
void implExportDocumentHeaderWriterOrCalc(sal_Int32 nDocX, sal_Int32 nDocY, sal_Int32 nDocWidth, sal_Int32 nDocHeight)
SVGFilter(const Reference< XComponentContext > &rxCtx)
bool implExport(const Sequence< PropertyValue > &rDescriptor)
virtual void SAL_CALL setSourceDocument(const Reference< XComponent > &xDoc) override
SvXMLElementExport * mpSVGDoc
std::unordered_map< Reference< XInterface >, ObjectRepresentation > ObjectMap
bool implExportShape(const Reference< css::drawing::XShape > &rxShape, bool bMaster)
static Reference< XWriter > implCreateExportDocumentHandler(const Reference< XOutputStream > &rxOStm)
void implEmbedBulletGlyph(sal_Unicode cBullet, const OUString &sPathData)
virtual ~SVGFilter() override
DECL_LINK(CalcFieldHdl, EditFieldInfo *, void)
bool implExportShapes(const Reference< css::drawing::XShapes > &rxShapes, bool bMaster)
bool implExportWriterTextGraphic(const Reference< view::XSelectionSupplier > &xSelectionSupplier)
bool mbExportShapeSelection
PagePropertySet mVisiblePagePropSet
bool implCreateObjectsFromShape(const Reference< css::drawing::XDrawPage > &rxPage, const Reference< css::drawing::XShape > &rxShape)
void implRegisterInterface(const Reference< XInterface > &rxIf)
virtual OUString SAL_CALL detect(Sequence< PropertyValue > &io_rDescriptor) override
virtual OUString SAL_CALL getImplementationName() override
static OUString implGetClassFromShape(const Reference< css::drawing::XShape > &rxShape)
bool implExportDocument()
void implExportTextEmbeddedBitmaps()
SVGFilter::implExportTextEmbeddedBitmaps We export bitmaps embedded into text shapes,...
SdrPage * mpDefaultSdrPage
Impress / draw only members.
Reference< XInterface > mCreateOjectsCurrentMasterPage
bool implExportWriterOrCalc(const Reference< XOutputStream > &rxOStm)
Reference< XComponentContext > mxContext
Generally use members.
std::unordered_set< ObjectRepresentation, HashBitmap, EqualityBitmap > MetaBitmapActionSet
std::unordered_map< Reference< XInterface >, OUString > mTextShapeIdListMap
std::unordered_set< sal_Unicode, HashUChar > UCharSet
static Any implSafeGetPagePropSet(const OUString &sPropertyName, const Reference< XPropertySet > &rxPropSet, const Reference< XPropertySetInfo > &rxPropSetInfo)
std::unordered_map< OUString, UCharSet > UCharSetMap
void implCreateObjectsFromBackground(const Reference< css::drawing::XDrawPage > &rxMasterPage)
bool implLookForFirstVisiblePage()
Link< EditFieldInfo *, void > maNewFieldHdl
rtl::Reference< SVGExport > mpSVGExport
Reference< css::drawing::XDrawPage > mxDefaultPage
static OUString implGetInterfaceName(const Reference< XInterface > &rxIf)
Sequence< PropertyValue > maFilterData
virtual sal_Bool SAL_CALL filter(const Sequence< PropertyValue > &rDescriptor) override
void implGenerateScript()
bool implExportMasterPages(const std::vector< Reference< css::drawing::XDrawPage > > &rxPages, sal_Int32 nFirstPage, sal_Int32 nLastPage)
void implExportAnimations()
std::unordered_set< Reference< XInterface > > ObjectSet
std::vector< Reference< css::drawing::XDrawPage > > mSelectedPages
ObjectMap mEmbeddedBitmapActionMap
Reference< XComponent > mxSrcDoc
Reference< XComponent > mxDstDoc
std::unordered_map< Reference< XInterface >, UCharSetMap > UCharSetMapMap
PatternPropertySet maPatterProps
Reference< css::drawing::XShapes > maShapeSelection
void implExportDrawPages(const std::vector< Reference< css::drawing::XDrawPage > > &rxPages, sal_Int32 nFirstPage, sal_Int32 nLastPage)
void implGenerateMetaData()
virtual sal_Bool SAL_CALL supportsService(const OUString &sServiceName) override
Shape IDs per cluster in DGG atom.
bool operator()(const ObjectRepresentation &rObjRep1, const ObjectRepresentation &rObjRep2) const
size_t operator()(const ObjectRepresentation &rObjRep) const
size_t operator()(const sal_Unicode uchar) const
bool bIsDateTimeFieldFixed
bool bIsBackgroundVisible
bool bIsHeaderFieldVisible
SvxDateFormat nDateTimeFormat
bool bIsPageNumberFieldVisible
bool bIsDateTimeFieldVisible
bool bAreBackgroundObjectsVisible
bool bIsFooterFieldVisible
sal_Int32 nPageNumberingType
BitmapChecksum aBitmapChecksum
constexpr OStringLiteral sTiledBackgroundTag
std::unordered_map< BitmapChecksum, std::unique_ptr< GDIMetaFile > > MetaBitmapActionMap
std::map< OUString, PatternData > PatternPropertySet
constexpr OUStringLiteral sPlaceholderTag