[Libreoffice-commits] core.git: 3 commits - ucb/source

Matúš Kukan matus.kukan at collabora.com
Tue Mar 18 12:15:19 PDT 2014


 ucb/source/ucp/webdav/ContentProperties.cxx        |    2 -
 ucb/source/ucp/webdav/DAVResourceAccess.cxx        |    4 +-
 ucb/source/ucp/webdav/DAVSessionFactory.cxx        |    2 -
 ucb/source/ucp/webdav/SerfLockStore.cxx            |   10 ++---
 ucb/source/ucp/webdav/SerfPropFindReqProcImpl.cxx  |    2 -
 ucb/source/ucp/webdav/SerfPropPatchReqProcImpl.cxx |    2 -
 ucb/source/ucp/webdav/SerfRequestProcessorImpl.cxx |    2 -
 ucb/source/ucp/webdav/SerfSession.cxx              |   39 ++++++++-------------
 ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx     |   24 ++++++------
 ucb/source/ucp/webdav/webdavcontent.cxx            |   37 ++++++++-----------
 ucb/source/ucp/webdav/webdavdatasupplier.cxx       |    2 -
 ucb/source/ucp/webdav/webdavprovider.cxx           |    3 -
 ucb/source/ucp/webdav/webdavresponseparser.cxx     |   14 +++----
 13 files changed, 65 insertions(+), 78 deletions(-)

New commits:
commit 228f3f6b3908129717f806f0fb8eb2a72578fb73
Author: Matúš Kukan <matus.kukan at collabora.com>
Date:   Mon Mar 3 17:32:50 2014 +0100

    webdav: OSL_TRACE -> SAL_INFO
    
    Change-Id: Id5947de4c64e8128073f39c9a2871676f2a117ff

diff --git a/ucb/source/ucp/webdav/DAVResourceAccess.cxx b/ucb/source/ucp/webdav/DAVResourceAccess.cxx
index 530bc01..1135605 100644
--- a/ucb/source/ucp/webdav/DAVResourceAccess.cxx
+++ b/ucb/source/ucp/webdav/DAVResourceAccess.cxx
@@ -550,7 +550,7 @@ void DAVResourceAccess::abort()
     // 17.11.09 (tkr): abort currently disabled caused by issue i106766
     // initialize();
     // m_xSession->abort();
-    OSL_TRACE( "Not implemented. -> #i106766#" );
+    SAL_INFO("ucb.ucp.webdav",  "Not implemented. -> #i106766#" );
 }
 
 
diff --git a/ucb/source/ucp/webdav/SerfLockStore.cxx b/ucb/source/ucp/webdav/SerfLockStore.cxx
index 9d56d97..82468ec 100644
--- a/ucb/source/ucp/webdav/SerfLockStore.cxx
+++ b/ucb/source/ucp/webdav/SerfLockStore.cxx
@@ -51,7 +51,7 @@ protected:
 
 void TickerThread::run()
 {
-    OSL_TRACE( "TickerThread: start." );
+    SAL_INFO("ucb.ucp.webdav",  "TickerThread: start." );
 
     // we have to go through the loop more often to be able to finish ~quickly
     const int nNth = 25;
@@ -71,7 +71,7 @@ void TickerThread::run()
         wait( aTV );
     }
 
-    OSL_TRACE( "TickerThread: stop." );
+    SAL_INFO("ucb.ucp.webdav",  "TickerThread: stop." );
 }
 
 
