summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--svx/source/svdraw/svdmrkv.cxx26
1 files changed, 26 insertions, 0 deletions
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 <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());
+ }
}