summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorHeena Gupta <heena.h.gupta@ericsson.com>2014-09-11 13:15:51 +0530
committerMichael Stahl <mstahl@redhat.com>2014-09-25 15:37:23 +0000
commite8bdd38882522591723097c028ca7a6927ee70c4 (patch)
tree737ce4a19fc81a1a493128f81fb7333a92336fac /sd
parenta924606810a5d6e9a8e3d23e491d0bea5a5d2477 (diff)
fdo#83751-FILESAVE:Custom Properties dropped while exporting to .pptx
Change-Id: Ic4b8acfc3cbd8c86b765a950d61742c229f3fb6d Reviewed-on: https://gerrit.libreoffice.org/11390 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/filter/eppt/epptooxml.hxx3
-rw-r--r--sd/source/filter/eppt/pptx-epptooxml.cxx21
2 files changed, 23 insertions, 1 deletions
diff --git a/sd/source/filter/eppt/epptooxml.hxx b/sd/source/filter/eppt/epptooxml.hxx
index 05359fc3d6ae..0197b97cfbfa 100644
--- a/sd/source/filter/eppt/epptooxml.hxx
+++ b/sd/source/filter/eppt/epptooxml.hxx
@@ -128,6 +128,9 @@ protected:
sal_Int32 GetAuthorIdAndLastIndex( const OUString& sAuthor, sal_Int32& nLastIndex );
private:
+ // Write docProps/core.xml and docprops/custom.xml and docprops/app.xml
+ void writeDocumentProperties();
+
void AddLayoutIdAndRelation( ::sax_fastparser::FSHelperPtr pFS, sal_Int32 nLayoutFileId );
virtual OUString implGetImplementationName() const SAL_OVERRIDE;
diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx
index e829fca132a7..d00f4d8f96b0 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -64,6 +64,9 @@
#include "pptexanimations.hxx"
+#include <com/sun/star/document/XDocumentProperties.hpp>
+#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
+
// presentation namespaces
#define PNMSS FSNS( XML_xmlns, XML_a ), "http://schemas.openxmlformats.org/drawingml/2006/main", \
FSNS( XML_xmlns, XML_p ), "http://schemas.openxmlformats.org/presentationml/2006/main", \
@@ -318,6 +321,18 @@ PowerPointExport::~PowerPointExport()
{
}
+void PowerPointExport::writeDocumentProperties()
+{
+ uno::Reference<document::XDocumentPropertiesSupplier> xDPS( mXModel, uno::UNO_QUERY );
+ uno::Reference<document::XDocumentProperties> xDocProps = xDPS->getDocumentProperties();
+
+ if (xDocProps.is())
+ {
+ PowerPointExport& mrExport(*this);
+ mrExport.exportDocumentProperties( xDocProps );
+ }
+}
+
bool PowerPointExport::importDocument() throw()
{
return false;
@@ -328,6 +343,11 @@ bool PowerPointExport::exportDocument() throw (css::uno::RuntimeException, std::
DrawingML::ResetCounters();
maShapeMap.clear ();
+ mXModel.set( getModel(), UNO_QUERY );
+
+ //write document properties
+ writeDocumentProperties();
+
addRelation( "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument", "ppt/presentation.xml" );
mPresentationFS = openFragmentStreamWithSerializer( "ppt/presentation.xml",
@@ -339,7 +359,6 @@ bool PowerPointExport::exportDocument() throw (css::uno::RuntimeException, std::
mPresentationFS->startElementNS( XML_p, XML_presentation, PNMSS, FSEND );
- mXModel.set( getModel(), UNO_QUERY );
mXStatusIndicator.set( getStatusIndicator(), UNO_QUERY );
OUString sBaseURI( "BaseURI");