diff options
author | Noel Grandin <noel@peralex.com> | 2016-06-24 15:56:44 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-06-27 05:20:12 +0000 |
commit | 78ca0ce54a2cd79736247ea8cf69ad5fc797ee1a (patch) | |
tree | d6ea35c8f740c3ae4d09f68b8ff975daa765596c /svx | |
parent | c47d85be7839d0721a09f2eb100c4ab0abb7a985 (diff) |
loplugin:singlevalfields in svx(part3)
Change-Id: I6b7a33b5f1297309a7225cac8150dbf1175506b6
Reviewed-on: https://gerrit.libreoffice.org/26642
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/svdraw/svdcrtv.cxx | 45 | ||||
-rw-r--r-- | svx/source/svdraw/svddrgmt.cxx | 14 | ||||
-rw-r--r-- | svx/source/svdraw/svddrgv.cxx | 6 | ||||
-rw-r--r-- | svx/source/svdraw/svdedtv.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdedxv.cxx | 1 | ||||
-rw-r--r-- | svx/source/svdraw/svdetc.cxx | 1 | ||||
-rw-r--r-- | svx/source/svdraw/svdoedge.cxx | 14 | ||||
-rw-r--r-- | svx/source/svdraw/svdview.cxx | 9 |
8 files changed, 29 insertions, 63 deletions
diff --git a/svx/source/svdraw/svdcrtv.cxx b/svx/source/svdraw/svdcrtv.cxx index 7b070cbcc108..6e1c619fb436 100644 --- a/svx/source/svdraw/svdcrtv.cxx +++ b/svx/source/svdraw/svdcrtv.cxx @@ -80,31 +80,28 @@ ImplConnectMarkerOverlay::ImplConnectMarkerOverlay(const SdrCreateView& rView, S maObjects.append(*pNew); // glue points - if(rView.IsAutoVertexConnectors()) + for(sal_uInt16 i(0); i < 4; i++) { - for(sal_uInt16 i(0); i < 4; i++) - { - SdrGluePoint aGluePoint(rObject.GetVertexGluePoint(i)); - const Point& rPosition = aGluePoint.GetAbsolutePos(rObject); - - basegfx::B2DPoint aTopLeft(rPosition.X() - aHalfLogicSize.Width(), rPosition.Y() - aHalfLogicSize.Height()); - basegfx::B2DPoint aBottomRight(rPosition.X() + aHalfLogicSize.Width(), rPosition.Y() + aHalfLogicSize.Height()); - - basegfx::B2DPolygon aTempPoly; - aTempPoly.append(aTopLeft); - aTempPoly.append(basegfx::B2DPoint(aBottomRight.getX(), aTopLeft.getY())); - aTempPoly.append(aBottomRight); - aTempPoly.append(basegfx::B2DPoint(aTopLeft.getX(), aBottomRight.getY())); - aTempPoly.setClosed(true); - - basegfx::B2DPolyPolygon aTempPolyPoly; - aTempPolyPoly.append(aTempPoly); - - pNew = new sdr::overlay::OverlayPolyPolygonStripedAndFilled( - aTempPolyPoly); - xTargetOverlay->add(*pNew); - maObjects.append(*pNew); - } + SdrGluePoint aGluePoint(rObject.GetVertexGluePoint(i)); + const Point& rPosition = aGluePoint.GetAbsolutePos(rObject); + + basegfx::B2DPoint aTopLeft(rPosition.X() - aHalfLogicSize.Width(), rPosition.Y() - aHalfLogicSize.Height()); + basegfx::B2DPoint aBottomRight(rPosition.X() + aHalfLogicSize.Width(), rPosition.Y() + aHalfLogicSize.Height()); + + basegfx::B2DPolygon aTempPoly; + aTempPoly.append(aTopLeft); + aTempPoly.append(basegfx::B2DPoint(aBottomRight.getX(), aTopLeft.getY())); + aTempPoly.append(aBottomRight); + aTempPoly.append(basegfx::B2DPoint(aTopLeft.getX(), aBottomRight.getY())); + aTempPoly.setClosed(true); + + basegfx::B2DPolyPolygon aTempPolyPoly; + aTempPolyPoly.append(aTempPoly); + + pNew = new sdr::overlay::OverlayPolyPolygonStripedAndFilled( + aTempPolyPoly); + xTargetOverlay->add(*pNew); + maObjects.append(*pNew); } } } diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx index 2a636e190912..2e5b1051a315 100644 --- a/svx/source/svdraw/svddrgmt.cxx +++ b/svx/source/svdraw/svddrgmt.cxx @@ -841,11 +841,6 @@ bool SdrDragMethod::DoAddConnectorOverlays() return false; } - if(!getSdrDragView().IsRubberEdgeDragging() && !getSdrDragView().IsDetailedEdgeDragging()) - { - return false; - } - if(getSdrDragView().IsDraggingPoints() || getSdrDragView().IsDraggingGluePoints()) { return false; @@ -858,13 +853,6 @@ bool SdrDragMethod::DoAddConnectorOverlays() return false; } - const bool bDetail(getSdrDragView().IsDetailedEdgeDragging() && getMoveOnly()); - - if(!bDetail && !getSdrDragView().IsRubberEdgeDragging()) - { - return false; - } - // one more migrated from SdrEdgeObj::NspToggleEdgeXor if( dynamic_cast< const SdrDragObjOwn* >(this) != nullptr || dynamic_cast< const SdrDragMovHdl* >(this) != nullptr ) { @@ -877,7 +865,7 @@ bool SdrDragMethod::DoAddConnectorOverlays() drawinglayer::primitive2d::Primitive2DContainer SdrDragMethod::AddConnectorOverlays() { drawinglayer::primitive2d::Primitive2DContainer aRetval; - const bool bDetail(getSdrDragView().IsDetailedEdgeDragging() && getMoveOnly()); + const bool bDetail(getMoveOnly()); const SdrMarkList& rMarkedNodes = getSdrDragView().GetEdgesOfMarkedNodes(); for(size_t a = 0; a < rMarkedNodes.GetMarkCount(); ++a) diff --git a/svx/source/svdraw/svddrgv.cxx b/svx/source/svdraw/svddrgv.cxx index c9dbcfa436ae..fc0a7f82eba0 100644 --- a/svx/source/svdraw/svddrgv.cxx +++ b/svx/source/svdraw/svddrgv.cxx @@ -59,7 +59,6 @@ void SdrDragView::ImpClearVars() mbDragSpecial=false; mpCurrentSdrDragMethod=nullptr; mbDragStripes=false; - mbMirrRefDragObj=true; mbDragWithCopy=false; mpInsPointUndo=nullptr; mbInsGluePoint=false; @@ -68,14 +67,9 @@ void SdrDragView::ImpClearVars() mnDragXorPolyLimit=100; mnDragXorPointLimit=500; mbNoDragXorPolys=false; - mbAutoVertexCon=true; - mbAutoCornerCon=false; - mbRubberEdgeDragging=true; - mbDetailedEdgeDragging=true; mnDetailedEdgeDraggingLimit=10; mbResizeAtCenter=false; mbCrookAtCenter=false; - mbMouseHideWhileDraggingPoints=false; // init using default mbSolidDragging = getOptionsDrawinglayer().IsSolidDragCreate(); diff --git a/svx/source/svdraw/svdedtv.cxx b/svx/source/svdraw/svdedtv.cxx index b3f97e6c595d..6e8b88d2619d 100644 --- a/svx/source/svdraw/svdedtv.cxx +++ b/svx/source/svdraw/svdedtv.cxx @@ -61,8 +61,6 @@ void SdrEditView::ImpResetPossibilityFlags() bOneOrMoreMovable =false; bMoreThanOneNoMovRot =false; bContortionPossible =false; - bAllPolys =false; - bOneOrMorePolys =false; bMoveAllowed =false; bResizeFreeAllowed =false; bResizePropAllowed =false; diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx index c5f60854a78f..a0fcb8129625 100644 --- a/svx/source/svdraw/svdedxv.cxx +++ b/svx/source/svdraw/svdedxv.cxx @@ -70,7 +70,6 @@ void SdrObjEditView::ImpClearVars() { bQuickTextEditMode=true; - bMacroMode=true; pTextEditOutliner=nullptr; pTextEditOutlinerView=nullptr; pTextEditPV=nullptr; diff --git a/svx/source/svdraw/svdetc.cxx b/svx/source/svdraw/svdetc.cxx index 439371b23d21..1ca4870caaa2 100644 --- a/svx/source/svdraw/svdetc.cxx +++ b/svx/source/svdraw/svdetc.cxx @@ -391,7 +391,6 @@ bool GetDraftFillColor(const SfxItemSet& rSet, Color& rCol) SdrEngineDefaults::SdrEngineDefaults(): aFontColor(COL_AUTO), nFontHeight(847), // 847/100mm = ca. 24 Point - eMapUnit(MAP_100TH_MM), aMapFraction(1,1) { } diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx index 04621c952552..6a88a875e5b5 100644 --- a/svx/source/svdraw/svdoedge.cxx +++ b/svx/source/svdraw/svdoedge.cxx @@ -2146,18 +2146,12 @@ bool SdrEdgeObj::ImpFindConnector(const Point& rPt, const SdrPageView& rPV, SdrO bOk = true; } else if (bVertex && !bUserFnd) { nConNum=nConNum-nConAnz; - if (rPV.GetView().IsAutoVertexConnectors()) { - SdrGluePoint aPt(pObj->GetVertexGluePoint(nConNum)); - aConPos=aPt.GetAbsolutePos(*pObj); - bOk = true; - } else i+=3; + SdrGluePoint aPt(pObj->GetVertexGluePoint(nConNum)); + aConPos=aPt.GetAbsolutePos(*pObj); + bOk = true; } else if (bCorner && !bUserFnd) { nConNum-=nConAnz+4; - if (rPV.GetView().IsAutoCornerConnectors()) { - SdrGluePoint aPt(pObj->GetCornerGluePoint(nConNum)); - aConPos=aPt.GetAbsolutePos(*pObj); - bOk = true; - } else i+=3; + i+=3; } else if (bCenter && !bUserFnd && !bEdge) { diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx index bc0475cc07a9..41497aac5aa8 100644 --- a/svx/source/svdraw/svdview.cxx +++ b/svx/source/svdraw/svdview.cxx @@ -18,6 +18,7 @@ */ #include <editeng/eeitem.hxx> +#include <editeng/outlobj.hxx> #include "svx/svdstr.hrc" #include "svdglob.hxx" @@ -398,7 +399,7 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co { eHit=SDRHIT_HELPLINE; // help line in foreground hit: can be moved now } - if (IsMacroMode() && eHit==SDRHIT_UNMARKEDOBJECT) + if (eHit==SDRHIT_UNMARKEDOBJECT) { bool bRoot=pObj->HasMacro(); bool bDeep=pObj!=pHitObj && pHitObj->HasMacro(); @@ -443,7 +444,7 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co } } // check for URL field - if (IsMacroMode() && eHit==SDRHIT_UNMARKEDOBJECT) + if (eHit==SDRHIT_UNMARKEDOBJECT) { SdrTextObj* pTextObj=dynamic_cast<SdrTextObj*>( pHitObj ); if (pTextObj!=nullptr && pTextObj->HasText()) @@ -934,7 +935,6 @@ bool SdrView::DoMouseEvent(const SdrViewEvent& rVEvt) } return bRet; } -#include <editeng/outlobj.hxx> Pointer SdrView::GetPreferredPointer(const Point& rMousePos, const OutputDevice* pOut, sal_uInt16 nModifier, bool bLeftDown) const { @@ -945,9 +945,6 @@ Pointer SdrView::GetPreferredPointer(const Point& rMousePos, const OutputDevice* } if (mpCurrentSdrDragMethod) { - if ((IsDraggingPoints() || IsDraggingGluePoints()) && IsMouseHideWhileDraggingPoints()) - return Pointer(PointerStyle::Null); - return mpCurrentSdrDragMethod->GetSdrDragPointer(); } if (IsMarkObj() || IsMarkPoints() || IsMarkGluePoints() || IsSetPageOrg()) return Pointer(PointerStyle::Arrow); |