Kaydet (Commit) 7f8e7741 authored tarafından Vort's avatar Vort Kaydeden (comit) Caolán McNamara

fdo#75195 PDF import: Revert commit 128adf7e

Change-Id: Icb03088809e57a388317f98046f9de3197772a41
Reviewed-on: https://gerrit.libreoffice.org/8126Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst b0cf499b
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment