[Libreoffice-commits] core.git: Branch 'feature/tiled-editing' - sc/inc sc/source
Jan Holesovsky
kendy at collabora.com
Thu Mar 26 06:38:30 PDT 2015
sc/inc/docuno.hxx | 7 +++++--
sc/source/ui/unoobj/docuno.cxx | 14 ++++++++++++++
2 files changed, 19 insertions(+), 2 deletions(-)
New commits:
commit ec974c8c4372e095eba844e1435676fb470beac2
Author: Jan Holesovsky <kendy at collabora.com>
Date: Thu Mar 26 14:34:41 2015 +0100
sc tiled editing: Implement resetSelection().
Change-Id: I3eb8d749119e0b219dee9252e8fe332dd9dbed48
diff --git a/sc/inc/docuno.hxx b/sc/inc/docuno.hxx
index e826eb7..5642569 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 b72949c..21d30e1 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;
More information about the Libreoffice-commits
mailing list