summaryrefslogtreecommitdiff
path: root/l10ntools
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2015-10-12 07:45:01 +0200
committerNoel Grandin <noelgrandin@gmail.com>2015-10-12 06:52:56 +0000
commitccc5ea08d64c38a9ce925d448c3010aca19ed35c (patch)
treee50c45ee596185f9a030641465796394c71ad410 /l10ntools
parent898aff0d190b09d16cce866909b64cf023cba43f (diff)
cppcheck:variableScope
Change-Id: I037feb335499629300309851dcda3bb661f03d4f Reviewed-on: https://gerrit.libreoffice.org/19316 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'l10ntools')
-rw-r--r--l10ntools/source/xmlparse.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/l10ntools/source/xmlparse.cxx b/l10ntools/source/xmlparse.cxx
index 00c05cfffe79..becad85f6a2e 100644
--- a/l10ntools/source/xmlparse.cxx
+++ b/l10ntools/source/xmlparse.cxx
@@ -431,7 +431,6 @@ XMLFile& XMLFile::operator=(const XMLFile& rObj)
void XMLFile::SearchL10NElements( XMLChildNode *pCur, int nPos )
{
- bool bInsert = true;
if ( !pCur )
SearchL10NElements( this );
else
@@ -453,6 +452,7 @@ void XMLFile::SearchL10NElements( XMLChildNode *pCur, int nPos )
break;
case XML_NODE_TYPE_ELEMENT:
{
+ bool bInsert = true;
XMLElement *pElement = static_cast<XMLElement*>(pCur);
const OString sName(pElement->GetName().toAsciiLowerCase());
OString sLanguage, sTmpStrVal, sOldref;
@@ -507,7 +507,6 @@ bool XMLFile::CheckExportStatus( XMLParentNode *pCur )
{
static bool bStatusExport = true;
- bool bInsert = true;
if ( !pCur )
CheckExportStatus( this );
else {
@@ -532,7 +531,7 @@ bool XMLFile::CheckExportStatus( XMLParentNode *pCur )
{
if ( pElement->GetAttributeList())
{
- for (size_t j = 0 , cnt = pElement->GetAttributeList()->size(); j < cnt && bInsert; ++j)
+ for (size_t j = 0 , cnt = pElement->GetAttributeList()->size(); j < cnt; ++j)
{
const OString tmpStr((*pElement->GetAttributeList())[j]->GetName());
if (tmpStr.equalsIgnoreAsciiCase("STATUS"))