Issue 68300 - bogus scaling / size on load ...
Summary: bogus scaling / size on load ...
Status: ACCEPTED
Alias: None
Product: Impress
Classification: Application
Component: code (show other issues)
Version: 680m179
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-09 18:04 UTC by mmeeks
Modified: 2013-08-07 15:20 UTC (History)
4 users (show)

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


Attachments
question ? :-) (41.00 KB, application/vnd.ms-powerpoint)
2006-08-09 18:05 UTC, mmeeks
no flags Details
added the extracted graphic (390 bytes, image/bmp)
2006-08-16 15:54 UTC, sven.jacobi
no flags Details
proposed patch (2.53 KB, application/msword)
2006-11-14 14:23 UTC, radekdoulik
no flags Details
cropped ole object that is not working properly when using the VisualAreaSize (1.19 MB, application/vnd.ms-powerpoint)
2006-11-17 15:20 UTC, sven.jacobi
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description mmeeks 2006-08-09 18:04:35 UTC
So - the OLE object (perhaps just the preview?) is rendered at the wrong size
here - the text is tiny.

Of course MSO renders it nicely, but interestingly if you in-place activate the
object, and save again - MSO appears to 'correct' the file too (somehow) -
hiding the issue.

Any hints on where to dig in the code ? do you have tools to split out the WMF
preview to see if it's at fault ?
Comment 1 mmeeks 2006-08-09 18:05:32 UTC
Created attachment 38374 [details]
question ? :-)
Comment 2 wolframgarten 2006-08-10 07:45:24 UTC
Reproducible. Reassigned.
Comment 3 sven.jacobi 2006-08-16 15:54:19 UTC
Created attachment 38558 [details]
added the extracted graphic
Comment 4 sven.jacobi 2006-08-16 15:56:00 UTC
accepted
Comment 5 radekdoulik 2006-10-23 15:28:43 UTC
looking at the problem, it looks like the wrong size comes from client anchor in
SvxMSDffManager::ImportShape. it can be corrected in impress by using "Original
Size" item from popup menu.

sj, does it ring a bell? is there any documentation where I can read about
child/client anchor and ole object size handling?
Comment 6 sven.jacobi 2006-10-23 16:27:28 UTC
After looking a bit closer to the problem I found out that we do not have a
problem with client/child  anchors, instead the problem is that we do not
support cropped OLE objects.
Comment 7 radekdoulik 2006-10-23 19:34:03 UTC
Indeed, looks like it. I played with it in MS office and the anchor (bounding
box?) looks OK - it has the same size.

In MSO the anchor rectangle is used as bounding box for the rendering of
embedded object. Once you edit the object it behaves weird as it rescales the
embedded object to the anchor rectangle and keeps it that way. Interestingly
enough when saved and loaded again, it uses it as bounding box until edited
again. So before the rendered output before saved and after save/load looks
differently.

Not sure why it behaves that way, I guess it might be an incompatibility between
various MSO versions?

I will look more into the embedded object code. It takes me ages though as I
don't know much that code yet.

I am also completely unaware about OLE objects. Any hint where I can read about
embedded OLE objects and how they are stored in streams/on disk?

Comment 8 radekdoulik 2006-10-24 11:03:36 UTC
What I described happening in MSO might be the same MSO problem as this one:
http://support.microsoft.com/kb/165723 (just the opposite direction: embedding
word in ppt)
Comment 9 sven.jacobi 2006-10-24 11:17:37 UTC
sj->radek: If you want to know something about the ole code, you should ask mav,
he was responsible for the new ole implementation which can be found in
embedserv & embeddedobj.
Comment 10 radekdoulik 2006-11-14 14:23:18 UTC
Created attachment 40567 [details]
proposed patch
Comment 11 radekdoulik 2006-11-14 14:27:42 UTC
I have a patch which crops ms ole objects. Not sure yet though whether we should
crop always or not.
Comment 12 sven.jacobi 2006-11-15 12:46:06 UTC
sj->radek: I just tested your patch, it works good for the attached bugdoc, but
it does not work for most other cropped OLE objects. Another sideeffect is that
you can't scale OLE objects any longer. Due to this reasons I suggest not to
integrate your patch.

I think the OLE object must be able enabled to store additional cropping data,
therefore we have to enhance the file format, it is the same we have in Issue 67705.
Comment 13 radekdoulik 2006-11-15 12:57:36 UTC
sj: could you please attach some other examples where it doesn't work?

Do you know how to say whether OLE object is cropped or not?
Comment 14 sven.jacobi 2006-11-17 15:13:17 UTC
sj->radek: sorry for the long delay, but I was very busy the last days.

Cropping is a drawing shape feature and is not supported by OLE objects, so if a
OLE object is cropped is determined by following properties of the OLE shapes
msofbtOPT atom:

Prop_cropFromTop
Prop_cropFromBottom
Prop_cropFromLeft
Prop_cropFromRight


I added a example that is not working properly when applying the VisualAreaSize
of the OLE object as it is done in your patch.
So the general question exists further on, and as long as nobody knows for sure
when to use the VisualAreaSize scaling, it seems to be better not to use this size.
Comment 15 sven.jacobi 2006-11-17 15:20:29 UTC
Created attachment 40659 [details]
cropped ole object that is not working properly when using the VisualAreaSize
Comment 16 flr 2006-12-01 15:26:41 UTC
In my opinion the problem has to do with the replacement graphic. It's an WMF
file which is treaten different in PP and Impress when scaling is applied.

Had a short chat with thb about that and he beleives that its a "misfeature" in PP.

The problem here is that the WMF (attached as dbggfx0.wmf) is interpreted
differently by various tools.

E.g. the "windows picture and fax viewer" displays a width of 406pixel and a
height of 1011 pixel.

However e.g. the "Microsoft Picture Manager" displays a width of 1680pixel and a
height of 1050 pixel.

OOo seems to take the 1680x1050 size whereas PP takes the 406x1011 size for display.

I believe this is why scaling is different.

So --- I haven't yet figured out where the different values come from.

sj => Do you have a suggestion where the different values could come from?

Comment 17 clippka 2007-05-10 10:19:24 UTC
changing issue type back to defect as no working patch is available
Comment 18 Martin Hollmichel 2007-11-09 17:17:33 UTC
set target from 2.x to 3.x according to
http://wiki.services.openoffice.org/wiki/Target_3x