Kaydet (Commit) 730d9ab6 authored tarafından Joachim Lingner's avatar Joachim Lingner

OSL_ENSHURE replaced by OSL_ENSURE

üst 6c821b4f
......@@ -2,9 +2,9 @@
*
* $RCSfile: internalnode.cxx,v $
*
* $Revision: 1.3 $
* $Revision: 1.4 $
*
* last change: $Author: hr $ $Date: 2000-10-26 11:01:57 $
* last change: $Author: jl $ $Date: 2001-03-21 13:52:43 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......@@ -75,7 +75,7 @@ OSQLInternalNode::OSQLInternalNode(const sal_Char* pNewValue,
sal_uInt32 nNodeID)
: OSQLParseNode(pNewValue,eNodeType,nNodeID)
{
OSL_ENSHURE(OSQLParser::s_pGarbageCollector, "Collector not initialized");
OSL_ENSURE(OSQLParser::s_pGarbageCollector, "Collector not initialized");
OSQLParser::s_pGarbageCollector->push_back(this);
}
......@@ -85,7 +85,7 @@ OSQLInternalNode::OSQLInternalNode(const ::rtl::OString &_NewValue,
sal_uInt32 nNodeID)
:OSQLParseNode(_NewValue,eNodeType,nNodeID)
{
OSL_ENSHURE(OSQLParser::s_pGarbageCollector, "Collector not initialized");
OSL_ENSURE(OSQLParser::s_pGarbageCollector, "Collector not initialized");
OSQLParser::s_pGarbageCollector->push_back(this);
}
......@@ -95,7 +95,7 @@ OSQLInternalNode::OSQLInternalNode(const sal_Unicode* pNewValue,
sal_uInt32 nNodeID)
:OSQLParseNode(pNewValue,eNodeType,nNodeID)
{
OSL_ENSHURE(OSQLParser::s_pGarbageCollector, "Collector not initialized");
OSL_ENSURE(OSQLParser::s_pGarbageCollector, "Collector not initialized");
OSQLParser::s_pGarbageCollector->push_back(this);
}
......@@ -105,7 +105,7 @@ OSQLInternalNode::OSQLInternalNode(const ::rtl::OUString &_NewValue,
sal_uInt32 nNodeID)
:OSQLParseNode(_NewValue,eNodeType,nNodeID)
{
OSL_ENSHURE(OSQLParser::s_pGarbageCollector, "Collector not initialized");
OSL_ENSURE(OSQLParser::s_pGarbageCollector, "Collector not initialized");
OSQLParser::s_pGarbageCollector->push_back(this);
}
......@@ -114,7 +114,7 @@ OSQLInternalNode::OSQLInternalNode(const ::rtl::OUString &_NewValue,
OSQLInternalNode::~OSQLInternalNode()
{
// remove the node from the garbage list
OSL_ENSHURE(OSQLParser::s_pGarbageCollector, "Collector not initialized");
OSL_ENSURE(OSQLParser::s_pGarbageCollector, "Collector not initialized");
if (!OSQLParser::s_pGarbageCollector->empty())
{
OSQLParser::s_pGarbageCollector->erase(
......
%{
//--------------------------------------------------------------------------
//
// $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/connectivity/source/parse/sqlbison.y,v 1.20 2001-03-13 08:24:04 oj Exp $
// $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/connectivity/source/parse/sqlbison.y,v 1.21 2001-03-21 13:52:43 jl Exp $
//
// Copyright 2000 Sun Microsystems, Inc. All Rights Reserved.
//
......@@ -9,7 +9,7 @@
// OJ
//
// Last change:
// $Author: oj $ $Date: 2001-03-13 08:24:04 $ $Revision: 1.20 $
// $Author: jl $ $Date: 2001-03-21 13:52:43 $ $Revision: 1.21 $
//
// Description:
//
......@@ -3110,7 +3110,7 @@ Any getNumberFormatProperty(const Reference< ::com::sun::star::util::XNumberForm
sal_Int32 nKey,
const rtl::OUString& aPropertyName)
{
OSL_ENSHURE(xSupplier.is(), "getNumberFormatProperty : the formatter doesn't implement a supplier !");
OSL_ENSURE(xSupplier.is(), "getNumberFormatProperty : the formatter doesn't implement a supplier !");
Reference< ::com::sun::star::util::XNumberFormats > xFormats = xSupplier->getNumberFormats();
if (xFormats.is())
......@@ -3216,7 +3216,7 @@ OSQLParser::~OSQLParser()
{
{
::osl::MutexGuard aGuard(s_aMutex);
OSL_ENSHURE(s_nRefCount > 0, "OSQLParser::~OSQLParser() : suspicious call : have a refcount of 0 !");
OSL_ENSURE(s_nRefCount > 0, "OSQLParser::~OSQLParser() : suspicious call : have a refcount of 0 !");
if (!--s_nRefCount)
{
s_pScanner->setScanner(sal_True);
......@@ -3283,14 +3283,14 @@ OSQLParseNode* OSQLParser::parseTree(::rtl::OUString& rErrorMessage,
// Das Ergebnis liefern (den Root Parse Node):
// OSL_ENSHURE(Sdbyyval.pParseNode != NULL,"OSQLParser: Parser hat keinen ParseNode geliefert");
// OSL_ENSURE(Sdbyyval.pParseNode != NULL,"OSQLParser: Parser hat keinen ParseNode geliefert");
// return Sdbyyval.pParseNode;
// geht nicht wegen Bug in MKS YACC-erzeugtem Code (es wird ein falscher ParseNode
// geliefert).
// Stattdessen setzt die Parse-Routine jetzt den Member pParseTree
// - einfach diesen zurueckliefern:
OSL_ENSHURE(m_pParseTree != NULL,"OSQLParser: Parser hat keinen ParseTree geliefert");
OSL_ENSURE(m_pParseTree != NULL,"OSQLParser: Parser hat keinen ParseTree geliefert");
return m_pParseTree;
}
}
......@@ -3353,7 +3353,7 @@ OSQLParseNode* OSQLParser::predicateTree(::rtl::OUString& rErrorMessage, const :
if (m_nFormatKey && m_xFormatter.is())
{
Any aValue = getNumberFormatProperty(m_xFormatter->getNumberFormatsSupplier(), m_nFormatKey, FIELD_STR_LOCALE);
OSL_ENSHURE(aValue.getValueType() == ::getCppuType((const ::com::sun::star::lang::Locale*)0), "OSQLParser::PredicateTree : invalid language property !");
OSL_ENSURE(aValue.getValueType() == ::getCppuType((const ::com::sun::star::lang::Locale*)0), "OSQLParser::PredicateTree : invalid language property !");
if (aValue.getValueType() == ::getCppuType((const ::com::sun::star::lang::Locale*)0))
aValue >>= *m_pLocale;
......@@ -3429,7 +3429,7 @@ OSQLParseNode* OSQLParser::predicateTree(::rtl::OUString& rErrorMessage, const :
// Stattdessen setzt die Parse-Routine jetzt den Member pParseTree
// - einfach diesen zurueckliefern:
OSL_ENSHURE(m_pParseTree != NULL,"OSQLParser: Parser hat keinen ParseTree geliefert");
OSL_ENSURE(m_pParseTree != NULL,"OSQLParser: Parser hat keinen ParseTree geliefert");
return m_pParseTree;
}
}
......@@ -3477,7 +3477,7 @@ OSQLParseNode* OSQLParser::predicateTree(::rtl::OUString& rErrorMessage, const :
//-----------------------------------------------------------------------------
::rtl::OUString OSQLParser::RuleIDToStr(sal_uInt32 nRuleID)
{
OSL_ENSHURE(nRuleID >= (sizeof yytname/sizeof yytname[0]), "Invalid nRuleId!");
OSL_ENSURE(nRuleID >= (sizeof yytname/sizeof yytname[0]), "Invalid nRuleId!");
return ::rtl::OUString::createFromAscii(yytname[nRuleID]);
}
......@@ -4133,8 +4133,8 @@ sal_Int16 OSQLParser::buildComparsionRule(OSQLParseNode*& pAppend,OSQLParseNode*
//-----------------------------------------------------------------------------
void OSQLParser::reduceLiteral(OSQLParseNode*& pLiteral, sal_Bool bAppendBlank)
{
OSL_ENSHURE(pLiteral->isRule(), "This is no ::com::sun::star::chaos::Rule");
OSL_ENSHURE(pLiteral->count() == 2, "OSQLParser::ReduceLiteral() Invalid count");
OSL_ENSURE(pLiteral->isRule(), "This is no ::com::sun::star::chaos::Rule");
OSL_ENSURE(pLiteral->count() == 2, "OSQLParser::ReduceLiteral() Invalid count");
OSQLParseNode* pTemp = pLiteral;
::rtl::OUString aValue;
if (bAppendBlank)
......
......@@ -2,7 +2,7 @@
//--------------------------------------------------------------------------
//
// $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/connectivity/source/parse/sqlflex.l,v 1.8 2001-03-12 14:09:02 oj Exp $
// $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/connectivity/source/parse/sqlflex.l,v 1.9 2001-03-21 13:52:43 jl Exp $
//
// Copyright 2000 Sun Microsystems, Inc. All Rights Reserved.
//
......@@ -10,7 +10,7 @@
// OJ
//
// Last change:
// $Author: oj $ $Date: 2001-03-12 14:09:02 $ $Revision: 1.8 $
// $Author: jl $ $Date: 2001-03-21 13:52:43 $ $Revision: 1.9 $
//
// Description:
//
......@@ -426,7 +426,7 @@ sal_Int32 gatherString( sal_Int32 delim, sal_Int32 nTyp)
*/
sal_Int32 gatherName(const sal_Char* text)
{
OSL_ENSHURE(xxx_pGLOBAL_SQLSCAN,"You forgot to set the scanner!");
OSL_ENSURE(xxx_pGLOBAL_SQLSCAN,"You forgot to set the scanner!");
sal_Int32 nToken = xxx_pGLOBAL_SQLSCAN->getInternationalTokenID(text);
switch (nToken)
{
......@@ -458,7 +458,7 @@ sal_Int32 gatherName(const sal_Char* text)
*/
sal_Int32 gatherNamePre(const sal_Char* text)
{
OSL_ENSHURE(xxx_pGLOBAL_SQLSCAN,"You forgot to set the scanner!");
OSL_ENSURE(xxx_pGLOBAL_SQLSCAN,"You forgot to set the scanner!");
sal_Int32 nToken = xxx_pGLOBAL_SQLSCAN->getInternationalTokenID(text);
switch (nToken)
{
......@@ -524,7 +524,7 @@ void OSQLScanner::SQLyyerror(sal_Char *fmt)
return;
IN_SQLyyerror = true;
OSL_ENSHURE(m_pContext, "OSQLScanner::SQLyyerror: No Context set");
OSL_ENSURE(m_pContext, "OSQLScanner::SQLyyerror: No Context set");
m_sErrorMessage = ::rtl::OUString(fmt,strlen(fmt),RTL_TEXTENCODING_UTF8);
if (m_nCurrentPos < m_sStatement.getLength())
{
......@@ -596,7 +596,7 @@ sal_Int32 OSQLScanner::SQLyygetc(void)
//------------------------------------------------------------------------------
sal_Int32 OSQLScanner::getInternationalTokenID(const sal_Char* sToken) const
{
OSL_ENSHURE(m_pContext, "OSQLScanner::getInternationalTokenID: No Context set");
OSL_ENSURE(m_pContext, "OSQLScanner::getInternationalTokenID: No Context set");
return (m_bInternational) ? m_pContext->getIntlKeyCode(::rtl::OString(sToken)) : 0;
}
// -------------------------------------------------------------------------
......
......@@ -2,9 +2,9 @@
*
* $RCSfile: sqlnode.cxx,v $
*
* $Revision: 1.12 $
* $Revision: 1.13 $
*
* last change: $Author: oj $ $Date: 2001-03-13 08:24:04 $
* last change: $Author: jl $ $Date: 2001-03-21 13:52:43 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......@@ -226,7 +226,7 @@ OSQLParseNode::OSQLParseNode(const sal_Char * pNewValue,
, m_pParent(NULL)
{
OSL_ENSHURE(m_eNodeType >= SQL_NODE_RULE && m_eNodeType <= SQL_NODE_ACCESS_DATE,"OSQLParseNode: mit unzulaessigem NodeType konstruiert");
OSL_ENSURE(m_eNodeType >= SQL_NODE_RULE && m_eNodeType <= SQL_NODE_ACCESS_DATE,"OSQLParseNode: mit unzulaessigem NodeType konstruiert");
}
//-----------------------------------------------------------------------------
OSQLParseNode::OSQLParseNode(const ::rtl::OString &_rNewValue,
......@@ -238,7 +238,7 @@ OSQLParseNode::OSQLParseNode(const ::rtl::OString &_rNewValue,
, m_pParent(NULL)
{
OSL_ENSHURE(m_eNodeType >= SQL_NODE_RULE && m_eNodeType <= SQL_NODE_ACCESS_DATE,"OSQLParseNode: mit unzulaessigem NodeType konstruiert");
OSL_ENSURE(m_eNodeType >= SQL_NODE_RULE && m_eNodeType <= SQL_NODE_ACCESS_DATE,"OSQLParseNode: mit unzulaessigem NodeType konstruiert");
}
//-----------------------------------------------------------------------------
OSQLParseNode::OSQLParseNode(const sal_Unicode * pNewValue,
......@@ -250,7 +250,7 @@ OSQLParseNode::OSQLParseNode(const sal_Unicode * pNewValue,
, m_pParent(NULL)
{
OSL_ENSHURE(m_eNodeType >= SQL_NODE_RULE && m_eNodeType <= SQL_NODE_ACCESS_DATE,"OSQLParseNode: mit unzulaessigem NodeType konstruiert");
OSL_ENSURE(m_eNodeType >= SQL_NODE_RULE && m_eNodeType <= SQL_NODE_ACCESS_DATE,"OSQLParseNode: mit unzulaessigem NodeType konstruiert");
}
//-----------------------------------------------------------------------------
OSQLParseNode::OSQLParseNode(const ::rtl::OUString &_rNewValue,
......@@ -262,7 +262,7 @@ OSQLParseNode::OSQLParseNode(const ::rtl::OUString &_rNewValue,
, m_pParent(NULL)
{
OSL_ENSHURE(m_eNodeType >= SQL_NODE_RULE && m_eNodeType <= SQL_NODE_ACCESS_DATE,"OSQLParseNode: mit unzulaessigem NodeType konstruiert");
OSL_ENSURE(m_eNodeType >= SQL_NODE_RULE && m_eNodeType <= SQL_NODE_ACCESS_DATE,"OSQLParseNode: mit unzulaessigem NodeType konstruiert");
}
//-----------------------------------------------------------------------------
OSQLParseNode::OSQLParseNode(const OSQLParseNode& rParseNode)
......@@ -345,9 +345,9 @@ OSQLParseNode::~OSQLParseNode()
void OSQLParseNode::append(OSQLParseNode* pNewNode)
{
OSL_ENSHURE(pNewNode != NULL, "OSQLParseNode: ungueltiger NewSubTree");
OSL_ENSHURE(pNewNode->getParent() == NULL, "OSQLParseNode: Knoten ist kein Waise");
OSL_ENSHURE(::std::find(m_aChilds.begin(), m_aChilds.end(), pNewNode) == m_aChilds.end(),
OSL_ENSURE(pNewNode != NULL, "OSQLParseNode: ungueltiger NewSubTree");
OSL_ENSURE(pNewNode->getParent() == NULL, "OSQLParseNode: Knoten ist kein Waise");
OSL_ENSURE(::std::find(m_aChilds.begin(), m_aChilds.end(), pNewNode) == m_aChilds.end(),
"OSQLParseNode::append() Node already element of parent");
// stelle Verbindung zum getParent her:
......@@ -377,7 +377,7 @@ void OSQLParseNode::parseNodeToPredicateStr(::rtl::OUString& rString,
const OParseContext* pContext ) const
{
OSL_ENSHURE(xFormatter.is(), "OSQLParseNode::parseNodeToPredicateStr:: no formatter!");
OSL_ENSURE(xFormatter.is(), "OSQLParseNode::parseNodeToPredicateStr:: no formatter!");
if (xFormatter.is())
parseNodeToStr(rString, xMeta, xFormatter, Reference< XPropertySet >(), rIntl, pContext, sal_True, sal_True, _cDec, sal_True);
......@@ -393,7 +393,7 @@ void OSQLParseNode::parseNodeToPredicateStr(::rtl::OUString& rString,
const OParseContext* pContext ) const
{
OSL_ENSHURE(xFormatter.is(), "OSQLParseNode::parseNodeToPredicateStr:: no formatter!");
OSL_ENSURE(xFormatter.is(), "OSQLParseNode::parseNodeToPredicateStr:: no formatter!");
if (xFormatter.is())
parseNodeToStr(rString, xMeta, xFormatter, _xField, rIntl, pContext, sal_True, sal_True, _cDec, sal_True);
......@@ -412,7 +412,7 @@ void OSQLParseNode::parseNodeToStr(::rtl::OUString& rString,
sal_Bool bPredicate) const
{
OSL_ENSHURE(xMeta.is(), "OSQLParseNode::parseNodeToStr:: no meta data!");
OSL_ENSURE(xMeta.is(), "OSQLParseNode::parseNodeToStr:: no meta data!");
if (xMeta.is())
{
......@@ -728,7 +728,7 @@ void OSQLParseNode::tableRangeNodeToStr(::rtl::OUString& rString, const SQLParse
//-----------------------------------------------------------------------------
void OSQLParseNode::likeNodeToStr(::rtl::OUString& rString, const SQLParseNodeParameter& rParam) const
{
OSL_ENSHURE(count() >= 4,"count != 5: Prepare for GPF");
OSL_ENSURE(count() >= 4,"count != 5: Prepare for GPF");
const OSQLParseNode* pEscNode = NULL;
const OSQLParseNode* pParaNode = NULL;
......@@ -751,7 +751,7 @@ void OSQLParseNode::likeNodeToStr(::rtl::OUString& rString, const SQLParseNodePa
}
catch ( Exception& )
{
OSL_ENSHURE(0,"OSQLParseNode::likeNodeToStr Exception occured!");
OSL_ENSURE(0,"OSQLParseNode::likeNodeToStr Exception occured!");
}
const OSQLParseNode* pCol = m_aChilds[0]->getChild(m_aChilds[0]->count()-1);
......@@ -1325,8 +1325,8 @@ void OSQLParseNode::showParseTree(::rtl::OUString& rString, sal_uInt32 nLevel)
//-----------------------------------------------------------------------------
void OSQLParseNode::insert(sal_uInt32 nPos, OSQLParseNode* pNewSubTree)
{
OSL_ENSHURE(pNewSubTree != NULL, "OSQLParseNode: ungueltiger NewSubTree");
OSL_ENSHURE(pNewSubTree->getParent() == NULL, "OSQLParseNode: Knoten ist kein Waise");
OSL_ENSURE(pNewSubTree != NULL, "OSQLParseNode: ungueltiger NewSubTree");
OSL_ENSURE(pNewSubTree->getParent() == NULL, "OSQLParseNode: Knoten ist kein Waise");
// stelle Verbindung zum getParent her:
pNewSubTree->setParent( this );
......@@ -1349,7 +1349,7 @@ OSQLParseNode* OSQLParseNode::removeAt(sal_uInt32 nPos)
//-----------------------------------------------------------------------------
OSQLParseNode* OSQLParseNode::remove(OSQLParseNode* pSubTree)
{
OSL_ENSHURE(pSubTree != NULL, "OSQLParseNode: ungueltiger SubTree");
OSL_ENSURE(pSubTree != NULL, "OSQLParseNode: ungueltiger SubTree");
::std::vector<OSQLParseNode*>::iterator aPos = ::std::find(m_aChilds.begin(), m_aChilds.end(), pSubTree);
if (aPos != m_aChilds.end())
{
......@@ -1366,10 +1366,10 @@ OSQLParseNode* OSQLParseNode::remove(OSQLParseNode* pSubTree)
//-----------------------------------------------------------------------------
OSQLParseNode* OSQLParseNode::replaceAt(sal_uInt32 nPos, OSQLParseNode* pNewSubNode)
{
OSL_ENSHURE(pNewSubNode != NULL, "OSQLParseNode: invalid nodes");
OSL_ENSHURE(pNewSubNode->getParent() == NULL, "OSQLParseNode: node already has getParent");
OSL_ENSHURE(nPos < m_aChilds.size(), "OSQLParseNode: invalid position");
OSL_ENSHURE(::std::find(m_aChilds.begin(), m_aChilds.end(), pNewSubNode) == m_aChilds.end(),
OSL_ENSURE(pNewSubNode != NULL, "OSQLParseNode: invalid nodes");
OSL_ENSURE(pNewSubNode->getParent() == NULL, "OSQLParseNode: node already has getParent");
OSL_ENSURE(nPos < m_aChilds.size(), "OSQLParseNode: invalid position");
OSL_ENSURE(::std::find(m_aChilds.begin(), m_aChilds.end(), pNewSubNode) == m_aChilds.end(),
"OSQLParseNode::Replace() Node already element of parent");
OSQLParseNode* pOldSubNode = m_aChilds[nPos];
......@@ -1385,11 +1385,11 @@ OSQLParseNode* OSQLParseNode::replaceAt(sal_uInt32 nPos, OSQLParseNode* pNewSubN
//-----------------------------------------------------------------------------
OSQLParseNode* OSQLParseNode::replace (OSQLParseNode* pOldSubNode, OSQLParseNode* pNewSubNode )
{
OSL_ENSHURE(pOldSubNode != NULL && pNewSubNode != NULL, "OSQLParseNode: invalid nodes");
OSL_ENSHURE(pNewSubNode->getParent() == NULL, "OSQLParseNode: node already has getParent");
OSL_ENSHURE(::std::find(m_aChilds.begin(), m_aChilds.end(), pOldSubNode) != m_aChilds.end(),
OSL_ENSURE(pOldSubNode != NULL && pNewSubNode != NULL, "OSQLParseNode: invalid nodes");
OSL_ENSURE(pNewSubNode->getParent() == NULL, "OSQLParseNode: node already has getParent");
OSL_ENSURE(::std::find(m_aChilds.begin(), m_aChilds.end(), pOldSubNode) != m_aChilds.end(),
"OSQLParseNode::Replace() Node not element of parent");
OSL_ENSHURE(::std::find(m_aChilds.begin(), m_aChilds.end(), pNewSubNode) == m_aChilds.end(),
OSL_ENSURE(::std::find(m_aChilds.begin(), m_aChilds.end(), pNewSubNode) == m_aChilds.end(),
"OSQLParseNode::Replace() Node already element of parent");
pOldSubNode->setParent( NULL );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment