Bug 46278 - FILESAVE: visibility settings of comments for cells are not read / written correctly to/from the .xlsx format
Summary: FILESAVE: visibility settings of comments for cells are not read / written co...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.5.0 release
Hardware: Other All
: medium normal
Assignee: Noel Power
URL:
Whiteboard: BSA target:3.6.3 target:3.5.8
Keywords: regression
: 45874 (view as bug list)
Depends on:
Blocks: mab3.6
  Show dependency treegraph
 
Reported: 2012-02-19 03:29 UTC by walburg.frank
Modified: 2014-07-11 05:19 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description walburg.frank 2012-02-19 03:29:09 UTC
Problem description: 

Steps to reproduce:
1. if you open an MS Excel Sheet in the format xlsx, all comments in cells are set to "always show"
2. if you change the comments to only be shown when the mouse is moved over the cell and then you save the file again as xlsx, the setting for the comments is not saved
3. if you reopen the file again, all comments in cells will be visible again.

Current behavior:

Expected behavior:

Platform (if different from the browser): 
              
Browser: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0a1) Gecko/13.0a1 Firefox/13.0a1
Comment 1 sasha.libreoffice 2012-05-21 08:31:48 UTC
Thanks for bugreport
Advise: do not save to format xlsx meanwhile. This functionality is not finished yet. Use ods instead.
Comment 2 bfoman (inactive) 2012-07-20 09:50:47 UTC
Confirmed with:
LO 3.5.5.3 
Build ID: own W7 debug build
Windows 7 Professional SP1 64 bit

Confirmed, aside other problems:
- white background in comment boxes after saving and reloading by LO
- comment box rearranged when file reopened in Excel 2010
- much bigger resaved file - 10kb vs 500kb in my case
Comment 3 Roman Eisele 2012-09-05 15:48:13 UTC
(In reply to comment #2)
> - much bigger resaved file - 10kb vs 500kb in my case

IMHO this problem is fixed in LibreOffice 3.6.1.2; see my comment no. 8 in bug 52437. (But this is just a hint; let’s concentrate on the comment visibility problem in this present bug report!)
Comment 4 Roman Eisele 2012-09-05 16:04:33 UTC
Bug 52437 mentions the same issue as the present bug report (visibility settings of comments for cells are not saved in .xlsx format) and should be regarded as a duplicate. (I can’t mark bug 52437 as a duplicate of the present bug, of course, because bug 52437 is a complicated report involving three different issues.)
Comment 5 Michael Meeks 2012-10-02 15:59:45 UTC
This has suddenly become a popular issue :-)

It seems the visibility of comments lurks in the drawing shape:

--- foo/xl/drawings/vmlDrawing1.vml	1980-01-01 00:00:00.000000000 +0000
+++ baa/xl/drawings/vmlDrawing1.vml	1980-01-01 00:00:00.000000000 +0000
@@ -27,7 +27,7 @@
   </x:ClientData>
  </v:shape><v:shape id="_x0000_s1026" type="#_x0000_t202" style='position:absolute;
   margin-left:107.25pt;margin-top:37.5pt;width:96pt;height:55.5pt;z-index:2;
-  visibility:visible' fillcolor="#ffffe1" o:insetmode="auto">
+  visibility:hidden' fillcolor="#ffffe1" o:insetmode="auto">
   <v:fill color2="#ffffe1"/>
   <v:shadow on="t" color="black" obscured="t"/>
   <v:path o:connecttype="none"/>
@@ -42,6 +42,5 @@
    <x:AutoFill>False</x:AutoFill>
    <x:Row>3</x:Row>
    <x:Column>1</x:Column>
-   <x:Visible/>
   </x:ClientData>
  </v:shape></xml>
\ No newline at end of file

is the diff between two OOXML documents with the comment first shown, then hidden.
Comment 6 Michael Meeks 2012-10-02 16:08:33 UTC
Mark most-annoying too.
Comment 7 Michael Meeks 2012-10-02 16:41:03 UTC
Appears to be fixed in master/3.7 ; but present in 3.6 - odd.
Comment 8 Michael Meeks 2012-10-02 16:47:17 UTC
I suspect this fixed it:

http://cgit.freedesktop.org/libreoffice/core/commit/?id=56b0b2cbc0dc6538617e3f3b1005e4723ca227b0

Almost certainly this:

--- a/sc/source/filter/oox/commentsbuffer.cxx
+++ b/sc/source/filter/oox/commentsbuffer.cxx
@@ -195,8 +195,7 @@ void Comment::finalizeImport()
                         // position and formatting
                         pNoteShape->convertFormatting( xAnnoShape );
                         // visibility
-                        const ::oox::vml::ClientData* pClientData = pNoteShape->getClientData();
-                        xAnno->setIsVisible( pClientData && pClientData->mbVisible );
+                        bVisible = pNoteShape->getTypeModel().mbVisible;
                     }
                 }
             break;
Comment 9 Michael Meeks 2012-10-02 17:11:56 UTC
back-ported to -3-6 - we should load and save the correct state now.

Thanks for the report ! :-)
Comment 10 Not Assigned 2012-10-02 17:16:34 UTC
Noel Power committed a patch related to this issue.
It has been pushed to "libreoffice-3-6":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=ebc8ebaff65ac02d410c8e9e39c2776131955cd7&g=libreoffice-3-6

fdo#46278 - misc comment import/export fixes


It will be available in LibreOffice 3.6.3.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 11 Michael Meeks 2012-10-03 08:37:01 UTC
*** Bug 45874 has been marked as a duplicate of this bug. ***
Comment 12 Not Assigned 2012-10-31 20:30:46 UTC
Noel Power committed a patch related to this issue.
It has been pushed to "libreoffice-3-5":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=89b99a414e38b12df13a097ada1d6f2f72039408&g=libreoffice-3-5

rhbz#854451 fdo#46278 - misc comment import/export fixes


It will be available in LibreOffice 3.5.8.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 13 walburg.frank 2012-11-01 07:22:02 UTC
I tested it in LibreOffice 3.6.3 and it works fine.
Thank you
Comment 14 Roman Eisele 2012-11-02 09:17:48 UTC
(In reply to comment #13)
> I tested it in LibreOffice 3.6.3 and it works fine.
> Thank you

Thank you for testing! So we can change the status to VERIFIED/FIXED.