Tag: cws_src680_oj17
User: oj      
Date: 06/03/08 23:02:10

Modified:
 /dba/dbaccess/source/ui/control/
  toolboxcontroller.cxx

Log:
 #i53480# change commandurl to selected entry

File Changes:

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

File [changed]: toolboxcontroller.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/control/toolboxcontroller.cxx?r1=1.8&r2=1.8.96.1
Delta lines:  +7 -5
-------------------
--- toolboxcontroller.cxx       23 Sep 2005 12:24:30 -0000      1.8
+++ toolboxcontroller.cxx       9 Mar 2006 07:02:08 -0000       1.8.96.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: toolboxcontroller.cxx,v $
  *
- *  $Revision: 1.8 $
+ *  $Revision: 1.8.96.1 $
  *
- *  last change: $Author: hr $ $Date: 2005/09/23 12:24:30 $
+ *  last change: $Author: oj $ $Date: 2006/03/09 07:02:08 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -205,7 +205,7 @@
 
                ToolBox* pToolBox = 
static_cast<ToolBox*>(VCLUnoHelper::GetWindow(getParent()));
                ::std::auto_ptr<PopupMenu> pMenu;
-               if ( m_aCommandURL.equalsAscii(".uno:DBNewForm") )
+               if ( m_aStates.size() > 2 )
                {
                        pMenu.reset( new PopupMenu( ModuleRes( RID_MENU_APP_NEW 
) ) );
                        sal_Bool bIsWriterInstalled = 
SvtModuleOptions().IsModuleInstalled(SvtModuleOptions::E_SWRITER);
@@ -277,13 +277,15 @@
                        Reference<XDispatch> xDispatch = 
m_aListenerMap.find(m_aCommandURL)->second;
                        if ( xDispatch.is() )
                        {
+                m_aCommandURL = pMenu->GetItemCommand(nSelected);
                                URL aUrl;
                                Sequence < PropertyValue > aArgs;
-                               aUrl.Complete = 
pMenu->GetItemCommand(nSelected);
+                               aUrl.Complete = m_aCommandURL;
                                OSL_ENSURE(aUrl.Complete.getLength(),"Command 
is empty!");
                                if ( getURLTransformer().is() )
                                        getURLTransformer()->parseStrict(aUrl);
                                xDispatch->dispatch(aUrl,aArgs);
+                
                        }
                }
                return Reference< ::com::sun::star::awt::XWindow >();




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

Reply via email to