summaryrefslogtreecommitdiff
path: root/helpcompiler
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-02-24 10:11:43 +0200
committerNoel Grandin <noel@peralex.com>2016-02-24 11:48:39 +0200
commita5e53f9ffdde320a7ba104a1e01b3f5ef75d7975 (patch)
tree49ebc3303916da8298183808630464a4c0ce00d8 /helpcompiler
parent2f9d53df89614955215a630beb0966f0c4a663c2 (diff)
convert TokenTypes to scoped enum
Change-Id: I17c0a616dd6cf48a22896b6cd6b0df157d1f9a9f
Diffstat (limited to 'helpcompiler')
-rw-r--r--helpcompiler/inc/BasCodeTagger.hxx2
-rw-r--r--helpcompiler/source/BasCodeTagger.cxx26
2 files changed, 14 insertions, 14 deletions
diff --git a/helpcompiler/inc/BasCodeTagger.hxx b/helpcompiler/inc/BasCodeTagger.hxx
index 25f430406c91..1020374a9097 100644
--- a/helpcompiler/inc/BasCodeTagger.hxx
+++ b/helpcompiler/inc/BasCodeTagger.hxx
@@ -33,7 +33,7 @@ class L10N_DLLPUBLIC BasicCodeTagger
SyntaxHighlighter m_Highlighter;
bool m_bTaggingCompleted;
void tagParagraph( xmlNodePtr paragraph );
- static xmlChar* getTypeString( TokenTypes tokenType );
+ static xmlChar* getTypeString( TokenType tokenType );
void getBasicCodeContainerNodes();
void tagBasCodeParagraphs();
diff --git a/helpcompiler/source/BasCodeTagger.cxx b/helpcompiler/source/BasCodeTagger.cxx
index f8b1f95952e5..cad409017db5 100644
--- a/helpcompiler/source/BasCodeTagger.cxx
+++ b/helpcompiler/source/BasCodeTagger.cxx
@@ -150,7 +150,7 @@ void BasicCodeTagger::tagParagraph( xmlNodePtr paragraph )
{
OString sToken(OUStringToOString(strLine.copy(i->nBegin, i->nEnd-i->nBegin), RTL_TEXTENCODING_UTF8));
xmlNodePtr text = xmlNewText(reinterpret_cast<const xmlChar*>(sToken.getStr()));
- if ( i->tokenType != TT_WHITESPACE )
+ if ( i->tokenType != TokenType::Whitespace )
{
xmlChar* typeStr = getTypeString( i->tokenType );
curNode = xmlNewTextChild( paragraph, nullptr, reinterpret_cast<xmlChar const *>("item"), nullptr );
@@ -188,42 +188,42 @@ void BasicCodeTagger::tagBasicCodes()
}
//! Converts SyntaxHighlighter's TokenTypes enum to a type string for <item type=... >
-xmlChar* BasicCodeTagger::getTypeString( TokenTypes tokenType )
+xmlChar* BasicCodeTagger::getTypeString( TokenType tokenType )
{
const char* str;
switch ( tokenType )
{
- case TT_UNKNOWN :
+ case TokenType::Unknown :
str = "unknown";
break;
- case TT_IDENTIFIER :
+ case TokenType::Identifier :
str = "identifier";
break;
- case TT_WHITESPACE :
+ case TokenType::Whitespace :
str = "whitespace";
break;
- case TT_NUMBER :
+ case TokenType::Number :
str = "number";
break;
- case TT_STRING :
+ case TokenType::String :
str = "string";
break;
- case TT_EOL :
+ case TokenType::EOL :
str = "eol";
break;
- case TT_COMMENT :
+ case TokenType::Comment :
str = "comment";
break;
- case TT_ERROR :
+ case TokenType::Error :
str = "error";
break;
- case TT_OPERATOR :
+ case TokenType::Operator :
str = "operator";
break;
- case TT_KEYWORDS :
+ case TokenType::Keywords :
str = "keyword";
break;
- case TT_PARAMETER :
+ case TokenType::Parameter :
str = "parameter";
break;
default :