diff options
author | Noel Grandin <noel@peralex.com> | 2012-05-26 13:53:19 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-06-04 16:57:55 +0200 |
commit | b3c76dee6d44d07eae404b8d7341e6c88e6c4429 (patch) | |
tree | c747dd5bddf94c3b4312c7b1861a5087e76e71d6 /sfx2/source/doc/objserv.cxx | |
parent | eb68bf18f2d859486c4a737abb2536a6afe45411 (diff) |
fdo#46808, Adapt UNO services to new style, Part 7, updating ::create
Update calls to factories to use new ::create methods
Change-Id: I01d4417820f52718836c92faf3c2fae0dc96b30d
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>, added some tweaks.
Diffstat (limited to 'sfx2/source/doc/objserv.cxx')
-rw-r--r-- | sfx2/source/doc/objserv.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index 34565c86b979..7b4475af6753 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -42,6 +42,7 @@ #include <com/sun/star/task/XInteractionHandler.hpp> #include <com/sun/star/task/XStatusIndicator.hpp> #include <com/sun/star/task/XStatusIndicatorFactory.hpp> +#include <com/sun/star/frame/DocumentTemplates.hpp> #include <com/sun/star/frame/XDocumentTemplates.hpp> #include <com/sun/star/frame/XStorable.hpp> #include <comphelper/processfactory.hxx> @@ -859,10 +860,8 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq) try { uno::Reference< frame::XStorable > xStorable( GetModel(), uno::UNO_QUERY_THROW ); - ::rtl::OUString aService( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.DocumentTemplates" ) ); uno::Reference< frame::XDocumentTemplates > xTemplates( - comphelper::getProcessServiceFactory()->createInstance( aService ), - uno::UNO_QUERY_THROW ); + frame::DocumentTemplates::create(comphelper::getProcessComponentContext()) ); bOk = xTemplates->storeTemplate( aTemplateGroup, aTemplateName, xStorable ); } |