[Libreoffice-commits] core.git: drawinglayer/source include/drawinglayer include/svx svx/source

Miklos Vajna vmiklos at collabora.co.uk
Thu Jan 14 22:45:22 PST 2016


 drawinglayer/source/processor2d/hittestprocessor2d.cxx  |   11 ++++-------
 include/drawinglayer/processor2d/hittestprocessor2d.hxx |    6 +-----
 include/svx/sdrhittesthelper.hxx                        |    1 -
 include/svx/svdmodel.hxx                                |    2 --
 svx/source/sdr/overlay/overlayobjectlist.cxx            |    8 +++-----
 svx/source/svdraw/sdrhittesthelper.cxx                  |    6 ++----
 svx/source/svdraw/svdedxv.cxx                           |    8 ++++----
 svx/source/svdraw/svdmodel.cxx                          |    5 -----
 svx/source/svdraw/svdmrkv.cxx                           |    3 ++-
 svx/source/svdraw/svdpagv.cxx                           |    4 ++--
 svx/source/svdraw/svdpntv.cxx                           |    6 +++---
 svx/source/table/tablecontroller.cxx                    |    9 +++++----
 12 files changed, 26 insertions(+), 43 deletions(-)

New commits:
commit 1859acbc7c9f2548f835212f030fd1d09335ae79
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Fri Jan 15 07:43:49 2016 +0100

    svx: remove now unused SdrModel::isTiledRendering()
    
    Change-Id: I8d3c6b1de2db57e39678a7e57de6e015c72719ec

diff --git a/drawinglayer/source/processor2d/hittestprocessor2d.cxx b/drawinglayer/source/processor2d/hittestprocessor2d.cxx
index 190778e..4853a28 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 96e9d9c..9f78f44 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 aaabfc7..63e0dec 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 b251a63..4288fac 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 f15e0ac..2e91320 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 3c2b435..faad745 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 5c2dc63..2cd9533 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 737a179..855fd69 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 15d15d8..03fca1e 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 1d0b038..5b40fe0 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 b14262d..2f62056 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 1e1afbd..199499f 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");


More information about the Libreoffice-commits mailing list