summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/unoidl/unomodel.cxx20
1 files changed, 7 insertions, 13 deletions
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 2ff6f93c0680..3dc5e2839c74 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -2344,6 +2344,12 @@ VclPtr<vcl::Window> SdXImpressDocument::getDocWindow()
VclPtr<vcl::Window> pWindow;
if (pViewShell)
pWindow = pViewShell->GetActiveWindow();
+
+ LokChartHelper aChartHelper(pViewShell->GetViewShell());
+ VclPtr<vcl::Window> pChartWindow = aChartHelper.GetWindow();
+ if (pChartWindow)
+ pWindow = pChartWindow;
+
return pWindow;
}
@@ -2466,23 +2472,11 @@ void SdXImpressDocument::postKeyEvent(int nType, int nCharCode, int nKeyCode)
{
SolarMutexGuard aGuard;
- DrawViewShell* pViewShell = GetViewShell();
- if (!pViewShell)
- return;
-
- vcl::Window* pWindow = pViewShell->GetActiveWindow();
+ VclPtr<vcl::Window> pWindow = getDocWindow();
if (!pWindow)
return;
- LokChartHelper aChartHelper(pViewShell->GetViewShell());
- vcl::Window* pChartWindow = aChartHelper.GetWindow();
- if (pChartWindow)
- {
- pWindow = pChartWindow;
- }
-
KeyEvent aEvent(nCharCode, nKeyCode, 0);
-
switch (nType)
{
case LOK_KEYEVENT_KEYINPUT: