Issue 119634 - [From Symphony]Shape shadow lost if load .doc file in AOO
Summary: [From Symphony]Shape shadow lost if load .doc file in AOO
Alias: None
Product: Writer
Classification: Application
Component: open-import (show other issues)
Version: 3.4.0
Hardware: PC All
: P3 Normal (vote)
Target Milestone: 4.0.0
Assignee: Oliver-Rainer Wittmann
QA Contact:
: 119563 (view as issue list)
Depends on:
Blocks: 120823
  Show dependency tree
Reported: 2012-05-31 08:34 UTC by Yan Ji
Modified: 2012-10-18 06:15 UTC (History)
7 users (show)

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

sample (23.50 KB, application/msword)
2012-05-31 08:34 UTC, Yan Ji
no flags Details
Patch for this issue (842 bytes, patch)
2012-08-21 12:08 UTC, Jianyuan Li
orw: review+
Details | Diff
A complete patch containing the first patch (2.17 KB, patch)
2012-09-17 03:12 UTC, Jianyuan Li
orw: review+
Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description Yan Ji 2012-05-31 08:34:03 UTC
Created attachment 77858 [details]

Build: AOO 3.4
Open sample file in AOO and compare with MS Office

Defect: Shape shadow lost in AOO
Comment 1 Jianyuan Li 2012-08-20 02:04:36 UTC
I am looking at this issue...
Comment 2 Armin Le Grand 2012-08-20 10:00:26 UTC
ALG: We do not (yet) support perspective shadow, except for 3D shapes. It's a missing feature.
Comment 3 Jianyuan Li 2012-08-20 12:37:11 UTC
Yes. But at least we want import the shadow color correctly.
Comment 4 Jianyuan Li 2012-08-21 12:07:18 UTC
Root cause: MS default shape shadow color(0x00808080, gray) is not consistent with  AOO Document shape shadow color(Black).
Resolution: When no shadow color property in MS shape(default), enforce a gray color for shape color when import.
Limitation: Some shadow in MS is not support by AOO. For them, current AOO behavior is importing them as the shadow AOO supports with distance 0 due to feature gap. In the fix, only shadow color is corrected.
Comment 5 Jianyuan Li 2012-08-21 12:08:14 UTC
Created attachment 79037 [details]
Patch for this issue
Comment 6 Jianyuan Li 2012-08-24 03:14:15 UTC
*** Issue 119563 has been marked as a duplicate of this issue. ***
Comment 7 Jianyuan Li 2012-09-06 03:35:19 UTC
I have provided a patch to fix the default shadow color issue.
Now it is marked as 3.4.1 blocker and you have assigned it to yourself. What's meaning? Do you want to fix the issue totally(In AOO implement the unsupported shadow type which exists in MS) with this bug?
Comment 8 Oliver-Rainer Wittmann 2012-09-06 06:38:19 UTC
@Jianyuan Li:
Sorry, I have forgotten to write a corresponding comment.
I have taken over this issue to review your patch.
Afterwards, we can decide how to proceed.
Comment 9 Jianyuan Li 2012-09-10 09:45:56 UTC
Do you have any comments for my patch/solution?
If no, please help commit the code. A long time has been past. Thanks.
Comment 10 Oliver-Rainer Wittmann 2012-09-10 09:51:54 UTC
I have assigned this issue to myself to indicate that I am volunteering to review the patch, because I am interested in this area. I have the review on my todo list. I expect that I will some resource this week to finish it.
Please stay tuned. Thx in advance.
Comment 11 Oliver-Rainer Wittmann 2012-09-14 09:48:32 UTC
Comment on attachment 79037 [details]
Patch for this issue

I finished my review of the patch.
The patch assures that the shadow color is set to the MS Word default one, as far as I can see.
Comment 12 Oliver-Rainer Wittmann 2012-09-14 09:51:47 UTC
As already stated, the patch is good for what it is intending.
For user this code change will have no visible effect - it still looks like as if the shadow is lost during import.

@Jianyuan Li: As we have a feature gap here regarding the shadow type, I propose to apply our default shadow distance in case such an unsupported shadow type is detected.
Is it possible to extend your patch?
If yes, please provide such an extended patch.
Comment 13 Armin Le Grand 2012-09-17 02:10:19 UTC
ALG: I agree with Oliver here, we should apply the AOO default shadow distance (it's 0,20cm to the bottom-right). To switch shadow on and have the correct shadow color but having no distance would be useless. It would render the invisible shadow and thus cost preformance ith no positive effect.
Comment 14 Jianyuan Li 2012-09-17 02:49:07 UTC
@Oliver & Armin,
I agree. I checked the default distance.
Presentation: Bottom -- 20cm  Right -- 20cm(0.08'')
Document & Spreadsheet: Bottom -- 30cm  Right -- 30cm(0.12'')
I want to use 30cm as default when import. Any comments?
Comment 15 Jianyuan Li 2012-09-17 03:12:22 UTC
Created attachment 79526 [details]
A complete patch containing the first patch
Comment 16 Jianyuan Li 2012-09-17 03:14:45 UTC
Please review the complete patch. In this patch, a default distance(0.12'') will be applied if the shadow type is not supported by AOO.
Comment 17 Jianyuan Li 2012-09-17 03:20:56 UTC
Actually there is a handling for unsupported shadow type distance before. I adjusted its position and did a little change.
Comment 18 Oliver-Rainer Wittmann 2012-09-17 06:27:07 UTC
taking over to review the patch
Comment 19 Oliver-Rainer Wittmann 2012-09-17 06:27:52 UTC
Comment on attachment 79037 [details]
Patch for this issue

replaced by new patch
Comment 20 Jianyuan Li 2012-09-17 06:54:26 UTC
An explanation for the patch:
AOO only support one kind of shadow type "shadowOffset". For others, AOO does not support. For MS shadow types(shadowDouble, shadowRich, shadowShape and so on), please refer to MS specification "[MS-ODRAW].pdf".
Comment 21 Oliver-Rainer Wittmann 2012-09-24 14:25:00 UTC
Comment on attachment 79526 [details]
A complete patch containing the first patch

review done.
patch looks good.
--> I will apply the patch on trunk.
Comment 22 Oliver-Rainer Wittmann 2012-09-24 14:40:00 UTC
applied patch on trunk, revision 1389406
Comment 23 Du Jing 2012-10-08 09:04:45 UTC
verified on the build AOO3.5_r1391367
Comment 24 Shenfeng Liu 2012-10-18 06:15:22 UTC
Update Target Milestone to AOO 3.5.0.