diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2022-05-12 11:54:17 +0100 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2022-05-12 15:05:30 +0200 |
commit | 063a38a7b05fcbeb01cea99e52e0e3c18d65f1e8 (patch) | |
tree | 0c0998f021dd4586dd3a363f72eb9c4fcd46b322 | |
parent | Update git submodules (diff) | |
download | core-063a38a7b05fcbeb01cea99e52e0e3c18d65f1e8.tar.gz core-063a38a7b05fcbeb01cea99e52e0e3c18d65f1e8.zip |
Simplify this a bit
Additionally, use UNO_QUERY_THROW where the result is
dereferenced unconditionally.
Change-Id: Ia8860c037732e6f59d0a71e0ad7866121157f24a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134181
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
-rw-r--r-- | sc/source/ui/view/viewfun3.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx index d2afed84d0b1..9bb69513a8e8 100644 --- a/sc/source/ui/view/viewfun3.cxx +++ b/sc/source/ui/view/viewfun3.cxx @@ -254,8 +254,7 @@ bool ScViewFunc::CopyToClipSingleRange( ScDocument* pClipDoc, const ScRangeList& if (SfxObjectShell* pObjectShell = rDoc.GetDocumentShell()) { // Copy document properties from pObjectShell to pClipDoc (to its clip options, as it has no object shell). - uno::Reference<document::XDocumentPropertiesSupplier> xDocumentPropertiesSupplier(pObjectShell->GetModel(), uno::UNO_QUERY); - uno::Reference<util::XCloneable> xCloneable(xDocumentPropertiesSupplier->getDocumentProperties(), uno::UNO_QUERY); + uno::Reference<util::XCloneable> xCloneable(pObjectShell->getDocProperties(), uno::UNO_QUERY_THROW); std::unique_ptr<ScClipOptions> pOptions(new ScClipOptions); pOptions->m_xDocumentProperties.set(xCloneable->createClone(), uno::UNO_QUERY); pClipDoc->SetClipOptions(std::move(pOptions)); |