diff --git a/ucb/source/ucp/webdav/SerfRequestProcessorImpl.cxx b/ucb/source/ucp/webdav/SerfRequestProcessorImpl.cxx
index e20cffc..57093d4 100644
--- a/ucb/source/ucp/webdav/SerfRequestProcessorImpl.cxx
+++ b/ucb/source/ucp/webdav/SerfRequestProcessorImpl.cxx
@@ -92,7 +92,7 @@ void SerfRequestProcessorImpl::setRequestHeaders( serf_bucket_t* inoutSerfHeader
         const OString aValue = OUStringToOString( (*aHeaderIter).second,
                                                             RTL_TEXTENCODING_UTF8 );
 
-        OSL_TRACE( "Request Header - \"%s: %s\"", aHeader.getStr(), aValue.getStr() );
+        SAL_INFO("ucb.ucp.webdav",  "Request Header - \"" << aHeader << ": " << aValue << "\"");
         if ( !bHasUserAgent )
             bHasUserAgent = aHeaderIter->first == "User-Agent";
 
diff --git a/ucb/source/ucp/webdav/SerfSession.cxx b/ucb/source/ucp/webdav/SerfSession.cxx
index a124d10..1203889 100644
--- a/ucb/source/ucp/webdav/SerfSession.cxx
+++ b/ucb/source/ucp/webdav/SerfSession.cxx
@@ -1015,7 +1015,7 @@ namespace
             }
             else
             {
-                OSL_TRACE( "No chance to refresh lock before timeout!" );
+                SAL_INFO("ucb.ucp.webdav",  "No chance to refresh lock before timeout!" );
             }
         }
         return lastChanceToSendRefreshRequest;
@@ -1104,18 +1104,15 @@ void SerfSession::LOCK( const OUString & inPath,
         aTokens[ 0 ] = OUString::createFromAscii( theLock->token );
         rLock.LockTokens = aTokens;
 
-        OSL_TRACE( "SerfSession::LOCK: created lock for %s. token: %s",
-                   OUStringToOString( makeAbsoluteURL( inPath ),
-                                           RTL_TEXTENCODING_UTF8 ).getStr(),
-                   theLock->token );
+        SAL_INFO("ucb.ucp.webdav",  "SerfSession::LOCK: created lock for "
+                    << makeAbsoluteURL( inPath ) << ". token: " << theLock->token );
     }
     else
     {
         ne_lock_destroy( theLock );
 
-        OSL_TRACE( "SerfSession::LOCK: obtaining lock for %s failed!",
-                   OUStringToOString( makeAbsoluteURL( inPath ),
-                                           RTL_TEXTENCODING_UTF8 ).getStr() );
+        SAL_INFO("ucb.ucp.webdav",  "SerfSession::LOCK: obtaining lock for "
+                    << makeAbsoluteURL( inPath ) << " failed!");
     }
 
     HandleError( theRetVal, inPath, rEnv );
@@ -1183,12 +1180,12 @@ bool SerfSession::LOCK( SerfLock * /*pLock*/,
         rlastChanceToSendRefreshRequest
             = lastChanceToSendRefreshRequest( startCall, pLock->timeout );
 
-        OSL_TRACE( "Lock successfully refreshed." );
+        SAL_INFO("ucb.ucp.webdav",  "Lock successfully refreshed." );
         return true;
     }
     else
     {
-        OSL_TRACE( "Lock not refreshed!" );
+        SAL_INFO("ucb.ucp.webdav",  "Lock not refreshed!" );
         return false;
     }
     */
@@ -1221,9 +1218,8 @@ void SerfSession::UNLOCK( const OUString & /*inPath*/,
     }
     else
     {
-        OSL_TRACE( "SerfSession::UNLOCK: unlocking of %s failed.",
-                   OUStringToOString( makeAbsoluteURL( inPath ),
-                                           RTL_TEXTENCODING_UTF8 ).getStr() );
+        SAL_INFO("ucb.ucp.webdav",  "SerfSession::UNLOCK: unlocking of "
+                    << makeAbsoluteURL( inPath ) << " failed.");
     }
 
     HandleError( theRetVal, inPath, rEnv );
@@ -1241,12 +1237,12 @@ bool SerfSession::UNLOCK( SerfLock * /*pLock*/ )
     /*
     if ( ne_unlock( m_pHttpSession, pLock ) == NE_OK )
     {
-        OSL_TRACE( "UNLOCK succeeded." );
+        SAL_INFO("ucb.ucp.webdav",  "UNLOCK succeeded." );
         return true;
     }
     else
     {
-        OSL_TRACE( "UNLOCK failed!" );
+        SAL_INFO("ucb.ucp.webdav",  "UNLOCK failed!" );
         return false;
     }
     */
