Issue 125222 - embedded OLE object imported with wrong style from PPTX
Summary: embedded OLE object imported with wrong style from PPTX
Status: CLOSED FIXED
Alias: None
Product: Impress
Classification: Application
Component: open-import (show other issues)
Version: 4.1.0
Hardware: All All
: P3 Normal (vote)
Target Milestone: 4.1.1
Assignee: Armin Le Grand
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-08 12:22 UTC by szurketestver
Modified: 2017-05-20 10:35 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---
jsc: 4.1.1_release_blocker+


Attachments
Slide with embedded Excel sheet (55.18 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2014-07-08 12:22 UTC, szurketestver
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description szurketestver 2014-07-08 12:22:51 UTC
Created attachment 83658 [details]
Slide with embedded Excel sheet

The attached file was created with PowerPoint 2010. I inserted an Excel sheet as OLE object into the slide. In OpenOffice it is imported with Default style, which is not good, because the background fill color is blue instead of none. It should have been imported with "Object with no fill and no line".

The blue background is a regression from r1344740.

#119287# exchanged hard attributes for OLE and GraphicObject with new default StyleSheet for these objects
Comment 1 Armin Le Grand 2014-07-08 13:25:06 UTC
Indeed the object has correctly no fill or line style, but uses the default style which leads to being filled blue. This is identical in AOO411, AOO410, AOO401 and trunk. What AOO version is r1344740, could you please give the AOO version directly? Its AOO341 where it also gets the default style, but is not filled. Reason for this is that in former AOO versions OLEs and GraphicObjects got the default style, but their line and fill style was hard-wired to ignore that, so no graphic attributes were possible for those object types. OLEs and GraphicObjects should indeed use 'NoFillNoLine' as style as they do when you create/add one. For some reason this is not the case for the PPTX import.
Comment 2 Armin Le Grand 2014-07-08 13:42:38 UTC
The same should happen with pptx containing graphic objects, thus checked that. The object has no fill, no line and default as style. It still works, but somehow fill seems to be set as hard attributes, using 'format default formatting' shows the expected blue background. Checking where this is done (would be an alternative to do the same for OLEs)...
Comment 3 Armin Le Grand 2014-07-08 16:09:07 UTC
Could not find out where the background fill for the OLE is created; after quite some debugging I saw that the loaded bugdoc creates *two* objects, an OLE and a GraphicObject containing a metafile. The OLE is empty and shows the 'emptyole' symbol and is *not filled* as it should be, while for the graphic object the metafile itself contains the blue filled background. Argh!
Thus the error is some mechanism in the PPTX import that creates that metafile, not at the objects (which still could have the 'Object with no fill and no line' set as style, but get the correct no fill attribute already as hard attribute)
Comment 4 Armin Le Grand 2014-07-08 16:11:08 UTC
This also means that the OLE import in PPTX is not working - what it should create is one OLE with the correct content. The content is currently represented as metafile and lost (as it seems). Do we have a task for this?
Comment 5 Armin Le Grand 2014-07-08 16:47:51 UTC
The metafile is okay, but the graphic object containing it gets no default fill style as needed, probably because it's not a real object but a artificial one to get the OLE content visualized, so it probably will not get attributes read from the import file.
In any case in SdGenericDrawPage::_CreateSdrObject the correct default style has to be used for graphic and ole shapes, similar to SdrOle2Obj::SetPage and SdrGrafObj::SetPage, thus I will add and test that...
Comment 6 Armin Le Grand 2014-07-09 11:13:12 UTC
Note: Issue 125224 is similar and I guess OLE import was never added to PPTX, too. If then this should lead to a separate enhancement request; this task will correct the fill attributes/styles
Comment 7 Armin Le Grand 2014-07-09 11:17:20 UTC
Tested with changed SdGenericDrawPage::_CreateSdrObject, works as expected. It is an intended and needed change, it's about the place where the UNO API incarnates implementation objects for existing XShape UNO objects. In the cases I saw setting the style is not even needed - this is already done in object construction - but I will not risk that this is missing. As noted in the issue 119287 this will change in aw080 anyways since there SdrObjects will get a default style at construction time; adding a tagged (TTTT for aw080 changes) note there to adapt again when aw080 is ready...
Comment 8 Armin Le Grand 2014-07-09 11:51:22 UTC
Re-checked, looks good. Preparing commit...
Comment 9 Armin Le Grand 2014-07-09 11:59:14 UTC
Commited to trunk, done.
Safe fix (AFAIK), regression from AOO341. A candidate for AOO411. Requesting flag...
Comment 10 Armin Le Grand 2014-07-09 12:44:02 UTC
Upps, had wrong task-ID in commit, the commit message is (from issue 119287)
----------------------
"alg" committed SVN revision 1609118 into trunk:
i119287 corrected default style for draw objects created using UNO API
Comment 11 jsc 2014-07-10 06:14:33 UTC
grant showstopper flag
Comment 12 Armin Le Grand 2014-07-10 13:58:33 UTC
Added to branch AOO410, checked, works. Adapting target, committing there...
Comment 13 Armin Le Grand 2014-07-10 14:08:16 UTC
"alg" committed SVN revision 1609460 into branches/AOO410:
i125222 corrected default style for draw objects created using UNO API
Comment 14 Shenfeng Liu 2014-07-11 02:55:38 UTC
The fix is not in AOO 4.1.1 Milestone 2 build (1608452). So need to verify it in the next build.
Comment 15 fanyuzhen 2014-07-16 13:48:43 UTC
Per Juergen on July 16:
"The translation deadline is on July 18th and then a new milestone will be prepared.
I expect it being available mid of next week"
Comment 16 Rekha S 2014-07-23 19:11:06 UTC
Verified fixed on AOO 4.1.1 m3 build: 9772 
on Windows 8 

Now importing a excel table object from excel works as expected ,with no fill & no line!

Yuzhen, pls mark as verified .

Thanks
Rekha
Comment 17 fanyuzhen 2014-07-31 09:38:09 UTC
Thanks Rekha!
Marking it as verified