Tag: cws_src680_oj14
User: fs      
Date: 2007-06-19 08:00:51+0000
Modified:
   dba/dbaccess/inc/IController.hxx
   dba/dbaccess/inc/genericcontroller.hxx
   dba/dbaccess/source/ui/app/AppControllerGen.cxx
   dba/dbaccess/source/ui/app/AppDetailView.cxx
   dba/dbaccess/source/ui/app/AppDetailView.hxx
   dba/dbaccess/source/ui/app/AppSwapWindow.cxx
   dba/dbaccess/source/ui/app/AppSwapWindow.hxx
   dba/dbaccess/source/ui/app/AppView.cxx
   dba/dbaccess/source/ui/app/AppView.hxx
   dba/dbaccess/source/ui/browser/genericcontroller.cxx
   dba/dbaccess/source/ui/browser/unodatbr.cxx
   dba/dbaccess/source/ui/control/dbtreelistbox.cxx
   dba/dbaccess/source/ui/inc/AppElementType.hxx

Log:
 merging (nearly all) changes from CWS dba23ui herein, which fixes #i78642

File Changes:

Directory: /dba/dbaccess/inc/
=============================

File [changed]: IController.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/inc/IController.hxx?r1=1.1.2.1&r2=1.1.2.2
Delta lines:  +5 -5
-------------------
--- IController.hxx     2006-01-03 08:30:08+0000        1.1.2.1
+++ IController.hxx     2007-06-19 08:00:47+0000        1.1.2.2
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: IController.hxx,v $
  *
- *  $Revision: 1.1.2.1 $
+ *  $Revision: 1.1.2.2 $
  *
- *  last change: $Author: oj $ $Date: 2006/01/03 08:30:08 $
+ *  last change: $Author: fs $ $Date: 2007/06/19 08:00:47 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -94,13 +94,13 @@
                virtual sal_Bool isCommandEnabled(sal_uInt16 _nCommandId) const 
= 0;
 
                /** checks if the given Command is enabled
-                       @param  _rCommand       
+                       @param  _rCompleteCommandURL
                                the URL of the command
                        
                        @return 
                                <TRUE/> if the command is allowed, otherwise 
<FALSE/>.
                */
