editeng: implement per-view LOK_CALLBACK_TEXT_SELECTION
These were the last callback invocations in editeng that did not support the per-view callback. Change-Id: Ic703f6708a37f059dcdbbc321d6b18a7fd04edae Reviewed-on: https://gerrit.libreoffice.org/26216 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
This commit is contained in:
@@ -401,6 +401,10 @@ void ImpEditView::DrawSelection( EditSelection aTmpSel, vcl::Region* pRegion, Ou
|
||||
if (bMm100ToTwip)
|
||||
aStart = OutputDevice::LogicToLogic(aStart, MAP_100TH_MM, MAP_TWIP);
|
||||
aStart.Move(aOrigin.getX(), aOrigin.getY());
|
||||
|
||||
if (comphelper::LibreOfficeKit::isViewCallback())
|
||||
libreOfficeKitViewCallback(LOK_CALLBACK_TEXT_SELECTION_START, aStart.toString().getStr());
|
||||
else
|
||||
libreOfficeKitCallback(LOK_CALLBACK_TEXT_SELECTION_START, aStart.toString().getStr());
|
||||
|
||||
Rectangle& rEnd = aRectangles.back();
|
||||
@@ -408,6 +412,10 @@ void ImpEditView::DrawSelection( EditSelection aTmpSel, vcl::Region* pRegion, Ou
|
||||
if (bMm100ToTwip)
|
||||
aEnd = OutputDevice::LogicToLogic(aEnd, MAP_100TH_MM, MAP_TWIP);
|
||||
aEnd.Move(aOrigin.getX(), aOrigin.getY());
|
||||
|
||||
if (comphelper::LibreOfficeKit::isViewCallback())
|
||||
libreOfficeKitViewCallback(LOK_CALLBACK_TEXT_SELECTION_END, aEnd.toString().getStr());
|
||||
else
|
||||
libreOfficeKitCallback(LOK_CALLBACK_TEXT_SELECTION_END, aEnd.toString().getStr());
|
||||
}
|
||||
|
||||
@@ -421,6 +429,10 @@ void ImpEditView::DrawSelection( EditSelection aTmpSel, vcl::Region* pRegion, Ou
|
||||
}
|
||||
sRectangle = comphelper::string::join("; ", v);
|
||||
}
|
||||
|
||||
if (comphelper::LibreOfficeKit::isViewCallback())
|
||||
libreOfficeKitViewCallback(LOK_CALLBACK_TEXT_SELECTION, sRectangle.getStr());
|
||||
else
|
||||
libreOfficeKitCallback(LOK_CALLBACK_TEXT_SELECTION, sRectangle.getStr());
|
||||
|
||||
pOutWin->Pop();
|
||||
|
Reference in New Issue
Block a user