a11y: Move EditBrowseBoxTableCell to svtools

While the AccessibleBrowseBoxCell base class
and other AccessibleBrowseBox* classes are
used for both, SvHeaderTabListBox (in vcl)
and BrowseBox (in svtools), EditBrowseBoxTableCell
is only used for the latter, in order to make
the currently active edit control accessible.

Therefore, move the class to the svtools library,
where BrowseBox is located as well.

This is also in preparation of reworking
how accessibility for BrowseBox's currently active
control is implemented.

Change-Id: Ia290df4b497baa66f98c1065c2425a0e2e079d13
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181267
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
This commit is contained in:
Michael Weghorn 2025-02-07 13:16:32 +01:00
parent 6decfbd3fb
commit 1df8f5979a
9 changed files with 13 additions and 14 deletions

View File

@ -278,6 +278,9 @@
#define STR_WARNING_INVALIDJAVASETTINGS_TITLE NC_("STR_WARNING_INVALIDJAVASETTINGS_TITLE", "Select JRE")
#define STR_ERROR_JVMCREATIONFAILED_TITLE NC_("STR_ERROR_JVMCREATIONFAILED_TITLE", "JRE is Defective")
#define STR_ACC_COLUMN_NUM NC_("STR_ACC_COLUMN_NUM", "Column %COLUMNNUMBER")
#define STR_ACC_ROW_NUM NC_("STR_ACC_ROW_NUM", "Row %ROWNUMBER")
// accessibility descriptions that use %PRODUCTNAME, we set these explicitly because querying a11y descs
// in order to change %PRODUCTNAME at runtime is expensive, so limit doing that as much as possible.
#define STR_A11Y_DESC_OPTIONS NC_("printersetupdialog|extended_tip|options", "Opens the Printer Options dialog where you can override the global printer options set on the Tools - Options - %PRODUCTNAME Writer/Web - Print panel for the current document.")

View File

@ -6118,7 +6118,6 @@ include/vcl/accessibility/AccessibleBrowseBoxObjType.hxx
include/vcl/accessibility/AccessibleBrowseBoxTable.hxx
include/vcl/accessibility/AccessibleBrowseBoxTableBase.hxx
include/vcl/accessibility/AccessibleBrowseBoxTableCell.hxx
include/vcl/accessibility/accessibleeditbrowseboxcell.hxx
include/vcl/BitmapBuffer.hxx
include/vcl/BitmapColor.hxx
include/vcl/BitmapPalette.hxx
@ -10932,6 +10931,8 @@ svl/unx/source/svdde/ddedummy.cxx
svtools/inc/strings.hxx
svtools/inc/framestatuslistener.hxx
svtools/langsupport/langsupport.cxx
svtools/source/brwbox/accessibleeditbrowseboxcell.cxx
svtools/source/brwbox/accessibleeditbrowseboxcell.hxx
svtools/source/brwbox/brwbox1.cxx
svtools/source/brwbox/brwbox2.cxx
svtools/source/brwbox/brwbox3.cxx
@ -14125,7 +14126,6 @@ vcl/source/accessibility/AccessibleBrowseBoxTableBase.cxx
vcl/source/accessibility/AccessibleBrowseBoxTableCell.cxx
vcl/source/accessibility/acc_factory.cxx
vcl/source/accessibility/accessiblebrowseboxcell.cxx
vcl/source/accessibility/accessibleeditbrowseboxcell.cxx
vcl/source/accessibility/accessibleiconchoicectrl.cxx
vcl/source/accessibility/accessibleiconchoicectrlentry.cxx
vcl/source/accessibility/accessiblelistbox.cxx

View File