-               virtual sal_Bool isCommandEnabled(const 
::com::sun::star::util::URL& _rCommand) const = 0;
+        virtual sal_Bool isCommandEnabled( const ::rtl::OUString& 
_rCompleteCommandURL ) const = 0;
 
                /** notifyHiContrastChanged will be called when the hicontrast 
mode changed.
                        @param  _bHiContrast

File [changed]: genericcontroller.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/inc/genericcontroller.hxx?r1=1.1.2.14&r2=1.1.2.15
Delta lines:  +6 -4
-------------------
--- genericcontroller.hxx       2007-06-05 16:38:48+0000        1.1.2.14
+++ genericcontroller.hxx       2007-06-19 08:00:47+0000        1.1.2.15
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: genericcontroller.hxx,v $
  *
- *  $Revision: 1.1.2.14 $
+ *  $Revision: 1.1.2.15 $
  *
- *  last change: $Author: oj $ $Date: 2007/06/05 16:38:48 $
+ *  last change: $Author: fs $ $Date: 2007/06/19 08:00:47 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -467,10 +467,12 @@
                virtual void executeUnChecked(sal_uInt16 _nCommandId, const 
::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& 
aArgs);
                virtual void executeChecked(sal_uInt16 _nCommandId, const 
::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& 
aArgs);
                virtual sal_Bool isCommandEnabled(sal_uInt16 _nCommandId) const;
-               virtual sal_Bool isCommandChecked(sal_uInt16 _nCommandId) const;
-               virtual sal_Bool isCommandEnabled(const 
::com::sun::star::util::URL& _rCommand) const;
+        virtual sal_Bool isCommandEnabled(const ::rtl::OUString& 
_rCompleteCommandURL) const;
                virtual sal_Bool isDataSourceReadOnly() const { return 
sal_False; }
 
+        // misc
+        virtual sal_Bool isCommandChecked(sal_uInt16 _nCommandId) const;
+
                // ::com::sun::star::lang::XEventListener
                virtual void SAL_CALL disposing(const 
::com::sun::star::lang::EventObject& Source) throw( 
::com::sun::star::uno::RuntimeException );
 

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

File [changed]: AppControllerGen.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppControllerGen.cxx?r1=1.14.4.8&r2=1.14.4.9
Delta lines:  +22 -3
--------------------
--- AppControllerGen.cxx        2007-05-29 13:07:25+0000        1.14.4.8
+++ AppControllerGen.cxx        2007-06-19 08:00:47+0000        1.14.4.9
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: AppControllerGen.cxx,v $
  *
- *  $Revision: 1.14.4.8 $
+ *  $Revision: 1.14.4.9 $
  *
- *  last change: $Author: lla $ $Date: 2007/05/29 13:07:25 $
+ *  last change: $Author: fs $ $Date: 2007/06/19 08:00:47 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -96,6 +96,9 @@
 #ifndef _SV_SVAPP_HXX //autogen
 #include <vcl/svapp.hxx>
 #endif
+#ifndef _SV_MNEMONIC_HXX
+#include <vcl/mnemonic.hxx>
+#endif
 #ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_
 #include <toolkit/unohlp.hxx>
 #endif
@@ -711,7 +714,23 @@
                _xLayoutManager->requestElement( s_sStatusbar );
 
            if ( getContainer() )
-           getContainer()->createIconAutoMnemonics();
+        {
+            // we need to share the "mnemonic space":
+            MnemonicGenerator aMnemonicGenerator;
+            // - the menu already has mnemonics
+            SystemWindow* pSystemWindow = getContainer()->GetSystemWindow();
+            MenuBar* pMenu = pSystemWindow ? pSystemWindow->GetMenuBar() : 
NULL;
+            if ( pMenu )
+            {
+                USHORT nMenuItems = pMenu->GetItemCount();
+                for ( USHORT i = 0; i < nMenuItems; ++i )
+                    aMnemonicGenerator.RegisterMnemonic( pMenu->GetItemText( 
pMenu->GetItemId( i ) ) );
+            }
+            // - the icons should use automatic ones
+           getContainer()->createIconAutoMnemonics( aMnemonicGenerator );
+            // - as well as the entries in the task pane
+            getContainer()->setTaskExternalMnemonics( aMnemonicGenerator );
+        }
 
            Execute( SID_DB_APP_VIEW_FORMS, Sequence< PropertyValue >() );
                InvalidateAll();

File [changed]: AppDetailView.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppDetailView.cxx?r1=1.12.4.8&r2=1.12.4.9
Delta lines:  +203 -112
-----------------------
--- AppDetailView.cxx   2007-06-04 18:01:49+0000        1.12.4.8
+++ AppDetailView.cxx   2007-06-19 08:00:47+0000        1.12.4.9
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: AppDetailView.cxx,v $
  *
- *  $Revision: 1.12.4.8 $
+ *  $Revision: 1.12.4.9 $
  *
- *  last change: $Author: oj $ $Date: 2007/06/04 18:01:49 $
+ *  last change: $Author: fs $ $Date: 2007/06/19 08:00:47 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -80,6 +80,9 @@
 #ifndef _IMAGE_HXX //autogen
 #include <vcl/image.hxx>
 #endif
+#ifndef _SV_MNEMONIC_HXX
+#include <vcl/mnemonic.hxx>
+#endif
 #ifndef DBACCESS_UI_BROWSER_ID_HXX
 #include "browserids.hxx"
 #endif
@@ -116,9 +119,19 @@
 
 #define SPACEBETWEENENTRIES            4
 
-OCreationList::OCreationList(OTasksWindow* _pParent)
-    :SvTreeListBox( _pParent, WB_TABSTOP | WB_HASBUTTONSATROOT | WB_HASBUTTONS 
)
-    ,m_pTaskWindow(_pParent)
+// 
-----------------------------------------------------------------------------
+TaskEntry::TaskEntry( const sal_Char* _pAsciiUNOCommand, USHORT _nHelpID, 
USHORT _nTitleResourceID, bool _bHideWhenDisabled )
+    :sUNOCommand( ::rtl::OUString::createFromAscii( _pAsciiUNOCommand ) )
+    ,nHelpID( _nHelpID )
+    ,sTitle( ModuleRes( _nTitleResourceID ) )
+    ,bHideWhenDisabled( _bHideWhenDisabled )
+{
+}
+
+// 
-----------------------------------------------------------------------------
+OCreationList::OCreationList( OTasksWindow& _rParent )
+    :SvTreeListBox( &_rParent, WB_TABSTOP | WB_HASBUTTONSATROOT | 
WB_HASBUTTONS )
+    ,m_rTaskWindow( _rParent )
     ,m_pMouseDownEntry( NULL )
     ,m_pLastActiveEntry( NULL )
 {
@@ -167,6 +180,31 @@
 
     SetBackground( aEntryBackground );
 }
+
+// 
-----------------------------------------------------------------------------
+void OCreationList::SelectSearchEntry( const void* _pEntry )
+{
+    SvLBoxEntry* pEntry = const_cast< SvLBoxEntry* >( static_cast< const 
SvLBoxEntry* >( _pEntry ) );
+    DBG_ASSERT( pEntry, "OCreationList::SelectSearchEntry: invalid entry!" );
+
+    if ( pEntry )
+        setCurrentEntryInvalidate( pEntry );
+
+    if ( !HasChildPathFocus() )
+        GrabFocus();
+}
+
+// 
-----------------------------------------------------------------------------
+void OCreationList::ExecuteSearchEntry( const void* _pEntry )
+{
+    SvLBoxEntry* pEntry = const_cast< SvLBoxEntry* >( static_cast< const 
SvLBoxEntry* >( _pEntry ) );
+    DBG_ASSERT( pEntry, "OCreationList::ExecuteSearchEntry: invalid entry!" );
+    DBG_ASSERT( pEntry == GetCurEntry(), "OCreationList::ExecuteSearchEntry: 
SelectSearchEntry should have been called before!" );
+
+    if ( pEntry )
+        onSelected( pEntry );
+}
+
 // 
-----------------------------------------------------------------------------
 Rectangle OCreationList::GetFocusRect( SvLBoxEntry* _pEntry, long _nLine )
 {
@@ -318,14 +356,14 @@
 {
     USHORT nHelpTextId = 0;
     if ( GetCurEntry() )
-        nHelpTextId = reinterpret_cast< TResourcePair* >( 
GetCurEntry()->GetUserData() )->second;
-    m_pTaskWindow->setHelpText( nHelpTextId );
+        nHelpTextId = reinterpret_cast< TaskEntry* >( 
GetCurEntry()->GetUserData() )->nHelpID;
+    m_rTaskWindow.setHelpText( nHelpTextId );
 }
 // 
-----------------------------------------------------------------------------
 void OCreationList::onSelected( SvLBoxEntry* _pEntry ) const
 {
     DBG_ASSERT( _pEntry, "OCreationList::onSelected: invalid entry!" );
-    m_pTaskWindow->getDetailView()->onCreationClick( reinterpret_cast< 
TResourcePair* >( _pEntry->GetUserData() )->first );
+    m_rTaskWindow.getDetailView()->onCreationClick( reinterpret_cast< 
TaskEntry* >( _pEntry->GetUserData() )->sUNOCommand );
 }
 // 
-----------------------------------------------------------------------------
 void OCreationList::KeyInput( const KeyEvent& rKEvt )
@@ -361,7 +399,7 @@
 DBG_NAME(OTasksWindow)
 OTasksWindow::OTasksWindow(Window* _pParent,OApplicationDetailView* 
_pDetailView)
        : Window(_pParent,WB_DIALOGCONTROL )
-       ,m_aCreation(this)
+       ,m_aCreation(*this)
        ,m_aDescription(this)
        ,m_aHelpText(this,WB_WORDBREAK)
        ,m_aFL(this,WB_VERT)
@@ -447,7 +485,7 @@
        DBG_CHKTHIS(OTasksWindow,NULL);
        SvLBoxEntry* pEntry = m_aCreation.GetHdlEntry();
        if ( pEntry )
-               
m_aHelpText.SetText(ModuleRes(reinterpret_cast<TResourcePair*>(pEntry->GetUserData())->second));
+               m_aHelpText.SetText( ModuleRes( reinterpret_cast< TaskEntry* >( 
pEntry->GetUserData() )->nHelpID ) );
        return 1L;
 }
 // 
-----------------------------------------------------------------------------
@@ -472,60 +510,40 @@
        m_aFL.SetPosSizePixel( Point(nHalfOutputWidth , 0), 
Size(aFLSize.Width(), nOutputHeight ) );
 }
 // 
-----------------------------------------------------------------------------
-struct TResourcePairFunctor : public ::std::unary_function< 
::std::pair<String, TResourcePair>, bool>
-{
-    IController* pController;
-
-    TResourcePairFunctor(IController* _pController):pController(_pController){}
-    
-    bool operator() (const ::std::pair<String, TResourcePair>& lhs) const 
-    {
-        ::com::sun::star::util::URL aUrl;
-        aUrl.Complete = lhs.second.first;
-        return !pController->isCommandEnabled(aUrl);
-    }
-};
-
-// 
-----------------------------------------------------------------------------
-void OTasksWindow::fillCreationNew( TResourceStruct& _rList )
+void OTasksWindow::fillTaskEntryList( const TaskEntryList& _rList )
 {      
        DBG_CHKTHIS(OTasksWindow,NULL);
        Clear();
 
-    TResourcePairFunctor 
aFunctor(getDetailView()->getBorderWin().getView()->getCommandController());
-    
_rList.erase(::std::remove_if(_rList.begin(),_rList.end(),aFunctor),_rList.end());
-
-       
        try
        {
                Reference<XModuleUIConfigurationManagerSupplier> 
xModuleCfgMgrSupplier(getDetailView()->getBorderWin().getView()->getORB()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ui.ModuleUIConfigurationManagerSupplier"))),UNO_QUERY);
                Reference<XUIConfigurationManager> xUIConfigMgr = 
xModuleCfgMgrSupplier->getUIConfigurationManager(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.OfficeDatabaseDocument")));
                Reference<XImageManager> 
xImageMgr(xUIConfigMgr->getImageManager(),UNO_QUERY);
 
-               m_aHelpTextIds.reserve(_rList.size());
-               Sequence< ::rtl::OUString> aSeq(_rList.size());
-               sal_Int32 i = 0;
-               TResourceStruct::const_iterator aEnd = _rList.end();
-               for (TResourceStruct::const_iterator aIter = _rList.begin(); 
aIter != aEnd; ++aIter,++i)
-               {
-                       aSeq[i] = aIter->second.first;
-               }
+        // copy the commands so we can use them with the config managers
+        Sequence< ::rtl::OUString > aCommands( _rList.size() );
+        ::rtl::OUString* pCommands = aCommands.getArray();
+               TaskEntryList::const_iterator aEnd = _rList.end();
+               for ( TaskEntryList::const_iterator pCopyTask = _rList.begin(); 
pCopyTask != aEnd; ++pCopyTask, ++pCommands )
+                       *pCommands = pCopyTask->sUNOCommand;
 
-               i = 0;
+               Sequence< Reference< XGraphic> > aImages = 
xImageMgr->getImages( ImageType::SIZE_DEFAULT | ImageType::COLOR_NORMAL, 
aCommands );
+               Sequence< Reference< XGraphic> > aHCImages = 
xImageMgr->getImages( ImageType::SIZE_DEFAULT | ImageType::COLOR_HIGHCONTRAST, 
aCommands );
         
-               Sequence< Reference< XGraphic> > aImages = 
xImageMgr->getImages( ImageType::SIZE_DEFAULT | ImageType::COLOR_NORMAL, aSeq );
-               Sequence< Reference< XGraphic> > aHCImages = 
xImageMgr->getImages( ImageType::SIZE_DEFAULT | ImageType::COLOR_HIGHCONTRAST, 
aSeq );
+        const Reference< XGraphic >* pImages( aImages.getConstArray() );
+        const Reference< XGraphic >* pHCImages( aHCImages.getConstArray() );
 
-        for (TResourceStruct::const_iterator aIter = _rList.begin(); aIter != 
aEnd; ++aIter,++i)
+        for ( TaskEntryList::const_iterator pTask = _rList.begin(); pTask != 
aEnd; ++pTask, ++pImages, ++pHCImages )
                {
-                       SvLBoxEntry* pEntry = m_aCreation.InsertEntry( 
aIter->first );
-            pEntry->SetUserData(reinterpret_cast<void*>(new 
TResourcePair(aIter->second)));
+                       SvLBoxEntry* pEntry = m_aCreation.InsertEntry( 
pTask->sTitle );
+            pEntry->SetUserData( reinterpret_cast< void* >( new TaskEntry( 
*pTask ) ) );
 
-            Image aImage = Image( aImages[i] );
+            Image aImage = Image( *pImages );
             m_aCreation.SetExpandedEntryBmp( pEntry, aImage, BMP_COLOR_NORMAL 
);
             m_aCreation.SetCollapsedEntryBmp( pEntry, aImage, BMP_COLOR_NORMAL 
);
 
-            Image aHCImage = Image( aHCImages[i] );
+            Image aHCImage = Image( *pHCImages );
             m_aCreation.SetExpandedEntryBmp( pEntry, aHCImage, 
BMP_COLOR_HIGHCONTRAST );
             m_aCreation.SetCollapsedEntryBmp( pEntry, aHCImage, 
BMP_COLOR_HIGHCONTRAST );
                }
@@ -550,7 +568,7 @@
        SvLBoxEntry* pEntry = m_aCreation.First();
        while ( pEntry )
        {
-               delete reinterpret_cast<TResourcePair*>(pEntry->GetUserData());
+               delete reinterpret_cast< TaskEntry* >( pEntry->GetUserData() );
                pEntry = m_aCreation.Next(pEntry);
        }
        m_aCreation.Clear(); 
@@ -649,72 +667,145 @@
        DBG_CHKTHIS(OApplicationDetailView,NULL);
        OSplitterView::GetFocus();
 }
+
 // 
-----------------------------------------------------------------------------
-void OApplicationDetailView::createTablesPage(const Reference< XConnection>& 
_xConnection)
+void OApplicationDetailView::setTaskExternalMnemonics( MnemonicGenerator& 
_rMnemonics )
 {
-       DBG_CHKTHIS(OApplicationDetailView,NULL);
+    m_aExternalMnemonics = _rMnemonics;
+}
 
-    m_pControlHelper->createTablesPage(_xConnection);
+// 
-----------------------------------------------------------------------------
+bool OApplicationDetailView::interceptKeyInput( const KeyEvent& _rEvent )
+{
+    const KeyCode& rKeyCode = _rEvent.GetKeyCode();
+    if ( rKeyCode.GetModifier() == KEY_MOD2 )
+        return getTasksWindow().HandleKeyInput( _rEvent );
 
-       TResourceStruct aList;
-       aList.reserve(4);
-       aList.push_back( 
TResourceStruct::value_type(ModuleRes(RID_STR_NEW_TABLE),TResourcePair(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:DBNewTable")),RID_STR_TABLES_HELP_TEXT_DESIGN)));
-       aList.push_back( 
TResourceStruct::value_type(ModuleRes(RID_STR_NEW_TABLE_AUTO),TResourcePair(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:DBNewTableAutoPilot")),RID_STR_TABLES_HELP_TEXT_WIZARD)));
+    // not handled
+    return false;
+}
 
-       ::com::sun::star::util::URL aUrl;
-       aUrl.Complete = 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:DBNewView"));
-       if ( 
getBorderWin().getView()->getCommandController()->isCommandEnabled(aUrl) )
-               aList.push_back( 
TResourceStruct::value_type(ModuleRes(RID_STR_NEW_VIEW),TResourcePair(aUrl.Complete,RID_STR_VIEWS_HELP_TEXT_DESIGN)));
-       //      aList.push_back( 
TResourceStruct::value_type(ModuleRes(RID_STR_NEW_VIEW_AUTO),TResourcePair(ID_NEW_VIEW_DESIGN_AUTO_PILOT,RID_STR_VIEWS_HELP_TEXT_WIZARD)));
+// 
-----------------------------------------------------------------------------
+void OApplicationDetailView::createTablesPage(const Reference< XConnection >& 
_xConnection )
+{
+    impl_createPage( E_TABLE, _xConnection, NULL );
+}
 
-       static_cast<OTasksWindow*>(m_aTasks.getChildWindow())->fillCreationNew( 
aList );
+// 
-----------------------------------------------------------------------------
+void OApplicationDetailView::createPage( ElementType _eType,const Reference< 
XNameAccess >& _xContainer )
+{
+    impl_createPage( _eType, NULL, _xContainer );
+}
+
+// 
-----------------------------------------------------------------------------
+void OApplicationDetailView::impl_createPage( ElementType _eType, const 
Reference< XConnection >& _rxConnection,
+    const Reference< XNameAccess >& _rxNonTableElements )
+{
+    DBG_CHKTHIS(OApplicationDetailView,NULL);
+
+    // get the data for the pane
+    const TaskPaneData& rData = impl_getTaskPaneData( _eType );
+    getTasksWindow().fillTaskEntryList( rData.aTasks );
 
-       m_aContainer.setTitle(RID_STR_TABLES_CONTAINER);
+    // enable the pane as a whole, depending on the availability of the first 
command
+    OSL_ENSURE( !rData.aTasks.empty(), 
"OApplicationDetailView::impl_createPage: no tasks at all!?" );
+    bool bEnabled = rData.aTasks.empty()
+                ?   false
+                :   
getBorderWin().getView()->getCommandController()->isCommandEnabled( 
rData.aTasks[0].sUNOCommand );
+    getTasksWindow().Enable( bEnabled );
+    m_aContainer.setTitle( rData.nTitleId );
+
+    // let our helper create the object list
+    if ( _eType == E_TABLE )
+        m_pControlHelper->createTablesPage( _rxConnection );
+    else
+        m_pControlHelper->createPage( _eType, _rxNonTableElements );
+
+    // resize for proper window arrangements
        Resize();
 }
+
 // 
-----------------------------------------------------------------------------
-void OApplicationDetailView::createPage(ElementType _eType,const Reference< 
XNameAccess >& _xContainer)
+const TaskPaneData& OApplicationDetailView::impl_getTaskPaneData( ElementType 
_eType )
 {
-       DBG_CHKTHIS(OApplicationDetailView,NULL);
-       USHORT nTitleId = 0;
-       TResourceStruct aList;
-       aList.reserve(4);
-       switch(_eType )
-       {
-               case E_FORM:
+    if ( m_aTaskPaneData.empty() )
+        m_aTaskPaneData.resize( E_ELEMENT_TYPE_COUNT );
+    OSL_ENSURE( ( _eType >= 0 ) && ( _eType < E_ELEMENT_TYPE_COUNT ), 
"OApplicationDetailView::impl_getTaskPaneData: illegal element type!" );
+    TaskPaneData& rData = m_aTaskPaneData[ _eType ];
+
+    if ( rData.aTasks.empty() )
+        impl_fillTaskPaneData( _eType, rData );
+
+    return rData;
+}
+
+// 
-----------------------------------------------------------------------------
+void OApplicationDetailView::impl_fillTaskPaneData( ElementType _eType, 
TaskPaneData& _rData ) const
+{
+    TaskEntryList& rList( _rData.aTasks );
+    rList.clear(); rList.reserve( 4 );
+
+    switch ( _eType )
                        {
-                               aList.push_back( 
TResourceStruct::value_type(ModuleRes(RID_STR_NEW_FORM),TResourcePair(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:DBNewForm")),
 RID_STR_FORMS_HELP_TEXT)));
-                               aList.push_back( 
TResourceStruct::value_type(ModuleRes(RID_STR_NEW_FORM_AUTO),TResourcePair(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:DBNewFormAutoPilot")),RID_STR_FORMS_HELP_TEXT_WIZARD)));
+    case E_TABLE:
+        rList.push_back( TaskEntry( ".uno:DBNewTable", 
RID_STR_TABLES_HELP_TEXT_DESIGN, RID_STR_NEW_TABLE ) );
+        rList.push_back( TaskEntry( ".uno:DBNewTableAutoPilot", 
RID_STR_TABLES_HELP_TEXT_WIZARD, RID_STR_NEW_TABLE_AUTO ) );
+        rList.push_back( TaskEntry( ".uno:DBNewView", 
RID_STR_VIEWS_HELP_TEXT_DESIGN, RID_STR_NEW_VIEW, true ) );
+        _rData.nTitleId = RID_STR_TABLES_CONTAINER;
+        break;
                                
-                               nTitleId = RID_STR_FORMS_CONTAINER;
-                       }
+    case E_FORM:
+        rList.push_back( TaskEntry( ".uno:DBNewForm", RID_STR_FORMS_HELP_TEXT, 
RID_STR_NEW_FORM ) );
+        rList.push_back( TaskEntry( ".uno:DBNewFormAutoPilot", 
RID_STR_FORMS_HELP_TEXT_WIZARD, RID_STR_NEW_FORM_AUTO ) );
+        _rData.nTitleId = RID_STR_FORMS_CONTAINER;
                        break;
-               case E_REPORT:
-                       {
-                           aList.push_back( 
TResourceStruct::value_type(ModuleRes(RID_STR_NEW_REPORT),TResourcePair(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:DBNewReport")),
 RID_STR_REPORT_HELP_TEXT)));
-                               aList.push_back( 
TResourceStruct::value_type(ModuleRes(RID_STR_NEW_REPORT_AUTO),TResourcePair(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:DBNewReportAutoPilot")),RID_STR_REPORTS_HELP_TEXT_WIZARD)));
 
-                               nTitleId = RID_STR_REPORTS_CONTAINER;
-                       }
+    case E_REPORT:
+        rList.push_back( TaskEntry( ".uno:DBNewReport", 
RID_STR_REPORT_HELP_TEXT, RID_STR_NEW_REPORT, true ) );
+        rList.push_back( TaskEntry( ".uno:DBNewReportAutoPilot", 
RID_STR_REPORTS_HELP_TEXT_WIZARD, RID_STR_NEW_REPORT_AUTO ) );
+        _rData.nTitleId = RID_STR_REPORTS_CONTAINER;
                        break;
-               case E_QUERY:
-                       {
-                               aList.push_back( 
TResourceStruct::value_type(ModuleRes(RID_STR_NEW_QUERY),TResourcePair(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:DBNewQuery")),RID_STR_QUERIES_HELP_TEXT)));
-                               aList.push_back( 
TResourceStruct::value_type(ModuleRes(RID_STR_NEW_QUERY_AUTO),TResourcePair(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:DBNewQueryAutoPilot")),RID_STR_QUERIES_HELP_TEXT_WIZARD)));
-                               aList.push_back( 
TResourceStruct::value_type(ModuleRes(RID_STR_NEW_QUERY_SQL),TResourcePair(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:DBNewQuerySql")),RID_STR_QUERIES_HELP_TEXT_SQL)));
 
-                               nTitleId = RID_STR_QUERIES_CONTAINER;
-                       }
+    case E_QUERY:
+        rList.push_back( TaskEntry( ".uno:DBNewQuery", 
RID_STR_QUERIES_HELP_TEXT, RID_STR_NEW_QUERY ) );
+        rList.push_back( TaskEntry( ".uno:DBNewQueryAutoPilot", 
RID_STR_QUERIES_HELP_TEXT_WIZARD, RID_STR_NEW_QUERY_AUTO ) );
+        rList.push_back( TaskEntry( ".uno:DBNewQuerySql", 
RID_STR_QUERIES_HELP_TEXT_SQL, RID_STR_NEW_QUERY_SQL ) );
+        _rData.nTitleId = RID_STR_QUERIES_CONTAINER;
                        break;
+
                default:
-                       OSL_ENSURE(0,"Illegal call!");
+        OSL_ENSURE( false, "OApplicationDetailView::impl_fillTaskPaneData: 
illegal element type!" );
        }
 
-       static_cast<OTasksWindow*>(m_aTasks.getChildWindow())->fillCreationNew( 
aList );
-       m_pControlHelper->createPage(_eType,_xContainer);
-       m_aContainer.setTitle(nTitleId);
-       Resize();
+    MnemonicGenerator aAllMnemonics( m_aExternalMnemonics );
+
+    // remove the entries which are not enabled currently
+    for (   TaskEntryList::iterator pTask = rList.begin();
+            pTask != rList.end();
+        )
+    {
+        if  (   pTask->bHideWhenDisabled
+            &&  
!getBorderWin().getView()->getCommandController()->isCommandEnabled( 
pTask->sUNOCommand )
+            )
+            pTask = rList.erase( pTask );
+        else
+        {
+            aAllMnemonics.RegisterMnemonic( pTask->sTitle );
+            ++pTask;
+        }
+    }
+
+    // for the remaining entries, assign mnemonics
+    for (   TaskEntryList::iterator pTask = rList.begin();
+            pTask != rList.end();
+            ++pTask
+        )
+    {
+        aAllMnemonics.CreateMnemonic( pTask->sTitle );
+        // don't do this for now, until our task window really supports 
mnemonics
+    }
 }
+
 // 
-----------------------------------------------------------------------------
 ::rtl::OUString OApplicationDetailView::getQualifiedName( SvLBoxEntry* _pEntry 
) const
 {
@@ -768,7 +859,7 @@
 {
        DBG_CHKTHIS(OApplicationDetailView,NULL);
        if ( _bTaskAlso )
-               static_cast<OTasksWindow*>(m_aTasks.getChildWindow())->Clear();
+               getTasksWindow().Clear();
        m_pControlHelper->clearPages();
 }
 // 
-----------------------------------------------------------------------------
@@ -818,7 +909,7 @@
 void OApplicationDetailView::onCreationClick( const ::rtl::OUString& _sCommand)
 {
        DBG_CHKTHIS(OApplicationDetailView,NULL);
-       
static_cast<OAppBorderWindow*>(GetParent())->getView()->getElementNotification()->onCreationClick(_sCommand);
+       
getBorderWin().getView()->getElementNotification()->onCreationClick(_sCommand);
 }
 // 
-----------------------------------------------------------------------------
 SvLBoxEntry*  OApplicationDetailView::elementAdded(ElementType _eType,const 
::rtl::OUString& _rName, const Any& _rObject )

File [changed]: AppDetailView.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppDetailView.hxx?r1=1.11.56.3&r2=1.11.56.4
Delta lines:  +73 -17
---------------------
--- AppDetailView.hxx   2007-06-04 18:01:59+0000        1.11.56.3
+++ AppDetailView.hxx   2007-06-19 08:00:47+0000        1.11.56.4
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: AppDetailView.hxx,v $
  *
- *  $Revision: 1.11.56.3 $
+ *  $Revision: 1.11.56.4 $
  *
- *  last change: $Author: oj $ $Date: 2007/06/04 18:01:59 $
+ *  last change: $Author: fs $ $Date: 2007/06/19 08:00:47 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -53,6 +53,9 @@
 #ifndef _SV_FIXED_HXX 
 #include <vcl/fixed.hxx>
 #endif
+#ifndef _SV_MNEMONIC_HXX
+#include <vcl/mnemonic.hxx>
+#endif
 #ifndef DBACCESS_TABLEDESIGN_ICLIPBOARDTEST_HXX
 #include "IClipBoardTest.hxx"
 #endif
@@ -72,6 +75,7 @@
 #include <vector>
 
 class SvLBoxEntry;
+
 namespace dbaui
 {
        class OApplicationController;
@@ -82,7 +86,7 @@
 
        class OCreationList : public SvTreeListBox
        {
-               OTasksWindow*   m_pTaskWindow;
+               OTasksWindow&   m_rTaskWindow;
 
         // members related to drawing the currently hovered/selected entry
         SvLBoxEntry*        m_pMouseDownEntry;
@@ -91,7 +95,7 @@
         Font                m_aOriginalFont;
 
        public:
-               OCreationList(OTasksWindow* _pParent);
+               OCreationList( OTasksWindow& _rParent );
                // window overloads
                virtual void MouseMove( const MouseEvent& rMEvt );
                virtual void MouseButtonDown( const MouseEvent& rMEvt );
@@ -111,6 +115,10 @@
            virtual Rectangle   GetFocusRect( SvLBoxEntry* _pEntry, long _nLine 
);
         virtual void        ModelHasCleared();
 
+        // IMnemonicEntryList
+        virtual void        SelectSearchEntry( const void* _pEntry );
+        virtual void        ExecuteSearchEntry( const void* _pEntry );
+
     private:
         void    onSelected( SvLBoxEntry* _pEntry ) const;
         /** sets a new current entry, and invalidates the old and the new one, 
if necessary
@@ -119,12 +127,30 @@
         bool    setCurrentEntryInvalidate( SvLBoxEntry* _pEntry );
        };
 
-       typedef ::std::pair< ::rtl::OUString,USHORT>                            
TResourcePair;
-       typedef ::std::vector< ::std::pair<String, TResourcePair> >     
TResourceStruct;
+    struct TaskEntry
+    {
+        ::rtl::OUString sUNOCommand;
+        USHORT          nHelpID;
+        String          sTitle;
+        bool            bHideWhenDisabled;
+            // TODO: we should be consistent in the task pane and the 
menus/toolbars:
+            // If an entry is disabled in the latter, it should also be 
disabled in the former.
+            // If an entry is *hidden* in the former, it should also be hidden 
in the latter.
+
+        TaskEntry( const sal_Char* _pAsciiUNOCommand, USHORT _nHelpID, USHORT 
_nTitleResourceID, bool _bHideWhenDisabled = false );
+    };
+       typedef ::std::vector< TaskEntry >      TaskEntryList;
+
+    struct TaskPaneData
+    {
+        /// the tasks available in the pane
+        TaskEntryList   aTasks;
+        /// the resource ID for the title of the pane
+        USHORT          nTitleId;
+    };
 
        class OTasksWindow : public Window
        {
-               ::std::vector< USHORT >                         m_aHelpTextIds;
                OCreationList                                           
m_aCreation;
                FixedText                                                       
m_aDescription;
                FixedText                                                       
m_aHelpText;
@@ -144,11 +170,15 @@
 
                OApplicationDetailView* getDetailView() const { return 
m_pDetailView; }
 
-               /** fills the Creation listbox with the necessary strings and 
images
-                       @param  _rList
-                               The strings and the id of the images and help 
texts to add.
-               */
-               void fillCreationNew( TResourceStruct& _rList );
+        /// fills the Creation listbox with the necessary strings and images
+        void fillTaskEntryList( const TaskEntryList& _rList );
+
+        inline bool HandleKeyInput( const KeyEvent& /*_rKEvt*/ )
+        {
+            // TODO: after resync to a milestone with dba23ui: 
+            // return m_aCreation.HandleKeyInput( _rKEvt );
+            return false;
+        }
 
                void Clear();
                void setHelpText(USHORT _nId);
