summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/qa/extras/ww8export/ww8export3.cxx5
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx6
2 files changed, 10 insertions, 1 deletions
diff --git a/sw/qa/extras/ww8export/ww8export3.cxx b/sw/qa/extras/ww8export/ww8export3.cxx
index b5a9d336cf74..380463e96f2f 100644
--- a/sw/qa/extras/ww8export/ww8export3.cxx
+++ b/sw/qa/extras/ww8export/ww8export3.cxx
@@ -13,6 +13,7 @@
#include <com/sun/star/container/XIndexAccess.hpp>
#include <com/sun/star/drawing/FillStyle.hpp>
#include <com/sun/star/drawing/LineDash.hpp>
+#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
#include <com/sun/star/graphic/XGraphic.hpp>
#include <com/sun/star/table/ShadowFormat.hpp>
#include <com/sun/star/text/XFormField.hpp>
@@ -62,6 +63,10 @@ DECLARE_WW8EXPORT_TEST(testTdf37778_readonlySection, "tdf37778_readonlySection.d
// tdf#127862: page fill color (in this case white) was lost
uno::Reference<beans::XPropertySet> xStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
CPPUNIT_ASSERT(drawing::FillStyle_NONE != getProperty<drawing::FillStyle>(xStyle, "FillStyle"));
+
+ // tdf#136983
+ uno::Reference<document::XDocumentPropertiesSupplier> xDPS(mxComponent, uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Last printed date", sal_Int16(2009), xDPS->getDocumentProperties()->getPrintDate().Year);
}
DECLARE_WW8EXPORT_TEST(testTdf104596_wrapInHeaderTable, "tdf104596_wrapInHeaderTable.doc")
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index 90152ceca99c..f853af98aa83 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -496,7 +496,11 @@ static void WriteDop( WW8Export& rWrt )
uno::Reference<beans::XPropertySet> xProps;
if ( pDocShell )
{
- xProps.set(pDocShell->GetModel(), uno::UNO_QUERY);
+ uno::Reference<lang::XComponent> xModelComp = pDocShell->GetModel();
+ xProps.set(xModelComp, uno::UNO_QUERY);
+ uno::Reference<document::XDocumentPropertiesSupplier> xDPS(xModelComp, uno::UNO_QUERY_THROW);
+ xDocProps = xDPS->getDocumentProperties();
+ OSL_ENSURE(xDocProps.is(), "DocumentProperties is null");
rDop.lKeyProtDoc = pDocShell->GetModifyPasswordHash();
}