[Libreoffice-commits] .: toolkit/inc toolkit/source

Joseph Powers jpowers at kemper.freedesktop.org
Thu Feb 10 07:22:16 PST 2011


 toolkit/inc/toolkit/awt/vclxmenu.hxx |    8 +++++---
 toolkit/source/awt/vclxmenu.cxx      |   14 ++++++--------
 2 files changed, 11 insertions(+), 11 deletions(-)

New commits:
commit 420ba36357262eb3b6ddee0b917dbc8d5aa58b77
Author: Joseph Powers <jpowers27 at cox.net>
Date:   Thu Feb 10 07:22:02 2011 -0800

    Remove DECLARE_LIST( PopupMenuRefList, uno::Reference< awt::XPopupMenu >* )

diff --git a/toolkit/inc/toolkit/awt/vclxmenu.hxx b/toolkit/inc/toolkit/awt/vclxmenu.hxx
index cdf0fff..93f9369 100644
--- a/toolkit/inc/toolkit/awt/vclxmenu.hxx
+++ b/toolkit/inc/toolkit/awt/vclxmenu.hxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * 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
@@ -38,17 +38,19 @@
 #include <cppuhelper/weak.hxx>
 #include <osl/mutex.hxx>
 
-#include <tools/list.hxx>
 #include <tools/link.hxx>
 
 #include <toolkit/helper/listenermultiplexer.hxx>
+#include <vector>
 
 class Menu;
 class MenuBar;
 class VclSimpleEvent;
 class PopupMenu;
 
-DECLARE_LIST( PopupMenuRefList, ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu >* )
+typedef ::std::vector<
+    ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu >*
+> PopupMenuRefList;
 
 //	----------------------------------------------------
 //	class VCLXMenu
diff --git a/toolkit/source/awt/vclxmenu.cxx b/toolkit/source/awt/vclxmenu.cxx
index 5e267d1..554872f 100644
--- a/toolkit/source/awt/vclxmenu.cxx
+++ b/toolkit/source/awt/vclxmenu.cxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * 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
@@ -98,10 +98,8 @@ VCLXMenu::VCLXMenu( Menu* pMenu ) : maMenuListeners( *this )
 VCLXMenu::~VCLXMenu()
 {
     DBG_DTOR( VCLXMenu, 0 );
-    for ( sal_uInt32 n = maPopupMenueRefs.Count(); n; )
-    {
-        ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu > * pRef = maPopupMenueRefs.GetObject( --n );
-        delete pRef;
+    for ( size_t n = maPopupMenueRefs.size(); n; ) {
+        delete maPopupMenueRefs[ --n ];
     }
     if ( mpMenu )
     {
@@ -515,7 +513,7 @@ void VCLXMenu::setPopupMenu( sal_Int16 nItemId, const ::com::sun::star::uno::Ref
         // Selbst eine Ref halten!
         ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu > * pNewRef = new ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu > ;
         *pNewRef = rxPopupMenu;
-        maPopupMenueRefs.Insert( pNewRef, LIST_APPEND );
+        maPopupMenueRefs.push_back( pNewRef );
 
         mpMenu->SetPopupMenu( nItemId, (PopupMenu*) pVCLMenu->GetMenu() );
     }
@@ -530,9 +528,9 @@ void VCLXMenu::setPopupMenu( sal_Int16 nItemId, const ::com::sun::star::uno::Ref
     Menu* pMenu = mpMenu ? mpMenu->GetPopupMenu( nItemId ) : NULL;
     if ( pMenu )
     {
-        for ( sal_uInt32 n = maPopupMenueRefs.Count(); n; )
+        for ( size_t n = maPopupMenueRefs.size(); n; )
         {
-            ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu > * pRef = maPopupMenueRefs.GetObject( --n );
+            ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu > * pRef = maPopupMenueRefs[ --n ];
             Menu* pM = ((VCLXMenu*)pRef->get())->GetMenu();
             if ( pM == pMenu )
             {


More information about the Libreoffice-commits mailing list