From 66c7dbbf7dfba8cfab63f8d1df72ace87e5bf7ca Mon Sep 17 00:00:00 2001 From: Lionel Elie Mamane Date: Fri, 19 Dec 2014 21:38:35 +0100 Subject: Don't assume that the ZOrder property of shapes is an enumeration ...at least when we can easily not assume it. shapes = shapes of the same XShapes an enumeration = it is the sequence 0, 1, 2, 3, ..., XShapes->getCount()-1 We replace the ZOrder property by the index of the XShape in the XShapes (the same XShapes that is passed to seekShapes()... when that is easy to find. Else, use ZOrder and hope for the best. ZOrders are not always an enumeration. For example, in documents (forms) created by the Base forms wizard, it is not the case. The wrong assumptions was leading to the following bugs in the Base form wizard: - Only the first two controls in the form were successfully saved. The others were just dropped. - Whereas the labels had the proper style (background and text colour) applied while creating the document, these were not saved successfully Change-Id: I15b9a3ef3b16eafa9698332e35d82d51d51627f8 --- xmloff/source/text/txtparae.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xmloff/source/text') diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index b2b6772d9293..9ad98920a93a 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -2874,7 +2874,7 @@ void XMLTextParagraphExport::exportAnyTextFrame( sal_Int32 nFeatures = addTextFrameAttributes( xPropSet, true ); GetExport().GetShapeExport() - ->exportShape( xShape, nFeatures ); + ->exportShape( xShape, -1, nFeatures ); } break; } -- cgit