[Libreoffice-commits] .: comphelper/source svl/source unotools/source vcl/unx

Thomas Arnhold tarnhold at kemper.freedesktop.org
Sat Feb 26 01:38:18 PST 2011


 comphelper/source/container/embeddedobjectcontainer.cxx |    2 +-
 comphelper/source/misc/componentmodule.cxx              |    2 +-
 comphelper/source/property/TypeGeneration.cxx           |    2 +-
 svl/source/numbers/zformat.cxx                          |    2 +-
 svl/source/passwordcontainer/passwordcontainer.cxx      |    4 ++--
 unotools/source/config/itemholder1.cxx                  |    2 +-
 unotools/source/config/moduleoptions.cxx                |    8 ++++----
 vcl/unx/source/dtrans/X11_selection.cxx                 |    6 +++---
 8 files changed, 14 insertions(+), 14 deletions(-)

New commits:
commit 25143b086a3498a2d29e6742d817860ebdf2f658
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Sat Feb 26 10:38:15 2011 +0100

    Move bogus OSL_ASSERT(msg) to OSL_FAIL(msg)

diff --git a/comphelper/source/container/embeddedobjectcontainer.cxx b/comphelper/source/container/embeddedobjectcontainer.cxx
index 8eb2529..c990358 100644
--- a/comphelper/source/container/embeddedobjectcontainer.cxx
+++ b/comphelper/source/container/embeddedobjectcontainer.cxx
@@ -204,7 +204,7 @@ void EmbeddedObjectContainer::ReleaseImageSubStorage()
         }
         catch( uno::Exception& )
         {
-            OSL_ASSERT( "Problems releasing image substorage!\n" );
+            OSL_FAIL( "Problems releasing image substorage!\n" );
         }
     }
 }
diff --git a/comphelper/source/misc/componentmodule.cxx b/comphelper/source/misc/componentmodule.cxx
index 9caf529..8e5f29b 100644
--- a/comphelper/source/misc/componentmodule.cxx
+++ b/comphelper/source/misc/componentmodule.cxx
@@ -185,7 +185,7 @@ namespace comphelper
             }
             catch( Exception& )
             {
-                OSL_ASSERT( "OModule::writeComponentInfos: something went wrong while creating the keys!" );
+                OSL_FAIL( "OModule::writeComponentInfos: something went wrong while creating the keys!" );
                 return sal_False;
             }
         }
diff --git a/comphelper/source/property/TypeGeneration.cxx b/comphelper/source/property/TypeGeneration.cxx
index 29932ea..1246a50 100644
--- a/comphelper/source/property/TypeGeneration.cxx
+++ b/comphelper/source/property/TypeGeneration.cxx
@@ -226,7 +226,7 @@ namespace comphelper
             case CPPUTYPE_REFXGRAPHIC:      pType = &::getCppuType( (Reference< graphic::XGraphic >*)0); break;
             case CPPUTYPE_TABLEBORDERDISTANCES:     pType = &::getCppuType( (table::TableBorderDistances*)0 ); break;
             default:
-                OSL_ASSERT( "Unknown CPPU type" );
+                OSL_FAIL( "Unknown CPPU type" );
         }
     }
 }
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index 461fac7..2641285 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -4231,7 +4231,7 @@ void lcl_SvNumberformat_AddLimitStringImpl( String& rStr,
                 rStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "[>=" ) );
             break;
             default:
