[Libreoffice] [PUSHED, partial][PATCH] Refactoring for WMF Loading
Marc-André Laverdière
marc-andre at atc.tcs.com
Tue Oct 4 01:34:45 PDT 2011
Based on Caolan's comments, here's another attempt at doing things right.
I'm unable to test right now (some symlink problem)... please don't push
right away :)
Marc-André Laverdière
Software Security Scientist
Innovation Labs, Tata Consultancy Services
Hyderabad, India
On 09/27/2011 06:25 PM, Caolán McNamara wrote:
> On Fri, 2011-09-23 at 16:36 +0530, Marc-André Laverdière wrote:
>> Hello everybody.
>>
>> Here is a patch from the "I have no idea what I'm doing" department.
>
> 0001 looks good to me anyway, pushed now, sorry for the delay.
>
> 0002 looks a bit more dubious, broad stroke fine, but isn't it the case
> that....
>
> +template <class T, class Drawer>
> +void EnhWMFReader::ReadAndDrawPolygon(Drawer drawer, const sal_Bool
> skipFirst)
> +{
> + sal_uInt16 nPoints ...
>
> i.e. new code here has a 16bit value read from disk, while the old code
> appears to be a 32bit value. I know it gets casted to 16bits, but it
> would affect how much gets read from the stream.
>
> ...
>
> EnhWMFReader::ReadEnhWMF
>
> ... sal_uInt32 nPoints ...
>
> case EMR_POLYBEZIER :
> - {
> - pWMF->SeekRel( 16 );
> - *pWMF >> nPoints;
>
>> P.S. I am not sure how to really test this... I just ran make -sr :)
>
> yeah, that'll run the basic sanity wmf loader tests anyway. If you grab
> some .wmf's and just open them in draw that's another test-scenario,
> e.g. libwmf might have a selection if we don't have any already.
>
> C.
>
> _______________________________________________
> LibreOffice mailing list
> LibreOffice at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libreoffice
>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-Refactoring-drawing-of-polygons-and-polypolygons-in-.patch
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20111004/a20a1d50/attachment.asc>
More information about the LibreOffice
mailing list