diff options
Diffstat (limited to 'svx/source/svdraw/svdmrkv.cxx')
-rw-r--r-- | svx/source/svdraw/svdmrkv.cxx | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx index df1abb7f3632..b5c62272f549 100644 --- a/svx/source/svdraw/svdmrkv.cxx +++ b/svx/source/svdraw/svdmrkv.cxx @@ -231,7 +231,7 @@ void SdrMarkView::ModelHasChanged() sSelection = aSelection.toString(); } - if(SfxViewShell* pViewShell = SfxViewShell::Current()) + if(SfxViewShell* pViewShell = GetSfxViewShell()) pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_INVALIDATE_TILES, sSelection.getStr()); } } @@ -714,7 +714,7 @@ void SdrMarkView::SetMarkHandles() if (bTiledRendering) { // Suppress handles -> empty graphic selection. - if(SfxViewShell* pViewShell = SfxViewShell::Current()) + if(SfxViewShell* pViewShell = GetSfxViewShell()) { pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_GRAPHIC_SELECTION, "EMPTY"); SfxLokHelper::notifyOtherViews(pViewShell, LOK_CALLBACK_GRAPHIC_VIEW_SELECTION, "selection", "EMPTY"); @@ -738,7 +738,7 @@ void SdrMarkView::SetMarkHandles() if (xController.is() && xController->hasSelectedCells()) { // The table shape has selected cells, which provide text selection already -> no graphic selection. - if(SfxViewShell* pViewShell = SfxViewShell::Current()) + if(SfxViewShell* pViewShell = GetSfxViewShell()) { pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_GRAPHIC_SELECTION, "EMPTY"); SfxLokHelper::notifyOtherViews(pViewShell, LOK_CALLBACK_GRAPHIC_VIEW_SELECTION, "selection", "EMPTY"); @@ -771,10 +771,10 @@ void SdrMarkView::SetMarkHandles() sSelection = aSelection.toString(); // hide the text selection too - if(SfxViewShell* pViewShell = SfxViewShell::Current()) + if(SfxViewShell* pViewShell = GetSfxViewShell()) pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_TEXT_SELECTION, ""); } - if(SfxViewShell* pViewShell = SfxViewShell::Current()) + if(SfxViewShell* pViewShell = GetSfxViewShell()) { pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_GRAPHIC_SELECTION, sSelection.getStr()); SfxLokHelper::notifyOtherViews(pViewShell, LOK_CALLBACK_GRAPHIC_VIEW_SELECTION, "selection", sSelection); @@ -1263,6 +1263,11 @@ void SdrMarkView::SetRef2(const Point& rPt) } } +SfxViewShell* SdrMarkView::GetSfxViewShell() const +{ + return SfxViewShell::Current(); +} + bool SdrPageView::IsObjSelectable(SdrObject *pObj) const { SdrLayerID nLay=pObj->GetLayer(); |