summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2015-10-09 16:51:25 +0200
committerMichael Stahl <mstahl@redhat.com>2015-10-09 18:03:48 +0200
commita8f053697c6c6cfa07ce200165df8a1c9968a9de (patch)
tree48d6728336ac392ca9705174bea74587dd515fa2
parent5d826db15beaff4f0930724431d34f7103111591 (diff)
filter: convert OSL_FAIL to SAL_WARN
That literal %s was irritating. Change-Id: I2925b26b1f3d1c101106ca616d18b24b41210c72
-rw-r--r--filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx20
-rw-r--r--include/sal/log-areas.dox1
2 files changed, 11 insertions, 10 deletions
diff --git a/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx b/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx
index 2730f96c3215..f0eb7e4d1109 100644
--- a/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx
+++ b/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx
@@ -108,8 +108,8 @@ bool SAL_CALL XmlFilterAdaptor::importImpl( const Sequence< css::beans::Property
Reference < XDocumentHandler > xHandler( mxContext->getServiceManager()->createInstanceWithArgumentsAndContext( sXMLImportService, aAnys, mxContext ), UNO_QUERY );
- if(! xHandler.is()) {
- OSL_FAIL("XMLReader::Read: %s Unable to create service instance xHandler\n" );
+ if (!xHandler.is()) {
+ SAL_WARN("filter.xmlfa", "XmlFilterAdaptor: unable to create service " << sXMLImportService);
return false;
}
Reference < XImporter > xImporter( xHandler, UNO_QUERY );
@@ -123,8 +123,8 @@ bool SAL_CALL XmlFilterAdaptor::importImpl( const Sequence< css::beans::Property
// Creating a ConverterBridge instance
Reference< XInterface > xConvBridge(mxContext->getServiceManager()->createInstanceWithContext(udConvertClass, mxContext), UNO_QUERY);
- if(! xConvBridge.is()){
- OSL_FAIL( "XMLReader::Read: %s service missing\n" );
+ if (!xConvBridge.is()) {
+ SAL_WARN("filter.xmlfa", "XmlFilterAdaptor: unable to create service " << udConvertClass);
return false;
}
if (xStatusIndicator.is())
@@ -174,7 +174,7 @@ bool SAL_CALL XmlFilterAdaptor::importImpl( const Sequence< css::beans::Property
if (xStatusIndicator.is())
xStatusIndicator->end();
- OSL_FAIL( OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US).getStr());
+ SAL_WARN("filter.xmlfa", "XmlFilterAdaptor: exception: " << e.Message);
return false;
}
if (xStatusIndicator.is()) {
@@ -203,9 +203,9 @@ bool SAL_CALL XmlFilterAdaptor::exportImpl( const Sequence< css::beans::Property
// Set up converter bridge.
Reference< css::xml::XExportFilter > xConverter(mxContext->getServiceManager()->createInstanceWithContext( udConvertClass, mxContext ), UNO_QUERY);
- if(! xConverter.is()){
- OSL_FAIL( "xml export sub service missing" );
- return false;
+ if (!xConverter.is()) {
+ SAL_WARN("filter.xmlfa", "XmlFilterAdaptor: unable to create service " << udConvertClass);
+ return false;
}
if (xStatusIndicator.is())
@@ -287,9 +287,9 @@ bool SAL_CALL XmlFilterAdaptor::exportImpl( const Sequence< css::beans::Property
return false;
}
}
- catch( const Exception& exE )
+ catch (const Exception& e)
{
- OSL_FAIL( OUStringToOString( exE.Message, RTL_TEXTENCODING_ASCII_US).getStr());
+ SAL_WARN("filter.xmlfa", "XmlFilterAdaptor: exception: " << e.Message);
if (xStatusIndicator.is())
xStatusIndicator->end();
return false;
diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index 5d11a7ea116a..7b482e9c4748 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -179,6 +179,7 @@ certain functionality.
@li @c filter.pdf
@li @c filter.pict
@li @c filter.tiff
+@li @c filter.xmlfa
@li @c filter.xslt - xslt import/export
@section oox