Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Hi Bubli,

thanks for the patch! I didn't realize that the code is also used by
other parts of OOXML export and that it will fire exception in the case
the property is missing for calc and writer objects.

The patch looks good, but I think you should keep the test whether >>=
operator succeeded. Like:

                if (xPropSet->getPropertyValue( S( "IsEmptyPresentationObject" ) ) >>= 
bIsEmptyPresObj) {
                       DBG(printf("empty presentation object %d, props:\n", bIsEmptyPresObj));
                       if( bIsEmptyPresObj )
                           return sal_True;
                }

and similar for the other test.

Cheers
Radek

On Wed, 2011-05-04 at 08:42 +0200, Katarina Machalkova wrote:
Hey there, 

can some1 please review the attached patch for 3.4?  Export of xlsx docs 
containing images or charts (GraphicObjectShape) fails with generic "cannot 
write" error (there is no particular bug id. associated with the issue so far 
... but I didn't search fdo bugzilla so well)

The problematic code is introduced by commit b49d4405f4a8919. I haven't even 
remote clue what is it supposed (not) to be doing, more specifically why an 
attempt to retrieve value of non-existing property 
('Is[Empty]PresentationObject') throws an exception and/or why the object in 
question doesn't have the mentioned property. There is handful of places where 
property value is being retrieved without  prior checking all over the code.

Anyway, the patch seems to do the job (the spreadsheet with imgs is saved as 
xlsx) and moreover, a similar trick is used in xmloff module 
(source/draw/shapeexport2.cxx, XMLShapeExport::ImpExportPresentationAttribute 
method)
Thx

B.
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

-- 
Radek Doulík <rodo@novell.com>
Novell, Inc.


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.