[Libreoffice-commits] .: sfx2/inc sfx2/source vcl/source
Michael Meeks
michael at kemper.freedesktop.org
Fri Feb 17 23:59:52 PST 2012
sfx2/inc/sfx2/mnuitem.hxx | 1 +
sfx2/source/menu/mnuitem.cxx | 8 ++++++++
vcl/source/helper/lazydelete.cxx | 10 ++++++++++
3 files changed, 19 insertions(+)
New commits:
commit 019458b151f402c1f8bbabc90e94987bfe2c32f2
Author: Michael Meeks <michael.meeks at suse.com>
Date: Sat Feb 18 07:57:01 2012 +0000
partial revert of unused code removal, and add LINUX guards
diff --git a/sfx2/inc/sfx2/mnuitem.hxx b/sfx2/inc/sfx2/mnuitem.hxx
index 08acfa6..62ebce6 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 32b173e..8b05360 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 d63466e..b160bb8 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();
More information about the Libreoffice-commits
mailing list