summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-04-17 20:49:51 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-04-17 20:49:51 +0100
commit8ae293f0a1509b26f9a65f9297fddca7b106e46e (patch)
tree9489519aa327a4a4899ec181fa0952e2504871cf /sc
parentb92de73fdd81acc5fdb92005af34b3ce9f8ed37b (diff)
WaE: MacOSX pScRangeData may be unused uninitialized
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/oox/workbookhelper.cxx10
1 files changed, 4 insertions, 6 deletions
diff --git a/sc/source/filter/oox/workbookhelper.cxx b/sc/source/filter/oox/workbookhelper.cxx
index 479f504e3c4f..83c67bdb075c 100644
--- a/sc/source/filter/oox/workbookhelper.cxx
+++ b/sc/source/filter/oox/workbookhelper.cxx
@@ -382,8 +382,7 @@ ScRangeData* lcl_addNewByNameAndTokens( ScDocument& rDoc, ScRangeName* pNames, c
ScRangeData* WorkbookGlobals::createNamedRangeObject( OUString& orName, const Sequence< FormulaToken>& rTokens, sal_Int32 nIndex, sal_Int32 nNameFlags ) const
{
// create the name and insert it into the Calc document
- Reference< XNamedRange > xNamedRange;
- ScRangeData* pScRangeData;
+ ScRangeData* pScRangeData = NULL;
if( !orName.isEmpty() ) try
{
// find an unused name
@@ -396,7 +395,7 @@ ScRangeData* WorkbookGlobals::createNamedRangeObject( OUString& orName, const Se
ScRangeName* pNames = rDoc.GetRangeName();
pScRangeData = lcl_addNewByNameAndTokens( rDoc, pNames, orName, rTokens, nIndex, nNameFlags );
}
- catch( Exception& )
+ catch (const Exception&)
{
}
return pScRangeData;
@@ -405,8 +404,7 @@ ScRangeData* WorkbookGlobals::createNamedRangeObject( OUString& orName, const Se
ScRangeData* WorkbookGlobals::createLocalNamedRangeObject( OUString& orName, const Sequence< FormulaToken >& rTokens, sal_Int32 nIndex, sal_Int32 nNameFlags, sal_Int32 nTab ) const
{
// create the name and insert it into the Calc document
- Reference< XNamedRange > xNamedRange;
- ScRangeData* pScRangeData;
+ ScRangeData* pScRangeData = NULL;
if( !orName.isEmpty() ) try
{
// find an unused name
@@ -423,7 +421,7 @@ ScRangeData* WorkbookGlobals::createLocalNamedRangeObject( OUString& orName, con
ScRangeName* pNames = rDoc.GetRangeName( nTab );
pScRangeData = lcl_addNewByNameAndTokens( rDoc, pNames, orName, rTokens, nIndex, nNameFlags );
}
- catch( Exception& )
+ catch (const Exception&)
{
}
return pScRangeData;