diff options
author | Jan Holesovsky <kendy@collabora.com> | 2015-03-26 14:34:41 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-03-30 09:23:53 +0200 |
commit | 00094f9dcde54e071c52c4d9422506b8f3ebee47 (patch) | |
tree | 0a2b2828f28db7db407ced38ebb60aa31cf6a858 /sc | |
parent | 4415ecbfc605f5db8bdfadf282954f16385348e3 (diff) |
sc tiled editing: Implement resetSelection().
Change-Id: I3eb8d749119e0b219dee9252e8fe332dd9dbed48
Diffstat (limited to 'sc')
-rw-r--r-- | sc/inc/docuno.hxx | 7 | ||||
-rw-r--r-- | sc/source/ui/unoobj/docuno.cxx | 14 |
2 files changed, 19 insertions, 2 deletions
diff --git a/sc/inc/docuno.hxx b/sc/inc/docuno.hxx index e826eb76a57a..56425694d42e 100644 --- a/sc/inc/docuno.hxx +++ b/sc/inc/docuno.hxx @@ -388,6 +388,9 @@ public: /// @see vcl::ITiledRenderable::getParts(). virtual int getParts() SAL_OVERRIDE; + /// @see vcl::ITiledRenderable::initializeForTiledRendering(). + virtual void initializeForTiledRendering() SAL_OVERRIDE; + /// @see vcl::ITiledRenderable::registerCallback(). virtual void registerCallback(LibreOfficeKitCallback pCallback, void* pData) SAL_OVERRIDE; @@ -400,8 +403,8 @@ public: /// @see vcl::ITiledRenderable::setGraphicSelection(). virtual void setGraphicSelection(int nType, int nX, int nY) SAL_OVERRIDE; - /// @see vcl::ITiledRenderable::initializeForTiledRendering(). - virtual void initializeForTiledRendering() SAL_OVERRIDE; + /// @see lok::Document::resetSelection(). + virtual void resetSelection() SAL_OVERRIDE; }; class ScDrawPagesObj : public cppu::WeakImplHelper2< diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index 725c76e3c08b..5bf0c057b1f2 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -643,6 +643,20 @@ void ScModelObj::setGraphicSelection(int nType, int nX, int nY) } } +void ScModelObj::resetSelection() +{ + SolarMutexGuard aGuard; + + ScViewData* pViewData = ScDocShell::GetViewData(); + ScTabView* pTabView = pViewData->GetView(); + + // deselect the shapes + pTabView->DrawDeselectAll(); + + // and hide the cell and text selection + pDocShell->GetDocument().GetDrawLayer()->libreOfficeKitCallback(LOK_CALLBACK_TEXT_SELECTION, ""); +} + void ScModelObj::initializeForTiledRendering() { SolarMutexGuard aGuard; |