summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-02-02 10:32:36 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-02-02 10:56:40 +0100
commitbd8610ebafa9caf9f09a5aba9cca04c23691513d (patch)
tree86d0c99b905a89b2d2c06158f66ff4b5c1603554 /sw
parent9d8b33079494cf7b5e66bd6c9d71f025efd9a653 (diff)
LOK: add Document::setClientVisibleArea()
... and implement it in Writer. Otherwise there is no way we can perform e.g. page down in an expected way. Without this, the core visible area depends on the zoom in the document, and the client visible area can be something entirely different. Change-Id: Iadfb5a225da09a2551ffa41ddf503bb3d22b3eae
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/unotxdoc.hxx2
-rw-r--r--sw/source/uibase/uno/unotxdoc.cxx9
2 files changed, 11 insertions, 0 deletions
diff --git a/sw/inc/unotxdoc.hxx b/sw/inc/unotxdoc.hxx
index cd6135a05df4..5b2e6d054340 100644
--- a/sw/inc/unotxdoc.hxx
+++ b/sw/inc/unotxdoc.hxx
@@ -434,6 +434,8 @@ public:
virtual void setClipboard(const css::uno::Reference<css::datatransfer::clipboard::XClipboard>& xClipboard) override;
/// @see vcl::ITiledRenderable::isMimeTypeSupported().
virtual bool isMimeTypeSupported() override;
+ /// @see vcl::ITiledRenderable::setClientVisibleArea().
+ virtual void setClientVisibleArea(const Rectangle& rRectangle);
/// @see vcl::ITiledRenderable::getPointer().
virtual Pointer getPointer() override;
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index 972edd95ae00..c42bcca0a0c5 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -3180,6 +3180,15 @@ bool SwXTextDocument::isMimeTypeSupported()
return aDataHelper.GetXTransferable().is() && SwTransferable::IsPaste(*pWrtShell, aDataHelper);
}
+void SwXTextDocument::setClientVisibleArea(const Rectangle& rRectangle)
+{
+ SwView* pView = pDocShell->GetView();
+ if (!pView)
+ return;
+
+ pView->SetVisArea(rRectangle);
+}
+
Pointer SwXTextDocument::getPointer()
{
SolarMutexGuard aGuard;