[Libreoffice-commits] .: sc/source
Caolán McNamara
caolan at kemper.freedesktop.org
Tue Apr 17 12:50:05 PDT 2012
sc/source/filter/oox/workbookhelper.cxx | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
New commits:
commit 8ae293f0a1509b26f9a65f9297fddca7b106e46e
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Apr 17 20:49:51 2012 +0100
WaE: MacOSX pScRangeData may be unused uninitialized
diff --git a/sc/source/filter/oox/workbookhelper.cxx b/sc/source/filter/oox/workbookhelper.cxx
index 479f504..83c67bd 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;
More information about the Libreoffice-commits
mailing list