diff options
author | Matúš Kukan <matus.kukan@collabora.com> | 2014-03-03 17:16:16 +0100 |
---|---|---|
committer | Matúš Kukan <matus.kukan@collabora.com> | 2014-03-18 20:13:57 +0100 |
commit | ded7321fb805625e473852d70798b160e4a959d2 (patch) | |
tree | ca03240362ced6a8dd205cad8282aee94159c577 /ucb | |
parent | When the scale is set explicitly, we should use it as the pattern scale. (diff) | |
download | core-ded7321fb805625e473852d70798b160e4a959d2.tar.gz core-ded7321fb805625e473852d70798b160e4a959d2.zip |
webdav: OSL_ENSURE -> SAL_WARN_IF
Change-Id: I2940263bc8bdc739d5c591e19a6e4426afee3bb1
Diffstat (limited to 'ucb')
-rw-r--r-- | ucb/source/ucp/webdav/ContentProperties.cxx | 2 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/DAVResourceAccess.cxx | 2 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/SerfLockStore.cxx | 6 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx | 24 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/webdavcontent.cxx | 26 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/webdavdatasupplier.cxx | 2 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/webdavresponseparser.cxx | 14 |
7 files changed, 38 insertions, 38 deletions
diff --git a/ucb/source/ucp/webdav/ContentProperties.cxx b/ucb/source/ucp/webdav/ContentProperties.cxx index 5766fcb17df5..4e9b2eeb5cd1 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 47219113a2f1..530bc01db6f5 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 7cf3cdf6157d..9d56d973e5d1 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 b5938f7c5299..813e9e2c2520 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 ad60a93900b1..e49ba2daa850 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 c06176a40c03..d5019317b90b 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 cb9535b544ca..b1a79c4a9df7 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 (!)"); } } } |