summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-04-20 15:47:57 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-04-21 09:20:50 +0200
commitc48ad62924754025266f6ed3986beac44d1c2452 (patch)
tree1647934028b04eaab4c52225e12e22060bfa7dd1 /editeng
parent42b2c0042b04184c94fb7cba3f301d394d21274e (diff)
convert HTML_OPTION_IDS to scoped enum
Change-Id: Ia766dc58a571e5853005fd394283d7b53f02e4a6 Reviewed-on: https://gerrit.libreoffice.org/36748 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/eehtml.cxx37
1 files changed, 15 insertions, 22 deletions
diff --git a/editeng/source/editeng/eehtml.cxx b/editeng/source/editeng/eehtml.cxx
index ca0d8a3d8b9a..46ead623654c 100644
--- a/editeng/source/editeng/eehtml.cxx
+++ b/editeng/source/editeng/eehtml.cxx
@@ -113,12 +113,12 @@ void EditHTMLParser::NextToken( int nToken )
const HTMLOption& aOption = aOptions[i];
switch( aOption.GetToken() )
{
- case HTML_O_HTTPEQUIV:
+ case HtmlOptionId::HTTPEQUIV:
{
bEquiv = true;
}
break;
- case HTML_O_CONTENT:
+ case HtmlOptionId::CONTENT:
{
if ( bEquiv )
{
@@ -128,6 +128,7 @@ void EditHTMLParser::NextToken( int nToken )
}
}
break;
+ default: break;
}
}
@@ -700,21 +701,17 @@ void EditHTMLParser::StartPara( bool bReal )
SvxAdjust eAdjust = SvxAdjust::Left;
for (const auto & aOption : aOptions)
{
- switch( aOption.GetToken() )
+ if( aOption.GetToken() == HtmlOptionId::ALIGN )
{
- case HTML_O_ALIGN:
- {
- OUString const& rTmp(aOption.GetString());
- if (rTmp.equalsIgnoreAsciiCase(OOO_STRING_SVTOOLS_HTML_AL_right))
- eAdjust = SvxAdjust::Right;
- else if (rTmp.equalsIgnoreAsciiCase(OOO_STRING_SVTOOLS_HTML_AL_middle))
- eAdjust = SvxAdjust::Center;
- else if (rTmp.equalsIgnoreAsciiCase(OOO_STRING_SVTOOLS_HTML_AL_center))
- eAdjust = SvxAdjust::Center;
- else
- eAdjust = SvxAdjust::Left;
- }
- break;
+ OUString const& rTmp(aOption.GetString());
+ if (rTmp.equalsIgnoreAsciiCase(OOO_STRING_SVTOOLS_HTML_AL_right))
+ eAdjust = SvxAdjust::Right;
+ else if (rTmp.equalsIgnoreAsciiCase(OOO_STRING_SVTOOLS_HTML_AL_middle))
+ eAdjust = SvxAdjust::Center;
+ else if (rTmp.equalsIgnoreAsciiCase(OOO_STRING_SVTOOLS_HTML_AL_center))
+ eAdjust = SvxAdjust::Center;
+ else
+ eAdjust = SvxAdjust::Left;
}
}
SfxItemSet aItemSet = mpEditEngine->GetEmptyItemSet();
@@ -758,12 +755,8 @@ void EditHTMLParser::AnchorStart()
for (const auto & aOption : aOptions)
{
- switch( aOption.GetToken() )
- {
- case HTML_O_HREF:
- aRef = aOption.GetString();
- break;
- }
+ if( aOption.GetToken() == HtmlOptionId::HREF)
+ aRef = aOption.GetString();
}
if ( !aRef.isEmpty() )