Tag: cws_dev300_dba30d
User: fs      
Date: 2008-06-09 13:44:02+0000
Modified:
   dba/dbaccess/source/ui/control/dbtreelistbox.cxx

Log:
 layout

File Changes:

Directory: /dba/dbaccess/source/ui/control/
===========================================

File [changed]: dbtreelistbox.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/control/dbtreelistbox.cxx?r1=1.19.30.2&r2=1.19.30.3
Delta lines:  +71 -71
---------------------
--- dbtreelistbox.cxx   2008-06-01 20:58:31+0000        1.19.30.2
+++ dbtreelistbox.cxx   2008-06-09 13:43:59+0000        1.19.30.3
@@ -7,7 +7,7 @@
  * OpenOffice.org - a multi-platform office productivity suite
  *
  * $RCSfile: dbtreelistbox.cxx,v $
- * $Revision: 1.19.30.2 $
+ * $Revision: 1.19.30.3 $
  *
  * This file is part of OpenOffice.org.
  *
@@ -636,19 +636,20 @@
 {
     ::std::auto_ptr< PopupMenu > pContextMenu;
 
-       if ( m_pContextMenuProvider )
-       {
+       if ( !m_pContextMenuProvider )
+        return pContextMenu.release();
+
         // the basic context menu
                pContextMenu.reset( m_pContextMenuProvider->getContextMenu( 
*this ) );
         // disable what is not available currently
                lcl_enableEntries( pContextMenu.get(), 
m_pContextMenuProvider->getCommandController() );
         // allow context menu interception
         ::cppu::OInterfaceContainerHelper* pInterceptors = 
m_pContextMenuProvider->getContextMenuInterceptors();
-        if ( pInterceptors )
-        {
+    if ( !pInterceptors || !pInterceptors->getLength() )
+        return pContextMenu.release();
+
             ContextMenuExecuteEvent aEvent;
             aEvent.SourceWindow = VCLUnoHelper::GetInterface( this );
-            // TODO: obtain this from the base class
             aEvent.ExecutePosition.X = -1;
             aEvent.ExecutePosition.Y = -1;
             aEvent.ActionTriggerContainer = 
::framework::ActionTriggerHelper::CreateActionTriggerContainerFromMenu(
@@ -709,8 +710,7 @@
                 // with IDs -> we need to translate the commands to IDs
                 lcl_adjustMenuItemIDs( *pModifiedMenu, 
m_pContextMenuProvider->getCommandController() );
             }
-        }
-       }
+
        return pContextMenu.release();
 }
 




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to