[Libreoffice-commits] core.git: xmloff/source

Mike Kaganski (via logerrit) logerrit at kemper.freedesktop.org
Sun Oct 4 09:53:21 UTC 2020


 xmloff/source/core/RDFaExportHelper.cxx           |    4 ++--
 xmloff/source/draw/animationexport.cxx            |   21 ++++++++++-----------
 xmloff/source/draw/animationimport.cxx            |   10 +++++-----
 xmloff/source/draw/animexp.cxx                    |    8 +++++---
 xmloff/source/draw/animimp.cxx                    |    4 ++--
 xmloff/source/draw/layerexp.cxx                   |    4 ++--
 xmloff/source/draw/layerimp.cxx                   |    5 +++--
 xmloff/source/draw/sdxmlexp.cxx                   |   11 ++++++-----
 xmloff/source/draw/ximppage.cxx                   |    9 +++++----
 xmloff/source/draw/ximpstyl.cxx                   |    8 ++++----
 xmloff/source/forms/elementimport.cxx             |   13 +++++++------
 xmloff/source/forms/layerexport.cxx               |    3 ++-
 xmloff/source/forms/layerimport.cxx               |   10 +++++++---
 xmloff/source/forms/officeforms.cxx               |    6 ++++--
 xmloff/source/forms/propertyexport.cxx            |    4 ++--
 xmloff/source/style/xmlnumi.cxx                   |    4 ++--
 xmloff/source/table/XMLTableExport.cxx            |   15 +++++++--------
 xmloff/source/table/XMLTableImport.cxx            |   15 +++++++--------
 xmloff/source/xforms/SchemaRestrictionContext.cxx |    4 ++--
 xmloff/source/xforms/xformsapi.cxx                |    4 ++--
 20 files changed, 86 insertions(+), 76 deletions(-)

New commits:
commit 835dfcbbe54b3903084e3ba402bcf582bb2f092a
Author:     Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Sun Oct 4 09:06:43 2020 +0300
Commit:     Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Sun Oct 4 11:52:34 2020 +0200

    use more TOOLS_WARN_EXCEPTION
    
    Change-Id: Iaa8f006526be2b16767f34ac0d7cd567314a50e3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103908
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>

diff --git a/xmloff/source/core/RDFaExportHelper.cxx b/xmloff/source/core/RDFaExportHelper.cxx
index dde8ce47e3eb..25238d5fa8a9 100644
--- a/xmloff/source/core/RDFaExportHelper.cxx
+++ b/xmloff/source/core/RDFaExportHelper.cxx
@@ -36,7 +36,7 @@
 #include <com/sun/star/rdf/XDocumentRepository.hpp>
 
 #include <rtl/ustrbuf.hxx>
-#include <osl/diagnose.h>
+#include <tools/diagnose_ex.h>
 
 #include <algorithm>
 
@@ -171,7 +171,7 @@ RDFaExportHelper::AddRDFa(
     }
     catch (uno::Exception &)
     {
-        OSL_FAIL("AddRDFa: exception");
+        TOOLS_WARN_EXCEPTION("xmloff.core", "");
     }
 }
 
diff --git a/xmloff/source/draw/animationexport.cxx b/xmloff/source/draw/animationexport.cxx
index 5f8f0ca2797b..92238ebf71e0 100644
--- a/xmloff/source/draw/animationexport.cxx
+++ b/xmloff/source/draw/animationexport.cxx
@@ -55,7 +55,6 @@
 #include <o3tl/any.hxx>
 #include <sax/tools/converter.hxx>
 #include <sal/log.hxx>
-#include <osl/diagnose.h>
 #include <tools/diagnose_ex.h>
 
 #include <xmloff/unointerfacetouniqueidentifiermapper.hxx>
@@ -664,7 +663,7 @@ void AnimationsExporterImpl::prepareTransitionNode()
     }
     catch (const Exception&)
     {
-        OSL_FAIL( "xmloff::AnimationsExporterImpl::prepareNode(), Exception caught!" );
+        TOOLS_WARN_EXCEPTION("xmloff.draw", "");
     }
 }
 
@@ -739,7 +738,7 @@ void AnimationsExporterImpl::prepareNode( const Reference< XAnimationNode >& xNo
     }
     catch (const Exception&)
     {
-        OSL_FAIL( "xmloff::AnimationsExporterImpl::prepareNode(), RuntimeException caught!" );
+        TOOLS_WARN_EXCEPTION("xmloff.draw", "");
     }
 }
 
