summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/file
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2006-06-20 00:27:29 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2006-06-20 00:27:29 +0000
commitbc9329f6dba3c06048f607492b36b2a49e7917dd (patch)
treed8aed3e64ecde94fabfb7e4046513a8fd73768d0 /connectivity/source/drivers/file
parent497df77e1c913fdce9b63fbb6f9e40c94a80b90b (diff)
INTEGRATION: CWS warnings01 (1.23.28); FILE MERGED
2005/11/21 15:51:38 fs 1.23.28.2: #i57457# OSL_VERIFY_EQUALS 2005/11/07 14:43:35 fs 1.23.28.1: #i57457# warning-free code
Diffstat (limited to 'connectivity/source/drivers/file')
-rw-r--r--connectivity/source/drivers/file/fcomp.cxx40
1 files changed, 17 insertions, 23 deletions
diff --git a/connectivity/source/drivers/file/fcomp.cxx b/connectivity/source/drivers/file/fcomp.cxx
index ae1159a075ad..5ad7f3732aa4 100644
--- a/connectivity/source/drivers/file/fcomp.cxx
+++ b/connectivity/source/drivers/file/fcomp.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: fcomp.cxx,v $
*
- * $Revision: 1.23 $
+ * $Revision: 1.24 $
*
- * last change: $Author: rt $ $Date: 2005-09-08 05:58:36 $
+ * last change: $Author: hr $ $Date: 2006-06-20 01:27:29 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -87,13 +87,13 @@ using namespace com::sun::star::sdb;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::util;
-DBG_NAME(OPredicateCompiler);
+DBG_NAME(OPredicateCompiler)
//------------------------------------------------------------------
OPredicateCompiler::OPredicateCompiler(OSQLAnalyzer* pAnalyzer)//,OCursor& rCurs)
// : m_rCursor(rCurs)
: m_pAnalyzer(pAnalyzer)
- , m_bORCondition(FALSE)
, m_nParamCounter(0)
+ , m_bORCondition(FALSE)
{
DBG_CTOR(OPredicateCompiler,NULL);
}
@@ -288,7 +288,7 @@ OOperand* OPredicateCompiler::execute_COMPARE(OSQLParseNode* pPredicateNode) th
return NULL;
}
- sal_Int32 ePredicateType;
+ sal_Int32 ePredicateType( SQLFilterOperator::EQUAL );
OSQLParseNode *pPrec = pPredicateNode->getChild(1);
if (pPrec->getNodeType() == SQL_NODE_EQUAL)
@@ -303,14 +303,12 @@ OOperand* OPredicateCompiler::execute_COMPARE(OSQLParseNode* pPredicateNode) th
ePredicateType = SQLFilterOperator::GREATER_EQUAL;
else if (pPrec->getNodeType() == SQL_NODE_GREAT)
ePredicateType = SQLFilterOperator::GREATER;
+ else
+ OSL_ENSURE( false, "OPredicateCompiler::execute_COMPARE: unexpected node type!" );
- OOperand* pOb = execute(pPredicateNode->getChild(0));
- OOperand* pOperand = execute(pPredicateNode->getChild(2));
-
- OBoolOperator* pOperator = new OOp_COMPARE(ePredicateType);
- //pOb->PreProcess(pOperator, pOperand);
-
- m_aCodeList.push_back(pOperator);
+ execute(pPredicateNode->getChild(0));
+ execute(pPredicateNode->getChild(2));
+ m_aCodeList.push_back( new OOp_COMPARE(ePredicateType) );
// wenn es sich um eine Vergleichsoperation auf datum/Zeit handelt, dann
// erfolgt jetzt bereits eine Umwandlung fuer die Konstante
@@ -399,12 +397,14 @@ OOperand* OPredicateCompiler::execute_LIKE(OSQLParseNode* pPredicateNode) throw(
cEscape = pEscNode->getTokenValue().toChar();
}
- OOperand* pOb = execute(pPredicateNode->getChild(0));
- OOperand* pOperand = execute(pAtom);
+ execute(pPredicateNode->getChild(0));
+ execute(pAtom);
+
OBoolOperator* pOperator = (ePredicateType == SQLFilterOperator::LIKE)
? new OOp_LIKE(cEscape)
: new OOp_NOTLIKE(cEscape);
m_aCodeList.push_back(pOperator);
+
return NULL;
}
//------------------------------------------------------------------
@@ -511,14 +511,11 @@ OOperand* OPredicateCompiler::execute_ISNULL(OSQLParseNode* pPredicateNode) thro
else
ePredicateType = SQLFilterOperator::SQLNULL;
- OOperand* pOb = execute(pPredicateNode->getChild(0));
+ execute(pPredicateNode->getChild(0));
OBoolOperator* pOperator = (ePredicateType == SQLFilterOperator::SQLNULL) ?
new OOp_ISNULL() : new OOp_ISNOTNULL();
-
- //pOb->PreProcess(pOperator);
-
-
m_aCodeList.push_back(pOperator);
+
return NULL;
}
//------------------------------------------------------------------
@@ -709,16 +706,13 @@ OOperand* OPredicateCompiler::execute_Fold(OSQLParseNode* pPredicateNode) thro
sal_Bool bUpper = SQL_ISTOKEN(pPredicateNode->getChild(0),UPPER);
- OOperand* pOb = execute(pPredicateNode->getChild(2));
+ execute(pPredicateNode->getChild(2));
OOperator* pOperator = NULL;
if ( bUpper )
pOperator = new OOp_Upper();
else
pOperator = new OOp_Lower();
- //pOb->PreProcess(pOperator);
-
-
m_aCodeList.push_back(pOperator);
return NULL;
}