Description: Optimal wrap behavior does not match the documentation Automatically wraps text to the left, to the right, or on all four sides of the border frame of the object. If the distance between the object and the page margin is less than 2 cm, the text is not wrapped. Steps to Reproduce: 1. Open the attached file 2. Optimal wrap is enabled.. and proper result 3. Select the shape -> Position and size -> Increase height/width with 0,10 4. Text is wrapped to the right Actual Results: Text is wrapped to the right Expected Results: The shape is still 2 cm of the border.. or I'm i missing something Reproducible: Always User Profile Reset: No Additional Info: Version: 7.0.0.0.alpha0+ (x64) Build ID: 97a2c1fc5e376c0c00968f17a0392c6d3a5ed565 CPU-threads: 4; Besturingssysteem: Windows 6.3 Build 9600; UI-render: Skia/Rooster; VCL: win; Locale: nl-NL (nl_NL); UI-taal: nl-NL Calc: threaded
Created attachment 160616 [details] Example file
Could you please share the link to the documentation ?
(In reply to Xisco Faulí from comment #2) > Could you please share the link to the documentation ? https://help.libreoffice.org/6.4/en-US/text/swriter/01/05060200.html?&DbPAR=WRITER&System=WIN But not sure if it's a documentation issue.. It's more the behavioral part I'm concerned about.. Text should wrap around the shape, except if between border and shape is less than 2 cm.. But if i'm 2 cm out border it still isn't wrapping at the left.. Initial vision was.. Optimal wrap is wrap to the right always.. but documentation suggested otherwise.. I tried until I get the described result.. but this doesn't match the description. However the current behavior is something it does for long long time already
How is optimal wrap supposed to work... It seems to me it's working differently compared how it's advertised..
First thought was that wrap starts with less than 1x width. But double size 2.8cm makes the line break either left or right. So the question goes to the developers: How exactly does optimal wrap work?
"Optimal" decides whether text floats before or after. Help says: "Automatically wraps text to the left, to the right, or on all four sides of the border frame of the object. If the distance between the object and the page margin is less than 2 cm, the text is not wrapped." file:///usr/lib/libreoffice/help/en-US/text/swriter/01/05060200.html We can rename and we can change the default to parallel, which allows text floating to left and right. But I believe the question is resolved. Is it, Telesto?
(In reply to Heiko Tietze from comment #6) > "Optimal" decides whether text floats before or after. Help says: > "Automatically wraps text to the left, to the right, or on all four sides of > the border frame of the object. If the distance between the object and the > page margin is less than 2 cm, the text is not wrapped." > file:///usr/lib/libreoffice/help/en-US/text/swriter/01/05060200.html > > We can rename and we can change the default to parallel, which allows text > floating to left and right. No answer given. The question is, does LibreOffice do what the Help says. Is the documentation is wrong; the behavior wrong; or even both? Or I'm I misreading something... 1. Open the attached file 2. What you see: Optimal wrap (wrapped around; as expected from the help] 3. Select the shape -> Position and size -> Increase height/width with 0,10 4. Text is wrapped to the right Result: wrapped to the right (or left) depending on position Expected: wrapped around, as initial. Shape is still 2 cm from left/right page margin as I can see Same for images; didn't expect otherwise.. but checked
(In reply to Telesto from comment #7) > 2. What you see: Optimal wrap (wrapped around; as expected from the help] > 3. Select the shape -> Position and size -> Increase height/width with 0,10 > 4. Text is wrapped to the right Again, Optimal wraps either left or right but not _parallel_. Knowing that I can follow the help. The icon is misleading and the label.
(In reply to Heiko Tietze from comment #8) > (In reply to Telesto from comment #7) > > 2. What you see: Optimal wrap (wrapped around; as expected from the help] > > 3. Select the shape -> Position and size -> Increase height/width with 0,10 > > 4. Text is wrapped to the right > > Again, Optimal wraps either left or right but not _parallel_. Knowing that I > can follow the help. The icon is misleading and the label. If it's either left or right as you say: I agreee misleading icon/label.. However: why does it do _parallel_ in the sample file if the image/shape is small enough.
Some constants are defined in txtfly.cxx [1]: // #i68520# (see https://bz.apache.org/ooo/show_bug.cgi?id=68520) // Wrap only on sides with at least 2cm space for the text #define TEXT_MIN 1134 // MS Word wraps on sides with even less space (value guessed). #define TEXT_MIN_SMALL 300 // Wrap on both sides up to a frame width of 1.5cm #define FRAME_MAX 850 Meaning, if the object is <1.5cm it wraps parallel in case of >2cm space to the border, otherwise left or right. The FRAME_MAX value seems ridiculous small but it's there since the big bang. From the UX POV I would either always try to parallel wrap (FRAME_MAX=PAGE_SIZE) or up to PAGE_SIZE-OBJECT_SIZE. However, if we touch this it breaks the layout of existing documents. What we could do is to change the default to Parallel (or Page Wrap, see also bug 86429 for labeling issues) and hide Optimal from the context menu and the properties dialog. Not least because MSO has no "optimal" wrapping and the round-trip fails. [1] https://opengrok.libreoffice.org/xref/core/sw/source/core/text/txtfly.cxx?r=d7855213#1350
(In reply to Heiko Tietze from comment #10) > What we could do is to change the default to Parallel (or Page Wrap, see > also bug 86429 for labeling issues) and hide Optimal from the context menu > and the properties dialog. Not least because MSO has no "optimal" wrapping > and the round-trip fails. * Changing the page wrap to parallel +1 [Ideally with 7.0, IMHO] * Hide optimal from the properties dialog/ context menu. Not showing any wrap for all those with optimal wrap? Sounds confusing. Removing from context menu, I can understand (but I foresee confusion/complains already). Banning it out.. maybe long term.. However if you plan to do that; phasing out..say next 2 years, please announce it already in release notes as forward guidance..
Created attachment 162526 [details] Example file Small note/warning of a side effect of changing the wrap setting to page wrap Optimal wrap places the first paragraph below the image, if the image is the first thing on the page (as does Wrap off) All other cases hide the paragraph/cursor behind the image (in the given case). A like the 'optimal wrap' way, so a cursor below (instead of hidden behind). Except the part where you press Enter below the image, and image moves down.. but that does only happen with to character anchoring, not with to paragraph (I ideally prefer the "to paragraph" behavior in this given case) So it's not a simple change the default without side effects (or additional changes are needed)
So, optimal wraps text to the side with the most room for text (except in the case where it is tiny in which case it wraps parallel). Sounds like only a documentation issue to me. That definition makes perfect sense in a practical world (although from a standards perspective it is very arbitrary and should not have included the parallel aspect). Changing a default to use parallel wrap instead of optimal sounds like a bad idea to me. Rarely do you want text to wrap on both sides of something (only in the case of something centred and tiny). I suggest removing easy-hack. In fact, I suggest closing this as NOTABUG. I don't see anything actionable here. P.S. Microsoft DOES have an optimal setting. Both "tight" and "square" have a "largest only" choice. (It just doesn't do an arbitrary justify on occasion.)