Bug 45376 - [FORMATTING] Incorrect text wrapping around drawing shapes (depending on zoom level)
Summary: [FORMATTING] Incorrect text wrapping around drawing shapes (depending on zoom...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.4.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:3.5.3
Keywords: regression
: 34611 (view as bug list)
Depends on:
Blocks: mab3.5
  Show dependency treegraph
 
Reported: 2012-01-29 12:28 UTC by openoffice
Modified: 2012-07-14 13:22 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
test case of wrap and page preview problem (18.20 KB, application/vnd.oasis.opendocument.text)
2012-03-15 08:46 UTC, sasha.libreoffice
Details
proposed patch (already applied in master branch) (1.29 KB, patch)
2012-03-15 11:45 UTC, openoffice
Details
Screenshot of incorrect wrapping in page preview (92.86 KB, image/jpeg)
2012-04-28 15:33 UTC, openoffice
Details

Note You need to log in before you can comment on or make changes to this bug.
Description openoffice 2012-01-29 12:28:26 UTC
When using a drawing shape with contour page wrapping, the text is wrapped around a "virtual object" left or right of the shape after changing zoom level and entering page preview (or printing / PDF export).

Steps to reproduce: 
1. Add some text to a writer document
2. Draw a rectangle somewhere (right half of page) on the text
3. Switch the rectangle's wrapping to page wrap (this will automatically enable contour wrapping)
4. Zoom out a bit (make sure the entire page width is visible, and the page is centered)
5. Switch to page preview

Expected result:
Text wraps around the rectangle

Actual Result: 
Text wraps around a white space left of the rectangle
Comment 1 openoffice 2012-01-29 12:32:14 UTC
Additional information: 
- The problem has been reproduced on Windows and Linux
- The problem does not occur when using images (with contour wrapping) instead of drawing objects
- The problem seems to be related to SwContourCache (when disabling the contour cache, the problem disappears) or the data stored there
Comment 2 sasha.libreoffice 2012-03-15 08:46:46 UTC
Created attachment 58519 [details]
test case of wrap and page preview problem
Comment 3 sasha.libreoffice 2012-03-15 08:53:33 UTC
Thanks for bugreport
Reproduced in 3.5.1 on Fedora 64 bit 
and on 3.4.3 and 3.5.0 beta 3 on Windows XP
But not reproduced in 3.3.4 on Fedora, therefore regression

To reproduce bug: 
0. Open attachment
1. pay attention how text placed to left and to right of rectangle
2. do File->Page preview
3. repeat step 1
4. close Page preview
5. repeat step 1
Bug may appear after step 2 or 4. Text seen in wrong place or appears in wrong place.

Changing version to 3.4.3 as most early reproducible
Comment 4 openoffice 2012-03-15 09:44:10 UTC
Pleased to see someone else also finds this bug annoying :)

The bug is fixed on the master branch by the two commits b446a1fb30b5a7097824acfe6bbbb143f4284b03 and 84370b807279cd8336c3e77278bae42b904324b4 which change /sw/source/core/layout/pagechg.cxx.
Comment 5 Roman Eisele 2012-03-15 10:44:45 UTC
> The bug is fixed on the master branch by the two commits
> b446a1fb30b5a7097824acfe6bbbb143f4284b03 and
> 84370b807279cd8336c3e77278bae42b904324b4 which change
> /sw/source/core/layout/pagechg.cxx.

Just to clarify the state of affairs: so what is missing is just a backport of these two fixes to the LibreOffice 3.5.x branch(es), right? (I can't find the fixes in the 3.5 branch, but I may be wrong).
Comment 6 Roman Eisele 2012-03-15 10:52:57 UTC
> Just to clarify the state of affairs: so what is missing is just a backport of
> these two fixes to the LibreOffice 3.5.x branch(es), right? (I can't find the
> fixes in the 3.5 branch, but I may be wrong).

Or, better question: Could you please test if the bug is still present in LibO 3.5.1 (and 3.4.5)? I have tried both versions, but I have problems to reproduce the bug clearly. Either it has been fixed in between even in these published versions (then we could close this bug report and be happy), or I am missing something (or the platform/OS has some influence: I am running LibreOffice on MacOS X 10.6.8 ...).
Comment 7 Roman Eisele 2012-03-15 11:03:41 UTC
Sorry for so much comments, but: As far as I can see (but I'm not a C++ master!), the patch mentioned in Comment 5 is NOT in

http://cgit.freedesktop.org/libreoffice/core/tree/sw/source/core/layout/pagechg.cxx?h=libreoffice-3-5

and therefore the bug is NOT (yet) fixed on the 3.5.x branch. Right? Then please consider packporting the two patches to the 3.5.x branch ...
Comment 8 openoffice 2012-03-15 11:45:15 UTC
Created attachment 58521 [details]
proposed patch (already applied in master branch)

Right, the bug is not yet fixed in 3.5.x, just in master; cf.
http://comments.gmane.org/gmane.comp.documentfoundation.libreoffice.devel/23158

However, the identical patch could also be applied to the 3.5 branch 
(if it is seen as an "important bug fix").
Comment 9 Cor Nouws 2012-04-15 07:08:58 UTC
(In reply to comment #8)
> However, the identical patch could also be applied to the 3.5 branch 
> (if it is seen as an "important bug fix").

Thanks for the suggestion! Mailed it to the developer list.
Comment 10 Not Assigned 2012-04-17 04:45:30 UTC
Andreas Schierl committed a patch related to this issue.
It has been pushed to "libreoffice-3-5":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=2d7ce65af37195343ff74b9e01c60f4b86eb6ebe&g=libreoffice-3-5

ClrContourCache for SwAnchoredDrawObjects (fdo#45376)


It will be available in LibreOffice 3.5.3.
Comment 11 Jean-Baptiste Faure 2012-04-28 14:46:25 UTC
If this bug is fixed it should be better to change its status to fixed. I prefer to not do that myself because I am not able to reproduce the bug in LO 3.4: I can't see what is different between 3.4.6 and 3.5.3 wrt this bug report. So I can't verify if the bug is fixed or not.

Please, could you attach a screencopy showing what is wrong in the preview for version 3.4.3. It will be useful if later we have to test a regression.

Best regards. JBF
Comment 12 openoffice 2012-04-28 15:33:44 UTC
Created attachment 60752 [details]
Screenshot of incorrect wrapping in page preview
Comment 13 openoffice 2012-04-28 16:18:13 UTC
The bug is fixed in LO 3.5.3 rc2
Comment 14 sasha.libreoffice 2012-04-30 01:06:32 UTC
Thanks for additional testing
Comment 15 openoffice 2012-07-14 13:22:29 UTC
*** Bug 34611 has been marked as a duplicate of this bug. ***