include/svtools/editbrowsebox.hxx | 5 +- solenv/clang-format/excludelist | 2 - svtools/source/brwbox/accessibleeditbrowseboxcell.hxx | 4 +- svtools/source/brwbox/editbrowsebox.cxx | 10 +---- svtools/source/brwbox/editbrowsebox2.cxx | 15 +++---- svtools/source/brwbox/editbrowseboximpl.hxx | 36 ------------------ 6 files changed, 15 insertions(+), 57 deletions(-)
New commits: commit 0ccd8cd083a820e8c7ee983d88c9ca3c55221506 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Fri Feb 7 18:13:49 2025 +0100 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Fri Feb 7 21:00:33 2025 +0100 browsebox a11y: Merge EditBrowseBoxImpl into EditBrowseBox EditBrowseBoxImpl just holds a reference to the accesssible object and a helper method to clear the reference. Move these directly into EditBrowseBox instead. Change-Id: I2ab6eae401e4924da4cade6583ca008c755cd6b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181221 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/include/svtools/editbrowsebox.hxx b/include/svtools/editbrowsebox.hxx index c82b39dd852c..ad9e2bd24546 100644 --- a/include/svtools/editbrowsebox.hxx +++ b/include/svtools/editbrowsebox.hxx @@ -886,7 +886,6 @@ namespace svt //= EditBrowseBox - class EditBrowseBoxImpl; class SVT_DLLPUBLIC EditBrowseBox: public BrowseBox { friend class EditBrowserHeader; @@ -956,7 +955,9 @@ namespace svt VclPtr<CheckBoxControl> pCheckBoxPaint; EditBrowseBoxFlags m_nBrowserFlags; - std::unique_ptr< EditBrowseBoxImpl> m_aImpl; + + css::uno::Reference<css::accessibility::XAccessible> m_xActiveCell; + void clearActiveCell(); protected: VclPtr<BrowserHeader> pHeader; diff --git a/svtools/source/brwbox/editbrowsebox.cxx b/svtools/source/brwbox/editbrowsebox.cxx index 8a740459daca..b88e5ed6cfce 100644 --- a/svtools/source/brwbox/editbrowsebox.cxx +++ b/svtools/source/brwbox/editbrowsebox.cxx @@ -28,7 +28,6 @@ #include <bitmaps.hlst> #include <algorithm> -#include "editbrowseboximpl.hxx" #include <com/sun/star/accessibility/AccessibleEventId.hpp> @@ -117,8 +116,6 @@ EditBrowseBox::EditBrowseBox( vcl::Window* pParent, EditBrowseBoxFlags nBrowserF ,m_nBrowserFlags(nBrowserFlags) ,pHeader(nullptr) { - m_aImpl.reset(new EditBrowseBoxImpl); - SetCompoundControl(true); ImplInitSettings(true, true, true); @@ -1011,11 +1008,10 @@ void EditBrowseBox::DeactivateCell(bool bUpdate) if (!IsEditing()) return; - if ( isAccessibleAlive() && m_aImpl->m_xActiveCell) + if (isAccessibleAlive() && m_xActiveCell.is()) { - css::uno::Reference<css::accessibility::XAccessible> xCell = m_aImpl->m_xActiveCell; - commitBrowseBoxEvent(AccessibleEventId::CHILD, Any(), Any(xCell)); - m_aImpl->clearActiveCell(); + commitBrowseBoxEvent(AccessibleEventId::CHILD, Any(), Any(m_xActiveCell)); + clearActiveCell(); } aOldController = aController; diff --git a/svtools/source/brwbox/editbrowsebox2.cxx b/svtools/source/brwbox/editbrowsebox2.cxx index 064c13e78c30..4396297ba700 100644 --- a/svtools/source/brwbox/editbrowsebox2.cxx +++ b/svtools/source/brwbox/editbrowsebox2.cxx @@ -20,7 +20,6 @@ #include <svtools/editbrowsebox.hxx> #include <com/sun/star/accessibility/XAccessible.hpp> #include <com/sun/star/accessibility/AccessibleEventId.hpp> -#include "editbrowseboximpl.hxx" #include <comphelper/types.hxx> #include <svtools/strings.hrc> #include <svtools/svtresid.hxx> @@ -62,9 +61,9 @@ sal_Int32 EditBrowseBox::GetAccessibleControlCount() const void EditBrowseBox::implCreateActiveAccessible( ) { DBG_ASSERT( IsEditing(), "EditBrowseBox::implCreateActiveAccessible: not to be called if we're not editing currently!" ); - DBG_ASSERT( !m_aImpl->m_xActiveCell.is(), "EditBrowseBox::implCreateActiveAccessible: not to be called if the old one is still alive!" ); + DBG_ASSERT( !m_xActiveCell.is(), "EditBrowseBox::implCreateActiveAccessible: not to be called if the old one is still alive!" ); - if ( m_aImpl->m_xActiveCell.is() || !IsEditing() ) + if (m_xActiveCell.is() || !IsEditing()) return; ControlBase& rControl = aController->GetWindow(); @@ -77,9 +76,9 @@ void EditBrowseBox::implCreateActiveAccessible( ) + ", " + SvtResId(STR_ACC_ROW_NUM).replaceAll("%ROWNUMBER", OUString::number(nRow)); rControl.SetAccessibleName(sAccName); - m_aImpl->m_xActiveCell = rControl.GetAccessible(); + m_xActiveCell = rControl.GetAccessible(); - commitBrowseBoxEvent(CHILD, Any(m_aImpl->m_xActiveCell), Any()); + commitBrowseBoxEvent(CHILD, Any(m_xActiveCell), Any()); } @@ -89,14 +88,14 @@ Reference< XAccessible > EditBrowseBox::CreateAccessibleControl( sal_Int32 _nInd if ( isAccessibleAlive() ) { - if ( !m_aImpl->m_xActiveCell.is() ) + if (!m_xActiveCell.is()) implCreateActiveAccessible(); } - return m_aImpl->m_xActiveCell; + return m_xActiveCell; } -void EditBrowseBoxImpl::clearActiveCell() { m_xActiveCell.clear(); } +void EditBrowseBox::clearActiveCell() { m_xActiveCell.clear(); } void EditBrowseBox::GrabTableFocus() { diff --git a/svtools/source/brwbox/editbrowseboximpl.hxx b/svtools/source/brwbox/editbrowseboximpl.hxx deleted file mode 100644 index 2add89544aa0..000000000000 --- a/svtools/source/brwbox/editbrowseboximpl.hxx +++ /dev/null @@ -1,36 +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 . - */ -#pragma once - -#include <com/sun/star/accessibility/XAccessible.hpp> -#include <com/sun/star/uno/Reference.hxx> - -namespace svt -{ - // impl class for the class EditBrowseBox - class EditBrowseBoxImpl - { - public: - css::uno::Reference<css::accessibility::XAccessible> m_xActiveCell; - - void clearActiveCell(); - }; -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ commit 4774bb6a64ef7f694c46657734e8ec1b6eb69a45 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Fri Feb 7 17:58:12 2025 +0100 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Fri Feb 7 21:00:27 2025 +0100 browsebox a11y: clang-format EditBrowseBoxTableCell Not much left to do after Change-Id: I5dfd2554d919babb3400967f8ffc0df5df3af53a Author: Michael Weghorn <m.wegh...@posteo.de> Date: Fri Feb 7 17:09:22 2025 +0100 browsebox a11y: Completely rework EditBrowseBoxTableCell any more, so clang-format 2 more lines and drop from the exclude list. Change-Id: I6e8283ffaff8dcd2a9a682bd8d74320164c18987 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181269 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist index 3b7235aecfee..a55868834074 100644 --- a/solenv/clang-format/excludelist +++ b/solenv/clang-format/excludelist @@ -10931,8 +10931,6 @@ svl/unx/source/svdde/ddedummy.cxx svtools/inc/strings.hxx svtools/inc/framestatuslistener.hxx svtools/langsupport/langsupport.cxx -svtools/source/brwbox/accessibleeditbrowseboxcell.cxx -svtools/source/brwbox/accessibleeditbrowseboxcell.hxx svtools/source/brwbox/brwbox1.cxx svtools/source/brwbox/brwbox2.cxx svtools/source/brwbox/brwbox3.cxx diff --git a/svtools/source/brwbox/accessibleeditbrowseboxcell.hxx b/svtools/source/brwbox/accessibleeditbrowseboxcell.hxx index b3efbe63f46b..17764ebbff98 100644 --- a/svtools/source/brwbox/accessibleeditbrowseboxcell.hxx +++ b/svtools/source/brwbox/accessibleeditbrowseboxcell.hxx @@ -39,8 +39,8 @@ public: virtual css::uno::Reference<css::accessibility::XAccessible> SAL_CALL getAccessibleParent() override; - EditBrowseBoxTableCell( const EditBrowseBoxTableCell& ) = delete; - EditBrowseBoxTableCell& operator=( const EditBrowseBoxTableCell& ) = delete; + EditBrowseBoxTableCell(const EditBrowseBoxTableCell&) = delete; + EditBrowseBoxTableCell& operator=(const EditBrowseBoxTableCell&) = delete; }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */