[Libreoffice] [PATCH] Export of docs with images/charts into xlsx (possibly pptx)

Radek Doulík rodo at novell.com
Wed May 4 02:03:05 PDT 2011

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.


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 at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libreoffice

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

More information about the LibreOffice mailing list