Bug 39155 - FORMATTING: Word wrap does not work in the header, footer, table
Summary: FORMATTING: Word wrap does not work in the header, footer, table
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.4.1 release
Hardware: x86-64 (AMD64) Windows (All)
: medium critical
Assignee: Cédric Bosdonnat
URL:
Whiteboard: target:3.6.0 target:3.5.3
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-11 19:45 UTC by Jon Grossart
Modified: 2020-04-16 12:25 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample Document, see Comment 1 (29.24 KB, application/vnd.oasis.opendocument.text)
2011-07-11 22:39 UTC, Rainer Bielefeld Retired
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jon Grossart 2011-07-11 19:45:19 UTC
Word wrap does not work in the header.

Steps to reproduce:
1. create a new document
2. insert a header
3. insert a image
4. add text
5. set wrap options on the image

Using the same image in the body, I was able to set the word wrap and it would function.

I also tested it in the footer and it didn't work either.
Comment 1 Rainer Bielefeld Retired 2011-07-11 22:38:16 UTC
[Reproducible] with "LibreOffice 3.4.1  - WIN7  Home Premium (64bit) German UI [OOO340m1 (Build:103)]".

Word wrap "left" does not work in header, footer and tables, in tables only if "anchor to paragraph is selected. The problem in table disappears when I change anchor to "page"; unexpectedly the picture remains exactly at it's place when I change anchor. 

For a document created with LibO 3.4 the wrap problem remains when I open the attached sample document "sample11.odt" with OOo 3.2.2 what normally does not show that problem.

This makes LibO unusable for many users.

@Cédric:
Please feel free to reassign if it’s not your area
Comment 2 Rainer Bielefeld Retired 2011-07-11 22:39:19 UTC
Created attachment 48993 [details]
Sample Document, see Comment 1
Comment 3 Rainer Bielefeld Retired 2011-07-12 00:45:51 UTC
Worked with former LibO versions, so REGRESSION
Comment 4 Rainer Bielefeld Retired 2011-07-13 23:05:45 UTC
Not only a slip, also visible in Master "LibO-dev 3.4.5  – WIN7  Home Premium  (64bit) English UI 
[(Build ID:d337f79-a24c961-2865670-9752b71-7f8fd43
	2fdd60d-fd28b6a-fd7bf20-aa369cb-28da3fb
	6a9633a-931d089-ecd263f-c9b55e9-b31b807
	82ff335-599f7e9-bc6a545-1926fdf)]"
Comment 5 Jan Holesovsky 2011-07-19 05:42:27 UTC
Rainer: I can see this behavior is in 3.3.x (I believe both LO and OOo, though I tested only LO) too.

Nevertheless, Lubos has a fix for that, I'm testing it now.
Comment 6 Jan Holesovsky 2011-07-19 06:26:18 UTC
After more investigation, this behavior is there to be compatible with MS Office - you cannot wrap text in the headers there.

What is broken is that in LibreOffice we can do that, but the code is buggy, and the compatibility option that marks this to behave as in MSO when we open .doc (.docx, .rtf ?) is ignored, and it seems to default to the MS behavior always.

