summaryrefslogtreecommitdiff
path: root/sw/source/filter
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2020-09-28 20:21:52 +0300
committerMichael Weghorn <m.weghorn@posteo.de>2020-10-27 11:17:29 +0100
commit866b532d5cd7bcfe763b0a780fb5432237f8cdfe (patch)
treec6d7db378d28a9d79ed9cf85cf1089fb24acb92e /sw/source/filter
parent3fafd32754ae2207f87c1c54de7f94c663cd091f (diff)
tdf#136983 partial revert NFC ww8 cleanup: remove unused variables
This is a partial revert of LO 6.2 commit 2ec0cf500222aef55d02df80154b47fbb92970c9 I can't think of any excuse for how I possibly missed that xDocProps was being defined/used outside of this clause. Just plain stupid and blind. The good news is that the create and modified date still seem to be getting saved somehow/somewhere. So it isn't the disaster that it looks like it could have been. Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103565 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> (cherry picked from commit 1086654d6e8cc22f1f99195668db3f305437e570) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104495 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> (cherry picked from commit 19b8ded3ae18dd4070a3e21d7b980782a27e5547) Change-Id: I72ef56fa50b9e92e4ce687b132b1919cfae6c1f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104497 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sw/source/filter')
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index e908cab35162..8d4add7b34bf 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -501,7 +501,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(), uno::UNO_QUERY);
+ 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();
}