Description: I created a spreadsheet document with a few labels and values, then I created a chart in another tab using these labels and values. I added a chart title and titles to both axes. I saved the document and closed LibreOffice. When I reopened the document the titles of both axes hold an empty line and some spaces at the beginning of the second line I haven't entered when I created the chart. I corrected the axes titles and saved the document again. But when I next opened it the titles are again changed. In other situations (more complex charts) I even saw that the chart tile was changed, and I also encountered to have several newlines in the axes titles. Steps to Reproduce: 1.Create a new spreadsheet document with a few labels and values. 2.From this data table create a chart and add titles to the chart and the axes. 3.Save and close the document, afterwards reopen the document. Actual Results: Some or all titles in the chart were modified (newlines and spaces inserted). Expected Results: The titles in the chart should not be changed. Reproducible: Always User Profile Reset: No Additional Info: none
Created attachment 201530 [details] LibreOffice calc document used for testing this attachment holds the LibreOffice calc document used for testing - Tabelle 1: labels and values used for creating the chart - Tabelle 2: the chart itself note that I created borders around all titles because this makes it simpler to see whether they have been modified during saving or opening the document
Created attachment 201531 [details] PDF document showing the chart after creation this PDF document shows how the chart is supposed to look it has been created after creating the chart and before closing the document
Created attachment 201532 [details] PDF document showing the chart after reopening the document this PDF document shows how the chart really looks after reopening the document it has been created immediately after reopening the document
Thank you for reporting the bug. I can not reproduce the bug in Version: 25.2.4.3 (X86_64) / LibreOffice Community Build ID: 33e196637044ead23f5c3226cde09b47731f7e27 CPU threads: 16; OS: Windows 11 X86_64 (10.0 build 26100); UI render: Skia/Vulkan; VCL: win Locale: fi-FI (fi_FI); UI: en-GB Calc: CL threaded
I have / use Version: 25.2.4.3 (X86_64) / LibreOffice Community Build ID: 33e196637044ead23f5c3226cde09b47731f7e27 CPU threads: 12; OS: Windows 10 X86_64 (10.0 build 19045); UI render: Skia/Raster; VCL: win Locale: de-DE (de_DE); UI: de-DE Calc: threaded same build ID, but otherwise some differences... if you open the calc document in comment #1, what do you get? does it looks like in the first PDF (comment #2) or in the second PDF (comment #3)? if it looks like the first PDF then I have no idea why I get something different but if it looks like the second PDF then newlines and spaces were inserted in your version as well
(In reply to Johannes from comment #5) > if you open the calc document in comment #1, what do you get? > does it looks like in the first PDF (comment #2) or in the second PDF > (comment #3)? > It looks like in the second PDF and I can see the extra new lines and spaces in the titles. However, I created a chart that is similar to the one in the document used for testing and added titles to the chart and the axis as told in the "Steps to reproduce". I then saved the document and reopened it and I did not notice any extra newlines or spaces in the titles. I also tested this bug with the following method: I removed the extra newlines and whitespaces from the titles in the chart that was in the attached document. Then I saved the document and reopened it and did not notice any extra spaces or newlines in the titles. Tested with: Version: 25.2.5.2 (X86_64) / LibreOffice Community Build ID: 03d19516eb2e1dd5d4ccd751a0d6f35f35e08022 CPU threads: 16; OS: Windows 11 X86_64 (10.0 build 26100); UI render: Skia/Vulkan; VCL: win Locale: fi-FI (fi_FI); UI: en-GB Calc: CL threaded
I tested again with Version: 25.2.5.2 (X86_64) / LibreOffice Community Build ID: 03d19516eb2e1dd5d4ccd751a0d6f35f35e08022 CPU threads: 12; OS: Windows 10 X86_64 (10.0 build 19045); UI render: Skia/Raster; VCL: win Locale: de-DE (de_DE); UI: de-DE Calc: threaded I created a new spreadsheet document with the same values in the first tab (copied by means of "copy & paste"), then I defined a diagram similiar to my first test. Everything looked fine and I stored the document and made a copy of it. When I reopened the document additional empty lines were added to the labels for both axes, but not to the title of the diagram. I saved the document again without changing anything. Afterwards I opened the ODS file saved after its creation and the current ODS file with 7-zip. I then opened the "Object 1\content.xml" (holds the definition of the diagram) with a text editor and checked for differences between the initial and the final state. The XML statements for the chart title are identical: <chart:title svg:x="6.692cm" svg:y="0.316cm" chart:style-name="ch2"> <text:p>Diagramm 1</text:p> </chart:title> But the XML statements for both axes titels are different, first the initial XML statements: <chart:title svg:x="8.059cm" svg:y="8.019cm" chart:style-name="ch2"> <text:p> <text:span text:style-name="T1">Label</text:span></text:p> </chart:title> <chart:title svg:x="0.451cm" svg:y="5.038cm" chart:style-name="ch5"> <text:p> <text:span text:style-name="T1">Werte</text:span></text:p> </chart:title> And then the XML statements in the final document: <chart:title svg:x="7.89cm" svg:y="7.319cm" chart:style-name="ch2"> <text:p> <text:span text:style-name="T1">Label</text:span></text:p> </chart:title> <chart:title svg:x="0.451cm" svg:y="5.207cm" chart:style-name="ch5"> <text:p> <text:span text:style-name="T1">Werte</text:span></text:p> </chart:title> Note that there is an empty line (in fact it holds a number of white spaces) between the "<text:p>" statements and the "<text:span ...>" statement, and I strongly assume that these white spaces finally cause the modifications of the labels for both axes. It looks as if LibreOffice adds these white spaces and the newline to the labels when it reads the ODS document if the following XML statement sequence is found: <text:p> <text:span text:style-name=...>...</text:span></text:p> But a XML statement like "<text:p>Diagramm 1</text:p>" is not modified. When I reformat the diagram title e.g. with another font, also this title will be embedded into "<text:span ...>" and "</text:span>", and then white spaces and a newline will be added to the diagram title too when the document is opened for the next time.
I was able to reproduce this bug when I save the file in "Flat XML ODF Spreadsheet" format. But I am unable to reproduce this bug when I save the file in "ODF Spreadsheet" format. Tested with: Version: 25.8.1.1 (X86_64) Build ID: 54047653041915e595ad4e45cccea684809c77b5 CPU threads: 16; OS: Windows 11 X86_64 (build 26100); UI render: Skia/Vulkan; VCL: win Locale: fi-FI (fi_FI); UI: en-GB Calc: CL threaded