summaryrefslogtreecommitdiff
path: root/sd/source/ui/view/sdwindow.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/ui/view/sdwindow.cxx')
-rw-r--r--sd/source/ui/view/sdwindow.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/sd/source/ui/view/sdwindow.cxx b/sd/source/ui/view/sdwindow.cxx
index 7472695ee728..59fe3c2b85a2 100644
--- a/sd/source/ui/view/sdwindow.cxx
+++ b/sd/source/ui/view/sdwindow.cxx
@@ -685,6 +685,20 @@ double Window::GetVisibleHeight()
return ((double) aWinSize.Height() / maViewSize.Height());
}
+Point Window::GetVisibleCenter()
+{
+ Point aPos;
+ aPos = Rectangle(aPos, GetOutputSizePixel()).Center();
+
+ // For LOK
+ bool bMapModeWasEnabled(IsMapModeEnabled());
+ EnableMapMode(/*true*/);
+ aPos = PixelToLogic(aPos);
+ EnableMapMode(bMapModeWasEnabled);
+
+ return aPos;
+}
+
/**
* @returns width of a scroll column in proportion to the width of the whole
* working area.