summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAriel Constenla-Haile <arielch@apache.org>2013-05-25 22:11:58 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-06-24 11:25:34 +0100
commita1748501d81425d26d09509eec2fd141f2f28f05 (patch)
treeef1f7e42eb8d8afd660741229d6d628c7127667a /include
parentBetter approach for solving fdo#52204 (diff)
downloadcore-a1748501d81425d26d09509eec2fd141f2f28f05.tar.gz
core-a1748501d81425d26d09509eec2fd141f2f28f05.zip
Kill SfxAppToolBoxControl_Impl
(cherry picked from commit 273121f8d7e277e35c8e5a8aad46ef0c103ebc03) Conflicts: sfx2/inc/sfx2/mnuitem.hxx sfx2/inc/sfx2/tbxctrl.hxx sfx2/source/appl/appreg.cxx sfx2/source/menu/mnuitem.cxx sfx2/source/toolbox/tbxitem.cxx Change-Id: I6d0750d89ad009f82c5552d971537b78e45426f2 Silence warning C4706 (cherry picked from commit 0b373b3e4c45d09c40a8949e9366adb9b991de4b) Change-Id: Id497469eba8288565145c47c84b7938a1316c21a
Diffstat (limited to 'include')
-rw-r--r--include/sfx2/mnuitem.hxx28
-rw-r--r--include/sfx2/tbxctrl.hxx38
2 files changed, 28 insertions, 38 deletions
diff --git a/include/sfx2/mnuitem.hxx b/include/sfx2/mnuitem.hxx
index e65220be2a13..557e8764dfce 100644
--- a/include/sfx2/mnuitem.hxx
+++ b/include/sfx2/mnuitem.hxx
@@ -33,6 +33,9 @@ struct SfxMenuCtrlFactory;
#include <tools/string.hxx>
#include <sfx2/ctrlitem.hxx>
+#include <com/sun/star/frame/XDispatch.hpp>
+#include <com/sun/star/util/URL.hpp>
+
class SFX2_DLLPUBLIC SfxMenuControl: public SfxControllerItem
{
String aTitle;
@@ -116,6 +119,31 @@ inline SfxVirtualMenu* SfxMenuControl::GetPopupMenu() const
void Class::RegisterControl(sal_uInt16 nSlotId, SfxModule *pMod) \
{ SfxMenuControl::RegisterMenuControl( pMod, new SfxMenuCtrlFactory( \
Class::CreateImpl, TYPE(nItemClass), nSlotId ) ); }
+
+class SfxAppMenuControl_Impl : public SfxMenuControl
+{
+ PopupMenu* pMenu;
+ sal_uIntPtr m_nSymbolsStyle;
+ sal_Bool m_bShowMenuImages;
+
+protected:
+ DECL_LINK( Activate, Menu * ); // Needed to support high contrast images
+
+public:
+ SFX_DECL_MENU_CONTROL();
+ SfxAppMenuControl_Impl( sal_uInt16 nPos, Menu& rMenu, SfxBindings& rBindings );
+ ~SfxAppMenuControl_Impl();
+
+ struct ExecuteInfo
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > xDispatch;
+ ::com::sun::star::util::URL aTargetURL;
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aArgs;
+ };
+
+ DECL_STATIC_LINK( SfxAppMenuControl_Impl, ExecuteHdl_Impl, ExecuteInfo* );
+};
+
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/sfx2/tbxctrl.hxx b/include/sfx2/tbxctrl.hxx
index b67ed111aa74..e7b6e6921e5f 100644
--- a/include/sfx2/tbxctrl.hxx
+++ b/include/sfx2/tbxctrl.hxx
@@ -313,44 +313,6 @@ public:
//------------------------------------------------------------------------
-class SfxAppToolBoxControl_Impl : public SfxToolBoxControl
-
-/* [Description]
-
- Internal helper class for the pop-up menu <AppMenu_Impl> under new
- start in the SDT.
-*/
-
-{
-public:
- SFX_DECL_TOOLBOX_CONTROL();
- SfxAppToolBoxControl_Impl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rBox );
- ~SfxAppToolBoxControl_Impl();
- void SetImage( const String& rFacName );
-
- struct ExecuteInfo
- {
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > xDispatch;
- ::com::sun::star::util::URL aTargetURL;
- ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aArgs;
- };
-
- DECL_STATIC_LINK( SfxAppToolBoxControl_Impl, ExecuteHdl_Impl, ExecuteInfo* );
-
-protected:
- virtual void Click();
- using SfxToolBoxControl::Select;
- virtual void Select( sal_Bool );
- virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState );
- virtual SfxPopupWindow* CreatePopupWindow();
- DECL_LINK( Activate, Menu * );
-private:
- String aLastURL;
- PopupMenu* pMenu;
- sal_uIntPtr m_nSymbolsStyle;
- sal_Bool m_bShowMenuImages;
-};
-
/** Toolbox that implements recent files menu for the Open file toolbar button.
To use that, the appropriate Sfx*Item (like Open, OpenFromCalc, or