From 2fdfcbfad3a6d4e85a2ffa1206d1dd06dc9699a5 Mon Sep 17 00:00:00 2001 From: Jacek Wolszczak Date: Sat, 21 May 2011 16:01:56 +0200 Subject: Replace DBG_* with OSL_* in sc/source/filter --- sc/source/filter/lotus/expop.cxx | 26 +++++++++++++------------- sc/source/filter/lotus/lotattr.cxx | 6 +++--- sc/source/filter/lotus/lotform.cxx | 14 +++++++------- sc/source/filter/lotus/lotimpop.cxx | 10 +++++----- sc/source/filter/lotus/lotread.cxx | 8 ++++---- sc/source/filter/lotus/op.cxx | 2 +- sc/source/filter/lotus/tool.cxx | 4 ++-- 7 files changed, 35 insertions(+), 35 deletions(-) (limited to 'sc/source/filter/lotus') diff --git a/sc/source/filter/lotus/expop.cxx b/sc/source/filter/lotus/expop.cxx index e1bd599c29cd..1f89745c5159 100644 --- a/sc/source/filter/lotus/expop.cxx +++ b/sc/source/filter/lotus/expop.cxx @@ -102,8 +102,8 @@ inline void ExportWK1::Dimensions() #endif sal_uInt16 nCol = static_cast(nEndCol); sal_uInt16 nRow = static_cast(nEndRow); - DBG_ASSERT( nCol <= WK1MAXCOL, "ExportWK1::Dimensions(): Col > WK1MAXCOL" ); - DBG_ASSERT( nRow <= WK1MAXROW, "ExportWK1::Dimensions(): Row > WK1MAXROW" ); + OSL_ENSURE( nCol <= WK1MAXCOL, "ExportWK1::Dimensions(): Col > WK1MAXCOL" ); + OSL_ENSURE( nRow <= WK1MAXROW, "ExportWK1::Dimensions(): Row > WK1MAXROW" ); aOut << nCol << nRow; // Ending Col/Row } @@ -143,8 +143,8 @@ inline void ExportWK1::Colw() void ExportWK1::Blank( const sal_uInt16 nCol, const sal_uInt16 nRow, const ScPatternAttr& aAttr ) { // (0x0C) // PREC: nCol <= WK1MAXCOL, nRow <= WK1MAXROW - DBG_ASSERT( nCol <= WK1MAXCOL, "ExportWK1::Blank(): Col > WK1MAXCOL" ); - DBG_ASSERT( nRow <= WK1MAXROW, "ExportWK1::Blank(): Row > WK1MAXROW" ); + OSL_ENSURE( nCol <= WK1MAXCOL, "ExportWK1::Blank(): Col > WK1MAXCOL" ); + OSL_ENSURE( nRow <= WK1MAXROW, "ExportWK1::Blank(): Row > WK1MAXROW" ); aOut << ( sal_uInt16 ) 0x0C << ( sal_uInt16 ) 5 << GenFormByte( aAttr ) << nCol << nRow; } @@ -153,8 +153,8 @@ void ExportWK1::Blank( const sal_uInt16 nCol, const sal_uInt16 nRow, const ScPat void ExportWK1::Number( const sal_uInt16 nCol, const sal_uInt16 nRow, const double fWert, const ScPatternAttr &aAttr ) { // (0x0E) // PREC: nCol <= WK1MAXCOL, nRow <= WK1MAXROW - DBG_ASSERT( nCol <= WK1MAXCOL, "ExportWK1::Number(): Col > WK1MAXCOL" ); - DBG_ASSERT( nRow <= WK1MAXROW, "ExportWK1::Number(): Row > WK1MAXROW" ); + OSL_ENSURE( nCol <= WK1MAXCOL, "ExportWK1::Number(): Col > WK1MAXCOL" ); + OSL_ENSURE( nRow <= WK1MAXROW, "ExportWK1::Number(): Row > WK1MAXROW" ); aOut << ( sal_uInt16 ) 0x0E << ( sal_uInt16 ) 13 << GenFormByte( aAttr ) << nCol << nRow << fWert; } @@ -163,8 +163,8 @@ void ExportWK1::Number( const sal_uInt16 nCol, const sal_uInt16 nRow, const doub void ExportWK1::Label( const sal_uInt16 nCol, const sal_uInt16 nRow, const String& rStr, const ScPatternAttr& aAttr ) { // (0x0F) // PREC: nCol <= WK1MAXCOL, nRow <= WK1MAXROW - DBG_ASSERT( nCol <= WK1MAXCOL, "ExportWK1::Label(): Col > WK1MAXCOL" ); - DBG_ASSERT( nRow <= WK1MAXROW, "ExportWK1::Label(): Row > WK1MAXROW" ); + OSL_ENSURE( nCol <= WK1MAXCOL, "ExportWK1::Label(): Col > WK1MAXCOL" ); + OSL_ENSURE( nRow <= WK1MAXROW, "ExportWK1::Label(): Row > WK1MAXROW" ); ByteString aStr( rStr, eZielChar ); @@ -190,8 +190,8 @@ void ExportWK1::Label( const sal_uInt16 nCol, const sal_uInt16 nRow, const Strin void ExportWK1::Formula( const sal_uInt16 nCol, const sal_uInt16 nRow, const ScFormulaCell* pFC, const ScPatternAttr& aAttr ) { // (0x10) // PREC: nCol <= WK1MAXCOL, nRow <= WK1MAXROW - DBG_ASSERT( nCol <= WK1MAXCOL, "ExportWK1::Formula(): Col > WK1MAXCOL" ); - DBG_ASSERT( nRow <= WK1MAXROW, "ExportWK1::Formula(): Row > WK1MAXROW" ); + OSL_ENSURE( nCol <= WK1MAXCOL, "ExportWK1::Formula(): Col > WK1MAXCOL" ); + OSL_ENSURE( nRow <= WK1MAXROW, "ExportWK1::Formula(): Row > WK1MAXROW" ); sal_uInt16 nLaenge = 15; // Bytes bis Formel double fErgebnis; @@ -269,8 +269,8 @@ inline void ExportWK1::Cursorw12() void ExportWK1::WKString( const sal_uInt16 /*nCol*/, const sal_uInt16 /*nRow*/, const ScFormulaCell* /*pFC*/, const ScPatternAttr& /*aAttr*/ ) { // (0x33) // PREC: nCol <= WK1MAXCOL, nRow <= WK1MAXROW -/* DBG_ASSERT( nCol <= WK1MAXCOL, "ExportWK1::Label(): Col > WK1MAXCOL" ); - DBG_ASSERT( nRow <= WK1MAXROW, "ExportWK1::Label(): Row > WK1MAXROW" ); +/* OSL_ENSURE( nCol <= WK1MAXCOL, "ExportWK1::Label(): Col > WK1MAXCOL" ); + OSL_ENSURE( nRow <= WK1MAXROW, "ExportWK1::Label(): Row > WK1MAXROW" ); String aStr; ( ( ScFormulaCell * ) pFC )->GetString( aStr ); // Formeltext zunaechst so belassen @@ -399,7 +399,7 @@ FltError ExportWK1::Write() case CELLTYPE_NONE: break; default: - DBG_ASSERT( false, "ExportWK1::Write(): unbekannter Celltype!" ); + OSL_ENSURE( false, "ExportWK1::Write(): unbekannter Celltype!" ); } } while( aIter.GetNext() ); diff --git a/sc/source/filter/lotus/lotattr.cxx b/sc/source/filter/lotus/lotattr.cxx index 6e1a8519c1a6..e997c0df7f0a 100644 --- a/sc/source/filter/lotus/lotattr.cxx +++ b/sc/source/filter/lotus/lotattr.cxx @@ -189,7 +189,7 @@ void LotAttrCache::LotusToScBorderLine( sal_uInt8 nLine, ::editeng::SvxBorderLin const SvxColorItem& LotAttrCache::GetColorItem( const sal_uInt8 nLotIndex ) const { - DBG_ASSERT( nLotIndex > 0 && nLotIndex < 7, + OSL_ENSURE( nLotIndex > 0 && nLotIndex < 7, "-LotAttrCache::GetColorItem(): so nicht!" ); return *ppColorItems[ nLotIndex - 1 ]; @@ -198,14 +198,14 @@ const SvxColorItem& LotAttrCache::GetColorItem( const sal_uInt8 nLotIndex ) cons const Color& LotAttrCache::GetColor( const sal_uInt8 nLotIndex ) const { // Farbe <-> Index passt fuer Background, nicht aber fuer Fonts (0 <-> 7)! - DBG_ASSERT( nLotIndex < 8, "*LotAttrCache::GetColor(): Index > 7!" ); + OSL_ENSURE( nLotIndex < 8, "*LotAttrCache::GetColor(): Index > 7!" ); return pColTab[ nLotIndex ]; } void LotAttrCol::SetAttr( const SCROW nRow, const ScPatternAttr& rAttr ) { - DBG_ASSERT( ValidRow(nRow), "*LotAttrCol::SetAttr(): ... und rums?!" ); + OSL_ENSURE( ValidRow(nRow), "*LotAttrCol::SetAttr(): ... und rums?!" ); boost::ptr_vector::reverse_iterator iterLast = aEntries.rbegin(); diff --git a/sc/source/filter/lotus/lotform.cxx b/sc/source/filter/lotus/lotform.cxx index 589b291864cb..0869a2309b51 100644 --- a/sc/source/filter/lotus/lotform.cxx +++ b/sc/source/filter/lotus/lotform.cxx @@ -62,7 +62,7 @@ void LotusToSc::DoFunc( DefTokenId eOc, sal_uInt8 nAnz, const sal_Char* pExtStri sal_Bool bAddIn = false; sal_Bool bNeg = false; - DBG_ASSERT( nAnz < 128, "-LotusToSc::DoFunc(): Neee! -so viel kann ich nicht!" ); + OSL_ENSURE( nAnz < 128, "-LotusToSc::DoFunc(): Neee! -so viel kann ich nicht!" ); if( eOc == ocNoName ) { @@ -103,7 +103,7 @@ void LotusToSc::DoFunc( DefTokenId eOc, sal_uInt8 nAnz, const sal_Char* pExtStri switch( eOc ) { case ocIndex: - DBG_ASSERT( nAnz > 2, "+LotusToSc::DoFunc(): ocIndex braucht mind. 2 Parameter!" ); + OSL_ENSURE( nAnz > 2, "+LotusToSc::DoFunc(): ocIndex braucht mind. 2 Parameter!" ); nMerk0 = eParam[ 0 ]; eParam[ 0 ] = eParam[ 1 ]; eParam[ 1 ] = nMerk0; @@ -112,7 +112,7 @@ void LotusToSc::DoFunc( DefTokenId eOc, sal_uInt8 nAnz, const sal_Char* pExtStri break; case ocIRR: { - DBG_ASSERT( nAnz == 2, "+LotusToSc::DoFunc(): ocIRR hat nur 2 Parameter!" ); + OSL_ENSURE( nAnz == 2, "+LotusToSc::DoFunc(): ocIRR hat nur 2 Parameter!" ); nMerk0 = eParam[ 0 ]; eParam[ 0 ] = eParam[ 1 ]; eParam[ 1 ] = nMerk0; @@ -145,7 +145,7 @@ void LotusToSc::DoFunc( DefTokenId eOc, sal_uInt8 nAnz, const sal_Char* pExtStri case ocZins: { // neue Anzahl = 4! - DBG_ASSERT( nAnz == 3, + OSL_ENSURE( nAnz == 3, "*LotusToSc::DoFunc(): ZINS() hat 3 Parameter!" ); nAnz = 4; eParam[ 3 ] = eParam[ 0 ]; // 3. -> 1. @@ -173,7 +173,7 @@ void LotusToSc::DoFunc( DefTokenId eOc, sal_uInt8 nAnz, const sal_Char* pExtStri if( eOc == ocRMZ ) { // Extrawurst ocRMZ letzter Parameter negiert! // zusaetzlich: 1. -> 3., 3. -> 2., 2. -> 1. - DBG_ASSERT( nAnz == 3, + OSL_ENSURE( nAnz == 3, "+LotusToSc::DoFunc(): ocRMZ hat genau 3 Parameter!" ); aPool << eParam[ 1 ] << ocSep << eParam[ 0 ] << ocSep << ocNegSub << eParam[ 2 ]; @@ -654,8 +654,8 @@ ConvErr LotusToSc::Convert( const ScTokenArray*& rpErg, sal_Int32& rRest, rpErg = aPool[ aStack.Get() ]; - DBG_ASSERT( nBytesLeft >= 0, "*LotusToSc::Convert(): zuviel verarbeitet!"); - DBG_ASSERT( nBytesLeft <= 0, "*LotusToSc::Convert(): wat is mit'm Rest?" ); + OSL_ENSURE( nBytesLeft >= 0, "*LotusToSc::Convert(): zuviel verarbeitet!"); + OSL_ENSURE( nBytesLeft <= 0, "*LotusToSc::Convert(): wat is mit'm Rest?" ); if( rRest ) aIn.SeekRel( nBytesLeft ); // eventuellen Rest/Ueberlauf korrigieren diff --git a/sc/source/filter/lotus/lotimpop.cxx b/sc/source/filter/lotus/lotimpop.cxx index 150fee171646..4c32b0f5e404 100644 --- a/sc/source/filter/lotus/lotimpop.cxx +++ b/sc/source/filter/lotus/lotimpop.cxx @@ -131,7 +131,7 @@ sal_Bool ImportLotus::BofFm3( void ) void ImportLotus::Columnwidth( sal_uInt16 nRecLen ) { - DBG_ASSERT( nRecLen >= 4, "*ImportLotus::Columnwidth(): Record zu kurz!" ); + OSL_ENSURE( nRecLen >= 4, "*ImportLotus::Columnwidth(): Record zu kurz!" ); sal_uInt8 nLTab, nWindow2; sal_uInt16 nCnt = ( nRecLen - 4 ) / 2; @@ -163,7 +163,7 @@ void ImportLotus::Columnwidth( sal_uInt16 nRecLen ) void ImportLotus::Hiddencolumn( sal_uInt16 nRecLen ) { - DBG_ASSERT( nRecLen >= 4, "*ImportLotus::Hiddencolumn(): Record zu kurz!" ); + OSL_ENSURE( nRecLen >= 4, "*ImportLotus::Hiddencolumn(): Record zu kurz!" ); sal_uInt8 nLTab, nWindow2; sal_uInt16 nCnt = ( nRecLen - 4 ) / 2; @@ -271,7 +271,7 @@ void ImportLotus::Smallnumcell( void ) ScFormulaCell *ImportLotus::Formulacell( sal_uInt16 n ) { - DBG_ASSERT( pIn, "-ImportLotus::Formulacell(): Null-Stream -> Rums!" ); + OSL_ENSURE( pIn, "-ImportLotus::Formulacell(): Null-Stream -> Rums!" ); ScAddress aAddr; @@ -305,7 +305,7 @@ void ImportLotus::Read( String &r ) void ImportLotus::RowPresentation( sal_uInt16 nRecLen ) { - DBG_ASSERT( nRecLen > 4, "*ImportLotus::RowPresentation(): Record zu kurz!" ); + OSL_ENSURE( nRecLen > 4, "*ImportLotus::RowPresentation(): Record zu kurz!" ); sal_uInt8 nLTab, nFlags; sal_uInt16 nRow, nHeight; @@ -401,7 +401,7 @@ void ImportLotus::Font_Ysize( void ) void ImportLotus::_Row( const sal_uInt16 nRecLen ) { - DBG_ASSERT( nExtTab >= 0, "*ImportLotus::_Row(): Kann hier nicht sein!" ); + OSL_ENSURE( nExtTab >= 0, "*ImportLotus::_Row(): Kann hier nicht sein!" ); sal_uInt16 nRow; sal_uInt16 nHeight; diff --git a/sc/source/filter/lotus/lotread.cxx b/sc/source/filter/lotus/lotread.cxx index 84cb8df148ba..fbc0532ed4c2 100644 --- a/sc/source/filter/lotus/lotread.cxx +++ b/sc/source/filter/lotus/lotread.cxx @@ -202,7 +202,7 @@ FltError ImportLotus::Read() #endif } - DBG_ASSERT( nNextRec >= pIn->Tell(), + OSL_ENSURE( nNextRec >= pIn->Tell(), "*ImportLotus::Read(): Etwas zu gierig..." ); pIn->Seek( nNextRec ); @@ -224,7 +224,7 @@ FltError ImportLotus::Read() } for( nCnt = 1 ; nCnt < nTabs ; nCnt++ ) { - DBG_ASSERT( pD->HasTable( nCnt ), + OSL_ENSURE( pD->HasTable( nCnt ), "-ImportLotus::Read(): Wo ist meine Tabelle?!" ); pD->GetName( nCnt, aTabName ); if( aTabName == aRef ) @@ -282,7 +282,7 @@ FltError ImportLotus::Read( SvStream& rIn ) case 0x0001: // EOF bRead = false; - DBG_ASSERT( nTab == 0, + OSL_ENSURE( nTab == 0, "-ImportLotus::Read( SvStream& ): Zweimal EOF nicht erlaubt" ); nTab++; break; @@ -309,7 +309,7 @@ FltError ImportLotus::Read( SvStream& rIn ) break; } - DBG_ASSERT( nNextRec >= pIn->Tell(), + OSL_ENSURE( nNextRec >= pIn->Tell(), "*ImportLotus::Read(): Etwas zu gierig..." ); pIn->Seek( nNextRec ); aPrgrsBar.Progress(); diff --git a/sc/source/filter/lotus/op.cxx b/sc/source/filter/lotus/op.cxx index f0a69cae3358..c9c6ae13ec38 100644 --- a/sc/source/filter/lotus/op.cxx +++ b/sc/source/filter/lotus/op.cxx @@ -647,7 +647,7 @@ void OP_ApplyPatternArea123( SvStream& rStream ) std::map::iterator loc = aLotusPatternPool.find( nData ); // apparently, files with invalid index occur in the wild -> don't crash then - DBG_ASSERT( loc != aLotusPatternPool.end(), "invalid format index" ); + OSL_ENSURE( loc != aLotusPatternPool.end(), "invalid format index" ); if ( loc != aLotusPatternPool.end() ) pDoc->ApplyPatternAreaTab( nCol, nRow, nCol + nColCount - 1, nRow + nRowCount - 1, static_cast< SCTAB >( nTab + i ), loc->second ); } diff --git a/sc/source/filter/lotus/tool.cxx b/sc/source/filter/lotus/tool.cxx index 3688066fcb6a..3084f75e02c7 100644 --- a/sc/source/filter/lotus/tool.cxx +++ b/sc/source/filter/lotus/tool.cxx @@ -87,7 +87,7 @@ SCROW LotusRangeList::nEingRow; void PutFormString( SCCOL nCol, SCROW nRow, SCTAB nTab, sal_Char* pString ) { // Label-Format-Auswertung - DBG_ASSERT( pString != NULL, "PutFormString(): pString == NULL" ); + OSL_ENSURE( pString != NULL, "PutFormString(): pString == NULL" ); sal_Char cForm; SvxHorJustifyItem* pJustify = NULL; @@ -490,7 +490,7 @@ LR_ID LotusRangeList::GetIndex( const LotusRange &rRef ) void LotusRangeList::Append( LotusRange* pLR, const String& rName ) { - DBG_ASSERT( pLR, "*LotusRangeList::Append(): das wird nichts!" ); + OSL_ENSURE( pLR, "*LotusRangeList::Append(): das wird nichts!" ); List::Insert( pLR, CONTAINER_APPEND ); ScTokenArray aTokArray; -- cgit v1.2.3