[Libreoffice-commits] .: 31 commits - basegfx/inc basegfx/source canvas/inc canvas/source comphelper/source cppcanvas/source dtrans/source l10ntools/layout rsc/source sax/source sot/source svl/source svtools/source toolkit/source toolkit/workben tools/inc tools/source ucbhelper/source ucbhelper/workben unotools/source vcl/aqua vcl/os2 vcl/source vcl/unx vcl/win
Thomas Arnhold
tarnhold at kemper.freedesktop.org
Sun Mar 13 08:52:00 PDT 2011
basegfx/inc/basegfx/raster/bpixelraster.hxx | 4
basegfx/inc/basegfx/raster/bzpixelraster.hxx | 4
basegfx/source/matrix/b2dhommatrixtools.cxx | 2
basegfx/source/polygon/b2dpolypolygonrasterconverter.cxx | 3
basegfx/source/polygon/b2dsvgpolypolygon.cxx | 2
basegfx/source/polygon/b2dtrapezoid.cxx | 4
basegfx/source/tools/keystoplerp.cxx | 3
canvas/inc/canvas/canvastools.hxx | 7
canvas/source/cairo/cairo_quartz_cairo.cxx | 2
canvas/source/cairo/cairo_spritedevicehelper.cxx | 4
canvas/source/cairo/cairo_win32_cairo.cxx | 2
canvas/source/directx/dx_5rm.cxx | 3
canvas/source/directx/dx_9rm.cxx | 3
canvas/source/directx/dx_canvashelper.cxx | 3
canvas/source/directx/dx_config.cxx | 6
canvas/source/directx/dx_spritedevicehelper.cxx | 4
canvas/source/tools/prioritybooster.cxx | 3
canvas/source/vcl/spritedevicehelper.cxx | 4
canvas/source/vcl/spritehelper.cxx | 3
comphelper/source/container/containermultiplexer.cxx | 4
comphelper/source/container/embeddedobjectcontainer.cxx | 6
comphelper/source/container/enumerablemap.cxx | 2
comphelper/source/misc/accessiblewrapper.cxx | 3
comphelper/source/misc/documentinfo.cxx | 2
comphelper/source/misc/logging.cxx | 18 -
comphelper/source/misc/mediadescriptor.cxx | 2
comphelper/source/misc/namedvaluecollection.cxx | 2
comphelper/source/misc/officeresourcebundle.cxx | 8
comphelper/source/misc/scopeguard.cxx | 6
comphelper/source/misc/servicedecl.cxx | 2
comphelper/source/property/propagg.cxx | 2
comphelper/source/property/propertycontainerhelper.cxx | 8
cppcanvas/source/mtfrenderer/implrenderer.cxx | 9
cppcanvas/source/mtfrenderer/textaction.cxx | 15 -
cppcanvas/source/mtfrenderer/transparencygroupaction.cxx | 6
dtrans/source/os2/clipb/Os2Clipboard.cxx | 4
dtrans/source/win32/clipb/WinClipboard.cxx | 4
dtrans/source/win32/dnd/source.cxx | 4
dtrans/source/win32/dtobj/FmtFilter.cxx | 2
l10ntools/layout/tralay.cxx | 4
rsc/source/rscpp/cpp1.c | 28 --
rsc/source/rscpp/cpp2.c | 10 -
rsc/source/rscpp/cpp3.c | 25 --
rsc/source/rscpp/cpp4.c | 12 -
rsc/source/rscpp/cpp5.c | 13 -
rsc/source/rscpp/cpp6.c | 20 --
rsc/source/rscpp/cppdef.h | 9
sax/source/expatwrap/saxwriter.cxx | 2
sax/source/tools/converter.cxx | 4
sot/source/base/filelist.cxx | 2
svl/source/config/itemholder2.cxx | 2
svl/source/inc/poolio.hxx | 6
svl/source/items/itemset.cxx | 10 -
svtools/source/brwbox/brwbox1.cxx | 36 +--
svtools/source/brwbox/brwbox2.cxx | 2
svtools/source/brwbox/brwbox3.cxx | 4
svtools/source/config/extcolorcfg.cxx | 2
svtools/source/config/itemholder2.cxx | 2
svtools/source/config/miscopt.cxx | 42 ++--
svtools/source/contnr/svtabbx.cxx | 2
svtools/source/dialogs/addresstemplate.cxx | 2
svtools/source/dialogs/roadmapwizard.cxx | 2
svtools/source/filter.vcl/wmf/emfwr.cxx | 2
svtools/source/productregistration/productregistration.cxx | 4
svtools/source/table/tablecontrol.cxx | 2
svtools/source/toolpanel/paneltabbar.cxx | 4
svtools/source/toolpanel/tablayouter.cxx | 2
svtools/source/uno/wizard/unowizard.cxx | 2
svtools/source/uno/wizard/wizardshell.cxx | 2
toolkit/source/awt/vclxwindow.cxx | 6
toolkit/source/awt/vclxwindows.cxx | 4
toolkit/source/controls/stdtabcontroller.cxx | 2
toolkit/source/controls/unocontrolmodel.cxx | 4
toolkit/source/layout/core/dialogbuttonhbox.cxx | 2
toolkit/source/layout/core/helper.cxx | 2
toolkit/source/layout/core/import.cxx | 2
toolkit/source/layout/core/proplist.cxx | 12 -
toolkit/source/layout/vcl/wbutton.cxx | 2
toolkit/source/layout/vcl/wcontainer.cxx | 2
toolkit/source/layout/vcl/wrapper.cxx | 6
toolkit/workben/layout/test.cxx | 4
tools/inc/tools/debug.hxx | 122 -------------
tools/source/fsys/dirent.cxx | 2
tools/source/fsys/os2.cxx | 2
tools/source/fsys/urlobj.cxx | 8
tools/source/fsys/wntmsc.cxx | 4
tools/source/generic/config.cxx | 18 -
tools/source/inet/inetmime.cxx | 2
tools/source/rc/resmgr.cxx | 4
tools/source/ref/errinf.cxx | 4
tools/source/ref/pstm.cxx | 4
tools/source/stream/strmos2.cxx | 8
tools/source/stream/strmunx.cxx | 8
tools/source/stream/strmwnt.cxx | 32 ---
tools/source/string/tstring.cxx | 4
tools/source/testtoolloader/testtoolloader.cxx | 8
ucbhelper/source/provider/configureucb.cxx | 7
ucbhelper/source/provider/provconf.cxx | 33 +--
ucbhelper/workben/ucbexplorer/ucbexplorer.cxx | 6
unotools/source/config/bootstrap.cxx | 4
unotools/source/config/configitem.cxx | 2
unotools/source/config/configmgr.cxx | 12 -
unotools/source/config/configpathes.cxx | 2
unotools/source/config/inetoptions.cxx | 6
unotools/source/i18n/localedatawrapper.cxx | 2
vcl/aqua/source/gdi/aquaprintaccessoryview.mm | 6
vcl/aqua/source/window/salnsmenu.mm | 4
vcl/os2/source/app/salinst.cxx | 2
vcl/source/control/imgctrl.cxx | 4
vcl/source/gdi/bitmapex.cxx | 2
vcl/source/gdi/cvtsvm.cxx | 2
vcl/source/gdi/image.cxx | 2
vcl/source/gdi/outdev.cxx | 54 ++---
vcl/source/gdi/outdev2.cxx | 30 +--
vcl/source/gdi/outdev3.cxx | 84 ++++----
vcl/source/gdi/outdev4.cxx | 6
vcl/source/gdi/outdev5.cxx | 10 -
vcl/source/gdi/outdev6.cxx | 8
vcl/source/gdi/outdevnative.cxx | 2
vcl/source/gdi/print3.cxx | 4
vcl/source/gdi/textlayout.cxx | 2
vcl/source/gdi/virdev.cxx | 12 -
vcl/source/window/accel.cxx | 2
vcl/source/window/dialog.cxx | 4
vcl/source/window/window.cxx | 14 -
vcl/source/window/winproc.cxx | 2
vcl/unx/gtk/a11y/atkwrapper.cxx | 4
vcl/unx/source/dtrans/X11_selection.cxx | 6
vcl/unx/source/gdi/cdeint.cxx | 8
vcl/unx/source/printergfx/printerjob.cxx | 4
vcl/win/source/app/salinst.cxx | 2
vcl/win/source/gdi/salprn.cxx | 4
132 files changed, 418 insertions(+), 652 deletions(-)
New commits:
commit f7c6577043916fb86d75b0a7a5cbd2affd9ef995
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Sat Mar 12 16:01:34 2011 +0100
Fix non-debug build
diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx
index 6411003..57d1ec6 100644
--- a/svl/source/items/itemset.cxx
+++ b/svl/source/items/itemset.cxx
@@ -50,7 +50,7 @@
// STATIC DATA -----------------------------------------------------------
static const USHORT nInitCount = 10; // einzelne USHORTs => 5 Paare ohne '0'
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
static ULONG nRangesCopyCount = 0; // wie oft wurden Ranges kopiert
#endif
@@ -234,7 +234,9 @@ SfxItemSet::SfxItemSet( SfxItemPool& rPool,
void SfxItemSet::InitRanges_Impl(const USHORT *pWhichPairTable)
{
DBG_CHKTHIS(SfxItemSet, 0);
+ #if OSL_DEBUG_LEVEL > 1
OSL_TRACE("SfxItemSet: Ranges-CopyCount==%ul", ++nRangesCopyCount);
+ #endif
USHORT nCnt = 0;
const USHORT* pPtr = pWhichPairTable;
@@ -314,7 +316,9 @@ SfxItemSet::SfxItemSet( const SfxItemSet& rASet ):
*ppDst = &_pPool->Put( **ppSrc );
// dann noch die Which Ranges kopieren
+ #if OSL_DEBUG_LEVEL > 1
OSL_TRACE("SfxItemSet: Ranges-CopyCount==%ul", ++nRangesCopyCount);
+ #endif
std::ptrdiff_t cnt = pPtr - rASet._pWhichRanges+1;
_pWhichRanges = new USHORT[ cnt ];
memcpy( _pWhichRanges, rASet._pWhichRanges, sizeof( USHORT ) * cnt);
commit 446d7a5eb983cdf56de0d2825b6f6d3e61496ea0
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Sat Mar 12 13:19:52 2011 +0100
OSL_TRACE: Use format string for GetBuffer()
diff --git a/tools/source/generic/config.cxx b/tools/source/generic/config.cxx
index 94ebddd..cccd379 100644
--- a/tools/source/generic/config.cxx
+++ b/tools/source/generic/config.cxx
@@ -799,7 +799,7 @@ Config::Config( const XubString& rFileName )
ByteString aTraceStr( "Config::Config( " );
aTraceStr += ByteString( maFileName, RTL_TEXTENCODING_UTF8 );
aTraceStr += " )";
- OSL_TRACE( aTraceStr.GetBuffer() );
+ OSL_TRACE( "%s", aTraceStr.GetBuffer() );
#endif
}
@@ -1000,7 +1000,7 @@ ByteString Config::ReadKey( const ByteString& rKey, const ByteString& rDefault )
aTraceStr += GetGroup();
aTraceStr += " in ";
aTraceStr += ByteString( maFileName, RTL_TEXTENCODING_UTF8 );
- OSL_TRACE( aTraceStr.GetBuffer() );
+ OSL_TRACE( "%s", aTraceStr.GetBuffer() );
#endif
// Config-Daten evt. updaten
@@ -1037,7 +1037,7 @@ void Config::WriteKey( const ByteString& rKey, const ByteString& rStr )
aTraceStr += GetGroup();
aTraceStr += " in ";
aTraceStr += ByteString( maFileName, RTL_TEXTENCODING_UTF8 );
- OSL_TRACE( aTraceStr.GetBuffer() );
+ OSL_TRACE( "%s", aTraceStr.GetBuffer() );
DBG_ASSERTWARNING( rStr != ReadKey( rKey ), "Config::WriteKey() with the same Value" );
#endif
@@ -1158,7 +1158,7 @@ USHORT Config::GetKeyCount() const
aTraceStr += GetGroup();
aTraceStr += " in ";
aTraceStr += ByteString( maFileName, RTL_TEXTENCODING_UTF8 );
- OSL_TRACE( aTraceStr.GetBuffer() );
+ OSL_TRACE( "%s", aTraceStr.GetBuffer() );
#endif
// Config-Daten evt. updaten
@@ -1194,7 +1194,7 @@ ByteString Config::GetKeyName( USHORT nKey ) const
aTraceStr += GetGroup();
aTraceStr += " in ";
aTraceStr += ByteString( maFileName, RTL_TEXTENCODING_UTF8 );
- OSL_TRACE( aTraceStr.GetBuffer() );
+ OSL_TRACE( "%s", aTraceStr.GetBuffer() );
#endif
// Key suchen und Name zurueckgeben
@@ -1229,7 +1229,7 @@ ByteString Config::ReadKey( USHORT nKey ) const
aTraceStr += GetGroup();
aTraceStr += " in ";
aTraceStr += ByteString( maFileName, RTL_TEXTENCODING_UTF8 );
- OSL_TRACE( aTraceStr.GetBuffer() );
+ OSL_TRACE( "%s", aTraceStr.GetBuffer() );
#endif
// Key suchen und Value zurueckgeben
diff --git a/tools/source/stream/strmos2.cxx b/tools/source/stream/strmos2.cxx
index 6c4395d..71b611f 100644
--- a/tools/source/stream/strmos2.cxx
+++ b/tools/source/stream/strmos2.cxx
@@ -194,7 +194,7 @@ ULONG SvFileStream::GetData( void* pData, ULONG nSize )
aTraceStr += ByteString::CreateFromInt64(nSize);
aTraceStr += " Bytes from ";
aTraceStr += ByteString(aFilename, osl_getThreadTextEncoding());
- OSL_TRACE( aTraceStr.GetBuffer() );
+ OSL_TRACE( "%s", aTraceStr.GetBuffer() );
#endif
ULONG nCount = 0L;
@@ -221,7 +221,7 @@ ULONG SvFileStream::PutData( const void* pData, ULONG nSize )
aTraceStr += ByteString::CreateFromInt64(nSize);
aTraceStr += " Bytes to ";
aTraceStr += ByteString(aFilename, osl_getThreadTextEncoding());
- OSL_TRACE( aTraceStr.GetBuffer() );
+ OSL_TRACE( "%s", aTraceStr.GetBuffer() );
#endif
ULONG nCount = 0L;
@@ -498,7 +498,7 @@ void SvFileStream::Open( const String& rFilename, StreamMode nOpenMode )
#ifdef DBG_UTIL
ByteString aTraceStr( "SvFileStream::Open(): " );
aTraceStr += aFileNameA;
- OSL_TRACE( aTraceStr.GetBuffer() );
+ OSL_TRACE( "%s", aTraceStr.GetBuffer() );
#endif
APIRET nRet = DosOpen( aFileNameA.GetBuffer(), &pInstanceData->hFile,
@@ -563,7 +563,7 @@ void SvFileStream::Close()
#ifdef DBG_UTIL
ByteString aTraceStr( "SvFileStream::Close(): " );
aTraceStr += ByteString(aFilename, osl_getThreadTextEncoding());
- OSL_TRACE( aTraceStr.GetBuffer() );
+ OSL_TRACE( "%s", aTraceStr.GetBuffer() );
#endif
if( nLockCounter )
diff --git a/tools/source/stream/strmunx.cxx b/tools/source/stream/strmunx.cxx
index 6826189..cc0b162 100644
--- a/tools/source/stream/strmunx.cxx
+++ b/tools/source/stream/strmunx.cxx
@@ -358,7 +358,7 @@ sal_Size SvFileStream::GetData( void* pData, sal_Size nSize )
aTraceStr += ByteString::CreateFromInt64(nSize);
aTraceStr += " Bytes from ";
aTraceStr += ByteString(aFilename, osl_getThreadTextEncoding());
- OSL_TRACE( aTraceStr.GetBuffer() );
+ OSL_TRACE( "%s", aTraceStr.GetBuffer() );
#endif
int nRead = 0;
@@ -384,7 +384,7 @@ sal_Size SvFileStream::PutData( const void* pData, sal_Size nSize )
aTraceStr += ByteString::CreateFromInt64(nSize);
aTraceStr += " Bytes to ";
aTraceStr += ByteString(aFilename, osl_getThreadTextEncoding());
- OSL_TRACE( aTraceStr.GetBuffer() );
+ OSL_TRACE( "%s", aTraceStr.GetBuffer() );
#endif
int nWrite = 0;
@@ -624,7 +624,7 @@ void SvFileStream::Open( const String& rFilename, StreamMode nOpenMode )
#ifdef DBG_UTIL
ByteString aTraceStr( "SvFileStream::Open(): " );
aTraceStr += aLocalFilename;
- OSL_TRACE( aTraceStr.GetBuffer() );
+ OSL_TRACE( "%s", aTraceStr.GetBuffer() );
#endif
if ( lstat( aLocalFilename.GetBuffer(), &buf ) == 0 )
@@ -747,7 +747,7 @@ void SvFileStream::Close()
#ifdef DBG_UTIL
ByteString aTraceStr( "SvFileStream::Close(): " );
aTraceStr += ByteString(aFilename, osl_getThreadTextEncoding());
- OSL_TRACE( aTraceStr.GetBuffer() );
+ OSL_TRACE( "%s", aTraceStr.GetBuffer() );
#endif
Flush();
commit 7f6790aa1e7b67cc0b1fcb972034777d97c34ac5
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Sat Mar 12 12:39:04 2011 +0100
OSL_TRACE: Use format string
diff --git a/vcl/source/gdi/textlayout.cxx b/vcl/source/gdi/textlayout.cxx
index d0f00a9..b30167f 100644
--- a/vcl/source/gdi/textlayout.cxx
+++ b/vcl/source/gdi/textlayout.cxx
@@ -227,7 +227,7 @@ namespace vcl
aTrace.append( ", " );
}
aTrace.append( ")" );
- OSL_TRACE( aTrace.makeStringAndClear().getStr() );
+ OSL_TRACE( "%s", aTrace.makeStringAndClear().getStr() );
}
#endif
return nTextWidth;
commit f2acba90f80435f2e364abd2233aa50b865db9cf
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Sat Mar 12 12:08:50 2011 +0100
Move OSL_ENSURE(0,...) to OSL_FAIL(...)
diff --git a/comphelper/source/container/containermultiplexer.cxx b/comphelper/source/container/containermultiplexer.cxx
index 197142f..c2ced9b 100644
--- a/comphelper/source/container/containermultiplexer.cxx
+++ b/comphelper/source/container/containermultiplexer.cxx
@@ -118,7 +118,7 @@ namespace comphelper
}
catch(const Exception&)
{
- OSL_ENSURE(0,"Exceptiopn catched!");
+ OSL_FAIL("Exceptiopn catched!");
}
::comphelper::decrement(m_refCount);
}
@@ -153,7 +153,7 @@ namespace comphelper
}
catch(const Exception&)
{
- OSL_ENSURE(0,"Exception catched!");
+ OSL_FAIL("Exception catched!");
}
m_xContainer = NULL;
m_pListener = NULL;
diff --git a/comphelper/source/container/embeddedobjectcontainer.cxx b/comphelper/source/container/embeddedobjectcontainer.cxx
index f6599aa..43ed50a 100644
--- a/comphelper/source/container/embeddedobjectcontainer.cxx
+++ b/comphelper/source/container/embeddedobjectcontainer.cxx
@@ -318,7 +318,7 @@ sal_Bool EmbeddedObjectContainer::HasInstantiatedEmbeddedObject( const ::rtl::OU
aIt++;
}
- OSL_ENSURE( 0, "Unknown object!" );
+ OSL_FAIL( "Unknown object!" );
return ::rtl::OUString();
}
@@ -1009,13 +1009,13 @@ sal_Bool EmbeddedObjectContainer::MoveEmbeddedObject( const ::rtl::OUString& rNa
}
catch ( uno::Exception& )
{
- OSL_ENSURE(0,"Could not move object!");
+ OSL_FAIL("Could not move object!");
return sal_False;
}
}
else
- OSL_ENSURE(0,"Unknown object!");
+ OSL_FAIL("Unknown object!");
return sal_False;
}
diff --git a/l10ntools/layout/tralay.cxx b/l10ntools/layout/tralay.cxx
index 3ae549a..b4600e3 100644
--- a/l10ntools/layout/tralay.cxx
+++ b/l10ntools/layout/tralay.cxx
@@ -376,14 +376,14 @@ void TranslateLayout::Main()
aStr += OUStringToOString( exc.Message, RTL_TEXTENCODING_ASCII_US );
}
fprintf( stderr, "error: parsing: '%s'\n", aStr.getStr() );
- OSL_ENSURE( 0, aStr.getStr() );
+ OSL_FAIL( aStr.getStr() );
}
catch ( uno::Exception& rExc )
{
OString aStr( OUStringToOString( rExc.Message,
RTL_TEXTENCODING_ASCII_US ) );
fprintf( stderr, "error: UNO: '%s'\n", aStr.getStr() );
- OSL_ENSURE( 0, aStr.getStr() );
+ OSL_FAIL( aStr.getStr() );
}
}
diff --git a/svtools/source/brwbox/brwbox3.cxx b/svtools/source/brwbox/brwbox3.cxx
index 5779afb..9a3ffd2 100644
--- a/svtools/source/brwbox/brwbox3.cxx
+++ b/svtools/source/brwbox/brwbox3.cxx
@@ -268,7 +268,7 @@ OUString BrowseBox::GetAccessibleObjectName( ::svt::AccessibleBrowseBoxObjType e
#endif
break;
default:
- OSL_ENSURE(0,"BrowseBox::GetAccessibleName: invalid enum!");
+ OSL_FAIL("BrowseBox::GetAccessibleName: invalid enum!");
}
return aRetText;
}
@@ -375,7 +375,7 @@ void BrowseBox::FillAccessibleStateSet(
case ::svt::BBTYPE_ROWHEADERCELL:
case ::svt::BBTYPE_COLUMNHEADERCELL:
case ::svt::BBTYPE_CHECKBOXCELL:
- OSL_ENSURE(0,"Illegal call here!");
+ OSL_FAIL("Illegal call here!");
break;
}
}
diff --git a/svtools/source/config/extcolorcfg.cxx b/svtools/source/config/extcolorcfg.cxx
index f080ed5..1c37b07 100644
--- a/svtools/source/config/extcolorcfg.cxx
+++ b/svtools/source/config/extcolorcfg.cxx
@@ -123,7 +123,7 @@ public:
aMessage.append( ::rtl::OUStringToOString( _sComponentName, RTL_TEXTENCODING_UTF8 ) );
aMessage.append( "\nname: " );
aMessage.append( ::rtl::OUStringToOString( _sName, RTL_TEXTENCODING_UTF8 ) );
- OSL_ENSURE( 0, aMessage.makeStringAndClear().getStr() );
+ OSL_FAIL( aMessage.makeStringAndClear().getStr() );
#endif
return ExtendedColorConfigValue();
}
diff --git a/svtools/source/contnr/svtabbx.cxx b/svtools/source/contnr/svtabbx.cxx
index d242fe8..b649fa3 100644
--- a/svtools/source/contnr/svtabbx.cxx
+++ b/svtools/source/contnr/svtabbx.cxx
@@ -1115,7 +1115,7 @@ sal_Bool SvHeaderTabListBox::ConvertPointToColumnHeader( sal_uInt16&, const Poin
break;
default:
- OSL_ENSURE(0,"BrowseBox::GetAccessibleName: invalid enum!");
+ OSL_FAIL("BrowseBox::GetAccessibleName: invalid enum!");
}
return aRetText;
}
diff --git a/svtools/source/table/tablecontrol.cxx b/svtools/source/table/tablecontrol.cxx
index 17f74eb..83ed73a 100644
--- a/svtools/source/table/tablecontrol.cxx
+++ b/svtools/source/table/tablecontrol.cxx
@@ -316,7 +316,7 @@ namespace svt { namespace table
aRetText = GetColumnName(_nCol);
break;
default:
- OSL_ENSURE(0,"GridControl::GetAccessibleName: invalid enum!");
+ OSL_FAIL("GridControl::GetAccessibleName: invalid enum!");
}
return aRetText;
}
diff --git a/toolkit/workben/layout/test.cxx b/toolkit/workben/layout/test.cxx
index 3330bbc..60cb47b 100644
--- a/toolkit/workben/layout/test.cxx
+++ b/toolkit/workben/layout/test.cxx
@@ -344,14 +344,14 @@ void LayoutTest::Main()
aStr += OUStringToOString( exc.Message, RTL_TEXTENCODING_ASCII_US );
}
fprintf (stderr, "Parsing error: '%s'\n", aStr.getStr());
- OSL_ENSURE( 0, aStr.getStr() );
+ OSL_FAIL( aStr.getStr() );
}
catch ( uno::Exception & rExc )
{
OString aStr( OUStringToOString( rExc.Message,
RTL_TEXTENCODING_ASCII_US ) );
fprintf (stderr, "UNO error: '%s'\n", aStr.getStr());
- OSL_ENSURE( 0, aStr.getStr() );
+ OSL_FAIL( aStr.getStr() );
}
Reference< lang::XComponent > xComp( mxContext, UNO_QUERY );
diff --git a/vcl/os2/source/app/salinst.cxx b/vcl/os2/source/app/salinst.cxx
index c19f034..38743dd 100644
--- a/vcl/os2/source/app/salinst.cxx
+++ b/vcl/os2/source/app/salinst.cxx
@@ -664,7 +664,7 @@ MRESULT EXPENTRY SalComWndProc( HWND hWnd, ULONG nMsg,
//in the structure (GetWindowPtr()).
if (WinDestroyWindow((HWND)nMP2) == 0)
{
- OSL_ENSURE(0, "DestroyWindow failed!");
+ OSL_FAIL("DestroyWindow failed!");
//Failure: We remove the SalFrame from the window structure. So we avoid that
// the window structure may contain an invalid pointer, once the SalFrame is deleted.
SetWindowPtr((HWND)nMP2, 0);
diff --git a/vcl/source/gdi/outdevnative.cxx b/vcl/source/gdi/outdevnative.cxx
index 3818951..d0f1313 100644
--- a/vcl/source/gdi/outdevnative.cxx
+++ b/vcl/source/gdi/outdevnative.cxx
@@ -202,7 +202,7 @@ static boost::shared_ptr< ImplControlValue > lcl_transformControlValue( const Im
aResult.reset( new ImplControlValue( rVal ) );
break;
default:
- OSL_ENSURE( 0, "unknown ImplControlValue type !" );
+ OSL_FAIL( "unknown ImplControlValue type !" );
break;
}
return aResult;
diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx
index 8de02ad..81f260f 100644
--- a/vcl/source/gdi/print3.cxx
+++ b/vcl/source/gdi/print3.cxx
@@ -1437,7 +1437,7 @@ bool PrinterController::isUIOptionEnabled( const rtl::OUString& i_rProperty ) co
else
{
// if the type does not match something is awry
- OSL_ENSURE( 0, "strange type in control dependency" );
+ OSL_FAIL( "strange type in control dependency" );
bEnabled = false;
}
}
@@ -1491,7 +1491,7 @@ rtl::OUString PrinterController::makeEnabled( const rtl::OUString& i_rProperty )
else
{
// if the type does not match something is awry
- OSL_ENSURE( 0, "strange type in control dependency" );
+ OSL_FAIL( "strange type in control dependency" );
}
}
}
diff --git a/vcl/unx/gtk/a11y/atkwrapper.cxx b/vcl/unx/gtk/a11y/atkwrapper.cxx
index 1066917..f4e0bad 100644
--- a/vcl/unx/gtk/a11y/atkwrapper.cxx
+++ b/vcl/unx/gtk/a11y/atkwrapper.cxx
@@ -397,7 +397,7 @@ wrapper_get_n_children( AtkObject *atk_obj )
n = obj->mpContext->getAccessibleChildCount();
}
catch(const uno::Exception& e) {
- OSL_ENSURE(0, "Exception in getAccessibleChildCount()" );
+ OSL_FAIL("Exception in getAccessibleChildCount()" );
}
}
@@ -429,7 +429,7 @@ wrapper_ref_child( AtkObject *atk_obj,
child = atk_object_wrapper_ref( xAccessible );
}
catch(const uno::Exception& e) {
- OSL_ENSURE(0, "Exception in getAccessibleChild");
+ OSL_FAIL("Exception in getAccessibleChild");
}
}
diff --git a/vcl/unx/source/dtrans/X11_selection.cxx b/vcl/unx/source/dtrans/X11_selection.cxx
index df908a6..4d96c48 100644
--- a/vcl/unx/source/dtrans/X11_selection.cxx
+++ b/vcl/unx/source/dtrans/X11_selection.cxx
@@ -2191,7 +2191,7 @@ bool SelectionManager::handleDropEvent( XClientMessageEvent& rMessage )
m_bDropWaitingForCompletion && m_aDropEnterEvent.data.l[0] )
{
bHandled = true;
- OSL_ENSURE( 0, "someone forgot to call dropComplete ?" );
+ OSL_FAIL( "someone forgot to call dropComplete ?" );
// some listener forgot to call dropComplete in the last operation
// let us end it now and accept the new enter event
aGuard.clear();
@@ -3373,7 +3373,7 @@ void SelectionManager::startDrag(
GetX11SalData()->GetDisplay()->CaptureMouse( pCaptureFrame );
#if OSL_DEBUG_LEVEL > 0
else
- OSL_ENSURE( 0, "failed to acquire SolarMutex to reset capture frame" );
+ OSL_FAIL( "failed to acquire SolarMutex to reset capture frame" );
#endif
}
return;
@@ -3462,7 +3462,7 @@ void SelectionManager::startDrag(
GetX11SalData()->GetDisplay()->CaptureMouse( pCaptureFrame );
#if OSL_DEBUG_LEVEL > 0
else
- OSL_ENSURE( 0, "failed to acquire SolarMutex to reset capture frame" );
+ OSL_FAIL( "failed to acquire SolarMutex to reset capture frame" );
#endif
}
diff --git a/vcl/unx/source/printergfx/printerjob.cxx b/vcl/unx/source/printergfx/printerjob.cxx
index 3b78a37..0d2ba33 100644
--- a/vcl/unx/source/printergfx/printerjob.cxx
+++ b/vcl/unx/source/printergfx/printerjob.cxx
@@ -279,7 +279,7 @@ removeSpoolDir (const rtl::OUString& rSpoolDir)
{
// Conversion did not work, as this is quite a dangerous action,
// we should abort here ....
- OSL_ENSURE( 0, "psprint: couldn't remove spool directory" );
+ OSL_FAIL( "psprint: couldn't remove spool directory" );
return;
}
rtl::OString aSysPathByte =
@@ -291,7 +291,7 @@ removeSpoolDir (const rtl::OUString& rSpoolDir)
nChar += psp::appendStr (aSysPathByte.getStr(), pSystem + nChar);
if (system (pSystem) == -1)
- OSL_ENSURE( 0, "psprint: couldn't remove spool directory" );
+ OSL_FAIL( "psprint: couldn't remove spool directory" );
}
/* creates a spool directory with a "pidgin random" value based on
diff --git a/vcl/win/source/app/salinst.cxx b/vcl/win/source/app/salinst.cxx
index 86dae15..5c7bcc1 100644
--- a/vcl/win/source/app/salinst.cxx
+++ b/vcl/win/source/app/salinst.cxx
@@ -799,7 +799,7 @@ LRESULT CALLBACK SalComWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lPar
//in the structure (GetWindowPtr()).
if (DestroyWindow((HWND)lParam) == 0)
{
- OSL_ENSURE(0, "DestroyWindow failed!");
+ OSL_FAIL("DestroyWindow failed!");
//Failure: We remove the SalFrame from the window structure. So we avoid that
// the window structure may contain an invalid pointer, once the SalFrame is deleted.
SetWindowPtr((HWND)lParam, 0);
commit b44e28b2267dbacfda45d62c835c5e2fb1a3b87d
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Sat Mar 12 11:53:39 2011 +0100
Remove some dead code
diff --git a/dtrans/source/win32/dnd/source.cxx b/dtrans/source/win32/dnd/source.cxx
index 480bfb3..7212072 100644
--- a/dtrans/source/win32/dnd/source.cxx
+++ b/dtrans/source/win32/dnd/source.cxx
@@ -214,8 +214,6 @@ void SAL_CALL DragSource::startDrag(
}
else
{
- //OSL_ENSURE(false, "Overlapping Drag&Drop operation rejected!");
-
cnt = InterlockedDecrement(&m_RunningDndOperationCount);
DragSourceDropEvent dsde;
commit a0ece3ec8abd0de584586eb20a76dca0a32c6379
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Sat Mar 12 11:47:36 2011 +0100
Move OSL_ENSURE(false,...) to OSL_FAIL(...)
diff --git a/basegfx/inc/basegfx/raster/bpixelraster.hxx b/basegfx/inc/basegfx/raster/bpixelraster.hxx
index 7516a82..b67e53b 100644
--- a/basegfx/inc/basegfx/raster/bpixelraster.hxx
+++ b/basegfx/inc/basegfx/raster/bpixelraster.hxx
@@ -92,7 +92,7 @@ namespace basegfx
#ifdef DBG_UTIL
if(nIndex >= mnCount)
{
- OSL_ENSURE(false, "getBPixel: Access out of range (!)");
+ OSL_FAIL("getBPixel: Access out of range (!)");
return BPixel::getEmptyBPixel();
}
#endif
@@ -105,7 +105,7 @@ namespace basegfx
#ifdef DBG_UTIL
if(nIndex >= mnCount)
{
- OSL_ENSURE(false, "getBPixel: Access out of range (!)");
+ OSL_FAIL("getBPixel: Access out of range (!)");
return mpContent[0L];
}
#endif
diff --git a/basegfx/inc/basegfx/raster/bzpixelraster.hxx b/basegfx/inc/basegfx/raster/bzpixelraster.hxx
index 06b2d41..035c7a2 100644
--- a/basegfx/inc/basegfx/raster/bzpixelraster.hxx
+++ b/basegfx/inc/basegfx/raster/bzpixelraster.hxx
@@ -72,7 +72,7 @@ namespace basegfx
#ifdef DBG_UTIL
if(nIndex >= mnCount)
{
- OSL_ENSURE(false, "getZ: Access out of range (!)");
+ OSL_FAIL("getZ: Access out of range (!)");
return mpZBuffer[0L];
}
#endif
@@ -85,7 +85,7 @@ namespace basegfx
#ifdef DBG_UTIL
if(nIndex >= mnCount)
{
- OSL_ENSURE(false, "getZ: Access out of range (!)");
+ OSL_FAIL("getZ: Access out of range (!)");
return mpZBuffer[0L];
}
#endif
diff --git a/basegfx/source/matrix/b2dhommatrixtools.cxx b/basegfx/source/matrix/b2dhommatrixtools.cxx
index 90c5f47..48517ac 100644
--- a/basegfx/source/matrix/b2dhommatrixtools.cxx
+++ b/basegfx/source/matrix/b2dhommatrixtools.cxx
@@ -95,7 +95,7 @@ namespace basegfx
break;
default:
- OSL_ENSURE( false, "createSinCos: Impossible case reached" );
+ OSL_FAIL( "createSinCos: Impossible case reached" );
}
}
else
diff --git a/basegfx/source/polygon/b2dpolypolygonrasterconverter.cxx b/basegfx/source/polygon/b2dpolypolygonrasterconverter.cxx
index f51652f..e1fa4a5 100644
--- a/basegfx/source/polygon/b2dpolypolygonrasterconverter.cxx
+++ b/basegfx/source/polygon/b2dpolypolygonrasterconverter.cxx
@@ -591,8 +591,7 @@ namespace basegfx
switch( eFillRule )
{
default:
- OSL_ENSURE(false,
- "B2DPolyPolygonRasterConverter::rasterConvert(): Unexpected fill rule");
+ OSL_FAIL("B2DPolyPolygonRasterConverter::rasterConvert(): Unexpected fill rule");
return;
case FillRule_EVEN_ODD:
diff --git a/basegfx/source/polygon/b2dsvgpolypolygon.cxx b/basegfx/source/polygon/b2dsvgpolypolygon.cxx
index 51b8740..187e396 100644
--- a/basegfx/source/polygon/b2dsvgpolypolygon.cxx
+++ b/basegfx/source/polygon/b2dsvgpolypolygon.cxx
@@ -826,7 +826,7 @@ namespace basegfx
default:
{
- OSL_ENSURE(false, "importFromSvgD(): skipping tags in svg:d element (unknown)!");
+ OSL_FAIL("importFromSvgD(): skipping tags in svg:d element (unknown)!");
OSL_TRACE("importFromSvgD(): skipping tags in svg:d element (unknown: \"%c\")!", aCurrChar);
++nPos;
break;
diff --git a/basegfx/source/polygon/b2dtrapezoid.cxx b/basegfx/source/polygon/b2dtrapezoid.cxx
index d8ab584..77f29f3 100644
--- a/basegfx/source/polygon/b2dtrapezoid.cxx
+++ b/basegfx/source/polygon/b2dtrapezoid.cxx
@@ -622,7 +622,7 @@ namespace basegfx
// to not have an endless loop and start next. During development
// i constantly had breakpoints here, so i am sure enough to add an
// assertion here
- OSL_ENSURE(false, "Trapeziod decomposer in illegal state (!)");
+ OSL_FAIL("Trapeziod decomposer in illegal state (!)");
maTrDeEdgeEntries.pop_front();
continue;
}
@@ -636,7 +636,7 @@ namespace basegfx
// line; consume the single edge to not have an endless loop and start
// next. During development i constantly had breakpoints here, so i am
// sure enough to add an assertion here
- OSL_ENSURE(false, "Trapeziod decomposer in illegal state (!)");
+ OSL_FAIL("Trapeziod decomposer in illegal state (!)");
maTrDeEdgeEntries.pop_front();
continue;
}
diff --git a/basegfx/source/tools/keystoplerp.cxx b/basegfx/source/tools/keystoplerp.cxx
index e837a1e..ca6f365 100644
--- a/basegfx/source/tools/keystoplerp.cxx
+++ b/basegfx/source/tools/keystoplerp.cxx
@@ -45,8 +45,7 @@ static void validateInput(const std::vector<double>& rKeyStops)
for( ::std::size_t i=1, len=rKeyStops.size(); i<len; ++i )
{
if( rKeyStops[i-1] > rKeyStops[i] )
- OSL_ENSURE( false,
- "KeyStopLerp::KeyStopLerp(): time vector is not sorted in ascending order!" );
+ OSL_FAIL( "KeyStopLerp::KeyStopLerp(): time vector is not sorted in ascending order!" );
}
#endif
}
diff --git a/canvas/inc/canvas/canvastools.hxx b/canvas/inc/canvas/canvastools.hxx
index bd1b20e..adf8164 100644
--- a/canvas/inc/canvas/canvastools.hxx
+++ b/canvas/inc/canvas/canvastools.hxx
@@ -565,7 +565,7 @@ namespace canvas
{
OSL_TRACE("ValueMap::ValueMap(): Key %s is not lowercase",
pMap->maKey);
- OSL_ENSURE( false, "ValueMap::ValueMap(): Key is not lowercase" );
+ OSL_FAIL( "ValueMap::ValueMap(): Key is not lowercase" );
}
if( mnEntries > 1 )
@@ -578,8 +578,7 @@ namespace canvas
OSL_TRACE("ValueMap::ValueMap(): Map is not sorted, keys %s and %s are wrong",
pMap[0].maKey,
pMap[1].maKey);
- OSL_ENSURE( false,
- "ValueMap::ValueMap(): Map is not sorted" );
+ OSL_FAIL( "ValueMap::ValueMap(): Map is not sorted" );
}
const ::rtl::OString aStr2( pMap[1].maKey );
@@ -588,7 +587,7 @@ namespace canvas
{
OSL_TRACE("ValueMap::ValueMap(): Key %s is not lowercase",
pMap[1].maKey);
- OSL_ENSURE( false, "ValueMap::ValueMap(): Key is not lowercase" );
+ OSL_FAIL( "ValueMap::ValueMap(): Key is not lowercase" );
}
}
}
diff --git a/canvas/source/cairo/cairo_quartz_cairo.cxx b/canvas/source/cairo/cairo_quartz_cairo.cxx
index d623d07..7beaf0b 100644
--- a/canvas/source/cairo/cairo_quartz_cairo.cxx
+++ b/canvas/source/cairo/cairo_quartz_cairo.cxx
@@ -188,7 +188,7 @@ namespace cairo
**/
void QuartzSurface::Resize( int width, int height )
{
- OSL_ENSURE(false,"not supposed to be called!");
+ OSL_FAIL("not supposed to be called!");
}
diff --git a/canvas/source/cairo/cairo_spritedevicehelper.cxx b/canvas/source/cairo/cairo_spritedevicehelper.cxx
index 5a8158a..4720f92 100644
--- a/canvas/source/cairo/cairo_spritedevicehelper.cxx
+++ b/canvas/source/cairo/cairo_spritedevicehelper.cxx
@@ -99,13 +99,13 @@ namespace cairocanvas
::sal_Bool SpriteDeviceHelper::showBuffer( bool, ::sal_Bool )
{
- OSL_ENSURE(false,"Not supposed to be called, handled by SpriteCanvas");
+ OSL_FAIL("Not supposed to be called, handled by SpriteCanvas");
return sal_False;
}
::sal_Bool SpriteDeviceHelper::switchBuffer( bool, ::sal_Bool )
{
- OSL_ENSURE(false,"Not supposed to be called, handled by SpriteCanvas");
+ OSL_FAIL("Not supposed to be called, handled by SpriteCanvas");
return sal_False;
}
diff --git a/canvas/source/cairo/cairo_win32_cairo.cxx b/canvas/source/cairo/cairo_win32_cairo.cxx
index 992b076..a192b63 100644
--- a/canvas/source/cairo/cairo_win32_cairo.cxx
+++ b/canvas/source/cairo/cairo_win32_cairo.cxx
@@ -172,7 +172,7 @@ namespace cairo
**/
void Win32Surface::Resize( int /*width*/, int /*height*/ )
{
- OSL_ENSURE(false,"not supposed to be called!");
+ OSL_FAIL("not supposed to be called!");
}
void Win32Surface::flush() const
diff --git a/canvas/source/directx/dx_5rm.cxx b/canvas/source/directx/dx_5rm.cxx
index 4adcb09..1fec0dd 100644
--- a/canvas/source/directx/dx_5rm.cxx
+++ b/canvas/source/directx/dx_5rm.cxx
@@ -2176,8 +2176,7 @@ namespace dxcanvas
}
default:
- OSL_ENSURE( false,
- "DXRenderModule::pushVertex(): unexpected primitive types" );
+ OSL_FAIL( "DXRenderModule::pushVertex(): unexpected primitive types" );
break;
}
}
diff --git a/canvas/source/directx/dx_9rm.cxx b/canvas/source/directx/dx_9rm.cxx
index 50c0a3d..6f95ebe 100644
--- a/canvas/source/directx/dx_9rm.cxx
+++ b/canvas/source/directx/dx_9rm.cxx
@@ -1183,8 +1183,7 @@ namespace dxcanvas
}
default:
- OSL_ENSURE(false,
- "DXRenderModule::pushVertex(): unexpected primitive type");
+ OSL_FAIL("DXRenderModule::pushVertex(): unexpected primitive type");
break;
}
}
diff --git a/canvas/source/directx/dx_canvashelper.cxx b/canvas/source/directx/dx_canvashelper.cxx
index 1abf16c..ba6720d 100644
--- a/canvas/source/directx/dx_canvashelper.cxx
+++ b/canvas/source/directx/dx_canvashelper.cxx
@@ -91,8 +91,7 @@ namespace dxcanvas
switch( nJoinType )
{
case rendering::PathJoinType::NONE:
- OSL_ENSURE( false,
- "gdiJoinFromJoin(): Join NONE not possible, mapping to MITER" );
+ OSL_FAIL( "gdiJoinFromJoin(): Join NONE not possible, mapping to MITER" );
// FALLTHROUGH intended
case rendering::PathJoinType::MITER:
return Gdiplus::LineJoinMiter;
diff --git a/canvas/source/directx/dx_config.cxx b/canvas/source/directx/dx_config.cxx
index 154673f..958e0ec 100644
--- a/canvas/source/directx/dx_config.cxx
+++ b/canvas/source/directx/dx_config.cxx
@@ -93,8 +93,7 @@ namespace dxcanvas
}
catch( uno::Exception& )
{
- OSL_ENSURE( false,
- rtl::OUStringToOString(
+ OSL_FAIL( rtl::OUStringToOString(
comphelper::anyToString( cppu::getCaughtException() ),
RTL_TEXTENCODING_UTF8 ).getStr() );
}
@@ -135,8 +134,7 @@ namespace dxcanvas
}
catch( uno::Exception& )
{
- OSL_ENSURE( false,
- rtl::OUStringToOString(
+ OSL_FAIL( rtl::OUStringToOString(
comphelper::anyToString( cppu::getCaughtException() ),
RTL_TEXTENCODING_UTF8 ).getStr() );
}
diff --git a/canvas/source/directx/dx_spritedevicehelper.cxx b/canvas/source/directx/dx_spritedevicehelper.cxx
index e65c13a..04cf61b 100644
--- a/canvas/source/directx/dx_spritedevicehelper.cxx
+++ b/canvas/source/directx/dx_spritedevicehelper.cxx
@@ -205,13 +205,13 @@ namespace dxcanvas
::sal_Bool SpriteDeviceHelper::showBuffer( bool, ::sal_Bool )
{
- OSL_ENSURE(false,"Not supposed to be called, handled by SpriteCanvas");
+ OSL_FAIL("Not supposed to be called, handled by SpriteCanvas");
return sal_False;
}
::sal_Bool SpriteDeviceHelper::switchBuffer( bool, ::sal_Bool )
{
- OSL_ENSURE(false,"Not supposed to be called, handled by SpriteCanvas");
+ OSL_FAIL("Not supposed to be called, handled by SpriteCanvas");
return sal_False;
}
diff --git a/canvas/source/tools/prioritybooster.cxx b/canvas/source/tools/prioritybooster.cxx
index 142c25c..eab6326 100644
--- a/canvas/source/tools/prioritybooster.cxx
+++ b/canvas/source/tools/prioritybooster.cxx
@@ -64,8 +64,7 @@ namespace canvas
if ( 0 == SetThreadPriority( aCurrThread, mpImpl->mnOldPriority + nDelta ) )
{
- OSL_ENSURE( false,
- "PriorityBooster::PriorityBooster(): Was not able to modify thread priority" );
+ OSL_FAIL( "PriorityBooster::PriorityBooster(): Was not able to modify thread priority" );
}
#else
(void)nDelta;
diff --git a/canvas/source/vcl/spritedevicehelper.cxx b/canvas/source/vcl/spritedevicehelper.cxx
index 2e07f38..e85aeb5 100644
--- a/canvas/source/vcl/spritedevicehelper.cxx
+++ b/canvas/source/vcl/spritedevicehelper.cxx
@@ -89,13 +89,13 @@ namespace vclcanvas
::sal_Bool SpriteDeviceHelper::showBuffer( bool, ::sal_Bool )
{
- OSL_ENSURE(false,"Not supposed to be called, handled by SpriteCanvas");
+ OSL_FAIL("Not supposed to be called, handled by SpriteCanvas");
return sal_False;
}
::sal_Bool SpriteDeviceHelper::switchBuffer( bool, ::sal_Bool )
{
- OSL_ENSURE(false,"Not supposed to be called, handled by SpriteCanvas");
+ OSL_FAIL("Not supposed to be called, handled by SpriteCanvas");
return sal_False;
}
diff --git a/canvas/source/vcl/spritehelper.cxx b/canvas/source/vcl/spritehelper.cxx
index 240dbbf..cf7bd4b 100644
--- a/canvas/source/vcl/spritehelper.cxx
+++ b/canvas/source/vcl/spritehelper.cxx
@@ -167,8 +167,7 @@ namespace vclcanvas
#ifndef QUARTZ
if( aMask.GetBitCount() != 1 )
{
- OSL_ENSURE(false,
- "CanvasCustomSprite::redraw(): Mask bitmap is not "
+ OSL_FAIL("CanvasCustomSprite::redraw(): Mask bitmap is not "
"monochrome (performance!)");
aMask.MakeMono(255);
}
diff --git a/comphelper/source/container/enumerablemap.cxx b/comphelper/source/container/enumerablemap.cxx
index b88c97a..334fa8a 100644
--- a/comphelper/source/container/enumerablemap.cxx
+++ b/comphelper/source/container/enumerablemap.cxx
@@ -319,7 +319,7 @@ namespace comphelper
return;
}
}
- OSL_ENSURE( false, "lcl_revokeMapModificationListener: the listener is not registered!" );
+ OSL_FAIL( "lcl_revokeMapModificationListener: the listener is not registered!" );
}
//--------------------------------------------------------------------
diff --git a/comphelper/source/misc/accessiblewrapper.cxx b/comphelper/source/misc/accessiblewrapper.cxx
index d89fb90..8833f42 100644
--- a/comphelper/source/misc/accessiblewrapper.cxx
+++ b/comphelper/source/misc/accessiblewrapper.cxx
@@ -161,8 +161,7 @@ namespace comphelper
if (!m_aChildrenMap.insert(
AccessibleMap::value_type( _rxKey, xValue ) ).second)
{
- OSL_ENSURE(
- false,
+ OSL_FAIL(
"OWrappedAccessibleChildrenManager::"
"getAccessibleWrapperFor: element was already"
" inserted!" );
diff --git a/comphelper/source/misc/documentinfo.cxx b/comphelper/source/misc/documentinfo.cxx
index 256c50f..1bf3480 100644
--- a/comphelper/source/misc/documentinfo.cxx
+++ b/comphelper/source/misc/documentinfo.cxx
@@ -187,7 +187,7 @@ namespace comphelper {
sMessage += "\nin function:\n";
sMessage += BOOST_CURRENT_FUNCTION;
sMessage += "\n";
- OSL_ENSURE( false, sMessage );
+ OSL_FAIL( sMessage );
}
return sTitle;
diff --git a/comphelper/source/misc/logging.cxx b/comphelper/source/misc/logging.cxx
index f946799..8e80790 100644
--- a/comphelper/source/misc/logging.cxx
+++ b/comphelper/source/misc/logging.cxx
@@ -104,7 +104,7 @@ namespace comphelper
catch( const Exception& e )
{
(void)e;
- OSL_ENSURE( false, "EventLogger_Impl::impl_createLogger_nothrow: caught an exception!" );
+ OSL_FAIL( "EventLogger_Impl::impl_createLogger_nothrow: caught an exception!" );
}
}
@@ -145,7 +145,7 @@ namespace comphelper
catch( const Exception& e )
{
(void)e;
- OSL_ENSURE( false, "EventLogger::getLogLevel: caught an exception!" );
+ OSL_FAIL( "EventLogger::getLogLevel: caught an exception!" );
}
return LogLevel::OFF;
@@ -162,7 +162,7 @@ namespace comphelper
catch( const Exception& e )
{
(void)e;
- OSL_ENSURE( false, "EventLogger::setLogLevel: caught an exception!" );
+ OSL_FAIL( "EventLogger::setLogLevel: caught an exception!" );
}
}
@@ -179,7 +179,7 @@ namespace comphelper
catch( const Exception& e )
{
(void)e;
- OSL_ENSURE( false, "EventLogger::isLoggable: caught an exception!" );
+ OSL_FAIL( "EventLogger::isLoggable: caught an exception!" );
}
return false;
@@ -199,7 +199,7 @@ namespace comphelper
catch( const Exception& e )
{
(void)e;
- OSL_ENSURE( false, "EventLogger::addLogHandler: caught an exception!" );
+ OSL_FAIL( "EventLogger::addLogHandler: caught an exception!" );
}
return false;
}
@@ -218,7 +218,7 @@ namespace comphelper
catch( const Exception& e )
{
(void)e;
- OSL_ENSURE( false, "EventLogger::removeLogHandler: caught an exception!" );
+ OSL_FAIL( "EventLogger::removeLogHandler: caught an exception!" );
}
return false;
}
@@ -292,7 +292,7 @@ namespace comphelper
catch( const Exception& e )
{
(void)e;
- OSL_ENSURE( false, "EventLogger::impl_log: caught an exception!" );
+ OSL_FAIL( "EventLogger::impl_log: caught an exception!" );
}
return false;
@@ -335,7 +335,7 @@ namespace comphelper
catch( const Exception& e )
{
(void)e;
- OSL_ENSURE( false, "lcl_loadBundle_nothrow: caught an exception!" );
+ OSL_FAIL( "lcl_loadBundle_nothrow: caught an exception!" );
}
return _rLoggerData.xBundle.is();
@@ -356,7 +356,7 @@ namespace comphelper
catch( const Exception& e )
{
(void)e;
- OSL_ENSURE( false, "lcl_loadString_nothrow: caught an exception!" );
+ OSL_FAIL( "lcl_loadString_nothrow: caught an exception!" );
}
return sMessage;
}
diff --git a/comphelper/source/misc/mediadescriptor.cxx b/comphelper/source/misc/mediadescriptor.cxx
index c06b408..9acd224 100644
--- a/comphelper/source/misc/mediadescriptor.cxx
+++ b/comphelper/source/misc/mediadescriptor.cxx
@@ -658,7 +658,7 @@ sal_Bool MediaDescriptor::impl_openStreamWithPostData( const css::uno::Reference
// success?
if ( !xResultStream.is() )
{
- OSL_ENSURE( false, "no valid reply to the HTTP-Post" );
+ OSL_FAIL( "no valid reply to the HTTP-Post" );
return sal_False;
}
diff --git a/comphelper/source/misc/namedvaluecollection.cxx b/comphelper/source/misc/namedvaluecollection.cxx
index 47b495d..ce576ed 100644
--- a/comphelper/source/misc/namedvaluecollection.cxx
+++ b/comphelper/source/misc/namedvaluecollection.cxx
@@ -195,7 +195,7 @@ namespace comphelper
::rtl::OStringBuffer message;
message.append( "NamedValueCollection::impl_assign: encountered a value type which I cannot handle:\n" );
message.append( ::rtl::OUStringToOString( pArgument->getValueTypeName(), RTL_TEXTENCODING_ASCII_US ) );
- OSL_ENSURE( false, message.makeStringAndClear() );
+ OSL_FAIL( message.makeStringAndClear() );
}
#endif
}
diff --git a/comphelper/source/misc/officeresourcebundle.cxx b/comphelper/source/misc/officeresourcebundle.cxx
index 0703f8e..8effd68 100644
--- a/comphelper/source/misc/officeresourcebundle.cxx
+++ b/comphelper/source/misc/officeresourcebundle.cxx
@@ -137,7 +137,7 @@ namespace comphelper
}
catch( const Exception& )
{
- OSL_ENSURE( false, "ResourceBundle_Impl::loadString: caught an exception!" );
+ OSL_FAIL( "ResourceBundle_Impl::loadString: caught an exception!" );
}
}
return sString;
@@ -158,7 +158,7 @@ namespace comphelper
}
catch( const Exception& )
{
- OSL_ENSURE( false, "ResourceBundle_Impl::hasString: caught an exception!" );
+ OSL_FAIL( "ResourceBundle_Impl::hasString: caught an exception!" );
}
}
return has;
@@ -182,7 +182,7 @@ namespace comphelper
}
catch( const Exception& )
{
- OSL_ENSURE( false, "ResourceBundle_Impl::impl_loadBundle_nopthrow: could not create the resource loader!" );
+ OSL_FAIL( "ResourceBundle_Impl::impl_loadBundle_nopthrow: could not create the resource loader!" );
}
if ( !xLoader.is() )
@@ -194,7 +194,7 @@ namespace comphelper
}
catch( const MissingResourceException& )
{
- OSL_ENSURE( false, "ResourceBundle_Impl::impl_loadBundle_nopthrow: missing the given resource bundle!" );
+ OSL_FAIL( "ResourceBundle_Impl::impl_loadBundle_nopthrow: missing the given resource bundle!" );
}
return m_xBundle.is();
diff --git a/comphelper/source/misc/scopeguard.cxx b/comphelper/source/misc/scopeguard.cxx
index 60062b2..b6df73d 100644
--- a/comphelper/source/misc/scopeguard.cxx
+++ b/comphelper/source/misc/scopeguard.cxx
@@ -46,14 +46,14 @@ ScopeGuard::~ScopeGuard()
}
catch (com::sun::star::uno::Exception & exc) {
(void) exc; // avoid warning about unused variable
- OSL_ENSURE(
- false, rtl::OUStringToOString(
+ OSL_FAIL(
+ rtl::OUStringToOString(
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
"UNO exception occurred: ") ) +
exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
}
catch (...) {
- OSL_ENSURE( false, "unknown exception occurred!" );
+ OSL_FAIL( "unknown exception occurred!" );
}
}
else
diff --git a/comphelper/source/misc/servicedecl.cxx b/comphelper/source/misc/servicedecl.cxx
index 85bb01e..0abbd6a 100644
--- a/comphelper/source/misc/servicedecl.cxx
+++ b/comphelper/source/misc/servicedecl.cxx
@@ -142,7 +142,7 @@ bool ServiceDecl::writeInfo( registry::XRegistryKey * xKey ) const
bRet = true;
}
catch (registry::InvalidRegistryException const&) {
- OSL_ENSURE( false, "### InvalidRegistryException!" );
+ OSL_FAIL( "### InvalidRegistryException!" );
}
}
return bRet;
diff --git a/comphelper/source/property/propagg.cxx b/comphelper/source/property/propagg.cxx
index 1b9e4d7..a72df30 100644
--- a/comphelper/source/property/propagg.cxx
+++ b/comphelper/source/property/propagg.cxx
@@ -727,7 +727,7 @@ void SAL_CALL OPropertySetAggregationHelper::setPropertyValues(
aMessage.append( "\n(implementation " );
aMessage.append( typeid( *this ).name() );
aMessage.append( ")" );
- OSL_ENSURE( false, aMessage.getStr() );
+ OSL_FAIL( aMessage.getStr() );
#endif
}
}
diff --git a/comphelper/source/property/propertycontainerhelper.cxx b/comphelper/source/property/propertycontainerhelper.cxx
index 0b03765..e011ac2 100644
--- a/comphelper/source/property/propertycontainerhelper.cxx
+++ b/comphelper/source/property/propertycontainerhelper.cxx
@@ -256,7 +256,7 @@ sal_Bool OPropertyContainerHelper::convertFastPropertyValue(
PropertiesIterator aPos = searchHandle(_nHandle);
if (aPos == m_aProperties.end())
{
- OSL_ENSURE( false, "OPropertyContainerHelper::convertFastPropertyValue: unknown handle!" );
+ OSL_FAIL( "OPropertyContainerHelper::convertFastPropertyValue: unknown handle!" );
// should not happen if the derived class has built a correct property set info helper to be used by
// our base class OPropertySetHelper
return bModified;
@@ -399,7 +399,7 @@ void OPropertyContainerHelper::setFastPropertyValue(sal_Int32 _nHandle, const An
PropertiesIterator aPos = searchHandle(_nHandle);
if (aPos == m_aProperties.end())
{
- OSL_ENSURE( false, "OPropertyContainerHelper::setFastPropertyValue: unknown handle!" );
+ OSL_FAIL( "OPropertyContainerHelper::setFastPropertyValue: unknown handle!" );
// should not happen if the derived class has built a correct property set info helper to be used by
// our base class OPropertySetHelper
return;
@@ -441,7 +441,7 @@ void OPropertyContainerHelper::getFastPropertyValue(Any& _rValue, sal_Int32 _nHa
PropertiesIterator aPos = const_cast<OPropertyContainerHelper*>(this)->searchHandle(_nHandle);
if (aPos == m_aProperties.end())
{
- OSL_ENSURE( false, "OPropertyContainerHelper::getFastPropertyValue: unknown handle!" );
+ OSL_FAIL( "OPropertyContainerHelper::getFastPropertyValue: unknown handle!" );
// should not happen if the derived class has built a correct property set info helper to be used by
// our base class OPropertySetHelper
return;
@@ -501,7 +501,7 @@ void OPropertyContainerHelper::modifyAttributes(sal_Int32 _nHandle, sal_Int32 _n
PropertiesIterator aPos = searchHandle(_nHandle);
if (aPos == m_aProperties.end())
{
- OSL_ENSURE( false, "OPropertyContainerHelper::modifyAttributes: unknown handle!" );
+ OSL_FAIL( "OPropertyContainerHelper::modifyAttributes: unknown handle!" );
// should not happen if the derived class has built a correct property set info helper to be used by
// our base class OPropertySetHelper
return;
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index 2447a35..edee610 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -2684,8 +2684,7 @@ namespace cppcanvas
break;
default:
- OSL_ENSURE( false,
- "Unknown meta action type encountered" );
+ OSL_FAIL( "Unknown meta action type encountered" );
break;
}
@@ -3136,8 +3135,7 @@ namespace cppcanvas
}
catch( uno::Exception& )
{
- OSL_ENSURE( false,
- rtl::OUStringToOString(
+ OSL_FAIL( rtl::OUStringToOString(
comphelper::anyToString( cppu::getCaughtException() ),
RTL_TEXTENCODING_UTF8 ).getStr() );
@@ -3198,8 +3196,7 @@ namespace cppcanvas
}
catch( uno::Exception& )
{
- OSL_ENSURE( false,
- rtl::OUStringToOString(
+ OSL_FAIL( rtl::OUStringToOString(
comphelper::anyToString( cppu::getCaughtException() ),
RTL_TEXTENCODING_UTF8 ).getStr() );
diff --git a/cppcanvas/source/mtfrenderer/textaction.cxx b/cppcanvas/source/mtfrenderer/textaction.cxx
index f3704c2..fc94b65 100644
--- a/cppcanvas/source/mtfrenderer/textaction.cxx
+++ b/cppcanvas/source/mtfrenderer/textaction.cxx
@@ -728,8 +728,7 @@ namespace cppcanvas
bool TextAction::render( const ::basegfx::B2DHomMatrix& rTransformation,
const Subset& /*rSubset*/ ) const
{
- OSL_ENSURE( false,
- "TextAction::render(): Subset not supported by this object" );
+ OSL_FAIL( "TextAction::render(): Subset not supported by this object" );
// TODO(P1): Retrieve necessary font metric info for
// TextAction from XCanvas. Currently, the
@@ -760,8 +759,7 @@ namespace cppcanvas
::basegfx::B2DRange TextAction::getBounds( const ::basegfx::B2DHomMatrix& rTransformation,
const Subset& /*rSubset*/ ) const
{
- OSL_ENSURE( false,
- "TextAction::getBounds(): Subset not supported by this object" );
+ OSL_FAIL( "TextAction::getBounds(): Subset not supported by this object" );
// TODO(P1): Retrieve necessary font metric info for
// TextAction from XCanvas. Currently, the
@@ -966,8 +964,7 @@ namespace cppcanvas
bool EffectTextAction::render( const ::basegfx::B2DHomMatrix& rTransformation,
const Subset& /*rSubset*/ ) const
{
- OSL_ENSURE( false,
- "EffectTextAction::render(): Subset not supported by this object" );
+ OSL_FAIL( "EffectTextAction::render(): Subset not supported by this object" );
// TODO(P1): Retrieve necessary font metric info for
// TextAction from XCanvas. Currently, the
@@ -1003,8 +1000,7 @@ namespace cppcanvas
::basegfx::B2DRange EffectTextAction::getBounds( const ::basegfx::B2DHomMatrix& rTransformation,
const Subset& /*rSubset*/ ) const
{
- OSL_ENSURE( false,
- "EffectTextAction::getBounds(): Subset not supported by this object" );
+ OSL_FAIL( "EffectTextAction::getBounds(): Subset not supported by this object" );
// TODO(P1): Retrieve necessary font metric info for
// TextAction from XCanvas. Currently, the
@@ -1923,8 +1919,7 @@ namespace cppcanvas
::basegfx::B2DRange OutlineAction::getBounds( const ::basegfx::B2DHomMatrix& rTransformation,
const Subset& /*rSubset*/ ) const
{
- OSL_ENSURE( false,
- "OutlineAction::getBounds(): Subset not yet supported by this object" );
+ OSL_FAIL( "OutlineAction::getBounds(): Subset not yet supported by this object" );
return getBounds( rTransformation );
}
diff --git a/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx b/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx
index 40f580d..2fa7b3f 100644
--- a/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx
+++ b/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx
@@ -299,8 +299,7 @@ namespace cppcanvas
nRotate,
nShearX ) )
{
- OSL_ENSURE( false,
- "TransparencyGroupAction::render(): non-decomposable transformation" );
+ OSL_FAIL( "TransparencyGroupAction::render(): non-decomposable transformation" );
return false;
}
@@ -403,8 +402,7 @@ namespace cppcanvas
break;
default:
- OSL_ENSURE( false,
- "Unknown meta action type encountered" );
+ OSL_FAIL( "Unknown meta action type encountered" );
break;
}
}
diff --git a/dtrans/source/os2/clipb/Os2Clipboard.cxx b/dtrans/source/os2/clipb/Os2Clipboard.cxx
index 9c8e656..e7da0ef 100644
--- a/dtrans/source/os2/clipb/Os2Clipboard.cxx
+++ b/dtrans/source/os2/clipb/Os2Clipboard.cxx
@@ -390,14 +390,14 @@ void SAL_CALL Os2Clipboard::notifyAllClipboardListener( )
}
catch(RuntimeException&)
{
- OSL_ENSURE( false, "RuntimeException caught" );
+ OSL_FAIL( "RuntimeException caught" );
debug_printf( "RuntimeException caught" );
}
}
}
catch(const ::com::sun::star::lang::DisposedException&)
{
- OSL_ENSURE(false, "Service Manager disposed");
+ OSL_FAIL("Service Manager disposed");
debug_printf( "Service Manager disposed");
// no further clipboard changed notifications
diff --git a/dtrans/source/win32/clipb/WinClipboard.cxx b/dtrans/source/win32/clipb/WinClipboard.cxx
index f23be5b..b4c59ff 100644
--- a/dtrans/source/win32/clipb/WinClipboard.cxx
+++ b/dtrans/source/win32/clipb/WinClipboard.cxx
@@ -256,13 +256,13 @@ void SAL_CALL CWinClipboard::notifyAllClipboardListener( )
}
catch(RuntimeException&)
{
- OSL_ENSURE( false, "RuntimeException caught" );
+ OSL_FAIL( "RuntimeException caught" );
}
}
}
catch(const ::com::sun::star::lang::DisposedException&)
{
- OSL_ENSURE(false, "Service Manager disposed");
+ OSL_FAIL("Service Manager disposed");
// no further clipboard changed notifications
m_pImpl->unregisterClipboardViewer();
diff --git a/dtrans/source/win32/dnd/source.cxx b/dtrans/source/win32/dnd/source.cxx
index 4bd0257..480bfb3 100644
--- a/dtrans/source/win32/dnd/source.cxx
+++ b/dtrans/source/win32/dnd/source.cxx
@@ -229,7 +229,7 @@ void SAL_CALL DragSource::startDrag(
}
catch(RuntimeException&)
{
- OSL_ENSURE(false, "Runtime exception during event dispatching");
+ OSL_FAIL("Runtime exception during event dispatching");
}
}
}
diff --git a/dtrans/source/win32/dtobj/FmtFilter.cxx b/dtrans/source/win32/dtobj/FmtFilter.cxx
index 0702ef4..95909b0 100644
--- a/dtrans/source/win32/dtobj/FmtFilter.cxx
+++ b/dtrans/source/win32/dtobj/FmtFilter.cxx
@@ -470,7 +470,7 @@ std::wstring getShellLinkTarget(const std::wstring& aLnkFile)
}
catch(sal::systools::ComError& ex)
{
- OSL_ENSURE(false, ex.what());
+ OSL_FAIL(ex.what());
ex = ex;
}
return target;
diff --git a/sax/source/expatwrap/saxwriter.cxx b/sax/source/expatwrap/saxwriter.cxx
index d5e6c63..b0d014f 100644
--- a/sax/source/expatwrap/saxwriter.cxx
+++ b/sax/source/expatwrap/saxwriter.cxx
@@ -457,7 +457,7 @@ inline sal_Bool SaxWriterHelper::convertToXML( const sal_Unicode * pStr,
}
else
{
- OSL_ENSURE( false, "illegal Unicode character" );
+ OSL_FAIL( "illegal Unicode character" );
bRet = sal_False;
}
diff --git a/sax/source/tools/converter.cxx b/sax/source/tools/converter.cxx
index 9efb584..3b56498 100644
--- a/sax/source/tools/converter.cxx
+++ b/sax/source/tools/converter.cxx
@@ -270,7 +270,7 @@ void Converter::convertMeasure( OUStringBuffer& rBuffer,
sal_Int16 nSourceUnit /* = MeasureUnit::MM_100TH */,
sal_Int16 nTargetUnit /* = MeasureUnit::INCH */ )
{
- OSL_ENSURE( false, "Converter::convertMeasure - not implemented, tools/BigInt needs replacement" );
+ OSL_FAIL( "Converter::convertMeasure - not implemented, tools/BigInt needs replacement" );
(void)rBuffer;
(void)nMeasure;
(void)nSourceUnit;
@@ -661,7 +661,7 @@ bool Converter::convertDuration(double& rfTime,
{
//! how many days is a year or month?
- OSL_ENSURE( false, "years or months in duration: not implemented");
+ OSL_FAIL( "years or months in duration: not implemented");
bSuccess = false;
}
else
diff --git a/sot/source/base/filelist.cxx b/sot/source/base/filelist.cxx
index 65be91d..52f7b57 100644
--- a/sot/source/base/filelist.cxx
+++ b/sot/source/base/filelist.cxx
@@ -114,7 +114,7 @@ void FileList::Assign( const SvDataCopyStream& rCopyStream )
SvStream& operator<<( SvStream& rOStm, const FileList& /*rFileList*/ )
{
- OSL_ENSURE(false, "Not implemented!");
+ OSL_FAIL("Not implemented!");
return rOStm;
}
diff --git a/svtools/source/dialogs/roadmapwizard.cxx b/svtools/source/dialogs/roadmapwizard.cxx
index 4f32350..7d4f9c3 100644
--- a/svtools/source/dialogs/roadmapwizard.cxx
+++ b/svtools/source/dialogs/roadmapwizard.cxx
@@ -349,7 +349,7 @@ namespace svt
{
if ( m_pImpl->getFirstDifferentIndex( aActivePathPos->second, aNewPathPos->second ) <= nCurrentStatePathIndex )
{
- OSL_ENSURE( false, "RoadmapWizard::activate: you cannot activate a path which conflicts with the current one *before* the current state!" );
+ OSL_FAIL( "RoadmapWizard::activate: you cannot activate a path which conflicts with the current one *before* the current state!" );
return;
}
}
diff --git a/svtools/source/productregistration/productregistration.cxx b/svtools/source/productregistration/productregistration.cxx
index 3c50f6c..07f37a1 100644
--- a/svtools/source/productregistration/productregistration.cxx
+++ b/svtools/source/productregistration/productregistration.cxx
@@ -216,7 +216,7 @@ namespace svt
}
catch( const Exception& )
{
- OSL_ENSURE( false, "lcl_isEvalVersion: caught an exception!" );
+ OSL_FAIL( "lcl_isEvalVersion: caught an exception!" );
}
return bIsEvaluationVersion;
@@ -266,7 +266,7 @@ namespace svt
}
catch( const Exception& )
{
- OSL_ENSURE( false, "lcl_getOnlineRegistrationDispatch: caught an exception!" );
+ OSL_FAIL( "lcl_getOnlineRegistrationDispatch: caught an exception!" );
return false;
}
}
diff --git a/svtools/source/toolpanel/paneltabbar.cxx b/svtools/source/toolpanel/paneltabbar.cxx
index 6c3aeb1..26ee76f 100644
--- a/svtools/source/toolpanel/paneltabbar.cxx
+++ b/svtools/source/toolpanel/paneltabbar.cxx
@@ -444,14 +444,14 @@ namespace svt
{
if ( i_rImpl.m_rPanelDeck.GetPanelCount() != i_rImpl.m_aItems.size() )
{
- OSL_ENSURE( false, "lcl_checkConsistency: inconsistent array sizes!" );
+ OSL_FAIL( "lcl_checkConsistency: inconsistent array sizes!" );
return;
}
for ( size_t i = 0; i < i_rImpl.m_rPanelDeck.GetPanelCount(); ++i )
{
if ( i_rImpl.m_rPanelDeck.GetPanel( i ).get() != i_rImpl.m_aItems[i].pPanel.get() )
{
- OSL_ENSURE( false, "lcl_checkConsistency: array elements are inconsistent!" );
+ OSL_FAIL( "lcl_checkConsistency: array elements are inconsistent!" );
return;
}
}
diff --git a/svtools/source/toolpanel/tablayouter.cxx b/svtools/source/toolpanel/tablayouter.cxx
index ddfa4a1..8b3e551 100644
--- a/svtools/source/toolpanel/tablayouter.cxx
+++ b/svtools/source/toolpanel/tablayouter.cxx
@@ -78,7 +78,7 @@ namespace svt
{
if ( !i_rData.pTabBar.get() )
{
- OSL_ENSURE( false, "lcl_checkDisposed: already disposed!" );
+ OSL_FAIL( "lcl_checkDisposed: already disposed!" );
return true;
}
return false;
diff --git a/svtools/source/uno/wizard/unowizard.cxx b/svtools/source/uno/wizard/unowizard.cxx
index 53a4aca..f8bdd57 100644
--- a/svtools/source/uno/wizard/unowizard.cxx
+++ b/svtools/source/uno/wizard/unowizard.cxx
@@ -91,7 +91,7 @@ namespace svt { namespace uno
case WizardButton::CANCEL: return WZB_CANCEL;
case WizardButton::HELP: return WZB_HELP;
}
- OSL_ENSURE( false, "lcl_convertWizardButtonToWZB: invalid WizardButton constant!" );
+ OSL_FAIL( "lcl_convertWizardButtonToWZB: invalid WizardButton constant!" );
return WZB_NONE;
}
}
diff --git a/svtools/source/uno/wizard/wizardshell.cxx b/svtools/source/uno/wizard/wizardshell.cxx
index 9a58d3c..58987b0 100644
--- a/svtools/source/uno/wizard/wizardshell.cxx
+++ b/svtools/source/uno/wizard/wizardshell.cxx
@@ -134,7 +134,7 @@ namespace svt { namespace uno
default:
break;
}
- OSL_ENSURE( false, "WizardShell::convertCommitReasonToTravelType: unsupported CommitPageReason!" );
+ OSL_FAIL( "WizardShell::convertCommitReasonToTravelType: unsupported CommitPageReason!" );
return WizardTravelType::FINISH;
}
diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx
index fad0e06..d7b105c 100644
--- a/toolkit/source/awt/vclxwindow.cxx
+++ b/toolkit/source/awt/vclxwindow.cxx
@@ -1449,7 +1449,7 @@ namespace
}
break;
default:
- OSL_ENSURE( false, "lcl_updateWritingMode: unsupported WritingMode!" );
+ OSL_FAIL( "lcl_updateWritingMode: unsupported WritingMode!" );
} // switch ( nWritingMode )
_rWindow.EnableRTL( bEnableRTL );
@@ -1514,7 +1514,7 @@ void VCLXWindow::setProperty( const ::rtl::OUString& PropertyName, const ::com::
case MouseWheelBehavior::SCROLL_FOCUS_ONLY: nVclBehavior = MOUSE_WHEEL_FOCUS_ONLY; break;
case MouseWheelBehavior::SCROLL_ALWAYS: nVclBehavior = MOUSE_WHEEL_ALWAYS; break;
default:
- OSL_ENSURE( false, "VCLXWindow::setProperty( 'MouseWheelBehavior' ): illegal property value!" );
+ OSL_FAIL( "VCLXWindow::setProperty( 'MouseWheelBehavior' ): illegal property value!" );
}
aMouseSettings.SetWheelBehavior( nVclBehavior );
@@ -2031,7 +2031,7 @@ void VCLXWindow::setProperty( const ::rtl::OUString& PropertyName, const ::com::
case MOUSE_WHEEL_FOCUS_ONLY: nBehavior = MouseWheelBehavior::SCROLL_FOCUS_ONLY; break;
case MOUSE_WHEEL_ALWAYS: nBehavior = MouseWheelBehavior::SCROLL_ALWAYS; break;
default:
- OSL_ENSURE( false, "VCLXWindow::getProperty( 'MouseWheelBehavior' ): illegal VCL value!" );
+ OSL_FAIL( "VCLXWindow::getProperty( 'MouseWheelBehavior' ): illegal VCL value!" );
}
aProp <<= nBehavior;
}
diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx
index 2257a84..08dc1ea 100644
--- a/toolkit/source/awt/vclxwindows.cxx
+++ b/toolkit/source/awt/vclxwindows.cxx
@@ -1575,7 +1575,7 @@ void VCLXListBox::addItems( const ::com::sun::star::uno::Sequence< ::rtl::OUStri
{
if ( (sal_uInt16)nP == 0xFFFF )
{
- OSL_ENSURE( false, "VCLXListBox::addItems: too many entries!" );
+ OSL_FAIL( "VCLXListBox::addItems: too many entries!" );
// skip remaining entries, list cannot hold them, anyway
break;
}
@@ -4310,7 +4310,7 @@ void VCLXComboBox::addItems( const ::com::sun::star::uno::Sequence< ::rtl::OUStr
pBox->InsertEntry( aItems.getConstArray()[n], nP );
if ( nP == 0xFFFF )
{
- OSL_ENSURE( false, "VCLXComboBox::addItems: too many entries!" );
+ OSL_FAIL( "VCLXComboBox::addItems: too many entries!" );
// skip remaining entries, list cannot hold them, anyway
break;
}
diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx
index ed58c39..c9d9637 100644
--- a/tools/source/fsys/urlobj.cxx
+++ b/tools/source/fsys/urlobj.cxx
@@ -3475,8 +3475,8 @@ bool INetURLObject::setPath(rtl::OUString const & rThePath, bool bOctets,
//============================================================================
bool INetURLObject::checkHierarchical() const {
if (m_eScheme == INET_PROT_VND_SUN_STAR_EXPAND) {
- OSL_ENSURE(
- false, "INetURLObject::checkHierarchical vnd.sun.star.expand");
+ OSL_FAIL(
+ "INetURLObject::checkHierarchical vnd.sun.star.expand");
return true;
} else {
return getSchemeInfo().m_bHierarchical;
diff --git a/tools/source/string/tstring.cxx b/tools/source/string/tstring.cxx
index c82338e..08633d9 100644
--- a/tools/source/string/tstring.cxx
+++ b/tools/source/string/tstring.cxx
@@ -165,7 +165,7 @@ float ByteString::ToFloat() const
{
DBG_CHKTHIS( ByteString, DbgCheckByteString );
- OSL_ENSURE(false, "ByteString::ToFloat unusable");
+ OSL_FAIL("ByteString::ToFloat unusable");
return 0;
}
@@ -175,7 +175,7 @@ double ByteString::ToDouble() const
{
DBG_CHKTHIS( ByteString, DbgCheckByteString );
- OSL_ENSURE(false, "ByteString::ToDouble unusable");
+ OSL_FAIL("ByteString::ToDouble unusable");
return 0;
}
diff --git a/ucbhelper/source/provider/configureucb.cxx b/ucbhelper/source/provider/configureucb.cxx
index a7b6dba..5f28a6a 100644
--- a/ucbhelper/source/provider/configureucb.cxx
+++ b/ucbhelper/source/provider/configureucb.cxx
@@ -174,14 +174,14 @@ configureUcb(
if (rArguments.getLength() < 2
|| !(rArguments[0] >>= aKey1) || !(rArguments[1] >>= aKey2))
{
- OSL_ENSURE(false, "ucb::configureUcb(): Bad arguments");
+ OSL_FAIL("ucb::configureUcb(): Bad arguments");
return false;
}
ContentProviderDataList aData;
if (!getContentProviderData(rServiceFactory, aKey1, aKey2, aData))
{
- OSL_ENSURE(false, "ucb::configureUcb(): No configuration");
+ OSL_FAIL("ucb::configureUcb(): No configuration");
return false;
}
@@ -207,8 +207,7 @@ configureUcb(
pInfos->push_back(aInfo);
}
else
- OSL_ENSURE(false,
- "ucb::configureUcb(): Bad argument placeholders");
+ OSL_FAIL("ucb::configureUcb(): Bad argument placeholders");
}
return true;
diff --git a/ucbhelper/source/provider/provconf.cxx b/ucbhelper/source/provider/provconf.cxx
index 6deefbd..faf7e7b 100644
--- a/ucbhelper/source/provider/provconf.cxx
+++ b/ucbhelper/source/provider/provconf.cxx
@@ -99,8 +99,7 @@ bool getContentProviderData(
{
if ( !rServiceMgr.is() || !rKey1.getLength() || !rKey2.getLength() )
{
- OSL_ENSURE( false,
- "getContentProviderData - Invalid argument!" );
+ OSL_FAIL( "getContentProviderData - Invalid argument!" );
return false;
}
@@ -114,8 +113,7 @@ bool getContentProviderData(
if ( !xConfigProv.is() )
{
- OSL_ENSURE( false,
- "getContentProviderData - No config provider!" );
+ OSL_FAIL( "getContentProviderData - No config provider!" );
return false;
}
@@ -141,8 +139,7 @@ bool getContentProviderData(
if ( !xInterface.is() )
{
- OSL_ENSURE( false,
- "getContentProviderData - No config access!" );
+ OSL_FAIL( "getContentProviderData - No config access!" );
return false;
}
@@ -151,8 +148,7 @@ bool getContentProviderData(
if ( !xNameAccess.is() )
{
- OSL_ENSURE( false,
- "getContentProviderData - No XNameAccess!" );
+ OSL_FAIL( "getContentProviderData - No XNameAccess!" );
return false;
}
@@ -167,8 +163,7 @@ bool getContentProviderData(
if ( !xHierNameAccess.is() )
{
- OSL_ENSURE( false,
- "getContentProviderData - "
+ OSL_FAIL( "getContentProviderData - "
"No XHierarchicalNameAccess!" );
return false;
}
@@ -192,8 +187,7 @@ bool getContentProviderData(
if ( !( xHierNameAccess->getByHierarchicalName(
aKeyBuffer.makeStringAndClear() ) >>= aValue ) )
{
- OSL_ENSURE( false,
- "getContentProviderData - "
+ OSL_FAIL( "getContentProviderData - "
"Error getting item value!" );
continue;
}
@@ -207,8 +201,7 @@ bool getContentProviderData(
if ( !( xHierNameAccess->getByHierarchicalName(
aKeyBuffer.makeStringAndClear() ) >>= aValue ) )
{
- OSL_ENSURE( false,
- "getContentProviderData - "
+ OSL_FAIL( "getContentProviderData - "
"Error getting item value!" );
continue;
}
@@ -222,8 +215,7 @@ bool getContentProviderData(
if ( !( xHierNameAccess->getByHierarchicalName(
aKeyBuffer.makeStringAndClear() ) >>= aValue ) )
{
- OSL_ENSURE( false,
- "getContentProviderData - "
+ OSL_FAIL( "getContentProviderData - "
"Error getting item value!" );
continue;
}
@@ -237,8 +229,7 @@ bool getContentProviderData(
{
// getByHierarchicalName
- OSL_ENSURE( false,
- "getContentProviderData - "
+ OSL_FAIL( "getContentProviderData - "
"caught NoSuchElementException!" );
}
}
@@ -246,16 +237,14 @@ bool getContentProviderData(
}
catch ( uno::RuntimeException& )
{
- OSL_ENSURE( false,
- "getContentProviderData - caught RuntimeException!" );
+ OSL_FAIL( "getContentProviderData - caught RuntimeException!" );
return false;
}
catch ( uno::Exception& )
{
// createInstance, createInstanceWithArguments
- OSL_ENSURE( false,
- "getContentProviderData - caught Exception!" );
+ OSL_FAIL( "getContentProviderData - caught Exception!" );
return false;
}
diff --git a/unotools/source/config/bootstrap.cxx b/unotools/source/config/bootstrap.cxx
index d370a87..170034f 100644
--- a/unotools/source/config/bootstrap.cxx
+++ b/unotools/source/config/bootstrap.cxx
@@ -271,7 +271,7 @@ bool implEnsureAbsolute(OUString & _rsURL) // also strips embedded dots !!
}
else
{
- OSL_ENSURE(false, "Could not get absolute file URL for URL");
+ OSL_FAIL("Could not get absolute file URL for URL");
return false;
}
}
@@ -359,7 +359,7 @@ PathStatus checkStatusAndNormalizeURL(OUString & _sURL)
if (eStatus == Bootstrap::PATH_EXISTS)
{
if (!implNormalizeURL(_sURL,aDirItem))
- OSL_ENSURE(false,"Unexpected failure getting actual URL for existing object");
+ OSL_FAIL("Unexpected failure getting actual URL for existing object");
}
}
return eStatus;
diff --git a/unotools/source/config/configitem.cxx b/unotools/source/config/configitem.cxx
index e08f96e..84af88d 100644
--- a/unotools/source/config/configitem.cxx
+++ b/unotools/source/config/configitem.cxx
@@ -756,7 +756,7 @@ void lcl_normalizeLocalNames(Sequence< OUString >& _rNames, ConfigNameFormat _eF
break;
}
}
- OSL_ENSURE(false, "Cannot create absolute pathes: missing interface");
+ OSL_FAIL("Cannot create absolute pathes: missing interface");
// make local pathes instaed
case CONFIG_NAME_LOCAL_PATH:
diff --git a/unotools/source/config/configmgr.cxx b/unotools/source/config/configmgr.cxx
index 085050c..efc0b03 100644
--- a/unotools/source/config/configmgr.cxx
+++ b/unotools/source/config/configmgr.cxx
@@ -356,23 +356,19 @@ Any ConfigManager::GetDirectConfigProperty(ConfigProperty eProp)
switch(eProp)
{
case INSTALLPATH:
- OSL_ENSURE( false,
- "ConfigManager::GetDirectConfigProperty: "
+ OSL_FAIL( "ConfigManager::GetDirectConfigProperty: "
"INSTALLPATH no longer supported." );
return Any();
case USERINSTALLURL:
- OSL_ENSURE( false,
- "ConfigManager::GetDirectConfigProperty: "
+ OSL_FAIL( "ConfigManager::GetDirectConfigProperty: "
"USERINSTALLURL no longer supported." );
return Any();
case OFFICEINSTALL:
- OSL_ENSURE( false,
- "ConfigManager::GetDirectConfigProperty: "
+ OSL_FAIL( "ConfigManager::GetDirectConfigProperty: "
"OFFICEINSTALL no longer supported." );
return Any();
case OFFICEINSTALLURL:
- OSL_ENSURE( false,
- "ConfigManager::GetDirectConfigProperty: "
+ OSL_FAIL( "ConfigManager::GetDirectConfigProperty: "
"OFFICEINSTALLURL no longer supported." );
return Any();
default:
diff --git a/unotools/source/config/configpathes.cxx b/unotools/source/config/configpathes.cxx
index 83ecdf2..db5eb97 100644
--- a/unotools/source/config/configpathes.cxx
+++ b/unotools/source/config/configpathes.cxx
@@ -98,7 +98,7 @@ sal_Bool splitLastFromConfigurationPath(OUString const& _sInPath,
// strip trailing slash
if (nPos > 0 && _sInPath[ nPos ] == sal_Unicode('/'))
{
- OSL_ENSURE(false, "Invalid config path: trailing '/' is not allowed");
+ OSL_FAIL("Invalid config path: trailing '/' is not allowed");
--nPos;
}
diff --git a/unotools/source/config/inetoptions.cxx b/unotools/source/config/inetoptions.cxx
index ef1fae8..f2d13e9 100644
--- a/unotools/source/config/inetoptions.cxx
+++ b/unotools/source/config/inetoptions.cxx
@@ -280,8 +280,7 @@ SvtInetOptions::Impl::Impl():
for (sal_Int32 i = 0; i < ENTRY_COUNT; ++i)
aKeys[i] = m_aEntries[i].m_aName;
if (!EnableNotification(aKeys))
- OSL_ENSURE(false,
- "SvtInetOptions::Impl::Impl(): Bad EnableNotifications()");
+ OSL_FAIL("SvtInetOptions::Impl::Impl(): Bad EnableNotifications()");
}
//============================================================================
@@ -330,8 +329,7 @@ star::uno::Any SvtInetOptions::Impl::getProperty(Index nPropIndex)
}
}
}
- OSL_ENSURE(false,
- "SvtInetOptions::Impl::getProperty(): Possible life lock");
+ OSL_FAIL("SvtInetOptions::Impl::getProperty(): Possible life lock");
{
osl::MutexGuard aGuard(m_aMutex);
return m_aEntries[nPropIndex].m_aValue;
diff --git a/vcl/source/control/imgctrl.cxx b/vcl/source/control/imgctrl.cxx
index c5ae529..b597662 100644
--- a/vcl/source/control/imgctrl.cxx
+++ b/vcl/source/control/imgctrl.cxx
@@ -144,7 +144,7 @@ void ImageControl::UserDraw( const UserDrawEvent& rUDEvt )
break;
default:
- OSL_ENSURE( false, "ImageControl::UserDraw: unhandled scale mode!" );
+ OSL_FAIL( "ImageControl::UserDraw: unhandled scale mode!" );
break;
} // switch ( mnScaleMode )
@@ -178,7 +178,7 @@ void ImageControl::UserDraw( const UserDrawEvent& rUDEvt )
break;
default:
- OSL_ENSURE( false, "ImageControl::UserDraw: unhandled scale mode!" );
+ OSL_FAIL( "ImageControl::UserDraw: unhandled scale mode!" );
break;
} // switch ( mnScaleMode )
diff --git a/vcl/source/gdi/image.cxx b/vcl/source/gdi/image.cxx
index 73dacff..4a3e406 100644
--- a/vcl/source/gdi/image.cxx
+++ b/vcl/source/gdi/image.cxx
@@ -504,7 +504,7 @@ void ImageAryData::Load(const rtl::OUString &rPrefix)
aMessage.append( "ImageAryData::Load: failed to load image '" );
aMessage.append( ::rtl::OUStringToOString( aFileName, RTL_TEXTENCODING_UTF8 ).getStr() );
aMessage.append( "'" );
- OSL_ENSURE( false, aMessage.makeStringAndClear().getStr() );
+ OSL_FAIL( aMessage.makeStringAndClear().getStr() );
}
#endif
}
commit ab96fb67a9e36d4c1d530ac6d50e6819433431bb
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Tue Mar 8 22:03:21 2011 +0100
Remove now unused DBG_TRACE[1-5] and DBG_TRACEFILE
diff --git a/tools/inc/tools/debug.hxx b/tools/inc/tools/debug.hxx
index ceb11a2..7997e95 100644
--- a/tools/inc/tools/debug.hxx
+++ b/tools/inc/tools/debug.hxx
@@ -503,64 +503,6 @@ do \
#define DBG_BF_ASSERT( sCon, aError ) ((void)0)
#endif
-#define DBG_TRACE( aTrace ) \
-do \
-{ \
- if ( DbgIsTraceOut() ) \
- DbgTrace( aTrace ); \
-} while(0)
-#define DBG_TRACE1( aTrace, x1 ) \
-do \
-{ \
- if ( DbgIsTraceOut() ) \
- { \
- DbgOutTypef( DBG_OUT_TRACE, aTrace, \
- x1 ); \
- } \
-} while(0)
-#define DBG_TRACE2( aTrace, x1, x2 ) \
-do \
-{ \
- if ( DbgIsTraceOut() ) \
- { \
- DbgOutTypef( DBG_OUT_TRACE, aTrace, \
- x1, x2 ); \
- } \
-} while(0)
-#define DBG_TRACE3( aTrace, x1, x2, x3 ) \
-do \
-{ \
- if ( DbgIsTraceOut() ) \
- { \
- DbgOutTypef( DBG_OUT_TRACE, aTrace, \
- x1, x2, x3 ); \
- } \
-} while(0)
-#define DBG_TRACE4( aTrace, x1, x2, x3, x4 ) \
-do \
-{ \
- if ( DbgIsTraceOut() ) \
- { \
- DbgOutTypef( DBG_OUT_TRACE, aTrace, \
- x1, x2, x3, x4 ); \
- } \
-} while(0)
-#define DBG_TRACE5( aTrace, x1, x2, x3, x4, x5 ) \
-do \
-{ \
- if ( DbgIsTraceOut() ) \
- { \
- DbgOutTypef( DBG_OUT_TRACE, aTrace, \
- x1, x2, x3, x4, x5 ); \
- } \
-} while(0)
-#define DBG_TRACEFILE( aTrace ) \
-do \
-{ \
- if ( DbgIsTraceOut() ) \
- DbgTrace( aTrace, __FILE__, __LINE__ ); \
-} while(0)
-
#define DBG_WARNING( aWarning ) \
do \
{ \
@@ -692,13 +634,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_BF_ASSERT( sCon, aError ) ((void)0)
-#define DBG_TRACE( aTrace ) ((void)0)
-#define DBG_TRACE1( aTrace, x1 ) ((void)0)
-#define DBG_TRACE2( aTrace, x1, x2 ) ((void)0)
-#define DBG_TRACE3( aTrace, x1, x2, x3 ) ((void)0)
-#define DBG_TRACE4( aTrace, x1, x2, x3, x4 ) ((void)0)
-#define DBG_TRACE5( aTrace, x1, x2, x3, x4, x5 ) ((void)0)
-#define DBG_TRACEFILE( aTrace ) ((void)0)
#define DBG_WARNING( aWarning ) ((void)0)
#define DBG_WARNING1( aWarning, x1 ) ((void)0)
#define DBG_WARNING2( aWarning, x1, x2 ) ((void)0)
commit 0f74b862775a7804371012237169c3de37689d56
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Tue Mar 8 14:31:06 2011 +0100
Move DBG_TRACE to OSL_TRACE for strings GetBuffer()
diff --git a/tools/source/generic/config.cxx b/tools/source/generic/config.cxx
index c107884..94ebddd 100644
--- a/tools/source/generic/config.cxx
+++ b/tools/source/generic/config.cxx
@@ -799,7 +799,7 @@ Config::Config( const XubString& rFileName )
ByteString aTraceStr( "Config::Config( " );
aTraceStr += ByteString( maFileName, RTL_TEXTENCODING_UTF8 );
aTraceStr += " )";
- DBG_TRACE( aTraceStr.GetBuffer() );
+ OSL_TRACE( aTraceStr.GetBuffer() );
#endif
}
@@ -1000,7 +1000,7 @@ ByteString Config::ReadKey( const ByteString& rKey, const ByteString& rDefault )
aTraceStr += GetGroup();
aTraceStr += " in ";
aTraceStr += ByteString( maFileName, RTL_TEXTENCODING_UTF8 );
- DBG_TRACE( aTraceStr.GetBuffer() );
+ OSL_TRACE( aTraceStr.GetBuffer() );
#endif
// Config-Daten evt. updaten
@@ -1037,7 +1037,7 @@ void Config::WriteKey( const ByteString& rKey, const ByteString& rStr )
aTraceStr += GetGroup();
aTraceStr += " in ";
aTraceStr += ByteString( maFileName, RTL_TEXTENCODING_UTF8 );
- DBG_TRACE( aTraceStr.GetBuffer() );
+ OSL_TRACE( aTraceStr.GetBuffer() );
DBG_ASSERTWARNING( rStr != ReadKey( rKey ), "Config::WriteKey() with the same Value" );
#endif
@@ -1158,7 +1158,7 @@ USHORT Config::GetKeyCount() const
aTraceStr += GetGroup();
aTraceStr += " in ";
aTraceStr += ByteString( maFileName, RTL_TEXTENCODING_UTF8 );
- DBG_TRACE( aTraceStr.GetBuffer() );
+ OSL_TRACE( aTraceStr.GetBuffer() );
#endif
// Config-Daten evt. updaten
@@ -1194,7 +1194,7 @@ ByteString Config::GetKeyName( USHORT nKey ) const
aTraceStr += GetGroup();
aTraceStr += " in ";
aTraceStr += ByteString( maFileName, RTL_TEXTENCODING_UTF8 );
- DBG_TRACE( aTraceStr.GetBuffer() );
+ OSL_TRACE( aTraceStr.GetBuffer() );
#endif
// Key suchen und Name zurueckgeben
@@ -1229,7 +1229,7 @@ ByteString Config::ReadKey( USHORT nKey ) const
aTraceStr += GetGroup();
aTraceStr += " in ";
aTraceStr += ByteString( maFileName, RTL_TEXTENCODING_UTF8 );
- DBG_TRACE( aTraceStr.GetBuffer() );
+ OSL_TRACE( aTraceStr.GetBuffer() );
#endif
// Key suchen und Value zurueckgeben
diff --git a/tools/source/stream/strmos2.cxx b/tools/source/stream/strmos2.cxx
index 40f82b4..6c4395d 100644
--- a/tools/source/stream/strmos2.cxx
+++ b/tools/source/stream/strmos2.cxx
@@ -194,7 +194,7 @@ ULONG SvFileStream::GetData( void* pData, ULONG nSize )
aTraceStr += ByteString::CreateFromInt64(nSize);
aTraceStr += " Bytes from ";
aTraceStr += ByteString(aFilename, osl_getThreadTextEncoding());
- DBG_TRACE( aTraceStr.GetBuffer() );
+ OSL_TRACE( aTraceStr.GetBuffer() );
#endif
ULONG nCount = 0L;
@@ -221,7 +221,7 @@ ULONG SvFileStream::PutData( const void* pData, ULONG nSize )
aTraceStr += ByteString::CreateFromInt64(nSize);
aTraceStr += " Bytes to ";
aTraceStr += ByteString(aFilename, osl_getThreadTextEncoding());
- DBG_TRACE( aTraceStr.GetBuffer() );
+ OSL_TRACE( aTraceStr.GetBuffer() );
#endif
ULONG nCount = 0L;
@@ -498,7 +498,7 @@ void SvFileStream::Open( const String& rFilename, StreamMode nOpenMode )
#ifdef DBG_UTIL
ByteString aTraceStr( "SvFileStream::Open(): " );
aTraceStr += aFileNameA;
- DBG_TRACE( aTraceStr.GetBuffer() );
+ OSL_TRACE( aTraceStr.GetBuffer() );
#endif
APIRET nRet = DosOpen( aFileNameA.GetBuffer(), &pInstanceData->hFile,
@@ -563,7 +563,7 @@ void SvFileStream::Close()
#ifdef DBG_UTIL
ByteString aTraceStr( "SvFileStream::Close(): " );
aTraceStr += ByteString(aFilename, osl_getThreadTextEncoding());
- DBG_TRACE( aTraceStr.GetBuffer() );
+ OSL_TRACE( aTraceStr.GetBuffer() );
#endif
if( nLockCounter )
diff --git a/tools/source/stream/strmunx.cxx b/tools/source/stream/strmunx.cxx
index 05511ee..6826189 100644
--- a/tools/source/stream/strmunx.cxx
+++ b/tools/source/stream/strmunx.cxx
@@ -358,7 +358,7 @@ sal_Size SvFileStream::GetData( void* pData, sal_Size nSize )
aTraceStr += ByteString::CreateFromInt64(nSize);
aTraceStr += " Bytes from ";
aTraceStr += ByteString(aFilename, osl_getThreadTextEncoding());
- DBG_TRACE( aTraceStr.GetBuffer() );
+ OSL_TRACE( aTraceStr.GetBuffer() );
#endif
int nRead = 0;
@@ -384,7 +384,7 @@ sal_Size SvFileStream::PutData( const void* pData, sal_Size nSize )
aTraceStr += ByteString::CreateFromInt64(nSize);
aTraceStr += " Bytes to ";
aTraceStr += ByteString(aFilename, osl_getThreadTextEncoding());
- DBG_TRACE( aTraceStr.GetBuffer() );
+ OSL_TRACE( aTraceStr.GetBuffer() );
#endif
int nWrite = 0;
@@ -624,7 +624,7 @@ void SvFileStream::Open( const String& rFilename, StreamMode nOpenMode )
#ifdef DBG_UTIL
ByteString aTraceStr( "SvFileStream::Open(): " );
aTraceStr += aLocalFilename;
- DBG_TRACE( aTraceStr.GetBuffer() );
+ OSL_TRACE( aTraceStr.GetBuffer() );
#endif
if ( lstat( aLocalFilename.GetBuffer(), &buf ) == 0 )
@@ -747,7 +747,7 @@ void SvFileStream::Close()
#ifdef DBG_UTIL
ByteString aTraceStr( "SvFileStream::Close(): " );
aTraceStr += ByteString(aFilename, osl_getThreadTextEncoding());
- DBG_TRACE( aTraceStr.GetBuffer() );
+ OSL_TRACE( aTraceStr.GetBuffer() );
#endif
Flush();
commit 2b6c7b9180c41cc44253e3284dd4c06798c89a6d
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Tue Mar 8 13:50:30 2011 +0100
Remove dead code
diff --git a/tools/source/stream/strmwnt.cxx b/tools/source/stream/strmwnt.cxx
index 38c7b87..3916c2e 100644
--- a/tools/source/stream/strmwnt.cxx
+++ b/tools/source/stream/strmwnt.cxx
@@ -271,30 +271,6 @@ ULONG SvFileStream::SeekPos( ULONG nPos )
/*************************************************************************
|*
-|* SvFileStream::Tell()
-|*
-*************************************************************************/
-/*
-ULONG SvFileStream::Tell()
-{
- ULONG nPos = 0L;
-
- if( IsOpen() )
- {
- DWORD nPos;
- nPos = SetFilePointer(pInstanceData->hFile,0L,NULL,FILE_CURRENT);
- if( nPos = 0xFFFFFFFF )
- {
- SetError( ::GetSvError( GetLastError() ) );
- nPos = 0L;
- }
- }
- return nPos;
-}
-*/
-
-/*************************************************************************
-|*
|* SvFileStream::FlushData()
|*
*************************************************************************/
@@ -435,14 +411,6 @@ void SvFileStream::Open( const String& rFilename, StreamMode nMode )
#endif
SetLastError( ERROR_SUCCESS ); // ggf. durch Redirector geaendert!
- /*
- #ifdef DBG_UTIL
- String aTraceStr( "SvFileStream::Open(): " );
- aTraceStr += aFilename;
- DBG_TRACE( aTraceStr );
- #endif
- */
-
DWORD nOpenAction;
DWORD nShareMode = FILE_SHARE_READ | FILE_SHARE_WRITE;
DWORD nAccessMode = 0L;
commit d80858c4622a31fa32dafff16b8d1944617eeaf1
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Tue Mar 8 13:47:42 2011 +0100
Move DBG_TRACE to OSL_TRACE
diff --git a/svtools/source/brwbox/brwbox2.cxx b/svtools/source/brwbox/brwbox2.cxx
index 0e3205b..8ab4a1d 100644
--- a/svtools/source/brwbox/brwbox2.cxx
+++ b/svtools/source/brwbox/brwbox2.cxx
@@ -1535,7 +1535,7 @@ void BrowseBox::MouseButtonDown( const MouseEvent& rEvt )
void BrowseBox::MouseMove( const MouseEvent& rEvt )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
- DBG_TRACE( "BrowseBox::MouseMove( MouseEvent )" );
+ OSL_TRACE( "BrowseBox::MouseMove( MouseEvent )" );
Pointer aNewPointer;
diff --git a/toolkit/source/controls/stdtabcontroller.cxx b/toolkit/source/controls/stdtabcontroller.cxx
index 926612c..d5c2f06 100644
--- a/toolkit/source/controls/stdtabcontroller.cxx
+++ b/toolkit/source/controls/stdtabcontroller.cxx
@@ -133,7 +133,7 @@ sal_Bool StdTabController::ImplCreateComponentSequence(
}
else
{
- DBG_TRACE( "ImplCreateComponentSequence: Control not found" );
+ OSL_TRACE( "ImplCreateComponentSequence: Control not found" );
bOK = sal_False;
}
}
diff --git a/tools/source/fsys/wntmsc.cxx b/tools/source/fsys/wntmsc.cxx
index 03e20af..21cf379 100644
--- a/tools/source/fsys/wntmsc.cxx
+++ b/tools/source/fsys/wntmsc.cxx
@@ -827,7 +827,7 @@ BOOL FileStat::Update( const DirEntry& rDirEntry, BOOL bForceAccess )
if ( aName == "a:" || aName == "b:" )
bAccess = FALSE;
else
- DBG_TRACE( "FSys: will access removable device!" );
+ OSL_TRACE( "FSys: will access removable device!" );
if ( bAccess && ( aName == "a:" || aName == "b:" ) ) {
DBG_WARNING( "floppy will clatter" );
}
diff --git a/tools/source/generic/config.cxx b/tools/source/generic/config.cxx
index 13bbb76..c107884 100644
--- a/tools/source/generic/config.cxx
+++ b/tools/source/generic/config.cxx
@@ -779,7 +779,7 @@ Config::Config()
mbPersistence = TRUE;
#ifdef DBG_UTIL
- DBG_TRACE( "Config::Config()" );
+ OSL_TRACE( "Config::Config()" );
#endif
}
@@ -808,7 +808,7 @@ Config::Config( const XubString& rFileName )
Config::~Config()
{
#ifdef DBG_UTIL
- DBG_TRACE( "Config::~Config()" );
+ OSL_TRACE( "Config::~Config()" );
#endif
Flush();
diff --git a/vcl/source/gdi/outdev.cxx b/vcl/source/gdi/outdev.cxx
index bf555f6..c24760e 100644
--- a/vcl/source/gdi/outdev.cxx
+++ b/vcl/source/gdi/outdev.cxx
@@ -1804,7 +1804,7 @@ void OutputDevice::ImplSetTriangleClipRegion( const PolyPolygon &rPolyPolygon )
void OutputDevice::SetClipRegion()
{
- DBG_TRACE( "OutputDevice::SetClipRegion()" );
+ OSL_TRACE( "OutputDevice::SetClipRegion()" );
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
if ( mpMetaFile )
@@ -1820,7 +1820,7 @@ void OutputDevice::SetClipRegion()
void OutputDevice::SetClipRegion( const Region& rRegion )
{
- DBG_TRACE( "OutputDevice::SetClipRegion( rRegion )" );
+ OSL_TRACE( "OutputDevice::SetClipRegion( rRegion )" );
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
DBG_CHKOBJ( &rRegion, Region, ImplDbgTestRegion );
@@ -1843,7 +1843,7 @@ void OutputDevice::SetClipRegion( const Region& rRegion )
void OutputDevice::SetTriangleClipRegion( const PolyPolygon &rPolyPolygon )
{
- DBG_TRACE( "OutputDevice::SetTriangleClipRegion( rPolyPolygon )" );
+ OSL_TRACE( "OutputDevice::SetTriangleClipRegion( rPolyPolygon )" );
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
// in case the passed polypolygon is empty, use the
@@ -1911,7 +1911,7 @@ Region OutputDevice::GetActiveClipRegion() const
void OutputDevice::MoveClipRegion( long nHorzMove, long nVertMove )
{
- DBG_TRACE( "OutputDevice::MoveClipRegion()" );
+ OSL_TRACE( "OutputDevice::MoveClipRegion()" );
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
if ( mbClipRegion )
@@ -1932,7 +1932,7 @@ void OutputDevice::MoveClipRegion( long nHorzMove, long nVertMove )
void OutputDevice::IntersectClipRegion( const Rectangle& rRect )
{
- DBG_TRACE( "OutputDevice::IntersectClipRegion( rRect )" );
+ OSL_TRACE( "OutputDevice::IntersectClipRegion( rRect )" );
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
if ( mpMetaFile )
@@ -1951,7 +1951,7 @@ void OutputDevice::IntersectClipRegion( const Rectangle& rRect )
void OutputDevice::IntersectClipRegion( const Region& rRegion )
{
- DBG_TRACE( "OutputDevice::IntersectClipRegion( rRegion )" );
+ OSL_TRACE( "OutputDevice::IntersectClipRegion( rRegion )" );
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
DBG_CHKOBJ( &rRegion, Region, ImplDbgTestRegion );
@@ -2012,7 +2012,7 @@ void OutputDevice::SetRasterOp( RasterOp eRasterOp )
void OutputDevice::SetLineColor()
{
- DBG_TRACE( "OutputDevice::SetLineColor()" );
+ OSL_TRACE( "OutputDevice::SetLineColor()" );
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
if ( mpMetaFile )
@@ -2101,7 +2101,7 @@ void OutputDevice::SetLineColor( const Color& rColor )
void OutputDevice::SetFillColor()
{
- DBG_TRACE( "OutputDevice::SetFillColor()" );
+ OSL_TRACE( "OutputDevice::SetFillColor()" );
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
if ( mpMetaFile )
@@ -2194,7 +2194,7 @@ void OutputDevice::SetFillColor( const Color& rColor )
void OutputDevice::SetBackground()
{
- DBG_TRACE( "OutputDevice::SetBackground()" );
+ OSL_TRACE( "OutputDevice::SetBackground()" );
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
maBackground = Wallpaper();
@@ -2208,7 +2208,7 @@ void OutputDevice::SetBackground()
void OutputDevice::SetBackground( const Wallpaper& rBackground )
{
- DBG_TRACE( "OutputDevice::SetBackground( rBackground )" );
+ OSL_TRACE( "OutputDevice::SetBackground( rBackground )" );
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
maBackground = rBackground;
@@ -2226,7 +2226,7 @@ void OutputDevice::SetBackground( const Wallpaper& rBackground )
void OutputDevice::SetRefPoint()
{
- DBG_TRACE( "OutputDevice::SetRefPoint()" );
+ OSL_TRACE( "OutputDevice::SetRefPoint()" );
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
if ( mpMetaFile )
@@ -2243,7 +2243,7 @@ void OutputDevice::SetRefPoint()
void OutputDevice::SetRefPoint( const Point& rRefPoint )
{
- DBG_TRACE( "OutputDevice::SetRefPoint( rRefPoint )" );
+ OSL_TRACE( "OutputDevice::SetRefPoint( rRefPoint )" );
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
if ( mpMetaFile )
@@ -2260,7 +2260,7 @@ void OutputDevice::SetRefPoint( const Point& rRefPoint )
void OutputDevice::DrawLine( const Point& rStartPt, const Point& rEndPt )
{
- DBG_TRACE( "OutputDevice::DrawLine()" );
+ OSL_TRACE( "OutputDevice::DrawLine()" );
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
if ( mpMetaFile )
@@ -2458,7 +2458,7 @@ void OutputDevice::impPaintLineGeometryWithEvtlExpand(
void OutputDevice::DrawLine( const Point& rStartPt, const Point& rEndPt,
const LineInfo& rLineInfo )
{
- DBG_TRACE( "OutputDevice::DrawLine()" );
+ OSL_TRACE( "OutputDevice::DrawLine()" );
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
if ( rLineInfo.IsDefault() )
@@ -2512,7 +2512,7 @@ void OutputDevice::DrawLine( const Point& rStartPt, const Point& rEndPt,
void OutputDevice::DrawRect( const Rectangle& rRect )
{
- DBG_TRACE( "OutputDevice::DrawRect()" );
+ OSL_TRACE( "OutputDevice::DrawRect()" );
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
if ( mpMetaFile )
@@ -2553,7 +2553,7 @@ void OutputDevice::DrawRect( const Rectangle& rRect )
void OutputDevice::DrawPolyLine( const Polygon& rPoly )
{
- DBG_TRACE( "OutputDevice::DrawPolyLine()" );
+ OSL_TRACE( "OutputDevice::DrawPolyLine()" );
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
DBG_CHKOBJ( &rPoly, Polygon, NULL );
@@ -2631,7 +2631,7 @@ void OutputDevice::DrawPolyLine( const Polygon& rPoly )
void OutputDevice::DrawPolyLine( const Polygon& rPoly, const LineInfo& rLineInfo )
{
- DBG_TRACE( "OutputDevice::DrawPolyLine()" );
+ OSL_TRACE( "OutputDevice::DrawPolyLine()" );
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
DBG_CHKOBJ( &rPoly, Polygon, NULL );
@@ -2723,7 +2723,7 @@ void OutputDevice::ImpDrawPolyLineWithLineInfo(const Polygon& rPoly, const LineI
void OutputDevice::DrawPolygon( const Polygon& rPoly )
{
- DBG_TRACE( "OutputDevice::DrawPolygon()" );
+ OSL_TRACE( "OutputDevice::DrawPolygon()" );
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
DBG_CHKOBJ( &rPoly, Polygon, NULL );
@@ -2813,7 +2813,7 @@ void OutputDevice::DrawPolygon( const Polygon& rPoly )
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list