diff options
author | Noel Grandin <noel@peralex.com> | 2016-05-20 13:18:58 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-05-20 13:19:43 +0200 |
commit | 1e470313b81ba5249181c3d8ad7429b06dd7bd53 (patch) | |
tree | ef9b34d3e345cbfaed532d4dff71480619f9cacd /l10ntools | |
parent | 0593041d86e479981485644abfd56f94289270de (diff) |
Convert TEXT_STATE to scoped enum
Change-Id: I86822b99c81f1e6f2cd6a117f15fdc3d20d18495
Diffstat (limited to 'l10ntools')
-rw-r--r-- | l10ntools/source/export.cxx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/l10ntools/source/export.cxx b/l10ntools/source/export.cxx index f9f4199b9fa3..57fdd43d33d5 100644 --- a/l10ntools/source/export.cxx +++ b/l10ntools/source/export.cxx @@ -879,8 +879,7 @@ void Export::CleanValue( OString &rValue ) } } -#define TXT_STATE_TEXT 0x001 -#define TXT_STATE_MACRO 0x002 +enum class TextState { Text=1, Macro }; OString Export::GetText(const OString &rSource, int nToken) { @@ -899,14 +898,14 @@ OString Export::GetText(const OString &rSource, int nToken) replaceAll("\\", "-=<[0x7F]>=-"). replaceAll("\\0x7F", "-=<[0x7F]>=-"); - sal_uInt16 nState = TXT_STATE_TEXT; + TextState nState = TextState::Text; for (sal_Int32 i = 1; i <= lcl_countOccurrences(sTmp, '"'); ++i) { OString sToken(sTmp.getToken(i, '"')); if (!sToken.isEmpty()) { - if ( nState == TXT_STATE_TEXT ) { + if ( nState == TextState::Text ) { sReturn += sToken; - nState = TXT_STATE_MACRO; + nState = TextState::Macro; } else { sToken = sToken.replace('\t', ' '); @@ -923,7 +922,7 @@ OString Export::GetText(const OString &rSource, int nToken) sReturn += sToken; sReturn += " \\\""; } - nState = TXT_STATE_TEXT; + nState = TextState::Text; } } } |