summaryrefslogtreecommitdiff
path: root/svx/source
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source')
-rw-r--r--svx/source/svdraw/svdmrkv.cxx27
1 files changed, 24 insertions, 3 deletions
diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index ab11ff0caeda..4f5d0bba87f4 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -53,6 +53,7 @@
#include <editeng/editdata.hxx>
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
#include <comphelper/lok.hxx>
+#include <sfx2/viewsh.hxx>
using namespace com::sun::star;
@@ -703,8 +704,16 @@ void SdrMarkView::SetMarkHandles()
if(pSdrTextObj && pSdrTextObj->IsInEditMode())
{
if (bTiledRendering)
+ {
// Suppress handles -> empty graphic selection.
- GetModel()->libreOfficeKitCallback(LOK_CALLBACK_GRAPHIC_SELECTION, "EMPTY");
+ if (comphelper::LibreOfficeKit::isViewCallback())
+ {
+ if(SfxViewShell* pViewShell = SfxViewShell::Current())
+ pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_GRAPHIC_SELECTION, "EMPTY");
+ }
+ else
+ GetModel()->libreOfficeKitCallback(LOK_CALLBACK_GRAPHIC_SELECTION, "EMPTY");
+ }
return;
}
}
@@ -723,7 +732,13 @@ void SdrMarkView::SetMarkHandles()
if (xController.is() && xController->hasSelectedCells())
{
// The table shape has selected cells, which provide text selection already -> no graphic selection.
- GetModel()->libreOfficeKitCallback(LOK_CALLBACK_GRAPHIC_SELECTION, "EMPTY");
+ if (comphelper::LibreOfficeKit::isViewCallback())
+ {
+ if(SfxViewShell* pViewShell = SfxViewShell::Current())
+ pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_GRAPHIC_SELECTION, "EMPTY");
+ }
+ else
+ GetModel()->libreOfficeKitCallback(LOK_CALLBACK_GRAPHIC_SELECTION, "EMPTY");
return;
}
}
@@ -754,7 +769,13 @@ void SdrMarkView::SetMarkHandles()
// hide the text selection too
GetModel()->libreOfficeKitCallback(LOK_CALLBACK_TEXT_SELECTION, "");
}
- GetModel()->libreOfficeKitCallback(LOK_CALLBACK_GRAPHIC_SELECTION, sSelection.getStr());
+ if (comphelper::LibreOfficeKit::isViewCallback())
+ {
+ if(SfxViewShell* pViewShell = SfxViewShell::Current())
+ pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_GRAPHIC_SELECTION, sSelection.getStr());
+ }
+ else
+ GetModel()->libreOfficeKitCallback(LOK_CALLBACK_GRAPHIC_SELECTION, sSelection.getStr());
}
if (bFrmHdl)