summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorThomas Lange [tl] <tl@openoffice.org>2010-06-09 14:50:43 +0200
committerThomas Lange [tl] <tl@openoffice.org>2010-06-09 14:50:43 +0200
commitb8c5868b31b52c0ccdcc401342b55c947b19e89d (patch)
tree9cf9d5b464ec7587bcc76f08932665fa2703849f /framework
parent79333b34480c401e3a43e3add609db5874d0b1a7 (diff)
parente03596eaf693b9809cffe86c21658a5ce381d6c3 (diff)
cws tl74: merge with DEV300_m81
Diffstat (limited to 'framework')
-rw-r--r--framework/inc/classes/sfxhelperfunctions.hxx5
-rw-r--r--framework/inc/classes/xmlnamespaces.hxx65
-rw-r--r--framework/inc/framework.hrc25
-rw-r--r--framework/inc/helper/imageproducer.hxx4
-rw-r--r--framework/inc/helper/popupmenucontrollerbase.hxx145
-rw-r--r--framework/inc/helper/uiconfigelementwrapperbase.hxx3
-rw-r--r--framework/inc/helper/uielementwrapperbase.hxx3
-rw-r--r--framework/inc/properties.h8
-rw-r--r--framework/inc/threadhelp/fairrwlock.hxx1
-rw-r--r--framework/inc/uielement/controlmenucontroller.hxx7
-rw-r--r--framework/inc/uielement/fontmenucontroller.hxx7
-rw-r--r--framework/inc/uielement/fontsizemenucontroller.hxx7
-rw-r--r--framework/inc/uielement/headermenucontroller.hxx7
-rw-r--r--framework/inc/uielement/langselectionmenucontroller.hxx7
-rw-r--r--framework/inc/uielement/macrosmenucontroller.hxx7
-rw-r--r--framework/inc/uielement/newmenucontroller.hxx7
-rw-r--r--framework/inc/uielement/objectmenucontroller.hxx7
-rw-r--r--framework/inc/uielement/popupmenucontroller.hxx80
-rw-r--r--framework/inc/uielement/recentfilesmenucontroller.hxx7
-rw-r--r--framework/inc/uielement/toolbarmanager.hxx11
-rw-r--r--framework/inc/uielement/toolbarsmenucontroller.hxx7
-rw-r--r--framework/inc/uielement/uicommanddescription.hxx2
-rw-r--r--framework/inc/uielement/uielementtypenames.hxx1
-rw-r--r--framework/inc/xml/toolboxlayoutdocumenthandler.hxx59
-rw-r--r--framework/prj/build.lst2
-rw-r--r--framework/prj/d.lst3
-rw-r--r--framework/qa/unoapi/Test.java51
-rwxr-xr-xframework/qa/unoapi/knownissues.xcl3
-rwxr-xr-xframework/qa/unoapi/makefile.mk33
-rw-r--r--framework/source/classes/resource.src2
-rw-r--r--framework/source/classes/sfxhelperfunctions.cxx23
-rw-r--r--framework/source/helper/imageproducer.cxx2
-rw-r--r--framework/source/helper/makefile.mk1
-rw-r--r--framework/source/helper/popupmenucontrollerbase.cxx429
-rw-r--r--framework/source/helper/uiconfigelementwrapperbase.cxx20
-rw-r--r--framework/source/helper/uielementwrapperbase.cxx17
-rw-r--r--framework/source/interaction/quietinteraction.cxx16
-rw-r--r--framework/source/layoutmanager/layoutmanager.cxx8
-rw-r--r--framework/source/register/registertemp.cxx5
-rw-r--r--framework/source/services/backingwindow.cxx239
-rw-r--r--framework/source/services/backingwindow.hxx23
-rw-r--r--framework/source/services/fwk_services.src92
-rw-r--r--framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx3
-rw-r--r--framework/source/uiconfiguration/uiconfigurationmanager.cxx3
-rw-r--r--framework/source/uielement/comboboxtoolbarcontroller.cxx1
-rw-r--r--framework/source/uielement/controlmenucontroller.cxx18
-rw-r--r--framework/source/uielement/dropdownboxtoolbarcontroller.cxx1
-rw-r--r--framework/source/uielement/edittoolbarcontroller.cxx1
-rw-r--r--framework/source/uielement/fontmenucontroller.cxx17
-rw-r--r--framework/source/uielement/fontsizemenucontroller.cxx18
-rw-r--r--framework/source/uielement/headermenucontroller.cxx19
-rw-r--r--framework/source/uielement/imagebuttontoolbarcontroller.cxx1
-rw-r--r--framework/source/uielement/langselectionmenucontroller.cxx19
-rw-r--r--framework/source/uielement/langselectionstatusbarcontroller.cxx5
-rw-r--r--framework/source/uielement/macrosmenucontroller.cxx7
-rw-r--r--framework/source/uielement/makefile.mk1
-rw-r--r--framework/source/uielement/menubarmanager.cxx11
-rw-r--r--framework/source/uielement/newmenucontroller.cxx13
-rw-r--r--framework/source/uielement/objectmenucontroller.cxx7
-rw-r--r--framework/source/uielement/popupmenucontroller.cxx248
-rw-r--r--framework/source/uielement/progressbarwrapper.cxx1
-rw-r--r--framework/source/uielement/recentfilesmenucontroller.cxx44
-rw-r--r--framework/source/uielement/rootitemcontainer.cxx1
-rw-r--r--framework/source/uielement/spinfieldtoolbarcontroller.cxx1
-rw-r--r--framework/source/uielement/statusbarmanager.cxx1
-rw-r--r--framework/source/uielement/togglebuttontoolbarcontroller.cxx1
-rw-r--r--framework/source/uielement/toolbarmanager.cxx246
-rw-r--r--framework/source/uielement/toolbarsmenucontroller.cxx24
-rw-r--r--framework/source/uielement/toolbarwrapper.cxx1
-rw-r--r--framework/source/uielement/uicommanddescription.cxx4
-rw-r--r--framework/source/xml/makefile.mk1
-rw-r--r--framework/source/xml/menudocumenthandler.cxx14
-rw-r--r--framework/source/xml/toolboxconfiguration.cxx1
-rw-r--r--framework/source/xml/toolboxlayoutdocumenthandler.cxx58
-rw-r--r--framework/uiconfig/startmodule/accelerator/en-GB/default.xml28
-rw-r--r--framework/uiconfig/startmodule/accelerator/en-US/default.xml28
-rw-r--r--framework/util/exports.map10
-rw-r--r--framework/util/makefile.mk11
78 files changed, 1114 insertions, 1205 deletions
diff --git a/framework/inc/classes/sfxhelperfunctions.hxx b/framework/inc/classes/sfxhelperfunctions.hxx
index ab20e9f0f25f..ac3fa472f249 100644
--- a/framework/inc/classes/sfxhelperfunctions.hxx
+++ b/framework/inc/classes/sfxhelperfunctions.hxx
@@ -40,6 +40,7 @@ typedef svt::StatusbarController* ( *pfunc_setStatusBarControllerCreator)( const
typedef void ( *pfunc_getRefreshToolbars)( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame );
typedef void ( *pfunc_createDockingWindow)( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& rResourceURL );
typedef bool ( *pfunc_isDockingWindowVisible)( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& rResourceURL );
+typedef void ( *pfunc_activateToolPanel)( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& i_rFrame, const ::rtl::OUString& i_rPanelURL );
namespace framework
{
@@ -63,6 +64,10 @@ void SAL_CALL CreateDockingWindow( const ::com::sun::star::uno::Reference< ::com
pfunc_isDockingWindowVisible SAL_CALL SetIsDockingWindowVisible( pfunc_isDockingWindowVisible pIsDockingWindowVisible );
bool SAL_CALL IsDockingWindowVisible( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& rResourceURL );
+
+pfunc_activateToolPanel SAL_CALL SetActivateToolPanel( pfunc_activateToolPanel i_pActivator );
+
+void SAL_CALL ActivateToolPanel( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& i_rFrame, const ::rtl::OUString& i_rPanelURL );
}
#endif // __FRAMEWORK_CLASSES_SFXHELPERFUNCTIONS_HXX_
diff --git a/framework/inc/classes/xmlnamespaces.hxx b/framework/inc/classes/xmlnamespaces.hxx
deleted file mode 100644
index 60a3de4b68ba..000000000000
--- a/framework/inc/classes/xmlnamespaces.hxx
+++ /dev/null
@@ -1,65 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef __FRAMEWORK_CLASSES_XMLNAMESPACES_HXX_
-#define __FRAMEWORK_CLASSES_XMLNAMESPACES_HXX_
-
-#include <com/sun/star/xml/sax/SAXException.hpp>
-
-#include <map>
-
-namespace framework
-{
-
-class XMLNamespaces
-{
- public:
- XMLNamespaces();
- XMLNamespaces( const XMLNamespaces& );
- virtual ~XMLNamespaces();
-
- void addNamespace( const ::rtl::OUString& aName, const ::rtl::OUString& aValue )
- throw( ::com::sun::star::xml::sax::SAXException );
-
- ::rtl::OUString applyNSToAttributeName( const ::rtl::OUString& ) const
- throw( ::com::sun::star::xml::sax::SAXException );
- ::rtl::OUString applyNSToElementName( const ::rtl::OUString& ) const
- throw( ::com::sun::star::xml::sax::SAXException );
-
- private:
- typedef ::std::map< ::rtl::OUString, ::rtl::OUString > NamespaceMap;
-
- ::rtl::OUString getNamespaceValue( const ::rtl::OUString& aNamespace ) const
- throw( ::com::sun::star::xml::sax::SAXException );
-
- ::rtl::OUString m_aDefaultNamespace;
- NamespaceMap m_aNamespaceMap;
-};
-
-}
-
-#endif // __FRAMEWORK_XMLNAMESPACES_HXX_
diff --git a/framework/inc/framework.hrc b/framework/inc/framework.hrc
index e49192aa7c33..eea91edeaa07 100644
--- a/framework/inc/framework.hrc
+++ b/framework/inc/framework.hrc
@@ -51,19 +51,10 @@
#define STR_BACKING_CREATE 3
#define STR_BACKING_TEMPLATE 4
#define STR_BACKING_FILE 5
-#define BMP_BACKING_WRITER 6
-#define BMP_BACKING_CALC 7
-#define BMP_BACKING_IMPRESS 8
-#define BMP_BACKING_DRAW 9
-#define BMP_BACKING_DATABASE 10
-#define BMP_BACKING_FORMULA 11
-#define BMP_BACKING_OPENFILE 12
-#define BMP_BACKING_OPENTEMPLATE 13
-#define STR_BACKING_EXTHELP 15
-#define STR_BACKING_REGHELP 17
-#define STR_BACKING_INFOHELP 19
-#define STR_BACKING_TPLREP 21
-#define BMP_BACKING_FOLDER 22
+#define STR_BACKING_EXTHELP 6
+#define STR_BACKING_REGHELP 7
+#define STR_BACKING_INFOHELP 8
+#define STR_BACKING_TPLREP 9
#define RES_BACKING_IMAGES (DLG_BACKING+1)
#define RES_BACKING_IMAGES_HC (DLG_BACKING+2)
@@ -77,6 +68,14 @@
#define BMP_BACKING_REG 7
#define BMP_BACKING_INFO 8
#define BMP_BACKING_TPLREP 9
+#define BMP_BACKING_WRITER 10
+#define BMP_BACKING_CALC 11
+#define BMP_BACKING_IMPRESS 12
+#define BMP_BACKING_DRAW 13
+#define BMP_BACKING_DATABASE 14
+#define BMP_BACKING_FORMULA 15
+#define BMP_BACKING_OPENFILE 16
+#define BMP_BACKING_OPENTEMPLATE 17
// Ids of TabWindow
#define WIN_TABWINDOW (RID_FWK_DIALOG_START+101)
diff --git a/framework/inc/helper/imageproducer.hxx b/framework/inc/helper/imageproducer.hxx
index 6d8885a5fa96..dff0ccfd1049 100644
--- a/framework/inc/helper/imageproducer.hxx
+++ b/framework/inc/helper/imageproducer.hxx
@@ -39,11 +39,11 @@
namespace framework
{
-typedef Image ( *pfunc_getImage)( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& aURL, BOOL bBig, BOOL bHiContrast );
+typedef Image ( *pfunc_getImage)( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& aURL, BOOL bBig, BOOL bHiContrast );
pfunc_getImage SAL_CALL SetImageProducer( pfunc_getImage pGetImageFunc );
-Image SAL_CALL GetImageFromURL( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& aURL, BOOL bBig, BOOL bHiContrast );
+Image SAL_CALL GetImageFromURL( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& aURL, BOOL bBig, BOOL bHiContrast );
}
diff --git a/framework/inc/helper/popupmenucontrollerbase.hxx b/framework/inc/helper/popupmenucontrollerbase.hxx
deleted file mode 100644
index e723b36aec3b..000000000000
--- a/framework/inc/helper/popupmenucontrollerbase.hxx
+++ /dev/null
@@ -1,145 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef __FRAMEWORK_HELPER_POPUPMENUCONTROLLERBASE_HXX_
-#define __FRAMEWORK_HELPER_POPUPMENUCONTROLLERBASE_HXX_
-
-//_________________________________________________________________________________________________________________
-// my own includes
-//_________________________________________________________________________________________________________________
-
-#include <threadhelp/threadhelpbase.hxx>
-#include <macros/generic.hxx>
-#include <macros/xinterface.hxx>
-#include <macros/xtypeprovider.hxx>
-#include <macros/xserviceinfo.hxx>
-#include <stdtypes.h>
-
-//_________________________________________________________________________________________________________________
-// interface includes
-//_________________________________________________________________________________________________________________
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/lang/XTypeProvider.hpp>
-#include <com/sun/star/lang/XInitialization.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/frame/XFrame.hpp>
-#include <com/sun/star/frame/XDispatchProvider.hpp>
-#include <com/sun/star/frame/XDispatch.hpp>
-#include <com/sun/star/frame/XStatusListener.hpp>
-#include <com/sun/star/frame/XPopupMenuController.hpp>
-#include <com/sun/star/uri/XUriReferenceFactory.hpp>
-#include <com/sun/star/uri/XUriReference.hpp>
-#include <com/sun/star/util/XURLTransformer.hpp>
-//_________________________________________________________________________________________________________________
-// includes of other projects
-//_________________________________________________________________________________________________________________
-#include <toolkit/awt/vclxmenu.hxx>
-#include <cppuhelper/weak.hxx>
-#include <rtl/ustring.hxx>
-
-namespace framework
-{
- class PopupMenuControllerBase : public com::sun::star::lang::XTypeProvider ,
- public com::sun::star::lang::XServiceInfo ,
- public ::com::sun::star::frame::XPopupMenuController ,
- public com::sun::star::lang::XInitialization ,
- public com::sun::star::frame::XStatusListener ,
- public com::sun::star::awt::XMenuListener ,
- public com::sun::star::frame::XDispatchProvider ,
- public com::sun::star::frame::XDispatch ,
- public com::sun::star::lang::XComponent ,
- protected ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses.
- public ::cppu::OBroadcastHelper ,
- public ::cppu::OWeakObject
- {
- public:
- PopupMenuControllerBase( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
- virtual ~PopupMenuControllerBase();
-
- // XInterface, XTypeProvider, XServiceInfo
- FWK_DECLARE_XINTERFACE
- FWK_DECLARE_XTYPEPROVIDER
-
- // XServiceInfo
- virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException) = 0;
- virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException) = 0;
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException) = 0;
-
- // XPopupMenuController
- virtual void SAL_CALL setPopupMenu( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu >& PopupMenu ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL updatePopupMenu() throw (::com::sun::star::uno::RuntimeException);
-
- // XInitialization
- virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
-
- // XStatusListener
- virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException ) = 0;
-
- // XMenuListener
- virtual void SAL_CALL highlight( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL select( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL activate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL deactivate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw (::com::sun::star::uno::RuntimeException);
-
- // XDispatchProvider
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > SAL_CALL queryDispatch( const ::com::sun::star::util::URL& aURL, const ::rtl::OUString& sTarget, sal_Int32 nFlags ) throw( ::com::sun::star::uno::RuntimeException );
- virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > > SAL_CALL queryDispatches( const ::com::sun::star::uno::Sequence< ::com::sun::star::frame::DispatchDescriptor >& lDescriptor ) throw( ::com::sun::star::uno::RuntimeException );
-
- // XDispatch
- virtual void SAL_CALL dispatch( const ::com::sun::star::util::URL& aURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& seqProperties ) throw( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL addStatusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >& xControl, const ::com::sun::star::util::URL& aURL ) throw( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL removeStatusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >& xControl, const ::com::sun::star::util::URL& aURL ) throw( ::com::sun::star::uno::RuntimeException );
-
- // XEventListener
- virtual void SAL_CALL disposing( const com::sun::star::lang::EventObject& Source ) throw ( ::com::sun::star::uno::RuntimeException );
-
- // XComponent
- virtual void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException);
-
- protected:
- virtual void resetPopupMenu( com::sun::star::uno::Reference< com::sun::star::awt::XPopupMenu >& rPopupMenu );
- virtual void impl_setPopupMenu();
- virtual void impl_select(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch >& _xDispatch,const ::com::sun::star::util::URL& aURL);
- ::rtl::OUString determineBaseURL( const ::rtl::OUString& aURL );
-
-
- bool m_bInitialized;
- bool m_bDisposed;
- rtl::OUString m_aCommandURL;
- rtl::OUString m_aBaseURL;
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > m_xDispatch;
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > m_xFrame;
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceManager;
- ::com::sun::star::uno::Reference< ::com::sun::star::util::XURLTransformer > m_xURLTransformer;
- ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu > m_xPopupMenu;
- ::cppu::OMultiTypeInterfaceContainerHelper m_aListenerContainer; // container for ALL Listener
- };
-}
-
-#endif // __FRAMEWORK_HELPER_POPUPMENUCONTROLLERBASE_HXX_
diff --git a/framework/inc/helper/uiconfigelementwrapperbase.hxx b/framework/inc/helper/uiconfigelementwrapperbase.hxx
index c3ec5075cc07..05ab216d6f06 100644
--- a/framework/inc/helper/uiconfigelementwrapperbase.hxx
+++ b/framework/inc/helper/uiconfigelementwrapperbase.hxx
@@ -101,6 +101,9 @@ class UIConfigElementWrapperBase : public ::com::sun::star::lang::XTypeProvider
virtual void SAL_CALL setSettings( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >& UISettings ) throw (::com::sun::star::uno::RuntimeException);
// XUIElement
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > SAL_CALL getFrame() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getResourceURL() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int16 SAL_CALL getType() throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getRealInterface() throw (::com::sun::star::uno::RuntimeException) = 0;
// XUpdatable
diff --git a/framework/inc/helper/uielementwrapperbase.hxx b/framework/inc/helper/uielementwrapperbase.hxx
index e5df1a142826..bc83765b09fe 100644
--- a/framework/inc/helper/uielementwrapperbase.hxx
+++ b/framework/inc/helper/uielementwrapperbase.hxx
@@ -92,6 +92,9 @@ class UIElementWrapperBase : public ::com::sun::star::lang::XTypeProvider
virtual void SAL_CALL update() throw (::com::sun::star::uno::RuntimeException);
// XUIElement
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > SAL_CALL getFrame() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getResourceURL() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int16 SAL_CALL getType() throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getRealInterface() throw (::com::sun::star::uno::RuntimeException) = 0;
//-------------------------------------------------------------------------------------------------------------
diff --git a/framework/inc/properties.h b/framework/inc/properties.h
index f0358ef6f1a0..5a32a42a28cc 100644
--- a/framework/inc/properties.h
+++ b/framework/inc/properties.h
@@ -217,6 +217,14 @@ namespace framework{
#define UICOMMANDDESCRIPTION_NAMEACCESS_COMMANDROTATEIMAGELIST "private:resource/image/commandrotateimagelist"
#define UICOMMANDDESCRIPTION_NAMEACCESS_COMMANDMIRRORIMAGELIST "private:resource/image/commandmirrorimagelist"
+#define UICOMMANDDESCRIPTION_PROPNAME_PROPERTIES "Properties"
+#define UICOMMANDDESCRIPTION_PROPNAME_POPUP "Popup"
+
+#define UICOMMANDDESCRIPTION_PROPERTIES_IMAGE 1
+#define UICOMMANDDESCRIPTION_PROPERTIES_IMAGE_MIRRORED 2
+#define UICOMMANDDESCRIPTION_PROPERTIES_IMAGE_ROTATED 4
+#define UICOMMANDDESCRIPTION_PROPERTIES_TOGGLEBUTTON 8
+
//_______________________________________________
/** properties for "AutoRecovery" class */
diff --git a/framework/inc/threadhelp/fairrwlock.hxx b/framework/inc/threadhelp/fairrwlock.hxx
index af9617a9ba47..0f984c8d03f9 100644
--- a/framework/inc/threadhelp/fairrwlock.hxx
+++ b/framework/inc/threadhelp/fairrwlock.hxx
@@ -40,7 +40,6 @@
// interface includes
//_________________________________________________________________________________________________________________
#include <com/sun/star/uno/XInterface.hpp>
-#include <com/sun/star/lang/DisposedException.hpp>
//_________________________________________________________________________________________________________________
// other includes
diff --git a/framework/inc/uielement/controlmenucontroller.hxx b/framework/inc/uielement/controlmenucontroller.hxx
index a1be2ee47b3b..6e0c9deb03c0 100644
--- a/framework/inc/uielement/controlmenucontroller.hxx
+++ b/framework/inc/uielement/controlmenucontroller.hxx
@@ -32,7 +32,7 @@
// my own includes
//_________________________________________________________________________________________________________________
-#include <helper/popupmenucontrollerbase.hxx>
+#include <macros/xserviceinfo.hxx>
#include <stdtypes.h>
//_________________________________________________________________________________________________________________
@@ -52,6 +52,7 @@
//_________________________________________________________________________________________________________________
// includes of other projects
//_________________________________________________________________________________________________________________
+#include <svtools/popupmenucontrollerbase.hxx>
#include <toolkit/awt/vclxmenu.hxx>
#include <cppuhelper/weak.hxx>
#include <rtl/ustring.hxx>
@@ -59,8 +60,10 @@
class PopupMenu;
namespace framework
{
- class ControlMenuController : public PopupMenuControllerBase
+ class ControlMenuController : public svt::PopupMenuControllerBase
{
+ using svt::PopupMenuControllerBase::disposing;
+
public:
ControlMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
virtual ~ControlMenuController();
diff --git a/framework/inc/uielement/fontmenucontroller.hxx b/framework/inc/uielement/fontmenucontroller.hxx
index f14680a49030..79905658839b 100644
--- a/framework/inc/uielement/fontmenucontroller.hxx
+++ b/framework/inc/uielement/fontmenucontroller.hxx
@@ -32,7 +32,7 @@
// my own includes
//_________________________________________________________________________________________________________________
-#include <helper/popupmenucontrollerbase.hxx>
+#include <macros/xserviceinfo.hxx>
#include <stdtypes.h>
//_________________________________________________________________________________________________________________
@@ -50,14 +50,17 @@
//_________________________________________________________________________________________________________________
// includes of other projects
//_________________________________________________________________________________________________________________
+#include <svtools/popupmenucontrollerbase.hxx>
#include <toolkit/awt/vclxmenu.hxx>
#include <cppuhelper/weak.hxx>
#include <rtl/ustring.hxx>
namespace framework
{
- class FontMenuController : public PopupMenuControllerBase
+ class FontMenuController : public svt::PopupMenuControllerBase
{
+ using svt::PopupMenuControllerBase::disposing;
+
public:
FontMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
virtual ~FontMenuController();
diff --git a/framework/inc/uielement/fontsizemenucontroller.hxx b/framework/inc/uielement/fontsizemenucontroller.hxx
index d0afe40154fe..4e5623084908 100644
--- a/framework/inc/uielement/fontsizemenucontroller.hxx
+++ b/framework/inc/uielement/fontsizemenucontroller.hxx
@@ -32,7 +32,7 @@
// my own includes
//_________________________________________________________________________________________________________________
-#include <helper/popupmenucontrollerbase.hxx>
+#include <macros/xserviceinfo.hxx>
#include <stdtypes.h>
//_________________________________________________________________________________________________________________
@@ -51,14 +51,17 @@
//_________________________________________________________________________________________________________________
// includes of other projects
//_________________________________________________________________________________________________________________
+#include <svtools/popupmenucontrollerbase.hxx>
#include <toolkit/awt/vclxmenu.hxx>
#include <cppuhelper/weak.hxx>
#include <rtl/ustring.hxx>
namespace framework
{
- class FontSizeMenuController : public PopupMenuControllerBase
+ class FontSizeMenuController : public svt::PopupMenuControllerBase
{
+ using svt::PopupMenuControllerBase::disposing;
+
public:
FontSizeMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
virtual ~FontSizeMenuController();
diff --git a/framework/inc/uielement/headermenucontroller.hxx b/framework/inc/uielement/headermenucontroller.hxx
index 8ec012e80319..0deeb878156d 100644
--- a/framework/inc/uielement/headermenucontroller.hxx
+++ b/framework/inc/uielement/headermenucontroller.hxx
@@ -32,7 +32,7 @@
// my own includes
//_________________________________________________________________________________________________________________
-#include <helper/popupmenucontrollerbase.hxx>
+#include <macros/xserviceinfo.hxx>
#include <stdtypes.h>
//_________________________________________________________________________________________________________________
@@ -52,14 +52,17 @@
//_________________________________________________________________________________________________________________
// includes of other projects
//_________________________________________________________________________________________________________________
+#include <svtools/popupmenucontrollerbase.hxx>
#include <toolkit/awt/vclxmenu.hxx>
#include <cppuhelper/weak.hxx>
#include <rtl/ustring.hxx>
namespace framework
{
- class HeaderMenuController : public PopupMenuControllerBase
+ class HeaderMenuController : public svt::PopupMenuControllerBase
{
+ using svt::PopupMenuControllerBase::disposing;
+
public:
HeaderMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager,bool _bFooter = sal_False );
virtual ~HeaderMenuController();
diff --git a/framework/inc/uielement/langselectionmenucontroller.hxx b/framework/inc/uielement/langselectionmenucontroller.hxx
index 65f6d6cd5e99..257638ecd77f 100644
--- a/framework/inc/uielement/langselectionmenucontroller.hxx
+++ b/framework/inc/uielement/langselectionmenucontroller.hxx
@@ -32,7 +32,7 @@
// my own includes
//_________________________________________________________________________________________________________________
-#include <helper/popupmenucontrollerbase.hxx>
+#include <macros/xserviceinfo.hxx>
#include <stdtypes.h>
//_________________________________________________________________________________________________________________
@@ -51,6 +51,7 @@
//_________________________________________________________________________________________________________________
// includes of other projects
//_________________________________________________________________________________________________________________
+#include <svtools/popupmenucontrollerbase.hxx>
#include <toolkit/awt/vclxmenu.hxx>
#include <cppuhelper/weak.hxx>
#include <rtl/ustring.hxx>
@@ -59,8 +60,10 @@
namespace framework
{
- class LanguageSelectionMenuController : public PopupMenuControllerBase
+ class LanguageSelectionMenuController : public svt::PopupMenuControllerBase
{
+ using svt::PopupMenuControllerBase::disposing;
+
public:
LanguageSelectionMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
virtual ~LanguageSelectionMenuController();
diff --git a/framework/inc/uielement/macrosmenucontroller.hxx b/framework/inc/uielement/macrosmenucontroller.hxx
index 6070a44d3564..1e8b9024eaca 100644
--- a/framework/inc/uielement/macrosmenucontroller.hxx
+++ b/framework/inc/uielement/macrosmenucontroller.hxx
@@ -28,7 +28,7 @@
#ifndef __FRAMEWORK_UIELEMENT_MACROSMENUCONTROLLER_HXX_
#define __FRAMEWORK_UIELEMENT_MACROSMENUCONTROLLER_HXX_
-#include <helper/popupmenucontrollerbase.hxx>
+#include <macros/xserviceinfo.hxx>
#include <stdtypes.h>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XTypeProvider.hpp>
@@ -40,6 +40,7 @@
#include <com/sun/star/frame/XStatusListener.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/frame/XPopupMenuController.hpp>
+#include <svtools/popupmenucontrollerbase.hxx>
#include <toolkit/awt/vclxmenu.hxx>
#include <cppuhelper/weak.hxx>
#include <vcl/menu.hxx>
@@ -47,8 +48,10 @@
namespace framework
{
- class MacrosMenuController : public PopupMenuControllerBase
+ class MacrosMenuController : public svt::PopupMenuControllerBase
{
+ using svt::PopupMenuControllerBase::disposing;
+
struct ExecuteInfo
{
::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > xDispatch;
diff --git a/framework/inc/uielement/newmenucontroller.hxx b/framework/inc/uielement/newmenucontroller.hxx
index e937623b44b9..5e14b70f0044 100644
--- a/framework/inc/uielement/newmenucontroller.hxx
+++ b/framework/inc/uielement/newmenucontroller.hxx
@@ -32,7 +32,7 @@
// my own includes
//_________________________________________________________________________________________________________________
-#include <helper/popupmenucontrollerbase.hxx>
+#include <macros/xserviceinfo.hxx>
#include <stdtypes.h>
//_________________________________________________________________________________________________________________
@@ -53,6 +53,7 @@
//_________________________________________________________________________________________________________________
// includes of other projects
//_________________________________________________________________________________________________________________
+#include <svtools/popupmenucontrollerbase.hxx>
#include <toolkit/awt/vclxmenu.hxx>
#include <cppuhelper/weak.hxx>
#include <rtl/ustring.hxx>
@@ -71,8 +72,10 @@ namespace framework
::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > xDispatch;
};
- class NewMenuController : public PopupMenuControllerBase
+ class NewMenuController : public svt::PopupMenuControllerBase
{
+ using svt::PopupMenuControllerBase::disposing;
+
public:
NewMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
virtual ~NewMenuController();
diff --git a/framework/inc/uielement/objectmenucontroller.hxx b/framework/inc/uielement/objectmenucontroller.hxx
index 94c1d849e197..7a03dfd1458e 100644
--- a/framework/inc/uielement/objectmenucontroller.hxx
+++ b/framework/inc/uielement/objectmenucontroller.hxx
@@ -32,7 +32,7 @@
// my own includes
//_________________________________________________________________________________________________________________
-#include <helper/popupmenucontrollerbase.hxx>
+#include <macros/xserviceinfo.hxx>
#include <stdtypes.h>
//_________________________________________________________________________________________________________________
@@ -51,14 +51,17 @@
//_________________________________________________________________________________________________________________
// includes of other projects
//_________________________________________________________________________________________________________________
+#include <svtools/popupmenucontrollerbase.hxx>
#include <toolkit/awt/vclxmenu.hxx>
#include <cppuhelper/weak.hxx>
#include <rtl/ustring.hxx>
namespace framework
{
- class ObjectMenuController : public PopupMenuControllerBase
+ class ObjectMenuController : public svt::PopupMenuControllerBase
{
+ using svt::PopupMenuControllerBase::disposing;
+
public:
ObjectMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
virtual ~ObjectMenuController();
diff --git a/framework/inc/uielement/popupmenucontroller.hxx b/framework/inc/uielement/popupmenucontroller.hxx
new file mode 100644
index 000000000000..ef44a4703ca2
--- /dev/null
+++ b/framework/inc/uielement/popupmenucontroller.hxx
@@ -0,0 +1,80 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __FRAMEWORK_POPUPMENUCONTROLLER_HXX_
+#define __FRAMEWORK_POPUPMENUCONTROLLER_HXX_
+
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/frame/XPopupMenuController.hpp>
+
+#include "svtools/toolboxcontroller.hxx"
+#include "boost/scoped_ptr.hpp"
+
+#include <macros/xserviceinfo.hxx>
+
+class Window;
+
+namespace framework
+{
+class PopupMenuControllerImpl;
+
+class PopupMenuController : public svt::ToolboxController, public ::com::sun::star::lang::XServiceInfo
+{
+public:
+ PopupMenuController( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rServiceManager );
+ ~PopupMenuController();
+
+ // XInterface
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL acquire() throw ();
+ virtual void SAL_CALL release() throw ();
+
+ // XServiceInfo
+ DECLARE_XSERVICEINFO
+
+ // XComponent
+ virtual void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException);
+
+ // XStatusListener
+ virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException );
+
+ // XToolbarController
+ virtual void SAL_CALL execute( sal_Int16 KeyModifier ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL click() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL doubleClick() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL createPopupWindow() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL createItemWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& Parent ) throw (::com::sun::star::uno::RuntimeException);
+
+ bool CreatePopupMenuController() throw (::com::sun::star::uno::Exception);
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XPopupMenuController > mxPopupMenuController;
+ ::com::sun::star::uno::Reference< com::sun::star::awt::XPopupMenu > mxPopupMenu;
+};
+
+} // namespace framework
+
+#endif // __FRAMEWORK_POPUPMENUCONTROLLER_HXX_
diff --git a/framework/inc/uielement/recentfilesmenucontroller.hxx b/framework/inc/uielement/recentfilesmenucontroller.hxx
index 40c3a55737c1..26a8e38dd49c 100644
--- a/framework/inc/uielement/recentfilesmenucontroller.hxx
+++ b/framework/inc/uielement/recentfilesmenucontroller.hxx
@@ -32,7 +32,7 @@
// my own includes
//_________________________________________________________________________________________________________________
-#include <helper/popupmenucontrollerbase.hxx>
+#include <macros/xserviceinfo.hxx>
#include <stdtypes.h>
//_________________________________________________________________________________________________________________
@@ -52,6 +52,7 @@
//_________________________________________________________________________________________________________________
// includes of other projects
//_________________________________________________________________________________________________________________
+#include <svtools/popupmenucontrollerbase.hxx>
#include <toolkit/awt/vclxmenu.hxx>
#include <cppuhelper/weak.hxx>
#include <rtl/ustring.hxx>
@@ -65,8 +66,10 @@ namespace framework
::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > xDispatch;
};
- class RecentFilesMenuController : public PopupMenuControllerBase
+ class RecentFilesMenuController : public svt::PopupMenuControllerBase
{
+ using svt::PopupMenuControllerBase::disposing;
+
public:
RecentFilesMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
virtual ~RecentFilesMenuController();
diff --git a/framework/inc/uielement/toolbarmanager.hxx b/framework/inc/uielement/toolbarmanager.hxx
index 98894b623aea..e7d670e9559b 100644
--- a/framework/inc/uielement/toolbarmanager.hxx
+++ b/framework/inc/uielement/toolbarmanager.hxx
@@ -58,6 +58,7 @@
#include <com/sun/star/frame/XToolbarController.hpp>
#include <com/sun/star/ui/ItemStyle.hpp>
#include <com/sun/star/util/XURLTransformer.hpp>
+#include <com/sun/star/ui/XAcceleratorConfiguration.hpp>
//_________________________________________________________________________________________________________________
// other includes
@@ -67,6 +68,7 @@
#include <cppuhelper/interfacecontainer.hxx>
#include <vcl/toolbox.hxx>
+#include <vcl/accel.hxx>
namespace com
{
@@ -179,6 +181,8 @@ class ToolBarManager : public ::com::sun::star::frame::XFrameActionListener
void RemoveControllers();
rtl::OUString RetrieveLabelFromCommand( const rtl::OUString& aCmdURL );
+ sal_Int32 RetrievePropertiesFromCommand( const rtl::OUString& aCmdURL );
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > GetPropsForCommand( const ::rtl::OUString& rCmdURL );
void CreateControllers();
void UpdateControllers();
void AddFrameActionListener();
@@ -194,6 +198,9 @@ class ToolBarManager : public ::com::sun::star::frame::XFrameActionListener
void setToolBarImage(const Image& _aImage,const CommandToInfoMap::const_iterator& _pIter);
void impl_elementChanged(bool _bRemove,const ::com::sun::star::ui::ConfigurationEvent& Event );
+ static bool impl_RetrieveShortcutsFromConfiguration( const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XAcceleratorConfiguration >& rAccelCfg, const rtl::OUString& rCommand, rtl::OUString& rShortCut );
+ bool RetrieveShortcut( const rtl::OUString& rCommandURL, rtl::OUString& rShortCut );
+
protected:
typedef ::std::hash_map< sal_uInt16, ::com::sun::star::uno::Reference< com::sun::star::frame::XStatusListener > > ToolBarControllerMap;
typedef ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::frame::XSubToolbarController > > SubToolBarControllerVector;
@@ -233,6 +240,10 @@ class ToolBarManager : public ::com::sun::star::frame::XFrameActionListener
Timer m_aAsyncUpdateControllersTimer;
sal_Int16 m_nSymbolsStyle;
MenuDescriptionMap m_aMenuMap;
+ sal_Bool m_bAcceleratorCfg;
+ ::com::sun::star::uno::Reference< ::com::sun::star::ui::XAcceleratorConfiguration > m_xDocAcceleratorManager;
+ ::com::sun::star::uno::Reference< ::com::sun::star::ui::XAcceleratorConfiguration > m_xModuleAcceleratorManager;
+ ::com::sun::star::uno::Reference< ::com::sun::star::ui::XAcceleratorConfiguration > m_xGlobalAcceleratorManager;
};
}
diff --git a/framework/inc/uielement/toolbarsmenucontroller.hxx b/framework/inc/uielement/toolbarsmenucontroller.hxx
index dcb0b57182df..35f517d33e80 100644
--- a/framework/inc/uielement/toolbarsmenucontroller.hxx
+++ b/framework/inc/uielement/toolbarsmenucontroller.hxx
@@ -32,7 +32,7 @@
// my own includes
//_________________________________________________________________________________________________________________
-#include <helper/popupmenucontrollerbase.hxx>
+#include <macros/xserviceinfo.hxx>
#include <stdtypes.h>
//_________________________________________________________________________________________________________________
@@ -54,6 +54,7 @@
//_________________________________________________________________________________________________________________
// includes of other projects
//_________________________________________________________________________________________________________________
+#include <svtools/popupmenucontrollerbase.hxx>
#include <toolkit/awt/vclxmenu.hxx>
#include <cppuhelper/weak.hxx>
#include <rtl/ustring.hxx>
@@ -63,8 +64,10 @@
namespace framework
{
- class ToolbarsMenuController : public PopupMenuControllerBase
+ class ToolbarsMenuController : public svt::PopupMenuControllerBase
{
+ using svt::PopupMenuControllerBase::disposing;
+
public:
ToolbarsMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
virtual ~ToolbarsMenuController();
diff --git a/framework/inc/uielement/uicommanddescription.hxx b/framework/inc/uielement/uicommanddescription.hxx
index d9f8e461c5b5..dd95981bba90 100644
--- a/framework/inc/uielement/uicommanddescription.hxx
+++ b/framework/inc/uielement/uicommanddescription.hxx
@@ -109,7 +109,7 @@ public:
ModuleToCommandFileMap m_aModuleToCommandFileMap;
UICommandsHashMap m_aUICommandsHashMap;
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xGenericUICommands;
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModuleManager > m_xModuleManager;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModuleManager > m_xModuleManager;
};
} // namespace framework
diff --git a/framework/inc/uielement/uielementtypenames.hxx b/framework/inc/uielement/uielementtypenames.hxx
index fcd14c2f8bff..ca7815f90af7 100644
--- a/framework/inc/uielement/uielementtypenames.hxx
+++ b/framework/inc/uielement/uielementtypenames.hxx
@@ -7,5 +7,6 @@
#define UIELEMENTTYPE_STATUSBAR_NAME "statusbar"
#define UIELEMENTTYPE_FLOATINGWINDOW_NAME "floater"
#define UIELEMENTTYPE_PROGRESSBAR_NAME "progressbar"
+#define UIELEMENTTYPE_TOOLPANEL_NAME "toolpanel"
#endif // __FRAMEWORK_UIELEMENT_UIELEMENTTYPENAMES_HXX_
diff --git a/framework/inc/xml/toolboxlayoutdocumenthandler.hxx b/framework/inc/xml/toolboxlayoutdocumenthandler.hxx
deleted file mode 100644
index 71a7843a0a9e..000000000000
--- a/framework/inc/xml/toolboxlayoutdocumenthandler.hxx
+++ /dev/null
@@ -1,59 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef __FRAMEWORK_XML_TOOLBOXLAYOUTDOCUMENTHANDLER_HXX_
-#define __FRAMEWORK_XML_TOOLBOXLAYOUTDOCUMENTHANDLER_HXX_
-
-#include <xml/toolboxconfiguration.hxx>
-
-//_________________________________________________________________________________________________________________
-// interface includes
-//_________________________________________________________________________________________________________________
-
-#ifndef __COM_SUN_STAR_XML_SAX_XDOCUMENTHANDLER_HPP_
-#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
-#endif
-
-//_________________________________________________________________________________________________________________
-// other includes
-//_________________________________________________________________________________________________________________
-#include <threadhelp/threadhelpbase.hxx>
-#include <rtl/ustring.hxx>
-#include <cppuhelper/weak.hxx>
-
-#include <hash_map>
-#include <stdtypes.h>
-
-//_________________________________________________________________________________________________________________
-// namespace
-//_________________________________________________________________________________________________________________
-
-namespace framework{
-
-} // namespace framework
-
-#endif
diff --git a/framework/prj/build.lst b/framework/prj/build.lst
index b9814037e729..5c745e09077d 100644
--- a/framework/prj/build.lst
+++ b/framework/prj/build.lst
@@ -20,4 +20,4 @@ fr framework\source\uiconfiguration nmake - all fr_uiconfiguration f
fr framework\source\accelerators nmake - all fr_accelerators fr_threadhelp fr_inc NULL
fr framework\source\tabwin nmake - all fr_tabwin fr_threadhelp fr_inc NULL
fr framework\util nmake - all fr_util fr_constant fr_threadhelp fr_classes fr_loadenv fr_jobs fr_interaction fr_helper fr_dispatch fr_services fr_register fr_recording fr_layoutmanager fr_uielement fr_uifactory fr_xml fr_uiconfiguration fr_accelerators fr_tabwin NULL
-
+fr framework\qa\unoapi nmake - all fr_qa_unoapi NULL
diff --git a/framework/prj/d.lst b/framework/prj/d.lst
index a8640138ba25..7f260f07cf65 100644
--- a/framework/prj/d.lst
+++ b/framework/prj/d.lst
@@ -5,8 +5,6 @@ mkdir: %_DEST%\xml%_EXT%\uiconfig\modules
mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\StartModule
mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\menubar
mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\toolbar
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\accelerator
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\accelerator\en-US
mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\statusbar
..\%COMMON_OUTDIR%\misc\*.hid %COMMON_DEST%\bin%_EXT%\hid\*.hid
@@ -47,7 +45,6 @@ mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\statusbar
..\uiconfig\startmodule\menubar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\menubar\*.xml
..\uiconfig\startmodule\toolbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\toolbar\*.xml
-..\uiconfig\startmodule\accelerator\en-US\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\accelerator\en-US\*.xml
..\uiconfig\startmodule\statusbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\StartModule\statusbar\*.xml
..\source\unotypes\fw?.xml %_DEST%\xml%_EXT%\*.xml
diff --git a/framework/qa/unoapi/Test.java b/framework/qa/unoapi/Test.java
new file mode 100644
index 000000000000..da9bb3bd5020
--- /dev/null
+++ b/framework/qa/unoapi/Test.java
@@ -0,0 +1,51 @@
+/*************************************************************************
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+************************************************************************/
+
+package org.openoffice.framework.qa.unoapi;
+
+import org.openoffice.Runner;
+import org.openoffice.test.OfficeConnection;
+import static org.junit.Assert.*;
+
+public final class Test {
+ @org.junit.Before public void setUp() throws Exception {
+ connection.setUp();
+ }
+
+ @org.junit.After public void tearDown()
+ throws InterruptedException, com.sun.star.uno.Exception
+ {
+ connection.tearDown();
+ }
+
+ @org.junit.Test public void test() {
+ assertTrue(
+ Runner.run(
+ "-sce", "framework.sce", "-xcl", "knownissues.xcl", "-tdoc",
+ "testdocuments", "-cs", connection.getDescription()));
+ }
+
+ private final OfficeConnection connection = new OfficeConnection();
+}
diff --git a/framework/qa/unoapi/knownissues.xcl b/framework/qa/unoapi/knownissues.xcl
index f939efcca412..40f1965de639 100755
--- a/framework/qa/unoapi/knownissues.xcl
+++ b/framework/qa/unoapi/knownissues.xcl
@@ -54,3 +54,6 @@ fwk.Frame
### i90345 ###
fwk.URLTransformer::com::sun::star::util::XURLTransformer
+
+### i111180 ###
+fwk.Desktop::com::sun::star::frame::XComponentLoader
diff --git a/framework/qa/unoapi/makefile.mk b/framework/qa/unoapi/makefile.mk
index 0be0e52a17c2..38a6cf7cced8 100755
--- a/framework/qa/unoapi/makefile.mk
+++ b/framework/qa/unoapi/makefile.mk
@@ -1,7 +1,6 @@
#*************************************************************************
-#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
+#
# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
@@ -22,22 +21,28 @@
# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
+#***********************************************************************/
-PRJ=..$/..
+.IF "$(OOO_SUBSEQUENT_TESTS)" == ""
+nothing .PHONY:
+.ELSE
-PRJNAME=framework
-TARGET=qa_unoapi
+PRJ = ../..
+PRJNAME = framework
+TARGET = qa_unoapi
-.INCLUDE: settings.mk
+.IF "$(OOO_JUNIT_JAR)" != ""
+PACKAGE = org/openoffice/framework/qa/unoapi
+JAVATESTFILES = Test.java
+JAVAFILES = $(JAVATESTFILES)
+JARFILES = OOoRunner.jar ridl.jar test.jar
+EXTRAJARFILES = $(OOO_JUNIT_JAR)
+.END
+.INCLUDE: settings.mk
.INCLUDE: target.mk
+.INCLUDE: installationtest.mk
-ALLTAR : UNOAPI_TEST
+ALLTAR : javatest
-UNOAPI_TEST:
- +$(SOLARENV)$/bin$/checkapi -sce framework.sce -xcl knownissues.xcl -tdoc $(PWD)$/testdocuments -THRCNT 1 -AutoRestart true
- @echo =======================================================================
- @echo In case you noticed a failures of fwk.JobExecutor or fwk.JobHandler make sure that you registered $(SOLARSRC)$/qadevOOo$/testdocs$/qadevlibs$/JobExecutor.jar
- @echo =======================================================================
+.END
diff --git a/framework/source/classes/resource.src b/framework/source/classes/resource.src
index 99d2b22ecf76..2f8e1bdf2f16 100644
--- a/framework/source/classes/resource.src
+++ b/framework/source/classes/resource.src
@@ -124,7 +124,7 @@ String STR_TOOLBAR_TITLE_ADDON
String STR_STATUSBAR_LOGOTEXT
{
- Text [ en-US ] = "A %PRODUCTNAME product by Sun Microsystems, Inc.";
+ Text [ en-US ] = "A %PRODUCTNAME product by Oracle";
};
// ***********************************************************************
diff --git a/framework/source/classes/sfxhelperfunctions.cxx b/framework/source/classes/sfxhelperfunctions.cxx
index 655d96cdb681..c6953b1ea2b9 100644
--- a/framework/source/classes/sfxhelperfunctions.cxx
+++ b/framework/source/classes/sfxhelperfunctions.cxx
@@ -32,11 +32,14 @@
#include <classes/sfxhelperfunctions.hxx>
#endif
+#include <tools/diagnose_ex.h>
+
static pfunc_setToolBoxControllerCreator pToolBoxControllerCreator = NULL;
static pfunc_setStatusBarControllerCreator pStatusBarControllerCreator = NULL;
static pfunc_getRefreshToolbars pRefreshToolbars = NULL;
static pfunc_createDockingWindow pCreateDockingWindow = NULL;
static pfunc_isDockingWindowVisible pIsDockingWindowVisible = NULL;
+static pfunc_activateToolPanel pActivateToolPanel = NULL;
@@ -155,4 +158,24 @@ bool SAL_CALL IsDockingWindowVisible( const ::com::sun::star::uno::Reference< ::
return false;
}
+pfunc_activateToolPanel SAL_CALL SetActivateToolPanel( pfunc_activateToolPanel i_pActivator )
+{
+ ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
+ pfunc_activateToolPanel pOldFunc = pActivateToolPanel;
+ pActivateToolPanel = i_pActivator;
+ return pOldFunc;
+}
+
+void SAL_CALL ActivateToolPanel( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& i_rFrame, const ::rtl::OUString& i_rPanelURL )
+{
+ pfunc_activateToolPanel pActivator = NULL;
+ {
+ ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
+ pActivator = pActivateToolPanel;
+ }
+
+ ENSURE_OR_RETURN_VOID( pActivator, "framework::ActivateToolPanel: no activator function!" );
+ (*pActivator)( i_rFrame, i_rPanelURL );
+}
+
}
diff --git a/framework/source/helper/imageproducer.cxx b/framework/source/helper/imageproducer.cxx
index 7870697f42a1..c4cf5921ee11 100644
--- a/framework/source/helper/imageproducer.cxx
+++ b/framework/source/helper/imageproducer.cxx
@@ -44,7 +44,7 @@ pfunc_getImage SAL_CALL SetImageProducer( pfunc_getImage pNewGetImageFunc )
}
-Image SAL_CALL GetImageFromURL( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& aURL, BOOL bBig, BOOL bHiContrast )
+Image SAL_CALL GetImageFromURL( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& aURL, BOOL bBig, BOOL bHiContrast )
{
if ( _pGetImageFunc )
return _pGetImageFunc( rFrame, aURL, bBig, bHiContrast );
diff --git a/framework/source/helper/makefile.mk b/framework/source/helper/makefile.mk
index 556a9829d27c..ed54c381160c 100644
--- a/framework/source/helper/makefile.mk
+++ b/framework/source/helper/makefile.mk
@@ -53,7 +53,6 @@ SLOFILES= $(SLO)$/ocomponentaccess.obj \
$(SLO)$/networkdomain.obj \
$(SLO)$/acceleratorinfo.obj \
$(SLO)$/uielementwrapperbase.obj \
- $(SLO)$/popupmenucontrollerbase.obj \
$(SLO)$/dockingareadefaultacceptor.obj \
$(SLO)$/uiconfigelementwrapperbase.obj \
$(SLO)$/shareablemutex.obj \
diff --git a/framework/source/helper/popupmenucontrollerbase.cxx b/framework/source/helper/popupmenucontrollerbase.cxx
deleted file mode 100644
index cc5d388de9a8..000000000000
--- a/framework/source/helper/popupmenucontrollerbase.cxx
+++ /dev/null
@@ -1,429 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_framework.hxx"
-#include <helper/popupmenucontrollerbase.hxx>
-
-//_________________________________________________________________________________________________________________
-// my own includes
-//_________________________________________________________________________________________________________________
-#include <threadhelp/resetableguard.hxx>
-#include "services.h"
-
-//_________________________________________________________________________________________________________________
-// interface includes
-//_________________________________________________________________________________________________________________
-#include <com/sun/star/awt/XDevice.hpp>
-#include <com/sun/star/beans/PropertyValue.hpp>
-#include <com/sun/star/awt/MenuItemStyle.hpp>
-#include <com/sun/star/frame/XDispatchProvider.hpp>
-#include <com/sun/star/lang/DisposedException.hpp>
-
-//_________________________________________________________________________________________________________________
-// includes of other projects
-//_________________________________________________________________________________________________________________
-
-#ifndef _VCL_MENU_HXX_
-#include <vcl/menu.hxx>
-#endif
-#include <vcl/svapp.hxx>
-#include <rtl/ustrbuf.hxx>
-#include <rtl/logfile.hxx>
-//_________________________________________________________________________________________________________________
-// Defines
-//_________________________________________________________________________________________________________________
-//
-
-using namespace com::sun::star::uno;
-using namespace com::sun::star::lang;
-using namespace com::sun::star::frame;
-using namespace com::sun::star::beans;
-using namespace com::sun::star::util;
-
-namespace framework
-{
-
-//*****************************************************************************************************************
-// XInterface, XTypeProvider, XServiceInfo
-//*****************************************************************************************************************
-DEFINE_XINTERFACE_11 ( PopupMenuControllerBase ,
- OWeakObject ,
- DIRECT_INTERFACE( css::lang::XTypeProvider ),
- DIRECT_INTERFACE( css::lang::XServiceInfo ),
- DIRECT_INTERFACE( ::com::sun::star::frame::XPopupMenuController ),
- DIRECT_INTERFACE( css::lang::XInitialization ),
- DIRECT_INTERFACE( css::frame::XStatusListener ),
- DIRECT_INTERFACE( css::awt::XMenuListener ),
- DIRECT_INTERFACE( css::frame::XDispatchProvider ),
- DIRECT_INTERFACE( css::frame::XDispatch ),
- DIRECT_INTERFACE( css::lang::XComponent ),
- DERIVED_INTERFACE( css::lang::XEventListener, css::frame::XStatusListener ),
- DERIVED_INTERFACE( css::lang::XEventListener, css::awt::XMenuListener )
- )
-
-DEFINE_XTYPEPROVIDER_10 ( PopupMenuControllerBase ,
- css::lang::XTypeProvider ,
- css::lang::XServiceInfo ,
- ::com::sun::star::frame::XPopupMenuController ,
- css::lang::XInitialization ,
- css::frame::XStatusListener ,
- css::awt::XMenuListener ,
- css::lang::XEventListener ,
- css::frame::XDispatchProvider ,
- css::frame::XDispatch ,
- css::lang::XComponent
- )
-
-PopupMenuControllerBase::PopupMenuControllerBase( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ) :
- ThreadHelpBase(),
- ::cppu::OBroadcastHelperVar< ::cppu::OMultiTypeInterfaceContainerHelper, ::cppu::OMultiTypeInterfaceContainerHelper::keyType >( m_aLock.getShareableOslMutex() ),
- m_bInitialized( false ),
- m_bDisposed( false ),
- m_xServiceManager( xServiceManager ),
- m_aListenerContainer( m_aLock.getShareableOslMutex() )
-{
- if ( m_xServiceManager.is() )
- m_xURLTransformer.set( m_xServiceManager->createInstance(
- SERVICENAME_URLTRANSFORMER),
- UNO_QUERY );
-}
-
-PopupMenuControllerBase::~PopupMenuControllerBase()
-{
-}
-
-// protected function
-void PopupMenuControllerBase::resetPopupMenu( com::sun::star::uno::Reference< com::sun::star::awt::XPopupMenu >& rPopupMenu )
-{
- VCLXPopupMenu* pPopupMenu = 0;
- if ( rPopupMenu.is() && rPopupMenu->getItemCount() > 0 )
- {
- pPopupMenu = (VCLXPopupMenu *)VCLXMenu::GetImplementation( rPopupMenu );
- if ( pPopupMenu )
- {
- vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() );
-
- PopupMenu* pVCLPopupMenu = (PopupMenu *)pPopupMenu->GetMenu();
- pVCLPopupMenu->Clear();
- }
- }
-}
-
-void SAL_CALL PopupMenuControllerBase::dispose()
-throw (::com::sun::star::uno::RuntimeException)
-{
- css::uno::Reference< css::lang::XComponent > xThis( static_cast< ::cppu::OWeakObject* >(this), UNO_QUERY );
-
- // Send message to all listener and forget their references.
- css::lang::EventObject aEvent( xThis );
- m_aListenerContainer.disposeAndClear( aEvent );
-
- // Reset our members and set disposed flag
- ResetableGuard aLock( m_aLock );
- m_xFrame.clear();
- m_xDispatch.clear();
- m_xPopupMenu.clear();
- m_xServiceManager.clear();
- m_bDisposed = true;
-}
-
-void SAL_CALL PopupMenuControllerBase::addEventListener(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener )
-throw (::com::sun::star::uno::RuntimeException)
-{
- m_aListenerContainer.addInterface( ::getCppuType( (const css::uno::Reference< css::lang::XEventListener >*)NULL ), xListener );
-}
-
-void SAL_CALL PopupMenuControllerBase::removeEventListener(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener )
-throw (::com::sun::star::uno::RuntimeException)
-{
- m_aListenerContainer.removeInterface( ::getCppuType( (const css::uno::Reference< css::lang::XEventListener >*)NULL ), xListener );
-}
-
-// XEventListener
-void SAL_CALL PopupMenuControllerBase::disposing( const EventObject& ) throw ( RuntimeException )
-{
- ResetableGuard aLock( m_aLock );
- m_xFrame.clear();
- m_xDispatch.clear();
- m_xPopupMenu.clear();
-}
-
-// XMenuListener
-void SAL_CALL PopupMenuControllerBase::highlight( const css::awt::MenuEvent& ) throw (RuntimeException)
-{
-}
-
-void PopupMenuControllerBase::impl_select(const Reference< XDispatch >& _xDispatch,const ::com::sun::star::util::URL& aURL)
-{
- Sequence<PropertyValue> aArgs;
- OSL_ENSURE(_xDispatch.is(),"PopupMenuControllerBase::impl_select: No dispatch");
- if ( _xDispatch.is() )
- _xDispatch->dispatch( aURL, aArgs );
-}
-
-void SAL_CALL PopupMenuControllerBase::select( const css::awt::MenuEvent& rEvent ) throw (RuntimeException)
-{
- Reference< css::awt::XPopupMenu > xPopupMenu;
- Reference< XDispatch > xDispatch;
- Reference< XMultiServiceFactory > xServiceManager;
-
- if ( m_bDisposed )
- throw DisposedException();
-
- ResetableGuard aLock( m_aLock );
- xPopupMenu = m_xPopupMenu;
- xDispatch = m_xDispatch;
- xServiceManager = m_xServiceManager;
- aLock.unlock();
-
- if ( xPopupMenu.is() )
- {
- VCLXPopupMenu* pPopupMenu = (VCLXPopupMenu *)VCLXPopupMenu::GetImplementation( xPopupMenu );
- if ( pPopupMenu )
- {
- css::util::URL aTargetURL;
- {
- vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() );
- PopupMenu* pVCLPopupMenu = (PopupMenu *)pPopupMenu->GetMenu();
- aTargetURL.Complete = pVCLPopupMenu->GetItemCommand( rEvent.MenuId );
- }
-
- m_xURLTransformer->parseStrict( aTargetURL );
- impl_select(xDispatch,aTargetURL);
- }
- }
-}
-
-void SAL_CALL PopupMenuControllerBase::activate( const css::awt::MenuEvent& ) throw (RuntimeException)
-{
-}
-
-void SAL_CALL PopupMenuControllerBase::deactivate( const css::awt::MenuEvent& ) throw (RuntimeException)
-{
-}
-
-void SAL_CALL PopupMenuControllerBase::updatePopupMenu() throw ( ::com::sun::star::uno::RuntimeException )
-{
- ResetableGuard aLock( m_aLock );
-
- if ( m_bDisposed )
- throw DisposedException();
-
- Reference< XStatusListener > xStatusListener( static_cast< OWeakObject* >( this ), UNO_QUERY );
- Reference< XDispatch > xDispatch( m_xDispatch );
- com::sun::star::util::URL aTargetURL;
- aTargetURL.Complete = m_aCommandURL;
- m_xURLTransformer->parseStrict( aTargetURL );
- aLock.unlock();
-
- // Add/remove status listener to get a status update once
- if ( xDispatch.is() )
- {
- xDispatch->addStatusListener( xStatusListener, aTargetURL );
- xDispatch->removeStatusListener( xStatusListener, aTargetURL );
- }
-}
-
-// XDispatchProvider
-Reference< XDispatch > SAL_CALL
-PopupMenuControllerBase::queryDispatch(
- const URL& /*aURL*/,
- const rtl::OUString& /*sTarget*/,
- sal_Int32 /*nFlags*/ )
-throw( RuntimeException )
-{
- // must be implemented by subclass
- ResetableGuard aLock( m_aLock );
- if ( m_bDisposed )
- throw DisposedException();
-
- return Reference< XDispatch >();
-}
-
-Sequence< Reference< XDispatch > > SAL_CALL PopupMenuControllerBase::queryDispatches( const Sequence< DispatchDescriptor >& lDescriptor ) throw( RuntimeException )
-{
- // Create return list - which must have same size then the given descriptor
- // It's not allowed to pack it!
- ResetableGuard aLock( m_aLock );
- if ( m_bDisposed )
- throw DisposedException();
- aLock.unlock();
-
- sal_Int32 nCount = lDescriptor.getLength();
- css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > lDispatcher( nCount );
-
- // Step over all descriptors and try to get any dispatcher for it.
- for( sal_Int32 i=0; i<nCount; ++i )
- {
- lDispatcher[i] = queryDispatch( lDescriptor[i].FeatureURL ,
- lDescriptor[i].FrameName ,
- lDescriptor[i].SearchFlags );
- }
-
- return lDispatcher;
-}
-
-// XDispatch
-void SAL_CALL
-PopupMenuControllerBase::dispatch(
- const URL& /*aURL*/,
- const Sequence< PropertyValue >& /*seqProperties*/ )
-throw( ::com::sun::star::uno::RuntimeException )
-{
- // must be implemented by subclass
- ResetableGuard aLock( m_aLock );
- if ( m_bDisposed )
- throw DisposedException();
-}
-
-void SAL_CALL
-PopupMenuControllerBase::addStatusListener(
- const Reference< XStatusListener >& xControl,
- const URL& aURL )
-throw( ::com::sun::star::uno::RuntimeException )
-{
- ResetableGuard aLock( m_aLock );
- if ( m_bDisposed )
- throw DisposedException();
- aLock.unlock();
-
- bool bStatusUpdate( false );
- m_aListenerContainer.addInterface( ::getCppuType( (const css::uno::Reference< css::frame::XStatusListener >*)NULL ), xControl );
-
- aLock.lock();
- if ( aURL.Complete.indexOf( m_aBaseURL ) == 0 )
- bStatusUpdate = true;
- aLock.unlock();
-
- if ( bStatusUpdate )
- {
- // Dummy update for popup menu controllers
- FeatureStateEvent aEvent;
- aEvent.FeatureURL = aURL;
- aEvent.IsEnabled = sal_True;
- aEvent.Requery = sal_False;
- aEvent.State = Any();
- xControl->statusChanged( aEvent );
- }
-}
-
-void SAL_CALL PopupMenuControllerBase::removeStatusListener(
- const Reference< XStatusListener >& xControl,
- const URL& /*aURL*/ )
-throw( ::com::sun::star::uno::RuntimeException )
-{
- m_aListenerContainer.removeInterface( ::getCppuType( (const css::uno::Reference< css::frame::XStatusListener >*)NULL ), xControl );
-}
-
-::rtl::OUString PopupMenuControllerBase::determineBaseURL( const ::rtl::OUString& aURL )
-{
- // Just use the main part of the URL for popup menu controllers
- sal_Int32 nQueryPart( 0 );
- sal_Int32 nSchemePart( 0 );
- rtl::OUString aMainURL( RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.popup:" ));
-
- nSchemePart = aURL.indexOf( ':' );
- if (( nSchemePart > 0 ) &&
- ( aURL.getLength() > ( nSchemePart+1 )))
- {
- nQueryPart = aURL.indexOf( '?', nSchemePart );
- if ( nQueryPart > 0 )
- aMainURL += aURL.copy( nSchemePart, nQueryPart-nSchemePart );
- else if ( nQueryPart == -1 )
- aMainURL += aURL.copy( nSchemePart+1 );
- }
-
- return aMainURL;
-}
-
-// XInitialization
-void SAL_CALL PopupMenuControllerBase::initialize( const Sequence< Any >& aArguments ) throw ( Exception, RuntimeException )
-{
- ResetableGuard aLock( m_aLock );
-
- sal_Bool bInitalized( m_bInitialized );
- if ( !bInitalized )
- {
- PropertyValue aPropValue;
- rtl::OUString aCommandURL;
- Reference< XFrame > xFrame;
-
- for ( int i = 0; i < aArguments.getLength(); i++ )
- {
- if ( aArguments[i] >>= aPropValue )
- {
- if ( aPropValue.Name.equalsAscii( "Frame" ))
- aPropValue.Value >>= xFrame;
- else if ( aPropValue.Name.equalsAscii( "CommandURL" ))
- aPropValue.Value >>= aCommandURL;
- }
- }
-
- if ( xFrame.is() && aCommandURL.getLength() )
- {
- m_xFrame = xFrame;
- m_aCommandURL = aCommandURL;
- m_aBaseURL = determineBaseURL( aCommandURL );
- m_bInitialized = true;
- }
- }
-}
-// XPopupMenuController
-void SAL_CALL PopupMenuControllerBase::setPopupMenu( const Reference< css::awt::XPopupMenu >& xPopupMenu ) throw ( RuntimeException )
-{
- ResetableGuard aLock( m_aLock );
-
- if ( m_bDisposed )
- throw DisposedException();
-
- if ( m_xFrame.is() && !m_xPopupMenu.is() )
- {
- // Create popup menu on demand
- vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() );
-
- m_xPopupMenu = xPopupMenu;
- m_xPopupMenu->addMenuListener( Reference< css::awt::XMenuListener >( (OWeakObject*)this, UNO_QUERY ));
-
- Reference< XDispatchProvider > xDispatchProvider( m_xFrame, UNO_QUERY );
-
- com::sun::star::util::URL aTargetURL;
- aTargetURL.Complete = m_aCommandURL;
- m_xURLTransformer->parseStrict( aTargetURL );
- m_xDispatch = xDispatchProvider->queryDispatch( aTargetURL, ::rtl::OUString(), 0 );
-
- impl_setPopupMenu();
-
- updatePopupMenu();
- }
-}
-void PopupMenuControllerBase::impl_setPopupMenu()
-{
-}
-}
diff --git a/framework/source/helper/uiconfigelementwrapperbase.cxx b/framework/source/helper/uiconfigelementwrapperbase.cxx
index 1ddda0eb0f4d..030ec5bf8cf6 100644
--- a/framework/source/helper/uiconfigelementwrapperbase.cxx
+++ b/framework/source/helper/uiconfigelementwrapperbase.cxx
@@ -45,7 +45,6 @@
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/ui/XUIConfiguration.hpp>
-#include <com/sun/star/lang/DisposedException.hpp>
//_________________________________________________________________________________________________________________
// includes of other projects
@@ -550,4 +549,23 @@ Reference< XIndexAccess > SAL_CALL UIConfigElementWrapperBase::getSettings( sal_
return m_xConfigData;
}
+Reference< XFrame > SAL_CALL UIConfigElementWrapperBase::getFrame() throw (RuntimeException)
+{
+ ResetableGuard aLock( m_aLock );
+ Reference< XFrame > xFrame( m_xWeakFrame );
+ return xFrame;
+}
+
+::rtl::OUString SAL_CALL UIConfigElementWrapperBase::getResourceURL() throw (RuntimeException)
+{
+ ResetableGuard aLock( m_aLock );
+ return m_aResourceURL;
+}
+
+::sal_Int16 SAL_CALL UIConfigElementWrapperBase::getType() throw (RuntimeException)
+{
+ ResetableGuard aLock( m_aLock );
+ return m_nType;
+}
+
}
diff --git a/framework/source/helper/uielementwrapperbase.cxx b/framework/source/helper/uielementwrapperbase.cxx
index 85bb1cdb1e60..6329f94b3063 100644
--- a/framework/source/helper/uielementwrapperbase.cxx
+++ b/framework/source/helper/uielementwrapperbase.cxx
@@ -151,6 +151,23 @@ throw ( Exception, RuntimeException )
}
}
+// XUIElement
+::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > SAL_CALL UIElementWrapperBase::getFrame() throw (::com::sun::star::uno::RuntimeException)
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > xFrame( m_xWeakFrame );
+ return xFrame;
+}
+
+::rtl::OUString SAL_CALL UIElementWrapperBase::getResourceURL() throw (::com::sun::star::uno::RuntimeException)
+{
+ return m_aResourceURL;
+}
+
+::sal_Int16 SAL_CALL UIElementWrapperBase::getType() throw (::com::sun::star::uno::RuntimeException)
+{
+ return m_nType;
+}
+
// XUpdatable
void SAL_CALL UIElementWrapperBase::update() throw (::com::sun::star::uno::RuntimeException)
{
diff --git a/framework/source/interaction/quietinteraction.cxx b/framework/source/interaction/quietinteraction.cxx
index f00bee4ed432..d5d11ebc2097 100644
--- a/framework/source/interaction/quietinteraction.cxx
+++ b/framework/source/interaction/quietinteraction.cxx
@@ -44,7 +44,9 @@
#include <com/sun/star/task/XInteractionAbort.hpp>
#include <com/sun/star/task/XInteractionApprove.hpp>
#include <com/sun/star/document/XInteractionFilterSelect.hpp>
+#include <com/sun/star/document/XInteractionFilterOptions.hpp>
#include <com/sun/star/document/AmbigousFilterRequest.hpp>
+#include <com/sun/star/document/FilterOptionsRequest.hpp>
#include <com/sun/star/task/ErrorCodeRequest.hpp>
#ifndef _COM_SUN_STAR_DOCUMENT_LOCKEDDOCUMENTREQUEST_HPP_
@@ -111,6 +113,7 @@ void SAL_CALL QuietInteraction::handle( const css::uno::Reference< css::task::XI
css::uno::Reference< css::task::XInteractionAbort > xAbort ;
css::uno::Reference< css::task::XInteractionApprove > xApprove ;
css::uno::Reference< css::document::XInteractionFilterSelect > xFilter ;
+ css::uno::Reference< css::document::XInteractionFilterOptions > xFOptions ;
sal_Int32 nCount=lContinuations.getLength();
for (sal_Int32 i=0; i<nCount; ++i)
@@ -123,6 +126,9 @@ void SAL_CALL QuietInteraction::handle( const css::uno::Reference< css::task::XI
if ( ! xFilter.is() )
xFilter = css::uno::Reference< css::document::XInteractionFilterSelect >( lContinuations[i], css::uno::UNO_QUERY );
+
+ if ( ! xFOptions.is() )
+ xFOptions = css::uno::Reference< css::document::XInteractionFilterOptions >( lContinuations[i], css::uno::UNO_QUERY );
}
// differ between abortable interactions (error, unknown filter ...)
@@ -130,6 +136,7 @@ void SAL_CALL QuietInteraction::handle( const css::uno::Reference< css::task::XI
css::task::ErrorCodeRequest aErrorCodeRequest ;
css::document::AmbigousFilterRequest aAmbigousFilterRequest;
css::document::LockedDocumentRequest aLockedDocumentRequest;
+ css::document::FilterOptionsRequest aFilterOptionsRequest;
if (aRequest>>=aAmbigousFilterRequest)
{
@@ -163,6 +170,15 @@ void SAL_CALL QuietInteraction::handle( const css::uno::Reference< css::task::XI
xAbort->select();
}
else
+ if (aRequest>>=aFilterOptionsRequest)
+ {
+ if (xFOptions.is())
+ {
+ // let the default filter options be used
+ xFOptions->select();
+ }
+ }
+ else
if (xAbort.is())
xAbort->select();
}
diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx
index 458368bd6581..f72759891acb 100644
--- a/framework/source/layoutmanager/layoutmanager.cxx
+++ b/framework/source/layoutmanager/layoutmanager.cxx
@@ -4707,6 +4707,14 @@ throw (RuntimeException)
impl_setDockingWindowVisibility( xSMGR, xFrame, aElementName, true );
}
+ else if ( aElementType.equalsIgnoreAsciiCaseAscii( "toolpanel" ))
+ {
+ ReadGuard aReadGuard( m_aLock );
+ css::uno::Reference< css::frame::XFrame > xFrame( m_xFrame );
+ aReadGuard.unlock();
+
+ ActivateToolPanel( m_xFrame, aName );
+ }
}
if ( bNotify )
diff --git a/framework/source/register/registertemp.cxx b/framework/source/register/registertemp.cxx
index dc5682c7d398..7382380ef525 100644
--- a/framework/source/register/registertemp.cxx
+++ b/framework/source/register/registertemp.cxx
@@ -78,6 +78,7 @@
#include <uielement/macrosmenucontroller.hxx>
#include <uielement/newmenucontroller.hxx>
#include <uielement/toolbarsmenucontroller.hxx>
+#include <uielement/popupmenucontroller.hxx>
COMPONENTGETIMPLEMENTATIONENVIRONMENT
@@ -103,6 +104,7 @@ COMPONENTWRITEINFO ( COMPONENTINFO( ::framework::MediaTypeDetectionHelper
COMPONENTINFO( ::framework::DispatchRecorderSupplier )
COMPONENTINFO( ::framework::Oxt_Handler )
COMPONENTINFO( ::framework::License )
+ COMPONENTINFO( ::framework::PopupMenuController )
)
COMPONENTGETFACTORY ( IFFACTORY( ::framework::MediaTypeDetectionHelper )
@@ -126,5 +128,6 @@ COMPONENTGETFACTORY ( IFFACTORY( ::framework::MediaTypeDetectionHelper
IFFACTORY( ::framework::FooterMenuController ) else
IFFACTORY( ::framework::HeaderMenuController ) else
IFFACTORY( ::framework::LanguageSelectionMenuController ) else
- IFFACTORY( ::framework::Oxt_Handler )
+ IFFACTORY( ::framework::Oxt_Handler ) else
+ IFFACTORY( ::framework::PopupMenuController )
)
diff --git a/framework/source/services/backingwindow.cxx b/framework/source/services/backingwindow.cxx
index bbbefdbdbda1..fb3d6a18eb79 100644
--- a/framework/source/services/backingwindow.cxx
+++ b/framework/source/services/backingwindow.cxx
@@ -42,7 +42,7 @@
#include "unotools/dynamicmenuoptions.hxx"
#include "svtools/imagemgr.hxx"
-#include "svl/svtools.hrc"
+#include "svtools/svtools.hrc"
#include "comphelper/processfactory.hxx"
#include "comphelper/sequenceashashmap.hxx"
@@ -116,21 +116,13 @@ BackingWindow::BackingWindow( Window* i_pParent ) :
Window( i_pParent, FwkResId( DLG_BACKING ) ),
maWelcome( this, WB_LEFT ),
maProduct( this, WB_LEFT ),
- maWriterText( this, WB_WORDBREAK | WB_VCENTER ),
maWriterButton( this, STC_BUTTON_STYLE ),
- maCalcText( this, WB_WORDBREAK | WB_VCENTER ),
maCalcButton( this, STC_BUTTON_STYLE ),
- maImpressText( this, WB_WORDBREAK | WB_VCENTER ),
maImpressButton( this, STC_BUTTON_STYLE ),
- maOpenText( this, WB_WORDBREAK | WB_VCENTER ),
maOpenButton( this, STC_BUTTON_STYLE ),
- maDrawText( this, WB_WORDBREAK | WB_VCENTER ),
maDrawButton( this, STC_BUTTON_STYLE ),
- maDBText( this, WB_WORDBREAK | WB_VCENTER ),
maDBButton( this, STC_BUTTON_STYLE ),
- maMathText( this, WB_WORDBREAK | WB_VCENTER ),
maMathButton( this, STC_BUTTON_STYLE ),
- maTemplateText( this, WB_WORDBREAK | WB_VCENTER ),
maTemplateButton( this, STC_BUTTON_STYLE ),
maToolbox( this, WB_DIALOGCONTROL ),
maWelcomeString( FwkResId( STR_BACKING_WELCOME ) ),
@@ -141,7 +133,8 @@ BackingWindow::BackingWindow( Window* i_pParent ) :
mbInitControls( false ),
mnLayoutStyle( 0 ),
mpAccExec( NULL ),
- mnBtnPos( 120 )
+ mnBtnPos( 120 ),
+ mnBtnTop( 150 )
{
mnColumnWidth[0] = mnColumnWidth[1] = 0;
mnTextColumnWidth[0] = mnTextColumnWidth[1] = 0;
@@ -171,16 +164,6 @@ BackingWindow::BackingWindow( Window* i_pParent ) :
{
}
- // get icon images from vcl resource and set them on the appropriate buttons
- loadImage( FwkResId( BMP_BACKING_WRITER ), maWriterButton );
- loadImage( FwkResId( BMP_BACKING_CALC ), maCalcButton );
- loadImage( FwkResId( BMP_BACKING_IMPRESS ), maImpressButton );
- loadImage( FwkResId( BMP_BACKING_DRAW ), maDrawButton );
- loadImage( FwkResId( BMP_BACKING_DATABASE ), maDBButton );
- loadImage( FwkResId( BMP_BACKING_FORMULA ), maMathButton );
- loadImage( FwkResId( BMP_BACKING_FOLDER ), maOpenButton );
- loadImage( FwkResId( BMP_BACKING_FOLDER ), maTemplateButton );
-
String aExtHelpText( FwkResId( STR_BACKING_EXTHELP ) );
String aRegHelpText( FwkResId( STR_BACKING_REGHELP ) );
String aInfoHelpText( FwkResId( STR_BACKING_INFOHELP ) );
@@ -195,10 +178,6 @@ BackingWindow::BackingWindow( Window* i_pParent ) :
SetStyle( GetStyle() | WB_DIALOGCONTROL );
- // add some breathing space for the images
- maButtonImageSize.Width() += 12;
- maButtonImageSize.Height() += 12;
-
// force tab cycling in toolbox
maToolbox.SetStyle( maToolbox.GetStyle() | WB_FORCETABCYCLE );
@@ -244,6 +223,11 @@ BackingWindow::BackingWindow( Window* i_pParent ) :
// init background
initBackground();
+
+ // add some breathing space for the images
+ maButtonImageSize.Width() += 12;
+ maButtonImageSize.Height() += 12;
+
}
@@ -324,22 +308,6 @@ void BackingWindow::initBackground()
maWelcome.SetBackground();
maProduct.SetControlForeground( maWelcomeTextColor );
maProduct.SetBackground();
- maWriterText.SetControlForeground( maLabelTextColor );
- maWriterText.SetControlBackground( aTextBGColor );
- maCalcText.SetControlForeground( maLabelTextColor );
- maCalcText.SetControlBackground( aTextBGColor );
- maImpressText.SetControlForeground( maLabelTextColor );
- maImpressText.SetControlBackground( aTextBGColor );
- maDrawText.SetControlForeground( maLabelTextColor );
- maDrawText.SetControlBackground( aTextBGColor );
- maDBText.SetControlForeground( maLabelTextColor );
- maDBText.SetControlBackground( aTextBGColor );
- maMathText.SetControlForeground( maLabelTextColor );
- maMathText.SetControlBackground( aTextBGColor );
- maTemplateText.SetControlForeground( maLabelTextColor );
- maTemplateText.SetControlBackground( aTextBGColor );
- maOpenText.SetControlForeground( maLabelTextColor );
- maOpenText.SetControlBackground( aTextBGColor );
if( mnLayoutStyle == 1 )
{
@@ -348,6 +316,17 @@ void BackingWindow::initBackground()
else
mnBtnPos = maBackgroundLeft.GetSizePixel().Width() + 40;
}
+
+ // get icon images from fwk resource and set them on the appropriate buttons
+ loadImage( FwkResId( BMP_BACKING_WRITER ), maWriterButton );
+ loadImage( FwkResId( BMP_BACKING_CALC ), maCalcButton );
+ loadImage( FwkResId( BMP_BACKING_IMPRESS ), maImpressButton );
+ loadImage( FwkResId( BMP_BACKING_DRAW ), maDrawButton );
+ loadImage( FwkResId( BMP_BACKING_DATABASE ), maDBButton );
+ loadImage( FwkResId( BMP_BACKING_FORMULA ), maMathButton );
+ loadImage( FwkResId( BMP_BACKING_OPENFILE ), maOpenButton );
+ loadImage( FwkResId( BMP_BACKING_OPENTEMPLATE ), maTemplateButton );
+
}
void BackingWindow::initControls()
@@ -456,35 +435,35 @@ void BackingWindow::initControls()
}
// layout the buttons
- layoutButtonAndText( WRITER_URL, 0, aFileNewAppsAvailable,
- aModuleOptions, SvtModuleOptions::E_SWRITER,
- maWriterButton, maWriterText, aMnemns );
- layoutButtonAndText( DRAW_URL, 1, aFileNewAppsAvailable,
- aModuleOptions, SvtModuleOptions::E_SDRAW,
- maDrawButton, maDrawText, aMnemns );
+ layoutButton( WRITER_URL, 0, aFileNewAppsAvailable,
+ aModuleOptions, SvtModuleOptions::E_SWRITER,
+ maWriterButton, aMnemns );
+ layoutButton( DRAW_URL, 1, aFileNewAppsAvailable,
+ aModuleOptions, SvtModuleOptions::E_SDRAW,
+ maDrawButton, aMnemns );
nYPos += maButtonImageSize.Height() + 10;
- layoutButtonAndText( CALC_URL, 0, aFileNewAppsAvailable,
- aModuleOptions, SvtModuleOptions::E_SCALC,
- maCalcButton, maCalcText, aMnemns );
- layoutButtonAndText( BASE_URL, 1, aFileNewAppsAvailable,
- aModuleOptions, SvtModuleOptions::E_SDATABASE,
- maDBButton, maDBText, aMnemns );
+ layoutButton( CALC_URL, 0, aFileNewAppsAvailable,
+ aModuleOptions, SvtModuleOptions::E_SCALC,
+ maCalcButton, aMnemns );
+ layoutButton( BASE_URL, 1, aFileNewAppsAvailable,
+ aModuleOptions, SvtModuleOptions::E_SDATABASE,
+ maDBButton, aMnemns );
nYPos += maButtonImageSize.Height() + 10;
- layoutButtonAndText( IMPRESS_WIZARD_URL, 0, aFileNewAppsAvailable,
- aModuleOptions, SvtModuleOptions::E_SIMPRESS,
- maImpressButton, maImpressText, aMnemns );
- layoutButtonAndText( MATH_URL, 1, aFileNewAppsAvailable,
- aModuleOptions, SvtModuleOptions::E_SMATH,
- maMathButton, maMathText, aMnemns );
+ layoutButton( IMPRESS_WIZARD_URL, 0, aFileNewAppsAvailable,
+ aModuleOptions, SvtModuleOptions::E_SIMPRESS,
+ maImpressButton, aMnemns );
+ layoutButton( MATH_URL, 1, aFileNewAppsAvailable,
+ aModuleOptions, SvtModuleOptions::E_SMATH,
+ maMathButton, aMnemns );
nYPos += 3*maButtonImageSize.Height() / 2;
- layoutButtonAndText( NULL, 0, aFileNewAppsAvailable,
- aModuleOptions, SvtModuleOptions::E_SWRITER,
- maOpenButton, maOpenText, aMnemns, maOpenString );
- layoutButtonAndText( NULL, 1, aFileNewAppsAvailable,
- aModuleOptions, SvtModuleOptions::E_SWRITER,
- maTemplateButton, maTemplateText, aMnemns, maTemplateString );
+ layoutButton( NULL, 0, aFileNewAppsAvailable,
+ aModuleOptions, SvtModuleOptions::E_SWRITER,
+ maOpenButton, aMnemns, maOpenString );
+ layoutButton( NULL, 1, aFileNewAppsAvailable,
+ aModuleOptions, SvtModuleOptions::E_SWRITER,
+ maTemplateButton, aMnemns, maTemplateString );
nYPos += 10;
DBG_ASSERT( nYPos < maControlRect.GetHeight(), "misformatting !" );
@@ -532,6 +511,8 @@ void BackingWindow::initControls()
maBackgroundMiddle = BitmapEx();
Resize();
+
+ maWriterButton.GrabFocus();
}
void BackingWindow::loadImage( const ResId& i_rId, ImageButton& i_rButton )
@@ -545,11 +526,11 @@ void BackingWindow::loadImage( const ResId& i_rId, ImageButton& i_rButton )
i_rButton.SetModeImage( aBmp );
}
-void BackingWindow::layoutButtonAndText(
+void BackingWindow::layoutButton(
const char* i_pURL, int nColumn,
const std::set<rtl::OUString>& i_rURLS,
SvtModuleOptions& i_rOpt, SvtModuleOptions::EModule i_eMod,
- ImageButton& i_rBtn, FixedText& i_rText,
+ ImageButton& i_rBtn,
MnemonicGenerator& i_rMnemns,
const String& i_rStr
)
@@ -572,7 +553,7 @@ void BackingWindow::layoutButtonAndText(
long nTextWidth = i_rBtn.GetTextWidth( i_rBtn.GetText() );
- nTextWidth += maButtonImageSize.Width();
+ nTextWidth += maButtonImageSize.Width() + 8; // add some fuzz to be on the safe side
if( nColumn >= 0 && nColumn < static_cast<int>(sizeof(mnColumnWidth)/sizeof(mnColumnWidth[0])) )
{
if( nTextWidth > mnColumnWidth[nColumn] )
@@ -582,12 +563,6 @@ void BackingWindow::layoutButtonAndText(
i_rBtn.SetImageAlign( IMAGEALIGN_LEFT );
// show the controls
i_rBtn.Show();
- i_rText.Show( FALSE );
-
-
- // FIXME: the only reason the FixedTexts are left are not to trigger
- // a translation change due to changed src files. For the next minor
- // the FixedTexts should be removed completely
}
void BackingWindow::Paint( const Rectangle& )
@@ -635,8 +610,73 @@ long BackingWindow::Notify( NotifyEvent& rNEvt )
}
const KeyEvent* pEvt = rNEvt.GetKeyEvent();
- if( pEvt && mpAccExec->execute(pEvt->GetKeyCode()) )
+ const KeyCode& rKeyCode(pEvt->GetKeyCode());
+ if( pEvt && mpAccExec->execute(rKeyCode) )
return 1;
+ // #i110344# extrawurst: specialized arrow key control
+ if( rKeyCode.GetModifier() == 0 )
+ {
+ if( rKeyCode.GetCode() == KEY_RIGHT )
+ {
+ if( maWriterButton.HasFocus() )
+ maDrawButton.GrabFocus();
+ else if( maCalcButton.HasFocus() )
+ maDBButton.GrabFocus();
+ else if( maImpressButton.HasFocus() )
+ maMathButton.GrabFocus();
+ else if( maOpenButton.HasFocus() )
+ maTemplateButton.GrabFocus();
+ return 1;
+ }
+ else if( rKeyCode.GetCode() == KEY_LEFT )
+ {
+ if( maDrawButton.HasFocus() )
+ maWriterButton.GrabFocus();
+ else if( maDBButton.HasFocus() )
+ maCalcButton.GrabFocus();
+ else if( maMathButton.HasFocus() )
+ maImpressButton.GrabFocus();
+ else if( maTemplateButton.HasFocus() )
+ maOpenButton.GrabFocus();
+ return 1;
+ }
+ else if( rKeyCode.GetCode() == KEY_UP )
+ {
+ // first column
+ if( maOpenButton.HasFocus() )
+ maImpressButton.GrabFocus();
+ else if( maImpressButton.HasFocus() )
+ maCalcButton.GrabFocus();
+ else if( maCalcButton.HasFocus() )
+ maWriterButton.GrabFocus();
+ // second column
+ else if( maTemplateButton.HasFocus() )
+ maMathButton.GrabFocus();
+ else if( maMathButton.HasFocus() )
+ maDBButton.GrabFocus();
+ else if( maDBButton.HasFocus() )
+ maDrawButton.GrabFocus();
+ return 1;
+ }
+ else if( rKeyCode.GetCode() == KEY_DOWN )
+ {
+ // first column
+ if( maWriterButton.HasFocus() )
+ maCalcButton.GrabFocus();
+ else if( maCalcButton.HasFocus() )
+ maImpressButton.GrabFocus();
+ else if( maImpressButton.HasFocus() )
+ maOpenButton.GrabFocus();
+ // second column
+ else if( maDrawButton.HasFocus() )
+ maDBButton.GrabFocus();
+ else if( maDBButton.HasFocus() )
+ maMathButton.GrabFocus();
+ else if( maMathButton.HasFocus() )
+ maTemplateButton.GrabFocus();
+ return 1;
+ }
+ }
}
return Window::Notify( rNEvt );
}
@@ -696,6 +736,9 @@ void BackingWindow::Resize()
nYPos += nWDelta/2 - nDiff;
+ if( mnLayoutStyle != 1 )
+ nYPos = maControlRect.Top() + mnBtnTop;
+
maWriterButton.SetPosSizePixel( Point( maControlRect.Left() + mnBtnPos, nYPos ), Size( mnTextColumnWidth[0], maButtonImageSize.Height() ) );
maDrawButton.SetPosSizePixel( Point( maControlRect.Left() + mnBtnPos + mnColumnWidth[0], nYPos ), Size( mnTextColumnWidth[1], maButtonImageSize.Height() ) );
nYPos += nBDelta - nDiff;
@@ -865,54 +908,6 @@ IMPL_LINK( BackingWindow, ClickHdl, Button*, pButton )
return 0;
}
-Window* BackingWindow::GetParentLabelFor( const Window* pLabel ) const
-{
- const Window* pRet = NULL;
-
- if( pLabel == &maWriterText )
- pRet = &maWriterButton;
- else if( pLabel == &maCalcText )
- pRet = &maCalcButton;
- else if( pLabel == &maImpressText )
- pRet = &maImpressButton;
- else if( pLabel == &maDrawText )
- pRet = &maDrawButton;
- else if( pLabel == &maDBText )
- pRet = &maDBButton;
- else if( pLabel == &maMathText )
- pRet = &maMathButton;
- else if( pLabel == &maTemplateText )
- pRet = &maTemplateButton;
- else if( pLabel == &maOpenText )
- pRet = &maOpenButton;
-
- return const_cast<Window*>(pRet);
-}
-
-Window* BackingWindow::GetParentLabeledBy( const Window* pLabeled ) const
-{
- const Window *pRet = NULL;
-
- if( pLabeled == &maWriterButton )
- pRet = &maWriterText;
- else if( pLabeled == &maCalcButton )
- pRet = &maCalcText;
- else if( pLabeled == &maImpressButton )
- pRet = &maImpressText;
- else if( pLabeled == &maDrawButton )
- pRet = &maDrawText;
- else if( pLabeled == &maDBButton )
- pRet = &maDBText;
- else if( pLabeled == &maMathButton )
- pRet = &maMathText;
- else if( pLabeled == &maTemplateButton )
- pRet = &maTemplateText;
- else if( pLabeled == &maOpenButton )
- pRet = &maOpenText;
-
- return const_cast<Window*>(pRet);
-}
-
struct ImplDelayedDispatch
{
Reference< XDispatch > xDispatch;
diff --git a/framework/source/services/backingwindow.hxx b/framework/source/services/backingwindow.hxx
index 7b7dfa34b110..c4d4c9b0b76b 100644
--- a/framework/source/services/backingwindow.hxx
+++ b/framework/source/services/backingwindow.hxx
@@ -86,21 +86,13 @@ namespace framework
Size maWelcomeSize;
FixedText maProduct;
Size maProductSize;
- FixedText maWriterText;
ImageButton maWriterButton;
- FixedText maCalcText;
ImageButton maCalcButton;
- FixedText maImpressText;
ImageButton maImpressButton;
- FixedText maOpenText;
ImageButton maOpenButton;
- FixedText maDrawText;
ImageButton maDrawButton;
- FixedText maDBText;
ImageButton maDBButton;
- FixedText maMathText;
ImageButton maMathButton;
- FixedText maTemplateText;
ImageButton maTemplateButton;
DecoToolBox maToolbox;
@@ -129,6 +121,7 @@ namespace framework
sal_Int32 mnLayoutStyle;
svt::AcceleratorExecute* mpAccExec;
long mnBtnPos;
+ long mnBtnTop;
static const int nItemId_Extensions = 1;
static const int nItemId_Reg = 2;
@@ -141,12 +134,12 @@ namespace framework
void loadImage( const ResId& i_rId, ImageButton& i_rButton );
- void layoutButtonAndText( const char* i_pURL, int nColumn, const std::set<rtl::OUString>& i_rURLS,
- SvtModuleOptions& i_rOpt, SvtModuleOptions::EModule i_eMod,
- ImageButton& i_rBtn, FixedText& i_rText,
- MnemonicGenerator& i_rMnemonicGen,
- const String& i_rStr = String()
- );
+ void layoutButton( const char* i_pURL, int nColumn, const std::set<rtl::OUString>& i_rURLS,
+ SvtModuleOptions& i_rOpt, SvtModuleOptions::EModule i_eMod,
+ ImageButton& i_rBtn,
+ MnemonicGenerator& i_rMnemonicGen,
+ const String& i_rStr = String()
+ );
void dispatchURL( const rtl::OUString& i_rURL,
const rtl::OUString& i_rTarget = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "_default" ) ),
@@ -167,8 +160,6 @@ namespace framework
virtual void Resize();
virtual long Notify( NotifyEvent& rNEvt );
virtual void DataChanged( const DataChangedEvent& rDCEvt );
- virtual Window* GetParentLabelFor( const Window* pLabel ) const;
- virtual Window* GetParentLabeledBy( const Window* pLabeled ) const;
virtual void GetFocus();
void setOwningFrame( const com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& xFrame );
diff --git a/framework/source/services/fwk_services.src b/framework/source/services/fwk_services.src
index 7e2ee3253e71..7ad8b4c3cede 100644
--- a/framework/source/services/fwk_services.src
+++ b/framework/source/services/fwk_services.src
@@ -53,34 +53,6 @@ Window DLG_BACKING
{
Text [ en-US ] = "~Open a document...";
};
- Bitmap BMP_BACKING_WRITER
- {
- File = "odt_32.png";
- };
- Bitmap BMP_BACKING_CALC
- {
- File = "ods_32.png";
- };
- Bitmap BMP_BACKING_IMPRESS
- {
- File = "odp_32.png";
- };
- Bitmap BMP_BACKING_DRAW
- {
- File = "odg_32.png";
- };
- Bitmap BMP_BACKING_DATABASE
- {
- File = "odb_32.png";
- };
- Bitmap BMP_BACKING_FORMULA
- {
- File = "odf_32.png";
- };
- Bitmap BMP_BACKING_FOLDER
- {
- File = "folder_32.png";
- };
String STR_BACKING_EXTHELP
{
Text [ en-US ] = "Add new features to %PRODUCTNAME";
@@ -137,6 +109,38 @@ Resource RES_BACKING_IMAGES
{
File = "addtemplate_32.png";
};
+ Bitmap BMP_BACKING_WRITER
+ {
+ File = "odt_32.png";
+ };
+ Bitmap BMP_BACKING_CALC
+ {
+ File = "ods_32.png";
+ };
+ Bitmap BMP_BACKING_IMPRESS
+ {
+ File = "odp_32.png";
+ };
+ Bitmap BMP_BACKING_DRAW
+ {
+ File = "odg_32.png";
+ };
+ Bitmap BMP_BACKING_DATABASE
+ {
+ File = "odb_32.png";
+ };
+ Bitmap BMP_BACKING_FORMULA
+ {
+ File = "odf_32.png";
+ };
+ Bitmap BMP_BACKING_OPENFILE
+ {
+ File = "folder_32.png";
+ };
+ Bitmap BMP_BACKING_OPENTEMPLATE
+ {
+ File = "templates_32.png";
+ };
};
Resource RES_BACKING_IMAGES_HC
@@ -177,6 +181,38 @@ Resource RES_BACKING_IMAGES_HC
{
File = "template_hc.png";
};
+ Bitmap BMP_BACKING_WRITER
+ {
+ File = "odt_32_hc.png";
+ };
+ Bitmap BMP_BACKING_CALC
+ {
+ File = "ods_32_hc.png";
+ };
+ Bitmap BMP_BACKING_IMPRESS
+ {
+ File = "odp_32_hc.png";
+ };
+ Bitmap BMP_BACKING_DRAW
+ {
+ File = "odg_32_hc.png";
+ };
+ Bitmap BMP_BACKING_DATABASE
+ {
+ File = "odb_32_hc.png";
+ };
+ Bitmap BMP_BACKING_FORMULA
+ {
+ File = "odf_32_hc.png";
+ };
+ Bitmap BMP_BACKING_OPENFILE
+ {
+ File = "folder_32_hc.png";
+ };
+ Bitmap BMP_BACKING_OPENTEMPLATE
+ {
+ File = "templates_32_hc.png";
+ };
};
Window WIN_TABWINDOW
diff --git a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
index 8840aee6a634..4bdc626ee91d 100644
--- a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
+++ b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
@@ -120,7 +120,8 @@ static const char* UIELEMENTTYPENAMES[] =
UIELEMENTTYPE_TOOLBAR_NAME,
UIELEMENTTYPE_STATUSBAR_NAME,
UIELEMENTTYPE_FLOATINGWINDOW_NAME,
- UIELEMENTTYPE_PROGRESSBAR_NAME
+ UIELEMENTTYPE_PROGRESSBAR_NAME,
+ UIELEMENTTYPE_TOOLPANEL_NAME
};
static const char RESOURCEURL_PREFIX[] = "private:resource/";
diff --git a/framework/source/uiconfiguration/uiconfigurationmanager.cxx b/framework/source/uiconfiguration/uiconfigurationmanager.cxx
index 4adebdd36c47..e704fe680ae9 100644
--- a/framework/source/uiconfiguration/uiconfigurationmanager.cxx
+++ b/framework/source/uiconfiguration/uiconfigurationmanager.cxx
@@ -118,7 +118,8 @@ static const char* UIELEMENTTYPENAMES[] =
UIELEMENTTYPE_TOOLBAR_NAME,
UIELEMENTTYPE_STATUSBAR_NAME,
UIELEMENTTYPE_FLOATINGWINDOW_NAME,
- UIELEMENTTYPE_PROGRESSBAR_NAME
+ UIELEMENTTYPE_PROGRESSBAR_NAME,
+ UIELEMENTTYPE_TOOLPANEL_NAME
};
static const char RESOURCEURL_PREFIX[] = "private:resource/";
diff --git a/framework/source/uielement/comboboxtoolbarcontroller.cxx b/framework/source/uielement/comboboxtoolbarcontroller.cxx
index 3921625cc76f..058005ffdc40 100644
--- a/framework/source/uielement/comboboxtoolbarcontroller.cxx
+++ b/framework/source/uielement/comboboxtoolbarcontroller.cxx
@@ -46,7 +46,6 @@
#include <com/sun/star/util/XURLTransformer.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
-#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/frame/status/ItemStatus.hpp>
#include <com/sun/star/frame/status/ItemState.hpp>
#include <com/sun/star/frame/status/Visibility.hpp>
diff --git a/framework/source/uielement/controlmenucontroller.cxx b/framework/source/uielement/controlmenucontroller.cxx
index 0672ac69d351..49501194a014 100644
--- a/framework/source/uielement/controlmenucontroller.cxx
+++ b/framework/source/uielement/controlmenucontroller.cxx
@@ -61,6 +61,7 @@
#include <vcl/image.hxx>
#include <svtools/menuoptions.hxx>
#include <dispatch/uieventloghelper.hxx>
+#include <vos/mutex.hxx>
// Copied from svx
// Function-Id's
@@ -213,7 +214,7 @@ DEFINE_XSERVICEINFO_MULTISERVICE ( ControlMenuController
DEFINE_INIT_SERVICE ( ControlMenuController, {} )
ControlMenuController::ControlMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ) :
- PopupMenuControllerBase( xServiceManager ),
+ svt::PopupMenuControllerBase( xServiceManager ),
m_pResPopupMenu( 0 )
{
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
@@ -272,7 +273,7 @@ void SAL_CALL ControlMenuController::disposing( const EventObject& ) throw ( Run
{
Reference< css::awt::XMenuListener > xHolder(( OWeakObject *)this, UNO_QUERY );
- ResetableGuard aLock( m_aLock );
+ osl::ResettableMutexGuard aLock( m_aMutex );
m_xFrame.clear();
m_xDispatch.clear();
m_xServiceManager.clear();
@@ -286,7 +287,7 @@ void SAL_CALL ControlMenuController::disposing( const EventObject& ) throw ( Run
// XStatusListener
void SAL_CALL ControlMenuController::statusChanged( const FeatureStateEvent& Event ) throw ( RuntimeException )
{
- ResetableGuard aLock( m_aLock );
+ osl::ResettableMutexGuard aLock( m_aMutex );
USHORT nMenuId = 0;
for (sal_uInt32 i=0; i < sizeof(aCommands)/sizeof(aCommands[0]); ++i)
@@ -351,7 +352,7 @@ void ControlMenuController::impl_select(const Reference< XDispatch >& /*_xDispat
void SAL_CALL ControlMenuController::activate( const css::awt::MenuEvent& ) throw (RuntimeException)
{
- ResetableGuard aLock( m_aLock );
+ osl::ResettableMutexGuard aLock( m_aMutex );
if ( m_xPopupMenu.is() )
{
@@ -404,10 +405,9 @@ void ControlMenuController::impl_setPopupMenu()
void SAL_CALL ControlMenuController::updatePopupMenu() throw (::com::sun::star::uno::RuntimeException)
{
- ResetableGuard aLock( m_aLock );
+ osl::ResettableMutexGuard aLock( m_aMutex );
- if ( m_bDisposed )
- throw DisposedException();
+ throwIfDisposed();
if ( m_xFrame.is() && m_xPopupMenu.is() )
{
@@ -435,8 +435,8 @@ void SAL_CALL ControlMenuController::updatePopupMenu() throw (::com::sun::star::
// XInitialization
void SAL_CALL ControlMenuController::initialize( const Sequence< Any >& aArguments ) throw ( Exception, RuntimeException )
{
- ResetableGuard aLock( m_aLock );
- PopupMenuControllerBase::initialize(aArguments);
+ osl::ResettableMutexGuard aLock( m_aMutex );
+ svt::PopupMenuControllerBase::initialize(aArguments);
m_aBaseURL = ::rtl::OUString();
}
diff --git a/framework/source/uielement/dropdownboxtoolbarcontroller.cxx b/framework/source/uielement/dropdownboxtoolbarcontroller.cxx
index 43b50eb2a49a..0800103c743e 100644
--- a/framework/source/uielement/dropdownboxtoolbarcontroller.cxx
+++ b/framework/source/uielement/dropdownboxtoolbarcontroller.cxx
@@ -46,7 +46,6 @@
#include <com/sun/star/util/XURLTransformer.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
-#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/frame/status/ItemStatus.hpp>
#include <com/sun/star/frame/status/ItemState.hpp>
#include <com/sun/star/frame/status/Visibility.hpp>
diff --git a/framework/source/uielement/edittoolbarcontroller.cxx b/framework/source/uielement/edittoolbarcontroller.cxx
index 3ad4b11fd1e9..387213d7c3eb 100644
--- a/framework/source/uielement/edittoolbarcontroller.cxx
+++ b/framework/source/uielement/edittoolbarcontroller.cxx
@@ -46,7 +46,6 @@
#include <com/sun/star/util/XURLTransformer.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
-#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/frame/status/ItemStatus.hpp>
#include <com/sun/star/frame/status/ItemState.hpp>
#include <com/sun/star/frame/status/Visibility.hpp>
diff --git a/framework/source/uielement/fontmenucontroller.cxx b/framework/source/uielement/fontmenucontroller.cxx
index 7110ea5aa519..c2625a951efb 100644
--- a/framework/source/uielement/fontmenucontroller.cxx
+++ b/framework/source/uielement/fontmenucontroller.cxx
@@ -59,6 +59,7 @@
#include <vcl/mnemonic.hxx>
#endif
#include <dispatch/uieventloghelper.hxx>
+#include <vos/mutex.hxx>
//_________________________________________________________________________________________________________________
// Defines
@@ -91,7 +92,7 @@ DEFINE_XSERVICEINFO_MULTISERVICE ( FontMenuController
DEFINE_INIT_SERVICE ( FontMenuController, {} )
FontMenuController::FontMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ) :
- PopupMenuControllerBase( xServiceManager )
+ svt::PopupMenuControllerBase( xServiceManager )
{
}
@@ -145,7 +146,7 @@ void SAL_CALL FontMenuController::disposing( const EventObject& ) throw ( Runtim
{
Reference< css::awt::XMenuListener > xHolder(( OWeakObject *)this, UNO_QUERY );
- ResetableGuard aLock( m_aLock );
+ osl::MutexGuard aLock( m_aMutex );
m_xFrame.clear();
m_xDispatch.clear();
m_xFontListDispatch.clear();
@@ -164,12 +165,12 @@ void SAL_CALL FontMenuController::statusChanged( const FeatureStateEvent& Event
if ( Event.State >>= aFontDescriptor )
{
- ResetableGuard aLock( m_aLock );
+ osl::MutexGuard aLock( m_aMutex );
m_aFontFamilyName = aFontDescriptor.Name;
}
else if ( Event.State >>= aFontNameSeq )
{
- ResetableGuard aLock( m_aLock );
+ osl::MutexGuard aLock( m_aMutex );
if ( m_xPopupMenu.is() )
fillPopupMenu( aFontNameSeq, m_xPopupMenu );
}
@@ -192,7 +193,7 @@ void FontMenuController::impl_select(const Reference< XDispatch >& _xDispatch,co
void SAL_CALL FontMenuController::activate( const css::awt::MenuEvent& ) throw (RuntimeException)
{
- ResetableGuard aLock( m_aLock );
+ osl::MutexGuard aLock( m_aMutex );
if ( m_xPopupMenu.is() )
{
@@ -241,14 +242,14 @@ void FontMenuController::impl_setPopupMenu()
void SAL_CALL FontMenuController::updatePopupMenu() throw ( ::com::sun::star::uno::RuntimeException )
{
- PopupMenuControllerBase::updatePopupMenu();
+ svt::PopupMenuControllerBase::updatePopupMenu();
- ResetableGuard aLock( m_aLock );
+ osl::ClearableMutexGuard aLock( m_aMutex );
Reference< XDispatch > xDispatch( m_xFontListDispatch );
com::sun::star::util::URL aTargetURL;
aTargetURL.Complete = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FontNameList" ));
m_xURLTransformer->parseStrict( aTargetURL );
- aLock.unlock();
+ aLock.clear();
if ( xDispatch.is() )
{
diff --git a/framework/source/uielement/fontsizemenucontroller.cxx b/framework/source/uielement/fontsizemenucontroller.cxx
index 8dbd608a28e0..58cf3a3b02be 100644
--- a/framework/source/uielement/fontsizemenucontroller.cxx
+++ b/framework/source/uielement/fontsizemenucontroller.cxx
@@ -64,6 +64,7 @@
#include <svtools/ctrltool.hxx>
#endif
#include <dispatch/uieventloghelper.hxx>
+#include <vos/mutex.hxx>
//_________________________________________________________________________________________________________________
// Defines
@@ -90,7 +91,7 @@ DEFINE_XSERVICEINFO_MULTISERVICE ( FontSizeMenuController
DEFINE_INIT_SERVICE ( FontSizeMenuController, {} )
FontSizeMenuController::FontSizeMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ) :
- PopupMenuControllerBase( xServiceManager ),
+ svt::PopupMenuControllerBase( xServiceManager ),
m_pHeightArray( 0 ),
m_bRebuildMenu( sal_True )
{
@@ -280,7 +281,7 @@ void SAL_CALL FontSizeMenuController::disposing( const EventObject& ) throw ( Ru
{
Reference< css::awt::XMenuListener > xHolder(( OWeakObject *)this, UNO_QUERY );
- ResetableGuard aLock( m_aLock );
+ osl::MutexGuard aLock( m_aMutex );
m_xFrame.clear();
m_xDispatch.clear();
m_xCurrentFontDispatch.clear();
@@ -297,7 +298,7 @@ void SAL_CALL FontSizeMenuController::statusChanged( const FeatureStateEvent& Ev
if ( Event.State >>= aFontDescriptor )
{
- ResetableGuard aLock( m_aLock );
+ osl::MutexGuard aLock( m_aMutex );
m_aFontDescriptor = aFontDescriptor;
if ( m_xPopupMenu.is() )
@@ -306,7 +307,7 @@ void SAL_CALL FontSizeMenuController::statusChanged( const FeatureStateEvent& Ev
}
else if ( Event.State >>= aFontHeight )
{
- ResetableGuard aLock( m_aLock );
+ osl::MutexGuard aLock( m_aMutex );
m_aFontHeight = aFontHeight;
if ( m_xPopupMenu.is() )
@@ -341,16 +342,15 @@ void FontSizeMenuController::impl_setPopupMenu()
void SAL_CALL FontSizeMenuController::updatePopupMenu() throw ( ::com::sun::star::uno::RuntimeException )
{
- ResetableGuard aLock( m_aLock );
+ osl::ClearableMutexGuard aLock( m_aMutex );
- if ( m_bDisposed )
- throw DisposedException();
+ throwIfDisposed();
Reference< XDispatch > xDispatch( m_xCurrentFontDispatch );
com::sun::star::util::URL aTargetURL;
aTargetURL.Complete = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:CharFontName" ));
m_xURLTransformer->parseStrict( aTargetURL );
- aLock.unlock();
+ aLock.clear();
if ( xDispatch.is() )
{
@@ -358,6 +358,6 @@ void SAL_CALL FontSizeMenuController::updatePopupMenu() throw ( ::com::sun::star
xDispatch->removeStatusListener( SAL_STATIC_CAST( XStatusListener*, this ), aTargetURL );
}
- PopupMenuControllerBase::updatePopupMenu();
+ svt::PopupMenuControllerBase::updatePopupMenu();
}
}
diff --git a/framework/source/uielement/headermenucontroller.cxx b/framework/source/uielement/headermenucontroller.cxx
index 50b2ed65e2d2..c0d7b48a401b 100644
--- a/framework/source/uielement/headermenucontroller.cxx
+++ b/framework/source/uielement/headermenucontroller.cxx
@@ -50,7 +50,6 @@
#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
#include <com/sun/star/container/XNameContainer.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/lang/DisposedException.hpp>
//_________________________________________________________________________________________________________________
// includes of other projects
@@ -65,6 +64,7 @@
#include <rtl/ustrbuf.hxx>
//#include <tools/solar.hrc>
#include <dispatch/uieventloghelper.hxx>
+#include <vos/mutex.hxx>
//_________________________________________________________________________________________________________________
// Defines
@@ -97,7 +97,7 @@ DEFINE_XSERVICEINFO_MULTISERVICE ( HeaderMenuController
DEFINE_INIT_SERVICE ( HeaderMenuController, {} )
HeaderMenuController::HeaderMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager,bool _bFooter ) :
- PopupMenuControllerBase( xServiceManager )
+ svt::PopupMenuControllerBase( xServiceManager )
,m_bFooter(_bFooter)
{
}
@@ -221,7 +221,7 @@ void SAL_CALL HeaderMenuController::disposing( const EventObject& ) throw ( Runt
{
Reference< css::awt::XMenuListener > xHolder(( OWeakObject *)this, UNO_QUERY );
- ResetableGuard aLock( m_aLock );
+ osl::MutexGuard aLock( m_aMutex );
m_xFrame.clear();
m_xDispatch.clear();
m_xServiceManager.clear();
@@ -238,7 +238,7 @@ void SAL_CALL HeaderMenuController::statusChanged( const FeatureStateEvent& Even
if ( Event.State >>= xModel )
{
- ResetableGuard aLock( m_aLock );
+ osl::MutexGuard aLock( m_aMutex );
m_xModel = xModel;
if ( m_xPopupMenu.is() )
fillPopupMenu( xModel, m_xPopupMenu );
@@ -258,18 +258,17 @@ void HeaderMenuController::impl_select(const Reference< XDispatch >& _xDispatch,
void SAL_CALL HeaderMenuController::updatePopupMenu() throw (::com::sun::star::uno::RuntimeException)
{
- ResetableGuard aLock( m_aLock );
+ osl::ResettableMutexGuard aLock( m_aMutex );
- if ( m_bDisposed )
- throw DisposedException();
+ throwIfDisposed();
Reference< com::sun::star::frame::XModel > xModel( m_xModel );
- aLock.unlock();
+ aLock.clear();
if ( !xModel.is() )
- PopupMenuControllerBase::updatePopupMenu();
+ svt::PopupMenuControllerBase::updatePopupMenu();
- aLock.lock();
+ aLock.reset();
if ( m_xPopupMenu.is() && m_xModel.is() )
fillPopupMenu( m_xModel, m_xPopupMenu );
}
diff --git a/framework/source/uielement/imagebuttontoolbarcontroller.cxx b/framework/source/uielement/imagebuttontoolbarcontroller.cxx
index d9af2fb4f9f9..5126ffdd253a 100644
--- a/framework/source/uielement/imagebuttontoolbarcontroller.cxx
+++ b/framework/source/uielement/imagebuttontoolbarcontroller.cxx
@@ -46,7 +46,6 @@
#include <com/sun/star/util/XURLTransformer.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
-#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/frame/XControlNotificationListener.hpp>
#include "com/sun/star/util/XMacroExpander.hpp"
#include "com/sun/star/uno/XComponentContext.hpp"
diff --git a/framework/source/uielement/langselectionmenucontroller.cxx b/framework/source/uielement/langselectionmenucontroller.cxx
index 2f0f49655d10..651c9bbfdc86 100644
--- a/framework/source/uielement/langselectionmenucontroller.cxx
+++ b/framework/source/uielement/langselectionmenucontroller.cxx
@@ -77,6 +77,7 @@
#include <dispatch/uieventloghelper.hxx>
#include "helper/mischelper.hxx"
+#include <vos/mutex.hxx>
#include <map>
#include <set>
@@ -106,9 +107,9 @@ DEFINE_XSERVICEINFO_MULTISERVICE ( LanguageSelectionMenuController
DEFINE_INIT_SERVICE ( LanguageSelectionMenuController, {} )
LanguageSelectionMenuController::LanguageSelectionMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ) :
- PopupMenuControllerBase( xServiceManager ),
+ svt::PopupMenuControllerBase( xServiceManager ),
m_bShowMenu( sal_True ),
- m_aLangGuessHelper(xServiceManager)
+ m_aLangGuessHelper( xServiceManager )
{
}
@@ -121,7 +122,7 @@ void SAL_CALL LanguageSelectionMenuController::disposing( const EventObject& ) t
{
Reference< css::awt::XMenuListener > xHolder(( OWeakObject *)this, UNO_QUERY );
- ResetableGuard aLock( m_aLock );
+ osl::MutexGuard aLock( m_aMutex );
m_xFrame.clear();
m_xDispatch.clear();
m_xLanguageDispatch.clear();
@@ -137,7 +138,7 @@ void SAL_CALL LanguageSelectionMenuController::statusChanged( const FeatureState
{
vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() );
- if ( m_bDisposed )
+ if (rBHelper.bDisposed || rBHelper.bInDispose)
return;
m_bShowMenu = sal_True;
@@ -321,15 +322,15 @@ void LanguageSelectionMenuController::fillPopupMenu( Reference< css::awt::XPopup
void SAL_CALL LanguageSelectionMenuController::updatePopupMenu() throw ( ::com::sun::star::uno::RuntimeException )
{
- PopupMenuControllerBase::updatePopupMenu();
+ svt::PopupMenuControllerBase::updatePopupMenu();
// Force status update to get information about the current languages
- ResetableGuard aLock( m_aLock );
+ osl::ClearableMutexGuard aLock( m_aMutex );
Reference< XDispatch > xDispatch( m_xLanguageDispatch );
com::sun::star::util::URL aTargetURL;
aTargetURL.Complete = m_aLangStatusCommandURL;
m_xURLTransformer->parseStrict( aTargetURL );
- aLock.unlock();
+ aLock.clear();
if ( xDispatch.is() )
{
@@ -356,12 +357,12 @@ void SAL_CALL LanguageSelectionMenuController::updatePopupMenu() throw ( ::com::
// XInitialization
void SAL_CALL LanguageSelectionMenuController::initialize( const Sequence< Any >& aArguments ) throw ( Exception, RuntimeException )
{
- ResetableGuard aLock( m_aLock );
+ osl::MutexGuard aLock( m_aMutex );
sal_Bool bInitalized( m_bInitialized );
if ( !bInitalized )
{
- PopupMenuControllerBase::initialize(aArguments);
+ svt::PopupMenuControllerBase::initialize(aArguments);
if ( m_bInitialized )
{
diff --git a/framework/source/uielement/langselectionstatusbarcontroller.cxx b/framework/source/uielement/langselectionstatusbarcontroller.cxx
index a75a1061eaf4..e84ca9e4f09d 100644
--- a/framework/source/uielement/langselectionstatusbarcontroller.cxx
+++ b/framework/source/uielement/langselectionstatusbarcontroller.cxx
@@ -227,6 +227,7 @@ throw (::com::sun::star::uno::RuntimeException)
{
//make a sign for the current language
xPopupMenu->checkItem( nItemId, TRUE );
+ bNothingSelected = false;
}
aLangMap[ nItemId ] = rStr;
++nItemId;
@@ -244,8 +245,8 @@ throw (::com::sun::star::uno::RuntimeException)
{
const OUString & rStr( *it );
if( rStr != OUString( aLanguageTable.GetString( LANGUAGE_NONE ) )&&
- rStr != OUString::createFromAscii( "*" ) &&
- rStr != OUString::createFromAscii( "" ))
+ rStr != sAsterix &&
+ rStr != sEmpty)
{
DBG_ASSERT( MID_LANG_PARA_1 <= nItemId && nItemId <= MID_LANG_PARA_9,
"nItemId outside of expected range!" );
diff --git a/framework/source/uielement/macrosmenucontroller.cxx b/framework/source/uielement/macrosmenucontroller.cxx
index f0f5d52a47d6..2905d0c0bd05 100644
--- a/framework/source/uielement/macrosmenucontroller.cxx
+++ b/framework/source/uielement/macrosmenucontroller.cxx
@@ -48,6 +48,7 @@
#include <rtl/ustrbuf.hxx>
#include <dispatch/uieventloghelper.hxx>
#include "helper/mischelper.hxx"
+#include <vos/mutex.hxx>
using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
@@ -70,7 +71,7 @@ DEFINE_XSERVICEINFO_MULTISERVICE ( MacrosMenuController
DEFINE_INIT_SERVICE ( MacrosMenuController, {} )
MacrosMenuController::MacrosMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ) :
- PopupMenuControllerBase( xServiceManager ),
+ svt::PopupMenuControllerBase( xServiceManager ),
m_xServiceManager( xServiceManager)
{
}
@@ -109,7 +110,7 @@ void SAL_CALL MacrosMenuController::disposing( const EventObject& ) throw ( Runt
{
Reference< css::awt::XMenuListener > xHolder(( OWeakObject *)this, UNO_QUERY );
- ResetableGuard aLock( m_aLock );
+ osl::MutexGuard aLock( m_aMutex );
OSL_TRACE("disposing");
m_xFrame.clear();
m_xDispatch.clear();
@@ -126,7 +127,7 @@ void SAL_CALL MacrosMenuController::disposing( const EventObject& ) throw ( Runt
// XStatusListener
void SAL_CALL MacrosMenuController::statusChanged( const FeatureStateEvent& ) throw ( RuntimeException )
{
- ResetableGuard aLock( m_aLock );
+ osl::MutexGuard aLock( m_aMutex );
if ( m_xPopupMenu.is() )
{
fillPopupMenu( m_xPopupMenu );
diff --git a/framework/source/uielement/makefile.mk b/framework/source/uielement/makefile.mk
index da4ab3d34c74..b74adb1e176f 100644
--- a/framework/source/uielement/makefile.mk
+++ b/framework/source/uielement/makefile.mk
@@ -79,6 +79,7 @@ SLOFILES= \
$(SLO)$/toolbarmerger.obj \
$(SLO)$/toolbarsmenucontroller.obj \
$(SLO)$/toolbarwrapper.obj \
+ $(SLO)$/popupmenucontroller.obj \
$(SLO)$/uicommanddescription.obj \
# --- Targets ------------------------------------------------------
diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx
index 9fbdf87336cc..9d8aa9205c90 100644
--- a/framework/source/uielement/menubarmanager.cxx
+++ b/framework/source/uielement/menubarmanager.cxx
@@ -548,11 +548,14 @@ throw ( RuntimeException )
if ( Event.State >>= bCheckmark )
{
- // Checkmark
+ // Checkmark or RadioButton
m_pVCLMenu->ShowItem( pMenuItemHandler->nItemId, TRUE );
m_pVCLMenu->CheckItem( pMenuItemHandler->nItemId, bCheckmark );
- m_pVCLMenu->SetItemBits( pMenuItemHandler->nItemId,
- m_pVCLMenu->GetItemBits( pMenuItemHandler->nItemId ) | MIB_CHECKABLE );
+
+ MenuItemBits nBits = m_pVCLMenu->GetItemBits( pMenuItemHandler->nItemId );
+ //If not already designated RadioButton set as CheckMark
+ if (!(nBits & MIB_RADIOCHECK))
+ m_pVCLMenu->SetItemBits( pMenuItemHandler->nItemId, nBits | MIB_CHECKABLE );
}
else if ( Event.State >>= aItemText )
{
@@ -1805,6 +1808,8 @@ void MenuBarManager::FillMenu(
nBits |= MIB_ICON;
if ( nStyle & ::com::sun::star::ui::ItemStyle::TEXT )
nBits |= MIB_TEXT;
+ if ( nStyle & ::com::sun::star::ui::ItemStyle::RADIO_CHECK )
+ nBits |= MIB_RADIOCHECK;
pMenu->SetItemBits( nId, nBits );
}
if ( xIndexContainer.is() )
diff --git a/framework/source/uielement/newmenucontroller.cxx b/framework/source/uielement/newmenucontroller.cxx
index 3ac78726d799..786795ff1d14 100644
--- a/framework/source/uielement/newmenucontroller.cxx
+++ b/framework/source/uielement/newmenucontroller.cxx
@@ -67,6 +67,7 @@
#include <svtools/acceleratorexecute.hxx>
#include <unotools/moduleoptions.hxx>
#include <dispatch/uieventloghelper.hxx>
+#include <vos/mutex.hxx>
//_________________________________________________________________________________________________________________
// Defines
@@ -326,7 +327,7 @@ void NewMenuController::retrieveShortcutsFromConfiguration(
}
NewMenuController::NewMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ) :
- PopupMenuControllerBase( xServiceManager ),
+ svt::PopupMenuControllerBase( xServiceManager ),
m_bShowImages( sal_True ),
m_bHiContrast( sal_False ),
m_bNewMenu( sal_False ),
@@ -399,7 +400,7 @@ void SAL_CALL NewMenuController::disposing( const EventObject& ) throw ( Runtime
{
Reference< css::awt::XMenuListener > xHolder(( OWeakObject *)this, UNO_QUERY );
- ResetableGuard aLock( m_aLock );
+ osl::MutexGuard aLock( m_aMutex );
m_xFrame.clear();
m_xDispatch.clear();
m_xServiceManager.clear();
@@ -423,12 +424,12 @@ void SAL_CALL NewMenuController::select( const css::awt::MenuEvent& rEvent ) thr
Reference< XMultiServiceFactory > xServiceManager;
Reference< XURLTransformer > xURLTransformer;
- ResetableGuard aLock( m_aLock );
+ osl::ClearableMutexGuard aLock( m_aMutex );
xPopupMenu = m_xPopupMenu;
xDispatchProvider = Reference< XDispatchProvider >( m_xFrame, UNO_QUERY );
xServiceManager = m_xServiceManager;
xURLTransformer = m_xURLTransformer;
- aLock.unlock();
+ aLock.clear();
css::util::URL aTargetURL;
Sequence< PropertyValue > aArgsList( 1 );
@@ -548,12 +549,12 @@ void NewMenuController::impl_setPopupMenu()
// XInitialization
void SAL_CALL NewMenuController::initialize( const Sequence< Any >& aArguments ) throw ( Exception, RuntimeException )
{
- ResetableGuard aLock( m_aLock );
+ osl::MutexGuard aLock( m_aMutex );
sal_Bool bInitalized( m_bInitialized );
if ( !bInitalized )
{
- PopupMenuControllerBase::initialize( aArguments );
+ svt::PopupMenuControllerBase::initialize( aArguments );
if ( m_bInitialized )
{
diff --git a/framework/source/uielement/objectmenucontroller.cxx b/framework/source/uielement/objectmenucontroller.cxx
index f4d6aea0d82b..80dccb76db05 100644
--- a/framework/source/uielement/objectmenucontroller.cxx
+++ b/framework/source/uielement/objectmenucontroller.cxx
@@ -59,6 +59,7 @@
#include <tools/urlobj.hxx>
#include <rtl/ustrbuf.hxx>
#include <dispatch/uieventloghelper.hxx>
+#include <vos/mutex.hxx>
//_________________________________________________________________________________________________________________
// Defines
@@ -83,7 +84,7 @@ DEFINE_XSERVICEINFO_MULTISERVICE ( ObjectMenuController
DEFINE_INIT_SERVICE ( ObjectMenuController, {} )
ObjectMenuController::ObjectMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ) :
- PopupMenuControllerBase( xServiceManager )
+ svt::PopupMenuControllerBase( xServiceManager )
{
}
@@ -128,7 +129,7 @@ void SAL_CALL ObjectMenuController::disposing( const EventObject& ) throw ( Runt
{
Reference< css::awt::XMenuListener > xHolder(( OWeakObject *)this, UNO_QUERY );
- ResetableGuard aLock( m_aLock );
+ osl::MutexGuard aLock( m_aMutex );
m_xFrame.clear();
m_xDispatch.clear();
m_xObjectUpdateDispatch.clear();
@@ -145,7 +146,7 @@ void SAL_CALL ObjectMenuController::statusChanged( const FeatureStateEvent& Even
Sequence < com::sun::star::embed::VerbDescriptor > aVerbCommandSeq;
if ( Event.State >>= aVerbCommandSeq )
{
- ResetableGuard aLock( m_aLock );
+ osl::MutexGuard aLock( m_aMutex );
if ( m_xPopupMenu.is() )
fillPopupMenu( aVerbCommandSeq, m_xPopupMenu );
}
diff --git a/framework/source/uielement/popupmenucontroller.cxx b/framework/source/uielement/popupmenucontroller.cxx
new file mode 100644
index 000000000000..328777db2b79
--- /dev/null
+++ b/framework/source/uielement/popupmenucontroller.cxx
@@ -0,0 +1,248 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_framework.hxx"
+
+#include <com/sun/star/awt/XPopupMenu.hpp>
+#include <com/sun/star/frame/XPopupMenuController.hpp>
+
+#include <toolkit/helper/vclunohelper.hxx>
+//#include <toolkit/unohlp.hxx>
+
+#include <rtl/ref.hxx>
+
+#include <vcl/toolbox.hxx>
+#include <vcl/menu.hxx>
+#include <vcl/svapp.hxx>
+#include <vos/mutex.hxx>
+
+#include "uielement/popupmenucontroller.hxx"
+#include "services.h"
+
+using rtl::OUString;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::frame;
+using namespace ::com::sun::star::beans;
+
+// --------------------------------------------------------------------
+
+
+namespace framework
+{
+
+DEFINE_XSERVICEINFO_MULTISERVICE ( PopupMenuController ,
+ OWeakObject ,
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ToolbarController" ) ) ,
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.framework.PopupMenuController" ) )
+ )
+
+DEFINE_INIT_SERVICE ( PopupMenuController, {} )
+
+class PopupMenuControllerImpl
+{
+};
+
+//========================================================================
+// class PopupMenuController
+//========================================================================
+
+PopupMenuController::PopupMenuController( const Reference< lang::XMultiServiceFactory >& rServiceManager )
+: svt::ToolboxController( rServiceManager, Reference< frame::XFrame >(), OUString() )
+{
+}
+
+// --------------------------------------------------------------------
+
+PopupMenuController::~PopupMenuController()
+{
+}
+
+// --------------------------------------------------------------------
+// XInterface
+// --------------------------------------------------------------------
+
+Any SAL_CALL PopupMenuController::queryInterface( const Type& aType ) throw (RuntimeException)
+{
+ Any a( ToolboxController::queryInterface( aType ) );
+ if ( a.hasValue() )
+ return a;
+
+ return ::cppu::queryInterface( aType, static_cast< lang::XServiceInfo* >( this ));
+}
+
+// --------------------------------------------------------------------
+
+void SAL_CALL PopupMenuController::acquire() throw ()
+{
+ ToolboxController::acquire();
+}
+
+// --------------------------------------------------------------------
+
+void SAL_CALL PopupMenuController::release() throw ()
+{
+ ToolboxController::release();
+}
+
+// --------------------------------------------------------------------
+// XComponent
+// --------------------------------------------------------------------
+
+void SAL_CALL PopupMenuController::dispose() throw (RuntimeException)
+{
+ if( mxPopupMenuController.is() )
+ {
+ Reference< XComponent > xComponent( mxPopupMenuController, UNO_QUERY );
+ if( xComponent.is() )
+ xComponent->dispose();
+ mxPopupMenuController.clear();
+ }
+
+ mxPopupMenu.clear();
+
+ svt::ToolboxController::dispose();
+}
+
+// --------------------------------------------------------------------
+// XStatusListener
+// --------------------------------------------------------------------
+
+void SAL_CALL PopupMenuController::statusChanged( const frame::FeatureStateEvent& rEvent ) throw ( RuntimeException )
+{
+ svt::ToolboxController::statusChanged(rEvent);
+ enable( rEvent.IsEnabled );
+}
+
+// --------------------------------------------------------------------
+// XToolbarController
+// --------------------------------------------------------------------
+
+void SAL_CALL PopupMenuController::execute( sal_Int16 KeyModifier ) throw (RuntimeException)
+{
+ svt::ToolboxController::execute( KeyModifier );
+}
+
+// --------------------------------------------------------------------
+
+void SAL_CALL PopupMenuController::click() throw (RuntimeException)
+{
+ svt::ToolboxController::click();
+}
+
+// --------------------------------------------------------------------
+
+void SAL_CALL PopupMenuController::doubleClick() throw (RuntimeException)
+{
+ svt::ToolboxController::doubleClick();
+}
+
+// --------------------------------------------------------------------
+
+bool PopupMenuController::CreatePopupMenuController() throw (Exception)
+{
+ Reference< XMultiComponentFactory > xPopupMenuControllerRegistration( getServiceManager()->createInstance( SERVICENAME_POPUPMENUCONTROLLERFACTORY ), UNO_QUERY_THROW );
+
+ Sequence< Any > aSeq( 2 );
+ PropertyValue aPropValue;
+
+ aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ModuleName" ));
+ aPropValue.Value <<= getModuleName();
+ aSeq[0] <<= aPropValue;
+ aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Frame" ));
+ aPropValue.Value <<= m_xFrame;
+ aSeq[1] <<= aPropValue;
+
+ Reference< XPropertySet > xProps( getServiceManager(), UNO_QUERY_THROW );
+ Reference< XComponentContext > xComponentContext( xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ))), UNO_QUERY_THROW );
+
+ Reference< XPopupMenuController > xPopupMenuController( xPopupMenuControllerRegistration->createInstanceWithArgumentsAndContext( getCommandURL(), aSeq, xComponentContext ), UNO_QUERY );
+ if ( xPopupMenuController.is() )
+ {
+ mxPopupMenuController = xPopupMenuController;
+ return true;
+ }
+ return false;
+}
+
+Reference< awt::XWindow > SAL_CALL PopupMenuController::createPopupWindow() throw (RuntimeException)
+{
+ ::vos::OGuard aSolarLock(Application::GetSolarMutex());
+
+ Reference< awt::XWindow > xRet;
+
+ try
+ {
+ ToolBox* pToolBox = dynamic_cast< ToolBox* >( VCLUnoHelper::GetWindow( getParent() ) );
+ if( !pToolBox )
+ return xRet;
+
+ // get selected button
+ USHORT nItemId = pToolBox->GetDownItemId();
+ if( !nItemId )
+ return xRet;
+
+ ::Rectangle aRect( pToolBox->GetItemRect( nItemId ) );
+
+ if( !mxPopupMenuController.is() && !CreatePopupMenuController() )
+ return xRet;
+
+ if( !mxPopupMenu.is() )
+ {
+ mxPopupMenu = Reference< awt::XPopupMenu >( getServiceManager()->createInstance( DECLARE_ASCII( "stardiv.Toolkit.VCLXPopupMenu" ) ), UNO_QUERY_THROW );
+ mxPopupMenuController->setPopupMenu( mxPopupMenu );
+ }
+ else
+ {
+ mxPopupMenuController->updatePopupMenu();
+
+ }
+ pToolBox->SetItemDown( nItemId, TRUE );
+ Reference< awt::XWindowPeer > xPeer( getParent(), UNO_QUERY_THROW );
+ mxPopupMenu->execute( xPeer, VCLUnoHelper::ConvertToAWTRect( aRect ), 0 );
+ pToolBox->SetItemDown( nItemId, FALSE );
+ }
+ catch( Exception& )
+ {
+ }
+
+ return xRet;
+}
+
+// --------------------------------------------------------------------
+
+Reference< awt::XWindow > SAL_CALL PopupMenuController::createItemWindow( const Reference< awt::XWindow >& /*Parent*/ ) throw (RuntimeException)
+{
+ return Reference< awt::XWindow >();
+}
+
+// --------------------------------------------------------------------
+
+}
+
diff --git a/framework/source/uielement/progressbarwrapper.cxx b/framework/source/uielement/progressbarwrapper.cxx
index 2cd0ed891db6..a20f107ea22e 100644
--- a/framework/source/uielement/progressbarwrapper.cxx
+++ b/framework/source/uielement/progressbarwrapper.cxx
@@ -43,6 +43,7 @@
// interface includes
//_________________________________________________________________________________________________________________
#include <com/sun/star/ui/UIElementType.hpp>
+#include <com/sun/star/lang/DisposedException.hpp>
//_________________________________________________________________________________________________________________
// includes of other projects
diff --git a/framework/source/uielement/recentfilesmenucontroller.cxx b/framework/source/uielement/recentfilesmenucontroller.cxx
index cec95485dacd..64f05ed642cb 100644
--- a/framework/source/uielement/recentfilesmenucontroller.cxx
+++ b/framework/source/uielement/recentfilesmenucontroller.cxx
@@ -47,7 +47,6 @@
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/awt/MenuItemStyle.hpp>
#include <com/sun/star/util/XStringWidth.hpp>
-#include <com/sun/star/lang/DisposedException.hpp>
//_________________________________________________________________________________________________________________
// includes of other projects
//_________________________________________________________________________________________________________________
@@ -64,6 +63,7 @@
#include <osl/file.hxx>
//#include <tools/solar.hrc>
#include <dispatch/uieventloghelper.hxx>
+#include <vos/mutex.hxx>
//_________________________________________________________________________________________________________________
// Defines
@@ -105,7 +105,7 @@ DEFINE_XSERVICEINFO_MULTISERVICE ( RecentFilesMenuController
DEFINE_INIT_SERVICE ( RecentFilesMenuController, {} )
RecentFilesMenuController::RecentFilesMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ) :
- PopupMenuControllerBase( xServiceManager ),
+ svt::PopupMenuControllerBase( xServiceManager ),
m_bDisabled( sal_False )
{
}
@@ -245,11 +245,11 @@ void RecentFilesMenuController::executeEntry( sal_Int32 nIndex )
Reference< XDispatchProvider > xDispatchProvider;
Reference< XMultiServiceFactory > xServiceManager;
- ResetableGuard aLock( m_aLock );
+ osl::ClearableMutexGuard aLock( m_aMutex );
xPopupMenu = m_xPopupMenu;
xDispatchProvider = Reference< XDispatchProvider >( m_xFrame, UNO_QUERY );
xServiceManager = m_xServiceManager;
- aLock.unlock();
+ aLock.clear();
css::util::URL aTargetURL;
Sequence< PropertyValue > aArgsList;
@@ -312,7 +312,7 @@ void SAL_CALL RecentFilesMenuController::disposing( const EventObject& ) throw (
{
Reference< css::awt::XMenuListener > xHolder(( OWeakObject *)this, UNO_QUERY );
- ResetableGuard aLock( m_aLock );
+ osl::MutexGuard aLock( m_aMutex );
m_xFrame.clear();
m_xDispatch.clear();
m_xServiceManager.clear();
@@ -325,7 +325,7 @@ void SAL_CALL RecentFilesMenuController::disposing( const EventObject& ) throw (
// XStatusListener
void SAL_CALL RecentFilesMenuController::statusChanged( const FeatureStateEvent& Event ) throw ( RuntimeException )
{
- ResetableGuard aLock( m_aLock );
+ osl::MutexGuard aLock( m_aMutex );
m_bDisabled = !Event.IsEnabled;
}
@@ -336,11 +336,11 @@ void SAL_CALL RecentFilesMenuController::select( const css::awt::MenuEvent& rEve
Reference< XDispatchProvider > xDispatchProvider;
Reference< XMultiServiceFactory > xServiceManager;
- ResetableGuard aLock( m_aLock );
+ osl::ClearableMutexGuard aLock( m_aMutex );
xPopupMenu = m_xPopupMenu;
xDispatchProvider = Reference< XDispatchProvider >( m_xFrame, UNO_QUERY );
xServiceManager = m_xServiceManager;
- aLock.unlock();
+ aLock.clear();
css::util::URL aTargetURL;
Sequence< PropertyValue > aArgsList;
@@ -355,7 +355,7 @@ void SAL_CALL RecentFilesMenuController::select( const css::awt::MenuEvent& rEve
void SAL_CALL RecentFilesMenuController::activate( const css::awt::MenuEvent& ) throw (RuntimeException)
{
- ResetableGuard aLock( m_aLock );
+ osl::MutexGuard aLock( m_aMutex );
impl_setPopupMenu();
}
@@ -368,17 +368,16 @@ void RecentFilesMenuController::impl_setPopupMenu()
void SAL_CALL RecentFilesMenuController::updatePopupMenu() throw (RuntimeException)
{
- ResetableGuard aLock( m_aLock );
+ osl::ClearableMutexGuard aLock( m_aMutex );
- if ( m_bDisposed )
- throw DisposedException();
+ throwIfDisposed();
Reference< XStatusListener > xStatusListener( static_cast< OWeakObject* >( this ), UNO_QUERY );
Reference< XDispatch > xDispatch( m_xDispatch );
com::sun::star::util::URL aTargetURL;
aTargetURL.Complete = m_aCommandURL;
m_xURLTransformer->parseStrict( aTargetURL );
- aLock.unlock();
+ aLock.clear();
// Add/remove status listener to get a status update once
if ( xDispatch.is() )
@@ -395,10 +394,9 @@ Reference< XDispatch > SAL_CALL RecentFilesMenuController::queryDispatch(
sal_Int32 /*nFlags*/ )
throw( RuntimeException )
{
- ResetableGuard aLock( m_aLock );
+ osl::MutexGuard aLock( m_aMutex );
- if ( m_bDisposed )
- throw DisposedException();
+ throwIfDisposed();
if ( aURL.Complete.indexOf( m_aBaseURL ) == 0 )
return Reference< XDispatch >( static_cast< OWeakObject* >( this ), UNO_QUERY );
@@ -412,10 +410,9 @@ void SAL_CALL RecentFilesMenuController::dispatch(
const Sequence< PropertyValue >& /*seqProperties*/ )
throw( RuntimeException )
{
- ResetableGuard aLock( m_aLock );
+ osl::MutexGuard aLock( m_aMutex );
- if ( m_bDisposed )
- throw DisposedException();
+ throwIfDisposed();
if ( aURL.Complete.indexOf( m_aBaseURL ) == 0 )
{
@@ -448,12 +445,11 @@ void SAL_CALL RecentFilesMenuController::addStatusListener(
const URL& aURL )
throw( RuntimeException )
{
- ResetableGuard aLock( m_aLock );
+ osl::MutexGuard aLock( m_aMutex );
- if ( m_bDisposed )
- throw DisposedException();
+ throwIfDisposed();
- PopupMenuControllerBase::addStatusListener( xControl, aURL );
+ svt::PopupMenuControllerBase::addStatusListener( xControl, aURL );
}
void SAL_CALL RecentFilesMenuController::removeStatusListener(
@@ -461,7 +457,7 @@ void SAL_CALL RecentFilesMenuController::removeStatusListener(
const URL& aURL )
throw( RuntimeException )
{
- PopupMenuControllerBase::removeStatusListener( xControl, aURL );
+ svt::PopupMenuControllerBase::removeStatusListener( xControl, aURL );
}
IMPL_STATIC_LINK_NOINSTANCE( RecentFilesMenuController, ExecuteHdl_Impl, LoadRecentFile*, pLoadRecentFile )
diff --git a/framework/source/uielement/rootitemcontainer.cxx b/framework/source/uielement/rootitemcontainer.cxx
index e67b734730e5..8c81f31f2394 100644
--- a/framework/source/uielement/rootitemcontainer.cxx
+++ b/framework/source/uielement/rootitemcontainer.cxx
@@ -127,7 +127,6 @@ RootItemContainer::RootItemContainer( const Reference< XIndexAccess >& rSourceCo
Reference< XPropertySet > xPropSet( rSourceContainer, UNO_QUERY );
if ( xPropSet.is() )
{
- rtl::OUString aUIName;
xPropSet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "UIName" ))) >>= m_aUIName;
}
}
diff --git a/framework/source/uielement/spinfieldtoolbarcontroller.cxx b/framework/source/uielement/spinfieldtoolbarcontroller.cxx
index 43ad09ffc1ee..dad2775dc453 100644
--- a/framework/source/uielement/spinfieldtoolbarcontroller.cxx
+++ b/framework/source/uielement/spinfieldtoolbarcontroller.cxx
@@ -49,7 +49,6 @@
#include <com/sun/star/util/XURLTransformer.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
-#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/frame/status/ItemStatus.hpp>
#include <com/sun/star/frame/status/ItemState.hpp>
#include <com/sun/star/frame/status/Visibility.hpp>
diff --git a/framework/source/uielement/statusbarmanager.cxx b/framework/source/uielement/statusbarmanager.cxx
index cb9cbb2896f7..0bbdbc339a34 100644
--- a/framework/source/uielement/statusbarmanager.cxx
+++ b/framework/source/uielement/statusbarmanager.cxx
@@ -56,6 +56,7 @@
#include <com/sun/star/lang/XMultiComponentFactory.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/awt/Command.hpp>
+#include <com/sun/star/lang/DisposedException.hpp>
//_________________________________________________________________________________________________________________
// other includes
diff --git a/framework/source/uielement/togglebuttontoolbarcontroller.cxx b/framework/source/uielement/togglebuttontoolbarcontroller.cxx
index a5e4263385fa..cf39edec2a7c 100644
--- a/framework/source/uielement/togglebuttontoolbarcontroller.cxx
+++ b/framework/source/uielement/togglebuttontoolbarcontroller.cxx
@@ -46,7 +46,6 @@
#include <com/sun/star/util/XURLTransformer.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
-#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/frame/XControlNotificationListener.hpp>
#include "com/sun/star/util/XMacroExpander.hpp"
#include "com/sun/star/uno/XComponentContext.hpp"
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx
index d89b81c0f9b6..abb263497854 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -52,6 +52,7 @@
#endif
#include <classes/addonsoptions.hxx>
#include <uielement/toolbarmerger.hxx>
+#include <helper/acceleratorinfo.hxx>
//_________________________________________________________________________________________________________________
// interface includes
@@ -75,6 +76,7 @@
#include <com/sun/star/ui/UIElementType.hpp>
#include <comphelper/sequence.hxx>
#include <com/sun/star/frame/status/Visibility.hpp>
+#include <com/sun/star/lang/DisposedException.hpp>
//_________________________________________________________________________________________________________________
// other includes
@@ -97,11 +99,14 @@
#include <svtools/menuoptions.hxx>
#include <unotools/cmdoptions.hxx>
#include <boost/bind.hpp>
+#include <svtools/acceleratorexecute.hxx>
//_________________________________________________________________________________________________________________
// namespaces
//_________________________________________________________________________________________________________________
+using rtl::OUString;
+
using namespace ::com::sun::star::awt;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::uno;
@@ -112,6 +117,7 @@ using namespace ::com::sun::star::util;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::frame;
using namespace ::com::sun::star::ui;
+using namespace ::com::sun::star;
namespace framework
{
@@ -257,7 +263,8 @@ ToolBarManager::ToolBarManager( const Reference< XMultiServiceFactory >& rServic
m_xFrame( rFrame ),
m_aListenerContainer( m_aLock.getShareableOslMutex() ),
m_xServiceManager( rServiceManager ),
- m_nSymbolsStyle( SvtMiscOptions().GetCurrentSymbolsStyle() )
+ m_nSymbolsStyle( SvtMiscOptions().GetCurrentSymbolsStyle() ),
+ m_bAcceleratorCfg( sal_False )
{
Window* pWindow = m_pToolBar;
while ( pWindow && !pWindow->IsSystemWindow() )
@@ -663,6 +670,9 @@ void SAL_CALL ToolBarManager::dispose() throw( RuntimeException )
m_xFrame.clear();
m_xServiceManager.clear();
+ m_xGlobalAcceleratorManager.clear();
+ m_xModuleAcceleratorManager.clear();
+ m_xDocAcceleratorManager.clear();
m_bDisposed = sal_True;
}
@@ -803,17 +813,18 @@ void ToolBarManager::RemoveControllers()
m_aControllerMap.clear();
}
-::rtl::OUString ToolBarManager::RetrieveLabelFromCommand( const ::rtl::OUString& aCmdURL )
+uno::Sequence< beans::PropertyValue > ToolBarManager::GetPropsForCommand( const ::rtl::OUString& rCmdURL )
{
- ::rtl::OUString aLabel;
+ Sequence< PropertyValue > aPropSeq;
- // Retrieve popup menu labels
- if ( !m_bModuleIdentified )
+ // Retrieve properties for command
+ try
{
- Reference< XModuleManager > xModuleManager( m_xServiceManager->createInstance( SERVICENAME_MODULEMANAGER ), UNO_QUERY_THROW );
- Reference< XInterface > xIfac( m_xFrame, UNO_QUERY );
- try
+ if ( !m_bModuleIdentified )
{
+ Reference< XModuleManager > xModuleManager( m_xServiceManager->createInstance( SERVICENAME_MODULEMANAGER ), UNO_QUERY_THROW );
+ Reference< XInterface > xIfac( m_xFrame, UNO_QUERY );
+
m_bModuleIdentified = sal_True;
m_aModuleIdentifier = xModuleManager->identify( xIfac );
@@ -821,44 +832,57 @@ void ToolBarManager::RemoveControllers()
{
Reference< XNameAccess > xNameAccess( m_xServiceManager->createInstance( SERVICENAME_UICOMMANDDESCRIPTION ), UNO_QUERY );
if ( xNameAccess.is() )
- {
xNameAccess->getByName( m_aModuleIdentifier ) >>= m_xUICommandLabels;
- }
}
}
- catch ( Exception& )
+
+ if ( m_xUICommandLabels.is() )
{
+ if ( rCmdURL.getLength() > 0 )
+ m_xUICommandLabels->getByName( rCmdURL ) >>= aPropSeq;
}
}
+ catch ( Exception& )
+ {
+ }
- if ( m_xUICommandLabels.is() )
+ return aPropSeq;
+}
+
+::rtl::OUString ToolBarManager::RetrieveLabelFromCommand( const ::rtl::OUString& aCmdURL )
+{
+ ::rtl::OUString aLabel;
+ Sequence< PropertyValue > aPropSeq;
+
+ // Retrieve popup menu labels
+ aPropSeq = GetPropsForCommand( aCmdURL );
+ for ( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ )
{
- try
+ if ( aPropSeq[i].Name.equalsAscii( "Name" ))
{
- if ( aCmdURL.getLength() > 0 )
- {
- rtl::OUString aStr;
- Sequence< PropertyValue > aPropSeq;
- if ( m_xUICommandLabels->getByName( aCmdURL ) >>= aPropSeq )
- {
- for ( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ )
- {
- if ( aPropSeq[i].Name.equalsAscii( "Name" ))
- {
- aPropSeq[i].Value >>= aStr;
- break;
- }
- }
- }
- aLabel = aStr;
- }
+ aPropSeq[i].Value >>= aLabel;
+ break;
}
- catch ( com::sun::star::uno::Exception& )
+ }
+ return aLabel;
+}
+
+sal_Int32 ToolBarManager::RetrievePropertiesFromCommand( const ::rtl::OUString& aCmdURL )
+{
+ sal_Int32 nProperties(0);
+ Sequence< PropertyValue > aPropSeq;
+
+ // Retrieve popup menu labels
+ aPropSeq = GetPropsForCommand( aCmdURL );
+ for ( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ )
+ {
+ if ( aPropSeq[i].Name.equalsAscii( "Properties" ))
{
+ aPropSeq[i].Value >>= nProperties;
+ break;
}
}
-
- return aLabel;
+ return nProperties;
}
void ToolBarManager::CreateControllers()
@@ -969,8 +993,15 @@ void ToolBarManager::CreateControllers()
{
MenuDescriptionMap::iterator it = m_aMenuMap.find( nId );
if ( it == m_aMenuMap.end() )
- xController = Reference< XStatusListener >(
- new GenericToolbarController( m_xServiceManager, m_xFrame, m_pToolBar, nId, aCommandURL ));
+ {
+ xController = Reference< XStatusListener >(
+ new GenericToolbarController( m_xServiceManager, m_xFrame, m_pToolBar, nId, aCommandURL ));
+
+ // Accessibility support: Set toggle button role for specific commands
+ sal_Int32 nProps = RetrievePropertiesFromCommand( aCommandURL );
+ if ( nProps & UICOMMANDDESCRIPTION_PROPERTIES_TOGGLEBUTTON )
+ m_pToolBar->SetItemBits( nId, m_pToolBar->GetItemBits( nId ) | TIB_CHECKABLE );
+ }
else
xController = Reference< XStatusListener >(
new MenuToolbarController( m_xServiceManager, m_xFrame, m_pToolBar, nId, aCommandURL, m_aModuleIdentifier, m_aMenuMap[ nId ] ));
@@ -1028,6 +1059,10 @@ void ToolBarManager::CreateControllers()
aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ParentWindow" ));
aPropValue.Value <<= xToolbarWindow;
aPropertyVector.push_back( makeAny( aPropValue ));
+ aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ModuleName" ));
+ aPropValue.Value <<= m_aModuleIdentifier;
+ aPropertyVector.push_back( makeAny( aPropValue ));
+
if ( nWidth > 0 )
{
aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Width" ));
@@ -1257,13 +1292,31 @@ void ToolBarManager::FillToolbar( const Reference< XIndexAccess >& rItemContaine
m_pToolBar->InsertItem( nId, aString, nItemBits );
m_pToolBar->SetItemCommand( nId, aCommandURL );
if ( aTooltip.getLength() )
+ {
m_pToolBar->SetQuickHelpText( nId, aTooltip );
+ }
else
- m_pToolBar->SetQuickHelpText( nId, aString );
+ {
+ ::rtl::OUString sQuickHelp( aString );
+ ::rtl::OUString sShortCut;
+ if( RetrieveShortcut( aCommandURL, sShortCut ) )
+ {
+ sQuickHelp += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( " (" ) );
+ sQuickHelp += sShortCut;
+ sQuickHelp += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ")" ) );
+ }
+
+ m_pToolBar->SetQuickHelpText( nId, sQuickHelp );
+ }
+
if ( aLabel.getLength() > 0 )
+ {
m_pToolBar->SetItemText( nId, aLabel );
+ }
else
+ {
m_pToolBar->SetItemText( nId, aString );
+ }
m_pToolBar->EnableItem( nId, sal_True );
m_pToolBar->SetItemState( nId, STATE_NOCHECK );
@@ -1530,7 +1583,11 @@ IMPL_LINK( ToolBarManager, DropdownClick, ToolBox*, EMPTYARG )
Reference< XToolbarController > xController( pIter->second, UNO_QUERY );
if ( xController.is() )
- xController->createPopupWindow();
+ {
+ Reference< XWindow > xWin = xController->createPopupWindow();
+ if ( xWin.is() )
+ xWin->setFocus();
+ }
}
return 1;
}
@@ -2102,6 +2159,121 @@ Image ToolBarManager::QueryAddonsImage( const ::rtl::OUString& aCommandURL, bool
return aImage;
}
+bool ToolBarManager::impl_RetrieveShortcutsFromConfiguration(
+ const Reference< XAcceleratorConfiguration >& rAccelCfg,
+ const rtl::OUString& rCommand,
+ rtl::OUString& rShortCut )
+{
+ RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ToolBarManager::impl_RetrieveShortcutsFromConfiguration" );
+ if ( rAccelCfg.is() )
+ {
+ try
+ {
+ com::sun::star::awt::KeyEvent aKeyEvent;
+ Sequence< OUString > aCommands(1);
+ aCommands[0] = rCommand;
+
+ Sequence< Any > aSeqKeyCode( rAccelCfg->getPreferredKeyEventsForCommandList( aCommands ) );
+ if( aSeqKeyCode.getLength() == 1 )
+ {
+ if ( aSeqKeyCode[0] >>= aKeyEvent )
+ {
+ rShortCut = svt::AcceleratorExecute::st_AWTKey2VCLKey( aKeyEvent ).GetName();
+ return true;
+ }
+ }
+ }
+ catch ( IllegalArgumentException& )
+ {
+ }
+ }
+
+ return false;
+}
+
+bool ToolBarManager::RetrieveShortcut( const rtl::OUString& rCommandURL, rtl::OUString& rShortCut )
+{
+ RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ToolBarManager::RetrieveShortcuts" );
+ if ( m_bModuleIdentified )
+ {
+ Reference< XAcceleratorConfiguration > xDocAccelCfg( m_xDocAcceleratorManager );
+ Reference< XAcceleratorConfiguration > xModuleAccelCfg( m_xModuleAcceleratorManager );
+ Reference< XAcceleratorConfiguration > xGlobalAccelCfg( m_xGlobalAcceleratorManager );
+
+ if ( !m_bAcceleratorCfg )
+ {
+ // Retrieve references on demand
+ m_bAcceleratorCfg = sal_True;
+ if ( !xDocAccelCfg.is() )
+ {
+ Reference< XController > xController = m_xFrame->getController();
+ Reference< XModel > xModel;
+ if ( xController.is() )
+ {
+ xModel = xController->getModel();
+ if ( xModel.is() )
+ {
+ Reference< XUIConfigurationManagerSupplier > xSupplier( xModel, UNO_QUERY );
+ if ( xSupplier.is() )
+ {
+ Reference< XUIConfigurationManager > xDocUICfgMgr( xSupplier->getUIConfigurationManager(), UNO_QUERY );
+ if ( xDocUICfgMgr.is() )
+ {
+ xDocAccelCfg = Reference< XAcceleratorConfiguration >( xDocUICfgMgr->getShortCutManager(), UNO_QUERY );
+ m_xDocAcceleratorManager = xDocAccelCfg;
+ }
+ }
+ }
+ }
+ }
+
+ if ( !xModuleAccelCfg.is() )
+ {
+ Reference< XModuleUIConfigurationManagerSupplier > xModuleCfgMgrSupplier( m_xServiceManager->createInstance(
+ SERVICENAME_MODULEUICONFIGURATIONMANAGERSUPPLIER ),
+ UNO_QUERY );
+ try
+ {
+ Reference< XUIConfigurationManager > xUICfgMgr = xModuleCfgMgrSupplier->getUIConfigurationManager( m_aModuleIdentifier );
+ if ( xUICfgMgr.is() )
+ {
+ xModuleAccelCfg = Reference< XAcceleratorConfiguration >( xUICfgMgr->getShortCutManager(), UNO_QUERY );
+ m_xModuleAcceleratorManager = xModuleAccelCfg;
+ }
+ }
+ catch ( RuntimeException& )
+ {
+ throw;
+ }
+ catch ( Exception& )
+ {
+ }
+ }
+
+ if ( !xGlobalAccelCfg.is() )
+ {
+ xGlobalAccelCfg = Reference< XAcceleratorConfiguration >( m_xServiceManager->createInstance(
+ SERVICENAME_GLOBALACCELERATORCONFIGURATION ),
+ UNO_QUERY );
+ m_xGlobalAcceleratorManager = xGlobalAccelCfg;
+ }
+ }
+
+ bool bFound = false;
+
+ if ( m_xGlobalAcceleratorManager.is() )
+ bFound = impl_RetrieveShortcutsFromConfiguration( xGlobalAccelCfg, rCommandURL, rShortCut );
+ if ( !bFound && m_xModuleAcceleratorManager.is() )
+ bFound = impl_RetrieveShortcutsFromConfiguration( xModuleAccelCfg, rCommandURL, rShortCut );
+ if ( !bFound && m_xDocAcceleratorManager.is() )
+ impl_RetrieveShortcutsFromConfiguration( xGlobalAccelCfg, rCommandURL, rShortCut );
+
+ if( bFound )
+ return true;
+ }
+ return false;
+}
+
}
diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx
index 02402205bd1c..d0ddeccfab20 100644
--- a/framework/source/uielement/toolbarsmenucontroller.cxx
+++ b/framework/source/uielement/toolbarsmenucontroller.cxx
@@ -58,7 +58,6 @@
#include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/UIElementType.hpp>
-#include <com/sun/star/lang/DisposedException.hpp>
//_________________________________________________________________________________________________________________
// includes of other projects
@@ -167,7 +166,7 @@ DEFINE_XSERVICEINFO_MULTISERVICE ( ToolbarsMenuController
DEFINE_INIT_SERVICE ( ToolbarsMenuController, {} )
ToolbarsMenuController::ToolbarsMenuController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ) :
- PopupMenuControllerBase( xServiceManager ),
+ svt::PopupMenuControllerBase( xServiceManager ),
m_aPropUIName( RTL_CONSTASCII_USTRINGPARAM( "UIName" )),
m_aPropResourceURL( RTL_CONSTASCII_USTRINGPARAM( "ResourceURL" )),
m_bModuleIdentified( sal_False ),
@@ -563,7 +562,7 @@ void SAL_CALL ToolbarsMenuController::disposing( const EventObject& ) throw ( Ru
{
Reference< css::awt::XMenuListener > xHolder(( OWeakObject *)this, UNO_QUERY );
- ResetableGuard aLock( m_aLock );
+ osl::MutexGuard aLock( m_aMutex );
m_xFrame.clear();
m_xDispatch.clear();
m_xDocCfgMgr.clear();
@@ -584,9 +583,9 @@ void SAL_CALL ToolbarsMenuController::statusChanged( const FeatureStateEvent& Ev
sal_Bool bSetCheckmark = sal_False;
sal_Bool bCheckmark = sal_False;
- ResetableGuard aLock( m_aLock );
+ osl::ClearableMutexGuard aLock( m_aMutex );
Reference< css::awt::XPopupMenu > xPopupMenu( m_xPopupMenu );
- aLock.unlock();
+ aLock.clear();
if ( xPopupMenu.is() )
{
@@ -633,13 +632,13 @@ void SAL_CALL ToolbarsMenuController::select( const css::awt::MenuEvent& rEvent
Reference< XFrame > xFrame;
Reference< XNameAccess > xPersistentWindowState;
- ResetableGuard aLock( m_aLock );
+ osl::ClearableMutexGuard aLock( m_aMutex );
xPopupMenu = m_xPopupMenu;
xServiceManager = m_xServiceManager;
xURLTransformer = m_xURLTransformer;
xFrame = m_xFrame;
xPersistentWindowState = m_xPersistentWindowState;
- aLock.unlock();
+ aLock.clear();
if ( xPopupMenu.is() )
{
@@ -792,7 +791,7 @@ void SAL_CALL ToolbarsMenuController::activate( const css::awt::MenuEvent& ) thr
Reference< XDispatchProvider > xDispatchProvider( m_xFrame, UNO_QUERY );
Reference< XURLTransformer > xURLTransformer( m_xURLTransformer );
{
- ResetableGuard aLock( m_aLock );
+ osl::MutexGuard aLock( m_aMutex );
fillPopupMenu( m_xPopupMenu );
aCmdVector = m_aCommandVector;
}
@@ -829,10 +828,9 @@ void SAL_CALL ToolbarsMenuController::activate( const css::awt::MenuEvent& ) thr
// XPopupMenuController
void SAL_CALL ToolbarsMenuController::setPopupMenu( const Reference< css::awt::XPopupMenu >& xPopupMenu ) throw ( RuntimeException )
{
- ResetableGuard aLock( m_aLock );
+ osl::MutexGuard aLock( m_aMutex );
- if ( m_bDisposed )
- throw DisposedException();
+ throwIfDisposed();
if ( m_xFrame.is() && !m_xPopupMenu.is() )
{
@@ -848,11 +846,11 @@ void SAL_CALL ToolbarsMenuController::setPopupMenu( const Reference< css::awt::X
// XInitialization
void SAL_CALL ToolbarsMenuController::initialize( const Sequence< Any >& aArguments ) throw ( Exception, RuntimeException )
{
- ResetableGuard aLock( m_aLock );
+ osl::MutexGuard aLock( m_aMutex );
sal_Bool bInitalized( m_bInitialized );
if ( !bInitalized )
{
- PopupMenuControllerBase::initialize(aArguments);
+ svt::PopupMenuControllerBase::initialize(aArguments);
if ( m_bInitialized )
{
diff --git a/framework/source/uielement/toolbarwrapper.cxx b/framework/source/uielement/toolbarwrapper.cxx
index 0e73b5616aa7..5a4fb7cddde4 100644
--- a/framework/source/uielement/toolbarwrapper.cxx
+++ b/framework/source/uielement/toolbarwrapper.cxx
@@ -53,6 +53,7 @@
#include <com/sun/star/container/XIndexContainer.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/ui/UIElementType.hpp>
+#include <com/sun/star/lang/DisposedException.hpp>
//_________________________________________________________________________________________________________________
// other includes
diff --git a/framework/source/uielement/uicommanddescription.cxx b/framework/source/uielement/uicommanddescription.cxx
index fdcd08f221fd..0d50aa4c36d4 100644
--- a/framework/source/uielement/uicommanddescription.cxx
+++ b/framework/source/uielement/uicommanddescription.cxx
@@ -340,7 +340,7 @@ Any ConfigurationAccess_UICommand::getSequenceFromCache( const ::rtl::OUString&
if ( !pIter->second.bCommandNameCreated )
fillInfoFromResult( pIter->second, pIter->second.aLabel );
- Sequence< PropertyValue > aPropSeq( 3 );
+ Sequence< PropertyValue > aPropSeq( 4 );
aPropSeq[0].Name = m_aPropLabel;
aPropSeq[0].Value = pIter->second.aContextLabel.getLength() ?
makeAny( pIter->second.aContextLabel ): makeAny( pIter->second.aLabel );
@@ -348,6 +348,8 @@ Any ConfigurationAccess_UICommand::getSequenceFromCache( const ::rtl::OUString&
aPropSeq[1].Value <<= pIter->second.aCommandName;
aPropSeq[2].Name = m_aPropPopup;
aPropSeq[2].Value <<= pIter->second.bPopup;
+ aPropSeq[3].Name = m_aPropProperties;
+ aPropSeq[3].Value <<= pIter->second.nProperties;
return makeAny( aPropSeq );
}
diff --git a/framework/source/xml/makefile.mk b/framework/source/xml/makefile.mk
index dd40af0cbe05..a4f18a555ab3 100644
--- a/framework/source/xml/makefile.mk
+++ b/framework/source/xml/makefile.mk
@@ -47,7 +47,6 @@ SLOFILES= \
$(SLO)$/statusbardocumenthandler.obj \
$(SLO)$/toolboxconfiguration.obj \
$(SLO)$/toolboxdocumenthandler.obj \
- $(SLO)$/toolboxlayoutdocumenthandler.obj \
$(SLO)$/saxnamespacefilter.obj \
$(SLO)$/xmlnamespaces.obj \
$(SLO)$/acceleratorconfigurationreader.obj \
diff --git a/framework/source/xml/menudocumenthandler.cxx b/framework/source/xml/menudocumenthandler.cxx
index 90f5fb25dec3..3fc5d1775be4 100644
--- a/framework/source/xml/menudocumenthandler.cxx
+++ b/framework/source/xml/menudocumenthandler.cxx
@@ -94,6 +94,7 @@
#define ATTRIBUTE_ITEMSTYLE_TEXT "text"
#define ATTRIBUTE_ITEMSTYLE_IMAGE "image"
+#define ATTRIBUTE_ITEMSTYLE_RADIO "radio"
// Property names of a menu/menu item ItemDescriptor
static const char ITEM_DESCRIPTOR_COMMANDURL[] = "CommandURL";
@@ -134,6 +135,7 @@ struct MenuStyleItem
MenuStyleItem MenuItemStyles[ ] = {
{ ::com::sun::star::ui::ItemStyle::ICON, ATTRIBUTE_ITEMSTYLE_IMAGE },
{ ::com::sun::star::ui::ItemStyle::TEXT, ATTRIBUTE_ITEMSTYLE_TEXT },
+ { ::com::sun::star::ui::ItemStyle::RADIO_CHECK, ATTRIBUTE_ITEMSTYLE_RADIO }
};
@@ -437,8 +439,10 @@ throw( SAXException, RuntimeException )
{
if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_TEXT ) ) )
nItemBits |= ::com::sun::star::ui::ItemStyle::TEXT;
- if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_IMAGE ) ) )
+ else if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_IMAGE ) ) )
nItemBits |= ::com::sun::star::ui::ItemStyle::ICON;
+ else if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_RADIO ) ) )
+ nItemBits |= ::com::sun::star::ui::ItemStyle::RADIO_CHECK;
}
}
while ( nIndex >= 0 );
@@ -670,8 +674,10 @@ throw( SAXException, RuntimeException )
{
if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_TEXT ) ) )
nItemBits |= ::com::sun::star::ui::ItemStyle::TEXT;
- if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_IMAGE ) ) )
+ else if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_IMAGE ) ) )
nItemBits |= ::com::sun::star::ui::ItemStyle::ICON;
+ else if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_RADIO ) ) )
+ nItemBits |= ::com::sun::star::ui::ItemStyle::RADIO_CHECK;
}
}
while ( nIndex >= 0 );
@@ -725,8 +731,10 @@ throw( SAXException, RuntimeException )
{
if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_TEXT ) ) )
nItemBits |= ::com::sun::star::ui::ItemStyle::TEXT;
- if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_IMAGE ) ) )
+ else if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_IMAGE ) ) )
nItemBits |= ::com::sun::star::ui::ItemStyle::ICON;
+ else if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_RADIO ) ) )
+ nItemBits |= ::com::sun::star::ui::ItemStyle::RADIO_CHECK;
}
}
while ( nIndex >= 0 );
diff --git a/framework/source/xml/toolboxconfiguration.cxx b/framework/source/xml/toolboxconfiguration.cxx
index 9cd1f25c3df5..9d1c91aa6849 100644
--- a/framework/source/xml/toolboxconfiguration.cxx
+++ b/framework/source/xml/toolboxconfiguration.cxx
@@ -30,7 +30,6 @@
#include "precompiled_framework.hxx"
#include <xml/toolboxconfiguration.hxx>
#include <xml/toolboxdocumenthandler.hxx>
-#include <xml/toolboxlayoutdocumenthandler.hxx>
#include <xml/saxnamespacefilter.hxx>
#include <services.h>
diff --git a/framework/source/xml/toolboxlayoutdocumenthandler.cxx b/framework/source/xml/toolboxlayoutdocumenthandler.cxx
deleted file mode 100644
index 645750dc3f51..000000000000
--- a/framework/source/xml/toolboxlayoutdocumenthandler.cxx
+++ /dev/null
@@ -1,58 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_framework.hxx"
-
-#include <stdio.h>
-
-//_________________________________________________________________________________________________________________
-// my own includes
-//_________________________________________________________________________________________________________________
-
-#include <threadhelp/resetableguard.hxx>
-#include <xml/toolboxlayoutdocumenthandler.hxx>
-#include <macros/debug.hxx>
-#include <xml/toolboxconfigurationdefines.hxx>
-
-//_________________________________________________________________________________________________________________
-// interface includes
-//_________________________________________________________________________________________________________________
-
-#ifndef __COM_SUN_STAR_XML_SAX_XEXTENDEDDOCUMENTHANDLER_HPP_
-#include <com/sun/star/xml/sax/XExtendedDocumentHandler.hpp>
-#endif
-
-//_________________________________________________________________________________________________________________
-// other includes
-//_________________________________________________________________________________________________________________
-#include <vcl/svapp.hxx>
-#include <vcl/toolbox.hxx>
-
-//_________________________________________________________________________________________________________________
-// namespace
-//_________________________________________________________________________________________________________________
diff --git a/framework/uiconfig/startmodule/accelerator/en-GB/default.xml b/framework/uiconfig/startmodule/accelerator/en-GB/default.xml
deleted file mode 100644
index eefe2b0dde23..000000000000
--- a/framework/uiconfig/startmodule/accelerator/en-GB/default.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<accel:acceleratorlist xmlns:accel="http://openoffice.org/2001/accel" xmlns:xlink="http://www.w3.org/1999/xlink">
- <accel:item accel:code="KEY_Q" accel:mod1="true" xlink:href=".uno:Quit"/>
- <accel:item accel:code="KEY_N" accel:shift="true" accel:mod1="true" xlink:href=".uno:NewDoc"/>
- <accel:item accel:code="KEY_O" accel:mod1="true" xlink:href=".uno:Open"/>
- <accel:item accel:code="KEY_OPEN" xlink:href=".uno:Open"/>
- <accel:item accel:code="KEY_P" accel:mod1="true" xlink:href=".uno:Print"/>
- <accel:item accel:code="KEY_S" accel:mod1="true" xlink:href=".uno:Save"/>
- <accel:item accel:code="KEY_N" accel:mod1="true" xlink:href=".uno:AddDirect"/>
- <accel:item accel:code="KEY_W" accel:mod1="true" xlink:href=".uno:CloseWin"/>
- <accel:item accel:code="KEY_F4" accel:mod1="true" xlink:href=".uno:CloseWin"/>
- <accel:item accel:code="KEY_X" accel:mod1="true" xlink:href=".uno:Cut"/>
- <accel:item accel:code="KEY_DELETE" accel:shift="true" xlink:href=".uno:Cut"/>
- <accel:item accel:code="KEY_CUT" xlink:href=".uno:Cut"/>
- <accel:item accel:code="KEY_C" accel:mod1="true" xlink:href=".uno:Copy"/>
- <accel:item accel:code="KEY_INSERT" accel:mod1="true" xlink:href=".uno:Copy"/>
- <accel:item accel:code="KEY_COPY" xlink:href=".uno:Copy"/>
- <accel:item accel:code="KEY_V" accel:mod1="true" xlink:href=".uno:Paste"/>
- <accel:item accel:code="KEY_INSERT" accel:shift="true" xlink:href=".uno:Paste"/>
- <accel:item accel:code="KEY_PASTE" xlink:href=".uno:Paste"/>
- <accel:item accel:code="KEY_DELETE" xlink:href=".uno:Delete"/>
- <accel:item accel:code="KEY_A" accel:mod1="true" xlink:href=".uno:SelectAll"/>
- <accel:item accel:code="KEY_F" accel:mod1="true" xlink:href=".uno:SearchDialog"/>
- <accel:item accel:code="KEY_Q" accel:shift="true" accel:mod1="true" xlink:href=".uno:BasicBreak"/>
- <accel:item accel:code="KEY_F4" xlink:href=".uno:ViewDataSourceBrowser"/>
- <accel:item accel:code="KEY_F5" accel:mod1="true" xlink:href=".uno:GrabControlFocus"/>
- <accel:item accel:code="KEY_F7" accel:shift="true" accel:mod1="true" xlink:href=".uno:HangulHanjaConversion"/>
-</accel:acceleratorlist>
diff --git a/framework/uiconfig/startmodule/accelerator/en-US/default.xml b/framework/uiconfig/startmodule/accelerator/en-US/default.xml
deleted file mode 100644
index eefe2b0dde23..000000000000
--- a/framework/uiconfig/startmodule/accelerator/en-US/default.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<accel:acceleratorlist xmlns:accel="http://openoffice.org/2001/accel" xmlns:xlink="http://www.w3.org/1999/xlink">
- <accel:item accel:code="KEY_Q" accel:mod1="true" xlink:href=".uno:Quit"/>
- <accel:item accel:code="KEY_N" accel:shift="true" accel:mod1="true" xlink:href=".uno:NewDoc"/>
- <accel:item accel:code="KEY_O" accel:mod1="true" xlink:href=".uno:Open"/>
- <accel:item accel:code="KEY_OPEN" xlink:href=".uno:Open"/>
- <accel:item accel:code="KEY_P" accel:mod1="true" xlink:href=".uno:Print"/>
- <accel:item accel:code="KEY_S" accel:mod1="true" xlink:href=".uno:Save"/>
- <accel:item accel:code="KEY_N" accel:mod1="true" xlink:href=".uno:AddDirect"/>
- <accel:item accel:code="KEY_W" accel:mod1="true" xlink:href=".uno:CloseWin"/>
- <accel:item accel:code="KEY_F4" accel:mod1="true" xlink:href=".uno:CloseWin"/>
- <accel:item accel:code="KEY_X" accel:mod1="true" xlink:href=".uno:Cut"/>
- <accel:item accel:code="KEY_DELETE" accel:shift="true" xlink:href=".uno:Cut"/>
- <accel:item accel:code="KEY_CUT" xlink:href=".uno:Cut"/>
- <accel:item accel:code="KEY_C" accel:mod1="true" xlink:href=".uno:Copy"/>
- <accel:item accel:code="KEY_INSERT" accel:mod1="true" xlink:href=".uno:Copy"/>
- <accel:item accel:code="KEY_COPY" xlink:href=".uno:Copy"/>
- <accel:item accel:code="KEY_V" accel:mod1="true" xlink:href=".uno:Paste"/>
- <accel:item accel:code="KEY_INSERT" accel:shift="true" xlink:href=".uno:Paste"/>
- <accel:item accel:code="KEY_PASTE" xlink:href=".uno:Paste"/>
- <accel:item accel:code="KEY_DELETE" xlink:href=".uno:Delete"/>
- <accel:item accel:code="KEY_A" accel:mod1="true" xlink:href=".uno:SelectAll"/>
- <accel:item accel:code="KEY_F" accel:mod1="true" xlink:href=".uno:SearchDialog"/>
- <accel:item accel:code="KEY_Q" accel:shift="true" accel:mod1="true" xlink:href=".uno:BasicBreak"/>
- <accel:item accel:code="KEY_F4" xlink:href=".uno:ViewDataSourceBrowser"/>
- <accel:item accel:code="KEY_F5" accel:mod1="true" xlink:href=".uno:GrabControlFocus"/>
- <accel:item accel:code="KEY_F7" accel:shift="true" accel:mod1="true" xlink:href=".uno:HangulHanjaConversion"/>
-</accel:acceleratorlist>
diff --git a/framework/util/exports.map b/framework/util/exports.map
deleted file mode 100644
index 85610ad80888..000000000000
--- a/framework/util/exports.map
+++ /dev/null
@@ -1,10 +0,0 @@
-UDK_3_0_0 {
- global:
- GetVersionInfo;
- component_getImplementationEnvironment;
- component_getFactory;
- component_writeInfo;
-
- local:
- *;
-};
diff --git a/framework/util/makefile.mk b/framework/util/makefile.mk
index 9025de975b63..6a65b9986f1e 100644
--- a/framework/util/makefile.mk
+++ b/framework/util/makefile.mk
@@ -56,7 +56,6 @@ LIB1OBJFILES= \
$(SLO)$/rootitemcontainer.obj \
$(SLO)$/constitemcontainer.obj \
$(SLO)$/jobconst.obj \
- $(SLO)$/popupmenucontrollerbase.obj \
$(SLO)$/mischelper.obj \
$(SLO)$/propertysethelper.obj
@@ -79,7 +78,6 @@ LIB2OBJFILES= \
$(SLO)$/statusbardocumenthandler.obj \
$(SLO)$/toolboxconfiguration.obj \
$(SLO)$/toolboxdocumenthandler.obj \
- $(SLO)$/toolboxlayoutdocumenthandler.obj \
$(SLO)$/imagesconfiguration.obj \
$(SLO)$/imagesdocumenthandler.obj \
$(SLO)$/xmlnamespaces.obj \
@@ -199,7 +197,8 @@ SHL3OBJS= $(SLO)$/mediatypedetectionhelper.obj\
$(SLO)$/dispatchrecorder.obj \
$(SLO)$/dispatchrecordersupplier.obj\
$(SLO)$/dispatchhelper.obj \
- $(SLO)$/popupmenudispatcher.obj \
+ $(SLO)$/popupmenudispatcher.obj \
+ $(SLO)$/popupmenucontroller.obj
SHL3STDLIBS= \
$(FWILIB) \
@@ -221,7 +220,7 @@ SHL3DEPN= $(SHL1IMPLIBN) $(SHL1TARGETN) $(SHL2TARGETN)
DEF3NAME= $(SHL3TARGET)
-SHL3VERSIONMAP= exports.map
+SHL3VERSIONMAP= $(SOLARENV)/src/component.map
# --- services library ----------------------------------------------------
@@ -362,7 +361,7 @@ SHL4DEPN= $(SHL1IMPLIBN) $(SHL1TARGETN) $(SHL2IMPLIBN) $(SHL2TARGETN)
DEF4NAME= $(SHL4TARGET)
-SHL4VERSIONMAP= exports.map
+SHL4VERSIONMAP= $(SOLARENV)/src/component.map
# --- services library ----------------------------------------------------
@@ -393,7 +392,7 @@ SHL5DEPN= $(SHL1IMPLIBN) $(SHL1TARGETN)
DEF5NAME= $(SHL5TARGET)
-SHL5VERSIONMAP= exports.map
+SHL5VERSIONMAP= $(SOLARENV)/src/component.map
RESLIB1NAME= fwe
RESLIB1IMAGES= $(PRJ)$/res