diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-08-16 12:45:21 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-08-16 15:26:37 +0200 |
commit | 3f9940c2e050830051a31e4b70736132e034a9db (patch) | |
tree | f20559316d4fc41bfc84287a67dd64498836c129 /dbaccess | |
parent | 89ca0ed3bc773b2fa65c74a4d3cfbdd3515bc641 (diff) |
loplugin:unusedmethods
Change-Id: I2dd10873be73256a3689233c7b1e37bde8f685ee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100820
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/Library_dbu.mk | 1 | ||||
-rw-r--r-- | dbaccess/source/ui/control/ScrollHelper.cxx | 52 | ||||
-rw-r--r-- | dbaccess/source/ui/control/tabletree.cxx | 13 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/ScrollHelper.hxx | 67 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/dbtreelistbox.hxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/imageprovider.hxx | 12 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/tabletree.hxx | 37 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/imageprovider.cxx | 28 |
8 files changed, 0 insertions, 212 deletions
diff --git a/dbaccess/Library_dbu.mk b/dbaccess/Library_dbu.mk index 07da91b74f4f..a1e608df0f8c 100644 --- a/dbaccess/Library_dbu.mk +++ b/dbaccess/Library_dbu.mk @@ -102,7 +102,6 @@ $(eval $(call gb_Library_add_exception_objects,dbu,\ dbaccess/source/ui/control/FieldDescControl \ dbaccess/source/ui/control/opendoccontrols \ dbaccess/source/ui/control/RelationControl \ - dbaccess/source/ui/control/ScrollHelper \ dbaccess/source/ui/control/sqledit \ dbaccess/source/ui/control/SqlNameEdit \ dbaccess/source/ui/control/TableGrantCtrl \ diff --git a/dbaccess/source/ui/control/ScrollHelper.cxx b/dbaccess/source/ui/control/ScrollHelper.cxx deleted file mode 100644 index a9fcacca957f..000000000000 --- a/dbaccess/source/ui/control/ScrollHelper.cxx +++ /dev/null @@ -1,52 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ - -#include <ScrollHelper.hxx> - -#define LISTBOX_SCROLLING_AREA 12 -namespace dbaui -{ - - OScrollHelper::OScrollHelper() - { - } - OScrollHelper::~OScrollHelper() - { - - } - void OScrollHelper::scroll(const Point& _rPoint, const Size& _rOutputSize) - { - // Scrolling Areas - tools::Rectangle aScrollArea( Point(0, _rOutputSize.Height() - LISTBOX_SCROLLING_AREA), - Size(_rOutputSize.Width(), LISTBOX_SCROLLING_AREA) ); - - // if pointer in bottom area begin scroll - if( aScrollArea.IsInside(_rPoint) ) - m_aUpScroll.Call(nullptr); - else - { - aScrollArea.SetPos(Point(0,0)); - // if pointer in top area begin scroll - if( aScrollArea.IsInside(_rPoint) ) - m_aDownScroll.Call(nullptr); - } - } -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/control/tabletree.cxx b/dbaccess/source/ui/control/tabletree.cxx index a4de1dc9a4f4..ead1d5483cbf 100644 --- a/dbaccess/source/ui/control/tabletree.cxx +++ b/dbaccess/source/ui/control/tabletree.cxx @@ -447,24 +447,11 @@ void TableTreeListBox::UpdateTableList( const Reference< XConnection >& _rxConne m_xTreeView->make_sorted(); } -bool OTableTreeListBox::isWildcardChecked(const weld::TreeIter& rEntry) -{ - return m_xTreeView->get_text_emphasis(rEntry, 0); -} - bool TableTreeListBox::isWildcardChecked(const weld::TreeIter& rEntry) { return m_xTreeView->get_text_emphasis(rEntry, 0); } -void OTableTreeListBox::checkWildcard(weld::TreeIter& rEntry) -{ - if (!m_bShowToggles) - return; - m_xTreeView->set_toggle(rEntry, TRISTATE_TRUE); - checkedButton_noBroadcast(rEntry); -} - void TableTreeListBox::checkWildcard(weld::TreeIter& rEntry) { if (!m_bShowToggles) diff --git a/dbaccess/source/ui/inc/ScrollHelper.hxx b/dbaccess/source/ui/inc/ScrollHelper.hxx deleted file mode 100644 index 87e50018aa2d..000000000000 --- a/dbaccess/source/ui/inc/ScrollHelper.hxx +++ /dev/null @@ -1,67 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . - */ -#ifndef INCLUDED_DBACCESS_SOURCE_UI_INC_SCROLLHELPER_HXX -#define INCLUDED_DBACCESS_SOURCE_UI_INC_SCROLLHELPER_HXX - -#include <tools/link.hxx> -#include <tools/gen.hxx> - -namespace dbaui -{ - class OScrollHelper - { - Link<LinkParamNone*,void> m_aUpScroll; - Link<LinkParamNone*,void> m_aDownScroll; - public: - /** default constructor - */ - OScrollHelper(); - - ~OScrollHelper(); - - /** set the memthod which should be called when scrolling up - @param _rUpScroll - the method to set - */ - void setUpScrollMethod( const Link<LinkParamNone*,void>& _rUpScroll ) - { - m_aUpScroll = _rUpScroll; - } - - /** set the memthod which should be called when scrolling down - @param _rDownScroll - the method to set - */ - void setDownScrollMethod( const Link<LinkParamNone*,void>& _rDownScroll ) - { - m_aDownScroll = _rDownScroll; - } - - /** check if a scroll method has to be called - @param _rPoint - the current selection point - @param _rOutputSize - the output size of the window - */ - void scroll(const Point& _rPoint, const Size& _rOutputSize); - }; -} -#endif // INCLUDED_DBACCESS_SOURCE_UI_INC_SCROLLHELPER_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/inc/dbtreelistbox.hxx b/dbaccess/source/ui/inc/dbtreelistbox.hxx index 56ac5d5aef25..2c631875dabe 100644 --- a/dbaccess/source/ui/inc/dbtreelistbox.hxx +++ b/dbaccess/source/ui/inc/dbtreelistbox.hxx @@ -19,8 +19,6 @@ #ifndef INCLUDED_DBACCESS_SOURCE_UI_INC_DBTREELISTBOX_HXX #define INCLUDED_DBACCESS_SOURCE_UI_INC_DBTREELISTBOX_HXX -#include "ScrollHelper.hxx" - #include <com/sun/star/frame/XPopupMenuController.hpp> #include <vcl/InterimItemWindow.hxx> diff --git a/dbaccess/source/ui/inc/imageprovider.hxx b/dbaccess/source/ui/inc/imageprovider.hxx index a85c7df7d50c..6be020922bd0 100644 --- a/dbaccess/source/ui/inc/imageprovider.hxx +++ b/dbaccess/source/ui/inc/imageprovider.hxx @@ -116,18 +116,6 @@ namespace dbaui */ static OUString getDefaultImageResourceID(sal_Int32 _nDatabaseObjectType); - /** retrieves the image to be used for folders of database objects - @param _nDatabaseObjectType - the type of the object. Must be one of the css.sdb.application.DatabaseObject - constants. - @param _rName - the name of the object - @return - the image to be used for folders of the given type - */ - static Image getFolderImage( - sal_Int32 _nDatabaseObjectType - ); static OUString getFolderImageId( sal_Int32 _nDatabaseObjectType ); diff --git a/dbaccess/source/ui/inc/tabletree.hxx b/dbaccess/source/ui/inc/tabletree.hxx index 6279129eb112..aee9412cd4c7 100644 --- a/dbaccess/source/ui/inc/tabletree.hxx +++ b/dbaccess/source/ui/inc/tabletree.hxx @@ -46,13 +46,9 @@ public: OTableTreeListBox(vcl::Window* pParent, bool bShowToggles); virtual ~OTableTreeListBox(); - void init() { m_bVirtualRoot = true; } - typedef std::pair< OUString, bool > TTableViewName; typedef std::vector< TTableViewName > TNames; - void SuppressEmptyFolders() { m_bNoEmptyFolders = true; } - /** determines whether the given entry denotes a tables folder */ bool isFolderEntry(const weld::TreeIter& rEntry) const; @@ -82,23 +78,9 @@ public: std::unique_ptr<weld::TreeIter> getAllObjectsEntry() const; - /** 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(weld::TreeIter& rEntry); - - /** determine if the given entry is 'wildcard checked' - @see checkWildcard - */ - bool isWildcardChecked(const weld::TreeIter& rEntry); - void CheckButtons(); // make the button states consistent (bottom-up) private: - void CheckButtonHdl(); - void checkedButton_noBroadcast(const weld::TreeIter& rEntry); void implEmphasize(const weld::TreeIter& rEntry, bool _bChecked, bool _bUpdateDescendants = true, bool _bUpdateAncestors = true); @@ -198,14 +180,6 @@ public: const css::uno::Sequence< OUString>& _rViews ); - /** to be used if a foreign instance added a table - */ - std::unique_ptr<weld::TreeIter> addedTable( const OUString& _rName ); - - /** to be used if a foreign instance removed a table - */ - void removedTable( const OUString& _rName ); - std::unique_ptr<weld::TreeIter> getAllObjectsEntry() const; /** does a wildcard check of the given entry @@ -253,17 +227,6 @@ public: const css::uno::Reference< css::sdbc::XConnection >& _rxConnection, const TNames& _rTables ); - - /** returns a NamedDatabaseObject record which describes the given entry - */ - css::sdb::application::NamedDatabaseObject - describeObject(weld::TreeIter& rEntry); - - /** 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(weld::TreeIter& rEntry) const; }; } // namespace dbaui diff --git a/dbaccess/source/ui/misc/imageprovider.cxx b/dbaccess/source/ui/misc/imageprovider.cxx index f3d9a7372092..585b87bc9294 100644 --- a/dbaccess/source/ui/misc/imageprovider.cxx +++ b/dbaccess/source/ui/misc/imageprovider.cxx @@ -203,34 +203,6 @@ namespace dbaui return sImageResourceID; } - Image ImageProvider::getFolderImage( sal_Int32 _nDatabaseObjectType ) - { - OUString sImageResourceID; - switch ( _nDatabaseObjectType ) - { - case DatabaseObject::QUERY: - sImageResourceID = QUERYFOLDER_TREE_ICON; - break; - case DatabaseObject::FORM: - sImageResourceID = FORMFOLDER_TREE_ICON; - break; - case DatabaseObject::REPORT: - sImageResourceID = REPORTFOLDER_TREE_ICON; - break; - case DatabaseObject::TABLE: - sImageResourceID = TABLEFOLDER_TREE_ICON; - break; - default: - OSL_FAIL( "ImageProvider::getDefaultImage: invalid database object type!" ); - break; - } - - Image aFolderImage; - if (!sImageResourceID.isEmpty()) - aFolderImage = Image(StockImage::Yes, sImageResourceID); - return aFolderImage; - } - OUString ImageProvider::getFolderImageId( sal_Int32 _nDatabaseObjectType ) { OUString sImageResourceID; |