diff options
27 files changed, 99 insertions, 80 deletions
diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx index 65ef3c14927c..357f0d9e3134 100644 --- a/svx/source/dialog/rubydialog.cxx +++ b/svx/source/dialog/rubydialog.cxx @@ -19,8 +19,8 @@ #include <memory> #include <sal/config.h> #include <tools/debug.hxx> +#include <tools/diagnose_ex.h> -#include <osl/diagnose.h> #include <svx/rubydialog.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/sfxsids.hrc> @@ -346,7 +346,7 @@ void SvxRubyDialog::Activate() } catch (const Exception&) { - OSL_FAIL("exception in style access"); + TOOLS_WARN_EXCEPTION("svx.dialog", "exception in style access"); } if (!sCharStyleSelect.isEmpty()) m_xCharStyleLB->set_active_text(sCharStyleSelect); @@ -535,7 +535,7 @@ IMPL_LINK_NOARG(SvxRubyDialog, ApplyHdl_Impl, weld::Button&, void) } catch (const Exception&) { - OSL_FAIL("Exception caught"); + TOOLS_WARN_EXCEPTION("svx.dialog", ""); } } } diff --git a/svx/source/dialog/svxbmpnumvalueset.cxx b/svx/source/dialog/svxbmpnumvalueset.cxx index 998132c7a578..1086e45d3894 100644 --- a/svx/source/dialog/svxbmpnumvalueset.cxx +++ b/svx/source/dialog/svxbmpnumvalueset.cxx @@ -17,9 +17,11 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <osl/diagnose.h> +#include <sal/config.h> + #include <svx/dialmgr.hxx> #include <svx/strings.hrc> +#include <tools/diagnose_ex.h> #include <i18nlangtag/mslangid.hxx> #include <svtools/valueset.hxx> #include <editeng/numitem.hxx> @@ -242,7 +244,7 @@ void SvxNumValueSet::UserDraw( const UserDrawEvent& rUDEvt ) } catch(Exception&) { - OSL_FAIL("Exception in DefaultNumberingProvider::makeNumberingString"); + TOOLS_WARN_EXCEPTION("svx.dialog", ""); } } // start just next to the left edge @@ -315,7 +317,7 @@ void SvxNumValueSet::UserDraw( const UserDrawEvent& rUDEvt ) } catch(Exception&) { - OSL_FAIL("Exception in DefaultNumberingProvider::makeNumberingString"); + TOOLS_WARN_EXCEPTION("svx.dialog", ""); } aLeft.AdjustY( -(pDev->GetTextHeight()/2) ); @@ -373,7 +375,7 @@ void SvxNumValueSet::UserDraw( const UserDrawEvent& rUDEvt ) static bool bAssert = false; if(!bAssert) { - OSL_FAIL("exception in ::UserDraw"); + TOOLS_WARN_EXCEPTION("svx.dialog", ""); bAssert = true; } } diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx index c58de4031058..7442e796fc7e 100644 --- a/svx/source/fmcomp/fmgridcl.cxx +++ b/svx/source/fmcomp/fmgridcl.cxx @@ -346,7 +346,7 @@ sal_Int8 FmGridHeader::ExecuteDrop( const ExecuteDropEvent& _rEvt ) } catch (Exception&) { - OSL_FAIL("FmGridHeader::ExecuteDrop: caught an exception while creatin' the column !"); + TOOLS_WARN_EXCEPTION("svx", "caught an exception while creatin' the column !"); ::comphelper::disposeComponent(xStatement); return DND_ACTION_NONE; } @@ -482,7 +482,7 @@ IMPL_LINK_NOARG( FmGridHeader, OnAsyncExecuteDrop, void*, void ) } catch (const Exception&) { - OSL_FAIL("FmGridHeader::ExecuteDrop: Exception occurred!"); + TOOLS_WARN_EXCEPTION("svx", ""); } assert(aPossibleTypes.size() == aImgResId.size()); @@ -624,7 +624,7 @@ IMPL_LINK_NOARG( FmGridHeader, OnAsyncExecuteDrop, void*, void ) } catch (Exception&) { - OSL_FAIL("FmGridHeader::OnAsyncExecuteDrop: caught an exception while creatin' the column !"); + TOOLS_WARN_EXCEPTION("svx", "caught an exception while creatin' the column !"); ::comphelper::disposeComponent(m_pImpl->xDroppedResultSet); ::comphelper::disposeComponent(m_pImpl->xDroppedStatement); return; @@ -1182,7 +1182,7 @@ void FmGridControl::DeleteSelectedRows() } catch(const Exception&) { - OSL_FAIL("Exception caught while deleting rows!"); + TOOLS_WARN_EXCEPTION("svx", "Exception caught while deleting rows!"); } // adapt to the data cursor AdjustDataSource(true); diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index b7c14fbc2eab..8c8206d31b10 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -1057,8 +1057,8 @@ void DbTextField::Init(BrowserDataWin& rParent, const Reference< XRowSet >& xCur } catch( const Exception& ) { - DBG_UNHANDLED_EXCEPTION("svx"); - OSL_FAIL( "DbTextField::Init: caught an exception while determining the multi-line capabilities!" ); + TOOLS_WARN_EXCEPTION("svx", + "caught an exception while determining the multi-line capabilities!"); } m_bIsSimpleEdit = !bIsMultiLine; diff --git a/svx/source/form/fmPropBrw.cxx b/svx/source/form/fmPropBrw.cxx index 15ea18d96ad5..e42e414be757 100644 --- a/svx/source/form/fmPropBrw.cxx +++ b/svx/source/form/fmPropBrw.cxx @@ -249,7 +249,7 @@ OUString FmPropBrw::getCurrentPage() const } catch( const Exception& ) { - OSL_FAIL( "FmPropBrw::getCurrentPage: caught an exception while retrieving the current page!" ); + TOOLS_WARN_EXCEPTION("svx.form", "caught an exception while retrieving the current page!"); } return sCurrentPage; } @@ -268,7 +268,7 @@ void FmPropBrw::implDetachController() } catch( const Exception& ) { - OSL_FAIL( "FmPropBrw::implDetachController: caught an exception while resetting the component!" ); + TOOLS_WARN_EXCEPTION("svx.form", "caught an exception while resetting the component!"); } } @@ -296,7 +296,7 @@ void FmPropBrw::Close() } catch( const Exception& ) { - OSL_FAIL( "FmPropBrw::Close: caught an exception while asking the controller!" ); + TOOLS_WARN_EXCEPTION("svx.form", "caught an exception while asking the controller!"); } } @@ -347,7 +347,7 @@ void FmPropBrw::implSetNewSelection( const InterfaceBag& _rSelection ) } catch( const Exception& ) { - OSL_FAIL( "FmPropBrw::implSetNewSelection: caught an unexpected exception!" ); + TOOLS_WARN_EXCEPTION("svx.form", ""); return; } @@ -558,7 +558,8 @@ void FmPropBrw::StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPool } catch( const Exception& ) { - OSL_FAIL( "FmPropBrw::StateChanged: caught an exception while setting the initial page!" ); + TOOLS_WARN_EXCEPTION("svx.form", + "caught an exception while setting the initial page!"); } } @@ -573,7 +574,7 @@ void FmPropBrw::StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPool } catch (Exception&) { - OSL_FAIL("FmPropBrw::StateChanged: Exception occurred!"); + TOOLS_WARN_EXCEPTION("svx.form", ""); } } diff --git a/svx/source/form/fmobj.cxx b/svx/source/form/fmobj.cxx index abb18c7f2f98..b589077068e7 100644 --- a/svx/source/form/fmobj.cxx +++ b/svx/source/form/fmobj.cxx @@ -495,7 +495,8 @@ Reference< XInterface > FmFormObj::ensureModelEnv(const Reference< XInterface > } catch(Exception&) { - OSL_FAIL("FmFormObj::ensureModelEnv : exception while getting a sibling's DSS !"); + TOOLS_WARN_EXCEPTION("svx.form", + "exception while getting a sibling's DSS !"); } } @@ -526,7 +527,8 @@ Reference< XInterface > FmFormObj::ensureModelEnv(const Reference< XInterface > } catch(Exception&) { - OSL_FAIL("FmFormObj::ensureModelEnv : exception while getting a destination DSS !"); + TOOLS_WARN_EXCEPTION("svx.form", + "exception while getting a destination DSS !"); } } diff --git a/svx/source/form/fmshell.cxx b/svx/source/form/fmshell.cxx index 9c3e77994b78..848f5a9f0a01 100644 --- a/svx/source/form/fmshell.cxx +++ b/svx/source/form/fmshell.cxx @@ -1121,7 +1121,7 @@ void FmFormShell::GetFormState(SfxItemSet &rSet, sal_uInt16 nWhich) } catch( const Exception& ) { - OSL_FAIL( "FmFormShell::GetFormState: caught an exception while determining the state!" ); + TOOLS_WARN_EXCEPTION("svx.form", "caught an exception while determining the state!"); } if (!bEnable) rSet.DisableItem(nWhich); diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx index 0f91315bf94d..d7f25ec073bc 100644 --- a/svx/source/form/fmshimp.cxx +++ b/svx/source/form/fmshimp.cxx @@ -1617,7 +1617,7 @@ void FmXFormShell::SetY2KState_Lock(sal_uInt16 n) } catch(Exception&) { - OSL_FAIL("FmXFormShell::SetY2KState: Exception occurred!"); + TOOLS_WARN_EXCEPTION("svx.form", ""); } } @@ -1656,7 +1656,7 @@ void FmXFormShell::SetY2KState_Lock(sal_uInt16 n) } catch(Exception&) { - OSL_FAIL("FmXFormShell::SetY2KState: Exception occurred!"); + TOOLS_WARN_EXCEPTION("svx.form", ""); } } @@ -3045,7 +3045,7 @@ void FmXFormShell::stopFiltering_Lock(bool bSave) } catch(Exception&) { - OSL_FAIL("FmXFormShell::stopFiltering: Exception occurred!"); + TOOLS_WARN_EXCEPTION("svx.form", ""); } if (!isRowSetAlive(xFormSet)) diff --git a/svx/source/form/fmsrcimp.cxx b/svx/source/form/fmsrcimp.cxx index f9976d3cac66..f87997e5c24c 100644 --- a/svx/source/form/fmsrcimp.cxx +++ b/svx/source/form/fmsrcimp.cxx @@ -696,7 +696,7 @@ void FmSearchEngine::Init(const OUString& sVisibleFields) } catch (const Exception&) { - OSL_FAIL("Exception occurred!"); + TOOLS_WARN_EXCEPTION("svx.form", ""); } } diff --git a/svx/source/form/fmtools.cxx b/svx/source/form/fmtools.cxx index 21df3d4b4411..43cdd150a143 100644 --- a/svx/source/form/fmtools.cxx +++ b/svx/source/form/fmtools.cxx @@ -41,7 +41,6 @@ #include <comphelper/processfactory.hxx> #include <comphelper/property.hxx> #include <comphelper/types.hxx> -#include <osl/diagnose.h> #include <toolkit/helper/vclunohelper.hxx> #include <tools/debug.hxx> #include <tools/diagnose_ex.h> @@ -102,7 +101,7 @@ void displayException(const Any& _rExcept, vcl::Window* _pParent) } catch(const Exception&) { - OSL_FAIL("displayException: could not display the error message!"); + TOOLS_WARN_EXCEPTION("svx.form", "could not display the error message!"); } } diff --git a/svx/source/form/fmvwimp.cxx b/svx/source/form/fmvwimp.cxx index e5e844776272..5db66bfe14f6 100644 --- a/svx/source/form/fmvwimp.cxx +++ b/svx/source/form/fmvwimp.cxx @@ -1462,7 +1462,7 @@ SdrObjectUniquePtr FmXFormView::implCreateXFormsControl( const svx::OXFormsDescr } catch (const Exception&) { - OSL_FAIL("FmXFormView::implCreateXFormsControl: caught an exception while creating the control !"); + TOOLS_WARN_EXCEPTION("svx.form", "caught an exception while creating the control !"); } diff --git a/svx/source/form/formfeaturedispatcher.cxx b/svx/source/form/formfeaturedispatcher.cxx index 33071378326c..2224adabe3d9 100644 --- a/svx/source/form/formfeaturedispatcher.cxx +++ b/svx/source/form/formfeaturedispatcher.cxx @@ -107,12 +107,15 @@ namespace svx } catch( const DisposedException& ) { - OSL_FAIL( "OSingleFeatureDispatcher::notifyStatus: caught a DisposedException - removing the listener!" ); + TOOLS_WARN_EXCEPTION("svx.form", + "caught a DisposedException - removing the listener!"); aIter.remove( ); } catch( const Exception& ) { - OSL_FAIL( "OSingleFeatureDispatcher::notifyStatus: caught a generic exception while notifying a single listener!" ); + TOOLS_WARN_EXCEPTION( + "svx.form", + "caught a generic exception while notifying a single listener!"); } } } diff --git a/svx/source/inc/fmshimp.hxx b/svx/source/inc/fmshimp.hxx index b36ff93b8cfd..0c30e1b8819d 100644 --- a/svx/source/inc/fmshimp.hxx +++ b/svx/source/inc/fmshimp.hxx @@ -34,6 +34,7 @@ #include <com/sun/star/beans/XPropertyChangeListener.hpp> #include <com/sun/star/beans/PropertyChangeEvent.hpp> #include <com/sun/star/form/runtime/FeatureState.hpp> +#include <tools/diagnose_ex.h> #include <vcl/timer.hxx> #include <vcl/window.hxx> #include <sfx2/shell.hxx> @@ -56,7 +57,7 @@ typedef std::vector< css::uno::Reference< css::form::XForm > > FmFormArray; // catch database exceptions if they occur -#define DO_SAFE(statement) try { statement; } catch( const Exception& ) { OSL_FAIL("unhandled exception (I tried to move a cursor (or something like that).)"); } +#define DO_SAFE(statement) try { statement; } catch( const Exception& ) { TOOLS_WARN_EXCEPTION("svx", "unhandled exception (I tried to move a cursor (or something like that).)"); } enum class LoopGridsSync { DISABLE_SYNC = 1, diff --git a/svx/source/svdraw/charthelper.cxx b/svx/source/svdraw/charthelper.cxx index 857eafa6f59c..764abf0d3ec9 100644 --- a/svx/source/svdraw/charthelper.cxx +++ b/svx/source/svdraw/charthelper.cxx @@ -18,7 +18,7 @@ */ #include <svx/charthelper.hxx> -#include <osl/diagnose.h> +#include <tools/diagnose_ex.h> #include <com/sun/star/embed/XEmbeddedObject.hpp> #include <com/sun/star/lang/XUnoTunnel.hpp> #include <com/sun/star/util/XUpdatable2.hpp> @@ -132,7 +132,7 @@ void ChartHelper::AdaptDefaultsForChart( } catch( const uno::Exception & ) { - OSL_FAIL( "Exception caught in AdaptDefaultsForChart" ); + TOOLS_WARN_EXCEPTION("svx.svdraw", ""); } } diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx index a1c6846575d7..13f905ac2301 100644 --- a/svx/source/svdraw/svdoole2.cxx +++ b/svx/source/svdraw/svdoole2.cxx @@ -246,13 +246,13 @@ void SAL_CALL SdrLightEmbeddedClient_Impl::notifyEvent( const document::EventObj } catch( embed::NoVisualAreaSizeException& ) { - OSL_FAIL( "No visual area size!" ); + TOOLS_WARN_EXCEPTION("svx.svdraw", "No visual area size!"); aSz.Width = 5000; aSz.Height = 5000; } catch( uno::Exception& ) { - OSL_FAIL( "Unexpected exception!" ); + TOOLS_WARN_EXCEPTION("svx.svdraw", ""); aSz.Width = 5000; aSz.Height = 5000; } @@ -279,7 +279,7 @@ void SAL_CALL SdrLightEmbeddedClient_Impl::notifyEvent( const document::EventObj } catch( uno::Exception& ) { - OSL_FAIL( "Unexpected exception!" ); + TOOLS_WARN_EXCEPTION("svx.svdraw", ""); } } diff --git a/svx/source/table/accessibletableshape.cxx b/svx/source/table/accessibletableshape.cxx index 691dffc76982..3b65874b7a73 100644 --- a/svx/source/table/accessibletableshape.cxx +++ b/svx/source/table/accessibletableshape.cxx @@ -25,6 +25,7 @@ #include <com/sun/star/drawing/XShape.hpp> #include <com/sun/star/lang/IndexOutOfBoundsException.hpp> +#include <tools/diagnose_ex.h> #include <vcl/svapp.hxx> #include <AccessibleTableShape.hxx> @@ -312,7 +313,7 @@ void SAL_CALL AccessibleTableShapeImpl::modified( const EventObject& /*aEvent*/ } catch( const Exception& ) { - OSL_FAIL("svx::AccessibleTableShape::modified(), exception caught!"); + TOOLS_WARN_EXCEPTION("svx.table", ""); } } @@ -345,7 +346,7 @@ void AccessibleTableShape::Init() } catch( Exception& ) { - OSL_FAIL("AccessibleTableShape::init(), exception caught?"); + TOOLS_WARN_EXCEPTION("svx.table", ""); } AccessibleTableShape_Base::Init(); diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx index 1aa37d28b15c..71be1f2ecd94 100644 --- a/svx/source/table/cell.cxx +++ b/svx/source/table/cell.cxx @@ -56,6 +56,7 @@ #include <svx/xflbstit.hxx> #include <svx/xflbmtit.hxx> #include <svx/svdpool.hxx> +#include <tools/diagnose_ex.h> using ::editeng::SvxBorderLine; @@ -440,7 +441,7 @@ void Cell::dispose() } catch( Exception& ) { - OSL_FAIL("Cell::dispose(), exception caught!"); + TOOLS_WARN_EXCEPTION("svx.table", ""); } mxTable.clear(); } @@ -1307,11 +1308,11 @@ void SAL_CALL Cell::setPropertyValues( const Sequence< OUString >& aPropertyName } catch( UnknownPropertyException& ) { - OSL_FAIL("svx::Cell::setPropertyValues(), unknown property!" ); + TOOLS_WARN_EXCEPTION("svx.table", "unknown property!"); } catch( Exception& ) { - OSL_FAIL("svx::Cell::setPropertyValues(), Exception caught!" ); + TOOLS_WARN_EXCEPTION("svx.table", ""); } } } @@ -1336,11 +1337,11 @@ Sequence< Any > SAL_CALL Cell::getPropertyValues( const Sequence< OUString >& aP } catch( UnknownPropertyException& ) { - OSL_FAIL("svx::Cell::setPropertyValues(), unknown property!" ); + TOOLS_WARN_EXCEPTION("svx.table", "unknown property!"); } catch( Exception& ) { - OSL_FAIL( "svx::Cell::getPropertyValues(), Exception caught!" ); + TOOLS_WARN_EXCEPTION("svx.table", ""); } pValue++; } diff --git a/svx/source/table/cellcursor.cxx b/svx/source/table/cellcursor.cxx index 8adecf6316e7..6aa3e7cb66ef 100644 --- a/svx/source/table/cellcursor.cxx +++ b/svx/source/table/cellcursor.cxx @@ -28,6 +28,7 @@ #include <svx/strings.hrc> #include <svx/dialmgr.hxx> #include <tools/debug.hxx> +#include <tools/diagnose_ex.h> using namespace ::com::sun::star::uno; @@ -228,7 +229,7 @@ bool CellCursor::GetMergedSelection( CellPos& rStart, CellPos& rEnd ) } catch( Exception& ) { - OSL_FAIL("sdr::table::SvmxTableController::GetMergedSelection(), exception caught!"); + TOOLS_WARN_EXCEPTION("svx.table", ""); } return false; } @@ -257,7 +258,7 @@ void SAL_CALL CellCursor::merge( ) } catch( Exception& ) { - OSL_FAIL("sdr::table::CellCursor::merge(), exception caught!"); + TOOLS_WARN_EXCEPTION("svx.table", ""); } if( bUndo ) @@ -522,7 +523,7 @@ void SAL_CALL CellCursor::split( sal_Int32 nColumns, sal_Int32 nRows ) } catch( Exception& ) { - OSL_FAIL("sdr::table::CellCursor::split(), exception caught!"); + TOOLS_WARN_EXCEPTION("svx.table", ""); throw NoSupportException(); } diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx index 202006d828a8..946f3b441748 100644 --- a/svx/source/table/svdotable.cxx +++ b/svx/source/table/svdotable.cxx @@ -53,6 +53,7 @@ #include <cppuhelper/implbase.hxx> #include <libxml/xmlwriter.h> #include <rtl/ustrbuf.hxx> +#include <tools/diagnose_ex.h> #include <tools/UnitConversion.hxx> #include <boost/property_tree/ptree.hpp> @@ -316,7 +317,7 @@ void SdrTableObjImpl::CropTableModelToSelection(const CellPos& rStart, const Cel } catch( Exception& ) { - OSL_FAIL( "SdrTableObj::CropTableModelToSelection(), exception caught!" ); + TOOLS_WARN_EXCEPTION("svx.table", ""); } } @@ -453,7 +454,7 @@ SdrTableObjImpl& SdrTableObjImpl::operator=( const SdrTableObjImpl& rSource ) } catch( Exception& ) { - OSL_FAIL("svx::SdrTableObjImpl::operator=(), exception caught!"); + TOOLS_WARN_EXCEPTION("svx.table", ""); } // set that TableStyle @@ -656,7 +657,7 @@ void SdrTableObjImpl::DragEdge( bool mbHorizontal, int nEdge, sal_Int32 nOffset } catch( Exception& ) { - OSL_FAIL( "svx::SdrTableObjImpl::DragEdge(), exception caught!" ); + TOOLS_WARN_EXCEPTION("svx.table", ""); } } @@ -762,7 +763,7 @@ CellRef SdrTableObjImpl::getCell( const CellPos& rPos ) const } catch( Exception& ) { - OSL_FAIL( "svx::SdrTableObjImpl::getCell(), exception caught!" ); + TOOLS_WARN_EXCEPTION("svx.table", ""); } return xCell; } @@ -1600,7 +1601,7 @@ void SdrTableObj::setActiveCell( const CellPos& rPos ) } catch( Exception& ) { - OSL_FAIL("SdrTableObj::setActiveCell(), exception caught!"); + TOOLS_WARN_EXCEPTION("svx.table", ""); } } diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx index d03f197e9351..2dbd99266eac 100644 --- a/svx/source/table/tablecontroller.cxx +++ b/svx/source/table/tablecontroller.cxx @@ -1144,7 +1144,7 @@ void SvxTableController::SetTableStyle( const SfxItemSet* pArgs ) } catch( Exception& ) { - OSL_FAIL( "svx::SvxTableController::SetTableStyle(), exception caught!" ); + TOOLS_WARN_EXCEPTION("svx.table", ""); } } @@ -1154,7 +1154,7 @@ void SvxTableController::SetTableStyle( const SfxItemSet* pArgs ) } catch( Exception& ) { - OSL_FAIL( "svx::SvxTableController::SetTableStyle(), exception caught!" ); + TOOLS_WARN_EXCEPTION("svx.table", ""); } } @@ -1936,7 +1936,7 @@ void SvxTableController::MergeRange( sal_Int32 nFirstCol, sal_Int32 nFirstRow, s } catch( Exception& ) { - TOOLS_WARN_EXCEPTION( "svx", "" ); + TOOLS_WARN_EXCEPTION( "svx.table", "" ); } } @@ -1956,7 +1956,7 @@ void SvxTableController::checkCell( CellPos& rPos ) } catch( Exception& ) { - OSL_FAIL("sdr::table::SvxTableController::checkCell(), exception caught!" ); + TOOLS_WARN_EXCEPTION("svx.table", ""); } } @@ -1976,7 +1976,7 @@ void SvxTableController::findMergeOrigin( CellPos& rPos ) } catch( Exception& ) { - OSL_FAIL("sdr::table::SvxTableController::findMergeOrigin(), exception caught!" ); + TOOLS_WARN_EXCEPTION("svx.table", ""); } } diff --git a/svx/source/table/tablelayouter.cxx b/svx/source/table/tablelayouter.cxx index f1d74673cd03..1c369e6d08b4 100644 --- a/svx/source/table/tablelayouter.cxx +++ b/svx/source/table/tablelayouter.cxx @@ -21,6 +21,7 @@ #include <com/sun/star/table/XMergeableCell.hpp> #include <tools/debug.hxx> +#include <tools/diagnose_ex.h> #include <tools/gen.hxx> #include <libxml/xmlwriter.h> @@ -96,7 +97,7 @@ basegfx::B2ITuple TableLayouter::getCellSize( const CellRef& xCell, const CellPo } catch( Exception& ) { - OSL_FAIL( "TableLayouter::getCellSize(), exception caught!" ); + TOOLS_WARN_EXCEPTION("svx", ""); } return basegfx::B2ITuple( width, height ); @@ -143,7 +144,7 @@ bool TableLayouter::getCellArea( const CellRef& xCell, const CellPos& rPos, base } catch( Exception& ) { - OSL_FAIL( "TableLayouter::getCellSize(), exception caught!" ); + TOOLS_WARN_EXCEPTION("svx", ""); } return false; } @@ -475,7 +476,7 @@ bool findMergeOrigin( const TableModelRef& xTable, sal_Int32 nMergedX, sal_Int32 } catch( Exception& ) { - OSL_FAIL("sdr::table::TableLayouter::findMergeOrigin(), exception caught!"); + TOOLS_WARN_EXCEPTION("svx", ""); } return false; } @@ -945,7 +946,7 @@ CellRef TableLayouter::getCell( const CellPos& rPos ) const } catch( Exception& ) { - OSL_FAIL( "sdr::table::TableLayouter::getCell(), exception caught!" ); + TOOLS_WARN_EXCEPTION("svx", ""); } return xCell; } @@ -1198,7 +1199,7 @@ void TableLayouter::DistributeColumns( ::tools::Rectangle& rArea, } catch( Exception& ) { - OSL_FAIL("sdr::table::TableLayouter::DistributeColumns(), exception caught!"); + TOOLS_WARN_EXCEPTION("svx", ""); } } @@ -1282,7 +1283,7 @@ void TableLayouter::DistributeRows( ::tools::Rectangle& rArea, } catch( Exception& ) { - OSL_FAIL("sdr::table::TableLayouter::DistributeRows(), exception caught!"); + TOOLS_WARN_EXCEPTION("svx", ""); } } diff --git a/svx/source/table/tablemodel.cxx b/svx/source/table/tablemodel.cxx index f121f1ee9ee2..3a50e8b1c194 100644 --- a/svx/source/table/tablemodel.cxx +++ b/svx/source/table/tablemodel.cxx @@ -28,6 +28,7 @@ #include <osl/mutex.hxx> #include <libxml/xmlwriter.h> #include <tools/debug.hxx> +#include <tools/diagnose_ex.h> #include <cell.hxx> #include "cellcursor.hxx" @@ -663,7 +664,7 @@ void TableModel::insertColumns( sal_Int32 nIndex, sal_Int32 nCount ) } catch( Exception& ) { - OSL_FAIL("sdr::table::TableModel::insertColumns(), exception caught!"); + TOOLS_WARN_EXCEPTION("svx", ""); } updateColumns(); setModified(true); @@ -769,7 +770,7 @@ void TableModel::removeColumns( sal_Int32 nIndex, sal_Int32 nCount ) } catch( Exception& ) { - OSL_FAIL("sdr::table::TableModel::removeColumns(), exception caught!"); + TOOLS_WARN_EXCEPTION("svx", ""); } updateColumns(); @@ -827,7 +828,7 @@ void TableModel::insertRows( sal_Int32 nIndex, sal_Int32 nCount ) } catch( Exception& ) { - OSL_FAIL("sdr::table::TableModel::insertRows(), exception caught!"); + TOOLS_WARN_EXCEPTION("svx", ""); } if( bUndo ) rModel.EndUndo(); @@ -925,7 +926,7 @@ void TableModel::removeRows( sal_Int32 nIndex, sal_Int32 nCount ) } catch( Exception& ) { - OSL_FAIL("sdr::table::TableModel::removeRows(), exception caught!"); + TOOLS_WARN_EXCEPTION("svx", ""); } updateRows(); @@ -987,7 +988,7 @@ void TableModel::optimize() } catch( Exception& ) { - OSL_FAIL("svx::TableModel::optimize(), exception caught!"); + TOOLS_WARN_EXCEPTION("svx", ""); } removeColumns( nCol, 1 ); @@ -1024,7 +1025,7 @@ void TableModel::optimize() } catch( Exception& ) { - OSL_FAIL("svx::TableModel::optimize(), exception caught!"); + TOOLS_WARN_EXCEPTION("svx", ""); } removeRows( nRow, 1 ); diff --git a/svx/source/table/tablertfexporter.cxx b/svx/source/table/tablertfexporter.cxx index f30d4dae6d72..2073c1d39aac 100644 --- a/svx/source/table/tablertfexporter.cxx +++ b/svx/source/table/tablertfexporter.cxx @@ -23,6 +23,7 @@ #include <com/sun/star/table/XTable.hpp> #include <com/sun/star/beans/XPropertySet.hpp> +#include <tools/diagnose_ex.h> #include <tools/stream.hxx> #include <svtools/rtfkeywd.hxx> #include <svtools/rtfout.hxx> @@ -105,7 +106,7 @@ void SdrTableRtfExporter::Write() } catch( Exception& ) { - OSL_FAIL("SdrTableRtfExporter::Write(), exception caught!"); + TOOLS_WARN_EXCEPTION("svx", ""); } // export rows @@ -119,7 +120,7 @@ void SdrTableRtfExporter::Write() } catch( Exception& ) { - OSL_FAIL("SdrTableRtfExporter::Write(), exception caught!"); + TOOLS_WARN_EXCEPTION("svx", ""); } mrStrm.WriteChar( '}' ).WriteCharPtr( SAL_NEWLINE_STRING ); diff --git a/svx/source/table/tablertfimporter.cxx b/svx/source/table/tablertfimporter.cxx index fb3af5dd82ed..d4bc377df1d3 100644 --- a/svx/source/table/tablertfimporter.cxx +++ b/svx/source/table/tablertfimporter.cxx @@ -39,6 +39,7 @@ #include <editeng/svxrtf.hxx> #include <sal/log.hxx> #include <tools/debug.hxx> +#include <tools/diagnose_ex.h> using namespace ::com::sun::star::uno; using namespace ::com::sun::star::table; @@ -352,7 +353,7 @@ void SdrTableRTFParser::FillTable() } catch( Exception& ) { - OSL_FAIL("sdr::table::SdrTableRTFParser::InsertCell(), exception caught!" ); + TOOLS_WARN_EXCEPTION("svx", ""); } } diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx index 545259b37f78..847ecbbd27bf 100644 --- a/svx/source/unodraw/UnoGraphicExporter.cxx +++ b/svx/source/unodraw/UnoGraphicExporter.cxx @@ -34,6 +34,7 @@ #include <com/sun/star/uno/XComponentContext.hpp> #include <tools/debug.hxx> +#include <tools/diagnose_ex.h> #include <tools/urlobj.hxx> #include <comphelper/interaction.hxx> #include <framework/interaction.hxx> @@ -41,7 +42,6 @@ #include <com/sun/star/util/URL.hpp> #include <cppuhelper/implbase.hxx> #include <cppuhelper/supportsservice.hxx> -#include <osl/diagnose.h> #include <vcl/metaact.hxx> #include <vcl/svapp.hxx> #include <vcl/virdev.hxx> @@ -1290,7 +1290,7 @@ Graphic SvxGetGraphicForShape( SdrObject& rShape ) } catch( Exception& ) { - OSL_FAIL("SvxGetGraphicForShape(), exception caught!"); + TOOLS_WARN_EXCEPTION("svx", ""); } return aGraphic; } diff --git a/svx/source/xml/xmlxtexp.cxx b/svx/source/xml/xmlxtexp.cxx index f9407cb46698..d16e5fc523a2 100644 --- a/svx/source/xml/xmlxtexp.cxx +++ b/svx/source/xml/xmlxtexp.cxx @@ -17,6 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <sal/config.h> + +#include <tools/diagnose_ex.h> #include <tools/urlobj.hxx> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/container/XNameContainer.hpp> @@ -175,7 +178,7 @@ static void initializeStreamMetadata( const uno::Reference< uno::XInterface > &x xProps->setPropertyValue("UseCommonStoragePasswordEncryption", uno::makeAny( true ) ); } catch ( const uno::Exception & ) { - OSL_FAIL( "exception setting stream metadata" ); + TOOLS_WARN_EXCEPTION("svx", "exception setting stream metadata"); } } diff --git a/svx/source/xml/xmlxtimp.cxx b/svx/source/xml/xmlxtimp.cxx index 75e4b97e84a5..0b7c6f8ece27 100644 --- a/svx/source/xml/xmlxtimp.cxx +++ b/svx/source/xml/xmlxtimp.cxx @@ -226,7 +226,7 @@ void SvxXMLTableImportContext::importMarker( const uno::Reference< XFastAttribut } catch (const Exception&) { - OSL_FAIL("SvxXMLTableImportContext::importMarker(), exception caught!"); + TOOLS_WARN_EXCEPTION("svx", ""); } } @@ -239,7 +239,7 @@ void SvxXMLTableImportContext::importDash( const uno::Reference< XFastAttributeL } catch (const Exception&) { - OSL_FAIL("SvxXMLTableImportContext::importDash(), exception caught!"); + TOOLS_WARN_EXCEPTION("svx", ""); } } @@ -252,7 +252,7 @@ void SvxXMLTableImportContext::importHatch( const uno::Reference< XFastAttribute } catch (const Exception&) { - OSL_FAIL("SvxXMLTableImportContext::importHatch(), exception caught!"); + TOOLS_WARN_EXCEPTION("svx", ""); } } @@ -265,7 +265,7 @@ void SvxXMLTableImportContext::importGradient( const uno::Reference< XFastAttrib } catch (const Exception&) { - OSL_FAIL("SvxXMLTableImportContext::importGradient(), exception caught!"); + TOOLS_WARN_EXCEPTION("svx", ""); } } @@ -285,7 +285,7 @@ void SvxXMLTableImportContext::importBitmap( const uno::Reference< XFastAttribut } catch (const Exception&) { - OSL_FAIL("SvxXMLTableImportContext::importBitmap(), exception caught!"); + TOOLS_WARN_EXCEPTION("svx", ""); } } |