Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/3223

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/23/3223/1

fdo#43157 - Clean up OSL_ASSERT, DBG_ASSERT

 - replaced osl_trace with sal_info
 - added new log areas to log-area.dox

Change-Id: I41444e90a22bad7d04d3827914d4d793b3601304
---
M sal/inc/sal/log-areas.dox
M xmlscript/source/xml_helper/xml_impctx.cxx
M xmlscript/source/xmldlg_imexp/xmldlg_export.cxx
M xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
M xmlscript/source/xmldlg_imexp/xmldlg_import.cxx
M xmlscript/source/xmlflat_imexp/xmlbas_export.cxx
M xmlscript/source/xmlflat_imexp/xmlbas_import.cxx
M xmlscript/source/xmllib_imexp/xmllib_import.cxx
M xmlscript/source/xmlmod_imexp/xmlmod_import.cxx
9 files changed, 75 insertions(+), 84 deletions(-)



diff --git a/sal/inc/sal/log-areas.dox b/sal/inc/sal/log-areas.dox
index 6466c6e..98adef8 100644
--- a/sal/inc/sal/log-areas.dox
+++ b/sal/inc/sal/log-areas.dox
@@ -302,6 +302,14 @@
 @li @c xmlsecurity.helper
 @li @c xmlsecurity.xmlsec - xmlsec wrapper
 
+@section xmlscript
+
+@li @c xmlscript.xmlhelper
+@li @c xmlscript.xmldlg
+@li @c xmlscript.xmlflat
+@li @c xmlscript.xmllib
+@li @c xmlscript.xmlmod
+
 @section dbaccess
 
 @li @c dbaccess
diff --git a/xmlscript/source/xml_helper/xml_impctx.cxx b/xmlscript/source/xml_helper/xml_impctx.cxx
index 9189e53..24f837e 100644
--- a/xmlscript/source/xml_helper/xml_impctx.cxx
+++ b/xmlscript/source/xml_helper/xml_impctx.cxx
@@ -263,7 +263,7 @@
         if (iFind != m_prefixes.end())
         {
             const PrefixEntry & rPrefixEntry = *iFind->second;
-            OSL_ASSERT( ! rPrefixEntry.m_Uids.empty() );
+            SAL_WARN_IF( rPrefixEntry.m_Uids.empty(), "xmlscript.xmlhelper", "rPrefixEntry.m_Uids 
is empty" );
             m_nLastPrefix_lookup = rPrefixEntry.m_Uids.back();
             m_aLastPrefix_lookup = rPrefix;
         }
@@ -294,7 +294,7 @@
     else
     {
         PrefixEntry * pEntry = iFind->second;
-        OSL_ASSERT( ! pEntry->m_Uids.empty() );
+        SAL_WARN_IF( pEntry->m_Uids.empty(), "xmlscript.xmlhelper", "pEntry->m_Uids is empty" );
         pEntry->m_Uids.push_back( nUid );
     }
 
@@ -481,7 +481,7 @@
     throw (RuntimeException)
 {
     sal_Int32 uid = getUidByURI( Uri );
-    OSL_ASSERT( uid != UID_UNKNOWN );
+    SAL_WARN_IF( uid == UID_UNKNOWN, "xmlscript.xmlhelper", "uid UNKNOWN");
     return uid;
 }
 
@@ -538,8 +538,7 @@
 #if OSL_DEBUG_LEVEL > 1
         OString aQName(
             OUStringToOString( rQElementName, RTL_TEXTENCODING_ASCII_US ) );
-        OSL_TRACE( "### no context given on createChildElement() "
-                   "=> ignoring element \"%s\" ...", aQName.getStr() );
+        SAL_INFO("xmlscript.xmlhelper", "### no context given on createChildElement() => ignoring 
element \"" << aQName.getStr() << "\" ...");
 #endif
         return;
     }
