[Libreoffice-commits] core.git: sd/source
Heena Gupta
heena.h.gupta at ericsson.com
Thu Sep 25 08:37:58 PDT 2014
sd/source/filter/eppt/epptooxml.hxx | 3 +++
sd/source/filter/eppt/pptx-epptooxml.cxx | 21 ++++++++++++++++++++-
2 files changed, 23 insertions(+), 1 deletion(-)
New commits:
commit e8bdd38882522591723097c028ca7a6927ee70c4
Author: Heena Gupta <heena.h.gupta at ericsson.com>
Date: Thu Sep 11 13:15:51 2014 +0530
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 at redhat.com>
Tested-by: Michael Stahl <mstahl at redhat.com>
diff --git a/sd/source/filter/eppt/epptooxml.hxx b/sd/source/filter/eppt/epptooxml.hxx
index 05359fc..0197b97 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 e829fca..d00f4d8 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");
More information about the Libreoffice-commits
mailing list