<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Enhancement: Format - Comments... should be greyed out when there are no comments"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=137568#c5">Comment # 5</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Enhancement: Format - Comments... should be greyed out when there are no comments"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=137568">bug 137568</a>
              from <span class="vcard"><a class="email" href="mailto:heiko.tietze@documentfoundation.org" title="Heiko Tietze <heiko.tietze@documentfoundation.org>"> <span class="fn">Heiko Tietze</span></a>
</span></b>
        <pre>(In reply to sdc.blanco from <a href="show_bug.cgi?id=137568#c4">comment #4</a>)
<span class="quote">> Can you give me some code pointers?  Thanks.</span >

+++ b/sw/source/uibase/shells/textfld.cxx
@@ -803,6 +803,8 @@ void SwTextShell::StateField( SfxItemSet &rSet )
                     rSet.InvalidateItem( FN_DELETE_COMMENT );
                     rSet.InvalidateItem( FN_HIDE_NOTE );
                 }
+                if (!pPostItMgr->HasNotes())
+                    rSet.DisableItem( FN_FORMAT_ALL_NOTES );
             }
             break;

(Please double check the logic)</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>