[Libreoffice-commits] core.git: filter/source include/sal
Mike Kaganski (via logerrit)
logerrit at kemper.freedesktop.org
Sun Oct 4 19:27:47 UTC 2020
filter/source/msfilter/msoleexp.cxx | 5 ++-
filter/source/xmlfilterdetect/filterdetect.cxx | 4 +--
filter/source/xsltdialog/typedetectionexport.cxx | 8 +++---
filter/source/xsltdialog/typedetectionimport.cxx | 4 +--
filter/source/xsltdialog/xmlfilterjar.cxx | 9 +++---
filter/source/xsltdialog/xmlfiltersettingsdialog.cxx | 25 +++++++++----------
filter/source/xsltdialog/xmlfiltertabdialog.cxx | 5 ++-
filter/source/xsltdialog/xmlfiltertestdialog.cxx | 15 ++++++-----
include/sal/log-areas.dox | 1
9 files changed, 41 insertions(+), 35 deletions(-)
New commits:
commit 6923b1d527fa86fac8439b881d4ad468b765e915
Author: Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Sun Oct 4 09:37:15 2020 +0300
Commit: Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Sun Oct 4 21:27:07 2020 +0200
use more TOOLS_WARN_EXCEPTION
Change-Id: Iff30468e59a0bc782958dd41bcea726a4c869698
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103909
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
diff --git a/filter/source/msfilter/msoleexp.cxx b/filter/source/msfilter/msoleexp.cxx
index a6e31ad8fb91..da109342b6c9 100644
--- a/filter/source/msfilter/msoleexp.cxx
+++ b/filter/source/msfilter/msoleexp.cxx
@@ -30,12 +30,12 @@
#include <com/sun/star/frame/XStorable.hpp>
#include <com/sun/star/awt/Size.hpp>
#include <com/sun/star/embed/Aspects.hpp>
-#include <osl/diagnose.h>
#include <comphelper/classids.hxx>
#include <sfx2/docfilt.hxx>
#include <sfx2/fcontnr.hxx>
#include <sot/formats.hxx>
#include <sot/storage.hxx>
+#include <tools/diagnose_ex.h>
#include <comphelper/fileformat.h>
#include <comphelper/processfactory.hxx>
#include <unotools/streamwrap.hxx>
@@ -250,7 +250,8 @@ void SvxMSExportOLEObjects::ExportOLEObject( svt::EmbeddedObjectRef const & rObj
}
catch( const uno::Exception& )
{
- OSL_FAIL( "Unexpected exception while getting visual area size!" );
+ TOOLS_WARN_EXCEPTION(
+ "filter.ms", "Unexpected exception while getting visual area size!");
aSize.Width = 5000;
aSize.Height = 5000;
}
diff --git a/filter/source/xmlfilterdetect/filterdetect.cxx b/filter/source/xmlfilterdetect/filterdetect.cxx
index b588fbc62a80..fd179a0e7898 100644
--- a/filter/source/xmlfilterdetect/filterdetect.cxx
+++ b/filter/source/xmlfilterdetect/filterdetect.cxx
@@ -18,12 +18,12 @@
*/
#include "filterdetect.hxx"
-#include <osl/diagnose.h>
#include <com/sun/star/io/XInputStream.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/beans/PropertyState.hpp>
#include <cppuhelper/supportsservice.hxx>
+#include <tools/diagnose_ex.h>
#include <ucbhelper/content.hxx>
#include <unotools/ucbstreamhelper.hxx>
#include <svl/inettype.hxx>
@@ -197,7 +197,7 @@ OUString SAL_CALL FilterDetect::detect( css::uno::Sequence< css::beans::Property
}
catch (const Exception &)
{
- OSL_FAIL( "An Exception occurred while opening File stream" );
+ TOOLS_WARN_EXCEPTION("filter.xmlfd", "An Exception occurred while opening File stream");
}
if (!sTypeName.isEmpty())
diff --git a/filter/source/xsltdialog/typedetectionexport.cxx b/filter/source/xsltdialog/typedetectionexport.cxx
index 692f1347230e..68ed95a065e5 100644
--- a/filter/source/xsltdialog/typedetectionexport.cxx
+++ b/filter/source/xsltdialog/typedetectionexport.cxx
@@ -22,7 +22,7 @@
#include <com/sun/star/xml/sax/Writer.hpp>
#include <com/sun/star/io/XActiveDataSource.hpp>
#include <tools/urlobj.hxx>
-#include <osl/diagnose.h>
+#include <tools/diagnose_ex.h>
#include "typedetectionexport.hxx"
#include "xmlfiltercommon.hxx"
@@ -197,7 +197,7 @@ void TypeDetectionExporter::doExport( const Reference< XOutputStream >& xOS, co
}
catch( const Exception& )
{
- OSL_FAIL( "TypeDetectionExporter::doExport exception caught!" );
+ TOOLS_WARN_EXCEPTION("filter.xslt", "");
}
}
@@ -227,7 +227,7 @@ void TypeDetectionExporter::addProperty( const Reference< XWriter >& xHandler, c
}
catch( const Exception& )
{
- OSL_FAIL( "TypeDetectionExporter::addProperty exception caught!" );
+ TOOLS_WARN_EXCEPTION("filter.xslt", "");
}
}
@@ -258,7 +258,7 @@ void TypeDetectionExporter::addLocaleProperty( const Reference< XWriter >& xHand
}
catch( const Exception& )
{
- OSL_FAIL( "TypeDetectionExporter::addLocaleProperty exception caught!" );
+ TOOLS_WARN_EXCEPTION("filter.xslt", "");
}
}
diff --git a/filter/source/xsltdialog/typedetectionimport.cxx b/filter/source/xsltdialog/typedetectionimport.cxx
index 76dfeb54d250..4d785ec152a7 100644
--- a/filter/source/xsltdialog/typedetectionimport.cxx
+++ b/filter/source/xsltdialog/typedetectionimport.cxx
@@ -20,7 +20,7 @@
#include <com/sun/star/xml/sax/InputSource.hpp>
#include <com/sun/star/xml/sax/Parser.hpp>
#include <com/sun/star/xml/sax/XAttributeList.hpp>
-#include <osl/diagnose.h>
+#include <tools/diagnose_ex.h>
#include "typedetectionimport.hxx"
#include "xmlfiltercommon.hxx"
@@ -62,7 +62,7 @@ void TypeDetectionImporter::doImport( const Reference< XComponentContext >& rxCo
}
catch( const Exception& /* e */ )
{
- OSL_FAIL( "TypeDetectionImporter::doImport exception caught!" );
+ TOOLS_WARN_EXCEPTION("filter.xslt", "");
}
}
diff --git a/filter/source/xsltdialog/xmlfilterjar.cxx b/filter/source/xsltdialog/xmlfilterjar.cxx
index 4bf9f156c535..3ddaed0df05c 100644
--- a/filter/source/xsltdialog/xmlfilterjar.cxx
+++ b/filter/source/xsltdialog/xmlfilterjar.cxx
@@ -37,6 +37,7 @@
#include <unotools/streamwrap.hxx>
#include <unotools/tempfile.hxx>
#include <svl/urihelper.hxx>
+#include <tools/diagnose_ex.h>
#include <tools/stream.hxx>
#include <tools/urlobj.hxx>
@@ -186,7 +187,7 @@ bool XMLFilterJarHelper::savePackage( const OUString& rPackageURL, const std::ve
{
// in case of same named import / export XSLT the latter
// is ignored
- OSL_FAIL( "XMLFilterJarHelper::same named xslt filter exception!" );
+ TOOLS_WARN_EXCEPTION("filter.xslt", "same named xslt filter exception!");
}
if( !filter->maImportTemplate.isEmpty() )
@@ -220,7 +221,7 @@ bool XMLFilterJarHelper::savePackage( const OUString& rPackageURL, const std::ve
}
catch( const Exception& )
{
- OSL_FAIL( "XMLFilterJarHelper::savePackage exception caught!" );
+ TOOLS_WARN_EXCEPTION("filter.xslt", "");
}
osl::File::remove( rPackageURL );
@@ -289,7 +290,7 @@ void XMLFilterJarHelper::openPackage( const OUString& rPackageURL,
}
catch( const Exception& )
{
- OSL_FAIL( "XMLFilterJarHelper::savePackage exception caught!" );
+ TOOLS_WARN_EXCEPTION("filter.xslt", "");
}
}
@@ -360,7 +361,7 @@ bool XMLFilterJarHelper::copyFile( const Reference< XHierarchicalNameAccess >& x
}
catch( const Exception& )
{
- OSL_FAIL( "XMLFilterJarHelper::copyFile exception caught" );
+ TOOLS_WARN_EXCEPTION("filter.xslt", "");
}
return false;
}
diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
index 18bdb585a160..256fb9a8c551 100644
--- a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
@@ -24,6 +24,7 @@
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
+#include <tools/diagnose_ex.h>
#include <tools/urlobj.hxx>
#include <unotools/pathoptions.hxx>
#include <unotools/resmgr.hxx>
@@ -105,7 +106,7 @@ XMLFilterSettingsDialog::XMLFilterSettingsDialog(weld::Window* pParent,
}
catch(const Exception&)
{
- OSL_FAIL( "XMLFilterSettingsDialog::XMLFilterSettingsDialog exception caught!" );
+ TOOLS_WARN_EXCEPTION("filter.xslt", "");
}
}
@@ -374,7 +375,7 @@ OUString XMLFilterSettingsDialog::createUniqueInterfaceName( const OUString& rIn
}
catch( const Exception& )
{
- OSL_FAIL( "XMLFilterSettingsDialog::createUniqueInterfaceName exception caught!" );
+ TOOLS_WARN_EXCEPTION("filter.xslt", "");
}
OUString aInterfaceName( rInterfaceName );
@@ -416,7 +417,7 @@ bool XMLFilterSettingsDialog::insertOrEdit( filter_info_impl* pNewInfo, const fi
}
catch( const Exception& )
{
- OSL_FAIL( "XMLFilterSettingsDialog::insertOrEdit exception caught!" );
+ TOOLS_WARN_EXCEPTION("filter.xslt", "");
bOk = false;
}
}
@@ -536,7 +537,7 @@ bool XMLFilterSettingsDialog::insertOrEdit( filter_info_impl* pNewInfo, const fi
}
catch( const Exception& )
{
- OSL_FAIL( "XMLFilterSettingsDialog::insertOrEdit exception caught!" );
+ TOOLS_WARN_EXCEPTION("filter.xslt", "");
bOk = false;
}
}
@@ -594,7 +595,7 @@ bool XMLFilterSettingsDialog::insertOrEdit( filter_info_impl* pNewInfo, const fi
}
catch( const Exception& )
{
- OSL_FAIL( "XMLFilterSettingsDialog::insertOrEdit exception caught!" );
+ TOOLS_WARN_EXCEPTION("filter.xslt", "");
bOk = false;
}
}
@@ -609,7 +610,7 @@ bool XMLFilterSettingsDialog::insertOrEdit( filter_info_impl* pNewInfo, const fi
}
catch( const Exception& )
{
- OSL_FAIL( "XMLFilterSettingsDialog::insertOrEdit exception caught!" );
+ TOOLS_WARN_EXCEPTION("filter.xslt", "");
bOk = false;
}
}
@@ -623,7 +624,7 @@ bool XMLFilterSettingsDialog::insertOrEdit( filter_info_impl* pNewInfo, const fi
}
catch( const Exception& )
{
- OSL_FAIL( "XMLFilterSettingsDialog::insertOrEdit exception caught!" );
+ TOOLS_WARN_EXCEPTION("filter.xslt", "");
bOk = false;
}
}
@@ -637,7 +638,7 @@ bool XMLFilterSettingsDialog::insertOrEdit( filter_info_impl* pNewInfo, const fi
}
catch( const Exception& )
{
- OSL_FAIL( "XMLFilterSettingsDialog::insertOrEdit exception caught!" );
+ TOOLS_WARN_EXCEPTION("filter.xslt", "");
bOk = false;
}
@@ -650,7 +651,7 @@ bool XMLFilterSettingsDialog::insertOrEdit( filter_info_impl* pNewInfo, const fi
}
catch( const Exception& )
{
- OSL_FAIL( "XMLFilterSettingsDialog::insertOrEdit exception caught!" );
+ TOOLS_WARN_EXCEPTION("filter.xslt", "");
}
}
@@ -821,7 +822,7 @@ void XMLFilterSettingsDialog::onDelete()
}
catch( const Exception& )
{
- OSL_FAIL( "XMLFilterSettingsDialog::onDelete exception caught!" );
+ TOOLS_WARN_EXCEPTION("filter.xslt", "");
}
}
}
@@ -1116,7 +1117,7 @@ void XMLFilterSettingsDialog::initFilterList()
}
catch( const Exception& )
{
- OSL_FAIL( "XMLFilterSettingsDialog::initFilterList exception caught!" );
+ TOOLS_WARN_EXCEPTION("filter.xslt", "");
}
}
@@ -1378,7 +1379,7 @@ bool copyStreams( const Reference< XInputStream >& xIS, const Reference< XOutput
}
catch(const Exception&)
{
- OSL_FAIL( "copyStreams() exception caught!" );
+ TOOLS_WARN_EXCEPTION("filter.xslt", "");
}
return false;
diff --git a/filter/source/xsltdialog/xmlfiltertabdialog.cxx b/filter/source/xsltdialog/xmlfiltertabdialog.cxx
index 4f1a9cf1c21d..306cf0abf23f 100644
--- a/filter/source/xsltdialog/xmlfiltertabdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltertabdialog.cxx
@@ -21,6 +21,7 @@
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <comphelper/fileurl.hxx>
+#include <tools/diagnose_ex.h>
#include <vcl/svapp.hxx>
#include <vcl/weld.hxx>
#include <osl/file.hxx>
@@ -100,7 +101,7 @@ bool XMLFilterTabDialog::onOk()
}
catch( const Exception& )
{
- OSL_FAIL( "XMLFilterTabDialog::onOk exception caught!" );
+ TOOLS_WARN_EXCEPTION("filter.xslt", "");
}
}
}
@@ -158,7 +159,7 @@ bool XMLFilterTabDialog::onOk()
}
catch( const Exception& )
{
- OSL_FAIL( "XMLFilterTabDialog::onOk exception caught!" );
+ TOOLS_WARN_EXCEPTION("filter.xslt", "");
}
}
}
diff --git a/filter/source/xsltdialog/xmlfiltertestdialog.cxx b/filter/source/xsltdialog/xmlfiltertestdialog.cxx
index 0499e0a5e615..4f804f6a7e2c 100644
--- a/filter/source/xsltdialog/xmlfiltertestdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltertestdialog.cxx
@@ -42,6 +42,7 @@
#include <sfx2/filedlghelper.hxx>
#include <osl/file.hxx>
#include <unotools/tempfile.hxx>
+#include <tools/diagnose_ex.h>
#include <tools/debug.hxx>
#include <tools/urlobj.hxx>
#include <comphelper/processfactory.hxx>
@@ -128,7 +129,7 @@ static bool checkComponent( Reference< XComponent > const & rxComponent, const O
}
catch( const Exception& )
{
- OSL_FAIL( "checkComponent exception caught!" );
+ TOOLS_WARN_EXCEPTION("filter.xslt", "");
}
return false;
@@ -169,7 +170,7 @@ XMLFilterTestDialog::XMLFilterTestDialog(weld::Window* pParent,
}
catch( const Exception& )
{
- OSL_FAIL( "XMLFilterTestDialog::XMLFilterTestDialog exception caught!" );
+ TOOLS_WARN_EXCEPTION("filter.xslt", "");
}
}
@@ -182,7 +183,7 @@ XMLFilterTestDialog::~XMLFilterTestDialog()
}
catch( const Exception& )
{
- OSL_FAIL( "XMLFilterTestDialog::~XMLFilterTestDialog exception caught!" );
+ TOOLS_WARN_EXCEPTION("filter.xslt", "");
}
}
@@ -399,7 +400,7 @@ void XMLFilterTestDialog::onExportBrowse()
}
catch(const Exception&)
{
- OSL_FAIL("XMLFilterTestDialog::onExportBrowse exception caught!");
+ TOOLS_WARN_EXCEPTION("filter.xslt", "");
}
initDialog();
@@ -503,7 +504,7 @@ void XMLFilterTestDialog::doExport( const Reference< XComponent >& xComp )
}
catch( const Exception& )
{
- OSL_FAIL( "XMLFilterTestDialog::doExport exception caught!" );
+ TOOLS_WARN_EXCEPTION("filter.xslt", "");
}
}
@@ -619,7 +620,7 @@ void XMLFilterTestDialog::import( const OUString& rURL )
}
catch(const Exception&)
{
- OSL_FAIL("XMLFilterTestDialog::import caught an exception" );
+ TOOLS_WARN_EXCEPTION("filter.xslt", "");
}
}
@@ -694,7 +695,7 @@ Reference< XComponent > XMLFilterTestDialog::getFrontMostDocument( const OUStrin
}
catch( const Exception& )
{
- OSL_FAIL( "XMLFilterTestDialog::getFrontMostDocument exception caught!" );
+ TOOLS_WARN_EXCEPTION("filter.xslt", "");
}
return xRet;
diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index 2d3a974055e7..0e514d2896cf 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -239,6 +239,7 @@ certain functionality.
@li @c filter.tga
@li @c filter.tiff
@li @c filter.xmlfa
+ at li @c filter.xmlfd
@li @c filter.xslt - xslt import/export
@section oox
More information about the Libreoffice-commits
mailing list