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 /sfx2/source | |
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 'sfx2/source')
-rw-r--r-- | sfx2/source/bastyp/frmhtml.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/bastyp/sfxhtml.cxx | 8 |
2 files changed, 7 insertions, 9 deletions
diff --git a/sfx2/source/bastyp/frmhtml.cxx b/sfx2/source/bastyp/frmhtml.cxx index e421373aceb0..af567e90e4a5 100644 --- a/sfx2/source/bastyp/frmhtml.cxx +++ b/sfx2/source/bastyp/frmhtml.cxx @@ -38,12 +38,12 @@ static sal_Char const sHTML_SC_auto[] = "AUTO"; #define HTML_O_READONLY "READONLY" #define HTML_O_EDIT "EDIT" -static HTMLOptionEnum const aScollingTable[] = +static HTMLOptionEnum<ScrollingMode> const aScrollingTable[] = { { sHTML_SC_yes, ScrollingYes }, { sHTML_SC_no, ScrollingNo }, { sHTML_SC_auto, ScrollingAuto }, - { nullptr, 0 } + { nullptr, (ScrollingMode)0 } }; void SfxFrameHTMLParser::ParseFrameOptions( @@ -93,9 +93,7 @@ void SfxFrameHTMLParser::ParseFrameOptions( bMarginHeight = true; break; case HTML_O_SCROLLING: - pFrame->SetScrollingMode( - (ScrollingMode)rOption.GetEnum( aScollingTable, - ScrollingAuto ) ); + pFrame->SetScrollingMode( rOption.GetEnum( aScrollingTable, ScrollingAuto ) ); break; case HTML_O_FRAMEBORDER: { diff --git a/sfx2/source/bastyp/sfxhtml.cxx b/sfx2/source/bastyp/sfxhtml.cxx index 54024936ddeb..ef9a0661931e 100644 --- a/sfx2/source/bastyp/sfxhtml.cxx +++ b/sfx2/source/bastyp/sfxhtml.cxx @@ -47,15 +47,15 @@ using namespace ::com::sun::star; // <INPUT TYPE=xxx> -static HTMLOptionEnum const aAreaShapeOptEnums[] = +static HTMLOptionEnum<sal_uInt16> const aAreaShapeOptEnums[] = { { OOO_STRING_SVTOOLS_HTML_SH_rect, IMAP_OBJ_RECTANGLE }, { OOO_STRING_SVTOOLS_HTML_SH_rectangle, IMAP_OBJ_RECTANGLE }, { OOO_STRING_SVTOOLS_HTML_SH_circ, IMAP_OBJ_CIRCLE }, { OOO_STRING_SVTOOLS_HTML_SH_circle, IMAP_OBJ_CIRCLE }, - { OOO_STRING_SVTOOLS_HTML_SH_poly, IMAP_OBJ_POLYGON }, - { OOO_STRING_SVTOOLS_HTML_SH_polygon, IMAP_OBJ_POLYGON }, - { nullptr, 0 } + { OOO_STRING_SVTOOLS_HTML_SH_poly, IMAP_OBJ_POLYGON }, + { OOO_STRING_SVTOOLS_HTML_SH_polygon, IMAP_OBJ_POLYGON }, + { nullptr, 0 } }; SfxHTMLParser::SfxHTMLParser( SvStream& rStream, bool bIsNewDoc, |