@ -68,6 +68,7 @@ $(eval $(call gb_Library_use_externals,svt,\
))
$(eval $(call gb_Library_add_exception_objects,svt,\
svtools/source/brwbox/accessibleeditbrowseboxcell \
svtools/source/brwbox/brwbox1 \
svtools/source/brwbox/brwbox2 \
svtools/source/brwbox/brwbox3 \

View File

@ -17,13 +17,12 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <svdata.hxx>
#include <strings.hrc>
#include "accessibleeditbrowseboxcell.hxx"
#include <comphelper/processfactory.hxx>
#include <utility>
#include <comphelper/diagnose_ex.hxx>
#include <vcl/accessibility/accessibleeditbrowseboxcell.hxx>
#include <svtools/strings.hrc>
#include <svtools/svtresid.hxx>
using namespace com::sun::star::accessibility;
using namespace ::com::sun::star::uno;
@ -109,8 +108,8 @@ OUString SAL_CALL EditBrowseBoxTableCell::getAccessibleName()
SolarMethodGuard aGuard(getMutex());
ensureIsAlive();
return VclResId(RID_STR_ACC_COLUMN_NUM).replaceAll("%COLUMNNUMBER", OUString::number(getColumnPos()-1)) + ", "
+ VclResId(RID_STR_ACC_ROW_NUM).replaceAll("%ROWNUMBER", OUString::number(getRowPos()));
return SvtResId(STR_ACC_COLUMN_NUM).replaceAll("%COLUMNNUMBER", OUString::number(getColumnPos()-1)) + ", "
+ SvtResId(STR_ACC_ROW_NUM).replaceAll("%ROWNUMBER", OUString::number(getRowPos()));
}
css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL EditBrowseBoxTableCell::getAccessibleRelationSet()

View File

@ -86,7 +86,7 @@ private:
// = EditBrowseBoxTableCell
// XAccessible providing an EditBrowseBoxTableCell
class VCL_DLLPUBLIC EditBrowseBoxTableCellAccess final
class EditBrowseBoxTableCellAccess final
: public comphelper::WeakComponentImplHelper<css::accessibility::XAccessible>
{
css::uno::WeakReference< css::accessibility::XAccessibleContext >

View File

@ -24,7 +24,6 @@
#include <comphelper/types.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <vcl/accessibility/AccessibleBrowseBoxCheckBoxCell.hxx>
#include <vcl/accessibility/accessibleeditbrowseboxcell.hxx>
#include <vcl/accessiblefactory.hxx>
#include <vcl/svapp.hxx>
#include <tools/debug.hxx>

View File

@ -18,7 +18,7 @@
*/
#pragma once
#include <vcl/accessibility/accessibleeditbrowseboxcell.hxx>
#include "accessibleeditbrowseboxcell.hxx"
namespace svt
{

View File

@ -108,7 +108,6 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
vcl/source/accessibility/AccessibleTextAttributeHelper \
vcl/source/accessibility/acc_factory \
vcl/source/accessibility/accessiblebrowseboxcell \
vcl/source/accessibility/accessibleeditbrowseboxcell \
vcl/source/accessibility/accessibleiconchoicectrl \
vcl/source/accessibility/accessibleiconchoicectrlentry \
vcl/source/accessibility/AccessibleIconView \

View File

@ -135,8 +135,6 @@
#define RID_STR_ACC_SCROLLBAR_NAME_VERTICAL NC_("RID_STR_ACC_SCROLLBAR_NAME_VERTICAL", "Vertical scroll bar")
#define RID_STR_ACC_SCROLLBAR_NAME_HORIZONTAL NC_("RID_STR_ACC_SCROLLBAR_NAME_HORIZONTAL", "Horizontal scroll bar")
#define RID_STR_ACC_PANEL_DESCRIPTION NC_("RID_STR_ACC_PANEL_DESCRIPTION", "Please press enter to go into child control for more operations")
#define RID_STR_ACC_COLUMN_NUM NC_("RID_STR_ACC_COLUMN_NUM", "Column %COLUMNNUMBER")
#define RID_STR_ACC_ROW_NUM NC_("RID_STR_ACC_ROW_NUM", "Row %ROWNUMBER")
#endif // INCLUDED_VCL_INC_STRINGS_HRC