https://bugs.documentfoundation.org/show_bug.cgi?id=172794
Bug ID: 172794
Summary: Simplify data types throughout Calc and Formula
Product: LibreOffice
Version: Inherited From OOo
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: enhancement
Priority: medium
Component: framework
Assignee: [email protected]
Reporter: [email protected]
Description:
After implementing callables, I think it would be a good idea to go through the
code in the sc and formula modules (at least) and unify the plumbing for
different data types. I was thinking that FormulaToken would be the ideal class
to use as a basis, since it already accommodates all data types that are used
by formulas.
Basically, this would mean getting rid of GetString/GetValue, etc. methods in
many classes, in favor of a GetToken (or similar) method. Then, the classes
that actually use the data (especially ScInterpreter) would need to have ways
to extract particular types of data, which may be references or matrices.
Ultimately, this would greatly simplify the way different data moves around the
program, with a small cost in efficiency for the most common patterns. It would
also reduce the learning curve/complexity of adding new data types, should that
be desired.
Details would need to be worked out, of course, but for many classes the change
would be fairly straightforward, as they don't really care what type of data
they're dealing with. Those that do, as I mentioned, would need convenience
methods to retrieve specific types of data.
Steps to Reproduce:
1. Examine the code in sc or formula.
Actual Results:
There is a great deal of plumbing dedicated to moving specific types throughout
the software, and each class handles things differently.
Expected Results:
The plumbing is limited to what is required to ensure functionality, and
consistent from class to class.
Reproducible: Always
User Profile Reset: Yes
Additional Info:
I'm figuring that I'll be doing this work myself, with a series of patches that
each affect a single class (or group of classes that must be treated as one),
in a layered approach. That way each patch should be relatively easy to examine
and verify (and to account for if something goes wrong later).
I also expect that some modules besides sc and formula will need to be changed,
as well, to the extent that they interact with the formula module.
I am also aware that ScMatrix does not have a way to store any types that it
doesn't already support. For now, that can be an exception, but I have reached
out (indirectly) to the developer of mdds to request that other data types be
possible.
--
You are receiving this mail because:
You are the assignee for the bug.