Issue 98331 - crop information is not saved and not read on loading
Summary: crop information is not saved and not read on loading
Status: CLOSED FIXED
Alias: None
Product: Draw
Classification: Application
Component: save-export (show other issues)
Version: DEV300m39
Hardware: PC Windows XP
: P3 Trivial (vote)
Target Milestone: OOo 3.1
Assignee: wolframgarten
QA Contact: issues@graphics
URL:
Keywords: needmoreinfo, oooqa
: 98563 (view as issue list)
Depends on:
Blocks:
 
Reported: 2009-01-21 22:00 UTC by Regina Henschel
Modified: 2009-02-20 13:51 UTC (History)
2 users (show)

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


Attachments
picture to test the bug (23.28 KB, image/jpeg)
2009-01-22 13:30 UTC, Regina Henschel
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Regina Henschel 2009-01-21 22:00:48 UTC
Insert a picture (bitmap).
Crop it to half of the width.
Save the document.
Open the document.
Notice that the whole picture is compressed to fit the size, which the cropped
on had.
Looking in the properties shows, that cropped is set to 0.

Unzipping the file shows, that the attribute fo:clip="rect(...)" is missing.

If you open a file with a cropped picture, which contains this attribute, the
errors occurs too, so as if the crop information is not read.

You see the error in all modules, but I think it is a graphic problem.

The error do not occur in OOoDEVm37. I havn't got m38 to test it there.
Comment 1 Rainer Bielefeld 2009-01-22 06:35:09 UTC
I checked with "Ooo 3.0.0 (DE) Multilingual version German UI WIN XP: [OOO300m9
(Build9358)]" and it seems that I can NOT confirm the reported effect. Or may be
the problem is sensitive to the steps how I tried to reproduce or I do not
understand the problem? I did not check  attribute fo:clip="rect(...)"

Steps to reproduce:
0. Genereate a "Smiley.bmp" 100x100mm using DRAW
1. open new .odg and save as "crop300_00.odg"
2. Menu 'Insert -> Picture -> From file -> "Smiley.bmp"'
3. Save as "crop300_01.odg"
4. Right click on image, 'Crop picture -> left 50mm -> (keep scale)' <ok>
5. Save as "crop300_02.odg"
6. Close and reopen document
7. Right click on image, 'Crop picture'
   expected: Half Smiley visible, pane "crop left" should contain "50mm"
   actual: as expected
8. Modify 'Crop picture -> left 0,0mm' (from 50mm) <ok>
   expected: complete smiley with old size at old place
   actual: as expected
Comment 2 wolframgarten 2009-01-22 07:56:05 UTC
Duplicate.

*** This issue has been marked as a duplicate of 95968 ***
Comment 3 wolframgarten 2009-01-22 07:56:42 UTC
Closed.
Comment 4 Regina Henschel 2009-01-22 09:04:48 UTC
I do not think, that it is duplicate. Issue 95968 said, that it is fixed in m39,
but I see the error in m39. And this issue is not about wrong display. The
display is right, when you crop the picture. But the information, that the
picture is cropped, is not saved.
Comment 5 jmpoo 2009-01-22 09:14:01 UTC
Checked with OOo 3.1 m39, English with German languagepack, Win XP.
Same behavior as described by regina. M39 can´t save rastergrafics correct, so I
used an existing one and try it once more with a jpeg.

Open new draw-file
Insert picture
Use crop-feature 
save as odg
reopen
no cropped picture, source picture fills the whole crop area (wich have correct
croped size).

In addition:
copy the croped picture to the clipboard and paste it into a Writer-Dokument
(rightclick - paste). The size of the crop-frame is correct but the whole
Picture is inserted (compressed).

Using the Insert-Button-Menu and insert as “Bitmap†or “GDI Metafile†works
well, only “Drawing Format†fails.

So I agree with Regina, it´s not a duplicate of issue 95968 and it´s not fixed!
Comment 6 wolframgarten 2009-01-22 09:17:40 UTC
Sorry, not reproducible. Please attach a bitmap where this happens and a
detailed step by step description. Do you crop with handles or with dialog? How
do you insert the picture? Thanks.
Comment 7 Regina Henschel 2009-01-22 13:30:17 UTC
Created attachment 59592 [details]
picture to test the bug
Comment 8 Regina Henschel 2009-01-22 13:32:29 UTC
1. Start a new Draw document.
2. Insert > Picture > From File. Choose the attached picture "rose.jpg". Do not
link it.
3. Click on picture. Status bar shows "Bitmap selected". Picture toolbar should
open.
4. Click on crop tool in picture toolbar.
5. Drag the left middle handle towards right till the picture is about half of
its original width. You see a half rose and a portrait picture format.
6. Click besides the picture to deselect it.
7. File > Save, for example to "croptest.odg"
8. Close document.
9. Click on "Open document", choose "croptest.odg".
Look at the picture. You see the whole rose compressed into the place of the
cropped half picture.

I use english OOoDEVm39 build 9378 without language pack, installed from file
OOo-DEV_DEV300_m39_Win32Intel_install_en-US.exe, downloaded from
http://download.openoffice.org/300/index.html.

Same bug, if insert the picture via clipboard. In that case use the item
'Bitmap' from the list of the insert button.

Same bug, if you crop the picture via the crop tab in the property dialog of the
picture.

Same bug, when inserting the picture in a Writer, Calc or Impress document.

Same bug, if you use png-picture.

@rainerbielefeld: This is a bug in m39(=build 9378), but not in OOo3.0 (=build
9358). Please use the newest developer version to test it.
Comment 9 wolframgarten 2009-01-22 13:57:28 UTC
Ok, thanks for the info. Now I can reproduce it - Magic.
Comment 10 groucho266 2009-01-22 14:34:49 UTC
@SJ: Please take over.
Comment 11 sven.jacobi 2009-01-22 16:10:32 UTC
I can reproduce this problem, maybe issue 95968 is involved.
Comment 12 Rainer Bielefeld 2009-01-22 16:36:10 UTC
@Regina:
Really only DEV300m39, not also M9 as selected in version picker? Pls. check
Version! 
I can't reproduce the problem with "Ooo 3.1 Multilingual version English  UI WIN
XP: [DEV300m36 (Build 9369)]", there the crop feature has several other damages,
but not this one.

And yes, you are right, I really should install the latest DEV version!
Comment 13 Regina Henschel 2009-01-22 17:00:41 UTC
Change version to DEV300m39, where I found it. I had selected the wrong version,
sorry, my fault.
Comment 14 sven.jacobi 2009-01-26 14:28:17 UTC
this issue has been fixed now in xmloff/inc/xmloff/xmltypes.hxx, two properties
defining the same value..
Comment 15 sven.jacobi 2009-01-30 09:24:50 UTC
*** Issue 98563 has been marked as a duplicate of this issue. ***
Comment 16 sven.jacobi 2009-02-03 11:00:29 UTC
This issue is ready to be verified in cws[impress167]
Comment 17 wolframgarten 2009-02-04 13:02:21 UTC
Verified in CWS.
Comment 18 wolframgarten 2009-02-20 13:51:53 UTC
Tested in OOO310_m2. Closed.