Either way - this is no regression to LibreOffice 3.3, and as such, I am removing it from the most annoying bugs.  We need to find a good balance between the MSO compatibility, and the LibreOffice feature, and more testing - so 3.5.0 seems like the right target.
Comment 7 Rainer Bielefeld Retired 2011-07-19 07:43:36 UTC
(In reply to comment #6)

> Either way - this is no regression to LibreOffice 3.3, 

You are right, the wrap capability in heading in  my documents is a heritage from OOo where they have been created.

And I can't reproduce the table problem any longer!?!
Comment 8 Jon Grossart 2011-07-19 09:07:18 UTC
(In reply to comment #7)
> (In reply to comment #6)
> 
> > Either way - this is no regression to LibreOffice 3.3, 
> 
> You are right, the wrap capability in heading in  my documents is a heritage
> from OOo where they have been created.
> 
> And I can't reproduce the table problem any longer!?!

Actually, that's not true.  Word 2007 lets you wrap text in a header.  I use it a template for my business.(In reply to comment #6)
> After more investigation, this behavior is there to be compatible with MS
> Office - you cannot wrap text in the headers there.
> 
> What is broken is that in LibreOffice we can do that, but the code is buggy,
> and the compatibility option that marks this to behave as in MSO when we open
> .doc (.docx, .rtf ?) is ignored, and it seems to default to the MS behavior
> always.
> 
> Either way - this is no regression to LibreOffice 3.3, and as such, I am
> removing it from the most annoying bugs.  We need to find a good balance
> between the MSO compatibility, and the LibreOffice feature, and more testing -
> so 3.5.0 seems like the right target.


Actually, that's absolutely not true.  Word 2007 lets you wrap text in a header.  I use it a template for my business work.  I can't speak for earlier versions. So from the more modern versions of Word, this is a feature lack/bug of Libreoffice.

And for this specific instance, I isn't loading a .doc, I was creating a new .odt file/template.  Compatability shouldn't matter.

If I open my Word .dotx file in LO 3.4.1, it changes it from a header to part of the document body.  If anything, this would seem a data corruption of the loaded file since it changed the structure of the file.
Comment 9 Jon Grossart 2011-07-19 09:09:23 UTC
(In reply to comment #8)
> (In reply to comment #7)
> > (In reply to comment #6)
> > 
> > > Either way - this is no regression to LibreOffice 3.3, 
> > 
> > You are right, the wrap capability in heading in  my documents is a heritage
> > from OOo where they have been created.
> > 
> > And I can't reproduce the table problem any longer!?!
> 
> Actually, that's not true.  Word 2007 lets you wrap text in a header.  I use it
> a template for my business.

Sorry, ignore this chunk of my comment.  I replied to the wrong comment first and thought it deleted that when I hit reply to the other comment.
Comment 10 Rainer Bielefeld Retired 2011-07-19 09:12:01 UTC
> Actually, that's not true.  Word 2007 lets you wrap text in a header.

I tried with MSOFFICE2010 and was not able to wrap Text around a drawing in the header. But my MS knowledge is rather poor.

Can it be that LibO follows MSO only 1 step behind to the past? :-/
Comment 11 Jon Grossart 2011-07-19 09:23:34 UTC
(In reply to comment #10)
> > Actually, that's not true.  Word 2007 lets you wrap text in a header.
> 
> I tried with MSOFFICE2010 and was not able to wrap Text around a drawing in the
> header. But my MS knowledge is rather poor.
> 
> Can it be that LibO follows MSO only 1 step behind to the past? :-/

Hmm, actually, it doesn't really work.  It has the option of text wrapping but doesn't seem to do much.  I looked more closely at my template and I actually just changed the tab stop of the text to have it start over further leaving space for the graphic -- so a kludge there as well.

Well, it would seem that Word 2007 offers the options of text wrapping, it just also has bugs with the implementation and most of the wrapping options don't really wrap (at least in the header, didn't try the body).

I can understand somehow making it work "buggy" for .doc.  I would think that for native files though, it should still work correctly.  But as Jan said, maybe that's a bigger issue.
Comment 12 Björn Michaelsen 2011-12-23 13:23:40 UTC
Since all new unconfirmed bugs start in state UNCONFIRMED now and old unconfirmed bugs were moved to NEEDINFO with a explanatory comment, all bugs promoted above those bug states to NEW and later are automatically confirmed making the CONFIRMED whiteboard status redundant. Thus it will be removed.
Comment 13 Luboš Luňák 2012-01-16 10:16:05 UTC
I can reproduce the original problem with 3.4.4 but not with current master, where wrapping around pictures works as expected. I think the header/footer rework causing this will be also part of 3.5 (and if not, then it's presumably too invasive change to backport by now). So considering fixed.
Comment 14 Cédric Bosdonnat 2012-03-22 02:25:32 UTC
That behavior was implemented in OOo 2.0 for compatibility with Word files, see the specifications here:
http://www.openoffice.org/specs/writer/compatibility/adjust-text-wrapping.sxw

Taking this for investigations. IMHO the word compatibility option should only be set for Word files imports.
Comment 15 Not Assigned 2012-03-22 07:16:42 UTC
Cedric Bosdonnat committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=2a4e77a6f94d35919237b9db9de184e70943fc13

Revert "make text wrapping work in headers/footers too (fdo#39155)"
Comment 16 Cédric Bosdonnat 2012-03-22 07:25:37 UTC
Reverted patch: to get the wrapping in headers/footers, please do the following:
* open Options dialog
* Go to Writer > Compatibility
* Check the "Use OpenOffice.org 1.1 text wrapping around objects"

but there will be compatibility problems with Word.
Comment 17 Not Assigned 2012-03-22 08:47:01 UTC
Cedric Bosdonnat committed a patch related to this issue.
It has been pushed to "libreoffice-3-5":

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

Revert "make text wrapping work in headers/footers too (fdo#39155)"


It will be available in LibreOffice 3.5.3.
Comment 18 Octavio Alvarez 2016-07-04 23:42:02 UTC
Hello. Wouldn't a better solution be to import Word documents to their equivalent values in Writer? I really don't know the details of what's happening, but something like importing a "Wrap Left" attribute in Word (that doesn't wrap) to import to "Wrap through" in LibreOffice (or whatever matches Word behavior) when on a header?
Comment 19 particle_mann 2019-07-15 01:40:27 UTC
Still broken a few years later as of 6.2.4.2, however there is _sort of_ a workaround by putting text and drawings/graphics in a frame, then putting the frame in the header or footer.  It's not perfect, and I'd rather wrap actually work right at any place in the document, but it's something.