Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


Hello lo-devs,

the attached patches replace some of the ENSURE_OR_* macros, with
regular code. I can't see any advantage in these macros aside from save
some typing.

regards Marcel Metz
From 1d0aeb0f7266646da553ea7d120afcc9065118e5 Mon Sep 17 00:00:00 2001
Message-Id: <1d0aeb0f7266646da553ea7d120afcc9065118e5.1327236163.git.mmetz@adrian-broher.net>
From: Marcel Metz <mmetz@adrian-broher.net>
Date: Sun, 15 Jan 2012 11:30:24 +0100
Subject: [PATCH 1/2] Replaced diagnore ENSURE_OR_BREAK with regular code.
To: libreoffice@lists.freedesktop.org
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="------------true"

This is a multi-part message in MIME format.
--------------true
Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit

---
 basctl/source/basicide/basobj2.cxx     |   18 +++++++++++--
 svtools/source/contnr/svtreebx.cxx     |    7 ++++-
 svtools/source/uno/svtxgridcontrol.cxx |   42 +++++++++++++++++++++++++++----
 svx/source/form/fmpgeimp.cxx           |    6 ++++-
 ucb/source/ucp/ext/ucpext_content.cxx  |   21 +++++++++++++--
 xmloff/source/forms/elementimport.cxx  |   42 +++++++++++++++++++++++++------
 6 files changed, 114 insertions(+), 22 deletions(-)


--------------true
Content-Type: text/x-patch; name="0001-Replaced-diagnore-ENSURE_OR_BREAK-with-regular-code.patch"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; 
filename="0001-Replaced-diagnore-ENSURE_OR_BREAK-with-regular-code.patch"

diff --git a/basctl/source/basicide/basobj2.cxx b/basctl/source/basicide/basobj2.cxx
index 646c40c..36ee590 100644
--- a/basctl/source/basicide/basobj2.cxx
+++ b/basctl/source/basicide/basobj2.cxx
@@ -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;
diff --git a/svtools/source/contnr/svtreebx.cxx b/svtools/source/contnr/svtreebx.cxx
index 5fa9bde..9bcbeb9 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 c6ce75f..2452c15 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 )
+            {
+                OSL_ENSURE( false, "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 )
+        {
+            OSL_ENSURE( false "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 )
+            {
+                OSL_ENSURE( false, "SVTXGridControl::ProcessWindowEvent: no control (anymore)!" );
+                break;
+            }
+
             if ( m_aSelectionListeners.getLength() )
                 ImplCallItemListeners();
         }
diff --git a/svx/source/form/fmpgeimp.cxx b/svx/source/form/fmpgeimp.cxx
index b71ed1c..a037401 100644
--- a/svx/source/form/fmpgeimp.cxx
+++ b/svx/source/form/fmpgeimp.cxx
@@ -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
diff --git a/ucb/source/ucp/ext/ucpext_content.cxx b/ucb/source/ucp/ext/ucpext_content.cxx
index d9989ed..ed959bc 100644
--- a/ucb/source/ucp/ext/ucpext_content.cxx
+++ b/ucb/source/ucp/ext/ucpext_content.cxx
@@ -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 );
 
diff --git a/xmloff/source/forms/elementimport.cxx b/xmloff/source/forms/elementimport.cxx
index 2450478..989214c 100644
--- a/xmloff/source/forms/elementimport.cxx
+++ b/xmloff/source/forms/elementimport.cxx
@@ -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,

--------------true--


From 6b72b869593ddcdc11399f1d7c11a998ff5cc56f Mon Sep 17 00:00:00 2001
Message-Id: <6b72b869593ddcdc11399f1d7c11a998ff5cc56f.1327236163.git.mmetz@adrian-broher.net>
In-Reply-To: <1d0aeb0f7266646da553ea7d120afcc9065118e5.1327236163.git.mmetz@adrian-broher.net>
References: <1d0aeb0f7266646da553ea7d120afcc9065118e5.1327236163.git.mmetz@adrian-broher.net>
From: Marcel Metz <mmetz@adrian-broher.net>
Date: Sun, 15 Jan 2012 11:48:11 +0100
Subject: [PATCH 2/2] Replaced diagnore ENSURE_OR_CONTINUE with regular code.
To: libreoffice@lists.freedesktop.org
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="------------true"

This is a multi-part message in MIME format.
--------------true
Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit

---
 sfx2/source/dialog/taskpane.cxx                    |    7 ++++++-
 svtools/source/uno/svtxgridcontrol.cxx             |    6 +++++-
 svtools/source/uno/unocontroltablemodel.cxx        |    7 ++++++-
 svx/source/form/fmpgeimp.cxx                       |   12 ++++++++++--
 svx/source/form/fmvwimp.cxx                        |   13 +++++++++++--
 .../controls/grid/defaultgridcolumnmodel.cxx       |    7 ++++++-
 ucb/source/ucp/ext/ucpext_datasupplier.cxx         |    6 +++++-
 vcl/source/control/throbber.cxx                    |    7 ++++++-
 xmloff/source/forms/elementexport.cxx              |    7 +++++--
 xmloff/source/forms/property_meta_data.cxx         |    7 ++++++-
 10 files changed, 66 insertions(+), 13 deletions(-)


--------------true
Content-Type: text/x-patch; name="0002-Replaced-diagnore-ENSURE_OR_CONTINUE-with-regular-co.patch"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; 
filename="0002-Replaced-diagnore-ENSURE_OR_CONTINUE-with-regular-co.patch"

diff --git a/sfx2/source/dialog/taskpane.cxx b/sfx2/source/dialog/taskpane.cxx
index d83ad1b..7a85eaa 100644
--- a/sfx2/source/dialog/taskpane.cxx
+++ b/sfx2/source/dialog/taskpane.cxx
@@ -671,7 +671,12 @@ namespace sfx2
         {
             const ::svt::PToolPanel pPanel( m_aPanelDeck.GetPanel( i ) );
             const CustomToolPanel* pCustomPanel = dynamic_cast< const CustomToolPanel* >( 
pPanel.get() );
-            ENSURE_OR_CONTINUE( pCustomPanel != NULL, "ModuleTaskPane_Impl::GetPanelPos: illegal 
panel implementation!" );
+            if ( !pCustomPanel )
+            {
+                SAL_WARN( "sfx2.dialog", "ModuleTaskPane_Impl::GetPanelPos: illegal panel 
implementation!" );
+                continue;
+            }
+
             if ( pCustomPanel->GetResourceURL() == i_rResourceURL )
             {
                 aPanelPos = i;
diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx
index 2452c15..da2f6f5 100644
--- a/svtools/source/uno/svtxgridcontrol.cxx
+++ b/svtools/source/uno/svtxgridcontrol.cxx
@@ -781,7 +781,11 @@ void SVTXGridControl::impl_updateColumnsFromModel_nothrow()
                 ++colRef
             )
         {
-            ENSURE_OR_CONTINUE( colRef->is(), "illegal column!" );
+            if ( !colRef->is() )
+            {
+                SAL_WARN( "svtools.uno", "illegal column!" );
+                continue;
+            }
 
             m_pTableModel->appendColumn( *colRef );
         }
diff --git a/svtools/source/uno/unocontroltablemodel.cxx 
b/svtools/source/uno/unocontroltablemodel.cxx
index 015dd67..f6cd894 100644
--- a/svtools/source/uno/unocontroltablemodel.cxx
+++ b/svtools/source/uno/unocontroltablemodel.cxx
@@ -323,7 +323,12 @@ namespace svt { namespace table
             )
         {
             UnoGridColumnFacade* pColumn = dynamic_cast< UnoGridColumnFacade* >( col->get() );
-            ENSURE_OR_CONTINUE( pColumn != NULL, "UnoControlTableModel::removeAllColumns: illegal 
column implementation!" );
+            if ( !pColumn )
+            {
+                SAL_WARN( "svtools.uno", "UnoControlTableModel::removeAllColumns: illegal column 
implementation!" );
+                continue;
+            }
+
             pColumn->dispose();
         }
         m_pImpl->aColumns.clear();
diff --git a/svx/source/form/fmpgeimp.cxx b/svx/source/form/fmpgeimp.cxx
index a037401..33a3082 100644
--- a/svx/source/form/fmpgeimp.cxx
+++ b/svx/source/form/fmpgeimp.cxx
@@ -216,15 +216,23 @@ void FmFormPageImpl::initFrom( FmFormPageImpl& i_foreignImpl )
                 continue;
 
             Reference< XControlModel > xForeignModel( pForeignObj->GetUnoControlModel() );
-            ENSURE_OR_CONTINUE( xForeignModel.is(), "FmFormPageImpl::FmFormPageImpl: control shape 
without control!" );
+            if ( !xForeignModel.is() )
+            {
                 // if this fires, the SdrObject does not have a UNO Control Model. This is 
pathological, but well ...
                 // So the cloned SdrObject will also not have a UNO Control Model.
+                SAL_WARN( "svx.form", "FmFormPageImpl::FmFormPageImpl: control shape without 
control!" );
+                continue;
+            }
 
             MapControlModels::const_iterator assignment = aModelAssignment.find( xForeignModel );
-            ENSURE_OR_CONTINUE( assignment != aModelAssignment.end(), 
"FmFormPageImpl::FmFormPageImpl: no clone found for this model!" );
+            if ( assignment == aModelAssignment.end() )
+            {
                 // if this fires, the source SdrObject has a model, but it is not part of the 
model hierarchy in
                 // i_foreignImpl.getForms().
                 // Pathological, too ...
+                SAL_WARN( "svx.form", "FmFormPageImpl::FmFormPageImpl: no clone found for this 
model!" );
+                continue;
+            }
 
             pOwnObj->SetUnoControlModel( assignment->second );
         }
diff --git a/svx/source/form/fmvwimp.cxx b/svx/source/form/fmvwimp.cxx
index 879b537..546540e 100644
--- a/svx/source/form/fmvwimp.cxx
+++ b/svx/source/form/fmvwimp.cxx
@@ -733,7 +733,11 @@ IMPL_LINK(FmXFormView, OnActivate, void*, /*EMPTYTAG*/)
                     continue;
 
                 Reference< XPropertySet > xFormSet( xForm, UNO_QUERY );
-                ENSURE_OR_CONTINUE( xFormSet.is(), "FmXFormView::OnActivate: a form which does not 
have properties?" );
+                if ( !xFormSet.is() )
+                {
+                    SAL_WARN( "svx.form", "FmXFormView::OnActivate: a form which does not have 
properties?" );
+                    continue;
+                }
 
                 const ::rtl::OUString aSource = ::comphelper::getString( 
xFormSet->getPropertyValue( FM_PROP_COMMAND ) );
                 if ( !aSource.isEmpty() )
@@ -908,7 +912,12 @@ Reference< XFormController > FmXFormView::getFormController( const Reference< 
XF
         )
     {
         const PFormViewPageWindowAdapter pAdapter( *pos );
-        ENSURE_OR_CONTINUE( pAdapter.get(), "FmXFormView::getFormController: invalid page window 
adapter!" );
+        if ( !pAdapter.get() )
+        {
+            SAL_WARN( "svx.form", "FmXFormView::getFormController: invalid page window adapter!" );
+            continue;
+        }
+
         if ( pAdapter->getWindow() != &_rDevice )
             // wrong device
             continue;
diff --git a/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx 
b/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx
index 32f5b3d..9c0fd9a 100644
--- a/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx
+++ b/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx
@@ -178,7 +178,12 @@ namespace toolkit
             )
         {
             GridColumn* pColumnImpl = GridColumn::getImplementation( *updatePos );
-            ENSURE_OR_CONTINUE( pColumnImpl, "DefaultGridColumnModel::removeColumn: invalid column 
implementation!" );
+            if ( !pColumnImpl )
+            {
+                SAL_WARN( "toolkit.controls", "DefaultGridColumnModel::removeColumn: invalid 
column implementation!" );
+                continue;
+            }
+
             pColumnImpl->setIndex( columnIndex );
         }
 
diff --git a/ucb/source/ucp/ext/ucpext_datasupplier.cxx b/ucb/source/ucp/ext/ucpext_datasupplier.cxx
index 507d267..8425ffe 100644
--- a/ucb/source/ucp/ext/ucpext_datasupplier.cxx
+++ b/ucb/source/ucp/ext/ucpext_datasupplier.cxx
@@ -163,7 +163,11 @@ namespace ucb { namespace ucp { namespace ext
                         ++pExtInfo
                     )
                 {
-                    ENSURE_OR_CONTINUE( pExtInfo->getLength() > 0, "illegal extension info" );
+                    if ( pExtInfo->getLength() <= 0 )
+                    {
+                        SAL_WARN( "ucb.ucp", "illegal extension info" );
+                        continue;
+                    }
 
                     const ::rtl::OUString& rLocalId = (*pExtInfo)[0];
                     ResultListEntry aEntry;
diff --git a/vcl/source/control/throbber.cxx b/vcl/source/control/throbber.cxx
index a4fe98f..6f80a40 100644
--- a/vcl/source/control/throbber.cxx
+++ b/vcl/source/control/throbber.cxx
@@ -190,7 +190,12 @@ void Throbber::initImages()
                     ++check
                 )
             {
-                ENSURE_OR_CONTINUE( !check->empty(), "Throbber::initImages: illegal image!" );
+                if ( check->empty() )
+                {
+                    SAL_WARN( "vcl.control", "Throbber::initImages: illegal image!" );
+                    continue;
+                }
+
                 const Size aImageSize = (*check)[0].GetSizePixel();
 
                 if  (   ( aImageSize.Width() > aWindowSizePixel.Width() )
diff --git a/xmloff/source/forms/elementexport.cxx b/xmloff/source/forms/elementexport.cxx
index 0d6a171..fcc3efa 100644
--- a/xmloff/source/forms/elementexport.cxx
+++ b/xmloff/source/forms/elementexport.cxx
@@ -500,8 +500,11 @@ namespace xmloff
                 // let the factory provide the concrete handler. Note that caching, if desired, is 
the task
                 // of the factory
                 PPropertyHandler handler = (*propDescription->factory)( 
propDescription->propertyId );
-                ENSURE_OR_CONTINUE( handler.get() != NULL,
-                    "OControlExport::exportGenericHandlerAttributes: invalid property handler 
provided by the factory!" );
+                if ( !handler.get() )
+                {
+                    SAL_WARN( "xmloff.forms", "OControlExport::exportGenericHandlerAttributes: 
invalid property handler provided by the factory!" );
+                    continue;
+                }
 
                 ::rtl::OUString attributeValue;
                 if ( propDescription->propertyGroup == NO_GROUP )
diff --git a/xmloff/source/forms/property_meta_data.cxx b/xmloff/source/forms/property_meta_data.cxx
index c8d878b..8291d03 100644
--- a/xmloff/source/forms/property_meta_data.cxx
+++ b/xmloff/source/forms/property_meta_data.cxx
@@ -245,7 +245,12 @@ namespace xmloff { namespace metadata
             {
                 const PropertyGroup propGroup = group->second;
                 const IndexedPropertyGroups::const_iterator groupPos = rPropertyGroups.find( 
propGroup );
-                ENSURE_OR_CONTINUE( groupPos != rPropertyGroups.end(), "getPropertyGroupList: 
inconsistency!" );
+                if( groupPos == rPropertyGroups.end() )
+                {
+                    SAL_WARN( "xmloff.forms", "getPropertyGroupList: inconsistency!" );
+                    continue;
+                }
+
                 o_propertyGroups.push_back( groupPos->second );
             }
         }

--------------true--



Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.