Dead code in escherex.cxx (filter module)
Miklos Vajna
vmiklos at collabora.co.uk
Wed Apr 23 01:02:36 PDT 2014
Hi Julien,
On Tue, Apr 22, 2014 at 01:59:48PM -0700, julien2412 <serval2412 at yahoo.fr> wrote:
> Taking a look to this part:
> 4442 if ( nErrCode == ERRCODE_NONE )
> 4443 {
> 4444 p_EscherBlibEntry->meBlibType = ( eGraphicType
> == GRAPHIC_BITMAP ) ? PNG : EMF;
> 4445 aStream.Seek( STREAM_SEEK_TO_END );
> 4446 p_EscherBlibEntry->mnSize = aStream.Tell();
> 4447 pGraphicAry = (sal_uInt8*)aStream.GetData();
> 4448
> 4449 if ( p_EscherBlibEntry->meBlibType == WMF )
I think this should be EMF, before
0056fe28c7bd8e72cd5bdd335f098d00cd0d5d11, the code was like this:
// !EMF nErrCode = GraphicConverter::Export( aStream, aGraphic, ( eGraphicType == GRAPHIC_BITMAP ) ? CVT_PNG : CVT_WMF );
nErrCode = GraphicConverter::Export( aStream, aGraphic, ( eGraphicType == GRAPHIC_BITMAP ) ? CVT_PNG : CVT_EMF );
So WMF got changed to EMF, but then later the other WMF wasn't adopted.
> // the fileheader is not used
> 4450 {
> 4451 p_EscherBlibEntry->mnSize -= 22;
> 4452 pGraphicAry += 22;
> 4453 }
> 4454 }
However, if you change WMF to EMF here, then one wonders if you want to skip an
EMF header as well, and the answer is probably: not (and even if you want to do
that, the EMF header is not fixed size, so a constant 22 won't help there). So
I would just delete the dead code here.
Miklos
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20140423/bc038e27/attachment.sig>
More information about the LibreOffice
mailing list