diff options
author | Noel Grandin <noel@peralex.com> | 2013-03-14 14:47:13 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-04-08 13:53:03 +0200 |
commit | 332b42860ed5503f4661d38e2745191b7039c275 (patch) | |
tree | 97d23f3fb4a96928d2e29f60b1d3a953d4b40e53 /sw | |
parent | 4cac11f8267f2f1fab2da4eb20098b193c001084 (diff) |
fdo#46808, convert xforms::XForms to new style
the service already existed, it just needed an IDL file
Change-Id: I4410dbd1e047e5e7e83c84f0b0de7155cc4fa41c
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/doc/docxforms.cxx | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/sw/source/core/doc/docxforms.cxx b/sw/source/core/doc/docxforms.cxx index 11d264b44eb4..e3d9601d0df1 100644 --- a/sw/source/core/doc/docxforms.cxx +++ b/sw/source/core/doc/docxforms.cxx @@ -26,6 +26,7 @@ #include <com/sun/star/xforms/Model.hpp> #include <com/sun/star/xforms/XModel2.hpp> #include <com/sun/star/xforms/XFormsUIHelper1.hpp> +#include <com/sun/star/xforms/XForms.hpp> #include <comphelper/processfactory.hxx> #include <tools/diagnose_ex.h> @@ -53,13 +54,6 @@ bool SwDoc::isXForms() const return mxXForms.is(); } -static Reference<XInterface> lcl_createInstance( const sal_Char* pServiceName ) -{ - OSL_ENSURE( pServiceName != NULL, "no service name" ); - return comphelper::getProcessServiceFactory()->createInstance( - OUString::createFromAscii( pServiceName ) ); -} - void SwDoc::initXForms( bool bCreateDefaultModel ) { OSL_ENSURE( ! isXForms(), "please initialize only once" ); @@ -67,9 +61,7 @@ void SwDoc::initXForms( bool bCreateDefaultModel ) try { // create XForms components - mxXForms.set( lcl_createInstance( "com.sun.star.xforms.XForms" ), - UNO_QUERY ); - OSL_ENSURE( mxXForms.is(), "can't create XForms container" ); + mxXForms = xforms::XForms::create( comphelper::getProcessComponentContext() ); // change our module identifier, to be able to have a dedicated UI Reference< XModule > xModule; |