@@ -595,9 +594,7 @@
         if (pUids[ nPos ] >= 0) // no xmlns: attribute
         {
             OUString const & rQAttributeName = pQNames[ nPos ];
-            OSL_ENSURE(
-                !rQAttributeName.startsWith( "xmlns:" ),
-                "### unexpected xmlns!" );
+            SAL_WARN_IF(rQAttributeName.startsWith( "xmlns:" ), "xmlscript.xmlhelper", "### 
unexpected xmlns!" );
 
             // collect attribute's uid and current prefix
             sal_Int32 nColonPos = rQAttributeName.indexOf( (sal_Unicode) ':' );
@@ -651,9 +648,7 @@
 #if OSL_DEBUG_LEVEL > 1
         OString aQName(
             OUStringToOString( rQElementName, RTL_TEXTENCODING_ASCII_US ) );
-        OSL_TRACE(
-            "### no context given on createChildElement() => "
-            "ignoring element \"%s\" ...", aQName.getStr() );
+        SAL_INFO("xmlscript.xmlhelper", "### no context given on createChildElement() => ignoring 
element \"" << aQName.getStr() << "\" ...");
 #endif
     }
     }
@@ -673,14 +668,14 @@
 #if OSL_DEBUG_LEVEL > 1
         OString aQName(
             OUStringToOString( rQElementName, RTL_TEXTENCODING_ASCII_US ) );
-        OSL_TRACE( "### received endElement() for \"%s\".", aQName.getStr() );
+        SAL_INFO("xmlscript.xmlhelper", "### received endElement() for \"" << aQName.getStr() << 
"\".");
 #endif
         static_cast<void>(rQElementName);
         return;
     }
 
     // popping context
-    OSL_ASSERT( ! m_elements.empty() );
+    SAL_WARN_IF( m_elements.empty(), "xmlscript.xmlhelper", "m_elements is empty" );
     ElementEntry * pEntry = m_elements.back();
     xCurrentElement = pEntry->m_xElement;
 
@@ -688,8 +683,8 @@
     sal_Int32 nUid;
     OUString aLocalName;
     getElementName( rQElementName, &nUid, &aLocalName );
-    OSL_ASSERT( xCurrentElement->getLocalName() == aLocalName );
-    OSL_ASSERT( xCurrentElement->getUid() == nUid );
+    SAL_WARN_IF( xCurrentElement->getLocalName() != aLocalName, "xmlscript.xmlhelper", 
"xCurrentElement->getLocalName() != aLocalName" );
+    SAL_WARN_IF( xCurrentElement->getUid() != nUid, "xmlscript.xmlhelper", 
"xCurrentElement->getUid() != nUid" );
 #endif
 
     // pop prefixes
@@ -792,7 +787,7 @@
     throw (RuntimeException)
 {
     static_cast<void>(nIndex);
-    OSL_ASSERT( nIndex < m_nAttributes );
+    SAL_WARN_IF( nIndex > m_nAttributes , "xmlscript.xmlhelper", "nIndex is bigger then 
m_nAttributes");
     return OUString(); // unsupported
 }
 
@@ -856,7 +851,7 @@
     bool bSingleThreadedUse )
     SAL_THROW(())
 {
-    OSL_ASSERT( xRoot.is() );
+    SAL_WARN_IF( !xRoot.is(), "xmlscript.xmlhelper", "xRoot is NULL" );
     if (xRoot.is())
     {
         return static_cast< xml::sax::XDocumentHandler * >(
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx 
b/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx
index e9a2760..a7e716e 100644
--- a/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx
@@ -136,7 +136,7 @@
             break;
         }
         default:
-            OSL_FAIL( "### unexpected border value!" );
+            SAL_WARN( "xmlscript.xmldlg", "### unexpected border value!" );
             break;
         }
     }
@@ -156,7 +156,7 @@
             pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":look", "simple" );
             break;
         default:
-            OSL_FAIL( "### unexpected visual effect value!" );
+            SAL_WARN( "xmlscript.xmldlg", "### unexpected visual effect value!" );
             break;
         }
     }
@@ -210,7 +210,7 @@
                 pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-family", "system" );
                 break;
             default:
-                OSL_FAIL( "### unexpected font-family!" );
+                SAL_WARN( "xmlscript.xmldlg", "### unexpected font-family!" );
                 break;
             }
         }
@@ -250,7 +250,7 @@
                 pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-charset", "symbol" );
                 break;
             default:
-                OSL_FAIL( "### unexpected font-charset!" );
+                SAL_WARN( "xmlscript.xmldlg", "### unexpected font-charset!" );
                 break;
             }
         }
@@ -266,7 +266,7 @@
                 pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-pitch", "variable" );
                 break;
             default:
-                OSL_FAIL( "### unexpected font-pitch!" );
+                SAL_WARN( "xmlscript.xmldlg", "### unexpected font-pitch!" );
                 break;
             }
         }
@@ -298,7 +298,7 @@
                 pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-slant", "reverse_italic" );
                 break;
             default:
-                OSL_FAIL( "### unexpected font-slant!" );
+                SAL_WARN( "xmlscript.xmldlg", "### unexpected font-slant!" );
                 break;
             }
         }
@@ -359,7 +359,7 @@
                 pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-underline", "boldwave" );
                 break;
             default:
-                OSL_FAIL( "### unexpected font-underline!" );
+                SAL_WARN( "xmlscript.xmldlg", "### unexpected font-underline!" );
                 break;
             }
         }
@@ -384,7 +384,7 @@
                 pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-strikeout", "x" );
                 break;
             default:
-                OSL_FAIL( "### unexpected font-strikeout!" );
+                SAL_WARN( "xmlscript.xmldlg", "### unexpected font-strikeout!" );
                 break;
             }
         }
@@ -418,7 +418,7 @@
                 pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-type", "scalable" );
                 break;
             default:
-                OSL_FAIL( "### unexpected font-type!" );
+                SAL_WARN( "xmlscript.xmldlg", "### unexpected font-type!" );
                 break;
             }
         }
@@ -436,7 +436,7 @@
             pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-relief", "engraved" );
             break;
         default:
-            OSL_FAIL( "### unexpected font-relief!" );
+            SAL_WARN( "xmlscript.xmldlg", "### unexpected font-relief!" );
             break;
         }
         // dialog:font-emphasismark (none|dot|circle|disc|accent|above|below) #IMPLIED
@@ -463,7 +463,7 @@
             pStyle->addAttribute( XMLNS_DIALOGS_PREFIX ":font-emphasismark", "below" );
             break;
         default:
-            OSL_FAIL( "### unexpected font-emphasismark!" );
+            SAL_WARN( "xmlscript.xmldlg", "### unexpected font-emphasismark!" );
             break;
         }
     }
@@ -522,7 +522,7 @@
         if (a >>= v)
             addAttribute( rAttrName, v );
         else
-            OSL_FAIL( "### unexpected property type!" );
+            SAL_WARN( "xmlscript.xmldlg", "### unexpected property type!" );
     }
 }
 
@@ -590,7 +590,7 @@
                 addAttribute( rAttrName, "short_YYYYMMDD_DIN5008" );
                 break;
             default:
-                OSL_FAIL( "### unexpected date format!" );
+                SAL_WARN( "xmlscript.xmldlg", "### unexpected date format!" );
                 break;
             }
         }
@@ -625,7 +625,7 @@
                 addAttribute( rAttrName, "Duration_long" );
                 break;
             default:
-                OSL_FAIL( "### unexpected time format!" );
+                SAL_WARN( "xmlscript.xmldlg", "### unexpected time format!" );
                 break;
             }
         }
@@ -651,7 +651,7 @@
                 addAttribute( rAttrName, "right" );
                 break;
             default:
-                OSL_FAIL( "### illegal alignment value!" );
+                SAL_WARN( "xmlscript.xmldlg", "### illegal alignment value!" );
                 break;
             }
         }
@@ -679,7 +679,7 @@
                 addAttribute( rAttrName, "bottom" );
                 break;
             default:
-                OSL_FAIL( "### illegal vertical alignment value!" );
+                SAL_WARN( "xmlscript.xmldlg", "### illegal vertical alignment value!" );
                 break;
             }
         }
@@ -731,7 +731,7 @@
                 addAttribute( rAttrName, "bottom" );
                 break;
             default:
-                OSL_FAIL( "### illegal image alignment value!" );
+                SAL_WARN( "xmlscript.xmldlg", "### illegal image alignment value!" );
                 break;
             }
         }
@@ -787,7 +787,7 @@
                 addAttribute( rAttrName, "center" );
                 break;
             default:
-                OSL_FAIL( "### illegal image position value!" );
+                SAL_WARN( "xmlscript.xmldlg", "### illegal image position value!" );
                 break;
             }
         }
@@ -816,7 +816,7 @@
                 addAttribute( rAttrName, "help" );
                 break;
             default:
-                OSL_FAIL( "### illegal button-type value!" );
+                SAL_WARN( "xmlscript.xmldlg", "### illegal button-type value!" );
                 break;
             }
         }
@@ -839,7 +839,7 @@
                 addAttribute( rAttrName, "vertical" );
                 break;
             default:
-                OSL_FAIL( "### illegal orientation value!" );
+                SAL_WARN( "xmlscript.xmldlg", "### illegal orientation value!" );
                 break;
             }
         }
@@ -865,7 +865,7 @@
                 addAttribute( rAttrName, "carriage-return-line-feed" );
                 break;
             default:
-                OSL_FAIL( "### illegal line end format value!" );
+                SAL_WARN( "xmlscript.xmldlg", "### illegal line end format value!" );
                 break;
             }
         }
@@ -896,7 +896,7 @@
                 if ( !sAddress.isEmpty() )
                     addAttribute( rAttrName, sAddress );
 
-                OSL_TRACE( "*** Bindable value %s", OUStringToOString( sAddress, 
RTL_TEXTENCODING_UTF8 ).getStr() );
+                SAL_INFO("xmlscript.xmldlg", "*** Bindable value " << sAddress );
 
             }
         }
@@ -920,7 +920,7 @@
                 OUString sAddress;
                 xConvertor->setPropertyValue( "Address", makeAny( aAddress ) );
                 xConvertor->getPropertyValue( "PersistentRepresentation" ) >>= sAddress;
-                OSL_TRACE("**** cell range source list %s", OUStringToOString( sAddress, 
RTL_TEXTENCODING_UTF8 ).getStr() );
+                SAL_INFO("xmlscript.xmldlg","**** cell range source list " << sAddress );
                 if ( !sAddress.isEmpty() )
                     addAttribute( rAttrName, sAddress );
             }
@@ -957,7 +957,7 @@
                     addAttribute( rAttrName, "range" );
                     break;
                 default:
-                    OSL_FAIL( "### illegal selection type value!" );
+                    SAL_WARN( "xmlscript.xmldlg", "### illegal selection type value!" );
                     break;
             }
         }
@@ -1018,7 +1018,7 @@
     }
     else
     {
-        OSL_FAIL( "unexpected property type for \"Enabled\": not bool!" );
+        SAL_WARN( "xmlscript.xmldlg", "unexpected property type for \"Enabled\": not bool!" );
     }
 
     sal_Bool bVisible = sal_True;
@@ -1095,11 +1095,10 @@
                 script::ScriptEventDescriptor descr;
                 if (xEvents->getByName( pNames[ nPos ] ) >>= descr)
                 {
-                    OSL_ENSURE( !descr.ListenerType.isEmpty() &&
-                                !descr.EventMethod.isEmpty() &&
-                                !descr.ScriptCode.isEmpty() &&
-                                !descr.ScriptType.isEmpty() ,
-                                "### invalid event descr!" );
+                    SAL_WARN_IF( descr.ListenerType.isEmpty() &&
+                                descr.EventMethod.isEmpty() &&
+                                descr.ScriptCode.isEmpty() &&
+                                descr.ScriptType.isEmpty() , "xmlscript.xmldlg", "### invalid 
event descr!" );
 
                     OUString aEventName;
 
@@ -1170,7 +1169,7 @@
                 }
                 else
                 {
-                    OSL_FAIL( "### unexpected event type in container!" );
+                    SAL_WARN( "xmlscript.xmldlg", "### unexpected event type in container!" );
                 }
             }
         }
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx 
b/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
index d756612..0e61b54 100644
--- a/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
@@ -65,7 +65,7 @@
     }
     else
     {
-        OSL_TRACE("****** ARGGGGG!!!! **********");
+        SAL_INFO("xmlscript.xmldlg","****** ARGGGGG!!!! **********");
         throw     xml::sax::SAXException("expected event element!", Reference< XInterface >(), 
Any() );
     }
 }
@@ -574,7 +574,7 @@
         }
         catch (const util::MalformedNumberFormatException & exc)
         {
-            OSL_FAIL( "### util::MalformedNumberFormatException occurred!" );
+           SAL_WARN( "xmlscript.xmldlg", "### util::MalformedNumberFormatException occurred!" );
             // rethrow
             throw xml::sax::SAXException( exc.Message, Reference< XInterface >(), Any() );
         }
@@ -1121,7 +1121,7 @@
     OUString aValue;
     if (getStringAttr( &aValue, "echochar", _xAttributes, _pImport->XMLNS_DIALOGS_UID ) && 
!aValue.isEmpty() )
     {
-        OSL_ENSURE( aValue.getLength() == 1, "### more than one character given for echochar!" );
+        SAL_WARN_IF( aValue.getLength() != 1, "xmlscript.xmldlg", "### more than one character 
given for echochar!" );
         sal_Int16 nChar = (sal_Int16)aValue[ 0 ];
         xControlModel->setPropertyValue( "EchoChar", makeAny( nChar ) );
     }
@@ -1377,7 +1377,7 @@
     else if ( rLocalName == "menuitem" )
     {
         OUString aValue( xAttributes->getValueByUidName( _pImport->XMLNS_DIALOGS_UID,"value" ) );
-        OSL_ENSURE( !aValue.isEmpty(), "### menuitem has no value?" );
+        SAL_WARN_IF( aValue.isEmpty(), "xmlscript.xmldlg", "### menuitem has no value?" );
         if (!aValue.isEmpty())
         {
             _itemValues.push_back( aValue );
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx 
b/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx
index 6a520ff..754efaf 100644
--- a/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx
@@ -1478,7 +1478,7 @@
                     }
                     else // script:listener-event element
                     {
-                        OSL_ASSERT( aLocalName == "listener-event" );
+                        SAL_WARN_IF( aLocalName != "listener-event", "xmlscript.xmldlg", 
"aLocalName != listener-event" );
 
                         if (!getStringAttr( &descr.ListenerType, "listener-type"  , xAttributes, 
_pImport->XMLNS_SCRIPT_UID ) ||
                             !getStringAttr( &descr.EventMethod , "listener-method", xAttributes, 
_pImport->XMLNS_SCRIPT_UID ))
@@ -1491,7 +1491,7 @@
                 }
                 else // deprecated dlg:event element
                 {
-                    OSL_ASSERT( _pImport->XMLNS_DIALOGS_UID == nUid && aLocalName == "event" );
+                    SAL_WARN_IF( _pImport->XMLNS_DIALOGS_UID != nUid || aLocalName != "event", 
"xmlscript.xmldlg", "_pImport->XMLNS_DIALOGS_UID != nUid || aLocalName != \"event\"" );
 
                     if (!getStringAttr( &descr.ListenerType, "listener-type", xAttributes, 
_pImport->XMLNS_DIALOGS_UID ) ||
                         !getStringAttr( &descr.EventMethod,  "event-method",  xAttributes, 
_pImport->XMLNS_DIALOGS_UID ))
@@ -1682,7 +1682,7 @@
 #if OSL_DEBUG_LEVEL > 1
     OString aStr( OUStringToOString(
                              _aLocalName, RTL_TEXTENCODING_ASCII_US ) );
-    OSL_TRACE( "ElementBase::~ElementBase(): %s", aStr.getStr() );
+    SAL_INFO("xmlscript.xmldlg", "ElementBase::~ElementBase(): " << aStr.getStr() );
 #endif
 }
 
@@ -1744,7 +1744,7 @@
     SAL_THROW(())
 {
 #if OSL_DEBUG_LEVEL > 1
-    OSL_TRACE( "DialogImport::~DialogImport()." );
+    SAL_INFO("xmlscript.xmldlg", "DialogImport::~DialogImport()." );
 #endif
 }
 
//__________________________________________________________________________________________________
diff --git a/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx 
b/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx
index 8380020..d294924 100644
--- a/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx
+++ b/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx
@@ -243,7 +243,7 @@
                         xPSet->getPropertyValue("BasicLibraries" ) >>= xLibContainer;
                 }
 
-                OSL_ENSURE( xLibContainer.is(), "XMLBasicExporterBase::filter: nowhere to export 
to!" );
+                SAL_WARN_IF( !xLibContainer.is(), "xmlscript.xmlflat", 
"XMLBasicExporterBase::filter: nowhere to export to!" );
 
                 if ( xLibContainer.is() )
                 {
@@ -398,26 +398,22 @@
         }
         catch ( const container::NoSuchElementException& e )
         {
-            OSL_TRACE( "XMLBasicExporterBase::filter: caught NoSuchElementException reason %s",
-                OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
+            SAL_INFO("xmlscript.xmlflat", "XMLBasicExporterBase::filter: caught 
NoSuchElementException reason " << e.Message );
             bReturn = sal_False;
         }
         catch ( const lang::IllegalArgumentException& e )
         {
-            OSL_TRACE( "XMLBasicExporterBase::filter: caught IllegalArgumentException reason %s",
-                OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
+            SAL_INFO("xmlscript.xmlflat", "XMLBasicExporterBase::filter: caught 
IllegalArgumentException reason " << e.Message );
             bReturn = sal_False;
         }
         catch ( const lang::WrappedTargetException& e )
         {
-            OSL_TRACE( "XMLBasicExporterBase::filter: caught WrappedTargetException reason %s",
-                OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
+            SAL_INFO("xmlscript.xmlflat", "XMLBasicExporterBase::filter: caught 
WrappedTargetException reason " << e.Message );
             bReturn = sal_False;
         }
         catch ( const xml::sax::SAXException& e )
         {
-            OSL_TRACE( "XMLBasicExporterBase::filter: caught SAXException reason %s",
-                OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
+            SAL_INFO("xmlscript.xmlflat", "XMLBasicExporterBase::filter: caught SAXException 
reason " << e.Message );
             bReturn = sal_False;
         }
 
diff --git a/xmlscript/source/xmlflat_imexp/xmlbas_import.cxx 
b/xmlscript/source/xmlflat_imexp/xmlbas_import.cxx
index 34eadcb..adb50e5 100644
--- a/xmlscript/source/xmlflat_imexp/xmlbas_import.cxx
+++ b/xmlscript/source/xmlflat_imexp/xmlbas_import.cxx
@@ -221,13 +221,11 @@
                     }
                     catch ( const container::ElementExistException& e )
                     {
-                        OSL_TRACE( "BasicLibrariesElement::startChildElement: caught 
ElementExceptionExist reason %s",
-                            OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US 
).pData->buffer );
+                        SAL_INFO("xmlscript.xmlflat", "BasicLibrariesElement::startChildElement: 
caught ElementExceptionExist reason " << e.Message );
                     }
                     catch ( const lang::IllegalArgumentException& e )
                     {
-                        OSL_TRACE( "BasicLibrariesElement::startChildElement: caught 
IllegalArgumentException reason %s",
-                            OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US 
).pData->buffer );
+                        SAL_INFO("xmlscript.xmlflat", "BasicLibrariesElement::startChildElement: 
caught IllegalArgumentException reason " << e.Message );
                     }
                 }
             }
@@ -263,8 +261,7 @@
                     }
                     catch ( const lang::IllegalArgumentException& e )
                     {
-                        OSL_TRACE( "BasicLibrariesElement::startChildElement: caught 
IllegalArgumentException reason %s",
-                            OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US 
).pData->buffer );
+                        SAL_INFO("xmlscript.xmlflat", "BasicLibrariesElement::startChildElement: 
caught IllegalArgumentException reason " << e.Message );
                     }
                 }
             }
@@ -306,8 +303,7 @@
         }
         catch ( const lang::WrappedTargetException& e )
         {
-            OSL_TRACE( "BasicEmbeddedLibraryElement CTOR: caught WrappedTargetException reason %s",
-                OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
+            SAL_INFO("xmlscript.xmlflat", "BasicEmbeddedLibraryElement CTOR: caught 
WrappedTargetException reason " << e.Message );
         }
     }
 
@@ -451,18 +447,15 @@
         }
         catch ( const container::ElementExistException& e )
         {
-            OSL_TRACE( "BasicSourceCodeElement::endElement: caught ElementExceptionExist reason 
%s",
-                OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
+            SAL_INFO("xmlscript.xmlflat", "BasicSourceCodeElement::endElement: caught 
ElementExceptionExist reason " << e.Message );
         }
         catch ( const lang::IllegalArgumentException& e )
         {
-            OSL_TRACE( "BasicSourceCodeElement::endElement: caught IllegalArgumentException reason 
%s",
-                OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
+            SAL_INFO("xmlscript.xmlflat", "BasicSourceCodeElement::endElement: caught 
IllegalArgumentException reason " << e.Message );
         }
         catch ( const lang::WrappedTargetException& e )
         {
-            OSL_TRACE( "BasicSourceCodeElement::endElement: caught WrappedTargetException reason 
%s",
-                OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
+            SAL_INFO("xmlscript.xmlflat", "BasicSourceCodeElement::endElement: caught 
WrappedTargetException reason " << e.Message );
         }
     }
 
@@ -552,7 +545,7 @@
                     xPSet->getPropertyValue("BasicLibraries" ) >>= xLibContainer;
             }
 
-            OSL_ENSURE( xLibContainer.is(), "BasicImport::startRootElement: nowhere to import to!" 
);
+            SAL_WARN_IF( !xLibContainer.is(), "xmlscript.xmlflat", "BasicImport::startRootElement: 
nowhere to import to!" );
 
             if ( xLibContainer.is() )
             {
diff --git a/xmlscript/source/xmllib_imexp/xmllib_import.cxx 
b/xmlscript/source/xmllib_imexp/xmllib_import.cxx
index 0a0e08ba..16a5a80 100644
--- a/xmlscript/source/xmllib_imexp/xmllib_import.cxx
+++ b/xmlscript/source/xmllib_imexp/xmllib_import.cxx
@@ -114,7 +114,7 @@
 
 #if OSL_DEBUG_LEVEL > 1
     OString aStr( OUStringToOString( _aLocalName, RTL_TEXTENCODING_ASCII_US ) );
-    OSL_TRACE( "LibElementBase::~LibElementBase(): %s", aStr.getStr() );
+    SAL_INFO("xmlscript.xmllib", "LibElementBase::~LibElementBase(): " << aStr.getStr() );
 #endif
 }
 
@@ -183,7 +183,7 @@
     SAL_THROW(())
 {
 #if OSL_DEBUG_LEVEL > 1
-    OSL_TRACE( "LibraryImport::~LibraryImport()." );
+    SAL_INFO("xmlscript.xmllib", "LibraryImport::~LibraryImport()." );
 #endif
 }
 
diff --git a/xmlscript/source/xmlmod_imexp/xmlmod_import.cxx 
b/xmlscript/source/xmlmod_imexp/xmlmod_import.cxx
index ec13ec5..ae77871 100644
--- a/xmlscript/source/xmlmod_imexp/xmlmod_import.cxx
+++ b/xmlscript/source/xmlmod_imexp/xmlmod_import.cxx
@@ -114,7 +114,7 @@
 
 #if OSL_DEBUG_LEVEL > 1
     OString aStr( OUStringToOString( _aLocalName, RTL_TEXTENCODING_ASCII_US ) );
-    OSL_TRACE( "ModuleElement::~ModuleElement(): %s", aStr.getStr() );
+    SAL_INFO("xmlscript.xmlmod", "ModuleElement::~ModuleElement(): " << aStr.getStr() );
 #endif
 }
 
@@ -179,7 +179,7 @@
     SAL_THROW(())
 {
 #if OSL_DEBUG_LEVEL > 1
-    OSL_TRACE( "ModuleImport::~ModuleImport()." );
+    SAL_INFO("xmlscript.xmlmod", "ModuleImport::~ModuleImport()." );
 #endif
 }
 

-- 
To view, visit https://gerrit.libreoffice.org/3223
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I41444e90a22bad7d04d3827914d4d793b3601304
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Ioan Radu <ioan.radu.g@gmail.com>


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.