From 4b055a51c501cec3f71600c1b87aa1fad85dd5af Mon Sep 17 00:00:00 2001 From: dante Date: Fri, 5 Feb 2021 13:33:24 +0100 Subject: Optimize starmath color search Needs Jenkins resume. Details: Uses ordered search Avoid useless data copy. Change-Id: I100dc08451788e705a0109f6c73172cb6964306b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110473 Tested-by: Jenkins Reviewed-by: Noel Grandin --- starmath/inc/mathml/starmathdatabase.hxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'starmath/inc/mathml') diff --git a/starmath/inc/mathml/starmathdatabase.hxx b/starmath/inc/mathml/starmathdatabase.hxx index 096a38b1e4c2..b40a932809a4 100644 --- a/starmath/inc/mathml/starmathdatabase.hxx +++ b/starmath/inc/mathml/starmathdatabase.hxx @@ -203,6 +203,7 @@ extern const SmColorTokenTableEntry aColorTokenTableParse[159]; extern const SmColorTokenTableEntry aColorTokenTableHTML[148]; extern const SmColorTokenTableEntry aColorTokenTableMATHML[16]; extern const SmColorTokenTableEntry aColorTokenTableDVIPS[5]; +extern const SmColorTokenTableEntry aColorTokenTableERROR[1]; /** * Identifies operator chars tokens for importing mathml. @@ -301,7 +302,7 @@ std::unique_ptr Identify_Color_DVIPSNAMES(sal_uInt32 cCo * @param cColor * @param parser color */ -std::unique_ptr Identify_ColorName_Parser(const OUString& colorname); +const SmColorTokenTableEntry* Identify_ColorName_Parser(const OUString& colorname); /** * Identifies color from color name. @@ -325,5 +326,5 @@ std::unique_ptr Identify_ColorName_HTML(const OUString& * @param cColor * @param parser color */ -std::unique_ptr Identify_ColorName_DVIPSNAMES(const OUString& colorname); +const SmColorTokenTableEntry* Identify_ColorName_DVIPSNAMES(const OUString& colorname); } -- cgit