summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/vcl/ITiledRenderable.hxx2
-rw-r--r--sd/source/ui/inc/unomodel.hxx2
-rw-r--r--sd/source/ui/unoidl/unomodel.cxx23
3 files changed, 26 insertions, 1 deletions
diff --git a/include/vcl/ITiledRenderable.hxx b/include/vcl/ITiledRenderable.hxx
index 0717635518c5..a10e44884756 100644
--- a/include/vcl/ITiledRenderable.hxx
+++ b/include/vcl/ITiledRenderable.hxx
@@ -124,7 +124,7 @@ public:
/**
* @see lok::Document::resetSelection().
*/
- virtual void resetSelection() { }
+ virtual void resetSelection() = 0;
};
} // namespace vcl
diff --git a/sd/source/ui/inc/unomodel.hxx b/sd/source/ui/inc/unomodel.hxx
index fe5679bfb7f4..409b62021b3d 100644
--- a/sd/source/ui/inc/unomodel.hxx
+++ b/sd/source/ui/inc/unomodel.hxx
@@ -250,6 +250,8 @@ public:
virtual void setTextSelection(int nType, int nX, int nY) SAL_OVERRIDE;
/// @see vcl::ITiledRenderable::setGraphicSelection().
virtual void setGraphicSelection(int nType, int nX, int nY) SAL_OVERRIDE;
+ /// @see lok::Document::resetSelection().
+ virtual void resetSelection() SAL_OVERRIDE;
// XComponent
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 4305b9b8ac58..0a1a95525bcd 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -2451,6 +2451,29 @@ void SdXImpressDocument::setGraphicSelection(int nType, int nX, int nY)
}
}
+void SdXImpressDocument::resetSelection()
+{
+ SolarMutexGuard aGuard;
+
+ DrawViewShell* pViewShell = GetViewShell();
+ if (!pViewShell)
+ return;
+
+ SdrView* pSdrView = pViewShell->GetView();
+ if (!pSdrView)
+ return;
+
+ if (pSdrView->IsTextEdit())
+ {
+ // Reset the editeng selection.
+ pSdrView->UnmarkAll();
+ // Finish editing.
+ pSdrView->SdrEndTextEdit();
+ }
+ // Reset graphic selection.
+ pSdrView->UnmarkAll();
+}
+
uno::Reference< i18n::XForbiddenCharacters > SdXImpressDocument::getForbiddenCharsTable()
{
uno::Reference< i18n::XForbiddenCharacters > xForb(mxForbidenCharacters);