summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorOcke Janssen <oj@openoffice.org>2002-07-09 06:46:43 +0000
committerOcke Janssen <oj@openoffice.org>2002-07-09 06:46:43 +0000
commit0215fb71b2bde7c261316a6cb7c704d0b90d29c6 (patch)
treee4a424fd6fa5057e80ce623adf2decd8bab2908f /dbaccess
parentd44a42d1cbe900d8d546948daf6d141ea2961488 (diff)
#96306# remove unused helpids and change delete, paste and copy
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/ui/browser/sbabrw.src195
-rw-r--r--dbaccess/source/ui/browser/unodatbr.cxx207
-rw-r--r--dbaccess/source/ui/inc/browserids.hxx11
-rw-r--r--dbaccess/source/ui/inc/unodatbr.hxx16
4 files changed, 131 insertions, 298 deletions
diff --git a/dbaccess/source/ui/browser/sbabrw.src b/dbaccess/source/ui/browser/sbabrw.src
index 69208b03eea2..a20aa665b48c 100644
--- a/dbaccess/source/ui/browser/sbabrw.src
+++ b/dbaccess/source/ui/browser/sbabrw.src
@@ -2,9 +2,9 @@
*
* $RCSfile: sbabrw.src,v $
*
- * $Revision: 1.75 $
+ * $Revision: 1.76 $
*
- * last change: $Author: vg $ $Date: 2002-06-11 12:33:57 $
+ * last change: $Author: oj $ $Date: 2002-07-09 07:46:43 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -817,10 +817,8 @@ Menu MENU_BROWSER_BOOKMARKCONTEXT
{
MID_LINK_EDIT
};
- MenuItem
- {
- MID_LINK_DROP
- };
+ MenuItem { ITEM_EDIT_DELETE };
+
MenuItem
{
Separator = TRUE;
@@ -867,66 +865,9 @@ Menu MENU_BROWSER_QUERYCONTEXT
Separator = TRUE;
};
MenuItem { MID_RENAME_ENTRY };
- MenuItem
- {
- MID_QUERY_DROP
- };
- MenuItem
- {
- Identifier = ID_TREE_QUERY_COPY ;
- HelpId = HID_BROWSER_QUERY_COPY ;
- Text = "Abfrage ~kopieren" ;
- Text [ english ] = "c~opy query" ;
- Text [ english_us ] = "C~opy Query" ;
- Text[ portuguese ] = "~Copiar consulta";
- Text[ russian ] = "~ ";
- Text[ greek ] = " ";
- Text[ dutch ] = "query k~opiren";
- Text[ french ] = "C~opier la requte";
- Text[ spanish ] = "Copiar co~nsulta";
- Text[ italian ] = "~Copia ricerca";
- Text[ danish ] = "c~opy query";
- Text[ swedish ] = "~Kopiera skning";
- Text[ polish ] = "K~opiuj kwerend";
- Text[ portuguese_brazilian ] = "c~opy query";
- Text[ japanese ] = "クエリーのコピー(~O)";
- Text[ korean ] = "질의 복사(~O)";
- Text[ chinese_simplified ] = "复制查询(~O)";
- Text[ chinese_traditional ] = "複製查詢(~O)";
- Text[ turkish ] = "c~opy query";
- Text[ arabic ] = " ";
- Text[ finnish ] = "K~opioi kysely";
- Text[ catalan ] = "C~opia la consulta";
- Text[ thai ] = "~คัดลอกแบบสอบถาม";
- };
- MenuItem
- {
- Identifier = ID_TREE_QUERY_PASTE ;
- HelpId = HID_BROWSER_QUERY_PASTE ;
- Text = "Abfrage e~infgen..." ;
- Text [ english ] = "~insert query..." ;
- Text [ english_us ] = "~Paste Query..." ;
- Text[ portuguese ] = "~Inserir consulta...";
- Text[ russian ] = "~ ...";
- Text[ greek ] = "~Insert Query...";
- Text[ dutch ] = "Qu~ery invoegen...";
- Text[ french ] = "~Insrer une requte...";
- Text[ spanish ] = "~Insertar consulta...";
- Text[ finnish ] = "~Insert Query...";
- Text[ italian ] = "~Inserisci ricerca...";
- Text[ danish ] = "~Insert Query...";
- Text[ swedish ] = "~Infoga skning...";
- Text[ polish ] = "~Wstaw kwerend...";
- Text[ portuguese_brazilian ] = "~Insert Query...";
- Text[ japanese ] = "クエリーの挿入(~P)...";
- Text[ korean ] = "질의 붙여넣기(~P)...";
- Text[ chinese_simplified ] = "插入查询(~P)...";
- Text[ chinese_traditional ] = "插入查詢(~P)...";
- Text[ turkish ] = "~Insert Query...";
- Text[ arabic ] = "~Insert Query...";
- Text[ catalan ] = "~Inserta una consulta...";
- Text[ thai ] = "~วางแบบสอบถาม...";
- };
+ MenuItem { ITEM_EDIT_DELETE };
+ MenuItem { ITEM_EDIT_COPY };
+ MenuItem { ITEM_EDIT_PASTE };
};
};
@@ -943,64 +884,11 @@ Menu MENU_BROWSER_TABLECONTEXT
{
Separator = TRUE;
};
- MenuItem { MID_DROP_TABLE };
+ MenuItem { ITEM_EDIT_DELETE };
MenuItem { MID_RENAME_ENTRY };
- MenuItem
- {
- Identifier = ID_TREE_TABLE_COPY ;
- HelpId = HID_BROWSER_TABLE_COPY ;
- Text = "Tabelle ~kopieren" ;
- Text [ english ] = "c~opy table" ;
- Text [ english_us ] = "C~opy Table" ;
- Text[ portuguese ] = "~Copiar tabela";
- Text[ russian ] = "~ ";
- Text[ greek ] = " ~";
- Text[ dutch ] = "tabel ~kopiren";
- Text[ french ] = "~Copier la table";
- Text[ spanish ] = "C~opiar tabla";
- Text[ italian ] = "~Copia tabella";
- Text[ danish ] = "c~opy table";
- Text[ swedish ] = "~Kopiera tabell";
- Text[ polish ] = "~Kopiuj tabel";
- Text[ portuguese_brazilian ] = "c~opy table";
- Text[ japanese ] = "テーブルのコピー(~O)";
- Text[ korean ] = "시트 복사(~O)";
- Text[ chinese_simplified ] = "复制表格(~O)";
- Text[ chinese_traditional ] = "複製表格(~O)";
- Text[ turkish ] = "c~opy table";
- Text[ arabic ] = " ";
- Text[ finnish ] = "K~opioi taulukko";
- Text[ catalan ] = "C~opia la taula";
- Text[ thai ] = "~คัดลอกตาราง";
- };
- MenuItem
- {
- Identifier = ID_TREE_TABLE_PASTE ;
- HelpId = HID_BROWSER_TABLE_PASTE ;
- Text = "Tabelle e~infgen..." ;
- Text [ english ] = "~insert table..." ;
- Text [ english_us ] = "~Paste Table..." ;
- Text[ portuguese ] = "~Inserir tabela...";
- Text[ russian ] = "~ ...";
- Text[ greek ] = "~ ...";
- Text[ dutch ] = "Tabel ~invoegen...";
- Text[ french ] = "~Insrer une table...";
- Text[ spanish ] = "~Insertar tabla";
- Text[ finnish ] = "~Lis taulukko";
- Text[ italian ] = "~Inserisci tabella...";
- Text[ danish ] = "~insert table";
- Text[ swedish ] = "Kl~istra in tabell...";
- Text[ polish ] = "~Wstaw tabel...";
- Text[ portuguese_brazilian ] = "~insert table";
- Text[ japanese ] = "テーブルの挿入(~P)";
- Text[ korean ] = "시트 붙여넣기(~P)";
- Text[ chinese_simplified ] = "插入表格(~P)...";
- Text[ chinese_traditional ] = "插入表格(~P)...";
- Text[ turkish ] = "~insert table";
- Text[ arabic ] = " ...";
- Text[ catalan ] = "~Insereix la taula";
- Text[ thai ] = "แ~ทรกตาราง";
- };
+ MenuItem { ITEM_EDIT_COPY };
+ MenuItem { ITEM_EDIT_PASTE };
+
MenuItem
{
Separator = TRUE;
@@ -1047,64 +935,11 @@ Menu MENU_BROWSER_VIEWCONTEXT
{
Separator = TRUE;
};
- MenuItem { MID_DBAUI_DROP_VIEW };
+ MenuItem { ITEM_EDIT_DELETE };
MenuItem { MID_RENAME_ENTRY };
- MenuItem
- {
- Identifier = ID_TREE_VIEW_COPY ;
- HelpId = HID_BROWSER_VIEW_COPY ;
- Text = "Ansicht ~kopieren" ;
- Text [ english ] = "c~opy view" ;
- Text [ english_us ] = "C~opy View" ;
- Text[ portuguese ] = "C~opiar vista";
- Text[ russian ] = " ";
- Text[ greek ] = " ";
- Text[ dutch ] = "Beeld ~kopiren";
- Text[ french ] = "C~opier la vue";
- Text[ spanish ] = "Copiar ~visualizacin";
- Text[ finnish ] = "K~opioi nkym";
- Text[ italian ] = "Copia vista";
- Text[ danish ] = "C~opy View";
- Text[ swedish ] = "~Kopiera vy";
- Text[ polish ] = "~Kopiuj widok";
- Text[ portuguese_brazilian ] = "C~opy View";
- Text[ japanese ] = "ビューのコピー(~O)";
- Text[ korean ] = "보기 복사(~O)";
- Text[ chinese_simplified ] = "复制视图(~O)";
- Text[ chinese_traditional ] = "複製檢視(~O)";
- Text[ turkish ] = "C~opy View";
- Text[ arabic ] = "C~opy View";
- Text[ catalan ] = "C~opia la vista";
- Text[ thai ] = "~คัดลอกมุมมอง";
- };
- MenuItem
- {
- Identifier = ID_TREE_VIEW_PASTE ;
- HelpId = HID_BROWSER_VIEW_PASTE ;
- Text = "Ansicht e~infgen" ;
- Text [ english ] = "~insert view" ;
- Text [ english_us ] = "~Paste View" ;
- Text[ portuguese ] = "~Inserir vista";
- Text[ russian ] = " ";
- Text[ greek ] = "~ ";
- Text[ dutch ] = "~Beeld invoegen";
- Text[ french ] = "~Insrer une vue";
- Text[ spanish ] = "~Insertar visualizacin";
- Text[ finnish ] = "~Lis nkym";
- Text[ italian ] = "~Inserisci vista";
- Text[ danish ] = "~Insert View";
- Text[ swedish ] = "Kl~istra in vy";
- Text[ polish ] = "~Wstaw widok";
- Text[ portuguese_brazilian ] = "~Insert View";
- Text[ japanese ] = "ビューの挿入(~P)";
- Text[ korean ] = "보기 붙여넣기(~P)";
- Text[ chinese_simplified ] = "插入视图(~P)";
- Text[ chinese_traditional ] = "貼上檢視(~P)";
- Text[ turkish ] = "~Insert View";
- Text[ arabic ] = "~Insert View";
- Text[ catalan ] = "~Insereix la vista";
- Text[ thai ] = "แ~ทรกมุมมอง";
- };
+ MenuItem { ITEM_EDIT_COPY };
+ MenuItem { ITEM_EDIT_PASTE };
+
MenuItem
{
Separator = TRUE;
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index 9c4e8b7224b5..bcd2d7666916 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: unodatbr.cxx,v $
*
- * $Revision: 1.136 $
+ * $Revision: 1.137 $
*
- * last change: $Author: oj $ $Date: 2002-07-08 08:11:21 $
+ * last change: $Author: oj $ $Date: 2002-07-09 07:46:42 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -3722,10 +3722,9 @@ sal_Bool SbaTableQueryBrowser::requestContextMenu( const CommandEvent& _rEvent )
{
// 1.2 pasting tables
sal_Bool bPasteAble = isTableFormat();
- aContextMenu.EnableItem(ID_TREE_TABLE_PASTE, bIsConnectionWriteAble && bPasteAble);
+ aContextMenu.EnableItem(SID_PASTE, bIsConnectionWriteAble && bPasteAble);
sal_Bool bRenameAllowed = sal_False,
- bDropAllowed = sal_False,
bSelectAllowed = sal_False;
if(bIsConnectionWriteAble)
{
@@ -3738,9 +3737,8 @@ sal_Bool SbaTableQueryBrowser::requestContextMenu( const CommandEvent& _rEvent )
{
Reference<XPropertySet> xProp(pData->xObject,UNO_QUERY);
sal_Int32 nPrivileges = 0;
- if(xProp.is())
+ if ( xProp.is() )
xProp->getPropertyValue(PROPERTY_PRIVILEGES) >>= nPrivileges;
- bDropAllowed = (Privilege::DROP & nPrivileges) == Privilege::DROP;
bSelectAllowed = (Privilege::SELECT & nPrivileges) == Privilege::SELECT;
}
catch(SQLException&)
@@ -3750,9 +3748,9 @@ sal_Bool SbaTableQueryBrowser::requestContextMenu( const CommandEvent& _rEvent )
}
// 1.3 actions on existing tables
aContextMenu.EnableItem(ID_EDIT_TABLE, etTable == eType && bIsConnectionWriteAble && bSelectAllowed);
- aContextMenu.EnableItem(ID_DROP_TABLE, etTable == eType && bIsConnectionWriteAble && bDropAllowed);
+ aContextMenu.EnableItem(SID_DELETE, etTable == eType && bIsConnectionWriteAble);
aContextMenu.EnableItem(ID_RENAME_ENTRY, etTable == eType && bIsConnectionWriteAble && bRenameAllowed);
- aContextMenu.EnableItem(ID_TREE_TABLE_COPY, etTable == eType);
+ aContextMenu.EnableItem(SID_COPY, etTable == eType);
// these have to be disabled if the connection is readonly
if(!bIsConnectionWriteAble)
{
@@ -3766,12 +3764,12 @@ sal_Bool SbaTableQueryBrowser::requestContextMenu( const CommandEvent& _rEvent )
{
// 2.2 pasting tables
sal_Bool bPasteAble = isTableFormat();
- aContextMenu.EnableItem(ID_TREE_VIEW_PASTE, bIsConnectionWriteAble && bPasteAble);
+ aContextMenu.EnableItem(SID_PASTE, bIsConnectionWriteAble && bPasteAble);
// 2.3 actions on existing tables
- aContextMenu.EnableItem(ID_DROP_VIEW, bIsConnectionWriteAble);
+ aContextMenu.EnableItem(SID_DELETE, bIsConnectionWriteAble);
aContextMenu.EnableItem(ID_RENAME_ENTRY, bIsConnectionWriteAble);
- aContextMenu.EnableItem(ID_TREE_VIEW_COPY, sal_True);
+ aContextMenu.EnableItem(SID_COPY, sal_True);
// these have to be disabled if the connection is readonly
if(!bIsConnectionWriteAble)
@@ -3788,11 +3786,11 @@ sal_Bool SbaTableQueryBrowser::requestContextMenu( const CommandEvent& _rEvent )
{
TransferableDataHelper aTransferData(TransferableDataHelper::CreateFromSystemClipboard(getView()));
sal_Bool bPasteAble = aTransferData.HasFormat(SOT_FORMATSTR_ID_DBACCESS_QUERY);
- aContextMenu.EnableItem(ID_TREE_QUERY_PASTE, bPasteAble);
+ aContextMenu.EnableItem(SID_PASTE, bPasteAble);
// 3.2 actions on existing queries
aContextMenu.EnableItem(ID_EDIT_QUERY_DESIGN, etQuery == eType);
- aContextMenu.EnableItem(ID_DROP_QUERY, etQuery == eType);
- aContextMenu.EnableItem(ID_TREE_QUERY_COPY, etQuery == eType);
+ aContextMenu.EnableItem(SID_DELETE, etQuery == eType);
+ aContextMenu.EnableItem(SID_COPY, etQuery == eType);
aContextMenu.EnableItem(ID_RENAME_ENTRY, etQuery == eType);
}
break;
@@ -3802,7 +3800,7 @@ sal_Bool SbaTableQueryBrowser::requestContextMenu( const CommandEvent& _rEvent )
case etBookmark:
{
aContextMenu.EnableItem(ID_EDIT_LINK, etBookmark == eType);
- aContextMenu.EnableItem(ID_DROP_LINK, etBookmark == eType);
+ aContextMenu.EnableItem(SID_DELETE, etBookmark == eType);
aContextMenu.EnableItem(ID_OPEN_DOCUMENT, etBookmark == eType);
aContextMenu.EnableItem(ID_EDIT_DOCUMENT, etBookmark == eType);
@@ -3866,31 +3864,30 @@ sal_Bool SbaTableQueryBrowser::requestContextMenu( const CommandEvent& _rEvent )
implCreateObject( pEntry, nPos );
break;
- case ID_DROP_QUERY:
- implRemoveQuery( pEntry );
- break;
-
- case ID_DROP_TABLE:
- case ID_DROP_VIEW:
- implDropTable( pEntry );
+ case SID_DELETE:
+ switch ( eType )
+ {
+ case etBookmark:
+ handleLinkContextMenu(ID_DROP_LINK,pEntry,eType,pDSEntry);
+ break;
+ case etQuery:
+ implRemoveQuery( pEntry );
+ break;
+ case etView:
+ case etTable:
+ implDropTable( pEntry );
+ break;
+ default:
+ OSL_ENSURE(0,"Illegal type for delete!");
+ }
break;
case ID_RENAME_ENTRY:
implRenameEntry(pEntry);
break;
- case ID_TREE_QUERY_COPY:
+ case SID_COPY:
{
- TransferableHelper* pTransfer = implCopyObject( pEntry, CommandType::QUERY );
- Reference< XTransferable> aEnsureDelete = pTransfer;
- if (pTransfer)
- pTransfer->CopyToClipboard(getView());
- }
- break;
-
- case ID_TREE_TABLE_COPY:
- case ID_TREE_VIEW_COPY:
- {
- TransferableHelper* pTransfer = implCopyObject( pEntry, CommandType::TABLE );
+ TransferableHelper* pTransfer = implCopyObject( pEntry, (etQuery == eType) ? CommandType::QUERY : CommandType::TABLE );
Reference< XTransferable> aEnsureDelete = pTransfer;
if (pTransfer)
@@ -3898,18 +3895,13 @@ sal_Bool SbaTableQueryBrowser::requestContextMenu( const CommandEvent& _rEvent )
}
break;
- case ID_TREE_QUERY_PASTE:
- {
- TransferableDataHelper aTransferData(TransferableDataHelper::CreateFromSystemClipboard(getView()));
- implPasteQuery( pEntry, ODataAccessObjectTransferable::extractObjectDescriptor(aTransferData) );
- }
- break;
-
- case ID_TREE_TABLE_PASTE:
- case ID_TREE_VIEW_PASTE:
+ case SID_PASTE:
{
TransferableDataHelper aTransferData(TransferableDataHelper::CreateFromSystemClipboard(getView()));
- implPasteTable( pEntry, aTransferData );
+ if ( etQuery == eType )
+ implPasteQuery( pEntry, ODataAccessObjectTransferable::extractObjectDescriptor(aTransferData) );
+ else
+ implPasteTable( pEntry, aTransferData );
}
break;
@@ -3917,90 +3909,91 @@ sal_Bool SbaTableQueryBrowser::requestContextMenu( const CommandEvent& _rEvent )
case ID_OPEN_DOCUMENT:
case ID_EDIT_DOCUMENT:
case ID_EDIT_LINK:
- case ID_DROP_LINK:
case ID_FORM_NEW_TEXT:
case ID_FORM_NEW_CALC:
case ID_FORM_NEW_IMPRESS:
case ID_FORM_NEW_PILOT:
case ID_FORM_NEW_TEMPLATE:
- {
- // get the container of the bookmarks
- SvLBoxEntry* pContainer = isContainer(pEntry) ? pEntry : m_pTreeView->getListBox()->GetParent(pEntry);
- if (!ensureEntryObject(pContainer))
- break;
+ handleLinkContextMenu(nPos,pEntry,eType,pDSEntry);
+ break;
+ }
- String sSelectedObject = GetEntryText(pEntry);
+ return sal_True; // handled
+}
+// -----------------------------------------------------------------------------
+void SbaTableQueryBrowser::handleLinkContextMenu(USHORT _nPos,SvLBoxEntry* pEntry,EntryType eType,SvLBoxEntry* pDSEntry)
+{
+ // get the container of the bookmarks
+ SvLBoxEntry* pContainer = isContainer(pEntry) ? pEntry : m_pTreeView->getListBox()->GetParent(pEntry);
+ if (!ensureEntryObject(pContainer))
+ return;
- DBTreeListModel::DBTreeListUserData* pContainerData = static_cast<DBTreeListModel::DBTreeListUserData*>(pContainer->GetUserData());
- Reference< XNameAccess > xBookmarks(pContainerData->xObject, UNO_QUERY);
+ String sSelectedObject = GetEntryText(pEntry);
- OLinkedDocumentsAccess aHelper(getView(), getORB(), xBookmarks);
+ DBTreeListModel::DBTreeListUserData* pContainerData = static_cast<DBTreeListModel::DBTreeListUserData*>(pContainer->GetUserData());
+ Reference< XNameAccess > xBookmarks(pContainerData->xObject, UNO_QUERY);
- switch (nPos)
- {
- case ID_NEW_LINK:
- aHelper.addLinkUI();
- break;
+ OLinkedDocumentsAccess aHelper(getView(), getORB(), xBookmarks);
- case ID_OPEN_DOCUMENT:
- aHelper.open(sSelectedObject, sal_True);
- break;
+ switch (_nPos)
+ {
+ case ID_NEW_LINK:
+ aHelper.addLinkUI();
+ break;
- case ID_EDIT_DOCUMENT:
- aHelper.open(sSelectedObject, sal_False);
- break;
+ case ID_OPEN_DOCUMENT:
+ aHelper.open(sSelectedObject, sal_True);
+ break;
- case ID_EDIT_LINK:
- {
- ::rtl::OUString sNewName, sNewLocation;
- aHelper.edit(sSelectedObject, sNewName, sNewLocation);
- }
- break;
+ case ID_EDIT_DOCUMENT:
+ aHelper.open(sSelectedObject, sal_False);
+ break;
- case ID_DROP_LINK:
- aHelper.drop(sSelectedObject);
- break;
+ case ID_EDIT_LINK:
+ {
+ ::rtl::OUString sNewName, sNewLocation;
+ aHelper.edit(sSelectedObject, sNewName, sNewLocation);
+ }
+ break;
- case ID_FORM_NEW_TEXT:
- case ID_FORM_NEW_CALC:
- case ID_FORM_NEW_IMPRESS:
- case ID_FORM_NEW_TEMPLATE:
- aHelper.newForm(nPos);
- break;
+ case ID_DROP_LINK:
+ aHelper.drop(sSelectedObject);
+ break;
- case ID_FORM_NEW_PILOT:
- {
- // the type of the object to initially select
- sal_Int32 nObjectType = -1;
- if (etTable == eType)
- nObjectType = CommandType::TABLE;
- else if (etQuery == eType)
- nObjectType = CommandType::QUERY;
-
- // the object name
- String sObjectName;
- if (-1 != nObjectType)
- sObjectName = GetEntryText(pEntry);
-
- // the connection
- Reference< XConnection > xConn;
- if (ensureConnection(pEntry, xConn))
- aHelper.newFormWithPilot(GetEntryText(pDSEntry), nObjectType, sObjectName, xConn);
- }
- break;
+ case ID_FORM_NEW_TEXT:
+ case ID_FORM_NEW_CALC:
+ case ID_FORM_NEW_IMPRESS:
+ case ID_FORM_NEW_TEMPLATE:
+ aHelper.newForm(_nPos);
+ break;
- default:
- DBG_ERROR("SbaTableQueryBrowser::requestContextMenu: invalid menu id!");
- break;
- }
+ case ID_FORM_NEW_PILOT:
+ {
+ // the type of the object to initially select
+ sal_Int32 nObjectType = -1;
+ if (etTable == eType)
+ nObjectType = CommandType::TABLE;
+ else if (etQuery == eType)
+ nObjectType = CommandType::QUERY;
+
+ // the object name
+ String sObjectName;
+ if (-1 != nObjectType)
+ sObjectName = GetEntryText(pEntry);
+
+ // the connection
+ Reference< XConnection > xConn;
+ if (ensureConnection(pEntry, xConn))
+ aHelper.newFormWithPilot(GetEntryText(pDSEntry), nObjectType, sObjectName, xConn);
}
break;
- }
- return sal_True; // handled
+ default:
+ DBG_ERROR("SbaTableQueryBrowser::requestContextMenu: invalid menu id!");
+ break;
+ }
}
-
// -----------------------------------------------------------------------------
void SbaTableQueryBrowser::setDefaultTitle() const
{
diff --git a/dbaccess/source/ui/inc/browserids.hxx b/dbaccess/source/ui/inc/browserids.hxx
index dc868e5b22c0..b971b668f140 100644
--- a/dbaccess/source/ui/inc/browserids.hxx
+++ b/dbaccess/source/ui/inc/browserids.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: browserids.hxx,v $
*
- * $Revision: 1.25 $
+ * $Revision: 1.26 $
*
- * last change: $Author: fs $ $Date: 2002-05-22 12:31:34 $
+ * last change: $Author: oj $ $Date: 2002-07-09 07:44:34 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -110,9 +110,6 @@
#define ID_TREE_ADMINISTRATE 1
#define ID_TREE_CLOSE_CONN 2
#define ID_TREE_REBUILD_CONN 3
-#define ID_TREE_TABLE_COPY 4
-#define ID_TREE_QUERY_COPY 5
-#define ID_TREE_TABLE_PASTE 6
#define ID_TREE_RELATION_DESIGN 7
#define ID_TABLE_DESIGN_NO_CONNECTION 8
#define ID_OPEN_DOCUMENT 9
@@ -135,11 +132,7 @@
#define ID_EDIT_TABLE 26
#define ID_DROP_TABLE 27
#define ID_NEW_VIEW_DESIGN 28
-#define ID_DROP_VIEW 29
-#define ID_TREE_VIEW_COPY 30
-#define ID_TREE_VIEW_PASTE 31
#define ID_DIRECT_SQL 32
-#define ID_TREE_QUERY_PASTE 33
#define ID_BROWSER_REFRESH_REBUILD 34
#define ID_RENAME_ENTRY 35
#define ID_INDEX_NEW 36
diff --git a/dbaccess/source/ui/inc/unodatbr.hxx b/dbaccess/source/ui/inc/unodatbr.hxx
index 4497c830a26c..7180752ac3e8 100644
--- a/dbaccess/source/ui/inc/unodatbr.hxx
+++ b/dbaccess/source/ui/inc/unodatbr.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: unodatbr.hxx,v $
*
- * $Revision: 1.48 $
+ * $Revision: 1.49 $
*
- * last change: $Author: oj $ $Date: 2002-06-27 07:26:13 $
+ * last change: $Author: oj $ $Date: 2002-07-09 07:44:32 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -494,6 +494,18 @@ namespace dbaui
void clearGridColumns(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >& _xColContainer);
sal_Bool isHiContrast() const;
+
+ /** called to handle all entries in the context menu for bookmarks
+ @param _nPos
+ The entry in the context menu.
+ @param pEntry
+ The entry to wish the context menu should be handled.
+ @param eType
+ The type of pEntry.
+ @param pDSEntry
+ The root entry of pEntry.
+ */
+ void handleLinkContextMenu(USHORT _nPos,SvLBoxEntry* pEntry,EntryType eType,SvLBoxEntry* pDSEntry);
};
// .........................................................................