summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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");