summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-12-01 13:52:46 +0200
committerJulien Nabet <serval2412@yahoo.fr>2016-12-01 21:51:41 +0000
commit036603d72fd74607a6033118a7d395c4ad7f4907 (patch)
tree79ddc2a5ad159028063b96cffae1e06252fbfd43 /connectivity
parent69c3e6bf84d87c072d39660e9451c656c317bead (diff)
convert nowParsing_ constants to scoped enum
Change-Id: I8df9ca0e9317a4d969f492699be926044415f68c Reviewed-on: https://gerrit.libreoffice.org/31483 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/mork/MorkParser.cxx14
-rw-r--r--connectivity/source/drivers/mork/MorkParser.hxx2
2 files changed, 8 insertions, 8 deletions
diff --git a/connectivity/source/drivers/mork/MorkParser.cxx b/connectivity/source/drivers/mork/MorkParser.cxx
index 9a4b89526c00..c2b931e38473 100644
--- a/connectivity/source/drivers/mork/MorkParser.cxx
+++ b/connectivity/source/drivers/mork/MorkParser.cxx
@@ -62,7 +62,7 @@ MorkParser::MorkParser() :
morkPos_(0),
nextAddValueId_(0x7fffffff),
defaultTableId_(1),
- nowParsing_(NPValues)
+ nowParsing_(NP::Values)
{
}
@@ -91,7 +91,7 @@ void MorkParser::initVars()
{
error_ = NoError;
morkPos_ = 0;
- nowParsing_ = NPValues;
+ nowParsing_ = NP::Values;
currentCells_ = nullptr;
nextAddValueId_ = 0x7fffffff;
}
@@ -185,7 +185,7 @@ bool MorkParser::parseDict()
{
char cur = nextChar();
bool Result = true;
- nowParsing_ = NPValues;
+ nowParsing_ = NP::Values;
while ( Result && cur != '>' && cur )
{
@@ -198,7 +198,7 @@ bool MorkParser::parseDict()
if ( morkData_.substr( morkPos_ - 1, strlen( MorkDictColumnMeta ) ) == MorkDictColumnMeta )
{
- nowParsing_ = NPColumns;
+ nowParsing_ = NP::Columns;
morkPos_ += strlen( MorkDictColumnMeta ) - 1;
}
@@ -324,12 +324,12 @@ bool MorkParser::parseCell()
// Apply column and text
int ColumnId = strtoul(Column.c_str(), nullptr, 16);
- if ( NPRows != nowParsing_ )
+ if ( NP::Rows != nowParsing_ )
{
// Dicts
if ( "" != Text )
{
- if ( nowParsing_ == NPColumns )
+ if ( nowParsing_ == NP::Columns )
{
columns_[ ColumnId ] = Text;
}
@@ -488,7 +488,7 @@ bool MorkParser::parseRow( int TableId, int TableScope )
bool Result = true;
std::string TextId;
int Id = 0, Scope = 0;
- nowParsing_ = NPRows;
+ nowParsing_ = NP::Rows;
char cur = nextChar();
diff --git a/connectivity/source/drivers/mork/MorkParser.hxx b/connectivity/source/drivers/mork/MorkParser.hxx
index 6b5088c04ff8..fcbdd6aa26c3 100644
--- a/connectivity/source/drivers/mork/MorkParser.hxx
+++ b/connectivity/source/drivers/mork/MorkParser.hxx
@@ -141,7 +141,7 @@ protected: // Data
int defaultTableId_;
// Indicates entity is being parsed
- enum { NPColumns, NPValues, NPRows } nowParsing_;
+ enum class NP { Columns, Values, Rows } nowParsing_;
private:
MorkParser(const MorkParser &) = delete;