@@ -162,10 +192,14 @@
                OTitleWindow                                            
m_aContainer;
                OAppBorderWindow&                                       
m_rBorderWin;           // my parent
                OAppDetailPageHelper*                           
m_pControlHelper;
+        ::std::vector< TaskPaneData >       m_aTaskPaneData;
+        MnemonicGenerator                   m_aExternalMnemonics;
 
                void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL 
bBackground );
+
        protected:
                virtual void DataChanged(const DataChangedEvent& rDCEvt);
+
        public:
                OApplicationDetailView(OAppBorderWindow& _rParent,PreviewMode 
_ePreviewMode);
                virtual ~OApplicationDetailView();
@@ -187,7 +221,19 @@
                */
                void createPage(ElementType _eType,const 
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& 
_xContainer);
 
-               inline OAppBorderWindow& getBorderWin() const { return 
m_rBorderWin;}
+        void setTaskExternalMnemonics( MnemonicGenerator& _rMnemonics );
+
+        /** called to give the window the chance to intercept key events, 
while it has not
+            the focus
+
+            @return <TRUE/> if and only if the event has been handled, and 
should not
+                not be further processed
+        */
+        bool    interceptKeyInput( const KeyEvent& _rEvent );
+
+        inline OAppBorderWindow& getBorderWin() const { return m_rBorderWin; }
+        inline OTasksWindow& getTasksWindow() const { return *static_cast< 
OTasksWindow* >( m_aTasks.getChildWindow() ); }
+
                sal_Bool isCutAllowed() ;       
                sal_Bool isCopyAllowed()        ;       
                sal_Bool isPasteAllowed();      
