Issue 111235 - embedded chart with graphic object is clipped
Summary: embedded chart with graphic object is clipped
Status: CLOSED FIXED
Alias: None
Product: Draw
Classification: Application
Component: viewing (show other issues)
Version: DEV300m77
Hardware: PC All
: P3 Trivial (vote)
Target Milestone: OOo 3.3
Assignee: wolframgarten
QA Contact: issues@graphics
URL:
Keywords: regression
: 110089 (view as issue list)
Depends on:
Blocks:
 
Reported: 2010-04-28 19:02 UTC by Joe Smith
Modified: 2010-12-15 15:35 UTC (History)
2 users (show)

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


Attachments
Sample document showing problem (19.08 KB, application/vnd.oasis.opendocument.spreadsheet)
2010-04-28 19:03 UTC, Joe Smith
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Joe Smith 2010-04-28 19:02:29 UTC
Tested in Fedora Linux 11.

A spreadsheet with an embedded chart renders correctly, but if I paste in a
drawing object, the chart rendering is clipped at the left edge of the inserted
object.

The chart+object are rendered correctly when the chart is active, but not when I
de-activate the chart and return to the spreadsheet.

The chart+object are rendered correctly in both states by OOo 3.2.0 and OOO300_m16.
Comment 1 Joe Smith 2010-04-28 19:03:09 UTC
Created attachment 69164 [details]
Sample document showing problem
Comment 2 IngridvdM 2010-04-29 15:22:42 UTC
I can confirm the problem on windows too: Load the attached document. Activate
and deactivate the chart and look at the meta file replacement -> Parts of the
chart are clipped away dependent on the position of the blue note.
The problem did not occur within dev300m67. But it does occur on dev300m69.
(Couldn't check m68).
@AW, please have a look at this issues as CWS aw078 was integrated into
dev300m69 changing a lot around metafiles with issue 106541 and issue 106379.
It seems as if a clipping region is not removed properly after 'visualizing' the
callout.
Comment 3 Armin Le Grand 2010-05-06 16:39:32 UTC
AW: Checked, happens as described. Added to CWS aw081.
Comment 4 Armin Le Grand 2010-05-10 14:32:13 UTC
AW: There is not a single MetaClipRegionAction created when chart produces the
metafile, so it has to be something different. Checking back-transformation to
primitive sequence...
Comment 5 Armin Le Grand 2010-05-10 14:36:12 UTC
AW: Definitely has to do with MetafilePrimitive2D::create2DDecomposition. When
avoiding it by forcing VclPixelProcessor2D to use metafile directly, the
clipping does not happen. Checking deeper...
Comment 6 Armin Le Grand 2010-05-10 15:24:55 UTC
AW: The clip is created from the GraphicExporter that ChartView::getMetaFile
uses to get the metafile. This is done with and without the graphic object,
using the same values. still, when painting, a different clip is created. Hmmm....
Comment 7 Armin Le Grand 2010-05-11 16:37:33 UTC
AW: Found the reason now, it's pretty complex. The new interpreter to translate
metafiles to sequences of primitives used in the decomposition implementation of
the Metafile primitive uses stacks to hold created primitives and a
PropertyHolder for the current status (replacement for OutDev state). Of course
a ClipRegion coming along the Metafile cannot be applied at the time
interpreting it; it needs to be remembered in the state, all MetaActions coming
have to be interpreted, and when the ClipRegion changes (or Metafile is at end)
the created primitives get embedded to the current ClipRegion.
All this is correct and works well, but the transformation (AKA MapMode for
Metafiles) used to interpret the ClipRegion at the point in time it gets used
may be wrong; it's no longer in the state when the clip action came along, but
may have undergone any stacked changes during interpreting the other content.

There are two solutions:
(a) Remember the Tranformation with each ClipRegion in the state at the time the
CLipAction comes along
(b) Trasform the ClipRegions when they come along immediately with the current
transformation

Of couse (b) is the better solution, but it requires complete usage of
B2DPolygons as ClipPolygons in the process. This includes MetaFile actions which
modify the current active ClipRegion. For this i still used the old Regions, but
already internally clipped against PolyPolygons. This is a good pint to change
all this to PolyPolygons...
Comment 8 Armin Le Grand 2010-05-11 16:39:58 UTC
AW: Adapted all codce accordingly, works as expected. Need to do some more tests
since it's at a critical part...
Comment 9 Armin Le Grand 2010-05-11 18:20:14 UTC
AW: Added small change to META_MOVECLIPREGION_ACTION. Checked in, done.
Comment 10 Armin Le Grand 2010-05-28 11:37:54 UTC
AW: Checked in CWS aw081, works as expected.
AW->WG: Please verify.
Comment 11 wolframgarten 2010-06-02 10:04:41 UTC
Verified in CWS.
Comment 12 Joe Smith 2010-06-21 20:44:45 UTC
Testing "OOo-dev 3.3  300m83(Build:9511)" on Fedora Linux 13

No clipping in sample document now.

The new "graphic editing in charts" feature looks great also.

Thanks!
Comment 13 wolframgarten 2010-06-22 07:42:15 UTC
Closed.
Comment 14 thomas.benisch 2010-12-15 15:35:31 UTC
*** Issue 110089 has been marked as a duplicate of this issue. ***