Bug 139646 - FILEOPEN DOCX FILESAVE DOC Ghost frames present after deletion of text frame + image in exported DOC (not showing up in navigator)
Summary: FILEOPEN DOCX FILESAVE DOC Ghost frames present after deletion of text frame ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.4.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, implementationError
Depends on:
Blocks: DOC-Frames
  Show dependency treegraph
 
Reported: 2021-01-15 13:48 UTC by Telesto
Modified: 2024-08-16 12:51 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2021-01-15 13:48:50 UTC
Description:
Place holder drawing text frames present after deletion textframe + image of exported DOC (not showing up in navigator)

Steps to Reproduce:
1. Open attachment 155681 [details]
2. Save as DOC
3. File reload
4. Delete image with frame 3 and 2.. Click around.. you hit an empty frame in the same area

Actual Results:
Empty text frame

Expected Results:
Nothing


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.2.0.0.alpha0+ (x64)
Build ID: f2171af6ce3516598d9f8bac8294025a21a5b1a2
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 1 Telesto 2021-01-15 13:51:41 UTC
I don't think this being present in 4.2.. but import kind of flaky.. 4.3.7.2 does crash at deletion of the frames
Comment 2 Dieter 2021-05-19 06:50:14 UTC
I confirm it with

Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 1675a68526c43c6c6e4dc850ee911f0c1de75c88
CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL

Regarding to the navigator we have Drawng objects in odt-file that becomes frames in doc-file (do't know if this is relevant
Comment 3 QA Administrators 2023-05-20 03:17:40 UTC Comment hidden (obsolete)
Comment 4 Telesto 2023-05-20 07:06:32 UTC
Still present
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 066b23115c2a360507e306a88da572554daefab7
CPU threads: 8; OS: Mac OS X 12.6.3; UI render: Skia/Raster; VCL: osx
Locale: nl-NL (nl_NL.UTF-8); UI: en-US
Calc: threaded
Comment 5 Buovjaga 2024-08-08 12:32:57 UTC
Bibisected with Linux 44max repo to d379d18666aa42031359ca8eb34b0021960347ae
oox: import WPS shape with text as shape with textbox

There were intermediate states where the .doc did not contain frames or the program failed to launch.

I marked as bad a state where frame 3 did not exist in the .doc and deletion of frame 2 left behind the ghost object. This is the first bad commit.

Grepping in the .xmls of the docx I see stuff like <wps:wsp><wps:cNvSpPr txBox="1"/>

CLI conversion helped with the bibisect:
opt/program/soffice --headless --convert-to doc --outdir /path/to/dir /path/to/dir/export-test.docx && SAL_USE_VCLPLUGIN=gen opt/program/soffice --norestore /path/to/dir/export-test.doc
Comment 6 Miklos Vajna 2024-08-16 12:48:41 UTC
I guess what happens here is that the original DOCX file has this shape that happens to be a rectangle (but could be something more complex, like have rounded rectangles) and that contains some text (caption) and the image. So on import we deal with a shape and an image, but the shape gets mapped to a Writer TextBox (draw shape + inner Writer TextFrame), on purpose. Once you save to DOC, the link between the draw shape and the inner TextFrame gets lost, as the DOC export was not extended to use SwTextBoxHelper::isTextBox(). This is doable and is done for DOCX & RTF, but I don't recall the details off the top of my head, most of that Writer TextBox work was 10 years ago. :-)

So this makes sense to implement, but I would argue that this is a missing feature of the DOC export (and then people will also want the same in the DOC import), or at least it's an implementation error, not a regression.

Adjusting keywords accordingly.
Comment 7 Miklos Vajna 2024-08-16 12:51:06 UTC
Forgot to mention: you can find more info about the Writer TextBox feature here: https://vmiklos.hu/blog/textbox.html