Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
730d9ab6
Kaydet (Commit)
730d9ab6
authored
Mar 21, 2001
tarafından
Joachim Lingner
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
OSL_ENSHURE replaced by OSL_ENSURE
üst
6c821b4f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
49 additions
and
49 deletions
+49
-49
internalnode.cxx
connectivity/source/parse/internalnode.cxx
+7
-7
sqlbison.y
connectivity/source/parse/sqlbison.y
+11
-11
sqlflex.l
connectivity/source/parse/sqlflex.l
+6
-6
sqliterator.cxx
connectivity/source/parse/sqliterator.cxx
+0
-0
sqlnode.cxx
connectivity/source/parse/sqlnode.cxx
+25
-25
No files found.
connectivity/source/parse/internalnode.cxx
Dosyayı görüntüle @
730d9ab6
...
...
@@ -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_ENS
H
URE
(
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_ENS
H
URE
(
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_ENS
H
URE
(
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_ENS
H
URE
(
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_ENS
H
URE
(
OSQLParser
::
s_pGarbageCollector
,
"Collector not initialized"
);
OSL_ENSURE
(
OSQLParser
::
s_pGarbageCollector
,
"Collector not initialized"
);
if
(
!
OSQLParser
::
s_pGarbageCollector
->
empty
())
{
OSQLParser
::
s_pGarbageCollector
->
erase
(
...
...
connectivity/source/parse/sqlbison.y
Dosyayı görüntüle @
730d9ab6
%{
//--------------------------------------------------------------------------
//
// $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/connectivity/source/parse/sqlbison.y,v 1.2
0 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.2
1 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_ENS
H
URE(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_ENS
H
URE(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_ENS
H
URE(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_ENS
H
URE(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_ENS
H
URE(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_ENS
H
URE(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_ENS
H
URE(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_ENS
H
URE(pLiteral->isRule(), "This is no ::com::sun::star::chaos::Rule");
OSL_ENS
H
URE(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)
...
...
connectivity/source/parse/sqlflex.l
Dosyayı görüntüle @
730d9ab6
...
...
@@ -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_ENS
H
URE(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_ENS
H
URE(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_ENS
H
URE(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_ENS
H
URE(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;
}
// -------------------------------------------------------------------------
...
...
connectivity/source/parse/sqliterator.cxx
Dosyayı görüntüle @
730d9ab6
This diff is collapsed.
Click to expand it.
connectivity/source/parse/sqlnode.cxx
Dosyayı görüntüle @
730d9ab6
...
...
@@ -2,9 +2,9 @@
*
* $RCSfile: sqlnode.cxx,v $
*
* $Revision: 1.1
2
$
* $Revision: 1.1
3
$
*
* 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_ENS
H
URE
(
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_ENS
H
URE
(
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_ENS
H
URE
(
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_ENS
H
URE
(
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_ENS
H
URE
(
pNewNode
!=
NULL
,
"OSQLParseNode: ungueltiger NewSubTree"
);
OSL_ENS
H
URE
(
pNewNode
->
getParent
()
==
NULL
,
"OSQLParseNode: Knoten ist kein Waise"
);
OSL_ENS
H
URE
(
::
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_ENS
H
URE
(
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_ENS
H
URE
(
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_ENS
H
URE
(
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_ENS
H
URE
(
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_ENS
H
URE
(
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_ENS
H
URE
(
pNewSubTree
!=
NULL
,
"OSQLParseNode: ungueltiger NewSubTree"
);
OSL_ENS
H
URE
(
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_ENS
H
URE
(
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_ENS
H
URE
(
pNewSubNode
!=
NULL
,
"OSQLParseNode: invalid nodes"
);
OSL_ENS
H
URE
(
pNewSubNode
->
getParent
()
==
NULL
,
"OSQLParseNode: node already has getParent"
);
OSL_ENS
H
URE
(
nPos
<
m_aChilds
.
size
(),
"OSQLParseNode: invalid position"
);
OSL_ENS
H
URE
(
::
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_ENS
H
URE
(
pOldSubNode
!=
NULL
&&
pNewSubNode
!=
NULL
,
"OSQLParseNode: invalid nodes"
);
OSL_ENS
H
URE
(
pNewSubNode
->
getParent
()
==
NULL
,
"OSQLParseNode: node already has getParent"
);
OSL_ENS
H
URE
(
::
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_ENS
H
URE
(
::
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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment