summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--starmath/inc/rect.hxx2
-rw-r--r--starmath/inc/utility.hxx6
-rw-r--r--starmath/source/mathmlimport.cxx2
-rw-r--r--starmath/source/node.cxx2
-rw-r--r--starmath/source/parse.cxx4
-rw-r--r--starmath/source/symbol.cxx2
-rw-r--r--starmath/source/view.cxx4
-rw-r--r--starmath/source/visitors.cxx2
-rw-r--r--sw/inc/fldbas.hxx3
-rw-r--r--sw/source/core/fields/fldbas.cxx11
-rw-r--r--sw/source/core/layout/dbg_lay.cxx2
-rw-r--r--sw/source/ui/uno/unomailmerge.cxx4
12 files changed, 13 insertions, 31 deletions
diff --git a/starmath/inc/rect.hxx b/starmath/inc/rect.hxx
index e486b1f7c7d5..ca5c289f416a 100644
--- a/starmath/inc/rect.hxx
+++ b/starmath/inc/rect.hxx
@@ -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;
}
diff --git a/starmath/inc/utility.hxx b/starmath/inc/utility.hxx
index a4e70e1b648d..58e59613d6a3 100644
--- a/starmath/inc/utility.hxx
+++ b/starmath/inc/utility.hxx
@@ -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();
}
diff --git a/starmath/source/mathmlimport.cxx b/starmath/source/mathmlimport.cxx
index 5db0777f34a9..a70f3fe31096 100644
--- a/starmath/source/mathmlimport.cxx
+++ b/starmath/source/mathmlimport.cxx
@@ -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) )
diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index 59266934dd8d..1df2de00ec53 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -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;
}
diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx
index a3d23c4741b4..bd6e250f9fea 100644
--- a/starmath/source/parse.cxx
+++ b/starmath/source/parse.cxx
@@ -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
}
diff --git a/starmath/source/symbol.cxx b/starmath/source/symbol.cxx
index b0deeb4d93fe..21b9051d64b9 100644
--- a/starmath/source/symbol.cxx
+++ b/starmath/source/symbol.cxx
@@ -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;
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index 21253b0fad86..c254416a6a60 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -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;
}
diff --git a/starmath/source/visitors.cxx b/starmath/source/visitors.cxx
index 8a8341faaa9f..5e8a574eab7b 100644
--- a/starmath/source/visitors.cxx
+++ b/starmath/source/visitors.cxx
@@ -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
diff --git a/sw/inc/fldbas.hxx b/sw/inc/fldbas.hxx
index 365ad2550a8e..843edcf39e49 100644
--- a/sw/inc/fldbas.hxx
+++ b/sw/inc/fldbas.hxx
@@ -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.
diff --git a/sw/source/core/fields/fldbas.cxx b/sw/source/core/fields/fldbas.cxx
index b14864d52c98..72a3ba4a848c 100644
--- a/sw/source/core/fields/fldbas.cxx
+++ b/sw/source/core/fields/fldbas.cxx
@@ -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;
diff --git a/sw/source/core/layout/dbg_lay.cxx b/sw/source/core/layout/dbg_lay.cxx
index 8f70b6925a0a..5ea236017f85 100644
--- a/sw/source/core/layout/dbg_lay.cxx
+++ b/sw/source/core/layout/dbg_lay.cxx
@@ -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: */
diff --git a/sw/source/ui/uno/unomailmerge.cxx b/sw/source/ui/uno/unomailmerge.cxx
index 66054e61d833..e7fd53293082 100644
--- a/sw/source/ui/uno/unomailmerge.cxx
+++ b/sw/source/ui/uno/unomailmerge.cxx
@@ -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 );
}
}