Issue 121371 - shape is lost on import of pptx
Summary: shape is lost on import of pptx
Alias: None
Product: Impress
Classification: Application
Component: open-import (show other issues)
Version: 4.0.0-dev
Hardware: PC Windows XP
: P3 Major (vote)
Target Milestone: 4.0.0
Assignee: Armin Le Grand
QA Contact:
Keywords: regression
Depends on:
Blocks: 121425
  Show dependency tree
Reported: 2012-11-19 22:32 UTC by Regina Henschel
Modified: 2013-07-12 16:30 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---

File with two rectangles and a straight connector between them (20.03 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2012-11-19 22:32 UTC, Regina Henschel
no flags Details
Proposed solution (6.62 KB, patch)
2012-11-28 17:30 UTC, Armin Le Grand
Armin.Le.Grand: review?
Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description Regina Henschel 2012-11-19 22:32:22 UTC
Created attachment 79927 [details]
File with two rectangles and a straight connector between them

Open attached document. It contains two rectangles with a straight connector line between them. When you open it, the rectangles are missing. If you use the Navigator, you see, that the rectangles are still there, but you cannot see them. If you save the file to odp-format and unzip it, you can see, that the path of the objects is missing.

If you open the file in AOO3.4.1 the shapes are there. [The connector is imported as simple line, but that is another issue.]
Comment 1 Regina Henschel 2012-11-20 17:17:18 UTC
The import is OK in version r1389055 and fails in version r1391405.
I work on WinXP.
Comment 2 Armin Le Grand 2012-11-21 17:07:20 UTC
ALG: Looks as if the render command in SdrObjCustomShape::GetSdrObjectFromCustomShape() is not able to produce geometry, needs to be checked.
Comment 3 Armin Le Grand 2012-11-28 17:30:30 UTC
Created attachment 79964 [details]
Proposed solution

ALG: Reason is that the 'Type' setting at the CustomShapeGeometryItem is overwritten in CustomShapeProperties::pushToPropSet when maShapePresetType.getLength() is true. This happens due to creating a completely new PropertySet and setting this as CustomShapeGeometry at the xShape, but without copying the 'type' which was already set from the XEnhancedCustomShapeDefaulter.
Attached is a proposed patch which sets the properties at the existing CustomShapeGeometry PropertySet. I think this is correct, but may someone take a look, please?
Comment 4 SVN Robot 2012-11-29 10:57:23 UTC
"alg" committed SVN revision 1415118 into trunk:
#121371# Do set values as planned, but do not override complete CustomShapeGe...
Comment 5 Armin Le Grand 2012-11-29 10:59:47 UTC
ALG: Okay, found a safer solution; now values to be set are added to the sequence of properties and that seq gets set when values were added and not only changed. Kept the other value changers untouched, only adapted those who were set hard (and overwriting) before.