diff options
author | Vort <vvort@yandex.ru> | 2014-02-19 11:43:08 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-02-20 14:03:34 +0000 |
commit | 7f8e7741194d85e97f6cd6ce54235e735c883aa0 (patch) | |
tree | c408cf1318538819976f4faefb16d29c902b3243 /sdext | |
parent | b0cf499b3ebeee66ca96dc4dc2310a198da0f2fc (diff) |
fdo#75195 PDF import: Revert commit 128adf7e5c06fff378c8d72b44ec4be1e462984f
Change-Id: Icb03088809e57a388317f98046f9de3197772a41
Reviewed-on: https://gerrit.libreoffice.org/8126
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sdext')
-rw-r--r-- | sdext/source/pdfimport/wrapper/wrapper.cxx | 39 |
1 files changed, 5 insertions, 34 deletions
diff --git a/sdext/source/pdfimport/wrapper/wrapper.cxx b/sdext/source/pdfimport/wrapper/wrapper.cxx index 03eb94518508..e4cde0391be6 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: |