summaryrefslogtreecommitdiff
path: root/starmath/inc/utility.hxx
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2013-09-09 09:07:24 +0200
committerThomas Arnhold <thomas@arnhold.org>2013-09-09 10:13:23 +0200
commit2e08ed63f070fb15b933fe9dc4c37f2daa6d4295 (patch)
tree593708be6942c704cd059dcf69acb3593bd0dd75 /starmath/inc/utility.hxx
parented624d7f9c63c19e92862a926641103f9bdec071 (diff)
OSL_ENSURE -> SAL_WARN_IF
Change-Id: I2807797c6906ae5aaa8aabf7298df5fd8604e96a
Diffstat (limited to 'starmath/inc/utility.hxx')
-rw-r--r--starmath/inc/utility.hxx6
1 files changed, 3 insertions, 3 deletions
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();
}