From c8479bdc5b007ca5ffe1d553be3d90fb03424526 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 19 Oct 2015 12:22:03 +0200 Subject: convert DBG_ASSERTWARNING to SAL_WARN_IF I know the comment in debug.hxx said to use SAL_INFO, but SAL_WARN makes much more sense. Change-Id: I3d81f9db89ef8cebe1e4f2983941d69b4c7e6b7d --- basctl/source/basicide/bastypes.cxx | 2 +- editeng/source/editeng/editdoc.cxx | 2 +- editeng/source/editeng/editeng.cxx | 4 ++-- editeng/source/editeng/impedit.cxx | 2 +- editeng/source/editeng/impedit3.cxx | 2 +- editeng/source/editeng/impedit4.cxx | 2 +- include/tools/debug.hxx | 10 +++------- sd/source/core/drawdoc2.cxx | 4 ++-- sfx2/source/control/ctrlitem.cxx | 2 +- sfx2/source/view/viewfrm.cxx | 2 +- svl/source/items/poolio.cxx | 2 +- svtools/source/svhtml/parhtml.cxx | 2 +- toolkit/source/awt/vclxtoolkit.cxx | 2 +- tools/source/generic/color.cxx | 4 ++-- tools/source/generic/gen.cxx | 8 ++++---- tools/source/generic/poly.cxx | 4 ++-- tools/source/generic/poly2.cxx | 8 ++++---- vcl/source/control/prgsbar.cxx | 2 +- vcl/source/gdi/jobset.cxx | 4 ++-- vcl/source/outdev/map.cxx | 6 +++--- vcl/source/outdev/text.cxx | 2 +- vcl/source/window/mouse.cxx | 2 +- vcl/source/window/status.cxx | 2 +- vcl/source/window/winproc.cxx | 2 +- 24 files changed, 39 insertions(+), 43 deletions(-) diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx index 8ed33c36c22c..203cf4f6d5a8 100644 --- a/basctl/source/basicide/bastypes.cxx +++ b/basctl/source/basicide/bastypes.cxx @@ -653,7 +653,7 @@ void CutLines( OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines, bool bEra nLine++; } - DBG_ASSERTWARNING( nStartPos != -1, "CutLines: Startzeile nicht gefunden!" ); + SAL_WARN_IF( nStartPos == -1, "basctl", "CutLines: Startzeile nicht gefunden!" ); if ( nStartPos == -1 ) return; diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx index 610e7545173f..03bbcd3afcb5 100644 --- a/editeng/source/editeng/editdoc.cxx +++ b/editeng/source/editeng/editdoc.cxx @@ -631,7 +631,7 @@ void ParaPortion::MarkSelectionInvalid( sal_Int32 nStart, sal_Int32 /* nEnd */ ) sal_Int32 ParaPortion::GetLineNumber( sal_Int32 nIndex ) const { - DBG_ASSERTWARNING( aLineList.Count(), "Empty ParaPortion in GetLine!" ); + SAL_WARN_IF( !aLineList.Count(), "editeng", "Empty ParaPortion in GetLine!" ); DBG_ASSERT( bVisible, "Why GetLine() on an invisible paragraph?" ); for ( sal_Int32 nLine = 0; nLine < aLineList.Count(); nLine++ ) diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx index f137bb4c809e..30ea23ba3253 100644 --- a/editeng/source/editeng/editeng.cxx +++ b/editeng/source/editeng/editeng.cxx @@ -1647,7 +1647,7 @@ void EditEngine::InsertParagraph( sal_Int32 nPara, const EditTextObject& rTxtObj { if ( nPara > GetParagraphCount() ) { - DBG_ASSERTWARNING( nPara == EE_PARA_APPEND, "Paragraph number too large, but not EE_PARA_APPEND!" ); + SAL_WARN_IF( nPara != EE_PARA_APPEND, "editeng", "Paragraph number too large, but not EE_PARA_APPEND!" ); nPara = GetParagraphCount(); } @@ -1669,7 +1669,7 @@ void EditEngine::InsertParagraph(sal_Int32 nPara, const OUString& rTxt) { if ( nPara > GetParagraphCount() ) { - DBG_ASSERTWARNING( nPara == EE_PARA_APPEND, "Paragraph number too large, but not EE_PARA_APPEND!" ); + SAL_WARN_IF( nPara != EE_PARA_APPEND, "editeng", "Paragraph number too large, but not EE_PARA_APPEND!" ); nPara = GetParagraphCount(); } diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx index 4b41e79983bb..aeb8a6841528 100644 --- a/editeng/source/editeng/impedit.cxx +++ b/editeng/source/editeng/impedit.cxx @@ -994,7 +994,7 @@ Pair ImpEditView::Scroll( long ndX, long ndY, ScrollRangeCheck nRangeCheck ) Rectangle aR( aOutArea ); aR = pOutWin->LogicToPixel( aR ); aR = pOutWin->PixelToLogic( aR ); - DBG_ASSERTWARNING( aR == aOutArea, "OutArea before Scroll not aligned" ); + SAL_WARN_IF( aR != aOutArea, "editeng", "OutArea before Scroll not aligned" ); #endif Rectangle aNewVisArea( GetVisDocArea() ); diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index 3fa08b4ff458..7138dd8d3f04 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -4179,7 +4179,7 @@ EditSelection* ImpEditEngine::SelectParagraph( sal_Int32 nPara ) { EditSelection* pSel = 0; ContentNode* pNode = GetEditDoc().GetObject( nPara ); - DBG_ASSERTWARNING( pNode, "Paragraph does not exist: SelectParagraph" ); + SAL_WARN_IF( !pNode, "editeng", "Paragraph does not exist: SelectParagraph" ); if ( pNode ) pSel = new EditSelection( EditPaM( pNode, 0 ), EditPaM( pNode, pNode->Len() ) ); diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx index 39e754b7c631..5cda516a3b62 100644 --- a/editeng/source/editeng/impedit4.cxx +++ b/editeng/source/editeng/impedit4.cxx @@ -1476,7 +1476,7 @@ SpellInfo * ImpEditEngine::CreateSpellInfo( bool bMultipleDocs ) EESpellState ImpEditEngine::Spell( EditView* pEditView, bool bMultipleDoc ) { - DBG_ASSERTWARNING( xSpeller.is(), "No Spell checker set!" ); + SAL_WARN_IF( !xSpeller.is(), "editeng", "No Spell checker set!" ); if ( !xSpeller.is() ) return EE_SPELL_NOSPELLER; diff --git a/include/tools/debug.hxx b/include/tools/debug.hxx index e8a128adcf33..d2748e0025b1 100644 --- a/include/tools/debug.hxx +++ b/include/tools/debug.hxx @@ -32,8 +32,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) all map to - SAL_INFO. + standard assert. */ #ifdef DBG_UTIL @@ -58,18 +57,15 @@ do \ } while(false) #else -// NO DBG_UITL +// NO DBG_UTIL #define DBG_TESTSOLARMUTEX() ((void)0) #endif -#define DBG_ASSERTWARNING( sCon, aWarning ) \ - SAL_DETAIL_INFO_IF_FORMAT(!(sCon), "legacy.tools", "%s", aWarning) - #define DBG_ASSERT( sCon, aError ) \ SAL_DETAIL_WARN_IF_FORMAT(!(sCon), "legacy.tools", "%s", aError) -#endif +#endif // INCLUDED_TOOLS_DEBUG_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/core/drawdoc2.cxx b/sd/source/core/drawdoc2.cxx index dac47fe62954..f23b9f9cf73e 100644 --- a/sd/source/core/drawdoc2.cxx +++ b/sd/source/core/drawdoc2.cxx @@ -231,9 +231,9 @@ void SdDrawDocument::UpdatePageObjectsInNotes(sal_uInt16 nStartPos) pObj->GetObjInventor() == SdrInventor) { // The page object is the preceding page (drawing page) - DBG_ASSERTWARNING(nStartPos, "Position of notes page must not be 0."); + SAL_WARN_IF(!nStartPos, "sd", "Position of notes page must not be 0."); - DBG_ASSERTWARNING(nPage > 1, "Page object must not be a handout."); + SAL_WARN_IF(nPage <= 1, "sd", "Page object must not be a handout."); if (nStartPos > 0 && nPage > 1) static_cast(pObj)->SetReferencedPage(GetPage(nPage - 1)); diff --git a/sfx2/source/control/ctrlitem.cxx b/sfx2/source/control/ctrlitem.cxx index ec9e8cbf9f91..7881fc8d34d2 100644 --- a/sfx2/source/control/ctrlitem.cxx +++ b/sfx2/source/control/ctrlitem.cxx @@ -36,7 +36,7 @@ void SfxControllerItem::CheckConfigure_Impl( SfxSlotMode nType ) // is the ID configurable at all in 'nType'? const SfxSlot *pSlot = SFX_SLOTPOOL().GetSlot(nId); - DBG_ASSERTWARNING( pSlot, "SfxControllerItem: binding not existing slot" ); + SAL_WARN_IF( !pSlot, "sfx.control", "SfxControllerItem: binding not existing slot" ); SAL_WARN_IF( pSlot && !pSlot->IsMode(nType), "sfx.control", "SfxControllerItem: slot without ...Config-flag at SID " diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index b7f69f279c8c..f6da7b797f4d 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -2469,7 +2469,7 @@ void CutLines( OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines, bool bEra nLine++; } - DBG_ASSERTWARNING( nStartPos != -1, "CutLines: Start row not found!" ); + SAL_WARN_IF( nStartPos == -1, "sfx", "CutLines: Start row not found!" ); if ( nStartPos != -1 ) { diff --git a/svl/source/items/poolio.cxx b/svl/source/items/poolio.cxx index b1e9647cc933..bf5fba842f49 100644 --- a/svl/source/items/poolio.cxx +++ b/svl/source/items/poolio.cxx @@ -411,7 +411,7 @@ void SfxItemPool_Impl::readTheItems ( if ( 0 != pOldArr ) for ( n = 0; bEmpty && n < pOldArr->size(); ++n ) bEmpty = pOldArr->operator[](n) == 0; - DBG_ASSERTWARNING( bEmpty, "loading non-empty pool" ); + SAL_WARN_IF( !bEmpty, "svl", "loading non-empty pool" ); if ( !bEmpty ) { // See if there's a new one for all old ones diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx index 3c53308f5e85..0c4d1dc6485b 100644 --- a/svtools/source/svhtml/parhtml.cxx +++ b/svtools/source/svhtml/parhtml.cxx @@ -1454,7 +1454,7 @@ const HTMLOptions& HTMLParser::GetOptions( sal_uInt16 *pNoConvertToken ) // PlugIns require original token name. Convert to lower case only for searching. nToken = GetHTMLOption( sName.toAsciiLowerCase() ); // Name is ready - DBG_ASSERTWARNING( nToken!=HTML_O_UNKNOWN, + SAL_WARN_IF( nToken==HTML_O_UNKNOWN, "svtools", "GetOption: unknown HTML option" ); bool bStripCRLF = (nToken < HTML_OPTION_SCRIPT_START || nToken >= HTML_OPTION_SCRIPT_END) && diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx index f97be03731bc..df62e803eb39 100644 --- a/toolkit/source/awt/vclxtoolkit.cxx +++ b/toolkit/source/awt/vclxtoolkit.cxx @@ -1270,7 +1270,7 @@ css::uno::Reference< css::awt::XWindowPeer > VCLXToolkit::ImplCreateWindow( pNewWindow = ImplCreateWindow( &pNewComp, rDescriptor, pParent, nWinBits ); DBG_ASSERT( pNewWindow, "createWindow: Unknown Component!" ); - DBG_ASSERTWARNING( pNewComp, "createWindow: No special Interface!" ); + SAL_WARN_IF( !pNewComp, "toolkit", "createWindow: No special Interface!" ); if ( pNewWindow ) { diff --git a/tools/source/generic/color.cxx b/tools/source/generic/color.cxx index 697de7ebc2f8..e85cf9d0b9a8 100644 --- a/tools/source/generic/color.cxx +++ b/tools/source/generic/color.cxx @@ -243,7 +243,7 @@ OUString Color::AsRGBHexString() const SvStream& ReadColor( SvStream& rIStream, Color& rColor ) { - DBG_ASSERTWARNING( rIStream.GetVersion(), "Color::>> - Solar-Version not set on rIStream" ); + SAL_WARN_IF( !rIStream.GetVersion(), "tools", "Color::>> - Solar-Version not set on rIStream" ); sal_uInt16 nColorName; @@ -335,7 +335,7 @@ void Color::ApplyTintOrShade(sal_Int16 n100thPercent) SvStream& WriteColor( SvStream& rOStream, const Color& rColor ) { - DBG_ASSERTWARNING( rOStream.GetVersion(), "Color::<< - Solar-Version not set on rOStream" ); + SAL_WARN_IF( !rOStream.GetVersion(), "tools", "Color::<< - Solar-Version not set on rOStream" ); sal_uInt16 nColorName = COL_NAME_USER; sal_uInt16 nRed = rColor.GetRed(); diff --git a/tools/source/generic/gen.cxx b/tools/source/generic/gen.cxx index cb5b1dc2a674..33a4ae490454 100644 --- a/tools/source/generic/gen.cxx +++ b/tools/source/generic/gen.cxx @@ -27,7 +27,7 @@ SvStream& ReadPair( SvStream& rIStream, Pair& rPair ) { - DBG_ASSERTWARNING( rIStream.GetVersion(), "Pair::>> - Solar-Version not set on rIStream" ); + SAL_WARN_IF( !rIStream.GetVersion(), "tools", "Pair::>> - Solar-Version not set on rIStream" ); sal_Int32 nTmpA(0), nTmpB(0); rIStream.ReadInt32( nTmpA ).ReadInt32( nTmpB ); @@ -39,7 +39,7 @@ SvStream& ReadPair( SvStream& rIStream, Pair& rPair ) SvStream& WritePair( SvStream& rOStream, const Pair& rPair ) { - DBG_ASSERTWARNING( rOStream.GetVersion(), "Pair::<< - Solar-Version not set on rOStream" ); + SAL_WARN_IF( !rOStream.GetVersion(), "tools", "Pair::<< - Solar-Version not set on rOStream" ); rOStream.WriteInt32( rPair.nA ).WriteInt32( rPair.nB ); @@ -173,7 +173,7 @@ bool Rectangle::IsOver( const Rectangle& rRect ) const SvStream& ReadRectangle( SvStream& rIStream, Rectangle& rRect ) { - DBG_ASSERTWARNING( rIStream.GetVersion(), "Rectangle::>> - Solar-Version not set on rIStream" ); + SAL_WARN_IF( !rIStream.GetVersion(), "tools", "Rectangle::>> - Solar-Version not set on rIStream" ); sal_Int32 nTmpL(0), nTmpT(0), nTmpR(0), nTmpB(0); @@ -189,7 +189,7 @@ SvStream& ReadRectangle( SvStream& rIStream, Rectangle& rRect ) SvStream& WriteRectangle( SvStream& rOStream, const Rectangle& rRect ) { - DBG_ASSERTWARNING( rOStream.GetVersion(), "Rectangle::<< - Solar-Version not set on rOStream" ); + SAL_WARN_IF( !rOStream.GetVersion(), "tools", "Rectangle::<< - Solar-Version not set on rOStream" ); rOStream.WriteInt32( rRect.nLeft ) .WriteInt32( rRect.nTop ) diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx index f5cf0dfd46d0..f53dbf19c36c 100644 --- a/tools/source/generic/poly.cxx +++ b/tools/source/generic/poly.cxx @@ -1536,7 +1536,7 @@ bool Polygon::IsEqual( const tools::Polygon& rPoly ) const SvStream& ReadPolygon( SvStream& rIStream, tools::Polygon& rPoly ) { - DBG_ASSERTWARNING( rIStream.GetVersion(), "Polygon::>> - Solar-Version not set on rIStream" ); + SAL_WARN_IF( !rIStream.GetVersion(), "tools", "Polygon::>> - Solar-Version not set on rIStream" ); sal_uInt16 i; sal_uInt16 nPoints(0); @@ -1587,7 +1587,7 @@ SvStream& ReadPolygon( SvStream& rIStream, tools::Polygon& rPoly ) SvStream& WritePolygon( SvStream& rOStream, const tools::Polygon& rPoly ) { - DBG_ASSERTWARNING( rOStream.GetVersion(), "Polygon::<< - Solar-Version not set on rOStream" ); + SAL_WARN_IF( !rOStream.GetVersion(), "tools", "Polygon::<< - Solar-Version not set on rOStream" ); sal_uInt16 i; sal_uInt16 nPoints = rPoly.GetSize(); diff --git a/tools/source/generic/poly2.cxx b/tools/source/generic/poly2.cxx index 6d6b3d888a14..7005a56a90e2 100644 --- a/tools/source/generic/poly2.cxx +++ b/tools/source/generic/poly2.cxx @@ -551,7 +551,7 @@ bool PolyPolygon::operator==( const tools::PolyPolygon& rPolyPoly ) const SvStream& ReadPolyPolygon( SvStream& rIStream, tools::PolyPolygon& rPolyPoly ) { - DBG_ASSERTWARNING( rIStream.GetVersion(), "PolyPolygon::>> - Solar-Version not set on rIStream" ); + SAL_WARN_IF( !rIStream.GetVersion(), "tools", "PolyPolygon::>> - Solar-Version not set on rIStream" ); tools::Polygon* pPoly; sal_uInt16 nPolyCount(0); @@ -592,7 +592,7 @@ SvStream& ReadPolyPolygon( SvStream& rIStream, tools::PolyPolygon& rPolyPoly ) SvStream& WritePolyPolygon( SvStream& rOStream, const tools::PolyPolygon& rPolyPoly ) { - DBG_ASSERTWARNING( rOStream.GetVersion(), "PolyPolygon::<< - Solar-Version not set on rOStream" ); + SAL_WARN_IF( !rOStream.GetVersion(), "tools", "PolyPolygon::<< - Solar-Version not set on rOStream" ); // Write number of polygons sal_uInt16 nPolyCount = rPolyPoly.mpImplPolyPolygon->mnCount; @@ -609,7 +609,7 @@ void PolyPolygon::Read( SvStream& rIStream ) { VersionCompat aCompat( rIStream, StreamMode::READ ); - DBG_ASSERTWARNING( rIStream.GetVersion(), "PolyPolygon::>> - Solar-Version not set on rIStream" ); + SAL_WARN_IF( !rIStream.GetVersion(), "tools","PolyPolygon::>> - Solar-Version not set on rIStream" ); tools::Polygon* pPoly; sal_uInt16 nPolyCount(0); @@ -650,7 +650,7 @@ void PolyPolygon::Write( SvStream& rOStream ) const { VersionCompat aCompat( rOStream, StreamMode::WRITE, 1 ); - DBG_ASSERTWARNING( rOStream.GetVersion(), "PolyPolygon::<< - Solar-Version not set on rOStream" ); + SAL_WARN_IF( !rOStream.GetVersion(), "tools", "PolyPolygon::<< - Solar-Version not set on rOStream" ); // Write number of polygons sal_uInt16 nPolyCount = mpImplPolyPolygon->mnCount; diff --git a/vcl/source/control/prgsbar.cxx b/vcl/source/control/prgsbar.cxx index 2e1dce50bea0..c13c14ed0be5 100644 --- a/vcl/source/control/prgsbar.cxx +++ b/vcl/source/control/prgsbar.cxx @@ -164,7 +164,7 @@ void ProgressBar::Resize() void ProgressBar::SetValue( sal_uInt16 nNewPercent ) { - DBG_ASSERTWARNING( nNewPercent <= 100, "StatusBar::SetProgressValue(): nPercent > 100" ); + SAL_WARN_IF( nNewPercent > 100, "vcl", "StatusBar::SetProgressValue(): nPercent > 100" ); if ( nNewPercent < mnPercent ) { diff --git a/vcl/source/gdi/jobset.cxx b/vcl/source/gdi/jobset.cxx index 4d9b49949e99..62049b5a823c 100644 --- a/vcl/source/gdi/jobset.cxx +++ b/vcl/source/gdi/jobset.cxx @@ -217,7 +217,7 @@ bool JobSetup::operator==( const JobSetup& rJobSetup ) const SvStream& ReadJobSetup( SvStream& rIStream, JobSetup& rJobSetup ) { - DBG_ASSERTWARNING( rIStream.GetVersion(), "JobSetup::>> - Solar-Version not set on rOStream" ); + SAL_WARN_IF( !rIStream.GetVersion(), "vcl", "JobSetup::>> - Solar-Version not set on rOStream" ); { sal_uInt16 nLen = 0; @@ -311,7 +311,7 @@ SvStream& ReadJobSetup( SvStream& rIStream, JobSetup& rJobSetup ) SvStream& WriteJobSetup( SvStream& rOStream, const JobSetup& rJobSetup ) { - DBG_ASSERTWARNING( rOStream.GetVersion(), "JobSetup::<< - Solar-Version not set on rOStream" ); + SAL_WARN_IF( !rOStream.GetVersion(), "vcl", "JobSetup::<< - Solar-Version not set on rOStream" ); // We do not have a new FileFormat at this point in time // #define JOBSET_FILEFORMAT2 3780 diff --git a/vcl/source/outdev/map.cxx b/vcl/source/outdev/map.cxx index 96d96e43ec02..4e84033789fc 100644 --- a/vcl/source/outdev/map.cxx +++ b/vcl/source/outdev/map.cxx @@ -708,7 +708,7 @@ void OutputDevice::SetMapMode( const MapMode& rNewMapMode ) mpMetaFile->AddAction( new MetaMapModeAction( rNewMapMode ) ); #ifdef DBG_UTIL if ( GetOutDevType() != OUTDEV_PRINTER ) - DBG_ASSERTWARNING( bRelMap, "Please record only relative MapModes!" ); + SAL_WARN_IF( !bRelMap, "vcl", "Please record only relative MapModes!" ); #endif } @@ -1516,9 +1516,9 @@ static void verifyUnitSourceDest( MapUnit eUnitSource, MapUnit eUnitDest ) && eUnitDest != MAP_APPFONT && eUnitDest != MAP_RELATIVE, "Destination MapUnit nicht erlaubt" ); - DBG_ASSERTWARNING( eUnitSource != MAP_PIXEL, + SAL_WARN_IF( eUnitSource == MAP_PIXEL, "vcl", "MAP_PIXEL mit 72dpi angenaehert" ); - DBG_ASSERTWARNING( eUnitDest != MAP_PIXEL, + SAL_WARN_IF( eUnitDest == MAP_PIXEL, "vcl", "MAP_PIXEL mit 72dpi angenaehert" ); } diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx index d8757e057dd3..d03f3cb106c8 100644 --- a/vcl/source/outdev/text.cxx +++ b/vcl/source/outdev/text.cxx @@ -496,7 +496,7 @@ long OutputDevice::ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo, long nWidth, const OUString& rStr, DrawTextFlags nStyle, const vcl::ITextLayout& _rLayout ) { - DBG_ASSERTWARNING( nWidth >= 0, "ImplGetTextLines: nWidth <= 0!" ); + SAL_WARN_IF( nWidth <= 0, "vcl", "ImplGetTextLines: nWidth <= 0!" ); if ( nWidth <= 0 ) nWidth = 1; diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx index d0556a98ed75..ad6c460d6d91 100644 --- a/vcl/source/window/mouse.cxx +++ b/vcl/source/window/mouse.cxx @@ -468,7 +468,7 @@ void Window::ReleaseMouse() ImplSVData* pSVData = ImplGetSVData(); - DBG_ASSERTWARNING( pSVData->maWinData.mpCaptureWin.get() == this, + SAL_WARN_IF( pSVData->maWinData.mpCaptureWin.get() != this, "vcl", "Window::ReleaseMouse(): window doesn't have the mouse capture" ); if ( pSVData->maWinData.mpCaptureWin.get() == this ) diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx index 472c837361e2..c4a349012faf 100644 --- a/vcl/source/window/status.cxx +++ b/vcl/source/window/status.cxx @@ -1374,7 +1374,7 @@ void StatusBar::StartProgressMode( const OUString& rText ) void StatusBar::SetProgressValue( sal_uInt16 nNewPercent ) { DBG_ASSERT( mbProgressMode, "StatusBar::SetProgressValue(): no progrss mode" ); - DBG_ASSERTWARNING( nNewPercent <= 100, "StatusBar::SetProgressValue(): nPercent > 100" ); + SAL_WARN_IF( nNewPercent > 100, "vcl", "StatusBar::SetProgressValue(): nPercent > 100" ); if ( mbProgressMode && IsReallyVisible() diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx index 16696ec38694..33aa9fbb9cf2 100644 --- a/vcl/source/window/winproc.cxx +++ b/vcl/source/window/winproc.cxx @@ -859,7 +859,7 @@ static vcl::Window* ImplGetKeyInputWindow( vcl::Window* pWindow ) // system this is often the case when a Lookup Choice Window has // the focus - because this windows send the KeyInput directly to // the window without resetting the focus - DBG_ASSERTWARNING( pChild == pSVData->maWinData.mpFocusWin, + SAL_WARN_IF( pChild != pSVData->maWinData.mpFocusWin, "vcl", "ImplHandleKey: Keyboard-Input is sent to a frame without focus" ); // no keyinput to disabled windows -- cgit v1.2.3