@@ -978,7 +977,7 @@ void AnimationsExporterImpl::exportNode( const Reference< XAnimationNode >& xNod
     }
     catch (const RuntimeException&)
     {
-        OSL_FAIL( "xmloff::AnimationsExporterImpl::exportNode(), RuntimeException caught!" );
+        TOOLS_WARN_EXCEPTION("xmloff.draw", "");
     }
 
     // if something goes wrong, its always a good idea to clear the attribute list
@@ -1052,7 +1051,7 @@ void AnimationsExporterImpl::exportContainer( const Reference< XTimeContainer >&
     }
     catch (const RuntimeException&)
     {
-        OSL_FAIL( "xmloff::AnimationsExporterImpl::exportContainer(), RuntimeException caught!" );
+        TOOLS_WARN_EXCEPTION("xmloff.draw", "");
     }
 }
 
@@ -1356,7 +1355,7 @@ void AnimationsExporterImpl::exportAnimate( const Reference< XAnimate >& xAnimat
     }
     catch (const Exception&)
     {
-        OSL_FAIL( "xmloff::AnimationsExporterImpl::exportAnimate(), exception caught!" );
+        TOOLS_WARN_EXCEPTION("xmloff.draw", "");
     }
 }
 
@@ -1391,7 +1390,7 @@ void AnimationsExporterImpl::exportAudio( const Reference< XAudio >& xAudio )
     }
     catch (const Exception&)
     {
-        OSL_FAIL( "xmloff::AnimationsExporterImpl::exportAudio(), exception caught!" );
+        TOOLS_WARN_EXCEPTION("xmloff.draw", "");
     }
 }
 
@@ -1421,7 +1420,7 @@ void AnimationsExporterImpl::exportCommand( const Reference< XCommand >& xComman
     }
     catch (const Exception&)
     {
-        OSL_FAIL( "xmloff::AnimationsExporterImpl::exportCommand(), exception caught!" );
+        TOOLS_WARN_EXCEPTION("xmloff.draw", "");
     }
 }
 
@@ -1443,7 +1442,7 @@ Reference< XInterface > AnimationsExporterImpl::getParagraphTarget( const Paragr
     }
     catch (const RuntimeException&)
     {
-        OSL_FAIL( "xmloff::AnimationsExporterImpl::getParagraphTarget(), RuntimeException caught!" );
+        TOOLS_WARN_EXCEPTION("xmloff.draw", "");
     }
 
     Reference< XInterface > xRef;
@@ -1693,7 +1692,7 @@ void AnimationsExporter::prepare( const Reference< XAnimationNode >& xRootNode )
     }
     catch (const RuntimeException&)
     {
-        OSL_FAIL( "xmloff::AnimationsExporter::prepare(), exception caught" );
+        TOOLS_WARN_EXCEPTION("xmloff.draw", "");
     }
 }
 
@@ -1729,7 +1728,7 @@ void AnimationsExporter::exportAnimations( const Reference< XAnimationNode >& xR
     }
     catch (const RuntimeException&)
     {
-        OSL_FAIL( "xmloff::AnimationsExporter::exportAnimations(), exception caught" );
+        TOOLS_WARN_EXCEPTION("xmloff.draw", "");
     }
 }
 
diff --git a/xmloff/source/draw/animationimport.cxx b/xmloff/source/draw/animationimport.cxx
index cfe312481d12..bbfe7f29b425 100644
--- a/xmloff/source/draw/animationimport.cxx
+++ b/xmloff/source/draw/animationimport.cxx
@@ -51,6 +51,7 @@
 #include <comphelper/string.hxx>
 
 #include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
 #include <sax/tools/converter.hxx>
 
 #include <vector>
@@ -61,7 +62,6 @@
 #include <xmloff/xmlimp.hxx>
 #include <xmloff/xmlnamespace.hxx>
 #include <xmloff/xmluconv.hxx>
-#include <osl/diagnose.h>
 #include <xmloff/xmlprhdl.hxx>
 #include <xmlsdtypes.hxx>
 
@@ -194,7 +194,7 @@ Any AnimationsImportHelperImpl::convertTarget( const OUString& rValue )
     }
     catch (const RuntimeException&)
     {
-        OSL_FAIL( "xmloff::AnimationsImportImpl::convertTarget(), RuntimeException caught!" );
+        TOOLS_WARN_EXCEPTION("xmloff.draw", "");
     }
 
     Any aAny;
