Created attachment 141676 [details] Example file from Excel 2010 Drawing Objects/shapes from the comments object multiply every time, when an XLSX file with comments is saved in LibreOffice Calc. The bug only occurs if the file was saved in LibreOffice Calc, then in Microsoft Excel and then open/saved in LibreOffice Calc again. It does not matter however, if it was originally created in LibreOffice Calc or Microsoft Excel, whether the comments were added in Calc or Excel. Steps to reproduce: 1. Create a new XLSX file in Microsoft Excel 2010/2013/216 and add a comment to a cell. Save the file. 2. Open the file with LibreOffice Calc (turn on the Navigator, just see what is happening), add a comment to another cell and save as *.XLSX 3. Open the file with Microsoft Excel and add a comment to a cell, and save as *.XLSX 4. Open the file with LibreOffice Calc and watch the navigator: there will be two Drawing Objects, but we cannot see them in the spreadsheet. We only see if we want to print the spreadsheet. (Print Preview) 5. Save the file as *.XLSX and reload the file: the original Drawing Objects name will appear as “CustomShape1”. 6. If we open this file with Microsoft Excel and save again, and then import/export with LibreOffice Calc: the Drawing Objects multiply again. Actual results: Every time we open and save an *.xlsx file with LibreOffice Calc, which was saved earlier with Microsoft Excel and contains comments, the Drawing Objects will be duplicated and we cannot print normally the spreadsheet, only if we turn off the Drawing Objects print checkbox. We tried to look into the generated XLSX files. We see that for each comment a new drawing object is created into xl/drawings/vmlDrawing1.vml. This file when saved/created in Calc is considered broken by Excel, then the object contained in it is moved into xl/drawings/drawing1.xml and a new vmlDrawing1.vml is created. Again opening and saving the file in Calc, this vmlDrawing1.vml file gets broken again, and Excel adds its content to drawing1.xml and creates a new vmlDrawing1.vml. Expected results: There should no drawing object appear in the Navigator after we open a spreadsheet with comments. Version: 6.1.0.0.alpha0+ Build ID: aa45e2745f14c5626fe163939dc7d101efe9d1cd CPU threads: 4; OS: Windows 6.1; UI render: default; TinderBox: Win-x86@42, Branch:master, Time: 2018-04-25_00:27:22 Locale: hu-HU (hu_HU); Calc: group
Created attachment 141678 [details] The example file in Calc 6.1
Created attachment 141679 [details] The example file saved by LO6.1, extended with a new comment
Created attachment 141682 [details] The example file as saved by Calc
Created attachment 141683 [details] The example file saved after Calc by Excel 2010
Created attachment 141685 [details] Importing the roundtripped file to Calc
Created attachment 141686 [details] Saving and reopening the roundtripped file in Calc
Created attachment 141690 [details] Importing the roundtripped file to Calc - after a second RT
Created attachment 141691 [details] Saving and reopening the roundtripped file in Calc - after a second RT
Created attachment 141693 [details] The original file after a few roundtrips to illustrate the growth of objects
Created attachment 141694 [details] The original file after a few roundtrips, and with print preview. The hidden drawing objects appear on top in the print preview hiding the first pages contents.
Created attachment 141695 [details] The .vml file from the original example file
Created attachment 141696 [details] The .vml file from the example file after a Calc export
Repro from scratch Win 8.1 32-bit MSO 2013 LibO Version: 6.1.0.0.alpha1+ Build ID: 23c5125148a8110d88385b29570bf0b7d4400458 CPU threads: 4; OS: Windows 6.3; UI render: default; TinderBox: Win-x86@42, Branch:master, Time: 2018-05-12_00:15:25 Locale: fi-FI (fi_FI); Calc: group
Created attachment 147035 [details] We have retested this problem and it seems to be fixed in version 6.1.2.
Created attachment 147036 [details] We have retested this problem and it seems to be fixed in version 6.1.2.
Errr, a small update. My colleague who retested this used Excel 2007 on his machine, which created no errors. But newer Excel versions are still setting aside the VML files created with LO, so: back to new, sorry for the noise.
This report is getting out of control, 15 attachments so far... it makes it difficult for QA and devs to investigate it. Which files should I use? Could someone mention the specific steps to reproduce it like, open attachment <ID> ? Thanks in advance
(In reply to Xisco Faulí from comment #17) > This report is getting out of control, 15 attachments so far... it makes it > difficult for QA and devs to investigate it. Which files should I use? Could > someone mention the specific steps to reproduce it like, open attachment > <ID> ? > Thanks in advance The description has steps to repro, if you have MSO. I just used them in my comment 13.
Just confirmed against a file that was putting many shape objects onto the sheets which contained comments when saved by LO Calc. This was using the most recent release of LO version 6.1.4.2. Sure enough, deleting all the comments from the sheet and saving the file again, the shape objects were not present when the file was reopened. Of course, I had manually deleted all the shape objects beforehand. It does not matter if the comment was written in Excel or LO Calc. This bug has been present for a very long time and has caused untold trouble giving people Calc files saved by LO where the extra shape objects were added to the file because it contained comments. This bug really needs to be fixed with a high priority. Thanks.
Appears to be fixed in 1:6.1.4-0ubuntu0.18.10.1 running Kubuntu 18.10.
(In reply to miltonh26 from comment #20) > Appears to be fixed in 1:6.1.4-0ubuntu0.18.10.1 running Kubuntu 18.10. @Gabor, could you please doublecheck ?
(In reply to Xisco Faulí from comment #21) > (In reply to miltonh26 from comment #20) > > Appears to be fixed in 1:6.1.4-0ubuntu0.18.10.1 running Kubuntu 18.10. > > @Gabor, could you please doublecheck ? Sure, but since he mentions Kubuntu, I don't have huge hopes. It's *Excel* that creates phantom objects from our slightly broken vml files. My team really needs to solve this mystery :).
Created attachment 149312 [details] Result of a roundtrip on the original file with current master My team still sees this happening on a full LO-Excel-LO RT with the master bibisect repo.
Proposed fix: https://gerrit.libreoffice.org/#/c/78831/
tdf#117274 XLSX export: fix VML comment shape type id to avoid shape multiplication in a mixed environment. MSO needs the special unescaped VML comment shape type id "_x0000_t202" to avoid of generating also DrawingML shapes from the VML ones. Calc export escaped the shape type ids ("_x005F_x0000_t202"), keeping also the DrawingML shapes, so every round trip between LO and MSO resulted more and more broken shapes in the document. See also commit ea7274259a211170ee9f5a8714a2f9acd8bed6d8 "tdf#114842 Fix comment shape export for Calc".
László Németh committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/+/c5d37d324cd6d17114c209de1862344ad58a1d93%5E%21 tdf#117274 XLSX export: fix VML comment shape type id 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.
Created attachment 154994 [details] Roundtripped original file with LO master - Excel Seems to work fine in: Version: 6.4.0.0.alpha0+ (x86) Build ID: 489eef894e7034873ad262f9dfca554022db1b09 CPU threads: 4; OS: Windows 6.3; UI render: default; VCL: win; TinderBox: Win-x86@42, Branch:master, Time: 2019-10-01_23:43:38 Locale: hu-HU (hu_HU); UI-Language: en-US Calc: CL
Created attachment 154995 [details] Screenshot of the example files in Calc after roundtrip Attachment #154994 [details] in Calc master has no unwanted drawing objects unlike those seen on attachment #141690 [details]
It says "This patchset was cherry picked to branch libreoffice-6-3 as commit baf69bba158f4bfb24f5794b6b248b328387eba7" but not here.
László Németh committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/579db0d2d3d2ddf5a5f8feaa2e7cc4dde81d7701 cleanup "tdf#117274 XLSX export: fix VML comment shape type id" It will be available in 6.5.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.
László Németh committed a patch related to this issue. It has been pushed to "libreoffice-6-4": https://git.libreoffice.org/core/commit/35191846feb19751e247cd228d7dcc6ddfdf2c8b cleanup "tdf#117274 XLSX export: fix VML comment shape type id" It will be available in 6.4.0.1. 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 129831 has been marked as a duplicate of this bug. ***
*** Bug 130255 has been marked as a duplicate of this bug. ***
*** Bug 127051 has been marked as a duplicate of this bug. ***
*** Bug 130527 has been marked as a duplicate of this bug. ***
Hello Gabor, László. I kindly ask you to: 1. explain what happens with already wrong files like attachment 155840 [details] 2. see if bug 128818 is a duplicate or it needs some fix 3. backport to 6.3.
(In reply to Timur from comment #36) > Hello Gabor, László. > I kindly ask you to: > 1. explain what happens with already wrong files like attachment 155840 [details] > [details] > 2. see if bug 128818 is a duplicate or it needs some fix > 3. backport to 6.3. Hi Timur Already wrong files like attachment #155840 [details] can be manually repaired in 6.4 by: - Opening the Navigator - Double clicking on the drawing objects named "AutoShape xx" to highlight them and pressing Delete on the keyboard - Saving the file and reloading in Excel or Calc will not show any of those white squares. The bug #128818 is definitely a duplicate. Backport to 6.3 was not approved (but not explicitly rejected either) at https://gerrit.libreoffice.org/c/core/+/78872 Cheers Gabor
*** Bug 128818 has been marked as a duplicate of this bug. ***
*** Bug 135400 has been marked as a duplicate of this bug. ***
*** Bug 121445 has been marked as a duplicate of this bug. ***
Bug is recurring again as originally described in 2018. It was fixed and now is a regressive bug. LO 7.1.3.2 Ubuntu 20.04
(In reply to miltonh26 from comment #43) > Bug is recurring again as originally described in 2018. It was fixed and now > is a regressive bug. > > LO 7.1.3.2 > Ubuntu 20.04 Then please open a new report for it