Bug 91367 - replace ApiTokenSequence and UNO formulas in OOXML calc import
Summary: replace ApiTokenSequence and UNO formulas in OOXML calc import
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.6.0
Keywords: difficultyMedium, easyHack, skillCpp
Depends on:
Blocks: Dev-related
  Show dependency treegraph
 
Reported: 2015-05-18 23:47 UTC by Markus Mohrhard
Modified: 2023-05-10 09:09 UTC (History)
5 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 Markus Mohrhard 2015-05-18 23:47:28 UTC
We still use the UNO API formula and token sequences in a number of places in calc's OOXML import (sc/source/filter/oox).

This task is about replacing the existing import with one based on ScCompiler and ScTokenArray. We have done that already with a number of places and now we should finish that task.

So the few things that I noted that make these things a bit more complicated than a simple replace:

* the BIFF12 import contains a formula compiler that works on the UNO API formulas and needs to be replaced with one based on ScTokens
* translating several times between ScTokenArray and TokenSequence

I think the first step should be to switch the BIFF12 import to ScTokens (as parallel implementation) and then slowly switch all callers to ScCompiler and the new BIFF12 compiler.
Comment 1 Commit Notification 2015-05-19 00:28:49 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "master":

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

replace import with direct ScCompiler calls, related tdf#91367

It will be available in 5.0.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 2 Robinson Tryon (qubit) 2015-12-14 06:32:37 UTC Comment hidden (noise)
Comment 3 Robinson Tryon (qubit) 2016-02-18 14:51:38 UTC Comment hidden (noise)
Comment 4 Apachev Ivan 2016-03-19 18:59:02 UTC
I want try to fix this.
Comment 5 Apachev Ivan 2016-03-19 20:29:42 UTC
How I must parse formula to ScTokenArray?
For example sc/source/filter/oox/condformatbuffer.cxx:
492: ScAddress aBaseAddr = mrCondFormat.getRanges().getBaseAddress();
493: ApiTokenSequence aTokens = getFormulaParser().importFormula( aBaseAddr, rFormula ); // <------ here
494: maModel.maFormulas.push_back( aTokens );
Comment 6 jani 2016-04-19 06:25:38 UTC
A polite ping, still working on this issue?
Comment 7 Apachev Ivan 2016-05-08 16:24:57 UTC
(In reply to jan iversen from comment #6)
> A polite ping, still working on this issue?

I apologize for the absence. There was no answer to the question and I was not able to solve the problem that would apply for GSOC. Now I'm back to finish.
Comment 8 jani 2016-06-08 06:17:59 UTC
A polite ping, still working ?
Comment 9 Apachev Ivan 2016-06-12 13:38:35 UTC
I'm sorry.
I want to work on this issue, but I need a mentor. I turned to Markus Mohrhard, but he's not answering email. And I can't to google the information I need.
Comment 10 Markus Mohrhard 2016-06-12 13:46:19 UTC
(In reply to Apachev Ivan from comment #9)
> I'm sorry.
> I want to work on this issue, but I need a mentor. I turned to Markus
> Mohrhard, but he's not answering email. And I can't to google the
> information I need.

I have no email from you in my mail folder. How can I help you?
Comment 11 Apachev Ivan 2016-06-12 14:04:40 UTC
(In reply to Markus Mohrhard from comment #10)
> (In reply to Apachev Ivan from comment #9)
> > I'm sorry.
> > I want to work on this issue, but I need a mentor. I turned to Markus
> > Mohrhard, but he's not answering email. And I can't to google the
> > information I need.
> 
> I have no email from you in my mail folder. How can I help you?

I sent message you to markus.mohrhard@googlemail.com 
I can repeat my email.
Comment 12 jani 2016-07-13 05:26:11 UTC
A polite ping, still working on this patch ?
(the email you used to markus, seems correct).
Comment 13 jani 2016-08-15 06:28:23 UTC
Unassing due to lack of work
Comment 14 abstatic 2018-02-24 23:43:00 UTC
Hello,

I'd like to work on this, is this still open? If yes, then can anyone provide some code pointers?
Comment 15 Eike Rathke 2018-09-03 08:46:36 UTC
Probably best to start with is taking a look at commit c43a25a7268c1b6ab81e9ba694a1f22223a24afa mentioned in comment 1 and see if other occurrences of ScTokenConversion::ConvertToTokenArray() can be replaced similarly.
Comment 16 Commit Notification 2022-12-11 23:11:33 UTC
jsala committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/c6fcdc2a4a354f284ddb5f000572e2146a706715

tdf#91367 Remove ApiTokenSequence uses.

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