@@ -529,7 +529,7 @@ AnimationNodeContext::AnimationNodeContext(
     }
     catch (const RuntimeException&)
     {
-        OSL_FAIL( "xmloff::AnimationsImportImpl::AnimationsImportImpl(), RuntimeException caught!" );
+        TOOLS_WARN_EXCEPTION("xmloff.draw", "");
     }
 }
 
@@ -1180,7 +1180,7 @@ void AnimationNodeContext::init_node(  const css::uno::Reference< css::xml::sax:
     }
     catch (const RuntimeException&)
     {
-        OSL_FAIL( "xmloff::AnimationNodeContext::StartElement(), RuntimeException caught!" );
+        TOOLS_WARN_EXCEPTION("xmloff.draw", "");
     }
 }
 
@@ -1345,7 +1345,7 @@ void AnimationNodeContext::postProcessRootNode( const Reference< XAnimationNode
     }
     catch (const Exception&)
     {
-        OSL_FAIL("xmloff::AnimationsImport::postProcessRootNode(), exception caught!");
+        TOOLS_WARN_EXCEPTION("xmloff.draw", "");
     }
 }
 
diff --git a/xmloff/source/draw/animexp.cxx b/xmloff/source/draw/animexp.cxx
index 1d2ba75abbdd..65b791e2455e 100644
--- a/xmloff/source/draw/animexp.cxx
+++ b/xmloff/source/draw/animexp.cxx
@@ -26,7 +26,7 @@
 
 #include <sax/tools/converter.hxx>
 #include <sal/log.hxx>
-#include <osl/diagnose.h>
+#include <tools/diagnose_ex.h>
 
 #include <list>
 #include <comphelper/extract.hxx>
@@ -281,7 +281,8 @@ void XMLAnimationsExporter::prepare( const Reference< XShape >& xShape )
     }
     catch (const Exception&)
     {
-        OSL_FAIL("exception caught while collection animation information!");
+        TOOLS_WARN_EXCEPTION("xmloff.draw",
+                             "exception caught while collection animation information!");
     }
 }
 
@@ -406,7 +407,8 @@ void XMLAnimationsExporter::collect( const Reference< XShape >& xShape, SvXMLExp
     }
     catch (const Exception&)
     {
-        OSL_FAIL("exception caught while collection animation information!");
+        TOOLS_WARN_EXCEPTION("xmloff.draw",
+                             "exception caught while collection animation information!");
     }
 }
 
diff --git a/xmloff/source/draw/animimp.cxx b/xmloff/source/draw/animimp.cxx
index 6dfb4aed4ccd..7e1d0e3c8cf5 100644
--- a/xmloff/source/draw/animimp.cxx
+++ b/xmloff/source/draw/animimp.cxx
@@ -30,8 +30,8 @@
 #include <com/sun/star/xml/sax/XAttributeList.hpp>
 
 #include <sax/tools/converter.hxx>
-#include <osl/diagnose.h>
 #include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
 
 #include <xmloff/xmltoken.hxx>
 #include <xmloff/xmlimp.hxx>
@@ -584,7 +584,7 @@ void XMLAnimationsEffectContext::endFastElement(sal_Int32 )
     }
     catch (const Exception&)
     {
-        OSL_FAIL( "exception caught while importing animation information!" );
+        TOOLS_WARN_EXCEPTION("xmloff.draw", "exception caught while importing animation information!");
     }
 }
 
diff --git a/xmloff/source/draw/layerexp.cxx b/xmloff/source/draw/layerexp.cxx
index 8afd23135b8e..36f74ba5696d 100644
--- a/xmloff/source/draw/layerexp.cxx
+++ b/xmloff/source/draw/layerexp.cxx
@@ -26,7 +26,7 @@
 #include <xmloff/xmlnamespace.hxx>
 #include <xmloff/xmlexp.hxx>
 #include "layerexp.hxx"
-#include <osl/diagnose.h>
+#include <tools/diagnose_ex.h>
 
 using ::com::sun::star::uno::Reference;
 
@@ -120,7 +120,7 @@ void SdXMLayerExporter::exportLayer( SvXMLExport& rExport )
         }
         catch( Exception& )
         {
-            OSL_FAIL("SdXMLayerExporter::exportLayer(), exception caught during export of one layer!");
+            TOOLS_WARN_EXCEPTION("xmloff.draw", "exception caught during export of one layer!");
         }
     }
 }
