include/svx/polypolygoneditor.hxx         |    3 +--
 sd/source/ui/animations/motionpathtag.cxx |    6 +++---
 svx/source/svdraw/polypolygoneditor.cxx   |    6 +++---
 svx/source/svdraw/svdpoev.cxx             |    6 +++---
 4 files changed, 10 insertions(+), 11 deletions(-)

New commits:
commit c10aaf94a9054e48ddd1112c84876eecd3dec726
Author: Regina Henschel <rb.hensc...@t-online.de>
Date:   Sun Jan 29 01:03:16 2017 +0100

    tdf#105545 Allow closed paths having 2 points
    
    Closed paths with 2 points can be created from scratch,
    therefore allow them too, if a point is deleted.
    Remove now unused member mbIsClosed
    
    Change-Id: Iac2a08df52f734c99c6ac14d9f1a16d8b943d399
    Reviewed-on: https://gerrit.libreoffice.org/33654
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de>

diff --git a/include/svx/polypolygoneditor.hxx 
b/include/svx/polypolygoneditor.hxx
index a65200fd3ad2..c5b079d707c8 100644
--- a/include/svx/polypolygoneditor.hxx
+++ b/include/svx/polypolygoneditor.hxx
@@ -34,7 +34,7 @@ namespace sdr
 class SVX_DLLPUBLIC PolyPolygonEditor
 {
 public:
-    PolyPolygonEditor( const basegfx::B2DPolyPolygon& rPolyPolygon, bool 
bClosed );
+    PolyPolygonEditor( const basegfx::B2DPolyPolygon& rPolyPolygon);
 
     const basegfx::B2DPolyPolygon& GetPolyPolygon() const { return 
maPolyPolygon; }
 
@@ -58,7 +58,6 @@ public:
 
 private:
     basegfx::B2DPolyPolygon maPolyPolygon;
-    bool mbIsClosed;
 };
 
 }
diff --git a/sd/source/ui/animations/motionpathtag.cxx 
b/sd/source/ui/animations/motionpathtag.cxx
index 39369192911d..4ce9ad62bc66 100644
--- a/sd/source/ui/animations/motionpathtag.cxx
+++ b/sd/source/ui/animations/motionpathtag.cxx
@@ -1036,7 +1036,7 @@ void MotionPathTag::DeleteMarkedPoints()
         mrView.BrkAction();
 
         SdrUShortCont& rPts = mpMark->GetMarkedPoints();
-        PolyPolygonEditor aEditor( mpPathObj->GetPathPoly(), 
mpPathObj->IsClosed() );
+        PolyPolygonEditor aEditor( mpPathObj->GetPathPoly());
         if (aEditor.DeletePoints(rPts))
         {
             if( aEditor.GetPolyPolygon().count() )
@@ -1088,7 +1088,7 @@ void 
MotionPathTag::SetMarkedSegmentsKind(SdrPathSegmentKind eKind)
     if(mpPathObj && isSelected() && (GetMarkedPointCount() != 0))
     {
         SdrUShortCont& rPts = mpMark->GetMarkedPoints();
-        PolyPolygonEditor aEditor( mpPathObj->GetPathPoly(), 
mpPathObj->IsClosed() );
+        PolyPolygonEditor aEditor( mpPathObj->GetPathPoly() );
         if (aEditor.SetSegmentsKind(eKind, rPts))
         {
             mpPathObj->SetPathPoly(aEditor.GetPolyPolygon());
@@ -1138,7 +1138,7 @@ void 
MotionPathTag::SetMarkedPointsSmooth(SdrPathSmoothKind eKind)
     if(mpPathObj && mpMark && isSelected() && (GetMarkedPointCount() != 0))
     {
         SdrUShortCont& rPts = mpMark->GetMarkedPoints();
-        PolyPolygonEditor aEditor( mpPathObj->GetPathPoly(), 
mpPathObj->IsClosed() );
+        PolyPolygonEditor aEditor( mpPathObj->GetPathPoly());
         if (aEditor.SetPointsSmooth(eFlags, rPts))
         {
             mpPathObj->SetPathPoly(aEditor.GetPolyPolygon());
diff --git a/svx/source/svdraw/polypolygoneditor.cxx 
b/svx/source/svdraw/polypolygoneditor.cxx
index 9fab1ba153f3..3cdd3c799231 100644
--- a/svx/source/svdraw/polypolygoneditor.cxx
+++ b/svx/source/svdraw/polypolygoneditor.cxx
@@ -25,9 +25,8 @@
 
 namespace sdr {
 
-PolyPolygonEditor::PolyPolygonEditor( const basegfx::B2DPolyPolygon& 
rPolyPolygon, bool bClosed )
+PolyPolygonEditor::PolyPolygonEditor( const basegfx::B2DPolyPolygon& 
rPolyPolygon)
 : maPolyPolygon( rPolyPolygon )
-, mbIsClosed( bClosed )
 {
 }
 
@@ -46,7 +45,8 @@ bool PolyPolygonEditor::DeletePoints( const std::set< 
sal_uInt16 >& rAbsPoints )
 
             aCandidate.remove(nPnt);
 
-            if( ( mbIsClosed && aCandidate.count() < 3L) || 
(aCandidate.count() < 2L) )
+
+            if( aCandidate.count() < 2L )
             {
                 maPolyPolygon.remove(nPoly);
             }
diff --git a/svx/source/svdraw/svdpoev.cxx b/svx/source/svdraw/svdpoev.cxx
index 77185149eafb..9d259ab4f319 100644
--- a/svx/source/svdraw/svdpoev.cxx
+++ b/svx/source/svdraw/svdpoev.cxx
@@ -207,7 +207,7 @@ void 
SdrPolyEditView::SetMarkedPointsSmooth(SdrPathSmoothKind eKind)
                 continue;
 
             SdrUShortCont& rPts = pM->GetMarkedPoints();
-            PolyPolygonEditor aEditor(pPath->GetPathPoly(), pPath->IsClosed());
+            PolyPolygonEditor aEditor(pPath->GetPathPoly());
             if (aEditor.SetPointsSmooth(eFlags, rPts))
             {
                 if( bUndo )
@@ -240,7 +240,7 @@ void 
SdrPolyEditView::SetMarkedSegmentsKind(SdrPathSegmentKind eKind)
             if (!pPath)
                 continue;
             SdrUShortCont& rPts = pM->GetMarkedPoints();
-            PolyPolygonEditor aEditor( pPath->GetPathPoly(), pPath->IsClosed() 
);
+            PolyPolygonEditor aEditor( pPath->GetPathPoly());
             if (aEditor.SetSegmentsKind(eKind, rPts))
             {
                 if( bUndo )
@@ -307,7 +307,7 @@ void SdrPolyEditView::DeleteMarkedPoints()
                 continue;
 
             SdrUShortCont& rPts = pM->GetMarkedPoints();
-            PolyPolygonEditor aEditor( pPath->GetPathPoly(), pPath->IsClosed() 
);
+            PolyPolygonEditor aEditor( pPath->GetPathPoly());
             if (aEditor.DeletePoints(rPts))
             {
                 if( aEditor.GetPolyPolygon().count() )
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to