diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-06-13 11:27:02 +0200 |
---|---|---|
committer | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2016-07-12 22:06:36 -0400 |
commit | a943eec2bd0d161e8d085aecbeb036485ed0e858 (patch) | |
tree | a41d67f642a5045ae9fca2e761bbc8248bc5b92e /editeng | |
parent | 0b80622beecc45388547598e56a960f5eebff57b (diff) |
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>
(cherry picked from commit 26772e210d131e1566309c79c739519d810be7d7)
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/impedit.cxx | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx index 718d3733aba6..5c6cc67b77db 100644 --- a/editeng/source/editeng/impedit.cxx +++ b/editeng/source/editeng/impedit.cxx @@ -399,14 +399,22 @@ 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()); - libreOfficeKitCallback(LOK_CALLBACK_TEXT_SELECTION_START, aStart.toString().getStr()); + + 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(); Rectangle aEnd = Rectangle(rEnd.Right() - 1, rEnd.Top(), rEnd.Right(), rEnd.Bottom()); if (bMm100ToTwip) aEnd = OutputDevice::LogicToLogic(aEnd, MAP_100TH_MM, MAP_TWIP); aEnd.Move(aOrigin.getX(), aOrigin.getY()); - libreOfficeKitCallback(LOK_CALLBACK_TEXT_SELECTION_END, aEnd.toString().getStr()); + + if (comphelper::LibreOfficeKit::isViewCallback()) + libreOfficeKitViewCallback(LOK_CALLBACK_TEXT_SELECTION_END, aEnd.toString().getStr()); + else + libreOfficeKitCallback(LOK_CALLBACK_TEXT_SELECTION_END, aEnd.toString().getStr()); } std::vector<OString> v; @@ -420,7 +428,11 @@ void ImpEditView::DrawSelection( EditSelection aTmpSel, vcl::Region* pRegion, Ou } sRectangle = comphelper::string::join("; ", v); } - libreOfficeKitCallback(LOK_CALLBACK_TEXT_SELECTION, sRectangle.getStr()); + + if (comphelper::LibreOfficeKit::isViewCallback()) + libreOfficeKitViewCallback(LOK_CALLBACK_TEXT_SELECTION, sRectangle.getStr()); + else + libreOfficeKitCallback(LOK_CALLBACK_TEXT_SELECTION, sRectangle.getStr()); pOutWin->Pop(); } |