[Libreoffice-commits] .: basic/source connectivity/source drawinglayer/source embeddedobj/source sfx2/source svx/source

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


 basic/source/uno/namecont.cxx                                         |    2 +-
 connectivity/source/commontools/TSortIndex.cxx                        |    2 +-
 connectivity/source/drivers/calc/CConnection.cxx                      |    2 +-
 connectivity/source/drivers/calc/CTable.cxx                           |    2 +-
 connectivity/source/drivers/dbase/DTable.cxx                          |    2 +-
 connectivity/source/drivers/file/FResultSet.cxx                       |    2 +-
 connectivity/source/drivers/file/fcode.cxx                            |    4 ++--
 connectivity/source/drivers/mozab/MResultSet.cxx                      |    6 +++---
 connectivity/source/drivers/mozab/mozillasrc/MQuery.cxx               |    2 +-
 connectivity/source/inc/sqlscan.hxx                                   |    4 ++--
 connectivity/source/parse/sqliterator.cxx                             |    4 ++--
 drawinglayer/source/processor3d/zbufferprocessor3d.cxx                |    2 +-
 embeddedobj/source/msole/oleembed.cxx                                 |    2 +-
 sfx2/source/doc/guisaveas.cxx                                         |    2 +-
 sfx2/source/doc/objstor.cxx                                           |    2 +-
 svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx |    2 +-
 16 files changed, 21 insertions(+), 21 deletions(-)

New commits:
commit 49a86a9b97b1424b494a530db11fe60613f7f2c1
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Sat Feb 26 10:31:42 2011 +0100

    Move bogus OSL_ASSERT(msg) to OSL_FAIL(msg)

diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx
index 3e4e660..a6f271c 100644
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -943,7 +943,7 @@ sal_Bool SfxLibraryContainer::init_Impl(
         catch( uno::Exception& )
         {
             // TODO: error handling?
-            OSL_ASSERT( "Cannot access extensions!" );
+            OSL_FAIL( "Cannot access extensions!" );
         }
     }
 
diff --git a/connectivity/source/commontools/TSortIndex.cxx b/connectivity/source/commontools/TSortIndex.cxx
index 730b844..afc0125 100644
--- a/connectivity/source/commontools/TSortIndex.cxx
+++ b/connectivity/source/commontools/TSortIndex.cxx
@@ -153,7 +153,7 @@ sal_Int32 OSortIndex::GetValue(sal_Int32 nPos) const
 
     if (!m_bFrozen && m_aKeyType[0] != SQL_ORDERBYKEY_NONE)
     {
-        OSL_ASSERT("OSortIndex::GetValue: Invalid use of index!");
+        OSL_FAIL("OSortIndex::GetValue: Invalid use of index!");
         return 0;
     }
     return m_aKeyValues[nPos-1].first;
diff --git a/connectivity/source/drivers/calc/CConnection.cxx b/connectivity/source/drivers/calc/CConnection.cxx
index b6f405a..44f6f89 100644
--- a/connectivity/source/drivers/calc/CConnection.cxx
+++ b/connectivity/source/drivers/calc/CConnection.cxx
@@ -141,7 +141,7 @@ Reference< XSpreadsheetDocument> OCalcConnection::acquireDoc()
                     ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop"))), UNO_QUERY );
     if (!xDesktop.is())
     {
-        OSL_ASSERT("no desktop");
+        OSL_FAIL("no desktop");
         throw SQLException();
     }
     Reference< XComponent > xComponent;
diff --git a/connectivity/source/drivers/calc/CTable.cxx b/connectivity/source/drivers/calc/CTable.cxx
index 8788fd9..12f2cc3 100644
--- a/connectivity/source/drivers/calc/CTable.cxx
+++ b/connectivity/source/drivers/calc/CTable.cxx
@@ -509,7 +509,7 @@ void OCalcTable::fillColumns()
                 aTypeName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TIMESTAMP"));
                 break;
             default:
-                OSL_ASSERT("missing type name");
+                OSL_FAIL("missing type name");
                 aTypeName = ::rtl::OUString();
         }
 
diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx
index ea67326..aa94c52 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -993,7 +993,7 @@ sal_Bool ODbaseTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols, s
                         (_rRow->get())[i]->setNull();
                 }	break;
                 default:
-                    OSL_ASSERT("Falscher Type");
+                    OSL_FAIL("Falscher Type");
             }
             (_rRow->get())[i]->setTypeKind(nType);
         }
