diff options
author | Zolnai Tamás <zolnaitamas2000@gmail.com> | 2013-09-18 10:39:20 +0200 |
---|---|---|
committer | Zolnai Tamás <zolnaitamas2000@gmail.com> | 2013-09-18 21:52:46 +0200 |
commit | db45382b09ee9645586f8153ab757d1a9fed87ef (patch) | |
tree | 8a474d279f85d3f1599dd941b076dd61696d8cc9 /l10ntools | |
parent | 983d285d751aa206b6c4aa52a10ff0d3e02a1d14 (diff) |
xmlparse.cxx: Useless const variables
Change-Id: Ia93f352a2e7069e910efcc1dc3810cc689fc18ac
Diffstat (limited to 'l10ntools')
-rw-r--r-- | l10ntools/source/xmlparse.cxx | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/l10ntools/source/xmlparse.cxx b/l10ntools/source/xmlparse.cxx index 42030503351f..4873c21509b2 100644 --- a/l10ntools/source/xmlparse.cxx +++ b/l10ntools/source/xmlparse.cxx @@ -439,8 +439,6 @@ XMLFile& XMLFile::operator=(const XMLFile& obj){ void XMLFile::SearchL10NElements( XMLParentNode *pCur , int pos) /*****************************************************************************/ { - static const OString LOCALIZE("localize"); - static const OString THEID("id"); bool bInsert = true; if ( !pCur ) SearchL10NElements( this ); @@ -465,10 +463,10 @@ void XMLFile::SearchL10NElements( XMLParentNode *pCur , int pos) for ( size_t j = 0 , cnt = pElement->GetAttributeList()->size(); j < cnt && bInsert; ++j ) { const OString tmpStr = OUStringToOString((*pElement->GetAttributeList())[j]->GetName(), RTL_TEXTENCODING_UTF8); - if (tmpStr == THEID) { // Get the "id" Attribute + if (tmpStr == "id") { tmpStrVal=OUStringToOString( (*pElement->GetAttributeList())[ j ]->GetValue(),RTL_TEXTENCODING_UTF8 ); } - if (tmpStr == LOCALIZE) { // Get the "localize" Attribute + if (tmpStr == "localize") { bInsert=false; } if (tmpStr == XML_LANG) { // Get the "xml-lang" Attribute @@ -510,10 +508,6 @@ bool XMLFile::CheckExportStatus( XMLParentNode *pCur ) /*****************************************************************************/ { static bool bStatusExport = true; - const OString STATUS(RTL_CONSTASCII_STRINGPARAM("status")); - const OString PUBLISH(RTL_CONSTASCII_STRINGPARAM("PUBLISH")); - const OString DEPRECATED(RTL_CONSTASCII_STRINGPARAM("DEPRECATED")); - const OString TOPIC(RTL_CONSTASCII_STRINGPARAM("topic")); bool bInsert = true; if ( !pCur ) @@ -533,7 +527,7 @@ bool XMLFile::CheckExportStatus( XMLParentNode *pCur ) case XML_NODE_TYPE_ELEMENT: { XMLElement *pElement = ( XMLElement * ) pCur; OString sName(OUStringToOString(pElement->GetName(), RTL_TEXTENCODING_ASCII_US)); - if (sName.equalsIgnoreAsciiCase(TOPIC)) + if (sName.equalsIgnoreAsciiCase("TOPIC")) { if ( pElement->GetAttributeList()) { @@ -541,12 +535,12 @@ bool XMLFile::CheckExportStatus( XMLParentNode *pCur ) { const OString tmpStr(OUStringToOString((*pElement->GetAttributeList())[j]->GetName(), RTL_TEXTENCODING_UTF8)); - if (tmpStr.equalsIgnoreAsciiCase(STATUS)) + if (tmpStr.equalsIgnoreAsciiCase("STATUS")) { OString tmpStrVal(OUStringToOString( (*pElement->GetAttributeList())[j]->GetValue(), RTL_TEXTENCODING_UTF8)); - if (!tmpStrVal.equalsIgnoreAsciiCase(PUBLISH) && - !tmpStrVal.equalsIgnoreAsciiCase(DEPRECATED)) + if (!tmpStrVal.equalsIgnoreAsciiCase("PUBLISH") && + !tmpStrVal.equalsIgnoreAsciiCase("DEPRECATED")) { bStatusExport = false; } @@ -695,8 +689,6 @@ OUString XMLElement::ToOUString(){ /*****************************************************************************/ void XMLElement::Print(XMLNode *pCur, OUStringBuffer& buffer , bool rootelement ){ /*****************************************************************************/ - static const OUString XML_LANG ( "xml-lang" ); - if(pCur!=NULL){ if(rootelement){ XMLElement *pElement = ( XMLElement * ) pCur; @@ -723,7 +715,7 @@ void XMLElement::Print(XMLNode *pCur, OUStringBuffer& buffer , bool rootelement for ( size_t j = 0; j < pElement->GetAttributeList()->size(); j++ ){ OUString aAttrName( (*pElement->GetAttributeList())[ j ]->GetName() ); - if( !aAttrName.equalsIgnoreAsciiCase( XML_LANG ) ) { + if( !aAttrName.equalsIgnoreAsciiCase( "xml-lang" ) ) { buffer.append( OUString(" ") ); buffer.append( aAttrName ); buffer.append( OUString("=") ); |