diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2021-01-26 16:35:10 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2021-02-09 10:53:33 +0100 |
commit | 2555441f3f694af11d0d7b220b12ae25f43a6a5a (patch) | |
tree | 0ae994afe97d3553599dfadfbb6b213d1a5377cb /sd | |
parent | 2ca7964b50756b1e071c432b15eea7f079486f6c (diff) |
fontwork: insert in the center of LOK view
Change-Id: Iabde4ee927546b0e396c4fbd6d0099fa82240166
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109968
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/inc/ViewShellBase.hxx | 4 | ||||
-rw-r--r-- | sd/source/ui/inc/unomodel.hxx | 2 | ||||
-rw-r--r-- | sd/source/ui/unoidl/unomodel.cxx | 11 |
3 files changed, 17 insertions, 0 deletions
diff --git a/sd/source/ui/inc/ViewShellBase.hxx b/sd/source/ui/inc/ViewShellBase.hxx index 4e4871186d3c..44dd9d25dfa5 100644 --- a/sd/source/ui/inc/ViewShellBase.hxx +++ b/sd/source/ui/inc/ViewShellBase.hxx @@ -217,6 +217,9 @@ public: /// See SfxViewShell::NotifyCursor(). void NotifyCursor(SfxViewShell* pViewShell) const override; + void setLOKVisibleArea(const ::tools::Rectangle& rArea) { maLOKVisibleArea = rArea; } + virtual ::tools::Rectangle getLOKVisibleArea() const override { return maLOKVisibleArea; } + protected: virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override; @@ -228,6 +231,7 @@ private: std::unique_ptr<Implementation> mpImpl; DrawDocShell* mpDocShell; SdDrawDocument* mpDocument; + ::tools::Rectangle maLOKVisibleArea; /** Determine from the properties of the document shell the initial type of the view shell in the center pane. We use this method to avoid diff --git a/sd/source/ui/inc/unomodel.hxx b/sd/source/ui/inc/unomodel.hxx index b320abda4912..08629b074b5b 100644 --- a/sd/source/ui/inc/unomodel.hxx +++ b/sd/source/ui/inc/unomodel.hxx @@ -255,6 +255,8 @@ public: virtual void setGraphicSelection(int nType, int nX, int nY) override; /// @see lok::Document::resetSelection(). virtual void resetSelection() override; + /// @see vcl::ITiledRenderable::setClientVisibleArea(). + virtual void setClientVisibleArea(const tools::Rectangle& rRectangle) override; /// @see vcl::ITiledRenderable::setClipboard(). virtual void setClipboard(const css::uno::Reference<css::datatransfer::clipboard::XClipboard>& xClipboard) override; /// @see vcl::ITiledRenderable::isMimeTypeSupported(). diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index 17d07ec02cef..69c2a94dd946 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -2615,6 +2615,17 @@ void SdXImpressDocument::resetSelection() pSdrView->UnmarkAll(); } +void SdXImpressDocument::setClientVisibleArea(const ::tools::Rectangle& rRectangle) +{ + SolarMutexGuard aGuard; + + DrawViewShell* pViewShell = GetViewShell(); + if (!pViewShell) + return; + + pViewShell->GetViewShellBase().setLOKVisibleArea(rRectangle); +} + void SdXImpressDocument::setClipboard(const uno::Reference<datatransfer::clipboard::XClipboard>& xClipboard) { SolarMutexGuard aGuard; |