@@ -336,6 +382,16 @@
                                The command to be executed.
                */
                void onCreationClick( const ::rtl::OUString& _sCommand);
+
+    private:
+        void                impl_createPage(
+                                ElementType _eType,
+                                const ::com::sun::star::uno::Reference< 
::com::sun::star::sdbc::XConnection >& _rxConnection,
+                                const ::com::sun::star::uno::Reference< 
::com::sun::star::container::XNameAccess >& _rxNonTableElements
+                            );
+
+        const TaskPaneData& impl_getTaskPaneData( ElementType _eType );
+        void                impl_fillTaskPaneData( ElementType _eType, 
TaskPaneData& _rData ) const;
        };
 }
 #endif // DBAUI_APPDETAILVIEW_HXX

File [changed]: AppSwapWindow.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppSwapWindow.cxx?r1=1.6.4.6&r2=1.6.4.7
Delta lines:  +11 -21
---------------------
--- AppSwapWindow.cxx   2006-11-07 09:10:33+0000        1.6.4.6
+++ AppSwapWindow.cxx   2007-06-19 08:00:48+0000        1.6.4.7
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: AppSwapWindow.cxx,v $
  *
- *  $Revision: 1.6.4.6 $
+ *  $Revision: 1.6.4.7 $
  *
- *  last change: $Author: oj $ $Date: 2006/11/07 09:10:33 $
+ *  last change: $Author: fs $ $Date: 2007/06/19 08:00:48 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -78,10 +78,11 @@
 // class OApplicationSwapWindow
 DBG_NAME(OApplicationSwapWindow)
 //==================================================================
-OApplicationSwapWindow::OApplicationSwapWindow(Window* 
_pParent,OAppBorderWindow* _pBorderWindow) : Window(_pParent,WB_DIALOGCONTROL )
+OApplicationSwapWindow::OApplicationSwapWindow( Window* _pParent, 
OAppBorderWindow& _rBorderWindow )
+    :Window(_pParent,WB_DIALOGCONTROL )
        ,m_aIconControl(this)
        ,m_eLastType(E_NONE)
-       ,m_pBorderWin(_pBorderWindow)
+       ,m_rBorderWin( _rBorderWindow )
 {
     DBG_CTOR(OApplicationSwapWindow,NULL);
 //     SetCompoundControl( TRUE );
@@ -89,7 +90,7 @@
        ImplInitSettings( sal_True, sal_True, sal_True );
 
        m_aIconControl.SetClickHdl(LINK(this, OApplicationSwapWindow, 
OnContainerSelectHdl));
-       
m_aIconControl.setControlActionListener(_pBorderWindow->getView()->getActionListener());
+       m_aIconControl.setControlActionListener( 
m_rBorderWin.getView()->getActionListener());
        m_aIconControl.SetHelpId(HID_APP_SWAP_ICONCONTROL);
        m_aIconControl.Show();
        //m_aIconControl.Enable(TRUE);
@@ -160,20 +161,9 @@
 }
 
 // 
