Created attachment 138139 [details] Example file made with Word 2013 The Custom size and position of the chart wall is not interpreted in DOCX files created with Microsoft Word 2013. Steps to reproduce: 1. Create a new document in Microsoft Word 2013. 2. Create a simple chart (a column chart with default settings will do) with the default values. 3. Change the size of the chart wall and move it a bit. 4. Save the file as DOCX. 5. Open the file with LibreOffice Writer. Actual results: The size of the chart wall will revert to default. Expected results: The custom size of the chart wall should be preserved.
Created attachment 138140 [details] The example file saved by LO6 alpha
Created attachment 138141 [details] The two files in Word and Writer side by side
I can confirm with Version: 6.1.0.0.alpha0+ Build ID: aa28b54ab568fb7160095bb4a2fec338b1398b43 CPU threads: 4; OS: Linux 4.4; UI render: default; VCL: gtk3; in 4.1 is the file empty.
I have analysed the root cause of problem, and it seems that size of the Diagram Shape is not known. The corresponding source code is located at: oox/source/drawingml/chart/plotareaconverter.cxx:422 in method: void PlotAreaConverter::convertPositionFromModel() THe condition: if( aLayoutConv.calcAbsRectangle( aDiagramRect ) ) try is not met, as calcAbsRectangle doesn't have information about position and size of diagram. Unfortunately I was not able to find how to receive these information. Maybe shape size should be taken as it was done for Area property: https://gerrit.libreoffice.org/#/c/57762/5/oox/source/drawingml/chart/titleconverter.cxx
(In reply to Bartosz from comment #4) > I have analysed the root cause of problem, and it seems that size of the > Diagram Shape is not known. There is this piece of xml in the original files word/charts/chart1.xml that looks relevant: <c:manualLayout><c:layoutTarget val="inner"/><c:xMode val="edge"/><c:yMode val="edge"/><c:x val="0.4291878098571012"/><c:y val="0.41305555555555556"/><c:w val="0.46664552347623223"/><c:h val="0.34062148481439819"/></c:manualLayout> Of course the file saved by LO lacks this. Maybe parsing this is the direction to go?
Jozsef Szakacs committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/+/26caf1bc59c81704f11225e3e431e412deb8c475%5E%21 tdf#114179: Custom size and position of the chart wall It will be available in 6.2.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.
*** Bug 108103 has been marked as a duplicate of this bug. ***