Tag: cws_src680_odbmacros2 User: fs Date: 2008-01-24 10:08:50+0000 Modified: dba/dbaccess/source/ui/browser/unodatbr.cxx
Log: implDirectSQL was never used / since rebuilding the connection is not implemented, remove it from the menu File Changes: Directory: /dba/dbaccess/source/ui/browser/ =========================================== File [changed]: unodatbr.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/browser/unodatbr.cxx?r1=1.192.2.4&r2=1.192.2.5 Delta lines: +4 -48 -------------------- --- unodatbr.cxx 2007-12-19 13:26:52+0000 1.192.2.4 +++ unodatbr.cxx 2008-01-24 10:08:47+0000 1.192.2.5 @@ -4,9 +4,9 @@ * * $RCSfile: unodatbr.cxx,v $ * - * $Revision: 1.192.2.4 $ + * $Revision: 1.192.2.5 $ * - * last change: $Author: fs $ $Date: 2007/12/19 13:26:52 $ + * last change: $Author: fs $ $Date: 2008/01/24 10:08:47 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -45,7 +45,6 @@ #include "dbu_brw.hrc" #include "dbu_reghelper.hxx" #include "dbustrings.hrc" -#include "directsql.hxx" #include "dlgsave.hxx" #include "HtmlReader.hxx" #include "imageprovider.hxx" @@ -3168,36 +3167,6 @@ } // ----------------------------------------------------------------------------- -void SbaTableQueryBrowser::implDirectSQL( SvLBoxEntry* _pApplyTo ) -{ - try - { - SharedConnection xConnection; - if(!ensureConnection(_pApplyTo, xConnection)) - return; - - DirectSQLDialog aDlg(getView(), xConnection); - aDlg.Execute(); - } - catch(const SQLException& e) - { - showError(SQLExceptionInfo(e)); - } - catch(const WrappedTargetException& e) - { - SQLException aSql; - if(e.TargetException >>= aSql) - showError(SQLExceptionInfo(aSql)); - else - OSL_ENSURE(sal_False, "SbaTableQueryBrowser::implDirectSQL: something strange happended!"); - } - catch(const Exception&) - { - DBG_ERROR("SbaTableQueryBrowser::implDirectSQL: caught an (unknown) exception!"); - } -} - -// ----------------------------------------------------------------------------- void SbaTableQueryBrowser::implAdministrate( SvLBoxEntry* _pApplyTo ) { try @@ -3304,9 +3273,8 @@ // enable menu entries if (!pDSData || !pDSData->xConnection.is()) - { // no -> disable the connection-related menu entries + { aContextMenu.EnableItem(ID_TREE_CLOSE_CONN, sal_False); - aContextMenu.EnableItem(ID_TREE_REBUILD_CONN, sal_False); } aContextMenu.EnableItem(SID_COPY, sal_False); @@ -3334,7 +3302,7 @@ case etQuery: { // 3.2 actions on existing queries - aContextMenu.EnableItem(SID_COPY, etQuery == eType); + aContextMenu.EnableItem( SID_COPY, etQuery == eType ); } break; case etDatasource: @@ -3343,9 +3311,6 @@ } } - // rebuild conn not implemented yet - aContextMenu.EnableItem(ID_TREE_REBUILD_CONN, sal_False); - if (!getORB().is()) // no ORB -> no administration dialog aContextMenu.EnableItem(ID_TREE_EDIT_DATABASE, sal_False); @@ -3353,8 +3318,6 @@ // no disabled entries aContextMenu.RemoveDisabledEntries(); - sal_Bool bReopenConn = sal_False; - USHORT nPos = aContextMenu.Execute(m_pTreeView->getListBox(), aPosition); delete pDynamicSubMenu; @@ -3374,13 +3337,6 @@ implAdministrate(pEntry); break; - case ID_DIRECT_SQL: - implDirectSQL(pEntry); - break; - - case ID_TREE_REBUILD_CONN: - bReopenConn = sal_True; - case ID_TREE_CLOSE_CONN: openHelpAgent(HID_DSBROWSER_DISCONNECTING); closeConnection(pDSEntry); --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
