From e0849330bc4875384704fe031d563f8971ca4d96 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Fri, 27 May 2016 10:56:17 +0300 Subject: Get rid of unnecessary directory levels $D/inc/$D Change-Id: Ibf313b8948a493043006ebf3a8281487c1f67b48 Reviewed-on: https://gerrit.libreoffice.org/25532 Tested-by: Jenkins Reviewed-by: Tor Lillqvist Tested-by: Tor Lillqvist --- .../accessibility/extended/AccessibleBrowseBox.hxx | 289 --------- .../extended/AccessibleBrowseBoxBase.hxx | 447 ------------- .../extended/AccessibleBrowseBoxCheckBoxCell.hxx | 84 --- .../extended/AccessibleBrowseBoxHeaderBar.hxx | 258 -------- .../extended/AccessibleBrowseBoxHeaderCell.hxx | 74 --- .../extended/AccessibleBrowseBoxTable.hxx | 152 ----- .../extended/AccessibleBrowseBoxTableBase.hxx | 267 -------- .../extended/AccessibleBrowseBoxTableCell.hxx | 133 ---- .../extended/AccessibleGridControl.hxx | 239 ------- .../extended/AccessibleGridControlBase.hxx | 356 ----------- .../extended/AccessibleGridControlHeader.hxx | 181 ------ .../extended/AccessibleGridControlHeaderCell.hxx | 86 --- .../extended/AccessibleGridControlTable.hxx | 210 ------- .../extended/AccessibleGridControlTableBase.hxx | 207 ------ .../extended/AccessibleGridControlTableCell.hxx | 154 ----- .../extended/accessiblebrowseboxcell.hxx | 77 --- .../extended/accessibleeditbrowseboxcell.hxx | 142 ----- .../extended/accessibleiconchoicectrl.hxx | 110 ---- .../extended/accessibleiconchoicectrlentry.hxx | 191 ------ .../accessibility/extended/accessiblelistbox.hxx | 133 ---- .../extended/accessiblelistboxentry.hxx | 230 ------- .../accessibility/extended/accessibletabbar.hxx | 112 ---- .../extended/accessibletabbarbase.hxx | 65 -- .../extended/accessibletabbarpage.hxx | 128 ---- .../extended/accessibletabbarpagelist.hxx | 132 ---- .../extended/accessibletablistbox.hxx | 104 ---- .../extended/accessibletablistboxtable.hxx | 109 ---- .../accessibility/extended/listboxaccessible.hxx | 84 --- .../extended/textwindowaccessibility.hxx | 693 --------------------- .../accessibility/helper/IComboListBoxHelper.hxx | 69 -- .../inc/accessibility/helper/accessiblestrings.hrc | 51 -- .../inc/accessibility/helper/accresmgr.hxx | 66 -- .../helper/characterattributeshelper.hxx | 52 -- .../inc/accessibility/helper/listboxhelper.hxx | 189 ------ .../standard/accessiblemenubasecomponent.hxx | 145 ----- .../standard/accessiblemenucomponent.hxx | 89 --- .../standard/accessiblemenuitemcomponent.hxx | 90 --- .../accessibility/standard/vclxaccessiblebox.hxx | 185 ------ .../standard/vclxaccessiblebutton.hxx | 78 --- .../standard/vclxaccessiblecheckbox.hxx | 85 --- .../standard/vclxaccessiblecombobox.hxx | 57 -- .../standard/vclxaccessibledropdowncombobox.hxx | 56 -- .../standard/vclxaccessibledropdownlistbox.hxx | 56 -- .../accessibility/standard/vclxaccessibleedit.hxx | 111 ---- .../standard/vclxaccessiblefixedhyperlink.hxx | 47 -- .../standard/vclxaccessiblefixedtext.hxx | 47 -- .../accessibility/standard/vclxaccessiblelist.hxx | 210 ------- .../standard/vclxaccessiblelistbox.hxx | 56 -- .../standard/vclxaccessiblelistitem.hxx | 173 ----- .../accessibility/standard/vclxaccessiblemenu.hxx | 79 --- .../standard/vclxaccessiblemenubar.hxx | 66 -- .../standard/vclxaccessiblemenuitem.hxx | 109 ---- .../standard/vclxaccessiblemenuseparator.hxx | 46 -- .../standard/vclxaccessiblepopupmenu.hxx | 52 -- .../standard/vclxaccessibleradiobutton.hxx | 76 --- .../standard/vclxaccessiblescrollbar.hxx | 79 --- .../standard/vclxaccessiblestatusbar.hxx | 74 --- .../standard/vclxaccessiblestatusbaritem.hxx | 134 ---- .../standard/vclxaccessibletabcontrol.hxx | 96 --- .../standard/vclxaccessibletabpage.hxx | 139 ----- .../standard/vclxaccessibletabpagewindow.hxx | 60 -- .../standard/vclxaccessibletextcomponent.hxx | 85 --- .../standard/vclxaccessibletextfield.hxx | 92 --- .../standard/vclxaccessibletoolbox.hxx | 105 ---- .../standard/vclxaccessibletoolboxitem.hxx | 154 ----- accessibility/inc/extended/AccessibleBrowseBox.hxx | 289 +++++++++ .../inc/extended/AccessibleBrowseBoxBase.hxx | 447 +++++++++++++ .../extended/AccessibleBrowseBoxCheckBoxCell.hxx | 84 +++ .../inc/extended/AccessibleBrowseBoxHeaderBar.hxx | 258 ++++++++ .../inc/extended/AccessibleBrowseBoxHeaderCell.hxx | 74 +++ .../inc/extended/AccessibleBrowseBoxTable.hxx | 152 +++++ .../inc/extended/AccessibleBrowseBoxTableBase.hxx | 267 ++++++++ .../inc/extended/AccessibleBrowseBoxTableCell.hxx | 133 ++++ .../inc/extended/AccessibleGridControl.hxx | 239 +++++++ .../inc/extended/AccessibleGridControlBase.hxx | 356 +++++++++++ .../inc/extended/AccessibleGridControlHeader.hxx | 181 ++++++ .../extended/AccessibleGridControlHeaderCell.hxx | 86 +++ .../inc/extended/AccessibleGridControlTable.hxx | 210 +++++++ .../extended/AccessibleGridControlTableBase.hxx | 207 ++++++ .../extended/AccessibleGridControlTableCell.hxx | 154 +++++ .../inc/extended/accessiblebrowseboxcell.hxx | 77 +++ .../inc/extended/accessibleeditbrowseboxcell.hxx | 142 +++++ .../inc/extended/accessibleiconchoicectrl.hxx | 110 ++++ .../inc/extended/accessibleiconchoicectrlentry.hxx | 191 ++++++ accessibility/inc/extended/accessiblelistbox.hxx | 133 ++++ .../inc/extended/accessiblelistboxentry.hxx | 230 +++++++ accessibility/inc/extended/accessibletabbar.hxx | 112 ++++ .../inc/extended/accessibletabbarbase.hxx | 65 ++ .../inc/extended/accessibletabbarpage.hxx | 128 ++++ .../inc/extended/accessibletabbarpagelist.hxx | 132 ++++ .../inc/extended/accessibletablistbox.hxx | 104 ++++ .../inc/extended/accessibletablistboxtable.hxx | 109 ++++ accessibility/inc/extended/listboxaccessible.hxx | 84 +++ .../inc/extended/textwindowaccessibility.hxx | 693 +++++++++++++++++++++ accessibility/inc/helper/IComboListBoxHelper.hxx | 69 ++ accessibility/inc/helper/accessiblestrings.hrc | 51 ++ accessibility/inc/helper/accresmgr.hxx | 66 ++ .../inc/helper/characterattributeshelper.hxx | 52 ++ accessibility/inc/helper/listboxhelper.hxx | 189 ++++++ accessibility/inc/pch/precompiled_acc.hxx | 32 +- .../inc/standard/accessiblemenubasecomponent.hxx | 145 +++++ .../inc/standard/accessiblemenucomponent.hxx | 89 +++ .../inc/standard/accessiblemenuitemcomponent.hxx | 90 +++ accessibility/inc/standard/vclxaccessiblebox.hxx | 185 ++++++ .../inc/standard/vclxaccessiblebutton.hxx | 78 +++ .../inc/standard/vclxaccessiblecheckbox.hxx | 85 +++ .../inc/standard/vclxaccessiblecombobox.hxx | 57 ++ .../standard/vclxaccessibledropdowncombobox.hxx | 56 ++ .../inc/standard/vclxaccessibledropdownlistbox.hxx | 56 ++ accessibility/inc/standard/vclxaccessibleedit.hxx | 111 ++++ .../inc/standard/vclxaccessiblefixedhyperlink.hxx | 47 ++ .../inc/standard/vclxaccessiblefixedtext.hxx | 47 ++ accessibility/inc/standard/vclxaccessiblelist.hxx | 210 +++++++ .../inc/standard/vclxaccessiblelistbox.hxx | 56 ++ .../inc/standard/vclxaccessiblelistitem.hxx | 173 +++++ accessibility/inc/standard/vclxaccessiblemenu.hxx | 79 +++ .../inc/standard/vclxaccessiblemenubar.hxx | 66 ++ .../inc/standard/vclxaccessiblemenuitem.hxx | 109 ++++ .../inc/standard/vclxaccessiblemenuseparator.hxx | 46 ++ .../inc/standard/vclxaccessiblepopupmenu.hxx | 52 ++ .../inc/standard/vclxaccessibleradiobutton.hxx | 76 +++ .../inc/standard/vclxaccessiblescrollbar.hxx | 79 +++ .../inc/standard/vclxaccessiblestatusbar.hxx | 74 +++ .../inc/standard/vclxaccessiblestatusbaritem.hxx | 134 ++++ .../inc/standard/vclxaccessibletabcontrol.hxx | 96 +++ .../inc/standard/vclxaccessibletabpage.hxx | 139 +++++ .../inc/standard/vclxaccessibletabpagewindow.hxx | 60 ++ .../inc/standard/vclxaccessibletextcomponent.hxx | 85 +++ .../inc/standard/vclxaccessibletextfield.hxx | 92 +++ .../inc/standard/vclxaccessibletoolbox.hxx | 105 ++++ .../inc/standard/vclxaccessibletoolboxitem.hxx | 154 +++++ .../source/extended/AccessibleBrowseBox.cxx | 12 +- .../source/extended/AccessibleBrowseBoxBase.cxx | 2 +- .../extended/AccessibleBrowseBoxCheckBoxCell.cxx | 2 +- .../extended/AccessibleBrowseBoxHeaderBar.cxx | 4 +- .../extended/AccessibleBrowseBoxHeaderCell.cxx | 4 +- .../source/extended/AccessibleBrowseBoxTable.cxx | 2 +- .../extended/AccessibleBrowseBoxTableBase.cxx | 2 +- .../extended/AccessibleBrowseBoxTableCell.cxx | 2 +- .../source/extended/AccessibleGridControl.cxx | 10 +- .../source/extended/AccessibleGridControlBase.cxx | 2 +- .../extended/AccessibleGridControlHeader.cxx | 8 +- .../extended/AccessibleGridControlHeaderCell.cxx | 4 +- .../source/extended/AccessibleGridControlTable.cxx | 4 +- .../extended/AccessibleGridControlTableBase.cxx | 2 +- .../extended/AccessibleGridControlTableCell.cxx | 2 +- .../source/extended/accessiblebrowseboxcell.cxx | 2 +- .../extended/accessibleeditbrowseboxcell.cxx | 2 +- .../source/extended/accessibleiconchoicectrl.cxx | 4 +- .../extended/accessibleiconchoicectrlentry.cxx | 2 +- .../source/extended/accessiblelistbox.cxx | 4 +- .../source/extended/accessiblelistboxentry.cxx | 6 +- accessibility/source/extended/accessibletabbar.cxx | 4 +- .../source/extended/accessibletabbarbase.cxx | 4 +- .../source/extended/accessibletabbarpage.cxx | 2 +- .../source/extended/accessibletabbarpagelist.cxx | 4 +- .../source/extended/accessibletablistbox.cxx | 4 +- .../source/extended/accessibletablistboxtable.cxx | 6 +- .../source/extended/listboxaccessible.cxx | 2 +- .../source/extended/textwindowaccessibility.cxx | 2 +- .../source/helper/IComboListBoxHelper.cxx | 2 +- accessibility/source/helper/acc_factory.cxx | 62 +- accessibility/source/helper/accessiblestrings.src | 2 +- accessibility/source/helper/accresmgr.cxx | 2 +- .../source/helper/characterattributeshelper.cxx | 2 +- .../standard/accessiblemenubasecomponent.cxx | 8 +- .../source/standard/accessiblemenucomponent.cxx | 2 +- .../standard/accessiblemenuitemcomponent.cxx | 6 +- .../source/standard/vclxaccessiblebox.cxx | 14 +- .../source/standard/vclxaccessiblebutton.cxx | 6 +- .../source/standard/vclxaccessiblecheckbox.cxx | 6 +- .../source/standard/vclxaccessiblecombobox.cxx | 4 +- .../standard/vclxaccessibledropdowncombobox.cxx | 12 +- .../standard/vclxaccessibledropdownlistbox.cxx | 8 +- .../source/standard/vclxaccessibleedit.cxx | 6 +- .../standard/vclxaccessiblefixedhyperlink.cxx | 2 +- .../source/standard/vclxaccessiblefixedtext.cxx | 2 +- .../source/standard/vclxaccessiblelist.cxx | 6 +- .../source/standard/vclxaccessiblelistbox.cxx | 6 +- .../source/standard/vclxaccessiblelistitem.cxx | 4 +- .../source/standard/vclxaccessiblemenu.cxx | 2 +- .../source/standard/vclxaccessiblemenubar.cxx | 2 +- .../source/standard/vclxaccessiblemenuitem.cxx | 8 +- .../standard/vclxaccessiblemenuseparator.cxx | 2 +- .../source/standard/vclxaccessiblepopupmenu.cxx | 2 +- .../source/standard/vclxaccessibleradiobutton.cxx | 6 +- .../source/standard/vclxaccessiblescrollbar.cxx | 6 +- .../source/standard/vclxaccessiblestatusbar.cxx | 4 +- .../standard/vclxaccessiblestatusbaritem.cxx | 4 +- .../source/standard/vclxaccessibletabcontrol.cxx | 4 +- .../source/standard/vclxaccessibletabpage.cxx | 4 +- .../standard/vclxaccessibletabpagewindow.cxx | 2 +- .../standard/vclxaccessibletextcomponent.cxx | 4 +- .../source/standard/vclxaccessibletextfield.cxx | 4 +- .../source/standard/vclxaccessibletoolbox.cxx | 4 +- .../source/standard/vclxaccessibletoolboxitem.cxx | 6 +- 196 files changed, 8989 insertions(+), 8989 deletions(-) delete mode 100644 accessibility/inc/accessibility/extended/AccessibleBrowseBox.hxx delete mode 100644 accessibility/inc/accessibility/extended/AccessibleBrowseBoxBase.hxx delete mode 100644 accessibility/inc/accessibility/extended/AccessibleBrowseBoxCheckBoxCell.hxx delete mode 100644 accessibility/inc/accessibility/extended/AccessibleBrowseBoxHeaderBar.hxx delete mode 100644 accessibility/inc/accessibility/extended/AccessibleBrowseBoxHeaderCell.hxx delete mode 100644 accessibility/inc/accessibility/extended/AccessibleBrowseBoxTable.hxx delete mode 100644 accessibility/inc/accessibility/extended/AccessibleBrowseBoxTableBase.hxx delete mode 100644 accessibility/inc/accessibility/extended/AccessibleBrowseBoxTableCell.hxx delete mode 100644 accessibility/inc/accessibility/extended/AccessibleGridControl.hxx delete mode 100644 accessibility/inc/accessibility/extended/AccessibleGridControlBase.hxx delete mode 100644 accessibility/inc/accessibility/extended/AccessibleGridControlHeader.hxx delete mode 100644 accessibility/inc/accessibility/extended/AccessibleGridControlHeaderCell.hxx delete mode 100644 accessibility/inc/accessibility/extended/AccessibleGridControlTable.hxx delete mode 100644 accessibility/inc/accessibility/extended/AccessibleGridControlTableBase.hxx delete mode 100644 accessibility/inc/accessibility/extended/AccessibleGridControlTableCell.hxx delete mode 100644 accessibility/inc/accessibility/extended/accessiblebrowseboxcell.hxx delete mode 100644 accessibility/inc/accessibility/extended/accessibleeditbrowseboxcell.hxx delete mode 100644 accessibility/inc/accessibility/extended/accessibleiconchoicectrl.hxx delete mode 100644 accessibility/inc/accessibility/extended/accessibleiconchoicectrlentry.hxx delete mode 100644 accessibility/inc/accessibility/extended/accessiblelistbox.hxx delete mode 100644 accessibility/inc/accessibility/extended/accessiblelistboxentry.hxx delete mode 100644 accessibility/inc/accessibility/extended/accessibletabbar.hxx delete mode 100644 accessibility/inc/accessibility/extended/accessibletabbarbase.hxx delete mode 100644 accessibility/inc/accessibility/extended/accessibletabbarpage.hxx delete mode 100644 accessibility/inc/accessibility/extended/accessibletabbarpagelist.hxx delete mode 100644 accessibility/inc/accessibility/extended/accessibletablistbox.hxx delete mode 100644 accessibility/inc/accessibility/extended/accessibletablistboxtable.hxx delete mode 100644 accessibility/inc/accessibility/extended/listboxaccessible.hxx delete mode 100644 accessibility/inc/accessibility/extended/textwindowaccessibility.hxx delete mode 100644 accessibility/inc/accessibility/helper/IComboListBoxHelper.hxx delete mode 100644 accessibility/inc/accessibility/helper/accessiblestrings.hrc delete mode 100644 accessibility/inc/accessibility/helper/accresmgr.hxx delete mode 100644 accessibility/inc/accessibility/helper/characterattributeshelper.hxx delete mode 100644 accessibility/inc/accessibility/helper/listboxhelper.hxx delete mode 100644 accessibility/inc/accessibility/standard/accessiblemenubasecomponent.hxx delete mode 100644 accessibility/inc/accessibility/standard/accessiblemenucomponent.hxx delete mode 100644 accessibility/inc/accessibility/standard/accessiblemenuitemcomponent.hxx delete mode 100644 accessibility/inc/accessibility/standard/vclxaccessiblebox.hxx delete mode 100644 accessibility/inc/accessibility/standard/vclxaccessiblebutton.hxx delete mode 100644 accessibility/inc/accessibility/standard/vclxaccessiblecheckbox.hxx delete mode 100644 accessibility/inc/accessibility/standard/vclxaccessiblecombobox.hxx delete mode 100644 accessibility/inc/accessibility/standard/vclxaccessibledropdowncombobox.hxx delete mode 100644 accessibility/inc/accessibility/standard/vclxaccessibledropdownlistbox.hxx delete mode 100644 accessibility/inc/accessibility/standard/vclxaccessibleedit.hxx delete mode 100644 accessibility/inc/accessibility/standard/vclxaccessiblefixedhyperlink.hxx delete mode 100644 accessibility/inc/accessibility/standard/vclxaccessiblefixedtext.hxx delete mode 100644 accessibility/inc/accessibility/standard/vclxaccessiblelist.hxx delete mode 100644 accessibility/inc/accessibility/standard/vclxaccessiblelistbox.hxx delete mode 100644 accessibility/inc/accessibility/standard/vclxaccessiblelistitem.hxx delete mode 100644 accessibility/inc/accessibility/standard/vclxaccessiblemenu.hxx delete mode 100644 accessibility/inc/accessibility/standard/vclxaccessiblemenubar.hxx delete mode 100644 accessibility/inc/accessibility/standard/vclxaccessiblemenuitem.hxx delete mode 100644 accessibility/inc/accessibility/standard/vclxaccessiblemenuseparator.hxx delete mode 100644 accessibility/inc/accessibility/standard/vclxaccessiblepopupmenu.hxx delete mode 100644 accessibility/inc/accessibility/standard/vclxaccessibleradiobutton.hxx delete mode 100644 accessibility/inc/accessibility/standard/vclxaccessiblescrollbar.hxx delete mode 100644 accessibility/inc/accessibility/standard/vclxaccessiblestatusbar.hxx delete mode 100644 accessibility/inc/accessibility/standard/vclxaccessiblestatusbaritem.hxx delete mode 100644 accessibility/inc/accessibility/standard/vclxaccessibletabcontrol.hxx delete mode 100644 accessibility/inc/accessibility/standard/vclxaccessibletabpage.hxx delete mode 100644 accessibility/inc/accessibility/standard/vclxaccessibletabpagewindow.hxx delete mode 100644 accessibility/inc/accessibility/standard/vclxaccessibletextcomponent.hxx delete mode 100644 accessibility/inc/accessibility/standard/vclxaccessibletextfield.hxx delete mode 100644 accessibility/inc/accessibility/standard/vclxaccessibletoolbox.hxx delete mode 100644 accessibility/inc/accessibility/standard/vclxaccessibletoolboxitem.hxx create mode 100644 accessibility/inc/extended/AccessibleBrowseBox.hxx create mode 100644 accessibility/inc/extended/AccessibleBrowseBoxBase.hxx create mode 100644 accessibility/inc/extended/AccessibleBrowseBoxCheckBoxCell.hxx create mode 100644 accessibility/inc/extended/AccessibleBrowseBoxHeaderBar.hxx create mode 100644 accessibility/inc/extended/AccessibleBrowseBoxHeaderCell.hxx create mode 100644 accessibility/inc/extended/AccessibleBrowseBoxTable.hxx create mode 100644 accessibility/inc/extended/AccessibleBrowseBoxTableBase.hxx create mode 100644 accessibility/inc/extended/AccessibleBrowseBoxTableCell.hxx create mode 100644 accessibility/inc/extended/AccessibleGridControl.hxx create mode 100644 accessibility/inc/extended/AccessibleGridControlBase.hxx create mode 100644 accessibility/inc/extended/AccessibleGridControlHeader.hxx create mode 100644 accessibility/inc/extended/AccessibleGridControlHeaderCell.hxx create mode 100644 accessibility/inc/extended/AccessibleGridControlTable.hxx create mode 100644 accessibility/inc/extended/AccessibleGridControlTableBase.hxx create mode 100644 accessibility/inc/extended/AccessibleGridControlTableCell.hxx create mode 100644 accessibility/inc/extended/accessiblebrowseboxcell.hxx create mode 100644 accessibility/inc/extended/accessibleeditbrowseboxcell.hxx create mode 100644 accessibility/inc/extended/accessibleiconchoicectrl.hxx create mode 100644 accessibility/inc/extended/accessibleiconchoicectrlentry.hxx create mode 100644 accessibility/inc/extended/accessiblelistbox.hxx create mode 100644 accessibility/inc/extended/accessiblelistboxentry.hxx create mode 100644 accessibility/inc/extended/accessibletabbar.hxx create mode 100644 accessibility/inc/extended/accessibletabbarbase.hxx create mode 100644 accessibility/inc/extended/accessibletabbarpage.hxx create mode 100644 accessibility/inc/extended/accessibletabbarpagelist.hxx create mode 100644 accessibility/inc/extended/accessibletablistbox.hxx create mode 100644 accessibility/inc/extended/accessibletablistboxtable.hxx create mode 100644 accessibility/inc/extended/listboxaccessible.hxx create mode 100644 accessibility/inc/extended/textwindowaccessibility.hxx create mode 100644 accessibility/inc/helper/IComboListBoxHelper.hxx create mode 100644 accessibility/inc/helper/accessiblestrings.hrc create mode 100644 accessibility/inc/helper/accresmgr.hxx create mode 100644 accessibility/inc/helper/characterattributeshelper.hxx create mode 100644 accessibility/inc/helper/listboxhelper.hxx create mode 100644 accessibility/inc/standard/accessiblemenubasecomponent.hxx create mode 100644 accessibility/inc/standard/accessiblemenucomponent.hxx create mode 100644 accessibility/inc/standard/accessiblemenuitemcomponent.hxx create mode 100644 accessibility/inc/standard/vclxaccessiblebox.hxx create mode 100644 accessibility/inc/standard/vclxaccessiblebutton.hxx create mode 100644 accessibility/inc/standard/vclxaccessiblecheckbox.hxx create mode 100644 accessibility/inc/standard/vclxaccessiblecombobox.hxx create mode 100644 accessibility/inc/standard/vclxaccessibledropdowncombobox.hxx create mode 100644 accessibility/inc/standard/vclxaccessibledropdownlistbox.hxx create mode 100644 accessibility/inc/standard/vclxaccessibleedit.hxx create mode 100644 accessibility/inc/standard/vclxaccessiblefixedhyperlink.hxx create mode 100644 accessibility/inc/standard/vclxaccessiblefixedtext.hxx create mode 100644 accessibility/inc/standard/vclxaccessiblelist.hxx create mode 100644 accessibility/inc/standard/vclxaccessiblelistbox.hxx create mode 100644 accessibility/inc/standard/vclxaccessiblelistitem.hxx create mode 100644 accessibility/inc/standard/vclxaccessiblemenu.hxx create mode 100644 accessibility/inc/standard/vclxaccessiblemenubar.hxx create mode 100644 accessibility/inc/standard/vclxaccessiblemenuitem.hxx create mode 100644 accessibility/inc/standard/vclxaccessiblemenuseparator.hxx create mode 100644 accessibility/inc/standard/vclxaccessiblepopupmenu.hxx create mode 100644 accessibility/inc/standard/vclxaccessibleradiobutton.hxx create mode 100644 accessibility/inc/standard/vclxaccessiblescrollbar.hxx create mode 100644 accessibility/inc/standard/vclxaccessiblestatusbar.hxx create mode 100644 accessibility/inc/standard/vclxaccessiblestatusbaritem.hxx create mode 100644 accessibility/inc/standard/vclxaccessibletabcontrol.hxx create mode 100644 accessibility/inc/standard/vclxaccessibletabpage.hxx create mode 100644 accessibility/inc/standard/vclxaccessibletabpagewindow.hxx create mode 100644 accessibility/inc/standard/vclxaccessibletextcomponent.hxx create mode 100644 accessibility/inc/standard/vclxaccessibletextfield.hxx create mode 100644 accessibility/inc/standard/vclxaccessibletoolbox.hxx create mode 100644 accessibility/inc/standard/vclxaccessibletoolboxitem.hxx (limited to 'accessibility') diff --git a/accessibility/inc/accessibility/extended/AccessibleBrowseBox.hxx b/accessibility/inc/accessibility/extended/AccessibleBrowseBox.hxx deleted file mode 100644 index 927b77aebb0c..000000000000 --- a/accessibility/inc/accessibility/extended/AccessibleBrowseBox.hxx +++ /dev/null @@ -1,289 +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_ACCESSIBILITY_EXTENDED_ACCESSIBLEBROWSEBOX_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_EXTENDED_ACCESSIBLEBROWSEBOX_HXX - -#include -#include -#include -#include -#include - -namespace accessibility { - - class AccessibleBrowseBoxImpl; - class AccessibleBrowseBoxTable; - - -/** This class represents the complete accessible BrowseBox object. */ -class AccessibleBrowseBox : public AccessibleBrowseBoxBase -{ - friend class AccessibleBrowseBoxAccess; - -protected: - AccessibleBrowseBox( - const css::uno::Reference< css::accessibility::XAccessible >& _rxParent, - const css::uno::Reference< css::accessibility::XAccessible >& _rxCreator, - ::svt::IAccessibleTableProvider& _rBrowseBox - ); - - virtual ~AccessibleBrowseBox(); - - /** sets the XAccessible which created the context - - To be called only once, and only if in the ctor NULL was passed. - */ - void setCreator( - const css::uno::Reference< css::accessibility::XAccessible >& _rxCreator - ); - - /** Cleans up members. */ - using AccessibleBrowseBoxBase::disposing; - virtual void SAL_CALL disposing() override; - -protected: - // XAccessibleContext - - /** @return The count of visible children. */ - virtual sal_Int32 SAL_CALL getAccessibleChildCount() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return The XAccessible interface of the specified child. */ - virtual css::uno::Reference< - css::accessibility::XAccessible > SAL_CALL - getAccessibleChild( sal_Int32 nChildIndex ) - throw ( css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception ) override; - - // XAccessibleComponent - - /** @return - The accessible child rendered under the given point. - */ - virtual css::uno::Reference< - css::accessibility::XAccessible > SAL_CALL - getAccessibleAtPoint( const css::awt::Point& rPoint ) - throw ( css::uno::RuntimeException, std::exception ) override; - - /** Grabs the focus to the BrowseBox. */ - virtual void SAL_CALL grabFocus() - throw ( css::uno::RuntimeException, std::exception ) override; - - // XServiceInfo - - /** @return - The name of this class. - */ - virtual OUString SAL_CALL getImplementationName() - throw ( css::uno::RuntimeException, std::exception ) override; - -public: - // helper functions - /** commitHeaderBarEvent commit the event at all listeners of the column/row header bar - @param nEventId - the event id - @param rNewValue - the new value - @param rOldValue - the old value - @param _bColumnHeaderBar - true if a column based header bar, false if a row based header bar - */ - void commitHeaderBarEvent(sal_Int16 nEventId, - const css::uno::Any& rNewValue, - const css::uno::Any& rOldValue,bool _bColumnHeaderBar = true); - - // helper functions - /** commitTableEvent commit the event at all listeners of the table - @param nEventId - the event id - @param rNewValue - the new value - @param rOldValue - the old value - */ - void commitTableEvent(sal_Int16 nEventId, - const css::uno::Any& rNewValue, - const css::uno::Any& rOldValue); - - /** returns the accessible object for the row or the column header bar - */ - inline css::uno::Reference< - css::accessibility::XAccessible > - getHeaderBar( ::svt::AccessibleBrowseBoxObjType _eObjType ) - { - return implGetHeaderBar(_eObjType); - } - - /** returns the accessible object for the table representation - */ - inline css::uno::Reference< - css::accessibility::XAccessible > - getTable( ) - { - return implGetTable(); - } - -protected: - // internal virtual methods - - /** @attention This method requires locked mutex's and a living object. - @return The bounding box (VCL rect.) relative to the parent window. */ - virtual Rectangle implGetBoundingBox() override; - /** @attention This method requires locked mutex's and a living object. - @return The bounding box (VCL rect.) in screen coordinates. */ - virtual Rectangle implGetBoundingBoxOnScreen() override; - - // internal helper methods - - /** This method creates (once) and returns the accessible data table child. - @attention This method requires locked mutex's and a living object. - @return The XAccessible interface of the data table. */ - css::uno::Reference< - css::accessibility::XAccessible > implGetTable(); - - /** This method creates (once) and returns the specified header bar. - @attention This method requires locked mutex's and a living object. - @return The XAccessible interface of the header bar. */ - css::uno::Reference< - css::accessibility::XAccessible > - implGetHeaderBar( ::svt::AccessibleBrowseBoxObjType eObjType ); - - /** This method returns one of the children that are always present: - Data table, row and column header bar or corner control. - @attention This method requires locked mutex's and a living object. - @return The XAccessible interface of the specified child. */ - css::uno::Reference< - css::accessibility::XAccessible > - implGetFixedChild( sal_Int32 nChildIndex ); - - /** This method creates and returns an accessible table. - @return An AccessibleBrowseBoxTable. */ - virtual AccessibleBrowseBoxTable* createAccessibleTable(); - -private: - // members - std::unique_ptr< AccessibleBrowseBoxImpl > m_xImpl; -}; - - -/** the XAccessible which creates/returns an AccessibleBrowseBox - - The instance holds its XAccessibleContext with a hard reference, while - the context holds this instance weak. -*/ -class AccessibleBrowseBoxAccess: - public cppu::WeakImplHelper, - public ::svt::IAccessibleBrowseBox -{ -private: - ::osl::Mutex m_aMutex; - css::uno::Reference< css::accessibility::XAccessible > - m_xParent; - ::svt::IAccessibleTableProvider& m_rBrowseBox; - - css::uno::Reference< css::accessibility::XAccessibleContext > - m_xContext; - AccessibleBrowseBox* m_pContext; - // note that this pointer is valid as long as m_xContext is valid! - -public: - AccessibleBrowseBoxAccess( - const css::uno::Reference< css::accessibility::XAccessible >& _rxParent, - ::svt::IAccessibleTableProvider& _rBrowseBox - ); - - /// checks whether the accessible context is still alive - bool isContextAlive() const; - - /// returns the AccessibleContext belonging to this Accessible - inline AccessibleBrowseBox* getContext() { return m_pContext; } - -protected: - virtual ~AccessibleBrowseBoxAccess(); - - // XAccessible - virtual css::uno::Reference< css::accessibility::XAccessibleContext > - SAL_CALL getAccessibleContext() throw ( css::uno::RuntimeException, std::exception ) override; - - // IAccessibleBrowseBox - virtual css::uno::Reference< css::accessibility::XAccessible > - getMyself() override - { - return this; - } - void dispose() override; - virtual bool isAlive() const override - { - return isContextAlive(); - } - virtual css::uno::Reference< css::accessibility::XAccessible > - getHeaderBar( ::svt::AccessibleBrowseBoxObjType _eObjType ) override - { - css::uno::Reference< css::accessibility::XAccessible > xAccessible; - AccessibleBrowseBox* pContext( getContext() ); - if ( pContext ) - xAccessible = pContext->getHeaderBar( _eObjType ); - return xAccessible; - } - virtual css::uno::Reference< css::accessibility::XAccessible > - getTable() override - { - css::uno::Reference< css::accessibility::XAccessible > xAccessible; - AccessibleBrowseBox* pContext( getContext() ); - if ( pContext ) - xAccessible = pContext->getTable(); - return xAccessible; - } - virtual void commitHeaderBarEvent( sal_Int16 nEventId, const css::uno::Any& rNewValue, - const css::uno::Any& rOldValue, bool _bColumnHeaderBar ) override - { - AccessibleBrowseBox* pContext( getContext() ); - if ( pContext ) - pContext->commitHeaderBarEvent( nEventId, rNewValue, rOldValue, _bColumnHeaderBar ); - } - virtual void commitTableEvent( sal_Int16 nEventId, - const css::uno::Any& rNewValue, const css::uno::Any& rOldValue ) override - { - AccessibleBrowseBox* pContext( getContext() ); - if ( pContext ) - pContext->commitTableEvent( nEventId, rNewValue, rOldValue ); - } - virtual void commitEvent( sal_Int16 nEventId, - const css::uno::Any& rNewValue, const css::uno::Any& rOldValue ) override - { - AccessibleBrowseBox* pContext( getContext() ); - if ( pContext ) - pContext->commitEvent( nEventId, rNewValue, rOldValue ); - } - -private: - AccessibleBrowseBoxAccess( const AccessibleBrowseBoxAccess& ) = delete; - AccessibleBrowseBoxAccess& operator=( const AccessibleBrowseBoxAccess& ) = delete; -}; - - -} // namespace accessibility - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/extended/AccessibleBrowseBoxBase.hxx b/accessibility/inc/accessibility/extended/AccessibleBrowseBoxBase.hxx deleted file mode 100644 index fe2035f5cc4d..000000000000 --- a/accessibility/inc/accessibility/extended/AccessibleBrowseBoxBase.hxx +++ /dev/null @@ -1,447 +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_ACCESSIBILITY_EXTENDED_ACCESSIBLEBROWSEBOXBASE_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_EXTENDED_ACCESSIBLEBROWSEBOXBASE_HXX - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -namespace vcl { class Window; } - -namespace utl { - class AccessibleStateSetHelper; -} - -namespace svt { - class IAccessibleTableProvider; -} - -namespace accessibility { - -typedef ::cppu::WeakAggComponentImplHelper5< - css::accessibility::XAccessibleContext, - css::accessibility::XAccessibleComponent, - css::accessibility::XAccessibleEventBroadcaster, - css::awt::XFocusListener, - css::lang::XServiceInfo > - AccessibleBrowseBoxImplHelper; - -/** The BrowseBox accessible objects inherit from this base class. It - implements basic functionality for various Accessibility interfaces and - the event broadcaster and contains the osl::Mutex. */ -class AccessibleBrowseBoxBase : - public ::comphelper::OBaseMutex, - public AccessibleBrowseBoxImplHelper -{ -public: - /** Constructor sets specified name and description. If the constant of a - text is BBTEXT_NONE, the derived class has to set the text via - implSetName() (in Ctor) or later via - setAccessibleName() and setAccessibleDescription() (these methods - notify the listeners about the change). - - @param rxParent XAccessible interface of the parent object. - @param rBrowseBox The BrowseBox control. - @param _xFocusWindow The window that gets all the focus events. - @param eObjType Object type */ - AccessibleBrowseBoxBase( - const css::uno::Reference< css::accessibility::XAccessible >& rxParent, - ::svt::IAccessibleTableProvider& rBrowseBox, - const css::uno::Reference< css::awt::XWindow >& _xFocusWindow, - ::svt::AccessibleBrowseBoxObjType eObjType ); - - /** Constructor sets specified name and description. - @param rxParent XAccessible interface of the parent object. - @param rBrowseBox The BrowseBox control. - @param _xFocusWindow The window that gets all the focus events. - @param eObjType Object type - @param rName The name of this object. - @param rDescription The description text of this object. */ - AccessibleBrowseBoxBase( - const css::uno::Reference< css::accessibility::XAccessible >& rxParent, - ::svt::IAccessibleTableProvider& rBrowseBox, - const css::uno::Reference< css::awt::XWindow >& _xFocusWindow, - ::svt::AccessibleBrowseBoxObjType eObjType, - const OUString& rName, - const OUString& rDescription ); - -protected: - virtual ~AccessibleBrowseBoxBase(); - - /** Commits DeFunc event to listeners and cleans up members. */ - virtual void SAL_CALL disposing() override; - -public: - // XAccessibleContext - - /** @return A reference to the parent accessible object. */ - virtual css::uno::Reference SAL_CALL getAccessibleParent() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return The index of this object among the parent's children. */ - virtual sal_Int32 SAL_CALL getAccessibleIndexInParent() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return - The description of this object. - */ - virtual OUString SAL_CALL getAccessibleDescription() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return - The name of this object. - */ - virtual OUString SAL_CALL getAccessibleName() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return - The relation set (the BrowseBox does not have one). - */ - virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return The set of current states. */ - virtual css::uno::Reference< css::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return The parent's locale. */ - virtual css::lang::Locale SAL_CALL getLocale() - throw ( css::accessibility::IllegalAccessibleComponentStateException, - css::uno::RuntimeException, std::exception ) override; - - /** @return - The role of this object. Panel, ROWHEADER, COLUMNHEADER, TABLE, TABLE_CELL are supported. - */ - virtual sal_Int16 SAL_CALL getAccessibleRole() - throw ( css::uno::RuntimeException, std::exception ) override; - - /* Derived classes have to implement: - - getAccessibleChildCount, - - getAccessibleChild, - - getAccessibleRole. - Derived classes may overwrite getAccessibleIndexInParent to increase - performance. */ - - // XAccessibleComponent - - /** @return - TRUE, if the point lies within the bounding box of this object. */ - virtual sal_Bool SAL_CALL containsPoint( const css::awt::Point& rPoint ) - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return The bounding box of this object. */ - virtual css::awt::Rectangle SAL_CALL getBounds() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return - The upper left corner of the bounding box relative to the parent. */ - virtual css::awt::Point SAL_CALL getLocation() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return - The upper left corner of the bounding box in screen coordinates. */ - virtual css::awt::Point SAL_CALL getLocationOnScreen() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return The size of the bounding box. */ - virtual css::awt::Size SAL_CALL getSize() - throw ( css::uno::RuntimeException, std::exception ) override; - - virtual sal_Int32 SAL_CALL getForeground( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getBackground( ) throw (css::uno::RuntimeException, std::exception) override; - - // XFocusListener - virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) throw (css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL focusGained( const css::awt::FocusEvent& e ) throw (css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL focusLost( const css::awt::FocusEvent& e ) throw (css::uno::RuntimeException, std::exception) override; - - /* Derived classes have to implement: - - getAccessibleAt, - - grabFocus. */ - - /** @return - The accessible child rendered under the given point. - */ - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const css::awt::Point& rPoint ) - throw ( css::uno::RuntimeException, std::exception ) override; - - // XAccessibleEventBroadcaster - - /** Adds a new event listener */ - virtual void SAL_CALL addAccessibleEventListener( - const css::uno::Reference< css::accessibility::XAccessibleEventListener>& rxListener ) - throw ( css::uno::RuntimeException, std::exception ) override; - - /** Removes an event listener. */ - virtual void SAL_CALL removeAccessibleEventListener( - const css::uno::Reference< css::accessibility::XAccessibleEventListener>& rxListener ) - throw ( css::uno::RuntimeException, std::exception ) override; - - // XTypeProvider - - /** @return An unique implementation ID. */ - virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() - throw ( css::uno::RuntimeException, std::exception ) override; - - // XServiceInfo - - /** @return Whether the specified service is supported by this class. */ - virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return A list of all supported services. */ - virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() - throw ( css::uno::RuntimeException, std::exception ) override; - - /* Derived classes have to implement: - - getImplementationName. */ - - // helper methods - - /** @return The BrowseBox object type. */ - inline ::svt::AccessibleBrowseBoxObjType getType() const; - - /** Changes the name of the object and notifies listeners. */ - void setAccessibleName( const OUString& rName ); - /** Changes the description of the object and notifies listeners. */ - void setAccessibleDescription( const OUString& rDescription ); - - /** Commits an event to all listeners. */ - void commitEvent( - sal_Int16 nEventId, - const css::uno::Any& rNewValue, - const css::uno::Any& rOldValue ); - /** @return TRUE, if the object is not disposed or disposing. */ - bool isAlive() const; - -protected: - // internal virtual methods - - /** Determines whether the BrowseBox control is really showing inside of - its parent accessible window. Derived classes may implement different - behaviour. - @attention This method requires locked mutex's and a living object. - @return TRUE, if the object is really showing. */ - bool implIsShowing(); - - /** Derived classes return the bounding box relative to the parent window. - @attention This method requires locked mutex's and a living object. - @return The bounding box (VCL rect.) relative to the parent window. */ - virtual Rectangle implGetBoundingBox() = 0; - /** Derived classes return the bounding box in screen coordinates. - @attention This method requires locked mutex's and a living object. - @return The bounding box (VCL rect.) in screen coordinates. */ - virtual Rectangle implGetBoundingBoxOnScreen() = 0; - - /** Creates a new AccessibleStateSetHelper and fills it with states of the - current object. This method calls FillStateSet at the BrowseBox which - fills it with more states depending on the object type. Derived classes - may overwrite this method and add more states. - @attention This method requires locked mutex's. - @return A filled AccessibleStateSetHelper. */ - virtual ::utl::AccessibleStateSetHelper* implCreateStateSetHelper(); - - // internal helper methods - - /** @throws DisposedException If the object is not alive. */ - void ensureIsAlive() const - throw ( css::lang::DisposedException ); - - /** @return The osl::Mutex member provided by the class OBaseMutex. */ - inline ::osl::Mutex& getOslMutex(); - - /** Changes the name of the object (flat assignment, no notify). - @attention This method requires a locked mutex. */ - inline void implSetName( const OUString& rName ); - - /** Locks all mutex's and calculates the bounding box relative to the - parent window. - @return The bounding box (VCL rect.) relative to the parent object. */ - Rectangle getBoundingBox() - throw ( css::lang::DisposedException ); - /** Locks all mutex's and calculates the bounding box in screen - coordinates. - @return The bounding box (VCL rect.) in screen coordinates. */ - Rectangle getBoundingBoxOnScreen() - throw ( css::lang::DisposedException ); - - ::comphelper::AccessibleEventNotifier::TClientId getClientId() const { return m_aClientId; } - void setClientId(::comphelper::AccessibleEventNotifier::TClientId _aNewClientId) { m_aClientId = _aNewClientId; } - -public: - // public versions of internal helper methods, with access control - struct AccessControl { friend class SolarMethodGuard; private: AccessControl() { } }; - - inline ::osl::Mutex& getMutex( const AccessControl& ) { return getOslMutex(); } - inline void ensureIsAlive( const AccessControl& ) { ensureIsAlive(); } - -protected: - // members - - /** The parent accessible object. */ - css::uno::Reference< css::accessibility::XAccessible > mxParent; - /** The VCL BrowseBox control. */ - ::svt::IAccessibleTableProvider* mpBrowseBox; - - /** This is the window which get all the nice focus events - */ - css::uno::Reference< css::awt::XWindow > m_xFocusWindow; - -private: - /** Localized name. */ - OUString maName; - /** Localized description text. */ - OUString maDescription; - - /** The type of this object (for names, descriptions, state sets, ...). */ - ::svt::AccessibleBrowseBoxObjType meObjType; - - ::comphelper::AccessibleEventNotifier::TClientId m_aClientId; -}; - - -// a version of AccessibleBrowseBoxBase which implements not only the XAccessibleContext, -// but also the XAccessible - -typedef ::cppu::ImplHelper1 < css::accessibility::XAccessible - > BrowseBoxAccessibleElement_Base; - -class BrowseBoxAccessibleElement - :public AccessibleBrowseBoxBase - ,public BrowseBoxAccessibleElement_Base -{ -protected: - /** Constructor sets specified name and description. If the constant of a - text is BBTEXT_NONE, the derived class has to set the text via - implSetName() (in Ctor) or later via - setAccessibleName() and setAccessibleDescription() (these methods - notify the listeners about the change). - - @param rxParent XAccessible interface of the parent object. - @param rBrowseBox The BrowseBox control. - @param _xFocusWindow The window that gets all the focus events. - @param eObjType Object type - */ - BrowseBoxAccessibleElement( - const css::uno::Reference< css::accessibility::XAccessible >& rxParent, - ::svt::IAccessibleTableProvider& rBrowseBox, - const css::uno::Reference< css::awt::XWindow >& _xFocusWindow, - ::svt::AccessibleBrowseBoxObjType eObjType ); - - /** Constructor sets specified name and description. - - @param rxParent XAccessible interface of the parent object. - @param rBrowseBox The BrowseBox control. - @param _xFocusWindow The window that gets all the focus events. - @param eObjType Object type - @param rName The name of this object. - @param rDescription The description text of this object. - */ - BrowseBoxAccessibleElement( - const css::uno::Reference< css::accessibility::XAccessible >& rxParent, - ::svt::IAccessibleTableProvider& rBrowseBox, - const css::uno::Reference< css::awt::XWindow >& _xFocusWindow, - ::svt::AccessibleBrowseBoxObjType eObjType, - const OUString& rName, - const OUString& rDescription ); - -public: - // noncopyable - BrowseBoxAccessibleElement(const BrowseBoxAccessibleElement&) = delete; - const BrowseBoxAccessibleElement& operator=(const BrowseBoxAccessibleElement&) = delete; - // XInterface - DECLARE_XINTERFACE( ) - // XTypeProvider - DECLARE_XTYPEPROVIDER( ) - -protected: - virtual ~BrowseBoxAccessibleElement(); - -protected: - // XAccessible - - /** @return The XAccessibleContext interface of this object. */ - virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext() - throw ( css::uno::RuntimeException, std::exception ) override; -}; - - -// a helper class for protecting methods which need to lock the solar mutex in addition to the own mutex - -typedef ::osl::MutexGuard OslMutexGuard; - -class SolarMethodGuard : public SolarMutexGuard, public OslMutexGuard -{ -public: - inline SolarMethodGuard( AccessibleBrowseBoxBase& _rOwner, bool _bEnsureAlive = true ) - :SolarMutexGuard( ) - ,OslMutexGuard( _rOwner.getMutex( AccessibleBrowseBoxBase::AccessControl() ) ) - { - if ( _bEnsureAlive ) - _rOwner.ensureIsAlive( AccessibleBrowseBoxBase::AccessControl() ); - } -}; - -// inlines - -inline ::svt::AccessibleBrowseBoxObjType AccessibleBrowseBoxBase::getType() const -{ - return meObjType; -} - -inline ::osl::Mutex& AccessibleBrowseBoxBase::getOslMutex() -{ - return m_aMutex; -} - -inline void AccessibleBrowseBoxBase::implSetName( - const OUString& rName ) -{ - maName = rName; -} - -} // namespace accessibility - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/extended/AccessibleBrowseBoxCheckBoxCell.hxx b/accessibility/inc/accessibility/extended/AccessibleBrowseBoxCheckBoxCell.hxx deleted file mode 100644 index 91a4c13dacdb..000000000000 --- a/accessibility/inc/accessibility/extended/AccessibleBrowseBoxCheckBoxCell.hxx +++ /dev/null @@ -1,84 +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_ACCESSIBILITY_EXTENDED_ACCESSIBLEBROWSEBOXCHECKBOXCELL_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_EXTENDED_ACCESSIBLEBROWSEBOXCHECKBOXCELL_HXX - -#include -#include -#include -#include "accessibility/extended/accessiblebrowseboxcell.hxx" -#include -#include - -namespace accessibility -{ - - typedef ::cppu::ImplHelper2 < css::accessibility::XAccessible, - css::accessibility::XAccessibleValue - > AccessibleCheckBoxCell_BASE; - - class AccessibleCheckBoxCell : public AccessibleBrowseBoxCell - ,public AccessibleCheckBoxCell_BASE - { - private: - TriState m_eState; - bool m_bIsTriState; - - protected: - virtual ~AccessibleCheckBoxCell() {} - - virtual ::utl::AccessibleStateSetHelper* implCreateStateSetHelper() override; - - public: - AccessibleCheckBoxCell(const css::uno::Reference< css::accessibility::XAccessible >& _rxParent, - ::svt::IAccessibleTableProvider& _rBrowseBox, - const css::uno::Reference< css::awt::XWindow >& _xFocusWindow, - sal_Int32 _nRowPos, - sal_uInt16 _nColPos, - const TriState& _eState, - bool _bIsTriState); - - // XInterface - DECLARE_XINTERFACE( ) - // XTypeProvider - DECLARE_XTYPEPROVIDER( ) - - // XAccessible - virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( ) throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleContext - virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getImplementationName() throw ( css::uno::RuntimeException, std::exception ) override; - virtual ::sal_Int32 SAL_CALL getAccessibleIndexInParent( ) throw (css::uno::RuntimeException, std::exception) override; - - - // XAccessibleValue - virtual css::uno::Any SAL_CALL getCurrentValue( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL setCurrentValue( const css::uno::Any& aNumber ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Any SAL_CALL getMaximumValue( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Any SAL_CALL getMinimumValue( ) throw (css::uno::RuntimeException, std::exception) override; - - // internal - void SetChecked( bool _bChecked ); - }; -} -#endif // INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_EXTENDED_ACCESSIBLEBROWSEBOXCHECKBOXCELL_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/extended/AccessibleBrowseBoxHeaderBar.hxx b/accessibility/inc/accessibility/extended/AccessibleBrowseBoxHeaderBar.hxx deleted file mode 100644 index 72011d8daf96..000000000000 --- a/accessibility/inc/accessibility/extended/AccessibleBrowseBoxHeaderBar.hxx +++ /dev/null @@ -1,258 +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_ACCESSIBILITY_EXTENDED_ACCESSIBLEBROWSEBOXHEADERBAR_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_EXTENDED_ACCESSIBLEBROWSEBOXHEADERBAR_HXX - -#include "accessibility/extended/AccessibleBrowseBoxTableBase.hxx" -#include -#include - - -namespace accessibility { - - -typedef ::cppu::ImplHelper1< css::accessibility::XAccessibleSelection > - AccessibleBrowseBoxHeaderBarImplHelper; - -/** This class represents the accessible object of a header bar of a BrowseBox - control (row or column header bar). This object supports the - XAccessibleSelection interface. Selecting a child of this object selects - complete rows or columns of the data table. */ -class AccessibleBrowseBoxHeaderBar : - public AccessibleBrowseBoxTableBase, - public AccessibleBrowseBoxHeaderBarImplHelper -{ -public: - /** @param rxParent Parent that holds the browsebox headerbar control - @param rBrowseBox The BrowseBox control. - @param eObjType One of the two allowed types BBTYPE_ROWHEADERBAR or - BBTYPE_COLUMNHEADERBAR. */ - AccessibleBrowseBoxHeaderBar( - const css::uno::Reference< css::accessibility::XAccessible >& rxParent, - ::svt::IAccessibleTableProvider& rBrowseBox, - ::svt::AccessibleBrowseBoxObjType eObjType ); - -protected: - virtual ~AccessibleBrowseBoxHeaderBar(); - -public: - // XAccessibleContext - - /** @return - The XAccessible interface of the specified child. - */ - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL - getAccessibleChild( sal_Int32 nChildIndex ) - throw ( css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception ) override; - - /** @return The index of this object among the parent's children. */ - virtual sal_Int32 SAL_CALL - getAccessibleIndexInParent() - throw ( css::uno::RuntimeException, std::exception ) override; - - // XAccessibleComponent - - /** @return The accessible child rendered under the given point. */ - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL - getAccessibleAtPoint( const css::awt::Point& rPoint ) - throw ( css::uno::RuntimeException, std::exception ) override; - - /** Grabs the focus to (the current cell of) the data table. */ - virtual void SAL_CALL grabFocus() - throw ( css::uno::RuntimeException, std::exception ) override; - - // XAccessibleTable - - /** @return The description text of the specified row. */ - virtual OUString SAL_CALL - getAccessibleRowDescription( sal_Int32 nRow ) - throw ( css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception ) override; - - /** @return The description text of the specified column. */ - virtual OUString SAL_CALL getAccessibleColumnDescription( sal_Int32 nColumn ) - throw ( css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception ) override; - - /** @return The XAccessibleTable interface of the row header bar. */ - virtual css::uno::Reference< css::accessibility::XAccessibleTable > SAL_CALL - getAccessibleRowHeaders() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return The XAccessibleTable interface of the column header bar. */ - virtual css::uno::Reference< css::accessibility::XAccessibleTable > SAL_CALL - getAccessibleColumnHeaders() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return An index list of completely selected rows. */ - virtual css::uno::Sequence< sal_Int32 > SAL_CALL - getSelectedAccessibleRows() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return An index list of completely selected columns. */ - virtual css::uno::Sequence< sal_Int32 > SAL_CALL - getSelectedAccessibleColumns() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return TRUE, if the specified row is completely selected. */ - virtual sal_Bool SAL_CALL isAccessibleRowSelected( sal_Int32 nRow ) - throw ( css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception ) override; - - /** @return TRUE, if the specified column is completely selected. */ - virtual sal_Bool SAL_CALL isAccessibleColumnSelected( sal_Int32 nColumn ) - throw ( css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception ) override; - - /** @return The XAccessible interface of the cell object at the specified - cell position. */ - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL - getAccessibleCellAt( sal_Int32 nRow, sal_Int32 nColumn ) - throw ( css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception ) override; - - /** @return TRUE, if the specified cell is selected. */ - virtual sal_Bool SAL_CALL isAccessibleSelected( sal_Int32 nRow, sal_Int32 nColumn ) - throw ( css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception ) override; - - // XAccessibleSelection - - /** Selects the specified child (row or column of the table). */ - virtual void SAL_CALL selectAccessibleChild( sal_Int32 nChildIndex ) - throw ( css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception ) override; - - /** @return TRUE, if the specified child (row/column) is selected. */ - virtual sal_Bool SAL_CALL isAccessibleChildSelected( sal_Int32 nChildIndex ) - throw ( css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception ) override; - - /** Clears the complete selection. */ - virtual void SAL_CALL clearAccessibleSelection() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** Selects all children or first, if multiselection is not supported. */ - virtual void SAL_CALL selectAllAccessibleChildren() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return The number of selected rows/columns. */ - virtual sal_Int32 SAL_CALL getSelectedAccessibleChildCount() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return The specified selected row/column. */ - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL - getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) - throw ( css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception ) override; - - /** Removes the specified row/column from the selection. */ - virtual void SAL_CALL deselectAccessibleChild( sal_Int32 nSelectedChildIndex ) - throw ( css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception ) override; - - // XInterface - - /** Queries for a new interface. */ - css::uno::Any SAL_CALL queryInterface( const css::uno::Type& rType ) - throw ( css::uno::RuntimeException, std::exception ) override; - - /** Aquires the object (calls acquire() on base class). */ - virtual void SAL_CALL acquire() throw () override; - - /** Releases the object (calls release() on base class). */ - virtual void SAL_CALL release() throw () override; - - // XServiceInfo - - /** @return The name of this class. */ - virtual OUString SAL_CALL getImplementationName() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return An unique implementation ID. */ - virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() - throw ( css::uno::RuntimeException, std::exception ) override; - -protected: - // internal virtual methods - - /** @attention This method requires locked mutex's and a living object. - @return The bounding box (VCL rect.) relative to the parent window. */ - virtual Rectangle implGetBoundingBox() override; - /** @attention This method requires locked mutex's and a living object. - @return The bounding box (VCL rect.) in screen coordinates. */ - virtual Rectangle implGetBoundingBoxOnScreen() override; - - /** @attention This method requires locked mutex's and a living object. - @return The count of used rows. */ - virtual sal_Int32 implGetRowCount() const override; - /** @attention This method requires locked mutex's and a living object. - @return The count of used columns. */ - virtual sal_Int32 implGetColumnCount() const override; - - // internal helper methods - - /** @return TRUE, if the objects is a header bar for rows. */ - inline bool isRowBar() const; - /** @return TRUE, if the objects is a header bar for columns. */ - inline bool isColumnBar() const; - - /** Returns the specified row or column. Uses one of the parameters, - depending on object type. - @attention This method requires locked mutex's and a living object. - @return The XAccessible interface of the specified column/row. */ - css::uno::Reference< css::accessibility::XAccessible > - implGetChild( sal_Int32 nRow, sal_uInt16 nColumnPos ); - - /** @attention This method requires locked mutex's and a living object. - @return The absolute child index from the index of selected children. - @throws IndexOutOfBoundsException - If the specified index is invalid. */ - sal_Int32 implGetChildIndexFromSelectedIndex( sal_Int32 nSelectedChildIndex ) - throw ( css::lang::IndexOutOfBoundsException ); - - /** @attention This method requires locked mutex's and a living object. - @throws IndexOutOfBoundsException - If the specified row/column index (depending on type) is invalid. */ - void ensureIsValidHeaderIndex( sal_Int32 nIndex ) - throw ( css::lang::IndexOutOfBoundsException ); -}; - -// inlines - -inline bool AccessibleBrowseBoxHeaderBar::isRowBar() const -{ - return getType() == ::svt::BBTYPE_ROWHEADERBAR; -} - -inline bool AccessibleBrowseBoxHeaderBar::isColumnBar() const -{ - return getType() == ::svt::BBTYPE_COLUMNHEADERBAR; -} - - -} // namespace accessibility - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/extended/AccessibleBrowseBoxHeaderCell.hxx b/accessibility/inc/accessibility/extended/AccessibleBrowseBoxHeaderCell.hxx deleted file mode 100644 index 0f9f1bacbf92..000000000000 --- a/accessibility/inc/accessibility/extended/AccessibleBrowseBoxHeaderCell.hxx +++ /dev/null @@ -1,74 +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_ACCESSIBILITY_EXTENDED_ACCESSIBLEBROWSEBOXHEADERCELL_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_EXTENDED_ACCESSIBLEBROWSEBOXHEADERCELL_HXX - -#include "accessibility/extended/AccessibleBrowseBoxBase.hxx" - -namespace accessibility -{ - class AccessibleBrowseBoxHeaderCell : public BrowseBoxAccessibleElement - { - sal_Int32 m_nColumnRowId; - public: - AccessibleBrowseBoxHeaderCell(sal_Int32 _nColumnRowId, - const css::uno::Reference< css::accessibility::XAccessible >& rxParent, - ::svt::IAccessibleTableProvider& _rBrowseBox, - const css::uno::Reference< css::awt::XWindow >& _xFocusWindow, - ::svt::AccessibleBrowseBoxObjType _eObjType); - /** @return The count of visible children. */ - virtual sal_Int32 SAL_CALL getAccessibleChildCount() throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return The XAccessible interface of the specified child. */ - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL - getAccessibleChild( sal_Int32 nChildIndex ) throw ( css::lang::IndexOutOfBoundsException,css::uno::RuntimeException, std::exception ) override; - - /** @return The index of this object among the parent's children. */ - virtual sal_Int32 SAL_CALL getAccessibleIndexInParent() throw ( css::uno::RuntimeException, std::exception ) override; - - /** Grabs the focus to the BrowseBox. */ - virtual void SAL_CALL grabFocus() throw ( css::uno::RuntimeException, std::exception ) override; - - inline bool isRowBarCell() const - { - return getType() == ::svt::BBTYPE_ROWHEADERCELL; - } - - /** @return - The name of this class. - */ - virtual OUString SAL_CALL getImplementationName() throw ( css::uno::RuntimeException, std::exception ) override; - - /** Creates a new AccessibleStateSetHelper and fills it with states of the - current object. - @return - A filled AccessibleStateSetHelper. - */ - ::utl::AccessibleStateSetHelper* implCreateStateSetHelper() override; - - protected: - virtual Rectangle implGetBoundingBox() override; - - virtual Rectangle implGetBoundingBoxOnScreen() override; - }; -} - -#endif // INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_EXTENDED_ACCESSIBLEBROWSEBOXHEADERCELL_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/extended/AccessibleBrowseBoxTable.hxx b/accessibility/inc/accessibility/extended/AccessibleBrowseBoxTable.hxx deleted file mode 100644 index 2bd31e1bff46..000000000000 --- a/accessibility/inc/accessibility/extended/AccessibleBrowseBoxTable.hxx +++ /dev/null @@ -1,152 +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_ACCESSIBILITY_EXTENDED_ACCESSIBLEBROWSEBOXTABLE_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_EXTENDED_ACCESSIBLEBROWSEBOXTABLE_HXX - -#include "accessibility/extended/AccessibleBrowseBoxTableBase.hxx" - - -namespace accessibility { - -/** This class represents the accessible object of the data table of a - BrowseBox control. */ -class AccessibleBrowseBoxTable : public AccessibleBrowseBoxTableBase -{ - friend class AccessibleBrowseBox; // to create header bars - -public: - AccessibleBrowseBoxTable( - const css::uno::Reference< css::accessibility::XAccessible >& rxParent, - ::svt::IAccessibleTableProvider& rBrowseBox ); - -protected: - virtual ~AccessibleBrowseBoxTable(); - -public: - // XAccessibleContext - - /** @return The XAccessible interface of the specified child. */ - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL - getAccessibleChild( sal_Int32 nChildIndex ) - throw ( css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception ) override; - - /** @return The index of this object among the parent's children. */ - virtual sal_Int32 SAL_CALL getAccessibleIndexInParent() - throw ( css::uno::RuntimeException, std::exception ) override; - - // XAccessibleComponent - - /** @return The accessible child rendered under the given point. */ - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL - getAccessibleAtPoint( const css::awt::Point& rPoint ) - throw ( css::uno::RuntimeException, std::exception ) override; - - /** Grabs the focus to (the current cell of) the data table. */ - virtual void SAL_CALL grabFocus() - throw ( css::uno::RuntimeException, std::exception ) override; - - // XAccessibleTable - - /** @return The description text of the specified row. */ - virtual OUString SAL_CALL getAccessibleRowDescription( sal_Int32 nRow ) - throw ( css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception ) override; - - /** @return The description text of the specified column. */ - virtual OUString SAL_CALL getAccessibleColumnDescription( sal_Int32 nColumn ) - throw ( css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception ) override; - - /** @return The XAccessibleTable interface of the row header bar. */ - virtual css::uno::Reference< css::accessibility::XAccessibleTable > SAL_CALL - getAccessibleRowHeaders() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return The XAccessibleTable interface of the column header bar. */ - virtual css::uno::Reference< css::accessibility::XAccessibleTable > SAL_CALL - getAccessibleColumnHeaders() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return An index list of completely selected rows. */ - virtual css::uno::Sequence< sal_Int32 > SAL_CALL - getSelectedAccessibleRows() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return An index list of completely selected columns. */ - virtual css::uno::Sequence< sal_Int32 > SAL_CALL - getSelectedAccessibleColumns() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return TRUE, if the specified row is completely selected. */ - virtual sal_Bool SAL_CALL isAccessibleRowSelected( sal_Int32 nRow ) - throw ( css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception ) override; - - /** @return TRUE, if the specified column is completely selected. */ - virtual sal_Bool SAL_CALL isAccessibleColumnSelected( sal_Int32 nColumn ) - throw ( css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception ) override; - - /** @return The XAccessible interface of the cell object at the specified - cell position. */ - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL - getAccessibleCellAt( sal_Int32 nRow, sal_Int32 nColumn ) - throw ( css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception ) override; - - /** @return TRUE, if the specified cell is selected. */ - virtual sal_Bool SAL_CALL isAccessibleSelected( sal_Int32 nRow, sal_Int32 nColumn ) - throw ( css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception ) override; - - // XServiceInfo - - /** @return The name of this class. */ - virtual OUString SAL_CALL getImplementationName() - throw ( css::uno::RuntimeException, std::exception ) override; - -protected: - // internal virtual methods - - /** @attention This method requires locked mutex's and a living object. - @return The bounding box (VCL rect.) relative to the parent window. */ - virtual Rectangle implGetBoundingBox() override; - /** @attention This method requires locked mutex's and a living object. - @return The bounding box (VCL rect.) in screen coordinates. */ - virtual Rectangle implGetBoundingBoxOnScreen() override; - - // internal helper methods - - /** @attention This method requires a locked mutex. - @return The XAccessibleTable interface of the specified header bar. */ - css::uno::Reference< css::accessibility::XAccessibleTable > - implGetHeaderBar( sal_Int32 nChildIndex ) - throw ( css::uno::RuntimeException ); -}; - - -} // namespace accessibility - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/extended/AccessibleBrowseBoxTableBase.hxx b/accessibility/inc/accessibility/extended/AccessibleBrowseBoxTableBase.hxx deleted file mode 100644 index 1baa85f5d661..000000000000 --- a/accessibility/inc/accessibility/extended/AccessibleBrowseBoxTableBase.hxx +++ /dev/null @@ -1,267 +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_ACCESSIBILITY_EXTENDED_ACCESSIBLEBROWSEBOXTABLEBASE_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_EXTENDED_ACCESSIBLEBROWSEBOXTABLEBASE_HXX - -#include "accessibility/extended/AccessibleBrowseBoxBase.hxx" -#include -#include - - -namespace accessibility { - -typedef ::cppu::ImplHelper1< css::accessibility::XAccessibleTable > - AccessibleBrowseBoxTableImplHelper; - -/** The BrowseBox accessible table objects inherit from this base class. It - implements basic functionality for the XAccessibleTable interface. - BrowseBox table objects are: the data table, the column header bar and the - row header bar. */ -class AccessibleBrowseBoxTableBase : - public BrowseBoxAccessibleElement, - public AccessibleBrowseBoxTableImplHelper -{ -public: - /** Constructor sets specified name and description. If the constant of a - text is BBTEXT_NONE, the derived class has to set the text via - implSetName() and implSetDescription() (in Ctor) or later via - setAccessibleName() and setAccessibleDescription() (these methods - notify the listeners about the change). - @param rxParent XAccessible interface of the parent object. - @param rBrowseBox The BrowseBox control. - @param eObjType Type of BrowseBox object. */ - AccessibleBrowseBoxTableBase( - const css::uno::Reference< css::accessibility::XAccessible >& rxParent, - ::svt::IAccessibleTableProvider& rBrowseBox, - ::svt::AccessibleBrowseBoxObjType eObjType ); - -protected: - virtual ~AccessibleBrowseBoxTableBase(); - -public: - // XAccessibleContext - - /** @return The count of visible children. */ - virtual sal_Int32 SAL_CALL getAccessibleChildCount() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return The role of this object (a table). */ - virtual sal_Int16 SAL_CALL getAccessibleRole() - throw ( css::uno::RuntimeException, std::exception ) override; - - /* Derived classes have to implement: - - getAccessibleChild, - - getAccessibleIndexInParent. */ - - // XAccessibleComponent - - /* Derived classes have to implement: - - getAccessibleAt, - - grabFocus. */ - - // XAccessibleTable - - /** @return The number of used rows in the table (0 = empty table). */ - virtual sal_Int32 SAL_CALL getAccessibleRowCount() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return The number of used columns in the table (0 = empty table). */ - virtual sal_Int32 SAL_CALL getAccessibleColumnCount() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return The row extent of the specified cell (always 1). */ - virtual sal_Int32 SAL_CALL - getAccessibleRowExtentAt( sal_Int32 nRow, sal_Int32 nColumn ) - throw ( css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception ) override; - - /** @return The column extent of the specified cell (always 1). */ - virtual sal_Int32 SAL_CALL - getAccessibleColumnExtentAt( sal_Int32 nRow, sal_Int32 nColumn ) - throw ( css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception ) override; - - /** @return The caption cell of the table (not supported). */ - virtual css::uno::Reference< - css::accessibility::XAccessible > SAL_CALL - getAccessibleCaption() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return The summary object of the table (not supported). */ - virtual css::uno::Reference< - css::accessibility::XAccessible > SAL_CALL - getAccessibleSummary() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return The child index of the specified cell. */ - virtual sal_Int32 SAL_CALL getAccessibleIndex( sal_Int32 nRow, sal_Int32 nColumn ) - throw ( css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception ) override; - - /** @return The row index of the specified child cell. */ - virtual sal_Int32 SAL_CALL getAccessibleRow( sal_Int32 nChildIndex ) - throw ( css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception ) override; - - /** @return The column index of the specified child cell. */ - virtual sal_Int32 SAL_CALL getAccessibleColumn( sal_Int32 nChildIndex ) - throw ( css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception ) override; - - /* Derived classes have to implement: - - getAccessibleRowDescription, - - getAccessibleColumnDescription, - - getAccessibleRowHeaders, - - getAccessibleColumnHeaders, - - getSelectedAccessibleRows, - - getSelectedAccessibleColumns, - - isAccessibleRowSelected, - - isAccessibleColumnSelected, - - getAccessibleCellAt, - - isAccessibleSelected. */ - - // XInterface - - /** Queries for a new interface. */ - css::uno::Any SAL_CALL queryInterface( const css::uno::Type& rType ) - throw ( css::uno::RuntimeException, std::exception ) override; - - /** Aquires the object (calls acquire() on base class). */ - virtual void SAL_CALL acquire() throw () override; - - /** Releases the object (calls release() on base class). */ - virtual void SAL_CALL release() throw () override; - - // XTypeProvider - - /** @return A sequence of possible types (received from base classes). */ - virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return An unique implementation ID. */ - virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() - throw ( css::uno::RuntimeException, std::exception ) override; - - // XServiceInfo - - /* Derived classes have to implement: - - getImplementationName */ - -protected: - // internal virtual methods - - /** @attention This method requires locked mutex's and a living object. - @return The count of data rows without header bar. */ - virtual sal_Int32 implGetRowCount() const; - /** @attention This method requires locked mutex's and a living object. - @return The count of data columns without "handle column". */ - virtual sal_Int32 implGetColumnCount() const; - - // internal helper methods - - /** @return TRUE, if first BrowseBox column is the "handle column". */ - bool implHasHandleColumn() const; - - /** @attention This method requires locked mutex's and a living object. - @param nColumn - the position of the column in the Accessible world - @return - the position of the column in VCL the Accessible world - */ - sal_uInt16 implToVCLColumnPos( sal_Int32 nColumn ) const; - - /** @attention This method requires locked mutex's and a living object. - @return The number of cells of the table. */ - sal_Int32 implGetChildCount() const; - - /** @attention This method requires locked mutex's and a living object. - @return The row index of the specified cell index. */ - sal_Int32 implGetRow( sal_Int32 nChildIndex ) const; - /** @attention This method requires locked mutex's and a living object. - @return The column index of the specified cell index. */ - sal_Int32 implGetColumn( sal_Int32 nChildIndex ) const; - /** @attention This method requires locked mutex's and a living object. - @return The child index of the specified cell address. */ - sal_Int32 implGetChildIndex( sal_Int32 nRow, sal_Int32 nColumn ) const; - - /** @attention This method requires locked mutex's and a living object. - @return TRUE, if the specified row is selected. */ - bool implIsRowSelected( sal_Int32 nRow ) const; - /** @attention This method requires locked mutex's and a living object. - @return TRUE, if the specified column is selected. */ - bool implIsColumnSelected( sal_Int32 nColumn ) const; - - /** Selects/deselects a row (tries to expand selection). - @attention This method requires locked mutex's and a living object. - @param nRow Row to select - @param bSelect TRUE = select, FALSE = deselect */ - void implSelectRow( sal_Int32 nRow, bool bSelect ); - /** Selects/deselects a column (tries to expand selection). - @attention This method requires locked mutex's and a living object. - @param nColumnPos column number to select - @param bSelect TRUE = select, FALSE = deselect */ - void implSelectColumn( sal_Int32 nColumnPos, bool bSelect ); - - /** @attention This method requires locked mutex's and a living object. - @return The count of selected rows. */ - sal_Int32 implGetSelectedRowCount() const; - /** @attention This method requires locked mutex's and a living object. - @return The count of selected columns. */ - sal_Int32 implGetSelectedColumnCount() const; - - /** Fills a sequence with sorted indexes of completely selected rows. - @attention This method requires locked mutex's and a living object. - @param rSeq Out-parameter that takes the sorted row index list. */ - void implGetSelectedRows( css::uno::Sequence< sal_Int32 >& rSeq ); - /** Fills a sequence with sorted indexes of completely selected columns. - @attention This method requires locked mutex's and a living object. - @param rSeq Out-parameter that takes the sorted column index list. */ - void implGetSelectedColumns( css::uno::Sequence< sal_Int32 >& rSeq ); - - /** @attention This method requires locked mutex's and a living object. - @throws IndexOutOfBoundsException - If the specified row index is invalid. */ - void ensureIsValidRow( sal_Int32 nRow ) - throw ( css::lang::IndexOutOfBoundsException ); - /** @attention This method requires locked mutex's and a living object. - @throws IndexOutOfBoundsException - If the specified column index is invalid. */ - void ensureIsValidColumn( sal_Int32 nColumn ) - throw ( css::lang::IndexOutOfBoundsException ); - /** @attention This method requires locked mutex's and a living object. - @throws IndexOutOfBoundsException - If the specified cell address is invalid. */ - void ensureIsValidAddress( sal_Int32 nRow, sal_Int32 nColumn ) - throw ( css::lang::IndexOutOfBoundsException ); - /** @attention This method requires locked mutex's and a living object. - @throws IndexOutOfBoundsException - If the specified child index is invalid. */ - void ensureIsValidIndex( sal_Int32 nChildIndex ) - throw ( css::lang::IndexOutOfBoundsException ); -}; - - -} // namespace accessibility - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/extended/AccessibleBrowseBoxTableCell.hxx b/accessibility/inc/accessibility/extended/AccessibleBrowseBoxTableCell.hxx deleted file mode 100644 index 6c10d4e8a3c5..000000000000 --- a/accessibility/inc/accessibility/extended/AccessibleBrowseBoxTableCell.hxx +++ /dev/null @@ -1,133 +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_ACCESSIBILITY_EXTENDED_ACCESSIBLEBROWSEBOXTABLECELL_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_EXTENDED_ACCESSIBLEBROWSEBOXTABLECELL_HXX - -#include "accessibility/extended/accessiblebrowseboxcell.hxx" -#include -#include - -namespace accessibility -{ - typedef ::cppu::ImplHelper2 < css::accessibility::XAccessibleText - , css::accessibility::XAccessible - > AccessibleTextHelper_BASE; - - // implementation of a table cell of BrowseBox - class AccessibleBrowseBoxTableCell :public AccessibleBrowseBoxCell - ,public AccessibleTextHelper_BASE - ,public ::comphelper::OCommonAccessibleText - { - private: - sal_Int32 m_nOffset; - - protected: - // OCommonAccessibleText - virtual OUString implGetText() override; - virtual css::lang::Locale implGetLocale() override; - virtual void implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ) override; - - public: - AccessibleBrowseBoxTableCell( const css::uno::Reference< css::accessibility::XAccessible >& _rxParent, - ::svt::IAccessibleTableProvider& _rBrowseBox, - const css::uno::Reference< css::awt::XWindow >& _xFocusWindow, - sal_Int32 _nRowId, - sal_uInt16 _nColId, - sal_Int32 _nOffset ); - - void nameChanged( const OUString& rNewName, const OUString& rOldName ); - - // XInterface ------------------------------------------------------------- - - /** Queries for a new interface. */ - css::uno::Any SAL_CALL queryInterface( const css::uno::Type& rType ) - throw ( css::uno::RuntimeException, std::exception ) override; - - /** Aquires the object (calls acquire() on base class). */ - virtual void SAL_CALL acquire() throw () override; - - /** Releases the object (calls release() on base class). */ - virtual void SAL_CALL release() throw () override; - - // XEventListener - using AccessibleBrowseBoxBase::disposing; - virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) - throw(css::uno::RuntimeException, std::exception) override; - - /** @return The index of this object among the parent's children. */ - virtual sal_Int32 SAL_CALL getAccessibleIndexInParent() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return - The name of this class. - */ - virtual OUString SAL_CALL getImplementationName() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return - The count of visible children. - */ - virtual sal_Int32 SAL_CALL getAccessibleChildCount() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return - The XAccessible interface of the specified child. - */ - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL - getAccessibleChild( sal_Int32 nChildIndex ) - throw ( css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception ) override; - - /** Creates a new AccessibleStateSetHelper and fills it with states of the - current object. - @return - A filled AccessibleStateSetHelper. - */ - ::utl::AccessibleStateSetHelper* implCreateStateSetHelper() override; - - // XAccessible ------------------------------------------------------------ - - /** @return The XAccessibleContext interface of this object. */ - virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL - getAccessibleContext() - throw ( css::uno::RuntimeException, std::exception ) override; - - // XAccessibleText - virtual sal_Int32 SAL_CALL getCaretPosition() throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual sal_Unicode SAL_CALL getCharacter( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getCharacterAttributes( sal_Int32 nIndex, const css::uno::Sequence< OUString >& aRequestedAttributes ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual css::awt::Rectangle SAL_CALL getCharacterBounds( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getCharacterCount() throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getIndexAtPoint( const css::awt::Point& aPoint ) throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getSelectedText() throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getSelectionStart() throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getSelectionEnd() throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getText() throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual css::accessibility::TextSegment SAL_CALL getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (css::lang::IndexOutOfBoundsException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override; - virtual css::accessibility::TextSegment SAL_CALL getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (css::lang::IndexOutOfBoundsException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override; - virtual css::accessibility::TextSegment SAL_CALL getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (css::lang::IndexOutOfBoundsException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - }; -} -#endif // INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_EXTENDED_ACCESSIBLEBROWSEBOXTABLECELL_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/extended/AccessibleGridControl.hxx b/accessibility/inc/accessibility/extended/AccessibleGridControl.hxx deleted file mode 100644 index 865f8258f98c..000000000000 --- a/accessibility/inc/accessibility/extended/AccessibleGridControl.hxx +++ /dev/null @@ -1,239 +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_ACCESSIBILITY_EXTENDED_ACCESSIBLEGRIDCONTROL_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_EXTENDED_ACCESSIBLEGRIDCONTROL_HXX - -#include -#include -#include -#include -#include -#include - -namespace accessibility { - - class AccessibleGridControl_Impl; - - -/** This class represents the complete accessible Grid Control object. */ -class AccessibleGridControl : public AccessibleGridControlBase -{ - friend class AccessibleGridControlAccess; - -protected: - AccessibleGridControl( - const css::uno::Reference< css::accessibility::XAccessible >& _rxParent, - const css::uno::Reference< css::accessibility::XAccessible >& _rxCreator, - ::svt::table::IAccessibleTable& _rTable - ); - - virtual ~AccessibleGridControl(); - - /** Cleans up members. */ - using AccessibleGridControlBase::disposing; - virtual void SAL_CALL disposing() override; - -protected: - // XAccessibleContext ----------------------------------------------------- - - /** @return The count of visible children. */ - virtual sal_Int32 SAL_CALL getAccessibleChildCount() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return The XAccessible interface of the specified child. */ - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL - getAccessibleChild( sal_Int32 nChildIndex ) - throw ( css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception ) override; - - /** @return The role of this object (a table). */ - virtual sal_Int16 SAL_CALL getAccessibleRole() - throw ( css::uno::RuntimeException, std::exception ) override; - - // XAccessibleComponent --------------------------------------------------- - - /** @return - The accessible child rendered under the given point. - */ - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL - getAccessibleAtPoint( const css::awt::Point& rPoint ) - throw ( css::uno::RuntimeException, std::exception ) override; - - /** Grabs the focus to the Grid Control. */ - virtual void SAL_CALL grabFocus() - throw ( css::uno::RuntimeException, std::exception ) override; - - // XServiceInfo ----------------------------------------------------------- - - /** @return - The name of this class. - */ - virtual OUString SAL_CALL getImplementationName() - throw ( css::uno::RuntimeException, std::exception ) override; - -public: - // helper functions - - /** commitCellEvent commit the event at all listeners of the table - @param nEventId - the event id - @param rNewValue - the new value - @param rOldValue - the old value - */ - void commitCellEvent(sal_Int16 nEventId, const css::uno::Any& rNewValue, - const css::uno::Any& rOldValue); - - /** commitTableEvent commit the event at all listeners of the table - @param nEventId - the event id - @param rNewValue - the new value - @param rOldValue - the old value - */ - void commitTableEvent(sal_Int16 nEventId, const css::uno::Any& rNewValue, - const css::uno::Any& rOldValue); - -protected: - // internal virtual methods ----------------------------------------------- - - /** @attention This method requires locked mutex's and a living object. - @return The bounding box (VCL rect.) relative to the parent window. */ - virtual Rectangle implGetBoundingBox() override; - /** @attention This method requires locked mutex's and a living object. - @return The bounding box (VCL rect.) in screen coordinates. */ - virtual Rectangle implGetBoundingBoxOnScreen() override; - - // internal helper methods ------------------------------------------------ - - /** This method creates (once) and returns the accessible data table child. - @attention This method requires locked mutex's and a living object. - @return The XAccessible interface of the data table. */ - css::uno::Reference< css::accessibility::XAccessible > implGetTable(); - - /** This method creates (once) and returns the specified header bar. - @attention This method requires locked mutex's and a living object. - @return The XAccessible interface of the header bar. */ - css::uno::Reference< css::accessibility::XAccessible > - implGetHeaderBar( ::svt::table::AccessibleTableControlObjType eObjType ); - - /** This method returns one of the children that are always present: - Data table, row and column header bar or corner control. - @attention This method requires locked mutex's and a living object. - @return The XAccessible interface of the specified child. */ - css::uno::Reference< css::accessibility::XAccessible > - implGetFixedChild( sal_Int32 nChildIndex ); - - /** This method creates and returns an accessible table. - @return An AccessibleGridControlTable. */ - AccessibleGridControlTable* createAccessibleTable(); - -private: - // members ---------------------------------------------------------------- - std::unique_ptr< AccessibleGridControl_Impl > m_xImpl; -}; - - -/** the XAccessible which creates/returns an AccessibleGridControl - -

The instance holds its XAccessibleContext with a hard reference, while - the context holds this instance weak.

-*/ - -class AccessibleGridControlAccess : - public ::cppu::WeakImplHelper< css::accessibility::XAccessible > - ,public ::svt::table::IAccessibleTableControl -{ -private: - css::uno::Reference< css::accessibility::XAccessible > - m_xParent; - ::svt::table::IAccessibleTable * m_pTable; - - css::uno::Reference< css::accessibility::XAccessibleContext > - m_xContext; - AccessibleGridControl* m_pContext; - // note that this pointer is valid as long as m_xContext is valid! - -public: - AccessibleGridControlAccess( - const css::uno::Reference< css::accessibility::XAccessible >& _rxParent, - ::svt::table::IAccessibleTable& _rTable - ); - - /// checks whether the accessible context is still alive - bool isContextAlive() const; - - /// returns the AccessibleContext belonging to this Accessible - inline AccessibleGridControl* getContext() { return m_pContext; } - -protected: - virtual ~AccessibleGridControlAccess(); - - // XAccessible - virtual css::uno::Reference< css::accessibility::XAccessibleContext > - SAL_CALL getAccessibleContext() throw ( css::uno::RuntimeException, std::exception ) override; - - // IAccessibleTable - virtual css::uno::Reference< css::accessibility::XAccessible > - getMyself() override - { - return this; - } - void DisposeAccessImpl() override; - virtual bool isAlive() const override - { - return isContextAlive(); - } - virtual void commitCellEvent( sal_Int16 nEventId, - const css::uno::Any& rNewValue, const css::uno::Any& rOldValue ) override - { - AccessibleGridControl* pContext( getContext() ); - if ( pContext ) - pContext->commitCellEvent( nEventId, rNewValue, rOldValue ); - } - virtual void commitTableEvent( sal_Int16 nEventId, - const css::uno::Any& rNewValue, const css::uno::Any& rOldValue ) override - { - AccessibleGridControl* pContext( getContext() ); - if ( pContext ) - pContext->commitTableEvent( nEventId, rNewValue, rOldValue ); - } - virtual void commitEvent( sal_Int16 nEventId, - const css::uno::Any& rNewValue, const css::uno::Any& rOldValue ) override - { - AccessibleGridControl* pContext( getContext() ); - if ( pContext ) - pContext->commitEvent( nEventId, rNewValue, rOldValue ); - } - -private: - AccessibleGridControlAccess( const AccessibleGridControlAccess& ) = delete; - AccessibleGridControlAccess& operator=( const AccessibleGridControlAccess& ) = delete; -}; - - -} // namespace accessibility - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/extended/AccessibleGridControlBase.hxx b/accessibility/inc/accessibility/extended/AccessibleGridControlBase.hxx deleted file mode 100644 index b5ba1bd65e3e..000000000000 --- a/accessibility/inc/accessibility/extended/AccessibleGridControlBase.hxx +++ /dev/null @@ -1,356 +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_ACCESSIBILITY_EXTENDED_ACCESSIBLEGRIDCONTROLBASE_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_EXTENDED_ACCESSIBLEGRIDCONTROLBASE_HXX - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -namespace vcl { class Window; } - -namespace utl { - class AccessibleStateSetHelper; -} - - -namespace accessibility { - -typedef ::cppu::WeakAggComponentImplHelper4< - css::accessibility::XAccessibleContext, - css::accessibility::XAccessibleComponent, - css::accessibility::XAccessibleEventBroadcaster, - css::lang::XServiceInfo > - AccessibleGridControlImplHelper; - -/** The GridControl accessible objects inherit from this base class. It - implements basic functionality for various Accessibility interfaces and - the event broadcaster and contains the osl::Mutex. */ -class AccessibleGridControlBase : - public ::comphelper::OBaseMutex, - public AccessibleGridControlImplHelper -{ -public: - /** Constructor sets specified name and description. - @param rxParent XAccessible interface of the parent object. - @param rTable The Table control. - @param eObjType Type of accessible table control. */ - AccessibleGridControlBase( - const css::uno::Reference< css::accessibility::XAccessible >& rxParent, - ::svt::table::IAccessibleTable& rTable, - ::svt::table::AccessibleTableControlObjType eObjType ); - -protected: - virtual ~AccessibleGridControlBase(); - - /** Commits DeFunc event to listeners and cleans up members. */ - virtual void SAL_CALL disposing() override; - -public: - // XAccessibleContext - - /** @return A reference to the parent accessible object. */ - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL - getAccessibleParent() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return The index of this object among the parent's children. */ - virtual sal_Int32 SAL_CALL getAccessibleIndexInParent() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return - The description of this object. - */ - virtual OUString SAL_CALL getAccessibleDescription() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return - The name of this object. - */ - virtual OUString SAL_CALL getAccessibleName() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return - The relation set (the GridControl does not have one). - */ - virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL - getAccessibleRelationSet() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return The set of current states. */ - virtual css::uno::Reference< css::accessibility::XAccessibleStateSet > SAL_CALL - getAccessibleStateSet() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return The parent's locale. */ - virtual css::lang::Locale SAL_CALL getLocale() - throw ( css::accessibility::IllegalAccessibleComponentStateException, - css::uno::RuntimeException, std::exception ) override; - - /** @return - The role of this object. Panel, ROWHEADER, COLUMNHEADER, TABLE, TABLE_CELL are supported. - */ - virtual sal_Int16 SAL_CALL getAccessibleRole() - throw ( css::uno::RuntimeException, std::exception ) override; - - /* Derived classes have to implement: - - getAccessibleChildCount, - - getAccessibleChild, - - getAccessibleRole. - Derived classes may overwrite getAccessibleIndexInParent to increase - performance. */ - - // XAccessibleComponent - - /** @return - TRUE, if the point lies within the bounding box of this object. */ - virtual sal_Bool SAL_CALL containsPoint( const css::awt::Point& rPoint ) - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return The bounding box of this object. */ - virtual css::awt::Rectangle SAL_CALL getBounds() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return - The upper left corner of the bounding box relative to the parent. */ - virtual css::awt::Point SAL_CALL getLocation() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return - The upper left corner of the bounding box in screen coordinates. */ - virtual css::awt::Point SAL_CALL getLocationOnScreen() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return The size of the bounding box. */ - virtual css::awt::Size SAL_CALL getSize() - throw ( css::uno::RuntimeException, std::exception ) override; - - virtual sal_Int32 SAL_CALL getForeground( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getBackground( ) throw (css::uno::RuntimeException, std::exception) override; - - - /* Derived classes have to implement: - - getAccessibleAt, - - grabFocus. */ - - /** @return - The accessible child rendered under the given point. - */ - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL - getAccessibleAtPoint( const css::awt::Point& rPoint ) - throw ( css::uno::RuntimeException, std::exception ) override; - - // XAccessibleEventBroadcaster - - /** Adds a new event listener */ - virtual void SAL_CALL addAccessibleEventListener( - const css::uno::Reference< css::accessibility::XAccessibleEventListener>& rxListener ) - throw ( css::uno::RuntimeException, std::exception ) override; - - /** Removes an event listener. */ - virtual void SAL_CALL removeAccessibleEventListener( - const css::uno::Reference< css::accessibility::XAccessibleEventListener>& rxListener ) - throw ( css::uno::RuntimeException, std::exception ) override; - - // XTypeProvider - - /** @return An unique implementation ID. */ - virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() - throw ( css::uno::RuntimeException, std::exception ) override; - - // XServiceInfo - - /** @return Whether the specified service is supported by this class. */ - virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return A list of all supported services. */ - virtual css::uno::Sequence< OUString > SAL_CALL - getSupportedServiceNames() - throw ( css::uno::RuntimeException, std::exception ) override; - - /* Derived classes have to implement: - - getImplementationName. */ - - // helper methods - - /** @return The GridControl object type. */ - inline ::svt::table::AccessibleTableControlObjType getType() const; - - /** Commits an event to all listeners. */ - void commitEvent( - sal_Int16 nEventId, - const css::uno::Any& rNewValue, - const css::uno::Any& rOldValue ); - /** @return TRUE, if the object is not disposed or disposing. */ - bool isAlive() const; - -protected: - // internal virtual methods - - /** Determines whether the Grid control is really showing inside of - its parent accessible window. Derived classes may implement different - behaviour. - @attention This method requires locked mutex's and a living object. - @return TRUE, if the object is really showing. */ - bool implIsShowing(); - - /** Derived classes return the bounding box relative to the parent window. - @attention This method requires locked mutex's and a living object. - @return The bounding box (VCL rect.) relative to the parent window. */ - virtual Rectangle implGetBoundingBox() = 0; - ///** Derived classes return the bounding box in screen coordinates. - // @attention This method requires locked mutex's and a living object. - // @return The bounding box (VCL rect.) in screen coordinates. */ - virtual Rectangle implGetBoundingBoxOnScreen() = 0; - - /** Creates a new AccessibleStateSetHelper and fills it with states of the - current object. This method calls FillStateSet at the GridControl which - fills it with more states depending on the object type. Derived classes - may overwrite this method and add more states. - @attention This method requires locked mutex's. - @return A filled AccessibleStateSetHelper. */ - virtual ::utl::AccessibleStateSetHelper* implCreateStateSetHelper(); - - // internal helper methods - - /** @throws DisposedException If the object is not alive. */ - void ensureIsAlive() const - throw ( css::lang::DisposedException ); - - /** Changes the name of the object (flat assignment, no notify). - @attention This method requires a locked mutex. */ - inline void implSetName( const OUString& rName ); - - /** Locks all mutex's and calculates the bounding box relative to the - parent window. - @return The bounding box (VCL rect.) relative to the parent object. */ - Rectangle getBoundingBox() - throw ( css::lang::DisposedException ); - ///** Locks all mutex's and calculates the bounding box in screen - // coordinates. - // @return The bounding box (VCL rect.) in screen coordinates. */ - Rectangle getBoundingBoxOnScreen() - throw ( css::lang::DisposedException ); - - ::comphelper::AccessibleEventNotifier::TClientId getClientId() const { return m_aClientId; } - void setClientId(::comphelper::AccessibleEventNotifier::TClientId _aNewClientId) { m_aClientId = _aNewClientId; } - -protected: - // members - - /** The parent accessible object. */ - css::uno::Reference< css::accessibility::XAccessible > m_xParent; - /** The SVT Table control. */ - ::svt::table::IAccessibleTable& m_aTable; - /** The type of this object (for names, descriptions, state sets, ...). */ - ::svt::table::AccessibleTableControlObjType m_eObjType; - -private: - /** Localized name. */ - OUString m_aName; - /** Localized description text. */ - OUString m_aDescription; - ::comphelper::AccessibleEventNotifier::TClientId m_aClientId; -}; - - -// a version of AccessibleGridControlBase which implements not only the XAccessibleContext, -// but also the XAccessible - -typedef ::cppu::ImplHelper1 < css::accessibility::XAccessible - > GridControlAccessibleElement_Base; - -class GridControlAccessibleElement - :public AccessibleGridControlBase - ,public GridControlAccessibleElement_Base -{ -protected: - /** Constructor sets specified name and description. - - @param rxParent XAccessible interface of the parent object. - @param rTable The Table control. - @param eObjType Type of table control - */ - GridControlAccessibleElement( - const css::uno::Reference< css::accessibility::XAccessible >& rxParent, - ::svt::table::IAccessibleTable& rTable, - ::svt::table::AccessibleTableControlObjType eObjType ); - -public: - // XInterface - DECLARE_XINTERFACE( ) - // XTypeProvider - DECLARE_XTYPEPROVIDER( ) - -protected: - virtual ~GridControlAccessibleElement(); - -protected: - // XAccessible - - /** @return The XAccessibleContext interface of this object. */ - virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL - getAccessibleContext() - throw ( css::uno::RuntimeException, std::exception ) override; - -private: - GridControlAccessibleElement( const GridControlAccessibleElement& ) = delete; - GridControlAccessibleElement& operator=( const GridControlAccessibleElement& ) = delete; -}; - -// inlines - -inline ::svt::table::AccessibleTableControlObjType AccessibleGridControlBase::getType() const -{ - return m_eObjType; -} - -inline void AccessibleGridControlBase::implSetName( - const OUString& rName ) -{ - m_aName = rName; -} - - -} // namespace accessibility - - -#endif // ACCESSIBILITY_EXT_ACCESSIBILEGRIDCONTROLBASE_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/extended/AccessibleGridControlHeader.hxx b/accessibility/inc/accessibility/extended/AccessibleGridControlHeader.hxx deleted file mode 100644 index 5f4039f4e5bc..000000000000 --- a/accessibility/inc/accessibility/extended/AccessibleGridControlHeader.hxx +++ /dev/null @@ -1,181 +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_ACCESSIBILITY_EXTENDED_ACCESSIBLEGRIDCONTROLHEADER_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_EXTENDED_ACCESSIBLEGRIDCONTROLHEADER_HXX - -#include -#include - -namespace accessibility { - -/** This class represents the accessible object of a header bar of a Grid Control - (row or column header bar). This object supports the - XAccessibleSelection interface. Selecting a child of this object selects - complete rows or columns of the data table. */ -class AccessibleGridControlHeader : public AccessibleGridControlTableBase -{ -public: - /** @param rxParent accessible parent control - @param rTable accessible table - @param eObjType One of the two allowed types TCTYPE_ROWHEADERBAR or - TCTYPE_COLUMNHEADERBAR. */ - AccessibleGridControlHeader( - const css::uno::Reference< - css::accessibility::XAccessible >& rxParent, - ::svt::table::IAccessibleTable& rTable, - ::svt::table::AccessibleTableControlObjType eObjType ); - -protected: - virtual ~AccessibleGridControlHeader(); - -public: - // XAccessibleContext - - /** @return - The XAccessible interface of the specified child. - */ - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL - getAccessibleChild( sal_Int32 nChildIndex ) - throw ( css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception ) override; - - /** @return The index of this object among the parent's children. */ - virtual sal_Int32 SAL_CALL getAccessibleIndexInParent() - throw ( css::uno::RuntimeException, std::exception ) override; - - // XAccessibleComponent - - /** @return The accessible child rendered under the given point. */ - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL - getAccessibleAtPoint( const css::awt::Point& rPoint ) - throw ( css::uno::RuntimeException, std::exception ) override; - - /** Grabs the focus to (the current cell of) the data table. */ - virtual void SAL_CALL grabFocus() - throw ( css::uno::RuntimeException, std::exception ) override; - - // XAccessibleTable - - /** @return The description text of the specified row. */ - virtual OUString SAL_CALL - getAccessibleRowDescription( sal_Int32 nRow ) - throw ( css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception ) override; - - /** @return The description text of the specified column. */ - virtual OUString SAL_CALL - getAccessibleColumnDescription( sal_Int32 nColumn ) - throw ( css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception ) override; - - /** @return The XAccessibleTable interface of the row header bar. */ - virtual css::uno::Reference< css::accessibility::XAccessibleTable > SAL_CALL - getAccessibleRowHeaders() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return The XAccessibleTable interface of the column header bar. */ - virtual css::uno::Reference< css::accessibility::XAccessibleTable > SAL_CALL - getAccessibleColumnHeaders() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return An index list of completely selected rows. */ - virtual css::uno::Sequence< sal_Int32 > SAL_CALL - getSelectedAccessibleRows() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return An index list of completely selected columns. */ - virtual css::uno::Sequence< sal_Int32 > SAL_CALL - getSelectedAccessibleColumns() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return TRUE, if the specified row is completely selected. */ - virtual sal_Bool SAL_CALL isAccessibleRowSelected( sal_Int32 nRow ) - throw ( css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception ) override; - - /** @return TRUE, if the specified column is completely selected. */ - virtual sal_Bool SAL_CALL isAccessibleColumnSelected( sal_Int32 nColumn ) - throw ( css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception ) override; - - /** @return The XAccessible interface of the cell object at the specified - cell position. */ - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL - getAccessibleCellAt( sal_Int32 nRow, sal_Int32 nColumn ) - throw ( css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception ) override; - - /** @return TRUE, if the specified cell is selected. */ - virtual sal_Bool SAL_CALL isAccessibleSelected( sal_Int32 nRow, sal_Int32 nColumn ) - throw ( css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception ) override; - - // XServiceInfo - - /** @return The name of this class. */ - virtual OUString SAL_CALL getImplementationName() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return An unique implementation ID. */ - virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() - throw ( css::uno::RuntimeException, std::exception ) override; - -protected: - /** Returns the specified row or column. Uses one of the parameters, - depending on object type. - @attention This method requires locked mutex's and a living object. - @return The XAccessible interface of the specified column/row. */ - css::uno::Reference< css::accessibility::XAccessible > - implGetChild( sal_Int32 nRow, sal_uInt32 nColumnPos ); - /** @attention This method requires locked mutex's and a living object. - @return The bounding box (VCL rect.) relative to the parent window. */ - virtual Rectangle implGetBoundingBox() override; - /** @attention This method requires locked mutex's and a living object. - @return The bounding box (VCL rect.) in screen coordinates. */ - virtual Rectangle implGetBoundingBoxOnScreen() override; - - // internal helper methods - - /** @return TRUE, if the objects is a header bar for rows. */ - inline bool isRowBar() const; - /** @return TRUE, if the objects is a header bar for columns. */ - inline bool isColumnBar() const; -}; - -// inlines - -inline bool AccessibleGridControlHeader::isRowBar() const -{ - return getType() == ::svt::table::TCTYPE_ROWHEADERBAR; -} - -inline bool AccessibleGridControlHeader::isColumnBar() const -{ - return getType() == ::svt::table::TCTYPE_COLUMNHEADERBAR; -} - - -} // namespace accessibility - - -#endif // ACCESSIBILITY_EXT_ACCESSIBILEGRIDCONTROLHEADER_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/extended/AccessibleGridControlHeaderCell.hxx b/accessibility/inc/accessibility/extended/AccessibleGridControlHeaderCell.hxx deleted file mode 100644 index ad1449de1b06..000000000000 --- a/accessibility/inc/accessibility/extended/AccessibleGridControlHeaderCell.hxx +++ /dev/null @@ -1,86 +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_ACCESSIBILITY_EXTENDED_ACCESSIBLEGRIDCONTROLHEADERCELL_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_EXTENDED_ACCESSIBLEGRIDCONTROLHEADERCELL_HXX - -#include "accessibility/extended/AccessibleGridControlTableCell.hxx" - -namespace accessibility -{ - class AccessibleGridControlHeaderCell : public AccessibleGridControlCell, public css::accessibility::XAccessible - { - sal_Int32 m_nColumnRowId; - public: - AccessibleGridControlHeaderCell(sal_Int32 _nColumnRowId, - const css::uno::Reference< css::accessibility::XAccessible >& rxParent, - ::svt::table::IAccessibleTable& _rTable, - ::svt::table::AccessibleTableControlObjType _eObjType); - /** @return The count of visible children. */ - virtual sal_Int32 SAL_CALL getAccessibleChildCount() throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return The XAccessible interface of the specified child. */ - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL - getAccessibleChild( sal_Int32 nChildIndex ) throw ( css::lang::IndexOutOfBoundsException,css::uno::RuntimeException, std::exception ) override; - - /** @return The index of this object among the parent's children. */ - virtual sal_Int32 SAL_CALL getAccessibleIndexInParent() throw ( css::uno::RuntimeException, std::exception ) override; - - /** Grabs the focus to the GridControl. */ - virtual void SAL_CALL grabFocus() throw ( css::uno::RuntimeException, std::exception ) override; - - // XInterface - - /** Queries for a new interface. */ - css::uno::Any SAL_CALL queryInterface( const css::uno::Type& rType ) - throw ( css::uno::RuntimeException, std::exception ) override; - - /** Aquires the object (calls acquire() on base class). */ - virtual void SAL_CALL acquire() throw () override; - - /** Releases the object (calls release() on base class). */ - virtual void SAL_CALL release() throw () override; - // XAccessible - - /** @return The XAccessibleContext interface of this object. */ - virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL - getAccessibleContext() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return - The name of this class. - */ - virtual OUString SAL_CALL getImplementationName() throw ( css::uno::RuntimeException, std::exception ) override; - - /** Creates a new AccessibleStateSetHelper and fills it with states of the - current object. - @return - A filled AccessibleStateSetHelper. - */ - ::utl::AccessibleStateSetHelper* implCreateStateSetHelper() override; - - protected: - virtual Rectangle implGetBoundingBox() override; - - virtual Rectangle implGetBoundingBoxOnScreen() override; - }; -} - -#endif // INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_EXTENDED_ACCESSIBLEGRIDCONTROLHEADERCELL_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/extended/AccessibleGridControlTable.hxx b/accessibility/inc/accessibility/extended/AccessibleGridControlTable.hxx deleted file mode 100644 index 22c71db21f52..000000000000 --- a/accessibility/inc/accessibility/extended/AccessibleGridControlTable.hxx +++ /dev/null @@ -1,210 +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_ACCESSIBILITY_EXTENDED_ACCESSIBLEGRIDCONTROLTABLE_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_EXTENDED_ACCESSIBLEGRIDCONTROLTABLE_HXX - -#include "accessibility/extended/AccessibleGridControlTableBase.hxx" -#include -#include -#include - - -namespace accessibility { - - -typedef ::cppu::ImplHelper1 < css::accessibility::XAccessibleSelection > - AccessibleGridControlTableSelectionImplHelper; -/** This class represents the accessible object of the data table of a - Grid control. */ -class AccessibleGridControlTable : public AccessibleGridControlTableBase, - public AccessibleGridControlTableSelectionImplHelper -{ -public: - AccessibleGridControlTable( - const css::uno::Reference< css::accessibility::XAccessible >& rxParent, - ::svt::table::IAccessibleTable& rTable, - ::svt::table::AccessibleTableControlObjType _eType); - -protected: - virtual ~AccessibleGridControlTable(); -private: - std::vector< AccessibleGridControlTableCell* > m_pCellVector; - std::vector< css::uno::Reference< css::accessibility::XAccessible> > m_pAccessCellVector; -public: - // XAccessibleContext - - /** @return The XAccessible interface of the specified child. */ - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL - getAccessibleChild( sal_Int32 nChildIndex ) - throw ( css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception ) override; - - /** @return The index of this object among the parent's children. */ - virtual sal_Int32 SAL_CALL getAccessibleIndexInParent() - throw ( css::uno::RuntimeException, std::exception ) override; - - // XAccessibleComponent - - /** @return The accessible child rendered under the given point. */ - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL - getAccessibleAtPoint( const css::awt::Point& rPoint ) - throw ( css::uno::RuntimeException, std::exception ) override; - - /** Grabs the focus to (the current cell of) the data table. */ - virtual void SAL_CALL grabFocus() - throw ( css::uno::RuntimeException, std::exception ) override; - - // XAccessibleTable - - /** @return The description text of the specified row. */ - virtual OUString SAL_CALL getAccessibleRowDescription( sal_Int32 nRow ) - throw ( css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception ) override; - - /** @return The description text of the specified column. */ - virtual OUString SAL_CALL getAccessibleColumnDescription( sal_Int32 nColumn ) - throw ( css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception ) override; - - /** @return The XAccessibleTable interface of the row header bar. */ - virtual css::uno::Reference< css::accessibility::XAccessibleTable > SAL_CALL - getAccessibleRowHeaders() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return The XAccessibleTable interface of the column header bar. */ - virtual css::uno::Reference< css::accessibility::XAccessibleTable > SAL_CALL - getAccessibleColumnHeaders() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return An index list of completely selected rows. */ - virtual css::uno::Sequence< sal_Int32 > SAL_CALL - getSelectedAccessibleRows() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return An index list of completely selected columns. */ - virtual css::uno::Sequence< sal_Int32 > SAL_CALL - getSelectedAccessibleColumns() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return TRUE, if the specified row is completely selected. */ - virtual sal_Bool SAL_CALL isAccessibleRowSelected( sal_Int32 nRow ) - throw ( css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception ) override; - - /** @return TRUE, if the specified column is completely selected. */ - virtual sal_Bool SAL_CALL isAccessibleColumnSelected( sal_Int32 nColumn ) - throw ( css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception ) override; - - /** @return The XAccessible interface of the cell object at the specified - cell position. */ - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL - getAccessibleCellAt( sal_Int32 nRow, sal_Int32 nColumn ) - throw ( css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception ) override; - - /** @return TRUE, if the specified cell is selected. */ - virtual sal_Bool SAL_CALL isAccessibleSelected( sal_Int32 nRow, sal_Int32 nColumn ) - throw ( css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception ) override; - - // XAccessibleSelection - - /** Selects the specified child (row or column of the table). */ - virtual void SAL_CALL selectAccessibleChild( sal_Int32 nChildIndex ) - throw ( css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception ) override; - - /** @return TRUE, if the specified child (row/column) is selected. */ - virtual sal_Bool SAL_CALL isAccessibleChildSelected( sal_Int32 nChildIndex ) - throw ( css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception ) override; - - /** Clears the complete selection. */ - virtual void SAL_CALL clearAccessibleSelection() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** Selects all children or first, if multiselection is not supported. */ - virtual void SAL_CALL selectAllAccessibleChildren() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return The number of selected rows/columns. */ - virtual sal_Int32 SAL_CALL getSelectedAccessibleChildCount() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return The specified selected row/column. */ - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL - getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) - throw ( css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception ) override; - - /** Removes the specified row/column from the selection. */ - virtual void SAL_CALL deselectAccessibleChild( sal_Int32 nSelectedChildIndex ) - throw ( css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception ) override; - // XInterface - - /** Queries for a new interface. */ - css::uno::Any SAL_CALL queryInterface( const css::uno::Type& rType ) - throw ( css::uno::RuntimeException, std::exception ) override; - - /** Aquires the object (calls acquire() on base class). */ - virtual void SAL_CALL acquire() throw () override; - - /** Releases the object (calls release() on base class). */ - virtual void SAL_CALL release() throw () override; - // XServiceInfo - - /** @return The name of this class. */ - virtual OUString SAL_CALL getImplementationName() - throw ( css::uno::RuntimeException, std::exception ) override; - - /**@return m_pCellVector*/ - std::vector< AccessibleGridControlTableCell* >& getCellVector() { return m_pCellVector;} - /**@return m_xAccessCellVector*/ - std::vector< css::uno::Reference< css::accessibility::XAccessible > >& getAccessibleCellVector() { return m_pAccessCellVector;} - -protected: - // internal virtual methods - - /** @attention This method requires locked mutex's and a living object. - @return The bounding box (VCL rect.) relative to the parent window. */ - virtual Rectangle implGetBoundingBox() override; - ///** @attention This method requires locked mutex's and a living object. - // @return The bounding box (VCL rect.) in screen coordinates. */ - virtual Rectangle implGetBoundingBoxOnScreen() override; - - - //// internal helper methods - ///** @attention This method requires a locked mutex. - // @return The XAccessibleTable interface of the specified header bar. */ - css::uno::Reference< css::accessibility::XAccessibleTable > - implGetHeaderBar( sal_Int32 nChildIndex ) - throw ( css::uno::RuntimeException ); -}; - - -} // namespace accessibility - - -#endif // ACCESSIBILITY_EXT_ACCESSIBILEGRIDCONTROLTABLE_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/extended/AccessibleGridControlTableBase.hxx b/accessibility/inc/accessibility/extended/AccessibleGridControlTableBase.hxx deleted file mode 100644 index e2311aaa77b6..000000000000 --- a/accessibility/inc/accessibility/extended/AccessibleGridControlTableBase.hxx +++ /dev/null @@ -1,207 +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_ACCESSIBILITY_EXTENDED_ACCESSIBLEGRIDCONTROLTABLEBASE_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_EXTENDED_ACCESSIBLEGRIDCONTROLTABLEBASE_HXX - -#include "accessibility/extended/AccessibleGridControlBase.hxx" -#include -#include - - -namespace accessibility { - -typedef ::cppu::ImplHelper1 < css::accessibility::XAccessibleTable > - AccessibleGridControlTableImplHelper; - -/** The Grid Control accessible table objects inherit from this base class. It - implements basic functionality for the XAccessibleTable interface. - Grid COntrol table objects are: the data table, the column header bar and the - row header bar. */ -class AccessibleGridControlTableBase : - public GridControlAccessibleElement, - public AccessibleGridControlTableImplHelper -{ -public: - /** Constructor sets specified name and description. - @param rxParent XAccessible interface of the parent object. - @param rTable The Table control. - @param eObjType Type of table control object */ - AccessibleGridControlTableBase( - const css::uno::Reference< css::accessibility::XAccessible >& rxParent, - ::svt::table::IAccessibleTable& rTable, - ::svt::table::AccessibleTableControlObjType eObjType ); - -protected: - virtual ~AccessibleGridControlTableBase(); - -public: - // XAccessibleContext - - /** @return The count of visible children. */ - virtual sal_Int32 SAL_CALL getAccessibleChildCount() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return The role of this object (a table). */ - virtual sal_Int16 SAL_CALL getAccessibleRole() - throw ( css::uno::RuntimeException, std::exception ) override; - - /* Derived classes have to implement: - - getAccessibleChild, - - getAccessibleIndexInParent. */ - - // XAccessibleComponent - - /* Derived classes have to implement: - - getAccessibleAt, - - grabFocus. */ - - // XAccessibleTable - - /** @return The number of used rows in the table (0 = empty table). */ - virtual sal_Int32 SAL_CALL getAccessibleRowCount() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return The number of used columns in the table (0 = empty table). */ - virtual sal_Int32 SAL_CALL getAccessibleColumnCount() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return The row extent of the specified cell (always 1). */ - virtual sal_Int32 SAL_CALL - getAccessibleRowExtentAt( sal_Int32 nRow, sal_Int32 nColumn ) - throw ( css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception ) override; - - /** @return The column extent of the specified cell (always 1). */ - virtual sal_Int32 SAL_CALL - getAccessibleColumnExtentAt( sal_Int32 nRow, sal_Int32 nColumn ) - throw ( css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception ) override; - - /** @return The caption cell of the table (not supported). */ - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL - getAccessibleCaption() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return The summary object of the table (not supported). */ - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL - getAccessibleSummary() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return The child index of the specified cell. */ - virtual sal_Int32 SAL_CALL getAccessibleIndex( sal_Int32 nRow, sal_Int32 nColumn ) - throw ( css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception ) override; - - /** @return The row index of the specified child cell. */ - virtual sal_Int32 SAL_CALL getAccessibleRow( sal_Int32 nChildIndex ) - throw ( css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception ) override; - - /** @return The column index of the specified child cell. */ - virtual sal_Int32 SAL_CALL getAccessibleColumn( sal_Int32 nChildIndex ) - throw ( css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception ) override; - - /* Derived classes have to implement: - - getAccessibleRowDescription, - - getAccessibleColumnDescription, - - getAccessibleRowHeaders, - - getAccessibleColumnHeaders, - - getSelectedAccessibleRows, - - getSelectedAccessibleColumns, - - isAccessibleRowSelected, - - isAccessibleColumnSelected, - - getAccessibleCellAt, - - isAccessibleSelected. */ - - // XInterface - - /** Queries for a new interface. */ - css::uno::Any SAL_CALL queryInterface( const css::uno::Type& rType ) - throw ( css::uno::RuntimeException, std::exception ) override; - - /** Aquires the object (calls acquire() on base class). */ - virtual void SAL_CALL acquire() throw () override; - - /** Releases the object (calls release() on base class). */ - virtual void SAL_CALL release() throw () override; - - // XTypeProvider - - /** @return A sequence of possible types (received from base classes). */ - virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return An unique implementation ID. */ - virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() - throw ( css::uno::RuntimeException, std::exception ) override; - -protected: - // internal helper methods - - /** @attention This method requires locked mutex's and a living object. - @return The number of cells of the table. */ - sal_Int32 implGetChildCount() const; - - /** @attention This method requires locked mutex's and a living object. - @return The row index of the specified cell index. */ - sal_Int32 implGetRow( sal_Int32 nChildIndex ) const; - /** @attention This method requires locked mutex's and a living object. - @return The column index of the specified cell index. */ - sal_Int32 implGetColumn( sal_Int32 nChildIndex ) const; - /** @attention This method requires locked mutex's and a living object. - @return The child index of the specified cell address. */ - sal_Int32 implGetChildIndex( sal_Int32 nRow, sal_Int32 nColumn ) const; - - /** Fills a sequence with sorted indexes of completely selected rows. - @attention This method requires locked mutex's and a living object. - @param rSeq Out-parameter that takes the sorted row index list. */ - void implGetSelectedRows( css::uno::Sequence< sal_Int32 >& rSeq ); - - /** @attention This method requires locked mutex's and a living object. - @throws IndexOutOfBoundsException - If the specified row index is invalid. */ - void ensureIsValidRow( sal_Int32 nRow ) - throw ( css::lang::IndexOutOfBoundsException ); - /** @attention This method requires locked mutex's and a living object. - @throws IndexOutOfBoundsException - If the specified column index is invalid. */ - void ensureIsValidColumn( sal_Int32 nColumn ) - throw ( css::lang::IndexOutOfBoundsException ); - /** @attention This method requires locked mutex's and a living object. - @throws IndexOutOfBoundsException - If the specified cell address is invalid. */ - void ensureIsValidAddress( sal_Int32 nRow, sal_Int32 nColumn ) - throw ( css::lang::IndexOutOfBoundsException ); - /** @attention This method requires locked mutex's and a living object. - @throws IndexOutOfBoundsException - If the specified child index is invalid. */ - void ensureIsValidIndex( sal_Int32 nChildIndex ) - throw ( css::lang::IndexOutOfBoundsException ); -}; - - -} // namespace accessibility - - -#endif // ACCESSIBILITY_EXT_ACCESSIBILEGRIDCONTROLTABLEBASE_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/extended/AccessibleGridControlTableCell.hxx b/accessibility/inc/accessibility/extended/AccessibleGridControlTableCell.hxx deleted file mode 100644 index f03df43d2265..000000000000 --- a/accessibility/inc/accessibility/extended/AccessibleGridControlTableCell.hxx +++ /dev/null @@ -1,154 +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_ACCESSIBILITY_EXTENDED_ACCESSIBLEGRIDCONTROLTABLECELL_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_EXTENDED_ACCESSIBLEGRIDCONTROLTABLECELL_HXX - -#include -#include -#include "accessibility/extended/AccessibleGridControlBase.hxx" -#include - -namespace accessibility -{ - class AccessibleGridControlCell : public AccessibleGridControlBase - { - private: - sal_Int32 m_nRowPos; // the row number of the table cell - sal_Int32 m_nColPos; // the column id of the table cell - - protected: - // attribute access - inline sal_Int32 getRowPos( ) const { return m_nRowPos; } - inline sal_Int32 getColumnPos( ) const { return m_nColPos; } - - // XAccessibleComponent - virtual void SAL_CALL grabFocus() throw ( css::uno::RuntimeException, std::exception ) override; - - protected: - AccessibleGridControlCell( - const css::uno::Reference< css::accessibility::XAccessible >& _rxParent, - ::svt::table::IAccessibleTable& _rTable, - sal_Int32 _nRowPos, - sal_uInt16 _nColPos, - ::svt::table::AccessibleTableControlObjType _eType - ); - - virtual ~AccessibleGridControlCell(); - - private: - AccessibleGridControlCell( const AccessibleGridControlCell& ) = delete; - AccessibleGridControlCell& operator=( const AccessibleGridControlCell& ) = delete; - }; - - typedef ::cppu::ImplHelper2 < css::accessibility::XAccessibleText - , css::accessibility::XAccessible - > AccessibleTextHelper_BASE; - // implementation of a table cell of GridControl - class AccessibleGridControlTableCell :public AccessibleGridControlCell - ,public AccessibleTextHelper_BASE - ,public ::comphelper::OCommonAccessibleText - { - protected: - // OCommonAccessibleText - virtual OUString implGetText() override; - virtual css::lang::Locale implGetLocale() override; - virtual void implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ) override; - virtual Rectangle implGetBoundingBox() override; - virtual Rectangle implGetBoundingBoxOnScreen() override; - - public: - AccessibleGridControlTableCell( const css::uno::Reference< css::accessibility::XAccessible >& _rxParent, - ::svt::table::IAccessibleTable& _rTable, - sal_Int32 _nRowId, - sal_uInt16 _nColId, - svt::table::AccessibleTableControlObjType eObjType); - - // XInterface ------------------------------------------------------------- - - /** Queries for a new interface. */ - css::uno::Any SAL_CALL queryInterface( const css::uno::Type& rType ) - throw ( css::uno::RuntimeException, std::exception ) override; - - /** Aquires the object (calls acquire() on base class). */ - virtual void SAL_CALL acquire() throw () override; - - /** Releases the object (calls release() on base class). */ - virtual void SAL_CALL release() throw () override; - - /** @return The index of this object among the parent's children. */ - virtual sal_Int32 SAL_CALL getAccessibleIndexInParent() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return - The name of this class. - */ - virtual OUString SAL_CALL getImplementationName() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return - The count of visible children. - */ - virtual sal_Int32 SAL_CALL getAccessibleChildCount() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return - The XAccessible interface of the specified child. - */ - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL - getAccessibleChild( sal_Int32 nChildIndex ) - throw ( css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception ) override; - - /** Creates a new AccessibleStateSetHelper and fills it with states of the - current object. - @return - A filled AccessibleStateSetHelper. - */ - ::utl::AccessibleStateSetHelper* implCreateStateSetHelper() override; - - // XAccessible ------------------------------------------------------------ - - /** @return The XAccessibleContext interface of this object. */ - virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL - getAccessibleContext() - throw ( css::uno::RuntimeException, std::exception ) override; - - // XAccessibleText - virtual sal_Int32 SAL_CALL getCaretPosition() throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual sal_Unicode SAL_CALL getCharacter( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getCharacterAttributes( sal_Int32 nIndex, const css::uno::Sequence< OUString >& aRequestedAttributes ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual css::awt::Rectangle SAL_CALL getCharacterBounds( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getCharacterCount() throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getIndexAtPoint( const css::awt::Point& aPoint ) throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getSelectedText() throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getSelectionStart() throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getSelectionEnd() throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getText() throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual css::accessibility::TextSegment SAL_CALL getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (css::lang::IndexOutOfBoundsException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override; - virtual css::accessibility::TextSegment SAL_CALL getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (css::lang::IndexOutOfBoundsException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override; - virtual css::accessibility::TextSegment SAL_CALL getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (css::lang::IndexOutOfBoundsException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - }; -} -#endif // INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_EXTENDED_ACCESSIBLEGRIDCONTROLTABLECELL_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/extended/accessiblebrowseboxcell.hxx b/accessibility/inc/accessibility/extended/accessiblebrowseboxcell.hxx deleted file mode 100644 index bafb0590da5c..000000000000 --- a/accessibility/inc/accessibility/extended/accessiblebrowseboxcell.hxx +++ /dev/null @@ -1,77 +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_ACCESSIBILITY_EXTENDED_ACCESSIBLEBROWSEBOXCELL_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_EXTENDED_ACCESSIBLEBROWSEBOXCELL_HXX - -#include "accessibility/extended/AccessibleBrowseBoxBase.hxx" -#include - - -namespace accessibility -{ - - - // = AccessibleBrowseBoxCell - - /** common accessibility-functionality for browse box elements which occupy a cell - */ - class AccessibleBrowseBoxCell : public AccessibleBrowseBoxBase - { - private: - sal_Int32 m_nRowPos; // the row number of the table cell - sal_uInt16 m_nColPos; // the column id of the table cell - - protected: - // attribute access - inline sal_Int32 getRowPos( ) const { return m_nRowPos; } - inline sal_Int32 getColumnPos( ) const { return m_nColPos; } - - protected: - // AccessibleBrowseBoxBase overridables - virtual Rectangle implGetBoundingBox() override; - virtual Rectangle implGetBoundingBoxOnScreen() override; - - // XAccessibleComponent - virtual void SAL_CALL grabFocus() throw ( css::uno::RuntimeException, std::exception ) override; - - protected: - AccessibleBrowseBoxCell( - const css::uno::Reference< css::accessibility::XAccessible >& _rxParent, - ::svt::IAccessibleTableProvider& _rBrowseBox, - const css::uno::Reference< css::awt::XWindow >& _xFocusWindow, - sal_Int32 _nRowPos, - sal_uInt16 _nColPos, - ::svt::AccessibleBrowseBoxObjType _eType = ::svt::BBTYPE_TABLECELL - ); - - virtual ~AccessibleBrowseBoxCell(); - - private: - AccessibleBrowseBoxCell( const AccessibleBrowseBoxCell& ) = delete; - AccessibleBrowseBoxCell& operator=( const AccessibleBrowseBoxCell& ) = delete; - }; - - -} // namespace accessibility - - -#endif // INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_EXTENDED_ACCESSIBLEBROWSEBOXCELL_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/extended/accessibleeditbrowseboxcell.hxx b/accessibility/inc/accessibility/extended/accessibleeditbrowseboxcell.hxx deleted file mode 100644 index 8ec563a65e8b..000000000000 --- a/accessibility/inc/accessibility/extended/accessibleeditbrowseboxcell.hxx +++ /dev/null @@ -1,142 +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_ACCESSIBILITY_EXTENDED_ACCESSIBLEEDITBROWSEBOXCELL_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_EXTENDED_ACCESSIBLEEDITBROWSEBOXCELL_HXX - -#include "accessiblebrowseboxcell.hxx" -#include -#include -#include -#include -#include -#include -#include - -namespace accessibility -{ - - // = EditBrowseBoxTableCell - - class EditBrowseBoxTableCell :public AccessibleBrowseBoxCell - ,public ::comphelper::OAccessibleContextWrapperHelper - { - public: - EditBrowseBoxTableCell( - const css::uno::Reference< css::accessibility::XAccessible >& _rxParent, - const css::uno::Reference< css::accessibility::XAccessible >& _rxOwningAccessible, - const css::uno::Reference< css::accessibility::XAccessibleContext >& _xControlChild, - ::svt::IAccessibleTableProvider& _rBrowseBox, - const css::uno::Reference< css::awt::XWindow >& _xFocusWindow, - sal_Int32 _nRowPos, - sal_uInt16 _nColPos - ); - - protected: - virtual ~EditBrowseBoxTableCell(); - - protected: - // XAccessibleComponent - virtual sal_Int32 SAL_CALL getForeground( ) throw (css::uno::RuntimeException, std::exception) override ; - virtual sal_Int32 SAL_CALL getBackground( ) throw (css::uno::RuntimeException, std::exception) override ; - - // XServiceInfo - virtual OUString SAL_CALL getImplementationName() throw ( css::uno::RuntimeException, std::exception ) override; - - // XInterface - DECLARE_XINTERFACE( ) - // XTypeProvider - DECLARE_XTYPEPROVIDER( ) - - // XAccessibleContext - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent( ) throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getAccessibleDescription( ) throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getAccessibleName( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet( ) throw (css::uno::RuntimeException, std::exception) override; - - sal_Int16 SAL_CALL getAccessibleRole() throw ( css::uno::RuntimeException, std::exception ) override; - - virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - - virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) throw (css::uno::RuntimeException, std::exception) override; - protected: - // OComponentHelper - virtual void SAL_CALL disposing() override; - - // XComponent/OComponentProxyAggregationHelper (needs to be disambiguated) - virtual void SAL_CALL dispose() throw( css::uno::RuntimeException, std::exception ) override; - - // OAccessibleContextWrapperHelper(); - void notifyTranslatedEvent( const css::accessibility::AccessibleEventObject& _rEvent ) throw (css::uno::RuntimeException) override; - - private: - EditBrowseBoxTableCell( const EditBrowseBoxTableCell& ) = delete; - EditBrowseBoxTableCell& operator=( const EditBrowseBoxTableCell& ) = delete; - }; - - - // = EditBrowseBoxTableCell - - // XAccessible providing an EditBrowseBoxTableCell - class EditBrowseBoxTableCellAccess: - public comphelper::OBaseMutex, - public cppu::WeakComponentImplHelper - { - protected: - css::uno::WeakReference< css::accessibility::XAccessibleContext > - m_aContext; - css::uno::Reference< css::accessibility::XAccessible > - m_xParent; - css::uno::Reference< css::accessibility::XAccessible > - m_xControlAccessible; - css::uno::Reference< css::awt::XWindow > - m_xFocusWindow; - ::svt::IAccessibleTableProvider* m_pBrowseBox; - sal_Int32 m_nRowPos; - sal_uInt16 m_nColPos; - - public: - EditBrowseBoxTableCellAccess( - const css::uno::Reference< css::accessibility::XAccessible >& _rxParent, - const css::uno::Reference< css::accessibility::XAccessible >& _rxControlAccessible, - const css::uno::Reference< css::awt::XWindow >& _rxFocusWindow, - ::svt::IAccessibleTableProvider& _rBrowseBox, - sal_Int32 _nRowPos, - sal_uInt16 _nColPos - ); - - protected: - virtual ~EditBrowseBoxTableCellAccess(); - - // XAccessible - virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( ) throw (css::uno::RuntimeException, std::exception) override; - - // XComponent/OComponentHelper - virtual void SAL_CALL disposing() override; - - private: - EditBrowseBoxTableCellAccess( const EditBrowseBoxTableCellAccess& ) = delete; - EditBrowseBoxTableCellAccess& operator=( const EditBrowseBoxTableCellAccess& ) = delete; - }; -} - -#endif // INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_EXTENDED_ACCESSIBLEEDITBROWSEBOXCELL_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/extended/accessibleiconchoicectrl.hxx b/accessibility/inc/accessibility/extended/accessibleiconchoicectrl.hxx deleted file mode 100644 index 0bcaea64a6b8..000000000000 --- a/accessibility/inc/accessibility/extended/accessibleiconchoicectrl.hxx +++ /dev/null @@ -1,110 +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_ACCESSIBILITY_EXTENDED_ACCESSIBLEICONCHOICECTRL_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_EXTENDED_ACCESSIBLEICONCHOICECTRL_HXX - -#include -#include -#include -#include -#include - -// class AccessibleListBox ----------------------------------------------- - -class SvtIconChoiceCtrl; - -namespace accessibility -{ - typedef ::cppu::ImplHelper2< css::accessibility::XAccessible - , css::accessibility::XAccessibleSelection> AccessibleIconChoiceCtrl_BASE; - - /** the class OAccessibleListBoxEntry represents the base class for an accessible object of a listbox entry - */ - class AccessibleIconChoiceCtrl :public AccessibleIconChoiceCtrl_BASE - ,public VCLXAccessibleComponent - { - protected: - css::uno::Reference< css::accessibility::XAccessible > m_xParent; - - protected: - virtual ~AccessibleIconChoiceCtrl(); - - /** this function is called upon disposing the component */ - virtual void SAL_CALL disposing() override; - - virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) override; - virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ) override; - - VclPtr< SvtIconChoiceCtrl > getCtrl(); - - public: - /** OAccessibleBase needs a valid view - @param _rIconCtrl - is the box for which we implement an accessible object - @param _xParent - is our parent accessible object - */ - AccessibleIconChoiceCtrl( SvtIconChoiceCtrl& _rIconCtrl, - const css::uno::Reference< css::accessibility::XAccessible >& _xParent ); - - // XTypeProvider - DECLARE_XTYPEPROVIDER() - - // XInterface - DECLARE_XINTERFACE() - - // XServiceInfo - virtual OUString SAL_CALL getImplementationName() throw(css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(css::uno::RuntimeException, std::exception) override; - - // XServiceInfo - static methods - static css::uno::Sequence< OUString > getSupportedServiceNames_Static() throw(css::uno::RuntimeException); - static OUString getImplementationName_Static() throw(css::uno::RuntimeException); - - // XAccessible - virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( ) throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleContext - virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw ( css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception ) override; - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int16 SAL_CALL getAccessibleRole( ) throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getAccessibleDescription( ) throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getAccessibleName( ) throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleSelection - void SAL_CALL selectAccessibleChild( sal_Int32 nChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - sal_Bool SAL_CALL isAccessibleChildSelected( sal_Int32 nChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - void SAL_CALL clearAccessibleSelection( ) throw (css::uno::RuntimeException, std::exception) override; - void SAL_CALL selectAllAccessibleChildren( ) throw (css::uno::RuntimeException, std::exception) override; - sal_Int32 SAL_CALL getSelectedAccessibleChildCount( ) throw (css::uno::RuntimeException, std::exception) override; - css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - void SAL_CALL deselectAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - }; - - -}// namespace accessibility - - -#endif // INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_EXTENDED_ACCESSIBLEICONCHOICECTRL_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/extended/accessibleiconchoicectrlentry.hxx b/accessibility/inc/accessibility/extended/accessibleiconchoicectrlentry.hxx deleted file mode 100644 index 180aedf06090..000000000000 --- a/accessibility/inc/accessibility/extended/accessibleiconchoicectrlentry.hxx +++ /dev/null @@ -1,191 +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_ACCESSIBILITY_EXTENDED_ACCESSIBLEICONCHOICECTRLENTRY_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_EXTENDED_ACCESSIBLEICONCHOICECTRLENTRY_HXX - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// forward - -class SvxIconChoiceCtrlEntry; -class SvtIconChoiceCtrl; - -namespace accessibility -{ - -// class AccessibleIconChoiceCtrlEntry - - typedef ::cppu::WeakAggComponentImplHelper8< css::accessibility::XAccessible - , css::accessibility::XAccessibleContext - , css::accessibility::XAccessibleComponent - , css::accessibility::XAccessibleEventBroadcaster - , css::accessibility::XAccessibleText - , css::accessibility::XAccessibleAction - , css::lang::XServiceInfo - , css::lang::XEventListener > AccessibleIconChoiceCtrlEntry_BASE; - - /** the class AccessibleListBoxEntry represents the class for an accessible object of a listbox entry */ - class AccessibleIconChoiceCtrlEntry : public ::comphelper::OBaseMutex, - public AccessibleIconChoiceCtrlEntry_BASE, - public ::comphelper::OCommonAccessibleText - { - private: - /** The treelistbox control */ - VclPtr m_pIconCtrl; - sal_Int32 m_nIndex; - - protected: - /// client id in the AccessibleEventNotifier queue - sal_uInt32 m_nClientId; - - css::uno::Reference< css::accessibility::XAccessible > m_xParent; - - private: - Rectangle GetBoundingBox_Impl() const; - Rectangle GetBoundingBoxOnScreen_Impl() const; - bool IsAlive_Impl() const; - bool IsShowing_Impl() const; - - Rectangle GetBoundingBox() - throw (css::lang::DisposedException, - css::uno::RuntimeException); - Rectangle GetBoundingBoxOnScreen() - throw (css::lang::DisposedException, - css::uno::RuntimeException); - void EnsureIsAlive() const throw ( css::lang::DisposedException ); - - protected: - virtual ~AccessibleIconChoiceCtrlEntry(); - /** this function is called upon disposing the component - */ - virtual void SAL_CALL disposing() override; - - // OCommonAccessibleText - virtual OUString implGetText() override; - virtual css::lang::Locale implGetLocale() override; - virtual void implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ) override; - - public: - /** Ctor() - @param _rIconCtrl - the icon control - @param _nPos - the entry number - @param _xParent - is our parent accessible object - */ - AccessibleIconChoiceCtrlEntry( SvtIconChoiceCtrl& _rIconCtrl, - sal_Int32 _nPos, - const css::uno::Reference< css::accessibility::XAccessible >& _xParent ); - - // XTypeProvider - virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (css::uno::RuntimeException, std::exception) override; - - // XServiceInfo - virtual OUString SAL_CALL getImplementationName() throw(css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(css::uno::RuntimeException, std::exception) override; - - // XServiceInfo - static methods - static css::uno::Sequence< OUString > getSupportedServiceNames_Static() throw(css::uno::RuntimeException); - static OUString getImplementationName_Static() throw(css::uno::RuntimeException); - - // XEventListener - virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) throw(css::uno::RuntimeException, std::exception) override; - - // XAccessible - virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( ) throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleContext - virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw ( css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception ) override; - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getAccessibleIndexInParent( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int16 SAL_CALL getAccessibleRole( ) throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getAccessibleDescription( ) throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getAccessibleName( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::lang::Locale SAL_CALL getLocale( ) throw (css::accessibility::IllegalAccessibleComponentStateException, css::uno::RuntimeException, std::exception) override; - - // XAccessibleComponent - virtual sal_Bool SAL_CALL containsPoint( const css::awt::Point& aPoint ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const css::awt::Point& aPoint ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::awt::Rectangle SAL_CALL getBounds( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::awt::Point SAL_CALL getLocation( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::awt::Point SAL_CALL getLocationOnScreen( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::awt::Size SAL_CALL getSize( ) throw (css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL grabFocus( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getForeground( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getBackground( ) throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleText - virtual sal_Int32 SAL_CALL getCaretPosition() throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual sal_Unicode SAL_CALL getCharacter( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getCharacterAttributes( sal_Int32 nIndex, const css::uno::Sequence< OUString >& aRequestedAttributes ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual css::awt::Rectangle SAL_CALL getCharacterBounds( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getCharacterCount() throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getIndexAtPoint( const css::awt::Point& aPoint ) throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getSelectedText() throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getSelectionStart() throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getSelectionEnd() throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getText() throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual css::accessibility::TextSegment SAL_CALL getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (css::lang::IndexOutOfBoundsException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override; - virtual css::accessibility::TextSegment SAL_CALL getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (css::lang::IndexOutOfBoundsException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override; - virtual css::accessibility::TextSegment SAL_CALL getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (css::lang::IndexOutOfBoundsException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - - // XAccessibleEventBroadcaster - virtual void SAL_CALL addAccessibleEventListener( const css::uno::Reference< css::accessibility::XAccessibleEventListener >& xListener ) throw (css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL removeAccessibleEventListener( const css::uno::Reference< css::accessibility::XAccessibleEventListener >& xListener ) throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleAction - virtual sal_Int32 SAL_CALL getAccessibleActionCount( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL doAccessibleAction( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getAccessibleActionDescription( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessibleKeyBinding > SAL_CALL getAccessibleActionKeyBinding( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - }; - - -}// namespace accessibility - - -#endif // INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_EXTENDED_ACCESSIBLEICONCHOICECTRLENTRY_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/extended/accessiblelistbox.hxx b/accessibility/inc/accessibility/extended/accessiblelistbox.hxx deleted file mode 100644 index a6e0c5cae09c..000000000000 --- a/accessibility/inc/accessibility/extended/accessiblelistbox.hxx +++ /dev/null @@ -1,133 +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_ACCESSIBILITY_EXTENDED_ACCESSIBLELISTBOX_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_EXTENDED_ACCESSIBLELISTBOX_HXX - -#include -#include -#include -#include -#include - -#include - -// class AccessibleListBox ----------------------------------------------- - -class SvTreeListBox; -class SvTreeListEntry; - -namespace accessibility -{ - class AccessibleListBoxEntry; - - /** the class OAccessibleListBoxEntry represents the base class for an accessible object of a listbox entry - */ - class AccessibleListBox: - public cppu::ImplHelper2< - css::accessibility::XAccessible, - css::accessibility::XAccessibleSelection>, - public VCLXAccessibleComponent - { - protected: - - css::uno::Reference< css::accessibility::XAccessible > m_xParent; - - protected: - virtual ~AccessibleListBox(); - - // OComponentHelper overridables - /** this function is called upon disposing the component */ - virtual void SAL_CALL disposing() override; - - // VCLXAccessibleComponent - virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) override; - virtual void ProcessWindowChildEvent( const VclWindowEvent& rVclWindowEvent ) override; - virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ) override; - - VclPtr< SvTreeListBox > getListBox() const; - - void RemoveChildEntries(SvTreeListEntry*); - - sal_Int32 GetRoleType(); - - public: - /** OAccessibleBase needs a valid view - @param _rListBox - is the box for which we implement an accessible object - @param _xParent - is our parent accessible object - */ - AccessibleListBox( SvTreeListBox& _rListBox, - const css::uno::Reference< css::accessibility::XAccessible >& _xParent ); - - // XTypeProvider - DECLARE_XTYPEPROVIDER() - - // XInterface - DECLARE_XINTERFACE() - - // XServiceInfo - virtual OUString SAL_CALL getImplementationName() throw(css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(css::uno::RuntimeException, std::exception) override; - - // XServiceInfo - static methods - static css::uno::Sequence< OUString > getSupportedServiceNames_Static() throw(css::uno::RuntimeException); - static OUString getImplementationName_Static() throw(css::uno::RuntimeException); - - // XAccessible - virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( ) throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleContext - virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw ( css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception ) override; - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int16 SAL_CALL getAccessibleRole( ) throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getAccessibleDescription( ) throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getAccessibleName( ) throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleSelection - void SAL_CALL selectAccessibleChild( sal_Int32 nChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - sal_Bool SAL_CALL isAccessibleChildSelected( sal_Int32 nChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - void SAL_CALL clearAccessibleSelection( ) throw (css::uno::RuntimeException, std::exception) override; - void SAL_CALL selectAllAccessibleChildren( ) throw (css::uno::RuntimeException, std::exception) override; - sal_Int32 SAL_CALL getSelectedAccessibleChildCount( ) throw (css::uno::RuntimeException, std::exception) override; - css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - void SAL_CALL deselectAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - -private: - - typedef std::map< SvTreeListEntry*, css::uno::Reference< css::accessibility::XAccessible > > MAP_ENTRY; - MAP_ENTRY m_mapEntry; - - css::uno::Reference< css::accessibility::XAccessible > m_xFocusedChild; - - accessibility::AccessibleListBoxEntry* GetCurEventEntry( const VclWindowEvent& rVclWindowEvent ); - - }; - - -}// namespace accessibility - - -#endif // INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_EXTENDED_ACCESSIBLELISTBOX_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/extended/accessiblelistboxentry.hxx b/accessibility/inc/accessibility/extended/accessiblelistboxentry.hxx deleted file mode 100644 index 3ce874162b92..000000000000 --- a/accessibility/inc/accessibility/extended/accessiblelistboxentry.hxx +++ /dev/null @@ -1,230 +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_ACCESSIBILITY_EXTENDED_ACCESSIBLELISTBOXENTRY_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_EXTENDED_ACCESSIBLELISTBOXENTRY_HXX - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "accessibility/extended/listboxaccessible.hxx" - -// forward --------------------------------------------------------------- - -namespace com { namespace sun { namespace star { namespace awt { - struct Point; - struct Rectangle; - struct Size; - class XFocusListener; -} } } } - -class SvTreeListBox; -class SvTreeListEntry; - - -namespace accessibility -{ - - -// class AccessibleListBoxEntry ------------------------------------------ - typedef ::cppu::WeakAggComponentImplHelper9< css::accessibility::XAccessible - , css::accessibility::XAccessibleContext - , css::accessibility::XAccessibleComponent - , css::accessibility::XAccessibleEventBroadcaster - , css::accessibility::XAccessibleAction - , css::accessibility::XAccessibleSelection - , css::accessibility::XAccessibleText - , css::accessibility::XAccessibleValue - , css::lang::XServiceInfo > AccessibleListBoxEntry_BASE; - - /** the class AccessibleListBoxEntry represents the class for an accessible object of a listbox entry */ - class AccessibleListBoxEntry:public ::comphelper::OBaseMutex - ,public AccessibleListBoxEntry_BASE - ,public ::comphelper::OCommonAccessibleText - ,public ListBoxAccessibleBase - { - friend class AccessibleListBox; - - private: - /** The treelistbox control */ - ::std::deque< sal_Int32 > m_aEntryPath; - SvTreeListEntry* m_pSvLBoxEntry; // Needed for a11y focused item... - - - protected: - /// client id in the AccessibleEventNotifier queue - sal_uInt32 m_nClientId; - - css::uno::WeakReference< css::accessibility::XAccessible > - m_aParent; - - private: - Rectangle GetBoundingBox_Impl() const; - Rectangle GetBoundingBoxOnScreen_Impl() const; - bool IsAlive_Impl() const; - bool IsShowing_Impl() const; - - Rectangle GetBoundingBox() - throw (css::lang::DisposedException, - css::uno::RuntimeException); - Rectangle GetBoundingBoxOnScreen() - throw (css::lang::DisposedException, - css::uno::RuntimeException); - void EnsureIsAlive() const throw ( css::lang::DisposedException ); - - void NotifyAccessibleEvent( sal_Int16 _nEventId, const css::uno::Any& _aOldValue, const css::uno::Any& _aNewValue ); - - protected: - virtual ~AccessibleListBoxEntry(); - - /** this function is called upon disposing the component - */ - virtual void SAL_CALL disposing() override; - - // ListBoxAccessible/XComponent - virtual void SAL_CALL dispose() throw ( css::uno::RuntimeException, std::exception ) override; - - // OCommonAccessibleText - virtual OUString implGetText() override; - virtual css::lang::Locale implGetLocale() override; - virtual void implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ) override; - - public: - /** Ctor() - @param _rListBox - the view control - @param _pEntry - the entry - @param _xParent - is our parent accessible object - */ - AccessibleListBoxEntry( SvTreeListBox& _rListBox, SvTreeListEntry* _pEntry, - const css::uno::Reference< css::accessibility::XAccessible >& _xParent ); - - SvTreeListEntry* GetSvLBoxEntry() const { return m_pSvLBoxEntry; } - - - protected: - // XTypeProvider - virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (css::uno::RuntimeException, std::exception) override; - - // XServiceInfo - virtual OUString SAL_CALL getImplementationName() throw(css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(css::uno::RuntimeException, std::exception) override; - - // XServiceInfo - static methods - static css::uno::Sequence< OUString > getSupportedServiceNames_Static() throw(css::uno::RuntimeException); - static OUString getImplementationName_Static() throw(css::uno::RuntimeException); - - // XAccessible - virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( ) throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleContext - virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw ( css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception ) override; - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getAccessibleIndexInParent( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int16 SAL_CALL getAccessibleRole( ) throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getAccessibleDescription( ) throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getAccessibleName( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::lang::Locale SAL_CALL getLocale( ) throw (css::accessibility::IllegalAccessibleComponentStateException, css::uno::RuntimeException, std::exception) override; - - // XAccessibleComponent - virtual sal_Bool SAL_CALL containsPoint( const css::awt::Point& aPoint ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const css::awt::Point& aPoint ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::awt::Rectangle SAL_CALL getBounds( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::awt::Point SAL_CALL getLocation( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::awt::Point SAL_CALL getLocationOnScreen( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::awt::Size SAL_CALL getSize( ) throw (css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL grabFocus( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getForeground( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getBackground( ) throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleText - virtual sal_Int32 SAL_CALL getCaretPosition() throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual sal_Unicode SAL_CALL getCharacter( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getCharacterAttributes( sal_Int32 nIndex, const css::uno::Sequence< OUString >& aRequestedAttributes ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual css::awt::Rectangle SAL_CALL getCharacterBounds( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getCharacterCount() throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getIndexAtPoint( const css::awt::Point& aPoint ) throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getSelectedText() throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getSelectionStart() throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getSelectionEnd() throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getText() throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual css::accessibility::TextSegment SAL_CALL getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (css::lang::IndexOutOfBoundsException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override; - virtual css::accessibility::TextSegment SAL_CALL getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (css::lang::IndexOutOfBoundsException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override; - virtual css::accessibility::TextSegment SAL_CALL getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (css::lang::IndexOutOfBoundsException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - - // XAccessibleEventBroadcaster - virtual void SAL_CALL addAccessibleEventListener( const css::uno::Reference< css::accessibility::XAccessibleEventListener >& xListener ) throw (css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL removeAccessibleEventListener( const css::uno::Reference< css::accessibility::XAccessibleEventListener >& xListener ) throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleAction - virtual sal_Int32 SAL_CALL getAccessibleActionCount( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL doAccessibleAction( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getAccessibleActionDescription( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessibleKeyBinding > SAL_CALL getAccessibleActionKeyBinding( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - - // XAccessibleSelection - void SAL_CALL selectAccessibleChild( sal_Int32 nChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - sal_Bool SAL_CALL isAccessibleChildSelected( sal_Int32 nChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - void SAL_CALL clearAccessibleSelection( ) throw (css::uno::RuntimeException, std::exception) override; - void SAL_CALL selectAllAccessibleChildren( ) throw (css::uno::RuntimeException, std::exception) override; - sal_Int32 SAL_CALL getSelectedAccessibleChildCount( ) throw (css::uno::RuntimeException, std::exception) override; - css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - void SAL_CALL deselectAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual css::uno::Any SAL_CALL getCurrentValue( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL setCurrentValue( const css::uno::Any& aNumber ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Any SAL_CALL getMaximumValue( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Any SAL_CALL getMinimumValue( ) throw (css::uno::RuntimeException, std::exception) override; - private: - css::uno::Reference< css::accessibility::XAccessible > implGetParentAccessible( ) const; - SvTreeListEntry* GetRealChild(sal_Int32 nIndex); - sal_Int32 GetRoleType(); - }; - - -}// namespace accessibility - - -#endif // INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_EXTENDED_ACCESSIBLELISTBOXENTRY_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/extended/accessibletabbar.hxx b/accessibility/inc/accessibility/extended/accessibletabbar.hxx deleted file mode 100644 index 60c8d52a78f7..000000000000 --- a/accessibility/inc/accessibility/extended/accessibletabbar.hxx +++ /dev/null @@ -1,112 +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_ACCESSIBILITY_EXTENDED_ACCESSIBLETABBAR_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_EXTENDED_ACCESSIBLETABBAR_HXX - -#include -#include -#include -#include "accessibility/extended/accessibletabbarbase.hxx" - -#include - -namespace utl { -class AccessibleStateSetHelper; -} - - -namespace accessibility -{ - - - // class AccessibleTabBar - - - typedef ::cppu::ImplHelper2< - css::accessibility::XAccessible, - css::lang::XServiceInfo > AccessibleTabBar_BASE; - - class AccessibleTabBar : public AccessibleTabBarBase, - public AccessibleTabBar_BASE - { - private: - typedef ::std::vector< css::uno::Reference< css::accessibility::XAccessible > > AccessibleChildren; - - AccessibleChildren m_aAccessibleChildren; - - protected: - virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) override; - void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ); - - // OCommonAccessibleComponent - virtual css::awt::Rectangle implGetBounds( ) throw (css::uno::RuntimeException) override; - - // XComponent - virtual void SAL_CALL disposing() override; - - public: - AccessibleTabBar( TabBar* pTabBar ); - virtual ~AccessibleTabBar(); - - // XInterface - DECLARE_XINTERFACE() - - // XTypeProvider - DECLARE_XTYPEPROVIDER() - - // XServiceInfo - virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) override; - - // XAccessible - virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( ) throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleContext - virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getAccessibleIndexInParent( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int16 SAL_CALL getAccessibleRole( ) throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getAccessibleDescription( ) throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getAccessibleName( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::lang::Locale SAL_CALL getLocale( ) throw (css::accessibility::IllegalAccessibleComponentStateException, css::uno::RuntimeException, std::exception) override; - - // XAccessibleComponent - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const css::awt::Point& aPoint ) throw (css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL grabFocus( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getForeground( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getBackground( ) throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleExtendedComponent - virtual css::uno::Reference< css::awt::XFont > SAL_CALL getFont( ) throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getTitledBorderText( ) throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getToolTipText( ) throw (css::uno::RuntimeException, std::exception) override; - }; - - -} // namespace accessibility - - -#endif // INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_EXTENDED_ACCESSIBLETABBAR_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/extended/accessibletabbarbase.hxx b/accessibility/inc/accessibility/extended/accessibletabbarbase.hxx deleted file mode 100644 index 40fadf73d497..000000000000 --- a/accessibility/inc/accessibility/extended/accessibletabbarbase.hxx +++ /dev/null @@ -1,65 +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_ACCESSIBILITY_EXTENDED_ACCESSIBLETABBARBASE_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_EXTENDED_ACCESSIBLETABBARBASE_HXX - -#include -#include -#include - -class TabBar; -class VCLExternalSolarLock; -class VclSimpleEvent; -class VclWindowEvent; - - -namespace accessibility -{ - -class AccessibleTabBarBase : public comphelper::OAccessibleExtendedComponentHelper -{ -public: - explicit AccessibleTabBarBase( TabBar* pTabBar ); - virtual ~AccessibleTabBarBase(); - -protected: - DECL_LINK_TYPED( WindowEventListener, VclWindowEvent&, void ); - - virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ); - - // XComponent - virtual void SAL_CALL disposing() override; - -private: - void SetTabBarPointer( TabBar* pTabBar ); - void ClearTabBarPointer(); - -protected: - VCLExternalSolarLock* m_pExternalLock; - VclPtr m_pTabBar; -}; - - -} // namespace accessibility - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/extended/accessibletabbarpage.hxx b/accessibility/inc/accessibility/extended/accessibletabbarpage.hxx deleted file mode 100644 index 8904a14bd7b0..000000000000 --- a/accessibility/inc/accessibility/extended/accessibletabbarpage.hxx +++ /dev/null @@ -1,128 +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_ACCESSIBILITY_EXTENDED_ACCESSIBLETABBARPAGE_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_EXTENDED_ACCESSIBLETABBARPAGE_HXX - -#include -#include -#include -#include "accessibility/extended/accessibletabbarbase.hxx" - -#include - -namespace utl { -class AccessibleStateSetHelper; -} - - -namespace accessibility -{ - - - // class AccessibleTabBarPage - - - typedef ::cppu::ImplHelper2< - css::accessibility::XAccessible, - css::lang::XServiceInfo > AccessibleTabBarPage_BASE; - - class AccessibleTabBarPage : public AccessibleTabBarBase, - public AccessibleTabBarPage_BASE - { - friend class AccessibleTabBarPageList; - - private: - sal_uInt16 m_nPageId; - bool m_bEnabled; - bool m_bShowing; - bool m_bSelected; - OUString m_sPageText; - - css::uno::Reference< css::accessibility::XAccessible > m_xParent; - - protected: - bool IsEnabled(); - bool IsShowing(); - bool IsSelected(); - - void SetShowing( bool bShowing ); - void SetSelected( bool bSelected ); - void SetPageText( const OUString& sPageText ); - - sal_uInt16 GetPageId() const { return m_nPageId; } - - void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ); - - // OCommonAccessibleComponent - virtual css::awt::Rectangle implGetBounds( ) throw (css::uno::RuntimeException) override; - - // XComponent - virtual void SAL_CALL disposing() override; - - public: - AccessibleTabBarPage( TabBar* pTabBar, sal_uInt16 nPageId, - const css::uno::Reference< css::accessibility::XAccessible >& rxParent ); - virtual ~AccessibleTabBarPage(); - - // XInterface - DECLARE_XINTERFACE() - - // XTypeProvider - DECLARE_XTYPEPROVIDER() - - // XServiceInfo - virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) override; - - // XAccessible - virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( ) throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleContext - virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getAccessibleIndexInParent( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int16 SAL_CALL getAccessibleRole( ) throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getAccessibleDescription( ) throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getAccessibleName( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::lang::Locale SAL_CALL getLocale( ) throw (css::accessibility::IllegalAccessibleComponentStateException, css::uno::RuntimeException, std::exception) override; - - // XAccessibleComponent - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const css::awt::Point& aPoint ) throw (css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL grabFocus( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getForeground( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getBackground( ) throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleExtendedComponent - virtual css::uno::Reference< css::awt::XFont > SAL_CALL getFont( ) throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getTitledBorderText( ) throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getToolTipText( ) throw (css::uno::RuntimeException, std::exception) override; - }; - - -} // namespace accessibility - - -#endif // INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_EXTENDED_ACCESSIBLETABBARPAGE_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/extended/accessibletabbarpagelist.hxx b/accessibility/inc/accessibility/extended/accessibletabbarpagelist.hxx deleted file mode 100644 index a9d7556ba105..000000000000 --- a/accessibility/inc/accessibility/extended/accessibletabbarpagelist.hxx +++ /dev/null @@ -1,132 +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_ACCESSIBILITY_EXTENDED_ACCESSIBLETABBARPAGELIST_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_EXTENDED_ACCESSIBLETABBARPAGELIST_HXX - -#include -#include -#include -#include -#include "accessibility/extended/accessibletabbarbase.hxx" - -#include - -namespace utl { -class AccessibleStateSetHelper; -} - - -namespace accessibility -{ - - - // class AccessibleTabBarPageList - - - typedef ::cppu::ImplHelper3< - css::accessibility::XAccessible, - css::accessibility::XAccessibleSelection, - css::lang::XServiceInfo > AccessibleTabBarPageList_BASE; - - class AccessibleTabBarPageList : public AccessibleTabBarBase, - public AccessibleTabBarPageList_BASE - { - private: - typedef ::std::vector< css::uno::Reference< css::accessibility::XAccessible > > AccessibleChildren; - - AccessibleChildren m_aAccessibleChildren; - sal_Int32 m_nIndexInParent; - - protected: - void UpdateShowing( bool bShowing ); - void UpdateSelected( sal_Int32 i, bool bSelected ); - void UpdatePageText( sal_Int32 i ); - - void InsertChild( sal_Int32 i ); - void RemoveChild( sal_Int32 i ); - void MoveChild( sal_Int32 i, sal_Int32 j ); - - virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) override; - void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ); - - // OCommonAccessibleComponent - virtual css::awt::Rectangle implGetBounds( ) throw (css::uno::RuntimeException) override; - - // XComponent - virtual void SAL_CALL disposing() override; - - public: - AccessibleTabBarPageList( TabBar* pTabBar, sal_Int32 nIndexInParent ); - virtual ~AccessibleTabBarPageList(); - - // XInterface - DECLARE_XINTERFACE() - - // XTypeProvider - DECLARE_XTYPEPROVIDER() - - // XServiceInfo - virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) override; - - // XAccessible - virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( ) throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleContext - virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getAccessibleIndexInParent( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int16 SAL_CALL getAccessibleRole( ) throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getAccessibleDescription( ) throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getAccessibleName( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::lang::Locale SAL_CALL getLocale( ) throw (css::accessibility::IllegalAccessibleComponentStateException, css::uno::RuntimeException, std::exception) override; - - // XAccessibleComponent - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const css::awt::Point& aPoint ) throw (css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL grabFocus( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getForeground( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getBackground( ) throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleExtendedComponent - virtual css::uno::Reference< css::awt::XFont > SAL_CALL getFont( ) throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getTitledBorderText( ) throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getToolTipText( ) throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleSelection - virtual void SAL_CALL selectAccessibleChild( sal_Int32 nChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL isAccessibleChildSelected( sal_Int32 nChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL clearAccessibleSelection( ) throw (css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL selectAllAccessibleChildren( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getSelectedAccessibleChildCount( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL deselectAccessibleChild( sal_Int32 nChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - }; - - -} // namespace accessibility - - -#endif // INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_EXTENDED_ACCESSIBLETABBARPAGELIST_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/extended/accessibletablistbox.hxx b/accessibility/inc/accessibility/extended/accessibletablistbox.hxx deleted file mode 100644 index bfc9e2a2c80e..000000000000 --- a/accessibility/inc/accessibility/extended/accessibletablistbox.hxx +++ /dev/null @@ -1,104 +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_ACCESSIBILITY_EXTENDED_ACCESSIBLETABLISTBOX_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_EXTENDED_ACCESSIBLETABLISTBOX_HXX - -#include "AccessibleBrowseBox.hxx" -#include -#include -#include - -class SvHeaderTabListBox; - - -namespace accessibility { - -class AccessibleBrowseBoxTable; - -typedef ::cppu::ImplHelper1 < css::accessibility::XAccessible - > AccessibleTabListBox_Base; - -/** !!! */ -class AccessibleTabListBox - :public AccessibleBrowseBox - ,public AccessibleTabListBox_Base - ,public ::svt::IAccessibleTabListBox -{ -private: - VclPtr m_pTabListBox; - -public: - /** ctor() - @param rxParent XAccessible interface of the parent object. - @param rBox The HeaderTabListBox control. */ - AccessibleTabListBox( - const css::uno::Reference< css::accessibility::XAccessible >& rxParent, - SvHeaderTabListBox& rBox ); - -public: - // XInterface - DECLARE_XINTERFACE( ) - // XTypeProvider - DECLARE_XTYPEPROVIDER( ) - - // XAccessibleContext ----------------------------------------------------- - - /** @return The count of visible children. */ - virtual sal_Int32 SAL_CALL getAccessibleChildCount() - throw ( css::uno::RuntimeException, std::exception ) override; - - /** @return The XAccessible interface of the specified child. */ - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL - getAccessibleChild( sal_Int32 nChildIndex ) - throw ( css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception ) override; - - // XAccessibleContext - css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext() throw ( css::uno::RuntimeException, std::exception ) override; - - // IAccessibleTabListBox - virtual css::uno::Reference< css::accessibility::XAccessible > - getMyself() override - { - return this; - } - - css::uno::Reference< css::accessibility::XAccessible > - getHeaderBar() override - { - return AccessibleBrowseBox::getHeaderBar( svt::BBTYPE_COLUMNHEADERBAR ); - } - -protected: - /** dtor() */ - virtual ~AccessibleTabListBox(); - - /** This method creates and returns an accessible table. - @return An AccessibleBrowseBoxTable. */ - virtual AccessibleBrowseBoxTable* createAccessibleTable() override; -}; - - -} // namespace accessibility - - -#endif // INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_EXTENDED_ACCESSIBLETABLISTBOX_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/extended/accessibletablistboxtable.hxx b/accessibility/inc/accessibility/extended/accessibletablistboxtable.hxx deleted file mode 100644 index 4c79a9962871..000000000000 --- a/accessibility/inc/accessibility/extended/accessibletablistboxtable.hxx +++ /dev/null @@ -1,109 +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_ACCESSIBILITY_EXTENDED_ACCESSIBLETABLISTBOXTABLE_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_EXTENDED_ACCESSIBLETABLISTBOXTABLE_HXX - -#include "AccessibleBrowseBoxTable.hxx" -#include -#include -#include - -class SvHeaderTabListBox; - - -namespace accessibility { - -typedef ::cppu::ImplHelper1< css::accessibility::XAccessibleSelection > - AccessibleTabListBoxTableImplHelper; - -class AccessibleTabListBoxTable : public AccessibleBrowseBoxTable, public AccessibleTabListBoxTableImplHelper -{ -private: - VclPtr m_pTabListBox; - - css::uno::Reference< css::accessibility::XAccessible > m_xCurChild; - - void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ); - DECL_LINK_TYPED( WindowEventListener, VclWindowEvent&, void ); - - // helpers ---------------------------------------------------------------- - - /** Throws an exception, if nIndex is not a valid child index. */ - void ensureValidIndex( sal_Int32 _nIndex ) const; - - /** Returns true, if the specified row is selected. */ - bool implIsRowSelected( sal_Int32 _nRow ) const; - /** Selects the specified row. */ - void implSelectRow( sal_Int32 _nRow, bool _bSelect ); - - /** Returns the count of rows in the table. */ - sal_Int32 implGetRowCount() const override; - /** Returns the total column count in the table. */ - sal_Int32 implGetColumnCount() const override; - /** Returns the count of selected rows in the table. */ - sal_Int32 implGetSelRowCount() const; - /** Returns the total cell count in the table (including header). */ - inline sal_Int32 implGetCellCount() const { return implGetRowCount() * implGetColumnCount(); } - - /** Returns the row index from cell index. */ - inline sal_Int32 implGetRow( sal_Int32 _nIndex ) const { return _nIndex / implGetColumnCount(); } - /** Returns the absolute row index of the nSelRow-th selected row. */ - sal_Int32 implGetSelRow( sal_Int32 _nSelRow ) const; - -public: - /** ctor() - @param rxParent XAccessible interface of the parent object. - @param rBox The HeaderTabListBox control. */ - AccessibleTabListBoxTable( - const css::uno::Reference< css::accessibility::XAccessible >& rxParent, - SvHeaderTabListBox& rBox ); - -protected: - /** dtor() */ - virtual ~AccessibleTabListBoxTable(); - -public: - // XInterface - DECLARE_XINTERFACE( ) - - // XTypeProvider - DECLARE_XTYPEPROVIDER( ) - - // XServiceInfo - virtual OUString SAL_CALL getImplementationName() - throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleSelection - void SAL_CALL selectAccessibleChild( sal_Int32 nChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - sal_Bool SAL_CALL isAccessibleChildSelected( sal_Int32 nChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - void SAL_CALL clearAccessibleSelection( ) throw (css::uno::RuntimeException, std::exception) override; - void SAL_CALL selectAllAccessibleChildren( ) throw (css::uno::RuntimeException, std::exception) override; - sal_Int32 SAL_CALL getSelectedAccessibleChildCount( ) throw (css::uno::RuntimeException, std::exception) override; - css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - void SAL_CALL deselectAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; -}; - - -} // namespace accessibility - - -#endif // INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_EXTENDED_ACCESSIBLETABLISTBOXTABLE_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/extended/listboxaccessible.hxx b/accessibility/inc/accessibility/extended/listboxaccessible.hxx deleted file mode 100644 index ed6e0a29d783..000000000000 --- a/accessibility/inc/accessibility/extended/listboxaccessible.hxx +++ /dev/null @@ -1,84 +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_ACCESSIBILITY_EXTENDED_LISTBOXACCESSIBLE_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_EXTENDED_LISTBOXACCESSIBLE_HXX - -#include -#include -#include - -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 m_pWindow; - - protected: - inline SvTreeListBox* getListBox() const - { - return const_cast< ListBoxAccessibleBase* >( this )->m_pWindow; - } - - inline bool isAlive() const { return nullptr != m_pWindow; } - - public: - ListBoxAccessibleBase( SvTreeListBox& _rWindow ); - - protected: - virtual ~ListBoxAccessibleBase( ); - - // own overridables - /// will be called for any VclWindowEvent events broadcasted by our VCL window - void ProcessWindowEvent( const VclWindowEvent& _rVclWindowEvent ); - - /** will be called when our window broadcasts the VCLEVENT_OBJECT_DYING event - -

Usually, you derive your class from both ListBoxAccessibleBase and XComponent, - and call XComponent::dispose here.

- */ - virtual void SAL_CALL dispose() throw ( css::uno::RuntimeException, std::exception ) = 0; - - /// to be called in the dispose method of your derived class - void disposing(); - - private: - DECL_LINK_TYPED( WindowEventListener, VclWindowEvent&, void ); - - private: - ListBoxAccessibleBase( const ListBoxAccessibleBase& ) = delete; - ListBoxAccessibleBase& operator=( const ListBoxAccessibleBase& ) = delete; - }; - - -} // namespace accessibility - - -#endif // INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_EXTENDED_LISTBOXACCESSIBLE_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/extended/textwindowaccessibility.hxx b/accessibility/inc/accessibility/extended/textwindowaccessibility.hxx deleted file mode 100644 index 6d101612f54f..000000000000 --- a/accessibility/inc/accessibility/extended/textwindowaccessibility.hxx +++ /dev/null @@ -1,693 +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_ACCESSIBILITY_EXTENDED_TEXTWINDOWACCESSIBILITY_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_EXTENDED_TEXTWINDOWACCESSIBILITY_HXX - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -class TextEngine; -class TextView; - -namespace accessibility -{ - -class Document; - -class SfxListenerGuard -{ -public: - inline SfxListenerGuard(::SfxListener & rListener): - m_rListener(rListener), m_pNotifier(nullptr) {} - - inline ~SfxListenerGuard() { endListening(); } - - // Not thread safe: - void startListening(::SfxBroadcaster & rNotifier); - - // Not thread safe: - void endListening(); - -private: - ::SfxListener & m_rListener; - ::SfxBroadcaster * m_pNotifier; -}; - -class WindowListenerGuard -{ -public: - inline WindowListenerGuard(::Link const & rListener): - m_aListener(rListener), m_pNotifier(nullptr) {} - - inline ~WindowListenerGuard() { endListening(); } - - // Not thread safe: - void startListening(vcl::Window & rNotifier); - - // Not thread safe: - void endListening(); - -private: - ::Link m_aListener; - VclPtr m_pNotifier; -}; - -class ParagraphInfo -{ -public: - inline ParagraphInfo(::sal_Int32 nHeight): m_nHeight(nHeight) {} - - inline - css::uno::WeakReference< css::accessibility::XAccessible > const & - getParagraph() const { return m_xParagraph; } - - inline ::sal_Int32 getHeight() const { return m_nHeight; } - - inline void setParagraph( - css::uno::Reference< css::accessibility::XAccessible > const & - rParagraph) { m_xParagraph = rParagraph; } - - inline void changeHeight(::sal_Int32 nHeight) { m_nHeight = nHeight; } - -private: - css::uno::WeakReference< css::accessibility::XAccessible > - m_xParagraph; - ::sal_Int32 m_nHeight; -}; - -typedef ::std::vector< ParagraphInfo > Paragraphs; - -typedef ::cppu::WeakAggComponentImplHelper7< - css::accessibility::XAccessible, - css::accessibility::XAccessibleContext, - css::accessibility::XAccessibleComponent, - css::accessibility::XAccessibleEditableText, - css::accessibility::XAccessibleMultiLineText, - css::accessibility::XAccessibleTextAttributes, - css::accessibility::XAccessibleEventBroadcaster > ParagraphBase; - -// The Paragraph's number is the absolute position within the text engine (from -// 0 to N - 1), whereas the Paragraph's index is the position within the text -// view/accessible parent (from 0 to M - 1). Paragraphs outside the currently -// visible range have an index of -1. -class Paragraph: - private cppu::BaseMutex, public ParagraphBase, private ::comphelper::OCommonAccessibleText -{ -public: - Paragraph(::rtl::Reference< Document > const & rDocument, - Paragraphs::size_type nNumber); - - // Not thread-safe. - inline Paragraphs::size_type getNumber() const { return m_nNumber; } - - // Not thread-safe. - void numberChanged(bool bIncremented); - - // Not thread-safe. - void textChanged(); - - // Thread-safe. - void notifyEvent(::sal_Int16 nEventId, css::uno::Any const & rOldValue, - css::uno::Any const & rNewValue); - -protected: - // OCommonAccessibleText - virtual void implGetParagraphBoundary( css::i18n::Boundary& rBoundary, - ::sal_Int32 nIndex ) override; - virtual void implGetLineBoundary( css::i18n::Boundary& rBoundary, - ::sal_Int32 nIndex ) override; - -private: - virtual css::uno::Reference< css::accessibility::XAccessibleContext > - SAL_CALL getAccessibleContext() throw (css::uno::RuntimeException, std::exception) override; - - virtual ::sal_Int32 SAL_CALL getAccessibleChildCount() - throw (css::uno::RuntimeException, std::exception) override; - - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL - getAccessibleChild(::sal_Int32 i) - throw (css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception) override; - - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL - getAccessibleParent() throw (css::uno::RuntimeException, std::exception) override; - - virtual ::sal_Int32 SAL_CALL getAccessibleIndexInParent() - throw (css::uno::RuntimeException, std::exception) override; - - virtual ::sal_Int16 SAL_CALL getAccessibleRole() - throw (css::uno::RuntimeException, std::exception) override; - - virtual OUString SAL_CALL getAccessibleDescription() - throw (css::uno::RuntimeException, std::exception) override; - - virtual OUString SAL_CALL getAccessibleName() - throw (css::uno::RuntimeException, std::exception) override; - - virtual - css::uno::Reference< css::accessibility::XAccessibleRelationSet > - SAL_CALL getAccessibleRelationSet() throw (css::uno::RuntimeException, std::exception) override; - - virtual - css::uno::Reference< css::accessibility::XAccessibleStateSet > SAL_CALL - getAccessibleStateSet() throw (css::uno::RuntimeException, std::exception) override; - - virtual css::lang::Locale SAL_CALL getLocale() - throw (css::accessibility::IllegalAccessibleComponentStateException, - css::uno::RuntimeException, std::exception) override; - - virtual sal_Bool SAL_CALL containsPoint(css::awt::Point const & rPoint) - throw (css::uno::RuntimeException, std::exception) override; - - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL - getAccessibleAtPoint(css::awt::Point const & rPoint) - throw (css::uno::RuntimeException, std::exception) override; - - virtual css::awt::Rectangle SAL_CALL getBounds() - throw (css::uno::RuntimeException, std::exception) override; - - virtual css::awt::Point SAL_CALL getLocation() - throw (css::uno::RuntimeException, std::exception) override; - - virtual css::awt::Point SAL_CALL getLocationOnScreen() - throw (css::uno::RuntimeException, std::exception) override; - - virtual css::awt::Size SAL_CALL getSize() - throw (css::uno::RuntimeException, std::exception) override; - - virtual void SAL_CALL grabFocus() throw (css::uno::RuntimeException, std::exception) override; - - virtual css::util::Color SAL_CALL getForeground() - throw (css::uno::RuntimeException, std::exception) override; - - virtual css::util::Color SAL_CALL getBackground() - throw (css::uno::RuntimeException, std::exception) override; - - virtual ::sal_Int32 SAL_CALL getCaretPosition() - throw (css::uno::RuntimeException, std::exception) override; - - virtual sal_Bool SAL_CALL setCaretPosition(::sal_Int32 nIndex) - throw (css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception) override; - - virtual ::sal_Unicode SAL_CALL getCharacter(::sal_Int32 nIndex) - throw (css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception) override; - - virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL - getCharacterAttributes(::sal_Int32 nIndex, const css::uno::Sequence< OUString >& aRequestedAttributes ) - throw (css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception) override; - - virtual css::awt::Rectangle SAL_CALL - getCharacterBounds(::sal_Int32 nIndex) - throw (css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception) override; - - virtual ::sal_Int32 SAL_CALL getCharacterCount() - throw (css::uno::RuntimeException, std::exception) override; - - virtual ::sal_Int32 SAL_CALL - getIndexAtPoint(css::awt::Point const & rPoint) - throw (css::uno::RuntimeException, std::exception) override; - - virtual OUString SAL_CALL getSelectedText() - throw (css::uno::RuntimeException, std::exception) override; - - virtual ::sal_Int32 SAL_CALL getSelectionStart() - throw (css::uno::RuntimeException, std::exception) override; - - virtual ::sal_Int32 SAL_CALL getSelectionEnd() - throw (css::uno::RuntimeException, std::exception) override; - - virtual sal_Bool SAL_CALL setSelection(::sal_Int32 nStartIndex, - ::sal_Int32 nEndIndex) - throw (css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception) override; - - virtual OUString SAL_CALL getText() - throw (css::uno::RuntimeException, std::exception) override; - - virtual OUString SAL_CALL getTextRange(::sal_Int32 nStartIndex, - ::sal_Int32 nEndIndex) - throw (css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception) override; - - virtual css::accessibility::TextSegment SAL_CALL getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (css::lang::IndexOutOfBoundsException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override; - virtual css::accessibility::TextSegment SAL_CALL getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (css::lang::IndexOutOfBoundsException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override; - virtual css::accessibility::TextSegment SAL_CALL getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (css::lang::IndexOutOfBoundsException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override; - - virtual sal_Bool SAL_CALL copyText(::sal_Int32 nStartIndex, - ::sal_Int32 nEndIndex) - throw (css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception) override; - - virtual sal_Bool SAL_CALL cutText(::sal_Int32 nStartIndex, - ::sal_Int32 nEndIndex) - throw (css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception) override; - - virtual sal_Bool SAL_CALL pasteText(::sal_Int32 nIndex) - throw (css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception) override; - - virtual sal_Bool SAL_CALL deleteText(::sal_Int32 nStartIndex, - ::sal_Int32 nEndIndex) - throw (css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception) override; - - virtual sal_Bool SAL_CALL insertText(OUString const & rText, - ::sal_Int32 nIndex) - throw (css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception) override; - - virtual sal_Bool SAL_CALL replaceText( - ::sal_Int32 nStartIndex, ::sal_Int32 nEndIndex, - OUString const & rReplacement) - throw (css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception) override; - - virtual sal_Bool SAL_CALL setAttributes( - ::sal_Int32 nStartIndex, ::sal_Int32 nEndIndex, - css::uno::Sequence< css::beans::PropertyValue > const & - rAttributeSet) - throw (css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception) override; - - virtual sal_Bool SAL_CALL setText(OUString const & rText) - throw (css::uno::RuntimeException, std::exception) override; - - virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL - getDefaultAttributes(const css::uno::Sequence< OUString >& RequestedAttributes) - throw (css::uno::RuntimeException, std::exception) override; - - virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL - getRunAttributes(::sal_Int32 Index, const css::uno::Sequence< OUString >& RequestedAttributes) - throw (css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception) override; - - virtual ::sal_Int32 SAL_CALL getLineNumberAtIndex( ::sal_Int32 nIndex ) - throw (css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception) override; - - virtual css::accessibility::TextSegment SAL_CALL getTextAtLineNumber( ::sal_Int32 nLineNo ) - throw (css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception) override; - - virtual css::accessibility::TextSegment SAL_CALL getTextAtLineWithCaret( ) - throw (css::uno::RuntimeException, std::exception) override; - - virtual ::sal_Int32 SAL_CALL getNumberOfLineWithCaret( ) - throw (css::uno::RuntimeException, std::exception) override; - - virtual void SAL_CALL addAccessibleEventListener( - css::uno::Reference< - css::accessibility::XAccessibleEventListener > const & rListener) - throw (css::uno::RuntimeException, std::exception) override; - - virtual void SAL_CALL removeAccessibleEventListener( - css::uno::Reference< - css::accessibility::XAccessibleEventListener > const & rListener) - throw (css::uno::RuntimeException, std::exception) override; - - virtual void SAL_CALL disposing() override; - - virtual OUString implGetText() override; - - virtual css::lang::Locale implGetLocale() override; - - virtual void implGetSelection(::sal_Int32 & rStartIndex, - ::sal_Int32 & rEndIndex) override; - - // Throws css::lang::DisposedException: - void checkDisposed(); - - ::rtl::Reference< Document > m_xDocument; - Paragraphs::size_type m_nNumber; - - /// client id in the AccessibleEventNotifier queue - sal_uInt32 m_nClientId; - - OUString m_aParagraphText; -}; - - -typedef std::unordered_map< OUString, - css::beans::PropertyValue, - OUStringHash > tPropValMap; - -class Document: public ::VCLXAccessibleComponent, public ::SfxListener -{ -public: - Document(::VCLXWindow * pVclXWindow, ::TextEngine & rEngine, - ::TextView & rView); - - const css::uno::Reference< css::accessibility::XAccessible >& - getAccessible() { return m_xAccessible; } - - // Must be called only after init has been called. - css::lang::Locale retrieveLocale(); - - // Must be called only after init has been called. - // To make it possible for this method to be (indirectly) called from - // within Paragraph's constructor (i.e., when the Paragraph's ref count is - // still zero), pass a "Paragraph const *" instead of a - // "::rtl::Reference< Paragraph > const &". - ::sal_Int32 retrieveParagraphIndex(Paragraph const * pParagraph); - - // Must be called only after init has been called. - // To make it possible for this method to be (indirectly) called from - // within Paragraph's constructor (i.e., when the Paragraph's ref count is - // still zero), pass a "Paragraph const *" instead of a - // "::rtl::Reference< Paragraph > const &". - ::sal_Int64 retrieveParagraphState(Paragraph const * pParagraph); - - // Must be called only after init has been called. - // To make it possible for this method to be (indirectly) called from - // within Paragraph's constructor (i.e., when the Paragraph's ref count is - // still zero), pass a "Paragraph const &" instead of a - // "::rtl::Reference< Paragraph > const &". - css::awt::Rectangle - retrieveParagraphBounds(Paragraph const * pParagraph, bool bAbsolute); - - // Must be called only after init has been called. - // To make it possible for this method to be (indirectly) called from - // within Paragraph's constructor (i.e., when the Paragraph's ref count is - // still zero), pass a "Paragraph const &" instead of a - // "::rtl::Reference< Paragraph > const &". - OUString retrieveParagraphText(Paragraph const * pParagraph); - - // Must be called only after init has been called. - // To make it possible for this method to be (indirectly) called from - // within Paragraph's constructor (i.e., when the Paragraph's ref count is - // still zero), pass a "Paragraph const &" instead of a - // "::rtl::Reference< Paragraph > const &". - void retrieveParagraphSelection(Paragraph const * pParagraph, - ::sal_Int32 * pBegin, ::sal_Int32 * pEnd); - - // Must be called only after init has been called. - // To make it possible for this method to be (indirectly) called from - // within Paragraph's constructor (i.e., when the Paragraph's ref count is - // still zero), pass a "Paragraph const *" instead of a - // "::rtl::Reference< Paragraph > const &". - ::sal_Int32 retrieveParagraphCaretPosition(Paragraph const * pParagraph); - - // Must be called only after init has been called. - // To make it possible for this method to be (indirectly) called from - // within Paragraph's constructor (i.e., when the Paragraph's ref count is - // still zero), pass a "Paragraph const &" instead of a - // "::rtl::Reference< Paragraph > const &". - // Throws css::lang::IndexOutOfBoundsException. - css::awt::Rectangle - retrieveCharacterBounds(Paragraph const * pParagraph, - ::sal_Int32 nIndex); - - // Must be called only after init has been called. - // To make it possible for this method to be (indirectly) called from - // within Paragraph's constructor (i.e., when the Paragraph's ref count is - // still zero), pass a "Paragraph const &" instead of a - // "::rtl::Reference< Paragraph > const &". - ::sal_Int32 retrieveCharacterIndex(Paragraph const * pParagraph, - css::awt::Point const & rPoint); - - // Must be called only after init has been called. - // To make it possible for this method to be (indirectly) called from - // within Paragraph's constructor (i.e., when the Paragraph's ref count is - // still zero), pass a "Paragraph const &" instead of a - // "::rtl::Reference< Paragraph > const &". - // Throws css::lang::IndexOutOfBoundsException. - css::uno::Sequence< css::beans::PropertyValue > retrieveCharacterAttributes( - Paragraph const * pParagraph, ::sal_Int32 nIndex, - const css::uno::Sequence< OUString >& aRequestedAttributes); - - // Must be called only after init has been called. - // To make it possible for this method to be (indirectly) called from - // within Paragraph's constructor (i.e., when the Paragraph's ref count is - // still zero), pass a "Paragraph const &" instead of a - // "::rtl::Reference< Paragraph > const &". - css::uno::Sequence< css::beans::PropertyValue > retrieveDefaultAttributes( - Paragraph const * pParagraph, - const css::uno::Sequence< OUString >& RequestedAttributes); - - // Must be called only after init has been called. - // To make it possible for this method to be (indirectly) called from - // within Paragraph's constructor (i.e., when the Paragraph's ref count is - // still zero), pass a "Paragraph const &" instead of a - // "::rtl::Reference< Paragraph > const &". - // Throws css::lang::IndexOutOfBoundsException. - css::uno::Sequence< css::beans::PropertyValue > retrieveRunAttributes( - Paragraph const * pParagraph, ::sal_Int32 Index, - const css::uno::Sequence< OUString >& RequestedAttributes); - - // Must be called only after init has been called. - // To make it possible for this method to be (indirectly) called from - // within Paragraph's constructor (i.e., when the Paragraph's ref count is - // still zero), pass a "Paragraph const &" instead of a - // "::rtl::Reference< Paragraph > const &". - void changeParagraphText(Paragraph * pParagraph, - OUString const & rText); - - // Must be called only after init has been called. - // To make it possible for this method to be (indirectly) called from - // within Paragraph's constructor (i.e., when the Paragraph's ref count is - // still zero), pass a "Paragraph const &" instead of a - // "::rtl::Reference< Paragraph > const &". - // Throws css::lang::IndexOutOfBoundsException. - void changeParagraphText(Paragraph * pParagraph, ::sal_Int32 nBegin, - ::sal_Int32 nEnd, bool bCut, bool bPaste, - OUString const & rText); - - // Must be called only after init has been called. - // To make it possible for this method to be (indirectly) called from - // within Paragraph's constructor (i.e., when the Paragraph's ref count is - // still zero), pass a "Paragraph const &" instead of a - // "::rtl::Reference< Paragraph > const &". - // Throws css::lang::IndexOutOfBoundsException. - void copyParagraphText(Paragraph const * pParagraph, - ::sal_Int32 nBegin, ::sal_Int32 nEnd); - - // Must be called only after init has been called. - // To make it possible for this method to be (indirectly) called from - // within Paragraph's constructor (i.e., when the Paragraph's ref count is - // still zero), pass a "Paragraph const &" instead of a - // "::rtl::Reference< Paragraph > const &". - // Throws css::lang::IndexOutOfBoundsException. - void changeParagraphAttributes( - Paragraph * pParagraph, ::sal_Int32 nBegin, ::sal_Int32 nEnd, - css::uno::Sequence< css::beans::PropertyValue > const & - rAttributeSet); - - // Must be called only after init has been called. - // To make it possible for this method to be (indirectly) called from - // within Paragraph's constructor (i.e., when the Paragraph's ref count is - // still zero), pass a "Paragraph const &" instead of a - // "::rtl::Reference< Paragraph > const &". - // Throws css::lang::IndexOutOfBoundsException. - void changeParagraphSelection(Paragraph * pParagraph, - ::sal_Int32 nBegin, ::sal_Int32 nEnd); - - css::i18n::Boundary - retrieveParagraphLineBoundary( Paragraph const * pParagraph, - ::sal_Int32 nIndex, ::sal_Int32 *pLineNo = nullptr); - - css::i18n::Boundary - retrieveParagraphBoundaryOfLine( Paragraph const * pParagraph, - ::sal_Int32 nIndex ); - - sal_Int32 retrieveParagraphLineWithCursor( Paragraph const * pParagraph ); - - css::uno::Reference< css::accessibility::XAccessibleRelationSet > - retrieveParagraphRelationSet( Paragraph const * pParagraph ); - -private: - virtual ::sal_Int32 SAL_CALL getAccessibleChildCount() - throw (css::uno::RuntimeException, std::exception) override; - - virtual css::uno::Reference< css::accessibility::XAccessible > - SAL_CALL getAccessibleChild(::sal_Int32 i) - throw (css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception) override; - - virtual ::sal_Int16 SAL_CALL getAccessibleRole() - throw (css::uno::RuntimeException, std::exception) override; - - virtual css::uno::Reference< css::accessibility::XAccessible > - SAL_CALL getAccessibleAtPoint(css::awt::Point const & rPoint) - throw (css::uno::RuntimeException, std::exception) override; - - virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ) override; - virtual void FillAccessibleRelationSet( utl::AccessibleRelationSetHelper& rRelationSet ) override; - - // ??? Will be called with both the external (Solar) and internal mutex - // locked: - virtual void SAL_CALL disposing() override; - - // ??? Will be called with the external (Solar) mutex locked. - // init will already have been called. - virtual void Notify(::SfxBroadcaster & rBC, ::SfxHint const & rHint) override; - - // Assuming that this will only be called with the external (Solar) mutex - // locked. - // init will already have been called. - DECL_LINK_TYPED(WindowEventHandler, VclWindowEvent&, void); - - // Must be called with both the external (Solar) and internal mutex - // locked. - void init(); - - // Must be called with both the external (Solar) and internal mutex - // locked, and after init has been called: - static ::rtl::Reference< Paragraph > - getParagraph(Paragraphs::iterator const & rIt); - - // Must be called with both the external (Solar) and internal mutex - // locked, and after init has been called. - // Throws css::uno::RuntimeException. - css::uno::Reference< css::accessibility::XAccessible > - getAccessibleChild(Paragraphs::iterator const & rIt); - - // Must be called with both the external (Solar) and internal mutex - // locked, and after init has been called: - void determineVisibleRange(); - - // Must be called with both the external (Solar) and internal mutex - // locked, and after init has been called: - void notifyVisibleRangeChanges( - Paragraphs::iterator const & rOldVisibleBegin, - Paragraphs::iterator const & rOldVisibleEnd, - Paragraphs::iterator const & rInserted); - - // Must be called with both the external (Solar) and internal mutex - // locked, and after init has been called: - void changeParagraphText(::sal_uLong nNumber, ::sal_uInt16 nBegin, ::sal_uInt16 nEnd, - bool bCut, bool bPaste, - OUString const & rText); - - void - handleParagraphNotifications(); - - void handleSelectionChangeNotification(); - - ::sal_Int32 getSelectionType(::sal_Int32 nNewFirstPara, ::sal_Int32 nNewFirstPos, ::sal_Int32 nNewLastPara, ::sal_Int32 nNewLastPos); - void sendEvent(::sal_Int32 start, ::sal_Int32 end, ::sal_Int16 nEventId); - - void disposeParagraphs(); - - static css::uno::Any mapFontColor(::Color const & rColor); - - static ::Color mapFontColor(css::uno::Any const & rColor); - - static css::uno::Any mapFontWeight(::FontWeight nWeight); - - static ::FontWeight mapFontWeight(css::uno::Any const & rWeight); - - static void retrieveDefaultAttributesImpl( - Paragraph const * pParagraph, - const css::uno::Sequence< OUString >& RequestedAttributes, - tPropValMap& rDefAttrSeq); - - void retrieveRunAttributesImpl( - Paragraph const * pParagraph, ::sal_Int32 Index, - const css::uno::Sequence< OUString >& RequestedAttributes, - tPropValMap& rRunAttrSeq); - - css::uno::Reference< css::accessibility::XAccessible > m_xAccessible; - ::TextEngine & m_rEngine; - ::TextView & m_rView; - - SfxListenerGuard m_aEngineListener; - WindowListenerGuard m_aViewListener; - - // All the following members have valid values only after calling init: - - std::unique_ptr< Paragraphs > m_xParagraphs; - - // m_nViewOffset is from the start of the document (0) to the start of the - // current view, and m_nViewHeight is the height of the view: - ::sal_Int32 m_nViewOffset; - ::sal_Int32 m_nViewHeight; - - // m_aVisibleBegin points to the first Paragraph that is (partially) - // contained in the view, and m_aVisibleEnd points past the last Paragraph - // that is (partially) contained. If no Paragraphs are (partially) in the - // view, both m_aVisibleBegin and m_aVisibleEnd are set to - // m_xParagraphs->end(). These values are only changed by - // determineVisibleRange. - Paragraphs::iterator m_aVisibleBegin; - Paragraphs::iterator m_aVisibleEnd; - - // m_nVisibleBeginOffset is from m_nViewOffset back to the start of the - // Paragraph pointed to by m_aVisibleBegin (and always has a non-negative - // value). If m_aVisibleBegin == m_xParagraphs->end(), - // m_nVisibleBeginOffset is set to 0. These values are only changed by - // determineVisibleRange. - ::sal_Int32 m_nVisibleBeginOffset; - - // If no selection has yet been set, all the following four variables are - // set to -1. m_nSelectionLastPara/Pos is also the cursor position. - ::sal_Int32 m_nSelectionFirstPara; - ::sal_Int32 m_nSelectionFirstPos; - ::sal_Int32 m_nSelectionLastPara; - ::sal_Int32 m_nSelectionLastPos; - - Paragraphs::iterator m_aFocused; - - ::std::queue< ::TextHint > m_aParagraphNotifications; - bool m_bSelectionChangedNotification; -}; - -} - -#endif // INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_EXTENDED_TEXTWINDOWACCESSIBILITY_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/helper/IComboListBoxHelper.hxx b/accessibility/inc/accessibility/helper/IComboListBoxHelper.hxx deleted file mode 100644 index 7777e920b72a..000000000000 --- a/accessibility/inc/accessibility/helper/IComboListBoxHelper.hxx +++ /dev/null @@ -1,69 +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_ACCESSIBILITY_HELPER_ICOMBOLISTBOXHELPER_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_HELPER_ICOMBOLISTBOXHELPER_HXX - -#include - -#include -#include - -namespace com { namespace sun { namespace star { namespace datatransfer { namespace clipboard { - class XClipboard; -} } } } } - -class Point; -class Rectangle; -namespace vcl { class Window; } -namespace accessibility -{ - class IComboListBoxHelper - { - public: - virtual ~IComboListBoxHelper() = 0; - - virtual OUString GetEntry( sal_Int32 nPos ) const = 0; - virtual Rectangle GetDropDownPosSizePixel( ) const = 0; - virtual Rectangle GetBoundingRectangle( sal_uInt16 nItem ) const = 0; - virtual Rectangle GetWindowExtentsRelative() = 0; - virtual bool IsEnabled() const = 0; - virtual bool IsEntryVisible( sal_Int32 nPos ) const = 0; - virtual sal_uInt16 GetDisplayLineCount() const = 0; - virtual void GetMaxVisColumnsAndLines( sal_uInt16& rnCols, sal_uInt16& rnLines ) const = 0; - virtual WinBits GetStyle() const = 0; - virtual bool IsMultiSelectionEnabled() const = 0; - virtual sal_Int32 GetTopEntry() const = 0; - virtual bool IsEntryPosSelected( sal_Int32 nPos ) const = 0; - virtual sal_Int32 GetEntryCount() const = 0; - virtual void Select() = 0; - virtual void SelectEntryPos( sal_Int32 nPos, bool bSelect = true ) = 0; - virtual sal_Int32 GetSelectEntryCount() const = 0; - virtual void SetNoSelection() = 0; - virtual sal_Int32 GetSelectEntryPos( sal_Int32 nSelIndex = 0 ) const = 0; - virtual bool IsInDropDown() const = 0; - virtual Rectangle GetEntryCharacterBounds( const sal_Int32 _nEntryPos, const sal_Int32 _nCharacterIndex ) const = 0; - virtual long GetIndexForPoint( const Point& rPoint, sal_Int32 & nPos ) const = 0; - virtual css::uno::Reference< css::datatransfer::clipboard::XClipboard > - GetClipboard() = 0; - }; -} -#endif // INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_HELPER_ICOMBOLISTBOXHELPER_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ - diff --git a/accessibility/inc/accessibility/helper/accessiblestrings.hrc b/accessibility/inc/accessibility/helper/accessiblestrings.hrc deleted file mode 100644 index 60c4392a7562..000000000000 --- a/accessibility/inc/accessibility/helper/accessiblestrings.hrc +++ /dev/null @@ -1,51 +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 ACCESSIBILITY_HELPER_ACCESSIBLESTRINGS_HRC_ -#define ACCESSIBILITY_HELPER_ACCESSIBLESTRINGS_HRC_ - -#define RID_TK_ACC_START 1000 - -// Accessible Action Id's -#define RID_STR_ACC_ACTION_CLICK ( RID_TK_ACC_START + 0 ) -#define RID_STR_ACC_ACTION_TOGGLEPOPUP ( RID_TK_ACC_START + 1 ) -#define RID_STR_ACC_ACTION_SELECT ( RID_TK_ACC_START + 2 ) -#define RID_STR_ACC_ACTION_INCLINE ( RID_TK_ACC_START + 3 ) -#define RID_STR_ACC_ACTION_DECLINE ( RID_TK_ACC_START + 4 ) -#define RID_STR_ACC_ACTION_INCBLOCK ( RID_TK_ACC_START + 5 ) -#define RID_STR_ACC_ACTION_DECBLOCK ( RID_TK_ACC_START + 6 ) -#define RID_STR_ACC_NAME_PREVIEW ( RID_TK_ACC_START + 7 ) - -#define STR_SVT_ACC_ACTION_EXPAND ( RID_TK_ACC_START + 8 ) -#define STR_SVT_ACC_ACTION_COLLAPSE ( RID_TK_ACC_START + 9 ) -#define STR_SVT_ACC_LISTENTRY_SELCTED_STATE ( RID_TK_ACC_START + 10 ) - -#define RID_STR_ACC_ACTION_CHECK ( RID_TK_ACC_START + 11 ) -#define RID_STR_ACC_ACTION_UNCHECK ( RID_TK_ACC_START + 12 ) -#define RID_STR_ACC_ACTION_DOUBLE_CLICK ( RID_TK_ACC_START + 13 ) -#define RID_STR_ACC_SCROLLBAR_NAME_VERTICAL ( RID_TK_ACC_START + 14 ) -#define RID_STR_ACC_SCROLLBAR_NAME_HORIZONTAL ( RID_TK_ACC_START + 15 ) -#define RID_STR_ACC_PANEL_DESCRIPTION ( RID_TK_ACC_START + 16 ) - -#define RID_STR_ACC_NAME_BROWSEBUTTON ( RID_TK_ACC_START + 100 ) -#define RID_STR_ACC_DESC_PANELDECL_TABBAR ( RID_TK_ACC_START + 101 ) - -#endif // ACCESSIBILITY_HELPER_ACCESSIBLESTRINGS_HRC_ - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/helper/accresmgr.hxx b/accessibility/inc/accessibility/helper/accresmgr.hxx deleted file mode 100644 index fe8ae624843e..000000000000 --- a/accessibility/inc/accessibility/helper/accresmgr.hxx +++ /dev/null @@ -1,66 +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_ACCESSIBILITY_HELPER_ACCRESMGR_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_HELPER_ACCRESMGR_HXX - -#include - -class SimpleResMgr; - -#define TK_RES_STRING(id) ::accessibility::TkResMgr::loadString(id) - - -// TkResMgr - -namespace accessibility -{ - -class TkResMgr -{ - static SimpleResMgr* m_pImpl; - -private: - // no instantiation allowed - TkResMgr() = delete; - ~TkResMgr() { } - - // we'll instantiate one static member of the following class, - // which in its dtor ensures that m_pImpl will be deleted - class EnsureDelete - { - public: - EnsureDelete() { } - ~EnsureDelete(); - }; - friend class EnsureDelete; - -protected: - static void ensureImplExists(); - -public: - // loads the string with the specified resource id - static OUString loadString( sal_uInt16 nResId ); -}; - -} - -#endif // INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_HELPER_ACCRESMGR_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/helper/characterattributeshelper.hxx b/accessibility/inc/accessibility/helper/characterattributeshelper.hxx deleted file mode 100644 index 3ed820b127e4..000000000000 --- a/accessibility/inc/accessibility/helper/characterattributeshelper.hxx +++ /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 . - */ - -#ifndef INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_HELPER_CHARACTERATTRIBUTESHELPER_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_HELPER_CHARACTERATTRIBUTESHELPER_HXX - -#include -#include -#include - -#include - - -// class CharacterAttributesHelper - - -class CharacterAttributesHelper -{ -private: - - typedef ::std::map< OUString, css::uno::Any > AttributeMap; - - AttributeMap m_aAttributeMap; - -public: - - CharacterAttributesHelper( const vcl::Font& rFont, sal_Int32 nBackColor, sal_Int32 nColor ); - ~CharacterAttributesHelper(); - - std::vector< css::beans::PropertyValue > GetCharacterAttributes(); - css::uno::Sequence< css::beans::PropertyValue > GetCharacterAttributes( const css::uno::Sequence< OUString >& aRequestedAttributes ); -}; - -#endif // INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_HELPER_CHARACTERATTRIBUTESHELPER_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/helper/listboxhelper.hxx b/accessibility/inc/accessibility/helper/listboxhelper.hxx deleted file mode 100644 index 1dec33d21134..000000000000 --- a/accessibility/inc/accessibility/helper/listboxhelper.hxx +++ /dev/null @@ -1,189 +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_ACCESSIBILITY_HELPER_LISTBOXHELPER_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_HELPER_LISTBOXHELPER_HXX - -#include -#include -#include -#include - - -// globals - - -const sal_Int32 DEFAULT_INDEX_IN_PARENT = -1; - - -// class VCLListBoxHelper - - -template< class T > class VCLListBoxHelper : public ::accessibility::IComboListBoxHelper -{ -private: - T& m_aComboListBox; - -public: - inline - VCLListBoxHelper( T& _pListBox ) : - m_aComboListBox( _pListBox ){} - - - virtual OUString GetEntry( sal_Int32 nPos ) const override - { - return m_aComboListBox.GetEntry( nPos ); - } - - virtual Rectangle GetDropDownPosSizePixel() const override - { - Rectangle aTemp = m_aComboListBox.GetWindowExtentsRelative(nullptr); - Rectangle aRet = m_aComboListBox.GetDropDownPosSizePixel(); - aRet.Move(aTemp.TopLeft().X(),aTemp.TopLeft().Y()); - return aRet; - } - - virtual Rectangle GetBoundingRectangle( sal_uInt16 nItem ) const override - { - Rectangle aRect; - if ( m_aComboListBox.IsInDropDown() && IsEntryVisible( nItem ) ) - { - Rectangle aTemp = m_aComboListBox.GetDropDownPosSizePixel(); - Size aSize = aTemp.GetSize(); - aSize.Height() /= m_aComboListBox.GetDisplayLineCount(); - Point aTopLeft = aTemp.TopLeft(); - aTopLeft.Y() += aSize.Height() * ( nItem - m_aComboListBox.GetTopEntry() ); - aRect = Rectangle( aTopLeft, aSize ); - } - else - aRect = m_aComboListBox.GetBoundingRectangle( nItem ); - return aRect; - } - - virtual Rectangle GetWindowExtentsRelative() override - { - return m_aComboListBox.GetWindowExtentsRelative( nullptr ); - } - - virtual bool IsEnabled() const override - { - return m_aComboListBox.IsEnabled(); - } - - virtual bool IsEntryVisible( sal_Int32 nPos ) const override - { - sal_Int32 nTopEntry = m_aComboListBox.GetTopEntry(); - sal_uInt16 nLines = m_aComboListBox.GetDisplayLineCount(); - return ( nPos >= nTopEntry && nPos < ( nTopEntry + nLines ) ); - } - - virtual sal_uInt16 GetDisplayLineCount() const override - { - return m_aComboListBox.GetDisplayLineCount(); - } - - virtual void GetMaxVisColumnsAndLines( sal_uInt16& rnCols, sal_uInt16& rnLines ) const override - { - m_aComboListBox.GetMaxVisColumnsAndLines(rnCols,rnLines); - } - - virtual WinBits GetStyle() const override - { - return m_aComboListBox.GetStyle(); - } - - virtual bool IsMultiSelectionEnabled() const override - { - return m_aComboListBox.IsMultiSelectionEnabled(); - } - - virtual sal_Int32 GetTopEntry() const override - { - return m_aComboListBox.GetTopEntry(); - } - - virtual bool IsEntryPosSelected( sal_Int32 nPos ) const override - { - return m_aComboListBox.IsEntryPosSelected(nPos); - } - - virtual sal_Int32 GetEntryCount() const override - { - return m_aComboListBox.GetEntryCount(); - } - - virtual void Select() override - { - m_aComboListBox.Select(); - } - - virtual void SelectEntryPos( sal_Int32 nPos, bool bSelect = true ) override - { - m_aComboListBox.SelectEntryPos(nPos,bSelect); - } - - virtual sal_Int32 GetSelectEntryCount() const override - { - return m_aComboListBox.GetSelectEntryCount(); - } - - virtual void SetNoSelection() override - { - m_aComboListBox.SetNoSelection(); - } - - virtual sal_Int32 GetSelectEntryPos( sal_Int32 nSelIndex = 0 ) const override - { - return m_aComboListBox.GetSelectEntryPos(nSelIndex); - } - - virtual bool IsInDropDown() const override - { - return m_aComboListBox.IsInDropDown(); - } - - virtual Rectangle GetEntryCharacterBounds( const sal_Int32 _nEntryPos, const sal_Int32 _nCharacterIndex ) const override - { - Rectangle aRect; - - Pair aEntryCharacterRange = m_aComboListBox.GetLineStartEnd( _nEntryPos ); - if ( aEntryCharacterRange.A() + _nCharacterIndex <= aEntryCharacterRange.B() ) - { - long nIndex = aEntryCharacterRange.A() + _nCharacterIndex; - aRect = m_aComboListBox.GetCharacterBounds( nIndex ); - } - return aRect; - } - - long GetIndexForPoint( const Point& rPoint, sal_Int32& nPos ) const override - { - return m_aComboListBox.GetIndexForPoint( rPoint, nPos ); - } - - css::uno::Reference< css::datatransfer::clipboard::XClipboard > - GetClipboard() override - { - return m_aComboListBox.GetClipboard(); - } - -}; - -#endif // INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_HELPER_LISTBOXHELPER_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/standard/accessiblemenubasecomponent.hxx b/accessibility/inc/accessibility/standard/accessiblemenubasecomponent.hxx deleted file mode 100644 index 11cbf87ddb85..000000000000 --- a/accessibility/inc/accessibility/standard/accessiblemenubasecomponent.hxx +++ /dev/null @@ -1,145 +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_ACCESSIBILITY_STANDARD_ACCESSIBLEMENUBASECOMPONENT_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_ACCESSIBLEMENUBASECOMPONENT_HXX - -#include -#include -#include -#include -#include -#include - -#include - -class Menu; -class VclSimpleEvent; -class VclMenuEvent; -class VCLExternalSolarLock; - -namespace utl { -class AccessibleStateSetHelper; -} - - -// class OAccessibleMenuBaseComponent - -typedef ::cppu::ImplHelper2< - css::accessibility::XAccessible, - css::lang::XServiceInfo > OAccessibleMenuBaseComponent_BASE; - -class OAccessibleMenuBaseComponent : public comphelper::OAccessibleExtendedComponentHelper, - public OAccessibleMenuBaseComponent_BASE -{ - friend class OAccessibleMenuItemComponent; - friend class VCLXAccessibleMenuItem; - friend class VCLXAccessibleMenu; - -private: - VCLExternalSolarLock* m_pExternalLock; - -protected: - typedef ::std::vector< css::uno::Reference< css::accessibility::XAccessible > > AccessibleChildren; - - AccessibleChildren m_aAccessibleChildren; - Menu* m_pMenu; - - bool m_bEnabled; - bool m_bFocused; - bool m_bVisible; - bool m_bSelected; - bool m_bChecked; - - virtual bool IsEnabled(); - virtual bool IsFocused(); - virtual bool IsVisible(); - virtual bool IsSelected(); - virtual bool IsChecked(); - - void SetEnabled( bool bEnabled ); - void SetFocused( bool bFocused ); - void SetVisible( bool bVisible ); - void SetSelected( bool bSelected ); - void SetChecked( bool bChecked ); - - void UpdateEnabled( sal_Int32 i, bool bEnabled ); - void UpdateFocused( sal_Int32 i, bool bFocused ); - void UpdateVisible(); - void UpdateSelected( sal_Int32 i, bool bSelected ); - void UpdateChecked( sal_Int32 i, bool bChecked ); - void UpdateAccessibleName( sal_Int32 i ); - void UpdateItemText( sal_Int32 i ); - - sal_Int32 GetChildCount(); - - css::uno::Reference< css::accessibility::XAccessible > GetChild( sal_Int32 i ); - css::uno::Reference< css::accessibility::XAccessible > GetChildAt( const css::awt::Point& rPoint ); - - void InsertChild( sal_Int32 i ); - void RemoveChild( sal_Int32 i ); - - virtual bool IsHighlighted(); - bool IsChildHighlighted(); - - virtual bool IsMenuHideDisabledEntries(); - - void SelectChild( sal_Int32 i ); - void DeSelectAll(); - bool IsChildSelected( sal_Int32 i ); - - virtual void Select(); - virtual void DeSelect(); - virtual void Click(); - virtual bool IsPopupMenuOpen(); - - DECL_LINK_TYPED( MenuEventListener, VclMenuEvent&, void ); - - void ProcessMenuEvent( const VclMenuEvent& rVclMenuEvent ); - - virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ) = 0; - - // XComponent - virtual void SAL_CALL disposing() override; - -public: - OAccessibleMenuBaseComponent( Menu* pMenu ); - virtual ~OAccessibleMenuBaseComponent(); - - void SetStates(); - - // XInterface - DECLARE_XINTERFACE() - - // XTypeProvider - DECLARE_XTYPEPROVIDER() - - // XServiceInfo - virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) throw (css::uno::RuntimeException, std::exception) override; - - // XAccessible - virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( ) throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleContext - virtual css::uno::Reference< css::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet( ) throw (css::uno::RuntimeException, std::exception) override; -}; - -#endif // INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_ACCESSIBLEMENUBASECOMPONENT_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/standard/accessiblemenucomponent.hxx b/accessibility/inc/accessibility/standard/accessiblemenucomponent.hxx deleted file mode 100644 index 859756041438..000000000000 --- a/accessibility/inc/accessibility/standard/accessiblemenucomponent.hxx +++ /dev/null @@ -1,89 +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_ACCESSIBILITY_STANDARD_ACCESSIBLEMENUCOMPONENT_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_ACCESSIBLEMENUCOMPONENT_HXX - -#include -#include -#include - - -// class OAccessibleMenuComponent - -typedef ::cppu::ImplHelper1< - css::accessibility::XAccessibleSelection > OAccessibleMenuComponent_BASE; - -class OAccessibleMenuComponent : public OAccessibleMenuBaseComponent, - public OAccessibleMenuComponent_BASE -{ -protected: - virtual bool IsEnabled() override; - virtual bool IsVisible() override; - - virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ) override; - - // OCommonAccessibleComponent - virtual css::awt::Rectangle implGetBounds( ) throw (css::uno::RuntimeException) override; - -public: - OAccessibleMenuComponent( Menu* pMenu ); - virtual ~OAccessibleMenuComponent(); - - // XInterface - DECLARE_XINTERFACE() - - // XTypeProvider - DECLARE_XTYPEPROVIDER() - - // XAccessibleContext - virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int16 SAL_CALL getAccessibleRole( ) throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getAccessibleDescription( ) throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getAccessibleName( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::lang::Locale SAL_CALL getLocale( ) throw (css::accessibility::IllegalAccessibleComponentStateException, css::uno::RuntimeException, std::exception) override; - - // XAccessibleComponent - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const css::awt::Point& aPoint ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::awt::Point SAL_CALL getLocationOnScreen( ) throw (css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL grabFocus( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getForeground( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getBackground( ) throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleExtendedComponent - virtual css::uno::Reference< css::awt::XFont > SAL_CALL getFont( ) throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getTitledBorderText( ) throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getToolTipText( ) throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleSelection - virtual void SAL_CALL selectAccessibleChild( sal_Int32 nChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL isAccessibleChildSelected( sal_Int32 nChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL clearAccessibleSelection( ) throw (css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL selectAllAccessibleChildren( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getSelectedAccessibleChildCount( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL deselectAccessibleChild( sal_Int32 nChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; -}; - -#endif // INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_ACCESSIBLEMENUCOMPONENT_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/standard/accessiblemenuitemcomponent.hxx b/accessibility/inc/accessibility/standard/accessiblemenuitemcomponent.hxx deleted file mode 100644 index 2bcf01f60882..000000000000 --- a/accessibility/inc/accessibility/standard/accessiblemenuitemcomponent.hxx +++ /dev/null @@ -1,90 +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_ACCESSIBILITY_STANDARD_ACCESSIBLEMENUITEMCOMPONENT_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_ACCESSIBLEMENUITEMCOMPONENT_HXX - -#include - - -// class OAccessibleMenuItemComponent - - -class OAccessibleMenuItemComponent : public OAccessibleMenuBaseComponent -{ - friend class OAccessibleMenuBaseComponent; - -protected: - Menu* m_pParent; - sal_uInt16 m_nItemPos; - OUString m_sAccessibleName; - OUString m_sItemText; - - virtual bool IsEnabled() override; - virtual bool IsVisible() override; - virtual void Select() override; - virtual void DeSelect() override; - virtual void Click() override; - - void SetItemPos( sal_uInt16 nItemPos ); - void SetAccessibleName( const OUString& sAccessibleName ); - OUString GetAccessibleName(); - void SetItemText( const OUString& sItemText ); - OUString GetItemText(); - - virtual bool IsMenuHideDisabledEntries() override; - - virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ) override; - - // OCommonAccessibleComponent - virtual css::awt::Rectangle implGetBounds( ) throw (css::uno::RuntimeException) override; - - // XComponent - virtual void SAL_CALL disposing() override; - -public: - OAccessibleMenuItemComponent( Menu* pParent, sal_uInt16 nItemPos, Menu* pMenu ); - virtual ~OAccessibleMenuItemComponent(); - - // XAccessibleContext - virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getAccessibleIndexInParent( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int16 SAL_CALL getAccessibleRole( ) throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getAccessibleDescription( ) throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getAccessibleName( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::lang::Locale SAL_CALL getLocale( ) throw (css::accessibility::IllegalAccessibleComponentStateException, css::uno::RuntimeException, std::exception) override; - - // XAccessibleComponent - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const css::awt::Point& aPoint ) throw (css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL grabFocus( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getForeground( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getBackground( ) throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleExtendedComponent - virtual css::uno::Reference< css::awt::XFont > SAL_CALL getFont( ) throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getTitledBorderText( ) throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getToolTipText( ) throw (css::uno::RuntimeException, std::exception) override; -}; - -#endif // INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_ACCESSIBLEMENUITEMCOMPONENT_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/standard/vclxaccessiblebox.hxx b/accessibility/inc/accessibility/standard/vclxaccessiblebox.hxx deleted file mode 100644 index 7fec38d57559..000000000000 --- a/accessibility/inc/accessibility/standard/vclxaccessiblebox.hxx +++ /dev/null @@ -1,185 +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_ACCESSIBILITY_STANDARD_VCLXACCESSIBLEBOX_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLEBOX_HXX - -#include -#include -#include -#include -#include -#include - - -typedef ::cppu::ImplHelper3< - css::accessibility::XAccessible, - css::accessibility::XAccessibleValue, - css::accessibility::XAccessibleAction - > VCLXAccessibleBox_BASE; - - -/** Base class for list- and combo boxes. This class manages the box' - children. The classed derived from this one have only to implement the - IsValid method and return the correct implementation name. -*/ -class VCLXAccessibleBox - : public VCLXAccessibleComponent, - public VCLXAccessibleBox_BASE -{ -public: - enum BoxType {COMBOBOX, LISTBOX}; - - /** The constructor is initialized with the box type which may be - either COMBOBOX or LISTBOX and a flag - indicating whether the box is a drop down box. - */ - VCLXAccessibleBox (VCLXWindow* pVCLXindow, BoxType aType, bool bIsDropDownBox); - - // XTypeProvider - DECLARE_XTYPEPROVIDER() - - // XInterface - DECLARE_XINTERFACE() - - - // XAccessible - - virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL - getAccessibleContext( ) throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleContext - - /** Each object has one or two children: an optional text field and the - actual list. The text field is not provided for non drop down list - boxes. - */ - sal_Int32 SAL_CALL getAccessibleChildCount() - throw (css::uno::RuntimeException, std::exception) override; - /** For drop down list boxes the text field is a not editable - VCLXAccessibleTextField, for combo boxes it is an - editable VLCAccessibleEdit. - */ - css::uno::Reference< css::accessibility::XAccessible> SAL_CALL - getAccessibleChild (sal_Int32 i) - throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - /** The role is always AccessibleRole::COMBO_BOX. - */ - sal_Int16 SAL_CALL getAccessibleRole() - throw (css::uno::RuntimeException, std::exception) override; - - sal_Int32 SAL_CALL getAccessibleIndexInParent() - throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleAction - - /** There is one action for drop down boxes and none for others. - */ - virtual sal_Int32 SAL_CALL getAccessibleActionCount() - throw (css::uno::RuntimeException, std::exception) override; - /** The action for drop down boxes lets the user toggle the visibility of the - popup menu. - */ - virtual sal_Bool SAL_CALL doAccessibleAction (sal_Int32 nIndex) - throw (css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception) override; - /** The returned string is associated with resource - RID_STR_ACC_ACTION_TOGGLEPOPUP. - */ - virtual OUString SAL_CALL getAccessibleActionDescription (sal_Int32 nIndex) - throw (css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception) override; - /** No keybinding returned so far. - */ - virtual css::uno::Reference< css::accessibility::XAccessibleKeyBinding > SAL_CALL - getAccessibleActionKeyBinding( sal_Int32 nIndex ) - throw (css::lang::IndexOutOfBoundsException, - css::uno::RuntimeException, std::exception) override; - - // XComponent - - /** This method is called from the implementation helper during an - XComponent::dispose() call. - */ - virtual void SAL_CALL disposing() override; - - // XAccessibleValue - - virtual css::uno::Any SAL_CALL getCurrentValue( ) - throw (css::uno::RuntimeException, std::exception) override; - - virtual sal_Bool SAL_CALL setCurrentValue( - const css::uno::Any& aNumber ) - throw (css::uno::RuntimeException, std::exception) override; - - virtual css::uno::Any SAL_CALL getMaximumValue( ) - throw (css::uno::RuntimeException, std::exception) override; - - virtual css::uno::Any SAL_CALL getMinimumValue( ) - throw (css::uno::RuntimeException, std::exception) override; -protected: - /** Specifies whether the box is a combo box or a list box. List boxes - have multi selection. - */ - BoxType m_aBoxType; - - /// Specifies whether the box is a drop down box and thus has an action. - bool m_bIsDropDownBox; - - /// The child that represents the text field if there is one. - css::uno::Reference< css::accessibility::XAccessible> - m_xText; - - /// The child that contains the items of this box. - css::uno::Reference< css::accessibility::XAccessible> - m_xList; - - /** This flag specifies whether an object has a text field as child - regardless of whether that child being currently instantiated or - not. - */ - bool m_bHasTextChild; - - /** This flag specifies whether an object has a list as child regardless - of whether that child being currently instantiated or not. This - flag is always true in the current implementation because the list - child is just another wrapper around this object and thus has the - same life time. - */ - bool m_bHasListChild; - - virtual ~VCLXAccessibleBox(); - - /** Returns true when the object is valid. - */ - virtual bool IsValid() const = 0; - - virtual void ProcessWindowChildEvent (const VclWindowEvent& rVclWindowEvent) override; - virtual void ProcessWindowEvent (const VclWindowEvent& rVclWindowEvent) override; - - virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ) override; - -private: - /// Index in parent. This is settable from the outside. - sal_Int32 m_nIndexInParent; -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/standard/vclxaccessiblebutton.hxx b/accessibility/inc/accessibility/standard/vclxaccessiblebutton.hxx deleted file mode 100644 index 8f0a8f1fa42b..000000000000 --- a/accessibility/inc/accessibility/standard/vclxaccessiblebutton.hxx +++ /dev/null @@ -1,78 +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_ACCESSIBILITY_STANDARD_VCLXACCESSIBLEBUTTON_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLEBUTTON_HXX - -#include - -#include -#include - -#include - - -// class VCLXAccessibleButton - - -typedef ::cppu::ImplHelper2< - css::accessibility::XAccessibleAction, - css::accessibility::XAccessibleValue > VCLXAccessibleButton_BASE; - -class VCLXAccessibleButton : public VCLXAccessibleTextComponent, - public VCLXAccessibleButton_BASE -{ -protected: - virtual ~VCLXAccessibleButton(); - - virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) override; - virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ) override; - -public: - VCLXAccessibleButton( VCLXWindow* pVCLXindow ); - - // XInterface - DECLARE_XINTERFACE() - - // XTypeProvider - DECLARE_XTYPEPROVIDER() - - // XServiceInfo - virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleContext - virtual OUString SAL_CALL getAccessibleName( ) throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleAction - virtual sal_Int32 SAL_CALL getAccessibleActionCount( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL doAccessibleAction ( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getAccessibleActionDescription ( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessibleKeyBinding > SAL_CALL getAccessibleActionKeyBinding( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - - // XAccessibleValue - virtual css::uno::Any SAL_CALL getCurrentValue( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL setCurrentValue( const css::uno::Any& aNumber ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Any SAL_CALL getMaximumValue( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Any SAL_CALL getMinimumValue( ) throw (css::uno::RuntimeException, std::exception) override; -}; - -#endif // INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLEBUTTON_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/standard/vclxaccessiblecheckbox.hxx b/accessibility/inc/accessibility/standard/vclxaccessiblecheckbox.hxx deleted file mode 100644 index db0f699e98b7..000000000000 --- a/accessibility/inc/accessibility/standard/vclxaccessiblecheckbox.hxx +++ /dev/null @@ -1,85 +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_ACCESSIBILITY_STANDARD_VCLXACCESSIBLECHECKBOX_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLECHECKBOX_HXX - -#include - -#include -#include - -#include - - -// class VCLXAccessibleCheckBox - - -typedef ::cppu::ImplHelper2< - css::accessibility::XAccessibleAction, - css::accessibility::XAccessibleValue > VCLXAccessibleCheckBox_BASE; - -class VCLXAccessibleCheckBox : public VCLXAccessibleTextComponent, - public VCLXAccessibleCheckBox_BASE -{ -private: - bool m_bChecked; - bool m_bIndeterminate; - -protected: - virtual ~VCLXAccessibleCheckBox(); - - bool IsChecked(); - bool IsIndeterminate(); - - void SetChecked( bool bChecked ); - void SetIndeterminate( bool bIndeterminate ); - - virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) override; - virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ) override; - -public: - VCLXAccessibleCheckBox( VCLXWindow* pVCLXindow ); - - // XInterface - DECLARE_XINTERFACE() - - // XTypeProvider - DECLARE_XTYPEPROVIDER() - - // XServiceInfo - virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleAction - virtual sal_Int32 SAL_CALL getAccessibleActionCount( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL doAccessibleAction ( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getAccessibleActionDescription ( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessibleKeyBinding > SAL_CALL getAccessibleActionKeyBinding( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - - // XAccessibleValue - virtual css::uno::Any SAL_CALL getCurrentValue( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL setCurrentValue( const css::uno::Any& aNumber ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Any SAL_CALL getMaximumValue( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Any SAL_CALL getMinimumValue( ) throw (css::uno::RuntimeException, std::exception) override; -}; - -#endif // INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLECHECKBOX_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/standard/vclxaccessiblecombobox.hxx b/accessibility/inc/accessibility/standard/vclxaccessiblecombobox.hxx deleted file mode 100644 index 082bd30d0990..000000000000 --- a/accessibility/inc/accessibility/standard/vclxaccessiblecombobox.hxx +++ /dev/null @@ -1,57 +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_ACCESSIBILITY_STANDARD_VCLXACCESSIBLECOMBOBOX_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLECOMBOBOX_HXX - -#include -#include -#include - - -/** The accessible combobox has two children. The first is the text field - represented by an object of the VCLXAccessibleEdit class. - The second is the list containing all items and is represented by an - object of the VCLXAccessibleList class which does not - support selection at the moment. -*/ -class VCLXAccessibleComboBox - : public VCLXAccessibleBox -{ -public: - VCLXAccessibleComboBox (VCLXWindow* pVCLXindow); - - // XServiceInfo - virtual OUString SAL_CALL getImplementationName() - throw (css::uno::RuntimeException, std::exception) override; - // Return combo box specific services. - virtual css::uno::Sequence< OUString > SAL_CALL - getSupportedServiceNames() - throw (css::uno::RuntimeException, std::exception) override; - -protected: - virtual ~VCLXAccessibleComboBox(); - - virtual bool IsValid() const override; - virtual void ProcessWindowEvent (const VclWindowEvent& rVclWindowEvent) override; -}; - -#endif // INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLECOMBOBOX_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/standard/vclxaccessibledropdowncombobox.hxx b/accessibility/inc/accessibility/standard/vclxaccessibledropdowncombobox.hxx deleted file mode 100644 index ab6d71bed276..000000000000 --- a/accessibility/inc/accessibility/standard/vclxaccessibledropdowncombobox.hxx +++ /dev/null @@ -1,56 +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_ACCESSIBILITY_STANDARD_VCLXACCESSIBLEDROPDOWNCOMBOBOX_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLEDROPDOWNCOMBOBOX_HXX - -#include -#include -#include - -/** The accessible drop down combobox has two children. The first is the - text field represented by an object of the - VCLXAccessibleEdit class. The second is the list - containing all items and is represented by an object of the - VCLXAccessibleList class which does not support selection - at the moment. -*/ -class VCLXAccessibleDropDownComboBox : public VCLXAccessibleBox -{ -public: - VCLXAccessibleDropDownComboBox (VCLXWindow* pVCLXindow); - - // XServiceInfo - virtual OUString SAL_CALL getImplementationName() - throw (css::uno::RuntimeException, std::exception) override; - // Return drop down combo box specific services. - virtual css::uno::Sequence< OUString > SAL_CALL - getSupportedServiceNames() - throw (css::uno::RuntimeException, std::exception) override; - -protected: - virtual ~VCLXAccessibleDropDownComboBox(); - - virtual bool IsValid() const override; - virtual void ProcessWindowEvent (const VclWindowEvent& rVclWindowEvent) override; -}; - -#endif // INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLEDROPDOWNCOMBOBOX_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/standard/vclxaccessibledropdownlistbox.hxx b/accessibility/inc/accessibility/standard/vclxaccessibledropdownlistbox.hxx deleted file mode 100644 index 23f1ab4ba9b0..000000000000 --- a/accessibility/inc/accessibility/standard/vclxaccessibledropdownlistbox.hxx +++ /dev/null @@ -1,56 +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_ACCESSIBILITY_STANDARD_VCLXACCESSIBLEDROPDOWNLISTBOX_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLEDROPDOWNLISTBOX_HXX - -#include -#include - -/** The accessible drop down combobox has two children. The first is the - text field represented by an object of the - VCLXAccessibleTextField class which can not be edited. The - second is the list containing all items and is represented by an object - of the VCLXAccessibleListBoxList class which does support - selection. -*/ -class VCLXAccessibleDropDownListBox : public VCLXAccessibleBox -{ -public: - VCLXAccessibleDropDownListBox (VCLXWindow* pVCLXindow); - - // XServiceInfo - virtual OUString SAL_CALL getImplementationName() - throw (css::uno::RuntimeException, std::exception) override; - // Return drop down list box specific services. - virtual css::uno::Sequence< OUString > SAL_CALL - getSupportedServiceNames() - throw (css::uno::RuntimeException, std::exception) override; - -protected: - virtual ~VCLXAccessibleDropDownListBox(); - - virtual bool IsValid() const override; - virtual void ProcessWindowEvent (const VclWindowEvent& rVclWindowEvent) override; - -}; - -#endif // INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLEDROPDOWNLISTBOX_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/standard/vclxaccessibleedit.hxx b/accessibility/inc/accessibility/standard/vclxaccessibleedit.hxx deleted file mode 100644 index 7e395620a410..000000000000 --- a/accessibility/inc/accessibility/standard/vclxaccessibleedit.hxx +++ /dev/null @@ -1,111 +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_ACCESSIBILITY_STANDARD_VCLXACCESSIBLEEDIT_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLEEDIT_HXX - -#include -#include -#include - -#include - - -// class VCLXAccessibleEdit - - -typedef ::cppu::ImplHelper2< - css::accessibility::XAccessibleAction, - css::accessibility::XAccessibleEditableText > VCLXAccessibleEdit_BASE; - -class VCLXAccessibleEdit : public VCLXAccessibleTextComponent, - public VCLXAccessibleEdit_BASE -{ - friend class VCLXAccessibleBox; - -private: - sal_Int32 m_nSelectionStart; - sal_Int32 m_nCaretPosition; - -protected: - virtual ~VCLXAccessibleEdit(); - - virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) override; - virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ) override; - - // OCommonAccessibleText - virtual OUString implGetText() override; - virtual void implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ) override; - -public: - VCLXAccessibleEdit( VCLXWindow* pVCLXindow ); - - // XInterface - DECLARE_XINTERFACE() - - // XTypeProvider - DECLARE_XTYPEPROVIDER() - - // XServiceInfo - virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleContext - virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual sal_Int16 SAL_CALL getAccessibleRole( ) throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleAction - virtual sal_Int32 SAL_CALL getAccessibleActionCount( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL doAccessibleAction ( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getAccessibleActionDescription ( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessibleKeyBinding > SAL_CALL getAccessibleActionKeyBinding( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - - // XAccessibleText - virtual sal_Int32 SAL_CALL getCaretPosition( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual sal_Unicode SAL_CALL getCharacter( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getCharacterAttributes( sal_Int32 nIndex, const css::uno::Sequence< OUString >& aRequestedAttributes ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual css::awt::Rectangle SAL_CALL getCharacterBounds( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getCharacterCount( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getIndexAtPoint( const css::awt::Point& aPoint ) throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getSelectedText( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getSelectionStart( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getSelectionEnd( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getText( ) throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual css::accessibility::TextSegment SAL_CALL getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (css::lang::IndexOutOfBoundsException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override; - virtual css::accessibility::TextSegment SAL_CALL getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (css::lang::IndexOutOfBoundsException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override; - virtual css::accessibility::TextSegment SAL_CALL getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (css::lang::IndexOutOfBoundsException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - - // XAccessibleEditableText - virtual sal_Bool SAL_CALL cutText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL pasteText( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL deleteText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL insertText( const OUString& sText, sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL replaceText( sal_Int32 nStartIndex, sal_Int32 nEndIndex, const OUString& sReplacement ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL setAttributes( sal_Int32 nStartIndex, sal_Int32 nEndIndex, const css::uno::Sequence< css::beans::PropertyValue >& aAttributeSet ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL setText( const OUString& sText ) throw (css::uno::RuntimeException, std::exception) override; -}; - -#endif // INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLEEDIT_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/standard/vclxaccessiblefixedhyperlink.hxx b/accessibility/inc/accessibility/standard/vclxaccessiblefixedhyperlink.hxx deleted file mode 100644 index d6e876f93ee9..000000000000 --- a/accessibility/inc/accessibility/standard/vclxaccessiblefixedhyperlink.hxx +++ /dev/null @@ -1,47 +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_ACCESSIBILITY_STANDARD_VCLXACCESSIBLEFIXEDHYPERLINK_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLEFIXEDHYPERLINK_HXX - -#include - - -// class VCLXAccessibleFixedHyperlink - - -class VCLXAccessibleFixedHyperlink : public VCLXAccessibleTextComponent -{ -protected: - virtual ~VCLXAccessibleFixedHyperlink(); - - virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ) override; - virtual void implGetLineBoundary( css::i18n::Boundary& rBoundary, sal_Int32 nIndex ) override; - -public: - VCLXAccessibleFixedHyperlink( VCLXWindow* pVCLXindow ); - - // XServiceInfo - virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) override; -}; - -#endif // INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLEFIXEDHYPERLINK_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/standard/vclxaccessiblefixedtext.hxx b/accessibility/inc/accessibility/standard/vclxaccessiblefixedtext.hxx deleted file mode 100644 index fc2616ecec53..000000000000 --- a/accessibility/inc/accessibility/standard/vclxaccessiblefixedtext.hxx +++ /dev/null @@ -1,47 +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_ACCESSIBILITY_STANDARD_VCLXACCESSIBLEFIXEDTEXT_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLEFIXEDTEXT_HXX - -#include - - -// class VCLXAccessibleFixedText - - -class VCLXAccessibleFixedText : public VCLXAccessibleTextComponent -{ -protected: - virtual ~VCLXAccessibleFixedText(); - - virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ) override; - virtual void implGetLineBoundary( css::i18n::Boundary& rBoundary, sal_Int32 nIndex ) override; - -public: - VCLXAccessibleFixedText( VCLXWindow* pVCLXindow ); - - // XServiceInfo - virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) override; -}; - -#endif // INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLEFIXEDTEXT_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/standard/vclxaccessiblelist.hxx b/accessibility/inc/accessibility/standard/vclxaccessiblelist.hxx deleted file mode 100644 index 86b3a04238f5..000000000000 --- a/accessibility/inc/accessibility/standard/vclxaccessiblelist.hxx +++ /dev/null @@ -1,210 +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_ACCESSIBILITY_STANDARD_VCLXACCESSIBLELIST_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLELIST_HXX - -#include -#include -#include "accessibility/standard/vclxaccessiblelistitem.hxx" -#include -#include -#include -#include -#include -#include - -typedef ::cppu::ImplHelper2< - css::accessibility::XAccessible, - css::accessibility::XAccessibleSelection - > VCLXAccessibleList_BASE; - -typedef std::vector< css::uno::WeakReference< css::accessibility::XAccessible > > - ListItems; - -namespace accessibility -{ - class IComboListBoxHelper; -} - - -/** Base class for the list contained in list- and combo boxes. This class - does not support selection because lists of combo boxes give no direct - access to their underlying list implementation. Look into derived - classes for selection. -*/ -class VCLXAccessibleList - : public VCLXAccessibleComponent, - public VCLXAccessibleList_BASE -{ -public: - enum BoxType {COMBOBOX, LISTBOX}; - - VCLXAccessibleList (VCLXWindow* pVCLXindow, BoxType aBoxType, - const css::uno::Reference< - css::accessibility::XAccessible >& _xParent); - - /** The index that is passed to this method is returned on following - calls to getAccessibleIndexInParent. - */ - void SetIndexInParent (sal_Int32 nIndex); - - /** Process some of the events and delegate the rest to the base classes. - */ - virtual void ProcessWindowEvent (const VclWindowEvent& rVclWindowEvent) override; - virtual void FillAccessibleRelationSet( utl::AccessibleRelationSetHelper& rRelationSet ) override; - - /** Called on reception of selection events this method checks all known - list items for a possible change in their selection state and - updates that accordingly. No accessibility events are send because - the XAccessibleSelection interface is not supported and the items - are transient. - @param sTextOfSelectedItem - This string contains the text of the currently selected - item. It is used to retrieve the index of that item. - */ - void UpdateSelection (const OUString& sTextOfSelectedItem); - - // XInterface - DECLARE_XINTERFACE() - - // XTypeProvider - DECLARE_XTYPEPROVIDER() - - // XAccessible - virtual css::uno::Reference< css::accessibility::XAccessibleContext> SAL_CALL - getAccessibleContext() - throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleContext - virtual sal_Int32 SAL_CALL getAccessibleChildCount() - throw (css::uno::RuntimeException, std::exception) override; - css::uno::Reference< css::accessibility::XAccessible> SAL_CALL - getAccessibleChild (sal_Int32 i) - throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL - getAccessibleParent( ) - throw (css::uno::RuntimeException, std::exception) override; - - /** The index returned as index in parent is always the one set with the - SetIndexInParent() method. - */ - virtual sal_Int32 SAL_CALL getAccessibleIndexInParent() - throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int16 SAL_CALL getAccessibleRole() - throw (css::uno::RuntimeException, std::exception) override; - - // XServiceInfo - virtual OUString SAL_CALL getImplementationName() - throw (css::uno::RuntimeException, std::exception) override; - // Return list specific services. - virtual css::uno::Sequence< OUString > SAL_CALL - getSupportedServiceNames() - throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleSelection - virtual void SAL_CALL selectAccessibleChild( sal_Int32 nChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL isAccessibleChildSelected( sal_Int32 nChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL clearAccessibleSelection( ) throw (css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL selectAllAccessibleChildren( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getSelectedAccessibleChildCount( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL deselectAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - - virtual css::awt::Point SAL_CALL getLocationOnScreen( ) throw (css::uno::RuntimeException, std::exception) override; - bool IsInDropDown(); - void HandleDropOpen(); - void ProcessWindowEvent (const VclWindowEvent& rVclWindowEvent, bool b_IsDropDownList); - void UpdateSelection_Acc (const ::rtl::OUString& sTextOfSelectedItem, bool b_IsDropDownList); - void UpdateSelection_Impl_Acc (bool b_IsDropDownList); - - void UpdateFocus_Impl_Acc ( sal_Int32 nPos, bool b_IsDropDownList) ; - static void NotifyListItem(css::uno::Any& val); -protected: - BoxType m_aBoxType; - ::accessibility::IComboListBoxHelper* m_pListBoxHelper; - ListItems m_aAccessibleChildren; - sal_Int32 m_nVisibleLineCount; - /// Index in parent. This is settable from the outside. - sal_Int32 m_nIndexInParent; - sal_Int32 m_nLastTopEntry; - sal_Int32 m_nLastSelectedPos; - bool m_bDisableProcessEvent; - bool m_bVisible; - sal_Int32 m_nCurSelectedPos; - - - virtual ~VCLXAccessibleList(); - - /** This function is called from the implementation helper during a - XComponent::dispose call. Free the list of items and the items themselves. - */ - virtual void SAL_CALL disposing() override; - - /** This method adds the states - AccessibleStateType::FOCUSABLE and possibly - AccessibleStateType::MULTI_SELECTABLE to the state set - of the base classes. - */ - virtual void FillAccessibleStateSet (utl::AccessibleStateSetHelper& rStateSet) override; - - /** Create the specified child and insert it into the list of children. - Sets the child's states. - */ - css::uno::Reference< css::accessibility::XAccessible > - CreateChild (sal_Int32 i); - - /** Call this method when the item list has been changed, i.e. items - have been deleted or inserted. - @param bItemInserted - Indicate whether items have been inserted (TRUE) or removed (FALSE). - @param nIndex - Index of the new or removed item. A value of -1 indicates that - the whole list has been cleared. - */ - void HandleChangedItemList (bool bItemInserted, sal_Int32 nIndex); - - // VCLXAccessibleComponent - virtual css::awt::Rectangle implGetBounds( ) throw (css::uno::RuntimeException) override; - -private: - /** We need to save the accessible parent to return it in getAccessibleParent(), - because this method of the base class returns the wrong parent. - */ - css::uno::Reference< css::accessibility::XAccessible > m_xParent; - - - /** dispose all items aand clears the container - */ - void clearItems(); - - void UpdateEntryRange_Impl(); -protected: - void UpdateSelection_Impl(sal_Int32 nPos = 0); - bool checkEntrySelected(sal_Int32 _nPos, - css::uno::Any& _rNewValue, - css::uno::Reference< css::accessibility::XAccessible >& _rxNewAcc); -private: - void notifyVisibleStates(bool _bSetNew ); - void UpdateVisibleLineCount(); -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/standard/vclxaccessiblelistbox.hxx b/accessibility/inc/accessibility/standard/vclxaccessiblelistbox.hxx deleted file mode 100644 index d015b4b79a4d..000000000000 --- a/accessibility/inc/accessibility/standard/vclxaccessiblelistbox.hxx +++ /dev/null @@ -1,56 +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_ACCESSIBILITY_STANDARD_VCLXACCESSIBLELISTBOX_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLELISTBOX_HXX - -#include -#include -#include -#include - - -/** The accessible drop down combobox has one children. It is the list - containing all items and is represented by an object of the - VCLXAccessibleListBoxList class which does support - selection. -*/ -class VCLXAccessibleListBox : public VCLXAccessibleBox -{ -public: - VCLXAccessibleListBox (VCLXWindow* pVCLXindow); - - // XServiceInfo - virtual OUString SAL_CALL getImplementationName() - throw (css::uno::RuntimeException, std::exception) override; - // Return list box specific services. - virtual css::uno::Sequence< OUString > SAL_CALL - getSupportedServiceNames() - throw (css::uno::RuntimeException, std::exception) override; - -protected: - virtual ~VCLXAccessibleListBox(); - - virtual bool IsValid() const override; - virtual void ProcessWindowEvent (const VclWindowEvent& rVclWindowEvent) override; -}; - -#endif // INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLELISTBOX_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/standard/vclxaccessiblelistitem.hxx b/accessibility/inc/accessibility/standard/vclxaccessiblelistitem.hxx deleted file mode 100644 index f851060c8248..000000000000 --- a/accessibility/inc/accessibility/standard/vclxaccessiblelistitem.hxx +++ /dev/null @@ -1,173 +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_ACCESSIBILITY_STANDARD_VCLXACCESSIBLELISTITEM_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLELISTITEM_HXX - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// forward --------------------------------------------------------------- - -namespace com { namespace sun { namespace star { namespace awt { - struct Point; - struct Rectangle; - struct Size; - class XFocusListener; -} } } } - -namespace accessibility -{ - class IComboListBoxHelper; -} - -// class VCLXAccessibleListItem ------------------------------------------ - -typedef ::cppu::WeakAggComponentImplHelper6< css::accessibility::XAccessible - , css::accessibility::XAccessibleContext - , css::accessibility::XAccessibleComponent - , css::accessibility::XAccessibleEventBroadcaster - , css::accessibility::XAccessibleText - , css::lang::XServiceInfo > VCLXAccessibleListItem_BASE; - -/** the class OAccessibleListBoxEntry represents the base class for an accessible object of a listbox entry -*/ -class VCLXAccessibleListItem : public ::comphelper::OBaseMutex, - public ::comphelper::OCommonAccessibleText, - public VCLXAccessibleListItem_BASE -{ -private: - OUString m_sEntryText; - sal_Int32 m_nIndexInParent; - bool m_bSelected; - bool m_bVisible; - -protected: - /// client id in the AccessibleEventNotifier queue - sal_uInt32 m_nClientId; - ::accessibility::IComboListBoxHelper* m_pListBoxHelper; - - css::uno::Reference< css::accessibility::XAccessible > m_xParent; - css::uno::Reference< css::accessibility::XAccessibleContext > m_xParentContext; - -protected: - virtual ~VCLXAccessibleListItem(); - /** this function is called upon disposing the component - */ - virtual void SAL_CALL disposing() override; - - // OCommonAccessibleText - virtual OUString implGetText() override; - virtual css::lang::Locale implGetLocale() override; - virtual void implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ) override; - -public: - /** OAccessibleBase needs a valid view - @param _pListBoxHelper - is the list- or combobox for which we implement an accessible object - @param _nIndexInParent - is the position of the entry inside the listbox - @param _xParent - is our parent accessible object - */ - VCLXAccessibleListItem( ::accessibility::IComboListBoxHelper* _pListBoxHelper, - sal_Int32 _nIndexInParent, - const css::uno::Reference< css::accessibility::XAccessible >& _xParent ); - - void NotifyAccessibleEvent( sal_Int16 _nEventId, const css::uno::Any& _aOldValue, const css::uno::Any& _aNewValue ); - - inline bool IsSelected() const { return m_bSelected; } - void SetSelected( bool _bSelected ); - void SetVisible( bool _bVisible ); - - // XInterface - virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) throw(css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL acquire( ) throw() override; - virtual void SAL_CALL release( ) throw() override; - - // XTypeProvider - virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (css::uno::RuntimeException, std::exception) override; - - // XServiceInfo - virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) override; - - // XAccessible - virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( ) throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleContext - virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getAccessibleIndexInParent( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int16 SAL_CALL getAccessibleRole( ) throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getAccessibleDescription( ) throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getAccessibleName( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::lang::Locale SAL_CALL getLocale( ) throw (css::accessibility::IllegalAccessibleComponentStateException, css::uno::RuntimeException, std::exception) override; - - // XAccessibleComponent - virtual sal_Bool SAL_CALL containsPoint( const css::awt::Point& aPoint ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const css::awt::Point& aPoint ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::awt::Rectangle SAL_CALL getBounds( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::awt::Point SAL_CALL getLocation( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::awt::Point SAL_CALL getLocationOnScreen( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::awt::Size SAL_CALL getSize( ) throw (css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL grabFocus( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getForeground() throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getBackground() throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleText - virtual sal_Int32 SAL_CALL getCaretPosition() throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual sal_Unicode SAL_CALL getCharacter( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getCharacterAttributes( sal_Int32 nIndex, const css::uno::Sequence< OUString >& aRequestedAttributes ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual css::awt::Rectangle SAL_CALL getCharacterBounds( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getCharacterCount() throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getIndexAtPoint( const css::awt::Point& aPoint ) throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getSelectedText() throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getSelectionStart() throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getSelectionEnd() throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getText() throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual css::accessibility::TextSegment SAL_CALL getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (css::lang::IndexOutOfBoundsException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override; - virtual css::accessibility::TextSegment SAL_CALL getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (css::lang::IndexOutOfBoundsException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override; - virtual css::accessibility::TextSegment SAL_CALL getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (css::lang::IndexOutOfBoundsException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - - // XAccessibleEventBroadcaster - virtual void SAL_CALL addAccessibleEventListener( const css::uno::Reference< css::accessibility::XAccessibleEventListener >& xListener ) throw (css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL removeAccessibleEventListener( const css::uno::Reference< css::accessibility::XAccessibleEventListener >& xListener ) throw (css::uno::RuntimeException, std::exception) override; -}; - -#endif // ACCESSIBILITY_STANDARD_ACCESSIBLELISTBOXENTRY_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/standard/vclxaccessiblemenu.hxx b/accessibility/inc/accessibility/standard/vclxaccessiblemenu.hxx deleted file mode 100644 index 58484dba443e..000000000000 --- a/accessibility/inc/accessibility/standard/vclxaccessiblemenu.hxx +++ /dev/null @@ -1,79 +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_ACCESSIBILITY_STANDARD_VCLXACCESSIBLEMENU_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLEMENU_HXX - -#include -#include - -#include - - -// class VCLXAccessibleMenu - - -typedef ::cppu::ImplHelper1 < - css::accessibility::XAccessibleSelection > VCLXAccessibleMenu_BASE; - -class VCLXAccessibleMenu : public VCLXAccessibleMenuItem, - public VCLXAccessibleMenu_BASE -{ -protected: - virtual bool IsFocused() override; - virtual bool IsPopupMenuOpen() override; - -public: - VCLXAccessibleMenu( Menu* pParent, sal_uInt16 nItemPos, Menu* pMenu ); - virtual ~VCLXAccessibleMenu(); - - // XInterface - DECLARE_XINTERFACE() - - // XTypeProvider - DECLARE_XTYPEPROVIDER() - - // XServiceInfo - virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleContext - virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual sal_Int16 SAL_CALL getAccessibleRole( ) throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleComponent - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const css::awt::Point& aPoint ) throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleSelection - virtual void SAL_CALL selectAccessibleChild( sal_Int32 nChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL isAccessibleChildSelected( sal_Int32 nChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL clearAccessibleSelection( ) throw (css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL selectAllAccessibleChildren( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getSelectedAccessibleChildCount( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL deselectAccessibleChild( sal_Int32 nChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - - // XAccessibleAction - virtual ::rtl::OUString SAL_CALL getAccessibleActionDescription ( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; -}; - -#endif // INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLEMENU_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/standard/vclxaccessiblemenubar.hxx b/accessibility/inc/accessibility/standard/vclxaccessiblemenubar.hxx deleted file mode 100644 index 261256a0e938..000000000000 --- a/accessibility/inc/accessibility/standard/vclxaccessiblemenubar.hxx +++ /dev/null @@ -1,66 +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_ACCESSIBILITY_STANDARD_VCLXACCESSIBLEMENUBAR_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLEMENUBAR_HXX - -#include -#include - -class VclSimpleEvent; -class VclWindowEvent; -namespace vcl { class Window; } - - -// class VCLXAccessibleMenuBar - - -class VCLXAccessibleMenuBar : public OAccessibleMenuComponent -{ -protected: - VclPtr m_pWindow; - - virtual bool IsFocused() override; - - DECL_LINK_TYPED( WindowEventListener, VclWindowEvent&, void ); - - void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ); - - // XComponent - virtual void SAL_CALL disposing() override; - -public: - VCLXAccessibleMenuBar( Menu* pMenu ); - virtual ~VCLXAccessibleMenuBar(); - - // XServiceInfo - virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleContext - virtual sal_Int32 SAL_CALL getAccessibleIndexInParent( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int16 SAL_CALL getAccessibleRole( ) throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleExtendedComponent - virtual sal_Int32 SAL_CALL getBackground( ) throw (css::uno::RuntimeException, std::exception) override; -}; - -#endif // INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLEMENUBAR_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/standard/vclxaccessiblemenuitem.hxx b/accessibility/inc/accessibility/standard/vclxaccessiblemenuitem.hxx deleted file mode 100644 index 19d39f53202f..000000000000 --- a/accessibility/inc/accessibility/standard/vclxaccessiblemenuitem.hxx +++ /dev/null @@ -1,109 +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_ACCESSIBILITY_STANDARD_VCLXACCESSIBLEMENUITEM_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLEMENUITEM_HXX - -#include - -#include -#include - -#include -#include - - -// class VCLXAccessibleMenuItem - - -typedef ::cppu::ImplHelper3< - css::accessibility::XAccessibleText, - css::accessibility::XAccessibleAction, - css::accessibility::XAccessibleValue > VCLXAccessibleMenuItem_BASE; - -class VCLXAccessibleMenuItem : public OAccessibleMenuItemComponent, - public ::comphelper::OCommonAccessibleText, - public VCLXAccessibleMenuItem_BASE -{ -protected: - virtual bool IsFocused() override; - virtual bool IsSelected() override; - virtual bool IsChecked() override; - - virtual bool IsHighlighted() override; - - virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ) override; - - // OCommonAccessibleText - virtual OUString implGetText() override; - virtual css::lang::Locale implGetLocale() override; - virtual void implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ) override; - -public: - VCLXAccessibleMenuItem( Menu* pParent, sal_uInt16 nItemPos, Menu* pMenu = nullptr ); - virtual ~VCLXAccessibleMenuItem(); - - // XInterface - DECLARE_XINTERFACE() - - // XTypeProvider - DECLARE_XTYPEPROVIDER() - - // XServiceInfo - virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleContext - virtual sal_Int16 SAL_CALL getAccessibleRole( ) throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleText - virtual sal_Int32 SAL_CALL getCaretPosition() throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual sal_Unicode SAL_CALL getCharacter( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getCharacterAttributes( sal_Int32 nIndex, const css::uno::Sequence< OUString >& aRequestedAttributes ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual css::awt::Rectangle SAL_CALL getCharacterBounds( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getCharacterCount() throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getIndexAtPoint( const css::awt::Point& aPoint ) throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getSelectedText() throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getSelectionStart() throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getSelectionEnd() throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getText() throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual css::accessibility::TextSegment SAL_CALL getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (css::lang::IndexOutOfBoundsException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override; - virtual css::accessibility::TextSegment SAL_CALL getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (css::lang::IndexOutOfBoundsException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override; - virtual css::accessibility::TextSegment SAL_CALL getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (css::lang::IndexOutOfBoundsException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - - // XAccessibleAction - virtual sal_Int32 SAL_CALL getAccessibleActionCount( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL doAccessibleAction ( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getAccessibleActionDescription ( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessibleKeyBinding > SAL_CALL getAccessibleActionKeyBinding( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - - // XAccessibleValue - virtual css::uno::Any SAL_CALL getCurrentValue( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL setCurrentValue( const css::uno::Any& aNumber ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Any SAL_CALL getMaximumValue( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Any SAL_CALL getMinimumValue( ) throw (css::uno::RuntimeException, std::exception) override; -}; - -#endif // INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLEMENUITEM_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/standard/vclxaccessiblemenuseparator.hxx b/accessibility/inc/accessibility/standard/vclxaccessiblemenuseparator.hxx deleted file mode 100644 index 4e3250b06f7b..000000000000 --- a/accessibility/inc/accessibility/standard/vclxaccessiblemenuseparator.hxx +++ /dev/null @@ -1,46 +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_ACCESSIBILITY_STANDARD_VCLXACCESSIBLEMENUSEPARATOR_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLEMENUSEPARATOR_HXX - -#include - - -// class VCLXAccessibleMenuSeparator - - -class VCLXAccessibleMenuSeparator : public OAccessibleMenuItemComponent -{ -public: - VCLXAccessibleMenuSeparator( Menu* pParent, sal_uInt16 nItemPos, Menu* pMenu = nullptr ); - virtual ~VCLXAccessibleMenuSeparator(); - - // XServiceInfo - virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleContext - virtual sal_Int16 SAL_CALL getAccessibleRole( ) throw (css::uno::RuntimeException, std::exception) override; -}; - - -#endif // INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLEMENUSEPARATOR_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/standard/vclxaccessiblepopupmenu.hxx b/accessibility/inc/accessibility/standard/vclxaccessiblepopupmenu.hxx deleted file mode 100644 index d91ed83b2be5..000000000000 --- a/accessibility/inc/accessibility/standard/vclxaccessiblepopupmenu.hxx +++ /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 . - */ - -#ifndef INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLEPOPUPMENU_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLEPOPUPMENU_HXX - -#include - - -// class VCLXAccessiblePopupMenu - - -class VCLXAccessiblePopupMenu : public OAccessibleMenuComponent -{ -protected: - virtual bool IsFocused() override; - -public: - VCLXAccessiblePopupMenu( Menu* pMenu ); - virtual ~VCLXAccessiblePopupMenu(); - - // XServiceInfo - virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleContext - virtual sal_Int32 SAL_CALL getAccessibleIndexInParent( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int16 SAL_CALL getAccessibleRole( ) throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleExtendedComponent - virtual sal_Int32 SAL_CALL getBackground( ) throw (css::uno::RuntimeException, std::exception) override; -}; - -#endif // INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLEPOPUPMENU_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/standard/vclxaccessibleradiobutton.hxx b/accessibility/inc/accessibility/standard/vclxaccessibleradiobutton.hxx deleted file mode 100644 index ed0ac66abdca..000000000000 --- a/accessibility/inc/accessibility/standard/vclxaccessibleradiobutton.hxx +++ /dev/null @@ -1,76 +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_ACCESSIBILITY_STANDARD_VCLXACCESSIBLERADIOBUTTON_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLERADIOBUTTON_HXX - -#include - -#include -#include - -#include - - -// class VCLXAccessibleRadioButton - - -typedef ::cppu::ImplHelper2< - css::accessibility::XAccessibleAction, - css::accessibility::XAccessibleValue > VCLXAccessibleRadioButton_BASE; - -class VCLXAccessibleRadioButton : public VCLXAccessibleTextComponent, - public VCLXAccessibleRadioButton_BASE -{ -protected: - virtual ~VCLXAccessibleRadioButton(); - - virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) override; - virtual void FillAccessibleRelationSet( utl::AccessibleRelationSetHelper& rRelationSet ) override; - virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ) override; - -public: - VCLXAccessibleRadioButton( VCLXWindow* pVCLXindow ); - - // XInterface - DECLARE_XINTERFACE() - - // XTypeProvider - DECLARE_XTYPEPROVIDER() - - // XServiceInfo - virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleAction - virtual sal_Int32 SAL_CALL getAccessibleActionCount( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL doAccessibleAction ( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getAccessibleActionDescription ( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessibleKeyBinding > SAL_CALL getAccessibleActionKeyBinding( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - - // XAccessibleValue - virtual css::uno::Any SAL_CALL getCurrentValue( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL setCurrentValue( const css::uno::Any& aNumber ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Any SAL_CALL getMaximumValue( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Any SAL_CALL getMinimumValue( ) throw (css::uno::RuntimeException, std::exception) override; -}; - -#endif // INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLERADIOBUTTON_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/standard/vclxaccessiblescrollbar.hxx b/accessibility/inc/accessibility/standard/vclxaccessiblescrollbar.hxx deleted file mode 100644 index 6b8617f75ebf..000000000000 --- a/accessibility/inc/accessibility/standard/vclxaccessiblescrollbar.hxx +++ /dev/null @@ -1,79 +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_ACCESSIBILITY_STANDARD_VCLXACCESSIBLESCROLLBAR_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLESCROLLBAR_HXX - -#include - -#include -#include - -#include - - -// class VCLXAccessibleScrollBar - - -typedef ::cppu::ImplHelper2< - css::accessibility::XAccessibleAction, - css::accessibility::XAccessibleValue > VCLXAccessibleScrollBar_BASE; - -class VCLXAccessibleScrollBar : public VCLXAccessibleComponent, - public VCLXAccessibleScrollBar_BASE -{ -protected: - virtual ~VCLXAccessibleScrollBar(); - - virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) override; - virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ) override; - -public: - VCLXAccessibleScrollBar( VCLXWindow* pVCLXindow ); - - // XInterface - DECLARE_XINTERFACE() - - // XTypeProvider - DECLARE_XTYPEPROVIDER() - - // XServiceInfo - virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleAction - virtual sal_Int32 SAL_CALL getAccessibleActionCount( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL doAccessibleAction ( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getAccessibleActionDescription ( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessibleKeyBinding > SAL_CALL getAccessibleActionKeyBinding( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - - // XAccessibleValue - virtual css::uno::Any SAL_CALL getCurrentValue( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL setCurrentValue( const css::uno::Any& aNumber ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Any SAL_CALL getMaximumValue( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Any SAL_CALL getMinimumValue( ) throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleContext - ::rtl::OUString SAL_CALL getAccessibleName( ) throw (css::uno::RuntimeException, std::exception) override; - -}; - -#endif // INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLESCROLLBAR_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/standard/vclxaccessiblestatusbar.hxx b/accessibility/inc/accessibility/standard/vclxaccessiblestatusbar.hxx deleted file mode 100644 index 65c9e106366e..000000000000 --- a/accessibility/inc/accessibility/standard/vclxaccessiblestatusbar.hxx +++ /dev/null @@ -1,74 +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_ACCESSIBILITY_STANDARD_VCLXACCESSIBLESTATUSBAR_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLESTATUSBAR_HXX - -#include -#include - -#include - -class StatusBar; - - -// class VCLXAccessibleStatusBar - - -class VCLXAccessibleStatusBar : public VCLXAccessibleComponent -{ -private: - typedef ::std::vector< css::uno::Reference< css::accessibility::XAccessible > > AccessibleChildren; - - AccessibleChildren m_aAccessibleChildren; - VclPtr m_pStatusBar; - -protected: - void UpdateShowing( sal_Int32 i, bool bShowing ); - void UpdateItemName( sal_Int32 i ); - void UpdateItemText( sal_Int32 i ); - - void InsertChild( sal_Int32 i ); - void RemoveChild( sal_Int32 i ); - - virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) override; - - // XComponent - virtual void SAL_CALL disposing() override; - -public: - VCLXAccessibleStatusBar( VCLXWindow* pVCLXWindow ); - virtual ~VCLXAccessibleStatusBar(); - - // XServiceInfo - virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleContext - virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - - // XAccessibleComponent - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const css::awt::Point& aPoint ) throw (css::uno::RuntimeException, std::exception) override; -}; - - -#endif // INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLESTATUSBAR_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/standard/vclxaccessiblestatusbaritem.hxx b/accessibility/inc/accessibility/standard/vclxaccessiblestatusbaritem.hxx deleted file mode 100644 index 6e4b56f6e6e2..000000000000 --- a/accessibility/inc/accessibility/standard/vclxaccessiblestatusbaritem.hxx +++ /dev/null @@ -1,134 +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_ACCESSIBILITY_STANDARD_VCLXACCESSIBLESTATUSBARITEM_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLESTATUSBARITEM_HXX - -#include -#include -#include -#include -#include - -class StatusBar; -class VCLExternalSolarLock; - -namespace utl { -class AccessibleStateSetHelper; -} - - -// class VCLXAccessibleStatusBarItem - - -typedef ::comphelper::OAccessibleTextHelper AccessibleTextHelper_BASE; - -typedef ::cppu::ImplHelper2< - css::accessibility::XAccessible, - css::lang::XServiceInfo > VCLXAccessibleStatusBarItem_BASE; - -class VCLXAccessibleStatusBarItem : public AccessibleTextHelper_BASE, - public VCLXAccessibleStatusBarItem_BASE -{ - friend class VCLXAccessibleStatusBar; - -private: - VCLExternalSolarLock* m_pExternalLock; - VclPtr m_pStatusBar; - sal_uInt16 m_nItemId; - OUString m_sItemName; - OUString m_sItemText; - bool m_bShowing; - -protected: - bool IsShowing(); - void SetShowing( bool bShowing ); - void SetItemName( const OUString& sItemName ); - OUString GetItemName(); - void SetItemText( const OUString& sItemText ); - OUString GetItemText(); - sal_uInt16 GetItemId() const { return m_nItemId; } - - void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ); - - // OCommonAccessibleComponent - virtual css::awt::Rectangle implGetBounds( ) throw (css::uno::RuntimeException) override; - - // OCommonAccessibleText - virtual OUString implGetText() override; - virtual css::lang::Locale implGetLocale() override; - virtual void implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ) override; - - // XComponent - virtual void SAL_CALL disposing() override; - -public: - VCLXAccessibleStatusBarItem( StatusBar* pStatusBar, sal_uInt16 nItemId ); - virtual ~VCLXAccessibleStatusBarItem(); - - // XInterface - DECLARE_XINTERFACE() - - // XTypeProvider - DECLARE_XTYPEPROVIDER() - - // XServiceInfo - virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) override; - - // XAccessible - virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( ) throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleContext - virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getAccessibleIndexInParent( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int16 SAL_CALL getAccessibleRole( ) throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getAccessibleDescription( ) throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getAccessibleName( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::lang::Locale SAL_CALL getLocale( ) throw (css::accessibility::IllegalAccessibleComponentStateException, css::uno::RuntimeException, std::exception) override; - - // XAccessibleComponent - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const css::awt::Point& aPoint ) throw (css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL grabFocus( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getForeground( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getBackground( ) throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleExtendedComponent - virtual css::uno::Reference< css::awt::XFont > SAL_CALL getFont( ) throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getTitledBorderText( ) throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getToolTipText( ) throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleText - virtual sal_Int32 SAL_CALL getCaretPosition() throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getCharacterAttributes( sal_Int32 nIndex, const css::uno::Sequence< OUString >& aRequestedAttributes ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual css::awt::Rectangle SAL_CALL getCharacterBounds( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getIndexAtPoint( const css::awt::Point& aPoint ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; -}; - -#endif // INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLESTATUSBARITEM_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/standard/vclxaccessibletabcontrol.hxx b/accessibility/inc/accessibility/standard/vclxaccessibletabcontrol.hxx deleted file mode 100644 index bfcbab4a8cd1..000000000000 --- a/accessibility/inc/accessibility/standard/vclxaccessibletabcontrol.hxx +++ /dev/null @@ -1,96 +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_ACCESSIBILITY_STANDARD_VCLXACCESSIBLETABCONTROL_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLETABCONTROL_HXX - -#include -#include -#include - -#include - -class TabControl; - - -// class VCLXAccessibleTabControl - - -typedef ::cppu::ImplHelper1 < - css::accessibility::XAccessibleSelection > VCLXAccessibleTabControl_BASE; - -class VCLXAccessibleTabControl : public VCLXAccessibleComponent, - public VCLXAccessibleTabControl_BASE -{ -private: - typedef ::std::vector< css::uno::Reference< css::accessibility::XAccessible > > AccessibleChildren; - - AccessibleChildren m_aAccessibleChildren; - VclPtr m_pTabControl; - -protected: - void UpdateFocused(); - void UpdateSelected( sal_Int32 i, bool bSelected ); - void UpdatePageText( sal_Int32 i ); - void UpdateTabPage( sal_Int32 i, bool bNew ); - - void InsertChild( sal_Int32 i ); - void RemoveChild( sal_Int32 i ); - - virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) override; - virtual void ProcessWindowChildEvent( const VclWindowEvent& rVclWindowEvent ) override; - virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ) override; - - // XComponent - virtual void SAL_CALL disposing() override; - -public: - VCLXAccessibleTabControl( VCLXWindow* pVCLXWindow ); - virtual ~VCLXAccessibleTabControl(); - - // XInterface - DECLARE_XINTERFACE() - - // XTypeProvider - DECLARE_XTYPEPROVIDER() - - // XServiceInfo - virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleContext - virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual sal_Int16 SAL_CALL getAccessibleRole( ) throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getAccessibleName( ) throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleSelection - virtual void SAL_CALL selectAccessibleChild( sal_Int32 nChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL isAccessibleChildSelected( sal_Int32 nChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL clearAccessibleSelection( ) throw (css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL selectAllAccessibleChildren( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getSelectedAccessibleChildCount( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL deselectAccessibleChild( sal_Int32 nChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; -}; - - -#endif // INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLETABCONTROL_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/standard/vclxaccessibletabpage.hxx b/accessibility/inc/accessibility/standard/vclxaccessibletabpage.hxx deleted file mode 100644 index 4749e6dd9a5d..000000000000 --- a/accessibility/inc/accessibility/standard/vclxaccessibletabpage.hxx +++ /dev/null @@ -1,139 +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_ACCESSIBILITY_STANDARD_VCLXACCESSIBLETABPAGE_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLETABPAGE_HXX - -#include -#include -#include -#include -#include - - -class TabControl; -class VCLExternalSolarLock; - -namespace utl { -class AccessibleStateSetHelper; -} - - -// class VCLXAccessibleTabPage - - -typedef ::comphelper::OAccessibleTextHelper AccessibleTextHelper_BASE; - -typedef ::cppu::ImplHelper2< - css::accessibility::XAccessible, - css::lang::XServiceInfo > VCLXAccessibleTabPage_BASE; - -class VCLXAccessibleTabPage : public AccessibleTextHelper_BASE, - public VCLXAccessibleTabPage_BASE -{ - friend class VCLXAccessibleTabControl; - -private: - VCLExternalSolarLock* m_pExternalLock; - VclPtr m_pTabControl; - sal_uInt16 m_nPageId; - bool m_bFocused; - bool m_bSelected; - OUString m_sPageText; - -protected: - bool IsFocused(); - bool IsSelected(); - - void SetFocused( bool bFocused ); - void SetSelected( bool bSelected ); - void SetPageText( const OUString& sPageText ); - OUString GetPageText(); - - void Update( bool bNew ); - - sal_uInt16 GetPageId() const { return m_nPageId; } - - void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ); - - // OCommonAccessibleComponent - virtual css::awt::Rectangle implGetBounds( ) throw (css::uno::RuntimeException) override; - - // OCommonAccessibleText - virtual OUString implGetText() override; - virtual css::lang::Locale implGetLocale() override; - virtual void implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ) override; - - // XComponent - virtual void SAL_CALL disposing() override; - -public: - VCLXAccessibleTabPage( TabControl* pTabControl, sal_uInt16 nPageId ); - virtual ~VCLXAccessibleTabPage(); - - // XInterface - DECLARE_XINTERFACE() - - // XTypeProvider - DECLARE_XTYPEPROVIDER() - - // XServiceInfo - virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) override; - - // XAccessible - virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( ) throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleContext - virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getAccessibleIndexInParent( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int16 SAL_CALL getAccessibleRole( ) throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getAccessibleDescription( ) throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getAccessibleName( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::lang::Locale SAL_CALL getLocale( ) throw (css::accessibility::IllegalAccessibleComponentStateException, css::uno::RuntimeException, std::exception) override; - - // XAccessibleComponent - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const css::awt::Point& aPoint ) throw (css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL grabFocus( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getForeground( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getBackground( ) throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleExtendedComponent - virtual css::uno::Reference< css::awt::XFont > SAL_CALL getFont( ) throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getTitledBorderText( ) throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getToolTipText( ) throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleText - virtual sal_Int32 SAL_CALL getCaretPosition() throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getCharacterAttributes( sal_Int32 nIndex, const css::uno::Sequence< OUString >& aRequestedAttributes ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual css::awt::Rectangle SAL_CALL getCharacterBounds( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getIndexAtPoint( const css::awt::Point& aPoint ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; -}; - -#endif // INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLETABPAGE_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/standard/vclxaccessibletabpagewindow.hxx b/accessibility/inc/accessibility/standard/vclxaccessibletabpagewindow.hxx deleted file mode 100644 index 391b14d3a6ab..000000000000 --- a/accessibility/inc/accessibility/standard/vclxaccessibletabpagewindow.hxx +++ /dev/null @@ -1,60 +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_ACCESSIBILITY_STANDARD_VCLXACCESSIBLETABPAGEWINDOW_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLETABPAGEWINDOW_HXX - -#include -#include - - -class TabControl; -class TabPage; - - -// class VCLXAccessibleTabPageWindow - - -class VCLXAccessibleTabPageWindow : public VCLXAccessibleComponent -{ -private: - VclPtr m_pTabControl; - VclPtr m_pTabPage; - sal_uInt16 m_nPageId; - -protected: - // OCommonAccessibleComponent - virtual css::awt::Rectangle implGetBounds( ) throw (css::uno::RuntimeException) override; - - // XComponent - virtual void SAL_CALL disposing() override; - -public: - VCLXAccessibleTabPageWindow( VCLXWindow* pVCLXWindow ); - virtual ~VCLXAccessibleTabPageWindow(); - - // XAccessibleContext - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getAccessibleIndexInParent( ) throw (css::uno::RuntimeException, std::exception) override; -}; - - -#endif // INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLETABPAGEWINDOW_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/standard/vclxaccessibletextcomponent.hxx b/accessibility/inc/accessibility/standard/vclxaccessibletextcomponent.hxx deleted file mode 100644 index 10390f508616..000000000000 --- a/accessibility/inc/accessibility/standard/vclxaccessibletextcomponent.hxx +++ /dev/null @@ -1,85 +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_ACCESSIBILITY_STANDARD_VCLXACCESSIBLETEXTCOMPONENT_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLETEXTCOMPONENT_HXX - -#include -#include - - -// class VCLXAccessibleTextComponent - - -typedef ::cppu::ImplHelper1 < - css::accessibility::XAccessibleText > VCLXAccessibleTextComponent_BASE; - -class VCLXAccessibleTextComponent : public VCLXAccessibleComponent, - public ::comphelper::OCommonAccessibleText, - public VCLXAccessibleTextComponent_BASE -{ -protected: - OUString m_sText; - - void SetText( const OUString& sText ); - - virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) override; - - // OCommonAccessibleText - virtual OUString implGetText() override; - virtual css::lang::Locale implGetLocale() override; - virtual void implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ) override; - - // XComponent - virtual void SAL_CALL disposing() override; - -public: - VCLXAccessibleTextComponent( VCLXWindow* pVCLXWindow ); - virtual ~VCLXAccessibleTextComponent(); - - // XInterface - DECLARE_XINTERFACE() - - // XTypeProvider - DECLARE_XTYPEPROVIDER() - - // XAccessibleText - virtual sal_Int32 SAL_CALL getCaretPosition() throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual sal_Unicode SAL_CALL getCharacter( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getCharacterAttributes( sal_Int32 nIndex, const css::uno::Sequence< OUString >& aRequestedAttributes ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual css::awt::Rectangle SAL_CALL getCharacterBounds( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getCharacterCount() throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getIndexAtPoint( const css::awt::Point& aPoint ) throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getSelectedText() throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getSelectionStart() throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getSelectionEnd() throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getText() throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual css::accessibility::TextSegment SAL_CALL getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (css::lang::IndexOutOfBoundsException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override; - virtual css::accessibility::TextSegment SAL_CALL getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (css::lang::IndexOutOfBoundsException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override; - virtual css::accessibility::TextSegment SAL_CALL getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (css::lang::IndexOutOfBoundsException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; -}; - - -#endif // INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLETEXTCOMPONENT_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/standard/vclxaccessibletextfield.hxx b/accessibility/inc/accessibility/standard/vclxaccessibletextfield.hxx deleted file mode 100644 index 58ec93b94392..000000000000 --- a/accessibility/inc/accessibility/standard/vclxaccessibletextfield.hxx +++ /dev/null @@ -1,92 +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_ACCESSIBILITY_STANDARD_VCLXACCESSIBLETEXTFIELD_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLETEXTFIELD_HXX - -#include - -#include - -typedef ::cppu::ImplHelper1< css::accessibility::XAccessible > VCLXAccessible_BASE; - - -/** This class represents non editable text fields. The object passed to - the constructor is expected to be a list (a ListBox to be - more specific). From this always the selected item is token to be made - accessible by this class. When the selected item changes then also the - exported text changes. -*/ -class VCLXAccessibleTextField : - public VCLXAccessibleTextComponent, - public VCLXAccessible_BASE -{ -public: - VCLXAccessibleTextField (VCLXWindow* pVCLXindow, - const css::uno::Reference< css::accessibility::XAccessible >& _xParent); - - // XInterface - DECLARE_XINTERFACE() - - // XTypeProvider - DECLARE_XTYPEPROVIDER() - - // XAccessible - css::uno::Reference< css::accessibility::XAccessibleContext> SAL_CALL - getAccessibleContext() - throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleContext - sal_Int32 SAL_CALL getAccessibleChildCount() - throw (css::uno::RuntimeException, std::exception) override; - css::uno::Reference< css::accessibility::XAccessible> SAL_CALL - getAccessibleChild (sal_Int32 i) - throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - sal_Int16 SAL_CALL getAccessibleRole() - throw (css::uno::RuntimeException, std::exception) override; - css::uno::Reference< css::accessibility::XAccessible > SAL_CALL - getAccessibleParent( ) - throw (css::uno::RuntimeException, std::exception) override; - - // XServiceInfo - virtual OUString SAL_CALL getImplementationName() - throw (css::uno::RuntimeException, std::exception) override; - // Return text field specific services. - virtual css::uno::Sequence< OUString > SAL_CALL - getSupportedServiceNames() - throw (css::uno::RuntimeException, std::exception) override; - -protected: - virtual ~VCLXAccessibleTextField(); - - /** With this method the text of the currently selected item is made - available to the VCLXAccessibleTextComponent base class. - */ - OUString implGetText() override; - -private: - /** We need to save the accessible parent to return it in getAccessibleParent(), - because this method of the base class returns the wrong parent. - */ - css::uno::Reference< css::accessibility::XAccessible > m_xParent; -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/standard/vclxaccessibletoolbox.hxx b/accessibility/inc/accessibility/standard/vclxaccessibletoolbox.hxx deleted file mode 100644 index c5a5b4dbd821..000000000000 --- a/accessibility/inc/accessibility/standard/vclxaccessibletoolbox.hxx +++ /dev/null @@ -1,105 +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_ACCESSIBILITY_STANDARD_VCLXACCESSIBLETOOLBOX_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLETOOLBOX_HXX - -#include -#include -#include - - -// class VCLXAccessibleToolBox - - -typedef ::cppu::ImplHelper1 < css::accessibility::XAccessibleSelection > VCLXAccessibleToolBox_BASE; - -typedef std::map< sal_Int32, css::uno::Reference< css::accessibility::XAccessible > > ToolBoxItemsMap; - -class VCLXAccessibleToolBoxItem; -class ToolBox; - -class VCLXAccessibleToolBox : public VCLXAccessibleComponent, public VCLXAccessibleToolBox_BASE -{ -private: - ToolBoxItemsMap m_aAccessibleChildren; - - VCLXAccessibleToolBoxItem* GetItem_Impl( sal_Int32 _nPos ); - - void UpdateFocus_Impl(); - void ReleaseFocus_Impl( sal_Int32 _nPos ); - void UpdateChecked_Impl( sal_Int32 _nPos ); - void UpdateIndeterminate_Impl( sal_Int32 _nPos ); - void UpdateItem_Impl( sal_Int32 _nPos ); - void UpdateAllItems_Impl(); - void UpdateItemName_Impl( sal_Int32 _nPos ); - void UpdateItemEnabled_Impl( sal_Int32 _nPos ); - void UpdateCustomPopupItemp_Impl( vcl::Window* pWindow, bool bOpen ); - void HandleSubToolBarEvent( const VclWindowEvent& rVclWindowEvent ); - void ReleaseSubToolBox( ToolBox* _pSubToolBox ); - -protected: - virtual ~VCLXAccessibleToolBox(); - - virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ) override; - virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) override; - virtual void ProcessWindowChildEvent( const VclWindowEvent& rVclWindowEvent ) override; - - virtual css::uno::Reference< css::accessibility::XAccessible > GetChildAccessible( const VclWindowEvent& rVclWindowEvent ) override; - css::uno::Reference< css::accessibility::XAccessible > GetItemWindowAccessible( const VclWindowEvent& rVclWindowEvent ); - - // XComponent - virtual void SAL_CALL disposing() override; - -public: - VCLXAccessibleToolBox( VCLXWindow* pVCLXWindow ); - - // XInterface - DECLARE_XINTERFACE( ) - - // XTypeProvider - DECLARE_XTYPEPROVIDER( ) - - // XServiceInfo - virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleContext - virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const css::awt::Point& aPoint ) throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleSelection - virtual void SAL_CALL selectAccessibleChild( sal_Int32 nChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL isAccessibleChildSelected( sal_Int32 nChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL clearAccessibleSelection( ) throw (css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL selectAllAccessibleChildren( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getSelectedAccessibleChildCount( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL deselectAccessibleChild( sal_Int32 nChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - -private: - void implReleaseToolboxItem( - ToolBoxItemsMap::iterator& _rMapPos, - bool _bNotifyRemoval - ); -}; - -#endif // INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLETOOLBOX_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/accessibility/standard/vclxaccessibletoolboxitem.hxx b/accessibility/inc/accessibility/standard/vclxaccessibletoolboxitem.hxx deleted file mode 100644 index 714d4588495c..000000000000 --- a/accessibility/inc/accessibility/standard/vclxaccessibletoolboxitem.hxx +++ /dev/null @@ -1,154 +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_ACCESSIBILITY_STANDARD_VCLXACCESSIBLETOOLBOXITEM_HXX -#define INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLETOOLBOXITEM_HXX - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -class ToolBox; - -typedef ::comphelper::OAccessibleTextHelper AccessibleTextHelper_BASE; -typedef ::cppu::ImplHelper4 < css::accessibility::XAccessible, - css::accessibility::XAccessibleAction, - css::accessibility::XAccessibleValue, - css::lang::XServiceInfo > VCLXAccessibleToolBoxItem_BASE; - -class VCLExternalSolarLock; - -class VCLXAccessibleToolBoxItem : public AccessibleTextHelper_BASE, - public VCLXAccessibleToolBoxItem_BASE -{ -private: - OUString m_sOldName; - VclPtr m_pToolBox; - VCLExternalSolarLock* m_pExternalLock; - sal_Int32 m_nIndexInParent; - sal_Int16 m_nRole; - sal_uInt16 m_nItemId; - bool m_bHasFocus; - bool m_bIsChecked; - bool m_bIndeterminate; - - css::uno::Reference< css::accessibility::XAccessible > m_xChild; - -public: - inline sal_Int32 getIndexInParent() const { return m_nIndexInParent; } - inline void setIndexInParent( sal_Int32 _nNewIndex ) { m_nIndexInParent = _nNewIndex; } - -protected: - virtual ~VCLXAccessibleToolBoxItem(); - - virtual void SAL_CALL disposing() override; - - /// implements the calculation of the bounding rectangle - virtual css::awt::Rectangle implGetBounds( ) throw (css::uno::RuntimeException) override; - - // OCommonAccessibleText - virtual OUString implGetText() override; - virtual css::lang::Locale implGetLocale() override; - virtual void implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ) override; - - OUString GetText(); - -public: - VCLXAccessibleToolBoxItem( ToolBox* _pToolBox, sal_Int32 _nPos ); - - void SetFocus( bool _bFocus ); - inline bool HasFocus() const { return m_bHasFocus; } - void SetChecked( bool _bCheck ); - void SetIndeterminate( bool _bIndeterminate ); - inline void ReleaseToolBox() { m_pToolBox = nullptr; } - void NameChanged(); - void SetChild( const css::uno::Reference< css::accessibility::XAccessible >& _xChild ); - const css::uno::Reference< css::accessibility::XAccessible >& - GetChild() const { return m_xChild; } - void NotifyChildEvent( const css::uno::Reference< css::accessibility::XAccessible >& _xChild, bool _bShow ); - - void ToggleEnableState(); - - // XInterface - DECLARE_XINTERFACE( ) - DECLARE_XTYPEPROVIDER( ) - - // XServiceInfo - virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) override; - - // XAccessible - virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( ) throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleContext - virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getAccessibleIndexInParent( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int16 SAL_CALL getAccessibleRole( ) throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getAccessibleDescription( ) throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getAccessibleName( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet( ) throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleText - virtual sal_Int32 SAL_CALL getCaretPosition() throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getCharacterAttributes( sal_Int32 nIndex, const css::uno::Sequence< OUString >& aRequestedAttributes ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual css::awt::Rectangle SAL_CALL getCharacterBounds( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getIndexAtPoint( const css::awt::Point& aPoint ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - - // XAccessibleComponent - virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const css::awt::Point& aPoint ) throw (css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL grabFocus( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getForeground( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Int32 SAL_CALL getBackground( ) throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleExtendedComponent - virtual css::uno::Reference< css::awt::XFont > SAL_CALL getFont( ) throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getTitledBorderText( ) throw (css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getToolTipText( ) throw (css::uno::RuntimeException, std::exception) override; - - // XAccessibleAction - virtual sal_Int32 SAL_CALL getAccessibleActionCount( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL doAccessibleAction ( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getAccessibleActionDescription ( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - virtual css::uno::Reference< css::accessibility::XAccessibleKeyBinding > SAL_CALL getAccessibleActionKeyBinding( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; - - // XAccessibleValue - virtual css::uno::Any SAL_CALL getCurrentValue( ) throw (css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL setCurrentValue( const css::uno::Any& aNumber ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Any SAL_CALL getMaximumValue( ) throw (css::uno::RuntimeException, std::exception) override; - virtual css::uno::Any SAL_CALL getMinimumValue( ) throw (css::uno::RuntimeException, std::exception) override; -}; - -#endif // INCLUDED_ACCESSIBILITY_INC_ACCESSIBILITY_STANDARD_VCLXACCESSIBLETOOLBOXITEM_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/extended/AccessibleBrowseBox.hxx b/accessibility/inc/extended/AccessibleBrowseBox.hxx new file mode 100644 index 000000000000..0b1d2fe3e4d2 --- /dev/null +++ b/accessibility/inc/extended/AccessibleBrowseBox.hxx @@ -0,0 +1,289 @@ +/* -*- 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_ACCESSIBLEBROWSEBOX_HXX +#define INCLUDED_ACCESSIBILITY_INC_EXTENDED_ACCESSIBLEBROWSEBOX_HXX + +#include +#include +#include +#include +#include + +namespace accessibility { + + class AccessibleBrowseBoxImpl; + class AccessibleBrowseBoxTable; + + +/** This class represents the complete accessible BrowseBox object. */ +class AccessibleBrowseBox : public AccessibleBrowseBoxBase +{ + friend class AccessibleBrowseBoxAccess; + +protected: + AccessibleBrowseBox( + const css::uno::Reference< css::accessibility::XAccessible >& _rxParent, + const css::uno::Reference< css::accessibility::XAccessible >& _rxCreator, + ::svt::IAccessibleTableProvider& _rBrowseBox + ); + + virtual ~AccessibleBrowseBox(); + + /** sets the XAccessible which created the context + + To be called only once, and only if in the ctor NULL was passed. + */ + void setCreator( + const css::uno::Reference< css::accessibility::XAccessible >& _rxCreator + ); + + /** Cleans up members. */ + using AccessibleBrowseBoxBase::disposing; + virtual void SAL_CALL disposing() override; + +protected: + // XAccessibleContext + + /** @return The count of visible children. */ + virtual sal_Int32 SAL_CALL getAccessibleChildCount() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return The XAccessible interface of the specified child. */ + virtual css::uno::Reference< + css::accessibility::XAccessible > SAL_CALL + getAccessibleChild( sal_Int32 nChildIndex ) + throw ( css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception ) override; + + // XAccessibleComponent + + /** @return + The accessible child rendered under the given point. + */ + virtual css::uno::Reference< + css::accessibility::XAccessible > SAL_CALL + getAccessibleAtPoint( const css::awt::Point& rPoint ) + throw ( css::uno::RuntimeException, std::exception ) override; + + /** Grabs the focus to the BrowseBox. */ + virtual void SAL_CALL grabFocus() + throw ( css::uno::RuntimeException, std::exception ) override; + + // XServiceInfo + + /** @return + The name of this class. + */ + virtual OUString SAL_CALL getImplementationName() + throw ( css::uno::RuntimeException, std::exception ) override; + +public: + // helper functions + /** commitHeaderBarEvent commit the event at all listeners of the column/row header bar + @param nEventId + the event id + @param rNewValue + the new value + @param rOldValue + the old value + @param _bColumnHeaderBar + true if a column based header bar, false if a row based header bar + */ + void commitHeaderBarEvent(sal_Int16 nEventId, + const css::uno::Any& rNewValue, + const css::uno::Any& rOldValue,bool _bColumnHeaderBar = true); + + // helper functions + /** commitTableEvent commit the event at all listeners of the table + @param nEventId + the event id + @param rNewValue + the new value + @param rOldValue + the old value + */ + void commitTableEvent(sal_Int16 nEventId, + const css::uno::Any& rNewValue, + const css::uno::Any& rOldValue); + + /** returns the accessible object for the row or the column header bar + */ + inline css::uno::Reference< + css::accessibility::XAccessible > + getHeaderBar( ::svt::AccessibleBrowseBoxObjType _eObjType ) + { + return implGetHeaderBar(_eObjType); + } + + /** returns the accessible object for the table representation + */ + inline css::uno::Reference< + css::accessibility::XAccessible > + getTable( ) + { + return implGetTable(); + } + +protected: + // internal virtual methods + + /** @attention This method requires locked mutex's and a living object. + @return The bounding box (VCL rect.) relative to the parent window. */ + virtual Rectangle implGetBoundingBox() override; + /** @attention This method requires locked mutex's and a living object. + @return The bounding box (VCL rect.) in screen coordinates. */ + virtual Rectangle implGetBoundingBoxOnScreen() override; + + // internal helper methods + + /** This method creates (once) and returns the accessible data table child. + @attention This method requires locked mutex's and a living object. + @return The XAccessible interface of the data table. */ + css::uno::Reference< + css::accessibility::XAccessible > implGetTable(); + + /** This method creates (once) and returns the specified header bar. + @attention This method requires locked mutex's and a living object. + @return The XAccessible interface of the header bar. */ + css::uno::Reference< + css::accessibility::XAccessible > + implGetHeaderBar( ::svt::AccessibleBrowseBoxObjType eObjType ); + + /** This method returns one of the children that are always present: + Data table, row and column header bar or corner control. + @attention This method requires locked mutex's and a living object. + @return The XAccessible interface of the specified child. */ + css::uno::Reference< + css::accessibility::XAccessible > + implGetFixedChild( sal_Int32 nChildIndex ); + + /** This method creates and returns an accessible table. + @return An AccessibleBrowseBoxTable. */ + virtual AccessibleBrowseBoxTable* createAccessibleTable(); + +private: + // members + std::unique_ptr< AccessibleBrowseBoxImpl > m_xImpl; +}; + + +/** the XAccessible which creates/returns an AccessibleBrowseBox + + The instance holds its XAccessibleContext with a hard reference, while + the context holds this instance weak. +*/ +class AccessibleBrowseBoxAccess: + public cppu::WeakImplHelper, + public ::svt::IAccessibleBrowseBox +{ +private: + ::osl::Mutex m_aMutex; + css::uno::Reference< css::accessibility::XAccessible > + m_xParent; + ::svt::IAccessibleTableProvider& m_rBrowseBox; + + css::uno::Reference< css::accessibility::XAccessibleContext > + m_xContext; + AccessibleBrowseBox* m_pContext; + // note that this pointer is valid as long as m_xContext is valid! + +public: + AccessibleBrowseBoxAccess( + const css::uno::Reference< css::accessibility::XAccessible >& _rxParent, + ::svt::IAccessibleTableProvider& _rBrowseBox + ); + + /// checks whether the accessible context is still alive + bool isContextAlive() const; + + /// returns the AccessibleContext belonging to this Accessible + inline AccessibleBrowseBox* getContext() { return m_pContext; } + +protected: + virtual ~AccessibleBrowseBoxAccess(); + + // XAccessible + virtual css::uno::Reference< css::accessibility::XAccessibleContext > + SAL_CALL getAccessibleContext() throw ( css::uno::RuntimeException, std::exception ) override; + + // IAccessibleBrowseBox + virtual css::uno::Reference< css::accessibility::XAccessible > + getMyself() override + { + return this; + } + void dispose() override; + virtual bool isAlive() const override + { + return isContextAlive(); + } + virtual css::uno::Reference< css::accessibility::XAccessible > + getHeaderBar( ::svt::AccessibleBrowseBoxObjType _eObjType ) override + { + css::uno::Reference< css::accessibility::XAccessible > xAccessible; + AccessibleBrowseBox* pContext( getContext() ); + if ( pContext ) + xAccessible = pContext->getHeaderBar( _eObjType ); + return xAccessible; + } + virtual css::uno::Reference< css::accessibility::XAccessible > + getTable() override + { + css::uno::Reference< css::accessibility::XAccessible > xAccessible; + AccessibleBrowseBox* pContext( getContext() ); + if ( pContext ) + xAccessible = pContext->getTable(); + return xAccessible; + } + virtual void commitHeaderBarEvent( sal_Int16 nEventId, const css::uno::Any& rNewValue, + const css::uno::Any& rOldValue, bool _bColumnHeaderBar ) override + { + AccessibleBrowseBox* pContext( getContext() ); + if ( pContext ) + pContext->commitHeaderBarEvent( nEventId, rNewValue, rOldValue, _bColumnHeaderBar ); + } + virtual void commitTableEvent( sal_Int16 nEventId, + const css::uno::Any& rNewValue, const css::uno::Any& rOldValue ) override + { + AccessibleBrowseBox* pContext( getContext() ); + if ( pContext ) + pContext->commitTableEvent( nEventId, rNewValue, rOldValue ); + } + virtual void commitEvent( sal_Int16 nEventId, + const css::uno::Any& rNewValue, const css::uno::Any& rOldValue ) override + { + AccessibleBrowseBox* pContext( getContext() ); + if ( pContext ) + pContext->commitEvent( nEventId, rNewValue, rOldValue ); + } + +private: + AccessibleBrowseBoxAccess( const AccessibleBrowseBoxAccess& ) = delete; + AccessibleBrowseBoxAccess& operator=( const AccessibleBrowseBoxAccess& ) = delete; +}; + + +} // namespace accessibility + + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/extended/AccessibleBrowseBoxBase.hxx b/accessibility/inc/extended/AccessibleBrowseBoxBase.hxx new file mode 100644 index 000000000000..de94fa7b3d5a --- /dev/null +++ b/accessibility/inc/extended/AccessibleBrowseBoxBase.hxx @@ -0,0 +1,447 @@ +/* -*- 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_ACCESSIBLEBROWSEBOXBASE_HXX +#define INCLUDED_ACCESSIBILITY_INC_EXTENDED_ACCESSIBLEBROWSEBOXBASE_HXX + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +namespace vcl { class Window; } + +namespace utl { + class AccessibleStateSetHelper; +} + +namespace svt { + class IAccessibleTableProvider; +} + +namespace accessibility { + +typedef ::cppu::WeakAggComponentImplHelper5< + css::accessibility::XAccessibleContext, + css::accessibility::XAccessibleComponent, + css::accessibility::XAccessibleEventBroadcaster, + css::awt::XFocusListener, + css::lang::XServiceInfo > + AccessibleBrowseBoxImplHelper; + +/** The BrowseBox accessible objects inherit from this base class. It + implements basic functionality for various Accessibility interfaces and + the event broadcaster and contains the osl::Mutex. */ +class AccessibleBrowseBoxBase : + public ::comphelper::OBaseMutex, + public AccessibleBrowseBoxImplHelper +{ +public: + /** Constructor sets specified name and description. If the constant of a + text is BBTEXT_NONE, the derived class has to set the text via + implSetName() (in Ctor) or later via + setAccessibleName() and setAccessibleDescription() (these methods + notify the listeners about the change). + + @param rxParent XAccessible interface of the parent object. + @param rBrowseBox The BrowseBox control. + @param _xFocusWindow The window that gets all the focus events. + @param eObjType Object type */ + AccessibleBrowseBoxBase( + const css::uno::Reference< css::accessibility::XAccessible >& rxParent, + ::svt::IAccessibleTableProvider& rBrowseBox, + const css::uno::Reference< css::awt::XWindow >& _xFocusWindow, + ::svt::AccessibleBrowseBoxObjType eObjType ); + + /** Constructor sets specified name and description. + @param rxParent XAccessible interface of the parent object. + @param rBrowseBox The BrowseBox control. + @param _xFocusWindow The window that gets all the focus events. + @param eObjType Object type + @param rName The name of this object. + @param rDescription The description text of this object. */ + AccessibleBrowseBoxBase( + const css::uno::Reference< css::accessibility::XAccessible >& rxParent, + ::svt::IAccessibleTableProvider& rBrowseBox, + const css::uno::Reference< css::awt::XWindow >& _xFocusWindow, + ::svt::AccessibleBrowseBoxObjType eObjType, + const OUString& rName, + const OUString& rDescription ); + +protected: + virtual ~AccessibleBrowseBoxBase(); + + /** Commits DeFunc event to listeners and cleans up members. */ + virtual void SAL_CALL disposing() override; + +public: + // XAccessibleContext + + /** @return A reference to the parent accessible object. */ + virtual css::uno::Reference SAL_CALL getAccessibleParent() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return The index of this object among the parent's children. */ + virtual sal_Int32 SAL_CALL getAccessibleIndexInParent() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return + The description of this object. + */ + virtual OUString SAL_CALL getAccessibleDescription() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return + The name of this object. + */ + virtual OUString SAL_CALL getAccessibleName() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return + The relation set (the BrowseBox does not have one). + */ + virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return The set of current states. */ + virtual css::uno::Reference< css::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return The parent's locale. */ + virtual css::lang::Locale SAL_CALL getLocale() + throw ( css::accessibility::IllegalAccessibleComponentStateException, + css::uno::RuntimeException, std::exception ) override; + + /** @return + The role of this object. Panel, ROWHEADER, COLUMNHEADER, TABLE, TABLE_CELL are supported. + */ + virtual sal_Int16 SAL_CALL getAccessibleRole() + throw ( css::uno::RuntimeException, std::exception ) override; + + /* Derived classes have to implement: + - getAccessibleChildCount, + - getAccessibleChild, + - getAccessibleRole. + Derived classes may overwrite getAccessibleIndexInParent to increase + performance. */ + + // XAccessibleComponent + + /** @return + TRUE, if the point lies within the bounding box of this object. */ + virtual sal_Bool SAL_CALL containsPoint( const css::awt::Point& rPoint ) + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return The bounding box of this object. */ + virtual css::awt::Rectangle SAL_CALL getBounds() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return + The upper left corner of the bounding box relative to the parent. */ + virtual css::awt::Point SAL_CALL getLocation() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return + The upper left corner of the bounding box in screen coordinates. */ + virtual css::awt::Point SAL_CALL getLocationOnScreen() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return The size of the bounding box. */ + virtual css::awt::Size SAL_CALL getSize() + throw ( css::uno::RuntimeException, std::exception ) override; + + virtual sal_Int32 SAL_CALL getForeground( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getBackground( ) throw (css::uno::RuntimeException, std::exception) override; + + // XFocusListener + virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) throw (css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL focusGained( const css::awt::FocusEvent& e ) throw (css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL focusLost( const css::awt::FocusEvent& e ) throw (css::uno::RuntimeException, std::exception) override; + + /* Derived classes have to implement: + - getAccessibleAt, + - grabFocus. */ + + /** @return + The accessible child rendered under the given point. + */ + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const css::awt::Point& rPoint ) + throw ( css::uno::RuntimeException, std::exception ) override; + + // XAccessibleEventBroadcaster + + /** Adds a new event listener */ + virtual void SAL_CALL addAccessibleEventListener( + const css::uno::Reference< css::accessibility::XAccessibleEventListener>& rxListener ) + throw ( css::uno::RuntimeException, std::exception ) override; + + /** Removes an event listener. */ + virtual void SAL_CALL removeAccessibleEventListener( + const css::uno::Reference< css::accessibility::XAccessibleEventListener>& rxListener ) + throw ( css::uno::RuntimeException, std::exception ) override; + + // XTypeProvider + + /** @return An unique implementation ID. */ + virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() + throw ( css::uno::RuntimeException, std::exception ) override; + + // XServiceInfo + + /** @return Whether the specified service is supported by this class. */ + virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return A list of all supported services. */ + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() + throw ( css::uno::RuntimeException, std::exception ) override; + + /* Derived classes have to implement: + - getImplementationName. */ + + // helper methods + + /** @return The BrowseBox object type. */ + inline ::svt::AccessibleBrowseBoxObjType getType() const; + + /** Changes the name of the object and notifies listeners. */ + void setAccessibleName( const OUString& rName ); + /** Changes the description of the object and notifies listeners. */ + void setAccessibleDescription( const OUString& rDescription ); + + /** Commits an event to all listeners. */ + void commitEvent( + sal_Int16 nEventId, + const css::uno::Any& rNewValue, + const css::uno::Any& rOldValue ); + /** @return TRUE, if the object is not disposed or disposing. */ + bool isAlive() const; + +protected: + // internal virtual methods + + /** Determines whether the BrowseBox control is really showing inside of + its parent accessible window. Derived classes may implement different + behaviour. + @attention This method requires locked mutex's and a living object. + @return TRUE, if the object is really showing. */ + bool implIsShowing(); + + /** Derived classes return the bounding box relative to the parent window. + @attention This method requires locked mutex's and a living object. + @return The bounding box (VCL rect.) relative to the parent window. */ + virtual Rectangle implGetBoundingBox() = 0; + /** Derived classes return the bounding box in screen coordinates. + @attention This method requires locked mutex's and a living object. + @return The bounding box (VCL rect.) in screen coordinates. */ + virtual Rectangle implGetBoundingBoxOnScreen() = 0; + + /** Creates a new AccessibleStateSetHelper and fills it with states of the + current object. This method calls FillStateSet at the BrowseBox which + fills it with more states depending on the object type. Derived classes + may overwrite this method and add more states. + @attention This method requires locked mutex's. + @return A filled AccessibleStateSetHelper. */ + virtual ::utl::AccessibleStateSetHelper* implCreateStateSetHelper(); + + // internal helper methods + + /** @throws DisposedException If the object is not alive. */ + void ensureIsAlive() const + throw ( css::lang::DisposedException ); + + /** @return The osl::Mutex member provided by the class OBaseMutex. */ + inline ::osl::Mutex& getOslMutex(); + + /** Changes the name of the object (flat assignment, no notify). + @attention This method requires a locked mutex. */ + inline void implSetName( const OUString& rName ); + + /** Locks all mutex's and calculates the bounding box relative to the + parent window. + @return The bounding box (VCL rect.) relative to the parent object. */ + Rectangle getBoundingBox() + throw ( css::lang::DisposedException ); + /** Locks all mutex's and calculates the bounding box in screen + coordinates. + @return The bounding box (VCL rect.) in screen coordinates. */ + Rectangle getBoundingBoxOnScreen() + throw ( css::lang::DisposedException ); + + ::comphelper::AccessibleEventNotifier::TClientId getClientId() const { return m_aClientId; } + void setClientId(::comphelper::AccessibleEventNotifier::TClientId _aNewClientId) { m_aClientId = _aNewClientId; } + +public: + // public versions of internal helper methods, with access control + struct AccessControl { friend class SolarMethodGuard; private: AccessControl() { } }; + + inline ::osl::Mutex& getMutex( const AccessControl& ) { return getOslMutex(); } + inline void ensureIsAlive( const AccessControl& ) { ensureIsAlive(); } + +protected: + // members + + /** The parent accessible object. */ + css::uno::Reference< css::accessibility::XAccessible > mxParent; + /** The VCL BrowseBox control. */ + ::svt::IAccessibleTableProvider* mpBrowseBox; + + /** This is the window which get all the nice focus events + */ + css::uno::Reference< css::awt::XWindow > m_xFocusWindow; + +private: + /** Localized name. */ + OUString maName; + /** Localized description text. */ + OUString maDescription; + + /** The type of this object (for names, descriptions, state sets, ...). */ + ::svt::AccessibleBrowseBoxObjType meObjType; + + ::comphelper::AccessibleEventNotifier::TClientId m_aClientId; +}; + + +// a version of AccessibleBrowseBoxBase which implements not only the XAccessibleContext, +// but also the XAccessible + +typedef ::cppu::ImplHelper1 < css::accessibility::XAccessible + > BrowseBoxAccessibleElement_Base; + +class BrowseBoxAccessibleElement + :public AccessibleBrowseBoxBase + ,public BrowseBoxAccessibleElement_Base +{ +protected: + /** Constructor sets specified name and description. If the constant of a + text is BBTEXT_NONE, the derived class has to set the text via + implSetName() (in Ctor) or later via + setAccessibleName() and setAccessibleDescription() (these methods + notify the listeners about the change). + + @param rxParent XAccessible interface of the parent object. + @param rBrowseBox The BrowseBox control. + @param _xFocusWindow The window that gets all the focus events. + @param eObjType Object type + */ + BrowseBoxAccessibleElement( + const css::uno::Reference< css::accessibility::XAccessible >& rxParent, + ::svt::IAccessibleTableProvider& rBrowseBox, + const css::uno::Reference< css::awt::XWindow >& _xFocusWindow, + ::svt::AccessibleBrowseBoxObjType eObjType ); + + /** Constructor sets specified name and description. + + @param rxParent XAccessible interface of the parent object. + @param rBrowseBox The BrowseBox control. + @param _xFocusWindow The window that gets all the focus events. + @param eObjType Object type + @param rName The name of this object. + @param rDescription The description text of this object. + */ + BrowseBoxAccessibleElement( + const css::uno::Reference< css::accessibility::XAccessible >& rxParent, + ::svt::IAccessibleTableProvider& rBrowseBox, + const css::uno::Reference< css::awt::XWindow >& _xFocusWindow, + ::svt::AccessibleBrowseBoxObjType eObjType, + const OUString& rName, + const OUString& rDescription ); + +public: + // noncopyable + BrowseBoxAccessibleElement(const BrowseBoxAccessibleElement&) = delete; + const BrowseBoxAccessibleElement& operator=(const BrowseBoxAccessibleElement&) = delete; + // XInterface + DECLARE_XINTERFACE( ) + // XTypeProvider + DECLARE_XTYPEPROVIDER( ) + +protected: + virtual ~BrowseBoxAccessibleElement(); + +protected: + // XAccessible + + /** @return The XAccessibleContext interface of this object. */ + virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext() + throw ( css::uno::RuntimeException, std::exception ) override; +}; + + +// a helper class for protecting methods which need to lock the solar mutex in addition to the own mutex + +typedef ::osl::MutexGuard OslMutexGuard; + +class SolarMethodGuard : public SolarMutexGuard, public OslMutexGuard +{ +public: + inline SolarMethodGuard( AccessibleBrowseBoxBase& _rOwner, bool _bEnsureAlive = true ) + :SolarMutexGuard( ) + ,OslMutexGuard( _rOwner.getMutex( AccessibleBrowseBoxBase::AccessControl() ) ) + { + if ( _bEnsureAlive ) + _rOwner.ensureIsAlive( AccessibleBrowseBoxBase::AccessControl() ); + } +}; + +// inlines + +inline ::svt::AccessibleBrowseBoxObjType AccessibleBrowseBoxBase::getType() const +{ + return meObjType; +} + +inline ::osl::Mutex& AccessibleBrowseBoxBase::getOslMutex() +{ + return m_aMutex; +} + +inline void AccessibleBrowseBoxBase::implSetName( + const OUString& rName ) +{ + maName = rName; +} + +} // namespace accessibility + + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/extended/AccessibleBrowseBoxCheckBoxCell.hxx b/accessibility/inc/extended/AccessibleBrowseBoxCheckBoxCell.hxx new file mode 100644 index 000000000000..2533ded30224 --- /dev/null +++ b/accessibility/inc/extended/AccessibleBrowseBoxCheckBoxCell.hxx @@ -0,0 +1,84 @@ +/* -*- 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_ACCESSIBLEBROWSEBOXCHECKBOXCELL_HXX +#define INCLUDED_ACCESSIBILITY_INC_EXTENDED_ACCESSIBLEBROWSEBOXCHECKBOXCELL_HXX + +#include +#include +#include +#include "extended/accessiblebrowseboxcell.hxx" +#include +#include + +namespace accessibility +{ + + typedef ::cppu::ImplHelper2 < css::accessibility::XAccessible, + css::accessibility::XAccessibleValue + > AccessibleCheckBoxCell_BASE; + + class AccessibleCheckBoxCell : public AccessibleBrowseBoxCell + ,public AccessibleCheckBoxCell_BASE + { + private: + TriState m_eState; + bool m_bIsTriState; + + protected: + virtual ~AccessibleCheckBoxCell() {} + + virtual ::utl::AccessibleStateSetHelper* implCreateStateSetHelper() override; + + public: + AccessibleCheckBoxCell(const css::uno::Reference< css::accessibility::XAccessible >& _rxParent, + ::svt::IAccessibleTableProvider& _rBrowseBox, + const css::uno::Reference< css::awt::XWindow >& _xFocusWindow, + sal_Int32 _nRowPos, + sal_uInt16 _nColPos, + const TriState& _eState, + bool _bIsTriState); + + // XInterface + DECLARE_XINTERFACE( ) + // XTypeProvider + DECLARE_XTYPEPROVIDER( ) + + // XAccessible + virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( ) throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleContext + virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getImplementationName() throw ( css::uno::RuntimeException, std::exception ) override; + virtual ::sal_Int32 SAL_CALL getAccessibleIndexInParent( ) throw (css::uno::RuntimeException, std::exception) override; + + + // XAccessibleValue + virtual css::uno::Any SAL_CALL getCurrentValue( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL setCurrentValue( const css::uno::Any& aNumber ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Any SAL_CALL getMaximumValue( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Any SAL_CALL getMinimumValue( ) throw (css::uno::RuntimeException, std::exception) override; + + // internal + void SetChecked( bool _bChecked ); + }; +} +#endif // INCLUDED_ACCESSIBILITY_INC_EXTENDED_ACCESSIBLEBROWSEBOXCHECKBOXCELL_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/extended/AccessibleBrowseBoxHeaderBar.hxx b/accessibility/inc/extended/AccessibleBrowseBoxHeaderBar.hxx new file mode 100644 index 000000000000..d9ea755396f8 --- /dev/null +++ b/accessibility/inc/extended/AccessibleBrowseBoxHeaderBar.hxx @@ -0,0 +1,258 @@ +/* -*- 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_ACCESSIBLEBROWSEBOXHEADERBAR_HXX +#define INCLUDED_ACCESSIBILITY_INC_EXTENDED_ACCESSIBLEBROWSEBOXHEADERBAR_HXX + +#include "extended/AccessibleBrowseBoxTableBase.hxx" +#include +#include + + +namespace accessibility { + + +typedef ::cppu::ImplHelper1< css::accessibility::XAccessibleSelection > + AccessibleBrowseBoxHeaderBarImplHelper; + +/** This class represents the accessible object of a header bar of a BrowseBox + control (row or column header bar). This object supports the + XAccessibleSelection interface. Selecting a child of this object selects + complete rows or columns of the data table. */ +class AccessibleBrowseBoxHeaderBar : + public AccessibleBrowseBoxTableBase, + public AccessibleBrowseBoxHeaderBarImplHelper +{ +public: + /** @param rxParent Parent that holds the browsebox headerbar control + @param rBrowseBox The BrowseBox control. + @param eObjType One of the two allowed types BBTYPE_ROWHEADERBAR or + BBTYPE_COLUMNHEADERBAR. */ + AccessibleBrowseBoxHeaderBar( + const css::uno::Reference< css::accessibility::XAccessible >& rxParent, + ::svt::IAccessibleTableProvider& rBrowseBox, + ::svt::AccessibleBrowseBoxObjType eObjType ); + +protected: + virtual ~AccessibleBrowseBoxHeaderBar(); + +public: + // XAccessibleContext + + /** @return + The XAccessible interface of the specified child. + */ + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL + getAccessibleChild( sal_Int32 nChildIndex ) + throw ( css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception ) override; + + /** @return The index of this object among the parent's children. */ + virtual sal_Int32 SAL_CALL + getAccessibleIndexInParent() + throw ( css::uno::RuntimeException, std::exception ) override; + + // XAccessibleComponent + + /** @return The accessible child rendered under the given point. */ + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL + getAccessibleAtPoint( const css::awt::Point& rPoint ) + throw ( css::uno::RuntimeException, std::exception ) override; + + /** Grabs the focus to (the current cell of) the data table. */ + virtual void SAL_CALL grabFocus() + throw ( css::uno::RuntimeException, std::exception ) override; + + // XAccessibleTable + + /** @return The description text of the specified row. */ + virtual OUString SAL_CALL + getAccessibleRowDescription( sal_Int32 nRow ) + throw ( css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception ) override; + + /** @return The description text of the specified column. */ + virtual OUString SAL_CALL getAccessibleColumnDescription( sal_Int32 nColumn ) + throw ( css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception ) override; + + /** @return The XAccessibleTable interface of the row header bar. */ + virtual css::uno::Reference< css::accessibility::XAccessibleTable > SAL_CALL + getAccessibleRowHeaders() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return The XAccessibleTable interface of the column header bar. */ + virtual css::uno::Reference< css::accessibility::XAccessibleTable > SAL_CALL + getAccessibleColumnHeaders() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return An index list of completely selected rows. */ + virtual css::uno::Sequence< sal_Int32 > SAL_CALL + getSelectedAccessibleRows() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return An index list of completely selected columns. */ + virtual css::uno::Sequence< sal_Int32 > SAL_CALL + getSelectedAccessibleColumns() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return TRUE, if the specified row is completely selected. */ + virtual sal_Bool SAL_CALL isAccessibleRowSelected( sal_Int32 nRow ) + throw ( css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception ) override; + + /** @return TRUE, if the specified column is completely selected. */ + virtual sal_Bool SAL_CALL isAccessibleColumnSelected( sal_Int32 nColumn ) + throw ( css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception ) override; + + /** @return The XAccessible interface of the cell object at the specified + cell position. */ + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL + getAccessibleCellAt( sal_Int32 nRow, sal_Int32 nColumn ) + throw ( css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception ) override; + + /** @return TRUE, if the specified cell is selected. */ + virtual sal_Bool SAL_CALL isAccessibleSelected( sal_Int32 nRow, sal_Int32 nColumn ) + throw ( css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception ) override; + + // XAccessibleSelection + + /** Selects the specified child (row or column of the table). */ + virtual void SAL_CALL selectAccessibleChild( sal_Int32 nChildIndex ) + throw ( css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception ) override; + + /** @return TRUE, if the specified child (row/column) is selected. */ + virtual sal_Bool SAL_CALL isAccessibleChildSelected( sal_Int32 nChildIndex ) + throw ( css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception ) override; + + /** Clears the complete selection. */ + virtual void SAL_CALL clearAccessibleSelection() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** Selects all children or first, if multiselection is not supported. */ + virtual void SAL_CALL selectAllAccessibleChildren() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return The number of selected rows/columns. */ + virtual sal_Int32 SAL_CALL getSelectedAccessibleChildCount() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return The specified selected row/column. */ + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL + getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) + throw ( css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception ) override; + + /** Removes the specified row/column from the selection. */ + virtual void SAL_CALL deselectAccessibleChild( sal_Int32 nSelectedChildIndex ) + throw ( css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception ) override; + + // XInterface + + /** Queries for a new interface. */ + css::uno::Any SAL_CALL queryInterface( const css::uno::Type& rType ) + throw ( css::uno::RuntimeException, std::exception ) override; + + /** Aquires the object (calls acquire() on base class). */ + virtual void SAL_CALL acquire() throw () override; + + /** Releases the object (calls release() on base class). */ + virtual void SAL_CALL release() throw () override; + + // XServiceInfo + + /** @return The name of this class. */ + virtual OUString SAL_CALL getImplementationName() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return An unique implementation ID. */ + virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() + throw ( css::uno::RuntimeException, std::exception ) override; + +protected: + // internal virtual methods + + /** @attention This method requires locked mutex's and a living object. + @return The bounding box (VCL rect.) relative to the parent window. */ + virtual Rectangle implGetBoundingBox() override; + /** @attention This method requires locked mutex's and a living object. + @return The bounding box (VCL rect.) in screen coordinates. */ + virtual Rectangle implGetBoundingBoxOnScreen() override; + + /** @attention This method requires locked mutex's and a living object. + @return The count of used rows. */ + virtual sal_Int32 implGetRowCount() const override; + /** @attention This method requires locked mutex's and a living object. + @return The count of used columns. */ + virtual sal_Int32 implGetColumnCount() const override; + + // internal helper methods + + /** @return TRUE, if the objects is a header bar for rows. */ + inline bool isRowBar() const; + /** @return TRUE, if the objects is a header bar for columns. */ + inline bool isColumnBar() const; + + /** Returns the specified row or column. Uses one of the parameters, + depending on object type. + @attention This method requires locked mutex's and a living object. + @return The XAccessible interface of the specified column/row. */ + css::uno::Reference< css::accessibility::XAccessible > + implGetChild( sal_Int32 nRow, sal_uInt16 nColumnPos ); + + /** @attention This method requires locked mutex's and a living object. + @return The absolute child index from the index of selected children. + @throws IndexOutOfBoundsException + If the specified index is invalid. */ + sal_Int32 implGetChildIndexFromSelectedIndex( sal_Int32 nSelectedChildIndex ) + throw ( css::lang::IndexOutOfBoundsException ); + + /** @attention This method requires locked mutex's and a living object. + @throws IndexOutOfBoundsException + If the specified row/column index (depending on type) is invalid. */ + void ensureIsValidHeaderIndex( sal_Int32 nIndex ) + throw ( css::lang::IndexOutOfBoundsException ); +}; + +// inlines + +inline bool AccessibleBrowseBoxHeaderBar::isRowBar() const +{ + return getType() == ::svt::BBTYPE_ROWHEADERBAR; +} + +inline bool AccessibleBrowseBoxHeaderBar::isColumnBar() const +{ + return getType() == ::svt::BBTYPE_COLUMNHEADERBAR; +} + + +} // namespace accessibility + + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/extended/AccessibleBrowseBoxHeaderCell.hxx b/accessibility/inc/extended/AccessibleBrowseBoxHeaderCell.hxx new file mode 100644 index 000000000000..b616529c0b65 --- /dev/null +++ b/accessibility/inc/extended/AccessibleBrowseBoxHeaderCell.hxx @@ -0,0 +1,74 @@ +/* -*- 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_ACCESSIBLEBROWSEBOXHEADERCELL_HXX +#define INCLUDED_ACCESSIBILITY_INC_EXTENDED_ACCESSIBLEBROWSEBOXHEADERCELL_HXX + +#include "extended/AccessibleBrowseBoxBase.hxx" + +namespace accessibility +{ + class AccessibleBrowseBoxHeaderCell : public BrowseBoxAccessibleElement + { + sal_Int32 m_nColumnRowId; + public: + AccessibleBrowseBoxHeaderCell(sal_Int32 _nColumnRowId, + const css::uno::Reference< css::accessibility::XAccessible >& rxParent, + ::svt::IAccessibleTableProvider& _rBrowseBox, + const css::uno::Reference< css::awt::XWindow >& _xFocusWindow, + ::svt::AccessibleBrowseBoxObjType _eObjType); + /** @return The count of visible children. */ + virtual sal_Int32 SAL_CALL getAccessibleChildCount() throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return The XAccessible interface of the specified child. */ + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL + getAccessibleChild( sal_Int32 nChildIndex ) throw ( css::lang::IndexOutOfBoundsException,css::uno::RuntimeException, std::exception ) override; + + /** @return The index of this object among the parent's children. */ + virtual sal_Int32 SAL_CALL getAccessibleIndexInParent() throw ( css::uno::RuntimeException, std::exception ) override; + + /** Grabs the focus to the BrowseBox. */ + virtual void SAL_CALL grabFocus() throw ( css::uno::RuntimeException, std::exception ) override; + + inline bool isRowBarCell() const + { + return getType() == ::svt::BBTYPE_ROWHEADERCELL; + } + + /** @return + The name of this class. + */ + virtual OUString SAL_CALL getImplementationName() throw ( css::uno::RuntimeException, std::exception ) override; + + /** Creates a new AccessibleStateSetHelper and fills it with states of the + current object. + @return + A filled AccessibleStateSetHelper. + */ + ::utl::AccessibleStateSetHelper* implCreateStateSetHelper() override; + + protected: + virtual Rectangle implGetBoundingBox() override; + + virtual Rectangle implGetBoundingBoxOnScreen() override; + }; +} + +#endif // INCLUDED_ACCESSIBILITY_INC_EXTENDED_ACCESSIBLEBROWSEBOXHEADERCELL_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/extended/AccessibleBrowseBoxTable.hxx b/accessibility/inc/extended/AccessibleBrowseBoxTable.hxx new file mode 100644 index 000000000000..5cbe7df5e703 --- /dev/null +++ b/accessibility/inc/extended/AccessibleBrowseBoxTable.hxx @@ -0,0 +1,152 @@ +/* -*- 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_ACCESSIBLEBROWSEBOXTABLE_HXX +#define INCLUDED_ACCESSIBILITY_INC_EXTENDED_ACCESSIBLEBROWSEBOXTABLE_HXX + +#include "extended/AccessibleBrowseBoxTableBase.hxx" + + +namespace accessibility { + +/** This class represents the accessible object of the data table of a + BrowseBox control. */ +class AccessibleBrowseBoxTable : public AccessibleBrowseBoxTableBase +{ + friend class AccessibleBrowseBox; // to create header bars + +public: + AccessibleBrowseBoxTable( + const css::uno::Reference< css::accessibility::XAccessible >& rxParent, + ::svt::IAccessibleTableProvider& rBrowseBox ); + +protected: + virtual ~AccessibleBrowseBoxTable(); + +public: + // XAccessibleContext + + /** @return The XAccessible interface of the specified child. */ + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL + getAccessibleChild( sal_Int32 nChildIndex ) + throw ( css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception ) override; + + /** @return The index of this object among the parent's children. */ + virtual sal_Int32 SAL_CALL getAccessibleIndexInParent() + throw ( css::uno::RuntimeException, std::exception ) override; + + // XAccessibleComponent + + /** @return The accessible child rendered under the given point. */ + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL + getAccessibleAtPoint( const css::awt::Point& rPoint ) + throw ( css::uno::RuntimeException, std::exception ) override; + + /** Grabs the focus to (the current cell of) the data table. */ + virtual void SAL_CALL grabFocus() + throw ( css::uno::RuntimeException, std::exception ) override; + + // XAccessibleTable + + /** @return The description text of the specified row. */ + virtual OUString SAL_CALL getAccessibleRowDescription( sal_Int32 nRow ) + throw ( css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception ) override; + + /** @return The description text of the specified column. */ + virtual OUString SAL_CALL getAccessibleColumnDescription( sal_Int32 nColumn ) + throw ( css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception ) override; + + /** @return The XAccessibleTable interface of the row header bar. */ + virtual css::uno::Reference< css::accessibility::XAccessibleTable > SAL_CALL + getAccessibleRowHeaders() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return The XAccessibleTable interface of the column header bar. */ + virtual css::uno::Reference< css::accessibility::XAccessibleTable > SAL_CALL + getAccessibleColumnHeaders() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return An index list of completely selected rows. */ + virtual css::uno::Sequence< sal_Int32 > SAL_CALL + getSelectedAccessibleRows() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return An index list of completely selected columns. */ + virtual css::uno::Sequence< sal_Int32 > SAL_CALL + getSelectedAccessibleColumns() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return TRUE, if the specified row is completely selected. */ + virtual sal_Bool SAL_CALL isAccessibleRowSelected( sal_Int32 nRow ) + throw ( css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception ) override; + + /** @return TRUE, if the specified column is completely selected. */ + virtual sal_Bool SAL_CALL isAccessibleColumnSelected( sal_Int32 nColumn ) + throw ( css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception ) override; + + /** @return The XAccessible interface of the cell object at the specified + cell position. */ + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL + getAccessibleCellAt( sal_Int32 nRow, sal_Int32 nColumn ) + throw ( css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception ) override; + + /** @return TRUE, if the specified cell is selected. */ + virtual sal_Bool SAL_CALL isAccessibleSelected( sal_Int32 nRow, sal_Int32 nColumn ) + throw ( css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception ) override; + + // XServiceInfo + + /** @return The name of this class. */ + virtual OUString SAL_CALL getImplementationName() + throw ( css::uno::RuntimeException, std::exception ) override; + +protected: + // internal virtual methods + + /** @attention This method requires locked mutex's and a living object. + @return The bounding box (VCL rect.) relative to the parent window. */ + virtual Rectangle implGetBoundingBox() override; + /** @attention This method requires locked mutex's and a living object. + @return The bounding box (VCL rect.) in screen coordinates. */ + virtual Rectangle implGetBoundingBoxOnScreen() override; + + // internal helper methods + + /** @attention This method requires a locked mutex. + @return The XAccessibleTable interface of the specified header bar. */ + css::uno::Reference< css::accessibility::XAccessibleTable > + implGetHeaderBar( sal_Int32 nChildIndex ) + throw ( css::uno::RuntimeException ); +}; + + +} // namespace accessibility + + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/extended/AccessibleBrowseBoxTableBase.hxx b/accessibility/inc/extended/AccessibleBrowseBoxTableBase.hxx new file mode 100644 index 000000000000..9ea46eb27fa8 --- /dev/null +++ b/accessibility/inc/extended/AccessibleBrowseBoxTableBase.hxx @@ -0,0 +1,267 @@ +/* -*- 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_ACCESSIBLEBROWSEBOXTABLEBASE_HXX +#define INCLUDED_ACCESSIBILITY_INC_EXTENDED_ACCESSIBLEBROWSEBOXTABLEBASE_HXX + +#include "extended/AccessibleBrowseBoxBase.hxx" +#include +#include + + +namespace accessibility { + +typedef ::cppu::ImplHelper1< css::accessibility::XAccessibleTable > + AccessibleBrowseBoxTableImplHelper; + +/** The BrowseBox accessible table objects inherit from this base class. It + implements basic functionality for the XAccessibleTable interface. + BrowseBox table objects are: the data table, the column header bar and the + row header bar. */ +class AccessibleBrowseBoxTableBase : + public BrowseBoxAccessibleElement, + public AccessibleBrowseBoxTableImplHelper +{ +public: + /** Constructor sets specified name and description. If the constant of a + text is BBTEXT_NONE, the derived class has to set the text via + implSetName() and implSetDescription() (in Ctor) or later via + setAccessibleName() and setAccessibleDescription() (these methods + notify the listeners about the change). + @param rxParent XAccessible interface of the parent object. + @param rBrowseBox The BrowseBox control. + @param eObjType Type of BrowseBox object. */ + AccessibleBrowseBoxTableBase( + const css::uno::Reference< css::accessibility::XAccessible >& rxParent, + ::svt::IAccessibleTableProvider& rBrowseBox, + ::svt::AccessibleBrowseBoxObjType eObjType ); + +protected: + virtual ~AccessibleBrowseBoxTableBase(); + +public: + // XAccessibleContext + + /** @return The count of visible children. */ + virtual sal_Int32 SAL_CALL getAccessibleChildCount() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return The role of this object (a table). */ + virtual sal_Int16 SAL_CALL getAccessibleRole() + throw ( css::uno::RuntimeException, std::exception ) override; + + /* Derived classes have to implement: + - getAccessibleChild, + - getAccessibleIndexInParent. */ + + // XAccessibleComponent + + /* Derived classes have to implement: + - getAccessibleAt, + - grabFocus. */ + + // XAccessibleTable + + /** @return The number of used rows in the table (0 = empty table). */ + virtual sal_Int32 SAL_CALL getAccessibleRowCount() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return The number of used columns in the table (0 = empty table). */ + virtual sal_Int32 SAL_CALL getAccessibleColumnCount() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return The row extent of the specified cell (always 1). */ + virtual sal_Int32 SAL_CALL + getAccessibleRowExtentAt( sal_Int32 nRow, sal_Int32 nColumn ) + throw ( css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception ) override; + + /** @return The column extent of the specified cell (always 1). */ + virtual sal_Int32 SAL_CALL + getAccessibleColumnExtentAt( sal_Int32 nRow, sal_Int32 nColumn ) + throw ( css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception ) override; + + /** @return The caption cell of the table (not supported). */ + virtual css::uno::Reference< + css::accessibility::XAccessible > SAL_CALL + getAccessibleCaption() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return The summary object of the table (not supported). */ + virtual css::uno::Reference< + css::accessibility::XAccessible > SAL_CALL + getAccessibleSummary() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return The child index of the specified cell. */ + virtual sal_Int32 SAL_CALL getAccessibleIndex( sal_Int32 nRow, sal_Int32 nColumn ) + throw ( css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception ) override; + + /** @return The row index of the specified child cell. */ + virtual sal_Int32 SAL_CALL getAccessibleRow( sal_Int32 nChildIndex ) + throw ( css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception ) override; + + /** @return The column index of the specified child cell. */ + virtual sal_Int32 SAL_CALL getAccessibleColumn( sal_Int32 nChildIndex ) + throw ( css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception ) override; + + /* Derived classes have to implement: + - getAccessibleRowDescription, + - getAccessibleColumnDescription, + - getAccessibleRowHeaders, + - getAccessibleColumnHeaders, + - getSelectedAccessibleRows, + - getSelectedAccessibleColumns, + - isAccessibleRowSelected, + - isAccessibleColumnSelected, + - getAccessibleCellAt, + - isAccessibleSelected. */ + + // XInterface + + /** Queries for a new interface. */ + css::uno::Any SAL_CALL queryInterface( const css::uno::Type& rType ) + throw ( css::uno::RuntimeException, std::exception ) override; + + /** Aquires the object (calls acquire() on base class). */ + virtual void SAL_CALL acquire() throw () override; + + /** Releases the object (calls release() on base class). */ + virtual void SAL_CALL release() throw () override; + + // XTypeProvider + + /** @return A sequence of possible types (received from base classes). */ + virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return An unique implementation ID. */ + virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() + throw ( css::uno::RuntimeException, std::exception ) override; + + // XServiceInfo + + /* Derived classes have to implement: + - getImplementationName */ + +protected: + // internal virtual methods + + /** @attention This method requires locked mutex's and a living object. + @return The count of data rows without header bar. */ + virtual sal_Int32 implGetRowCount() const; + /** @attention This method requires locked mutex's and a living object. + @return The count of data columns without "handle column". */ + virtual sal_Int32 implGetColumnCount() const; + + // internal helper methods + + /** @return TRUE, if first BrowseBox column is the "handle column". */ + bool implHasHandleColumn() const; + + /** @attention This method requires locked mutex's and a living object. + @param nColumn + the position of the column in the Accessible world + @return + the position of the column in VCL the Accessible world + */ + sal_uInt16 implToVCLColumnPos( sal_Int32 nColumn ) const; + + /** @attention This method requires locked mutex's and a living object. + @return The number of cells of the table. */ + sal_Int32 implGetChildCount() const; + + /** @attention This method requires locked mutex's and a living object. + @return The row index of the specified cell index. */ + sal_Int32 implGetRow( sal_Int32 nChildIndex ) const; + /** @attention This method requires locked mutex's and a living object. + @return The column index of the specified cell index. */ + sal_Int32 implGetColumn( sal_Int32 nChildIndex ) const; + /** @attention This method requires locked mutex's and a living object. + @return The child index of the specified cell address. */ + sal_Int32 implGetChildIndex( sal_Int32 nRow, sal_Int32 nColumn ) const; + + /** @attention This method requires locked mutex's and a living object. + @return TRUE, if the specified row is selected. */ + bool implIsRowSelected( sal_Int32 nRow ) const; + /** @attention This method requires locked mutex's and a living object. + @return TRUE, if the specified column is selected. */ + bool implIsColumnSelected( sal_Int32 nColumn ) const; + + /** Selects/deselects a row (tries to expand selection). + @attention This method requires locked mutex's and a living object. + @param nRow Row to select + @param bSelect TRUE = select, FALSE = deselect */ + void implSelectRow( sal_Int32 nRow, bool bSelect ); + /** Selects/deselects a column (tries to expand selection). + @attention This method requires locked mutex's and a living object. + @param nColumnPos column number to select + @param bSelect TRUE = select, FALSE = deselect */ + void implSelectColumn( sal_Int32 nColumnPos, bool bSelect ); + + /** @attention This method requires locked mutex's and a living object. + @return The count of selected rows. */ + sal_Int32 implGetSelectedRowCount() const; + /** @attention This method requires locked mutex's and a living object. + @return The count of selected columns. */ + sal_Int32 implGetSelectedColumnCount() const; + + /** Fills a sequence with sorted indexes of completely selected rows. + @attention This method requires locked mutex's and a living object. + @param rSeq Out-parameter that takes the sorted row index list. */ + void implGetSelectedRows( css::uno::Sequence< sal_Int32 >& rSeq ); + /** Fills a sequence with sorted indexes of completely selected columns. + @attention This method requires locked mutex's and a living object. + @param rSeq Out-parameter that takes the sorted column index list. */ + void implGetSelectedColumns( css::uno::Sequence< sal_Int32 >& rSeq ); + + /** @attention This method requires locked mutex's and a living object. + @throws IndexOutOfBoundsException + If the specified row index is invalid. */ + void ensureIsValidRow( sal_Int32 nRow ) + throw ( css::lang::IndexOutOfBoundsException ); + /** @attention This method requires locked mutex's and a living object. + @throws IndexOutOfBoundsException + If the specified column index is invalid. */ + void ensureIsValidColumn( sal_Int32 nColumn ) + throw ( css::lang::IndexOutOfBoundsException ); + /** @attention This method requires locked mutex's and a living object. + @throws IndexOutOfBoundsException + If the specified cell address is invalid. */ + void ensureIsValidAddress( sal_Int32 nRow, sal_Int32 nColumn ) + throw ( css::lang::IndexOutOfBoundsException ); + /** @attention This method requires locked mutex's and a living object. + @throws IndexOutOfBoundsException + If the specified child index is invalid. */ + void ensureIsValidIndex( sal_Int32 nChildIndex ) + throw ( css::lang::IndexOutOfBoundsException ); +}; + + +} // namespace accessibility + + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/extended/AccessibleBrowseBoxTableCell.hxx b/accessibility/inc/extended/AccessibleBrowseBoxTableCell.hxx new file mode 100644 index 000000000000..0fb9388ed61c --- /dev/null +++ b/accessibility/inc/extended/AccessibleBrowseBoxTableCell.hxx @@ -0,0 +1,133 @@ +/* -*- 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_ACCESSIBLEBROWSEBOXTABLECELL_HXX +#define INCLUDED_ACCESSIBILITY_INC_EXTENDED_ACCESSIBLEBROWSEBOXTABLECELL_HXX + +#include "extended/accessiblebrowseboxcell.hxx" +#include +#include + +namespace accessibility +{ + typedef ::cppu::ImplHelper2 < css::accessibility::XAccessibleText + , css::accessibility::XAccessible + > AccessibleTextHelper_BASE; + + // implementation of a table cell of BrowseBox + class AccessibleBrowseBoxTableCell :public AccessibleBrowseBoxCell + ,public AccessibleTextHelper_BASE + ,public ::comphelper::OCommonAccessibleText + { + private: + sal_Int32 m_nOffset; + + protected: + // OCommonAccessibleText + virtual OUString implGetText() override; + virtual css::lang::Locale implGetLocale() override; + virtual void implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ) override; + + public: + AccessibleBrowseBoxTableCell( const css::uno::Reference< css::accessibility::XAccessible >& _rxParent, + ::svt::IAccessibleTableProvider& _rBrowseBox, + const css::uno::Reference< css::awt::XWindow >& _xFocusWindow, + sal_Int32 _nRowId, + sal_uInt16 _nColId, + sal_Int32 _nOffset ); + + void nameChanged( const OUString& rNewName, const OUString& rOldName ); + + // XInterface ------------------------------------------------------------- + + /** Queries for a new interface. */ + css::uno::Any SAL_CALL queryInterface( const css::uno::Type& rType ) + throw ( css::uno::RuntimeException, std::exception ) override; + + /** Aquires the object (calls acquire() on base class). */ + virtual void SAL_CALL acquire() throw () override; + + /** Releases the object (calls release() on base class). */ + virtual void SAL_CALL release() throw () override; + + // XEventListener + using AccessibleBrowseBoxBase::disposing; + virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) + throw(css::uno::RuntimeException, std::exception) override; + + /** @return The index of this object among the parent's children. */ + virtual sal_Int32 SAL_CALL getAccessibleIndexInParent() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return + The name of this class. + */ + virtual OUString SAL_CALL getImplementationName() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return + The count of visible children. + */ + virtual sal_Int32 SAL_CALL getAccessibleChildCount() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return + The XAccessible interface of the specified child. + */ + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL + getAccessibleChild( sal_Int32 nChildIndex ) + throw ( css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception ) override; + + /** Creates a new AccessibleStateSetHelper and fills it with states of the + current object. + @return + A filled AccessibleStateSetHelper. + */ + ::utl::AccessibleStateSetHelper* implCreateStateSetHelper() override; + + // XAccessible ------------------------------------------------------------ + + /** @return The XAccessibleContext interface of this object. */ + virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL + getAccessibleContext() + throw ( css::uno::RuntimeException, std::exception ) override; + + // XAccessibleText + virtual sal_Int32 SAL_CALL getCaretPosition() throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual sal_Unicode SAL_CALL getCharacter( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getCharacterAttributes( sal_Int32 nIndex, const css::uno::Sequence< OUString >& aRequestedAttributes ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual css::awt::Rectangle SAL_CALL getCharacterBounds( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getCharacterCount() throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getIndexAtPoint( const css::awt::Point& aPoint ) throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getSelectedText() throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getSelectionStart() throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getSelectionEnd() throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getText() throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual css::accessibility::TextSegment SAL_CALL getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (css::lang::IndexOutOfBoundsException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override; + virtual css::accessibility::TextSegment SAL_CALL getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (css::lang::IndexOutOfBoundsException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override; + virtual css::accessibility::TextSegment SAL_CALL getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (css::lang::IndexOutOfBoundsException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + }; +} +#endif // INCLUDED_ACCESSIBILITY_INC_EXTENDED_ACCESSIBLEBROWSEBOXTABLECELL_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/extended/AccessibleGridControl.hxx b/accessibility/inc/extended/AccessibleGridControl.hxx new file mode 100644 index 000000000000..a2f19e5de343 --- /dev/null +++ b/accessibility/inc/extended/AccessibleGridControl.hxx @@ -0,0 +1,239 @@ +/* -*- 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_ACCESSIBLEGRIDCONTROL_HXX +#define INCLUDED_ACCESSIBILITY_INC_EXTENDED_ACCESSIBLEGRIDCONTROL_HXX + +#include +#include +#include +#include +#include +#include + +namespace accessibility { + + class AccessibleGridControl_Impl; + + +/** This class represents the complete accessible Grid Control object. */ +class AccessibleGridControl : public AccessibleGridControlBase +{ + friend class AccessibleGridControlAccess; + +protected: + AccessibleGridControl( + const css::uno::Reference< css::accessibility::XAccessible >& _rxParent, + const css::uno::Reference< css::accessibility::XAccessible >& _rxCreator, + ::svt::table::IAccessibleTable& _rTable + ); + + virtual ~AccessibleGridControl(); + + /** Cleans up members. */ + using AccessibleGridControlBase::disposing; + virtual void SAL_CALL disposing() override; + +protected: + // XAccessibleContext ----------------------------------------------------- + + /** @return The count of visible children. */ + virtual sal_Int32 SAL_CALL getAccessibleChildCount() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return The XAccessible interface of the specified child. */ + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL + getAccessibleChild( sal_Int32 nChildIndex ) + throw ( css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception ) override; + + /** @return The role of this object (a table). */ + virtual sal_Int16 SAL_CALL getAccessibleRole() + throw ( css::uno::RuntimeException, std::exception ) override; + + // XAccessibleComponent --------------------------------------------------- + + /** @return + The accessible child rendered under the given point. + */ + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL + getAccessibleAtPoint( const css::awt::Point& rPoint ) + throw ( css::uno::RuntimeException, std::exception ) override; + + /** Grabs the focus to the Grid Control. */ + virtual void SAL_CALL grabFocus() + throw ( css::uno::RuntimeException, std::exception ) override; + + // XServiceInfo ----------------------------------------------------------- + + /** @return + The name of this class. + */ + virtual OUString SAL_CALL getImplementationName() + throw ( css::uno::RuntimeException, std::exception ) override; + +public: + // helper functions + + /** commitCellEvent commit the event at all listeners of the table + @param nEventId + the event id + @param rNewValue + the new value + @param rOldValue + the old value + */ + void commitCellEvent(sal_Int16 nEventId, const css::uno::Any& rNewValue, + const css::uno::Any& rOldValue); + + /** commitTableEvent commit the event at all listeners of the table + @param nEventId + the event id + @param rNewValue + the new value + @param rOldValue + the old value + */ + void commitTableEvent(sal_Int16 nEventId, const css::uno::Any& rNewValue, + const css::uno::Any& rOldValue); + +protected: + // internal virtual methods ----------------------------------------------- + + /** @attention This method requires locked mutex's and a living object. + @return The bounding box (VCL rect.) relative to the parent window. */ + virtual Rectangle implGetBoundingBox() override; + /** @attention This method requires locked mutex's and a living object. + @return The bounding box (VCL rect.) in screen coordinates. */ + virtual Rectangle implGetBoundingBoxOnScreen() override; + + // internal helper methods ------------------------------------------------ + + /** This method creates (once) and returns the accessible data table child. + @attention This method requires locked mutex's and a living object. + @return The XAccessible interface of the data table. */ + css::uno::Reference< css::accessibility::XAccessible > implGetTable(); + + /** This method creates (once) and returns the specified header bar. + @attention This method requires locked mutex's and a living object. + @return The XAccessible interface of the header bar. */ + css::uno::Reference< css::accessibility::XAccessible > + implGetHeaderBar( ::svt::table::AccessibleTableControlObjType eObjType ); + + /** This method returns one of the children that are always present: + Data table, row and column header bar or corner control. + @attention This method requires locked mutex's and a living object. + @return The XAccessible interface of the specified child. */ + css::uno::Reference< css::accessibility::XAccessible > + implGetFixedChild( sal_Int32 nChildIndex ); + + /** This method creates and returns an accessible table. + @return An AccessibleGridControlTable. */ + AccessibleGridControlTable* createAccessibleTable(); + +private: + // members ---------------------------------------------------------------- + std::unique_ptr< AccessibleGridControl_Impl > m_xImpl; +}; + + +/** the XAccessible which creates/returns an AccessibleGridControl + +

The instance holds its XAccessibleContext with a hard reference, while + the context holds this instance weak.

+*/ + +class AccessibleGridControlAccess : + public ::cppu::WeakImplHelper< css::accessibility::XAccessible > + ,public ::svt::table::IAccessibleTableControl +{ +private: + css::uno::Reference< css::accessibility::XAccessible > + m_xParent; + ::svt::table::IAccessibleTable * m_pTable; + + css::uno::Reference< css::accessibility::XAccessibleContext > + m_xContext; + AccessibleGridControl* m_pContext; + // note that this pointer is valid as long as m_xContext is valid! + +public: + AccessibleGridControlAccess( + const css::uno::Reference< css::accessibility::XAccessible >& _rxParent, + ::svt::table::IAccessibleTable& _rTable + ); + + /// checks whether the accessible context is still alive + bool isContextAlive() const; + + /// returns the AccessibleContext belonging to this Accessible + inline AccessibleGridControl* getContext() { return m_pContext; } + +protected: + virtual ~AccessibleGridControlAccess(); + + // XAccessible + virtual css::uno::Reference< css::accessibility::XAccessibleContext > + SAL_CALL getAccessibleContext() throw ( css::uno::RuntimeException, std::exception ) override; + + // IAccessibleTable + virtual css::uno::Reference< css::accessibility::XAccessible > + getMyself() override + { + return this; + } + void DisposeAccessImpl() override; + virtual bool isAlive() const override + { + return isContextAlive(); + } + virtual void commitCellEvent( sal_Int16 nEventId, + const css::uno::Any& rNewValue, const css::uno::Any& rOldValue ) override + { + AccessibleGridControl* pContext( getContext() ); + if ( pContext ) + pContext->commitCellEvent( nEventId, rNewValue, rOldValue ); + } + virtual void commitTableEvent( sal_Int16 nEventId, + const css::uno::Any& rNewValue, const css::uno::Any& rOldValue ) override + { + AccessibleGridControl* pContext( getContext() ); + if ( pContext ) + pContext->commitTableEvent( nEventId, rNewValue, rOldValue ); + } + virtual void commitEvent( sal_Int16 nEventId, + const css::uno::Any& rNewValue, const css::uno::Any& rOldValue ) override + { + AccessibleGridControl* pContext( getContext() ); + if ( pContext ) + pContext->commitEvent( nEventId, rNewValue, rOldValue ); + } + +private: + AccessibleGridControlAccess( const AccessibleGridControlAccess& ) = delete; + AccessibleGridControlAccess& operator=( const AccessibleGridControlAccess& ) = delete; +}; + + +} // namespace accessibility + + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/extended/AccessibleGridControlBase.hxx b/accessibility/inc/extended/AccessibleGridControlBase.hxx new file mode 100644 index 000000000000..978baf95675a --- /dev/null +++ b/accessibility/inc/extended/AccessibleGridControlBase.hxx @@ -0,0 +1,356 @@ +/* -*- 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_ACCESSIBLEGRIDCONTROLBASE_HXX +#define INCLUDED_ACCESSIBILITY_INC_EXTENDED_ACCESSIBLEGRIDCONTROLBASE_HXX + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +namespace vcl { class Window; } + +namespace utl { + class AccessibleStateSetHelper; +} + + +namespace accessibility { + +typedef ::cppu::WeakAggComponentImplHelper4< + css::accessibility::XAccessibleContext, + css::accessibility::XAccessibleComponent, + css::accessibility::XAccessibleEventBroadcaster, + css::lang::XServiceInfo > + AccessibleGridControlImplHelper; + +/** The GridControl accessible objects inherit from this base class. It + implements basic functionality for various Accessibility interfaces and + the event broadcaster and contains the osl::Mutex. */ +class AccessibleGridControlBase : + public ::comphelper::OBaseMutex, + public AccessibleGridControlImplHelper +{ +public: + /** Constructor sets specified name and description. + @param rxParent XAccessible interface of the parent object. + @param rTable The Table control. + @param eObjType Type of accessible table control. */ + AccessibleGridControlBase( + const css::uno::Reference< css::accessibility::XAccessible >& rxParent, + ::svt::table::IAccessibleTable& rTable, + ::svt::table::AccessibleTableControlObjType eObjType ); + +protected: + virtual ~AccessibleGridControlBase(); + + /** Commits DeFunc event to listeners and cleans up members. */ + virtual void SAL_CALL disposing() override; + +public: + // XAccessibleContext + + /** @return A reference to the parent accessible object. */ + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL + getAccessibleParent() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return The index of this object among the parent's children. */ + virtual sal_Int32 SAL_CALL getAccessibleIndexInParent() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return + The description of this object. + */ + virtual OUString SAL_CALL getAccessibleDescription() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return + The name of this object. + */ + virtual OUString SAL_CALL getAccessibleName() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return + The relation set (the GridControl does not have one). + */ + virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL + getAccessibleRelationSet() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return The set of current states. */ + virtual css::uno::Reference< css::accessibility::XAccessibleStateSet > SAL_CALL + getAccessibleStateSet() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return The parent's locale. */ + virtual css::lang::Locale SAL_CALL getLocale() + throw ( css::accessibility::IllegalAccessibleComponentStateException, + css::uno::RuntimeException, std::exception ) override; + + /** @return + The role of this object. Panel, ROWHEADER, COLUMNHEADER, TABLE, TABLE_CELL are supported. + */ + virtual sal_Int16 SAL_CALL getAccessibleRole() + throw ( css::uno::RuntimeException, std::exception ) override; + + /* Derived classes have to implement: + - getAccessibleChildCount, + - getAccessibleChild, + - getAccessibleRole. + Derived classes may overwrite getAccessibleIndexInParent to increase + performance. */ + + // XAccessibleComponent + + /** @return + TRUE, if the point lies within the bounding box of this object. */ + virtual sal_Bool SAL_CALL containsPoint( const css::awt::Point& rPoint ) + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return The bounding box of this object. */ + virtual css::awt::Rectangle SAL_CALL getBounds() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return + The upper left corner of the bounding box relative to the parent. */ + virtual css::awt::Point SAL_CALL getLocation() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return + The upper left corner of the bounding box in screen coordinates. */ + virtual css::awt::Point SAL_CALL getLocationOnScreen() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return The size of the bounding box. */ + virtual css::awt::Size SAL_CALL getSize() + throw ( css::uno::RuntimeException, std::exception ) override; + + virtual sal_Int32 SAL_CALL getForeground( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getBackground( ) throw (css::uno::RuntimeException, std::exception) override; + + + /* Derived classes have to implement: + - getAccessibleAt, + - grabFocus. */ + + /** @return + The accessible child rendered under the given point. + */ + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL + getAccessibleAtPoint( const css::awt::Point& rPoint ) + throw ( css::uno::RuntimeException, std::exception ) override; + + // XAccessibleEventBroadcaster + + /** Adds a new event listener */ + virtual void SAL_CALL addAccessibleEventListener( + const css::uno::Reference< css::accessibility::XAccessibleEventListener>& rxListener ) + throw ( css::uno::RuntimeException, std::exception ) override; + + /** Removes an event listener. */ + virtual void SAL_CALL removeAccessibleEventListener( + const css::uno::Reference< css::accessibility::XAccessibleEventListener>& rxListener ) + throw ( css::uno::RuntimeException, std::exception ) override; + + // XTypeProvider + + /** @return An unique implementation ID. */ + virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() + throw ( css::uno::RuntimeException, std::exception ) override; + + // XServiceInfo + + /** @return Whether the specified service is supported by this class. */ + virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return A list of all supported services. */ + virtual css::uno::Sequence< OUString > SAL_CALL + getSupportedServiceNames() + throw ( css::uno::RuntimeException, std::exception ) override; + + /* Derived classes have to implement: + - getImplementationName. */ + + // helper methods + + /** @return The GridControl object type. */ + inline ::svt::table::AccessibleTableControlObjType getType() const; + + /** Commits an event to all listeners. */ + void commitEvent( + sal_Int16 nEventId, + const css::uno::Any& rNewValue, + const css::uno::Any& rOldValue ); + /** @return TRUE, if the object is not disposed or disposing. */ + bool isAlive() const; + +protected: + // internal virtual methods + + /** Determines whether the Grid control is really showing inside of + its parent accessible window. Derived classes may implement different + behaviour. + @attention This method requires locked mutex's and a living object. + @return TRUE, if the object is really showing. */ + bool implIsShowing(); + + /** Derived classes return the bounding box relative to the parent window. + @attention This method requires locked mutex's and a living object. + @return The bounding box (VCL rect.) relative to the parent window. */ + virtual Rectangle implGetBoundingBox() = 0; + ///** Derived classes return the bounding box in screen coordinates. + // @attention This method requires locked mutex's and a living object. + // @return The bounding box (VCL rect.) in screen coordinates. */ + virtual Rectangle implGetBoundingBoxOnScreen() = 0; + + /** Creates a new AccessibleStateSetHelper and fills it with states of the + current object. This method calls FillStateSet at the GridControl which + fills it with more states depending on the object type. Derived classes + may overwrite this method and add more states. + @attention This method requires locked mutex's. + @return A filled AccessibleStateSetHelper. */ + virtual ::utl::AccessibleStateSetHelper* implCreateStateSetHelper(); + + // internal helper methods + + /** @throws DisposedException If the object is not alive. */ + void ensureIsAlive() const + throw ( css::lang::DisposedException ); + + /** Changes the name of the object (flat assignment, no notify). + @attention This method requires a locked mutex. */ + inline void implSetName( const OUString& rName ); + + /** Locks all mutex's and calculates the bounding box relative to the + parent window. + @return The bounding box (VCL rect.) relative to the parent object. */ + Rectangle getBoundingBox() + throw ( css::lang::DisposedException ); + ///** Locks all mutex's and calculates the bounding box in screen + // coordinates. + // @return The bounding box (VCL rect.) in screen coordinates. */ + Rectangle getBoundingBoxOnScreen() + throw ( css::lang::DisposedException ); + + ::comphelper::AccessibleEventNotifier::TClientId getClientId() const { return m_aClientId; } + void setClientId(::comphelper::AccessibleEventNotifier::TClientId _aNewClientId) { m_aClientId = _aNewClientId; } + +protected: + // members + + /** The parent accessible object. */ + css::uno::Reference< css::accessibility::XAccessible > m_xParent; + /** The SVT Table control. */ + ::svt::table::IAccessibleTable& m_aTable; + /** The type of this object (for names, descriptions, state sets, ...). */ + ::svt::table::AccessibleTableControlObjType m_eObjType; + +private: + /** Localized name. */ + OUString m_aName; + /** Localized description text. */ + OUString m_aDescription; + ::comphelper::AccessibleEventNotifier::TClientId m_aClientId; +}; + + +// a version of AccessibleGridControlBase which implements not only the XAccessibleContext, +// but also the XAccessible + +typedef ::cppu::ImplHelper1 < css::accessibility::XAccessible + > GridControlAccessibleElement_Base; + +class GridControlAccessibleElement + :public AccessibleGridControlBase + ,public GridControlAccessibleElement_Base +{ +protected: + /** Constructor sets specified name and description. + + @param rxParent XAccessible interface of the parent object. + @param rTable The Table control. + @param eObjType Type of table control + */ + GridControlAccessibleElement( + const css::uno::Reference< css::accessibility::XAccessible >& rxParent, + ::svt::table::IAccessibleTable& rTable, + ::svt::table::AccessibleTableControlObjType eObjType ); + +public: + // XInterface + DECLARE_XINTERFACE( ) + // XTypeProvider + DECLARE_XTYPEPROVIDER( ) + +protected: + virtual ~GridControlAccessibleElement(); + +protected: + // XAccessible + + /** @return The XAccessibleContext interface of this object. */ + virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL + getAccessibleContext() + throw ( css::uno::RuntimeException, std::exception ) override; + +private: + GridControlAccessibleElement( const GridControlAccessibleElement& ) = delete; + GridControlAccessibleElement& operator=( const GridControlAccessibleElement& ) = delete; +}; + +// inlines + +inline ::svt::table::AccessibleTableControlObjType AccessibleGridControlBase::getType() const +{ + return m_eObjType; +} + +inline void AccessibleGridControlBase::implSetName( + const OUString& rName ) +{ + m_aName = rName; +} + + +} // namespace accessibility + + +#endif // ACCESSIBILITY_EXT_ACCESSIBILEGRIDCONTROLBASE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/extended/AccessibleGridControlHeader.hxx b/accessibility/inc/extended/AccessibleGridControlHeader.hxx new file mode 100644 index 000000000000..882f87a95401 --- /dev/null +++ b/accessibility/inc/extended/AccessibleGridControlHeader.hxx @@ -0,0 +1,181 @@ +/* -*- 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_ACCESSIBLEGRIDCONTROLHEADER_HXX +#define INCLUDED_ACCESSIBILITY_INC_EXTENDED_ACCESSIBLEGRIDCONTROLHEADER_HXX + +#include +#include + +namespace accessibility { + +/** This class represents the accessible object of a header bar of a Grid Control + (row or column header bar). This object supports the + XAccessibleSelection interface. Selecting a child of this object selects + complete rows or columns of the data table. */ +class AccessibleGridControlHeader : public AccessibleGridControlTableBase +{ +public: + /** @param rxParent accessible parent control + @param rTable accessible table + @param eObjType One of the two allowed types TCTYPE_ROWHEADERBAR or + TCTYPE_COLUMNHEADERBAR. */ + AccessibleGridControlHeader( + const css::uno::Reference< + css::accessibility::XAccessible >& rxParent, + ::svt::table::IAccessibleTable& rTable, + ::svt::table::AccessibleTableControlObjType eObjType ); + +protected: + virtual ~AccessibleGridControlHeader(); + +public: + // XAccessibleContext + + /** @return + The XAccessible interface of the specified child. + */ + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL + getAccessibleChild( sal_Int32 nChildIndex ) + throw ( css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception ) override; + + /** @return The index of this object among the parent's children. */ + virtual sal_Int32 SAL_CALL getAccessibleIndexInParent() + throw ( css::uno::RuntimeException, std::exception ) override; + + // XAccessibleComponent + + /** @return The accessible child rendered under the given point. */ + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL + getAccessibleAtPoint( const css::awt::Point& rPoint ) + throw ( css::uno::RuntimeException, std::exception ) override; + + /** Grabs the focus to (the current cell of) the data table. */ + virtual void SAL_CALL grabFocus() + throw ( css::uno::RuntimeException, std::exception ) override; + + // XAccessibleTable + + /** @return The description text of the specified row. */ + virtual OUString SAL_CALL + getAccessibleRowDescription( sal_Int32 nRow ) + throw ( css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception ) override; + + /** @return The description text of the specified column. */ + virtual OUString SAL_CALL + getAccessibleColumnDescription( sal_Int32 nColumn ) + throw ( css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception ) override; + + /** @return The XAccessibleTable interface of the row header bar. */ + virtual css::uno::Reference< css::accessibility::XAccessibleTable > SAL_CALL + getAccessibleRowHeaders() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return The XAccessibleTable interface of the column header bar. */ + virtual css::uno::Reference< css::accessibility::XAccessibleTable > SAL_CALL + getAccessibleColumnHeaders() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return An index list of completely selected rows. */ + virtual css::uno::Sequence< sal_Int32 > SAL_CALL + getSelectedAccessibleRows() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return An index list of completely selected columns. */ + virtual css::uno::Sequence< sal_Int32 > SAL_CALL + getSelectedAccessibleColumns() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return TRUE, if the specified row is completely selected. */ + virtual sal_Bool SAL_CALL isAccessibleRowSelected( sal_Int32 nRow ) + throw ( css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception ) override; + + /** @return TRUE, if the specified column is completely selected. */ + virtual sal_Bool SAL_CALL isAccessibleColumnSelected( sal_Int32 nColumn ) + throw ( css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception ) override; + + /** @return The XAccessible interface of the cell object at the specified + cell position. */ + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL + getAccessibleCellAt( sal_Int32 nRow, sal_Int32 nColumn ) + throw ( css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception ) override; + + /** @return TRUE, if the specified cell is selected. */ + virtual sal_Bool SAL_CALL isAccessibleSelected( sal_Int32 nRow, sal_Int32 nColumn ) + throw ( css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception ) override; + + // XServiceInfo + + /** @return The name of this class. */ + virtual OUString SAL_CALL getImplementationName() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return An unique implementation ID. */ + virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() + throw ( css::uno::RuntimeException, std::exception ) override; + +protected: + /** Returns the specified row or column. Uses one of the parameters, + depending on object type. + @attention This method requires locked mutex's and a living object. + @return The XAccessible interface of the specified column/row. */ + css::uno::Reference< css::accessibility::XAccessible > + implGetChild( sal_Int32 nRow, sal_uInt32 nColumnPos ); + /** @attention This method requires locked mutex's and a living object. + @return The bounding box (VCL rect.) relative to the parent window. */ + virtual Rectangle implGetBoundingBox() override; + /** @attention This method requires locked mutex's and a living object. + @return The bounding box (VCL rect.) in screen coordinates. */ + virtual Rectangle implGetBoundingBoxOnScreen() override; + + // internal helper methods + + /** @return TRUE, if the objects is a header bar for rows. */ + inline bool isRowBar() const; + /** @return TRUE, if the objects is a header bar for columns. */ + inline bool isColumnBar() const; +}; + +// inlines + +inline bool AccessibleGridControlHeader::isRowBar() const +{ + return getType() == ::svt::table::TCTYPE_ROWHEADERBAR; +} + +inline bool AccessibleGridControlHeader::isColumnBar() const +{ + return getType() == ::svt::table::TCTYPE_COLUMNHEADERBAR; +} + + +} // namespace accessibility + + +#endif // ACCESSIBILITY_EXT_ACCESSIBILEGRIDCONTROLHEADER_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/extended/AccessibleGridControlHeaderCell.hxx b/accessibility/inc/extended/AccessibleGridControlHeaderCell.hxx new file mode 100644 index 000000000000..82272a000ad4 --- /dev/null +++ b/accessibility/inc/extended/AccessibleGridControlHeaderCell.hxx @@ -0,0 +1,86 @@ +/* -*- 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_ACCESSIBLEGRIDCONTROLHEADERCELL_HXX +#define INCLUDED_ACCESSIBILITY_INC_EXTENDED_ACCESSIBLEGRIDCONTROLHEADERCELL_HXX + +#include "extended/AccessibleGridControlTableCell.hxx" + +namespace accessibility +{ + class AccessibleGridControlHeaderCell : public AccessibleGridControlCell, public css::accessibility::XAccessible + { + sal_Int32 m_nColumnRowId; + public: + AccessibleGridControlHeaderCell(sal_Int32 _nColumnRowId, + const css::uno::Reference< css::accessibility::XAccessible >& rxParent, + ::svt::table::IAccessibleTable& _rTable, + ::svt::table::AccessibleTableControlObjType _eObjType); + /** @return The count of visible children. */ + virtual sal_Int32 SAL_CALL getAccessibleChildCount() throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return The XAccessible interface of the specified child. */ + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL + getAccessibleChild( sal_Int32 nChildIndex ) throw ( css::lang::IndexOutOfBoundsException,css::uno::RuntimeException, std::exception ) override; + + /** @return The index of this object among the parent's children. */ + virtual sal_Int32 SAL_CALL getAccessibleIndexInParent() throw ( css::uno::RuntimeException, std::exception ) override; + + /** Grabs the focus to the GridControl. */ + virtual void SAL_CALL grabFocus() throw ( css::uno::RuntimeException, std::exception ) override; + + // XInterface + + /** Queries for a new interface. */ + css::uno::Any SAL_CALL queryInterface( const css::uno::Type& rType ) + throw ( css::uno::RuntimeException, std::exception ) override; + + /** Aquires the object (calls acquire() on base class). */ + virtual void SAL_CALL acquire() throw () override; + + /** Releases the object (calls release() on base class). */ + virtual void SAL_CALL release() throw () override; + // XAccessible + + /** @return The XAccessibleContext interface of this object. */ + virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL + getAccessibleContext() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return + The name of this class. + */ + virtual OUString SAL_CALL getImplementationName() throw ( css::uno::RuntimeException, std::exception ) override; + + /** Creates a new AccessibleStateSetHelper and fills it with states of the + current object. + @return + A filled AccessibleStateSetHelper. + */ + ::utl::AccessibleStateSetHelper* implCreateStateSetHelper() override; + + protected: + virtual Rectangle implGetBoundingBox() override; + + virtual Rectangle implGetBoundingBoxOnScreen() override; + }; +} + +#endif // INCLUDED_ACCESSIBILITY_INC_EXTENDED_ACCESSIBLEGRIDCONTROLHEADERCELL_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/extended/AccessibleGridControlTable.hxx b/accessibility/inc/extended/AccessibleGridControlTable.hxx new file mode 100644 index 000000000000..e784544764ad --- /dev/null +++ b/accessibility/inc/extended/AccessibleGridControlTable.hxx @@ -0,0 +1,210 @@ +/* -*- 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_ACCESSIBLEGRIDCONTROLTABLE_HXX +#define INCLUDED_ACCESSIBILITY_INC_EXTENDED_ACCESSIBLEGRIDCONTROLTABLE_HXX + +#include "extended/AccessibleGridControlTableBase.hxx" +#include +#include +#include + + +namespace accessibility { + + +typedef ::cppu::ImplHelper1 < css::accessibility::XAccessibleSelection > + AccessibleGridControlTableSelectionImplHelper; +/** This class represents the accessible object of the data table of a + Grid control. */ +class AccessibleGridControlTable : public AccessibleGridControlTableBase, + public AccessibleGridControlTableSelectionImplHelper +{ +public: + AccessibleGridControlTable( + const css::uno::Reference< css::accessibility::XAccessible >& rxParent, + ::svt::table::IAccessibleTable& rTable, + ::svt::table::AccessibleTableControlObjType _eType); + +protected: + virtual ~AccessibleGridControlTable(); +private: + std::vector< AccessibleGridControlTableCell* > m_pCellVector; + std::vector< css::uno::Reference< css::accessibility::XAccessible> > m_pAccessCellVector; +public: + // XAccessibleContext + + /** @return The XAccessible interface of the specified child. */ + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL + getAccessibleChild( sal_Int32 nChildIndex ) + throw ( css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception ) override; + + /** @return The index of this object among the parent's children. */ + virtual sal_Int32 SAL_CALL getAccessibleIndexInParent() + throw ( css::uno::RuntimeException, std::exception ) override; + + // XAccessibleComponent + + /** @return The accessible child rendered under the given point. */ + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL + getAccessibleAtPoint( const css::awt::Point& rPoint ) + throw ( css::uno::RuntimeException, std::exception ) override; + + /** Grabs the focus to (the current cell of) the data table. */ + virtual void SAL_CALL grabFocus() + throw ( css::uno::RuntimeException, std::exception ) override; + + // XAccessibleTable + + /** @return The description text of the specified row. */ + virtual OUString SAL_CALL getAccessibleRowDescription( sal_Int32 nRow ) + throw ( css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception ) override; + + /** @return The description text of the specified column. */ + virtual OUString SAL_CALL getAccessibleColumnDescription( sal_Int32 nColumn ) + throw ( css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception ) override; + + /** @return The XAccessibleTable interface of the row header bar. */ + virtual css::uno::Reference< css::accessibility::XAccessibleTable > SAL_CALL + getAccessibleRowHeaders() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return The XAccessibleTable interface of the column header bar. */ + virtual css::uno::Reference< css::accessibility::XAccessibleTable > SAL_CALL + getAccessibleColumnHeaders() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return An index list of completely selected rows. */ + virtual css::uno::Sequence< sal_Int32 > SAL_CALL + getSelectedAccessibleRows() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return An index list of completely selected columns. */ + virtual css::uno::Sequence< sal_Int32 > SAL_CALL + getSelectedAccessibleColumns() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return TRUE, if the specified row is completely selected. */ + virtual sal_Bool SAL_CALL isAccessibleRowSelected( sal_Int32 nRow ) + throw ( css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception ) override; + + /** @return TRUE, if the specified column is completely selected. */ + virtual sal_Bool SAL_CALL isAccessibleColumnSelected( sal_Int32 nColumn ) + throw ( css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception ) override; + + /** @return The XAccessible interface of the cell object at the specified + cell position. */ + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL + getAccessibleCellAt( sal_Int32 nRow, sal_Int32 nColumn ) + throw ( css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception ) override; + + /** @return TRUE, if the specified cell is selected. */ + virtual sal_Bool SAL_CALL isAccessibleSelected( sal_Int32 nRow, sal_Int32 nColumn ) + throw ( css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception ) override; + + // XAccessibleSelection + + /** Selects the specified child (row or column of the table). */ + virtual void SAL_CALL selectAccessibleChild( sal_Int32 nChildIndex ) + throw ( css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception ) override; + + /** @return TRUE, if the specified child (row/column) is selected. */ + virtual sal_Bool SAL_CALL isAccessibleChildSelected( sal_Int32 nChildIndex ) + throw ( css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception ) override; + + /** Clears the complete selection. */ + virtual void SAL_CALL clearAccessibleSelection() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** Selects all children or first, if multiselection is not supported. */ + virtual void SAL_CALL selectAllAccessibleChildren() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return The number of selected rows/columns. */ + virtual sal_Int32 SAL_CALL getSelectedAccessibleChildCount() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return The specified selected row/column. */ + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL + getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) + throw ( css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception ) override; + + /** Removes the specified row/column from the selection. */ + virtual void SAL_CALL deselectAccessibleChild( sal_Int32 nSelectedChildIndex ) + throw ( css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception ) override; + // XInterface + + /** Queries for a new interface. */ + css::uno::Any SAL_CALL queryInterface( const css::uno::Type& rType ) + throw ( css::uno::RuntimeException, std::exception ) override; + + /** Aquires the object (calls acquire() on base class). */ + virtual void SAL_CALL acquire() throw () override; + + /** Releases the object (calls release() on base class). */ + virtual void SAL_CALL release() throw () override; + // XServiceInfo + + /** @return The name of this class. */ + virtual OUString SAL_CALL getImplementationName() + throw ( css::uno::RuntimeException, std::exception ) override; + + /**@return m_pCellVector*/ + std::vector< AccessibleGridControlTableCell* >& getCellVector() { return m_pCellVector;} + /**@return m_xAccessCellVector*/ + std::vector< css::uno::Reference< css::accessibility::XAccessible > >& getAccessibleCellVector() { return m_pAccessCellVector;} + +protected: + // internal virtual methods + + /** @attention This method requires locked mutex's and a living object. + @return The bounding box (VCL rect.) relative to the parent window. */ + virtual Rectangle implGetBoundingBox() override; + ///** @attention This method requires locked mutex's and a living object. + // @return The bounding box (VCL rect.) in screen coordinates. */ + virtual Rectangle implGetBoundingBoxOnScreen() override; + + + //// internal helper methods + ///** @attention This method requires a locked mutex. + // @return The XAccessibleTable interface of the specified header bar. */ + css::uno::Reference< css::accessibility::XAccessibleTable > + implGetHeaderBar( sal_Int32 nChildIndex ) + throw ( css::uno::RuntimeException ); +}; + + +} // namespace accessibility + + +#endif // ACCESSIBILITY_EXT_ACCESSIBILEGRIDCONTROLTABLE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/extended/AccessibleGridControlTableBase.hxx b/accessibility/inc/extended/AccessibleGridControlTableBase.hxx new file mode 100644 index 000000000000..e818cdd9db5a --- /dev/null +++ b/accessibility/inc/extended/AccessibleGridControlTableBase.hxx @@ -0,0 +1,207 @@ +/* -*- 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_ACCESSIBLEGRIDCONTROLTABLEBASE_HXX +#define INCLUDED_ACCESSIBILITY_INC_EXTENDED_ACCESSIBLEGRIDCONTROLTABLEBASE_HXX + +#include "extended/AccessibleGridControlBase.hxx" +#include +#include + + +namespace accessibility { + +typedef ::cppu::ImplHelper1 < css::accessibility::XAccessibleTable > + AccessibleGridControlTableImplHelper; + +/** The Grid Control accessible table objects inherit from this base class. It + implements basic functionality for the XAccessibleTable interface. + Grid COntrol table objects are: the data table, the column header bar and the + row header bar. */ +class AccessibleGridControlTableBase : + public GridControlAccessibleElement, + public AccessibleGridControlTableImplHelper +{ +public: + /** Constructor sets specified name and description. + @param rxParent XAccessible interface of the parent object. + @param rTable The Table control. + @param eObjType Type of table control object */ + AccessibleGridControlTableBase( + const css::uno::Reference< css::accessibility::XAccessible >& rxParent, + ::svt::table::IAccessibleTable& rTable, + ::svt::table::AccessibleTableControlObjType eObjType ); + +protected: + virtual ~AccessibleGridControlTableBase(); + +public: + // XAccessibleContext + + /** @return The count of visible children. */ + virtual sal_Int32 SAL_CALL getAccessibleChildCount() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return The role of this object (a table). */ + virtual sal_Int16 SAL_CALL getAccessibleRole() + throw ( css::uno::RuntimeException, std::exception ) override; + + /* Derived classes have to implement: + - getAccessibleChild, + - getAccessibleIndexInParent. */ + + // XAccessibleComponent + + /* Derived classes have to implement: + - getAccessibleAt, + - grabFocus. */ + + // XAccessibleTable + + /** @return The number of used rows in the table (0 = empty table). */ + virtual sal_Int32 SAL_CALL getAccessibleRowCount() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return The number of used columns in the table (0 = empty table). */ + virtual sal_Int32 SAL_CALL getAccessibleColumnCount() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return The row extent of the specified cell (always 1). */ + virtual sal_Int32 SAL_CALL + getAccessibleRowExtentAt( sal_Int32 nRow, sal_Int32 nColumn ) + throw ( css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception ) override; + + /** @return The column extent of the specified cell (always 1). */ + virtual sal_Int32 SAL_CALL + getAccessibleColumnExtentAt( sal_Int32 nRow, sal_Int32 nColumn ) + throw ( css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception ) override; + + /** @return The caption cell of the table (not supported). */ + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL + getAccessibleCaption() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return The summary object of the table (not supported). */ + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL + getAccessibleSummary() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return The child index of the specified cell. */ + virtual sal_Int32 SAL_CALL getAccessibleIndex( sal_Int32 nRow, sal_Int32 nColumn ) + throw ( css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception ) override; + + /** @return The row index of the specified child cell. */ + virtual sal_Int32 SAL_CALL getAccessibleRow( sal_Int32 nChildIndex ) + throw ( css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception ) override; + + /** @return The column index of the specified child cell. */ + virtual sal_Int32 SAL_CALL getAccessibleColumn( sal_Int32 nChildIndex ) + throw ( css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception ) override; + + /* Derived classes have to implement: + - getAccessibleRowDescription, + - getAccessibleColumnDescription, + - getAccessibleRowHeaders, + - getAccessibleColumnHeaders, + - getSelectedAccessibleRows, + - getSelectedAccessibleColumns, + - isAccessibleRowSelected, + - isAccessibleColumnSelected, + - getAccessibleCellAt, + - isAccessibleSelected. */ + + // XInterface + + /** Queries for a new interface. */ + css::uno::Any SAL_CALL queryInterface( const css::uno::Type& rType ) + throw ( css::uno::RuntimeException, std::exception ) override; + + /** Aquires the object (calls acquire() on base class). */ + virtual void SAL_CALL acquire() throw () override; + + /** Releases the object (calls release() on base class). */ + virtual void SAL_CALL release() throw () override; + + // XTypeProvider + + /** @return A sequence of possible types (received from base classes). */ + virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return An unique implementation ID. */ + virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() + throw ( css::uno::RuntimeException, std::exception ) override; + +protected: + // internal helper methods + + /** @attention This method requires locked mutex's and a living object. + @return The number of cells of the table. */ + sal_Int32 implGetChildCount() const; + + /** @attention This method requires locked mutex's and a living object. + @return The row index of the specified cell index. */ + sal_Int32 implGetRow( sal_Int32 nChildIndex ) const; + /** @attention This method requires locked mutex's and a living object. + @return The column index of the specified cell index. */ + sal_Int32 implGetColumn( sal_Int32 nChildIndex ) const; + /** @attention This method requires locked mutex's and a living object. + @return The child index of the specified cell address. */ + sal_Int32 implGetChildIndex( sal_Int32 nRow, sal_Int32 nColumn ) const; + + /** Fills a sequence with sorted indexes of completely selected rows. + @attention This method requires locked mutex's and a living object. + @param rSeq Out-parameter that takes the sorted row index list. */ + void implGetSelectedRows( css::uno::Sequence< sal_Int32 >& rSeq ); + + /** @attention This method requires locked mutex's and a living object. + @throws IndexOutOfBoundsException + If the specified row index is invalid. */ + void ensureIsValidRow( sal_Int32 nRow ) + throw ( css::lang::IndexOutOfBoundsException ); + /** @attention This method requires locked mutex's and a living object. + @throws IndexOutOfBoundsException + If the specified column index is invalid. */ + void ensureIsValidColumn( sal_Int32 nColumn ) + throw ( css::lang::IndexOutOfBoundsException ); + /** @attention This method requires locked mutex's and a living object. + @throws IndexOutOfBoundsException + If the specified cell address is invalid. */ + void ensureIsValidAddress( sal_Int32 nRow, sal_Int32 nColumn ) + throw ( css::lang::IndexOutOfBoundsException ); + /** @attention This method requires locked mutex's and a living object. + @throws IndexOutOfBoundsException + If the specified child index is invalid. */ + void ensureIsValidIndex( sal_Int32 nChildIndex ) + throw ( css::lang::IndexOutOfBoundsException ); +}; + + +} // namespace accessibility + + +#endif // ACCESSIBILITY_EXT_ACCESSIBILEGRIDCONTROLTABLEBASE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/extended/AccessibleGridControlTableCell.hxx b/accessibility/inc/extended/AccessibleGridControlTableCell.hxx new file mode 100644 index 000000000000..489f695635f8 --- /dev/null +++ b/accessibility/inc/extended/AccessibleGridControlTableCell.hxx @@ -0,0 +1,154 @@ +/* -*- 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_ACCESSIBLEGRIDCONTROLTABLECELL_HXX +#define INCLUDED_ACCESSIBILITY_INC_EXTENDED_ACCESSIBLEGRIDCONTROLTABLECELL_HXX + +#include +#include +#include "extended/AccessibleGridControlBase.hxx" +#include + +namespace accessibility +{ + class AccessibleGridControlCell : public AccessibleGridControlBase + { + private: + sal_Int32 m_nRowPos; // the row number of the table cell + sal_Int32 m_nColPos; // the column id of the table cell + + protected: + // attribute access + inline sal_Int32 getRowPos( ) const { return m_nRowPos; } + inline sal_Int32 getColumnPos( ) const { return m_nColPos; } + + // XAccessibleComponent + virtual void SAL_CALL grabFocus() throw ( css::uno::RuntimeException, std::exception ) override; + + protected: + AccessibleGridControlCell( + const css::uno::Reference< css::accessibility::XAccessible >& _rxParent, + ::svt::table::IAccessibleTable& _rTable, + sal_Int32 _nRowPos, + sal_uInt16 _nColPos, + ::svt::table::AccessibleTableControlObjType _eType + ); + + virtual ~AccessibleGridControlCell(); + + private: + AccessibleGridControlCell( const AccessibleGridControlCell& ) = delete; + AccessibleGridControlCell& operator=( const AccessibleGridControlCell& ) = delete; + }; + + typedef ::cppu::ImplHelper2 < css::accessibility::XAccessibleText + , css::accessibility::XAccessible + > AccessibleTextHelper_BASE; + // implementation of a table cell of GridControl + class AccessibleGridControlTableCell :public AccessibleGridControlCell + ,public AccessibleTextHelper_BASE + ,public ::comphelper::OCommonAccessibleText + { + protected: + // OCommonAccessibleText + virtual OUString implGetText() override; + virtual css::lang::Locale implGetLocale() override; + virtual void implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ) override; + virtual Rectangle implGetBoundingBox() override; + virtual Rectangle implGetBoundingBoxOnScreen() override; + + public: + AccessibleGridControlTableCell( const css::uno::Reference< css::accessibility::XAccessible >& _rxParent, + ::svt::table::IAccessibleTable& _rTable, + sal_Int32 _nRowId, + sal_uInt16 _nColId, + svt::table::AccessibleTableControlObjType eObjType); + + // XInterface ------------------------------------------------------------- + + /** Queries for a new interface. */ + css::uno::Any SAL_CALL queryInterface( const css::uno::Type& rType ) + throw ( css::uno::RuntimeException, std::exception ) override; + + /** Aquires the object (calls acquire() on base class). */ + virtual void SAL_CALL acquire() throw () override; + + /** Releases the object (calls release() on base class). */ + virtual void SAL_CALL release() throw () override; + + /** @return The index of this object among the parent's children. */ + virtual sal_Int32 SAL_CALL getAccessibleIndexInParent() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return + The name of this class. + */ + virtual OUString SAL_CALL getImplementationName() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return + The count of visible children. + */ + virtual sal_Int32 SAL_CALL getAccessibleChildCount() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return + The XAccessible interface of the specified child. + */ + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL + getAccessibleChild( sal_Int32 nChildIndex ) + throw ( css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception ) override; + + /** Creates a new AccessibleStateSetHelper and fills it with states of the + current object. + @return + A filled AccessibleStateSetHelper. + */ + ::utl::AccessibleStateSetHelper* implCreateStateSetHelper() override; + + // XAccessible ------------------------------------------------------------ + + /** @return The XAccessibleContext interface of this object. */ + virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL + getAccessibleContext() + throw ( css::uno::RuntimeException, std::exception ) override; + + // XAccessibleText + virtual sal_Int32 SAL_CALL getCaretPosition() throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual sal_Unicode SAL_CALL getCharacter( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getCharacterAttributes( sal_Int32 nIndex, const css::uno::Sequence< OUString >& aRequestedAttributes ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual css::awt::Rectangle SAL_CALL getCharacterBounds( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getCharacterCount() throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getIndexAtPoint( const css::awt::Point& aPoint ) throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getSelectedText() throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getSelectionStart() throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getSelectionEnd() throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getText() throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual css::accessibility::TextSegment SAL_CALL getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (css::lang::IndexOutOfBoundsException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override; + virtual css::accessibility::TextSegment SAL_CALL getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (css::lang::IndexOutOfBoundsException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override; + virtual css::accessibility::TextSegment SAL_CALL getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (css::lang::IndexOutOfBoundsException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + }; +} +#endif // INCLUDED_ACCESSIBILITY_INC_EXTENDED_ACCESSIBLEGRIDCONTROLTABLECELL_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/extended/accessiblebrowseboxcell.hxx b/accessibility/inc/extended/accessiblebrowseboxcell.hxx new file mode 100644 index 000000000000..e39739e10cc6 --- /dev/null +++ b/accessibility/inc/extended/accessiblebrowseboxcell.hxx @@ -0,0 +1,77 @@ +/* -*- 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_ACCESSIBLEBROWSEBOXCELL_HXX +#define INCLUDED_ACCESSIBILITY_INC_EXTENDED_ACCESSIBLEBROWSEBOXCELL_HXX + +#include "extended/AccessibleBrowseBoxBase.hxx" +#include + + +namespace accessibility +{ + + + // = AccessibleBrowseBoxCell + + /** common accessibility-functionality for browse box elements which occupy a cell + */ + class AccessibleBrowseBoxCell : public AccessibleBrowseBoxBase + { + private: + sal_Int32 m_nRowPos; // the row number of the table cell + sal_uInt16 m_nColPos; // the column id of the table cell + + protected: + // attribute access + inline sal_Int32 getRowPos( ) const { return m_nRowPos; } + inline sal_Int32 getColumnPos( ) const { return m_nColPos; } + + protected: + // AccessibleBrowseBoxBase overridables + virtual Rectangle implGetBoundingBox() override; + virtual Rectangle implGetBoundingBoxOnScreen() override; + + // XAccessibleComponent + virtual void SAL_CALL grabFocus() throw ( css::uno::RuntimeException, std::exception ) override; + + protected: + AccessibleBrowseBoxCell( + const css::uno::Reference< css::accessibility::XAccessible >& _rxParent, + ::svt::IAccessibleTableProvider& _rBrowseBox, + const css::uno::Reference< css::awt::XWindow >& _xFocusWindow, + sal_Int32 _nRowPos, + sal_uInt16 _nColPos, + ::svt::AccessibleBrowseBoxObjType _eType = ::svt::BBTYPE_TABLECELL + ); + + virtual ~AccessibleBrowseBoxCell(); + + private: + AccessibleBrowseBoxCell( const AccessibleBrowseBoxCell& ) = delete; + AccessibleBrowseBoxCell& operator=( const AccessibleBrowseBoxCell& ) = delete; + }; + + +} // namespace accessibility + + +#endif // INCLUDED_ACCESSIBILITY_INC_EXTENDED_ACCESSIBLEBROWSEBOXCELL_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/extended/accessibleeditbrowseboxcell.hxx b/accessibility/inc/extended/accessibleeditbrowseboxcell.hxx new file mode 100644 index 000000000000..24e98b720d6d --- /dev/null +++ b/accessibility/inc/extended/accessibleeditbrowseboxcell.hxx @@ -0,0 +1,142 @@ +/* -*- 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_ACCESSIBLEEDITBROWSEBOXCELL_HXX +#define INCLUDED_ACCESSIBILITY_INC_EXTENDED_ACCESSIBLEEDITBROWSEBOXCELL_HXX + +#include "accessiblebrowseboxcell.hxx" +#include +#include +#include +#include +#include +#include +#include + +namespace accessibility +{ + + // = EditBrowseBoxTableCell + + class EditBrowseBoxTableCell :public AccessibleBrowseBoxCell + ,public ::comphelper::OAccessibleContextWrapperHelper + { + public: + EditBrowseBoxTableCell( + const css::uno::Reference< css::accessibility::XAccessible >& _rxParent, + const css::uno::Reference< css::accessibility::XAccessible >& _rxOwningAccessible, + const css::uno::Reference< css::accessibility::XAccessibleContext >& _xControlChild, + ::svt::IAccessibleTableProvider& _rBrowseBox, + const css::uno::Reference< css::awt::XWindow >& _xFocusWindow, + sal_Int32 _nRowPos, + sal_uInt16 _nColPos + ); + + protected: + virtual ~EditBrowseBoxTableCell(); + + protected: + // XAccessibleComponent + virtual sal_Int32 SAL_CALL getForeground( ) throw (css::uno::RuntimeException, std::exception) override ; + virtual sal_Int32 SAL_CALL getBackground( ) throw (css::uno::RuntimeException, std::exception) override ; + + // XServiceInfo + virtual OUString SAL_CALL getImplementationName() throw ( css::uno::RuntimeException, std::exception ) override; + + // XInterface + DECLARE_XINTERFACE( ) + // XTypeProvider + DECLARE_XTYPEPROVIDER( ) + + // XAccessibleContext + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent( ) throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getAccessibleDescription( ) throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getAccessibleName( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet( ) throw (css::uno::RuntimeException, std::exception) override; + + sal_Int16 SAL_CALL getAccessibleRole() throw ( css::uno::RuntimeException, std::exception ) override; + + virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + + virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) throw (css::uno::RuntimeException, std::exception) override; + protected: + // OComponentHelper + virtual void SAL_CALL disposing() override; + + // XComponent/OComponentProxyAggregationHelper (needs to be disambiguated) + virtual void SAL_CALL dispose() throw( css::uno::RuntimeException, std::exception ) override; + + // OAccessibleContextWrapperHelper(); + void notifyTranslatedEvent( const css::accessibility::AccessibleEventObject& _rEvent ) throw (css::uno::RuntimeException) override; + + private: + EditBrowseBoxTableCell( const EditBrowseBoxTableCell& ) = delete; + EditBrowseBoxTableCell& operator=( const EditBrowseBoxTableCell& ) = delete; + }; + + + // = EditBrowseBoxTableCell + + // XAccessible providing an EditBrowseBoxTableCell + class EditBrowseBoxTableCellAccess: + public comphelper::OBaseMutex, + public cppu::WeakComponentImplHelper + { + protected: + css::uno::WeakReference< css::accessibility::XAccessibleContext > + m_aContext; + css::uno::Reference< css::accessibility::XAccessible > + m_xParent; + css::uno::Reference< css::accessibility::XAccessible > + m_xControlAccessible; + css::uno::Reference< css::awt::XWindow > + m_xFocusWindow; + ::svt::IAccessibleTableProvider* m_pBrowseBox; + sal_Int32 m_nRowPos; + sal_uInt16 m_nColPos; + + public: + EditBrowseBoxTableCellAccess( + const css::uno::Reference< css::accessibility::XAccessible >& _rxParent, + const css::uno::Reference< css::accessibility::XAccessible >& _rxControlAccessible, + const css::uno::Reference< css::awt::XWindow >& _rxFocusWindow, + ::svt::IAccessibleTableProvider& _rBrowseBox, + sal_Int32 _nRowPos, + sal_uInt16 _nColPos + ); + + protected: + virtual ~EditBrowseBoxTableCellAccess(); + + // XAccessible + virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( ) throw (css::uno::RuntimeException, std::exception) override; + + // XComponent/OComponentHelper + virtual void SAL_CALL disposing() override; + + private: + EditBrowseBoxTableCellAccess( const EditBrowseBoxTableCellAccess& ) = delete; + EditBrowseBoxTableCellAccess& operator=( const EditBrowseBoxTableCellAccess& ) = delete; + }; +} + +#endif // INCLUDED_ACCESSIBILITY_INC_EXTENDED_ACCESSIBLEEDITBROWSEBOXCELL_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/extended/accessibleiconchoicectrl.hxx b/accessibility/inc/extended/accessibleiconchoicectrl.hxx new file mode 100644 index 000000000000..837ee7f7d033 --- /dev/null +++ b/accessibility/inc/extended/accessibleiconchoicectrl.hxx @@ -0,0 +1,110 @@ +/* -*- 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_ACCESSIBLEICONCHOICECTRL_HXX +#define INCLUDED_ACCESSIBILITY_INC_EXTENDED_ACCESSIBLEICONCHOICECTRL_HXX + +#include +#include +#include +#include +#include + +// class AccessibleListBox ----------------------------------------------- + +class SvtIconChoiceCtrl; + +namespace accessibility +{ + typedef ::cppu::ImplHelper2< css::accessibility::XAccessible + , css::accessibility::XAccessibleSelection> AccessibleIconChoiceCtrl_BASE; + + /** the class OAccessibleListBoxEntry represents the base class for an accessible object of a listbox entry + */ + class AccessibleIconChoiceCtrl :public AccessibleIconChoiceCtrl_BASE + ,public VCLXAccessibleComponent + { + protected: + css::uno::Reference< css::accessibility::XAccessible > m_xParent; + + protected: + virtual ~AccessibleIconChoiceCtrl(); + + /** this function is called upon disposing the component */ + virtual void SAL_CALL disposing() override; + + virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) override; + virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ) override; + + VclPtr< SvtIconChoiceCtrl > getCtrl(); + + public: + /** OAccessibleBase needs a valid view + @param _rIconCtrl + is the box for which we implement an accessible object + @param _xParent + is our parent accessible object + */ + AccessibleIconChoiceCtrl( SvtIconChoiceCtrl& _rIconCtrl, + const css::uno::Reference< css::accessibility::XAccessible >& _xParent ); + + // XTypeProvider + DECLARE_XTYPEPROVIDER() + + // XInterface + DECLARE_XINTERFACE() + + // XServiceInfo + virtual OUString SAL_CALL getImplementationName() throw(css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(css::uno::RuntimeException, std::exception) override; + + // XServiceInfo - static methods + static css::uno::Sequence< OUString > getSupportedServiceNames_Static() throw(css::uno::RuntimeException); + static OUString getImplementationName_Static() throw(css::uno::RuntimeException); + + // XAccessible + virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( ) throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleContext + virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw ( css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception ) override; + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int16 SAL_CALL getAccessibleRole( ) throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getAccessibleDescription( ) throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getAccessibleName( ) throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleSelection + void SAL_CALL selectAccessibleChild( sal_Int32 nChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + sal_Bool SAL_CALL isAccessibleChildSelected( sal_Int32 nChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + void SAL_CALL clearAccessibleSelection( ) throw (css::uno::RuntimeException, std::exception) override; + void SAL_CALL selectAllAccessibleChildren( ) throw (css::uno::RuntimeException, std::exception) override; + sal_Int32 SAL_CALL getSelectedAccessibleChildCount( ) throw (css::uno::RuntimeException, std::exception) override; + css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + void SAL_CALL deselectAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + }; + + +}// namespace accessibility + + +#endif // INCLUDED_ACCESSIBILITY_INC_EXTENDED_ACCESSIBLEICONCHOICECTRL_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/extended/accessibleiconchoicectrlentry.hxx b/accessibility/inc/extended/accessibleiconchoicectrlentry.hxx new file mode 100644 index 000000000000..f1fea9fcae48 --- /dev/null +++ b/accessibility/inc/extended/accessibleiconchoicectrlentry.hxx @@ -0,0 +1,191 @@ +/* -*- 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_ACCESSIBLEICONCHOICECTRLENTRY_HXX +#define INCLUDED_ACCESSIBILITY_INC_EXTENDED_ACCESSIBLEICONCHOICECTRLENTRY_HXX + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// forward + +class SvxIconChoiceCtrlEntry; +class SvtIconChoiceCtrl; + +namespace accessibility +{ + +// class AccessibleIconChoiceCtrlEntry + + typedef ::cppu::WeakAggComponentImplHelper8< css::accessibility::XAccessible + , css::accessibility::XAccessibleContext + , css::accessibility::XAccessibleComponent + , css::accessibility::XAccessibleEventBroadcaster + , css::accessibility::XAccessibleText + , css::accessibility::XAccessibleAction + , css::lang::XServiceInfo + , css::lang::XEventListener > AccessibleIconChoiceCtrlEntry_BASE; + + /** the class AccessibleListBoxEntry represents the class for an accessible object of a listbox entry */ + class AccessibleIconChoiceCtrlEntry : public ::comphelper::OBaseMutex, + public AccessibleIconChoiceCtrlEntry_BASE, + public ::comphelper::OCommonAccessibleText + { + private: + /** The treelistbox control */ + VclPtr m_pIconCtrl; + sal_Int32 m_nIndex; + + protected: + /// client id in the AccessibleEventNotifier queue + sal_uInt32 m_nClientId; + + css::uno::Reference< css::accessibility::XAccessible > m_xParent; + + private: + Rectangle GetBoundingBox_Impl() const; + Rectangle GetBoundingBoxOnScreen_Impl() const; + bool IsAlive_Impl() const; + bool IsShowing_Impl() const; + + Rectangle GetBoundingBox() + throw (css::lang::DisposedException, + css::uno::RuntimeException); + Rectangle GetBoundingBoxOnScreen() + throw (css::lang::DisposedException, + css::uno::RuntimeException); + void EnsureIsAlive() const throw ( css::lang::DisposedException ); + + protected: + virtual ~AccessibleIconChoiceCtrlEntry(); + /** this function is called upon disposing the component + */ + virtual void SAL_CALL disposing() override; + + // OCommonAccessibleText + virtual OUString implGetText() override; + virtual css::lang::Locale implGetLocale() override; + virtual void implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ) override; + + public: + /** Ctor() + @param _rIconCtrl + the icon control + @param _nPos + the entry number + @param _xParent + is our parent accessible object + */ + AccessibleIconChoiceCtrlEntry( SvtIconChoiceCtrl& _rIconCtrl, + sal_Int32 _nPos, + const css::uno::Reference< css::accessibility::XAccessible >& _xParent ); + + // XTypeProvider + virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (css::uno::RuntimeException, std::exception) override; + + // XServiceInfo + virtual OUString SAL_CALL getImplementationName() throw(css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(css::uno::RuntimeException, std::exception) override; + + // XServiceInfo - static methods + static css::uno::Sequence< OUString > getSupportedServiceNames_Static() throw(css::uno::RuntimeException); + static OUString getImplementationName_Static() throw(css::uno::RuntimeException); + + // XEventListener + virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) throw(css::uno::RuntimeException, std::exception) override; + + // XAccessible + virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( ) throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleContext + virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw ( css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception ) override; + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getAccessibleIndexInParent( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int16 SAL_CALL getAccessibleRole( ) throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getAccessibleDescription( ) throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getAccessibleName( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::lang::Locale SAL_CALL getLocale( ) throw (css::accessibility::IllegalAccessibleComponentStateException, css::uno::RuntimeException, std::exception) override; + + // XAccessibleComponent + virtual sal_Bool SAL_CALL containsPoint( const css::awt::Point& aPoint ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const css::awt::Point& aPoint ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::awt::Rectangle SAL_CALL getBounds( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::awt::Point SAL_CALL getLocation( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::awt::Point SAL_CALL getLocationOnScreen( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::awt::Size SAL_CALL getSize( ) throw (css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL grabFocus( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getForeground( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getBackground( ) throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleText + virtual sal_Int32 SAL_CALL getCaretPosition() throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual sal_Unicode SAL_CALL getCharacter( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getCharacterAttributes( sal_Int32 nIndex, const css::uno::Sequence< OUString >& aRequestedAttributes ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual css::awt::Rectangle SAL_CALL getCharacterBounds( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getCharacterCount() throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getIndexAtPoint( const css::awt::Point& aPoint ) throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getSelectedText() throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getSelectionStart() throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getSelectionEnd() throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getText() throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual css::accessibility::TextSegment SAL_CALL getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (css::lang::IndexOutOfBoundsException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override; + virtual css::accessibility::TextSegment SAL_CALL getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (css::lang::IndexOutOfBoundsException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override; + virtual css::accessibility::TextSegment SAL_CALL getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (css::lang::IndexOutOfBoundsException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + + // XAccessibleEventBroadcaster + virtual void SAL_CALL addAccessibleEventListener( const css::uno::Reference< css::accessibility::XAccessibleEventListener >& xListener ) throw (css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL removeAccessibleEventListener( const css::uno::Reference< css::accessibility::XAccessibleEventListener >& xListener ) throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleAction + virtual sal_Int32 SAL_CALL getAccessibleActionCount( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL doAccessibleAction( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getAccessibleActionDescription( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessibleKeyBinding > SAL_CALL getAccessibleActionKeyBinding( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + }; + + +}// namespace accessibility + + +#endif // INCLUDED_ACCESSIBILITY_INC_EXTENDED_ACCESSIBLEICONCHOICECTRLENTRY_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/extended/accessiblelistbox.hxx b/accessibility/inc/extended/accessiblelistbox.hxx new file mode 100644 index 000000000000..fbdc250493f5 --- /dev/null +++ b/accessibility/inc/extended/accessiblelistbox.hxx @@ -0,0 +1,133 @@ +/* -*- 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_ACCESSIBLELISTBOX_HXX +#define INCLUDED_ACCESSIBILITY_INC_EXTENDED_ACCESSIBLELISTBOX_HXX + +#include +#include +#include +#include +#include + +#include + +// class AccessibleListBox ----------------------------------------------- + +class SvTreeListBox; +class SvTreeListEntry; + +namespace accessibility +{ + class AccessibleListBoxEntry; + + /** the class OAccessibleListBoxEntry represents the base class for an accessible object of a listbox entry + */ + class AccessibleListBox: + public cppu::ImplHelper2< + css::accessibility::XAccessible, + css::accessibility::XAccessibleSelection>, + public VCLXAccessibleComponent + { + protected: + + css::uno::Reference< css::accessibility::XAccessible > m_xParent; + + protected: + virtual ~AccessibleListBox(); + + // OComponentHelper overridables + /** this function is called upon disposing the component */ + virtual void SAL_CALL disposing() override; + + // VCLXAccessibleComponent + virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) override; + virtual void ProcessWindowChildEvent( const VclWindowEvent& rVclWindowEvent ) override; + virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ) override; + + VclPtr< SvTreeListBox > getListBox() const; + + void RemoveChildEntries(SvTreeListEntry*); + + sal_Int32 GetRoleType(); + + public: + /** OAccessibleBase needs a valid view + @param _rListBox + is the box for which we implement an accessible object + @param _xParent + is our parent accessible object + */ + AccessibleListBox( SvTreeListBox& _rListBox, + const css::uno::Reference< css::accessibility::XAccessible >& _xParent ); + + // XTypeProvider + DECLARE_XTYPEPROVIDER() + + // XInterface + DECLARE_XINTERFACE() + + // XServiceInfo + virtual OUString SAL_CALL getImplementationName() throw(css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(css::uno::RuntimeException, std::exception) override; + + // XServiceInfo - static methods + static css::uno::Sequence< OUString > getSupportedServiceNames_Static() throw(css::uno::RuntimeException); + static OUString getImplementationName_Static() throw(css::uno::RuntimeException); + + // XAccessible + virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( ) throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleContext + virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw ( css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception ) override; + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int16 SAL_CALL getAccessibleRole( ) throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getAccessibleDescription( ) throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getAccessibleName( ) throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleSelection + void SAL_CALL selectAccessibleChild( sal_Int32 nChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + sal_Bool SAL_CALL isAccessibleChildSelected( sal_Int32 nChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + void SAL_CALL clearAccessibleSelection( ) throw (css::uno::RuntimeException, std::exception) override; + void SAL_CALL selectAllAccessibleChildren( ) throw (css::uno::RuntimeException, std::exception) override; + sal_Int32 SAL_CALL getSelectedAccessibleChildCount( ) throw (css::uno::RuntimeException, std::exception) override; + css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + void SAL_CALL deselectAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + +private: + + typedef std::map< SvTreeListEntry*, css::uno::Reference< css::accessibility::XAccessible > > MAP_ENTRY; + MAP_ENTRY m_mapEntry; + + css::uno::Reference< css::accessibility::XAccessible > m_xFocusedChild; + + accessibility::AccessibleListBoxEntry* GetCurEventEntry( const VclWindowEvent& rVclWindowEvent ); + + }; + + +}// namespace accessibility + + +#endif // INCLUDED_ACCESSIBILITY_INC_EXTENDED_ACCESSIBLELISTBOX_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/extended/accessiblelistboxentry.hxx b/accessibility/inc/extended/accessiblelistboxentry.hxx new file mode 100644 index 000000000000..bfcbbfc0df19 --- /dev/null +++ b/accessibility/inc/extended/accessiblelistboxentry.hxx @@ -0,0 +1,230 @@ +/* -*- 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_ACCESSIBLELISTBOXENTRY_HXX +#define INCLUDED_ACCESSIBILITY_INC_EXTENDED_ACCESSIBLELISTBOXENTRY_HXX + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "extended/listboxaccessible.hxx" + +// forward --------------------------------------------------------------- + +namespace com { namespace sun { namespace star { namespace awt { + struct Point; + struct Rectangle; + struct Size; + class XFocusListener; +} } } } + +class SvTreeListBox; +class SvTreeListEntry; + + +namespace accessibility +{ + + +// class AccessibleListBoxEntry ------------------------------------------ + typedef ::cppu::WeakAggComponentImplHelper9< css::accessibility::XAccessible + , css::accessibility::XAccessibleContext + , css::accessibility::XAccessibleComponent + , css::accessibility::XAccessibleEventBroadcaster + , css::accessibility::XAccessibleAction + , css::accessibility::XAccessibleSelection + , css::accessibility::XAccessibleText + , css::accessibility::XAccessibleValue + , css::lang::XServiceInfo > AccessibleListBoxEntry_BASE; + + /** the class AccessibleListBoxEntry represents the class for an accessible object of a listbox entry */ + class AccessibleListBoxEntry:public ::comphelper::OBaseMutex + ,public AccessibleListBoxEntry_BASE + ,public ::comphelper::OCommonAccessibleText + ,public ListBoxAccessibleBase + { + friend class AccessibleListBox; + + private: + /** The treelistbox control */ + ::std::deque< sal_Int32 > m_aEntryPath; + SvTreeListEntry* m_pSvLBoxEntry; // Needed for a11y focused item... + + + protected: + /// client id in the AccessibleEventNotifier queue + sal_uInt32 m_nClientId; + + css::uno::WeakReference< css::accessibility::XAccessible > + m_aParent; + + private: + Rectangle GetBoundingBox_Impl() const; + Rectangle GetBoundingBoxOnScreen_Impl() const; + bool IsAlive_Impl() const; + bool IsShowing_Impl() const; + + Rectangle GetBoundingBox() + throw (css::lang::DisposedException, + css::uno::RuntimeException); + Rectangle GetBoundingBoxOnScreen() + throw (css::lang::DisposedException, + css::uno::RuntimeException); + void EnsureIsAlive() const throw ( css::lang::DisposedException ); + + void NotifyAccessibleEvent( sal_Int16 _nEventId, const css::uno::Any& _aOldValue, const css::uno::Any& _aNewValue ); + + protected: + virtual ~AccessibleListBoxEntry(); + + /** this function is called upon disposing the component + */ + virtual void SAL_CALL disposing() override; + + // ListBoxAccessible/XComponent + virtual void SAL_CALL dispose() throw ( css::uno::RuntimeException, std::exception ) override; + + // OCommonAccessibleText + virtual OUString implGetText() override; + virtual css::lang::Locale implGetLocale() override; + virtual void implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ) override; + + public: + /** Ctor() + @param _rListBox + the view control + @param _pEntry + the entry + @param _xParent + is our parent accessible object + */ + AccessibleListBoxEntry( SvTreeListBox& _rListBox, SvTreeListEntry* _pEntry, + const css::uno::Reference< css::accessibility::XAccessible >& _xParent ); + + SvTreeListEntry* GetSvLBoxEntry() const { return m_pSvLBoxEntry; } + + + protected: + // XTypeProvider + virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (css::uno::RuntimeException, std::exception) override; + + // XServiceInfo + virtual OUString SAL_CALL getImplementationName() throw(css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(css::uno::RuntimeException, std::exception) override; + + // XServiceInfo - static methods + static css::uno::Sequence< OUString > getSupportedServiceNames_Static() throw(css::uno::RuntimeException); + static OUString getImplementationName_Static() throw(css::uno::RuntimeException); + + // XAccessible + virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( ) throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleContext + virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw ( css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception ) override; + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getAccessibleIndexInParent( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int16 SAL_CALL getAccessibleRole( ) throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getAccessibleDescription( ) throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getAccessibleName( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::lang::Locale SAL_CALL getLocale( ) throw (css::accessibility::IllegalAccessibleComponentStateException, css::uno::RuntimeException, std::exception) override; + + // XAccessibleComponent + virtual sal_Bool SAL_CALL containsPoint( const css::awt::Point& aPoint ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const css::awt::Point& aPoint ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::awt::Rectangle SAL_CALL getBounds( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::awt::Point SAL_CALL getLocation( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::awt::Point SAL_CALL getLocationOnScreen( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::awt::Size SAL_CALL getSize( ) throw (css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL grabFocus( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getForeground( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getBackground( ) throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleText + virtual sal_Int32 SAL_CALL getCaretPosition() throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual sal_Unicode SAL_CALL getCharacter( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getCharacterAttributes( sal_Int32 nIndex, const css::uno::Sequence< OUString >& aRequestedAttributes ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual css::awt::Rectangle SAL_CALL getCharacterBounds( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getCharacterCount() throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getIndexAtPoint( const css::awt::Point& aPoint ) throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getSelectedText() throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getSelectionStart() throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getSelectionEnd() throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getText() throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual css::accessibility::TextSegment SAL_CALL getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (css::lang::IndexOutOfBoundsException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override; + virtual css::accessibility::TextSegment SAL_CALL getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (css::lang::IndexOutOfBoundsException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override; + virtual css::accessibility::TextSegment SAL_CALL getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (css::lang::IndexOutOfBoundsException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + + // XAccessibleEventBroadcaster + virtual void SAL_CALL addAccessibleEventListener( const css::uno::Reference< css::accessibility::XAccessibleEventListener >& xListener ) throw (css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL removeAccessibleEventListener( const css::uno::Reference< css::accessibility::XAccessibleEventListener >& xListener ) throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleAction + virtual sal_Int32 SAL_CALL getAccessibleActionCount( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL doAccessibleAction( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getAccessibleActionDescription( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessibleKeyBinding > SAL_CALL getAccessibleActionKeyBinding( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + + // XAccessibleSelection + void SAL_CALL selectAccessibleChild( sal_Int32 nChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + sal_Bool SAL_CALL isAccessibleChildSelected( sal_Int32 nChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + void SAL_CALL clearAccessibleSelection( ) throw (css::uno::RuntimeException, std::exception) override; + void SAL_CALL selectAllAccessibleChildren( ) throw (css::uno::RuntimeException, std::exception) override; + sal_Int32 SAL_CALL getSelectedAccessibleChildCount( ) throw (css::uno::RuntimeException, std::exception) override; + css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + void SAL_CALL deselectAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual css::uno::Any SAL_CALL getCurrentValue( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL setCurrentValue( const css::uno::Any& aNumber ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Any SAL_CALL getMaximumValue( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Any SAL_CALL getMinimumValue( ) throw (css::uno::RuntimeException, std::exception) override; + private: + css::uno::Reference< css::accessibility::XAccessible > implGetParentAccessible( ) const; + SvTreeListEntry* GetRealChild(sal_Int32 nIndex); + sal_Int32 GetRoleType(); + }; + + +}// namespace accessibility + + +#endif // INCLUDED_ACCESSIBILITY_INC_EXTENDED_ACCESSIBLELISTBOXENTRY_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/extended/accessibletabbar.hxx b/accessibility/inc/extended/accessibletabbar.hxx new file mode 100644 index 000000000000..b248839f78e4 --- /dev/null +++ b/accessibility/inc/extended/accessibletabbar.hxx @@ -0,0 +1,112 @@ +/* -*- 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_ACCESSIBLETABBAR_HXX +#define INCLUDED_ACCESSIBILITY_INC_EXTENDED_ACCESSIBLETABBAR_HXX + +#include +#include +#include +#include "extended/accessibletabbarbase.hxx" + +#include + +namespace utl { +class AccessibleStateSetHelper; +} + + +namespace accessibility +{ + + + // class AccessibleTabBar + + + typedef ::cppu::ImplHelper2< + css::accessibility::XAccessible, + css::lang::XServiceInfo > AccessibleTabBar_BASE; + + class AccessibleTabBar : public AccessibleTabBarBase, + public AccessibleTabBar_BASE + { + private: + typedef ::std::vector< css::uno::Reference< css::accessibility::XAccessible > > AccessibleChildren; + + AccessibleChildren m_aAccessibleChildren; + + protected: + virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) override; + void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ); + + // OCommonAccessibleComponent + virtual css::awt::Rectangle implGetBounds( ) throw (css::uno::RuntimeException) override; + + // XComponent + virtual void SAL_CALL disposing() override; + + public: + AccessibleTabBar( TabBar* pTabBar ); + virtual ~AccessibleTabBar(); + + // XInterface + DECLARE_XINTERFACE() + + // XTypeProvider + DECLARE_XTYPEPROVIDER() + + // XServiceInfo + virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) override; + + // XAccessible + virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( ) throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleContext + virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getAccessibleIndexInParent( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int16 SAL_CALL getAccessibleRole( ) throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getAccessibleDescription( ) throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getAccessibleName( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::lang::Locale SAL_CALL getLocale( ) throw (css::accessibility::IllegalAccessibleComponentStateException, css::uno::RuntimeException, std::exception) override; + + // XAccessibleComponent + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const css::awt::Point& aPoint ) throw (css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL grabFocus( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getForeground( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getBackground( ) throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleExtendedComponent + virtual css::uno::Reference< css::awt::XFont > SAL_CALL getFont( ) throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getTitledBorderText( ) throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getToolTipText( ) throw (css::uno::RuntimeException, std::exception) override; + }; + + +} // namespace accessibility + + +#endif // INCLUDED_ACCESSIBILITY_INC_EXTENDED_ACCESSIBLETABBAR_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/extended/accessibletabbarbase.hxx b/accessibility/inc/extended/accessibletabbarbase.hxx new file mode 100644 index 000000000000..2c2d738cbc9b --- /dev/null +++ b/accessibility/inc/extended/accessibletabbarbase.hxx @@ -0,0 +1,65 @@ +/* -*- 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_ACCESSIBLETABBARBASE_HXX +#define INCLUDED_ACCESSIBILITY_INC_EXTENDED_ACCESSIBLETABBARBASE_HXX + +#include +#include +#include + +class TabBar; +class VCLExternalSolarLock; +class VclSimpleEvent; +class VclWindowEvent; + + +namespace accessibility +{ + +class AccessibleTabBarBase : public comphelper::OAccessibleExtendedComponentHelper +{ +public: + explicit AccessibleTabBarBase( TabBar* pTabBar ); + virtual ~AccessibleTabBarBase(); + +protected: + DECL_LINK_TYPED( WindowEventListener, VclWindowEvent&, void ); + + virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ); + + // XComponent + virtual void SAL_CALL disposing() override; + +private: + void SetTabBarPointer( TabBar* pTabBar ); + void ClearTabBarPointer(); + +protected: + VCLExternalSolarLock* m_pExternalLock; + VclPtr m_pTabBar; +}; + + +} // namespace accessibility + + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/extended/accessibletabbarpage.hxx b/accessibility/inc/extended/accessibletabbarpage.hxx new file mode 100644 index 000000000000..795aebca002e --- /dev/null +++ b/accessibility/inc/extended/accessibletabbarpage.hxx @@ -0,0 +1,128 @@ +/* -*- 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_ACCESSIBLETABBARPAGE_HXX +#define INCLUDED_ACCESSIBILITY_INC_EXTENDED_ACCESSIBLETABBARPAGE_HXX + +#include +#include +#include +#include "extended/accessibletabbarbase.hxx" + +#include + +namespace utl { +class AccessibleStateSetHelper; +} + + +namespace accessibility +{ + + + // class AccessibleTabBarPage + + + typedef ::cppu::ImplHelper2< + css::accessibility::XAccessible, + css::lang::XServiceInfo > AccessibleTabBarPage_BASE; + + class AccessibleTabBarPage : public AccessibleTabBarBase, + public AccessibleTabBarPage_BASE + { + friend class AccessibleTabBarPageList; + + private: + sal_uInt16 m_nPageId; + bool m_bEnabled; + bool m_bShowing; + bool m_bSelected; + OUString m_sPageText; + + css::uno::Reference< css::accessibility::XAccessible > m_xParent; + + protected: + bool IsEnabled(); + bool IsShowing(); + bool IsSelected(); + + void SetShowing( bool bShowing ); + void SetSelected( bool bSelected ); + void SetPageText( const OUString& sPageText ); + + sal_uInt16 GetPageId() const { return m_nPageId; } + + void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ); + + // OCommonAccessibleComponent + virtual css::awt::Rectangle implGetBounds( ) throw (css::uno::RuntimeException) override; + + // XComponent + virtual void SAL_CALL disposing() override; + + public: + AccessibleTabBarPage( TabBar* pTabBar, sal_uInt16 nPageId, + const css::uno::Reference< css::accessibility::XAccessible >& rxParent ); + virtual ~AccessibleTabBarPage(); + + // XInterface + DECLARE_XINTERFACE() + + // XTypeProvider + DECLARE_XTYPEPROVIDER() + + // XServiceInfo + virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) override; + + // XAccessible + virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( ) throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleContext + virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getAccessibleIndexInParent( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int16 SAL_CALL getAccessibleRole( ) throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getAccessibleDescription( ) throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getAccessibleName( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::lang::Locale SAL_CALL getLocale( ) throw (css::accessibility::IllegalAccessibleComponentStateException, css::uno::RuntimeException, std::exception) override; + + // XAccessibleComponent + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const css::awt::Point& aPoint ) throw (css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL grabFocus( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getForeground( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getBackground( ) throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleExtendedComponent + virtual css::uno::Reference< css::awt::XFont > SAL_CALL getFont( ) throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getTitledBorderText( ) throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getToolTipText( ) throw (css::uno::RuntimeException, std::exception) override; + }; + + +} // namespace accessibility + + +#endif // INCLUDED_ACCESSIBILITY_INC_EXTENDED_ACCESSIBLETABBARPAGE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/extended/accessibletabbarpagelist.hxx b/accessibility/inc/extended/accessibletabbarpagelist.hxx new file mode 100644 index 000000000000..e46d73f6bb0c --- /dev/null +++ b/accessibility/inc/extended/accessibletabbarpagelist.hxx @@ -0,0 +1,132 @@ +/* -*- 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_ACCESSIBLETABBARPAGELIST_HXX +#define INCLUDED_ACCESSIBILITY_INC_EXTENDED_ACCESSIBLETABBARPAGELIST_HXX + +#include +#include +#include +#include +#include "extended/accessibletabbarbase.hxx" + +#include + +namespace utl { +class AccessibleStateSetHelper; +} + + +namespace accessibility +{ + + + // class AccessibleTabBarPageList + + + typedef ::cppu::ImplHelper3< + css::accessibility::XAccessible, + css::accessibility::XAccessibleSelection, + css::lang::XServiceInfo > AccessibleTabBarPageList_BASE; + + class AccessibleTabBarPageList : public AccessibleTabBarBase, + public AccessibleTabBarPageList_BASE + { + private: + typedef ::std::vector< css::uno::Reference< css::accessibility::XAccessible > > AccessibleChildren; + + AccessibleChildren m_aAccessibleChildren; + sal_Int32 m_nIndexInParent; + + protected: + void UpdateShowing( bool bShowing ); + void UpdateSelected( sal_Int32 i, bool bSelected ); + void UpdatePageText( sal_Int32 i ); + + void InsertChild( sal_Int32 i ); + void RemoveChild( sal_Int32 i ); + void MoveChild( sal_Int32 i, sal_Int32 j ); + + virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) override; + void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ); + + // OCommonAccessibleComponent + virtual css::awt::Rectangle implGetBounds( ) throw (css::uno::RuntimeException) override; + + // XComponent + virtual void SAL_CALL disposing() override; + + public: + AccessibleTabBarPageList( TabBar* pTabBar, sal_Int32 nIndexInParent ); + virtual ~AccessibleTabBarPageList(); + + // XInterface + DECLARE_XINTERFACE() + + // XTypeProvider + DECLARE_XTYPEPROVIDER() + + // XServiceInfo + virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) override; + + // XAccessible + virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( ) throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleContext + virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getAccessibleIndexInParent( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int16 SAL_CALL getAccessibleRole( ) throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getAccessibleDescription( ) throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getAccessibleName( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::lang::Locale SAL_CALL getLocale( ) throw (css::accessibility::IllegalAccessibleComponentStateException, css::uno::RuntimeException, std::exception) override; + + // XAccessibleComponent + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const css::awt::Point& aPoint ) throw (css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL grabFocus( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getForeground( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getBackground( ) throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleExtendedComponent + virtual css::uno::Reference< css::awt::XFont > SAL_CALL getFont( ) throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getTitledBorderText( ) throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getToolTipText( ) throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleSelection + virtual void SAL_CALL selectAccessibleChild( sal_Int32 nChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL isAccessibleChildSelected( sal_Int32 nChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL clearAccessibleSelection( ) throw (css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL selectAllAccessibleChildren( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getSelectedAccessibleChildCount( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL deselectAccessibleChild( sal_Int32 nChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + }; + + +} // namespace accessibility + + +#endif // INCLUDED_ACCESSIBILITY_INC_EXTENDED_ACCESSIBLETABBARPAGELIST_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/extended/accessibletablistbox.hxx b/accessibility/inc/extended/accessibletablistbox.hxx new file mode 100644 index 000000000000..b17209933252 --- /dev/null +++ b/accessibility/inc/extended/accessibletablistbox.hxx @@ -0,0 +1,104 @@ +/* -*- 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_ACCESSIBLETABLISTBOX_HXX +#define INCLUDED_ACCESSIBILITY_INC_EXTENDED_ACCESSIBLETABLISTBOX_HXX + +#include "AccessibleBrowseBox.hxx" +#include +#include +#include + +class SvHeaderTabListBox; + + +namespace accessibility { + +class AccessibleBrowseBoxTable; + +typedef ::cppu::ImplHelper1 < css::accessibility::XAccessible + > AccessibleTabListBox_Base; + +/** !!! */ +class AccessibleTabListBox + :public AccessibleBrowseBox + ,public AccessibleTabListBox_Base + ,public ::svt::IAccessibleTabListBox +{ +private: + VclPtr m_pTabListBox; + +public: + /** ctor() + @param rxParent XAccessible interface of the parent object. + @param rBox The HeaderTabListBox control. */ + AccessibleTabListBox( + const css::uno::Reference< css::accessibility::XAccessible >& rxParent, + SvHeaderTabListBox& rBox ); + +public: + // XInterface + DECLARE_XINTERFACE( ) + // XTypeProvider + DECLARE_XTYPEPROVIDER( ) + + // XAccessibleContext ----------------------------------------------------- + + /** @return The count of visible children. */ + virtual sal_Int32 SAL_CALL getAccessibleChildCount() + throw ( css::uno::RuntimeException, std::exception ) override; + + /** @return The XAccessible interface of the specified child. */ + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL + getAccessibleChild( sal_Int32 nChildIndex ) + throw ( css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception ) override; + + // XAccessibleContext + css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext() throw ( css::uno::RuntimeException, std::exception ) override; + + // IAccessibleTabListBox + virtual css::uno::Reference< css::accessibility::XAccessible > + getMyself() override + { + return this; + } + + css::uno::Reference< css::accessibility::XAccessible > + getHeaderBar() override + { + return AccessibleBrowseBox::getHeaderBar( svt::BBTYPE_COLUMNHEADERBAR ); + } + +protected: + /** dtor() */ + virtual ~AccessibleTabListBox(); + + /** This method creates and returns an accessible table. + @return An AccessibleBrowseBoxTable. */ + virtual AccessibleBrowseBoxTable* createAccessibleTable() override; +}; + + +} // namespace accessibility + + +#endif // INCLUDED_ACCESSIBILITY_INC_EXTENDED_ACCESSIBLETABLISTBOX_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/extended/accessibletablistboxtable.hxx b/accessibility/inc/extended/accessibletablistboxtable.hxx new file mode 100644 index 000000000000..feb9aad59635 --- /dev/null +++ b/accessibility/inc/extended/accessibletablistboxtable.hxx @@ -0,0 +1,109 @@ +/* -*- 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_ACCESSIBLETABLISTBOXTABLE_HXX +#define INCLUDED_ACCESSIBILITY_INC_EXTENDED_ACCESSIBLETABLISTBOXTABLE_HXX + +#include "AccessibleBrowseBoxTable.hxx" +#include +#include +#include + +class SvHeaderTabListBox; + + +namespace accessibility { + +typedef ::cppu::ImplHelper1< css::accessibility::XAccessibleSelection > + AccessibleTabListBoxTableImplHelper; + +class AccessibleTabListBoxTable : public AccessibleBrowseBoxTable, public AccessibleTabListBoxTableImplHelper +{ +private: + VclPtr m_pTabListBox; + + css::uno::Reference< css::accessibility::XAccessible > m_xCurChild; + + void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ); + DECL_LINK_TYPED( WindowEventListener, VclWindowEvent&, void ); + + // helpers ---------------------------------------------------------------- + + /** Throws an exception, if nIndex is not a valid child index. */ + void ensureValidIndex( sal_Int32 _nIndex ) const; + + /** Returns true, if the specified row is selected. */ + bool implIsRowSelected( sal_Int32 _nRow ) const; + /** Selects the specified row. */ + void implSelectRow( sal_Int32 _nRow, bool _bSelect ); + + /** Returns the count of rows in the table. */ + sal_Int32 implGetRowCount() const override; + /** Returns the total column count in the table. */ + sal_Int32 implGetColumnCount() const override; + /** Returns the count of selected rows in the table. */ + sal_Int32 implGetSelRowCount() const; + /** Returns the total cell count in the table (including header). */ + inline sal_Int32 implGetCellCount() const { return implGetRowCount() * implGetColumnCount(); } + + /** Returns the row index from cell index. */ + inline sal_Int32 implGetRow( sal_Int32 _nIndex ) const { return _nIndex / implGetColumnCount(); } + /** Returns the absolute row index of the nSelRow-th selected row. */ + sal_Int32 implGetSelRow( sal_Int32 _nSelRow ) const; + +public: + /** ctor() + @param rxParent XAccessible interface of the parent object. + @param rBox The HeaderTabListBox control. */ + AccessibleTabListBoxTable( + const css::uno::Reference< css::accessibility::XAccessible >& rxParent, + SvHeaderTabListBox& rBox ); + +protected: + /** dtor() */ + virtual ~AccessibleTabListBoxTable(); + +public: + // XInterface + DECLARE_XINTERFACE( ) + + // XTypeProvider + DECLARE_XTYPEPROVIDER( ) + + // XServiceInfo + virtual OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleSelection + void SAL_CALL selectAccessibleChild( sal_Int32 nChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + sal_Bool SAL_CALL isAccessibleChildSelected( sal_Int32 nChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + void SAL_CALL clearAccessibleSelection( ) throw (css::uno::RuntimeException, std::exception) override; + void SAL_CALL selectAllAccessibleChildren( ) throw (css::uno::RuntimeException, std::exception) override; + sal_Int32 SAL_CALL getSelectedAccessibleChildCount( ) throw (css::uno::RuntimeException, std::exception) override; + css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + void SAL_CALL deselectAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; +}; + + +} // namespace accessibility + + +#endif // INCLUDED_ACCESSIBILITY_INC_EXTENDED_ACCESSIBLETABLISTBOXTABLE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/extended/listboxaccessible.hxx b/accessibility/inc/extended/listboxaccessible.hxx new file mode 100644 index 000000000000..ef673d93f4fe --- /dev/null +++ b/accessibility/inc/extended/listboxaccessible.hxx @@ -0,0 +1,84 @@ +/* -*- 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 +#include +#include + +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 m_pWindow; + + protected: + inline SvTreeListBox* getListBox() const + { + return const_cast< ListBoxAccessibleBase* >( this )->m_pWindow; + } + + inline bool isAlive() const { return nullptr != m_pWindow; } + + public: + ListBoxAccessibleBase( SvTreeListBox& _rWindow ); + + protected: + virtual ~ListBoxAccessibleBase( ); + + // own overridables + /// will be called for any VclWindowEvent events broadcasted by our VCL window + void ProcessWindowEvent( const VclWindowEvent& _rVclWindowEvent ); + + /** will be called when our window broadcasts the VCLEVENT_OBJECT_DYING event + +

Usually, you derive your class from both ListBoxAccessibleBase and XComponent, + and call XComponent::dispose here.

+ */ + virtual void SAL_CALL dispose() throw ( css::uno::RuntimeException, std::exception ) = 0; + + /// to be called in the dispose method of your derived class + void disposing(); + + private: + DECL_LINK_TYPED( 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: */ diff --git a/accessibility/inc/extended/textwindowaccessibility.hxx b/accessibility/inc/extended/textwindowaccessibility.hxx new file mode 100644 index 000000000000..70fa94f2cb88 --- /dev/null +++ b/accessibility/inc/extended/textwindowaccessibility.hxx @@ -0,0 +1,693 @@ +/* -*- 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_TEXTWINDOWACCESSIBILITY_HXX +#define INCLUDED_ACCESSIBILITY_INC_EXTENDED_TEXTWINDOWACCESSIBILITY_HXX + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +class TextEngine; +class TextView; + +namespace accessibility +{ + +class Document; + +class SfxListenerGuard +{ +public: + inline SfxListenerGuard(::SfxListener & rListener): + m_rListener(rListener), m_pNotifier(nullptr) {} + + inline ~SfxListenerGuard() { endListening(); } + + // Not thread safe: + void startListening(::SfxBroadcaster & rNotifier); + + // Not thread safe: + void endListening(); + +private: + ::SfxListener & m_rListener; + ::SfxBroadcaster * m_pNotifier; +}; + +class WindowListenerGuard +{ +public: + inline WindowListenerGuard(::Link const & rListener): + m_aListener(rListener), m_pNotifier(nullptr) {} + + inline ~WindowListenerGuard() { endListening(); } + + // Not thread safe: + void startListening(vcl::Window & rNotifier); + + // Not thread safe: + void endListening(); + +private: + ::Link m_aListener; + VclPtr m_pNotifier; +}; + +class ParagraphInfo +{ +public: + inline ParagraphInfo(::sal_Int32 nHeight): m_nHeight(nHeight) {} + + inline + css::uno::WeakReference< css::accessibility::XAccessible > const & + getParagraph() const { return m_xParagraph; } + + inline ::sal_Int32 getHeight() const { return m_nHeight; } + + inline void setParagraph( + css::uno::Reference< css::accessibility::XAccessible > const & + rParagraph) { m_xParagraph = rParagraph; } + + inline void changeHeight(::sal_Int32 nHeight) { m_nHeight = nHeight; } + +private: + css::uno::WeakReference< css::accessibility::XAccessible > + m_xParagraph; + ::sal_Int32 m_nHeight; +}; + +typedef ::std::vector< ParagraphInfo > Paragraphs; + +typedef ::cppu::WeakAggComponentImplHelper7< + css::accessibility::XAccessible, + css::accessibility::XAccessibleContext, + css::accessibility::XAccessibleComponent, + css::accessibility::XAccessibleEditableText, + css::accessibility::XAccessibleMultiLineText, + css::accessibility::XAccessibleTextAttributes, + css::accessibility::XAccessibleEventBroadcaster > ParagraphBase; + +// The Paragraph's number is the absolute position within the text engine (from +// 0 to N - 1), whereas the Paragraph's index is the position within the text +// view/accessible parent (from 0 to M - 1). Paragraphs outside the currently +// visible range have an index of -1. +class Paragraph: + private cppu::BaseMutex, public ParagraphBase, private ::comphelper::OCommonAccessibleText +{ +public: + Paragraph(::rtl::Reference< Document > const & rDocument, + Paragraphs::size_type nNumber); + + // Not thread-safe. + inline Paragraphs::size_type getNumber() const { return m_nNumber; } + + // Not thread-safe. + void numberChanged(bool bIncremented); + + // Not thread-safe. + void textChanged(); + + // Thread-safe. + void notifyEvent(::sal_Int16 nEventId, css::uno::Any const & rOldValue, + css::uno::Any const & rNewValue); + +protected: + // OCommonAccessibleText + virtual void implGetParagraphBoundary( css::i18n::Boundary& rBoundary, + ::sal_Int32 nIndex ) override; + virtual void implGetLineBoundary( css::i18n::Boundary& rBoundary, + ::sal_Int32 nIndex ) override; + +private: + virtual css::uno::Reference< css::accessibility::XAccessibleContext > + SAL_CALL getAccessibleContext() throw (css::uno::RuntimeException, std::exception) override; + + virtual ::sal_Int32 SAL_CALL getAccessibleChildCount() + throw (css::uno::RuntimeException, std::exception) override; + + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL + getAccessibleChild(::sal_Int32 i) + throw (css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception) override; + + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL + getAccessibleParent() throw (css::uno::RuntimeException, std::exception) override; + + virtual ::sal_Int32 SAL_CALL getAccessibleIndexInParent() + throw (css::uno::RuntimeException, std::exception) override; + + virtual ::sal_Int16 SAL_CALL getAccessibleRole() + throw (css::uno::RuntimeException, std::exception) override; + + virtual OUString SAL_CALL getAccessibleDescription() + throw (css::uno::RuntimeException, std::exception) override; + + virtual OUString SAL_CALL getAccessibleName() + throw (css::uno::RuntimeException, std::exception) override; + + virtual + css::uno::Reference< css::accessibility::XAccessibleRelationSet > + SAL_CALL getAccessibleRelationSet() throw (css::uno::RuntimeException, std::exception) override; + + virtual + css::uno::Reference< css::accessibility::XAccessibleStateSet > SAL_CALL + getAccessibleStateSet() throw (css::uno::RuntimeException, std::exception) override; + + virtual css::lang::Locale SAL_CALL getLocale() + throw (css::accessibility::IllegalAccessibleComponentStateException, + css::uno::RuntimeException, std::exception) override; + + virtual sal_Bool SAL_CALL containsPoint(css::awt::Point const & rPoint) + throw (css::uno::RuntimeException, std::exception) override; + + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL + getAccessibleAtPoint(css::awt::Point const & rPoint) + throw (css::uno::RuntimeException, std::exception) override; + + virtual css::awt::Rectangle SAL_CALL getBounds() + throw (css::uno::RuntimeException, std::exception) override; + + virtual css::awt::Point SAL_CALL getLocation() + throw (css::uno::RuntimeException, std::exception) override; + + virtual css::awt::Point SAL_CALL getLocationOnScreen() + throw (css::uno::RuntimeException, std::exception) override; + + virtual css::awt::Size SAL_CALL getSize() + throw (css::uno::RuntimeException, std::exception) override; + + virtual void SAL_CALL grabFocus() throw (css::uno::RuntimeException, std::exception) override; + + virtual css::util::Color SAL_CALL getForeground() + throw (css::uno::RuntimeException, std::exception) override; + + virtual css::util::Color SAL_CALL getBackground() + throw (css::uno::RuntimeException, std::exception) override; + + virtual ::sal_Int32 SAL_CALL getCaretPosition() + throw (css::uno::RuntimeException, std::exception) override; + + virtual sal_Bool SAL_CALL setCaretPosition(::sal_Int32 nIndex) + throw (css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception) override; + + virtual ::sal_Unicode SAL_CALL getCharacter(::sal_Int32 nIndex) + throw (css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception) override; + + virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL + getCharacterAttributes(::sal_Int32 nIndex, const css::uno::Sequence< OUString >& aRequestedAttributes ) + throw (css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception) override; + + virtual css::awt::Rectangle SAL_CALL + getCharacterBounds(::sal_Int32 nIndex) + throw (css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception) override; + + virtual ::sal_Int32 SAL_CALL getCharacterCount() + throw (css::uno::RuntimeException, std::exception) override; + + virtual ::sal_Int32 SAL_CALL + getIndexAtPoint(css::awt::Point const & rPoint) + throw (css::uno::RuntimeException, std::exception) override; + + virtual OUString SAL_CALL getSelectedText() + throw (css::uno::RuntimeException, std::exception) override; + + virtual ::sal_Int32 SAL_CALL getSelectionStart() + throw (css::uno::RuntimeException, std::exception) override; + + virtual ::sal_Int32 SAL_CALL getSelectionEnd() + throw (css::uno::RuntimeException, std::exception) override; + + virtual sal_Bool SAL_CALL setSelection(::sal_Int32 nStartIndex, + ::sal_Int32 nEndIndex) + throw (css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception) override; + + virtual OUString SAL_CALL getText() + throw (css::uno::RuntimeException, std::exception) override; + + virtual OUString SAL_CALL getTextRange(::sal_Int32 nStartIndex, + ::sal_Int32 nEndIndex) + throw (css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception) override; + + virtual css::accessibility::TextSegment SAL_CALL getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (css::lang::IndexOutOfBoundsException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override; + virtual css::accessibility::TextSegment SAL_CALL getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (css::lang::IndexOutOfBoundsException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override; + virtual css::accessibility::TextSegment SAL_CALL getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (css::lang::IndexOutOfBoundsException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override; + + virtual sal_Bool SAL_CALL copyText(::sal_Int32 nStartIndex, + ::sal_Int32 nEndIndex) + throw (css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception) override; + + virtual sal_Bool SAL_CALL cutText(::sal_Int32 nStartIndex, + ::sal_Int32 nEndIndex) + throw (css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception) override; + + virtual sal_Bool SAL_CALL pasteText(::sal_Int32 nIndex) + throw (css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception) override; + + virtual sal_Bool SAL_CALL deleteText(::sal_Int32 nStartIndex, + ::sal_Int32 nEndIndex) + throw (css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception) override; + + virtual sal_Bool SAL_CALL insertText(OUString const & rText, + ::sal_Int32 nIndex) + throw (css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception) override; + + virtual sal_Bool SAL_CALL replaceText( + ::sal_Int32 nStartIndex, ::sal_Int32 nEndIndex, + OUString const & rReplacement) + throw (css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception) override; + + virtual sal_Bool SAL_CALL setAttributes( + ::sal_Int32 nStartIndex, ::sal_Int32 nEndIndex, + css::uno::Sequence< css::beans::PropertyValue > const & + rAttributeSet) + throw (css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception) override; + + virtual sal_Bool SAL_CALL setText(OUString const & rText) + throw (css::uno::RuntimeException, std::exception) override; + + virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL + getDefaultAttributes(const css::uno::Sequence< OUString >& RequestedAttributes) + throw (css::uno::RuntimeException, std::exception) override; + + virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL + getRunAttributes(::sal_Int32 Index, const css::uno::Sequence< OUString >& RequestedAttributes) + throw (css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception) override; + + virtual ::sal_Int32 SAL_CALL getLineNumberAtIndex( ::sal_Int32 nIndex ) + throw (css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception) override; + + virtual css::accessibility::TextSegment SAL_CALL getTextAtLineNumber( ::sal_Int32 nLineNo ) + throw (css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception) override; + + virtual css::accessibility::TextSegment SAL_CALL getTextAtLineWithCaret( ) + throw (css::uno::RuntimeException, std::exception) override; + + virtual ::sal_Int32 SAL_CALL getNumberOfLineWithCaret( ) + throw (css::uno::RuntimeException, std::exception) override; + + virtual void SAL_CALL addAccessibleEventListener( + css::uno::Reference< + css::accessibility::XAccessibleEventListener > const & rListener) + throw (css::uno::RuntimeException, std::exception) override; + + virtual void SAL_CALL removeAccessibleEventListener( + css::uno::Reference< + css::accessibility::XAccessibleEventListener > const & rListener) + throw (css::uno::RuntimeException, std::exception) override; + + virtual void SAL_CALL disposing() override; + + virtual OUString implGetText() override; + + virtual css::lang::Locale implGetLocale() override; + + virtual void implGetSelection(::sal_Int32 & rStartIndex, + ::sal_Int32 & rEndIndex) override; + + // Throws css::lang::DisposedException: + void checkDisposed(); + + ::rtl::Reference< Document > m_xDocument; + Paragraphs::size_type m_nNumber; + + /// client id in the AccessibleEventNotifier queue + sal_uInt32 m_nClientId; + + OUString m_aParagraphText; +}; + + +typedef std::unordered_map< OUString, + css::beans::PropertyValue, + OUStringHash > tPropValMap; + +class Document: public ::VCLXAccessibleComponent, public ::SfxListener +{ +public: + Document(::VCLXWindow * pVclXWindow, ::TextEngine & rEngine, + ::TextView & rView); + + const css::uno::Reference< css::accessibility::XAccessible >& + getAccessible() { return m_xAccessible; } + + // Must be called only after init has been called. + css::lang::Locale retrieveLocale(); + + // Must be called only after init has been called. + // To make it possible for this method to be (indirectly) called from + // within Paragraph's constructor (i.e., when the Paragraph's ref count is + // still zero), pass a "Paragraph const *" instead of a + // "::rtl::Reference< Paragraph > const &". + ::sal_Int32 retrieveParagraphIndex(Paragraph const * pParagraph); + + // Must be called only after init has been called. + // To make it possible for this method to be (indirectly) called from + // within Paragraph's constructor (i.e., when the Paragraph's ref count is + // still zero), pass a "Paragraph const *" instead of a + // "::rtl::Reference< Paragraph > const &". + ::sal_Int64 retrieveParagraphState(Paragraph const * pParagraph); + + // Must be called only after init has been called. + // To make it possible for this method to be (indirectly) called from + // within Paragraph's constructor (i.e., when the Paragraph's ref count is + // still zero), pass a "Paragraph const &" instead of a + // "::rtl::Reference< Paragraph > const &". + css::awt::Rectangle + retrieveParagraphBounds(Paragraph const * pParagraph, bool bAbsolute); + + // Must be called only after init has been called. + // To make it possible for this method to be (indirectly) called from + // within Paragraph's constructor (i.e., when the Paragraph's ref count is + // still zero), pass a "Paragraph const &" instead of a + // "::rtl::Reference< Paragraph > const &". + OUString retrieveParagraphText(Paragraph const * pParagraph); + + // Must be called only after init has been called. + // To make it possible for this method to be (indirectly) called from + // within Paragraph's constructor (i.e., when the Paragraph's ref count is + // still zero), pass a "Paragraph const &" instead of a + // "::rtl::Reference< Paragraph > const &". + void retrieveParagraphSelection(Paragraph const * pParagraph, + ::sal_Int32 * pBegin, ::sal_Int32 * pEnd); + + // Must be called only after init has been called. + // To make it possible for this method to be (indirectly) called from + // within Paragraph's constructor (i.e., when the Paragraph's ref count is + // still zero), pass a "Paragraph const *" instead of a + // "::rtl::Reference< Paragraph > const &". + ::sal_Int32 retrieveParagraphCaretPosition(Paragraph const * pParagraph); + + // Must be called only after init has been called. + // To make it possible for this method to be (indirectly) called from + // within Paragraph's constructor (i.e., when the Paragraph's ref count is + // still zero), pass a "Paragraph const &" instead of a + // "::rtl::Reference< Paragraph > const &". + // Throws css::lang::IndexOutOfBoundsException. + css::awt::Rectangle + retrieveCharacterBounds(Paragraph const * pParagraph, + ::sal_Int32 nIndex); + + // Must be called only after init has been called. + // To make it possible for this method to be (indirectly) called from + // within Paragraph's constructor (i.e., when the Paragraph's ref count is + // still zero), pass a "Paragraph const &" instead of a + // "::rtl::Reference< Paragraph > const &". + ::sal_Int32 retrieveCharacterIndex(Paragraph const * pParagraph, + css::awt::Point const & rPoint); + + // Must be called only after init has been called. + // To make it possible for this method to be (indirectly) called from + // within Paragraph's constructor (i.e., when the Paragraph's ref count is + // still zero), pass a "Paragraph const &" instead of a + // "::rtl::Reference< Paragraph > const &". + // Throws css::lang::IndexOutOfBoundsException. + css::uno::Sequence< css::beans::PropertyValue > retrieveCharacterAttributes( + Paragraph const * pParagraph, ::sal_Int32 nIndex, + const css::uno::Sequence< OUString >& aRequestedAttributes); + + // Must be called only after init has been called. + // To make it possible for this method to be (indirectly) called from + // within Paragraph's constructor (i.e., when the Paragraph's ref count is + // still zero), pass a "Paragraph const &" instead of a + // "::rtl::Reference< Paragraph > const &". + css::uno::Sequence< css::beans::PropertyValue > retrieveDefaultAttributes( + Paragraph const * pParagraph, + const css::uno::Sequence< OUString >& RequestedAttributes); + + // Must be called only after init has been called. + // To make it possible for this method to be (indirectly) called from + // within Paragraph's constructor (i.e., when the Paragraph's ref count is + // still zero), pass a "Paragraph const &" instead of a + // "::rtl::Reference< Paragraph > const &". + // Throws css::lang::IndexOutOfBoundsException. + css::uno::Sequence< css::beans::PropertyValue > retrieveRunAttributes( + Paragraph const * pParagraph, ::sal_Int32 Index, + const css::uno::Sequence< OUString >& RequestedAttributes); + + // Must be called only after init has been called. + // To make it possible for this method to be (indirectly) called from + // within Paragraph's constructor (i.e., when the Paragraph's ref count is + // still zero), pass a "Paragraph const &" instead of a + // "::rtl::Reference< Paragraph > const &". + void changeParagraphText(Paragraph * pParagraph, + OUString const & rText); + + // Must be called only after init has been called. + // To make it possible for this method to be (indirectly) called from + // within Paragraph's constructor (i.e., when the Paragraph's ref count is + // still zero), pass a "Paragraph const &" instead of a + // "::rtl::Reference< Paragraph > const &". + // Throws css::lang::IndexOutOfBoundsException. + void changeParagraphText(Paragraph * pParagraph, ::sal_Int32 nBegin, + ::sal_Int32 nEnd, bool bCut, bool bPaste, + OUString const & rText); + + // Must be called only after init has been called. + // To make it possible for this method to be (indirectly) called from + // within Paragraph's constructor (i.e., when the Paragraph's ref count is + // still zero), pass a "Paragraph const &" instead of a + // "::rtl::Reference< Paragraph > const &". + // Throws css::lang::IndexOutOfBoundsException. + void copyParagraphText(Paragraph const * pParagraph, + ::sal_Int32 nBegin, ::sal_Int32 nEnd); + + // Must be called only after init has been called. + // To make it possible for this method to be (indirectly) called from + // within Paragraph's constructor (i.e., when the Paragraph's ref count is + // still zero), pass a "Paragraph const &" instead of a + // "::rtl::Reference< Paragraph > const &". + // Throws css::lang::IndexOutOfBoundsException. + void changeParagraphAttributes( + Paragraph * pParagraph, ::sal_Int32 nBegin, ::sal_Int32 nEnd, + css::uno::Sequence< css::beans::PropertyValue > const & + rAttributeSet); + + // Must be called only after init has been called. + // To make it possible for this method to be (indirectly) called from + // within Paragraph's constructor (i.e., when the Paragraph's ref count is + // still zero), pass a "Paragraph const &" instead of a + // "::rtl::Reference< Paragraph > const &". + // Throws css::lang::IndexOutOfBoundsException. + void changeParagraphSelection(Paragraph * pParagraph, + ::sal_Int32 nBegin, ::sal_Int32 nEnd); + + css::i18n::Boundary + retrieveParagraphLineBoundary( Paragraph const * pParagraph, + ::sal_Int32 nIndex, ::sal_Int32 *pLineNo = nullptr); + + css::i18n::Boundary + retrieveParagraphBoundaryOfLine( Paragraph const * pParagraph, + ::sal_Int32 nIndex ); + + sal_Int32 retrieveParagraphLineWithCursor( Paragraph const * pParagraph ); + + css::uno::Reference< css::accessibility::XAccessibleRelationSet > + retrieveParagraphRelationSet( Paragraph const * pParagraph ); + +private: + virtual ::sal_Int32 SAL_CALL getAccessibleChildCount() + throw (css::uno::RuntimeException, std::exception) override; + + virtual css::uno::Reference< css::accessibility::XAccessible > + SAL_CALL getAccessibleChild(::sal_Int32 i) + throw (css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception) override; + + virtual ::sal_Int16 SAL_CALL getAccessibleRole() + throw (css::uno::RuntimeException, std::exception) override; + + virtual css::uno::Reference< css::accessibility::XAccessible > + SAL_CALL getAccessibleAtPoint(css::awt::Point const & rPoint) + throw (css::uno::RuntimeException, std::exception) override; + + virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ) override; + virtual void FillAccessibleRelationSet( utl::AccessibleRelationSetHelper& rRelationSet ) override; + + // ??? Will be called with both the external (Solar) and internal mutex + // locked: + virtual void SAL_CALL disposing() override; + + // ??? Will be called with the external (Solar) mutex locked. + // init will already have been called. + virtual void Notify(::SfxBroadcaster & rBC, ::SfxHint const & rHint) override; + + // Assuming that this will only be called with the external (Solar) mutex + // locked. + // init will already have been called. + DECL_LINK_TYPED(WindowEventHandler, VclWindowEvent&, void); + + // Must be called with both the external (Solar) and internal mutex + // locked. + void init(); + + // Must be called with both the external (Solar) and internal mutex + // locked, and after init has been called: + static ::rtl::Reference< Paragraph > + getParagraph(Paragraphs::iterator const & rIt); + + // Must be called with both the external (Solar) and internal mutex + // locked, and after init has been called. + // Throws css::uno::RuntimeException. + css::uno::Reference< css::accessibility::XAccessible > + getAccessibleChild(Paragraphs::iterator const & rIt); + + // Must be called with both the external (Solar) and internal mutex + // locked, and after init has been called: + void determineVisibleRange(); + + // Must be called with both the external (Solar) and internal mutex + // locked, and after init has been called: + void notifyVisibleRangeChanges( + Paragraphs::iterator const & rOldVisibleBegin, + Paragraphs::iterator const & rOldVisibleEnd, + Paragraphs::iterator const & rInserted); + + // Must be called with both the external (Solar) and internal mutex + // locked, and after init has been called: + void changeParagraphText(::sal_uLong nNumber, ::sal_uInt16 nBegin, ::sal_uInt16 nEnd, + bool bCut, bool bPaste, + OUString const & rText); + + void + handleParagraphNotifications(); + + void handleSelectionChangeNotification(); + + ::sal_Int32 getSelectionType(::sal_Int32 nNewFirstPara, ::sal_Int32 nNewFirstPos, ::sal_Int32 nNewLastPara, ::sal_Int32 nNewLastPos); + void sendEvent(::sal_Int32 start, ::sal_Int32 end, ::sal_Int16 nEventId); + + void disposeParagraphs(); + + static css::uno::Any mapFontColor(::Color const & rColor); + + static ::Color mapFontColor(css::uno::Any const & rColor); + + static css::uno::Any mapFontWeight(::FontWeight nWeight); + + static ::FontWeight mapFontWeight(css::uno::Any const & rWeight); + + static void retrieveDefaultAttributesImpl( + Paragraph const * pParagraph, + const css::uno::Sequence< OUString >& RequestedAttributes, + tPropValMap& rDefAttrSeq); + + void retrieveRunAttributesImpl( + Paragraph const * pParagraph, ::sal_Int32 Index, + const css::uno::Sequence< OUString >& RequestedAttributes, + tPropValMap& rRunAttrSeq); + + css::uno::Reference< css::accessibility::XAccessible > m_xAccessible; + ::TextEngine & m_rEngine; + ::TextView & m_rView; + + SfxListenerGuard m_aEngineListener; + WindowListenerGuard m_aViewListener; + + // All the following members have valid values only after calling init: + + std::unique_ptr< Paragraphs > m_xParagraphs; + + // m_nViewOffset is from the start of the document (0) to the start of the + // current view, and m_nViewHeight is the height of the view: + ::sal_Int32 m_nViewOffset; + ::sal_Int32 m_nViewHeight; + + // m_aVisibleBegin points to the first Paragraph that is (partially) + // contained in the view, and m_aVisibleEnd points past the last Paragraph + // that is (partially) contained. If no Paragraphs are (partially) in the + // view, both m_aVisibleBegin and m_aVisibleEnd are set to + // m_xParagraphs->end(). These values are only changed by + // determineVisibleRange. + Paragraphs::iterator m_aVisibleBegin; + Paragraphs::iterator m_aVisibleEnd; + + // m_nVisibleBeginOffset is from m_nViewOffset back to the start of the + // Paragraph pointed to by m_aVisibleBegin (and always has a non-negative + // value). If m_aVisibleBegin == m_xParagraphs->end(), + // m_nVisibleBeginOffset is set to 0. These values are only changed by + // determineVisibleRange. + ::sal_Int32 m_nVisibleBeginOffset; + + // If no selection has yet been set, all the following four variables are + // set to -1. m_nSelectionLastPara/Pos is also the cursor position. + ::sal_Int32 m_nSelectionFirstPara; + ::sal_Int32 m_nSelectionFirstPos; + ::sal_Int32 m_nSelectionLastPara; + ::sal_Int32 m_nSelectionLastPos; + + Paragraphs::iterator m_aFocused; + + ::std::queue< ::TextHint > m_aParagraphNotifications; + bool m_bSelectionChangedNotification; +}; + +} + +#endif // INCLUDED_ACCESSIBILITY_INC_EXTENDED_TEXTWINDOWACCESSIBILITY_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/helper/IComboListBoxHelper.hxx b/accessibility/inc/helper/IComboListBoxHelper.hxx new file mode 100644 index 000000000000..8d528be793db --- /dev/null +++ b/accessibility/inc/helper/IComboListBoxHelper.hxx @@ -0,0 +1,69 @@ +/* -*- 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_HELPER_ICOMBOLISTBOXHELPER_HXX +#define INCLUDED_ACCESSIBILITY_INC_HELPER_ICOMBOLISTBOXHELPER_HXX + +#include + +#include +#include + +namespace com { namespace sun { namespace star { namespace datatransfer { namespace clipboard { + class XClipboard; +} } } } } + +class Point; +class Rectangle; +namespace vcl { class Window; } +namespace accessibility +{ + class IComboListBoxHelper + { + public: + virtual ~IComboListBoxHelper() = 0; + + virtual OUString GetEntry( sal_Int32 nPos ) const = 0; + virtual Rectangle GetDropDownPosSizePixel( ) const = 0; + virtual Rectangle GetBoundingRectangle( sal_uInt16 nItem ) const = 0; + virtual Rectangle GetWindowExtentsRelative() = 0; + virtual bool IsEnabled() const = 0; + virtual bool IsEntryVisible( sal_Int32 nPos ) const = 0; + virtual sal_uInt16 GetDisplayLineCount() const = 0; + virtual void GetMaxVisColumnsAndLines( sal_uInt16& rnCols, sal_uInt16& rnLines ) const = 0; + virtual WinBits GetStyle() const = 0; + virtual bool IsMultiSelectionEnabled() const = 0; + virtual sal_Int32 GetTopEntry() const = 0; + virtual bool IsEntryPosSelected( sal_Int32 nPos ) const = 0; + virtual sal_Int32 GetEntryCount() const = 0; + virtual void Select() = 0; + virtual void SelectEntryPos( sal_Int32 nPos, bool bSelect = true ) = 0; + virtual sal_Int32 GetSelectEntryCount() const = 0; + virtual void SetNoSelection() = 0; + virtual sal_Int32 GetSelectEntryPos( sal_Int32 nSelIndex = 0 ) const = 0; + virtual bool IsInDropDown() const = 0; + virtual Rectangle GetEntryCharacterBounds( const sal_Int32 _nEntryPos, const sal_Int32 _nCharacterIndex ) const = 0; + virtual long GetIndexForPoint( const Point& rPoint, sal_Int32 & nPos ) const = 0; + virtual css::uno::Reference< css::datatransfer::clipboard::XClipboard > + GetClipboard() = 0; + }; +} +#endif // INCLUDED_ACCESSIBILITY_INC_HELPER_ICOMBOLISTBOXHELPER_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ + diff --git a/accessibility/inc/helper/accessiblestrings.hrc b/accessibility/inc/helper/accessiblestrings.hrc new file mode 100644 index 000000000000..60c4392a7562 --- /dev/null +++ b/accessibility/inc/helper/accessiblestrings.hrc @@ -0,0 +1,51 @@ +/* -*- 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 ACCESSIBILITY_HELPER_ACCESSIBLESTRINGS_HRC_ +#define ACCESSIBILITY_HELPER_ACCESSIBLESTRINGS_HRC_ + +#define RID_TK_ACC_START 1000 + +// Accessible Action Id's +#define RID_STR_ACC_ACTION_CLICK ( RID_TK_ACC_START + 0 ) +#define RID_STR_ACC_ACTION_TOGGLEPOPUP ( RID_TK_ACC_START + 1 ) +#define RID_STR_ACC_ACTION_SELECT ( RID_TK_ACC_START + 2 ) +#define RID_STR_ACC_ACTION_INCLINE ( RID_TK_ACC_START + 3 ) +#define RID_STR_ACC_ACTION_DECLINE ( RID_TK_ACC_START + 4 ) +#define RID_STR_ACC_ACTION_INCBLOCK ( RID_TK_ACC_START + 5 ) +#define RID_STR_ACC_ACTION_DECBLOCK ( RID_TK_ACC_START + 6 ) +#define RID_STR_ACC_NAME_PREVIEW ( RID_TK_ACC_START + 7 ) + +#define STR_SVT_ACC_ACTION_EXPAND ( RID_TK_ACC_START + 8 ) +#define STR_SVT_ACC_ACTION_COLLAPSE ( RID_TK_ACC_START + 9 ) +#define STR_SVT_ACC_LISTENTRY_SELCTED_STATE ( RID_TK_ACC_START + 10 ) + +#define RID_STR_ACC_ACTION_CHECK ( RID_TK_ACC_START + 11 ) +#define RID_STR_ACC_ACTION_UNCHECK ( RID_TK_ACC_START + 12 ) +#define RID_STR_ACC_ACTION_DOUBLE_CLICK ( RID_TK_ACC_START + 13 ) +#define RID_STR_ACC_SCROLLBAR_NAME_VERTICAL ( RID_TK_ACC_START + 14 ) +#define RID_STR_ACC_SCROLLBAR_NAME_HORIZONTAL ( RID_TK_ACC_START + 15 ) +#define RID_STR_ACC_PANEL_DESCRIPTION ( RID_TK_ACC_START + 16 ) + +#define RID_STR_ACC_NAME_BROWSEBUTTON ( RID_TK_ACC_START + 100 ) +#define RID_STR_ACC_DESC_PANELDECL_TABBAR ( RID_TK_ACC_START + 101 ) + +#endif // ACCESSIBILITY_HELPER_ACCESSIBLESTRINGS_HRC_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/helper/accresmgr.hxx b/accessibility/inc/helper/accresmgr.hxx new file mode 100644 index 000000000000..38ceaa172abd --- /dev/null +++ b/accessibility/inc/helper/accresmgr.hxx @@ -0,0 +1,66 @@ +/* -*- 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_HELPER_ACCRESMGR_HXX +#define INCLUDED_ACCESSIBILITY_INC_HELPER_ACCRESMGR_HXX + +#include + +class SimpleResMgr; + +#define TK_RES_STRING(id) ::accessibility::TkResMgr::loadString(id) + + +// TkResMgr + +namespace accessibility +{ + +class TkResMgr +{ + static SimpleResMgr* m_pImpl; + +private: + // no instantiation allowed + TkResMgr() = delete; + ~TkResMgr() { } + + // we'll instantiate one static member of the following class, + // which in its dtor ensures that m_pImpl will be deleted + class EnsureDelete + { + public: + EnsureDelete() { } + ~EnsureDelete(); + }; + friend class EnsureDelete; + +protected: + static void ensureImplExists(); + +public: + // loads the string with the specified resource id + static OUString loadString( sal_uInt16 nResId ); +}; + +} + +#endif // INCLUDED_ACCESSIBILITY_INC_HELPER_ACCRESMGR_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/helper/characterattributeshelper.hxx b/accessibility/inc/helper/characterattributeshelper.hxx new file mode 100644 index 000000000000..6b679a9d5b6a --- /dev/null +++ b/accessibility/inc/helper/characterattributeshelper.hxx @@ -0,0 +1,52 @@ +/* -*- 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_HELPER_CHARACTERATTRIBUTESHELPER_HXX +#define INCLUDED_ACCESSIBILITY_INC_HELPER_CHARACTERATTRIBUTESHELPER_HXX + +#include +#include +#include + +#include + + +// class CharacterAttributesHelper + + +class CharacterAttributesHelper +{ +private: + + typedef ::std::map< OUString, css::uno::Any > AttributeMap; + + AttributeMap m_aAttributeMap; + +public: + + CharacterAttributesHelper( const vcl::Font& rFont, sal_Int32 nBackColor, sal_Int32 nColor ); + ~CharacterAttributesHelper(); + + std::vector< css::beans::PropertyValue > GetCharacterAttributes(); + css::uno::Sequence< css::beans::PropertyValue > GetCharacterAttributes( const css::uno::Sequence< OUString >& aRequestedAttributes ); +}; + +#endif // INCLUDED_ACCESSIBILITY_INC_HELPER_CHARACTERATTRIBUTESHELPER_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/helper/listboxhelper.hxx b/accessibility/inc/helper/listboxhelper.hxx new file mode 100644 index 000000000000..9236d32a7b13 --- /dev/null +++ b/accessibility/inc/helper/listboxhelper.hxx @@ -0,0 +1,189 @@ +/* -*- 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_HELPER_LISTBOXHELPER_HXX +#define INCLUDED_ACCESSIBILITY_INC_HELPER_LISTBOXHELPER_HXX + +#include +#include +#include +#include + + +// globals + + +const sal_Int32 DEFAULT_INDEX_IN_PARENT = -1; + + +// class VCLListBoxHelper + + +template< class T > class VCLListBoxHelper : public ::accessibility::IComboListBoxHelper +{ +private: + T& m_aComboListBox; + +public: + inline + VCLListBoxHelper( T& _pListBox ) : + m_aComboListBox( _pListBox ){} + + + virtual OUString GetEntry( sal_Int32 nPos ) const override + { + return m_aComboListBox.GetEntry( nPos ); + } + + virtual Rectangle GetDropDownPosSizePixel() const override + { + Rectangle aTemp = m_aComboListBox.GetWindowExtentsRelative(nullptr); + Rectangle aRet = m_aComboListBox.GetDropDownPosSizePixel(); + aRet.Move(aTemp.TopLeft().X(),aTemp.TopLeft().Y()); + return aRet; + } + + virtual Rectangle GetBoundingRectangle( sal_uInt16 nItem ) const override + { + Rectangle aRect; + if ( m_aComboListBox.IsInDropDown() && IsEntryVisible( nItem ) ) + { + Rectangle aTemp = m_aComboListBox.GetDropDownPosSizePixel(); + Size aSize = aTemp.GetSize(); + aSize.Height() /= m_aComboListBox.GetDisplayLineCount(); + Point aTopLeft = aTemp.TopLeft(); + aTopLeft.Y() += aSize.Height() * ( nItem - m_aComboListBox.GetTopEntry() ); + aRect = Rectangle( aTopLeft, aSize ); + } + else + aRect = m_aComboListBox.GetBoundingRectangle( nItem ); + return aRect; + } + + virtual Rectangle GetWindowExtentsRelative() override + { + return m_aComboListBox.GetWindowExtentsRelative( nullptr ); + } + + virtual bool IsEnabled() const override + { + return m_aComboListBox.IsEnabled(); + } + + virtual bool IsEntryVisible( sal_Int32 nPos ) const override + { + sal_Int32 nTopEntry = m_aComboListBox.GetTopEntry(); + sal_uInt16 nLines = m_aComboListBox.GetDisplayLineCount(); + return ( nPos >= nTopEntry && nPos < ( nTopEntry + nLines ) ); + } + + virtual sal_uInt16 GetDisplayLineCount() const override + { + return m_aComboListBox.GetDisplayLineCount(); + } + + virtual void GetMaxVisColumnsAndLines( sal_uInt16& rnCols, sal_uInt16& rnLines ) const override + { + m_aComboListBox.GetMaxVisColumnsAndLines(rnCols,rnLines); + } + + virtual WinBits GetStyle() const override + { + return m_aComboListBox.GetStyle(); + } + + virtual bool IsMultiSelectionEnabled() const override + { + return m_aComboListBox.IsMultiSelectionEnabled(); + } + + virtual sal_Int32 GetTopEntry() const override + { + return m_aComboListBox.GetTopEntry(); + } + + virtual bool IsEntryPosSelected( sal_Int32 nPos ) const override + { + return m_aComboListBox.IsEntryPosSelected(nPos); + } + + virtual sal_Int32 GetEntryCount() const override + { + return m_aComboListBox.GetEntryCount(); + } + + virtual void Select() override + { + m_aComboListBox.Select(); + } + + virtual void SelectEntryPos( sal_Int32 nPos, bool bSelect = true ) override + { + m_aComboListBox.SelectEntryPos(nPos,bSelect); + } + + virtual sal_Int32 GetSelectEntryCount() const override + { + return m_aComboListBox.GetSelectEntryCount(); + } + + virtual void SetNoSelection() override + { + m_aComboListBox.SetNoSelection(); + } + + virtual sal_Int32 GetSelectEntryPos( sal_Int32 nSelIndex = 0 ) const override + { + return m_aComboListBox.GetSelectEntryPos(nSelIndex); + } + + virtual bool IsInDropDown() const override + { + return m_aComboListBox.IsInDropDown(); + } + + virtual Rectangle GetEntryCharacterBounds( const sal_Int32 _nEntryPos, const sal_Int32 _nCharacterIndex ) const override + { + Rectangle aRect; + + Pair aEntryCharacterRange = m_aComboListBox.GetLineStartEnd( _nEntryPos ); + if ( aEntryCharacterRange.A() + _nCharacterIndex <= aEntryCharacterRange.B() ) + { + long nIndex = aEntryCharacterRange.A() + _nCharacterIndex; + aRect = m_aComboListBox.GetCharacterBounds( nIndex ); + } + return aRect; + } + + long GetIndexForPoint( const Point& rPoint, sal_Int32& nPos ) const override + { + return m_aComboListBox.GetIndexForPoint( rPoint, nPos ); + } + + css::uno::Reference< css::datatransfer::clipboard::XClipboard > + GetClipboard() override + { + return m_aComboListBox.GetClipboard(); + } + +}; + +#endif // INCLUDED_ACCESSIBILITY_INC_HELPER_LISTBOXHELPER_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/pch/precompiled_acc.hxx b/accessibility/inc/pch/precompiled_acc.hxx index c0ab3af65eb0..f0c4ba2f934a 100644 --- a/accessibility/inc/pch/precompiled_acc.hxx +++ b/accessibility/inc/pch/precompiled_acc.hxx @@ -337,21 +337,21 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/standard/accessiblemenubasecomponent.hxx b/accessibility/inc/standard/accessiblemenubasecomponent.hxx new file mode 100644 index 000000000000..167c957c5aca --- /dev/null +++ b/accessibility/inc/standard/accessiblemenubasecomponent.hxx @@ -0,0 +1,145 @@ +/* -*- 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_STANDARD_ACCESSIBLEMENUBASECOMPONENT_HXX +#define INCLUDED_ACCESSIBILITY_INC_STANDARD_ACCESSIBLEMENUBASECOMPONENT_HXX + +#include +#include +#include +#include +#include +#include + +#include + +class Menu; +class VclSimpleEvent; +class VclMenuEvent; +class VCLExternalSolarLock; + +namespace utl { +class AccessibleStateSetHelper; +} + + +// class OAccessibleMenuBaseComponent + +typedef ::cppu::ImplHelper2< + css::accessibility::XAccessible, + css::lang::XServiceInfo > OAccessibleMenuBaseComponent_BASE; + +class OAccessibleMenuBaseComponent : public comphelper::OAccessibleExtendedComponentHelper, + public OAccessibleMenuBaseComponent_BASE +{ + friend class OAccessibleMenuItemComponent; + friend class VCLXAccessibleMenuItem; + friend class VCLXAccessibleMenu; + +private: + VCLExternalSolarLock* m_pExternalLock; + +protected: + typedef ::std::vector< css::uno::Reference< css::accessibility::XAccessible > > AccessibleChildren; + + AccessibleChildren m_aAccessibleChildren; + Menu* m_pMenu; + + bool m_bEnabled; + bool m_bFocused; + bool m_bVisible; + bool m_bSelected; + bool m_bChecked; + + virtual bool IsEnabled(); + virtual bool IsFocused(); + virtual bool IsVisible(); + virtual bool IsSelected(); + virtual bool IsChecked(); + + void SetEnabled( bool bEnabled ); + void SetFocused( bool bFocused ); + void SetVisible( bool bVisible ); + void SetSelected( bool bSelected ); + void SetChecked( bool bChecked ); + + void UpdateEnabled( sal_Int32 i, bool bEnabled ); + void UpdateFocused( sal_Int32 i, bool bFocused ); + void UpdateVisible(); + void UpdateSelected( sal_Int32 i, bool bSelected ); + void UpdateChecked( sal_Int32 i, bool bChecked ); + void UpdateAccessibleName( sal_Int32 i ); + void UpdateItemText( sal_Int32 i ); + + sal_Int32 GetChildCount(); + + css::uno::Reference< css::accessibility::XAccessible > GetChild( sal_Int32 i ); + css::uno::Reference< css::accessibility::XAccessible > GetChildAt( const css::awt::Point& rPoint ); + + void InsertChild( sal_Int32 i ); + void RemoveChild( sal_Int32 i ); + + virtual bool IsHighlighted(); + bool IsChildHighlighted(); + + virtual bool IsMenuHideDisabledEntries(); + + void SelectChild( sal_Int32 i ); + void DeSelectAll(); + bool IsChildSelected( sal_Int32 i ); + + virtual void Select(); + virtual void DeSelect(); + virtual void Click(); + virtual bool IsPopupMenuOpen(); + + DECL_LINK_TYPED( MenuEventListener, VclMenuEvent&, void ); + + void ProcessMenuEvent( const VclMenuEvent& rVclMenuEvent ); + + virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ) = 0; + + // XComponent + virtual void SAL_CALL disposing() override; + +public: + OAccessibleMenuBaseComponent( Menu* pMenu ); + virtual ~OAccessibleMenuBaseComponent(); + + void SetStates(); + + // XInterface + DECLARE_XINTERFACE() + + // XTypeProvider + DECLARE_XTYPEPROVIDER() + + // XServiceInfo + virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) throw (css::uno::RuntimeException, std::exception) override; + + // XAccessible + virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( ) throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleContext + virtual css::uno::Reference< css::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet( ) throw (css::uno::RuntimeException, std::exception) override; +}; + +#endif // INCLUDED_ACCESSIBILITY_INC_STANDARD_ACCESSIBLEMENUBASECOMPONENT_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/standard/accessiblemenucomponent.hxx b/accessibility/inc/standard/accessiblemenucomponent.hxx new file mode 100644 index 000000000000..eb570e07a827 --- /dev/null +++ b/accessibility/inc/standard/accessiblemenucomponent.hxx @@ -0,0 +1,89 @@ +/* -*- 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_STANDARD_ACCESSIBLEMENUCOMPONENT_HXX +#define INCLUDED_ACCESSIBILITY_INC_STANDARD_ACCESSIBLEMENUCOMPONENT_HXX + +#include +#include +#include + + +// class OAccessibleMenuComponent + +typedef ::cppu::ImplHelper1< + css::accessibility::XAccessibleSelection > OAccessibleMenuComponent_BASE; + +class OAccessibleMenuComponent : public OAccessibleMenuBaseComponent, + public OAccessibleMenuComponent_BASE +{ +protected: + virtual bool IsEnabled() override; + virtual bool IsVisible() override; + + virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ) override; + + // OCommonAccessibleComponent + virtual css::awt::Rectangle implGetBounds( ) throw (css::uno::RuntimeException) override; + +public: + OAccessibleMenuComponent( Menu* pMenu ); + virtual ~OAccessibleMenuComponent(); + + // XInterface + DECLARE_XINTERFACE() + + // XTypeProvider + DECLARE_XTYPEPROVIDER() + + // XAccessibleContext + virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int16 SAL_CALL getAccessibleRole( ) throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getAccessibleDescription( ) throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getAccessibleName( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::lang::Locale SAL_CALL getLocale( ) throw (css::accessibility::IllegalAccessibleComponentStateException, css::uno::RuntimeException, std::exception) override; + + // XAccessibleComponent + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const css::awt::Point& aPoint ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::awt::Point SAL_CALL getLocationOnScreen( ) throw (css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL grabFocus( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getForeground( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getBackground( ) throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleExtendedComponent + virtual css::uno::Reference< css::awt::XFont > SAL_CALL getFont( ) throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getTitledBorderText( ) throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getToolTipText( ) throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleSelection + virtual void SAL_CALL selectAccessibleChild( sal_Int32 nChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL isAccessibleChildSelected( sal_Int32 nChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL clearAccessibleSelection( ) throw (css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL selectAllAccessibleChildren( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getSelectedAccessibleChildCount( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL deselectAccessibleChild( sal_Int32 nChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; +}; + +#endif // INCLUDED_ACCESSIBILITY_INC_STANDARD_ACCESSIBLEMENUCOMPONENT_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/standard/accessiblemenuitemcomponent.hxx b/accessibility/inc/standard/accessiblemenuitemcomponent.hxx new file mode 100644 index 000000000000..84d0cc22e309 --- /dev/null +++ b/accessibility/inc/standard/accessiblemenuitemcomponent.hxx @@ -0,0 +1,90 @@ +/* -*- 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_STANDARD_ACCESSIBLEMENUITEMCOMPONENT_HXX +#define INCLUDED_ACCESSIBILITY_INC_STANDARD_ACCESSIBLEMENUITEMCOMPONENT_HXX + +#include + + +// class OAccessibleMenuItemComponent + + +class OAccessibleMenuItemComponent : public OAccessibleMenuBaseComponent +{ + friend class OAccessibleMenuBaseComponent; + +protected: + Menu* m_pParent; + sal_uInt16 m_nItemPos; + OUString m_sAccessibleName; + OUString m_sItemText; + + virtual bool IsEnabled() override; + virtual bool IsVisible() override; + virtual void Select() override; + virtual void DeSelect() override; + virtual void Click() override; + + void SetItemPos( sal_uInt16 nItemPos ); + void SetAccessibleName( const OUString& sAccessibleName ); + OUString GetAccessibleName(); + void SetItemText( const OUString& sItemText ); + OUString GetItemText(); + + virtual bool IsMenuHideDisabledEntries() override; + + virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ) override; + + // OCommonAccessibleComponent + virtual css::awt::Rectangle implGetBounds( ) throw (css::uno::RuntimeException) override; + + // XComponent + virtual void SAL_CALL disposing() override; + +public: + OAccessibleMenuItemComponent( Menu* pParent, sal_uInt16 nItemPos, Menu* pMenu ); + virtual ~OAccessibleMenuItemComponent(); + + // XAccessibleContext + virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getAccessibleIndexInParent( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int16 SAL_CALL getAccessibleRole( ) throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getAccessibleDescription( ) throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getAccessibleName( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::lang::Locale SAL_CALL getLocale( ) throw (css::accessibility::IllegalAccessibleComponentStateException, css::uno::RuntimeException, std::exception) override; + + // XAccessibleComponent + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const css::awt::Point& aPoint ) throw (css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL grabFocus( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getForeground( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getBackground( ) throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleExtendedComponent + virtual css::uno::Reference< css::awt::XFont > SAL_CALL getFont( ) throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getTitledBorderText( ) throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getToolTipText( ) throw (css::uno::RuntimeException, std::exception) override; +}; + +#endif // INCLUDED_ACCESSIBILITY_INC_STANDARD_ACCESSIBLEMENUITEMCOMPONENT_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/standard/vclxaccessiblebox.hxx b/accessibility/inc/standard/vclxaccessiblebox.hxx new file mode 100644 index 000000000000..1943f1e2ce21 --- /dev/null +++ b/accessibility/inc/standard/vclxaccessiblebox.hxx @@ -0,0 +1,185 @@ +/* -*- 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_STANDARD_VCLXACCESSIBLEBOX_HXX +#define INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLEBOX_HXX + +#include +#include +#include +#include +#include +#include + + +typedef ::cppu::ImplHelper3< + css::accessibility::XAccessible, + css::accessibility::XAccessibleValue, + css::accessibility::XAccessibleAction + > VCLXAccessibleBox_BASE; + + +/** Base class for list- and combo boxes. This class manages the box' + children. The classed derived from this one have only to implement the + IsValid method and return the correct implementation name. +*/ +class VCLXAccessibleBox + : public VCLXAccessibleComponent, + public VCLXAccessibleBox_BASE +{ +public: + enum BoxType {COMBOBOX, LISTBOX}; + + /** The constructor is initialized with the box type which may be + either COMBOBOX or LISTBOX and a flag + indicating whether the box is a drop down box. + */ + VCLXAccessibleBox (VCLXWindow* pVCLXindow, BoxType aType, bool bIsDropDownBox); + + // XTypeProvider + DECLARE_XTYPEPROVIDER() + + // XInterface + DECLARE_XINTERFACE() + + + // XAccessible + + virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL + getAccessibleContext( ) throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleContext + + /** Each object has one or two children: an optional text field and the + actual list. The text field is not provided for non drop down list + boxes. + */ + sal_Int32 SAL_CALL getAccessibleChildCount() + throw (css::uno::RuntimeException, std::exception) override; + /** For drop down list boxes the text field is a not editable + VCLXAccessibleTextField, for combo boxes it is an + editable VLCAccessibleEdit. + */ + css::uno::Reference< css::accessibility::XAccessible> SAL_CALL + getAccessibleChild (sal_Int32 i) + throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + /** The role is always AccessibleRole::COMBO_BOX. + */ + sal_Int16 SAL_CALL getAccessibleRole() + throw (css::uno::RuntimeException, std::exception) override; + + sal_Int32 SAL_CALL getAccessibleIndexInParent() + throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleAction + + /** There is one action for drop down boxes and none for others. + */ + virtual sal_Int32 SAL_CALL getAccessibleActionCount() + throw (css::uno::RuntimeException, std::exception) override; + /** The action for drop down boxes lets the user toggle the visibility of the + popup menu. + */ + virtual sal_Bool SAL_CALL doAccessibleAction (sal_Int32 nIndex) + throw (css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception) override; + /** The returned string is associated with resource + RID_STR_ACC_ACTION_TOGGLEPOPUP. + */ + virtual OUString SAL_CALL getAccessibleActionDescription (sal_Int32 nIndex) + throw (css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception) override; + /** No keybinding returned so far. + */ + virtual css::uno::Reference< css::accessibility::XAccessibleKeyBinding > SAL_CALL + getAccessibleActionKeyBinding( sal_Int32 nIndex ) + throw (css::lang::IndexOutOfBoundsException, + css::uno::RuntimeException, std::exception) override; + + // XComponent + + /** This method is called from the implementation helper during an + XComponent::dispose() call. + */ + virtual void SAL_CALL disposing() override; + + // XAccessibleValue + + virtual css::uno::Any SAL_CALL getCurrentValue( ) + throw (css::uno::RuntimeException, std::exception) override; + + virtual sal_Bool SAL_CALL setCurrentValue( + const css::uno::Any& aNumber ) + throw (css::uno::RuntimeException, std::exception) override; + + virtual css::uno::Any SAL_CALL getMaximumValue( ) + throw (css::uno::RuntimeException, std::exception) override; + + virtual css::uno::Any SAL_CALL getMinimumValue( ) + throw (css::uno::RuntimeException, std::exception) override; +protected: + /** Specifies whether the box is a combo box or a list box. List boxes + have multi selection. + */ + BoxType m_aBoxType; + + /// Specifies whether the box is a drop down box and thus has an action. + bool m_bIsDropDownBox; + + /// The child that represents the text field if there is one. + css::uno::Reference< css::accessibility::XAccessible> + m_xText; + + /// The child that contains the items of this box. + css::uno::Reference< css::accessibility::XAccessible> + m_xList; + + /** This flag specifies whether an object has a text field as child + regardless of whether that child being currently instantiated or + not. + */ + bool m_bHasTextChild; + + /** This flag specifies whether an object has a list as child regardless + of whether that child being currently instantiated or not. This + flag is always true in the current implementation because the list + child is just another wrapper around this object and thus has the + same life time. + */ + bool m_bHasListChild; + + virtual ~VCLXAccessibleBox(); + + /** Returns true when the object is valid. + */ + virtual bool IsValid() const = 0; + + virtual void ProcessWindowChildEvent (const VclWindowEvent& rVclWindowEvent) override; + virtual void ProcessWindowEvent (const VclWindowEvent& rVclWindowEvent) override; + + virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ) override; + +private: + /// Index in parent. This is settable from the outside. + sal_Int32 m_nIndexInParent; +}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/standard/vclxaccessiblebutton.hxx b/accessibility/inc/standard/vclxaccessiblebutton.hxx new file mode 100644 index 000000000000..e5f4a1280cf7 --- /dev/null +++ b/accessibility/inc/standard/vclxaccessiblebutton.hxx @@ -0,0 +1,78 @@ +/* -*- 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_STANDARD_VCLXACCESSIBLEBUTTON_HXX +#define INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLEBUTTON_HXX + +#include + +#include +#include + +#include + + +// class VCLXAccessibleButton + + +typedef ::cppu::ImplHelper2< + css::accessibility::XAccessibleAction, + css::accessibility::XAccessibleValue > VCLXAccessibleButton_BASE; + +class VCLXAccessibleButton : public VCLXAccessibleTextComponent, + public VCLXAccessibleButton_BASE +{ +protected: + virtual ~VCLXAccessibleButton(); + + virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) override; + virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ) override; + +public: + VCLXAccessibleButton( VCLXWindow* pVCLXindow ); + + // XInterface + DECLARE_XINTERFACE() + + // XTypeProvider + DECLARE_XTYPEPROVIDER() + + // XServiceInfo + virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleContext + virtual OUString SAL_CALL getAccessibleName( ) throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleAction + virtual sal_Int32 SAL_CALL getAccessibleActionCount( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL doAccessibleAction ( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getAccessibleActionDescription ( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessibleKeyBinding > SAL_CALL getAccessibleActionKeyBinding( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + + // XAccessibleValue + virtual css::uno::Any SAL_CALL getCurrentValue( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL setCurrentValue( const css::uno::Any& aNumber ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Any SAL_CALL getMaximumValue( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Any SAL_CALL getMinimumValue( ) throw (css::uno::RuntimeException, std::exception) override; +}; + +#endif // INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLEBUTTON_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/standard/vclxaccessiblecheckbox.hxx b/accessibility/inc/standard/vclxaccessiblecheckbox.hxx new file mode 100644 index 000000000000..ca406a2480f4 --- /dev/null +++ b/accessibility/inc/standard/vclxaccessiblecheckbox.hxx @@ -0,0 +1,85 @@ +/* -*- 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_STANDARD_VCLXACCESSIBLECHECKBOX_HXX +#define INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLECHECKBOX_HXX + +#include + +#include +#include + +#include + + +// class VCLXAccessibleCheckBox + + +typedef ::cppu::ImplHelper2< + css::accessibility::XAccessibleAction, + css::accessibility::XAccessibleValue > VCLXAccessibleCheckBox_BASE; + +class VCLXAccessibleCheckBox : public VCLXAccessibleTextComponent, + public VCLXAccessibleCheckBox_BASE +{ +private: + bool m_bChecked; + bool m_bIndeterminate; + +protected: + virtual ~VCLXAccessibleCheckBox(); + + bool IsChecked(); + bool IsIndeterminate(); + + void SetChecked( bool bChecked ); + void SetIndeterminate( bool bIndeterminate ); + + virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) override; + virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ) override; + +public: + VCLXAccessibleCheckBox( VCLXWindow* pVCLXindow ); + + // XInterface + DECLARE_XINTERFACE() + + // XTypeProvider + DECLARE_XTYPEPROVIDER() + + // XServiceInfo + virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleAction + virtual sal_Int32 SAL_CALL getAccessibleActionCount( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL doAccessibleAction ( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getAccessibleActionDescription ( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessibleKeyBinding > SAL_CALL getAccessibleActionKeyBinding( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + + // XAccessibleValue + virtual css::uno::Any SAL_CALL getCurrentValue( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL setCurrentValue( const css::uno::Any& aNumber ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Any SAL_CALL getMaximumValue( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Any SAL_CALL getMinimumValue( ) throw (css::uno::RuntimeException, std::exception) override; +}; + +#endif // INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLECHECKBOX_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/standard/vclxaccessiblecombobox.hxx b/accessibility/inc/standard/vclxaccessiblecombobox.hxx new file mode 100644 index 000000000000..4fd6bf829055 --- /dev/null +++ b/accessibility/inc/standard/vclxaccessiblecombobox.hxx @@ -0,0 +1,57 @@ +/* -*- 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_STANDARD_VCLXACCESSIBLECOMBOBOX_HXX +#define INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLECOMBOBOX_HXX + +#include +#include +#include + + +/** The accessible combobox has two children. The first is the text field + represented by an object of the VCLXAccessibleEdit class. + The second is the list containing all items and is represented by an + object of the VCLXAccessibleList class which does not + support selection at the moment. +*/ +class VCLXAccessibleComboBox + : public VCLXAccessibleBox +{ +public: + VCLXAccessibleComboBox (VCLXWindow* pVCLXindow); + + // XServiceInfo + virtual OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) override; + // Return combo box specific services. + virtual css::uno::Sequence< OUString > SAL_CALL + getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) override; + +protected: + virtual ~VCLXAccessibleComboBox(); + + virtual bool IsValid() const override; + virtual void ProcessWindowEvent (const VclWindowEvent& rVclWindowEvent) override; +}; + +#endif // INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLECOMBOBOX_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/standard/vclxaccessibledropdowncombobox.hxx b/accessibility/inc/standard/vclxaccessibledropdowncombobox.hxx new file mode 100644 index 000000000000..e6ae12834aa6 --- /dev/null +++ b/accessibility/inc/standard/vclxaccessibledropdowncombobox.hxx @@ -0,0 +1,56 @@ +/* -*- 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_STANDARD_VCLXACCESSIBLEDROPDOWNCOMBOBOX_HXX +#define INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLEDROPDOWNCOMBOBOX_HXX + +#include +#include +#include + +/** The accessible drop down combobox has two children. The first is the + text field represented by an object of the + VCLXAccessibleEdit class. The second is the list + containing all items and is represented by an object of the + VCLXAccessibleList class which does not support selection + at the moment. +*/ +class VCLXAccessibleDropDownComboBox : public VCLXAccessibleBox +{ +public: + VCLXAccessibleDropDownComboBox (VCLXWindow* pVCLXindow); + + // XServiceInfo + virtual OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) override; + // Return drop down combo box specific services. + virtual css::uno::Sequence< OUString > SAL_CALL + getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) override; + +protected: + virtual ~VCLXAccessibleDropDownComboBox(); + + virtual bool IsValid() const override; + virtual void ProcessWindowEvent (const VclWindowEvent& rVclWindowEvent) override; +}; + +#endif // INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLEDROPDOWNCOMBOBOX_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/standard/vclxaccessibledropdownlistbox.hxx b/accessibility/inc/standard/vclxaccessibledropdownlistbox.hxx new file mode 100644 index 000000000000..f18945d3bdc3 --- /dev/null +++ b/accessibility/inc/standard/vclxaccessibledropdownlistbox.hxx @@ -0,0 +1,56 @@ +/* -*- 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_STANDARD_VCLXACCESSIBLEDROPDOWNLISTBOX_HXX +#define INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLEDROPDOWNLISTBOX_HXX + +#include +#include + +/** The accessible drop down combobox has two children. The first is the + text field represented by an object of the + VCLXAccessibleTextField class which can not be edited. The + second is the list containing all items and is represented by an object + of the VCLXAccessibleListBoxList class which does support + selection. +*/ +class VCLXAccessibleDropDownListBox : public VCLXAccessibleBox +{ +public: + VCLXAccessibleDropDownListBox (VCLXWindow* pVCLXindow); + + // XServiceInfo + virtual OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) override; + // Return drop down list box specific services. + virtual css::uno::Sequence< OUString > SAL_CALL + getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) override; + +protected: + virtual ~VCLXAccessibleDropDownListBox(); + + virtual bool IsValid() const override; + virtual void ProcessWindowEvent (const VclWindowEvent& rVclWindowEvent) override; + +}; + +#endif // INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLEDROPDOWNLISTBOX_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/standard/vclxaccessibleedit.hxx b/accessibility/inc/standard/vclxaccessibleedit.hxx new file mode 100644 index 000000000000..429588f1bb78 --- /dev/null +++ b/accessibility/inc/standard/vclxaccessibleedit.hxx @@ -0,0 +1,111 @@ +/* -*- 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_STANDARD_VCLXACCESSIBLEEDIT_HXX +#define INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLEEDIT_HXX + +#include +#include +#include + +#include + + +// class VCLXAccessibleEdit + + +typedef ::cppu::ImplHelper2< + css::accessibility::XAccessibleAction, + css::accessibility::XAccessibleEditableText > VCLXAccessibleEdit_BASE; + +class VCLXAccessibleEdit : public VCLXAccessibleTextComponent, + public VCLXAccessibleEdit_BASE +{ + friend class VCLXAccessibleBox; + +private: + sal_Int32 m_nSelectionStart; + sal_Int32 m_nCaretPosition; + +protected: + virtual ~VCLXAccessibleEdit(); + + virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) override; + virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ) override; + + // OCommonAccessibleText + virtual OUString implGetText() override; + virtual void implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ) override; + +public: + VCLXAccessibleEdit( VCLXWindow* pVCLXindow ); + + // XInterface + DECLARE_XINTERFACE() + + // XTypeProvider + DECLARE_XTYPEPROVIDER() + + // XServiceInfo + virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleContext + virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual sal_Int16 SAL_CALL getAccessibleRole( ) throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleAction + virtual sal_Int32 SAL_CALL getAccessibleActionCount( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL doAccessibleAction ( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getAccessibleActionDescription ( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessibleKeyBinding > SAL_CALL getAccessibleActionKeyBinding( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + + // XAccessibleText + virtual sal_Int32 SAL_CALL getCaretPosition( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual sal_Unicode SAL_CALL getCharacter( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getCharacterAttributes( sal_Int32 nIndex, const css::uno::Sequence< OUString >& aRequestedAttributes ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual css::awt::Rectangle SAL_CALL getCharacterBounds( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getCharacterCount( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getIndexAtPoint( const css::awt::Point& aPoint ) throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getSelectedText( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getSelectionStart( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getSelectionEnd( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getText( ) throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual css::accessibility::TextSegment SAL_CALL getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (css::lang::IndexOutOfBoundsException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override; + virtual css::accessibility::TextSegment SAL_CALL getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (css::lang::IndexOutOfBoundsException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override; + virtual css::accessibility::TextSegment SAL_CALL getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (css::lang::IndexOutOfBoundsException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + + // XAccessibleEditableText + virtual sal_Bool SAL_CALL cutText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL pasteText( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL deleteText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL insertText( const OUString& sText, sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL replaceText( sal_Int32 nStartIndex, sal_Int32 nEndIndex, const OUString& sReplacement ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL setAttributes( sal_Int32 nStartIndex, sal_Int32 nEndIndex, const css::uno::Sequence< css::beans::PropertyValue >& aAttributeSet ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL setText( const OUString& sText ) throw (css::uno::RuntimeException, std::exception) override; +}; + +#endif // INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLEEDIT_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/standard/vclxaccessiblefixedhyperlink.hxx b/accessibility/inc/standard/vclxaccessiblefixedhyperlink.hxx new file mode 100644 index 000000000000..246988d26775 --- /dev/null +++ b/accessibility/inc/standard/vclxaccessiblefixedhyperlink.hxx @@ -0,0 +1,47 @@ +/* -*- 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_STANDARD_VCLXACCESSIBLEFIXEDHYPERLINK_HXX +#define INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLEFIXEDHYPERLINK_HXX + +#include + + +// class VCLXAccessibleFixedHyperlink + + +class VCLXAccessibleFixedHyperlink : public VCLXAccessibleTextComponent +{ +protected: + virtual ~VCLXAccessibleFixedHyperlink(); + + virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ) override; + virtual void implGetLineBoundary( css::i18n::Boundary& rBoundary, sal_Int32 nIndex ) override; + +public: + VCLXAccessibleFixedHyperlink( VCLXWindow* pVCLXindow ); + + // XServiceInfo + virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) override; +}; + +#endif // INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLEFIXEDHYPERLINK_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/standard/vclxaccessiblefixedtext.hxx b/accessibility/inc/standard/vclxaccessiblefixedtext.hxx new file mode 100644 index 000000000000..c5a52e9d430d --- /dev/null +++ b/accessibility/inc/standard/vclxaccessiblefixedtext.hxx @@ -0,0 +1,47 @@ +/* -*- 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_STANDARD_VCLXACCESSIBLEFIXEDTEXT_HXX +#define INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLEFIXEDTEXT_HXX + +#include + + +// class VCLXAccessibleFixedText + + +class VCLXAccessibleFixedText : public VCLXAccessibleTextComponent +{ +protected: + virtual ~VCLXAccessibleFixedText(); + + virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ) override; + virtual void implGetLineBoundary( css::i18n::Boundary& rBoundary, sal_Int32 nIndex ) override; + +public: + VCLXAccessibleFixedText( VCLXWindow* pVCLXindow ); + + // XServiceInfo + virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) override; +}; + +#endif // INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLEFIXEDTEXT_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/standard/vclxaccessiblelist.hxx b/accessibility/inc/standard/vclxaccessiblelist.hxx new file mode 100644 index 000000000000..7476f8603fd3 --- /dev/null +++ b/accessibility/inc/standard/vclxaccessiblelist.hxx @@ -0,0 +1,210 @@ +/* -*- 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_STANDARD_VCLXACCESSIBLELIST_HXX +#define INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLELIST_HXX + +#include +#include +#include "standard/vclxaccessiblelistitem.hxx" +#include +#include +#include +#include +#include +#include + +typedef ::cppu::ImplHelper2< + css::accessibility::XAccessible, + css::accessibility::XAccessibleSelection + > VCLXAccessibleList_BASE; + +typedef std::vector< css::uno::WeakReference< css::accessibility::XAccessible > > + ListItems; + +namespace accessibility +{ + class IComboListBoxHelper; +} + + +/** Base class for the list contained in list- and combo boxes. This class + does not support selection because lists of combo boxes give no direct + access to their underlying list implementation. Look into derived + classes for selection. +*/ +class VCLXAccessibleList + : public VCLXAccessibleComponent, + public VCLXAccessibleList_BASE +{ +public: + enum BoxType {COMBOBOX, LISTBOX}; + + VCLXAccessibleList (VCLXWindow* pVCLXindow, BoxType aBoxType, + const css::uno::Reference< + css::accessibility::XAccessible >& _xParent); + + /** The index that is passed to this method is returned on following + calls to getAccessibleIndexInParent. + */ + void SetIndexInParent (sal_Int32 nIndex); + + /** Process some of the events and delegate the rest to the base classes. + */ + virtual void ProcessWindowEvent (const VclWindowEvent& rVclWindowEvent) override; + virtual void FillAccessibleRelationSet( utl::AccessibleRelationSetHelper& rRelationSet ) override; + + /** Called on reception of selection events this method checks all known + list items for a possible change in their selection state and + updates that accordingly. No accessibility events are send because + the XAccessibleSelection interface is not supported and the items + are transient. + @param sTextOfSelectedItem + This string contains the text of the currently selected + item. It is used to retrieve the index of that item. + */ + void UpdateSelection (const OUString& sTextOfSelectedItem); + + // XInterface + DECLARE_XINTERFACE() + + // XTypeProvider + DECLARE_XTYPEPROVIDER() + + // XAccessible + virtual css::uno::Reference< css::accessibility::XAccessibleContext> SAL_CALL + getAccessibleContext() + throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleContext + virtual sal_Int32 SAL_CALL getAccessibleChildCount() + throw (css::uno::RuntimeException, std::exception) override; + css::uno::Reference< css::accessibility::XAccessible> SAL_CALL + getAccessibleChild (sal_Int32 i) + throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL + getAccessibleParent( ) + throw (css::uno::RuntimeException, std::exception) override; + + /** The index returned as index in parent is always the one set with the + SetIndexInParent() method. + */ + virtual sal_Int32 SAL_CALL getAccessibleIndexInParent() + throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int16 SAL_CALL getAccessibleRole() + throw (css::uno::RuntimeException, std::exception) override; + + // XServiceInfo + virtual OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) override; + // Return list specific services. + virtual css::uno::Sequence< OUString > SAL_CALL + getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleSelection + virtual void SAL_CALL selectAccessibleChild( sal_Int32 nChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL isAccessibleChildSelected( sal_Int32 nChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL clearAccessibleSelection( ) throw (css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL selectAllAccessibleChildren( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getSelectedAccessibleChildCount( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL deselectAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + + virtual css::awt::Point SAL_CALL getLocationOnScreen( ) throw (css::uno::RuntimeException, std::exception) override; + bool IsInDropDown(); + void HandleDropOpen(); + void ProcessWindowEvent (const VclWindowEvent& rVclWindowEvent, bool b_IsDropDownList); + void UpdateSelection_Acc (const ::rtl::OUString& sTextOfSelectedItem, bool b_IsDropDownList); + void UpdateSelection_Impl_Acc (bool b_IsDropDownList); + + void UpdateFocus_Impl_Acc ( sal_Int32 nPos, bool b_IsDropDownList) ; + static void NotifyListItem(css::uno::Any& val); +protected: + BoxType m_aBoxType; + ::accessibility::IComboListBoxHelper* m_pListBoxHelper; + ListItems m_aAccessibleChildren; + sal_Int32 m_nVisibleLineCount; + /// Index in parent. This is settable from the outside. + sal_Int32 m_nIndexInParent; + sal_Int32 m_nLastTopEntry; + sal_Int32 m_nLastSelectedPos; + bool m_bDisableProcessEvent; + bool m_bVisible; + sal_Int32 m_nCurSelectedPos; + + + virtual ~VCLXAccessibleList(); + + /** This function is called from the implementation helper during a + XComponent::dispose call. Free the list of items and the items themselves. + */ + virtual void SAL_CALL disposing() override; + + /** This method adds the states + AccessibleStateType::FOCUSABLE and possibly + AccessibleStateType::MULTI_SELECTABLE to the state set + of the base classes. + */ + virtual void FillAccessibleStateSet (utl::AccessibleStateSetHelper& rStateSet) override; + + /** Create the specified child and insert it into the list of children. + Sets the child's states. + */ + css::uno::Reference< css::accessibility::XAccessible > + CreateChild (sal_Int32 i); + + /** Call this method when the item list has been changed, i.e. items + have been deleted or inserted. + @param bItemInserted + Indicate whether items have been inserted (TRUE) or removed (FALSE). + @param nIndex + Index of the new or removed item. A value of -1 indicates that + the whole list has been cleared. + */ + void HandleChangedItemList (bool bItemInserted, sal_Int32 nIndex); + + // VCLXAccessibleComponent + virtual css::awt::Rectangle implGetBounds( ) throw (css::uno::RuntimeException) override; + +private: + /** We need to save the accessible parent to return it in getAccessibleParent(), + because this method of the base class returns the wrong parent. + */ + css::uno::Reference< css::accessibility::XAccessible > m_xParent; + + + /** dispose all items aand clears the container + */ + void clearItems(); + + void UpdateEntryRange_Impl(); +protected: + void UpdateSelection_Impl(sal_Int32 nPos = 0); + bool checkEntrySelected(sal_Int32 _nPos, + css::uno::Any& _rNewValue, + css::uno::Reference< css::accessibility::XAccessible >& _rxNewAcc); +private: + void notifyVisibleStates(bool _bSetNew ); + void UpdateVisibleLineCount(); +}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/standard/vclxaccessiblelistbox.hxx b/accessibility/inc/standard/vclxaccessiblelistbox.hxx new file mode 100644 index 000000000000..22d24eec687f --- /dev/null +++ b/accessibility/inc/standard/vclxaccessiblelistbox.hxx @@ -0,0 +1,56 @@ +/* -*- 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_STANDARD_VCLXACCESSIBLELISTBOX_HXX +#define INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLELISTBOX_HXX + +#include +#include +#include +#include + + +/** The accessible drop down combobox has one children. It is the list + containing all items and is represented by an object of the + VCLXAccessibleListBoxList class which does support + selection. +*/ +class VCLXAccessibleListBox : public VCLXAccessibleBox +{ +public: + VCLXAccessibleListBox (VCLXWindow* pVCLXindow); + + // XServiceInfo + virtual OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) override; + // Return list box specific services. + virtual css::uno::Sequence< OUString > SAL_CALL + getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) override; + +protected: + virtual ~VCLXAccessibleListBox(); + + virtual bool IsValid() const override; + virtual void ProcessWindowEvent (const VclWindowEvent& rVclWindowEvent) override; +}; + +#endif // INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLELISTBOX_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/standard/vclxaccessiblelistitem.hxx b/accessibility/inc/standard/vclxaccessiblelistitem.hxx new file mode 100644 index 000000000000..1a1e2f958eae --- /dev/null +++ b/accessibility/inc/standard/vclxaccessiblelistitem.hxx @@ -0,0 +1,173 @@ +/* -*- 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_STANDARD_VCLXACCESSIBLELISTITEM_HXX +#define INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLELISTITEM_HXX + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// forward --------------------------------------------------------------- + +namespace com { namespace sun { namespace star { namespace awt { + struct Point; + struct Rectangle; + struct Size; + class XFocusListener; +} } } } + +namespace accessibility +{ + class IComboListBoxHelper; +} + +// class VCLXAccessibleListItem ------------------------------------------ + +typedef ::cppu::WeakAggComponentImplHelper6< css::accessibility::XAccessible + , css::accessibility::XAccessibleContext + , css::accessibility::XAccessibleComponent + , css::accessibility::XAccessibleEventBroadcaster + , css::accessibility::XAccessibleText + , css::lang::XServiceInfo > VCLXAccessibleListItem_BASE; + +/** the class OAccessibleListBoxEntry represents the base class for an accessible object of a listbox entry +*/ +class VCLXAccessibleListItem : public ::comphelper::OBaseMutex, + public ::comphelper::OCommonAccessibleText, + public VCLXAccessibleListItem_BASE +{ +private: + OUString m_sEntryText; + sal_Int32 m_nIndexInParent; + bool m_bSelected; + bool m_bVisible; + +protected: + /// client id in the AccessibleEventNotifier queue + sal_uInt32 m_nClientId; + ::accessibility::IComboListBoxHelper* m_pListBoxHelper; + + css::uno::Reference< css::accessibility::XAccessible > m_xParent; + css::uno::Reference< css::accessibility::XAccessibleContext > m_xParentContext; + +protected: + virtual ~VCLXAccessibleListItem(); + /** this function is called upon disposing the component + */ + virtual void SAL_CALL disposing() override; + + // OCommonAccessibleText + virtual OUString implGetText() override; + virtual css::lang::Locale implGetLocale() override; + virtual void implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ) override; + +public: + /** OAccessibleBase needs a valid view + @param _pListBoxHelper + is the list- or combobox for which we implement an accessible object + @param _nIndexInParent + is the position of the entry inside the listbox + @param _xParent + is our parent accessible object + */ + VCLXAccessibleListItem( ::accessibility::IComboListBoxHelper* _pListBoxHelper, + sal_Int32 _nIndexInParent, + const css::uno::Reference< css::accessibility::XAccessible >& _xParent ); + + void NotifyAccessibleEvent( sal_Int16 _nEventId, const css::uno::Any& _aOldValue, const css::uno::Any& _aNewValue ); + + inline bool IsSelected() const { return m_bSelected; } + void SetSelected( bool _bSelected ); + void SetVisible( bool _bVisible ); + + // XInterface + virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) throw(css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL acquire( ) throw() override; + virtual void SAL_CALL release( ) throw() override; + + // XTypeProvider + virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (css::uno::RuntimeException, std::exception) override; + + // XServiceInfo + virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) override; + + // XAccessible + virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( ) throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleContext + virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getAccessibleIndexInParent( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int16 SAL_CALL getAccessibleRole( ) throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getAccessibleDescription( ) throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getAccessibleName( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::lang::Locale SAL_CALL getLocale( ) throw (css::accessibility::IllegalAccessibleComponentStateException, css::uno::RuntimeException, std::exception) override; + + // XAccessibleComponent + virtual sal_Bool SAL_CALL containsPoint( const css::awt::Point& aPoint ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const css::awt::Point& aPoint ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::awt::Rectangle SAL_CALL getBounds( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::awt::Point SAL_CALL getLocation( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::awt::Point SAL_CALL getLocationOnScreen( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::awt::Size SAL_CALL getSize( ) throw (css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL grabFocus( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getForeground() throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getBackground() throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleText + virtual sal_Int32 SAL_CALL getCaretPosition() throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual sal_Unicode SAL_CALL getCharacter( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getCharacterAttributes( sal_Int32 nIndex, const css::uno::Sequence< OUString >& aRequestedAttributes ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual css::awt::Rectangle SAL_CALL getCharacterBounds( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getCharacterCount() throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getIndexAtPoint( const css::awt::Point& aPoint ) throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getSelectedText() throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getSelectionStart() throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getSelectionEnd() throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getText() throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual css::accessibility::TextSegment SAL_CALL getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (css::lang::IndexOutOfBoundsException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override; + virtual css::accessibility::TextSegment SAL_CALL getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (css::lang::IndexOutOfBoundsException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override; + virtual css::accessibility::TextSegment SAL_CALL getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (css::lang::IndexOutOfBoundsException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + + // XAccessibleEventBroadcaster + virtual void SAL_CALL addAccessibleEventListener( const css::uno::Reference< css::accessibility::XAccessibleEventListener >& xListener ) throw (css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL removeAccessibleEventListener( const css::uno::Reference< css::accessibility::XAccessibleEventListener >& xListener ) throw (css::uno::RuntimeException, std::exception) override; +}; + +#endif // ACCESSIBILITY_STANDARD_ACCESSIBLELISTBOXENTRY_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/standard/vclxaccessiblemenu.hxx b/accessibility/inc/standard/vclxaccessiblemenu.hxx new file mode 100644 index 000000000000..98ba4ec19eac --- /dev/null +++ b/accessibility/inc/standard/vclxaccessiblemenu.hxx @@ -0,0 +1,79 @@ +/* -*- 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_STANDARD_VCLXACCESSIBLEMENU_HXX +#define INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLEMENU_HXX + +#include +#include + +#include + + +// class VCLXAccessibleMenu + + +typedef ::cppu::ImplHelper1 < + css::accessibility::XAccessibleSelection > VCLXAccessibleMenu_BASE; + +class VCLXAccessibleMenu : public VCLXAccessibleMenuItem, + public VCLXAccessibleMenu_BASE +{ +protected: + virtual bool IsFocused() override; + virtual bool IsPopupMenuOpen() override; + +public: + VCLXAccessibleMenu( Menu* pParent, sal_uInt16 nItemPos, Menu* pMenu ); + virtual ~VCLXAccessibleMenu(); + + // XInterface + DECLARE_XINTERFACE() + + // XTypeProvider + DECLARE_XTYPEPROVIDER() + + // XServiceInfo + virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleContext + virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual sal_Int16 SAL_CALL getAccessibleRole( ) throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleComponent + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const css::awt::Point& aPoint ) throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleSelection + virtual void SAL_CALL selectAccessibleChild( sal_Int32 nChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL isAccessibleChildSelected( sal_Int32 nChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL clearAccessibleSelection( ) throw (css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL selectAllAccessibleChildren( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getSelectedAccessibleChildCount( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL deselectAccessibleChild( sal_Int32 nChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + + // XAccessibleAction + virtual ::rtl::OUString SAL_CALL getAccessibleActionDescription ( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; +}; + +#endif // INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLEMENU_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/standard/vclxaccessiblemenubar.hxx b/accessibility/inc/standard/vclxaccessiblemenubar.hxx new file mode 100644 index 000000000000..9ea5c585ae28 --- /dev/null +++ b/accessibility/inc/standard/vclxaccessiblemenubar.hxx @@ -0,0 +1,66 @@ +/* -*- 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_STANDARD_VCLXACCESSIBLEMENUBAR_HXX +#define INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLEMENUBAR_HXX + +#include +#include + +class VclSimpleEvent; +class VclWindowEvent; +namespace vcl { class Window; } + + +// class VCLXAccessibleMenuBar + + +class VCLXAccessibleMenuBar : public OAccessibleMenuComponent +{ +protected: + VclPtr m_pWindow; + + virtual bool IsFocused() override; + + DECL_LINK_TYPED( WindowEventListener, VclWindowEvent&, void ); + + void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ); + + // XComponent + virtual void SAL_CALL disposing() override; + +public: + VCLXAccessibleMenuBar( Menu* pMenu ); + virtual ~VCLXAccessibleMenuBar(); + + // XServiceInfo + virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleContext + virtual sal_Int32 SAL_CALL getAccessibleIndexInParent( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int16 SAL_CALL getAccessibleRole( ) throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleExtendedComponent + virtual sal_Int32 SAL_CALL getBackground( ) throw (css::uno::RuntimeException, std::exception) override; +}; + +#endif // INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLEMENUBAR_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/standard/vclxaccessiblemenuitem.hxx b/accessibility/inc/standard/vclxaccessiblemenuitem.hxx new file mode 100644 index 000000000000..df2249ab6d22 --- /dev/null +++ b/accessibility/inc/standard/vclxaccessiblemenuitem.hxx @@ -0,0 +1,109 @@ +/* -*- 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_STANDARD_VCLXACCESSIBLEMENUITEM_HXX +#define INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLEMENUITEM_HXX + +#include + +#include +#include + +#include +#include + + +// class VCLXAccessibleMenuItem + + +typedef ::cppu::ImplHelper3< + css::accessibility::XAccessibleText, + css::accessibility::XAccessibleAction, + css::accessibility::XAccessibleValue > VCLXAccessibleMenuItem_BASE; + +class VCLXAccessibleMenuItem : public OAccessibleMenuItemComponent, + public ::comphelper::OCommonAccessibleText, + public VCLXAccessibleMenuItem_BASE +{ +protected: + virtual bool IsFocused() override; + virtual bool IsSelected() override; + virtual bool IsChecked() override; + + virtual bool IsHighlighted() override; + + virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ) override; + + // OCommonAccessibleText + virtual OUString implGetText() override; + virtual css::lang::Locale implGetLocale() override; + virtual void implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ) override; + +public: + VCLXAccessibleMenuItem( Menu* pParent, sal_uInt16 nItemPos, Menu* pMenu = nullptr ); + virtual ~VCLXAccessibleMenuItem(); + + // XInterface + DECLARE_XINTERFACE() + + // XTypeProvider + DECLARE_XTYPEPROVIDER() + + // XServiceInfo + virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleContext + virtual sal_Int16 SAL_CALL getAccessibleRole( ) throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleText + virtual sal_Int32 SAL_CALL getCaretPosition() throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual sal_Unicode SAL_CALL getCharacter( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getCharacterAttributes( sal_Int32 nIndex, const css::uno::Sequence< OUString >& aRequestedAttributes ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual css::awt::Rectangle SAL_CALL getCharacterBounds( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getCharacterCount() throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getIndexAtPoint( const css::awt::Point& aPoint ) throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getSelectedText() throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getSelectionStart() throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getSelectionEnd() throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getText() throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual css::accessibility::TextSegment SAL_CALL getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (css::lang::IndexOutOfBoundsException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override; + virtual css::accessibility::TextSegment SAL_CALL getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (css::lang::IndexOutOfBoundsException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override; + virtual css::accessibility::TextSegment SAL_CALL getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (css::lang::IndexOutOfBoundsException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + + // XAccessibleAction + virtual sal_Int32 SAL_CALL getAccessibleActionCount( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL doAccessibleAction ( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getAccessibleActionDescription ( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessibleKeyBinding > SAL_CALL getAccessibleActionKeyBinding( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + + // XAccessibleValue + virtual css::uno::Any SAL_CALL getCurrentValue( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL setCurrentValue( const css::uno::Any& aNumber ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Any SAL_CALL getMaximumValue( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Any SAL_CALL getMinimumValue( ) throw (css::uno::RuntimeException, std::exception) override; +}; + +#endif // INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLEMENUITEM_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/standard/vclxaccessiblemenuseparator.hxx b/accessibility/inc/standard/vclxaccessiblemenuseparator.hxx new file mode 100644 index 000000000000..065740cc2691 --- /dev/null +++ b/accessibility/inc/standard/vclxaccessiblemenuseparator.hxx @@ -0,0 +1,46 @@ +/* -*- 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_STANDARD_VCLXACCESSIBLEMENUSEPARATOR_HXX +#define INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLEMENUSEPARATOR_HXX + +#include + + +// class VCLXAccessibleMenuSeparator + + +class VCLXAccessibleMenuSeparator : public OAccessibleMenuItemComponent +{ +public: + VCLXAccessibleMenuSeparator( Menu* pParent, sal_uInt16 nItemPos, Menu* pMenu = nullptr ); + virtual ~VCLXAccessibleMenuSeparator(); + + // XServiceInfo + virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleContext + virtual sal_Int16 SAL_CALL getAccessibleRole( ) throw (css::uno::RuntimeException, std::exception) override; +}; + + +#endif // INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLEMENUSEPARATOR_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/standard/vclxaccessiblepopupmenu.hxx b/accessibility/inc/standard/vclxaccessiblepopupmenu.hxx new file mode 100644 index 000000000000..bae088140c0a --- /dev/null +++ b/accessibility/inc/standard/vclxaccessiblepopupmenu.hxx @@ -0,0 +1,52 @@ +/* -*- 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_STANDARD_VCLXACCESSIBLEPOPUPMENU_HXX +#define INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLEPOPUPMENU_HXX + +#include + + +// class VCLXAccessiblePopupMenu + + +class VCLXAccessiblePopupMenu : public OAccessibleMenuComponent +{ +protected: + virtual bool IsFocused() override; + +public: + VCLXAccessiblePopupMenu( Menu* pMenu ); + virtual ~VCLXAccessiblePopupMenu(); + + // XServiceInfo + virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleContext + virtual sal_Int32 SAL_CALL getAccessibleIndexInParent( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int16 SAL_CALL getAccessibleRole( ) throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleExtendedComponent + virtual sal_Int32 SAL_CALL getBackground( ) throw (css::uno::RuntimeException, std::exception) override; +}; + +#endif // INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLEPOPUPMENU_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/standard/vclxaccessibleradiobutton.hxx b/accessibility/inc/standard/vclxaccessibleradiobutton.hxx new file mode 100644 index 000000000000..8a13c7eb116a --- /dev/null +++ b/accessibility/inc/standard/vclxaccessibleradiobutton.hxx @@ -0,0 +1,76 @@ +/* -*- 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_STANDARD_VCLXACCESSIBLERADIOBUTTON_HXX +#define INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLERADIOBUTTON_HXX + +#include + +#include +#include + +#include + + +// class VCLXAccessibleRadioButton + + +typedef ::cppu::ImplHelper2< + css::accessibility::XAccessibleAction, + css::accessibility::XAccessibleValue > VCLXAccessibleRadioButton_BASE; + +class VCLXAccessibleRadioButton : public VCLXAccessibleTextComponent, + public VCLXAccessibleRadioButton_BASE +{ +protected: + virtual ~VCLXAccessibleRadioButton(); + + virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) override; + virtual void FillAccessibleRelationSet( utl::AccessibleRelationSetHelper& rRelationSet ) override; + virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ) override; + +public: + VCLXAccessibleRadioButton( VCLXWindow* pVCLXindow ); + + // XInterface + DECLARE_XINTERFACE() + + // XTypeProvider + DECLARE_XTYPEPROVIDER() + + // XServiceInfo + virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleAction + virtual sal_Int32 SAL_CALL getAccessibleActionCount( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL doAccessibleAction ( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getAccessibleActionDescription ( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessibleKeyBinding > SAL_CALL getAccessibleActionKeyBinding( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + + // XAccessibleValue + virtual css::uno::Any SAL_CALL getCurrentValue( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL setCurrentValue( const css::uno::Any& aNumber ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Any SAL_CALL getMaximumValue( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Any SAL_CALL getMinimumValue( ) throw (css::uno::RuntimeException, std::exception) override; +}; + +#endif // INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLERADIOBUTTON_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/standard/vclxaccessiblescrollbar.hxx b/accessibility/inc/standard/vclxaccessiblescrollbar.hxx new file mode 100644 index 000000000000..40f51cceaa45 --- /dev/null +++ b/accessibility/inc/standard/vclxaccessiblescrollbar.hxx @@ -0,0 +1,79 @@ +/* -*- 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_STANDARD_VCLXACCESSIBLESCROLLBAR_HXX +#define INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLESCROLLBAR_HXX + +#include + +#include +#include + +#include + + +// class VCLXAccessibleScrollBar + + +typedef ::cppu::ImplHelper2< + css::accessibility::XAccessibleAction, + css::accessibility::XAccessibleValue > VCLXAccessibleScrollBar_BASE; + +class VCLXAccessibleScrollBar : public VCLXAccessibleComponent, + public VCLXAccessibleScrollBar_BASE +{ +protected: + virtual ~VCLXAccessibleScrollBar(); + + virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) override; + virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ) override; + +public: + VCLXAccessibleScrollBar( VCLXWindow* pVCLXindow ); + + // XInterface + DECLARE_XINTERFACE() + + // XTypeProvider + DECLARE_XTYPEPROVIDER() + + // XServiceInfo + virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleAction + virtual sal_Int32 SAL_CALL getAccessibleActionCount( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL doAccessibleAction ( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getAccessibleActionDescription ( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessibleKeyBinding > SAL_CALL getAccessibleActionKeyBinding( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + + // XAccessibleValue + virtual css::uno::Any SAL_CALL getCurrentValue( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL setCurrentValue( const css::uno::Any& aNumber ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Any SAL_CALL getMaximumValue( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Any SAL_CALL getMinimumValue( ) throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleContext + ::rtl::OUString SAL_CALL getAccessibleName( ) throw (css::uno::RuntimeException, std::exception) override; + +}; + +#endif // INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLESCROLLBAR_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/standard/vclxaccessiblestatusbar.hxx b/accessibility/inc/standard/vclxaccessiblestatusbar.hxx new file mode 100644 index 000000000000..24fd96e8ad58 --- /dev/null +++ b/accessibility/inc/standard/vclxaccessiblestatusbar.hxx @@ -0,0 +1,74 @@ +/* -*- 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_STANDARD_VCLXACCESSIBLESTATUSBAR_HXX +#define INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLESTATUSBAR_HXX + +#include +#include + +#include + +class StatusBar; + + +// class VCLXAccessibleStatusBar + + +class VCLXAccessibleStatusBar : public VCLXAccessibleComponent +{ +private: + typedef ::std::vector< css::uno::Reference< css::accessibility::XAccessible > > AccessibleChildren; + + AccessibleChildren m_aAccessibleChildren; + VclPtr m_pStatusBar; + +protected: + void UpdateShowing( sal_Int32 i, bool bShowing ); + void UpdateItemName( sal_Int32 i ); + void UpdateItemText( sal_Int32 i ); + + void InsertChild( sal_Int32 i ); + void RemoveChild( sal_Int32 i ); + + virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) override; + + // XComponent + virtual void SAL_CALL disposing() override; + +public: + VCLXAccessibleStatusBar( VCLXWindow* pVCLXWindow ); + virtual ~VCLXAccessibleStatusBar(); + + // XServiceInfo + virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleContext + virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + + // XAccessibleComponent + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const css::awt::Point& aPoint ) throw (css::uno::RuntimeException, std::exception) override; +}; + + +#endif // INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLESTATUSBAR_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/standard/vclxaccessiblestatusbaritem.hxx b/accessibility/inc/standard/vclxaccessiblestatusbaritem.hxx new file mode 100644 index 000000000000..fb919df30207 --- /dev/null +++ b/accessibility/inc/standard/vclxaccessiblestatusbaritem.hxx @@ -0,0 +1,134 @@ +/* -*- 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_STANDARD_VCLXACCESSIBLESTATUSBARITEM_HXX +#define INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLESTATUSBARITEM_HXX + +#include +#include +#include +#include +#include + +class StatusBar; +class VCLExternalSolarLock; + +namespace utl { +class AccessibleStateSetHelper; +} + + +// class VCLXAccessibleStatusBarItem + + +typedef ::comphelper::OAccessibleTextHelper AccessibleTextHelper_BASE; + +typedef ::cppu::ImplHelper2< + css::accessibility::XAccessible, + css::lang::XServiceInfo > VCLXAccessibleStatusBarItem_BASE; + +class VCLXAccessibleStatusBarItem : public AccessibleTextHelper_BASE, + public VCLXAccessibleStatusBarItem_BASE +{ + friend class VCLXAccessibleStatusBar; + +private: + VCLExternalSolarLock* m_pExternalLock; + VclPtr m_pStatusBar; + sal_uInt16 m_nItemId; + OUString m_sItemName; + OUString m_sItemText; + bool m_bShowing; + +protected: + bool IsShowing(); + void SetShowing( bool bShowing ); + void SetItemName( const OUString& sItemName ); + OUString GetItemName(); + void SetItemText( const OUString& sItemText ); + OUString GetItemText(); + sal_uInt16 GetItemId() const { return m_nItemId; } + + void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ); + + // OCommonAccessibleComponent + virtual css::awt::Rectangle implGetBounds( ) throw (css::uno::RuntimeException) override; + + // OCommonAccessibleText + virtual OUString implGetText() override; + virtual css::lang::Locale implGetLocale() override; + virtual void implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ) override; + + // XComponent + virtual void SAL_CALL disposing() override; + +public: + VCLXAccessibleStatusBarItem( StatusBar* pStatusBar, sal_uInt16 nItemId ); + virtual ~VCLXAccessibleStatusBarItem(); + + // XInterface + DECLARE_XINTERFACE() + + // XTypeProvider + DECLARE_XTYPEPROVIDER() + + // XServiceInfo + virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) override; + + // XAccessible + virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( ) throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleContext + virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getAccessibleIndexInParent( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int16 SAL_CALL getAccessibleRole( ) throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getAccessibleDescription( ) throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getAccessibleName( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::lang::Locale SAL_CALL getLocale( ) throw (css::accessibility::IllegalAccessibleComponentStateException, css::uno::RuntimeException, std::exception) override; + + // XAccessibleComponent + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const css::awt::Point& aPoint ) throw (css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL grabFocus( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getForeground( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getBackground( ) throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleExtendedComponent + virtual css::uno::Reference< css::awt::XFont > SAL_CALL getFont( ) throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getTitledBorderText( ) throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getToolTipText( ) throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleText + virtual sal_Int32 SAL_CALL getCaretPosition() throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getCharacterAttributes( sal_Int32 nIndex, const css::uno::Sequence< OUString >& aRequestedAttributes ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual css::awt::Rectangle SAL_CALL getCharacterBounds( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getIndexAtPoint( const css::awt::Point& aPoint ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; +}; + +#endif // INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLESTATUSBARITEM_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/standard/vclxaccessibletabcontrol.hxx b/accessibility/inc/standard/vclxaccessibletabcontrol.hxx new file mode 100644 index 000000000000..d024176132f4 --- /dev/null +++ b/accessibility/inc/standard/vclxaccessibletabcontrol.hxx @@ -0,0 +1,96 @@ +/* -*- 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_STANDARD_VCLXACCESSIBLETABCONTROL_HXX +#define INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLETABCONTROL_HXX + +#include +#include +#include + +#include + +class TabControl; + + +// class VCLXAccessibleTabControl + + +typedef ::cppu::ImplHelper1 < + css::accessibility::XAccessibleSelection > VCLXAccessibleTabControl_BASE; + +class VCLXAccessibleTabControl : public VCLXAccessibleComponent, + public VCLXAccessibleTabControl_BASE +{ +private: + typedef ::std::vector< css::uno::Reference< css::accessibility::XAccessible > > AccessibleChildren; + + AccessibleChildren m_aAccessibleChildren; + VclPtr m_pTabControl; + +protected: + void UpdateFocused(); + void UpdateSelected( sal_Int32 i, bool bSelected ); + void UpdatePageText( sal_Int32 i ); + void UpdateTabPage( sal_Int32 i, bool bNew ); + + void InsertChild( sal_Int32 i ); + void RemoveChild( sal_Int32 i ); + + virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) override; + virtual void ProcessWindowChildEvent( const VclWindowEvent& rVclWindowEvent ) override; + virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ) override; + + // XComponent + virtual void SAL_CALL disposing() override; + +public: + VCLXAccessibleTabControl( VCLXWindow* pVCLXWindow ); + virtual ~VCLXAccessibleTabControl(); + + // XInterface + DECLARE_XINTERFACE() + + // XTypeProvider + DECLARE_XTYPEPROVIDER() + + // XServiceInfo + virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleContext + virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual sal_Int16 SAL_CALL getAccessibleRole( ) throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getAccessibleName( ) throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleSelection + virtual void SAL_CALL selectAccessibleChild( sal_Int32 nChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL isAccessibleChildSelected( sal_Int32 nChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL clearAccessibleSelection( ) throw (css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL selectAllAccessibleChildren( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getSelectedAccessibleChildCount( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL deselectAccessibleChild( sal_Int32 nChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; +}; + + +#endif // INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLETABCONTROL_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/standard/vclxaccessibletabpage.hxx b/accessibility/inc/standard/vclxaccessibletabpage.hxx new file mode 100644 index 000000000000..4ea0d272a2cb --- /dev/null +++ b/accessibility/inc/standard/vclxaccessibletabpage.hxx @@ -0,0 +1,139 @@ +/* -*- 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_STANDARD_VCLXACCESSIBLETABPAGE_HXX +#define INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLETABPAGE_HXX + +#include +#include +#include +#include +#include + + +class TabControl; +class VCLExternalSolarLock; + +namespace utl { +class AccessibleStateSetHelper; +} + + +// class VCLXAccessibleTabPage + + +typedef ::comphelper::OAccessibleTextHelper AccessibleTextHelper_BASE; + +typedef ::cppu::ImplHelper2< + css::accessibility::XAccessible, + css::lang::XServiceInfo > VCLXAccessibleTabPage_BASE; + +class VCLXAccessibleTabPage : public AccessibleTextHelper_BASE, + public VCLXAccessibleTabPage_BASE +{ + friend class VCLXAccessibleTabControl; + +private: + VCLExternalSolarLock* m_pExternalLock; + VclPtr m_pTabControl; + sal_uInt16 m_nPageId; + bool m_bFocused; + bool m_bSelected; + OUString m_sPageText; + +protected: + bool IsFocused(); + bool IsSelected(); + + void SetFocused( bool bFocused ); + void SetSelected( bool bSelected ); + void SetPageText( const OUString& sPageText ); + OUString GetPageText(); + + void Update( bool bNew ); + + sal_uInt16 GetPageId() const { return m_nPageId; } + + void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ); + + // OCommonAccessibleComponent + virtual css::awt::Rectangle implGetBounds( ) throw (css::uno::RuntimeException) override; + + // OCommonAccessibleText + virtual OUString implGetText() override; + virtual css::lang::Locale implGetLocale() override; + virtual void implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ) override; + + // XComponent + virtual void SAL_CALL disposing() override; + +public: + VCLXAccessibleTabPage( TabControl* pTabControl, sal_uInt16 nPageId ); + virtual ~VCLXAccessibleTabPage(); + + // XInterface + DECLARE_XINTERFACE() + + // XTypeProvider + DECLARE_XTYPEPROVIDER() + + // XServiceInfo + virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) override; + + // XAccessible + virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( ) throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleContext + virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getAccessibleIndexInParent( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int16 SAL_CALL getAccessibleRole( ) throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getAccessibleDescription( ) throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getAccessibleName( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::lang::Locale SAL_CALL getLocale( ) throw (css::accessibility::IllegalAccessibleComponentStateException, css::uno::RuntimeException, std::exception) override; + + // XAccessibleComponent + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const css::awt::Point& aPoint ) throw (css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL grabFocus( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getForeground( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getBackground( ) throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleExtendedComponent + virtual css::uno::Reference< css::awt::XFont > SAL_CALL getFont( ) throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getTitledBorderText( ) throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getToolTipText( ) throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleText + virtual sal_Int32 SAL_CALL getCaretPosition() throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getCharacterAttributes( sal_Int32 nIndex, const css::uno::Sequence< OUString >& aRequestedAttributes ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual css::awt::Rectangle SAL_CALL getCharacterBounds( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getIndexAtPoint( const css::awt::Point& aPoint ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; +}; + +#endif // INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLETABPAGE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/standard/vclxaccessibletabpagewindow.hxx b/accessibility/inc/standard/vclxaccessibletabpagewindow.hxx new file mode 100644 index 000000000000..b485f081173f --- /dev/null +++ b/accessibility/inc/standard/vclxaccessibletabpagewindow.hxx @@ -0,0 +1,60 @@ +/* -*- 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_STANDARD_VCLXACCESSIBLETABPAGEWINDOW_HXX +#define INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLETABPAGEWINDOW_HXX + +#include +#include + + +class TabControl; +class TabPage; + + +// class VCLXAccessibleTabPageWindow + + +class VCLXAccessibleTabPageWindow : public VCLXAccessibleComponent +{ +private: + VclPtr m_pTabControl; + VclPtr m_pTabPage; + sal_uInt16 m_nPageId; + +protected: + // OCommonAccessibleComponent + virtual css::awt::Rectangle implGetBounds( ) throw (css::uno::RuntimeException) override; + + // XComponent + virtual void SAL_CALL disposing() override; + +public: + VCLXAccessibleTabPageWindow( VCLXWindow* pVCLXWindow ); + virtual ~VCLXAccessibleTabPageWindow(); + + // XAccessibleContext + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getAccessibleIndexInParent( ) throw (css::uno::RuntimeException, std::exception) override; +}; + + +#endif // INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLETABPAGEWINDOW_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/standard/vclxaccessibletextcomponent.hxx b/accessibility/inc/standard/vclxaccessibletextcomponent.hxx new file mode 100644 index 000000000000..24cc9c34a3cb --- /dev/null +++ b/accessibility/inc/standard/vclxaccessibletextcomponent.hxx @@ -0,0 +1,85 @@ +/* -*- 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_STANDARD_VCLXACCESSIBLETEXTCOMPONENT_HXX +#define INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLETEXTCOMPONENT_HXX + +#include +#include + + +// class VCLXAccessibleTextComponent + + +typedef ::cppu::ImplHelper1 < + css::accessibility::XAccessibleText > VCLXAccessibleTextComponent_BASE; + +class VCLXAccessibleTextComponent : public VCLXAccessibleComponent, + public ::comphelper::OCommonAccessibleText, + public VCLXAccessibleTextComponent_BASE +{ +protected: + OUString m_sText; + + void SetText( const OUString& sText ); + + virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) override; + + // OCommonAccessibleText + virtual OUString implGetText() override; + virtual css::lang::Locale implGetLocale() override; + virtual void implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ) override; + + // XComponent + virtual void SAL_CALL disposing() override; + +public: + VCLXAccessibleTextComponent( VCLXWindow* pVCLXWindow ); + virtual ~VCLXAccessibleTextComponent(); + + // XInterface + DECLARE_XINTERFACE() + + // XTypeProvider + DECLARE_XTYPEPROVIDER() + + // XAccessibleText + virtual sal_Int32 SAL_CALL getCaretPosition() throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual sal_Unicode SAL_CALL getCharacter( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getCharacterAttributes( sal_Int32 nIndex, const css::uno::Sequence< OUString >& aRequestedAttributes ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual css::awt::Rectangle SAL_CALL getCharacterBounds( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getCharacterCount() throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getIndexAtPoint( const css::awt::Point& aPoint ) throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getSelectedText() throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getSelectionStart() throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getSelectionEnd() throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getText() throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual css::accessibility::TextSegment SAL_CALL getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (css::lang::IndexOutOfBoundsException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override; + virtual css::accessibility::TextSegment SAL_CALL getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (css::lang::IndexOutOfBoundsException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override; + virtual css::accessibility::TextSegment SAL_CALL getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (css::lang::IndexOutOfBoundsException, css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; +}; + + +#endif // INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLETEXTCOMPONENT_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/standard/vclxaccessibletextfield.hxx b/accessibility/inc/standard/vclxaccessibletextfield.hxx new file mode 100644 index 000000000000..d71b7c275e96 --- /dev/null +++ b/accessibility/inc/standard/vclxaccessibletextfield.hxx @@ -0,0 +1,92 @@ +/* -*- 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_STANDARD_VCLXACCESSIBLETEXTFIELD_HXX +#define INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLETEXTFIELD_HXX + +#include + +#include + +typedef ::cppu::ImplHelper1< css::accessibility::XAccessible > VCLXAccessible_BASE; + + +/** This class represents non editable text fields. The object passed to + the constructor is expected to be a list (a ListBox to be + more specific). From this always the selected item is token to be made + accessible by this class. When the selected item changes then also the + exported text changes. +*/ +class VCLXAccessibleTextField : + public VCLXAccessibleTextComponent, + public VCLXAccessible_BASE +{ +public: + VCLXAccessibleTextField (VCLXWindow* pVCLXindow, + const css::uno::Reference< css::accessibility::XAccessible >& _xParent); + + // XInterface + DECLARE_XINTERFACE() + + // XTypeProvider + DECLARE_XTYPEPROVIDER() + + // XAccessible + css::uno::Reference< css::accessibility::XAccessibleContext> SAL_CALL + getAccessibleContext() + throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleContext + sal_Int32 SAL_CALL getAccessibleChildCount() + throw (css::uno::RuntimeException, std::exception) override; + css::uno::Reference< css::accessibility::XAccessible> SAL_CALL + getAccessibleChild (sal_Int32 i) + throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + sal_Int16 SAL_CALL getAccessibleRole() + throw (css::uno::RuntimeException, std::exception) override; + css::uno::Reference< css::accessibility::XAccessible > SAL_CALL + getAccessibleParent( ) + throw (css::uno::RuntimeException, std::exception) override; + + // XServiceInfo + virtual OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException, std::exception) override; + // Return text field specific services. + virtual css::uno::Sequence< OUString > SAL_CALL + getSupportedServiceNames() + throw (css::uno::RuntimeException, std::exception) override; + +protected: + virtual ~VCLXAccessibleTextField(); + + /** With this method the text of the currently selected item is made + available to the VCLXAccessibleTextComponent base class. + */ + OUString implGetText() override; + +private: + /** We need to save the accessible parent to return it in getAccessibleParent(), + because this method of the base class returns the wrong parent. + */ + css::uno::Reference< css::accessibility::XAccessible > m_xParent; +}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/standard/vclxaccessibletoolbox.hxx b/accessibility/inc/standard/vclxaccessibletoolbox.hxx new file mode 100644 index 000000000000..63dfa107829a --- /dev/null +++ b/accessibility/inc/standard/vclxaccessibletoolbox.hxx @@ -0,0 +1,105 @@ +/* -*- 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_STANDARD_VCLXACCESSIBLETOOLBOX_HXX +#define INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLETOOLBOX_HXX + +#include +#include +#include + + +// class VCLXAccessibleToolBox + + +typedef ::cppu::ImplHelper1 < css::accessibility::XAccessibleSelection > VCLXAccessibleToolBox_BASE; + +typedef std::map< sal_Int32, css::uno::Reference< css::accessibility::XAccessible > > ToolBoxItemsMap; + +class VCLXAccessibleToolBoxItem; +class ToolBox; + +class VCLXAccessibleToolBox : public VCLXAccessibleComponent, public VCLXAccessibleToolBox_BASE +{ +private: + ToolBoxItemsMap m_aAccessibleChildren; + + VCLXAccessibleToolBoxItem* GetItem_Impl( sal_Int32 _nPos ); + + void UpdateFocus_Impl(); + void ReleaseFocus_Impl( sal_Int32 _nPos ); + void UpdateChecked_Impl( sal_Int32 _nPos ); + void UpdateIndeterminate_Impl( sal_Int32 _nPos ); + void UpdateItem_Impl( sal_Int32 _nPos ); + void UpdateAllItems_Impl(); + void UpdateItemName_Impl( sal_Int32 _nPos ); + void UpdateItemEnabled_Impl( sal_Int32 _nPos ); + void UpdateCustomPopupItemp_Impl( vcl::Window* pWindow, bool bOpen ); + void HandleSubToolBarEvent( const VclWindowEvent& rVclWindowEvent ); + void ReleaseSubToolBox( ToolBox* _pSubToolBox ); + +protected: + virtual ~VCLXAccessibleToolBox(); + + virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet ) override; + virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) override; + virtual void ProcessWindowChildEvent( const VclWindowEvent& rVclWindowEvent ) override; + + virtual css::uno::Reference< css::accessibility::XAccessible > GetChildAccessible( const VclWindowEvent& rVclWindowEvent ) override; + css::uno::Reference< css::accessibility::XAccessible > GetItemWindowAccessible( const VclWindowEvent& rVclWindowEvent ); + + // XComponent + virtual void SAL_CALL disposing() override; + +public: + VCLXAccessibleToolBox( VCLXWindow* pVCLXWindow ); + + // XInterface + DECLARE_XINTERFACE( ) + + // XTypeProvider + DECLARE_XTYPEPROVIDER( ) + + // XServiceInfo + virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleContext + virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const css::awt::Point& aPoint ) throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleSelection + virtual void SAL_CALL selectAccessibleChild( sal_Int32 nChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL isAccessibleChildSelected( sal_Int32 nChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL clearAccessibleSelection( ) throw (css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL selectAllAccessibleChildren( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getSelectedAccessibleChildCount( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL deselectAccessibleChild( sal_Int32 nChildIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + +private: + void implReleaseToolboxItem( + ToolBoxItemsMap::iterator& _rMapPos, + bool _bNotifyRemoval + ); +}; + +#endif // INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLETOOLBOX_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/inc/standard/vclxaccessibletoolboxitem.hxx b/accessibility/inc/standard/vclxaccessibletoolboxitem.hxx new file mode 100644 index 000000000000..3411640637c7 --- /dev/null +++ b/accessibility/inc/standard/vclxaccessibletoolboxitem.hxx @@ -0,0 +1,154 @@ +/* -*- 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_STANDARD_VCLXACCESSIBLETOOLBOXITEM_HXX +#define INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLETOOLBOXITEM_HXX + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +class ToolBox; + +typedef ::comphelper::OAccessibleTextHelper AccessibleTextHelper_BASE; +typedef ::cppu::ImplHelper4 < css::accessibility::XAccessible, + css::accessibility::XAccessibleAction, + css::accessibility::XAccessibleValue, + css::lang::XServiceInfo > VCLXAccessibleToolBoxItem_BASE; + +class VCLExternalSolarLock; + +class VCLXAccessibleToolBoxItem : public AccessibleTextHelper_BASE, + public VCLXAccessibleToolBoxItem_BASE +{ +private: + OUString m_sOldName; + VclPtr m_pToolBox; + VCLExternalSolarLock* m_pExternalLock; + sal_Int32 m_nIndexInParent; + sal_Int16 m_nRole; + sal_uInt16 m_nItemId; + bool m_bHasFocus; + bool m_bIsChecked; + bool m_bIndeterminate; + + css::uno::Reference< css::accessibility::XAccessible > m_xChild; + +public: + inline sal_Int32 getIndexInParent() const { return m_nIndexInParent; } + inline void setIndexInParent( sal_Int32 _nNewIndex ) { m_nIndexInParent = _nNewIndex; } + +protected: + virtual ~VCLXAccessibleToolBoxItem(); + + virtual void SAL_CALL disposing() override; + + /// implements the calculation of the bounding rectangle + virtual css::awt::Rectangle implGetBounds( ) throw (css::uno::RuntimeException) override; + + // OCommonAccessibleText + virtual OUString implGetText() override; + virtual css::lang::Locale implGetLocale() override; + virtual void implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ) override; + + OUString GetText(); + +public: + VCLXAccessibleToolBoxItem( ToolBox* _pToolBox, sal_Int32 _nPos ); + + void SetFocus( bool _bFocus ); + inline bool HasFocus() const { return m_bHasFocus; } + void SetChecked( bool _bCheck ); + void SetIndeterminate( bool _bIndeterminate ); + inline void ReleaseToolBox() { m_pToolBox = nullptr; } + void NameChanged(); + void SetChild( const css::uno::Reference< css::accessibility::XAccessible >& _xChild ); + const css::uno::Reference< css::accessibility::XAccessible >& + GetChild() const { return m_xChild; } + void NotifyChildEvent( const css::uno::Reference< css::accessibility::XAccessible >& _xChild, bool _bShow ); + + void ToggleEnableState(); + + // XInterface + DECLARE_XINTERFACE( ) + DECLARE_XTYPEPROVIDER( ) + + // XServiceInfo + virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) override; + + // XAccessible + virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( ) throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleContext + virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getAccessibleIndexInParent( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int16 SAL_CALL getAccessibleRole( ) throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getAccessibleDescription( ) throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getAccessibleName( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet( ) throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleText + virtual sal_Int32 SAL_CALL getCaretPosition() throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getCharacterAttributes( sal_Int32 nIndex, const css::uno::Sequence< OUString >& aRequestedAttributes ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual css::awt::Rectangle SAL_CALL getCharacterBounds( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getIndexAtPoint( const css::awt::Point& aPoint ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + + // XAccessibleComponent + virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const css::awt::Point& aPoint ) throw (css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL grabFocus( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getForeground( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Int32 SAL_CALL getBackground( ) throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleExtendedComponent + virtual css::uno::Reference< css::awt::XFont > SAL_CALL getFont( ) throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getTitledBorderText( ) throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getToolTipText( ) throw (css::uno::RuntimeException, std::exception) override; + + // XAccessibleAction + virtual sal_Int32 SAL_CALL getAccessibleActionCount( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL doAccessibleAction ( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getAccessibleActionDescription ( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + virtual css::uno::Reference< css::accessibility::XAccessibleKeyBinding > SAL_CALL getAccessibleActionKeyBinding( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; + + // XAccessibleValue + virtual css::uno::Any SAL_CALL getCurrentValue( ) throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL setCurrentValue( const css::uno::Any& aNumber ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Any SAL_CALL getMaximumValue( ) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Any SAL_CALL getMinimumValue( ) throw (css::uno::RuntimeException, std::exception) override; +}; + +#endif // INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLETOOLBOXITEM_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/accessibility/source/extended/AccessibleBrowseBox.cxx b/accessibility/source/extended/AccessibleBrowseBox.cxx index c1edec8deddc..70b7c1702c24 100644 --- a/accessibility/source/extended/AccessibleBrowseBox.cxx +++ b/accessibility/source/extended/AccessibleBrowseBox.cxx @@ -17,9 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include "accessibility/extended/AccessibleBrowseBox.hxx" -#include "accessibility/extended/AccessibleBrowseBoxTable.hxx" -#include "accessibility/extended/AccessibleBrowseBoxHeaderBar.hxx" +#include "extended/AccessibleBrowseBox.hxx" +#include "extended/AccessibleBrowseBoxTable.hxx" +#include "extended/AccessibleBrowseBoxHeaderBar.hxx" #include #include #include @@ -72,7 +72,7 @@ void AccessibleBrowseBox::setCreator( const css::uno::Reference< css::accessibil { #if OSL_DEBUG_LEVEL > 0 css::uno::Reference< css::accessibility::XAccessible > xCreator(m_xImpl->m_aCreator); - OSL_ENSURE( !xCreator.is(), "accessibility/extended/AccessibleBrowseBox::setCreator: creator already set!" ); + OSL_ENSURE( !xCreator.is(), "extended/AccessibleBrowseBox::setCreator: creator already set!" ); #endif m_xImpl->m_aCreator = _rxCreator; } @@ -281,7 +281,7 @@ AccessibleBrowseBox::implGetFixedChild( sal_Int32 nChildIndex ) AccessibleBrowseBoxTable* AccessibleBrowseBox::createAccessibleTable() { css::uno::Reference< css::accessibility::XAccessible > xCreator(m_xImpl->m_aCreator); - OSL_ENSURE( xCreator.is(), "accessibility/extended/AccessibleBrowseBox::createAccessibleTable: my creator died - how this?" ); + OSL_ENSURE( xCreator.is(), "extended/AccessibleBrowseBox::createAccessibleTable: my creator died - how this?" ); return new AccessibleBrowseBoxTable( xCreator, *mpBrowseBox ); } @@ -333,7 +333,7 @@ css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL Accessibl ::osl::MutexGuard aGuard( m_aMutex ); OSL_ENSURE( ( m_pContext && m_xContext.is() ) || ( !m_pContext && !m_xContext.is() ), - "accessibility/extended/AccessibleBrowseBoxAccess::getAccessibleContext: inconsistency!" ); + "extended/AccessibleBrowseBoxAccess::getAccessibleContext: inconsistency!" ); // if the context died meanwhile (there is no listener, so it won't tell us explicitily when this happens), // then reset and re-create. diff --git a/accessibility/source/extended/AccessibleBrowseBoxBase.cxx b/accessibility/source/extended/AccessibleBrowseBoxBase.cxx index 3387cbb91e30..1ff3c7558e26 100644 --- a/accessibility/source/extended/AccessibleBrowseBoxBase.cxx +++ b/accessibility/source/extended/AccessibleBrowseBoxBase.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include "accessibility/extended/AccessibleBrowseBoxBase.hxx" +#include "extended/AccessibleBrowseBoxBase.hxx" #include #include #include diff --git a/accessibility/source/extended/AccessibleBrowseBoxCheckBoxCell.cxx b/accessibility/source/extended/AccessibleBrowseBoxCheckBoxCell.cxx index cd805ae9d5fe..da37ca0baf0a 100644 --- a/accessibility/source/extended/AccessibleBrowseBoxCheckBoxCell.cxx +++ b/accessibility/source/extended/AccessibleBrowseBoxCheckBoxCell.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include +#include #include #include diff --git a/accessibility/source/extended/AccessibleBrowseBoxHeaderBar.cxx b/accessibility/source/extended/AccessibleBrowseBoxHeaderBar.cxx index 07225c233181..7cdefc5274a3 100644 --- a/accessibility/source/extended/AccessibleBrowseBoxHeaderBar.cxx +++ b/accessibility/source/extended/AccessibleBrowseBoxHeaderBar.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include "accessibility/extended/AccessibleBrowseBoxHeaderBar.hxx" +#include "extended/AccessibleBrowseBoxHeaderBar.hxx" #include #include @@ -43,7 +43,7 @@ AccessibleBrowseBoxHeaderBar::AccessibleBrowseBoxHeaderBar( AccessibleBrowseBoxTableBase( rxParent, rBrowseBox,eObjType ) { OSL_ENSURE( isRowBar() || isColumnBar(), - "accessibility/extended/AccessibleBrowseBoxHeaderBar - invalid object type" ); + "extended/AccessibleBrowseBoxHeaderBar - invalid object type" ); } AccessibleBrowseBoxHeaderBar::~AccessibleBrowseBoxHeaderBar() diff --git a/accessibility/source/extended/AccessibleBrowseBoxHeaderCell.cxx b/accessibility/source/extended/AccessibleBrowseBoxHeaderCell.cxx index c7332aafbea2..c40b79885200 100644 --- a/accessibility/source/extended/AccessibleBrowseBoxHeaderCell.cxx +++ b/accessibility/source/extended/AccessibleBrowseBoxHeaderCell.cxx @@ -18,9 +18,9 @@ */ -#include "accessibility/extended/AccessibleBrowseBoxHeaderCell.hxx" +#include "extended/AccessibleBrowseBoxHeaderCell.hxx" #include -#include "accessibility/extended/AccessibleBrowseBox.hxx" +#include "extended/AccessibleBrowseBox.hxx" namespace accessibility { diff --git a/accessibility/source/extended/AccessibleBrowseBoxTable.cxx b/accessibility/source/extended/AccessibleBrowseBoxTable.cxx index f8ba7101202e..4123dd8b0cc9 100644 --- a/accessibility/source/extended/AccessibleBrowseBoxTable.cxx +++ b/accessibility/source/extended/AccessibleBrowseBoxTable.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include "accessibility/extended/AccessibleBrowseBoxTable.hxx" +#include "extended/AccessibleBrowseBoxTable.hxx" #include diff --git a/accessibility/source/extended/AccessibleBrowseBoxTableBase.cxx b/accessibility/source/extended/AccessibleBrowseBoxTableBase.cxx index 43faaca52cdc..0abc93ba7719 100644 --- a/accessibility/source/extended/AccessibleBrowseBoxTableBase.cxx +++ b/accessibility/source/extended/AccessibleBrowseBoxTableBase.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include "accessibility/extended/AccessibleBrowseBoxTableBase.hxx" +#include "extended/AccessibleBrowseBoxTableBase.hxx" #include #include #include diff --git a/accessibility/source/extended/AccessibleBrowseBoxTableCell.cxx b/accessibility/source/extended/AccessibleBrowseBoxTableCell.cxx index bcfe90550771..a8b5a5377184 100644 --- a/accessibility/source/extended/AccessibleBrowseBoxTableCell.cxx +++ b/accessibility/source/extended/AccessibleBrowseBoxTableCell.cxx @@ -18,7 +18,7 @@ */ -#include "accessibility/extended/AccessibleBrowseBoxTableCell.hxx" +#include "extended/AccessibleBrowseBoxTableCell.hxx" #include #include #include diff --git a/accessibility/source/extended/AccessibleGridControl.cxx b/accessibility/source/extended/AccessibleGridControl.cxx index 5c32dcf0ac5a..d647bc8b0e4f 100644 --- a/accessibility/source/extended/AccessibleGridControl.cxx +++ b/accessibility/source/extended/AccessibleGridControl.cxx @@ -17,9 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include "accessibility/extended/AccessibleGridControl.hxx" -#include "accessibility/extended/AccessibleGridControlTable.hxx" -#include "accessibility/extended/AccessibleGridControlHeader.hxx" +#include "extended/AccessibleGridControl.hxx" +#include "extended/AccessibleGridControlTable.hxx" +#include "extended/AccessibleGridControlHeader.hxx" #include #include #include @@ -305,7 +305,7 @@ AccessibleGridControl::implGetFixedChild( sal_Int32 nChildIndex ) AccessibleGridControlTable* AccessibleGridControl::createAccessibleTable() { css::uno::Reference< css::accessibility::XAccessible > xCreator(m_xImpl->m_aCreator); - OSL_ENSURE( xCreator.is(), "accessibility/extended/AccessibleGridControl::createAccessibleTable: my creator died - how this?" ); + OSL_ENSURE( xCreator.is(), "extended/AccessibleGridControl::createAccessibleTable: my creator died - how this?" ); return new AccessibleGridControlTable( xCreator, m_aTable, TCTYPE_TABLE ); } @@ -418,7 +418,7 @@ css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL Accessibl SolarMutexGuard g; OSL_ENSURE( ( m_pContext && m_xContext.is() ) || ( !m_pContext && !m_xContext.is() ), - "accessibility/extended/AccessibleGridControlAccess::getAccessibleContext: inconsistency!" ); + "extended/AccessibleGridControlAccess::getAccessibleContext: inconsistency!" ); // if the context died meanwhile (we're no listener, so it won't tell us explicitily when this happens), // then reset an re-create. diff --git a/accessibility/source/extended/AccessibleGridControlBase.cxx b/accessibility/source/extended/AccessibleGridControlBase.cxx index 3f858f6968ae..088d56fcd432 100644 --- a/accessibility/source/extended/AccessibleGridControlBase.cxx +++ b/accessibility/source/extended/AccessibleGridControlBase.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include +#include #include #include #include diff --git a/accessibility/source/extended/AccessibleGridControlHeader.cxx b/accessibility/source/extended/AccessibleGridControlHeader.cxx index dd34536640fd..c8d5c5551f2f 100644 --- a/accessibility/source/extended/AccessibleGridControlHeader.cxx +++ b/accessibility/source/extended/AccessibleGridControlHeader.cxx @@ -17,9 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include "accessibility/extended/AccessibleGridControlHeader.hxx" -#include "accessibility/extended/AccessibleGridControlHeaderCell.hxx" -#include "accessibility/extended/AccessibleGridControlTableCell.hxx" +#include "extended/AccessibleGridControlHeader.hxx" +#include "extended/AccessibleGridControlHeaderCell.hxx" +#include "extended/AccessibleGridControlTableCell.hxx" #include #include @@ -45,7 +45,7 @@ AccessibleGridControlHeader::AccessibleGridControlHeader( AccessibleGridControlTableBase( rxParent, rTable, eObjType ) { OSL_ENSURE( isRowBar() || isColumnBar(), - "accessibility/extended/AccessibleGridControlHeaderBar - invalid object type" ); + "extended/AccessibleGridControlHeaderBar - invalid object type" ); } AccessibleGridControlHeader::~AccessibleGridControlHeader() diff --git a/accessibility/source/extended/AccessibleGridControlHeaderCell.cxx b/accessibility/source/extended/AccessibleGridControlHeaderCell.cxx index 0ce82c76adaa..8d9825936692 100644 --- a/accessibility/source/extended/AccessibleGridControlHeaderCell.cxx +++ b/accessibility/source/extended/AccessibleGridControlHeaderCell.cxx @@ -18,9 +18,9 @@ */ -#include "accessibility/extended/AccessibleGridControlHeaderCell.hxx" +#include "extended/AccessibleGridControlHeaderCell.hxx" #include -#include "accessibility/extended/AccessibleGridControl.hxx" +#include "extended/AccessibleGridControl.hxx" namespace accessibility { diff --git a/accessibility/source/extended/AccessibleGridControlTable.cxx b/accessibility/source/extended/AccessibleGridControlTable.cxx index faff58d6018e..bdf7ea23cfc0 100644 --- a/accessibility/source/extended/AccessibleGridControlTable.cxx +++ b/accessibility/source/extended/AccessibleGridControlTable.cxx @@ -17,8 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include "accessibility/extended/AccessibleGridControlTable.hxx" -#include "accessibility/extended/AccessibleGridControlTableCell.hxx" +#include "extended/AccessibleGridControlTable.hxx" +#include "extended/AccessibleGridControlTableCell.hxx" #include diff --git a/accessibility/source/extended/AccessibleGridControlTableBase.cxx b/accessibility/source/extended/AccessibleGridControlTableBase.cxx index a226b6e9c9ff..a98e1f58b9c4 100644 --- a/accessibility/source/extended/AccessibleGridControlTableBase.cxx +++ b/accessibility/source/extended/AccessibleGridControlTableBase.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include "accessibility/extended/AccessibleGridControlTableBase.hxx" +#include "extended/AccessibleGridControlTableBase.hxx" #include #include #include diff --git a/accessibility/source/extended/AccessibleGridControlTableCell.cxx b/accessibility/source/extended/AccessibleGridControlTableCell.cxx index b2ca0eefd176..85bd0022fe49 100644 --- a/accessibility/source/extended/AccessibleGridControlTableCell.cxx +++ b/accessibility/source/extended/AccessibleGridControlTableCell.cxx @@ -18,7 +18,7 @@ */ -#include "accessibility/extended/AccessibleGridControlTableCell.hxx" +#include "extended/AccessibleGridControlTableCell.hxx" #include #include #include diff --git a/accessibility/source/extended/accessiblebrowseboxcell.cxx b/accessibility/source/extended/accessiblebrowseboxcell.cxx index e454f5a4372a..feaa074f214b 100644 --- a/accessibility/source/extended/accessiblebrowseboxcell.cxx +++ b/accessibility/source/extended/accessiblebrowseboxcell.cxx @@ -19,7 +19,7 @@ #include #include -#include +#include namespace accessibility { diff --git a/accessibility/source/extended/accessibleeditbrowseboxcell.cxx b/accessibility/source/extended/accessibleeditbrowseboxcell.cxx index be7adb43ee73..7344acf3edce 100644 --- a/accessibility/source/extended/accessibleeditbrowseboxcell.cxx +++ b/accessibility/source/extended/accessibleeditbrowseboxcell.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include +#include #include #include #include diff --git a/accessibility/source/extended/accessibleiconchoicectrl.cxx b/accessibility/source/extended/accessibleiconchoicectrl.cxx index 172438bcfdeb..aa9d9abc5754 100644 --- a/accessibility/source/extended/accessibleiconchoicectrl.cxx +++ b/accessibility/source/extended/accessibleiconchoicectrl.cxx @@ -17,8 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include "accessibility/extended/accessibleiconchoicectrl.hxx" -#include "accessibility/extended/accessibleiconchoicectrlentry.hxx" +#include "extended/accessibleiconchoicectrl.hxx" +#include "extended/accessibleiconchoicectrlentry.hxx" #include #include #include diff --git a/accessibility/source/extended/accessibleiconchoicectrlentry.cxx b/accessibility/source/extended/accessibleiconchoicectrlentry.cxx index 1a3c24c322f8..119e603b4c7b 100644 --- a/accessibility/source/extended/accessibleiconchoicectrlentry.cxx +++ b/accessibility/source/extended/accessibleiconchoicectrlentry.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include +#include #include #include #include diff --git a/accessibility/source/extended/accessiblelistbox.cxx b/accessibility/source/extended/accessiblelistbox.cxx index 63c2b5d45efa..a1838a4c370d 100644 --- a/accessibility/source/extended/accessiblelistbox.cxx +++ b/accessibility/source/extended/accessiblelistbox.cxx @@ -17,8 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include -#include +#include +#include #include #include #include diff --git a/accessibility/source/extended/accessiblelistboxentry.cxx b/accessibility/source/extended/accessiblelistboxentry.cxx index 12af82ab3e8c..0999c432a19a 100644 --- a/accessibility/source/extended/accessiblelistboxentry.cxx +++ b/accessibility/source/extended/accessiblelistboxentry.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include "accessibility/extended/accessiblelistboxentry.hxx" +#include "extended/accessiblelistboxentry.hxx" #include #include #include @@ -40,8 +40,8 @@ #include #include #include -#include -#include +#include +#include #include #define ACCESSIBLE_ACTION_COUNT 1 diff --git a/accessibility/source/extended/accessibletabbar.cxx b/accessibility/source/extended/accessibletabbar.cxx index 9b5cd91e683b..750a37688a59 100644 --- a/accessibility/source/extended/accessibletabbar.cxx +++ b/accessibility/source/extended/accessibletabbar.cxx @@ -17,9 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include +#include #include -#include +#include #include #include #include diff --git a/accessibility/source/extended/accessibletabbarbase.cxx b/accessibility/source/extended/accessibletabbarbase.cxx index e103a0e818b8..11a26f8aa637 100644 --- a/accessibility/source/extended/accessibletabbarbase.cxx +++ b/accessibility/source/extended/accessibletabbarbase.cxx @@ -17,9 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include "accessibility/extended/accessibletabbarbase.hxx" +#include "extended/accessibletabbarbase.hxx" #ifndef ACCESSIBILITY_EXT_ACCESSIBLETABBARPAGELIST -#include "accessibility/extended/accessibletabbarpagelist.hxx" +#include "extended/accessibletabbarpagelist.hxx" #endif #include #include diff --git a/accessibility/source/extended/accessibletabbarpage.cxx b/accessibility/source/extended/accessibletabbarpage.cxx index ad7f437d8002..c1d0a48f0182 100644 --- a/accessibility/source/extended/accessibletabbarpage.cxx +++ b/accessibility/source/extended/accessibletabbarpage.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include +#include #include #include #include diff --git a/accessibility/source/extended/accessibletabbarpagelist.cxx b/accessibility/source/extended/accessibletabbarpagelist.cxx index 0ef33627c4c0..17e1fe9767cf 100644 --- a/accessibility/source/extended/accessibletabbarpagelist.cxx +++ b/accessibility/source/extended/accessibletabbarpagelist.cxx @@ -17,9 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include +#include #include -#include +#include #include #include #include diff --git a/accessibility/source/extended/accessibletablistbox.cxx b/accessibility/source/extended/accessibletablistbox.cxx index fccc8e8d300b..b92d0d82dbce 100644 --- a/accessibility/source/extended/accessibletablistbox.cxx +++ b/accessibility/source/extended/accessibletablistbox.cxx @@ -18,8 +18,8 @@ */ -#include "accessibility/extended/accessibletablistbox.hxx" -#include "accessibility/extended/accessibletablistboxtable.hxx" +#include "extended/accessibletablistbox.hxx" +#include "extended/accessibletablistboxtable.hxx" #include #include diff --git a/accessibility/source/extended/accessibletablistboxtable.cxx b/accessibility/source/extended/accessibletablistboxtable.cxx index 92f1a230221d..f13ad1619032 100644 --- a/accessibility/source/extended/accessibletablistboxtable.cxx +++ b/accessibility/source/extended/accessibletablistboxtable.cxx @@ -18,9 +18,9 @@ */ -#include "accessibility/extended/accessibletablistboxtable.hxx" -#include "accessibility/extended/AccessibleBrowseBoxTableCell.hxx" -#include "accessibility/extended/AccessibleBrowseBoxCheckBoxCell.hxx" +#include "extended/accessibletablistboxtable.hxx" +#include "extended/AccessibleBrowseBoxTableCell.hxx" +#include "extended/AccessibleBrowseBoxCheckBoxCell.hxx" #include #include diff --git a/accessibility/source/extended/listboxaccessible.cxx b/accessibility/source/extended/listboxaccessible.cxx index 47fb3b62b821..533b3e208e66 100644 --- a/accessibility/source/extended/listboxaccessible.cxx +++ b/accessibility/source/extended/listboxaccessible.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include +#include #include #include diff --git a/accessibility/source/extended/textwindowaccessibility.cxx b/accessibility/source/extended/textwindowaccessibility.cxx index 33454e83d6ab..61175803e86b 100644 --- a/accessibility/source/extended/textwindowaccessibility.cxx +++ b/accessibility/source/extended/textwindowaccessibility.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include +#include #include #include #include diff --git a/accessibility/source/helper/IComboListBoxHelper.cxx b/accessibility/source/helper/IComboListBoxHelper.cxx index 1edaae97391e..5c3ce6b94076 100644 --- a/accessibility/source/helper/IComboListBoxHelper.cxx +++ b/accessibility/source/helper/IComboListBoxHelper.cxx @@ -7,7 +7,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include +#include namespace accessibility { diff --git a/accessibility/source/helper/acc_factory.cxx b/accessibility/source/helper/acc_factory.cxx index 45587c9ccae5..f4c8597445c4 100644 --- a/accessibility/source/helper/acc_factory.cxx +++ b/accessibility/source/helper/acc_factory.cxx @@ -22,40 +22,40 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include -#include +#include #include #include diff --git a/accessibility/source/helper/accessiblestrings.src b/accessibility/source/helper/accessiblestrings.src index f112af3b48bb..63e30670df76 100644 --- a/accessibility/source/helper/accessiblestrings.src +++ b/accessibility/source/helper/accessiblestrings.src @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include +#include String RID_STR_ACC_ACTION_CLICK { diff --git a/accessibility/source/helper/accresmgr.cxx b/accessibility/source/helper/accresmgr.cxx index 25c5a515fd08..ca09872bc8c3 100644 --- a/accessibility/source/helper/accresmgr.cxx +++ b/accessibility/source/helper/accresmgr.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include +#include #include #include diff --git a/accessibility/source/helper/characterattributeshelper.cxx b/accessibility/source/helper/characterattributeshelper.cxx index cc02ef63030e..4e33d1bc184a 100644 --- a/accessibility/source/helper/characterattributeshelper.cxx +++ b/accessibility/source/helper/characterattributeshelper.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include +#include #include #include diff --git a/accessibility/source/standard/accessiblemenubasecomponent.cxx b/accessibility/source/standard/accessiblemenubasecomponent.cxx index 9ef64b410fc6..4c4ecc7d624a 100644 --- a/accessibility/source/standard/accessiblemenubasecomponent.cxx +++ b/accessibility/source/standard/accessiblemenubasecomponent.cxx @@ -17,10 +17,10 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include -#include -#include -#include +#include +#include +#include +#include #include #include diff --git a/accessibility/source/standard/accessiblemenucomponent.cxx b/accessibility/source/standard/accessiblemenucomponent.cxx index 16fe428bd6bc..2fc95d3afcca 100644 --- a/accessibility/source/standard/accessiblemenucomponent.cxx +++ b/accessibility/source/standard/accessiblemenucomponent.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include +#include #include #include diff --git a/accessibility/source/standard/accessiblemenuitemcomponent.cxx b/accessibility/source/standard/accessiblemenuitemcomponent.cxx index 41d27b01bcef..50a83c63192b 100644 --- a/accessibility/source/standard/accessiblemenuitemcomponent.cxx +++ b/accessibility/source/standard/accessiblemenuitemcomponent.cxx @@ -17,11 +17,11 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include +#include -#include -#include +#include +#include #include #include #include diff --git a/accessibility/source/standard/vclxaccessiblebox.cxx b/accessibility/source/standard/vclxaccessiblebox.cxx index ae4e5a66ac15..bee3e6d5ccad 100644 --- a/accessibility/source/standard/vclxaccessiblebox.cxx +++ b/accessibility/source/standard/vclxaccessiblebox.cxx @@ -17,11 +17,11 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -30,8 +30,8 @@ #include #include #include -#include -#include +#include +#include using namespace ::com::sun::star; using namespace ::com::sun::star::uno; diff --git a/accessibility/source/standard/vclxaccessiblebutton.cxx b/accessibility/source/standard/vclxaccessiblebutton.cxx index 66da4236b020..99c8c6b15b52 100644 --- a/accessibility/source/standard/vclxaccessiblebutton.cxx +++ b/accessibility/source/standard/vclxaccessiblebutton.cxx @@ -17,9 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include -#include -#include +#include +#include +#include #include #include diff --git a/accessibility/source/standard/vclxaccessiblecheckbox.cxx b/accessibility/source/standard/vclxaccessiblecheckbox.cxx index c54e064d94b5..e66e236a8809 100644 --- a/accessibility/source/standard/vclxaccessiblecheckbox.cxx +++ b/accessibility/source/standard/vclxaccessiblecheckbox.cxx @@ -17,11 +17,11 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include +#include #include -#include -#include +#include +#include #include #include diff --git a/accessibility/source/standard/vclxaccessiblecombobox.cxx b/accessibility/source/standard/vclxaccessiblecombobox.cxx index 1da4234a4f6b..3ff31db6c0c6 100644 --- a/accessibility/source/standard/vclxaccessiblecombobox.cxx +++ b/accessibility/source/standard/vclxaccessiblecombobox.cxx @@ -17,8 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include -#include +#include +#include #include #include #include diff --git a/accessibility/source/standard/vclxaccessibledropdowncombobox.cxx b/accessibility/source/standard/vclxaccessibledropdowncombobox.cxx index 54c245cbb6ba..408e2be10a16 100644 --- a/accessibility/source/standard/vclxaccessibledropdowncombobox.cxx +++ b/accessibility/source/standard/vclxaccessibledropdowncombobox.cxx @@ -17,12 +17,12 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include diff --git a/accessibility/source/standard/vclxaccessibledropdownlistbox.cxx b/accessibility/source/standard/vclxaccessibledropdownlistbox.cxx index 67d060f46806..8e54c51f11d6 100644 --- a/accessibility/source/standard/vclxaccessibledropdownlistbox.cxx +++ b/accessibility/source/standard/vclxaccessibledropdownlistbox.cxx @@ -18,10 +18,10 @@ */ -#include -#include -#include -#include +#include +#include +#include +#include #include #include diff --git a/accessibility/source/standard/vclxaccessibleedit.cxx b/accessibility/source/standard/vclxaccessibleedit.cxx index 9ef00251c6ad..5d48aeaf7e7a 100644 --- a/accessibility/source/standard/vclxaccessibleedit.cxx +++ b/accessibility/source/standard/vclxaccessibleedit.cxx @@ -17,12 +17,12 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include +#include #include #include -#include -#include +#include +#include #include #include diff --git a/accessibility/source/standard/vclxaccessiblefixedhyperlink.cxx b/accessibility/source/standard/vclxaccessiblefixedhyperlink.cxx index 9e2580f0594c..9ea2234345a8 100644 --- a/accessibility/source/standard/vclxaccessiblefixedhyperlink.cxx +++ b/accessibility/source/standard/vclxaccessiblefixedhyperlink.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include +#include using namespace ::com::sun::star; diff --git a/accessibility/source/standard/vclxaccessiblefixedtext.cxx b/accessibility/source/standard/vclxaccessiblefixedtext.cxx index b6645b356aff..3a8744815870 100644 --- a/accessibility/source/standard/vclxaccessiblefixedtext.cxx +++ b/accessibility/source/standard/vclxaccessiblefixedtext.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include +#include #include #include diff --git a/accessibility/source/standard/vclxaccessiblelist.cxx b/accessibility/source/standard/vclxaccessiblelist.cxx index c425f3c204d5..66e1fa2d5134 100644 --- a/accessibility/source/standard/vclxaccessiblelist.cxx +++ b/accessibility/source/standard/vclxaccessiblelist.cxx @@ -17,9 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include -#include -#include +#include +#include +#include #include #include diff --git a/accessibility/source/standard/vclxaccessiblelistbox.cxx b/accessibility/source/standard/vclxaccessiblelistbox.cxx index 0db8a0671670..5c9c34e1a1c3 100644 --- a/accessibility/source/standard/vclxaccessiblelistbox.cxx +++ b/accessibility/source/standard/vclxaccessiblelistbox.cxx @@ -17,9 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include -#include -#include +#include +#include +#include #include diff --git a/accessibility/source/standard/vclxaccessiblelistitem.cxx b/accessibility/source/standard/vclxaccessiblelistitem.cxx index 26cd9d842906..c950953babe1 100644 --- a/accessibility/source/standard/vclxaccessiblelistitem.cxx +++ b/accessibility/source/standard/vclxaccessiblelistitem.cxx @@ -17,9 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include +#include #include -#include +#include #include #include #include diff --git a/accessibility/source/standard/vclxaccessiblemenu.cxx b/accessibility/source/standard/vclxaccessiblemenu.cxx index a251fdd21b63..7fc965960cbd 100644 --- a/accessibility/source/standard/vclxaccessiblemenu.cxx +++ b/accessibility/source/standard/vclxaccessiblemenu.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include +#include #include #include diff --git a/accessibility/source/standard/vclxaccessiblemenubar.cxx b/accessibility/source/standard/vclxaccessiblemenubar.cxx index 17b3cb46d9b7..fead9be98f11 100644 --- a/accessibility/source/standard/vclxaccessiblemenubar.cxx +++ b/accessibility/source/standard/vclxaccessiblemenubar.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include +#include #include #include diff --git a/accessibility/source/standard/vclxaccessiblemenuitem.cxx b/accessibility/source/standard/vclxaccessiblemenuitem.cxx index 074fb357a05d..533def411843 100644 --- a/accessibility/source/standard/vclxaccessiblemenuitem.cxx +++ b/accessibility/source/standard/vclxaccessiblemenuitem.cxx @@ -17,11 +17,11 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include -#include -#include +#include +#include +#include #include -#include +#include #include #include diff --git a/accessibility/source/standard/vclxaccessiblemenuseparator.cxx b/accessibility/source/standard/vclxaccessiblemenuseparator.cxx index 8c58c3fc285a..a7d9cdda042d 100644 --- a/accessibility/source/standard/vclxaccessiblemenuseparator.cxx +++ b/accessibility/source/standard/vclxaccessiblemenuseparator.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include +#include #include diff --git a/accessibility/source/standard/vclxaccessiblepopupmenu.cxx b/accessibility/source/standard/vclxaccessiblepopupmenu.cxx index 6d48f189b9ce..a3c77b28fc42 100644 --- a/accessibility/source/standard/vclxaccessiblepopupmenu.cxx +++ b/accessibility/source/standard/vclxaccessiblepopupmenu.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include +#include #include #include diff --git a/accessibility/source/standard/vclxaccessibleradiobutton.cxx b/accessibility/source/standard/vclxaccessibleradiobutton.cxx index d9ad6f09e52e..1951db4420e0 100644 --- a/accessibility/source/standard/vclxaccessibleradiobutton.cxx +++ b/accessibility/source/standard/vclxaccessibleradiobutton.cxx @@ -17,11 +17,11 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include +#include #include -#include -#include +#include +#include #include #include diff --git a/accessibility/source/standard/vclxaccessiblescrollbar.cxx b/accessibility/source/standard/vclxaccessiblescrollbar.cxx index f3675f7a57db..8da901e7b0e3 100644 --- a/accessibility/source/standard/vclxaccessiblescrollbar.cxx +++ b/accessibility/source/standard/vclxaccessiblescrollbar.cxx @@ -17,11 +17,11 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include +#include #include -#include -#include +#include +#include #include #include diff --git a/accessibility/source/standard/vclxaccessiblestatusbar.cxx b/accessibility/source/standard/vclxaccessiblestatusbar.cxx index 25029fa85778..5499e62efd1e 100644 --- a/accessibility/source/standard/vclxaccessiblestatusbar.cxx +++ b/accessibility/source/standard/vclxaccessiblestatusbar.cxx @@ -17,8 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include -#include +#include +#include #include #include #include diff --git a/accessibility/source/standard/vclxaccessiblestatusbaritem.cxx b/accessibility/source/standard/vclxaccessiblestatusbaritem.cxx index 0f4c1b1f5eef..ae8526f421c9 100644 --- a/accessibility/source/standard/vclxaccessiblestatusbaritem.cxx +++ b/accessibility/source/standard/vclxaccessiblestatusbaritem.cxx @@ -17,10 +17,10 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include +#include #include #include -#include +#include #include #include diff --git a/accessibility/source/standard/vclxaccessibletabcontrol.cxx b/accessibility/source/standard/vclxaccessibletabcontrol.cxx index e9ee495f527e..2f3be213e90f 100644 --- a/accessibility/source/standard/vclxaccessibletabcontrol.cxx +++ b/accessibility/source/standard/vclxaccessibletabcontrol.cxx @@ -17,8 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include -#include +#include +#include #include #include diff --git a/accessibility/source/standard/vclxaccessibletabpage.cxx b/accessibility/source/standard/vclxaccessibletabpage.cxx index bb70bdf77880..f8dd10442a42 100644 --- a/accessibility/source/standard/vclxaccessibletabpage.cxx +++ b/accessibility/source/standard/vclxaccessibletabpage.cxx @@ -17,10 +17,10 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include +#include #include #include -#include +#include #include #include diff --git a/accessibility/source/standard/vclxaccessibletabpagewindow.cxx b/accessibility/source/standard/vclxaccessibletabpagewindow.cxx index 430b4a4937cf..94283017d80e 100644 --- a/accessibility/source/standard/vclxaccessibletabpagewindow.cxx +++ b/accessibility/source/standard/vclxaccessibletabpagewindow.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include +#include #include #include #include diff --git a/accessibility/source/standard/vclxaccessibletextcomponent.cxx b/accessibility/source/standard/vclxaccessibletextcomponent.cxx index 159898b7e48b..8a0543f676e0 100644 --- a/accessibility/source/standard/vclxaccessibletextcomponent.cxx +++ b/accessibility/source/standard/vclxaccessibletextcomponent.cxx @@ -17,10 +17,10 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include +#include #include #include -#include +#include #include #include diff --git a/accessibility/source/standard/vclxaccessibletextfield.cxx b/accessibility/source/standard/vclxaccessibletextfield.cxx index 71c647e77da0..0b34a576dc77 100644 --- a/accessibility/source/standard/vclxaccessibletextfield.cxx +++ b/accessibility/source/standard/vclxaccessibletextfield.cxx @@ -17,9 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include +#include #include -#include +#include #include #include diff --git a/accessibility/source/standard/vclxaccessibletoolbox.cxx b/accessibility/source/standard/vclxaccessibletoolbox.cxx index 5e830ecab06e..9efb9266ae30 100644 --- a/accessibility/source/standard/vclxaccessibletoolbox.cxx +++ b/accessibility/source/standard/vclxaccessibletoolbox.cxx @@ -18,8 +18,8 @@ */ #include -#include -#include +#include +#include #include #include diff --git a/accessibility/source/standard/vclxaccessibletoolboxitem.cxx b/accessibility/source/standard/vclxaccessibletoolboxitem.cxx index fc4c7ed15fbb..f772b7f11789 100644 --- a/accessibility/source/standard/vclxaccessibletoolboxitem.cxx +++ b/accessibility/source/standard/vclxaccessibletoolboxitem.cxx @@ -17,10 +17,10 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include +#include #include -#include -#include +#include +#include #include #include #include -- cgit v1.2.3