summaryrefslogtreecommitdiff
path: root/sfx2/source/doc/doctempl.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/doc/doctempl.cxx')
-rw-r--r--sfx2/source/doc/doctempl.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx
index aa3c60327b8e..7d258b46ff95 100644
--- a/sfx2/source/doc/doctempl.cxx
+++ b/sfx2/source/doc/doctempl.cxx
@@ -41,6 +41,7 @@
#include <com/sun/star/beans/XPropertySetInfo.hpp>
#include <com/sun/star/document/XTypeDetection.hpp>
#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
+#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/frame/XComponentLoader.hpp>
#include <com/sun/star/frame/DocumentTemplates.hpp>
#include <com/sun/star/frame/XDocumentTemplates.hpp>
@@ -105,7 +106,6 @@ using ::std::advance;
#define COMMAND_TRANSFER "transfer"
#define SERVICENAME_DOCINFO "com.sun.star.document.DocumentProperties"
-#define SERVICENAME_DESKTOP "com.sun.star.frame.Desktop"
//========================================================================
@@ -889,9 +889,7 @@ sal_Bool SfxDocumentTemplates::CopyFrom
}
else
{
- OUString aService( SERVICENAME_DESKTOP );
- uno::Reference< XComponentLoader > xDesktop( ::comphelper::getProcessServiceFactory()->createInstance( aService ),
- UNO_QUERY );
+ uno::Reference< XDesktop2 > xDesktop = Desktop::create( ::comphelper::getProcessComponentContext() );;
Sequence< PropertyValue > aArgs( 1 );
aArgs[0].Name = ::rtl::OUString("Hidden");