starmath/source/mathtype.cxx | 22 ++++++++++++---------- starmath/source/mathtype.hxx | 1 - 2 files changed, 12 insertions(+), 11 deletions(-)
New commits: commit 8901242b249dacd9fb154ec12628d73562d89f79 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Wed May 18 20:58:12 2022 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Thu May 19 14:10:41 2022 +0200 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.gran...@collabora.co.uk> 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;