<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - unable to display chr(10) or chr(13) in a cell in calc when inserted by a macro"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=104902#c7">Comment # 7</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - unable to display chr(10) or chr(13) in a cell in calc when inserted by a macro"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=104902">bug 104902</a>
              from <span class="vcard"><a class="email" href="mailto:himajin100000@gmail.com" title="himajin100000@gmail.com">himajin100000@gmail.com</a>
</span></b>
        <pre>Just a guess:

probably cell content is displayed as Rich Text, While Formula bar is for
normal string.

When Enter Key is manually pressed with Shift key pressed, InsertLineBreak is
executed. 

<a href="https://opengrok.libreoffice.org/xref/core/editeng/source/editeng/editeng.cxx?r=39214c54#1233">https://opengrok.libreoffice.org/xref/core/editeng/source/editeng/editeng.cxx?r=39214c54#1233</a>

this sets special attribute EE_FEATURE_LINEBR

<a href="https://opengrok.libreoffice.org/xref/core/editeng/source/editeng/impedit2.cxx?r=39214c54#3031">https://opengrok.libreoffice.org/xref/core/editeng/source/editeng/impedit2.cxx?r=39214c54#3031</a>

<a href="https://opengrok.libreoffice.org/xref/core/editeng/source/editeng/editdoc.cxx?r=39214c54#345">https://opengrok.libreoffice.org/xref/core/editeng/source/editeng/editdoc.cxx?r=39214c54#345</a>

and later this will be used to create lines.

<a href="https://opengrok.libreoffice.org/xref/core/editeng/source/editeng/impedit3.cxx?r=bb748ba4#1025">https://opengrok.libreoffice.org/xref/core/editeng/source/editeng/impedit3.cxx?r=bb748ba4#1025</a>

CreateLines is called from FormatDoc
<a href="https://opengrok.libreoffice.org/xref/core/vcl/source/edit/texteng.cxx?r=73e3604f#1514">https://opengrok.libreoffice.org/xref/core/vcl/source/edit/texteng.cxx?r=73e3604f#1514</a>

and FormatDoc is called from TextEngine::ImpPaint
<a href="https://opengrok.libreoffice.org/xref/core/vcl/source/edit/texteng.cxx?r=73e3604f#1881">https://opengrok.libreoffice.org/xref/core/vcl/source/edit/texteng.cxx?r=73e3604f#1881</a></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>