diff --git a/xmloff/source/draw/layerimp.cxx b/xmloff/source/draw/layerimp.cxx
index 82e40f3c1c09..c4bfedbea838 100644
--- a/xmloff/source/draw/layerimp.cxx
+++ b/xmloff/source/draw/layerimp.cxx
@@ -17,9 +17,10 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <sal/config.h>
 
-#include <osl/diagnose.h>
 #include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
 #include <com/sun/star/drawing/XLayerManager.hpp>
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include <com/sun/star/frame/XModel.hpp>
@@ -166,7 +167,7 @@ void SdXMLLayerContext::EndElement()
     }
     catch( Exception& )
     {
-        OSL_FAIL("SdXMLLayerContext::EndElement(), exception caught!");
+        TOOLS_WARN_EXCEPTION("xmloff.draw", "");
     }
 }
 
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index db5dafb4c3ae..7af35e0d4107 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -47,7 +47,7 @@
 #include <com/sun/star/util/MeasureUnit.hpp>
 #include <rtl/ustrbuf.hxx>
 #include <sal/log.hxx>
-#include <osl/diagnose.h>
+#include <tools/diagnose_ex.h>
 #include <tools/gen.hxx>
 #include <sax/tools/converter.hxx>
 #include <xmloff/xmlaustp.hxx>
@@ -1404,7 +1404,7 @@ HeaderFooterPageSettingsImpl SdXMLExport::ImpPrepDrawPageHeaderFooterDecls( cons
     }
     catch(const Exception&)
     {
-        OSL_FAIL( "SdXMLExport::ImpPrepDrawPageHeaderFooterDecls(), unexpected exception caught!" );
+        TOOLS_WARN_EXCEPTION("xmloff.draw", "");
     }
 
     return aSettings;
@@ -1979,7 +1979,7 @@ void SdXMLExport::exportPresentationSettings()
     }
     catch(const uno::Exception&)
     {
-        OSL_FAIL( "uno::Exception while exporting <presentation:settings>" );
+        TOOLS_WARN_EXCEPTION("xmloff.draw", "while exporting <presentation:settings>");
     }
 }
 
@@ -2490,7 +2490,8 @@ void SdXMLExport::collectAnnotationAutoStyles( const Reference<XDrawPage>& xDraw
     }
     catch(const Exception&)
     {
-        OSL_FAIL("SdXMLExport::collectAnnotationAutoStyles(), exception caught during export of annotation auto styles");
+        TOOLS_WARN_EXCEPTION("xmloff.draw",
+                             "exception caught during export of annotation auto styles");
     }
 }
 
@@ -2582,7 +2583,7 @@ void SdXMLExport::exportAnnotations( const Reference<XDrawPage>& xDrawPage )
     }
     catch(const Exception&)
     {
-        OSL_FAIL("SdXMLExport::exportAnnotations(), exception caught during export of annotations");
+        TOOLS_WARN_EXCEPTION("xmloff.draw", "exception caught during export of annotations");
     }
 }
 
diff --git a/xmloff/source/draw/ximppage.cxx b/xmloff/source/draw/ximppage.cxx
index bc8ff9029d8b..88412788d5f8 100644
--- a/xmloff/source/draw/ximppage.cxx
+++ b/xmloff/source/draw/ximppage.cxx
@@ -38,8 +38,8 @@
 #include "ximpstyl.hxx"
 #include <xmloff/prstylei.hxx>
 #include <PropertySetMerger.hxx>
-#include <osl/diagnose.h>
 #include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
 
 #include <xmloff/unointerfacetouniqueidentifiermapper.hxx>
 #include <xmloff/xmluconv.hxx>
@@ -385,7 +385,7 @@ void SdXMLGenericPageContext::endFastElement(sal_Int32 )
         }
         catch(const uno::Exception&)
         {
-            OSL_FAIL("xmloff::SdXMLGenericPageContext::EndElement(), unexpected exception caught!");
+            TOOLS_WARN_EXCEPTION("xmloff.draw", "");
         }
     }
 
@@ -445,7 +445,7 @@ void SdXMLGenericPageContext::SetStyle( OUString const & rStyleName )
     }
     catch (const uno::Exception&)
     {
-        OSL_FAIL( "SdXMLGenericPageContext::SetStyle(): uno::Exception caught!" );
+        TOOLS_WARN_EXCEPTION("xmloff.draw", "");
     }
 }
 
