summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-05-08 16:12:01 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-05-09 08:28:56 +0200
commit719a2adfbdac8ce26a035e5fedeeaade8706832d (patch)
tree541a185d2c60d83da75306bab6bd93527c9b4d73 /connectivity
parent4763091bbecab8722a43d0ed73eafc0a1f596242 (diff)
remove unnecessary empty OUString fields and vars
Change-Id: I940120087a0bc6b1b0abc30a3e7727ce22b7d9a7 Reviewed-on: https://gerrit.libreoffice.org/37394 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/parse/sqliterator.cxx5
-rw-r--r--connectivity/source/parse/sqlnode.cxx13
2 files changed, 8 insertions, 10 deletions
diff --git a/connectivity/source/parse/sqliterator.cxx b/connectivity/source/parse/sqliterator.cxx
index 959e0ca4733b..e3bca3b0315f 100644
--- a/connectivity/source/parse/sqliterator.cxx
+++ b/connectivity/source/parse/sqliterator.cxx
@@ -927,12 +927,11 @@ bool OSQLParseTreeIterator::traverseSelectColumnNames(const OSQLParseNode* pSele
/*&& traverseSelectColumnNames( pSelectNode->getChild( 3 ) )*/;
}
- static OUString aEmptyString;
// nyi: more checks for correct structure!
if (pSelectNode->getChild(2)->isRule() && SQL_ISPUNCTUATION(pSelectNode->getChild(2)->getChild(0),"*"))
{
// SELECT * ...
- setSelectColumnName(m_aSelectColumns,"*", aEmptyString,aEmptyString);
+ setSelectColumnName(m_aSelectColumns, "*", "", "");
}
else if (SQL_ISRULE(pSelectNode->getChild(2),scalar_exp_commalist))
{
@@ -952,7 +951,7 @@ bool OSQLParseTreeIterator::traverseSelectColumnNames(const OSQLParseNode* pSele
// All the table's columns
OUString aTableRange;
pColumnRef->getChild(0)->parseNodeToStr( aTableRange, m_pImpl->m_xConnection, nullptr, false, false );
- setSelectColumnName(m_aSelectColumns,"*", aEmptyString,aTableRange);
+ setSelectColumnName(m_aSelectColumns, "*", "", aTableRange);
continue;
}
else if (SQL_ISRULE(pColumnRef,derived_column))
diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx
index b2f1d43a05d9..a4d89f4e4290 100644
--- a/connectivity/source/parse/sqlnode.cxx
+++ b/connectivity/source/parse/sqlnode.cxx
@@ -1031,10 +1031,9 @@ sal_Int16 OSQLParser::buildLikeRule(OSQLParseNode* pAppend, OSQLParseNode*& pLit
OSQLParseNode* OSQLParser::buildNode_Date(const double& fValue, sal_Int32 nType)
{
- OUString aEmptyString;
- OSQLParseNode* pNewNode = new OSQLInternalNode(aEmptyString, SQLNodeType::Rule,OSQLParser::RuleID(OSQLParseNode::set_fct_spec));
+ OSQLParseNode* pNewNode = new OSQLInternalNode("", SQLNodeType::Rule,OSQLParser::RuleID(OSQLParseNode::set_fct_spec));
pNewNode->append(new OSQLInternalNode("{", SQLNodeType::Punctuation));
- OSQLParseNode* pDateNode = new OSQLInternalNode(aEmptyString, SQLNodeType::Rule,OSQLParser::RuleID(OSQLParseNode::odbc_fct_spec));
+ OSQLParseNode* pDateNode = new OSQLInternalNode("", SQLNodeType::Rule,OSQLParser::RuleID(OSQLParseNode::odbc_fct_spec));
pNewNode->append(pDateNode);
pNewNode->append(new OSQLInternalNode("}", SQLNodeType::Punctuation));
@@ -1044,7 +1043,7 @@ OSQLParseNode* OSQLParser::buildNode_Date(const double& fValue, sal_Int32 nType)
{
Date aDate = DBTypeConversion::toDate(fValue,DBTypeConversion::getNULLDate(m_xFormatter->getNumberFormatsSupplier()));
OUString aString = DBTypeConversion::toDateString(aDate);
- pDateNode->append(new OSQLInternalNode(aEmptyString, SQLNodeType::Keyword, SQL_TOKEN_D));
+ pDateNode->append(new OSQLInternalNode("", SQLNodeType::Keyword, SQL_TOKEN_D));
pDateNode->append(new OSQLInternalNode(aString, SQLNodeType::String));
break;
}
@@ -1052,7 +1051,7 @@ OSQLParseNode* OSQLParser::buildNode_Date(const double& fValue, sal_Int32 nType)
{
css::util::Time aTime = DBTypeConversion::toTime(fValue);
OUString aString = DBTypeConversion::toTimeString(aTime);
- pDateNode->append(new OSQLInternalNode(aEmptyString, SQLNodeType::Keyword, SQL_TOKEN_T));
+ pDateNode->append(new OSQLInternalNode("", SQLNodeType::Keyword, SQL_TOKEN_T));
pDateNode->append(new OSQLInternalNode(aString, SQLNodeType::String));
break;
}
@@ -1062,13 +1061,13 @@ OSQLParseNode* OSQLParser::buildNode_Date(const double& fValue, sal_Int32 nType)
if (aDateTime.Seconds || aDateTime.Minutes || aDateTime.Hours)
{
OUString aString = DBTypeConversion::toDateTimeString(aDateTime);
- pDateNode->append(new OSQLInternalNode(aEmptyString, SQLNodeType::Keyword, SQL_TOKEN_TS));
+ pDateNode->append(new OSQLInternalNode("", SQLNodeType::Keyword, SQL_TOKEN_TS));
pDateNode->append(new OSQLInternalNode(aString, SQLNodeType::String));
}
else
{
Date aDate(aDateTime.Day,aDateTime.Month,aDateTime.Year);
- pDateNode->append(new OSQLInternalNode(aEmptyString, SQLNodeType::Keyword, SQL_TOKEN_D));
+ pDateNode->append(new OSQLInternalNode("", SQLNodeType::Keyword, SQL_TOKEN_D));
pDateNode->append(new OSQLInternalNode(DBTypeConversion::toDateString(aDate), SQLNodeType::String));
}
break;