diff --git a/connectivity/source/drivers/file/FResultSet.cxx b/connectivity/source/drivers/file/FResultSet.cxx
index 4223f03..0eec667 100644
--- a/connectivity/source/drivers/file/FResultSet.cxx
+++ b/connectivity/source/drivers/file/FResultSet.cxx
@@ -1307,7 +1307,7 @@ void OResultSet::sortRows()
         // Other types aren't implemented (so they are always FALSE)
             default:
                 eKeyType[i] = SQL_ORDERBYKEY_NONE;
-                OSL_ASSERT("OFILECursor::Execute: Datentyp nicht implementiert");
+                OSL_FAIL("OFILECursor::Execute: Datentyp nicht implementiert");
                 break;
         }
         (m_aEvaluateRow->get())[*aOrderByIter]->setBound(sal_True);
diff --git a/connectivity/source/drivers/file/fcode.cxx b/connectivity/source/drivers/file/fcode.cxx
index 245cc0e..db45801 100644
--- a/connectivity/source/drivers/file/fcode.cxx
+++ b/connectivity/source/drivers/file/fcode.cxx
@@ -143,7 +143,7 @@ OOperandParam::OOperandParam(OSQLParseNode* pNode, sal_Int32 _nPos)
         aParameterName = pNode->getChild(1)->getTokenValue();
     else
     {
-        OSL_ASSERT("Fehler im Parse Tree");
+        OSL_FAIL("Fehler im Parse Tree");
     }
 
     // set up Parameter-Column with default type, can be specified more precisely later using Describe-Parameter
@@ -200,7 +200,7 @@ OOperandConst::OOperandConst(const OSQLParseNode& rColumnRef, const rtl::OUStrin
     }
     else
     {
-        OSL_ASSERT("Parse Error");
+        OSL_FAIL("Parse Error");
     }
     m_aValue.setBound(sal_True);
 }
diff --git a/connectivity/source/drivers/mozab/MResultSet.cxx b/connectivity/source/drivers/mozab/MResultSet.cxx
index e1860eb..9c0da3a 100644
--- a/connectivity/source/drivers/mozab/MResultSet.cxx
+++ b/connectivity/source/drivers/mozab/MResultSet.cxx
@@ -411,7 +411,7 @@ const ORowSetValue& OResultSet::getValue(sal_Int32 cardNumber, sal_Int32 columnI
 {
     if ( fetchRow( cardNumber ) == sal_False )
     {
-        OSL_ASSERT("fetchRow() returned False" );
+        OSL_FAIL("fetchRow() returned False" );
         m_bWasNull = sal_True;
         return *ODatabaseMetaDataResultSet::getEmptyValue();
     }
@@ -836,7 +836,7 @@ void OResultSet::analyseWhereClause( const OSQLParseNode*                 parseT
             queryExpression.setExpressionCondition( MQueryExpression::AND );
         }
         else {
-            OSL_ASSERT("analyseSQL: Error in Parse Tree");
+            OSL_FAIL("analyseSQL: Error in Parse Tree");
         }
     }
     else if (SQL_ISRULE(parseTree,comparison_predicate))
@@ -1267,7 +1267,7 @@ void SAL_CALL OResultSet::executeQuery() throw( ::com::sun::star::sdbc::SQLExcep
                     // FALSE)
                         default:
                             eKeyType[i] = SQL_ORDERBYKEY_NONE;
-                            OSL_ASSERT("MResultSet::executeQuery: Order By Data Type not implemented");
+                            OSL_FAIL("MResultSet::executeQuery: Order By Data Type not implemented");
                             break;
                     }
                 }
diff --git a/connectivity/source/drivers/mozab/mozillasrc/MQuery.cxx b/connectivity/source/drivers/mozab/mozillasrc/MQuery.cxx
index a78b9ab..e3828a5 100644
--- a/connectivity/source/drivers/mozab/mozillasrc/MQuery.cxx
+++ b/connectivity/source/drivers/mozab/mozillasrc/MQuery.cxx
@@ -300,7 +300,7 @@ static sal_Int32 generateExpression( MQuery* _aQuery, MQueryExpression*  _aExpr,
         }
         else {
             // Should never see this...
-            OSL_ASSERT("Unknown Expression Type!");
+            OSL_FAIL("Unknown Expression Type!");
             return( NS_ERROR_UNEXPECTED );
         }
     }
diff --git a/connectivity/source/inc/sqlscan.hxx b/connectivity/source/inc/sqlscan.hxx
index b9b482c..6456711 100644
--- a/connectivity/source/inc/sqlscan.hxx
+++ b/connectivity/source/inc/sqlscan.hxx
@@ -64,8 +64,8 @@ namespace connectivity
 
         virtual sal_Int32 SQLyygetc(void);
         virtual void SQLyyerror(char *fmt);
-        virtual void output(sal_Int32) { OSL_ASSERT("Internal error in sdblex.l: output not possible"); }
-        virtual void ECHO(void) { OSL_ASSERT("Internal error in sdblex.l: ECHO not possible"); }
+        virtual void output(sal_Int32) { OSL_FAIL("Internal error in sdblex.l: output not possible"); }
+        virtual void ECHO(void) { OSL_FAIL("Internal error in sdblex.l: ECHO not possible"); }
         virtual IParseContext::InternationalKeyCode getInternationalTokenID(const char* sToken) const;
 
         // setting the new information before scanning
diff --git a/connectivity/source/parse/sqliterator.cxx b/connectivity/source/parse/sqliterator.cxx
index 8a3d474..a44fb41 100644
--- a/connectivity/source/parse/sqliterator.cxx
+++ b/connectivity/source/parse/sqliterator.cxx
@@ -1245,7 +1245,7 @@ bool OSQLParseTreeIterator::traverseSelectionCriteria(const OSQLParseNode* pSele
         pWhereClause = pSelectNode->getChild(3);
     } else if (SQL_ISRULE(pSelectNode,delete_statement_positioned)) {
         // nyi
-        OSL_ASSERT("OSQLParseTreeIterator::getSelectionCriteria: positioned nyi");
+        OSL_FAIL("OSQLParseTreeIterator::getSelectionCriteria: positioned nyi");
     } else {
         // Anderes Statement. Keine Selektionskriterien.
         return false;
@@ -1487,7 +1487,7 @@ void OSQLParseTreeIterator::traverseParameter(const OSQLParseNode* _pParseNode
     }
     else
     {
-        OSL_ASSERT("OSQLParseTreeIterator: error in parse tree!");
+        OSL_FAIL("OSQLParseTreeIterator: error in parse tree!");
     }
 
     // found a parameter
diff --git a/drawinglayer/source/processor3d/zbufferprocessor3d.cxx b/drawinglayer/source/processor3d/zbufferprocessor3d.cxx
index 2dc6582..b210d64 100644
--- a/drawinglayer/source/processor3d/zbufferprocessor3d.cxx
+++ b/drawinglayer/source/processor3d/zbufferprocessor3d.cxx
@@ -765,7 +765,7 @@ namespace drawinglayer
 
             if(mpRasterPrimitive3Ds)
             {
-                OSL_ASSERT("ZBufferProcessor3D: destructed, but there are unrendered transparent geometries. Use ZBufferProcessor3D::finish() to render these (!)");
+                OSL_FAIL("ZBufferProcessor3D: destructed, but there are unrendered transparent geometries. Use ZBufferProcessor3D::finish() to render these (!)");
                 delete mpRasterPrimitive3Ds;
             }
         }
diff --git a/embeddedobj/source/msole/oleembed.cxx b/embeddedobj/source/msole/oleembed.cxx
index 2ea4751..f017966 100644
--- a/embeddedobj/source/msole/oleembed.cxx
+++ b/embeddedobj/source/msole/oleembed.cxx
@@ -427,7 +427,7 @@ sal_Bool OleEmbeddedObject::TryToConvertToOOo()
                 if ( aStorageName.getLength() )
                     try {
                         m_xParentStorage->removeElement( aStorageName );
-                    } catch( uno::Exception& ) { OSL_ASSERT( "Can not remove temporary storage!" ); }
+                    } catch( uno::Exception& ) { OSL_FAIL( "Can not remove temporary storage!" ); }
                 break;
         }
     }
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index aa68646..940e3e9 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -230,7 +230,7 @@ public:
             }
             catch( uno::Exception& )
             {
-                OSL_ASSERT( "Unexpected exception!" );
+                OSL_FAIL( "Unexpected exception!" );
             }
         }
     }
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index eb45ce0..e6cb611 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -1605,7 +1605,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl
                         {
                             // it should not happen, the copies signature is invalid!
                             // throw the changes away
-                            OSL_ASSERT( "An invalid signature was copied!" );
+                            OSL_FAIL( "An invalid signature was copied!" );
                         }
                     }
                 }
diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx
index a0f5474..7b46be4 100644
--- a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx
+++ b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx
@@ -198,7 +198,7 @@ void DictionaryList::refillFromDictionary( sal_Int32 nTextConversionOptions )
 
         if(aRightList.getLength()!=1)
         {
-            OSL_ASSERT("The Chinese Translation Dictionary should have exactly one Mapping for each term.");
+            OSL_FAIL("The Chinese Translation Dictionary should have exactly one Mapping for each term.");
             continue;
         }
 


More information about the Libreoffice-commits mailing list