-----------------------------------------------------------------------------
-void OApplicationSwapWindow::createIconAutoMnemonics()
+void OApplicationSwapWindow::createIconAutoMnemonics( MnemonicGenerator& 
_rMnemonics )
 {
-    // we need to share our "mnemonic space" with the menu of the window we 
live in
-    MnemonicGenerator aMnemonicGenerator;
-    SystemWindow* pSystemWindow = GetSystemWindow();
-    MenuBar* pMenu = pSystemWindow ? pSystemWindow->GetMenuBar() : NULL;
-    if ( pMenu )
-    {
-        USHORT nMenuItems = pMenu->GetItemCount();
-        for ( USHORT i = 0; i < nMenuItems; ++i )
-            aMnemonicGenerator.RegisterMnemonic( pMenu->GetItemText( 
pMenu->GetItemId( i ) ) );
-    }
-
-    m_aIconControl.CreateAutoMnemonics( aMnemonicGenerator );
+    m_aIconControl.CreateAutoMnemonics( _rMnemonics );
 }
 
 // 
-----------------------------------------------------------------------------
@@ -183,7 +173,7 @@
     if ( rKeyCode.GetModifier() == KEY_MOD2 )
         return m_aIconControl.DoKeyInput( _rEvent );
 
-    // not intercepted
+    // not handled
     return false;
 }
 
