[Libreoffice-commits] core.git: 2 commits - accessibility/source dbaccess/source include/vcl solenv/clang-format toolkit/source vcl/inc vcl/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Wed Aug 12 18:23:32 UTC 2020


 accessibility/source/extended/accessiblelistboxentry.cxx |    2 
 dbaccess/source/ui/app/AppController.cxx                 |    1 
 dbaccess/source/ui/app/AppDetailPageHelper.hxx           |    1 
 dbaccess/source/ui/browser/dbtreeview.cxx                |    5 
 dbaccess/source/ui/browser/dsEntriesNoExp.cxx            |    1 
 dbaccess/source/ui/browser/dsbrowserDnD.cxx              |    1 
 dbaccess/source/ui/browser/unodatbr.cxx                  |    2 
 dbaccess/source/ui/control/dbtreelistbox.cxx             |  475 ---------------
 dbaccess/source/ui/inc/dbtreelistbox.hxx                 |   87 --
 dbaccess/source/ui/inc/tabletree.hxx                     |   29 
 include/vcl/toolkit/svlbitm.hxx                          |    8 
 solenv/clang-format/excludelist                          |    2 
 toolkit/source/controls/tree/treecontrolpeer.cxx         |    2 
 vcl/inc/pch/precompiled_vcl.hxx                          |    5 
 vcl/source/app/salvtables.cxx                            |    2 
 vcl/source/treelist/svimpbox.cxx                         |    2 
 vcl/source/treelist/svlbitm.cxx                          |    2 
 vcl/source/treelist/svtabbx.cxx                          |    2 
 vcl/source/treelist/treelistbox.cxx                      |    2 
 vcl/source/treelist/uiobject.cxx                         |    2 
 20 files changed, 15 insertions(+), 618 deletions(-)

New commits:
commit 4ddafa14d70567a4e4581310a7cc83eafc1b776f
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Aug 10 21:11:30 2020 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Aug 12 20:22:57 2020 +0200

    svlbitm.hxx can be toolkit only now
    
    Change-Id: Ie5ad0febca0747fa66c2caede619d14e468da032
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100498
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/accessibility/source/extended/accessiblelistboxentry.cxx b/accessibility/source/extended/accessiblelistboxentry.cxx
index c742e454b16f..40729de1bcb8 100644
--- a/accessibility/source/extended/accessiblelistboxentry.cxx
+++ b/accessibility/source/extended/accessiblelistboxentry.cxx
@@ -21,7 +21,7 @@
 #include <extended/accessiblelistbox.hxx>
 #include <vcl/treelistbox.hxx>
 #include <svtools/stringtransfer.hxx>
-#include <vcl/svlbitm.hxx>
+#include <vcl/toolkit/svlbitm.hxx>
 #include <com/sun/star/awt/Rectangle.hpp>
 #include <com/sun/star/accessibility/AccessibleRelationType.hpp>
 #include <com/sun/star/accessibility/AccessibleRole.hpp>
diff --git a/include/vcl/svlbitm.hxx b/include/vcl/toolkit/svlbitm.hxx
similarity index 98%
rename from include/vcl/svlbitm.hxx
rename to include/vcl/toolkit/svlbitm.hxx
index abe2446ade11..e4e6fbc57a7d 100644
--- a/include/vcl/svlbitm.hxx
+++ b/include/vcl/toolkit/svlbitm.hxx
@@ -17,9 +17,11 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#pragma once
 
-#ifndef INCLUDED_VCL_SVLBITM_HXX
-#define INCLUDED_VCL_SVLBITM_HXX
+#if !defined(VCL_DLLIMPLEMENTATION) && !defined(TOOLKIT_DLLIMPLEMENTATION) && !defined(VCL_INTERNALS)
+#error "don't use this in new code"
+#endif
 
 #include <memory>
 #include <vcl/dllapi.h>
@@ -283,6 +285,4 @@ inline const Image& SvLBoxContextBmp::GetBitmap2() const
     return rImage;
 }
 
-#endif
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist
index 3d1ab7622220..e8fb15c70220 100644
--- a/solenv/clang-format/excludelist
+++ b/solenv/clang-format/excludelist
@@ -7410,7 +7410,6 @@ include/vcl/splitwin.hxx
 include/vcl/status.hxx
 include/vcl/stdtext.hxx
 include/vcl/svapp.hxx
-include/vcl/svlbitm.hxx
 include/vcl/svtaccessiblefactory.hxx
 include/vcl/syschild.hxx
 include/vcl/sysdata.hxx
@@ -7444,6 +7443,7 @@ include/vcl/toolkit/prgsbar.hxx
 include/vcl/toolkit/roadmap.hxx
 include/vcl/toolkit/spin.hxx
 include/vcl/toolkit/spinfld.hxx
+include/vcl/toolkit/svlbitm.hxx
 include/vcl/toolkit/svtabbx.hxx
 include/vcl/toolkit/tabdlg.hxx
 include/vcl/toolkit/throbber.hxx
diff --git a/toolkit/source/controls/tree/treecontrolpeer.cxx b/toolkit/source/controls/tree/treecontrolpeer.cxx
index cefb7d4762ea..00423e7a2a2f 100644
--- a/toolkit/source/controls/tree/treecontrolpeer.cxx
+++ b/toolkit/source/controls/tree/treecontrolpeer.cxx
@@ -38,7 +38,7 @@
 #include <vcl/treelistbox.hxx>
 #include <vcl/treelistentry.hxx>
 #include <vcl/viewdataentry.hxx>
-#include <vcl/svlbitm.hxx>
+#include <vcl/toolkit/svlbitm.hxx>
 
 #include <map>
 
diff --git a/vcl/inc/pch/precompiled_vcl.hxx b/vcl/inc/pch/precompiled_vcl.hxx
index b8c52378da0e..966e842b43bc 100644
--- a/vcl/inc/pch/precompiled_vcl.hxx
+++ b/vcl/inc/pch/precompiled_vcl.hxx
@@ -13,7 +13,7 @@
  manual changes will be rewritten by the next run of update_pch.sh (which presumably
  also fixes all possible problems, so it's usually better to use it).
 
- Generated on 2020-07-23 15:08:45 using:
+ Generated on 2020-08-10 21:11:12 using:
  ./bin/update_pch vcl vcl --cutoff=6 --exclude:system --include:module --include:local
 
  If after updating build fails, use the following command to locate conflicting headers:
@@ -205,7 +205,6 @@
 #include <svl/svldllapi.h>
 #include <svl/typedwhich.hxx>
 #include <test/outputdevice.hxx>
-#include <tools/UnitConversion.hxx>
 #include <tools/color.hxx>
 #include <tools/contnr.hxx>
 #include <tools/date.hxx>
@@ -309,7 +308,6 @@
 #include <vcl/scrbar.hxx>
 #include <vcl/settings.hxx>
 #include <vcl/svapp.hxx>
-#include <vcl/svlbitm.hxx>
 #include <vcl/syswin.hxx>
 #include <vcl/tabctrl.hxx>
 #include <vcl/tabpage.hxx>
@@ -322,6 +320,7 @@
 #include <vcl/toolkit/fixed.hxx>
 #include <vcl/toolkit/lstbox.hxx>
 #include <vcl/toolkit/spinfld.hxx>
+#include <vcl/toolkit/svlbitm.hxx>
 #include <vcl/toolkit/unowrap.hxx>
 #include <vcl/transfer.hxx>
 #include <vcl/treelist.hxx>
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 03d95b7bb219..0c5d40fa45fa 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -57,7 +57,7 @@
 #include <vcl/ptrstyle.hxx>
 #include <slider.hxx>
 #include <vcl/sysdata.hxx>
-#include <vcl/svlbitm.hxx>
+#include <vcl/toolkit/svlbitm.hxx>
 #include <vcl/toolkit/svtabbx.hxx>
 #include <vcl/tabctrl.hxx>
 #include <vcl/tabpage.hxx>
diff --git a/vcl/source/treelist/svimpbox.cxx b/vcl/source/treelist/svimpbox.cxx
index 2b4ed138305c..ac8f4cfeb621 100644
--- a/vcl/source/treelist/svimpbox.cxx
+++ b/vcl/source/treelist/svimpbox.cxx
@@ -31,7 +31,7 @@
 #include <stack>
 
 #include <vcl/treelistbox.hxx>
-#include <vcl/svlbitm.hxx>
+#include <vcl/toolkit/svlbitm.hxx>
 #include <tools/wintypes.hxx>
 #include <bitmaps.hlst>
 #include <svimpbox.hxx>
diff --git a/vcl/source/treelist/svlbitm.cxx b/vcl/source/treelist/svlbitm.cxx
index 3d456710fbb9..8b072424d072 100644
--- a/vcl/source/treelist/svlbitm.cxx
+++ b/vcl/source/treelist/svlbitm.cxx
@@ -18,7 +18,7 @@
  */
 
 #include <vcl/treelistbox.hxx>
-#include <vcl/svlbitm.hxx>
+#include <vcl/toolkit/svlbitm.hxx>
 #include <vcl/treelistentry.hxx>
 #include <vcl/viewdataentry.hxx>
 #include <vcl/svapp.hxx>
diff --git a/vcl/source/treelist/svtabbx.cxx b/vcl/source/treelist/svtabbx.cxx
index 3abdac30b91f..9e712c70c827 100644
--- a/vcl/source/treelist/svtabbx.cxx
+++ b/vcl/source/treelist/svtabbx.cxx
@@ -21,7 +21,7 @@
 #include <vcl/accessiblefactory.hxx>
 #include <vcl/toolkit/svtabbx.hxx>
 #include <vcl/headbar.hxx>
-#include <vcl/svlbitm.hxx>
+#include <vcl/toolkit/svlbitm.hxx>
 #include <vcl/treelistentry.hxx>
 #include <unotools/accessiblestatesethelper.hxx>
 #include <com/sun/star/accessibility/AccessibleStateType.hpp>
diff --git a/vcl/source/treelist/treelistbox.cxx b/vcl/source/treelist/treelistbox.cxx
index 8a4cfe56454b..c2a15925f125 100644
--- a/vcl/source/treelist/treelistbox.cxx
+++ b/vcl/source/treelist/treelistbox.cxx
@@ -40,7 +40,7 @@
 #include <sal/log.hxx>
 #include <tools/debug.hxx>
 
-#include <vcl/svlbitm.hxx>
+#include <vcl/toolkit/svlbitm.hxx>
 #include <vcl/treelistentry.hxx>
 #include <vcl/viewdataentry.hxx>
 #include <svimpbox.hxx>
diff --git a/vcl/source/treelist/uiobject.cxx b/vcl/source/treelist/uiobject.cxx
index 2478ab8786df..9256321688dd 100644
--- a/vcl/source/treelist/uiobject.cxx
+++ b/vcl/source/treelist/uiobject.cxx
@@ -8,7 +8,7 @@
  */
 
 #include <memory>
-#include <vcl/svlbitm.hxx>
+#include <vcl/toolkit/svlbitm.hxx>
 #include <vcl/uitest/uiobject.hxx>
 #include <vcl/treelistbox.hxx>
 #include <vcl/treelistentry.hxx>
commit 7b314c6aceb51d01b9b4314764b0f5852b4fb655
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Aug 10 21:05:46 2020 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Aug 12 20:22:41 2020 +0200

    drop now unused DBTreeListBox
    
    Change-Id: I607d0e1519b48effd1b306b8113b2010adee14d4
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100497
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx
index 67bd857b60d4..8c097c6a2fb0 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -59,7 +59,6 @@
 #include <osl/diagnose.h>
 
 #include <svl/filenotation.hxx>
-#include <vcl/treelistbox.hxx>
 #include <vcl/transfer.hxx>
 #include <svtools/cliplistener.hxx>
 
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.hxx b/dbaccess/source/ui/app/AppDetailPageHelper.hxx
index bda44447edcb..d45b3ab049a4 100644
--- a/dbaccess/source/ui/app/AppDetailPageHelper.hxx
+++ b/dbaccess/source/ui/app/AppDetailPageHelper.hxx
@@ -45,7 +45,6 @@ namespace dbaui
     class OAppBorderWindow;
     class InterimDBTreeListBox;
     class TreeListBox;
-    class DBTreeListBox;
 
     class OPreviewWindow : public vcl::Window
     {
diff --git a/dbaccess/source/ui/browser/dbtreeview.cxx b/dbaccess/source/ui/browser/dbtreeview.cxx
index f5d1d023c869..38e6846cc811 100644
--- a/dbaccess/source/ui/browser/dbtreeview.cxx
+++ b/dbaccess/source/ui/browser/dbtreeview.cxx
@@ -18,7 +18,6 @@
  */
 
 #include "dbtreeview.hxx"
-#include <vcl/treelistbox.hxx>
 #include <dbtreelistbox.hxx>
 #include <helpids.h>
 
@@ -32,10 +31,6 @@ DBTreeView::DBTreeView( vcl::Window* pParent, WinBits nBits)
     : Window(pParent, nBits)
     , m_pTreeListBox(VclPtr<InterimDBTreeListBox>::Create(this))
 {
-#if 0
-    m_pTreeListBox->SetDragDropMode( DragDropMode::NONE );
-    m_pTreeListBox->EnableInplaceEditing( true );
-#endif
     m_pTreeListBox->SetHelpId(HID_TLB_TREELISTBOX);
     m_pTreeListBox->Show();
 }
diff --git a/dbaccess/source/ui/browser/dsEntriesNoExp.cxx b/dbaccess/source/ui/browser/dsEntriesNoExp.cxx
index c6b160c09b23..972515e0118b 100644
--- a/dbaccess/source/ui/browser/dsEntriesNoExp.cxx
+++ b/dbaccess/source/ui/browser/dsEntriesNoExp.cxx
@@ -28,7 +28,6 @@
 #include "dbtreeview.hxx"
 #include <dbtreelistbox.hxx>
 #include "dbtreemodel.hxx"
-#include <vcl/treelistentry.hxx>
 
 using namespace ::com::sun::star::frame;
 using namespace ::dbtools;
diff --git a/dbaccess/source/ui/browser/dsbrowserDnD.cxx b/dbaccess/source/ui/browser/dsbrowserDnD.cxx
index e8425436df37..f04ea5db5b91 100644
--- a/dbaccess/source/ui/browser/dsbrowserDnD.cxx
+++ b/dbaccess/source/ui/browser/dsbrowserDnD.cxx
@@ -34,7 +34,6 @@
 #include <svx/dataaccessdescriptor.hxx>
 #include <tools/diagnose_ex.h>
 #include <osl/diagnose.h>
-#include <vcl/treelistentry.hxx>
 #include <vcl/svapp.hxx>
 
 #include <algorithm>
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index 928764bb00fe..375df3480a73 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -81,8 +81,6 @@
 #include <cppuhelper/exc_hlp.hxx>
 #include <i18nlangtag/languagetag.hxx>
 #include <svl/filenotation.hxx>
-#include <vcl/treelistbox.hxx>
-#include <vcl/treelistentry.hxx>
 #include <svx/dataaccessdescriptor.hxx>
 #include <svx/databaseregistrationui.hxx>
 #include <toolkit/helper/vclunohelper.hxx>
diff --git a/dbaccess/source/ui/control/dbtreelistbox.cxx b/dbaccess/source/ui/control/dbtreelistbox.cxx
index 540700041322..b260684232cd 100644
--- a/dbaccess/source/ui/control/dbtreelistbox.cxx
+++ b/dbaccess/source/ui/control/dbtreelistbox.cxx
@@ -35,7 +35,6 @@
 #include <vcl/commandevent.hxx>
 #include <vcl/event.hxx>
 #include <vcl/help.hxx>
-#include <vcl/treelistentry.hxx>
 #include <vcl/menu.hxx>
 
 #include <memory>
@@ -51,17 +50,6 @@ using namespace ::com::sun::star::datatransfer;
 using namespace ::com::sun::star::ui;
 using namespace ::com::sun::star::view;
 
-#define SPACEBETWEENENTRIES     4
-DBTreeListBox::DBTreeListBox( vcl::Window* pParent, WinBits nWinStyle )
-    :SvTreeListBox(pParent,nWinStyle)
-    ,m_pDragedEntry(nullptr)
-    ,m_pActionListener(nullptr)
-    ,m_pContextMenuProvider(nullptr)
-    ,m_pResetEvent(nullptr)
-{
-    init();
-}
-
 InterimDBTreeListBox::InterimDBTreeListBox(vcl::Window* pParent)
     : InterimItemWindow(pParent, "dbaccess/ui/dbtreelist.ui", "DBTreeList")
     , TreeListBox(m_xBuilder->weld_tree_view("treeview"))
@@ -197,66 +185,6 @@ TreeListBox::~TreeListBox()
 {
 }
 
-void DBTreeListBox::init()
-{
-    SetSpaceBetweenEntries(SPACEBETWEENENTRIES);
-
-    m_aTimer.SetTimeout(900);
-    m_aTimer.SetInvokeHandler(LINK(this, DBTreeListBox, OnTimeOut));
-
-    m_aScrollHelper.setUpScrollMethod( LINK(this, DBTreeListBox, ScrollUpHdl) );
-    m_aScrollHelper.setDownScrollMethod( LINK(this, DBTreeListBox, ScrollDownHdl) );
-
-    SetNodeDefaultImages( );
-
-    EnableContextMenuHandling();
-
-    SetQuickSearch( true );
-}
-
-DBTreeListBox::~DBTreeListBox()
-{
-    assert(!m_xMenuController.is());
-    disposeOnce();
-}
-
-void DBTreeListBox::dispose()
-{
-    if (m_pResetEvent)
-    {
-        RemoveUserEvent(m_pResetEvent);
-        m_pResetEvent = nullptr;
-    }
-    implStopSelectionTimer();
-    SvTreeListBox::dispose();
-}
-
-SvTreeListEntry* DBTreeListBox::GetEntryPosByName( const OUString& aName, SvTreeListEntry* pStart, const IEntryFilter* _pFilter ) const
-{
-    SvTreeList* myModel = GetModel();
-    std::pair<SvTreeListEntries::const_iterator,SvTreeListEntries::const_iterator> aIters =
-        myModel->GetChildIterators(pStart);
-
-    SvTreeListEntry* pEntry = nullptr;
-    SvTreeListEntries::const_iterator it = aIters.first, itEnd = aIters.second;
-    for (; it != itEnd; ++it)
-    {
-        pEntry = (*it).get();
-        const SvLBoxString* pItem = static_cast<const SvLBoxString*>(
-            pEntry->GetFirstItem(SvLBoxItemType::String));
-
-        if (pItem && pItem->GetText() == aName)
-        {
-            if (!_pFilter || _pFilter->includeEntry(pEntry->GetUserData()))
-                // found
-                break;
-        }
-        pEntry = nullptr;
-    }
-
-    return pEntry;
-}
-
 std::unique_ptr<weld::TreeIter> TreeListBox::GetEntryPosByName(const OUString& aName, const weld::TreeIter* pStart, const IEntryFilter* _pFilter) const
 {
     auto xEntry(m_xTreeView->make_iterator(pStart));
@@ -278,147 +206,6 @@ std::unique_ptr<weld::TreeIter> TreeListBox::GetEntryPosByName(const OUString& a
     return nullptr;
 }
 
-void DBTreeListBox::RequestingChildren( SvTreeListEntry* pParent )
-{
-    if (m_aPreExpandHandler.IsSet() && !m_aPreExpandHandler.Call(pParent))
-    {
-        // an error occurred. The method calling us will reset the entry flags, so it can't be expanded again.
-        // But we want that the user may do a second try (i.e. because he mistypes a password in this try), so
-        // we have to reset these flags controlling the expand ability
-        m_pResetEvent = PostUserEvent(LINK(this, DBTreeListBox, OnResetEntryHdl), pParent, true);
-    }
-}
-
-void DBTreeListBox::InitEntry(SvTreeListEntry* _pEntry, const OUString& aStr, const Image& _rCollEntryBmp, const Image& _rExpEntryBmp)
-{
-    SvTreeListBox::InitEntry( _pEntry, aStr, _rCollEntryBmp,_rExpEntryBmp);
-    SvLBoxItem* pTextItem(_pEntry->GetFirstItem(SvLBoxItemType::String));
-    _pEntry->ReplaceItem(std::make_unique<OBoldListboxString>(aStr), _pEntry->GetPos(pTextItem));
-}
-
-void DBTreeListBox::implStopSelectionTimer()
-{
-    if ( m_aTimer.IsActive() )
-        m_aTimer.Stop();
-}
-
-void DBTreeListBox::implStartSelectionTimer()
-{
-    implStopSelectionTimer();
-    m_aTimer.Start();
-}
-
-void DBTreeListBox::DeselectHdl()
-{
-    m_aSelectedEntries.erase( GetHdlEntry() );
-    SvTreeListBox::DeselectHdl();
-    implStartSelectionTimer();
-}
-
-void DBTreeListBox::SelectHdl()
-{
-    m_aSelectedEntries.insert( GetHdlEntry() );
-    SvTreeListBox::SelectHdl();
-    implStartSelectionTimer();
-}
-
-void DBTreeListBox::MouseButtonDown( const MouseEvent& rMEvt )
-{
-    bool bHitEmptySpace = (nullptr == GetEntry(rMEvt.GetPosPixel(), true));
-    if (bHitEmptySpace && (rMEvt.GetClicks() == 2) && rMEvt.IsMod1())
-        Control::MouseButtonDown(rMEvt);
-    else
-        SvTreeListBox::MouseButtonDown(rMEvt);
-}
-
-void DBTreeListBox::EnableExpandHandler(SvTreeListEntry* pEntry)
-{
-    // set the flag which allows if the entry can be expanded
-    pEntry->SetFlags( (pEntry->GetFlags() & ~SvTLEntryFlags(SvTLEntryFlags::NO_NODEBMP | SvTLEntryFlags::HAD_CHILDREN)) | SvTLEntryFlags::CHILDREN_ON_DEMAND );
-    // redraw the entry
-    GetModel()->InvalidateEntry(pEntry);
-}
-
-IMPL_LINK(DBTreeListBox, OnResetEntryHdl, void*, p, void)
-{
-    m_pResetEvent = nullptr;
-    EnableExpandHandler(static_cast<SvTreeListEntry*>(p));
-}
-
-void DBTreeListBox::ModelHasEntryInvalidated( SvTreeListEntry* _pEntry )
-{
-    SvTreeListBox::ModelHasEntryInvalidated( _pEntry );
-
-    if (m_aSelectedEntries.find(_pEntry) != m_aSelectedEntries.end())
-    {
-        SvLBoxItem* pTextItem = _pEntry->GetFirstItem(SvLBoxItemType::String);
-        if ( pTextItem && !static_cast< OBoldListboxString* >( pTextItem )->isEmphasized() )
-        {
-            implStopSelectionTimer();
-            m_aSelectedEntries.erase(_pEntry);
-                // ehm - why?
-        }
-    }
-}
-
-void DBTreeListBox::ModelHasRemoved( SvTreeListEntry* _pEntry )
-{
-    SvTreeListBox::ModelHasRemoved(_pEntry);
-    if (m_aSelectedEntries.find(_pEntry) != m_aSelectedEntries.end())
-    {
-        implStopSelectionTimer();
-        m_aSelectedEntries.erase(_pEntry);
-    }
-}
-
-sal_Int8 DBTreeListBox::AcceptDrop( const AcceptDropEvent& _rEvt )
-{
-    sal_Int8 nDropOption = DND_ACTION_NONE;
-    if ( m_pActionListener )
-    {
-        SvTreeListEntry* pDroppedEntry = GetEntry(_rEvt.maPosPixel);
-        // check if drag is on child entry, which is not allowed
-        SvTreeListEntry* pParent = nullptr;
-        if ( _rEvt.mnAction & DND_ACTION_MOVE )
-        {
-            if ( !m_pDragedEntry ) // no entry to move
-            {
-                nDropOption = m_pActionListener->queryDrop( _rEvt, GetDataFlavorExVector() );
-                m_aMousePos = _rEvt.maPosPixel;
-                m_aScrollHelper.scroll(m_aMousePos,GetOutputSizePixel());
-                return nDropOption;
-            }
-
-            pParent = pDroppedEntry ? GetParent(pDroppedEntry) : nullptr;
-            while ( pParent && pParent != m_pDragedEntry )
-                pParent = GetParent(pParent);
-        }
-
-        if ( !pParent )
-        {
-            nDropOption = m_pActionListener->queryDrop( _rEvt, GetDataFlavorExVector() );
-            // check if move is allowed
-            if ( nDropOption & DND_ACTION_MOVE )
-            {
-                if ( m_pDragedEntry == pDroppedEntry || GetEntryPosByName(GetEntryText(m_pDragedEntry),pDroppedEntry) )
-                    nDropOption = nDropOption & ~DND_ACTION_MOVE;//DND_ACTION_NONE;
-            }
-            m_aMousePos = _rEvt.maPosPixel;
-            m_aScrollHelper.scroll(m_aMousePos,GetOutputSizePixel());
-        }
-    }
-
-    return nDropOption;
-}
-
-sal_Int8 DBTreeListBox::ExecuteDrop( const ExecuteDropEvent& _rEvt )
-{
-    if ( m_pActionListener )
-        return m_pActionListener->executeDrop( _rEvt );
-
-    return DND_ACTION_NONE;
-}
-
 IMPL_LINK(TreeListBox, DragBeginHdl, bool&, rUnsetDragIcon, bool)
 {
     rUnsetDragIcon = false;
@@ -496,51 +283,6 @@ sal_Int8 TreeListBox::ExecuteDrop(const ExecuteDropEvent& rEvt)
     return DND_ACTION_NONE;
 }
 
-void DBTreeListBox::StartDrag( sal_Int8 /*_nAction*/, const Point& _rPosPixel )
-{
-    if ( m_pActionListener )
-    {
-        m_pDragedEntry = GetEntry(_rPosPixel);
-        if ( m_pDragedEntry && m_pActionListener->requestDrag( _rPosPixel ) )
-        {
-            // if the (asynchronous) drag started, stop the selection timer
-            implStopSelectionTimer();
-            // and stop selecting entries by simply moving the mouse
-            EndSelection();
-        }
-    }
-}
-
-void DBTreeListBox::RequestHelp( const HelpEvent& rHEvt )
-{
-    if ( !m_pActionListener )
-    {
-        SvTreeListBox::RequestHelp( rHEvt );
-        return;
-    }
-
-    if( rHEvt.GetMode() & HelpEventMode::QUICK )
-    {
-        Point aPos( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ));
-        SvTreeListEntry* pEntry = GetEntry( aPos );
-        if( pEntry )
-        {
-            OUString sQuickHelpText;
-            if ( m_pActionListener->requestQuickHelp( pEntry, sQuickHelpText ) )
-            {
-                Size aSize( GetOutputSizePixel().Width(), GetEntryHeight() );
-                tools::Rectangle aScreenRect( OutputToScreenPixel( GetEntryPosition( pEntry ) ), aSize );
-
-                Help::ShowQuickHelp( this, aScreenRect,
-                                     sQuickHelpText, QuickHelpFlags::Left | QuickHelpFlags::VCenter );
-                return;
-            }
-        }
-    }
-
-    SvTreeListBox::RequestHelp( rHEvt );
-}
-
 IMPL_LINK(TreeListBox, QueryTooltipHdl, const weld::TreeIter&, rIter, OUString)
 {
     OUString sQuickHelpText;
@@ -552,106 +294,6 @@ IMPL_LINK(TreeListBox, QueryTooltipHdl, const weld::TreeIter&, rIter, OUString)
     return m_xTreeView->get_tooltip_text();
 }
 
-void DBTreeListBox::KeyInput( const KeyEvent& rKEvt )
-{
-    KeyFuncType eFunc = rKEvt.GetKeyCode().GetFunction();
-    sal_uInt16      nCode = rKEvt.GetKeyCode().GetCode();
-    bool bHandled = false;
-
-    if(eFunc != KeyFuncType::DONTKNOW)
-    {
-        switch(eFunc)
-        {
-            case KeyFuncType::COPY:
-                bHandled = ( m_aCopyHandler.IsSet() && !m_aSelectedEntries.empty() );
-                if ( bHandled )
-                    m_aCopyHandler.Call( nullptr );
-                break;
-            case KeyFuncType::PASTE:
-                bHandled = ( m_aPasteHandler.IsSet() && !m_aSelectedEntries.empty() );
-                if ( bHandled )
-                    m_aPasteHandler.Call( nullptr );
-                break;
-            case KeyFuncType::DELETE:
-                bHandled = ( m_aDeleteHandler.IsSet() && !m_aSelectedEntries.empty() );
-                if ( bHandled )
-                    m_aDeleteHandler.Call( nullptr );
-                break;
-            default:
-                break;
-        }
-    }
-
-    if ( KEY_RETURN == nCode )
-    {
-        bHandled = false;
-        m_aEnterKeyHdl.Call(this);
-        // this is a HACK. If the data source browser is opened in the "beamer", while the main frame
-        //
-        // contains a writer document, then pressing enter in the DSB would be rerouted to the writer
-        //
-        // document if we would not do this hack here.
-        // The problem is that the Writer uses RETURN as _accelerator_ (which is quite weird itself),
-        //
-        // so the SFX framework is _obligated_ to pass it to the Writer if nobody else handled it. There
-        //
-        // is no chance to distinguish between
-        //   "accelerators which are to be executed if the main document has the focus"
-        // and
-        //   "accelerators which are always to be executed"
-        //
-        // Thus we cannot prevent the handling of this key in the writer without declaring the key event
-        // as "handled" herein.
-        //
-        // The bad thing about this approach is that it does not scale. Every other accelerator which
-        // is used by the document will raise a similar bug once somebody discovers it.
-        // If this is the case, we should discuss a real solution with the framework (SFX) and the
-        // applications.
-    }
-
-    if ( !bHandled )
-        SvTreeListBox::KeyInput(rKEvt);
-}
-
-bool DBTreeListBox::EditingEntry( SvTreeListEntry* /*pEntry*/, Selection& /*_aSelection*/)
-{
-    return false;
-}
-
-bool DBTreeListBox::EditedEntry( SvTreeListEntry* pEntry, const OUString& rNewText )
-{
-    DBTreeEditedEntry aEntry;
-    aEntry.aNewText = rNewText;
-    SetEntryText(pEntry,aEntry.aNewText);
-
-    return false;  // we never want that the base change our text
-}
-
-bool DBTreeListBox::DoubleClickHdl()
-{
-    // continue default processing if the DoubleClickHandler didn't handle it
-    return !aDoubleClickHdl.Call( this );
-}
-
-static void scrollWindow(DBTreeListBox* _pListBox, const Point& _rPos,bool _bUp)
-{
-    SvTreeListEntry* pEntry = _pListBox->GetEntry( _rPos );
-    if( pEntry && pEntry != _pListBox->Last() )
-    {
-        _pListBox->ScrollOutputArea( _bUp ? -1 : 1 );
-    }
-}
-
-IMPL_LINK_NOARG( DBTreeListBox, ScrollUpHdl, LinkParamNone*, void )
-{
-    scrollWindow(this,m_aMousePos,true);
-}
-
-IMPL_LINK_NOARG( DBTreeListBox, ScrollDownHdl, LinkParamNone*, void )
-{
-    scrollWindow(this,m_aMousePos,false);
-}
-
 namespace
 {
     // SelectionSupplier
@@ -819,117 +461,6 @@ bool InterimDBTreeListBox::DoContextMenu(const CommandEvent& rCEvt)
     return true;
 }
 
-VclPtr<PopupMenu> DBTreeListBox::CreateContextMenu()
-{
-    if ( !m_pContextMenuProvider )
-        return nullptr;
-
-    OUString aResourceName( m_pContextMenuProvider->getContextMenuResourceName() );
-    if ( aResourceName.isEmpty() )
-        return nullptr;
-
-    css::uno::Sequence< css::uno::Any > aArgs( 3 );
-    aArgs[0] <<= comphelper::makePropertyValue( "Value", aResourceName );
-    aArgs[1] <<= comphelper::makePropertyValue( "Frame", m_pContextMenuProvider->getCommandController().getXController()->getFrame() );
-    aArgs[2] <<= comphelper::makePropertyValue( "IsContextMenu", true );
-
-    css::uno::Reference< css::uno::XComponentContext > xContext = comphelper::getProcessComponentContext();
-    m_xMenuController.set( xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
-        "com.sun.star.comp.framework.ResourceMenuController", aArgs, xContext ), css::uno::UNO_QUERY );
-
-    if ( !m_xMenuController.is() )
-        return nullptr;
-
-    rtl::Reference xPopupMenu( new VCLXPopupMenu );
-    m_xMenuController->setPopupMenu( xPopupMenu.get() );
-    VclPtr<PopupMenu> pContextMenu( static_cast< PopupMenu* >( xPopupMenu->GetMenu() ) );
-    pContextMenu->AddEventListener( LINK( this, DBTreeListBox, MenuEventListener ) );
-
-    // allow context menu interception
-    ::comphelper::OInterfaceContainerHelper2* pInterceptors = m_pContextMenuProvider->getContextMenuInterceptors();
-    if ( !pInterceptors || !pInterceptors->getLength() )
-        return pContextMenu;
-
-    OUString aMenuIdentifier( "private:resource/popupmenu/" + aResourceName );
-
-    ContextMenuExecuteEvent aEvent;
-    aEvent.SourceWindow = VCLUnoHelper::GetInterface( this );
-    aEvent.ExecutePosition.X = -1;
-    aEvent.ExecutePosition.Y = -1;
-    aEvent.ActionTriggerContainer = ::framework::ActionTriggerHelper::CreateActionTriggerContainerFromMenu(
-        pContextMenu.get(), &aMenuIdentifier );
-    aEvent.Selection = new SelectionSupplier( m_pContextMenuProvider->getCurrentSelection( *this ) );
-
-    ::comphelper::OInterfaceIteratorHelper2 aIter( *pInterceptors );
-    bool bModifiedMenu = false;
-    bool bAskInterceptors = true;
-    while ( aIter.hasMoreElements() && bAskInterceptors )
-    {
-        Reference< XContextMenuInterceptor > xInterceptor( aIter.next(), UNO_QUERY );
-        if ( !xInterceptor.is() )
-            continue;
-
-        try
-        {
-            ContextMenuInterceptorAction eAction = xInterceptor->notifyContextMenuExecute( aEvent );
-            switch ( eAction )
-            {
-                case ContextMenuInterceptorAction_CANCELLED:
-                    return nullptr;
-
-                case ContextMenuInterceptorAction_EXECUTE_MODIFIED:
-                    bModifiedMenu = true;
-                    bAskInterceptors = false;
-                    break;
-
-                case ContextMenuInterceptorAction_CONTINUE_MODIFIED:
-                    bModifiedMenu = true;
-                    bAskInterceptors = true;
-                    break;
-
-                default:
-                    OSL_FAIL( "DBTreeListBox::CreateContextMenu: unexpected return value of the interceptor call!" );
-                    [[fallthrough]];
-                case ContextMenuInterceptorAction_IGNORED:
-                    break;
-            }
-        }
-        catch( const DisposedException& e )
-        {
-            if ( e.Context == xInterceptor )
-                aIter.remove();
-        }
-    }
-
-    if ( bModifiedMenu )
-    {
-        pContextMenu->Clear();
-        ::framework::ActionTriggerHelper::CreateMenuFromActionTriggerContainer(
-            pContextMenu, aEvent.ActionTriggerContainer );
-        aEvent.ActionTriggerContainer.clear();
-    }
-
-    return pContextMenu;
-}
-
-IMPL_LINK( DBTreeListBox, MenuEventListener, VclMenuEvent&, rMenuEvent, void )
-{
-    if ( rMenuEvent.GetId() == VclEventId::ObjectDying )
-    {
-        css::uno::Reference< css::lang::XComponent > xComponent( m_xMenuController, css::uno::UNO_QUERY );
-        if ( xComponent.is() )
-            xComponent->dispose();
-        m_xMenuController.clear();
-    }
-}
-
-IMPL_LINK_NOARG(DBTreeListBox, OnTimeOut, Timer*, void)
-{
-    implStopSelectionTimer();
-
-    m_aSelChangeHdl.Call( nullptr );
-}
-
 IMPL_LINK_NOARG(TreeListBox, OnTimeOut, Timer*, void)
 {
     implStopSelectionTimer();
@@ -937,12 +468,6 @@ IMPL_LINK_NOARG(TreeListBox, OnTimeOut, Timer*, void)
     m_aSelChangeHdl.Call( nullptr );
 }
 
-void DBTreeListBox::StateChanged( StateChangedType nStateChange )
-{
-    if ( nStateChange == StateChangedType::Visible )
-        implStopSelectionTimer();
-}
-
 std::unique_ptr<weld::TreeIter> TreeListBox::GetRootLevelParent(const weld::TreeIter* pEntry) const
 {
     if (!pEntry)
diff --git a/dbaccess/source/ui/inc/dbtreelistbox.hxx b/dbaccess/source/ui/inc/dbtreelistbox.hxx
index 732d20cf68c2..82f661e1eeea 100644
--- a/dbaccess/source/ui/inc/dbtreelistbox.hxx
+++ b/dbaccess/source/ui/inc/dbtreelistbox.hxx
@@ -24,7 +24,6 @@
 #include <com/sun/star/frame/XPopupMenuController.hpp>
 
 #include <vcl/InterimItemWindow.hxx>
-#include <vcl/treelistbox.hxx>
 #include <vcl/transfer.hxx>
 #include <vcl/timer.hxx>
 #include <vcl/weld.hxx>
@@ -52,92 +51,6 @@ namespace dbaui
 
     class IControlActionListener;
     class IContextMenuProvider;
-    class DBTreeListBox     :public SvTreeListBox
-    {
-        OScrollHelper               m_aScrollHelper;
-        Timer                       m_aTimer; // is needed for table updates
-        Point                       m_aMousePos;
-        std::set<SvTreeListEntry*>  m_aSelectedEntries;
-        SvTreeListEntry*            m_pDragedEntry;
-        IControlActionListener*     m_pActionListener;
-        IContextMenuProvider*       m_pContextMenuProvider;
-        ImplSVEvent*                m_pResetEvent;
-        css::uno::Reference<css::frame::XPopupMenuController> m_xMenuController;
-
-        Link<SvTreeListEntry*,bool> m_aPreExpandHandler;    // handler to be called before a node is expanded
-        Link<LinkParamNone*,void>   m_aSelChangeHdl;        // handler to be called (asynchronously) when the selection changes in any way
-        Link<LinkParamNone*,void>   m_aCopyHandler;         // called when someone press CTRL+C
-        Link<LinkParamNone*,void>   m_aPasteHandler;        // called when someone press CTRL+V
-        Link<LinkParamNone*,void>   m_aDeleteHandler;       // called when someone press DELETE Key
-        Link<DBTreeListBox*,void>   m_aEnterKeyHdl;
-
-    private:
-        void init();
-        DECL_LINK( OnTimeOut, Timer*, void );
-        DECL_LINK( OnResetEntryHdl, void*, void );
-        DECL_LINK( ScrollUpHdl, LinkParamNone*, void );
-        DECL_LINK( ScrollDownHdl, LinkParamNone*, void );
-        DECL_LINK( MenuEventListener, VclMenuEvent&, void );
-
-    public:
-        DBTreeListBox( vcl::Window* pParent, WinBits nWinStyle);
-        virtual ~DBTreeListBox() override;
-        virtual void dispose() override;
-
-        void                    setControlActionListener( IControlActionListener* _pListener ) { m_pActionListener = _pListener; }
-        void                    setContextMenuProvider( IContextMenuProvider* _pContextMenuProvider ) { m_pContextMenuProvider = _pContextMenuProvider; }
-
-        void    SetPreExpandHandler(const Link<SvTreeListEntry*,bool>& _rHdl)  { m_aPreExpandHandler = _rHdl; }
-        void    SetSelChangeHdl( const Link<LinkParamNone*,void>& _rHdl )      { m_aSelChangeHdl = _rHdl; }
-        void    setCopyHandler(const Link<LinkParamNone*,void>& _rHdl)         { m_aCopyHandler = _rHdl; }
-        void    setPasteHandler(const Link<LinkParamNone*,void>& _rHdl)        { m_aPasteHandler = _rHdl; }
-        void    setDeleteHandler(const Link<LinkParamNone*,void>& _rHdl)       { m_aDeleteHandler = _rHdl; }
-
-        // modified the given entry so that the expand handler is called whenever the entry is expanded
-        // (normally, the expand handler is called only once)
-        void            EnableExpandHandler(SvTreeListEntry* _pEntry);
-
-        SvTreeListEntry*    GetEntryPosByName( const OUString& aName, SvTreeListEntry* pStart = nullptr, const IEntryFilter* _pFilter = nullptr ) const;
-        virtual void    RequestingChildren( SvTreeListEntry* pParent ) override;
-        virtual void    SelectHdl() override;
-        virtual void    DeselectHdl() override;
-        // Window
-        virtual void    KeyInput( const KeyEvent& rKEvt ) override;
-
-        virtual void    StateChanged( StateChangedType nStateChange ) override;
-        virtual void    InitEntry(SvTreeListEntry* pEntry, const OUString& aStr, const Image& aCollEntryBmp, const Image& aExpEntryBmp) override;
-
-        // enable editing for tables/views and queries
-        virtual bool    EditingEntry( SvTreeListEntry* pEntry, Selection& ) override;
-        virtual bool    EditedEntry( SvTreeListEntry* pEntry, const OUString& rNewText ) override;
-
-        virtual bool    DoubleClickHdl() override;
-
-        virtual VclPtr<PopupMenu> CreateContextMenu() override;
-
-        void            SetEnterKeyHdl(const Link<DBTreeListBox*,void>& rNewHdl) {m_aEnterKeyHdl = rNewHdl;}
-
-        void            clearCurrentSelection() { m_aSelectedEntries.clear(); }
-
-    protected:
-        virtual void        MouseButtonDown( const MouseEvent& rMEvt ) override;
-        virtual void        RequestHelp( const HelpEvent& rHEvt ) override;
-
-        // DragSourceHelper overridables
-        virtual void        StartDrag( sal_Int8 nAction, const Point& rPosPixel ) override;
-        // DropTargetHelper overridables
-        virtual sal_Int8    AcceptDrop( const AcceptDropEvent& _rEvt ) override;
-        virtual sal_Int8    ExecuteDrop( const ExecuteDropEvent& _rEvt ) override;
-
-        virtual void        ModelHasRemoved( SvTreeListEntry* pEntry ) override;
-        virtual void        ModelHasEntryInvalidated( SvTreeListEntry* pEntry ) override;
-
-        void                implStopSelectionTimer();
-        void                implStartSelectionTimer();
-
-    protected:
-        using SvTreeListBox::ExecuteDrop;
-    };
 
     class TreeListBox;
 
diff --git a/dbaccess/source/ui/inc/tabletree.hxx b/dbaccess/source/ui/inc/tabletree.hxx
index 53e425980b13..6279129eb112 100644
--- a/dbaccess/source/ui/inc/tabletree.hxx
+++ b/dbaccess/source/ui/inc/tabletree.hxx
@@ -96,18 +96,6 @@ public:
 
     void            CheckButtons();     // make the button states consistent (bottom-up)
 
-    /** does a wildcard check of the given entry
-        <p>There are two different 'checked' states: If the user checks all children of an entry, this is different
-        from checking the entry itself. The second is called 'wildcard' checking, 'cause in the resulting
-        table filter it's represented by a wildcard.</p>
-    */
-    void            checkWildcard(SvTreeListEntry* _pEntry);
-
-    /** determine if the given entry is 'wildcard checked'
-        @see checkWildcard
-    */
-    static bool     isWildcardChecked(SvTreeListEntry* pEntry);
-
 private:
     void CheckButtonHdl();
 
@@ -187,10 +175,6 @@ public:
 
     void    SuppressEmptyFolders() { m_bNoEmptyFolders = true; }
 
-    /** determines whether the given entry denotes a tables folder
-    */
-    static bool isFolderEntry( const SvTreeListEntry* _pEntry );
-
     /** fill the table list with the tables belonging to the connection described by the parameters
         @param _rxConnection
             the connection, which must support the service com.sun.star.sdb.Connection
@@ -214,11 +198,6 @@ public:
                 const css::uno::Sequence< OUString>& _rViews
             );
 
-    /** returns a NamedDatabaseObject record which describes the given entry
-    */
-    css::sdb::application::NamedDatabaseObject
-            describeObject( SvTreeListEntry* _pEntry );
-
     /** to be used if a foreign instance added a table
     */
     std::unique_ptr<weld::TreeIter> addedTable( const OUString& _rName );
@@ -227,14 +206,6 @@ public:
     */
     void    removedTable( const OUString& _rName );
 
-    /** returns the fully qualified name of a table entry
-        @param _pEntry
-            the entry whose name is to be obtained. Must not denote a folder entry.
-    */
-    OUString getQualifiedTableName( SvTreeListEntry* _pEntry ) const;
-
-    SvTreeListEntry*    getEntryByQualifiedName( const OUString& _rName );
-
     std::unique_ptr<weld::TreeIter>    getAllObjectsEntry() const;
 
     /** does a wildcard check of the given entry


More information about the Libreoffice-commits mailing list