Replaced diagnore ENSURE_OR_BREAK with regular code.
This commit is contained in:
committed by
Stephan Bergmann
parent
e384f24155
commit
f9e6d195db
@@ -305,13 +305,25 @@ namespace
|
||||
break;
|
||||
|
||||
SbModule* pModule = pMethod->GetModule();
|
||||
ENSURE_OR_BREAK( pModule, "BasicIDE::ChooseMacro: No Module found!" );
|
||||
if ( !pModule )
|
||||
{
|
||||
SAL_WARN( "basctl.basicide", "BasicIDE::ChooseMacro: No Module found!" );
|
||||
break;
|
||||
}
|
||||
|
||||
StarBASIC* pBasic = dynamic_cast<StarBASIC*>(pModule->GetParent());
|
||||
ENSURE_OR_BREAK( pBasic, "BasicIDE::ChooseMacro: No Basic found!" );
|
||||
if ( !pBasic )
|
||||
{
|
||||
SAL_WARN( "basctl.basicide", "BasicIDE::ChooseMacro: No Basic found!" );
|
||||
break;
|
||||
}
|
||||
|
||||
BasicManager* pBasMgr = BasicIDE::FindBasicManager( pBasic );
|
||||
ENSURE_OR_BREAK( pBasMgr, "BasicIDE::ChooseMacro: No BasicManager found!" );
|
||||
if ( !pBasMgr )
|
||||
{
|
||||
SAL_WARN( "basctl.basicide", "BasicIDE::ChooseMacro: No BasicManager found!" );
|
||||
break;
|
||||
}
|
||||
|
||||
// name
|
||||
String aName;
|
||||
|
@@ -2209,7 +2209,12 @@ void SvTreeListBox::ModelNotification( sal_uInt16 nActionId, SvListEntry* pEntry
|
||||
case LISTACTION_INSERTED:
|
||||
{
|
||||
SvLBoxEntry* pEntry( dynamic_cast< SvLBoxEntry* >( pEntry1 ) );
|
||||
ENSURE_OR_BREAK( pEntry, "SvTreeListBox::ModelNotification: invalid entry!" );
|
||||
if ( !pEntry )
|
||||
{
|
||||
SAL_WARN( "svtools.contnr", "SvTreeListBox::ModelNotification: invalid entry!" );
|
||||
break;
|
||||
}
|
||||
|
||||
SvLBoxContextBmp* pBmpItem = static_cast< SvLBoxContextBmp* >( pEntry->GetFirstItem( SV_ITEM_ID_LBOXCONTEXTBMP ) );
|
||||
if ( !pBmpItem )
|
||||
break;
|
||||
|
@@ -152,7 +152,12 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An
|
||||
{
|
||||
sal_Int32 rowHeaderWidth( -1 );
|
||||
aValue >>= rowHeaderWidth;
|
||||
ENSURE_OR_BREAK( rowHeaderWidth > 0, "SVTXGridControl::setProperty: illegal row header width!" );
|
||||
if ( rowHeaderWidth <= 0 )
|
||||
{
|
||||
SAL_WARN( "svtools.uno", "SVTXGridControl::setProperty: illegal row header width!" );
|
||||
break;
|
||||
}
|
||||
|
||||
m_pTableModel->setRowHeaderWidth( rowHeaderWidth );
|
||||
// TODO: the model should broadcast this change itself, and the table should invalidate itself as needed
|
||||
pTable->Invalidate();
|
||||
@@ -170,7 +175,12 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An
|
||||
{
|
||||
aValue >>= columnHeaderHeight;
|
||||
}
|
||||
ENSURE_OR_BREAK( columnHeaderHeight > 0, "SVTXGridControl::setProperty: illegal column header height!" );
|
||||
if ( columnHeaderHeight <= 0 )
|
||||
{
|
||||
SAL_WARN( "svtools.uno", "SVTXGridControl::setProperty: illegal column header width!" );
|
||||
break;
|
||||
}
|
||||
|
||||
m_pTableModel->setColumnHeaderHeight( columnHeaderHeight );
|
||||
// TODO: the model should broadcast this change itself, and the table should invalidate itself as needed
|
||||
pTable->Invalidate();
|
||||
@@ -181,7 +191,12 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An
|
||||
{
|
||||
GridTableRenderer* pGridRenderer = dynamic_cast< GridTableRenderer* >(
|
||||
m_pTableModel->getRenderer().get() );
|
||||
ENSURE_OR_BREAK( pGridRenderer != NULL, "SVTXGridControl::setProperty(UseGridLines): invalid renderer!" );
|
||||
if ( !pGridRenderer )
|
||||
{
|
||||
SAL_WARN( "svtools.uno", "SVTXGridControl::setProperty(UseGridLines): invalid renderer!" );
|
||||
break;
|
||||
}
|
||||
|
||||
sal_Bool bUseGridLines = sal_False;
|
||||
OSL_VERIFY( aValue >>= bUseGridLines );
|
||||
pGridRenderer->useGridLines( bUseGridLines );
|
||||
@@ -201,7 +216,12 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An
|
||||
aValue >>= rowHeight;
|
||||
}
|
||||
m_pTableModel->setRowHeight( rowHeight );
|
||||
ENSURE_OR_BREAK( rowHeight > 0, "SVTXGridControl::setProperty: illegal row height!" );
|
||||
if ( rowHeight <= 0 )
|
||||
{
|
||||
SAL_WARN( "svtools.uno", "SVTXGridControl::setProperty: illegal row height!" );
|
||||
break;
|
||||
}
|
||||
|
||||
// TODO: the model should broadcast this change itself, and the table should invalidate itself as needed
|
||||
pTable->Invalidate();
|
||||
}
|
||||
@@ -444,7 +464,12 @@ Any SVTXGridControl::getProperty( const ::rtl::OUString& PropertyName ) throw(Ru
|
||||
{
|
||||
GridTableRenderer* pGridRenderer = dynamic_cast< GridTableRenderer* >(
|
||||
m_pTableModel->getRenderer().get() );
|
||||
ENSURE_OR_BREAK( pGridRenderer != NULL, "SVTXGridControl::getProperty(UseGridLines): invalid renderer!" );
|
||||
if ( !pGridRenderer )
|
||||
{
|
||||
SAL_WARN( "svtools.uno", "SVTXGridControl::getProperty(UseGridLines): invalid renderer!" );
|
||||
break;
|
||||
}
|
||||
|
||||
aPropertyValue <<= pGridRenderer->useGridLines();
|
||||
}
|
||||
break;
|
||||
@@ -675,7 +700,12 @@ void SVTXGridControl::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent
|
||||
case VCLEVENT_TABLEROW_SELECT:
|
||||
{
|
||||
TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() );
|
||||
ENSURE_OR_BREAK( pTable, "SVTXGridControl::ProcessWindowEvent: no control (anymore)!" );
|
||||
if ( !pTable )
|
||||
{
|
||||
SAL_WARN( "svtools.uno", "SVTXGridControl::ProcessWindowEvent: no control (anymore)!" );
|
||||
break;
|
||||
}
|
||||
|
||||
if ( m_aSelectionListeners.getLength() )
|
||||
ImplCallItemListeners();
|
||||
}
|
||||
|
@@ -204,8 +204,12 @@ void FmFormPageImpl::initFrom( FmFormPageImpl& i_foreignImpl )
|
||||
bool bForeignIsForm = pForeignObj && ( pForeignObj->GetObjInventor() == FmFormInventor );
|
||||
bool bOwnIsForm = pOwnObj && ( pOwnObj->GetObjInventor() == FmFormInventor );
|
||||
|
||||
ENSURE_OR_BREAK( bForeignIsForm == bOwnIsForm, "FmFormPageImpl::FmFormPageImpl: inconsistent ordering of objects!" );
|
||||
if ( bForeignIsForm != bOwnIsForm )
|
||||
{
|
||||
// if this fires, don't attempt to do further assignments, something's completely messed up
|
||||
SAL_WARN( "svx.form", "FmFormPageImpl::FmFormPageImpl: inconsistent ordering of objects!" );
|
||||
break;
|
||||
}
|
||||
|
||||
if ( !bForeignIsForm )
|
||||
// no form control -> next round
|
||||
|
@@ -359,16 +359,31 @@ namespace ucb { namespace ucp { namespace ext
|
||||
const ::rtl::OUString sURL = m_xIdentifier->getContentIdentifier();
|
||||
|
||||
// cut the root URL
|
||||
ENSURE_OR_BREAK( sURL.match( sRootURL, 0 ), "illegal URL structure - no root" );
|
||||
if ( !sURL.match( sRootURL, 0 ) )
|
||||
{
|
||||
SAL_INFO( "ucb.ucp", "illegal URL structure - no root" );
|
||||
break;
|
||||
}
|
||||
|
||||
::rtl::OUString sRelativeURL( sURL.copy( sRootURL.getLength() ) );
|
||||
|
||||
// cut the extension ID
|
||||
const ::rtl::OUString sSeparatedExtensionId( encodeIdentifier( m_sExtensionId ) + ::rtl::OUString( sal_Unicode( '/' ) ) );
|
||||
ENSURE_OR_BREAK( sRelativeURL.match( sSeparatedExtensionId ), "illegal URL structure - no extension ID" );
|
||||
if ( !sRelativeURL.match( sSeparatedExtensionId ) )
|
||||
{
|
||||
SAL_INFO( "ucb.ucp", "illegal URL structure - no extension ID" );
|
||||
break;
|
||||
}
|
||||
|
||||
sRelativeURL = sRelativeURL.copy( sSeparatedExtensionId.getLength() );
|
||||
|
||||
// cut the final slash (if any)
|
||||
ENSURE_OR_BREAK( !sRelativeURL.isEmpty(), "illegal URL structure - ExtensionContent should have a level below the extension ID" );
|
||||
if ( sRelativeURL.isEmpty() )
|
||||
{
|
||||
SAL_INFO( "ucb.ucp", "illegal URL structure - ExtensionContent should have a level below the extension ID" );
|
||||
break;
|
||||
}
|
||||
|
||||
if ( sRelativeURL.getStr()[ sRelativeURL.getLength() - 1 ] == '/' )
|
||||
sRelativeURL = sRelativeURL.copy( 0, sRelativeURL.getLength() - 1 );
|
||||
|
||||
|
@@ -574,9 +574,18 @@ namespace xmloff
|
||||
{
|
||||
const PropertyDescriptionList& rProperties( *pos );
|
||||
const PropertyDescription* first = *rProperties.begin();
|
||||
ENSURE_OR_BREAK( first != NULL, "OElementImport::handleAttribute: invalid property description!" );
|
||||
if ( !first )
|
||||
{
|
||||
SAL_WARN( "xmloff.forms", "OElementImport::handleAttribute: invalid property description!" );
|
||||
break;
|
||||
}
|
||||
|
||||
const PPropertyHandler handler = (*first->factory)( first->propertyId );
|
||||
ENSURE_OR_BREAK( handler.get() != NULL, "OElementImport::handleAttribute: invalid property handler!" );
|
||||
if ( !handler.get() )
|
||||
{
|
||||
SAL_WARN( "xmloff.forms", "OElementImport::handleAttribute: invalid property handler!" );
|
||||
break;
|
||||
}
|
||||
|
||||
PropertyValues aValues;
|
||||
for ( PropertyDescriptionList::const_iterator propDesc = rProperties.begin();
|
||||
@@ -894,13 +903,25 @@ namespace xmloff
|
||||
if (!bRetrievedValues)
|
||||
{
|
||||
getValuePropertyNames(m_eElementType, nClassId, pCurrentValueProperty, pValueProperty);
|
||||
ENSURE_OR_BREAK( pCurrentValueProperty || pValueProperty, "OControlImport::StartElement: illegal value property names!" );
|
||||
if ( !pCurrentValueProperty && !pValueProperty )
|
||||
{
|
||||
SAL_WARN( "xmloff.forms", "OControlImport::StartElement: illegal value property names!" );
|
||||
break;
|
||||
}
|
||||
|
||||
bRetrievedValues = sal_True;
|
||||
}
|
||||
ENSURE_OR_BREAK((PROPID_VALUE != aValueProps->Handle) || pValueProperty,
|
||||
"OControlImport::StartElement: the control does not have a value property!");
|
||||
ENSURE_OR_BREAK((PROPID_CURRENT_VALUE != aValueProps->Handle) || pCurrentValueProperty,
|
||||
"OControlImport::StartElement: the control does not have a current-value property!");
|
||||
if ( PROPID_VALUE == aValueProps->Handle && !pValueProperty )
|
||||
{
|
||||
SAL_WARN( "xmloff.forms", "OControlImport::StartElement: the control does not have a value property!");
|
||||
break;
|
||||
}
|
||||
|
||||
if ( PROPID_CURRENT_VALUE == aValueProps->Handle && !pCurrentValueProperty )
|
||||
{
|
||||
SAL_WARN( "xmloff.forms", "OControlImport::StartElement: the control does not have a current-value property!");
|
||||
break;
|
||||
}
|
||||
|
||||
// transfer the name
|
||||
if (PROPID_VALUE == aValueProps->Handle)
|
||||
@@ -917,7 +938,12 @@ namespace xmloff
|
||||
if (!bRetrievedValueLimits)
|
||||
{
|
||||
getValueLimitPropertyNames(nClassId, pMinValueProperty, pMaxValueProperty);
|
||||
ENSURE_OR_BREAK( pMinValueProperty && pMaxValueProperty, "OControlImport::StartElement: illegal value limit property names!" );
|
||||
if ( !pMinValueProperty || !pMaxValueProperty )
|
||||
{
|
||||
SAL_WARN( "xmloff.forms", "OControlImport::StartElement: illegal value limit property names!" );
|
||||
break;
|
||||
}
|
||||
|
||||
bRetrievedValueLimits = sal_True;
|
||||
}
|
||||
OSL_ENSURE((PROPID_MIN_VALUE != aValueProps->Handle) || pMinValueProperty,
|
||||
|
Reference in New Issue
Block a user