[Libreoffice-commits] core.git: connectivity/source include/connectivity
Stephan Bergmann
sbergman at redhat.com
Mon Jun 8 04:49:15 PDT 2015
connectivity/source/parse/sqlflex.l | 10 +++++-----
connectivity/source/parse/sqlnode.cxx | 10 +++++-----
include/connectivity/sqlscan.hxx | 12 ++++++------
3 files changed, 16 insertions(+), 16 deletions(-)
New commits:
commit 615f4b23c62b43360e7a29735bf07091bd5a73a2
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Mon Jun 8 12:55:36 2015 +0200
loplugin:staticmethods
Change-Id: I22af41840410ee78aee739e0dec49bb43cda874b
diff --git a/connectivity/source/parse/sqlflex.l b/connectivity/source/parse/sqlflex.l
index 1e50927..be74010 100644
--- a/connectivity/source/parse/sqlflex.l
+++ b/connectivity/source/parse/sqlflex.l
@@ -788,11 +788,11 @@ IParseContext::InternationalKeyCode OSQLScanner::getInternationalTokenID(const s
return (m_bInternational) ? m_pContext->getIntlKeyCode(::rtl::OString(sToken) ) : IParseContext::KEY_NONE;
}
// -------------------------------------------------------------------------
-sal_Int32 OSQLScanner::GetGERRule() const { return PREDICATE_GER; }
-sal_Int32 OSQLScanner::GetENGRule() const { return PREDICATE_ENG; }
-sal_Int32 OSQLScanner::GetSQLRule() const { return SQL; }
-sal_Int32 OSQLScanner::GetDATERule() const { return DATE; }
-sal_Int32 OSQLScanner::GetSTRINGRule() const { return STRING; }
+sal_Int32 OSQLScanner::GetGERRule() { return PREDICATE_GER; }
+sal_Int32 OSQLScanner::GetENGRule() { return PREDICATE_ENG; }
+sal_Int32 OSQLScanner::GetSQLRule() { return SQL; }
+sal_Int32 OSQLScanner::GetDATERule() { return DATE; }
+sal_Int32 OSQLScanner::GetSTRINGRule() { return STRING; }
// -------------------------------------------------------------------------
void OSQLScanner::setScanner(bool _bNull)
{
diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx
index 5144ea8..d335027 100644
--- a/connectivity/source/parse/sqlnode.cxx
+++ b/connectivity/source/parse/sqlnode.cxx
@@ -1238,24 +1238,24 @@ OSQLParseNode* OSQLParser::predicateTree(OUString& rErrorMessage, const OUString
case DataType::DATE:
case DataType::TIME:
case DataType::TIMESTAMP:
- s_pScanner->SetRule(s_pScanner->GetDATERule());
+ s_pScanner->SetRule(OSQLScanner::GetDATERule());
break;
case DataType::CHAR:
case DataType::VARCHAR:
case DataType::LONGVARCHAR:
case DataType::CLOB:
- s_pScanner->SetRule(s_pScanner->GetSTRINGRule());
+ s_pScanner->SetRule(OSQLScanner::GetSTRINGRule());
break;
default:
if ( s_xLocaleData->getLocaleItem( m_pData->aLocale ).decimalSeparator.toChar() == ',' )
- s_pScanner->SetRule(s_pScanner->GetGERRule());
+ s_pScanner->SetRule(OSQLScanner::GetGERRule());
else
- s_pScanner->SetRule(s_pScanner->GetENGRule());
+ s_pScanner->SetRule(OSQLScanner::GetENGRule());
}
}
else
- s_pScanner->SetRule(s_pScanner->GetSQLRule());
+ s_pScanner->SetRule(OSQLScanner::GetSQLRule());
s_pScanner->prepareScan(rStatement, m_pContext, true);
diff --git a/include/connectivity/sqlscan.hxx b/include/connectivity/sqlscan.hxx
index 009a2d6..1506c74 100644
--- a/include/connectivity/sqlscan.hxx
+++ b/include/connectivity/sqlscan.hxx
@@ -64,16 +64,16 @@ namespace connectivity
const OUString& getErrorMessage() const {return m_sErrorMessage;}
OString getStatement() const { return m_sStatement; }
- sal_Int32 SQLlex();
+ static sal_Int32 SQLlex();
// set this as scanner for flex
void setScanner(bool _bNull=false);
// rules settings
void SetRule(sal_Int32 nRule) {m_nRule = nRule;}
- sal_Int32 GetGERRule() const;
- sal_Int32 GetENGRule() const;
- sal_Int32 GetSQLRule() const;
- sal_Int32 GetDATERule() const;
- sal_Int32 GetSTRINGRule() const;
+ static sal_Int32 GetGERRule();
+ static sal_Int32 GetENGRule();
+ static sal_Int32 GetSQLRule();
+ static sal_Int32 GetDATERule();
+ static sal_Int32 GetSTRINGRule();
inline sal_Int32 GetCurrentPos() const { return m_nCurrentPos; }
};
}
More information about the Libreoffice-commits
mailing list