Issue 100684 - Incorrect contour handling of shapes after opening a document
Incorrect contour handling of shapes after opening a document
Status: CLOSED FIXED
Product: Writer
Classification: Application
Component: formatting
OOo 3.1.1
All All
: P3 trivial with 2 votes (vote)
: 4.0.0
Assigned To: Oliver-Rainer Wittmann
issues@sw
:
: 118859 (view as issue list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-03-30 16:01 UTC by andi_
Modified: 2013-07-10 14:58 UTC (History)
4 users (show)

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


Attachments
Sample document - change the font size to see the effect (19.85 KB, application/vnd.oasis.opendocument.text)
2009-03-30 16:02 UTC, andi_
no flags Details
Incorrect wrapping of sample document (52.68 KB, application/pdf)
2009-03-30 16:04 UTC, andi_
no flags Details
Similar behaviour for other (simple) shapes - change font size or open print preview to see the effect (18.60 KB, application/vnd.oasis.opendocument.text)
2011-07-10 10:48 UTC, andi_
no flags Details
Minimal test case (open print preview or change font size to see the effect) (19.85 KB, application/vnd.oasis.opendocument.text)
2012-01-08 12:30 UTC, openoffice
no flags Details
proposed patch (already used in LibreOffice) (1.08 KB, patch)
2012-05-25 23:12 UTC, openoffice
orw: review+
Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description andi_ 2009-03-30 16:01:52 UTC
When opening a document containing a filled bezier path drawing, 
the text is correctly wrapped around the contour of the drawing.
When changing the text (e.g. font size), the text wraps around 
another "virtual" contour that is different from the contour of the
drawing.

The text is wrapped correctly again after saving and reloading the 
document, or after disabling and re-enabling the "wrap->contour" 
property.
Comment 1 andi_ 2009-03-30 16:02:54 UTC
Created attachment 61282 [details]
Sample document - change the font size to see the effect
Comment 2 andi_ 2009-03-30 16:04:27 UTC
Created attachment 61283 [details]
Incorrect wrapping of sample document
Comment 3 michael.ruess 2009-04-01 14:06:20 UTC
MRU->OD: I was only able to reproduce this on WinVista, XP or Linux were OK.
Open attached document, select all, set font size to 10 -> the contour is wrong.
Comment 4 andi_ 2009-10-31 10:30:25 UTC
This also happens with Windows 7.
(I don't know how to set two OS versions or Windows >= Vista in the OS field)
Comment 5 andi_ 2009-11-06 09:13:04 UTC
Easier steps to reproduce: 
Open attached document, click "page preview" -> contour is wrong

Further steps: 
Open context menu of drawing, select Wrap -> Page wrap (which is already
checked), and the contour is correct again.
Save the document and open it again -> contour is wrong again in page preview.

I could reproduce this behaviour on Windows Vista, Windows 7 and Ubuntu Linux.
Comment 6 andi_ 2011-07-10 10:48:38 UTC
Created attachment 76682 [details]
Similar behaviour for other (simple) shapes - change font size or open print preview to see the effect

The same problem also appears when using simple (polygon) shapes. 

Steps to reproduce: 
- Open testcase2.odt
- Open print preview

Expected result: 
- Text flows correctly right of the triangle.

Actual result: 
- A part of the text appears inside the triangle.

Changing the triangle (fill colour, wrapping) corrects the text wrapping 
(until the document is closed and re-opened).
Comment 7 openoffice 2012-01-08 12:30:55 UTC
Created attachment 77108 [details]
Minimal test case (open print preview or change font size to see the effect)

The effect even occurs with a single box shape.

When switching to page preview or changing the font size of the text, the text
wraps around an area left of the box shape (leaving a white box there). 

The distance between the box shape and the white box depends on the amount of
(gray) margin shown left of the page (so the problem does not occur if the zoom
level is so big that the page fills the entire screen). The white box even
moves when changing the zoom level and re-entering page preview.

The problem occurs when opening OpenDocument and Word files (so is no pure
OpenOffice import problem), and can be fixed by changing the box (e.g. fill
style, wrapping, position) or re-loading the file (File->Reload; Close and Open
does not work) - but the problem will reappear next time opening the file.
Comment 8 openoffice 2012-05-25 23:12:03 UTC
Created attachment 77602 [details]
proposed patch (already used in LibreOffice)

This patch should solve the issue.
Comment 9 Ariel Constenla-Haile 2012-05-26 00:50:38 UTC
(In reply to comment #8)
> Created attachment 77602 [details]
> proposed patch (already used in LibreOffice)
> 
> This patch should solve the issue.

Can you confirm your patch is submitted under the Apache License v. 2.0?
If so, please change the issue type to PATCH.
Comment 10 Oliver-Rainer Wittmann 2012-06-25 12:49:12 UTC
(In reply to comment #9)
> (In reply to comment #8)
> > Created attachment 77602 [details]
> > proposed patch (already used in LibreOffice)
> > 
> > This patch should solve the issue.
> 
> Can you confirm your patch is submitted under the Apache License v. 2.0?
> If so, please change the issue type to PATCH.

putting patch submitter on CC in order to assure that Ariel's question is received.
Comment 11 openoffice 2012-06-25 13:50:24 UTC
The patch is licensed under Apache License v. 2.0

Not being logged in as the initial reporter (andi_@openoffice.org was my old account), I don't seem to be able to change the issue type to PATCH.
Comment 12 Marcus 2012-06-25 18:45:58 UTC
set status to patch
Comment 13 openoffice 2012-06-25 19:27:21 UTC
*** Issue 118859 has been marked as a duplicate of this issue. ***
Comment 14 Oliver-Rainer Wittmann 2012-07-09 15:34:13 UTC
andi_: Sorry that it takes some time to take care of this issue.
I will review and apply it.

BTW, regarding your former account for the issue tracker: Did you try "Forgot Password" function with the email address which was associated with "andi_@openoffice.org"?
Comment 15 Oliver-Rainer Wittmann 2012-07-09 15:50:23 UTC
One important note:
The defect is caused by the function which rearranges the pages and its content in order to have more than one page beside each other. Thus, to reproduce the defect you have to assure that your zoom is small enough.
Comment 16 Oliver-Rainer Wittmann 2012-07-09 15:55:28 UTC
Comment on attachment 77602 [details]
proposed patch (already used in LibreOffice)

patch look good and it solves the problem.
I will apply it on trunk.
Comment 17 SVN Robot 2012-07-09 16:20:48 UTC
"orw" committed SVN revision 1359258:
#100684# - function <lcl_MoveAllLowerObjs(..)> - assure that contour c...
Comment 18 Oliver-Rainer Wittmann 2012-07-09 16:25:23 UTC
patch applied on trunk.
Comment 19 binguo 2012-11-14 06:06:33 UTC
Verified on Aoo_Trunk_20121109.1800 rev 1407366, changed the font size, including smaller or larger, and save/reload, no issue found, the bug is fixed.
Comment 20 binguo 2012-11-14 06:08:03 UTC
close it.
Comment 21 hdu@apache.org 2013-07-10 14:58:07 UTC
adjusted target to version that will contain the fix