summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorumeshkadam <umesh.kadam@synerzip.com>2014-01-31 15:09:09 +0530
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-02-13 14:19:08 +0100
commit515b5c7688631679fe1d39932478a835dc0a35a2 (patch)
tree6b56af3fc30ce3f7ecfad650403a12c6b9bd53e0 /oox
parentf87e78a777c975451b839d9dae6b723db7d040cd (diff)
fdo#74110 : Issue with <a:prstGeom prst="rect"> tag in document.xml
Issue: - While exporting the system used to write adjustment values for preset shape type "rect" in document.xml with the shape guide name(adjustment name) being empty. - This is not accepted by MS Office. Hence the file was resulting as corrupt. Implementation: - The preset shapes are being picked up from GetOOXMLPresetGeometry(), which refers pCustomShapeTypeTranslationTable[] array for the mapping. - Most of the shape types have been commented in the pCustomShapeTypeTranslationTable[] array therefore the GetOOXMLPresetGeometry() defaults the shapetype as rect, whereas the adjustment values are being picked up for the actual shape type(s). - Uncommenting the commented shape type translations( for instance textInflateTop) in pCustomShapeTypeTranslationTable will eventually write prst="textInflateTop" under the tag prstGeom which is invalid. - It should probably go under prstTxWrap. - In order to avoid the corruption, thought of adding a check before writing the adjustment values. If the shape type is "rect"( which is defaulted and does not have adjustment values defined in presetShapeDefinitions.xml) then avoid writing the adjustment values under this tag. Conflicts: oox/source/export/drawingml.cxx sw/qa/extras/ooxmlexport/ooxmlexport.cxx Reviewed on: https://gerrit.libreoffice.org/7765 Change-Id: I6511e9a3ee0c01962d6e82997705a484161086ef
Diffstat (limited to 'oox')
-rw-r--r--oox/source/export/drawingml.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index a96ecdd9b7eb..3e869854adcf 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -1723,6 +1723,7 @@ void DrawingML::WritePresetShape( const char* pShape, MSO_SPT eShapeType, sal_Bo
if ( ( rProp.Value >>= aAdjustmentSeq )
&& eShapeType != mso_sptActionButtonForwardNext // we have adjustments values for these type of shape, but MSO doesn't like them
&& eShapeType != mso_sptActionButtonBackPrevious // so they are now disabled
+ && OString(pShape) != "rect" //some shape types are commented out in pCustomShapeTypeTranslationTable[] & are being defaulted to rect & rect does not have adjustment values/name.
) {
DBG(fprintf(stderr, "adj seq len: %d\n", int( aAdjustmentSeq.getLength() )));
if ( bPredefinedHandlesUsed )