@@ -1356,11 +1352,8 @@ bool SerfSession::removeExpiredLocktoken( const OUString & /*inURL*/,
 
         // No lockdiscovery prop in propfind result / locktoken not found
         // in propfind result -> not locked
-        OSL_TRACE( "SerfSession::removeExpiredLocktoken: Removing "
-                   " expired lock token for %s. token: %s",
-                   OUStringToOString( inURL,
-                                           RTL_TEXTENCODING_UTF8 ).getStr(),
-                   theLock->token );
+        SAL_INFO("ucb.ucp.webdav",  "SerfSession::removeExpiredLocktoken: Removing "
+                   " expired lock token for " << inURL << ". token: " << theLock->token );
 
         m_aSerfLockStore.removeLock( theLock );
         ne_lock_destroy( theLock );
@@ -1484,7 +1477,7 @@ void SerfSession::HandleError( boost::shared_ptr<SerfRequestProcessor> rReqProc
         }
         default:
         {
-            OSL_TRACE( "SerfSession::HandleError : Unknown Serf error code!" );
+            SAL_INFO("ucb.ucp.webdav",  "SerfSession::HandleError : Unknown Serf error code!" );
             throw DAVException( DAVException::DAV_HTTP_ERROR,
                                 OUString::createFromAscii(
                                     ne_get_error( m_pHttpSession ) ) );
diff --git a/ucb/source/ucp/webdav/webdavcontent.cxx b/ucb/source/ucp/webdav/webdavcontent.cxx
index e49ba2d..21d3855 100644
--- a/ucb/source/ucp/webdav/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav/webdavcontent.cxx
@@ -496,10 +496,8 @@ uno::Any SAL_CALL Content::execute(
            ucb::CommandAbortedException,
            uno::RuntimeException )
 {
-    OSL_TRACE( ">>>>> Content::execute: start: command: %s, env: %s",
-               OUStringToOString( aCommand.Name,
-                                       RTL_TEXTENCODING_UTF8 ).getStr(),
-               Environment.is() ? "present" : "missing" );
+    SAL_INFO("ucb.ucp.webdav",  ">>>>> Content::execute: start: command: " << aCommand.Name
+            << ", env: " << (Environment.is() ? "present" : "missing") );
 
     uno::Any aRet;
 
@@ -807,10 +805,7 @@ uno::Any SAL_CALL Content::execute(
         // Unreachable
     }
 
-    OSL_TRACE( "<<<<< Content::execute: end: command: %s",
-               OUStringToOString( aCommand.Name,
-                                       RTL_TEXTENCODING_UTF8 ).getStr() );
-
+    SAL_INFO("ucb.ucp.webdav",  "<<<<< Content::execute: end: command: " << aCommand.Name);
     return aRet;
 }
 
diff --git a/ucb/source/ucp/webdav/webdavprovider.cxx b/ucb/source/ucp/webdav/webdavprovider.cxx
index f3bca2e..ecc3c9a 100644
--- a/ucb/source/ucp/webdav/webdavprovider.cxx
+++ b/ucb/source/ucp/webdav/webdavprovider.cxx
@@ -108,8 +108,7 @@ ContentProvider::ContentProvider(
     }
     catch ( const uno::Exception &e )
     {
-        OSL_TRACE( "ContentProvider -caught exception! %s",
-                   OUStringToOString( e.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
+        SAL_INFO("ucb.ucp.webdav",  "ContentProvider -caught exception! : " << e.Message);
         (void) e;
     }
 }
commit aae5ef0e5c48bf4ff5bd72d25811a93f46f334bb
Author: Matúš Kukan <matus.kukan at collabora.com>
Date:   Mon Mar 3 17:17:52 2014 +0100

    webdav: OSL_ASSERT -> assert
    
    Change-Id: Ic6c7307aa9f8422816b9a335cbf3541c948026ce

diff --git a/ucb/source/ucp/webdav/DAVSessionFactory.cxx b/ucb/source/ucp/webdav/DAVSessionFactory.cxx
index 409d2e9..c2f1dd2 100644
--- a/ucb/source/ucp/webdav/DAVSessionFactory.cxx
+++ b/ucb/source/ucp/webdav/DAVSessionFactory.cxx
@@ -88,7 +88,7 @@ rtl::Reference< DAVSession > DAVSessionFactory::createDAVSession(
 
 void DAVSessionFactory::releaseElement( DAVSession * pElement ) SAL_THROW(())
 {
-    OSL_ASSERT( pElement );
+    assert( pElement );
     osl::MutexGuard aGuard( m_aMutex );
     if ( pElement->m_aContainerIt != m_aMap.end() )
         m_aMap.erase( pElement->m_aContainerIt );
diff --git a/ucb/source/ucp/webdav/SerfPropFindReqProcImpl.cxx b/ucb/source/ucp/webdav/SerfPropFindReqProcImpl.cxx
index bcbc54b..2661e10 100644
--- a/ucb/source/ucp/webdav/SerfPropFindReqProcImpl.cxx
+++ b/ucb/source/ucp/webdav/SerfPropFindReqProcImpl.cxx
@@ -163,7 +163,7 @@ serf_bucket_t * SerfPropFindReqProcImpl::createSerfRequestBucket( serf_request_t
     }
     else
     {
-        OSL_ASSERT("Headers Bucket missing");
+        assert("Headers Bucket missing");
     }
 
     return req_bkt;
diff --git a/ucb/source/ucp/webdav/SerfPropPatchReqProcImpl.cxx b/ucb/source/ucp/webdav/SerfPropPatchReqProcImpl.cxx
index 86a97ae..950eb16 100644
--- a/ucb/source/ucp/webdav/SerfPropPatchReqProcImpl.cxx
+++ b/ucb/source/ucp/webdav/SerfPropPatchReqProcImpl.cxx
@@ -169,7 +169,7 @@ serf_bucket_t * SerfPropPatchReqProcImpl::createSerfRequestBucket( serf_request_
     }
     else
     {
-        OSL_ASSERT("Headers Bucket missing");
+        assert("Headers Bucket missing");
     }
 
     return req_bkt;
diff --git a/ucb/source/ucp/webdav/SerfSession.cxx b/ucb/source/ucp/webdav/SerfSession.cxx
index fd5850a..a124d10 100644
--- a/ucb/source/ucp/webdav/SerfSession.cxx
+++ b/ucb/source/ucp/webdav/SerfSession.cxx
@@ -372,8 +372,8 @@ apr_status_t SerfSession::verifySerfCertificateChain (
     // Check arguments.
     if (pCertificateChainBase64Encoded == NULL || nCertificateChainLength<=0)
     {
-        OSL_ASSERT(pCertificateChainBase64Encoded != NULL);
-        OSL_ASSERT(nCertificateChainLength>0);
+        assert(pCertificateChainBase64Encoded != NULL);
+        assert(nCertificateChainLength>0);
         return SERF_SSL_CERT_UNKNOWN_FAILURE;
     }
 
commit ded7321fb805625e473852d70798b160e4a959d2
Author: Matúš Kukan <matus.kukan at collabora.com>
Date:   Mon Mar 3 17:16:16 2014 +0100

    webdav: OSL_ENSURE -> SAL_WARN_IF
    
    Change-Id: I2940263bc8bdc739d5c591e19a6e4426afee3bb1

diff --git a/ucb/source/ucp/webdav/ContentProperties.cxx b/ucb/source/ucp/webdav/ContentProperties.cxx
index 5766fcb..4e9b2ee 100644
--- a/ucb/source/ucp/webdav/ContentProperties.cxx
+++ b/ucb/source/ucp/webdav/ContentProperties.cxx
@@ -79,7 +79,7 @@ ContentProperties::ContentProperties( const DAVResource& rResource )
 : m_xProps( new PropertyValueMap ),
   m_bTrailingSlash( false )
 {
-    OSL_ENSURE( rResource.uri.getLength(),
+    SAL_WARN_IF( !rResource.uri.getLength(), "ucb.ucp.webdav",
                 "ContentProperties ctor - Empty resource URI!" );
 
     // Title
diff --git a/ucb/source/ucp/webdav/DAVResourceAccess.cxx b/ucb/source/ucp/webdav/DAVResourceAccess.cxx
index 4721911..530bc01 100644
--- a/ucb/source/ucp/webdav/DAVResourceAccess.cxx
+++ b/ucb/source/ucp/webdav/DAVResourceAccess.cxx
@@ -1088,7 +1088,7 @@ void DAVResourceAccess::initialize()
 
 const OUString & DAVResourceAccess::getRequestURI() const
 {
-    OSL_ENSURE( m_xSession.is(),
+    SAL_WARN_IF( !m_xSession.is(), "ucb.ucp.webdav",
                 "DAVResourceAccess::getRequestURI - Not initialized!" );
 
     // In case a proxy is used we have to use the absolute URI for a request.
diff --git a/ucb/source/ucp/webdav/SerfLockStore.cxx b/ucb/source/ucp/webdav/SerfLockStore.cxx
index 7cf3cdf..9d56d97 100644
--- a/ucb/source/ucp/webdav/SerfLockStore.cxx
+++ b/ucb/source/ucp/webdav/SerfLockStore.cxx
@@ -79,7 +79,7 @@ SerfLockStore::SerfLockStore()
     : m_pSerfLockStore( ne_lockstore_create() ),
       m_pTickerThread( 0 )
 {
-    OSL_ENSURE( m_pSerfLockStore, "Unable to create neon lock store!" );
+    SAL_WARN_IF( !m_pSerfLockStore, "ucb.ucp.webdav", "Unable to create neon lock store!" );
 }
 
 
@@ -88,7 +88,7 @@ SerfLockStore::~SerfLockStore()
     stopTicker();
 
     // release active locks, if any.
-    OSL_ENSURE( m_aLockInfoMap.size() == 0,
+    SAL_WARN_IF( !m_aLockInfoMap.empty(), "ucb.ucp.webdav",
                 "SerfLockStore::~SerfLockStore - Releasing active locks!" );
 
     LockInfoMap::const_iterator it( m_aLockInfoMap.begin() );
@@ -173,7 +173,7 @@ void SerfLockStore::updateLock( SerfLock * pLock,
     osl::MutexGuard aGuard( m_aMutex );
 
     LockInfoMap::iterator it( m_aLockInfoMap.find( pLock ) );
-    OSL_ENSURE( it != m_aLockInfoMap.end(),
+    SAL_WARN_IF( it == m_aLockInfoMap.end(), "ucb.ucp.webdav",
                 "SerfLockStore::updateLock: lock not found!" );
 
     if ( it != m_aLockInfoMap.end() )
diff --git a/ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx b/ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx
index b5938f7..813e9e2 100644
--- a/ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx
+++ b/ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx
@@ -112,7 +112,7 @@ extern "C" int UCBDeadPropertyValue_chardata_callback(
     switch ( state )
     {
         case STATE_TYPE:
-            OSL_ENSURE( !pCtx->pType,
+            SAL_WARN_IF( pCtx->pType, "ucb.ucp.webdav",
                         "UCBDeadPropertyValue_endelement_callback - "
                         "Type already set!" );
             pCtx->pType
@@ -120,7 +120,7 @@ extern "C" int UCBDeadPropertyValue_chardata_callback(
             break;
 
         case STATE_VALUE:
-            OSL_ENSURE( !pCtx->pValue,
+            SAL_WARN_IF( pCtx->pValue, "ucb.ucp.webdav",
                         "UCBDeadPropertyValue_endelement_callback - "
                         "Value already set!" );
             pCtx->pValue
@@ -217,7 +217,7 @@ static OUString decodeValue( const OUString & rValue )
 
             if ( nPos == nEnd )
             {
-                OSL_ENSURE( sal_False,
+                SAL_WARN( "ucb.ucp.webdav",
                     "UCBDeadPropertyValue::decodeValue - syntax error!" );
                 return OUString();
             }
@@ -230,7 +230,7 @@ static OUString decodeValue( const OUString & rValue )
 
                 if ( nPos > nEnd - 4 )
                 {
-                    OSL_ENSURE( sal_False,
+                    SAL_WARN( "ucb.ucp.webdav",
                         "UCBDeadPropertyValue::decodeValue - syntax error!" );
                     return OUString();
                 }
@@ -246,7 +246,7 @@ static OUString decodeValue( const OUString & rValue )
                 }
                 else
                 {
-                    OSL_ENSURE( sal_False,
+                    SAL_WARN( "ucb.ucp.webdav",
                         "UCBDeadPropertyValue::decodeValue - syntax error!" );
                     return OUString();
                 }
@@ -257,7 +257,7 @@ static OUString decodeValue( const OUString & rValue )
 
                 if ( nPos > nEnd - 3 )
                 {
-                    OSL_ENSURE( sal_False,
+                    SAL_WARN( "ucb.ucp.webdav",
                         "UCBDeadPropertyValue::decodeValue - syntax error!" );
                     return OUString();
                 }
@@ -271,7 +271,7 @@ static OUString decodeValue( const OUString & rValue )
                 }
                 else
                 {
-                    OSL_ENSURE( sal_False,
+                    SAL_WARN( "ucb.ucp.webdav",
                         "UCBDeadPropertyValue::decodeValue - syntax error!" );
                     return OUString();
                 }
@@ -282,7 +282,7 @@ static OUString decodeValue( const OUString & rValue )
 
                 if ( nPos > nEnd - 3 )
                 {
-                    OSL_ENSURE( sal_False,
+                    SAL_WARN( "ucb.ucp.webdav",
                         "UCBDeadPropertyValue::decodeValue - syntax error!" );
                     return OUString();
                 }
@@ -296,14 +296,14 @@ static OUString decodeValue( const OUString & rValue )
                 }
                 else
                 {
-                    OSL_ENSURE( sal_False,
+                    SAL_WARN( "ucb.ucp.webdav",
                         "UCBDeadPropertyValue::decodeValue - syntax error!" );
                     return OUString();
                 }
             }
             else
             {
-                OSL_ENSURE( sal_False,
+                SAL_WARN( "ucb.ucp.webdav",
                     "UCBDeadPropertyValue::decodeValue - syntax error!" );
                 return OUString();
             }
@@ -418,7 +418,7 @@ bool UCBDeadPropertyValue::createFromXML( const OString & /*rInData*/,
                 }
                 else
                 {
-                    OSL_ENSURE( sal_False,
+                    SAL_WARN( "ucb.ucp.webdav",
                                 "UCBDeadPropertyValue::createFromXML - "
                                 "Unsupported property type!" );
                     success = false;
@@ -517,7 +517,7 @@ bool UCBDeadPropertyValue::toXML( const uno::Any & rInData,
     }
     else
     {
-        OSL_ENSURE( sal_False,
+        SAL_WARN( "ucb.ucp.webdav",
                     "UCBDeadPropertyValue::toXML - "
                     "Unsupported property type!" );
         return false;
diff --git a/ucb/source/ucp/webdav/webdavcontent.cxx b/ucb/source/ucp/webdav/webdavcontent.cxx
index ad60a93..e49ba2d 100644
--- a/ucb/source/ucp/webdav/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav/webdavcontent.cxx
@@ -956,7 +956,7 @@ throw( beans::PropertyExistException,
                         break;
 
                     default:
-                        OSL_ENSURE( sal_False,
+                        SAL_WARN( "ucb.ucp.webdav",
                                     "Content::addProperty - "
                                     "Unsupported resource type!" );
                         break;
@@ -964,14 +964,14 @@ throw( beans::PropertyExistException,
                 }
                 catch ( uno::Exception const & )
                 {
-                    OSL_ENSURE( sal_False,
+                    SAL_WARN( "ucb.ucp.webdav",
                                 "Content::addProperty - "
                                 "Unable to determine resource type!" );
                 }
             }
             else
             {
-                OSL_ENSURE( sal_False,
+                SAL_WARN( "ucb.ucp.webdav",
                             "Content::addProperty - "
                             "Unable to determine resource type!" );
             }
@@ -1001,7 +1001,7 @@ throw( beans::UnknownPropertyException,
     }
     catch ( beans::UnknownPropertyException const & )
     {
-        //OSL_ENSURE( sal_False, "removeProperty - Unknown property!" );
+        //SAL_WARN( "ucb.ucp.webdav", "removeProperty - Unknown property!" );
         throw;
     }
 #endif
@@ -1064,7 +1064,7 @@ throw( beans::UnknownPropertyException,
                         break;
 
                     default:
-                        OSL_ENSURE( sal_False,
+                        SAL_WARN( "ucb.ucp.webdav",
                                     "Content::removeProperty - "
                                     "Unsupported resource type!" );
                         break;
@@ -1072,14 +1072,14 @@ throw( beans::UnknownPropertyException,
                 }
                 catch ( uno::Exception const & )
                 {
-                    OSL_ENSURE( sal_False,
+                    SAL_WARN( "ucb.ucp.webdav",
                                 "Content::removeProperty - "
                                 "Unable to determine resource type!" );
                 }
             }
             else
             {
-                OSL_ENSURE( sal_False,
+                SAL_WARN( "ucb.ucp.webdav",
                             "Content::removeProperty - "
                             "Unable to determine resource type!" );
 //                throw beans::UnknownPropertyException();
@@ -1175,7 +1175,7 @@ Content::createNewContent( const ucb::ContentInfo& Info )
 
     OUString aURL = m_xIdentifier->getContentIdentifier();
 
-    OSL_ENSURE( !aURL.isEmpty(),
+    SAL_WARN_IF( aURL.isEmpty(), "ucb.ucp.webdav",
                 "WebdavContent::createNewContent - empty identifier!" );
 
     if ( ( aURL.lastIndexOf( '/' ) + 1 ) != aURL.getLength() )
@@ -1970,7 +1970,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
         }
         catch ( DAVException const & e )
         {
-//            OSL_ENSURE( sal_False,
+//            SAL_WARN( "ucb.ucp.webdav",
 //                        "Content::setPropertyValues - PROPPATCH failed!" );
 
 #if 1
@@ -2414,7 +2414,7 @@ void Content::insert(
 
     if ( aEscapedTitle.isEmpty() )
     {
-        OSL_ENSURE( sal_False, "Content::insert - Title missing!" );
+        SAL_WARN( "ucb.ucp.webdav", "Content::insert - Title missing!" );
 
         uno::Sequence< OUString > aProps( 1 );
         aProps[ 0 ] = "Title";
@@ -2492,7 +2492,7 @@ void Content::insert(
 //                            break;
 
                     default:
-                        OSL_ENSURE( sal_False,
+                        SAL_WARN( "ucb.ucp.webdav",
                                     "Content::insert - "
                                     "Unknown interaction selection!" );
                         throw ucb::CommandFailedException(
@@ -3005,7 +3005,7 @@ sal_Bool Content::exchangeIdentity(
     // Already persistent?
     if ( m_bTransient )
     {
-        OSL_ENSURE( sal_False, "Content::exchangeIdentity - Not persistent!" );
+        SAL_WARN( "ucb.ucp.webdav", "Content::exchangeIdentity - Not persistent!" );
         return sal_False;
     }
 
@@ -3053,7 +3053,7 @@ sal_Bool Content::exchangeIdentity(
         }
     }
 
-    OSL_ENSURE( sal_False,
+    SAL_WARN( "ucb.ucp.webdav",
                 "Content::exchangeIdentity - "
                 "Panic! Cannot exchange identity!" );
     return sal_False;
diff --git a/ucb/source/ucp/webdav/webdavdatasupplier.cxx b/ucb/source/ucp/webdav/webdavdatasupplier.cxx
index c06176a..d501931 100644
--- a/ucb/source/ucp/webdav/webdavdatasupplier.cxx
+++ b/ucb/source/ucp/webdav/webdavdatasupplier.cxx
@@ -378,7 +378,7 @@ bool DataSupplier::getData()
         }
         catch ( DAVException & )
         {
-//          OSL_ENSURE( false, "PROPFIND : DAVException" );
+            SAL_WARN( "ucb.ucp.webdav", "PROPFIND : DAVException" );
             m_pImpl->m_bThrowException = true;
         }
 
diff --git a/ucb/source/ucp/webdav/webdavresponseparser.cxx b/ucb/source/ucp/webdav/webdavresponseparser.cxx
index cb9535b..b1a79c4 100644
--- a/ucb/source/ucp/webdav/webdavresponseparser.cxx
+++ b/ucb/source/ucp/webdav/webdavresponseparser.cxx
@@ -338,7 +338,7 @@ namespace
             }
             else
             {
-                OSL_ENSURE(false, "Parser context pop without context (!)");
+                SAL_WARN( "ucb.ucp.webdav", "Parser context pop without context (!)");
             }
         }
 
@@ -382,7 +382,7 @@ namespace
 
     WebDAVResponseParser::~WebDAVResponseParser()
     {
-        OSL_ENSURE(!mpContext, "Parser destructed with existing content (!)");
+        SAL_WARN_IF(mpContext, "ucb.ucp.webdav", "Parser destructed with existing content (!)");
         while(mpContext)
         {
             pop_context();
@@ -391,12 +391,12 @@ namespace
 
     void SAL_CALL WebDAVResponseParser::startDocument(  ) throw (xml::sax::SAXException, uno::RuntimeException)
     {
-        OSL_ENSURE(!mpContext, "Parser start with existing content (!)");
+        SAL_WARN_IF(mpContext, "ucb.ucp.webdav", "Parser start with existing content (!)");
     }
 
     void SAL_CALL WebDAVResponseParser::endDocument(  ) throw (xml::sax::SAXException, uno::RuntimeException)
     {
-        OSL_ENSURE(!mpContext, "Parser end with existing content (!)");
+        SAL_WARN_IF(mpContext, "ucb.ucp.webdav", "Parser end with existing content (!)");
     }
 
     void SAL_CALL WebDAVResponseParser::startElement( const OUString& aName, const uno::Reference< xml::sax::XAttributeList >& xAttribs ) throw (xml::sax::SAXException, uno::RuntimeException)
@@ -495,7 +495,7 @@ namespace
     void SAL_CALL WebDAVResponseParser::endElement( const OUString& aName ) throw (xml::sax::SAXException, uno::RuntimeException)
     {
         const sal_Int32 nLen(aName.getLength());
-        OSL_ENSURE(mpContext, "Parser EndElement without content (!)");
+        SAL_WARN_IF(!mpContext, "ucb.ucp.webdav", "Parser EndElement without content (!)");
 
         if(mpContext && nLen)
         {
@@ -747,7 +747,7 @@ namespace
     void SAL_CALL WebDAVResponseParser::characters( const OUString& aChars ) throw (xml::sax::SAXException, uno::RuntimeException)
     {
         // collect whitespace over evtl. several calls in mpContext
-        OSL_ENSURE(mpContext, "Parser characters without content (!)");
+        SAL_WARN_IF(!mpContext, "ucb.ucp.webdav", "Parser characters without content (!)");
         const sal_Int32 nLen(aChars.getLength());
 
         if(mpContext && nLen)
@@ -832,7 +832,7 @@ namespace
             }
             catch(uno::Exception&)
             {
-                OSL_ENSURE(false, "WebDAV Parse error (!)");
+                SAL_WARN("ucb.ucp.webdav", "WebDAV Parse error (!)");
             }
         }
     }


More information about the Libreoffice-commits mailing list