summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/core/data/dpsave.cxx7
-rw-r--r--sc/source/filter/oox/excelfilter.cxx6
-rw-r--r--sc/source/filter/oox/pivotcachebuffer.cxx11
-rw-r--r--sc/source/filter/xml/xmlwrap.cxx22
-rw-r--r--sc/source/ui/Accessibility/DrawModelBroadcaster.cxx6
5 files changed, 33 insertions, 19 deletions
diff --git a/sc/source/core/data/dpsave.cxx b/sc/source/core/data/dpsave.cxx
index 1c2ab97f3a1e..5b9637d50607 100644
--- a/sc/source/core/data/dpsave.cxx
+++ b/sc/source/core/data/dpsave.cxx
@@ -42,7 +42,7 @@
#include <com/sun/star/sheet/XMembersSupplier.hpp>
#include <com/sun/star/container/XNamed.hpp>
#include <com/sun/star/util/XCloneable.hpp>
-
+#include <tools/diagnose_ex.h>
#include <unordered_map>
#include <algorithm>
@@ -1142,9 +1142,10 @@ void ScDPSaveData::WriteToSource( const uno::Reference<sheet::XDimensionsSupplie
SC_UNO_DP_ROWGRAND, static_cast<bool>(nRowGrandMode) );
}
}
- catch(uno::Exception&)
+ catch(uno::Exception const &)
{
- SAL_WARN("sc.core", "exception in WriteToSource");
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("sc.core", "exception in WriteToSource " << exceptionToString(ex));
}
}
diff --git a/sc/source/filter/oox/excelfilter.cxx b/sc/source/filter/oox/excelfilter.cxx
index 2546bf98ba46..b3ec268b0db9 100644
--- a/sc/source/filter/oox/excelfilter.cxx
+++ b/sc/source/filter/oox/excelfilter.cxx
@@ -38,6 +38,7 @@
#include <svtools/sfxecode.hxx>
#include <svtools/ehdl.hxx>
#include <tools/urlobj.hxx>
+#include <tools/diagnose_ex.h>
namespace oox {
namespace xls {
@@ -94,9 +95,10 @@ bool ExcelFilter::importDocument()
{
importDocumentProperties();
}
- catch( const Exception& e )
+ catch( const Exception& )
{
- SAL_WARN("sc", "exception when importing document properties " << e);
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("sc", "exception when importing document properties " << exceptionToString(ex));
}
catch( ... )
{
diff --git a/sc/source/filter/oox/pivotcachebuffer.cxx b/sc/source/filter/oox/pivotcachebuffer.cxx
index 2adda9081355..a4f033510e6f 100644
--- a/sc/source/filter/oox/pivotcachebuffer.cxx
+++ b/sc/source/filter/oox/pivotcachebuffer.cxx
@@ -35,6 +35,7 @@
#include <oox/token/namespaces.hxx>
#include <oox/token/properties.hxx>
#include <oox/token/tokens.hxx>
+#include <tools/diagnose_ex.h>
#include <defnamesbuffer.hxx>
#include <pivotcachefragment.hxx>
#include <sheetdatabuffer.hxx>
@@ -734,9 +735,10 @@ OUString PivotCacheField::createParentGroupField( const Reference< XDataPilotFie
aAutoName = xGroupName->getName();
}
}
- catch( Exception& )
+ catch( Exception const & )
{
- SAL_WARN("sc", "PivotCacheField::createParentGroupField - exception was thrown" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("sc", "PivotCacheField::createParentGroupField - exception was thrown " << exceptionToString(ex) );
}
SAL_WARN_IF( aAutoName.isEmpty(), "sc", "PivotCacheField::createParentGroupField - cannot find auto-generated group name" );
@@ -762,9 +764,10 @@ OUString PivotCacheField::createParentGroupField( const Reference< XDataPilotFie
pName->maGroupName = aGroupName;
}
}
- catch( Exception& )
+ catch( Exception const & )
{
- SAL_WARN("sc", "PivotCacheField::createParentGroupField - exception was thrown" );
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("sc", "PivotCacheField::createParentGroupField - exception was thrown " << exceptionToString(ex) );
}
}
++nIndex;
diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx
index a377239ccd11..8de761208428 100644
--- a/sc/source/filter/xml/xmlwrap.cxx
+++ b/sc/source/filter/xml/xmlwrap.cxx
@@ -58,6 +58,7 @@
#include <svx/xmleohlp.hxx>
#include <sal/log.hxx>
#include <unotools/saveopt.hxx>
+#include <tools/diagnose_ex.h>
#include <document.hxx>
#include <xmlwrap.hxx>
@@ -193,6 +194,7 @@ ErrCode ScXMLImportWrapper::ImportFromComponent(const uno::Reference<uno::XCompo
}
catch( const xml::sax::SAXParseException& r )
{
+ css::uno::Any ex( cppu::getCaughtException() );
// sax parser sends wrapped exceptions,
// try to find the original one
xml::sax::SAXException aSaxEx = *static_cast<xml::sax::SAXException const *>(&r);
@@ -214,7 +216,7 @@ ErrCode ScXMLImportWrapper::ImportFromComponent(const uno::Reference<uno::XCompo
nReturn = ERRCODE_SFX_WRONGPASSWORD;
else
{
- SAL_WARN("sc.filter", "SAX parse exception caught while importing: " << r);
+ SAL_WARN("sc.filter", "SAX parse exception caught while importing: " << exceptionToString(ex));
OUString sErr = OUString::number( r.LineNumber ) +
"," +
@@ -238,6 +240,7 @@ ErrCode ScXMLImportWrapper::ImportFromComponent(const uno::Reference<uno::XCompo
}
catch( const xml::sax::SAXException& r )
{
+ css::uno::Any ex( cppu::getCaughtException() );
packages::zip::ZipIOException aBrokenPackage;
if ( r.WrappedException >>= aBrokenPackage )
return ERRCODE_IO_BROKENPACKAGE;
@@ -245,26 +248,29 @@ ErrCode ScXMLImportWrapper::ImportFromComponent(const uno::Reference<uno::XCompo
nReturn = ERRCODE_SFX_WRONGPASSWORD;
else
{
- SAL_WARN("sc.filter", "SAX exception caught while importing: " << r);
+ SAL_WARN("sc.filter", "SAX exception caught while importing: " << exceptionToString(ex));
nReturn = SCERR_IMPORT_FORMAT;
}
}
- catch( const packages::zip::ZipIOException& r )
+ catch( const packages::zip::ZipIOException& )
{
- SAL_WARN("sc.filter", "Zip exception caught while importing: " << r);
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("sc.filter", "Zip exception caught while importing: " << exceptionToString(ex));
nReturn = ERRCODE_IO_BROKENPACKAGE;
}
- catch( const io::IOException& r )
+ catch( const io::IOException& )
{
- SAL_WARN("sc.filter", "IO exception caught while importing: " << r);
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("sc.filter", "IO exception caught while importing: " << exceptionToString(ex));
nReturn = SCERR_IMPORT_OPEN;
}
- catch( const uno::Exception& r )
+ catch( const uno::Exception& )
{
- SAL_WARN("sc.filter", "uno exception caught while importing: " << r);
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("sc.filter", "uno exception caught while importing: " << exceptionToString(ex));
nReturn = SCERR_IMPORT_UNKNOWN;
}
diff --git a/sc/source/ui/Accessibility/DrawModelBroadcaster.cxx b/sc/source/ui/Accessibility/DrawModelBroadcaster.cxx
index 4d1b654d9049..61bf52b466f5 100644
--- a/sc/source/ui/Accessibility/DrawModelBroadcaster.cxx
+++ b/sc/source/ui/Accessibility/DrawModelBroadcaster.cxx
@@ -21,6 +21,7 @@
#include <sal/log.hxx>
#include <svx/svdmodel.hxx>
#include <svx/unomod.hxx>
+#include <tools/diagnose_ex.h>
using namespace ::com::sun::star;
@@ -67,9 +68,10 @@ void ScDrawModelBroadcaster::Notify( SfxBroadcaster&,
{
xListener->notifyEvent( aEvent );
}
- catch( const uno::RuntimeException& r )
+ catch( const uno::RuntimeException& )
{
- SAL_WARN("sc.ui", "Runtime exception caught while notifying shape. : " << r);
+ css::uno::Any ex( cppu::getCaughtException() );
+ SAL_WARN("sc.ui", "Runtime exception caught while notifying shape. : " << exceptionToString(ex));
}
}
}