Bug 71319 - Incorrect wrapping of text with indent around a picture
Summary: Incorrect wrapping of text with indent around a picture
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.1.2.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-06 17:58 UTC by stabsun3
Modified: 2017-04-22 11:04 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample file with the bug (288.36 KB, application/vnd.oasis.opendocument.text)
2013-11-06 17:58 UTC, stabsun3
Details
Document made in 2010 with an "old" OpenOffice version (531.93 KB, application/vnd.oasis.opendocument.text)
2013-11-25 21:36 UTC, stabsun3
Details
Indent Bug (30.10 KB, application/vnd.oasis.opendocument.text)
2013-12-06 14:34 UTC, nico
Details
Demo file (87.08 KB, application/vnd.oasis.opendocument.text)
2017-04-11 15:13 UTC, Butch
Details
demo file modified (87.17 KB, application/vnd.oasis.opendocument.text)
2017-04-22 09:09 UTC, Jean-Baptiste Faure
Details

Note You need to log in before you can comment on or make changes to this bug.
Description stabsun3 2013-11-06 17:58:37 UTC
Created attachment 88772 [details]
Sample file with the bug

When a picture is inserted in a paragraph using "before text" indent, word-wrapping is incorrect. Before text indent is set on the right side of the picture, instead of being set to zero.
"Old" versions of OpenOffice/LibreOffice didn't have this behaviour and the text used to "stick" to the picture.
Comment 1 sophie 2013-11-07 13:39:23 UTC
I can't reproduce using Ubuntu 13.10 and 4.1.3, could you tell us what is your system? Sophie
Comment 2 stabsun3 2013-11-07 19:13:05 UTC
The sample file has been made on Ubuntu 13.10 with Version: 4.1.2.3 Build ID: 410m0(Build:3) stable PPA LibreOffice. I've just upgraded to Version: 4.1.3.2
Build ID: 410m0(Build:2) from ppa:libreoffice/libreoffice-4-1, the bug is still present.
The way to reproduce it :

- open a new Writer document and add some text
- modify default paragraph style and set "before text" indent to, say, 2cm
- insert a picture in the middle of the text with default option
- the text does not "stick" to the picture but is 2cm from the right side of the picture

OpenOffice 3.0 (Mac) and LibreOffice 4.0 (Windows) I use at the university with my students have the same bug too. But rather old versions (OpenOffice 2.0.xx) didn't, as the same exercice made on those old versions used to give the correct rendering (text sticked to the right side of the picture).

Feel free to contact me directly in french if needed. Thanks for the great job you're doing at LibreOffice :-)

