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

Vort vvort at yandex.ru
Thu Feb 20 06:03:56 PST 2014


 sdext/source/pdfimport/wrapper/wrapper.cxx |   39 +++--------------------------
 1 file changed, 5 insertions(+), 34 deletions(-)

New commits:
commit 7f8e7741194d85e97f6cd6ce54235e735c883aa0
Author: Vort <vvort at yandex.ru>
Date:   Wed Feb 19 11:43:08 2014 +0200

    fdo#75195 PDF import: Revert commit 128adf7e5c06fff378c8d72b44ec4be1e462984f
    
    Change-Id: Icb03088809e57a388317f98046f9de3197772a41
    Reviewed-on: https://gerrit.libreoffice.org/8126
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sdext/source/pdfimport/wrapper/wrapper.cxx b/sdext/source/pdfimport/wrapper/wrapper.cxx
index 03eb945..e4cde03 100644
--- a/sdext/source/pdfimport/wrapper/wrapper.cxx
+++ b/sdext/source/pdfimport/wrapper/wrapper.cxx
@@ -140,8 +140,6 @@ class Parser
     sal_Int32                                    m_nNextToken;
     sal_Int32                                    m_nCharIndex;
 
-    const double                                 minAreaThreshold;
-    const double                                 minLineWidth;
 
     OString readNextToken();
     void           readInt32( sal_Int32& o_Value );
@@ -151,7 +149,7 @@ class Parser
     double         readDouble();
     void           readBinaryData( uno::Sequence<sal_Int8>& rBuf );
 
-    uno::Reference<rendering::XPolyPolygon2D> readPath( double* );
+    uno::Reference<rendering::XPolyPolygon2D> readPath();
 
     void                 readChar();
     void                 readLineCap();
@@ -184,9 +182,7 @@ public:
         m_aLine(),
         m_aFontMap(101),
         m_nNextToken(-1),
-        m_nCharIndex(-1),
-        minAreaThreshold( 300.0 ),
-        minLineWidth( 12 )
+        m_nCharIndex(-1)
     {}
 
     void parseLine( const OString& rLine );
@@ -293,7 +289,7 @@ void Parser::readBinaryData( uno::Sequence<sal_Int8>& rBuf )
     OSL_PRECOND(nRes==osl_File_E_None, "inconsistent data");
 }
 
-uno::Reference<rendering::XPolyPolygon2D> Parser::readPath( double* pArea = NULL )
+uno::Reference<rendering::XPolyPolygon2D> Parser::readPath()
 {
     const OString aSubPathMarker( "subpath" );
 
@@ -353,15 +349,6 @@ uno::Reference<rendering::XPolyPolygon2D> Parser::readPath( double* pArea = NULL
             readNextToken();
     }
 
-    if( pArea )
-    {
-        basegfx::B2DRange aRange( aResult.getB2DRange() );
-        if( aRange.getWidth() <= minLineWidth || aRange.getHeight() <= minLineWidth)
-            *pArea = 0.0;
-        else
-            *pArea = aRange.getWidth() * aRange.getHeight();
-    }
-
     return static_cast<rendering::XLinePolyPolygon2D*>(
         new basegfx::unotools::UnoPolyPolygon(aResult));
 }
@@ -841,25 +828,9 @@ void Parser::parseLine( const OString& rLine )
         case EOCLIPPATH:
             m_pSink->intersectEoClip(readPath()); break;
         case EOFILLPATH:
-        {
-            double area = 0.0;
-            uno::Reference<rendering::XPolyPolygon2D> path = readPath( &area );
-            m_pSink->eoFillPath(path);
-            // if area is smaller than required, add borders.
-            if(area < minAreaThreshold)
-                m_pSink->strokePath(path);
-        }
-        break;
+            m_pSink->eoFillPath(readPath()); break;
         case FILLPATH:
-        {
-            double area = 0.0;
-            uno::Reference<rendering::XPolyPolygon2D> path = readPath( &area );
-            m_pSink->fillPath(path);
-            // if area is smaller than required, add borders.
-            if(area < minAreaThreshold)
-                m_pSink->strokePath(path);
-        }
-        break;
+            m_pSink->fillPath(readPath()); break;
         case RESTORESTATE:
             m_pSink->popState(); break;
         case SAVESTATE:


More information about the Libreoffice-commits mailing list