summaryrefslogtreecommitdiff
path: root/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx')
-rw-r--r--sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx25
1 files changed, 12 insertions, 13 deletions
diff --git a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
index 6fdad87f41b0..05108da8ba07 100644
--- a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
@@ -1230,11 +1230,18 @@ void SAL_CALL ScAccessibleDocumentPagePreview::disposing()
void ScAccessibleDocumentPagePreview::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
- const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
- if (pSimpleHint)
+ if ( dynamic_cast<const ScAccWinFocusLostHint*>(&rHint) )
+ {
+ CommitFocusLost();
+ }
+ else if ( dynamic_cast<const ScAccWinFocusGotHint*>(&rHint) )
+ {
+ CommitFocusGained();
+ }
+ else
{
// only notify if child exist, otherwise it is not necessary
- if (pSimpleHint->GetId() == SC_HINT_DATACHANGED)
+ if (rHint.GetId() == SC_HINT_DATACHANGED)
{
if (mpTable.is()) // if there is no table there is nothing to notify, because no one recongnizes the change
{
@@ -1282,11 +1289,11 @@ void ScAccessibleDocumentPagePreview::Notify( SfxBroadcaster& rBC, const SfxHint
}
}
}
- else if (pSimpleHint->GetId() == SC_HINT_ACC_MAKEDRAWLAYER)
+ else if (rHint.GetId() == SC_HINT_ACC_MAKEDRAWLAYER)
{
GetShapeChildren()->SetDrawBroadcaster();
}
- else if (pSimpleHint->GetId() == SC_HINT_ACC_VISAREACHANGED)
+ else if (rHint.GetId() == SC_HINT_ACC_VISAREACHANGED)
{
Size aOutputSize;
vcl::Window* pSizeWindow = mpViewShell->GetWindow();
@@ -1304,14 +1311,6 @@ void ScAccessibleDocumentPagePreview::Notify( SfxBroadcaster& rBC, const SfxHint
CommitChange(aEvent);
}
}
- else if ( dynamic_cast<const ScAccWinFocusLostHint*>(&rHint) )
- {
- CommitFocusLost();
- }
- else if ( dynamic_cast<const ScAccWinFocusGotHint*>(&rHint) )
- {
- CommitFocusGained();
- }
ScAccessibleDocumentBase::Notify(rBC, rHint);
}