Bruno
Comment 3 Dominique Boutry 2013-11-18 11:10:21 UTC
We are facing 2 choices ; below are some criteria to take into account :
- exhaustive pro-con analysis (exemple : whis the asked behavior, the text right to the picture doesn't respond anymore to any indent setting)
- history : ascending compatibility with older versions,
- common sense (but the notion of "correct rendering" tends to be a personnal),
- technics to allow both behaviors (in the present case, trying "page wrap" instead of "optimal page wrap" may be satisfying in some cases ; other technic in tables with 1 line-2 columns).

What I'm afraid of is the ping-pong syndrom :
- choice A to satisfy users asking it,
- number of bug reports claiming against the change or against the adoption of choice A : choice B to satisfy those users,
- number of bug reports claiming against the change or against the adoption of choice B : back to choice A, etc... etc...
Comment 4 stabsun3 2013-11-18 20:47:14 UTC
Well, actualy the problem is quite simple. With the actual setting it's *not* possible to have no indent next to the picture if paragraph indent is set. But with what I call "correct rendering", I mean no indent next to the picture, even if paragraph indent is set, it's still possible to add spacing in the picture wrap properties to add indent. Basicaly this property is done for that, no ? So with my solution everybody can possibly be happy, as both behaviours can be easily reproduced. 
Using table is to me a dirty workaround as table is not supposed to be used to correct bad text wrapping !
Comment 5 Dominique Boutry 2013-11-19 08:26:27 UTC
I agree.

I used tables in the past to get a specific layout in a book I wrote ; however I agree it isn't a general solution.
Comment 6 Jean-Baptiste Faure 2013-11-24 18:04:33 UTC
Not sure if the old behavior was the correct one ...

I do not understand why you use a "before text" indent for the default style. You can obtain the same effect without indent by changing the left margin.

Best regards. JBF
Comment 7 stabsun3 2013-11-25 21:36:48 UTC
Created attachment 89787 [details]
Document made in 2010 with an "old" OpenOffice version

Sample document made in 2010 with an old version of OpenOffice. Old behavior is kept even if opened with a new LibreOffice version. You can notice that, with the old behavior, it is possible to have zero indent on the right side of the second picture, just some spacing around the picture, even if the paragraph style has before text indent.
Comment 8 stabsun3 2013-11-25 21:39:49 UTC
(In reply to comment #6)
> Not sure if the old behavior was the correct one ...
> 
> I do not understand why you use a "before text" indent for the default
> style. You can obtain the same effect without indent by changing the left
> margin.
> 
> Best regards. JBF

I've add before text indent to the default style as a prof of the bug. And, no, adding before text indent and increasing left marging don't have the same result, see sample file below...!
Comment 9 nico 2013-12-04 15:49:43 UTC
I am running on the same bug and would agree that the "old" behaviour is the right one..

If i want to make an indent for a paragraph only, changing the margin the left spacing for the whole site is changed.
If i want to add an image to the indented paragraph and make the text wrap around it, i run into this bug...

Nico
Comment 10 Dominique Boutry 2013-12-06 14:12:45 UTC
(In reply to comment #7)
> Created attachment 89787 [details]
> Document made in 2010 with an "old" OpenOffice version
> 
> Sample document made in 2010 with an old version of OpenOffice. Old behavior
> is kept even if opened with a new LibreOffice version. You can notice that,
> with the old behavior, it is possible to have zero indent on the right side
> of the second picture, just some spacing around the picture, even if the
> paragraph style has before text indent.

Lib0 4.2.0.0 beta2 on Win7 :

Please pay attention to the Wrap attribute of the frame encapsulating the image and its title :
- it is "Page Wrap" in the document you submit, hence the right "old" behaviour,
- should you change it to "Optimal Page Wrap", it falls into the behaviour you contest,
- so IMHO all is perfectly correct in LibO, we have the features to get both behaviour, both in a straightforward way.

Regards
Comment 11 nico 2013-12-06 14:34:25 UTC
Created attachment 90361 [details]
Indent Bug
Comment 12 nico 2013-12-06 14:36:11 UTC
Thanks for your Reply

>- it is "Page Wrap" in the document you submit, hence the right "old" behaviour,
>- should you change it to "Optimal Page Wrap", it falls into the behaviour you contest,

This did not help. I made a demo document with the problem,  called "Indent Bug"
Comment 13 QA Administrators 2014-07-08 17:29:03 UTC Comment hidden (obsolete)
Comment 14 Jean-Baptiste Faure 2014-07-13 09:23:24 UTC
(In reply to comment #12)
> [...]
> This did not help. I made a demo document with the problem,  called "Indent Bug"

It works as expected if you set the horizontal position of the frame to 3.23001 cm instead of 3.23. So if the frame is _inside_ the paragraph area.

Tested with LibreOffice 4.3.1.0.0+ (Build ID: 8e08ec34ac5ad552709782b10fd309b78ed080f8) under Ubuntu 14.04 x86-64

Closing as WorksForMe.

Best regards. JBF
Comment 15 Butch 2017-04-11 15:13:22 UTC
Created attachment 132477 [details]
Demo file

Hi!

I independently discovered the same problem, but I can't reproduce your WORKSFORME at all.

Could you show your "it works as expected" solution in the Demo.odt file enclosed and attach your changed file here?

Sincerely
Butch
Comment 16 Jean-Baptiste Faure 2017-04-22 09:09:47 UTC
Created attachment 132746 [details]
demo file modified

(In reply to Butch from comment #15)
> [...]
> Could you show your "it works as expected" solution in the Demo.odt file
> enclosed and attach your changed file here?

Use parallel text adaptation instead of optimal.

Best regards. JBF
Comment 17 Butch 2017-04-22 11:04:46 UTC
@JBF:
You say: "Use parallel text adaptation instead of optimal."

However, this is not the ONLY setting you changed in my demo doc!

My image was inserted with the horizontal position 
Left to Paragraph text area. (*)

If you only change wrapping to parallel, the bug is still present!
Your additional mesure was to change the horizontal position to
From left by 4.58 cm to Paragraph area.

This is the point! From my point of view (*) is the logical kind of setting because the image should be positioned left inside the intended paragraph (i.e. to the paragraph text area).
With positioning relative to the paragraph area you have to set the position twice: for the intended paragraph AND for the image.
The first variant must be considered (1) as more logical and comfort, but (2) at least as an allowed option not leading to undesired effects, if not (3) as 'intended' method.

Am I wrong?

Sincerely
B.

PS: There is a variant of the (*) setting which is known as workaround: wrapping to parallel & horizontal position
From left by 0.01 cm to Paragraph text area.