Bug 122966 - FILESAVE DOCX Shape positioned incorrectly after RT (see comment 15)
Summary: FILESAVE DOCX Shape positioned incorrectly after RT (see comment 15)
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.3.0.0.alpha0+
Hardware: All All
: high major
Assignee: Hossein
URL:
Whiteboard:
Keywords: bibisected, bisected, filter:docx, regression
: 123332 (view as bug list)
Depends on:
Blocks: VML-Shapes 123328
  Show dependency treegraph
 
Reported: 2019-01-25 12:08 UTC by NISZ LibreOffice Team
Modified: 2021-08-05 09:59 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot of the original and exported document side by side in Writer (568.63 KB, image/png)
2019-01-25 12:09 UTC, NISZ LibreOffice Team
Details
The original file (5.87 MB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2019-01-25 12:09 UTC, NISZ LibreOffice Team
Details
The saved file. (5.83 MB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2019-01-25 12:10 UTC, NISZ LibreOffice Team
Details
minimal sample (2.11 MB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2019-02-01 08:59 UTC, Xisco Faulí
Details
Even more minimal sample (2.09 MB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2020-10-21 12:45 UTC, NISZ LibreOffice Team
Details
The minimal sample saved by Writer 7.1master (2.09 MB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2020-10-21 12:46 UTC, NISZ LibreOffice Team
Details
The minimized example file and its LO-saved version in Word 2013 (343.78 KB, image/png)
2020-10-21 12:49 UTC, NISZ LibreOffice Team
Details
The minimized example file and its LO-saved version in Writer 7.1alpha (404.25 KB, image/png)
2020-10-27 10:24 UTC, NISZ LibreOffice Team
Details
proposed unit test document (replacing the 2 MB image file) (35.40 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2020-11-26 15:39 UTC, László Németh
Details
Test file with grouped shape (it consist of 4 polypolygons and 4 circles) (10.55 KB, application/vnd.oasis.opendocument.text)
2020-12-08 09:59 UTC, László Németh
Details
Screenshot of work-in-progress result (69.53 KB, image/png)
2020-12-08 10:00 UTC, László Németh
Details
The minimized example and its Writer-saved version (517.54 KB, image/png)
2021-05-17 07:47 UTC, NISZ LibreOffice Team
Details
The odt example file #167591 and its docx-version after reload (102.65 KB, image/png)
2021-05-17 07:48 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NISZ LibreOffice Team 2019-01-25 12:08:52 UTC
Description:
A shape with a picture on it gets its height changed significantly after saving it in LO as docx in the attached file.

Steps to Reproduce:
    1. Open the original file in LO.
    2. Check page 26.
    3. Save it as docx.
    4. Reopen it.
    5. Check page 26.

Actual Results:
Both the shape and picture move apart and get squashed after saving LO.

Expected Results:
They should stay the same even after saving in LO.


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 NISZ LibreOffice Team 2019-01-25 12:09:24 UTC
Created attachment 148654 [details]
Screenshot of the original and exported document side by side in Writer
Comment 2 NISZ LibreOffice Team 2019-01-25 12:09:50 UTC
Created attachment 148655 [details]
The original file
Comment 3 NISZ LibreOffice Team 2019-01-25 12:10:16 UTC
Created attachment 148656 [details]
The saved file.
Comment 4 Durgapriyanka 2019-01-25 17:40:22 UTC
Thank you for reporting the bug.I confirm the bug is present in

Version: 6.3.0.0.alpha0+
Build ID: 3c964980da07892a02d5ac721d80558c459532d0
CPU threads: 2; OS: Windows 6.1; UI render: default; VCL: win; 
TinderBox: Win-x86@42, Branch:master, Time: 2018-12-12_02:07:45
Locale: en-US (en_US); UI-Language: en-US
Calc: threaded
Comment 5 Buovjaga 2019-01-31 19:09:25 UTC Comment hidden (obsolete)
Comment 6 Xisco Faulí 2019-02-01 08:59:52 UTC
Created attachment 148817 [details]
minimal sample
Comment 7 Xisco Faulí 2019-02-01 09:17:12 UTC
(In reply to Buovjaga from comment #5)
> Bibisected with win32-5.3 to
> https://gerrit.libreoffice.org/plugins/gitiles/core/+/
> afc37372c1e1e8a865a4ad91a4b998e861ad9f02%5E!/
> 
> tdf#92076 oox - export PolyPolygonShape and PolyLineShape.
> 
> Adding Cc: to Mark Hung
> 
> Fast way to get to the last page is Ctrl+End.

Hi Buovjaga, that commit is unrelated. Maybe you put the comment to the wrong bug?

Regression introduced by:

author	Thorsten Behrens <Thorsten.Behrens@CIB.de>	2018-10-01 03:21:59 +0200
committer	Thorsten Behrens <Thorsten.Behrens@CIB.de>	2019-01-07 17:49:44 +0100
commit 3272c1eb5563f3bda2caa24f32b1018372622109 (patch)
tree b4b948fd36ed53b1d8399babf2dbe701469da412
parent 5dfd5755c709e91d2903bd7be4582f7832e89780 (diff)
related tdf#100074: prepare group shapes text input via writerfilter

Bisected with: bibisect-linux64-6.3

Adding Cc: to Thorsten Behrens
Comment 8 Buovjaga 2019-02-01 10:58:27 UTC
(In reply to Xisco Faulí from comment #7)
> (In reply to Buovjaga from comment #5)
> > Bibisected with win32-5.3 to
> > https://gerrit.libreoffice.org/plugins/gitiles/core/+/
> > afc37372c1e1e8a865a4ad91a4b998e861ad9f02%5E!/
> > 
> > tdf#92076 oox - export PolyPolygonShape and PolyLineShape.
> > 
> > Adding Cc: to Mark Hung
> > 
> > Fast way to get to the last page is Ctrl+End.
> 
> Hi Buovjaga, that commit is unrelated. Maybe you put the comment to the
> wrong bug?

Not wrong bug, just a bibisecting fail I guess. Kind of sad as it took me about 2 hours of intermittent testing & bibisecting as the file was so sluggish (or maybe my Windows VM has rotted).
Comment 9 Durgapriyanka 2019-02-12 15:32:46 UTC
*** Bug 123332 has been marked as a duplicate of this bug. ***
Comment 10 Xisco Faulí 2019-02-13 12:33:38 UTC
Shapes from attachment 149094 [details] from bug 123328 are gone after RT
Comment 11 Xisco Faulí 2020-01-14 12:20:06 UTC
Attachment 148656 [details] hangs now at import time due to 3272c1eb5563f3bda2caa24f32b1018372622109 (see bug 125460 )
Comment 12 NISZ LibreOffice Team 2020-09-03 07:49:55 UTC
Grouped shape in VML.
Comment 13 NISZ LibreOffice Team 2020-10-21 12:45:46 UTC
Created attachment 166580 [details]
Even more minimal sample
Comment 14 NISZ LibreOffice Team 2020-10-21 12:46:30 UTC
Created attachment 166581 [details]
The minimal sample saved by Writer 7.1master

Version: 7.1.0.0.alpha0+ (x64)
Build ID: e0c72e31c1d455c26110c35e8780d420e17cdea6
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: default; VCL: win
Locale: en-US (hu_HU); UI: en-US
Calc: CL
Comment 15 NISZ LibreOffice Team 2020-10-21 12:49:20 UTC
Created attachment 166582 [details]
The minimized example file and its LO-saved version in Word 2013

The image looks okay, but the shapes position is way off in Word nowadays.
Comment 16 NISZ LibreOffice Team 2020-10-27 10:24:01 UTC
Created attachment 166763 [details]
The minimized example file and its LO-saved version in Writer 7.1alpha

I forgot to add a screenshot of how the exported file looks in Writer:

Version: 7.1.0.0.alpha1+ (x64)
Build ID: b61bf7c7cfcf97a5ade6d130873af146670bc2ee
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: default; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: CL

Image and shape are separated like in Word and their size is reduced too.
Comment 17 László Németh 2020-11-26 15:39:28 UTC
Created attachment 167591 [details]
proposed unit test document (replacing the 2 MB image file)
Comment 18 László Németh 2020-12-08 09:59:22 UTC
Created attachment 167933 [details]
Test file with grouped shape (it consist of 4 polypolygons and 4 circles)
Comment 19 László Németh 2020-12-08 10:00:08 UTC
Created attachment 167934 [details]
Screenshot of work-in-progress result
Comment 20 Xisco Faulí 2021-03-31 14:08:39 UTC
Dear Dániel Arató (NISZ),
This bug has been in ASSIGNED status for more than 3 months without any
activity. Resetting it to NEW.
Please assign it back to yourself if you're still working on this.
Comment 21 NISZ LibreOffice Team 2021-05-17 07:47:14 UTC
Created attachment 172078 [details]
The minimized example and its Writer-saved version

In recent version the "green border line" shape looks good even after save, but the "internal map" shape looks squished:

Version: 7.2.0.0.alpha1+ (x64) / LibreOffice Community
Build ID: 91330c503b7eb91d777978018b66890af87cf8f5
CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: default; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: CL
Comment 22 NISZ LibreOffice Team 2021-05-17 07:48:21 UTC
Created attachment 172079 [details]
The odt example file #167591 and its docx-version after reload

This also looks squished in the same version.
Comment 23 Hossein 2021-07-21 12:51:06 UTC
Loading the DOCX file is very slow, which can be a serious issue. Other than that, I can not reproduce this bug with the latest master:

Version: 7.3.0.0.alpha0+ / LibreOffice Community
Build ID: 4ea92c9a591825b2b1f6ebe5c1fc9d00e75e2e5f
CPU threads: 8; OS: Linux 5.8; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 24 Hossein 2021-07-21 18:27:22 UTC
I've bibisected the fix using https://bibisect.libreoffice.org/linux-64-7.3. This bug is fixed in this commit:

tdf#141786 correct position of child elements in group

commit    b33634a5c07c8f7032967d8e939100a50e0152ae
author	  Regina Henschel <rb.henschel@t-online.de> Sun Jul 11 15:31:58 2021 +0200
committer Regina Henschel <rb.henschel@t-online.de> Tue Jul 13 10:56:31 2021 +0200
tree      b6235c7e330d0cf3e6588494ef8704b3bec6db19
parent    f9982c24066d6dd2f938cc20176af0f196bc018f

Thank you Regina Henschel!

I can not call this bug a duplicate of tdf#141786, because shapes are not rotated here.
Comment 25 Xisco Faulí 2021-07-21 22:07:32 UTC
(In reply to Hossein from comment #24)
> I've bibisected the fix using https://bibisect.libreoffice.org/linux-64-7.3.
> This bug is fixed in this commit:
> 
> tdf#141786 correct position of child elements in group
> 
> commit    b33634a5c07c8f7032967d8e939100a50e0152ae
> author	  Regina Henschel <rb.henschel@t-online.de> Sun Jul 11 15:31:58 2021
> +0200
> committer Regina Henschel <rb.henschel@t-online.de> Tue Jul 13 10:56:31 2021
> +0200
> tree      b6235c7e330d0cf3e6588494ef8704b3bec6db19
> parent    f9982c24066d6dd2f938cc20176af0f196bc018f
> 
> Thank you Regina Henschel!
> 
> I can not call this bug a duplicate of tdf#141786, because shapes are not
> rotated here.

Hi Hossein,
I've just compared the exported documents before and after the mentioned commit and the only difference is the value of a:off in a:xfrm.

before

<a:xfrm>
  <a:off x="0" y="12600"/>
  <a:ext cx="4428000" cy="2757240"/>
</a:xfrm>

after

<a:xfrm>
  <a:off x="816120" y="8640"/>
  <a:ext cx="4428000" cy="2757240"/>
</a:xfrm>

Looking at the unittests added in b33634a5c07c8f7032967d8e939100a50e0152ae to oox/qa/unit/export.cxx, both check the different values of a:off, so I do believe this is indeed a duplicate of bug 141786

*** This bug has been marked as a duplicate of bug 141786 ***
Comment 26 Regina Henschel 2021-07-23 12:22:53 UTC
When I saw the error in export of polyline in the code, I have fixed it. I did not know, that there exists this bug report for it. So this is not really a duplicate to bug 141786, but it is indeed fixed with the same commit.
Comment 27 Buovjaga 2021-08-01 05:42:05 UTC
(In reply to Hossein from comment #23)
> Loading the DOCX file is very slow, which can be a serious issue. Other than
> that, I can not reproduce this bug with the latest master:

Just a note on this: I only see the slowness with a debug build, so we should ignore it (I assume you were also running your own build with debug stuff)
Comment 28 NISZ LibreOffice Team 2021-08-05 09:59:27 UTC
Verified in: 

Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: ad1b12686da88bea57582df10fa85268ada209b8
CPU threads: 4; OS: Windows 10.0 Build 17134; UI render: default; VCL: win
Locale: hu-HU (hu_HU); UI: hu-HU
Calc: threaded