summaryrefslogtreecommitdiff
path: root/accessibility/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-09-05 16:15:48 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-09-05 22:00:15 +0200
commit277c651875604a98032b70d6b0bd0f274cfe5d12 (patch)
tree22ee0600ccf568afea65459e0615a69a4a816fb7 /accessibility/source
parent0c5deed0c5e1ca1e9a2a9315a38ab7b035d88bb9 (diff)
use more concrete type in VCLXAccessibleBox
and avoid some casting Change-Id: I755caf9ba5a333862d1a89a054359781544930f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156570 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'accessibility/source')
-rw-r--r--accessibility/source/standard/vclxaccessiblebox.cxx24
1 files changed, 13 insertions, 11 deletions
diff --git a/accessibility/source/standard/vclxaccessiblebox.cxx b/accessibility/source/standard/vclxaccessiblebox.cxx
index 4f4972a04477..cbc68fb2d19a 100644
--- a/accessibility/source/standard/vclxaccessiblebox.cxx
+++ b/accessibility/source/standard/vclxaccessiblebox.cxx
@@ -52,6 +52,8 @@ VCLXAccessibleBox::VCLXAccessibleBox (VCLXWindow* pVCLWindow, BoxType aType, boo
m_bHasTextChild = true;
}
+VCLXAccessibleBox::~VCLXAccessibleBox() {}
+
void VCLXAccessibleBox::ProcessWindowChildEvent( const VclWindowEvent& rVclWindowEvent )
{
uno::Any aOldValue, aNewValue;
@@ -106,11 +108,11 @@ void VCLXAccessibleBox::ProcessWindowEvent (const VclWindowEvent& rVclWindowEven
case VclEventId::ListboxSelect:
{
// Forward the call to the list child.
- VCLXAccessibleList* pList = static_cast<VCLXAccessibleList*>(m_xList.get());
+ VCLXAccessibleList* pList = m_xList.get();
if ( pList == nullptr )
{
getAccessibleChild ( m_bHasTextChild ? 1 : 0 );
- pList = static_cast<VCLXAccessibleList*>(m_xList.get());
+ pList = m_xList.get();
}
if ( pList != nullptr )
{
@@ -126,11 +128,11 @@ void VCLXAccessibleBox::ProcessWindowEvent (const VclWindowEvent& rVclWindowEven
}
case VclEventId::DropdownOpen:
{
- VCLXAccessibleList* pList = static_cast<VCLXAccessibleList*>(m_xList.get());
+ VCLXAccessibleList* pList = m_xList.get();
if ( pList == nullptr )
{
getAccessibleChild ( m_bHasTextChild ? 1 : 0 );
- pList = static_cast<VCLXAccessibleList*>(m_xList.get());
+ pList = m_xList.get();
}
if ( pList != nullptr )
{
@@ -141,11 +143,11 @@ void VCLXAccessibleBox::ProcessWindowEvent (const VclWindowEvent& rVclWindowEven
}
case VclEventId::DropdownClose:
{
- VCLXAccessibleList* pList = static_cast<VCLXAccessibleList*>(m_xList.get());
+ VCLXAccessibleList* pList = m_xList.get();
if ( pList == nullptr )
{
getAccessibleChild ( m_bHasTextChild ? 1 : 0 );
- pList = static_cast<VCLXAccessibleList*>(m_xList.get());
+ pList = m_xList.get();
}
if ( pList != nullptr )
{
@@ -162,7 +164,7 @@ void VCLXAccessibleBox::ProcessWindowEvent (const VclWindowEvent& rVclWindowEven
}
case VclEventId::ComboboxSelect:
{
- VCLXAccessibleList* pList = static_cast<VCLXAccessibleList*>(m_xList.get());
+ VCLXAccessibleList* pList = m_xList.get();
if (pList != nullptr && m_xText.is())
{
Reference<XAccessibleText> xText (m_xText->getAccessibleContext(), UNO_QUERY);
@@ -191,11 +193,11 @@ void VCLXAccessibleBox::ProcessWindowEvent (const VclWindowEvent& rVclWindowEven
case VclEventId::ComboboxItemRemoved:
{
// Forward the call to the list child.
- VCLXAccessibleList* pList = static_cast<VCLXAccessibleList*>(m_xList.get());
+ VCLXAccessibleList* pList = m_xList.get();
if ( pList == nullptr )
{
getAccessibleChild ( m_bHasTextChild ? 1 : 0 );
- pList = static_cast<VCLXAccessibleList*>(m_xList.get());
+ pList = m_xList.get();
}
if ( pList != nullptr )
pList->ProcessWindowEvent (rVclWindowEvent);
@@ -209,7 +211,7 @@ void VCLXAccessibleBox::ProcessWindowEvent (const VclWindowEvent& rVclWindowEven
// the same VCL object as this box does. In case of the
// combobox, however, we have to help by providing the list with
// the text of the currently selected item.
- VCLXAccessibleList* pList = static_cast<VCLXAccessibleList*>(m_xList.get());
+ VCLXAccessibleList* pList = m_xList.get();
if (pList != nullptr && m_xText.is())
{
Reference<XAccessibleText> xText (m_xText->getAccessibleContext(), UNO_QUERY);
@@ -442,7 +444,7 @@ Any VCLXAccessibleBox::getCurrentValue( )
if (m_aBoxType == LISTBOX && m_bIsDropDownBox && m_xList.is() )
{
- VCLXAccessibleList* pList = static_cast<VCLXAccessibleList*>(m_xList.get());
+ VCLXAccessibleList* pList = m_xList.get();
if(pList->IsInDropDown())
{
if(pList->getSelectedAccessibleChildCount()>0)