-                OSL_ASSERT( "unsupported number format" );
+                OSL_FAIL( "unsupported number format" );
                 break;
         }
         rStr += String( ::rtl::math::doubleToUString( fLimit,
diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx b/svl/source/passwordcontainer/passwordcontainer.cxx
index 4a2c8c5..b0881c0 100644
--- a/svl/source/passwordcontainer/passwordcontainer.cxx
+++ b/svl/source/passwordcontainer/passwordcontainer.cxx
@@ -392,7 +392,7 @@ void StorageItem::update( const ::rtl::OUString& aURL, const NamePassRecord& aRe
 {
     if ( !aRecord.HasPasswords( PERSISTENT_RECORD ) )
     {
-        OSL_ASSERT( "Unexpected storing of a record!" );
+        OSL_FAIL( "Unexpected storing of a record!" );
         return;
     }
 
@@ -723,7 +723,7 @@ void PasswordContainer::PrivateAdd( const ::rtl::OUString& Url, const ::rtl::OUS
         aRecord.SetMemPasswords( aStorePass );
     else
     {
-        OSL_ASSERT( "Unexpected persistence status!" );
+        OSL_FAIL( "Unexpected persistence status!" );
         return;
     }
 
diff --git a/unotools/source/config/itemholder1.cxx b/unotools/source/config/itemholder1.cxx
index 7c5a4bd..7b580d4 100644
--- a/unotools/source/config/itemholder1.cxx
+++ b/unotools/source/config/itemholder1.cxx
@@ -313,7 +313,7 @@ void ItemHolder1::impl_newItem(TItemInfo& rItem)
             break;
 
         default:
-            OSL_ASSERT( "unknown item type" );
+            OSL_FAIL( "unknown item type" );
             break;
     }
 }
diff --git a/unotools/source/config/moduleoptions.cxx b/unotools/source/config/moduleoptions.cxx
index b9e5dff..460e518 100644
--- a/unotools/source/config/moduleoptions.cxx
+++ b/unotools/source/config/moduleoptions.cxx
@@ -680,7 +680,7 @@ sal_Bool SvtModuleOptions_Impl::IsModuleInstalled( SvtModuleOptions::EModule eMo
         case SvtModuleOptions::E_DATABASE     :  sShortName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sdatabase"));
                                                   break;
         default:
-            OSL_ASSERT( "unknown factory" );
+            OSL_FAIL( "unknown factory" );
             break;
     }
 
@@ -745,7 +745,7 @@ sal_Bool SvtModuleOptions_Impl::IsModuleInstalled( SvtModuleOptions::EModule eMo
         case SvtModuleOptions::E_DATABASE     :  sURL = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("private:factory/sdatabase?Interactive"));
                                                   break;
         default:
-            OSL_ASSERT( "unknown factory" );
+            OSL_FAIL( "unknown factory" );
             break;
     }
     return sURL;
@@ -1329,7 +1329,7 @@ sal_uInt32 SvtModuleOptions::GetFeatures() const
         case SvtModuleOptions::E_SBASIC     :   { return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Basic")); }
         case SvtModuleOptions::E_SDATABASE  :   { return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Database")); }
         default:
-            OSL_ASSERT( "unknown module" );
+            OSL_FAIL( "unknown module" );
             break;
     }
 
@@ -1351,7 +1351,7 @@ sal_uInt32 SvtModuleOptions::GetFeatures() const
         case SvtModuleOptions::E_BASIC          :   { return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Basic")); }
         case SvtModuleOptions::E_DATABASE		:   { return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Database")); }
         default:
-            OSL_ASSERT( "unknown factory" );
+            OSL_FAIL( "unknown factory" );
             break;
     }
 
diff --git a/vcl/unx/source/dtrans/X11_selection.cxx b/vcl/unx/source/dtrans/X11_selection.cxx
index d44fb8f..ccdb16f 100644
--- a/vcl/unx/source/dtrans/X11_selection.cxx
+++ b/vcl/unx/source/dtrans/X11_selection.cxx
@@ -2394,7 +2394,7 @@ void SelectionManager::dropComplete( sal_Bool bSuccess, XLIB_Window aDropWindow,
         m_bDropWaitingForCompletion = false;
     }
     else
-        OSL_ASSERT( "dropComplete from invalid DropTargetDropContext" );
+        OSL_FAIL( "dropComplete from invalid DropTargetDropContext" );
 }
 
 /*
@@ -3970,7 +3970,7 @@ void SelectionManager::registerDropTarget( XLIB_Window aWindow, DropTarget* pTar
     ::boost::unordered_map< XLIB_Window, DropTargetEntry >::const_iterator it =
           m_aDropTargets.find( aWindow );
     if( it != m_aDropTargets.end() )
-        OSL_ASSERT( "attempt to register window as drop target twice" );
+        OSL_FAIL( "attempt to register window as drop target twice" );
     else if( aWindow && m_pDisplay )
     {
         DropTargetEntry aEntry( pTarget );
@@ -4001,7 +4001,7 @@ void SelectionManager::registerDropTarget( XLIB_Window aWindow, DropTarget* pTar
         m_aDropTargets[ aWindow ] = aEntry;
     }
     else
-        OSL_ASSERT( "attempt to register None as drop target" );
+        OSL_FAIL( "attempt to register None as drop target" );
 }
 
 // ------------------------------------------------------------------------


More information about the Libreoffice-commits mailing list