Bug 126724 - FILEOPEN DOCX Custom chart axis title position is imported incorrectly
Summary: FILEOPEN DOCX Custom chart axis title position is imported incorrectly
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.4.0.0.alpha1+
Hardware: All All
: medium normal
Assignee: Balázs Varga
URL:
Whiteboard: target:6.4.0
Keywords: bibisected, bisected, regression
Depends on:
Blocks: OOXML-Chart
  Show dependency treegraph
 
Reported: 2019-08-06 09:30 UTC by NISZ LibreOffice Team
Modified: 2019-10-16 11:01 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file from Word (32.80 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2019-08-06 09:31 UTC, NISZ LibreOffice Team
Details
Screenshot of the original document side by side in Word and Writer (72.52 KB, image/png)
2019-08-06 09:32 UTC, NISZ LibreOffice Team
Details
Example file from Writer (18.25 KB, application/binary)
2019-08-06 09:32 UTC, NISZ LibreOffice Team
Details
The second example file saved by Writer (18.14 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2019-08-06 09:33 UTC, NISZ LibreOffice Team
Details
The second example file in Writer and the exported docx in Word – export looks good (68.68 KB, image/png)
2019-08-06 09:33 UTC, NISZ LibreOffice Team
Details
The second example file in Writer and the exported docx – import look bad (80.40 KB, image/png)
2019-08-06 09:34 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-08-06 09:30:49 UTC
Description:
It is possible in MSO / LO to add axis titles and position them arbitrarily. When opening a file with custom axis titles they are imported at the top left corner of the chart instead of the custom position set.
Interestingly when we create a chart with custom axis titles in Writer and save it to docx Word opens it with the axis titles shown in the correct custom position.


Steps to Reproduce:
1.	In Word create a stock chart and turn on axis titles
2.	Position the axis titles arbitrarily
3.	Save the file as docx and open it in Writer


Actual Results:
The axis titles appear in the top left corner of the chart, and are not available for editing. This is a regression, before they were imported with the default position.

Expected Results:
Position retained on open.


Reproducible: Always


User Profile Reset: No



Additional Info:
LibreOffice details:
Version: 6.4.0.0.alpha0+ (x86)
Build ID: 382aceb80d3c0f420d51762e1f88eee2334ff11b
CPU threads: 4; OS: Windows 6.3; UI render: default; VCL: win; 
TinderBox: Win-x86@42, Branch:master, Time: 2019-07-21_23:45:18
Locale: hu-HU (hu_HU); UI-Language: en-US
Calc: CL

Bibisected using bibisect-win64-6.4 to:
https://gerrit.libreoffice.org/plugins/gitiles/core/+/48480d4f19d2fb92ca4ae0527eec4753cdc439c0

author
Noel Grandin <noel.grandin@collabora.co.uk> Mon Jul 15 09:44:10 2019 +0200 

committer
Noel Grandin <noel.grandin@collabora.co.uk> Mon Jul 15 18:07:29 2019 +0200

Adding CC to: Noel Grandin
Comment 1 NISZ LibreOffice Team 2019-08-06 09:31:48 UTC
Created attachment 153165 [details]
Example file from Word
Comment 2 NISZ LibreOffice Team 2019-08-06 09:32:18 UTC
Created attachment 153166 [details]
Screenshot of the original document side by side in Word and Writer
Comment 3 NISZ LibreOffice Team 2019-08-06 09:32:42 UTC
Created attachment 153167 [details]
Example file from Writer
Comment 4 NISZ LibreOffice Team 2019-08-06 09:33:22 UTC
Created attachment 153168 [details]
The second example file saved by Writer
Comment 5 NISZ LibreOffice Team 2019-08-06 09:33:46 UTC
Created attachment 153169 [details]
The second example file in Writer and the exported docx in Word – export looks good
Comment 6 NISZ LibreOffice Team 2019-08-06 09:34:07 UTC
Created attachment 153170 [details]
The second example file in Writer and the exported docx – import look bad
Comment 7 Xisco Faulí 2019-08-06 10:16:13 UTC
Reproduced in

Version: 6.4.0.0.alpha0+
Build ID: 967644f09b8b7abe3b86d1647820f14e0196f8b4
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
Comment 8 Noel Grandin 2019-09-30 07:46:17 UTC
Balázs Varga, if you are wanting to track this down, your best bet is to adjust the code in 
   tools::Rectangle::getHeight
slightly and set a breakpoint when nBottom == RECT_EMPTY and see what the chart2 code does.
Comment 9 Balázs Varga 2019-09-30 07:49:28 UTC
(In reply to Noel Grandin from comment #8)
> Balázs Varga, if you are wanting to track this down, your best bet is to
> adjust the code in 
>    tools::Rectangle::getHeight
> slightly and set a breakpoint when nBottom == RECT_EMPTY and see what the
> chart2 code does.

Thank you very much, Noel. I'll see what happens there.
Comment 10 Commit Notification 2019-10-03 08:04:24 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/86e4d68e62c6291ef386b5fcf0f8912989f8e661

tdf#127907 tdf#126724 Chart DOCX import: fix axis title position

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 11 Xisco Faulí 2019-10-16 11:01:13 UTC
Verified in

Version: 6.4.0.0.alpha0+
Build ID: e2d82611088677f8ec9f038639567f2d7c699b5e
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

@Balázs Varga, thanks for fixing this issue!