@@ -205,7 +195,7 @@
 
        if ( m_eLastType != eType && eType != E_NONE )
        {
-               if ( 
m_pBorderWin->getView()->getElementNotification()->onContainerSelect(eType) )
+               if ( 
m_rBorderWin.getView()->getElementNotification()->onContainerSelect(eType) )
                        m_eLastType = eType;
                else
                {

File [changed]: AppSwapWindow.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppSwapWindow.hxx?r1=1.5&r2=1.5.34.1
Delta lines:  +6 -6
-------------------
--- AppSwapWindow.hxx   2006-01-31 18:41:13+0000        1.5
+++ AppSwapWindow.hxx   2007-06-19 08:00:48+0000        1.5.34.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: AppSwapWindow.hxx,v $
  *
- *  $Revision: 1.5 $
+ *  $Revision: 1.5.34.1 $
  *
- *  last change: $Author: kz $ $Date: 2006/01/31 18:41:13 $
+ *  last change: $Author: fs $ $Date: 2007/06/19 08:00:48 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -57,7 +57,7 @@
        {
                OApplicationIconControl                         m_aIconControl;
                ElementType                                                     
m_eLastType;
-               OAppBorderWindow*                                       
m_pBorderWin;
+               OAppBorderWindow&                                       
m_rBorderWin;
 
                void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL 
bBackground );
 
@@ -66,7 +66,7 @@
        protected:
                virtual void DataChanged(const DataChangedEvent& rDCEvt);
        public:
-               OApplicationSwapWindow(Window* _pParent,OAppBorderWindow* 
_pBorderWindow);
+               OApplicationSwapWindow( Window* _pParent, OAppBorderWindow& 
_rBorderWindow );
                virtual ~OApplicationSwapWindow();
                // window overloads
                virtual void Resize();
@@ -86,7 +86,7 @@
 
         /** automatically creates mnemonics for the icon/texts in our left 
hand side panel
         */
-        void    createIconAutoMnemonics();
+        void    createIconAutoMnemonics( MnemonicGenerator& _rMnemonics );
 
         /** called to give the window the chance to intercept key events, 
while it has not
             the focus

File [changed]: AppView.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppView.cxx?r1=1.11.4.5&r2=1.11.4.6
Delta lines:  +34 -9
--------------------
--- AppView.cxx 2007-06-04 18:02:10+0000        1.11.4.5
+++ AppView.cxx 2007-06-19 08:00:48+0000        1.11.4.6
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: AppView.cxx,v $
  *
- *  $Revision: 1.11.4.5 $
+ *  $Revision: 1.11.4.6 $
  *
- *  last change: $Author: oj $ $Date: 2007/06/04 18:02:10 $
+ *  last change: $Author: fs $ $Date: 2007/06/19 08:00:48 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -146,7 +146,7 @@
 
        m_pPanel = new OTitleWindow(this,STR_DATABASE,WB_BORDER | 
WB_DIALOGCONTROL ,FALSE);
        m_pPanel->SetBorderStyle(WINDOW_BORDER_MONO);
-       OApplicationSwapWindow* pSwap = new 
OApplicationSwapWindow(m_pPanel,this);
+       OApplicationSwapWindow* pSwap = new OApplicationSwapWindow( m_pPanel, 
*this );
        pSwap->Show();
        pSwap->SetUniqueId(UID_APP_SWAP_VIEW);
 
@@ -252,9 +252,23 @@
        SetTextFillColor( 
Application::GetSettings().GetStyleSettings().GetDialogColor() );*/
 }
 // 
-----------------------------------------------------------------------------
-OApplicationView*              OAppBorderWindow::getView()                     
const { return m_pView; }
-OApplicationSwapWindow*        OAppBorderWindow::getPanel()            const { 
return static_cast<OApplicationSwapWindow*>(m_pPanel->getChildWindow()); }
-OApplicationDetailView*        OAppBorderWindow::getDetailView()       const { 
return m_pDetailView; }
+OApplicationView* OAppBorderWindow::getView() const
+{
+    return m_pView;
+}
+
+// 
-----------------------------------------------------------------------------
+OApplicationSwapWindow*        OAppBorderWindow::getPanel() const
+{
+    return static_cast< OApplicationSwapWindow* >( m_pPanel->getChildWindow() 
);
+}
+
+// 
-----------------------------------------------------------------------------
+OApplicationDetailView*        OAppBorderWindow::getDetailView() const
+{
+    return m_pDetailView;
+}
+
 //==================================================================
 // class OApplicationView
 //==================================================================
@@ -309,10 +323,17 @@
        m_pElementNotification = NULL;
 }
 // 
-----------------------------------------------------------------------------
-void OApplicationView::createIconAutoMnemonics()
+void OApplicationView::createIconAutoMnemonics( MnemonicGenerator& _rMnemonics 
)
 {
     if ( m_pWin && m_pWin->getPanel() )
-        m_pWin->getPanel()->createIconAutoMnemonics();
+        m_pWin->getPanel()->createIconAutoMnemonics( _rMnemonics );
+}
+
+// 
-----------------------------------------------------------------------------
+void OApplicationView::setTaskExternalMnemonics( MnemonicGenerator& 
_rMnemonics )
+{
+    if ( m_pWin && m_pWin->getDetailView() )
+        m_pWin->getDetailView()->setTaskExternalMnemonics( _rMnemonics );
 }
 
 // 
-----------------------------------------------------------------------------
@@ -366,6 +387,10 @@
             // #i34790# - 2004-09-30 - [EMAIL PROTECTED]
             if ( getPanel() && getPanel()->interceptKeyInput( *pKeyEvent ) )
                 return 1L;
+            // and ditto the detail view
+            // #i72799# - 2006-12-20 / [EMAIL PROTECTED]
+            if ( getDetailView() && getDetailView()->interceptKeyInput( 
*pKeyEvent ) )
+                return 1L;
         }
         break;
        }

File [changed]: AppView.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppView.hxx?r1=1.12&r2=1.12.10.1
Delta lines:  +11 -6
--------------------
--- AppView.hxx 2007-05-10 10:17:55+0000        1.12
+++ AppView.hxx 2007-06-19 08:00:48+0000        1.12.10.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: AppView.hxx,v $
  *
- *  $Revision: 1.12 $
+ *  $Revision: 1.12.10.1 $
  *
