summaryrefslogtreecommitdiff
path: root/sc/source/ui/docshell/docsh4.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/docshell/docsh4.cxx')
-rw-r--r--sc/source/ui/docshell/docsh4.cxx7
1 files changed, 2 insertions, 5 deletions
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index 7dba3539522b..df3f2ade6650 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -18,6 +18,7 @@
*/
#include <com/sun/star/embed/XEmbeddedObject.hpp>
+#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/frame/XComponentLoader.hpp>
using namespace ::com::sun::star;
@@ -2254,11 +2255,7 @@ uno::Reference< frame::XModel > ScDocShell::LoadSharedDocument()
try
{
SC_MOD()->SetInSharedDocLoading( true );
- uno::Reference< lang::XMultiServiceFactory > xFactory(
- ::comphelper::getProcessServiceFactory(), uno::UNO_QUERY_THROW );
- uno::Reference< frame::XComponentLoader > xLoader(
- xFactory->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.Desktop" ) ) ),
- uno::UNO_QUERY_THROW );
+ uno::Reference< frame::XDesktop2 > xLoader = frame::Desktop::create( ::comphelper::getProcessComponentContext() );
uno::Sequence < beans::PropertyValue > aArgs( 1 );
aArgs[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Hidden" ));
aArgs[0].Value <<= sal_True;