Bug 115030 - Writer import docx math formula "dot" and "ddot" are both translated as "acute"
Summary: Writer import docx math formula "dot" and "ddot" are both translated as "acute"
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Formula Editor (show other bugs)
Version:
(earliest affected)
5.0 all versions
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.1.0 target:7.0.0
Keywords: difficultyBeginner, easyHack, skillCpp
Depends on:
Blocks:
 
Reported: 2018-01-15 21:08 UTC by Pierre C
Modified: 2020-04-28 19:57 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
dot example (12.71 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2018-01-15 21:08 UTC, Pierre C
Details
ddot problem example (12.83 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2018-01-18 17:34 UTC, Pierre C
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pierre C 2018-01-15 21:08:11 UTC
Created attachment 139118 [details]
dot example

- Open attachment, with writer. this is a simple letter with a dot symbol

- when writer translate the formula, it is not the same as in DOCX

The formula should use "dot" instead of "acute" math command
Comment 1 Mike Kaganski 2018-01-16 07:42:11 UTC
Confirmed with Version: 6.0.0.2 (x64)
Build ID: 06b618bb6f431d27fd2def25aa19c833e29b61cd
CPU threads: 4; OS: Windows 10.0; UI render: default; 
Locale: ru-RU (ru_RU); Calc: 

The attachment 139118 [details] contains <m:accPr> element with <m:chr> having value of UTF-8 character CC87, which is Unicode Character 'COMBINING DOT ABOVE' (U+0307) - see http://www.fileformat.info/info/unicode/char/0307.
Comment 2 Mike Kaganski 2018-01-16 08:36:16 UTC
Code pointer: SmOoxmlImport::handleAcc() in starmath/source/ooxmlimport.cxx
Comment 3 Pierre C 2018-01-18 17:34:57 UTC
Created attachment 139193 [details]
ddot problem example

Same problem with ddot translated as dot to
This problem in more annoying because there is no way to differentiate dot and ddot
Comment 4 bhm 2018-01-22 04:07:39 UTC
Ekansh Jha, are you still working on this? I have a fix ready to commit, but don't want to step on any toes.
Comment 5 Ekansh Jha 2018-01-22 08:28:02 UTC
(In reply to bhm from comment #4)
> Ekansh Jha, are you still working on this? I have a fix ready to commit, but
> don't want to step on any toes.

Actually I have already commited the patch and the patch also solves the problem but it needs some improvisation according to reviewer, So I would like to take it further, and if I don't work on it, I will inform you.
Comment 6 Commit Notification 2018-01-24 19:39:24 UTC
ekuiitr committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=412d66c05fda48aeb820a035eee3fd1680a1b7ff

tdf#115030 Formula use "dot" instead of "acute" math command.

It will be available in 6.1.0.

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 7 Pierre C 2018-01-25 14:07:29 UTC
Fine !
It works fine with latest dev 6.1. I hope it can be back-ported to LO 6.0.x

Just one think

AFAIK theses lines :

 default:
    acc = "acute";
    SAL_WARN( "starmath.ooxml", "Unknown m:chr in m:acc \'" << accChr << "\'" );
 break;

Mean that when a DOCX formula command is unknown, it'll be an "acute" command ?

That seems strange no ? Why not something like :

Color red "??" showing something gone wrong

Nevertheless good job
Comment 8 Commit Notification 2020-04-28 19:57:11 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/4abaf53a24b9e0cd8a73cad881977278e35cb633

tdf#115030: sw: Add unittest

It will be available in 7.0.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.