@@ -638,7 +638,8 @@ void SdXMLGenericPageContext::SetNavigationOrder()
     }
     catch(const uno::Exception&)
     {
-        OSL_FAIL("xmloff::SdXMLGenericPageContext::SetNavigationOrder(), unexpected exception caught while importing shape navigation order!");
+        TOOLS_WARN_EXCEPTION("xmloff.draw",
+                             "unexpected exception caught while importing shape navigation order!");
     }
 }
 
diff --git a/xmloff/source/draw/ximpstyl.cxx b/xmloff/source/draw/ximpstyl.cxx
index 2515b245859a..f875ba196e65 100644
--- a/xmloff/source/draw/ximpstyl.cxx
+++ b/xmloff/source/draw/ximpstyl.cxx
@@ -28,8 +28,8 @@
 #include "ximpnote.hxx"
 #include <xmlsdtypes.hxx>
 #include <tools/debug.hxx>
-#include <osl/diagnose.h>
 #include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
 #include <com/sun/star/frame/XModel.hpp>
 #include <com/sun/star/style/XStyle.hpp>
 #include <com/sun/star/lang/XSingleServiceFactory.hpp>
@@ -1052,7 +1052,7 @@ void SdXMLStylesContext::SetMasterPageStyles(SdXMLMasterPageContext const & rMas
     }
     catch (const uno::Exception&)
     {
-        OSL_FAIL( "xmloff::SdXMLStylesContext::SetMasterPageStyles(), exception caught!" );
+        TOOLS_WARN_EXCEPTION("xmloff.draw", "");
     }
 }
 
@@ -1069,7 +1069,7 @@ void SdXMLStylesContext::ImpSetGraphicStyles() const
     }
     catch( uno::Exception& )
     {
-        OSL_FAIL( "xmloff::SdXMLStylesContext::ImpSetGraphicStyles(), exception caught!" );
+        TOOLS_WARN_EXCEPTION("xmloff.draw", "");
     }
 }
 
@@ -1083,7 +1083,7 @@ void SdXMLStylesContext::ImpSetCellStyles() const
     }
     catch( uno::Exception& )
     {
-        OSL_FAIL( "xmloff::SdXMLStylesContext::ImpSetCellStyles(), exception caught!" );
+        TOOLS_WARN_EXCEPTION("xmloff.draw", "");
     }
 }
 
diff --git a/xmloff/source/forms/elementimport.cxx b/xmloff/source/forms/elementimport.cxx
index 1cd555fee82e..e9945f49e7aa 100644
--- a/xmloff/source/forms/elementimport.cxx
+++ b/xmloff/source/forms/elementimport.cxx
@@ -925,8 +925,8 @@ namespace xmloff
         }
         catch( const Exception& )
         {
-            DBG_UNHANDLED_EXCEPTION("xmloff.forms");
-            OSL_FAIL( "OControlImport::EndElement: caught an exception while retrieving the class id!" );
+            TOOLS_WARN_EXCEPTION("xmloff.forms",
+                                 "caught an exception while retrieving the class id!");
         }
 
         const char* pValueProperty = nullptr;
@@ -959,8 +959,9 @@ namespace xmloff
                 }
                 catch( const Exception& )
                 {
-                    DBG_UNHANDLED_EXCEPTION("xmloff.forms");
-                    OSL_FAIL( "OControlImport::EndElement: caught an exception while retrieving the current value property!" );
+                    TOOLS_WARN_EXCEPTION(
+                        "xmloff.forms",
+                        "caught an exception while retrieving the current value property!");
                 }
             }
         }
@@ -977,8 +978,8 @@ namespace xmloff
             }
             catch( const Exception& )
             {
-                DBG_UNHANDLED_EXCEPTION("xmloff.forms");
-                OSL_FAIL( "OControlImport::EndElement: caught an exception while restoring the value property!" );
+                TOOLS_WARN_EXCEPTION("xmloff.forms",
+                                     "caught an exception while restoring the value property!");
             }
         }
 
