[Libreoffice-commits] core.git: filter/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Feb 6 16:32:51 UTC 2019


 filter/source/msfilter/msdffimp.cxx |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

New commits:
commit c06b120b1813a79c82aed465c8ba5cf5373c45bb
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Feb 6 14:51:25 2019 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Feb 6 17:32:24 2019 +0100

    nNumElemVert is already known to be >= 4
    
    cause the outer if is...
    
    if ( pAny && ( *pAny >>= seqCoordinates ) && ( seqCoordinates.getLength() >= 4 ) )
    {
            ... nNumElemVert = seqCoordinates.getLength();
    }
    
    so this check is always true
    
    Change-Id: I512b9440969775224c04d8566401b63f819711aa
    Reviewed-on: https://gerrit.libreoffice.org/67464
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 2a934272186a..45c8836f9d10 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -4541,11 +4541,10 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
                                 aXP[ static_cast<sal_uInt16>(nPtNum) ] = aP;
                             }
                             aPolyBoundRect = aXP.GetBoundRect();
-                            if ( nNumElemVert >= 3 )
-                            { // arc first command is always wr -- clockwise arc
-                                // the parameters are : (left,top),(right,bottom),start(x,y),end(x,y)
-                                aStartPt = aXP[2];
-                            }
+
+                            // arc first command is always wr -- clockwise arc
+                            // the parameters are : (left,top),(right,bottom),start(x,y),end(x,y)
+                            aStartPt = aXP[2];
                         }
                         else
                             aPolyBoundRect = tools::Rectangle( -21600, 0, 21600, 43200 );  // defaulting


More information about the Libreoffice-commits mailing list