diff options
author | Michael Meeks <michael.meeks@suse.com> | 2012-02-18 07:57:01 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2012-02-18 07:58:32 +0000 |
commit | 019458b151f402c1f8bbabc90e94987bfe2c32f2 (patch) | |
tree | 439a74ce7cdf400bba3851440e43cb6af289e51d | |
parent | 140c90f4302303faf146c4a509acfb1d21c26164 (diff) |
partial revert of unused code removal, and add LINUX guards
-rw-r--r-- | sfx2/inc/sfx2/mnuitem.hxx | 1 | ||||
-rw-r--r-- | sfx2/source/menu/mnuitem.cxx | 8 | ||||
-rw-r--r-- | vcl/source/helper/lazydelete.cxx | 10 |
3 files changed, 19 insertions, 0 deletions
diff --git a/sfx2/inc/sfx2/mnuitem.hxx b/sfx2/inc/sfx2/mnuitem.hxx index 08acfa632e1b..62ebce679ed4 100644 --- a/sfx2/inc/sfx2/mnuitem.hxx +++ b/sfx2/inc/sfx2/mnuitem.hxx @@ -56,6 +56,7 @@ public: SfxMenuControl( sal_uInt16, SfxBindings&); static SfxMenuControl* CreateImpl( sal_uInt16 nId, Menu &rMenu, SfxBindings &rBindings ); + static void RegisterControl( sal_uInt16 nSlotId = 0, SfxModule *pMod=NULL ); ~SfxMenuControl(); diff --git a/sfx2/source/menu/mnuitem.cxx b/sfx2/source/menu/mnuitem.cxx index 32b173e02927..8b05360257cc 100644 --- a/sfx2/source/menu/mnuitem.cxx +++ b/sfx2/source/menu/mnuitem.cxx @@ -246,6 +246,14 @@ SfxMenuControl* SfxMenuControl::CreateImpl( sal_uInt16 /*nId*/, Menu& /*rMenu*/, return new SfxMenuControl( sal_True ); } +#ifndef LINUX +void SfxMenuControl::RegisterControl( sal_uInt16 nSlotId, SfxModule *pMod ) +{ + RegisterMenuControl( pMod, new SfxMenuCtrlFactory( + SfxMenuControl::CreateImpl, TYPE(SfxStringItem), nSlotId ) ); +} +#endif + //-------------------------------------------------------------------- void SfxMenuControl::RegisterMenuControl(SfxModule* pMod, SfxMenuCtrlFactory* pFact) { diff --git a/vcl/source/helper/lazydelete.cxx b/vcl/source/helper/lazydelete.cxx index d63466e24761..b160bb8506f7 100644 --- a/vcl/source/helper/lazydelete.cxx +++ b/vcl/source/helper/lazydelete.cxx @@ -70,6 +70,16 @@ template<> bool LazyDeletor<Window>::is_less( Window* left, Window* right ) return (left != right && right->IsChild( left, sal_True )) ? true : false; } +#ifndef LINUX +// specialized is_less function for Menu +template<> bool LazyDeletor<Menu>::is_less( Menu* left, Menu* right ) +{ + while( left && left != right ) + left = left->ImplGetStartedFrom(); + return left != NULL; +} +#endif + DeleteOnDeinitBase::~DeleteOnDeinitBase() { ImplSVData* pSVData = ImplGetSVData(); |