Bug 58194 - FILESAVE Automatic first line indent is not saved in DOC/DOCX format
Summary: FILESAVE Automatic first line indent is not saved in DOC/DOCX format
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.3.0 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL: https://help.libreoffice.org/7.4/en-U...
Whiteboard:
Keywords:
: 34283 130487 (view as bug list)
Depends on:
Blocks: DOCX-Paragraph
  Show dependency treegraph
 
Reported: 2012-12-12 12:53 UTC by Carlos Brys
Modified: 2024-09-09 03:15 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
Test document. 1st line have indentation (17.87 KB, application/vnd.oasis.opendocument.text)
2012-12-12 15:00 UTC, Carlos Brys
Details
Original .odt document whith 1st line indented, losed when saved as W97/2003 (11.00 KB, application/msword)
2012-12-12 15:02 UTC, Carlos Brys
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Brys 2012-12-12 12:53:49 UTC
When saving a document in .doc format, all first line indent in paragraphs are lost.
This bug is still present from version 3.0
Comment 1 Urmas 2012-12-12 13:21:31 UTC
Unable to reproduce. Please attach ODF source.
Comment 2 Carlos Brys 2012-12-12 15:00:01 UTC
Created attachment 71392 [details]
Test document. 1st line have indentation

Test document in .odt format-
This document contains indented first lines.
When this is saved in MS-Word 97/2003, all indentations are lost
Comment 3 Carlos Brys 2012-12-12 15:02:48 UTC
Created attachment 71393 [details]
Original .odt document whith 1st line indented, losed when saved as W97/2003
Comment 4 Carlos Brys 2012-12-12 15:07:06 UTC
(In reply to comment #1)
> Unable to reproduce. Please attach ODF source.

I have attached two documents.
The first is a .odt with the first line indented
The second is the same document saved as W97/2003. All indentations are lost
Comment 5 Urmas 2012-12-12 21:52:42 UTC
I see it now.
Comment 6 stfhell 2012-12-13 20:19:55 UTC
Typical case of an export filter simply ignoring a property that the target format doesn't support. The paragraphs are formatted with "automatic indent", which Word does not support.

Also happens with DOCX export. Also reproducible with LO 3.5.4.2.

If you wish to get a Word-compatible first-line indent, you should not use "automatic" but specify an explicit value.
Comment 7 QA Administrators 2015-04-19 03:23:04 UTC Comment hidden (obsolete)
Comment 8 Gordo 2015-04-20 16:19:50 UTC
According to https://help.libreoffice.org/Common/Indents_and_Spacing automatic indent is only when in Writer.  It does not explicitly say it, but this applies only to odt files.

Version: 4.4.2.2
Build ID: c4c7d32d0d49397cad38d62472b0bc8acff48dd6

Changed to RESOLVED NOTABUG.
Comment 9 Kevin Suo 2021-12-22 03:16:05 UTC
Sorry but I set this to NEW. This *is* a bug.

It is true that ooxml does not support "auto" first line indent, but when saving to docx/doc LibreOffice should at least preserve the calculated first line indent value.

For instance, if in an ODT file the first line indent is "auto", and it is calculated that the auto indent value should be "480 twips", in this "480 twips" which equals whatever cm or whatever pt should be written to the docx/doc. Otherwise, it is a format loss.
Comment 10 Kevin Suo 2021-12-22 03:17:52 UTC
Miklos Vajna: What do you think of my comment in comment 9?
Comment 11 Miklos Vajna 2021-12-22 09:48:26 UTC
This sounds reasonable, the Word export filter also bakes calculated layout-level info to the Word output at other places already.
Comment 12 Kevin Suo 2021-12-22 11:02:34 UTC
*** Bug 34283 has been marked as a duplicate of this bug. ***
Comment 13 Kevin Suo 2021-12-22 11:06:52 UTC
*** Bug 130487 has been marked as a duplicate of this bug. ***
Comment 14 Kevin Suo 2021-12-22 11:23:01 UTC
I guess it's in:
DocxAttributeOutput::FormatLRSpace

https://opengrok.libreoffice.org/xref/core/sw/source/filter/ww8/docxattributeoutput.cxx?r=b5c616d1#9227
Comment 15 Kevin Suo 2022-01-30 05:52:11 UTC
I think it's in DocxAttributeOutput::FormatLRSpace.
sw/source/filter/ww8/docxattributeoutput.cxx:9301
https://opengrok.libreoffice.org/xref/core/sw/source/filter/ww8/docxattributeoutput.cxx?r=b5c616d1#9301

where currently it only checks for GetTextFirstLineOffset():
        sal_Int32 const nFirstLineAdjustment = pLRSpace->GetTextFirstLineOffset();
        if (nFirstLineAdjustment > 0)
            pLRSpaceAttrList->add( FSNS( XML_w, XML_firstLine ), OString::number( nFirstLineAdjustment ) );

I think it should also be checking the pLRSpace->IsAutoFirst(), and if true, then nFirstLineAdjustment should be calculated the same way as what we have done in sw/source/core/text/itrcrsr.cxx:250.
https://opengrok.libreoffice.org/xref/core/sw/source/core/text/itrcrsr.cxx?r=0e4bcbb6#250
Comment 16 QA Administrators 2024-09-09 03:15:38 UTC
Dear Carlos Brys,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug