Bug 66086

Summary: Commands wideslash, widebslash and overstrike are not correctly exported to MathML
Product: LibreOffice Reporter: Frédéric Wang <fred.wang>
Component: Formula EditorAssignee: Frédéric Wang <fred.wang>
Status: RESOLVED FIXED    
Severity: normal    
Priority: medium    
Version: 4.2.0.0.alpha0+ Master   
Hardware: All   
OS: All   
See Also: https://bugs.freedesktop.org/show_bug.cgi?id=65765
Whiteboard: target:4.2.0
Crash report or crash signature: Regression By:
Attachments: testcase

Description Frédéric Wang 2013-06-23 15:18:08 UTC
Test case:

{x wideslash y} newline
{x widebslash y} newline
overstrike {sometext}

The result is

  <mtable>
   <mtr>
    <mtd>
     <mrow>
      <mrow/>
     </mrow>
    </mtd>
   </mtr>
   <mtr>
    <mtd>
     <mrow>
      <mrow/>
     </mrow>
    </mtd>
   </mtr>
   <mtr>
    <mtd>
     <mrow>
      <mrow>
       <mi mathvariant="italic">sometext</mi>
      </mrow>
     </mrow>
    </mtd>
   </mtr>
  </mtable>

Proposal:

- wideslash can be exported as <mfrac bevelled="true">
- There is not any <mfrac> equivalent for widebslash, so perhaps just use an <mo>\</mo>.
- overstrike {sometext} can be exported as <menclose notation="horizontalstrike">.
Comment 1 Frédéric Wang 2013-06-23 19:37:20 UTC
Created attachment 81282 [details]
testcase

I've submitted a patch for review, which implements the proposal:

https://gerrit.libreoffice.org/4465

I attach an HTML page with the new generated MathML code for the test case (as usual, you can open it in Firefox). Note that I've merged my fix for bug 66024 before working on this new bug because there could have been code overlap between the widehat/widevec/widetilde and the overstrike commands in SmXMLExport::ExportAttributes. However, I now think the two patches can apply independently. I've also prepared some changes to import menclose/mfrac@bevelled in the future. I don't plan to do that in that bug as I'm more concerned about the MathML export at the moment.
Comment 2 Jorendc 2013-06-24 13:23:17 UTC
Due the fact you already submitted a patch and are an expert on this domain, I mark this bug as NEW right away.

Kind regards,
Joren
Comment 3 Frédéric Wang 2013-06-27 21:57:05 UTC
Marking these bugs assigned since I've already taken them.
Comment 4 Commit Notification 2013-06-28 09:57:31 UTC
Frederic Wang committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=3b3ec32358aebd81ef5385f48dbf3ee4c93649e8

fdo#66086 - MathML export: wideslash, widebslash and overstrike



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.