Bug 107776 - Saving and opening document looses graphics positions
Summary: Saving and opening document looses graphics positions
Status: VERIFIED FIXED
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: Miklos Vajna
URL:
Whiteboard: target:6.4.0 target:6.3.2
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2017-05-11 15:42 UTC by Dave Nadler
Modified: 2021-04-06 13:53 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
PDF shows correct placements (649.04 KB, application/pdf)
2017-05-11 15:42 UTC, Dave Nadler
Details
ODT with problem (1.82 MB, application/vnd.oasis.opendocument.text)
2017-05-11 15:43 UTC, Dave Nadler
Details
starter motor simplified.odt: edited by LO 6.1alpha (162.46 KB, application/vnd.oasis.opendocument.text)
2018-02-16 14:51 UTC, Justin L
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dave Nadler 2017-05-11 15:42:44 UTC
Created attachment 133240 [details]
PDF shows correct placements

Saving and re-opening document:

1) causes arrows to disappear behind images.
image arrange to back usually causes correct display

2) Sometimes text is shown in front of image but not arrow graphic.

3) Sometimes arrows show odd boxes around text area or entire object

4) Sometimes images move around page and loose sync with graphics

Attached PDF shows print (correct positioning of arrows).
Open ODT and you'll see problems 1-3.
Not sure how to reproduce #4.
Comment 1 Dave Nadler 2017-05-11 15:43:38 UTC
Created attachment 133241 [details]
ODT with problem
Comment 2 Justin L 2017-05-13 04:37:31 UTC
confirmed with Ubuntu 16.04, LO5.4alpha1

regression from LO 4.4. commit 9835a5823e0f559aabbc0e15ea126c82229c4bc7
Author: Miklos Vajna
CommitDate: Sat Oct 4 20:18:01 2014 +0200
    
        sw textboxes: reimplement ODF import/export
    
        Turns out that for normal TextFrames and rectangular drawinglayer
        shapes, the engine is written in ODF implicitly. Use the same trick to
        describe if the shape content should be rendered by SW or editeng.
    
        This reverts 9d310ecfce3c2fc481b125e1493a534e2107a68e (sw textboxes:
        implement ODF import/export, 2014-06-02).
CC'd: Miklos
Comment 3 Justin L 2018-02-16 14:51:09 UTC
Created attachment 139949 [details]
starter motor simplified.odt: edited by LO 6.1alpha

still a problem in 6.1
Comment 4 Justin L 2018-02-16 18:15:35 UTC
Although it seems unrelated to the problem, reading this document (and the unit tests from the regression commit) produces exceptions for these Shapes with styles: warn:legacy.osl:22978:22978:xmloff/source/draw/ximpshap.cxx:676: DBG_UNHANDLED_EXCEPTION in void SdXMLShapeContext::SetStyle(bool).

The document loads properly when avoiding shapeexport.cxx's
        if (aParentName.isEmpty() && xPropertySetInfo->hasPropertyByName("TextBox") && xPropSet->getPropertyValue("TextBox").hasValue() && xPropSet->getPropertyValue("TextBox").get<bool>())
        {
            // Shapes with a Writer TextBox always have a parent style.
            // If there would be none, then just assign the first available.
Comment 5 Xisco Faulí 2018-06-05 19:46:55 UTC
Adding Cc: to Miklos Vajna
Comment 6 QA Administrators 2019-06-06 02:52:58 UTC Comment hidden (obsolete, spam)
Comment 7 Commit Notification 2019-08-27 07:16:03 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/28d67b792724a23015dec32fb0278b729f676736%5E%21

tdf#107776 sw ODF shape import: make is-textbox check more strict

It will be available in 6.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Commit Notification 2019-08-29 07:57:21 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

https://git.libreoffice.org/core/+/dbc90e3c2c2e56d9571aa9530939f33317c702f0%5E%21

tdf#107776 sw ODF shape import: make is-textbox check more strict

It will be available in 6.3.2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 9 Xisco Faulí 2019-09-02 14:48:14 UTC
Verified in

Version: 6.4.0.0.alpha0+
Build ID: 41cd3e8e817c8c33a13608e62eeb06ce2c6977e4
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

@Miklos, thanks for fixing this issue!