Replace DBG_ stuff with OSL_ equivalents in writer
This commit is contained in:
parent
eb4e85a63b
commit
b0ceefe1ab
12 changed files with 13 additions and 31 deletions
|
@ -234,7 +234,7 @@ inline void SmRect::CopyMBL(const SmRect &rRect)
|
|||
|
||||
inline long SmRect::GetBaseline() const
|
||||
{
|
||||
DBG_ASSERT(HasBaseline(), "Sm: Baseline nicht vorhanden");
|
||||
OSL_ENSURE(HasBaseline(), "Sm: Baseline nicht vorhanden");
|
||||
return nBaseline;
|
||||
}
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ inline long SmPtsTo100th_mm(long nNumPts)
|
|||
// 72.27 [pt] = 1 [inch] = 2,54 [cm] = 2540 [100th of mm].
|
||||
// result is being rounded to the nearest integer.
|
||||
{
|
||||
DBG_ASSERT(nNumPts >= 0, "Sm : Ooops...");
|
||||
OSL_ENSURE(nNumPts >= 0, "Sm : Ooops...");
|
||||
// broken into multiple and fraction of 'nNumPts' to reduce chance
|
||||
// of overflow
|
||||
// (7227 / 2) is added in order to round to the nearest integer
|
||||
|
@ -70,7 +70,7 @@ inline Fraction Sm100th_mmToPts(long nNum100th_mm)
|
|||
// returns the length (in points) that corresponds to the length
|
||||
// 'nNum100th_mm' (in 100th of mm).
|
||||
{
|
||||
DBG_ASSERT(nNum100th_mm >= 0, "Sm : Ooops...");
|
||||
OSL_ENSURE(nNum100th_mm >= 0, "Sm : Ooops...");
|
||||
Fraction aTmp (7227L, 254000L);
|
||||
return aTmp *= Fraction(nNum100th_mm);
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ inline Fraction Sm100th_mmToPts(long nNum100th_mm)
|
|||
|
||||
inline long SmRoundFraction(const Fraction &rFrac)
|
||||
{
|
||||
DBG_ASSERT(rFrac > Fraction(), "Sm : Ooops...");
|
||||
OSL_ENSURE(rFrac > Fraction(), "Sm : Ooops...");
|
||||
return (rFrac.GetNumerator() + rFrac.GetDenominator() / 2) / rFrac.GetDenominator();
|
||||
}
|
||||
|
||||
|
|
|
@ -1835,7 +1835,7 @@ SvXMLImportContext *SmXMLOfficeContext_Impl::CreateChildContext(sal_uInt16 nPref
|
|||
if ( XML_NAMESPACE_OFFICE == nPrefix &&
|
||||
rLocalName == GetXMLToken(XML_META) )
|
||||
{
|
||||
DBG_WARNING("XML_TOK_DOC_META: should not have come here, maybe document is invalid?");
|
||||
OSL_FAIL("XML_TOK_DOC_META: should not have come here, maybe document is invalid?");
|
||||
}
|
||||
else if ( XML_NAMESPACE_OFFICE == nPrefix &&
|
||||
rLocalName == GetXMLToken(XML_SETTINGS) )
|
||||
|
|
|
@ -646,7 +646,7 @@ void SmNode::DumpAsDot(std::ostream &out, String* label, int number, int& id, in
|
|||
|
||||
long SmNode::GetFormulaBaseline() const
|
||||
{
|
||||
DBG_ASSERT( 0, "This dummy implementation should not have been called." );
|
||||
OSL_FAIL( "This dummy implementation should not have been called." );
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -501,7 +501,7 @@ void SmParser::NextToken()
|
|||
#if OSL_DEBUG_LEVEL > 1
|
||||
if (!IsDelimiter( m_aBufferString, static_cast< xub_StrLen >(aRes.EndPos) ))
|
||||
{
|
||||
DBG_WARNING( "identifier really finished? (compatibility!)" );
|
||||
OSL_FAIL( "identifier really finished? (compatibility!)" );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -541,7 +541,7 @@ void SmParser::NextToken()
|
|||
#if OSL_DEBUG_LEVEL > 1
|
||||
if (!IsDelimiter( m_aBufferString, static_cast< xub_StrLen >(aRes.EndPos) ))
|
||||
{
|
||||
DBG_WARNING( "identifier really finished? (compatibility!)" );
|
||||
OSL_FAIL( "identifier really finished? (compatibility!)" );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -218,7 +218,7 @@ bool SmSymbolManager::AddOrReplaceSymbol( const SmSym &rSymbol, bool bForceChang
|
|||
OSL_ENSURE( bAdded, "failed to add symbol" );
|
||||
if (bAdded)
|
||||
m_bModified = true;
|
||||
DBG_ASSERT( bAdded || (pFound && !bSymbolConflict), "AddOrReplaceSymbol: unresolved symbol conflict" );
|
||||
OSL_ENSURE( bAdded || (pFound && !bSymbolConflict), "AddOrReplaceSymbol: unresolved symbol conflict" );
|
||||
}
|
||||
|
||||
return bAdded;
|
||||
|
|
|
@ -171,7 +171,7 @@ void SmGraphicWindow::MouseButtonDown(const MouseEvent& rMEvt)
|
|||
// set formula-cursor and selection of edit window according to the
|
||||
// position clicked at
|
||||
//
|
||||
DBG_ASSERT(rMEvt.GetClicks() > 0, "Sm : 0 clicks");
|
||||
OSL_ENSURE(rMEvt.GetClicks() > 0, "Sm : 0 clicks");
|
||||
if ( rMEvt.IsLeft() )
|
||||
{
|
||||
// get click position relativ to formula
|
||||
|
@ -878,7 +878,7 @@ IMPL_LINK( SmCmdBoxWindow, InitialFocusTimerHdl, Timer *, EMPTYARG /*pTimer*/ )
|
|||
}
|
||||
catch (uno::Exception &)
|
||||
{
|
||||
DBG_ASSERT( 0, "failed to properly set initial focus to edit window" );
|
||||
OSL_FAIL( "failed to properly set initial focus to edit window" );
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -727,7 +727,7 @@ void SmDrawingVisitor::Visit( SmRectangleNode* pNode )
|
|||
aTmp.Top( ) += nTmpBorderWidth;
|
||||
aTmp.Bottom( ) -= nTmpBorderWidth;
|
||||
|
||||
DBG_ASSERT( aTmp.GetHeight( ) > 0 && aTmp.GetWidth( ) > 0,
|
||||
OSL_ENSURE( aTmp.GetHeight( ) > 0 && aTmp.GetWidth( ) > 0,
|
||||
"Sm: leeres Rechteck" );
|
||||
|
||||
//! avoid GROWING AND SHRINKING of drawn rectangle when constantly
|
||||
|
|
|
@ -252,9 +252,6 @@ protected:
|
|||
|
||||
public:
|
||||
|
||||
#if OSL_DEBUG_LEVEL > 1
|
||||
virtual ~SwFieldType();
|
||||
#endif
|
||||
static const String& GetTypeStr( sal_uInt16 nTypeId );
|
||||
|
||||
// Only in derived classes.
|
||||
|
|
|
@ -83,7 +83,6 @@ sal_uInt16 lcl_GetLanguageOfFormat( sal_uInt16 nLng, sal_uLong nFmt,
|
|||
|
||||
SvStringsDtor* SwFieldType::pFldNames = 0;
|
||||
|
||||
DBG_NAME(SwFieldType)
|
||||
|
||||
sal_uInt16 aTypeTab[] = {
|
||||
/* RES_DBFLD */ TYP_DBFLD,
|
||||
|
@ -152,18 +151,8 @@ SwFieldType::SwFieldType( sal_uInt16 nWhichId )
|
|||
: SwModify(0),
|
||||
nWhich( nWhichId )
|
||||
{
|
||||
DBG_CTOR( SwFieldType, 0 );
|
||||
}
|
||||
|
||||
#if OSL_DEBUG_LEVEL > 1
|
||||
|
||||
SwFieldType::~SwFieldType()
|
||||
{
|
||||
DBG_DTOR( SwFieldType, 0 );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
const String& SwFieldType::GetName() const
|
||||
{
|
||||
return aEmptyStr;
|
||||
|
|
|
@ -863,6 +863,6 @@ void SwFrmChangesLeave::Leave()
|
|||
SwProtocol::Record( pFrm, PROT_FRMCHANGES, 0, &aFrm );
|
||||
}
|
||||
|
||||
#endif // DBG_UTIL
|
||||
#endif // OSL_DEBUG_LEVEL > 1
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
|
|
@ -240,7 +240,6 @@ namespace
|
|||
DelayedFileDeletion& operator=( const DelayedFileDeletion& ); // never implemented
|
||||
};
|
||||
|
||||
DBG_NAME( DelayedFileDeletion )
|
||||
//------------------------------------------------------
|
||||
DelayedFileDeletion::DelayedFileDeletion( const Reference< XModel >& _rxModel, const String& _rTemporaryFile )
|
||||
:
|
||||
|
@ -248,8 +247,6 @@ namespace
|
|||
,m_sTemporaryFile( _rTemporaryFile )
|
||||
,m_nPendingDeleteAttempts( 0 )
|
||||
{
|
||||
DBG_CTOR( DelayedFileDeletion, NULL );
|
||||
|
||||
osl_incrementInterlockedCount( &m_refCount );
|
||||
try
|
||||
{
|
||||
|
@ -364,7 +361,6 @@ namespace
|
|||
//------------------------------------------------------
|
||||
DelayedFileDeletion::~DelayedFileDeletion( )
|
||||
{
|
||||
DBG_DTOR( DelayedFileDeletion, NULL );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue