[Libreoffice-commits] core.git: sw/source

Stephan Bergmann sbergman at redhat.com
Wed Mar 27 23:59:02 PDT 2013


 sw/source/core/doc/htmltbl.cxx |   12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

New commits:
commit 0f60c1a50a98683e44325114e4cc19b355c87f49
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Mar 28 07:58:27 2013 +0100

    OSL_ENSURE -> SAL_WARN_IF (silence -Werror=unused-macros)
    
    Change-Id: I34cb3308916c95b95d3197d207c49a3799760163

diff --git a/sw/source/core/doc/htmltbl.cxx b/sw/source/core/doc/htmltbl.cxx
index 5f1a759..6260ec3 100644
--- a/sw/source/core/doc/htmltbl.cxx
+++ b/sw/source/core/doc/htmltbl.cxx
@@ -1547,17 +1547,13 @@ static void lcl_ResizeBox( const SwTableBox* pBox, sal_uInt16* pWidth )
 
 static void lcl_ResizeLine( const SwTableLine* pLine, sal_uInt16 *pWidth )
 {
-#if OSL_DEBUG_LEVEL > 0
     sal_uInt16 nOldWidth = *pWidth;
-#endif
     *pWidth = 0;
     BOOST_FOREACH( const SwTableBox* pBox, pLine->GetTabBoxes() )
         lcl_ResizeBox(pBox, pWidth );
 
-#if OSL_DEBUG_LEVEL > 0
-    OSL_ENSURE( !nOldWidth || Abs(*pWidth-nOldWidth) < COLFUZZY,
-            "A box's rows have all a different length." );
-#endif
+    SAL_WARN_IF( nOldWidth && Abs(*pWidth-nOldWidth) >= COLFUZZY, "sw.core",
+                 "A box's rows have all a different length" );
 }
 
 void SwHTMLTableLayout::SetWidths( sal_Bool bCallPass2, sal_uInt16 nAbsAvail,
@@ -1626,8 +1622,8 @@ void SwHTMLTableLayout::SetWidths( sal_Bool bCallPass2, sal_uInt16 nAbsAvail,
         sal_uInt16 nCalcTabWidth = 0;
         BOOST_FOREACH( const SwTableLine *pLine, pSwTable->GetTabLines() )
             lcl_ResizeLine( pLine, &nCalcTabWidth );
-        OSL_ENSURE( Abs( nRelTabWidth-nCalcTabWidth ) < COLFUZZY,
-                "Table width is not equal to the row width." );
+        SAL_WARN_IF( Abs( nRelTabWidth-nCalcTabWidth ) >= COLFUZZY, "sw.core",
+                     "Table width is not equal to the row width" );
 
         // Lock the table format when altering it, or else the box formats
         // are altered again.


More information about the Libreoffice-commits mailing list