diff --git a/xmloff/source/forms/layerexport.cxx b/xmloff/source/forms/layerexport.cxx
index 87488959c029..d2beff0d3786 100644
--- a/xmloff/source/forms/layerexport.cxx
+++ b/xmloff/source/forms/layerexport.cxx
@@ -214,7 +214,8 @@ namespace xmloff
             }
             catch(Exception&)
             {
-                OSL_FAIL("OFormLayerXMLExport_Impl::exportCollectionElements: caught an exception ... skipping the current element!");
+                TOOLS_WARN_EXCEPTION("xmloff.forms",
+                                     "caught an exception ... skipping the current element!");
                 continue;
             }
         }
diff --git a/xmloff/source/forms/layerimport.cxx b/xmloff/source/forms/layerimport.cxx
index 39b862c9bb92..83202e4f7be9 100644
--- a/xmloff/source/forms/layerimport.cxx
+++ b/xmloff/source/forms/layerimport.cxx
@@ -42,6 +42,7 @@
 #include <xmloff/xmltoken.hxx>
 #include <xmloff/xmlnamespace.hxx>
 #include <rtl/strbuf.hxx>
+#include <tools/diagnose_ex.h>
 #include <algorithm>
 
 namespace xmloff
@@ -406,7 +407,8 @@ void OFormLayerXMLImport_Impl::endPage()
     }
     catch(Exception&)
     {
-        OSL_FAIL("OFormLayerXMLImport_Impl::endPage: unable to knit the control references (caught an exception)!");
+        TOOLS_WARN_EXCEPTION("xmloff.forms",
+                             "unable to knit the control references (caught an exception)!");
     }
 
     // now that we have all children of the forms collection, attach the events
@@ -500,7 +502,8 @@ void OFormLayerXMLImport_Impl::documentDone( )
             }
             catch( const Exception& )
             {
-                OSL_FAIL( "OFormLayerXMLImport_Impl::documentDone: caught an exception while binding to a cell!" );
+                TOOLS_WARN_EXCEPTION("xmloff.forms",
+                                     "caught an exception while binding to a cell!");
             }
         }
         m_aCellValueBindings.clear();
@@ -524,7 +527,8 @@ void OFormLayerXMLImport_Impl::documentDone( )
             }
             catch( const Exception& )
             {
-                OSL_FAIL( "OFormLayerXMLImport_Impl::documentDone: caught an exception while binding to a cell range!" );
+                TOOLS_WARN_EXCEPTION("xmloff.forms",
+                                     "caught an exception while binding to a cell range!");
             }
         }
         m_aCellRangeListSources.clear();
diff --git a/xmloff/source/forms/officeforms.cxx b/xmloff/source/forms/officeforms.cxx
index 18b616a07438..1b5091087444 100644
--- a/xmloff/source/forms/officeforms.cxx
+++ b/xmloff/source/forms/officeforms.cxx
@@ -106,7 +106,8 @@ namespace xmloff
         }
         catch(Exception&)
         {
-            OSL_FAIL("OFormsRootImport::StartElement: caught an exception while setting the document properties!");
+            TOOLS_WARN_EXCEPTION("xmloff.forms",
+                                 "caught an exception while setting the document properties!");
         }
     }
 
@@ -166,7 +167,8 @@ namespace xmloff
         }
         catch(Exception&)
         {
-            OSL_FAIL("OFormsRootExport::addModelAttributes: caught an exception while retrieving the document properties!");
+            TOOLS_WARN_EXCEPTION("xmloff.forms",
+                                 "caught an exception while retrieving the document properties!");
         }
     }
 
diff --git a/xmloff/source/forms/propertyexport.cxx b/xmloff/source/forms/propertyexport.cxx
index 4ef1ddf3e416..86ef1db82ef0 100644
--- a/xmloff/source/forms/propertyexport.cxx
+++ b/xmloff/source/forms/propertyexport.cxx
@@ -28,8 +28,8 @@
 #include <xmloff/xmlexppr.hxx>
 #include <xmloff/xmlprmap.hxx>
 #include <sax/tools/converter.hxx>
-#include <osl/diagnose.h>
 #include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
 #include <com/sun/star/beans/PropertyAttribute.hpp>
 #include <com/sun/star/util/Date.hpp>
 #include <com/sun/star/graphic/XGraphic.hpp>
@@ -678,7 +678,7 @@ namespace xmloff
         }
         catch(Exception&)
         {
-            OSL_FAIL("OPropertyExport::dbg_implCheckProperty: caught an exception, could not check the property!");
+            TOOLS_WARN_EXCEPTION("xmloff.forms", "could not check the property!");
         }
     }
 #endif // DBG_UTIL - dbg_implCheckProperty
