libreoffice/SOURCES/0001-Resolves-tdf-133411-dr...

1163 lines
48 KiB
Diff

From 0eab7dfc71e61c75d5c07093a95c64d05bc2f0c1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Wed, 27 May 2020 17:11:34 +0100
Subject: [PATCH] Resolves: tdf#133411 drop CONTENT_FLOWS_TO from dialog to
search results
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
in the document, looks like only the calc one actually works, and when
it works on large quantities of results calc grinds to a complete halt
This was introduced with:
commit b41332475783c31136673fb44cf4c411bb0148f8
Date: Mon Dec 2 15:54:29 2013 +0000
Integrate branch of IAccessible2
and has been a problem on and off with calc's potentially ~infinite grid
There is the on-by-default search results dialog in calc (which has a limit on
how many it shows) which provides an alternative route to iterate through the
results
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95006
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 0b94169d820482434dc98a37c3c1633ca46fd0dc)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95014
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
(cherry picked from commit f753baddc057a3bf4881ac78a15cd11fa847ee28)
Change-Id: I2685e480d2d15220be0bddbc83baad3992e7d5d1
---
include/comphelper/accflowenum.hxx | 34 ----
include/svx/srchdlg.hxx | 5 -
include/vcl/weld.hxx | 5 -
include/vcl/window.hxx | 4 -
.../ui/Accessibility/AccessibleDocument.cxx | 154 ------------------
sc/source/ui/inc/AccessibleDocument.hxx | 7 +-
sc/source/ui/view/tabvwshe.cxx | 40 +----
sd/IwyuFilter_sd.yaml | 1 -
.../AccessibleDocumentViewBase.cxx | 9 -
.../AccessibleDrawDocumentView.cxx | 151 -----------------
.../ui/inc/AccessibleDocumentViewBase.hxx | 7 +-
.../ui/inc/AccessibleDrawDocumentView.hxx | 6 -
sd/source/ui/view/Outliner.cxx | 11 --
svx/source/dialog/srchdlg.cxx | 57 -------
sw/source/core/access/accdoc.cxx | 121 --------------
sw/source/core/access/accdoc.hxx | 8 +-
sw/source/uibase/uiview/viewsrch.cxx | 38 -----
.../source/awt/vclxaccessiblecomponent.cxx | 3 -
vcl/inc/window.h | 1 -
vcl/source/app/salvtables.cxx | 10 --
vcl/source/window/window2.cxx | 15 --
vcl/unx/gtk3/gtk3gtkinst.cxx | 29 +---
22 files changed, 5 insertions(+), 711 deletions(-)
delete mode 100644 include/comphelper/accflowenum.hxx
diff --git a/include/comphelper/accflowenum.hxx b/include/comphelper/accflowenum.hxx
deleted file mode 100644
index fc6b7ea2d8ec..000000000000
--- a/include/comphelper/accflowenum.hxx
+++ /dev/null
@@ -1,34 +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_COMPHELPER_ACCFLOWENUM_HXX
-#define INCLUDED_COMPHELPER_ACCFLOWENUM_HXX
-
-#include <sal/types.h>
-
-enum AccessibilityFlowTo : sal_Int32
-{
- FORSPELLCHECKFLOWTO = 1,
- FORFINDREPLACEFLOWTO_ITEM = 2,
- FORFINDREPLACEFLOWTO_RANGE = 3
-};
-
-#endif // INCLUDED_COMPHELPER_ACCFLOWENUM_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/srchdlg.hxx b/include/svx/srchdlg.hxx
index 01f5b07663d5..3d1be499c399 100644
--- a/include/svx/srchdlg.hxx
+++ b/include/svx/srchdlg.hxx
@@ -126,16 +126,11 @@ public:
TransliterationFlags GetTransliterationFlags() const;
- void SetDocWin(vcl::Window* pDocWin, SvxSearchCmd eCommand);
- void SetSrchFlag( bool bSuccess ) { mbSuccess = bSuccess; }
- bool GetSrchFlag() { return mbSuccess; }
void SetSaveToModule(bool b);
void SetSearchLabel(const OUString& rStr);
private:
- bool mbSuccess;
-
SfxBindings& rBindings;
bool bWriter;
bool bSearch;
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index b6c4c22d502c..bd76a44c846e 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -147,11 +147,6 @@ public:
virtual void set_accessible_relation_labeled_by(weld::Widget* pLabel) = 0;
virtual void set_accessible_relation_label_for(weld::Widget* pLabeled) = 0;
- virtual void
- add_extra_accessible_relation(const css::accessibility::AccessibleRelation& rRelation)
- = 0;
- virtual void clear_extra_accessible_relations() = 0;
-
virtual void set_tooltip_text(const OUString& rTip) = 0;
virtual OUString get_tooltip_text() const = 0;
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index 3b28f9a503a0..a4965b2acab8 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -1253,10 +1253,6 @@ public:
void SetAccessibleRelationMemberOf( vcl::Window* pMemberOf );
vcl::Window* GetAccessibleRelationMemberOf() const;
- void AddExtraAccessibleRelation(const css::accessibility::AccessibleRelation &rRelation);
- const std::vector<css::accessibility::AccessibleRelation>& GetExtraAccessibleRelations() const;
- void ClearExtraAccessibleRelations();
-
// to avoid sending accessibility events in cases like closing dialogs
// by default checks complete parent path
bool IsAccessibilityEventsSuppressed( bool bTraverseParentPath = true );
diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx
index a63e419754be..8273d78dc8d3 100644
--- a/sc/source/ui/Accessibility/AccessibleDocument.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx
@@ -52,7 +52,6 @@
#include <svx/AccessibleShapeTreeInfo.hxx>
#include <svx/AccessibleShapeInfo.hxx>
#include <svx/IAccessibleParent.hxx>
-#include <comphelper/accflowenum.hxx>
#include <comphelper/sequence.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/docfile.hxx>
@@ -1607,13 +1606,6 @@ void SAL_CALL ScAccessibleDocument::selectionChanged( const lang::EventObject& /
uno::Any SAL_CALL ScAccessibleDocument::queryInterface( uno::Type const & rType )
{
- uno::Any aAnyTmp;
- if(rType == cppu::UnoType<XAccessibleGetAccFlowTo>::get())
- {
- css::uno::Reference<XAccessibleGetAccFlowTo> AccFromXShape = this;
- aAnyTmp <<= AccFromXShape;
- return aAnyTmp;
- }
uno::Any aAny (ScAccessibleDocumentImpl::queryInterface(rType));
return aAny.hasValue() ? aAny : ScAccessibleContextBase::queryInterface(rType);
}
@@ -2232,152 +2224,6 @@ uno::Any SAL_CALL ScAccessibleDocument::getExtendedAttributes()
return anyAtrribute;
}
-css::uno::Sequence< css::uno::Any > ScAccessibleDocument::GetScAccFlowToSequence()
-{
- if ( getAccessibleChildCount() )
- {
- uno::Reference < XAccessible > xSCTableAcc = getAccessibleChild( 0 ); // table
- if ( xSCTableAcc.is() )
- {
- uno::Reference < XAccessibleSelection > xAccSelection( xSCTableAcc, uno::UNO_QUERY );
- sal_Int32 nSelCount = xAccSelection->getSelectedAccessibleChildCount();
- if( nSelCount )
- {
- uno::Reference < XAccessible > xSel = xAccSelection->getSelectedAccessibleChild( 0 ); // selected cell
- if ( xSel.is() )
- {
- uno::Reference < XAccessibleContext > xSelContext( xSel->getAccessibleContext() );
- if ( xSelContext.is() )
- {
- if ( xSelContext->getAccessibleRole() == AccessibleRole::TABLE_CELL )
- {
- sal_Int32 nParaCount = 0;
- uno::Sequence <uno::Any> aSequence(nSelCount);
- for ( sal_Int32 i = 0; i < nSelCount; i++ )
- {
- xSel = xAccSelection->getSelectedAccessibleChild( i ) ;
- if ( xSel.is() )
- {
- xSelContext = xSel->getAccessibleContext();
- if ( xSelContext.is() )
- {
- if ( xSelContext->getAccessibleRole() == AccessibleRole::TABLE_CELL )
- {
- aSequence[nParaCount] <<= xSel;
- nParaCount++;
- }
- }
- }
- }
- return aSequence;
- }
- }
- }
- }
- }
- }
- uno::Sequence <uno::Any> aEmpty;
- return aEmpty;
-}
-
-css::uno::Sequence< css::uno::Any >
- SAL_CALL ScAccessibleDocument::getAccFlowTo(const css::uno::Any& rAny, sal_Int32 nType)
-{
- SolarMutexGuard g;
-
- if (nType == AccessibilityFlowTo::FORSPELLCHECKFLOWTO)
- {
- uno::Reference< css::drawing::XShape > xShape;
- rAny >>= xShape;
- if ( xShape.is() )
- {
- uno::Reference < XAccessible > xAcc = mpChildrenShapes->GetAccessibleCaption(xShape);
- uno::Reference < XAccessibleSelection > xAccSelection( xAcc, uno::UNO_QUERY );
- if ( xAccSelection.is() )
- {
- if ( xAccSelection->getSelectedAccessibleChildCount() )
- {
- uno::Reference < XAccessible > xSel = xAccSelection->getSelectedAccessibleChild( 0 );
- if ( xSel.is() )
- {
- uno::Reference < XAccessibleContext > xSelContext( xSel->getAccessibleContext() );
- if ( xSelContext.is() )
- {
- //if in sw we find the selected paragraph here
- if ( xSelContext->getAccessibleRole() == AccessibleRole::PARAGRAPH )
- {
- uno::Sequence<uno::Any> aRet( 1 );
- aRet[0] <<= xSel;
- return aRet;
- }
- }
- }
- }
- }
- }
- else
- {
- if ( getSelectedAccessibleChildCount() )
- {
- uno::Reference < XAccessible > xSel = getSelectedAccessibleChild( 0 );
- if ( xSel.is() )
- {
- uno::Reference < XAccessibleContext > xSelContext( xSel->getAccessibleContext() );
- if ( xSelContext.is() )
- {
- uno::Reference < XAccessibleSelection > xAccChildSelection( xSel, uno::UNO_QUERY );
- if ( xAccChildSelection.is() )
- {
- if ( xAccChildSelection->getSelectedAccessibleChildCount() )
- {
- uno::Reference < XAccessible > xChildSel = xAccChildSelection->getSelectedAccessibleChild( 0 );
- if ( xChildSel.is() )
- {
- uno::Reference < css::accessibility::XAccessibleContext > xChildSelContext( xChildSel->getAccessibleContext() );
- if ( xChildSelContext.is() &&
- xChildSelContext->getAccessibleRole() == css::accessibility::AccessibleRole::PARAGRAPH )
- {
- uno::Sequence<uno::Any> aRet( 1 );
- aRet[0] <<= xChildSel;
- return aRet;
- }
- }
- }
- }
- }
- }
- }
- }
- }
- else if (nType == AccessibilityFlowTo::FORFINDREPLACEFLOWTO_ITEM || nType == AccessibilityFlowTo::FORFINDREPLACEFLOWTO_RANGE)
- {
- bool bSuccess(false);
- rAny >>= bSuccess;
- if ( bSuccess )
- {
- if (nType == AccessibilityFlowTo::FORFINDREPLACEFLOWTO_RANGE)
- {
- uno::Sequence< uno::Any> aSeq = GetScAccFlowToSequence();
- if ( aSeq.hasElements() )
- {
- return aSeq;
- }
- }
-
- if( mpAccessibleSpreadsheet.is() )
- {
- uno::Reference < XAccessible > xFindCellAcc = mpAccessibleSpreadsheet->GetActiveCell();
- // add xFindCellAcc to the return the Sequence
- uno::Sequence< uno::Any> aSeq2(1);
- aSeq2[0] <<= xFindCellAcc;
- return aSeq2;
- }
- }
- }
- uno::Sequence< uno::Any> aEmpty;
- return aEmpty;
-}
-
sal_Int32 SAL_CALL ScAccessibleDocument::getForeground( )
{
return sal_Int32(COL_BLACK);
diff --git a/sc/source/ui/inc/AccessibleDocument.hxx b/sc/source/ui/inc/AccessibleDocument.hxx
index c3441465121c..e2598051974c 100644
--- a/sc/source/ui/inc/AccessibleDocument.hxx
+++ b/sc/source/ui/inc/AccessibleDocument.hxx
@@ -26,7 +26,6 @@
#include <com/sun/star/view/XSelectionChangeListener.hpp>
#include <cppuhelper/implbase3.hxx>
#include <com/sun/star/accessibility/XAccessibleExtendedAttributes.hpp>
-#include <com/sun/star/accessibility/XAccessibleGetAccFlowTo.hpp>
#include <svx/IAccessibleViewForwarder.hxx>
class ScTabViewShell;
@@ -52,7 +51,6 @@ typedef cppu::ImplHelper3< css::accessibility::XAccessibleSelection,
class ScAccessibleDocument
: public ScAccessibleDocumentBase,
public ScAccessibleDocumentImpl,
- public css::accessibility::XAccessibleGetAccFlowTo,
public accessibility::IAccessibleViewForwarder
{
public:
@@ -257,11 +255,8 @@ private:
public:
ScDocument *GetDocument() const ;
ScAddress GetCurCellAddress() const;
- //===== XAccessibleGetAccFromXShape ============================================
- css::uno::Sequence< css::uno::Any >
- SAL_CALL getAccFlowTo(const css::uno::Any& rAny, sal_Int32 nType) override;
- virtual sal_Int32 SAL_CALL getForeground( ) override;
+ virtual sal_Int32 SAL_CALL getForeground( ) override;
virtual sal_Int32 SAL_CALL getBackground( ) override;
};
diff --git a/sc/source/ui/view/tabvwshe.cxx b/sc/source/ui/view/tabvwshe.cxx
index 516cb11e3cba..23e84b6f6dfe 100644
--- a/sc/source/ui/view/tabvwshe.cxx
+++ b/sc/source/ui/view/tabvwshe.cxx
@@ -232,26 +232,7 @@ void ScTabViewShell::ExecSearch( SfxRequest& rReq )
const SvxSearchItem* pSearchItem = static_cast<const SvxSearchItem*>(pItem);
ScGlobal::SetSearchItem( *pSearchItem );
- bool bSuccess = SearchAndReplace( pSearchItem, true, rReq.IsAPI() );
- SfxChildWindow* pChildWindow = SfxViewFrame::Current()->GetChildWindow(
- SvxSearchDialogWrapper::GetChildWindowId());
- if (pChildWindow)
- {
- SvxSearchDialog* pSearchDlg = static_cast<SvxSearchDialog*>(pChildWindow->GetController().get());
- if( pSearchDlg )
- {
- ScTabView* pTabView = GetViewData().GetView();
- if( pTabView )
- {
- vcl::Window* pWin = pTabView->GetActiveWin();
- if( pWin )
- {
- pSearchDlg->SetDocWin( pWin, pSearchItem->GetCommand() );
- pSearchDlg->SetSrchFlag( bSuccess );
- }
- }
- }
- }
+ SearchAndReplace( pSearchItem, true, rReq.IsAPI() );
rReq.Done();
}
}
@@ -303,25 +284,6 @@ void ScTabViewShell::ExecSearch( SfxRequest& rReq )
rReq.IsAPI() ? SfxCallMode::API|SfxCallMode::SYNCHRON :
SfxCallMode::RECORD,
{ &aSearchItem });
- SfxChildWindow* pChildWindow = SfxViewFrame::Current()->GetChildWindow(
- SvxSearchDialogWrapper::GetChildWindowId());
- if (pChildWindow)
- {
- SvxSearchDialog* pSearchDlg = static_cast<SvxSearchDialog*>(pChildWindow->GetController().get());
- if( pSearchDlg )
- {
- ScTabView* pTabView = GetViewData().GetView();
- if( pTabView )
- {
- vcl::Window* pWin = pTabView->GetActiveWin();
- if( pWin )
- {
- pSearchDlg->SetDocWin( pWin, aSearchItem.GetCommand() );
- pSearchDlg->SetSrchFlag(false);
- }
- }
- }
- }
}
else
{
diff --git a/sd/IwyuFilter_sd.yaml b/sd/IwyuFilter_sd.yaml
index 930f081dd117..f1573298c194 100644
--- a/sd/IwyuFilter_sd.yaml
+++ b/sd/IwyuFilter_sd.yaml
@@ -145,7 +145,6 @@ blacklist:
sd/source/ui/inc/AccessibleDocumentViewBase.hxx:
# base class has to be a complete type
- com/sun/star/accessibility/XAccessibleExtendedAttributes.hpp
- - com/sun/star/accessibility/XAccessibleGetAccFlowTo.hpp
- com/sun/star/awt/XFocusListener.hpp
- com/sun/star/awt/XWindowListener.hpp
- com/sun/star/beans/XPropertyChangeListener.hpp
diff --git a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
index c271e70718cb..60cff2911b8b 100644
--- a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
+++ b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
@@ -381,7 +381,6 @@ uno::Any SAL_CALL
static_cast<awt::XWindowListener*>(this),
static_cast<awt::XFocusListener*>(this)
,static_cast<XAccessibleExtendedAttributes*>(this)
- ,static_cast<XAccessibleGetAccFlowTo*>(this)
);
return aReturn;
}
@@ -765,14 +764,6 @@ uno::Any SAL_CALL AccessibleDocumentViewBase::getExtendedAttributes()
return anyAtrribute;
}
-css::uno::Sequence< css::uno::Any >
- SAL_CALL AccessibleDocumentViewBase::getAccFlowTo(const css::uno::Any&, sal_Int32 )
-{
- css::uno::Sequence< uno::Any> aRet;
-
- return aRet;
-}
-
sal_Int32 SAL_CALL AccessibleDocumentViewBase::getForeground( )
{
return sal_Int32(COL_BLACK);
diff --git a/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx b/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx
index e178d93e7baf..6b644bc439d7 100644
--- a/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx
+++ b/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx
@@ -30,7 +30,6 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/view/XSelectionSupplier.hpp>
#include <cppuhelper/queryinterface.hxx>
-#include <comphelper/accflowenum.hxx>
#include <comphelper/processfactory.hxx>
#include <sal/log.hxx>
#include <tools/debug.hxx>
@@ -739,156 +738,6 @@ void SAL_CALL AccessibleDrawDocumentView::disposing()
AccessibleDocumentViewBase::disposing ();
}
-css::uno::Sequence< css::uno::Any >
- SAL_CALL AccessibleDrawDocumentView::getAccFlowTo(const css::uno::Any& rAny, sal_Int32 nType)
-{
- SolarMutexGuard g;
-
- if (nType == AccessibilityFlowTo::FORSPELLCHECKFLOWTO)
- {
- uno::Reference< css::drawing::XShape > xShape;
- rAny >>= xShape;
- if ( mpChildrenManager && xShape.is() )
- {
- uno::Reference < XAccessible > xAcc = mpChildrenManager->GetChild(xShape);
- uno::Reference < XAccessibleSelection > xAccSelection( xAcc, uno::UNO_QUERY );
- if ( xAccSelection.is() )
- {
- if ( xAccSelection->getSelectedAccessibleChildCount() )
- {
- uno::Reference < XAccessible > xSel = xAccSelection->getSelectedAccessibleChild( 0 );
- if ( xSel.is() )
- {
- uno::Reference < XAccessibleContext > xSelContext( xSel->getAccessibleContext() );
- if ( xSelContext.is() )
- {
- //if in sw we find the selected paragraph here
- if ( xSelContext->getAccessibleRole() == AccessibleRole::PARAGRAPH )
- {
- uno::Sequence<uno::Any> aRet( 1 );
- aRet[0] <<= xSel;
- return aRet;
- }
- }
- }
- }
- }
- uno::Reference<XAccessible> xPara = GetSelAccContextInTable();
- if ( xPara.is() )
- {
- uno::Sequence<uno::Any> aRet( 1 );
- aRet[0] <<= xPara;
- return aRet;
- }
- }
- else
- {
- goto Rt;
- }
- }
- else if (nType == AccessibilityFlowTo::FORFINDREPLACEFLOWTO_ITEM || nType == AccessibilityFlowTo::FORFINDREPLACEFLOWTO_RANGE)
- {
- sal_Int32 nChildCount = getSelectedAccessibleChildCount();
- if ( nChildCount )
- {
- uno::Reference < XAccessible > xSel = getSelectedAccessibleChild( 0 );
- if ( xSel.is() )
- {
- uno::Reference < XAccessibleSelection > xAccChildSelection( xSel, uno::UNO_QUERY );
- if ( xAccChildSelection.is() )
- {
- if ( xAccChildSelection->getSelectedAccessibleChildCount() )
- {
- uno::Reference < XAccessible > xChildSel = xAccChildSelection->getSelectedAccessibleChild( 0 );
- if ( xChildSel.is() )
- {
- uno::Reference < XAccessibleContext > xChildSelContext( xChildSel->getAccessibleContext() );
- if ( xChildSelContext.is() &&
- xChildSelContext->getAccessibleRole() == AccessibleRole::PARAGRAPH )
- {
- uno::Sequence<uno::Any> aRet( 1 );
- aRet[0] <<= xChildSel;
- return aRet;
- }
- }
- }
- }
- }
- }
- else
- {
- uno::Reference<XAccessible> xPara = GetSelAccContextInTable();
- if ( xPara.is() )
- {
- uno::Sequence<uno::Any> aRet( 1 );
- aRet[0] <<= xPara;
- return aRet;
- }
- }
- }
-
-Rt:
- css::uno::Sequence< uno::Any> aRet;
- return aRet;
-}
-uno::Reference<XAccessible> AccessibleDrawDocumentView::GetSelAccContextInTable()
-{
- uno::Reference<XAccessible> xRet;
- sal_Int32 nCount = mpChildrenManager ? mpChildrenManager->GetChildCount() : 0;
- if ( nCount )
- {
- for ( sal_Int32 i = 0; i < nCount; i++ )
- {
- try
- {
- uno::Reference<XAccessible> xObj = mpChildrenManager->GetChild(i);
- if ( xObj.is() )
- {
- uno::Reference<XAccessibleContext> xObjContext( xObj, uno::UNO_QUERY );
- if ( xObjContext.is() && xObjContext->getAccessibleRole() == AccessibleRole::TABLE )
- {
- uno::Reference<XAccessibleSelection> xObjSelection( xObj, uno::UNO_QUERY );
- if ( xObjSelection.is() && xObjSelection->getSelectedAccessibleChildCount() )
- {
- uno::Reference<XAccessible> xCell = xObjSelection->getSelectedAccessibleChild(0);
- if ( xCell.is() )
- {
- uno::Reference<XAccessibleSelection> xCellSel( xCell, uno::UNO_QUERY );
- if ( xCellSel.is() && xCellSel->getSelectedAccessibleChildCount() )
- {
- uno::Reference<XAccessible> xPara = xCellSel->getSelectedAccessibleChild( 0 );
- if ( xPara.is() )
- {
- uno::Reference<XAccessibleContext> xParaContext( xPara, uno::UNO_QUERY );
- if ( xParaContext.is() &&
- xParaContext->getAccessibleRole() == AccessibleRole::PARAGRAPH )
- {
- xRet = xPara;
- return xRet;
- }
- }
- }
- }
- }
- }
- }
- }
- catch (const lang::IndexOutOfBoundsException&)
- {
- uno::Reference<XAccessible> xEmpty;
- return xEmpty;
- }
- catch (const uno::RuntimeException&)
- {
- uno::Reference<XAccessible> xEmpty;
- return xEmpty;
- }
- }
- }
-
- return xRet;
-}
-
void AccessibleDrawDocumentView::UpdateAccessibleName()
{
OUString sNewName (CreateAccessibleName());
diff --git a/sd/source/ui/inc/AccessibleDocumentViewBase.hxx b/sd/source/ui/inc/AccessibleDocumentViewBase.hxx
index ee2acf119ce4..b29cc9533757 100644
--- a/sd/source/ui/inc/AccessibleDocumentViewBase.hxx
+++ b/sd/source/ui/inc/AccessibleDocumentViewBase.hxx
@@ -33,7 +33,6 @@
#include <tools/link.hxx>
#include <com/sun/star/accessibility/XAccessibleExtendedAttributes.hpp>
-#include <com/sun/star/accessibility/XAccessibleGetAccFlowTo.hpp>
#include "Window.hxx"
@@ -87,8 +86,7 @@ class AccessibleDocumentViewBase
public css::beans::XPropertyChangeListener,
public css::awt::XWindowListener,
public css::awt::XFocusListener,
- public css::accessibility::XAccessibleExtendedAttributes,
- public css::accessibility::XAccessibleGetAccFlowTo
+ public css::accessibility::XAccessibleExtendedAttributes
{
public:
//===== internal ========================================================
@@ -313,9 +311,6 @@ protected:
*/
void SetAccessibleOLEObject (
const css::uno::Reference<css::accessibility::XAccessible>& xOLEObject);
- //===== XAccessibleGetAccFromXShape ============================================
- css::uno::Sequence< css::uno::Any >
- SAL_CALL getAccFlowTo(const css::uno::Any& rAny, sal_Int32 nType) override;
public:
void SwitchViewActivated() { Activated(); }
diff --git a/sd/source/ui/inc/AccessibleDrawDocumentView.hxx b/sd/source/ui/inc/AccessibleDrawDocumentView.hxx
index fd8b42f7161f..15097459bf76 100644
--- a/sd/source/ui/inc/AccessibleDrawDocumentView.hxx
+++ b/sd/source/ui/inc/AccessibleDrawDocumentView.hxx
@@ -158,12 +158,6 @@ private:
virtual void impl_dispose() override;
- //===== XAccessibleGetAccFromXShape ============================================
- css::uno::Sequence< css::uno::Any >
- SAL_CALL getAccFlowTo(const css::uno::Any& rAny, sal_Int32 nType) override;
- css::uno::Reference< css::accessibility::XAccessible >
- GetSelAccContextInTable();
-
void UpdateAccessibleName();
};
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index f2094296fa0f..71e4391e3d7a 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -501,17 +501,6 @@ bool SdOutliner::StartSearchAndReplace (const SvxSearchItem* pSearchItem)
}
mnStartPageIndex = sal_uInt16(-1);
}
-
- SfxChildWindow *pChildWin =
- SfxViewFrame::Current()->GetChildWindow(
- SvxSearchDialogWrapper::GetChildWindowId());
- if (pChildWin)
- {
- SvxSearchDialog* pSearchDlg =
- static_cast<SvxSearchDialog*>(pChildWin->GetController().get());
- pSearchDlg->SetDocWin( pViewShell->GetActiveWindow(), nCommand );
- pSearchDlg->SetSrchFlag(false);
- }
}
else
mpDrawDocument->GetDocSh()->SetWaitCursor( false );
diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
index 445bc318718b..7501bcb6f9fd 100644
--- a/svx/source/dialog/srchdlg.cxx
+++ b/svx/source/dialog/srchdlg.cxx
@@ -36,9 +36,6 @@
#include <svl/cjkoptions.hxx>
#include <svl/ctloptions.hxx>
#include <com/sun/star/awt/XWindow.hpp>
-#include <com/sun/star/accessibility/AccessibleRelation.hpp>
-#include <com/sun/star/accessibility/AccessibleRelationType.hpp>
-#include <com/sun/star/accessibility/XAccessibleGetAccFlowTo.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/frame/XDispatch.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
@@ -48,7 +45,6 @@
#include <com/sun/star/configuration/theDefaultProvider.hpp>
#include <com/sun/star/frame/ModuleManager.hpp>
#include <com/sun/star/ui/XUIElement.hpp>
-#include <comphelper/accflowenum.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/scopeguard.hxx>
#include <svl/itempool.hxx>
@@ -263,7 +259,6 @@ void SearchAttrItemList::Remove(size_t nPos)
SvxSearchDialog::SvxSearchDialog(weld::Window* pParent, SfxChildWindow* pChildWin, SfxBindings& rBind)
: SfxModelessDialogController(&rBind, pChildWin, pParent,
"svx/ui/findreplacedialog.ui", "FindReplaceDialog")
- , mbSuccess(false)
, rBindings(rBind)
, bWriter(false)
, bSearch(true)
@@ -2292,58 +2287,6 @@ void SvxSearchDialog::SaveToModule_Impl()
rBindings.GetDispatcher()->Execute( SID_SEARCH_ITEM, SfxCallMode::SLOT, ppArgs );
}
-void SvxSearchDialog::SetDocWin(vcl::Window* pDocWin, SvxSearchCmd eCommand)
-{
- m_xDialog->clear_extra_accessible_relations();
-
- if (!pDocWin)
- return;
-
- Reference<css::accessibility::XAccessible> xDocAcc = pDocWin->GetAccessible();
- if (!xDocAcc.is())
- {
- return;
- }
- Reference<css::accessibility::XAccessibleGetAccFlowTo> xGetAccFlowTo(xDocAcc, UNO_QUERY);
- if (!xGetAccFlowTo.is())
- {
- return;
- }
-
- /* tdf#128313 FlowTo tries to set an a11y relation between the search dialog
- and its results. But for "find/replace" within a calc column we don't
- want to return the entire column as the result, we want the current cell.
-
- But with search/all we do want the new multi-cellselection as the result.
- */
- AccessibilityFlowTo eFlowTo(AccessibilityFlowTo::FORFINDREPLACEFLOWTO_ITEM);
- switch (eCommand)
- {
- case SvxSearchCmd::FIND:
- case SvxSearchCmd::REPLACE:
- eFlowTo = AccessibilityFlowTo::FORFINDREPLACEFLOWTO_ITEM;
- break;
- case SvxSearchCmd::FIND_ALL:
- case SvxSearchCmd::REPLACE_ALL:
- eFlowTo = AccessibilityFlowTo::FORFINDREPLACEFLOWTO_RANGE;
- break;
- }
- uno::Sequence<uno::Any> aAnySeq = xGetAccFlowTo->getAccFlowTo(Any(GetSrchFlag()), eFlowTo);
-
- sal_Int32 nLen = aAnySeq.getLength();
- if (nLen)
- {
- uno::Sequence<uno::Reference<uno::XInterface>> aSequence(nLen);
- for (sal_Int32 i = 0; i < nLen; ++i)
- {
- uno::Reference < css::accessibility::XAccessible > xAcc;
- aAnySeq[i] >>= xAcc;
- aSequence[i] = xAcc;
- }
- m_xDialog->add_extra_accessible_relation(css::accessibility::AccessibleRelation(css::accessibility::AccessibleRelationType::CONTENT_FLOWS_TO, aSequence));
- }
-}
-
short SvxSearchDialog::executeSubDialog(VclAbstractDialog * dialog) {
assert(!m_executingSubDialog);
comphelper::ScopeGuard g([this] { m_executingSubDialog = false; });
diff --git a/sw/source/core/access/accdoc.cxx b/sw/source/core/access/accdoc.cxx
index 4f7f2a81a158..827e4ba0ad16 100644
--- a/sw/source/core/access/accdoc.cxx
+++ b/sw/source/core/access/accdoc.cxx
@@ -24,7 +24,6 @@
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
-#include <comphelper/accflowenum.hxx>
#include <unotools/accessiblestatesethelper.hxx>
#include <cppuhelper/typeprovider.hxx>
#include <sfx2/viewsh.hxx>
@@ -459,11 +458,6 @@ uno::Any SwAccessibleDocument::queryInterface(
uno::Reference<XAccessibleExtendedAttributes> aAttribute = this;
aRet <<= aAttribute;
}
- else if(rType == cppu::UnoType<XAccessibleGetAccFlowTo>::get())
- {
- uno::Reference<XAccessibleGetAccFlowTo> AccFlowTo = this;
- aRet <<= AccFlowTo;
- }
else
aRet = SwAccessibleContext::queryInterface( rType );
return aRet;
@@ -758,119 +752,4 @@ sal_Int32 SAL_CALL SwAccessibleDocument::getBackground()
return sal_Int32(SW_MOD()->GetColorConfig().GetColorValue( ::svtools::DOCCOLOR ).nColor);
}
-css::uno::Sequence< css::uno::Any >
- SAL_CALL SwAccessibleDocument::getAccFlowTo(const css::uno::Any& rAny, sal_Int32 nType)
-{
- SolarMutexGuard g;
-
- SwAccessibleMap* pAccMap = GetMap();
- if ( !pAccMap )
- {
- return uno::Sequence< uno::Any >();
- }
-
- if (nType == AccessibilityFlowTo::FORSPELLCHECKFLOWTO)
- {
- uno::Reference< css::drawing::XShape > xShape;
- rAny >>= xShape;
- if( xShape.is() )
- {
- SdrObject* pObj = GetSdrObjectFromXShape(xShape);
- if( pObj )
- {
- uno::Reference<XAccessible> xAcc = pAccMap->GetContext(pObj, this, false);
- uno::Reference < XAccessibleSelection > xAccSelection( xAcc, uno::UNO_QUERY );
- if ( xAccSelection.is() )
- {
- try
- {
- if ( xAccSelection->getSelectedAccessibleChildCount() )
- {
- uno::Reference < XAccessible > xSel = xAccSelection->getSelectedAccessibleChild( 0 );
- if ( xSel.is() )
- {
- uno::Reference < XAccessibleContext > xSelContext( xSel->getAccessibleContext() );
- if ( xSelContext.is() )
- {
- //if in sw we find the selected paragraph here
- if ( xSelContext->getAccessibleRole() == AccessibleRole::PARAGRAPH )
- {
- uno::Sequence<uno::Any> aRet( 1 );
- aRet[0] <<= xSel;
- return aRet;
- }
- }
- }
- }
- }
- catch ( const css::lang::IndexOutOfBoundsException& )
- {
- return uno::Sequence< uno::Any >();
- }
- //end of try...catch
- }
- }
- }
- else
- {
- uno::Reference< XAccessible > xAcc = pAccMap->GetCursorContext();
- SwAccessibleContext *pAccImpl = static_cast< SwAccessibleContext *>( xAcc.get() );
- if ( pAccImpl && pAccImpl->getAccessibleRole() == AccessibleRole::PARAGRAPH )
- {
- uno::Sequence< uno::Any > aRet(1);
- aRet[0] <<= xAcc;
- return aRet;
- }
- }
- }
- else if (nType == AccessibilityFlowTo::FORFINDREPLACEFLOWTO_ITEM || nType == AccessibilityFlowTo::FORFINDREPLACEFLOWTO_RANGE)
- {
- SwCursorShell* pCursorShell = GetCursorShell();
- if ( pCursorShell )
- {
- SwPaM *_pStartCursor = pCursorShell->GetCursor(), *_pStartCursor2 = _pStartCursor;
- std::set<SwFrame*> vFrameList;
- do
- {
- if ( _pStartCursor && _pStartCursor->HasMark() )
- {
- SwContentNode* pContentNode = _pStartCursor->GetContentNode();
- SwFrame *const pFrame = pContentNode
- ? pContentNode->getLayoutFrame(pCursorShell->GetLayout(), _pStartCursor->GetPoint())
- : nullptr;
- if ( pFrame )
- {
- vFrameList.insert( pFrame );
- }
- }
- }
-
- while( _pStartCursor && ( (_pStartCursor = _pStartCursor->GetNext()) != _pStartCursor2) );
-
- if ( !vFrameList.empty() )
- {
- uno::Sequence< uno::Any > aRet(vFrameList.size());
- sal_Int32 nIndex = 0;
- for ( const auto& rpFrame : vFrameList )
- {
- uno::Reference< XAccessible > xAcc = pAccMap->GetContext(rpFrame, false);
- if ( xAcc.is() )
- {
- SwAccessibleContext *pAccImpl = static_cast< SwAccessibleContext *>( xAcc.get() );
- if ( pAccImpl && pAccImpl->getAccessibleRole() == AccessibleRole::PARAGRAPH )
- {
- aRet[nIndex] <<= xAcc;
- }
- }
- nIndex++;
- }
-
- return aRet;
- }
- }
- }
-
- return uno::Sequence< uno::Any >();
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/access/accdoc.hxx b/sw/source/core/access/accdoc.hxx
index e815ebf3682d..3dc43bc6b6eb 100644
--- a/sw/source/core/access/accdoc.hxx
+++ b/sw/source/core/access/accdoc.hxx
@@ -23,7 +23,6 @@
#include "acccontext.hxx"
#include <com/sun/star/accessibility/XAccessibleSelection.hpp>
#include <com/sun/star/accessibility/XAccessibleExtendedAttributes.hpp>
-#include <com/sun/star/accessibility/XAccessibleGetAccFlowTo.hpp>
#include "accselectionhelper.hxx"
// base class for SwAccessibleDocument (in this same header file) and
@@ -92,8 +91,7 @@ public:
*/
class SwAccessibleDocument : public SwAccessibleDocumentBase,
public css::accessibility::XAccessibleSelection,
- public css::accessibility::XAccessibleExtendedAttributes,
- public css::accessibility::XAccessibleGetAccFlowTo
+ public css::accessibility::XAccessibleExtendedAttributes
{
// Implementation for XAccessibleSelection interface
SwAccessibleSelectionHelper maSelectionHelper;
@@ -170,10 +168,6 @@ public:
// XAccessibleComponent
sal_Int32 SAL_CALL getBackground() override;
-
- // XAccessibleGetAccFlowTo
- css::uno::Sequence< css::uno::Any >
- SAL_CALL getAccFlowTo(const css::uno::Any& rAny, sal_Int32 nType) override;
};
#endif
diff --git a/sw/source/uibase/uiview/viewsrch.cxx b/sw/source/uibase/uiview/viewsrch.cxx
index 9bc9944ca36c..2370430d712d 100644
--- a/sw/source/uibase/uiview/viewsrch.cxx
+++ b/sw/source/uibase/uiview/viewsrch.cxx
@@ -249,16 +249,6 @@ void SwView::ExecSearch(SfxRequest& rReq)
lcl_emitSearchResultCallbacks(s_pSrchItem, m_pWrtShell.get(), /* bHighlightAll = */ false);
}
rReq.SetReturnValue(SfxBoolItem(nSlot, bRet));
-#if HAVE_FEATURE_DESKTOP
- {
- pSrchDlg = GetSearchDialog();
- if (pSrchDlg)
- {
- pSrchDlg->SetDocWin(m_pEditWin, eCommand);
- pSrchDlg->SetSrchFlag(false);
- }
- }
-#endif
}
break;
case SvxSearchCmd::FIND_ALL:
@@ -282,16 +272,6 @@ void SwView::ExecSearch(SfxRequest& rReq)
else if (comphelper::LibreOfficeKit::isActive())
lcl_emitSearchResultCallbacks(s_pSrchItem, m_pWrtShell.get(), /* bHighlightAll = */ true);
rReq.SetReturnValue(SfxBoolItem(nSlot, bRet));
-#if HAVE_FEATURE_DESKTOP
- {
- pSrchDlg = GetSearchDialog();
- if (pSrchDlg)
- {
- pSrchDlg->SetDocWin(m_pEditWin, eCommand);
- pSrchDlg->SetSrchFlag(false);
- }
- }
-#endif
}
break;
case SvxSearchCmd::REPLACE:
@@ -340,16 +320,6 @@ void SwView::ExecSearch(SfxRequest& rReq)
s_pSrchItem->SetCommand( nOldCmd );
rReq.SetReturnValue(SfxBoolItem(nSlot, bRet));
}
-#if HAVE_FEATURE_DESKTOP
- {
- pSrchDlg = GetSearchDialog();
- if (pSrchDlg)
- {
- pSrchDlg->SetDocWin(m_pEditWin, eCommand);
- pSrchDlg->SetSrchFlag(false);
- }
- }
-#endif
break;
case SvxSearchCmd::REPLACE_ALL:
@@ -409,14 +379,6 @@ void SwView::ExecSearch(SfxRequest& rReq)
SvxSearchDialogWrapper::SetSearchLabel(sText);
}
}
-#if HAVE_FEATURE_DESKTOP
- pSrchDlg = GetSearchDialog();
- if (pSrchDlg)
- {
- pSrchDlg->SetDocWin(m_pEditWin, eCommand);
- pSrchDlg->SetSrchFlag(false);
- }
-#endif
break;
}
diff --git a/toolkit/source/awt/vclxaccessiblecomponent.cxx b/toolkit/source/awt/vclxaccessiblecomponent.cxx
index f9b55d278655..7c963e83e9b6 100644
--- a/toolkit/source/awt/vclxaccessiblecomponent.cxx
+++ b/toolkit/source/awt/vclxaccessiblecomponent.cxx
@@ -375,9 +375,6 @@ void VCLXAccessibleComponent::FillAccessibleRelationSet( utl::AccessibleRelation
uno::Sequence< uno::Reference< uno::XInterface > > aSequence { pMemberOf->GetAccessible() };
rRelationSet.AddRelation( accessibility::AccessibleRelation( accessibility::AccessibleRelationType::MEMBER_OF, aSequence ) );
}
-
- for (const auto& rExtraRelation : pWindow->GetExtraAccessibleRelations())
- rRelationSet.AddRelation(rExtraRelation);
}
}
diff --git a/vcl/inc/window.h b/vcl/inc/window.h
index 9c3dec48a725..4502770194fa 100644
--- a/vcl/inc/window.h
+++ b/vcl/inc/window.h
@@ -280,7 +280,6 @@ public:
css::uno::Reference< css::accessibility::XAccessible > mxAccessible;
std::shared_ptr< VclSizeGroup > m_xSizeGroup;
std::vector<VclPtr<FixedText>> m_aMnemonicLabels;
- std::vector<css::accessibility::AccessibleRelation> m_aExtraAccessibleRelations;
std::unique_ptr<ImplAccessibleInfos> mpAccessibleInfos;
VCLXWindow* mpVCLXWindow;
vcl::Region maWinRegion; //< region to 'shape' the VCL window (frame coordinates)
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index fb5c50bd0dda..41ffa6918af5 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -510,16 +510,6 @@ public:
m_xWidget->SetAccessibleRelationLabelFor(pAtkLabeled);
}
- virtual void add_extra_accessible_relation(const css::accessibility::AccessibleRelation &rRelation) override
- {
- m_xWidget->AddExtraAccessibleRelation(rRelation);
- }
-
- virtual void clear_extra_accessible_relations() override
- {
- m_xWidget->ClearExtraAccessibleRelations();
- }
-
virtual void set_tooltip_text(const OUString& rTip) override
{
m_xWidget->SetQuickHelpText(rTip);
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index a5174bb8e367..0b787c288903 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -1966,21 +1966,6 @@ const std::vector<VclPtr<FixedText> >& Window::list_mnemonic_labels() const
return mpWindowImpl->m_aMnemonicLabels;
}
-void Window::AddExtraAccessibleRelation(const css::accessibility::AccessibleRelation &rRelation)
-{
- mpWindowImpl->m_aExtraAccessibleRelations.push_back(rRelation);
-}
-
-const std::vector<css::accessibility::AccessibleRelation>& Window::GetExtraAccessibleRelations() const
-{
- return mpWindowImpl->m_aExtraAccessibleRelations;
-}
-
-void Window::ClearExtraAccessibleRelations()
-{
- mpWindowImpl->m_aExtraAccessibleRelations.clear();
-}
-
} /* namespace vcl */
void DrawFocusRect(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect)
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 844a9f5a493b..9f1adaca77ed 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -1436,7 +1436,7 @@ private:
gulong m_nDragLeaveSignalId;
rtl::Reference<GtkDropTarget> m_xDropTarget;
- std::vector<AtkRelation*> m_aExtraAtkRelations;
+ rtl::Reference<GtkDragSource> m_xDragSource;
static void signalSizeAllocate(GtkWidget*, GdkRectangle* allocation, gpointer widget)
{
@@ -1941,33 +1941,6 @@ public:
g_object_unref(pRelationSet);
}
- virtual void add_extra_accessible_relation(const css::accessibility::AccessibleRelation &rRelation) override
- {
- AtkObject* pAtkObject = gtk_widget_get_accessible(m_pWidget);
- if (!pAtkObject)
- return;
-
- AtkRelationSet *pRelationSet = atk_object_ref_relation_set(pAtkObject);
- AtkRelation *pRel = atk_object_wrapper_relation_new(rRelation);
- m_aExtraAtkRelations.push_back(pRel);
- atk_relation_set_add(pRelationSet, pRel);
- g_object_unref(pRel);
- g_object_unref(pRelationSet);
- }
-
- virtual void clear_extra_accessible_relations() override
- {
- AtkObject* pAtkObject = gtk_widget_get_accessible(m_pWidget);
- if (!pAtkObject)
- return;
-
- AtkRelationSet *pRelationSet = atk_object_ref_relation_set(pAtkObject);
- for (AtkRelation* pRel : m_aExtraAtkRelations)
- atk_relation_set_remove(pRelationSet, pRel);
- m_aExtraAtkRelations.clear();
- g_object_unref(pRelationSet);
- }
-
virtual bool get_extents_relative_to(weld::Widget& rRelative, int& x, int &y, int& width, int &height) override
{
//for toplevel windows this is sadly futile under wayland, so we can't tell where a dialog is in order to allow
--
2.25.4