loplugin:staticmethods

Change-Id: I22af41840410ee78aee739e0dec49bb43cda874b
This commit is contained in:
Stephan Bergmann
2015-06-08 12:55:36 +02:00
parent 5d6448a513
commit 615f4b23c6
3 changed files with 16 additions and 16 deletions

View File

@@ -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)
{

View File

@@ -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);

View File

@@ -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; }
};
}