summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drawinglayer/source/processor2d/hittestprocessor2d.cxx11
-rw-r--r--include/drawinglayer/processor2d/hittestprocessor2d.hxx6
-rw-r--r--include/svx/sdrhittesthelper.hxx1
-rw-r--r--include/svx/svdmodel.hxx2
-rw-r--r--svx/source/sdr/overlay/overlayobjectlist.cxx8
-rw-r--r--svx/source/svdraw/sdrhittesthelper.cxx6
-rw-r--r--svx/source/svdraw/svdedxv.cxx8
-rw-r--r--svx/source/svdraw/svdmodel.cxx5
-rw-r--r--svx/source/svdraw/svdmrkv.cxx3
-rw-r--r--svx/source/svdraw/svdpagv.cxx4
-rw-r--r--svx/source/svdraw/svdpntv.cxx6
-rw-r--r--svx/source/table/tablecontroller.cxx9
12 files changed, 26 insertions, 43 deletions
diff --git a/drawinglayer/source/processor2d/hittestprocessor2d.cxx b/drawinglayer/source/processor2d/hittestprocessor2d.cxx
index 190778e2ae39..4853a2838aff 100644
--- a/drawinglayer/source/processor2d/hittestprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/hittestprocessor2d.cxx
@@ -32,8 +32,7 @@
#include <drawinglayer/processor3d/cutfindprocessor3d.hxx>
#include <drawinglayer/primitive2d/hiddengeometryprimitive2d.hxx>
#include <drawinglayer/primitive2d/bitmapprimitive2d.hxx>
-
-
+#include <comphelper/lok.hxx>
namespace drawinglayer
{
@@ -42,16 +41,14 @@ namespace drawinglayer
HitTestProcessor2D::HitTestProcessor2D(const geometry::ViewInformation2D& rViewInformation,
const basegfx::B2DPoint& rLogicHitPosition,
double fLogicHitTolerance,
- bool bHitTextOnly,
- bool bTiledRendering)
+ bool bHitTextOnly)
: BaseProcessor2D(rViewInformation),
maDiscreteHitPosition(),
mfDiscreteHitTolerance(0.0),
mbHit(false),
mbHitToleranceUsed(false),
mbUseInvisiblePrimitiveContent(true),
- mbHitTextOnly(bHitTextOnly),
- mbTiledRendering(bTiledRendering)
+ mbHitTextOnly(bHitTextOnly)
{
// init hit tolerance
mfDiscreteHitTolerance = fLogicHitTolerance;
@@ -444,7 +441,7 @@ namespace drawinglayer
const Size& rSizePixel(rBitmapEx.GetSizePixel());
// When tiled rendering, don't bother with the pixel size of the candidate.
- if(rSizePixel.Width() && rSizePixel.Height() && !mbTiledRendering)
+ if(rSizePixel.Width() && rSizePixel.Height() && !comphelper::LibreOfficeKit::isActive())
{
basegfx::B2DHomMatrix aBackTransform(
getViewInformation2D().getObjectToViewTransformation() *
diff --git a/include/drawinglayer/processor2d/hittestprocessor2d.hxx b/include/drawinglayer/processor2d/hittestprocessor2d.hxx
index 96e9d9cabf8e..9f78f44b9f90 100644
--- a/include/drawinglayer/processor2d/hittestprocessor2d.hxx
+++ b/include/drawinglayer/processor2d/hittestprocessor2d.hxx
@@ -61,9 +61,6 @@ namespace drawinglayer
/// flag to concentrate on text hits only
bool mbHitTextOnly : 1;
- /// If we are tiled rendering.
- bool mbTiledRendering;
-
/// tooling methods
void processBasePrimitive2D(const primitive2d::BasePrimitive2D& rCandidate) override;
bool checkHairlineHitWithTolerance(
@@ -79,8 +76,7 @@ namespace drawinglayer
const geometry::ViewInformation2D& rViewInformation,
const basegfx::B2DPoint& rLogicHitPosition,
double fLogicHitTolerance,
- bool bHitTextOnly,
- bool bTiledRendering);
+ bool bHitTextOnly);
virtual ~HitTestProcessor2D();
/// data read access
diff --git a/include/svx/sdrhittesthelper.hxx b/include/svx/sdrhittesthelper.hxx
index aaabfc729bf4..63e0dec21b1b 100644
--- a/include/svx/sdrhittesthelper.hxx
+++ b/include/svx/sdrhittesthelper.hxx
@@ -56,7 +56,6 @@ SVX_DLLPUBLIC SdrObject* SdrObjListPrimitiveHit(
// the pure HitTest based on a VOC
SVX_DLLPUBLIC bool ViewObjectContactPrimitiveHit(
- const SdrObject& rObject,
const sdr::contact::ViewObjectContact& rVOC,
const basegfx::B2DPoint& rHitPosition,
double fLogicHitTolerance,
diff --git a/include/svx/svdmodel.hxx b/include/svx/svdmodel.hxx
index b251a6351aac..4288fac9f748 100644
--- a/include/svx/svdmodel.hxx
+++ b/include/svx/svdmodel.hxx
@@ -339,8 +339,6 @@ public:
OutputDevice* GetRefDevice() const { return pRefOutDev.get(); }
/// Set if we are doing tiled rendering.
void setTiledRendering(bool bTiledRendering);
- /// Are we doing tiled rendering?
- bool isTiledRendering() const;
/// The actual implementation of the vcl::ITiledRenderable::registerCallback() API.
void registerLibreOfficeKitCallback(LibreOfficeKitCallback pCallback, void* pLibreOfficeKitData);
/// Gets the LOK callback registered by registerLibreOfficeKitCallback().
diff --git a/svx/source/sdr/overlay/overlayobjectlist.cxx b/svx/source/sdr/overlay/overlayobjectlist.cxx
index f15e0ace1b23..2e9132012607 100644
--- a/svx/source/sdr/overlay/overlayobjectlist.cxx
+++ b/svx/source/sdr/overlay/overlayobjectlist.cxx
@@ -29,8 +29,7 @@
#include <algorithm>
#include <drawinglayer/processor2d/hittestprocessor2d.hxx>
-
-
+#include <comphelper/lok.hxx>
namespace sdr
{
@@ -77,7 +76,7 @@ namespace sdr
Size(DEFAULT_VALUE_FOR_HITTEST_PIXEL, DEFAULT_VALUE_FOR_HITTEST_PIXEL)));
// When tiled rendering, we always work in logic units, use the non-pixel default.
- if (pManager->getModel()->isTiledRendering())
+ if (comphelper::LibreOfficeKit::isActive())
{
aSizeLogic = Size(DEFAULT_VALUE_FOR_HITTEST_TWIP, DEFAULT_VALUE_FOR_HITTEST_TWIP);
if (pManager->getOutputDevice().GetMapMode().GetMapUnit() == MAP_100TH_MM)
@@ -92,8 +91,7 @@ namespace sdr
aViewInformation2D,
rLogicPosition,
fLogicTolerance,
- false,
- pManager->getModel()->isTiledRendering());
+ false);
for(; aStart != maVector.end(); ++aStart)
{
diff --git a/svx/source/svdraw/sdrhittesthelper.cxx b/svx/source/svdraw/sdrhittesthelper.cxx
index 3c2b4353a922..faad745a0578 100644
--- a/svx/source/svdraw/sdrhittesthelper.cxx
+++ b/svx/source/svdraw/sdrhittesthelper.cxx
@@ -77,7 +77,7 @@ SdrObject* SdrObjectPrimitiveHit(
const sdr::contact::ViewObjectContact& rVOC = rObject.GetViewContact().GetViewObjectContact(
rSdrPageView.GetPageWindow(0)->GetObjectContact());
- if(ViewObjectContactPrimitiveHit(rObject, rVOC, aHitPosition, fLogicTolerance, bTextOnly))
+ if(ViewObjectContactPrimitiveHit(rVOC, aHitPosition, fLogicTolerance, bTextOnly))
{
pResult = const_cast< SdrObject* >(&rObject);
}
@@ -116,7 +116,6 @@ SdrObject* SdrObjListPrimitiveHit(
bool ViewObjectContactPrimitiveHit(
- const SdrObject& rObject,
const sdr::contact::ViewObjectContact& rVOC,
const basegfx::B2DPoint& rHitPosition,
double fLogicHitTolerance,
@@ -147,8 +146,7 @@ bool ViewObjectContactPrimitiveHit(
rViewInformation2D,
rHitPosition,
fLogicHitTolerance,
- bTextOnly,
- rObject.GetModel()->isTiledRendering());
+ bTextOnly);
// feed it with the primitives
aHitTestProcessor2D.process(rSequence);
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index 5c2dc63ec873..2cd953318731 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -62,10 +62,10 @@
#include <sdr/overlay/overlaytools.hxx>
#include <svx/sdr/table/tablecontroller.hxx>
#include <drawinglayer/processor2d/processor2dtools.hxx>
+#include <comphelper/lok.hxx>
#include <memory>
-
void SdrObjEditView::ImpClearVars()
{
bQuickTextEditMode=true;
@@ -316,7 +316,7 @@ void SdrObjEditView::TextEditDrawing(SdrPaintWindow& rPaintWindow) const
// compare against that; that's how double-buffering can
// still find the matching OutlinerView.
OutputDevice* pOutputDevice = rPaintWindow.GetWindow() ? rPaintWindow.GetWindow() : &rPaintWindow.GetOutputDevice();
- if(pOLV->GetWindow() == pOutputDevice || GetModel()->isTiledRendering())
+ if(pOLV->GetWindow() == pOutputDevice || comphelper::LibreOfficeKit::isActive())
{
ImpPaintOutlinerView(*pOLV, aCheckRect, rPaintWindow.GetTargetOutputDevice());
return;
@@ -342,7 +342,7 @@ void SdrObjEditView::ImpPaintOutlinerView(OutlinerView& rOutlView, const Rectang
// clipped; happens in case of editing text inside a shape in Calc.
// FIXME would be better to complete the setup so that we don't get an
// empty rRect here
- if (!GetModel()->isTiledRendering() || !rRect.IsEmpty())
+ if (!comphelper::LibreOfficeKit::isActive() || !rRect.IsEmpty())
aBlankRect.Intersection(rRect);
rOutlView.GetOutliner()->SetUpdateMode(true); // Bugfix #22596#
@@ -461,7 +461,7 @@ OutlinerView* SdrObjEditView::ImpMakeOutlinerView(vcl::Window* pWin, bool /*bNoP
}
pOutlView->SetControlWord(nStat);
pOutlView->SetBackgroundColor( aBackground );
- pOutlView->setTiledRendering(GetModel()->isTiledRendering());
+ pOutlView->setTiledRendering(comphelper::LibreOfficeKit::isActive());
pOutlView->registerLibreOfficeKitCallback(GetModel()->getLibreOfficeKitCallback(), GetModel()->getLibreOfficeKitData(), GetModel());
if (pText!=nullptr)
{
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index 737a1790cad7..855fd69dbf3e 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -817,11 +817,6 @@ void SdrModel::setTiledRendering(bool bTiledRendering)
mbTiledRendering = bTiledRendering;
}
-bool SdrModel::isTiledRendering() const
-{
- return mbTiledRendering;
-}
-
void SdrModel::registerLibreOfficeKitCallback(LibreOfficeKitCallback pCallback, void* pData)
{
mpLibreOfficeKitCallback = pCallback;
diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index 15d15d847d63..03fca1e23467 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;
@@ -664,7 +665,7 @@ void SdrMarkView::SetMarkHandles()
Point aGridOff = GetGridOffset();
// There can be multiple mark views, but we're only interested in the one that has a window associated.
- const bool bTiledRendering = GetModel()->isTiledRendering() && GetFirstOutputDevice() && GetFirstOutputDevice()->GetOutDevType() == OUTDEV_WINDOW;
+ const bool bTiledRendering = comphelper::LibreOfficeKit::isActive() && GetFirstOutputDevice() && GetFirstOutputDevice()->GetOutDevType() == OUTDEV_WINDOW;
// check if text edit or ole is active and handles need to be suppressed. This may be the case
// when a single object is selected
diff --git a/svx/source/svdraw/svdpagv.cxx b/svx/source/svdraw/svdpagv.cxx
index 1d0b038356db..5b40fe096fc0 100644
--- a/svx/source/svdraw/svdpagv.cxx
+++ b/svx/source/svdraw/svdpagv.cxx
@@ -44,7 +44,7 @@
#include <svx/sdrpagewindow.hxx>
#include <svx/sdrpaintwindow.hxx>
-
+#include <comphelper/lok.hxx>
using namespace ::com::sun::star;
@@ -239,7 +239,7 @@ void SdrPageView::Hide()
{
if(IsVisible())
{
- if (!GetView().GetModel()->isTiledRendering())
+ if (!comphelper::LibreOfficeKit::isActive())
{
InvalidateAllWin();
}
diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx
index b14262d8bae3..2f620569d2fd 100644
--- a/svx/source/svdraw/svdpntv.cxx
+++ b/svx/source/svdraw/svdpntv.cxx
@@ -59,10 +59,10 @@
#include <svx/sdr/contact/viewcontact.hxx>
#include <drawinglayer/primitive2d/metafileprimitive2d.hxx>
#include <basegfx/matrix/b2dhommatrixtools.hxx>
+#include <comphelper/lok.hxx>
using namespace ::com::sun::star;
-
// interface to SdrPaintWindow
SdrPaintWindow* SdrPaintView::FindPaintWindow(const OutputDevice& rOut) const
@@ -731,7 +731,7 @@ void SdrPaintView::DoCompleteRedraw(SdrPaintWindow& rPaintWindow, const vcl::Reg
void SdrPaintView::EndCompleteRedraw(SdrPaintWindow& rPaintWindow, bool bPaintFormLayer)
{
std::unique_ptr<SdrPaintWindow> pPaintWindow;
- if (GetModel()->isTiledRendering() && rPaintWindow.getTemporaryTarget())
+ if (comphelper::LibreOfficeKit::isActive() && rPaintWindow.getTemporaryTarget())
{
// Tiled rendering, we must paint the TextEdit to the output device.
pPaintWindow.reset(&rPaintWindow);
@@ -953,7 +953,7 @@ void SdrPaintView::InvalidateAllWin(const Rectangle& rRect, bool bPlus1Pix)
Rectangle aOutRect(aOrg, rOutDev.GetOutputSize());
// In case of tiled rendering we want to get all invalidations, so visual area is not interesting.
- if (aRect.IsOver(aOutRect) || GetModel()->isTiledRendering())
+ if (aRect.IsOver(aOutRect) || comphelper::LibreOfficeKit::isActive())
{
InvalidateOneWin(static_cast<vcl::Window&>(rOutDev), aRect);
}
diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx
index 1e1afbd33fa6..199499f0cb0b 100644
--- a/svx/source/table/tablecontroller.cxx
+++ b/svx/source/table/tablecontroller.cxx
@@ -71,6 +71,7 @@
#include <o3tl/enumarray.hxx>
#include <o3tl/enumrange.hxx>
#include <cppuhelper/implbase.hxx>
+#include <comphelper/lok.hxx>
using ::editeng::SvxBorderLine;
using namespace sdr::table;
@@ -251,7 +252,7 @@ bool SvxTableController::onKeyInput(const KeyEvent& rKEvt, vcl::Window* pWindow
bool SvxTableController::onMouseButtonDown(const MouseEvent& rMEvt, vcl::Window* pWindow )
{
- if (mxTableObj->GetModel()->isTiledRendering() && !pWindow)
+ if (comphelper::LibreOfficeKit::isActive() && !pWindow)
{
// Tiled rendering: get the window that has the disabled map mode.
if (OutputDevice* pOutputDevice = mpView->GetFirstOutputDevice())
@@ -307,7 +308,7 @@ bool SvxTableController::onMouseButtonDown(const MouseEvent& rMEvt, vcl::Window*
}
}
- if (mxTableObj->GetModel()->isTiledRendering() && rMEvt.GetClicks() == 2 && rMEvt.IsLeft() && eHit == SDRTABLEHIT_CELLTEXTAREA)
+ if (comphelper::LibreOfficeKit::isActive() && rMEvt.GetClicks() == 2 && rMEvt.IsLeft() && eHit == SDRTABLEHIT_CELLTEXTAREA)
{
bool bEmptyOutliner = false;
if (Outliner* pOutliner = mpView->GetTextEditOutliner())
@@ -2165,7 +2166,7 @@ void SvxTableController::updateSelectionOverlay()
}
// If tiled rendering, emit callbacks for sdr table selection.
- if (pOutDev && pTableObj->GetModel()->isTiledRendering())
+ if (pOutDev && comphelper::LibreOfficeKit::isActive())
{
// Left edge of aStartRect.
Rectangle aSelectionStart(aStartRect.Left(), aStartRect.Top(), aStartRect.Left(), aStartRect.Bottom());
@@ -2197,7 +2198,7 @@ void SvxTableController::destroySelectionOverlay()
delete mpSelectionOverlay;
mpSelectionOverlay = nullptr;
- if (mxTableObj->GetModel()->isTiledRendering())
+ if (comphelper::LibreOfficeKit::isActive())
{
// Clear the LOK text selection so far provided by this table.
mxTableObj->GetModel()->libreOfficeKitCallback(LOK_CALLBACK_TEXT_SELECTION_START, "EMPTY");