diff --git a/xmloff/source/style/xmlnumi.cxx b/xmloff/source/style/xmlnumi.cxx
index 73e3d1e2b3c5..2593d2aa0d75 100644
--- a/xmloff/source/style/xmlnumi.cxx
+++ b/xmloff/source/style/xmlnumi.cxx
@@ -38,7 +38,7 @@
 #include <o3tl/any.hxx>
 #include <rtl/ustrbuf.hxx>
 #include <sal/log.hxx>
-#include <osl/diagnose.h>
+#include <tools/diagnose_ex.h>
 
 #include <tools/fontenum.hxx>
 #include <tools/color.hxx>
@@ -986,7 +986,7 @@ void SvxXMLListStyleContext::FillUnoNumRule(
     }
     catch (const Exception&)
     {
-        OSL_FAIL( "SvxXMLListStyleContext::FillUnoNumRule - Exception caught" );
+        TOOLS_WARN_EXCEPTION("xmloff.style", "" );
     }
 }
 
diff --git a/xmloff/source/table/XMLTableExport.cxx b/xmloff/source/table/XMLTableExport.cxx
index d1664c3cb10a..194f8e7121a1 100644
--- a/xmloff/source/table/XMLTableExport.cxx
+++ b/xmloff/source/table/XMLTableExport.cxx
@@ -21,7 +21,6 @@
 
 #include <sal/config.h>
 #include <sal/log.hxx>
-#include <osl/diagnose.h>
 
 #include <rtl/ustring.hxx>
 #include <com/sun/star/frame/XModel.hpp>
@@ -247,7 +246,7 @@ static bool has_states( const std::vector< XMLPropertyState >& xPropStates )
         }
         catch(const Exception&)
         {
-            OSL_FAIL("xmloff::XMLTableExport::collectTableAutoStyles(), exception during column style collection!");
+            TOOLS_WARN_EXCEPTION("xmloff.table", "exception during column style collection!");
         }
 
         Reference< XIndexAccess > xIndexAccessRows( xColumnRowRange->getRows(), UNO_QUERY_THROW );
@@ -316,12 +315,12 @@ static bool has_states( const std::vector< XMLPropertyState >& xPropStates )
         }
         catch(const Exception&)
         {
-            OSL_FAIL("xmloff::XMLTableExport::collectTableAutoStyles(), exception during column style collection!");
+            TOOLS_WARN_EXCEPTION("xmloff.table", "exception during column style collection!");
         }
     }
     catch(const Exception&)
     {
-        OSL_FAIL("xmloff::XMLTableExport::collectTableAutoStyles(), exception caught!");
+        TOOLS_WARN_EXCEPTION("xmloff.table", "exception caught!");
     }
  }
 
@@ -384,8 +383,8 @@ static bool has_states( const std::vector< XMLPropertyState >& xPropStates )
         }
      }
      catch(const Exception&)
-    {
-         OSL_FAIL( "XMLTableExport::exportTable(), exception caught!" );
+     {
+         TOOLS_WARN_EXCEPTION("xmloff.table", "" );
      }
  }
 
@@ -446,7 +445,7 @@ static bool has_states( const std::vector< XMLPropertyState >& xPropStates )
     }
     catch (const Exception&)
     {
-        OSL_FAIL( "exception while exporting a table cell" );
+        TOOLS_WARN_EXCEPTION("xmloff.table", "exception while exporting a table cell");
     }
 
     // table:number-columns-repeated
@@ -640,7 +639,7 @@ void XMLTableExport::exportTableTemplates()
                 }
                 catch(const Exception&)
                 {
-                    OSL_FAIL("xmloff::XMLTableExport::exportTableTemplates(), exception caught!");
+                    TOOLS_WARN_EXCEPTION("xmloff.table", "");
                 }
 
                 pElements++;
diff --git a/xmloff/source/table/XMLTableImport.cxx b/xmloff/source/table/XMLTableImport.cxx
index 64b6a93b30a3..e6c5d30bc327 100644
--- a/xmloff/source/table/XMLTableImport.cxx
+++ b/xmloff/source/table/XMLTableImport.cxx
@@ -45,7 +45,6 @@
 #include <xmloff/xmluconv.hxx>
 #include "table.hxx"
 
-#include <osl/diagnose.h>
 #include <sal/log.hxx>
 
 #include <memory>
