summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--accessibility/source/standard/vclxaccessiblebox.cxx35
1 files changed, 17 insertions, 18 deletions
diff --git a/accessibility/source/standard/vclxaccessiblebox.cxx b/accessibility/source/standard/vclxaccessiblebox.cxx
index cbc68fb2d19a..84855ca096cf 100644
--- a/accessibility/source/standard/vclxaccessiblebox.cxx
+++ b/accessibility/source/standard/vclxaccessiblebox.cxx
@@ -70,26 +70,25 @@ void VCLXAccessibleBox::ProcessWindowChildEvent( const VclWindowEvent& rVclWindo
if (m_aBoxType==COMBOBOX)
{
VclPtr< ComboBox > pComboBox = GetAs< ComboBox >();
- if ( ( pComboBox != nullptr ) && ( pChildWindow != nullptr ) )
- if (pChildWindow == pComboBox->GetSubEdit())
+ if (pComboBox && pChildWindow && pChildWindow == pComboBox->GetSubEdit())
+ {
+ if (rVclWindowEvent.GetId() == VclEventId::WindowShow)
+ {
+ // Instantiate text field.
+ getAccessibleChild (0);
+ aNewValue <<= m_xText;
+ }
+ else
{
- if (rVclWindowEvent.GetId() == VclEventId::WindowShow)
- {
- // Instantiate text field.
- getAccessibleChild (0);
- aNewValue <<= m_xText;
- }
- else
- {
- // Release text field.
- aOldValue <<= m_xText;
- m_xText = nullptr;
- }
- // Tell the listeners about the new/removed child.
- NotifyAccessibleEvent (
- AccessibleEventId::CHILD,
- aOldValue, aNewValue);
+ // Release text field.
+ aOldValue <<= m_xText;
+ m_xText = nullptr;
}
+ // Tell the listeners about the new/removed child.
+ NotifyAccessibleEvent (
+ AccessibleEventId::CHILD,
+ aOldValue, aNewValue);
+ }
}
}