summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorOliver Specht <oliver.specht@cib.de>2015-09-29 11:00:09 +0200
committerOliver Specht <oliver.specht@cib.de>2015-09-30 06:07:57 +0000
commitac9671f94800b647f82b12e718968311a025e87e (patch)
treef3a665eb3527022d016fa9bfdbe4128a8387c967 /connectivity
parent53e6ac15a14b46c76049a9e6eb39da7bb4093037 (diff)
tdf#94559: second step to remove rtti.hxx
replaced use of PTR_CAST, IS_TYPE, ISA in chart2, connectivity, editeng, extensions, filter, forms, framework, idl Change-Id: I6a2f9d8bbccb07088413f7552af4b5af8f0cad99 Reviewed-on: https://gerrit.libreoffice.org/18920 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Oliver Specht <oliver.specht@cib.de>
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/dbase/DIndexIter.cxx2
-rw-r--r--connectivity/source/drivers/file/FNoException.cxx2
-rw-r--r--connectivity/source/drivers/file/fanalyzer.cxx2
-rw-r--r--connectivity/source/drivers/file/fcode.cxx27
-rw-r--r--connectivity/source/drivers/file/fcomp.cxx8
5 files changed, 21 insertions, 20 deletions
diff --git a/connectivity/source/drivers/dbase/DIndexIter.cxx b/connectivity/source/drivers/dbase/DIndexIter.cxx
index edc3c995c9f5..1e7d374b2e1c 100644
--- a/connectivity/source/drivers/dbase/DIndexIter.cxx
+++ b/connectivity/source/drivers/dbase/DIndexIter.cxx
@@ -132,7 +132,7 @@ ONDXKey* OIndexIterator::GetFirstKey(ONDXPage* pPage, const OOperand& rKey)
sal_uIntPtr OIndexIterator::GetCompare(bool bFirst)
{
ONDXKey* pKey = NULL;
- sal_Int32 ePredicateType = PTR_CAST(file::OOp_COMPARE,m_pOperator)->getPredicateType();
+ sal_Int32 ePredicateType = dynamic_cast<file::OOp_COMPARE*>(m_pOperator)->getPredicateType();
if (bFirst)
{
diff --git a/connectivity/source/drivers/file/FNoException.cxx b/connectivity/source/drivers/file/FNoException.cxx
index ad2b150dc9b1..b5b436e5f8eb 100644
--- a/connectivity/source/drivers/file/FNoException.cxx
+++ b/connectivity/source/drivers/file/FNoException.cxx
@@ -61,7 +61,7 @@ void OSQLAnalyzer::bindParameterRow(OValueRefRow& _pRow)
OCodeList& rCodeList = m_aCompiler->m_aCodeList;
for(OCodeList::iterator aIter = rCodeList.begin(); aIter != rCodeList.end();++aIter)
{
- OOperandParam* pParam = PTR_CAST(OOperandParam,(*aIter));
+ OOperandParam* pParam = dynamic_cast<OOperandParam*>(*aIter);
if ( pParam )
pParam->bindValue(_pRow);
}
diff --git a/connectivity/source/drivers/file/fanalyzer.cxx b/connectivity/source/drivers/file/fanalyzer.cxx
index 16ec78a25f4a..1f1f4f8dd32a 100644
--- a/connectivity/source/drivers/file/fanalyzer.cxx
+++ b/connectivity/source/drivers/file/fanalyzer.cxx
@@ -121,7 +121,7 @@ void OSQLAnalyzer::bindRow(OCodeList& rCodeList,const OValueRefRow& _pRow)
{
for (OCodeList::iterator aIter = rCodeList.begin(); aIter != rCodeList.end(); ++aIter)
{
- OOperandAttr* pAttr = PTR_CAST(OOperandAttr,(*aIter));
+ OOperandAttr* pAttr = dynamic_cast<OOperandAttr*>(*aIter);
if (pAttr)
{
pAttr->bindValue(_pRow);
diff --git a/connectivity/source/drivers/file/fcode.cxx b/connectivity/source/drivers/file/fcode.cxx
index 95eeffdd987c..20ff3a0e55b2 100644
--- a/connectivity/source/drivers/file/fcode.cxx
+++ b/connectivity/source/drivers/file/fcode.cxx
@@ -189,9 +189,9 @@ void OBoolOperator::Exec(OCodeStack& rCodeStack)
rCodeStack.pop();
rCodeStack.push(new OOperandResultBOOL(operate(pLeft, pRight)));
- if (IS_TYPE(OOperandResult,pLeft))
+ if( typeid(OOperandResult) == typeid(*pLeft))
delete pLeft;
- if (IS_TYPE(OOperandResult,pRight))
+ if( typeid(OOperandResult) == typeid(*pRight))
delete pRight;
}
@@ -206,7 +206,8 @@ void OOp_NOT::Exec(OCodeStack& rCodeStack)
rCodeStack.pop();
rCodeStack.push(new OOperandResultBOOL(operate(pOperand)));
- if (IS_TYPE(OOperandResult,pOperand))
+
+ if( typeid(OOperandResult) == typeid(*pOperand))
delete pOperand;
}
@@ -228,7 +229,7 @@ void OOp_ISNULL::Exec(OCodeStack& rCodeStack)
rCodeStack.pop();
rCodeStack.push(new OOperandResultBOOL(operate(pOperand)));
- if (IS_TYPE(OOperandResult,pOperand))
+ if( typeid(OOperandResult) == typeid(*pOperand))
delete pOperand;
}
@@ -340,9 +341,9 @@ void ONumOperator::Exec(OCodeStack& rCodeStack)
rCodeStack.pop();
rCodeStack.push(new OOperandResultNUM(operate(pLeft->getValue(), pRight->getValue())));
- if (IS_TYPE(OOperandResult,pLeft))
+ if( typeid(OOperandResult) == typeid(*pLeft))
delete pLeft;
- if (IS_TYPE(OOperandResult,pRight))
+ if( typeid(OOperandResult) == typeid(*pRight))
delete pRight;
}
@@ -380,11 +381,11 @@ void ONthOperator::Exec(OCodeStack& rCodeStack)
pOperand = rCodeStack.top();
rCodeStack.pop();
assert(pOperand);
- if (pOperand && !IS_TYPE(OStopOperand,pOperand))
+ if (pOperand && typeid(OStopOperand) != typeid(*pOperand))
aValues.push_back( pOperand->getValue() );
aOperands.push_back( pOperand );
}
- while (pOperand && !IS_TYPE(OStopOperand,pOperand));
+ while (pOperand && typeid(OStopOperand) != typeid(*pOperand));
rCodeStack.push(new OOperandResult(operate(aValues)));
@@ -392,7 +393,7 @@ void ONthOperator::Exec(OCodeStack& rCodeStack)
::std::vector<OOperand*>::iterator aEnd = aOperands.end();
for (; aIter != aEnd; ++aIter)
{
- if (IS_TYPE(OOperandResult,*aIter))
+ if (typeid(OOperandResult) != typeid(*(*aIter)))
delete *aIter;
}
}
@@ -404,13 +405,13 @@ void OBinaryOperator::Exec(OCodeStack& rCodeStack)
OOperand *pLeft = rCodeStack.top();
rCodeStack.pop();
- if ( !rCodeStack.empty() && IS_TYPE(OStopOperand,rCodeStack.top()) )
+ if ( !rCodeStack.empty() && typeid(OStopOperand) == typeid(*rCodeStack.top()) )
rCodeStack.pop();
rCodeStack.push(new OOperandResult(operate(pLeft->getValue(),pRight->getValue())));
- if (IS_TYPE(OOperandResult,pRight))
+ if(typeid(OOperandResult) == typeid(*pRight))
delete pRight;
- if (IS_TYPE(OOperandResult,pLeft))
+ if(typeid(OOperandResult) == typeid(*pLeft))
delete pLeft;
}
@@ -421,7 +422,7 @@ void OUnaryOperator::Exec(OCodeStack& rCodeStack)
rCodeStack.pop();
rCodeStack.push(new OOperandResult(operate(pOperand->getValue())));
- if (IS_TYPE(OOperandResult,pOperand))
+ if (typeid(OOperandResult) == typeid(*pOperand))
delete pOperand;
}
diff --git a/connectivity/source/drivers/file/fcomp.cxx b/connectivity/source/drivers/file/fcomp.cxx
index b901ff53376d..51cd1963530c 100644
--- a/connectivity/source/drivers/file/fcomp.cxx
+++ b/connectivity/source/drivers/file/fcomp.cxx
@@ -554,7 +554,7 @@ bool OPredicateInterpreter::evaluate(OCodeList& rCodeList)
for(;aIter != rCodeList.end();++aIter)
{
- OOperand* pOperand = PTR_CAST(OOperand,(*aIter));
+ OOperand* pOperand = dynamic_cast<OOperand* >(*aIter);
if (pOperand)
m_aStack.push(pOperand);
else
@@ -568,7 +568,7 @@ bool OPredicateInterpreter::evaluate(OCodeList& rCodeList)
DBG_ASSERT(pOperand, "StackFehler");
bResult = pOperand->isValid();
- if (IS_TYPE(OOperandResult,pOperand))
+ if (dynamic_cast<const OOperandResult* >(pOperand) != nullptr)
delete pOperand;
return bResult;
}
@@ -581,7 +581,7 @@ void OPredicateInterpreter::evaluateSelection(OCodeList& rCodeList,ORowSetValueD
for(;aIter != rCodeList.end();++aIter)
{
- OOperand* pOperand = PTR_CAST(OOperand,(*aIter));
+ OOperand* pOperand = dynamic_cast<OOperand* >(*aIter);
if (pOperand)
m_aStack.push(pOperand);
else
@@ -595,7 +595,7 @@ void OPredicateInterpreter::evaluateSelection(OCodeList& rCodeList,ORowSetValueD
DBG_ASSERT(pOperand, "StackFehler");
(*_rVal) = pOperand->getValue();
- if (IS_TYPE(OOperandResult,pOperand))
+ if (dynamic_cast<const OOperandResult* >(pOperand) != nullptr)
delete pOperand;
}