diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2021-03-19 14:18:12 +0100 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2021-03-24 09:37:35 +0100 |
commit | 77ade963576999544edf6c5c7d474cd757eb32ab (patch) | |
tree | fb5f10472a557e59f7f08bd9e10e9076f3f5ef8f /sfx2 | |
parent | 042aec6b984332e917532e321e0f33668ad322e2 (diff) |
online: send selection coordinates with inplace mode
Change-Id: I38964fc522924b61313bc38ecf03e007fc6f3b8d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112742
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Gökay ŞATIR <gokaysatir@collabora.com>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/view/ipclient.cxx | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/sfx2/source/view/ipclient.cxx b/sfx2/source/view/ipclient.cxx index 5c4ecc7dcf8a..cefe1586ab9e 100644 --- a/sfx2/source/view/ipclient.cxx +++ b/sfx2/source/view/ipclient.cxx @@ -340,7 +340,18 @@ void SAL_CALL SfxInPlaceClient_Impl::activatingInplace() if ( comphelper::LibreOfficeKit::isActive() ) { if ( SfxViewShell* pViewShell = m_pClient->GetViewShell() ) - pViewShell->libreOfficeKitViewCallback( LOK_CALLBACK_GRAPHIC_SELECTION, "INPLACE" ); + { + tools::Rectangle aRect(m_pClient->GetObjArea()); + + if (m_pClient->GetEditWin()) + { + if (m_pClient->GetEditWin()->GetMapMode().GetMapUnit() == MapUnit::Map100thMM) + aRect = OutputDevice::LogicToLogic(aRect, MapMode(MapUnit::Map100thMM), MapMode(MapUnit::MapTwip)); + } + + OString str = aRect.toString() + ", \"INPLACE\""; + pViewShell->libreOfficeKitViewCallback( LOK_CALLBACK_GRAPHIC_SELECTION, str.getStr() ); + } } } |