@@ -337,7 +336,7 @@ void XMLTableImport::finishStyles()
             }
             catch( Exception& )
             {
-                OSL_FAIL("xmloff::XMLTableImport::finishStyles(), exception caught!");
+                TOOLS_WARN_EXCEPTION("xmloff.table", "");
             }
 
             if( xTemplate.is() )
@@ -351,12 +350,12 @@ void XMLTableImport::finishStyles()
         }
         catch( Exception& )
         {
-            OSL_FAIL("xmloff::XMLTableImport::finishStyles(), exception caught!");
+            TOOLS_WARN_EXCEPTION("xmloff.table", "");
         }
     }
     catch( Exception& )
     {
-        OSL_FAIL("xmloff::XMLTableImport::finishStyles(), exception caught!");
+        TOOLS_WARN_EXCEPTION("xmloff.table", "");
     }
 }
 
@@ -421,7 +420,7 @@ SvXMLImportContextRef XMLTableImportContext::ImportColumn( sal_uInt16 /*nPrefix*
     }
     catch( Exception& )
     {
-        OSL_FAIL("xmloff::XMLTableImportContext::ImportTableColumn(), exception caught!");
+        TOOLS_WARN_EXCEPTION("xmloff.table", "");
     }
 
     return nullptr;
@@ -462,7 +461,7 @@ void XMLTableImportContext::InitColumns()
     }
     catch( Exception& )
     {
-        OSL_FAIL("xmloff::XMLTableImportContext::ImportTableColumn(), exception caught!");
+        TOOLS_WARN_EXCEPTION("xmloff.table", "");
     }
 }
 
@@ -563,7 +562,7 @@ SvXMLImportContextRef XMLTableImportContext::ImportCell( sal_uInt16 nPrefix, con
     }
     catch( Exception& )
     {
-        OSL_FAIL("xmloff::XMLTableImportContext::ImportCell(), exception caught!");
+        TOOLS_WARN_EXCEPTION("xmloff.table", "");
     }
 
     return nullptr;
@@ -605,7 +604,7 @@ void XMLTableImportContext::EndElement()
         }
         catch( Exception& )
         {
-            OSL_FAIL("XMLTableImportContext::EndElement(), exception caught while merging cells!");
+            TOOLS_WARN_EXCEPTION("xmloff.table", "");
         }
     }
 }
diff --git a/xmloff/source/xforms/SchemaRestrictionContext.cxx b/xmloff/source/xforms/SchemaRestrictionContext.cxx
index acb9af77bd92..f62223dd8f2f 100644
--- a/xmloff/source/xforms/SchemaRestrictionContext.cxx
+++ b/xmloff/source/xforms/SchemaRestrictionContext.cxx
@@ -38,8 +38,8 @@
 #include <com/sun/star/xsd/DataTypeClass.hpp>
 #include <com/sun/star/xsd/WhiteSpaceTreatment.hpp>
 
-#include <osl/diagnose.h>
 #include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
 
 
 using com::sun::star::uno::Reference;
@@ -111,7 +111,7 @@ void SchemaRestrictionContext::CreateDataType()
     }
     catch( const Exception& )
     {
-        OSL_FAIL( "exception during type creation" );
+        TOOLS_WARN_EXCEPTION("xmloff", "exception during type creation");
     }
     SAL_WARN_IF( !mxDataType.is(), "xmloff", "can't create type" );
 }
diff --git a/xmloff/source/xforms/xformsapi.cxx b/xmloff/source/xforms/xformsapi.cxx
index 6bef5f0b66a7..3fbccbec4f75 100644
--- a/xmloff/source/xforms/xformsapi.cxx
+++ b/xmloff/source/xforms/xformsapi.cxx
@@ -32,8 +32,8 @@
 #include <com/sun/star/xsd/DataTypeClass.hpp>
 
 #include <comphelper/processfactory.hxx>
-#include <osl/diagnose.h>
 #include <sal/log.hxx>
+#include <tools/diagnose_ex.h>
 
 #include <xmloff/xmltoken.hxx>
 #include <xmloff/namespacemap.hxx>
@@ -289,7 +289,7 @@ OUString xforms_getBasicTypeName(
     }
     catch( const Exception& )
     {
-        OSL_FAIL( "exception during type creation" );
+        TOOLS_WARN_EXCEPTION("xmloff", "exception during type creation");
     }
     return sTypeName;
 }


More information about the Libreoffice-commits mailing list