diff options
-rw-r--r-- | offapi/UnoApi_offapi.mk | 1 | ||||
-rw-r--r-- | offapi/com/sun/star/xforms/XForms.idl | 38 | ||||
-rw-r--r-- | sw/source/core/doc/docxforms.cxx | 12 |
3 files changed, 41 insertions, 10 deletions
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk index d04c8ffc6c08..9a6e6faf1b2d 100644 --- a/offapi/UnoApi_offapi.mk +++ b/offapi/UnoApi_offapi.mk @@ -392,6 +392,7 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/util,\ )) $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/xforms,\ Model \ + XForms \ )) $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/xml/crypto,\ NSSInitializer \ diff --git a/offapi/com/sun/star/xforms/XForms.idl b/offapi/com/sun/star/xforms/XForms.idl new file mode 100644 index 000000000000..ba23bdde6c34 --- /dev/null +++ b/offapi/com/sun/star/xforms/XForms.idl @@ -0,0 +1,38 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_xforms_Binding_idl__ +#define __com_sun_star_xforms_Binding_idl__ + +#include <com/sun/star/container/XNameContainer.idl> + + +module com { module sun { module star { module xforms { + + +/** + @since LibreOffice 4.1 +*/ +service XForms : com::sun::star::container::XNameContainer; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ 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; |