diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-03-02 12:20:07 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-03-06 05:59:16 +0000 |
commit | 59fbef6cf83083d678571f706bebd5f3147a3d0e (patch) | |
tree | cd0eadde188de2c28ea840f61406f27e7bd3b640 /svtools/source/svhtml/htmlsupp.cxx | |
parent | e07dc67dedcb8450bc9d6076f5ef5322c316d20a (diff) |
templatize HTMLEnumOption::GetEnum methods
And consequently fix bug in htmlfld.cxx in
the RES_DOCSTATFLD/SwDocStatSubType handling, where it was updating
the m_bUpdateDocStat fields by comparing the wrong enum variable.
Change-Id: If9a68699a9d375ace120a3bf4f4bf4d4ae20a8e0
Reviewed-on: https://gerrit.libreoffice.org/34857
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svtools/source/svhtml/htmlsupp.cxx')
-rw-r--r-- | svtools/source/svhtml/htmlsupp.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/svtools/source/svhtml/htmlsupp.cxx b/svtools/source/svhtml/htmlsupp.cxx index 2f075997e0ab..e1c9d5dd9b2c 100644 --- a/svtools/source/svhtml/htmlsupp.cxx +++ b/svtools/source/svhtml/htmlsupp.cxx @@ -26,13 +26,13 @@ #include <tools/urlobj.hxx> // Table for converting option values into strings -static HTMLOptionEnum const aScriptLangOptEnums[] = +static HTMLOptionEnum<HTMLScriptLanguage> const aScriptLangOptEnums[] = { - { OOO_STRING_SVTOOLS_HTML_LG_starbasic, HTML_SL_STARBASIC }, - { OOO_STRING_SVTOOLS_HTML_LG_javascript, HTML_SL_JAVASCRIPT }, - { OOO_STRING_SVTOOLS_HTML_LG_javascript11,HTML_SL_JAVASCRIPT }, - { OOO_STRING_SVTOOLS_HTML_LG_livescript, HTML_SL_JAVASCRIPT }, - { nullptr, 0 } + { OOO_STRING_SVTOOLS_HTML_LG_starbasic, HTML_SL_STARBASIC }, + { OOO_STRING_SVTOOLS_HTML_LG_javascript, HTML_SL_JAVASCRIPT }, + { OOO_STRING_SVTOOLS_HTML_LG_javascript11, HTML_SL_JAVASCRIPT }, + { OOO_STRING_SVTOOLS_HTML_LG_livescript, HTML_SL_JAVASCRIPT }, + { nullptr, (HTMLScriptLanguage)0 } }; void HTMLParser::ParseScriptOptions( OUString& rLangString, const OUString& rBaseURL, @@ -57,7 +57,7 @@ void HTMLParser::ParseScriptOptions( OUString& rLangString, const OUString& rBas case HTML_O_LANGUAGE: { rLangString = aOption.GetString(); - sal_uInt16 nLang; + HTMLScriptLanguage nLang; if( aOption.GetEnum( nLang, aScriptLangOptEnums ) ) rLang = (HTMLScriptLanguage)nLang; else |