diff options
Diffstat (limited to 'sw/source/uibase/uno/unotxdoc.cxx')
-rw-r--r-- | sw/source/uibase/uno/unotxdoc.cxx | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index 49f6e4172c6a..a1324b36422d 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -3266,12 +3266,16 @@ bool SwXTextDocument::isMimeTypeSupported() void SwXTextDocument::setClientVisibleArea(const tools::Rectangle& rRectangle) { - SwView* pView = pDocShell->GetView(); - if (!pView) - return; + if (SwView* pView = pDocShell->GetView()) + { + // set the PgUp/PgDown offset + pView->ForcePageUpDownOffset(2 * rRectangle.GetHeight() / 3); + } - // set the PgUp/PgDown offset - pView->ForcePageUpDownOffset(2 * rRectangle.GetHeight() / 3); + if (SwViewShell* pViewShell = pDocShell->GetWrtShell()) + { + pViewShell->setLOKVisibleArea(rRectangle); + } } void SwXTextDocument::setClientZoom(int nTilePixelWidth_, int /*nTilePixelHeight_*/, |