summaryrefslogtreecommitdiff
path: root/accessibility/inc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-12-03 14:45:00 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-12-03 20:01:46 +0100
commitf552271514fa5feaaed167f72d16b20108cc5438 (patch)
tree008114d8b3e038e5e5db81af64bb1e7db1a2100b /accessibility/inc
parent4eb7a154e850b9777d5631a31b9bf4e9964b2b32 (diff)
loplugin:mergeclasses ListBoxAccessibleBase with AccessibleListBoxEntry
Change-Id: I9173e64b7ddef3184cacbce55b060d677e7ec1d0 Reviewed-on: https://gerrit.libreoffice.org/84347 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'accessibility/inc')
-rw-r--r--accessibility/inc/extended/accessiblelistboxentry.hxx8
-rw-r--r--accessibility/inc/extended/listboxaccessible.hxx81
2 files changed, 3 insertions, 86 deletions
diff --git a/accessibility/inc/extended/accessiblelistboxentry.hxx b/accessibility/inc/extended/accessiblelistboxentry.hxx
index cb0dcd3ee922..e4f4862a3d50 100644
--- a/accessibility/inc/extended/accessiblelistboxentry.hxx
+++ b/accessibility/inc/extended/accessiblelistboxentry.hxx
@@ -35,7 +35,6 @@
#include <comphelper/accessibletexthelper.hxx>
#include <vcl/treelistentry.hxx>
#include <tools/gen.hxx>
-#include <extended/listboxaccessible.hxx>
// forward ---------------------------------------------------------------
@@ -69,11 +68,11 @@ namespace accessibility
class AccessibleListBoxEntry final : public ::cppu::BaseMutex
,public AccessibleListBoxEntry_BASE
,public ::comphelper::OCommonAccessibleText
- ,public ListBoxAccessibleBase
{
friend class AccessibleListBox;
private:
+ VclPtr<SvTreeListBox> m_pTreeListBox;
/** The treelistbox control */
std::deque< sal_Int32 > m_aEntryPath;
SvTreeListEntry* m_pSvLBoxEntry; // Needed for a11y focused item...
@@ -105,10 +104,9 @@ namespace accessibility
/** this function is called upon disposing the component
*/
- virtual void SAL_CALL disposing() override;
+ virtual void SAL_CALL disposing() override;
- // ListBoxAccessible/XComponent
- virtual void SAL_CALL dispose() final override;
+ DECL_LINK( WindowEventListener, VclWindowEvent&, void );
// OCommonAccessibleText
virtual OUString implGetText() override;
diff --git a/accessibility/inc/extended/listboxaccessible.hxx b/accessibility/inc/extended/listboxaccessible.hxx
deleted file mode 100644
index 377f0c92b7a6..000000000000
--- a/accessibility/inc/extended/listboxaccessible.hxx
+++ /dev/null
@@ -1,81 +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_ACCESSIBILITY_INC_EXTENDED_LISTBOXACCESSIBLE_HXX
-#define INCLUDED_ACCESSIBILITY_INC_EXTENDED_LISTBOXACCESSIBLE_HXX
-
-#include <tools/link.hxx>
-#include <vcl/vclptr.hxx>
-
-class SvTreeListBox;
-class VclSimpleEvent;
-class VclWindowEvent;
-
-namespace accessibility
-{
-
- /** helper class which couples its life time to the life time of an
- SvTreeListBox
- */
- class ListBoxAccessibleBase
- {
- private:
- VclPtr<SvTreeListBox> m_pWindow;
-
- protected:
- SvTreeListBox* getListBox() const
- {
- return const_cast< ListBoxAccessibleBase* >( this )->m_pWindow;
- }
-
- bool isAlive() const { return nullptr != m_pWindow; }
-
- public:
- ListBoxAccessibleBase( SvTreeListBox& _rWindow );
-
- protected:
- virtual ~ListBoxAccessibleBase( );
-
- /** will be called when our window broadcasts the VclEventId::ObjectDying event
-
- <p>Usually, you derive your class from both ListBoxAccessibleBase and XComponent,
- and call XComponent::dispose here.</p>
-
- @throws css::uno::RuntimeException
- */
- virtual void SAL_CALL dispose() = 0;
-
- /// to be called in the dispose method of your derived class
- void disposing();
-
- private:
- DECL_LINK( WindowEventListener, VclWindowEvent&, void );
-
- private:
- ListBoxAccessibleBase( const ListBoxAccessibleBase& ) = delete;
- ListBoxAccessibleBase& operator=( const ListBoxAccessibleBase& ) = delete;
- };
-
-
-} // namespace accessibility
-
-
-#endif // INCLUDED_ACCESSIBILITY_INC_EXTENDED_LISTBOXACCESSIBLE_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */