diff options
-rw-r--r-- | sd/source/ui/func/fusel.cxx | 5 | ||||
-rw-r--r-- | sd/source/ui/view/Outliner.cxx | 8 | ||||
-rw-r--r-- | sd/source/ui/view/sdwindow.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/view/viewshe2.cxx | 3 | ||||
-rw-r--r-- | sd/source/ui/view/viewshel.cxx | 7 |
5 files changed, 15 insertions, 14 deletions
diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx index 67df8e2664f5..f4b0fa91a965 100644 --- a/sd/source/ui/func/fusel.cxx +++ b/sd/source/ui/func/fusel.cxx @@ -78,7 +78,6 @@ using namespace ::com::sun::star; namespace sd { - FuSelection::FuSelection ( ViewShell* pViewSh, ::sd::Window* pWin, @@ -155,7 +154,7 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt) sal_uInt16 nDrgLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() ); sal_uInt16 nHitLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() ); - if (mpDoc->isTiledRendering()) + if (comphelper::LibreOfficeKit::isActive()) { // When tiled rendering, we always work in logic units, use the non-pixel constants. nDrgLog = DRGLOG; @@ -276,7 +275,7 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt) mpWindow->ReleaseMouse(); // If tiled rendering, let client handles URL execution and early returns. - if (mpDoc->isTiledRendering()) + if (comphelper::LibreOfficeKit::isActive()) { if (comphelper::LibreOfficeKit::isViewCallback()) { diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx index 9b7322c369a9..f1031f809e36 100644 --- a/sd/source/ui/view/Outliner.cxx +++ b/sd/source/ui/view/Outliner.cxx @@ -648,7 +648,7 @@ bool Outliner::SearchAndReplaceAll() do { bFoundMatch = ! SearchAndReplaceOnce(&aSelections); - if (mpSearchItem->GetCommand() == SvxSearchCmd::FIND_ALL && pViewShell->GetDoc()->isTiledRendering() && bFoundMatch && aSelections.size() == 1) + if (mpSearchItem->GetCommand() == SvxSearchCmd::FIND_ALL && comphelper::LibreOfficeKit::isActive() && bFoundMatch && aSelections.size() == 1) { // Without this, RememberStartPosition() will think it already has a remembered position. mnStartPageIndex = (sal_uInt16)-1; @@ -661,7 +661,7 @@ bool Outliner::SearchAndReplaceAll() } while (bFoundMatch); - if (mpSearchItem->GetCommand() == SvxSearchCmd::FIND_ALL && pViewShell->GetDoc()->isTiledRendering() && !aSelections.empty()) + if (mpSearchItem->GetCommand() == SvxSearchCmd::FIND_ALL && comphelper::LibreOfficeKit::isActive() && !aSelections.empty()) { boost::property_tree::ptree aTree; aTree.put("searchString", mpSearchItem->GetSearchString().toUtf8().getStr()); @@ -689,7 +689,7 @@ bool Outliner::SearchAndReplaceAll() RestoreStartPosition (); - if (mpSearchItem->GetCommand() == SvxSearchCmd::FIND_ALL && pViewShell->GetDoc()->isTiledRendering() && !bRet) + if (mpSearchItem->GetCommand() == SvxSearchCmd::FIND_ALL && comphelper::LibreOfficeKit::isActive() && !bRet) { // Find-all, tiled rendering and we have at least one match. OString aPayload = OString::number(mnStartPageIndex); @@ -811,7 +811,7 @@ bool Outliner::SearchAndReplaceOnce(std::vector<SearchSelection>* pSelections) mpDrawDocument->GetDocSh()->SetWaitCursor( false ); - if (pViewShell && pViewShell->GetDoc()->isTiledRendering() && mbStringFound) + if (pViewShell && comphelper::LibreOfficeKit::isActive() && mbStringFound) { std::vector<Rectangle> aLogicRects; pOutlinerView->GetSelectionRectangles(aLogicRects); diff --git a/sd/source/ui/view/sdwindow.cxx b/sd/source/ui/view/sdwindow.cxx index ac6679ab337d..b8e1422547b4 100644 --- a/sd/source/ui/view/sdwindow.cxx +++ b/sd/source/ui/view/sdwindow.cxx @@ -332,7 +332,7 @@ long Window::SetZoomFactor(long nZoom) nZoom = mnMinZoom; // Set the zoom factor at the window's map mode. - if (!mpViewShell || !mpViewShell->GetDoc()->isTiledRendering()) + if (!comphelper::LibreOfficeKit::isActive()) { MapMode aMap(GetMapMode()); aMap.SetScaleX(Fraction(nZoom, 100)); @@ -571,7 +571,7 @@ void Window::UpdateMapOrigin(bool bInvalidate) maPrevSize = aWinSize; // When tiled rendering, the above UpdateMapMode() call doesn't touch the map mode. - if (bChanged && bInvalidate && (!mpViewShell || !mpViewShell->GetDoc()->isTiledRendering())) + if (bChanged && bInvalidate && !comphelper::LibreOfficeKit::isActive()) Invalidate(); } @@ -611,7 +611,7 @@ void Window::UpdateMapMode() Point aNewOrigin (-maWinPos.X(), -maWinPos.Y()); maWinPos += maViewOrigin; - if (!mpViewShell || !mpViewShell->GetDoc()->isTiledRendering()) + if (!comphelper::LibreOfficeKit::isActive()) { MapMode aMap(GetMapMode()); aMap.SetOrigin(aNewOrigin); diff --git a/sd/source/ui/view/viewshe2.cxx b/sd/source/ui/view/viewshe2.cxx index 3ba31822bb56..d70a0a4a7727 100644 --- a/sd/source/ui/view/viewshe2.cxx +++ b/sd/source/ui/view/viewshe2.cxx @@ -70,6 +70,7 @@ #include <svtools/soerr.hxx> #include <toolkit/helper/vclunohelper.hxx> #include <svx/charthelper.hxx> +#include <comphelper/lok.hxx> using namespace com::sun::star; @@ -389,7 +390,7 @@ void ViewShell::SetZoomRect(const Rectangle& rZoomRect) mpContentWindow->UpdateMapOrigin(); // When tiled rendering, UpdateMapOrigin() doesn't touch the map mode. - if (!GetDoc()->isTiledRendering()) + if (!comphelper::LibreOfficeKit::isActive()) // #i74769# see above mpContentWindow->Invalidate(InvalidateFlags::Children); } diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx index 3d4ea73e6a6d..2deed289b00a 100644 --- a/sd/source/ui/view/viewshel.cxx +++ b/sd/source/ui/view/viewshel.cxx @@ -67,6 +67,7 @@ #include <svx/fontworkbar.hxx> #include <svx/svdoutl.hxx> #include <tools/diagnose_ex.h> +#include <comphelper/lok.hxx> #include <svl/slstitm.hxx> #include <sfx2/request.hxx> @@ -506,7 +507,7 @@ void ViewShell::MouseButtonDown(const MouseEvent& rMEvt, ::sd::Window* pWin) void ViewShell::LogicMouseButtonDown(const MouseEvent& rMouseEvent) { // When we're not doing tiled rendering, then positions must be passed as pixels. - assert(GetDoc()->isTiledRendering()); + assert(comphelper::LibreOfficeKit::isActive()); Point aPoint = mpActiveWindow->GetPointerPosPixel(); mpActiveWindow->SetLastMousePos(rMouseEvent.GetPosPixel()); @@ -519,7 +520,7 @@ void ViewShell::LogicMouseButtonDown(const MouseEvent& rMouseEvent) void ViewShell::LogicMouseButtonUp(const MouseEvent& rMouseEvent) { // When we're not doing tiled rendering, then positions must be passed as pixels. - assert(GetDoc()->isTiledRendering()); + assert(comphelper::LibreOfficeKit::isActive()); Point aPoint = mpActiveWindow->GetPointerPosPixel(); mpActiveWindow->SetLastMousePos(rMouseEvent.GetPosPixel()); @@ -532,7 +533,7 @@ void ViewShell::LogicMouseButtonUp(const MouseEvent& rMouseEvent) void ViewShell::LogicMouseMove(const MouseEvent& rMouseEvent) { // When we're not doing tiled rendering, then positions must be passed as pixels. - assert(GetDoc()->isTiledRendering()); + assert(comphelper::LibreOfficeKit::isActive()); Point aPoint = mpActiveWindow->GetPointerPosPixel(); mpActiveWindow->SetLastMousePos(rMouseEvent.GetPosPixel()); |