[Libreoffice-commits] .: 2 commits - starmath/inc starmath/source sw/inc sw/source

Petr Mladek pmladek at kemper.freedesktop.org
Wed Jun 8 08:10:04 PDT 2011


 starmath/inc/rect.hxx                  |    3 +--
 starmath/inc/symbol.hxx                |    1 -
 starmath/inc/types.hxx                 |    2 --
 starmath/inc/utility.hxx               |    6 +++---
 starmath/source/mathmlimport.cxx       |    2 +-
 starmath/source/node.cxx               |    2 +-
 starmath/source/parse.cxx              |    4 ++--
 starmath/source/symbol.cxx             |    2 +-
 starmath/source/view.cxx               |    4 ++--
 starmath/source/visitors.cxx           |    2 +-
 sw/inc/fldbas.hxx                      |    3 ---
 sw/source/core/bastyp/swcache.cxx      |    1 -
 sw/source/core/bastyp/swregion.cxx     |    4 ----
 sw/source/core/doc/sortopt.cxx         |    2 --
 sw/source/core/fields/fldbas.cxx       |   11 -----------
 sw/source/core/layout/dbg_lay.cxx      |    2 +-
 sw/source/core/text/blink.cxx          |    2 --
 sw/source/core/unocore/unoevtlstnr.cxx |    1 -
 sw/source/ui/uno/unomailmerge.cxx      |    4 ----
 19 files changed, 13 insertions(+), 45 deletions(-)

New commits:
commit 200144ab88ed5eab45432e216f61bfab87b0fe55
Author: Jacek Wolszczak <shutdownrunner at gmail.com>
Date:   Sun Jun 5 18:54:38 2011 +0200

    Remove the remaining debug.hxx includes in writer

diff --git a/starmath/inc/rect.hxx b/starmath/inc/rect.hxx
index 85dc824..77de779 100644
--- a/starmath/inc/rect.hxx
+++ b/starmath/inc/rect.hxx
@@ -34,7 +34,6 @@
 #include <tools/gen.hxx>
 #include <vcl/outdev.hxx>
 #include <vcl/metric.hxx>
-#include <tools/debug.hxx>
 
 #include "format.hxx"
 
diff --git a/starmath/inc/symbol.hxx b/starmath/inc/symbol.hxx
index 999fde6..1074f75 100644
--- a/starmath/inc/symbol.hxx
+++ b/starmath/inc/symbol.hxx
@@ -30,7 +30,6 @@
 #define SYMBOL_HXX
 
 #include <vcl/font.hxx>
-#include <tools/debug.hxx>
 #include <tools/dynary.hxx>
 #include <svl/lstner.hxx>
 #include <svl/svarray.hxx>
diff --git a/starmath/inc/types.hxx b/starmath/inc/types.hxx
index d72df24..93514f1 100644
--- a/starmath/inc/types.hxx
+++ b/starmath/inc/types.hxx
@@ -30,8 +30,6 @@
 #define TYPES_HXX
 
 #include <sal/types.h>
-#include <tools/debug.hxx>
-
 #define FONTNAME_MATH   "OpenSymbol"
 
 /////////////////////////////////////////////////////////////////
diff --git a/sw/source/core/bastyp/swcache.cxx b/sw/source/core/bastyp/swcache.cxx
index 84efc95..2c63b26 100644
--- a/sw/source/core/bastyp/swcache.cxx
+++ b/sw/source/core/bastyp/swcache.cxx
@@ -29,7 +29,6 @@
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sw.hxx"
 
-#include <tools/debug.hxx>
 #include <swcache.hxx>
 
 SV_IMPL_PTRARR(SwCacheObjArr,SwCacheObj*);
diff --git a/sw/source/core/bastyp/swregion.cxx b/sw/source/core/bastyp/swregion.cxx
index 1c04921..a00dbe0 100644
--- a/sw/source/core/bastyp/swregion.cxx
+++ b/sw/source/core/bastyp/swregion.cxx
@@ -29,10 +29,6 @@
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sw.hxx"
 
-
-
-
-#include <tools/debug.hxx>
 #include "swtypes.hxx"
 #include "swrect.hxx"
 #include "swregion.hxx"
diff --git a/sw/source/core/doc/sortopt.cxx b/sw/source/core/doc/sortopt.cxx
index 4c3ddb8..3f6d62b 100644
--- a/sw/source/core/doc/sortopt.cxx
+++ b/sw/source/core/doc/sortopt.cxx
@@ -29,8 +29,6 @@
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sw.hxx"
 
-
-#include <tools/debug.hxx>
 #include <i18npool/lang.h>
 #include <sortopt.hxx>
 
diff --git a/sw/source/core/text/blink.cxx b/sw/source/core/text/blink.cxx
index 8b66234..f120e38 100644
--- a/sw/source/core/text/blink.cxx
+++ b/sw/source/core/text/blink.cxx
@@ -29,8 +29,6 @@
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sw.hxx"
 
-
-#include <tools/debug.hxx>
 #include "viewsh.hxx"
 #include "rootfrm.hxx"  // GetOleShell()
 #include "txtfrm.hxx"	// FindRootFrm()
diff --git a/sw/source/core/unocore/unoevtlstnr.cxx b/sw/source/core/unocore/unoevtlstnr.cxx
index d87af61..a50d10c 100644
--- a/sw/source/core/unocore/unoevtlstnr.cxx
+++ b/sw/source/core/unocore/unoevtlstnr.cxx
@@ -31,7 +31,6 @@
 
 
 #include <unoevtlstnr.hxx>
-#include <tools/debug.hxx>
 #include <com/sun/star/lang/EventObject.hpp>
 #include <com/sun/star/lang/XEventListener.hpp>
 
commit 1355180170ac3618d8d9cd64fa9103db9647c1f6
Author: Jacek Wolszczak <shutdownrunner at gmail.com>
Date:   Sun Jun 5 10:08:38 2011 +0200

    Replace DBG_ stuff with OSL_ equivalents in writer

diff --git a/starmath/inc/rect.hxx b/starmath/inc/rect.hxx
index 29940f3..85dc824 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 ae374da..f94027c 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 b2a673d..b84ebce 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 299e420..15cc458 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 f2a86b9..2a678d0 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 0b87b39..ea5d0e9 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 3a099c3..ac4f6d9 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 8a8341f..5e8a574 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 baa1bc0..8267a95 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 db7170e..4e482dd 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 0005e2e..dfc3dae 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 6d6f166..8c1048d 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 );
     }
 }
 


More information about the Libreoffice-commits mailing list