[Libreoffice-commits] .: chart2/source chart2/workbench scaddins/source sccomp/source

Thomas Arnhold tarnhold at kemper.freedesktop.org
Sat Mar 19 06:05:17 PDT 2011


 chart2/source/controller/main/ChartController.cxx |   10 +++++-----
 chart2/source/tools/LifeTime.cxx                  |    4 ++--
 chart2/workbench/addin/sampleaddin.cxx            |    2 +-
 scaddins/source/datefunc/datefunc.cxx             |    2 +-
 sccomp/source/solver/solver.cxx                   |    2 +-
 5 files changed, 10 insertions(+), 10 deletions(-)

New commits:
commit ccc056a755bbf978889fc1f0e6b8e8e9d03d6001
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Sat Mar 19 14:05:33 2011 +0100

    Move OSL_ENSURE(sal_False,...) to OSL_FAIL(...)

diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx
index e69312d..312d7d4 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -260,7 +260,7 @@ void ChartController::TheModel::tryTermination()
     catch( uno::Exception& ex)
     {
         (void)(ex); // no warning in non-debug builds
-        OSL_ENSURE( sal_False, ( rtl::OString("Termination of model failed: ")
+        OSL_FAIL( ( rtl::OString("Termination of model failed: ")
             + rtl::OUStringToOString( ex.Message, RTL_TEXTENCODING_ASCII_US ) ).getStr() );
     }
 }
@@ -331,7 +331,7 @@ sal_Bool ChartController::TheModelRef::is() const
 
     if( m_bSuspended )
     {
-        OSL_ENSURE( sal_False, "This Controller is suspended" );
+        OSL_FAIL( "This Controller is suspended" );
         return sal_True;
     }
     return sal_False;
@@ -369,7 +369,7 @@ APPHELPER_XSERVICEINFO_IMPL(ChartController,CHART_CONTROLLER_SERVICE_IMPLEMENTAT
     if(m_xFrame.is()) //what happens, if we do have a Frame already??
     {
         //@todo? throw exception?
-        OSL_ENSURE( sal_False, "there is already a frame attached to the controller" );
+        OSL_FAIL( "there is already a frame attached to the controller" );
         return;
     }
 
@@ -691,7 +691,7 @@ sal_Bool SAL_CALL ChartController::attachModel( const uno::Reference< frame::XMo
 
     if(bSuspend==m_bSuspended)
     {
-        OSL_ENSURE( sal_False, "new suspend mode equals old suspend mode" );
+        OSL_FAIL( "new suspend mode equals old suspend mode" );
         return sal_True;
     }
 
@@ -878,7 +878,7 @@ void ChartController::impl_deleteDrawViewController()
 
     if( !(aModelRef->getModel() == rSource.Source) )
     {
-        OSL_ENSURE( sal_False, "queryClosing was called on a controller from an unknown source" );
+        OSL_FAIL( "queryClosing was called on a controller from an unknown source" );
         return;
     }
 
diff --git a/chart2/source/tools/LifeTime.cxx b/chart2/source/tools/LifeTime.cxx
index 483ba3c..f9bdc15 100644
--- a/chart2/source/tools/LifeTime.cxx
+++ b/chart2/source/tools/LifeTime.cxx
@@ -69,7 +69,7 @@ bool LifeTimeManager::impl_isDisposed( bool bAssert )
     {
         if( bAssert )
         {
-            OSL_ENSURE( sal_False, "This component is already disposed " );
+            OSL_FAIL( "This component is already disposed " );
             (void)(bAssert);
         }
         return sal_True;
@@ -198,7 +198,7 @@ bool CloseableLifeTimeManager::impl_isDisposedOrClosed( bool bAssert )
     {
         if( bAssert )
         {
-            OSL_ENSURE( sal_False, "This object is already closed" );
+            OSL_FAIL( "This object is already closed" );
             (void)(bAssert);//avoid warnings
         }
         return sal_True;
diff --git a/chart2/workbench/addin/sampleaddin.cxx b/chart2/workbench/addin/sampleaddin.cxx
index c8bd4cd..c15ef3a 100644
--- a/chart2/workbench/addin/sampleaddin.cxx
+++ b/chart2/workbench/addin/sampleaddin.cxx
@@ -73,7 +73,7 @@ sal_Bool SAL_CALL component_writeInfo(
         }
         catch( registry::InvalidRegistryException& )
         {
-            OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
+            OSL_FAIL( "### InvalidRegistryException!" );
         }
     }
     return sal_False;
diff --git a/scaddins/source/datefunc/datefunc.cxx b/scaddins/source/datefunc/datefunc.cxx
index 9113aeb..0ec01f2 100644
--- a/scaddins/source/datefunc/datefunc.cxx
+++ b/scaddins/source/datefunc/datefunc.cxx
@@ -264,7 +264,7 @@ sal_Bool SAL_CALL component_writeInfo(
         }
         catch (registry::InvalidRegistryException&)
         {
-            OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
+            OSL_FAIL( "### InvalidRegistryException!" );
         }
     }
     return sal_False;
diff --git a/sccomp/source/solver/solver.cxx b/sccomp/source/solver/solver.cxx
index f0b3377..acf088a 100644
--- a/sccomp/source/solver/solver.cxx
+++ b/sccomp/source/solver/solver.cxx
@@ -624,7 +624,7 @@ extern "C"
             }
             catch (registry::InvalidRegistryException &)
             {
-                OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
+                OSL_FAIL( "### InvalidRegistryException!" );
             }
         }
         return sal_False;


More information about the Libreoffice-commits mailing list