diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-05-18 20:58:12 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-05-19 14:10:41 +0200 |
commit | 8901242b249dacd9fb154ec12628d73562d89f79 (patch) | |
tree | df4f6efbfb4b8fc00fe1d8c026d880485d62b47a /starmath | |
parent | d404f6c8b28bc9b298cd618ef6c0dd6d755bdc17 (diff) |
the size table in MathType can be compile-time data
Change-Id: Ie0769509e38d3414bf227d8d2b7248461bc41aa6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134598
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/source/mathtype.cxx | 22 | ||||
-rw-r--r-- | starmath/source/mathtype.hxx | 1 |
2 files changed, 12 insertions, 11 deletions
diff --git a/starmath/source/mathtype.cxx b/starmath/source/mathtype.cxx index d261f5770dfe..4df34fa1714e 100644 --- a/starmath/source/mathtype.cxx +++ b/starmath/source/mathtype.cxx @@ -24,19 +24,21 @@ #include <osl/diagnose.h> #include <sfx2/docfile.hxx> #include <sot/storage.hxx> +#include <array> + +//These are the default MathType sizes +constexpr std::array<sal_Int16, 7> aSizeTable { + 12, + 8, + 6, + 24, + 10, + 12, + 12, +}; void MathType::Init() { - //These are the default MathType sizes - aSizeTable.reserve(7); - aSizeTable.push_back(12); - aSizeTable.push_back(8); - aSizeTable.push_back(6); - aSizeTable.push_back(24); - aSizeTable.push_back(10); - aSizeTable.push_back(12); - aSizeTable.push_back(12); - /* These are the default MathType italic/bold settings If mathtype is changed from its defaults, there is nothing we can do, as this information is not diff --git a/starmath/source/mathtype.hxx b/starmath/source/mathtype.hxx index 0941edc1acb2..4293b1e0608f 100644 --- a/starmath/source/mathtype.hxx +++ b/starmath/source/mathtype.hxx @@ -153,7 +153,6 @@ private: int nPendingAttributes; sal_uInt64 nInsertion; - std::vector<sal_Int16> aSizeTable; sal_Int16 nLSize; sal_Int16 nDSize; sal_Int16 nCurSize; |