summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/browser
diff options
context:
space:
mode:
Diffstat (limited to 'dbaccess/source/ui/browser')
-rw-r--r--dbaccess/source/ui/browser/dsEntriesNoExp.cxx224
-rw-r--r--dbaccess/source/ui/browser/dsbrowserDnD.cxx11
-rw-r--r--dbaccess/source/ui/browser/makefile.mk9
-rw-r--r--dbaccess/source/ui/browser/sbagrid.cxx23
-rw-r--r--dbaccess/source/ui/browser/unodatbr.cxx145
5 files changed, 249 insertions, 163 deletions
diff --git a/dbaccess/source/ui/browser/dsEntriesNoExp.cxx b/dbaccess/source/ui/browser/dsEntriesNoExp.cxx
new file mode 100644
index 000000000000..3b8e71f77e1a
--- /dev/null
+++ b/dbaccess/source/ui/browser/dsEntriesNoExp.cxx
@@ -0,0 +1,224 @@
+/*************************************************************************
+ *
+ * $RCSfile: dsEntriesNoExp.cxx,v $
+ *
+ * $Revision: 1.1 $
+ *
+ * last change: $Author: oj $ $Date: 2001-09-20 12:57:49 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the License); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an AS IS basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SBA_UNODATBR_HXX_
+#include "unodatbr.hxx"
+#endif
+#ifndef DBACCESS_UI_BROWSER_ID_HXX
+#include "browserids.hxx"
+#endif
+#ifndef _DBAUI_LISTVIEWITEMS_HXX_
+#include "listviewitems.hxx"
+#endif
+#ifndef _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+#ifndef DBACCESS_UI_DBTREEVIEW_HXX
+#include "dbtreeview.hxx"
+#endif
+#ifndef DBAUI_DBTREELISTBOX_HXX
+#include "dbtreelistbox.hxx"
+#endif
+#ifndef _DBU_RESOURCE_HRC_
+#include "dbu_resource.hrc"
+#endif
+#ifndef DBAUI_DBTREEMODEL_HXX
+#include "dbtreemodel.hxx"
+#endif
+
+using namespace ::dbtools;
+using namespace ::svx;
+
+// .........................................................................
+namespace dbaui
+{
+// .........................................................................
+// -----------------------------------------------------------------------------
+SbaTableQueryBrowser::EntryType SbaTableQueryBrowser::getChildType( SvLBoxEntry* _pEntry )
+{
+ DBG_ASSERT(isContainer(_pEntry), "SbaTableQueryBrowser::getChildType: invalid entry!");
+ switch (getEntryType(_pEntry))
+ {
+ case etTableContainer:
+ return etTable;
+ case etQueryContainer:
+ return etQuery;
+ case etBookmarkContainer:
+ return etBookmark;
+ }
+ return etUnknown;
+}
+
+// -----------------------------------------------------------------------------
+String SbaTableQueryBrowser::GetEntryText( SvLBoxEntry* _pEntry )
+{
+ return m_pTreeView->getListBox()->GetEntryText(_pEntry);
+}
+
+// -----------------------------------------------------------------------------
+SbaTableQueryBrowser::EntryType SbaTableQueryBrowser::getEntryType( SvLBoxEntry* _pEntry )
+{
+ if (!_pEntry)
+ return etUnknown;
+
+ SvLBoxEntry* pRootEntry = m_pTreeView->getListBox()->GetRootLevelParent(_pEntry);
+ SvLBoxEntry* pEntryParent = m_pTreeView->getListBox()->GetParent(_pEntry);
+ SvLBoxEntry* pTables = m_pTreeView->getListBox()->GetEntry(pRootEntry, CONTAINER_TABLES);
+ SvLBoxEntry* pQueries = m_pTreeView->getListBox()->GetEntry(pRootEntry, CONTAINER_QUERIES);
+ SvLBoxEntry* pBookmarks = m_pTreeView->getListBox()->GetEntry(pRootEntry, CONTAINER_BOOKMARKS);
+
+#ifdef DBG_UTIL
+ String sTest;
+ if (pTables) sTest = m_pTreeView->getListBox()->GetEntryText(pTables);
+ if (pQueries) sTest = m_pTreeView->getListBox()->GetEntryText(pQueries);
+ if (pBookmarks) sTest = m_pTreeView->getListBox()->GetEntryText(pBookmarks);
+#endif
+
+ if (pRootEntry == _pEntry)
+ return etDatasource;
+
+ if (pTables == _pEntry)
+ return etTableContainer;
+
+ if (pQueries == _pEntry)
+ return etQueryContainer;
+
+ if (pBookmarks == _pEntry)
+ return etBookmarkContainer;
+
+ if (pTables == pEntryParent)
+ return etTable;
+
+ if (pQueries == pEntryParent)
+ return etQuery;
+
+ if (pBookmarks == pEntryParent)
+ return etBookmark;
+
+ return etUnknown;
+}
+//------------------------------------------------------------------------------
+void SbaTableQueryBrowser::select(SvLBoxEntry* _pEntry, sal_Bool _bSelect)
+{
+ SvLBoxItem* pTextItem = _pEntry ? _pEntry->GetFirstItem(SV_ITEM_ID_BOLDLBSTRING) : NULL;
+ if (pTextItem)
+ {
+ static_cast<OBoldListboxString*>(pTextItem)->emphasize(_bSelect);
+ m_pTreeModel->InvalidateEntry(_pEntry);
+ }
+ else
+ DBG_ERROR("SbaTableQueryBrowser::select: invalid entry!");
+}
+
+//------------------------------------------------------------------------------
+void SbaTableQueryBrowser::selectPath(SvLBoxEntry* _pEntry, sal_Bool _bSelect)
+{
+ while (_pEntry)
+ {
+ select(_pEntry, _bSelect);
+ _pEntry = m_pTreeModel->GetParent(_pEntry);
+ }
+}
+//------------------------------------------------------------------------------
+sal_Bool SbaTableQueryBrowser::isSelected(SvLBoxEntry* _pEntry) const
+{
+ SvLBoxItem* pTextItem = _pEntry ? _pEntry->GetFirstItem(SV_ITEM_ID_BOLDLBSTRING) : NULL;
+ if (pTextItem)
+ return static_cast<OBoldListboxString*>(pTextItem)->isEmphasized();
+ else
+ DBG_ERROR("SbaTableQueryBrowser::isSelected: invalid entry!");
+ return sal_False;
+}
+//------------------------------------------------------------------------------
+void SbaTableQueryBrowser::AddSupportedFeatures()
+{
+ SbaXDataBrowserController::AddSupportedFeatures();
+
+ m_aSupportedFeatures[ ::rtl::OUString::createFromAscii(".uno:Title")] = ID_BROWSER_TITLE;
+ m_aSupportedFeatures[ ::rtl::OUString::createFromAscii(".uno:DataSourceBrowser/FormLetter")] = ID_BROWSER_FORMLETTER;
+ m_aSupportedFeatures[ ::rtl::OUString::createFromAscii(".uno:DataSourceBrowser/InsertColumns")] = ID_BROWSER_INSERTCOLUMNS;
+ m_aSupportedFeatures[ ::rtl::OUString::createFromAscii(".uno:DataSourceBrowser/InsertContent")] = ID_BROWSER_INSERTCONTENT;
+ m_aSupportedFeatures[ ::rtl::OUString::createFromAscii(".uno:DataSourceBrowser/ToggleExplore")] = ID_BROWSER_EXPLORER;
+ m_aSupportedFeatures[ ::rtl::OUString::createFromAscii(".uno:DataSourceBrowser/DocumentDataSource")] = ID_BROWSER_DOCUMENT_DATASOURCE;
+
+ // TODO reenable our own code if we really have a handling for the formslots
+// ControllerFeature( ::rtl::OUString::createFromAscii("private:FormSlot/moveToFirst"), SID_FM_RECORD_FIRST ),
+// ControllerFeature( ::rtl::OUString::createFromAscii("private:FormSlot/moveToLast"), SID_FM_RECORD_LAST ),
+// ControllerFeature( ::rtl::OUString::createFromAscii("private:FormSlot/moveToNew"), SID_FM_RECORD_NEW ),
+// ControllerFeature( ::rtl::OUString::createFromAscii("private:FormSlot/moveToNext"), SID_FM_RECORD_NEXT ),
+// ControllerFeature( ::rtl::OUString::createFromAscii("private:FormSlot/moveToPrev"), SID_FM_RECORD_PREV )
+
+}
+// -------------------------------------------------------------------------
+String SbaTableQueryBrowser::getURL() const
+{
+ return String();
+}
+//------------------------------------------------------------------------------
+ToolBox* SbaTableQueryBrowser::CreateToolBox(Window* _pParent)
+{
+ return new ToolBox( _pParent, ModuleRes( RID_BRW_QRY_TOOLBOX ) );
+}
+
+// .........................................................................
+} // namespace dbaui
+// .........................................................................
+
diff --git a/dbaccess/source/ui/browser/dsbrowserDnD.cxx b/dbaccess/source/ui/browser/dsbrowserDnD.cxx
index 13f29d2521c6..19107812f01b 100644
--- a/dbaccess/source/ui/browser/dsbrowserDnD.cxx
+++ b/dbaccess/source/ui/browser/dsbrowserDnD.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: dsbrowserDnD.cxx,v $
*
- * $Revision: 1.27 $
+ * $Revision: 1.28 $
*
- * last change: $Author: oj $ $Date: 2001-08-27 06:57:24 $
+ * last change: $Author: oj $ $Date: 2001-09-20 12:56:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -858,9 +858,11 @@ namespace dbaui
break;
case DataType::DECIMAL:
case DataType::NUMERIC:
- case DataType::BIGINT:
xParameter->setDouble(nPos,xRow->getDouble(i));
break;
+ case DataType::BIGINT:
+ xParameter->setLong(nPos,xRow->getLong(i));
+ break;
case DataType::FLOAT:
xParameter->setFloat(nPos,xRow->getFloat(i));
break;
@@ -1076,6 +1078,9 @@ namespace dbaui
/*************************************************************************
* history:
* $Log: not supported by cvs2svn $
+ * Revision 1.27 2001/08/27 06:57:24 oj
+ * #90015# some speedup's
+ *
* Revision 1.26 2001/08/24 06:31:34 oj
* #90015# code corrcetions for some speedup's
*
diff --git a/dbaccess/source/ui/browser/makefile.mk b/dbaccess/source/ui/browser/makefile.mk
index 6715adb3bfae..bbff079235ce 100644
--- a/dbaccess/source/ui/browser/makefile.mk
+++ b/dbaccess/source/ui/browser/makefile.mk
@@ -2,9 +2,9 @@
#
# $RCSfile: makefile.mk,v $
#
-# $Revision: 1.9 $
+# $Revision: 1.10 $
#
-# last change: $Author: vg $ $Date: 2001-08-30 15:07:14 $
+# last change: $Author: oj $ $Date: 2001-09-20 12:56:17 $
#
# The Contents of this file are made available subject to the terms of
# either of the following licenses
@@ -72,7 +72,6 @@ IMGLST_SRS=$(SRS)$/$(TARGET).srs
# --- Files --------------------------------------------------------
EXCEPTIONSFILES=\
- $(SLO)$/dbtreemodel.obj \
$(SLO)$/dsbrowserDnD.obj \
$(SLO)$/dataview.obj \
$(SLO)$/genericcontroller.obj \
@@ -90,7 +89,9 @@ EXCEPTIONSFILES=\
SLOFILES =\
$(EXCEPTIONSFILES)\
- $(SLO)$/AsyncronousLink.obj
+ $(SLO)$/dsEntriesNoExp.obj \
+ $(SLO)$/dbtreemodel.obj \
+ $(SLO)$/AsyncronousLink.obj
SRCFILES = sbabrw.src \
sbagrid.src
diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx
index fe0552be5526..ecfd43a9545a 100644
--- a/dbaccess/source/ui/browser/sbagrid.cxx
+++ b/dbaccess/source/ui/browser/sbagrid.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: sbagrid.cxx,v $
*
- * $Revision: 1.47 $
+ * $Revision: 1.48 $
*
- * last change: $Author: hr $ $Date: 2001-09-13 14:15:52 $
+ * last change: $Author: oj $ $Date: 2001-09-20 12:56:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -259,6 +259,9 @@
#ifndef _VCL_STDTEXT_HXX
#include <vcl/stdtext.hxx>
#endif
+#ifndef DBAUI_TOOLS_HXX
+#include "UITools.hxx"
+#endif
using namespace ::com::sun::star::ui::dialogs;
using namespace ::com::sun::star::uno;
@@ -1293,21 +1296,7 @@ void SbaGridControl::SetColAttrs(sal_uInt16 nColId)
// horizontal justify
SFX_ITEMSET_GET(*pSet, pHorJustify, SvxHorJustifyItem, SBA_ATTR_ALIGN_HOR_JUSTIFY, sal_True);
- SvxCellHorJustify eHorJustify = (SvxCellHorJustify)pHorJustify->GetValue();
- Any aTextAlign;
- switch (eHorJustify)
- {
- case SVX_HOR_JUSTIFY_LEFT:
- aTextAlign <<= (sal_Int16)::com::sun::star::awt::TextAlign::LEFT;
- break;
- case SVX_HOR_JUSTIFY_CENTER:
- aTextAlign <<= (sal_Int16)::com::sun::star::awt::TextAlign::CENTER;
- break;
- case SVX_HOR_JUSTIFY_RIGHT:
- aTextAlign <<= (sal_Int16)::com::sun::star::awt::TextAlign::RIGHT;
- break;
- }
- xAffectedCol->setPropertyValue(PROPERTY_ALIGN, aTextAlign);
+ xAffectedCol->setPropertyValue(PROPERTY_ALIGN, makeAny(dbaui::mapTextAllign((SvxCellHorJustify)pHorJustify->GetValue())));
// format key
if (nFlags & TP_ATTR_NUMBER)
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index 3093e00d2ed6..ffc339ecdbe7 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.107 $
+ * $Revision: 1.108 $
*
- * last change: $Author: oj $ $Date: 2001-09-19 13:20:12 $
+ * last change: $Author: oj $ $Date: 2001-09-20 12:56:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -759,9 +759,10 @@ sal_Bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun::
// ... the 'comment' property as helptext (will usually be shown as header-tooltip)
Any aDescription; aDescription <<= ::rtl::OUString();
- if(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_DESCRIPTION))
- aDescription <<= comphelper::getString(xColumn->getPropertyValue(PROPERTY_DESCRIPTION));
- xCurrentCol->setPropertyValue(PROPERTY_HELPTEXT, xColumn->getPropertyValue(PROPERTY_DESCRIPTION));
+ if(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_HELPTEXT))
+ aDescription <<= comphelper::getString(xColumn->getPropertyValue(PROPERTY_HELPTEXT));
+
+ xCurrentCol->setPropertyValue(PROPERTY_HELPTEXT, aDescription);
xColContainer->insertByName(*pBegin, makeAny(xCurrentCol));
}
@@ -776,13 +777,6 @@ sal_Bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun::
return sal_True;
}
-
-//------------------------------------------------------------------------------
-ToolBox* SbaTableQueryBrowser::CreateToolBox(Window* _pParent)
-{
- return new ToolBox( _pParent, ModuleRes( RID_BRW_QRY_TOOLBOX ) );
-}
-
// -----------------------------------------------------------------------------
Reference<XPropertySet> getColumnHelper(SvLBoxEntry* _pCurrentlyDisplayed,const Reference<XPropertySet>& _rxSource)
{
@@ -1388,12 +1382,6 @@ void SbaTableQueryBrowser::ColumnChanged()
}
SbaXDataBrowserController::ColumnChanged();
}
-
-// -------------------------------------------------------------------------
-String SbaTableQueryBrowser::getURL() const
-{
- return String();
-}
// -----------------------------------------------------------------------
void SbaTableQueryBrowser::InvalidateFeature(sal_uInt16 nId, const Reference< ::com::sun::star::frame::XStatusListener > & xListener)
{
@@ -1450,28 +1438,6 @@ void SbaTableQueryBrowser::LoadFinished(sal_Bool _bWasSynch)
while (aIter.hasMoreElements())
static_cast< XSelectionChangeListener* >(aIter.next())->selectionChanged(aEvt);
}
-
-//------------------------------------------------------------------------------
-void SbaTableQueryBrowser::AddSupportedFeatures()
-{
- SbaXDataBrowserController::AddSupportedFeatures();
-
- m_aSupportedFeatures[ ::rtl::OUString::createFromAscii(".uno:Title")] = ID_BROWSER_TITLE;
- m_aSupportedFeatures[ ::rtl::OUString::createFromAscii(".uno:DataSourceBrowser/FormLetter")] = ID_BROWSER_FORMLETTER;
- m_aSupportedFeatures[ ::rtl::OUString::createFromAscii(".uno:DataSourceBrowser/InsertColumns")] = ID_BROWSER_INSERTCOLUMNS;
- m_aSupportedFeatures[ ::rtl::OUString::createFromAscii(".uno:DataSourceBrowser/InsertContent")] = ID_BROWSER_INSERTCONTENT;
- m_aSupportedFeatures[ ::rtl::OUString::createFromAscii(".uno:DataSourceBrowser/ToggleExplore")] = ID_BROWSER_EXPLORER;
- m_aSupportedFeatures[ ::rtl::OUString::createFromAscii(".uno:DataSourceBrowser/DocumentDataSource")] = ID_BROWSER_DOCUMENT_DATASOURCE;
-
- // TODO reenable our own code if we really have a handling for the formslots
-// ControllerFeature( ::rtl::OUString::createFromAscii("private:FormSlot/moveToFirst"), SID_FM_RECORD_FIRST ),
-// ControllerFeature( ::rtl::OUString::createFromAscii("private:FormSlot/moveToLast"), SID_FM_RECORD_LAST ),
-// ControllerFeature( ::rtl::OUString::createFromAscii("private:FormSlot/moveToNew"), SID_FM_RECORD_NEW ),
-// ControllerFeature( ::rtl::OUString::createFromAscii("private:FormSlot/moveToNext"), SID_FM_RECORD_NEXT ),
-// ControllerFeature( ::rtl::OUString::createFromAscii("private:FormSlot/moveToPrev"), SID_FM_RECORD_PREV )
-
-}
-
//------------------------------------------------------------------------------
FeatureState SbaTableQueryBrowser::GetState(sal_uInt16 nId)
{
@@ -2115,41 +2081,6 @@ sal_Bool SbaTableQueryBrowser::ensureEntryObject( SvLBoxEntry* _pEntry )
return pEntryData->xObject.is();
}
-
-//------------------------------------------------------------------------------
-sal_Bool SbaTableQueryBrowser::isSelected(SvLBoxEntry* _pEntry) const
-{
- SvLBoxItem* pTextItem = _pEntry ? _pEntry->GetFirstItem(SV_ITEM_ID_BOLDLBSTRING) : NULL;
- if (pTextItem)
- return static_cast<OBoldListboxString*>(pTextItem)->isEmphasized();
- else
- DBG_ERROR("SbaTableQueryBrowser::isSelected: invalid entry!");
- return sal_False;
-}
-
-//------------------------------------------------------------------------------
-void SbaTableQueryBrowser::select(SvLBoxEntry* _pEntry, sal_Bool _bSelect)
-{
- SvLBoxItem* pTextItem = _pEntry ? _pEntry->GetFirstItem(SV_ITEM_ID_BOLDLBSTRING) : NULL;
- if (pTextItem)
- {
- static_cast<OBoldListboxString*>(pTextItem)->emphasize(_bSelect);
- m_pTreeModel->InvalidateEntry(_pEntry);
- }
- else
- DBG_ERROR("SbaTableQueryBrowser::select: invalid entry!");
-}
-
-//------------------------------------------------------------------------------
-void SbaTableQueryBrowser::selectPath(SvLBoxEntry* _pEntry, sal_Bool _bSelect)
-{
- while (_pEntry)
- {
- select(_pEntry, _bSelect);
- _pEntry = m_pTreeModel->GetParent(_pEntry);
- }
-}
-
//------------------------------------------------------------------------------
IMPL_LINK(SbaTableQueryBrowser, OnEntryDoubleClicked, SvLBoxEntry*, _pEntry)
{
@@ -3900,70 +3831,6 @@ sal_Bool SbaTableQueryBrowser::requestContextMenu( const CommandEvent& _rEvent )
return sal_True; // handled
}
-// -----------------------------------------------------------------------------
-SbaTableQueryBrowser::EntryType SbaTableQueryBrowser::getChildType( SvLBoxEntry* _pEntry )
-{
- DBG_ASSERT(isContainer(_pEntry), "SbaTableQueryBrowser::getChildType: invalid entry!");
- switch (getEntryType(_pEntry))
- {
- case etTableContainer:
- return etTable;
- case etQueryContainer:
- return etQuery;
- case etBookmarkContainer:
- return etBookmark;
- }
- return etUnknown;
-}
-
-// -----------------------------------------------------------------------------
-String SbaTableQueryBrowser::GetEntryText( SvLBoxEntry* _pEntry )
-{
- return m_pTreeView->getListBox()->GetEntryText(_pEntry);
-}
-
-// -----------------------------------------------------------------------------
-SbaTableQueryBrowser::EntryType SbaTableQueryBrowser::getEntryType( SvLBoxEntry* _pEntry )
-{
- if (!_pEntry)
- return etUnknown;
-
- SvLBoxEntry* pRootEntry = m_pTreeView->getListBox()->GetRootLevelParent(_pEntry);
- SvLBoxEntry* pEntryParent = m_pTreeView->getListBox()->GetParent(_pEntry);
- SvLBoxEntry* pTables = m_pTreeView->getListBox()->GetEntry(pRootEntry, CONTAINER_TABLES);
- SvLBoxEntry* pQueries = m_pTreeView->getListBox()->GetEntry(pRootEntry, CONTAINER_QUERIES);
- SvLBoxEntry* pBookmarks = m_pTreeView->getListBox()->GetEntry(pRootEntry, CONTAINER_BOOKMARKS);
-
-#ifdef DBG_UTIL
- String sTest;
- if (pTables) sTest = m_pTreeView->getListBox()->GetEntryText(pTables);
- if (pQueries) sTest = m_pTreeView->getListBox()->GetEntryText(pQueries);
- if (pBookmarks) sTest = m_pTreeView->getListBox()->GetEntryText(pBookmarks);
-#endif
-
- if (pRootEntry == _pEntry)
- return etDatasource;
-
- if (pTables == _pEntry)
- return etTableContainer;
-
- if (pQueries == _pEntry)
- return etQueryContainer;
-
- if (pBookmarks == _pEntry)
- return etBookmarkContainer;
-
- if (pTables == pEntryParent)
- return etTable;
-
- if (pQueries == pEntryParent)
- return etQuery;
-
- if (pBookmarks == pEntryParent)
- return etBookmark;
-
- return etUnknown;
-}
// -----------------------------------------------------------------------------
void SbaTableQueryBrowser::setDefaultTitle() const