summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2024-11-25 11:40:34 +0100
committerMichael Weghorn <m.weghorn@posteo.de>2024-11-25 13:45:37 +0100
commit579d0a72a3df1e292d1d1a049247500d003ff4e3 (patch)
tree710cf5a281217b351f496766185f8d9d30326e8c
parentd2587b5646833b49c9cfc12ea7eaa013a1fcf7f1 (diff)
a11y: Move identical implementations to base class
Instead of having a purely virtual VCLXAccessibleBox::IsValid that all subclasses implement the same way, deduplicate this by moving the implementation to the VCLXAccessibleBox base class. Change-Id: I354bf3d0be6751a165b373c06b951c6f0b63480b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177252 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
-rw-r--r--accessibility/inc/standard/vclxaccessiblebox.hxx2
-rw-r--r--accessibility/inc/standard/vclxaccessiblecombobox.hxx2
-rw-r--r--accessibility/inc/standard/vclxaccessibledropdowncombobox.hxx1
-rw-r--r--accessibility/inc/standard/vclxaccessibledropdownlistbox.hxx2
-rw-r--r--accessibility/inc/standard/vclxaccessiblelistbox.hxx2
-rw-r--r--accessibility/source/standard/vclxaccessiblebox.cxx5
-rw-r--r--accessibility/source/standard/vclxaccessiblecombobox.cxx6
-rw-r--r--accessibility/source/standard/vclxaccessibledropdowncombobox.cxx6
-rw-r--r--accessibility/source/standard/vclxaccessibledropdownlistbox.cxx5
-rw-r--r--accessibility/source/standard/vclxaccessiblelistbox.cxx6
10 files changed, 6 insertions, 31 deletions
diff --git a/accessibility/inc/standard/vclxaccessiblebox.hxx b/accessibility/inc/standard/vclxaccessiblebox.hxx
index 3825be0d4f22..2d0f0b46e8f7 100644
--- a/accessibility/inc/standard/vclxaccessiblebox.hxx
+++ b/accessibility/inc/standard/vclxaccessiblebox.hxx
@@ -107,7 +107,7 @@ protected:
/** Returns true when the object is valid.
*/
- virtual bool IsValid() const = 0;
+ bool IsValid() const;
virtual void ProcessWindowChildEvent (const VclWindowEvent& rVclWindowEvent) override;
virtual void ProcessWindowEvent (const VclWindowEvent& rVclWindowEvent) override;
diff --git a/accessibility/inc/standard/vclxaccessiblecombobox.hxx b/accessibility/inc/standard/vclxaccessiblecombobox.hxx
index 67c2ef93b139..6294e7df91d1 100644
--- a/accessibility/inc/standard/vclxaccessiblecombobox.hxx
+++ b/accessibility/inc/standard/vclxaccessiblecombobox.hxx
@@ -39,8 +39,6 @@ public:
private:
virtual ~VCLXAccessibleComboBox() override = default;
-
- virtual bool IsValid() const override;
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/accessibility/inc/standard/vclxaccessibledropdowncombobox.hxx b/accessibility/inc/standard/vclxaccessibledropdowncombobox.hxx
index 76c1c14594e9..2527b2fbc2c8 100644
--- a/accessibility/inc/standard/vclxaccessibledropdowncombobox.hxx
+++ b/accessibility/inc/standard/vclxaccessibledropdowncombobox.hxx
@@ -41,7 +41,6 @@ public:
private:
virtual ~VCLXAccessibleDropDownComboBox() override = default;
- virtual bool IsValid() const override;
virtual void ProcessWindowEvent(const VclWindowEvent& rVclWindowEvent) override;
};
diff --git a/accessibility/inc/standard/vclxaccessibledropdownlistbox.hxx b/accessibility/inc/standard/vclxaccessibledropdownlistbox.hxx
index d971e80ccaa9..3a314ad09434 100644
--- a/accessibility/inc/standard/vclxaccessibledropdownlistbox.hxx
+++ b/accessibility/inc/standard/vclxaccessibledropdownlistbox.hxx
@@ -40,8 +40,6 @@ public:
private:
virtual ~VCLXAccessibleDropDownListBox() override = default;
-
- virtual bool IsValid() const override;
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/accessibility/inc/standard/vclxaccessiblelistbox.hxx b/accessibility/inc/standard/vclxaccessiblelistbox.hxx
index 9405947b2b5b..ed2cd05efc56 100644
--- a/accessibility/inc/standard/vclxaccessiblelistbox.hxx
+++ b/accessibility/inc/standard/vclxaccessiblelistbox.hxx
@@ -38,8 +38,6 @@ public:
private:
virtual ~VCLXAccessibleListBox() override = default;
-
- virtual bool IsValid() const override;
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/accessibility/source/standard/vclxaccessiblebox.cxx b/accessibility/source/standard/vclxaccessiblebox.cxx
index 43b9967ed51a..cee19613a396 100644
--- a/accessibility/source/standard/vclxaccessiblebox.cxx
+++ b/accessibility/source/standard/vclxaccessiblebox.cxx
@@ -54,6 +54,11 @@ VCLXAccessibleBox::VCLXAccessibleBox (VCLXWindow* pVCLWindow, BoxType aType, boo
VCLXAccessibleBox::~VCLXAccessibleBox() {}
+bool VCLXAccessibleBox::IsValid() const
+{
+ return GetWindow();
+}
+
void VCLXAccessibleBox::ProcessWindowChildEvent( const VclWindowEvent& rVclWindowEvent )
{
uno::Any aOldValue, aNewValue;
diff --git a/accessibility/source/standard/vclxaccessiblecombobox.cxx b/accessibility/source/standard/vclxaccessiblecombobox.cxx
index 8b239996599d..5e0c77304ad8 100644
--- a/accessibility/source/standard/vclxaccessiblecombobox.cxx
+++ b/accessibility/source/standard/vclxaccessiblecombobox.cxx
@@ -30,12 +30,6 @@ VCLXAccessibleComboBox::VCLXAccessibleComboBox (VCLXWindow* pVCLWindow)
{
}
-
-bool VCLXAccessibleComboBox::IsValid() const
-{
- return GetWindow();
-}
-
// XServiceInfo
OUString VCLXAccessibleComboBox::getImplementationName()
diff --git a/accessibility/source/standard/vclxaccessibledropdowncombobox.cxx b/accessibility/source/standard/vclxaccessibledropdowncombobox.cxx
index 903e704b92bf..5dc7073e7f0b 100644
--- a/accessibility/source/standard/vclxaccessibledropdowncombobox.cxx
+++ b/accessibility/source/standard/vclxaccessibledropdowncombobox.cxx
@@ -33,12 +33,6 @@ VCLXAccessibleDropDownComboBox::VCLXAccessibleDropDownComboBox (VCLXWindow* pVCL
{
}
-
-bool VCLXAccessibleDropDownComboBox::IsValid() const
-{
- return GetWindow();
-}
-
void VCLXAccessibleDropDownComboBox::ProcessWindowEvent (const VclWindowEvent& rVclWindowEvent)
{
switch ( rVclWindowEvent.GetId() )
diff --git a/accessibility/source/standard/vclxaccessibledropdownlistbox.cxx b/accessibility/source/standard/vclxaccessibledropdownlistbox.cxx
index 5d1c206f1737..360eab0dc26c 100644
--- a/accessibility/source/standard/vclxaccessibledropdownlistbox.cxx
+++ b/accessibility/source/standard/vclxaccessibledropdownlistbox.cxx
@@ -30,11 +30,6 @@ VCLXAccessibleDropDownListBox::VCLXAccessibleDropDownListBox (VCLXWindow* pVCLWi
{
}
-bool VCLXAccessibleDropDownListBox::IsValid() const
-{
- return GetWindow();
-}
-
// XServiceInfo
OUString VCLXAccessibleDropDownListBox::getImplementationName()
{
diff --git a/accessibility/source/standard/vclxaccessiblelistbox.cxx b/accessibility/source/standard/vclxaccessiblelistbox.cxx
index 1b4d444e6ca9..2f9392ab0341 100644
--- a/accessibility/source/standard/vclxaccessiblelistbox.cxx
+++ b/accessibility/source/standard/vclxaccessiblelistbox.cxx
@@ -29,12 +29,6 @@ VCLXAccessibleListBox::VCLXAccessibleListBox (VCLXWindow* pVCLWindow)
{
}
-
-bool VCLXAccessibleListBox::IsValid() const
-{
- return GetWindow();
-}
-
// XServiceInfo
OUString VCLXAccessibleListBox::getImplementationName()