summaryrefslogtreecommitdiff
path: root/l10ntools
diff options
context:
space:
mode:
authorSantiago Martinez <smvarela@gmail.com>2012-03-27 21:16:50 +0200
committerCaolán McNamara <caolanm@redhat.com>2012-03-27 20:49:07 +0100
commita84e97e58fe0915376801f98e1c0d24470f1e1d3 (patch)
treea2d3c31dfed182d21546dfa5c31e01909c6dc4d1 /l10ntools
parentbfa1547570add919754cba82d0ca1062eabfb6dd (diff)
Remove unused code in l10ntools.
Diffstat (limited to 'l10ntools')
-rw-r--r--l10ntools/inc/xmlparse.hxx6
-rw-r--r--l10ntools/source/xmlparse.cxx61
2 files changed, 0 insertions, 67 deletions
diff --git a/l10ntools/inc/xmlparse.hxx b/l10ntools/inc/xmlparse.hxx
index cd9bc2ba50fd..0731a9f453e8 100644
--- a/l10ntools/inc/xmlparse.hxx
+++ b/l10ntools/inc/xmlparse.hxx
@@ -169,13 +169,7 @@ public:
XMLChildNode *pChild , size_t pos /// the new child
);
- int RemoveChild( XMLElement *pRefElement );
void RemoveAndDeleteAllChildren();
-
- /// returns a child element which matches the given one
- XMLElement *GetChildElement(
- XMLElement *pRefElement // the reference elelement
- );
};
//-------------------------------------------------------------------------
diff --git a/l10ntools/source/xmlparse.cxx b/l10ntools/source/xmlparse.cxx
index e64630864d6d..5be1f0e66e21 100644
--- a/l10ntools/source/xmlparse.cxx
+++ b/l10ntools/source/xmlparse.cxx
@@ -159,37 +159,6 @@ void XMLParentNode::AddChild( XMLChildNode *pChild , size_t pos )
}
/*****************************************************************************/
-int XMLParentNode::RemoveChild( XMLElement *pRefElement )
-/*****************************************************************************/
-{
- XMLElement* a;
- if ( pChildList ){
- for ( size_t i = 0; i < pChildList->size(); i++ ) {
- XMLChildNode *pChild = (*pChildList)[ i ];
- if ( pChild->GetNodeType() == XML_NODE_TYPE_ELEMENT ){
- a = static_cast<XMLElement* >(pChild);
- rtl::OString elemid(a->GetId().toAsciiLowerCase());
- rtl::OString elemLID(a->GetLanguageId().toAsciiLowerCase());
- rtl::OString pRefLID(
- pRefElement->GetLanguageId().toAsciiLowerCase());
- if (elemid == pRefElement->GetId() && elemLID == pRefLID)
- {
- if( pRefElement->ToOString().compareTo( a->ToOString() )==0 ){
- XMLChildNodeList::iterator it = pChildList->begin();
- ::std::advance( it, i );
- pChildList->erase( it );
- delete a; // Test
- return i;
- }
- }
- }
-
- }
- }
- return -1;
-}
-
-/*****************************************************************************/
void XMLParentNode::RemoveAndDeleteAllChildren(){
/*****************************************************************************/
if ( pChildList ) {
@@ -199,36 +168,6 @@ void XMLParentNode::RemoveAndDeleteAllChildren(){
}
}
-/*****************************************************************************/
-XMLElement *XMLParentNode::GetChildElement( XMLElement *pRefElement )
-/*****************************************************************************/
-{
- for ( size_t i = 0; i < pChildList->size(); i++ ) {
- XMLChildNode *pChild = (*pChildList)[ i ];
- if ( pChild->GetNodeType() == XML_NODE_TYPE_ELEMENT )
- if ((( XMLElement * ) pChild )->GetName() ==
- pRefElement->GetName())
- {
- XMLAttributeList *pList = pRefElement->GetAttributeList();
- if ( !pList )
- return ( XMLElement * ) pChild;
-
- sal_Bool bMatch = sal_False;
- for ( size_t j = 0; j < pList->size() && bMatch; j++ ) {
- XMLAttribute *pAttribute = (*pList)[ j ];
- XMLAttribute *pCandidate =
- (( XMLElement * ) pChild )->GetAttribute(
- pAttribute->GetName() );
- if ( !pCandidate || !pAttribute->IsEqual( *pCandidate ))
- bMatch = sal_False;
- }
- if ( bMatch )
- return ( XMLElement * ) pChild;
- }
- }
- return NULL;
-}
-
//
// class XMLFile
//