basic/source/runtime/stdobj1.cxx | 4 ++-- connectivity/source/commontools/TSortIndex.cxx | 4 +--- connectivity/source/commontools/predicateinput.cxx | 4 ++-- include/sfx2/shell.hxx | 2 +- package/source/zippackage/zipfileaccess.cxx | 18 ++++++++++++++---- svx/source/xml/xmleohlp.cxx | 3 +-- 6 files changed, 21 insertions(+), 14 deletions(-)
New commits: commit 624892d06d8a8b6b5aff115f6d0c1ae2439b6517 Author: Caolán McNamara <caol...@redhat.com> Date: Sun Jul 6 20:56:27 2014 +0100 fix assert for empty string case on loading ooo119654-1.odt Change-Id: I97cbb6ff0f320d9315310cbc06c52c3c4f958a64 diff --git a/svx/source/xml/xmleohlp.cxx b/svx/source/xml/xmleohlp.cxx index ac2ab71..dee010e 100644 --- a/svx/source/xml/xmleohlp.cxx +++ b/svx/source/xml/xmleohlp.cxx @@ -177,12 +177,11 @@ void SAL_CALL SvXMLEmbeddedObjectHelper::disposing() Flush(); } - void SvXMLEmbeddedObjectHelper::splitObjectURL(const OUString& _aURLNoPar, OUString& rContainerStorageName, OUString& rObjectStorageName) { - DBG_ASSERT( '#' != _aURLNoPar[0], "invalid object URL" ); + DBG_ASSERT(_aURLNoPar.isEmpty() || '#' != _aURLNoPar[0], "invalid object URL" ); OUString aURLNoPar = _aURLNoPar; sal_Int32 _nPos = aURLNoPar.lastIndexOf( '/' ); commit eb9b890bc95005c4d97622630786359d1b821cb5 Author: Caolán McNamara <caol...@redhat.com> Date: Sun Jul 6 20:30:54 2014 +0100 DBG_ASSERT->assert when followed by dereference Change-Id: I9390228721df1b713d8cf2e719854b74d6b639c8 diff --git a/basic/source/runtime/stdobj1.cxx b/basic/source/runtime/stdobj1.cxx index 24b0474..061aa64 100644 --- a/basic/source/runtime/stdobj1.cxx +++ b/basic/source/runtime/stdobj1.cxx @@ -250,7 +250,7 @@ SbStdFont::SbStdFont() : // handle name property yourself p = Find( OUString("Name"), SbxCLASS_PROPERTY ); - DBG_ASSERT( p, "No Name Property" ); + assert(p && "No Name Property"); p->SetUserData( ATTR_IMP_NAME ); } @@ -399,7 +399,7 @@ SbStdClipboard::SbStdClipboard() : SbxObject( OUString("Clipboard") ) { SbxVariable* p = Find( OUString("Name"), SbxCLASS_PROPERTY ); - DBG_ASSERT( p, "No Name Property" ); + assert(p && "No Name Property"); p->SetUserData( ATTR_IMP_NAME ); // register methods diff --git a/connectivity/source/commontools/TSortIndex.cxx b/connectivity/source/commontools/TSortIndex.cxx index 4cae624..0d0e97a 100644 --- a/connectivity/source/commontools/TSortIndex.cxx +++ b/connectivity/source/commontools/TSortIndex.cxx @@ -105,7 +105,7 @@ OSortIndex::~OSortIndex() void OSortIndex::AddKeyValue(OKeyValue * pKeyValue) { - OSL_ENSURE(pKeyValue,"Can not be null here!"); + assert(pKeyValue && "Can not be null here!"); if(m_bFrozen) { m_aKeyValues.push_back(TIntValuePairVector::value_type(pKeyValue->getValue(),(OKeyValue *)NULL)); @@ -115,8 +115,6 @@ void OSortIndex::AddKeyValue(OKeyValue * pKeyValue) m_aKeyValues.push_back(TIntValuePairVector::value_type(pKeyValue->getValue(),pKeyValue)); } - - void OSortIndex::Freeze() { OSL_ENSURE(! m_bFrozen,"OSortIndex::Freeze: already frozen!"); diff --git a/connectivity/source/commontools/predicateinput.cxx b/connectivity/source/commontools/predicateinput.cxx index 41cf0b3..9f9cbee 100644 --- a/connectivity/source/commontools/predicateinput.cxx +++ b/connectivity/source/commontools/predicateinput.cxx @@ -408,10 +408,10 @@ namespace dbtools } else { - if ( pParseNode->count() >= 3 ) + if (pParseNode->count() >= 3) { OSQLParseNode* pValueNode = pParseNode->getChild(2); - OSL_ENSURE( pValueNode, "OPredicateInputController::getPredicateValue: invalid node child!" ); + assert(pValueNode && "OPredicateInputController::getPredicateValue: invalid node child!"); if ( !_bForStatementUse ) { if ( SQL_NODE_STRING == pValueNode->getNodeType() ) diff --git a/include/sfx2/shell.hxx b/include/sfx2/shell.hxx index 7047e4d..7d877d8 100644 --- a/include/sfx2/shell.hxx +++ b/include/sfx2/shell.hxx @@ -273,7 +273,7 @@ SfxItemPool& SfxShell::GetPool() const */ { - DBG_ASSERT( pPool, "no pool" ); + assert(pPool && "no pool"); return *pPool; } commit 82a30a456e08a27267c35c3df0c6ecd8b9079611 Author: Caolán McNamara <caol...@redhat.com> Date: Sun Jul 6 17:11:24 2014 +0100 fix unhandled exception terminate on ooo48061-1.sxw Change-Id: Ibacb94e719f42faa87ece48051ed8f72c3c78d02 diff --git a/package/source/zippackage/zipfileaccess.cxx b/package/source/zippackage/zipfileaccess.cxx index acb0063..a660d3e 100644 --- a/package/source/zippackage/zipfileaccess.cxx +++ b/package/source/zippackage/zipfileaccess.cxx @@ -244,10 +244,20 @@ uno::Any SAL_CALL OZipFileAccess::getByName( const OUString& aName ) if ( aIter == m_pZipFile->GetEntryHash().end() ) throw container::NoSuchElementException(THROW_WHERE ); - uno::Reference< io::XInputStream > xEntryStream( m_pZipFile->getDataStream( (*aIter).second, - ::rtl::Reference< EncryptionData >(), - false, - m_aMutexHolder ) ); + uno::Reference< io::XInputStream > xEntryStream; + try + { + xEntryStream = m_pZipFile->getDataStream((*aIter).second, + ::rtl::Reference< EncryptionData >(), + false, + m_aMutexHolder); + } + catch (const io::IOException& e) + { + throw lang::WrappedTargetException( "This package is unusable!", + static_cast < OWeakObject * > ( this ), + makeAny(e)); + } if ( !xEntryStream.is() ) throw uno::RuntimeException(THROW_WHERE );
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits