[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.0' - svx/source
Ashod Nakashian
ashod.nakashian at collabora.co.uk
Thu May 26 03:30:45 UTC 2016
svx/source/svdraw/svdmrkv.cxx | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
New commits:
commit 28795d0faabd1e1be124fa90bef06d7f47a63311
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date: Wed May 25 23:28:40 2016 -0400
bccu#1843 - Calc copy/paste chart tile invalidation problem
Change-Id: I2f0bf28e87f4188abd81eb6c42bae915b2a046a8
Reviewed-on: https://gerrit.libreoffice.org/25489
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at gmail.com>
diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index d872aef..7ad705a 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -52,6 +52,7 @@
#include <editeng/editdata.hxx>
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
+#include <comphelper/lok.hxx>
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());
+ }
}
More information about the Libreoffice-commits
mailing list