summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2021-03-19 14:18:12 +0100
committerSzymon Kłos <szymon.klos@collabora.com>2021-04-08 09:31:48 +0200
commit4bfe04aec4dddf8e612160ceda87ef9f5ea4bb42 (patch)
tree1128b8ddc38cd90f3e11666fd1704bcc8eb60bf1 /sfx2
parentee74fa1a696407d55e7245472b3b9447a1e596d0 (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> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113727 Tested-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/view/ipclient.cxx13
1 files changed, 12 insertions, 1 deletions
diff --git a/sfx2/source/view/ipclient.cxx b/sfx2/source/view/ipclient.cxx
index 30626d285709..7f8c2c89e829 100644
--- a/sfx2/source/view/ipclient.cxx
+++ b/sfx2/source/view/ipclient.cxx
@@ -335,7 +335,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() );
+ }
}
}