Kaydet (Commit) 84793d11 authored tarafından Miklos Vajna's avatar Miklos Vajna

SdXImpressDocument: implement resetSelection()

With this, when editing is finished, no text edit is active, also both
editeng and sdr selections are reset.

Change-Id: If953e1d8683171c1f1ed8c7d97ae34a163d14765
üst 62d03f6c
......@@ -124,7 +124,7 @@ public:
/**
* @see lok::Document::resetSelection().
*/
virtual void resetSelection() { }
virtual void resetSelection() = 0;
};
} // namespace vcl
......
......@@ -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
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment