diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2013-09-09 09:07:24 +0200 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2013-09-09 10:13:23 +0200 |
commit | 2e08ed63f070fb15b933fe9dc4c37f2daa6d4295 (patch) | |
tree | 593708be6942c704cd059dcf69acb3593bd0dd75 /starmath/inc | |
parent | ed624d7f9c63c19e92862a926641103f9bdec071 (diff) |
OSL_ENSURE -> SAL_WARN_IF
Change-Id: I2807797c6906ae5aaa8aabf7298df5fd8604e96a
Diffstat (limited to 'starmath/inc')
-rw-r--r-- | starmath/inc/caret.hxx | 2 | ||||
-rw-r--r-- | starmath/inc/rect.hxx | 2 | ||||
-rw-r--r-- | starmath/inc/utility.hxx | 6 | ||||
-rw-r--r-- | starmath/inc/visitors.hxx | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/starmath/inc/caret.hxx b/starmath/inc/caret.hxx index 7969b51721b5..2736617999cb 100644 --- a/starmath/inc/caret.hxx +++ b/starmath/inc/caret.hxx @@ -169,7 +169,7 @@ public: SmCaretPosGraphEntry* Add(SmCaretPos pos, SmCaretPosGraphEntry* left = NULL, SmCaretPosGraphEntry* right = NULL){ - OSL_ENSURE(pos.Index >= 0, "Index shouldn't be -1!"); + SAL_WARN_IF( pos.Index < 0, "starmath", "Index shouldn't be -1!" ); return Add(SmCaretPosGraphEntry(pos, left, right)); } /** Get an iterator for this graph */ diff --git a/starmath/inc/rect.hxx b/starmath/inc/rect.hxx index 17ed2da1ced1..2886a57631e4 100644 --- a/starmath/inc/rect.hxx +++ b/starmath/inc/rect.hxx @@ -225,7 +225,7 @@ inline void SmRect::CopyMBL(const SmRect &rRect) inline long SmRect::GetBaseline() const { - OSL_ENSURE(HasBaseline(), "Sm: Baseline nicht vorhanden"); + SAL_WARN_IF( !HasBaseline(), "starmath", "Baseline does not exist" ); return nBaseline; } diff --git a/starmath/inc/utility.hxx b/starmath/inc/utility.hxx index e20c96ed32c6..f66ecdf820e8 100644 --- a/starmath/inc/utility.hxx +++ b/starmath/inc/utility.hxx @@ -33,7 +33,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. { - OSL_ENSURE(nNumPts >= 0, "Sm : Ooops..."); + SAL_WARN_IF( nNumPts < 0, "starmath", "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 @@ -53,7 +53,7 @@ inline Fraction Sm100th_mmToPts(long nNum100th_mm) // returns the length (in points) that corresponds to the length // 'nNum100th_mm' (in 100th of mm). { - OSL_ENSURE(nNum100th_mm >= 0, "Sm : Ooops..."); + SAL_WARN_IF( nNum100th_mm < 0, "starmath", "Ooops..." ); Fraction aTmp (7227L, 254000L); return aTmp *= Fraction(nNum100th_mm); } @@ -61,7 +61,7 @@ inline Fraction Sm100th_mmToPts(long nNum100th_mm) inline long SmRoundFraction(const Fraction &rFrac) { - OSL_ENSURE(rFrac > Fraction(), "Sm : Ooops..."); + SAL_WARN_IF( rFrac <= Fraction(), "starmath", "Ooops..." ); return (rFrac.GetNumerator() + rFrac.GetDenominator() / 2) / rFrac.GetDenominator(); } diff --git a/starmath/inc/visitors.hxx b/starmath/inc/visitors.hxx index ef217632c94c..3e74c533fa54 100644 --- a/starmath/inc/visitors.hxx +++ b/starmath/inc/visitors.hxx @@ -165,7 +165,7 @@ public: SmCaretPos2LineVisitor( OutputDevice *pDevice, SmCaretPos position ) { pDev = pDevice; pos = position; - OSL_ENSURE( position.IsValid( ), "Cannot draw invalid position!" ); + SAL_WARN_IF( !position.IsValid(), "starmath", "Cannot draw invalid position!" ); pos.pSelectedNode->Accept( this ); } |