From 28795d0faabd1e1be124fa90bef06d7f47a63311 Mon Sep 17 00:00:00 2001 From: Ashod Nakashian Date: Wed, 25 May 2016 23:28:40 -0400 Subject: bccu#1843 - Calc copy/paste chart tile invalidation problem Change-Id: I2f0bf28e87f4188abd81eb6c42bae915b2a046a8 Reviewed-on: https://gerrit.libreoffice.org/25489 Reviewed-by: Ashod Nakashian Tested-by: Ashod Nakashian --- svx/source/svdraw/svdmrkv.cxx | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx index d872aefbe5fd..7ad705aca112 100644 --- a/svx/source/svdraw/svdmrkv.cxx +++ b/svx/source/svdraw/svdmrkv.cxx @@ -52,6 +52,7 @@ #include #include +#include using namespace com::sun::star; @@ -207,6 +208,31 @@ void SdrMarkView::ModelHasChanged() if (pV!=NULL && !pV->IsDragObj() && !pV->IsInsObjPoint()) { AdjustMarkHdl(); } + + if (comphelper::LibreOfficeKit::isActive()) + { + //TODO: Is MarkedObjRect valid at this point? + Rectangle aSelection(GetMarkedObjRect()); + OString sSelection; + if (aSelection.IsEmpty()) + sSelection = "EMPTY"; + else + { + // In case the map mode is in 100th MM, then need to convert the coordinates over to twips for LOK. + if (pMarkedPV) + { + if (OutputDevice* pOutputDevice = pMarkedPV->GetView().GetFirstOutputDevice()) + { + if (pOutputDevice->GetMapMode().GetMapUnit() == MAP_100TH_MM) + aSelection = OutputDevice::LogicToLogic(aSelection, MAP_100TH_MM, MAP_TWIP); + } + } + + sSelection = aSelection.toString(); + } + + GetModel()->libreOfficeKitCallback(LOK_CALLBACK_INVALIDATE_TILES, sSelection.getStr()); + } } -- cgit