svx: implement per-view LOK_CALLBACK_TEXT_SELECTION for graphic sel
Handle multiple views when clicking on a graphic, and thus sending a "text selection is now empty" callback. This avoids an assert when clicking on a Writer image in gtktiledviewer. Change-Id: I2b6d7e561ccc4a6e0782fdad37d4b104c08f1eeb Reviewed-on: https://gerrit.libreoffice.org/26152 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
This commit is contained in:
@@ -773,7 +773,13 @@ void SdrMarkView::SetMarkHandles()
|
||||
sSelection = aSelection.toString();
|
||||
|
||||
// hide the text selection too
|
||||
GetModel()->libreOfficeKitCallback(LOK_CALLBACK_TEXT_SELECTION, "");
|
||||
if (comphelper::LibreOfficeKit::isViewCallback())
|
||||
{
|
||||
if(SfxViewShell* pViewShell = SfxViewShell::Current())
|
||||
pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_TEXT_SELECTION, "");
|
||||
}
|
||||
else
|
||||
GetModel()->libreOfficeKitCallback(LOK_CALLBACK_TEXT_SELECTION, "");
|
||||
}
|
||||
if (comphelper::LibreOfficeKit::isViewCallback())
|
||||
{
|
||||
|
Reference in New Issue
Block a user