sc/source/ui/view/viewfun3.cxx |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 063a38a7b05fcbeb01cea99e52e0e3c18d65f1e8
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Thu May 12 11:54:17 2022 +0100
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Thu May 12 15:05:30 2022 +0200

    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.kagan...@collabora.com>

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));

Reply via email to