summaryrefslogtreecommitdiffstats
path: root/svtools
diff options
context:
space:
mode:
authorMarcel Metz <mmetz@adrian-broher.net>2012-01-15 11:30:24 +0100
committerStephan Bergmann <sbergman@redhat.com>2012-01-23 23:28:46 +0100
commitf9e6d195dbbf0b2effa10f69f4c99fce6e2b186b (patch)
treed79d0e06993af15e44c7b00c94cbc1d6fac470b2 /svtools
parentandroid: get dummy user-install 'presets' setup to please first-run (diff)
downloadcore-f9e6d195dbbf0b2effa10f69f4c99fce6e2b186b.tar.gz
core-f9e6d195dbbf0b2effa10f69f4c99fce6e2b186b.zip
Replaced diagnore ENSURE_OR_BREAK with regular code.
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/contnr/svtreebx.cxx7
-rw-r--r--svtools/source/uno/svtxgridcontrol.cxx42
2 files changed, 42 insertions, 7 deletions
diff --git a/svtools/source/contnr/svtreebx.cxx b/svtools/source/contnr/svtreebx.cxx
index 5fa9bde6b6f2..9bcbeb960071 100644
--- a/svtools/source/contnr/svtreebx.cxx
+++ b/svtools/source/contnr/svtreebx.cxx
@@ -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;
diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx
index c6ce75f764ae..4cf1a854e3d2 100644
--- a/svtools/source/uno/svtxgridcontrol.cxx
+++ b/svtools/source/uno/svtxgridcontrol.cxx
@@ -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();
}