diff options
author | Tor Lillqvist <tml@collabora.com> | 2014-03-28 16:43:39 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2014-03-28 16:52:36 +0200 |
commit | ae00e71afd36f7215669c34e8ea8cafaeed6e468 (patch) | |
tree | de3aa1726cb66a996f148e2a8ce8207ae4c2b612 | |
parent | Remove remaining DBG_CTOR etc. remnants from sc (diff) | |
download | core-ae00e71afd36f7215669c34e8ea8cafaeed6e468.tar.gz core-ae00e71afd36f7215669c34e8ea8cafaeed6e468.zip |
Bin rest of DBG_WARNING[123]
Change-Id: Iaaf36d012e353f73f083c9c0ebbbb6d0953b16c8
-rw-r--r-- | drawinglayer/source/processor2d/vclprocessor2d.cxx | 4 | ||||
-rw-r--r-- | include/sal/log-areas.dox | 2 | ||||
-rw-r--r-- | include/tools/debug.hxx | 11 | ||||
-rw-r--r-- | linguistic/source/gciterator.cxx | 6 | ||||
-rw-r--r-- | sd/source/core/PageListWatcher.cxx | 12 | ||||
-rw-r--r-- | sfx2/source/appl/fileobj.cxx | 14 | ||||
-rw-r--r-- | sfx2/source/doc/SfxDocumentMetaData.cxx | 39 | ||||
-rw-r--r-- | vcl/source/gdi/bmpfast.cxx | 50 |
8 files changed, 37 insertions, 101 deletions
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx index a0e8b405df86..b7c3bfe00ff8 100644 --- a/drawinglayer/source/processor2d/vclprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx @@ -192,7 +192,7 @@ namespace drawinglayer switch( pTCPP->getTextEmphasisMark() ) { default: - DBG_WARNING1( "DrawingLayer: Unknown EmphasisMark style (%d)!", pTCPP->getTextEmphasisMark() ); + SAL_WARN("drawinglayer", "Unknown EmphasisMark style " << pTCPP->getTextEmphasisMark() ); // fall through case primitive2d::TEXT_EMPHASISMARK_NONE: eFontEmphasisMark = EMPHASISMARK_NONE; break; case primitive2d::TEXT_EMPHASISMARK_DOT: eFontEmphasisMark = EMPHASISMARK_DOT; break; @@ -217,7 +217,7 @@ namespace drawinglayer switch( pTCPP->getTextRelief() ) { default: - DBG_WARNING1( "DrawingLayer: Unknown Relief style (%d)!", pTCPP->getTextRelief() ); + SAL_WARN( "drawinglayer", "Unknown Relief style " << pTCPP->getTextRelief() ); // fall through case primitive2d::TEXT_RELIEF_NONE: eFontRelief = RELIEF_NONE; break; case primitive2d::TEXT_RELIEF_EMBOSSED: eFontRelief = RELIEF_EMBOSSED; break; diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox index 792d4a74f113..60a6aace3c71 100644 --- a/include/sal/log-areas.dox +++ b/include/sal/log-areas.dox @@ -122,6 +122,7 @@ certain functionality. @section Draw @li @c sd +@li @c sd.core @li @c sd.filter @li @c sd.fwk @li @c sd.slideshow @@ -451,6 +452,7 @@ certain functionality. @li @c configmgr @li @c cppcanvas @li @c cppcanvas.emf +@li @c drawinglayer @li @c helpcompiler @li @c linguistic @li @c oox diff --git a/include/tools/debug.hxx b/include/tools/debug.hxx index 5574d0d4683e..de606a1bd4d3 100644 --- a/include/tools/debug.hxx +++ b/include/tools/debug.hxx @@ -35,7 +35,7 @@ Because the assertion macro (DBG_ASSERT) has been used for true assertions as well as to log warnings, it maps to SAL_WARN instead of standard assert. The warning and error macros (DBG_ASSERTWARNING, - DBG_WARNING, DBG_WARNING1, ..., DBG_WARNING3, DBG_ERRORFILE) all map to + DBG_WARNING, DBG_ERRORFILE) all map to SAL_INFO. */ @@ -317,12 +317,6 @@ public: #define DBG_WARNING( aWarning ) \ SAL_DETAIL_INFO_IF_FORMAT(true, "legacy.tools", aWarning) -#define DBG_WARNING1( aWarning, x1 ) \ - SAL_DETAIL_INFO_IF_FORMAT(true, "legacy.tools", aWarning, x1) -#define DBG_WARNING2( aWarning, x1, x2 ) \ - SAL_DETAIL_INFO_IF_FORMAT(true, "legacy.tools", aWarning, x1, x2) -#define DBG_WARNING3( aWarning, x1, x2, x3 ) \ - SAL_DETAIL_INFO_IF_FORMAT(true, "legacy.tools", aWarning, x1, x2, x3) #define DBG_ERRORFILE( aError ) \ SAL_DETAIL_INFO_IF_FORMAT(true, "legacy.tools", aError, __FILE__, __LINE__) @@ -371,9 +365,6 @@ typedef const sal_Char* (*DbgUsr)(const void* pThis ); #define DBG_ASSERTWARNING( sCon, aWarning ) ((void)0) #define DBG_ASSERT( sCon, aError ) ((void)0) #define DBG_WARNING( aWarning ) ((void)0) -#define DBG_WARNING1( aWarning, x1 ) ((void)0) -#define DBG_WARNING2( aWarning, x1, x2 ) ((void)0) -#define DBG_WARNING3( aWarning, x1, x2, x3 ) ((void)0) #define DBG_ERRORFILE( aError ) ((void)0) #define DBG_TESTSOLARMUTEX() ((void)0) diff --git a/linguistic/source/gciterator.cxx b/linguistic/source/gciterator.cxx index e96c9d042b7e..73c010b6667e 100644 --- a/linguistic/source/gciterator.cxx +++ b/linguistic/source/gciterator.cxx @@ -860,10 +860,8 @@ throw (uno::RuntimeException, std::exception) } catch (const ::uno::Exception &rE) { - (void) rE; - // ignore - DBG_WARNING1("processLinguServiceEvent: exception:\n%s", - OUStringToOString(rE.Message, RTL_TEXTENCODING_UTF8).getStr()); + // ignore + SAL_WARN("linguistic", "processLinguServiceEvent: exception: " << rE.Message); } } } diff --git a/sd/source/core/PageListWatcher.cxx b/sd/source/core/PageListWatcher.cxx index 5b8933209e7e..ed73841cf963 100644 --- a/sd/source/core/PageListWatcher.cxx +++ b/sd/source/core/PageListWatcher.cxx @@ -97,10 +97,8 @@ SdPage* ImpPageListWatcher::GetSdPage(PageKind ePgKind, sal_uInt32 nPgNum) pRetval = maPageVectorStandard[nPgNum]; else { - DBG_ASSERT(nPgNum <= maPageVectorStandard.size(), - "ImpPageListWatcher::GetSdPage(PK_STANDARD): access out of range"); - DBG_WARNING2 (" %d > %d", - nPgNum, nPgNum<maPageVectorStandard.size()); + SAL_WARN( "sd.core", + "ImpPageListWatcher::GetSdPage(PK_STANDARD): page number " << nPgNum << " >= " << maPageVectorStandard.size() ); } break; } @@ -110,10 +108,8 @@ SdPage* ImpPageListWatcher::GetSdPage(PageKind ePgKind, sal_uInt32 nPgNum) pRetval = maPageVectorNotes[nPgNum]; else { - DBG_ASSERT(nPgNum <= maPageVectorNotes.size(), - "ImpPageListWatcher::GetSdPage(PK_NOTES): access out of range"); - DBG_WARNING2(" %d > %d", - nPgNum, nPgNum<maPageVectorNotes.size()); + SAL_WARN( "sd.core", + "ImpPageListWatcher::GetSdPage(PK_NOTES): page number " << nPgNum << " >= " << maPageVectorStandard.size() ); } break; } diff --git a/sfx2/source/appl/fileobj.cxx b/sfx2/source/appl/fileobj.cxx index 39db16dee7d6..509b17bc453b 100644 --- a/sfx2/source/appl/fileobj.cxx +++ b/sfx2/source/appl/fileobj.cxx @@ -357,23 +357,13 @@ sal_Bool SvFileObject::GetGraphic_Impl( Graphic& rGrf, SvStream* pStream ) if( pStream && ERRCODE_IO_PENDING == pStream->GetError() ) pStream->ResetError(); -#ifdef DBG_UTIL if( nRes ) { if( xMed.Is() && !pStream ) - { - DBG_WARNING3( "Graphic error [%d] - [%s] URL[%s]", - nRes, - xMed->GetPhysicalName().getStr(), - sFileNm.getStr() ); - } + SAL_WARN( "sfx.appl", "Graphic error [" << nRes << "] - [" << xMed->GetPhysicalName() << "] URL[" << sFileNm << "]" ); else - { - DBG_WARNING2( "Graphic error [%d] - [%s]", - nRes, sFileNm.getStr() ); - } + SAL_WARN( "sfx.appl", "Graphic error [" << nRes << "] - [" << sFileNm << "]" ); } -#endif return GRFILTER_OK == nRes; } diff --git a/sfx2/source/doc/SfxDocumentMetaData.cxx b/sfx2/source/doc/SfxDocumentMetaData.cxx index 3696aa6be32d..83e8d7e7e0ab 100644 --- a/sfx2/source/doc/SfxDocumentMetaData.cxx +++ b/sfx2/source/doc/SfxDocumentMetaData.cxx @@ -526,8 +526,7 @@ textToDateOrDateTime(css::util::Date & io_rd, css::util::DateTime & io_rdt, &io_rd, io_rdt, o_rIsDateTime, &o_rTimeZone, i_text)) { return true; } else { - DBG_WARNING1("SfxDocumentMetaData: invalid date: %s", - OUStringToOString(i_text, RTL_TEXTENCODING_UTF8).getStr()); + SAL_WARN("sfx.doc", "Invalid date: " << i_text ); return false; } } @@ -539,8 +538,7 @@ textToDateTime(css::util::DateTime & io_rdt, const OUString& i_text) throw () if (::sax::Converter::parseDateTime(io_rdt, 0, i_text)) { return true; } else { - DBG_WARNING1("SfxDocumentMetaData: invalid date: %s", - OUStringToOString(i_text, RTL_TEXTENCODING_UTF8).getStr()); + SAL_WARN("sfx.doc", "Invalid date: " << i_text); return false; } } @@ -592,8 +590,7 @@ throw () if (::sax::Converter::convertDuration(io_rDur, i_rText)) { return true; } else { - DBG_WARNING1("SfxDocumentMetaData: invalid duration: %s", - OUStringToOString(i_rText, RTL_TEXTENCODING_UTF8).getStr()); + SAL_WARN("sfx.doc", "Invalid duration: " << i_rText ); return false; } } @@ -998,9 +995,7 @@ propsToStrings(css::uno::Reference<css::beans::XPropertySet> const & i_xPropSet) as.push_back(std::make_pair(vt, OUString("float"))); } else { - DBG_WARNING1("SfxDocumentMetaData: unsupported property type: %s", - OUStringToOString(any.getValueTypeName(), - RTL_TEXTENCODING_UTF8).getStr()); + SAL_WARN("sfx.doc", "Unsupported property type: " << any.getValueTypeName() ); continue; } attrs.push_back(as); @@ -1294,8 +1289,7 @@ void SAL_CALL SfxDocumentMetaData::init( if (::sax::Converter::convertDouble(d, text)) { any <<= d; } else { - DBG_WARNING1("SfxDocumentMetaData: invalid float: %s", - OUStringToOString(text, RTL_TEXTENCODING_UTF8).getStr()); + SAL_WARN("sfx.doc", "Invalid float: " << text); continue; } } else if ( type == "date" ) { @@ -1319,8 +1313,7 @@ void SAL_CALL SfxDocumentMetaData::init( } } } else { - DBG_WARNING1("SfxDocumentMetaData: invalid date: %s", - OUStringToOString(text, RTL_TEXTENCODING_UTF8).getStr()); + SAL_WARN("sfx.doc", "Invalid date: " << text); continue; } } else if ( type == "time" ) { @@ -1328,8 +1321,7 @@ void SAL_CALL SfxDocumentMetaData::init( if (textToDuration(ud, text)) { any <<= ud; } else { - DBG_WARNING1("SfxDocumentMetaData: invalid time: %s", - OUStringToOString(text, RTL_TEXTENCODING_UTF8).getStr()); + SAL_WARN("sfx.doc", "Invalid time: " << text); continue; } } else if ( type == "boolean" ) { @@ -1337,8 +1329,7 @@ void SAL_CALL SfxDocumentMetaData::init( if (::sax::Converter::convertBool(b, text)) { any <<= b; } else { - DBG_WARNING1("SfxDocumentMetaData: invalid boolean: %s", - OUStringToOString(text, RTL_TEXTENCODING_UTF8).getStr()); + SAL_WARN("sfx.doc", "Invalid boolean: " << text); continue; } } else if ( type == "string" || true) { // default @@ -1348,8 +1339,7 @@ void SAL_CALL SfxDocumentMetaData::init( m_xUserDefined->addProperty(name, css::beans::PropertyAttribute::REMOVABLE, any); } catch (const css::beans::PropertyExistException &) { - DBG_WARNING1("SfxDocumentMetaData: duplicate: %s", - OUStringToOString(name, RTL_TEXTENCODING_UTF8).getStr()); + SAL_WARN("sfx.doc", "Duplicate: " << name); // ignore; duplicate } catch (const css::beans::IllegalTypeException &) { OSL_TRACE("SfxDocumentMetaData: illegal type: %s", @@ -1746,8 +1736,7 @@ SfxDocumentMetaData::getDocumentStatistics() throw (css::uno::RuntimeException, if (!::sax::Converter::convertNumber(val, text, 0, std::numeric_limits<sal_Int32>::max()) || (val < 0)) { val = 0; - DBG_WARNING1("SfxDocumentMetaData: invalid number: %s", - OUStringToOString(text, RTL_TEXTENCODING_UTF8).getStr()); + SAL_WARN("sfx.doc", "Invalid number: " << text); } any <<= val; stat.Value = any; @@ -1778,9 +1767,7 @@ SfxDocumentMetaData::setDocumentStatistics( attributes.push_back(std::make_pair(s_stdStatAttrs[j], buf.makeStringAndClear())); } else { - DBG_WARNING1("SfxDocumentMetaData: invalid statistic: %s", - OUStringToOString(name, RTL_TEXTENCODING_UTF8) - .getStr()); + SAL_WARN("sfx.doc", "Invalid statistic: " << name); } break; } @@ -2217,9 +2204,7 @@ void SAL_CALL SfxDocumentMetaData::setModified( ::sal_Bool bModified ) throw; } catch (const css::uno::Exception & e) { // ignore - DBG_WARNING1("SfxDocumentMetaData::setModified: exception:\n%s", - OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8).getStr()); - (void) e; + SAL_WARN("sfx.doc", "setModified: exception: " << e.Message); } } else { if (xMB.is()) { diff --git a/vcl/source/gdi/bmpfast.cxx b/vcl/source/gdi/bmpfast.cxx index 30c1ccfa8399..949e21af0c16 100644 --- a/vcl/source/gdi/bmpfast.cxx +++ b/vcl/source/gdi/bmpfast.cxx @@ -446,16 +446,10 @@ inline bool ImplConvertFromBitmap( BitmapBuffer& rDst, const BitmapBuffer& rSrc return ImplConvertToBitmap<BMP_FORMAT_32BIT_TC_RGBA>( aSrcType, rDst, rSrc ); } -#ifdef DEBUG static int nNotAccelerated = 0; - if( rSrc.mnWidth * rSrc.mnHeight >= 4000 ) - if( ++nNotAccelerated == 100 ) - { - int foo = 0; (void)foo; // so no warning is created when building on pro with debug - DBG_WARNING2( "ImplConvertFromBitmap for not accelerated case (0x%04X->0x%04X)", - rSrc.mnFormat, rDst.mnFormat ); - } -#endif + SAL_WARN_IF( rSrc.mnWidth * rSrc.mnHeight >= 4000 && ++nNotAccelerated == 100, + "vcl.gdi", + "ImplConvertFromBitmap for not accelerated case (" << std::hex << rSrc.mnFormat << "->" << rDst.mnFormat << ")" ); return false; } @@ -561,17 +555,10 @@ bool ImplFastBitmapConversion( BitmapBuffer& rDst, const BitmapBuffer& rSrc, return ImplConvertFromBitmap<BMP_FORMAT_32BIT_TC_RGBA>( rDst, rSrc ); } -#ifdef DEBUG static int nNotAccelerated = 0; - if( rSrc.mnWidth * rSrc.mnHeight >= 4000 ) - { - if( ++nNotAccelerated == 100 ) - { - int foo = 0; (void)foo; // so no warning is created when building on pro with debug - DBG_WARNING2( "ImplFastBitmapConversion for not accelerated case (0x%04X->0x%04X)", rSrc.mnFormat, rDst.mnFormat ); - } - } -#endif + SAL_WARN_IF( rSrc.mnWidth * rSrc.mnHeight >= 4000 && ++nNotAccelerated == 100, + "vcl.gdi", + "ImplFastBitmapConversion for not accelerated case (" << std::hex << rSrc.mnFormat << "->" << rDst.mnFormat << ")" ); return false; } @@ -696,17 +683,10 @@ bool ImplBlendFromBitmap( BitmapBuffer& rDst, const BitmapBuffer& rSrc, const Bi return ImplBlendToBitmap<BMP_FORMAT_32BIT_TC_RGBA>( aSrcType, rDst, rSrc, rMsk ); } -#ifdef DEBUG static int nNotAccelerated = 0; - if( rSrc.mnWidth * rSrc.mnHeight >= 4000 ) - if( ++nNotAccelerated == 100 ) - { - int foo = 0; (void)foo; // so no warning is created when building on pro with debug - DBG_WARNING3( "ImplBlendFromBitmap for not accelerated case (0x%04X*0x%04X->0x%04X)", - rSrc.mnFormat, rMsk.mnFormat, rDst.mnFormat ); - } -#endif - + SAL_WARN_IF( rSrc.mnWidth * rSrc.mnHeight >= 4000 && ++nNotAccelerated == 100, + "vcl.gdi", + "ImplBlendFromBitmap for not accelerated case (" << std::hex << rSrc.mnFormat << "*" << rMsk.mnFormat << "->" << rDst.mnFormat ); return false; } @@ -819,16 +799,10 @@ bool ImplFastBitmapBlending( BitmapWriteAccess& rDstWA, return ImplBlendFromBitmap<BMP_FORMAT_32BIT_TC_RGBA>( rDst, rSrc, rMsk ); } -#ifdef DEBUG static int nNotAccelerated = 0; - if( rSrc.mnWidth * rSrc.mnHeight >= 4000 ) - if( ++nNotAccelerated == 100 ) - { - int foo = 0; (void)foo; // so no warning is created when building on pro with debug - DBG_WARNING3( "ImplFastBlend for not accelerated case (0x%04X*0x%04X->0x%04X)", - rSrc.mnFormat, rMsk.mnFormat, rDst.mnFormat ); - } -#endif + SAL_WARN_IF( rSrc.mnWidth * rSrc.mnHeight >= 4000 && ++nNotAccelerated == 100, + "vcl.gdi", + "ImplFastBlend for not accelerated case (" << std::hex << rSrc.mnFormat << "*" << rMsk.mnFormat << "->" << rDst.mnFormat << ")" ); return false; } |