- *  last change: $Author: kz $ $Date: 2007/05/10 10:17:55 $
+ *  last change: $Author: fs $ $Date: 2007/06/19 08:00:48 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -65,8 +65,10 @@
 
 namespace com{ namespace sun { namespace star { namespace beans    { class 
XPropertySet; } } } }
 namespace com{ namespace sun { namespace star { namespace frame    { class 
XController; } } } }
+
 class Control;
 class SvLBoxEntry;
+class MnemonicGenerator;
 
 namespace dbaui
 {
@@ -101,6 +103,7 @@
                OApplicationSwapWindow* getPanel() const;
                OApplicationDetailView* getDetailView() const;
        };
+
        //==================================================================
        class OApplicationView : public ODataView
                                                        ,public IClipboardTest
@@ -153,9 +156,11 @@
                                                        );
                virtual ~OApplicationView();
 
-        /** automatically creates mnemonics for the icon/texts in our left 
hand side panel
-        */
-        void    createIconAutoMnemonics();
+        /// automatically creates mnemonics for the icon/texts in our left 
hand side panel
+        void    createIconAutoMnemonics( MnemonicGenerator& _rMnemonics );
+
+        /// automatically creates mnemonics for the texts in our task pane
+        void    setTaskExternalMnemonics( MnemonicGenerator& _rMnemonics );
 
         // window overloads
                virtual long PreNotify( NotifyEvent& rNEvt );

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

File [changed]: genericcontroller.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/browser/genericcontroller.cxx?r1=1.66.4.13&r2=1.66.4.14
Delta lines:  +5 -5
-------------------
--- genericcontroller.cxx       2007-06-05 16:44:35+0000        1.66.4.13
+++ genericcontroller.cxx       2007-06-19 08:00:48+0000        1.66.4.14
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: genericcontroller.cxx,v $
  *
- *  $Revision: 1.66.4.13 $
+ *  $Revision: 1.66.4.14 $
  *
- *  last change: $Author: oj $ $Date: 2007/06/05 16:44:35 $
+ *  last change: $Author: fs $ $Date: 2007/06/19 08:00:48 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -1321,12 +1321,12 @@
        return aState.bChecked && (sal_Bool)*aState.bChecked;
 }
 // 
-----------------------------------------------------------------------------
-sal_Bool OGenericUnoController::isCommandEnabled(const 
::com::sun::star::util::URL& _rCommand) const
+sal_Bool OGenericUnoController::isCommandEnabled( const ::rtl::OUString& 
_rCompleteCommandURL ) const
 {
-       OSL_ENSURE(_rCommand.Complete.getLength(),"Empty command url!");
+    OSL_ENSURE( _rCompleteCommandURL.getLength(), 
"OGenericUnoController::isCommandEnabled: Empty command url!" );
     
        sal_Bool bIsEnabled = sal_False;
-       SupportedFeatures::const_iterator aIter = m_aSupportedFeatures.find( 
_rCommand.Complete );
+    SupportedFeatures::const_iterator aIter = m_aSupportedFeatures.find( 
_rCompleteCommandURL );
        if ( aIter != m_aSupportedFeatures.end() )
                bIsEnabled = isCommandEnabled( aIter->second.nFeatureId );
 

File [changed]: unodatbr.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/browser/unodatbr.cxx?r1=1.172.4.9&r2=1.172.4.10
Delta lines:  +11 -3
--------------------
--- unodatbr.cxx        2007-06-04 18:07:25+0000        1.172.4.9
+++ unodatbr.cxx        2007-06-19 08:00:48+0000        1.172.4.10
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: unodatbr.cxx,v $
  *
- *  $Revision: 1.172.4.9 $
+ *  $Revision: 1.172.4.10 $
  *
- *  last change: $Author: oj $ $Date: 2007/06/04 18:07:25 $
+ *  last change: $Author: fs $ $Date: 2007/06/19 08:00:48 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -115,6 +115,9 @@
 #ifndef _SFXINTITEM_HXX //autogen
 #include <svtools/intitem.hxx>
 #endif
+#ifndef INCLUDED_SVTOOLS_MODULEOPTIONS_HXX
+#include <svtools/moduleoptions.hxx>
+#endif
 #ifndef _SV_WAITOBJ_HXX
 #include <vcl/waitobj.hxx>
 #endif
@@ -3511,6 +3514,11 @@
        }
        aContextMenu.EnableItem(SID_COPY,       sal_False);
 
+    if ( !SvtModuleOptions().IsModuleInstalled( SvtModuleOptions::E_SDATABASE 
) )
+    {
+           aContextMenu.EnableItem( ID_TREE_EDIT_DATABASE, sal_False );
+    }
+
        if ( pEntry )
        {
 

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.9.4.6&r2=1.9.4.7
Delta lines:  +4 -8
-------------------
--- dbtreelistbox.cxx   2007-02-20 15:47:44+0000        1.9.4.6
+++ dbtreelistbox.cxx   2007-06-19 08:00:48+0000        1.9.4.7
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: dbtreelistbox.cxx,v $
  *
- *  $Revision: 1.9.4.6 $
+ *  $Revision: 1.9.4.7 $
  *
- *  last change: $Author: oj $ $Date: 2007/02/20 15:47:44 $
+ *  last change: $Author: fs $ $Date: 2007/06/19 08:00:48 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -548,11 +548,7 @@
                     _pPopup->EnableItem(nId,pSubPopUp->HasValidEntries());
                 }
                                else
-                               {
-                                       ::com::sun::star::util::URL aCommand;
-                                       aCommand.Complete = 
_pPopup->GetItemCommand(nId);
-                                       
_pPopup->EnableItem(nId,_pController->isCommandEnabled(aCommand));
-                               }
+                                       _pPopup->EnableItem( nId, 
_pController->isCommandEnabled( _pPopup->GetItemCommand( nId ) ) );
                        }
                }
 

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

File [changed]: AppElementType.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/inc/AppElementType.hxx?r1=1.3&r2=1.3.8.1
Delta lines:  +6 -4
-------------------
--- AppElementType.hxx  2005-09-08 15:14:25+0000        1.3
+++ AppElementType.hxx  2007-06-19 08:00:49+0000        1.3.8.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: AppElementType.hxx,v $
  *
- *  $Revision: 1.3 $
+ *  $Revision: 1.3.8.1 $
  *
- *  last change: $Author: rt $ $Date: 2005/09/08 15:14:25 $
+ *  last change: $Author: fs $ $Date: 2007/06/19 08:00:49 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -45,7 +45,9 @@
                E_REPORT        = 1,
                E_QUERY         = 2,
                E_TABLE         = 3,
-               E_NONE          = 4
+
+        E_NONE         = 4,
+        E_ELEMENT_TYPE_COUNT = E_NONE
        };
 
        enum PreviewMode




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

Reply via email to