Bug 140961 - LO Writer: Frames are converted into text box when saving in .docx
Summary: LO Writer: Frames are converted into text box when saving in .docx
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.2.8.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: DOCX-Textbox
  Show dependency treegraph
 
Reported: 2021-03-11 17:25 UTC by Fellype
Modified: 2023-03-15 21:21 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
test case - file with a frame saved as .odt (8.56 KB, application/vnd.oasis.opendocument.text)
2021-03-11 17:26 UTC, Fellype
Details
test case - file with a frame saved as .docx (4.77 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2021-03-11 17:27 UTC, Fellype
Details
Screenshot of the floating menu showing an option to remove the text box (46.44 KB, image/png)
2021-03-14 00:12 UTC, Fellype
Details
Screenshot of the floating menu showing an option to edit the frame properties (60.14 KB, image/png)
2021-06-21 20:51 UTC, Fellype
Details
Screenshot of the dialog with the frame properties (50.10 KB, image/png)
2021-06-21 20:53 UTC, Fellype
Details
docx file created with FreeOffice (13.28 KB, application/x-crossover-docx)
2021-06-21 21:07 UTC, Fellype
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fellype 2021-03-11 17:25:41 UTC
Description:
The frames added to a text document are converted into text box when saving the file in .docx format.
It does not mater if one starts with an empty document, save a .odt in .docx format or open a .docx document, add a frame and save it.

I can reproduce it i versions 6.2.8.2, on Ubuntu and in 7.0.4, on Slackware.

Obs.: I'm sorry in advance if it is a duplicate of another bug. But I haven't time to verify all the results returned in the search.

Steps to Reproduce:
1. add a frame to any LO Writer text document
2. save it as .docx
3. open the file and verify

Actual Results:
the frame is converted into a text box

Expected Results:
the frame should be a frame


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Version: 6.2.8.2
Build ID: 1:6.2.8-0ubuntu0.19.04.1
CPU threads: 4; OS: Linux 5.0; UI render: default; VCL: gtk3; 
Locale: en-US (pt_BR.UTF-8); UI-Language: en-US
Calc: threaded
Comment 1 Fellype 2021-03-11 17:26:58 UTC
Created attachment 170412 [details]
test case - file with a frame saved as .odt
Comment 2 Fellype 2021-03-11 17:27:39 UTC
Created attachment 170413 [details]
test case - file with a frame saved as .docx
Comment 3 Telesto 2021-03-12 07:54:54 UTC
Note: Did find another issue; frame moving to different position: bug 140966
Comment 4 Telesto 2021-03-12 07:57:00 UTC
I don't repro. Navigator shows Frame when exporting to DOCX. Frame does look slightly different compared to ODT. But no clue what the cause of that is

Biggest problem, outer border is lacking

Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: dc3b64dcbfb0a49c0be65bd8d73ed4e6d3828a21
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL
Comment 5 Fellype 2021-03-14 00:11:14 UTC
@Telesto

Navigator shows Frame here too.
However, by right-clicking on the frame the floating menu shows the option 'Remove Text Box'. See the screenshot attached.
So, the step 3 should be changed
from: 3. open the file and verify
to: 3. open the file, right-click on the frame -> the option 'Remove Text Box' will be shown
Comment 6 Fellype 2021-03-14 00:12:47 UTC
Created attachment 170466 [details]
Screenshot of the floating menu showing an option to remove the text box
Comment 7 Regina Henschel 2021-06-15 15:58:21 UTC
@Fellype: Which kind of object do you expect in the docx file? Can you provide a document with such object created in Word (or other application but LibreOffice)?
Comment 8 Fellype 2021-06-21 20:51:37 UTC
Created attachment 173066 [details]
Screenshot of the floating menu showing an option to edit the frame properties
Comment 9 Fellype 2021-06-21 20:53:00 UTC
Created attachment 173067 [details]
Screenshot of the dialog with the frame properties
Comment 10 Fellype 2021-06-21 21:07:06 UTC
Created attachment 173068 [details]
docx file created with FreeOffice
Comment 11 Fellype 2021-06-21 21:11:18 UTC
@Regina

It is expected that the object in the docx file remain with the same properties of a frame in the odt ones (see the screenshot in https://bugs.documentfoundation.org/attachment.cgi?id=173067)

If you compare the floating menus of the text box [1] with that for the frame [2] you will see that it's not possible to edit the properties of the first one.

[1] https://bugs.documentfoundation.org/attachment.cgi?id=170466
[2] https://bugs.documentfoundation.org/attachment.cgi?id=173066

Unfortunately (or not) I can't provide an object created in Word because I don't use it. 
FreeOffice is able to provide an object (called text frame in the software) that has similar properties of a frame in LibreOffice https://bugs.documentfoundation.org/attachment.cgi?id=173068
However, when the file is opened in LibreOffice, it is recognized as a text box.
Comment 12 QA Administrators 2021-06-22 03:38:18 UTC Comment hidden (obsolete)
Comment 13 Regina Henschel 2021-06-22 20:11:16 UTC
I see in LO -> docx -> LO roundtrip, that all of frame, drawing object text (which has icon 'A' in the UI) and custom shape with connected frame (called 'text box' in the UI) result in a custom shape with connected frame.

LibreOffice writes it so to file, that it cannot know the original object type on reopening.

Softmaker uses the a:ext element to write additional information into the file, that it can use on reopening.

I can image some improvement in LO -> docx -> roundtrip:
Establish a better heuristic on import, to detect whether it could be a frame, e.g. prstGeom="rect" without rotation but rich content.
Use the a:ext element to write additional information to the file. Word does this a lot in using namespace "o:".
Comment 14 Justin L 2023-03-15 21:21:52 UTC
I think this should be closed as INVALID. We have to do all kinds of emulation when saving from ODT to DOCX.