diff options
author | Ariel Constenla-Haile <arielch@apache.org> | 2013-04-26 21:55:57 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-05-21 16:29:33 +0100 |
commit | 8b050d1e91a6623fb2770421e564a74d6259d816 (patch) | |
tree | cd2ee3f0c91955bb45cc53c92767b1e5aabc20e1 /offapi | |
parent | f4bccae9eb48d36de9edd1fa5551e5e8de85b17e (diff) |
UI Controller Factory fixes
- "ModuleName" --> "ModuleIdentifier": the IDL definition for
css::frame::PopupMenuControllerFactory and
css::frame::StatusbarControllerFactory tells to use a property named
"ModuleIdentifier", but in the code it is named "ModuleName"
- Undocumented css::frame::ToolbarControllerFactory
- Fix service name of ToolbarControllerFactory (ToolbarControllerFactory
instead of ToolBarControllerFactory)
- Convert the three service factories to new style, and use these
new-style services in the source code
- Implement multiple inheritance: added new css::frame::XUIControllerFactory
- Added a (true) base class and implemented the three factories in a
single file
(cherry picked from commit acc7fed28f54f836b0923180431a0c180f91e98c)
Conflicts:
framework/inc/pch/precompiled_framework.hxx
framework/inc/uielement/toolbarmanager.hxx
framework/inc/uifactory/popupmenucontrollerfactory.hxx
framework/inc/uifactory/statusbarcontrollerfactory.hxx
framework/inc/uifactory/uicontrollerfactory.hxx
framework/source/uielement/addonstoolbarmanager.cxx
framework/source/uielement/menubarmanager.cxx
framework/source/uielement/popupmenucontroller.cxx
framework/source/uielement/statusbarmanager.cxx
framework/source/uielement/toolbarmanager.cxx
framework/source/uifactory/popupmenucontrollerfactory.cxx
framework/source/uifactory/statusbarcontrollerfactory.cxx
framework/source/uifactory/uicontrollerfactory.cxx
framework/source/unotypes/fwk.xml
offapi/com/sun/star/frame/PopupMenuControllerFactory.idl
offapi/com/sun/star/frame/StatusbarControllerFactory.idl
offapi/com/sun/star/frame/makefile.mk
svtools/source/uno/toolboxcontroller.cxx
Change-Id: Ia8580539badf650a84bc6e57a6b832071e011f0a
Diffstat (limited to 'offapi')
-rw-r--r-- | offapi/UnoApi_offapi.mk | 3 | ||||
-rw-r--r-- | offapi/com/sun/star/frame/PopupMenuControllerFactory.idl | 33 | ||||
-rw-r--r-- | offapi/com/sun/star/frame/StatusbarControllerFactory.idl | 36 | ||||
-rw-r--r-- | offapi/com/sun/star/frame/ToolbarControllerFactory.idl | 43 | ||||
-rw-r--r-- | offapi/com/sun/star/frame/XUIControllerFactory.idl | 72 |
5 files changed, 126 insertions, 61 deletions
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk index 395d5412073a..f1e935e94fc1 100644 --- a/offapi/UnoApi_offapi.mk +++ b/offapi/UnoApi_offapi.mk @@ -951,6 +951,7 @@ $(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/frame,\ Task \ TemplateAccess \ ToolbarController \ + ToolbarControllerFactory \ TransientDocumentsDocumentContentFactory \ )) $(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/gallery,\ @@ -2632,7 +2633,7 @@ $(eval $(call gb_UnoApi_add_idlfiles,offapi,offapi/com/sun/star/frame,\ XToolbarController \ XToolbarControllerListener \ XTransientDocumentsDocumentContentFactory \ - XUIControllerRegistration \ + XUIControllerFactory \ XUntitledNumbers \ XUrlList \ XWindowArranger \ diff --git a/offapi/com/sun/star/frame/PopupMenuControllerFactory.idl b/offapi/com/sun/star/frame/PopupMenuControllerFactory.idl index 03e0fd8098a6..d873e3da0caf 100644 --- a/offapi/com/sun/star/frame/PopupMenuControllerFactory.idl +++ b/offapi/com/sun/star/frame/PopupMenuControllerFactory.idl @@ -20,14 +20,11 @@ #ifndef __com_sun_star_frame_PopupMenuControllerFactory_idl__ #define __com_sun_star_frame_PopupMenuControllerFactory_idl__ -#include <com/sun/star/lang/XMultiComponentFactory.idl> -#include <com/sun/star/frame/XUIControllerRegistration.idl> - +#include <com/sun/star/frame/XUIControllerFactory.idl> module com { module sun { module star { module frame { - -/** specifies a factory that creates instances of registered pop-up menu controller. +/** specifies a factory that creates instances of registered popup menu controller. <p> A pop-up menu controller can be registered for a command URL and a model service name. @@ -37,35 +34,15 @@ module com { module sun { module star { module frame { @since OOo 2.0 */ - -service PopupMenuControllerFactory +service PopupMenuControllerFactory : XUIControllerFactory { - /** this interface provides functions to create new instances of a registered pop-up menu controller. - - <p> - Use <member scope="com.sun.star.lang">XMultiComponentFactory::createInstanceWithArguments()</member> to create - a new pop-up menu controller instance. Use the CommandURL as the service specifier. - - This call supports the following arguments provided as <type scope="com::sun::star::beans">PropertyValue</type>: - <ul> - <li><b>Frame</b><br>specifies the <type scope="com::sun::star::frame">XFrame</type> - instance to which the pop-up menu controller belongs to. This property must be provided to - the pop-up menu controller, otherwise it cannot dispatch its internal commands.</li> - <li><b>ModuleIdentifier</b><br>optional string that specifies in which module context the pop-up menu - controller should be created.</li> - </ul> - </p> - */ - interface com::sun::star::lang::XMultiComponentFactory; - - /** provides functions to query for, register and deregister a pop-up menu controller. + /** service constructor */ - interface com::sun::star::frame::XUIControllerRegistration; + create(); }; }; }; }; }; - #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/frame/StatusbarControllerFactory.idl b/offapi/com/sun/star/frame/StatusbarControllerFactory.idl index 173ef5d28912..7572c6cbe419 100644 --- a/offapi/com/sun/star/frame/StatusbarControllerFactory.idl +++ b/offapi/com/sun/star/frame/StatusbarControllerFactory.idl @@ -20,13 +20,10 @@ #ifndef __com_sun_star_frame_StatusbarControllerFactory_idl__ #define __com_sun_star_frame_StatusbarControllerFactory_idl__ -#include <com/sun/star/lang/XMultiComponentFactory.idl> -#include <com/sun/star/frame/XUIControllerRegistration.idl> - +#include <com/sun/star/frame/XUIControllerFactory.idl> module com { module sun { module star { module frame { - /** specifies a factory that creates instances of registered status bar controller. @@ -38,40 +35,15 @@ module com { module sun { module star { module frame { @since OOo 2.0 */ - -service StatusbarControllerFactory +service StatusbarControllerFactory : XUIControllerFactory { - /** this interface provides functions to create new instances of a registered - status bar controller. - - <p> - Use <member scope="com.sun.star.lang">XMultiComponentFactory::createInstanceWithArguments()</member> - to create a new status bar controller instance. Use the CommandURL as the - service specifier. - - This call supports the following arguments provided as - <type scope="com::sun::star::beans">PropertyValue</type>: - <ul> - <li><b>Frame</b><br>specifies the <type scope="com::sun::star::frame">XFrame</type> - instance to which the status bar controller belongs to. This - property must be provided to the status bar controller, otherwise it - cannot dispatch its internal commands.</li> - <li><b>ModuleIdentifier</b><br>optional string that specifies in which module - context the status bar controller should be created.</li> - </ul> - </p> - */ - interface com::sun::star::lang::XMultiComponentFactory; - - /** provides functions to query for, register and deregister a status bar - controller. + /** service constructor */ - interface com::sun::star::frame::XUIControllerRegistration; + create(); }; }; }; }; }; - #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/frame/ToolbarControllerFactory.idl b/offapi/com/sun/star/frame/ToolbarControllerFactory.idl new file mode 100644 index 000000000000..220046e52afc --- /dev/null +++ b/offapi/com/sun/star/frame/ToolbarControllerFactory.idl @@ -0,0 +1,43 @@ +/* + * 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_frame_ToolbarControllerFactory_idl__ +#define __com_sun_star_frame_ToolbarControllerFactory_idl__ + +#include <com/sun/star/frame/XUIControllerFactory.idl> + +module com { module sun { module star { module frame { + +/** specifies a factory that creates instances of registered toolbar controller. + + <p> + A toolbar controller can be registered for a command URL and a model service name. + </p> + + @since OOo 2.0 +*/ + +service ToolbarControllerFactory : XUIControllerFactory +{ + /** service constructor + */ + create(); +}; + +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/frame/XUIControllerFactory.idl b/offapi/com/sun/star/frame/XUIControllerFactory.idl new file mode 100644 index 000000000000..ff352f50c2d4 --- /dev/null +++ b/offapi/com/sun/star/frame/XUIControllerFactory.idl @@ -0,0 +1,72 @@ +/* + * 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_frame_XUIControllerFactory_idl__ +#define __com_sun_star_frame_XUIControllerFactory_idl__ + +#include <com/sun/star/lang/XMultiComponentFactory.idl> +#include <com/sun/star/frame/XUIControllerRegistration.idl> + +module com { module sun { module star { module frame { + +/** a factory to create User Interface controllers. + + <p> + A user interface controller can be registered for a command URL. A certain user + interface controller will be created when a user interface element contains a + registered command URL. + + @see PopupMenuControllerFactory + @see StatusbarControllerFactory + @see ToolbarControllerFactory + </p> + + @since LibreOffice 4.1 + */ +interface XUIControllerFactory +{ + /** this interface provides functions to create new instances of a registered UI controller. + + <p> + Use <member scope="com::sun::star::lang">XMultiComponentFactory::createInstanceWithArgumentsAndContext()</member> to create + a new UI controller instance. Use the CommandURL as the service specifier. + + This call supports the following arguments provided as <type scope="com::sun::star::beans">PropertyValue</type>: + <ul> + <li> + <b>Frame</b><br>specifies the <type scope="com::sun::star::frame">XFrame</type> + instance to which the UI controller belongs to. This property must be provided to + the UI controller, otherwise it cannot dispatch its internal commands. + </li> + <li> + <b>ModuleIdentifier</b><br>optional string that specifies in which module context the UI + controller should be created.</br>The module identifier can be retrieved using the + <type>ModuleManager</type>. + </li> + </ul> + </p> + */ + interface com::sun::star::lang::XMultiComponentFactory; + + /** provides functions to query for, register and deregister a popup menu controller. + */ + interface XUIControllerRegistration; +}; + +}; }; }; }; + +#endif |