summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2013-12-12 10:24:10 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2013-12-12 10:27:14 +0100
commit2440d0ba34d6cbc9eae6d2cb196a964840f084e4 (patch)
tree220e0a7a05d35416eaa5a2e0a3f8cb77ebc12fe4 /include
parentPCH fix (diff)
downloadcore-2440d0ba34d6cbc9eae6d2cb196a964840f084e4.tar.gz
core-2440d0ba34d6cbc9eae6d2cb196a964840f084e4.zip
oox: allow a callback to be registered for shape text DML export
Change-Id: Ice4dea8da117f61d947ad14ebbfccae0d2ed94df
Diffstat (limited to 'include')
-rw-r--r--include/oox/export/drawingml.hxx17
-rw-r--r--include/oox/export/shapes.hxx2
2 files changed, 17 insertions, 2 deletions
diff --git a/include/oox/export/drawingml.hxx b/include/oox/export/drawingml.hxx
index bba93cde96a9..67feca12db67 100644
--- a/include/oox/export/drawingml.hxx
+++ b/include/oox/export/drawingml.hxx
@@ -53,6 +53,8 @@ namespace io {
}
}}}
+class OutlinerParaObject;
+
namespace oox {
namespace core {
class XmlFilterBase;
@@ -60,6 +62,16 @@ namespace core {
namespace drawingml {
+/// Interface to be implemented by the parent exporter that knows how to handle shape text.
+class OOX_DLLPUBLIC DMLTextExport
+{
+public:
+ virtual void WriteOutliner(const OutlinerParaObject& rParaObj) = 0;
+protected:
+ DMLTextExport() {}
+ virtual ~DMLTextExport() {}
+};
+
class OOX_DLLPUBLIC DrawingML {
public:
enum DocumentType { DOCUMENT_DOCX, DOCUMENT_PPTX, DOCUMENT_XLSX };
@@ -69,6 +81,8 @@ private:
/// To specify where write eg. the images to (like 'ppt', or 'word' - according to the OPC).
DocumentType meDocumentType;
+ /// Parent exporter, used for text callback.
+ DMLTextExport* mpTextExport;
protected:
::com::sun::star::uno::Any mAny;
@@ -87,7 +101,8 @@ protected:
const char* GetRelationCompPrefix();
public:
- DrawingML( ::sax_fastparser::FSHelperPtr pFS, ::oox::core::XmlFilterBase* pFB = NULL, DocumentType eDocumentType = DOCUMENT_PPTX ) : meDocumentType( eDocumentType ), mpFS( pFS ), mpFB( pFB ) {}
+ DrawingML( ::sax_fastparser::FSHelperPtr pFS, ::oox::core::XmlFilterBase* pFB = NULL, DocumentType eDocumentType = DOCUMENT_PPTX, DMLTextExport* pTextExport = 0 )
+ : meDocumentType( eDocumentType ), mpTextExport(pTextExport), mpFS( pFS ), mpFB( pFB ) {}
void SetFS( ::sax_fastparser::FSHelperPtr pFS ) { mpFS = pFS; }
::sax_fastparser::FSHelperPtr GetFS() { return mpFS; }
::oox::core::XmlFilterBase* GetFB() { return mpFB; }
diff --git a/include/oox/export/shapes.hxx b/include/oox/export/shapes.hxx
index 750d74f2a8dc..65fafc9d18f7 100644
--- a/include/oox/export/shapes.hxx
+++ b/include/oox/export/shapes.hxx
@@ -76,7 +76,7 @@ private:
public:
- ShapeExport( sal_Int32 nXmlNamespace, ::sax_fastparser::FSHelperPtr pFS, ShapeHashMap* pShapeMap = NULL, ::oox::core::XmlFilterBase* pFB = NULL, DocumentType eDocumentType = DOCUMENT_PPTX );
+ ShapeExport( sal_Int32 nXmlNamespace, ::sax_fastparser::FSHelperPtr pFS, ShapeHashMap* pShapeMap = NULL, ::oox::core::XmlFilterBase* pFB = NULL, DocumentType eDocumentType = DOCUMENT_PPTX, DMLTextExport* pTextExport = 0 );
virtual ~ShapeExport() {}
static sal_Bool NonEmptyText( ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xIface );