Schema translation previously returned factor 0 and unit string
of input quantity if there was no translation match. Restore
that behaviour as well as returned factor and unit string of
imperial schemas.
Fixes: 1155f0d752 ("Base: simplify UnitsSchemas management")
Introduce a new `ProgressIndicator` base class
(`ProgressIndicator.h`/`.cpp`) with a singleton-managed, no-op default
implementation matching OCCT’s `Message_ProgressIndicator` interface.
Update `CMakeLists.txt` to include the new sources.
Quantity parser is unable to deal with exponents written in
supersript, so change it back to ^n.
The micro prefix is expected to be U+00B5, not U+03BC, so change
it back as well. Note, that \x escape sequence reads till the
whitespace or the end of string, thus microFarad becomes
"\xC2\xB5""F
Fixes: 1155f0d752 ("Base: simplify UnitsSchemas management")
* Base: Fixed segfault on destructing cached string
Xerces default memory manager is deleted before destructing static local
variable and segfault.
---------
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
The new unit schema management is using U+2032 and U+2033 characters
for feet and inches while parser is expecting only ' and ", while
U+2032 and U+2033 are used for arcminute and arcsecond.
While this is not an ideal solution and parser should deal with both,
revert back to ASCII for now.
Fixes: 1155f0d752 ("Base: simplify UnitsSchemas management")
Fix the transcription error which occured while moving into
single structure. Default schema now uses milimeters again.
Fixes: 1155f0d752 ("Base: simplify UnitsSchemas management")
Return schemas name and description vectors sorted by number, so
index can be used later to select particular schema.
Fixes: 1155f0d752 ("Base: simplify UnitsSchemas management")
Fixes: Maintaining schemas is difficult and error-prone
- Facilitate easy schemas add, remove, change, etc.
- Remove 14 files containing approx 2,190 lines of if/else code and data
- Place data in one file (UnitsSchemasData.h) using a normalized structure (including special functions)
- Isolate and simplify data operations (code)
- Remove schemas enum to keep data independent of code
- Separate responsibilities: Specifications, data, schemas, schema
- Add schema data 'isDefault'
- Add schema data name
- Prefer algorithms to raw loops
- Add schemas unit tests
- Tweak quantity unit tests
Rename files according 7d233dc ("Gui: Rename generated lexer files
to match core naming pattern"). Note that C space errors (space
before tabs, spaces on blank lines, etc.) still need to be fixed
manually after regenerating lexer file.