Kaydet (Commit) 0b468bab authored tarafından Julien Nabet's avatar Julien Nabet

Fix 2 "scope of the variable can be reduced"

üst fd2cb15b
...@@ -147,7 +147,6 @@ Sequence<OUString> ScDefaultsCfg::GetPropertyNames() ...@@ -147,7 +147,6 @@ Sequence<OUString> ScDefaultsCfg::GetPropertyNames()
ScDefaultsCfg::ScDefaultsCfg() : ScDefaultsCfg::ScDefaultsCfg() :
ConfigItem( OUString(RTL_CONSTASCII_USTRINGPARAM( CFGPATH_FORMULA )) ) ConfigItem( OUString(RTL_CONSTASCII_USTRINGPARAM( CFGPATH_FORMULA )) )
{ {
sal_Int32 nIntVal = 0;
OUString aPrefix; OUString aPrefix;
Sequence<OUString> aNames = GetPropertyNames(); Sequence<OUString> aNames = GetPropertyNames();
...@@ -156,6 +155,7 @@ ScDefaultsCfg::ScDefaultsCfg() : ...@@ -156,6 +155,7 @@ ScDefaultsCfg::ScDefaultsCfg() :
OSL_ENSURE(aValues.getLength() == aNames.getLength(), "GetProperties failed"); OSL_ENSURE(aValues.getLength() == aNames.getLength(), "GetProperties failed");
if(aValues.getLength() == aNames.getLength()) if(aValues.getLength() == aNames.getLength())
{ {
sal_Int32 nIntVal = 0;
for(int nProp = 0; nProp < aNames.getLength(); nProp++) for(int nProp = 0; nProp < aNames.getLength(); nProp++)
{ {
OSL_ENSURE(pValues[nProp].hasValue(), "property value missing"); OSL_ENSURE(pValues[nProp].hasValue(), "property value missing");
......
...@@ -229,14 +229,13 @@ Sequence<OUString> ScFormulaCfg::GetPropertyNames() ...@@ -229,14 +229,13 @@ Sequence<OUString> ScFormulaCfg::GetPropertyNames()
ScFormulaCfg::ScFormulaCfg() : ScFormulaCfg::ScFormulaCfg() :
ConfigItem( OUString(RTL_CONSTASCII_USTRINGPARAM( CFGPATH_FORMULA )) ) ConfigItem( OUString(RTL_CONSTASCII_USTRINGPARAM( CFGPATH_FORMULA )) )
{ {
sal_Int32 nIntVal = 0;
Sequence<OUString> aNames = GetPropertyNames(); Sequence<OUString> aNames = GetPropertyNames();
Sequence<Any> aValues = GetProperties(aNames); Sequence<Any> aValues = GetProperties(aNames);
const Any* pValues = aValues.getConstArray(); const Any* pValues = aValues.getConstArray();
OSL_ENSURE(aValues.getLength() == aNames.getLength(), "GetProperties failed"); OSL_ENSURE(aValues.getLength() == aNames.getLength(), "GetProperties failed");
if(aValues.getLength() == aNames.getLength()) if(aValues.getLength() == aNames.getLength())
{ {
sal_Int32 nIntVal = 0;
for(int nProp = 0; nProp < aNames.getLength(); nProp++) for(int nProp = 0; nProp < aNames.getLength(); nProp++)
{ {
OSL_ENSURE(pValues[nProp].hasValue(), "property value missing"); OSL_ENSURE(pValues[nProp].hasValue(), "property value missing");
......
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