Issue 119450 - [From Symphony]The image OLE's icon doesn't display correctly in Aoo3.4
[From Symphony]The image OLE's icon doesn't display correctly in Aoo3.4
Status: VERIFIED FIXED
Product: Impress
Classification: Application
Component: ui
3.4.0
PC All
: P3 normal (vote)
: 4.0.0
Assigned To: AOO issues mailing list
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-28 09:03 UTC by Du Jing
Modified: 2012-12-26 08:20 UTC (History)
5 users (show)

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


Attachments
sample file (22.06 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2012-05-28 09:03 UTC, Du Jing
no flags Details
Patch for this issue (2.93 KB, patch)
2012-07-26 08:46 UTC, Jianyuan Li
lijianyuan1983: review?
Details | Diff
Activated OLE (38.46 KB, image/jpeg)
2012-07-27 11:54 UTC, Jianyuan Li
no flags Details
Screenshot of opened sample document from Description (53.74 KB, image/jpeg)
2012-07-27 12:06 UTC, Armin Le Grand
no flags Details
UT file for this issue (538.16 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2012-07-27 14:11 UTC, Jianyuan Li
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Du Jing 2012-05-28 09:03:25 UTC
Created attachment 77634 [details]
sample file

Build Version: AOO3.4_1327774

Steps:
1. Open the sample file in AOO3.4
2. Check the OLE's icon in the document.
Defect : The OLE's icon doesn't display correctly , only text can display.
Comment 1 Du Jing 2012-07-13 02:45:18 UTC
change its status~
Comment 2 Jianyuan Li 2012-07-24 01:45:20 UTC
I am investigating this issue.
Comment 3 Jianyuan Li 2012-07-26 08:41:48 UTC
Root Cause:
For emf file, there is one type named "alpha blend". But in our codes,we didn't translate this type, so its bitmaps will not be displayed.
Resolution:
According the format structure description in MSDN, translate this type, and get the image to display.
Comment 4 Jianyuan Li 2012-07-26 08:46:58 UTC
Created attachment 78741 [details]
Patch for this issue
Comment 5 Armin Le Grand 2012-07-27 11:38:22 UTC
ALG: The sample file from description contains a Bitmap, not an OLE. Is this the wrong sample file?
Comment 6 Jianyuan Li 2012-07-27 11:53:34 UTC
(In reply to comment #5)
> ALG: The sample file from description contains a Bitmap, not an OLE. Is this
> the wrong sample file?
It is an OLE and can be activated. Please see the attachment "Actived OLE.jpg"
Comment 7 Jianyuan Li 2012-07-27 11:54:16 UTC
Created attachment 78755 [details]
Activated OLE
Comment 8 Armin Le Grand 2012-07-27 12:06:24 UTC
Created attachment 78756 [details]
Screenshot of opened sample document from Description

ALG: Sorry, maybe I do not get it, but I see the following after opening the example and selecting the object with one mouse klick. It is a graphic object (see the toolbars shown). Doublecklicking will activate text input (text for graphic object).
How do You activate it as OLE...?
Comment 9 Armin Le Grand 2012-07-27 12:34:30 UTC
ALG: Tried to apply the patch, I get 'double value in switch' since EMR_ALPHABLEND is indeed double; it needs to be removed from the #ifdef WIN_MTF_ASSERT path to make the non-pro build work.
Comment 10 Regina Henschel 2012-07-27 13:20:28 UTC
It is an OLE object in Excel. But when you open the file in AOO, it is no longer an OLE object. I see the same problem with an MathType OLE in an xlsx-file. It is not imported as OLE but replaced with a picture. If I save it as xls in Excel and open that file in AOO, the OLE object is still an OLE object.
I do not understand "The OLE's icon doesn't display correctly", but I think an OLE object should be imported as OLE object and not substituted by something.
Comment 11 Armin Le Grand 2012-07-27 13:37:21 UTC
ALG: Thanks Regina. This looks like we first need to fix the .xlsx importer to cerate OLE2 (maybe done in Symphony?) before we can fix this task (?).
Comment 12 Armin Le Grand 2012-07-27 13:40:01 UTC
ALG: Tried in Lotus Symphony 3 (Release 3.0.0 FP3), also imports as a graphic object. @Jianyuan Li: What did you use to import it as OLE? Which Office and which version?
Comment 13 Jianyuan Li 2012-07-27 14:10:31 UTC
@Armin:
Just as Regina said, it is an OLE in Excel. After it is imported in AOO/Symphony, it will become into a graphic. This is current situation for AOO/Symphony OLE import. It should be fixed later.
But this will not impact the patch is checked in for this issue. Because this fix still works when the OLE is correctly imported. Please see sample file "Another OLE.xlsx". The OLE and its icon can be imported correctly by AOO. And its icon type is EMR_STRETCHBLT which is similar to EMR_ALPHABLEND.
Comment 14 Jianyuan Li 2012-07-27 14:11:26 UTC
Created attachment 78758 [details]
UT file for this issue
Comment 15 SVN Robot 2012-07-27 15:01:43 UTC
"alg" committed SVN 0 into trunk:
#119450# Added EMR_ALPHABLEND case to EnhWMFReader to correct visualisationsP...
Comment 16 Armin Le Grand 2012-07-27 15:05:13 UTC
ALG: Thanks Jianyuan Li, I have now adapted the patch and built. With it, the graphic is shown as intended. Also looked at the code.
Comitted change as 0, done.
Comment 17 Jianyuan Li 2012-07-27 15:07:04 UTC
Thanks Armin and Regina.
Comment 18 liuping 2012-08-20 06:48:20 UTC
Verified pass on Windows7-64bit, Redhat 32bit,ubutu 10.04 Mac10.7 with AOO trunk 0