summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--accessibility/source/extended/accessibleeditbrowseboxcell.cxx2
-rw-r--r--accessibility/source/extended/textwindowaccessibility.cxx2
-rw-r--r--automation/inc/automation/commtypes.hxx2
-rw-r--r--automation/source/communi/communi.cxx10
-rw-r--r--automation/source/miniapp/testapp.cxx2
-rw-r--r--automation/source/server/cmdbasestream.cxx16
-rw-r--r--automation/source/server/recorder.cxx4
-rw-r--r--automation/source/server/scmdstrm.cxx4
-rw-r--r--automation/source/server/server.cxx4
-rw-r--r--automation/source/server/statemnt.cxx4
-rw-r--r--automation/source/testtool/cretstrm.cxx2
-rw-r--r--automation/source/testtool/objtest.cxx8
-rw-r--r--basctl/source/basicide/basobj2.cxx2
-rw-r--r--basctl/source/basicide/basobj3.cxx2
-rw-r--r--basctl/source/basicide/scriptdocument.cxx2
-rw-r--r--crashrep/source/unx/main.cxx4
-rw-r--r--cui/source/customize/macropg.cxx2
-rw-r--r--cui/source/dialogs/SpellDialog.cxx2
-rw-r--r--cui/source/dialogs/cuigaldlg.cxx4
-rw-r--r--cui/source/options/optchart.cxx7
-rw-r--r--cui/source/options/optsave.cxx2
-rw-r--r--cui/source/tabpages/backgrnd.cxx8
-rw-r--r--cui/source/tabpages/numpages.src3
-rw-r--r--cui/source/tabpages/tpcolor.cxx5
-rw-r--r--extensions/source/bibliography/datman.cxx14
-rw-r--r--extensions/source/config/ldap/ldapaccess.cxx2
-rw-r--r--extensions/source/dbpilots/gridwizard.cxx6
-rw-r--r--extensions/source/logging/filehandler.cxx2
-rw-r--r--extensions/source/ole/oleobjw.cxx2
-rw-r--r--extensions/source/plugin/aqua/sysplug.cxx4
-rw-r--r--extensions/source/plugin/win/sysplug.cxx4
-rw-r--r--extensions/source/propctrlr/browserlistbox.cxx18
-rw-r--r--extensions/source/propctrlr/composeduiupdate.cxx4
-rw-r--r--extensions/source/propctrlr/formcomponenthandler.cxx12
-rw-r--r--extensions/source/propctrlr/formgeometryhandler.cxx10
-rw-r--r--extensions/source/propctrlr/genericpropertyhandler.cxx4
-rw-r--r--extensions/source/propctrlr/propcontroller.cxx4
-rw-r--r--extensions/source/propctrlr/propertycomposer.cxx4
-rw-r--r--extensions/source/propctrlr/stringrepresentation.cxx8
-rw-r--r--extensions/source/resource/oooresourceloader.cxx4
-rw-r--r--extensions/source/svg/svgaction.cxx2
-rw-r--r--extensions/source/update/check/updatehdl.cxx14
-rwxr-xr-xextensions/source/update/check/updateprotocol.cxx4
-rw-r--r--forms/source/component/ComboBox.cxx2
-rw-r--r--forms/source/component/FormComponent.cxx6
-rw-r--r--forms/source/component/Grid.cxx2
-rw-r--r--forms/source/component/ImageControl.cxx6
-rw-r--r--forms/source/component/ListBox.cxx12
-rw-r--r--forms/source/component/imgprod.cxx94
-rw-r--r--forms/source/component/imgprod.hxx7
-rw-r--r--forms/source/component/refvaluecomponent.cxx2
-rw-r--r--forms/source/richtext/attributedispatcher.cxx2
-rw-r--r--forms/source/richtext/richtextcontrol.cxx6
-rw-r--r--forms/source/solar/control/navtoolbar.cxx2
-rw-r--r--forms/source/xforms/datatypes.cxx2
-rw-r--r--forms/source/xforms/model.cxx2
-rw-r--r--forms/source/xforms/model_ui.cxx8
-rw-r--r--package/source/zipapi/ZipOutputStream.cxx10
-rw-r--r--package/source/zippackage/ZipPackage.cxx4
-rw-r--r--package/source/zippackage/ZipPackageFolder.cxx22
-rw-r--r--package/source/zippackage/ZipPackageStream.cxx8
-rw-r--r--xmlsecurity/source/component/documentdigitalsignatures.cxx2
-rw-r--r--xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx2
63 files changed, 183 insertions, 243 deletions
diff --git a/accessibility/source/extended/accessibleeditbrowseboxcell.cxx b/accessibility/source/extended/accessibleeditbrowseboxcell.cxx
index 5312717034ee..30c300ced2a8 100644
--- a/accessibility/source/extended/accessibleeditbrowseboxcell.cxx
+++ b/accessibility/source/extended/accessibleeditbrowseboxcell.cxx
@@ -259,7 +259,7 @@ namespace accessibility
catch( const Exception& e )
{
(void)e;
- OSL_ENSURE( false, "EditBrowseBoxTableCellAccess::disposing: caught an exception while disposing the context!" );
+ OSL_FAIL( "EditBrowseBoxTableCellAccess::disposing: caught an exception while disposing the context!" );
}
}
diff --git a/accessibility/source/extended/textwindowaccessibility.cxx b/accessibility/source/extended/textwindowaccessibility.cxx
index 6a4d5e53d8f1..3dbe462c227a 100644
--- a/accessibility/source/extended/textwindowaccessibility.cxx
+++ b/accessibility/source/extended/textwindowaccessibility.cxx
@@ -2003,7 +2003,7 @@ void Document::handleParagraphNotifications()
break;
}
default:
- OSL_ENSURE(false, "bad buffered hint");
+ OSL_FAIL( "bad buffered hint");
break;
}
}
diff --git a/automation/inc/automation/commtypes.hxx b/automation/inc/automation/commtypes.hxx
index 51b3601be94a..8d7c976fb125 100644
--- a/automation/inc/automation/commtypes.hxx
+++ b/automation/inc/automation/commtypes.hxx
@@ -55,8 +55,6 @@
typedef sal_Unicode comm_UniChar;
#include "rtl/string.hxx"
-//#define DBG_ASSERT( cond, text )
-//#define DBG_ERROR( text )
#include <tools/debug.hxx>
#include <tools/solar.h>
diff --git a/automation/source/communi/communi.cxx b/automation/source/communi/communi.cxx
index 95086c1e8c2a..10aa6f8e9107 100644
--- a/automation/source/communi/communi.cxx
+++ b/automation/source/communi/communi.cxx
@@ -567,16 +567,6 @@ IMPL_LINK( CommunicationManagerServerAcceptThread, AddConnection, void*, EMPTYAR
return 1;
}
-
-#define GETSET(aVar, KeyName, Dafault) \
- aVar = aConf.ReadKey(KeyName,"No Entry"); \
- if ( aVar == "No Entry" ) \
- { \
- aVar = Dafault; \
- aConf.WriteKey(KeyName, aVar); \
- }
-
-
CommunicationManagerClientViaSocket::CommunicationManagerClientViaSocket( ByteString aHost, sal_uLong nPort, sal_Bool bUseMultiChannel )
: CommunicationManagerClient( bUseMultiChannel )
, aHostToTalk( aHost )
diff --git a/automation/source/miniapp/testapp.cxx b/automation/source/miniapp/testapp.cxx
index 2209ef23b4cc..914b59a6739c 100644
--- a/automation/source/miniapp/testapp.cxx
+++ b/automation/source/miniapp/testapp.cxx
@@ -208,7 +208,7 @@ sal_uInt16 MyDispatcher::ExecuteFunction( sal_uInt16 nSID, SfxPoolItem** ppArgs,
case IDM_SYS_DLG: pMainWin->SysDlg(); break;
default:
{
- DBG_ERROR1("Dispatcher kennt Funktion nicht %s",ByteString::CreateFromInt64(nSID).GetBuffer());
+ OSL_TRACE("Dispatcher kennt Funktion nicht %s",ByteString::CreateFromInt64(nSID).GetBuffer());
return EXECUTE_NO;
}
diff --git a/automation/source/server/cmdbasestream.cxx b/automation/source/server/cmdbasestream.cxx
index dcb01a44ce5a..3988bcbab154 100644
--- a/automation/source/server/cmdbasestream.cxx
+++ b/automation/source/server/cmdbasestream.cxx
@@ -211,8 +211,8 @@ void CmdBaseStream::Read (comm_USHORT &nNr)
comm_USHORT nId;
*pCommStream >> nId;
if (pCommStream->IsEof()) return;
-#ifdef DBG_UTIL
- if (nId != BinUSHORT) DBG_ERROR1( "Falscher Typ im Stream: Erwartet USHORT, gefunden :%hu", nId );
+#if OSL_DEBUG_LEVEL > 1
+ if (nId != BinUSHORT) OSL_TRACE( "Falscher Typ im Stream: Erwartet USHORT, gefunden :%hu", nId );
#endif
*pCommStream >> nNr;
}
@@ -222,8 +222,8 @@ void CmdBaseStream::Read (comm_ULONG &nNr)
comm_USHORT nId;
*pCommStream >> nId;
if (pCommStream->IsEof()) return;
-#ifdef DBG_UTIL
- if (nId != BinULONG) DBG_ERROR1( "Falscher Typ im Stream: Erwartet ULONG, gefunden :%hu", nId );
+#if OSL_DEBUG_LEVEL > 1
+ if (nId != BinULONG) OSL_TRACE( "Falscher Typ im Stream: Erwartet ULONG, gefunden :%hu", nId );
#endif
*pCommStream >> nNr;
}
@@ -232,8 +232,8 @@ void CmdBaseStream::Read (comm_UniChar* &aString, comm_USHORT &nLenInChars )
{
comm_USHORT nId;
*pCommStream >> nId;
-#ifdef DBG_UTIL
- if (nId != BinString) DBG_ERROR1( "Falscher Typ im Stream: Erwartet String, gefunden :%hu", nId );
+#if OSL_DEBUG_LEVEL > 1
+ if (nId != BinString) OSL_TRACE( "Falscher Typ im Stream: Erwartet String, gefunden :%hu", nId );
#endif
*pCommStream >> nLenInChars;
@@ -252,8 +252,8 @@ void CmdBaseStream::Read (comm_BOOL &bBool)
{
comm_USHORT nId;
*pCommStream >> nId;
-#ifdef DBG_UTIL
- if (nId != BinBool) DBG_ERROR1( "Falscher Typ im Stream: Erwartet BOOL, gefunden :%hu", nId );
+#if OSL_DEBUG_LEVEL > 1
+ if (nId != BinBool) OSL_TRACE( "Falscher Typ im Stream: Erwartet BOOL, gefunden :%hu", nId );
#endif
*pCommStream >> bBool;
}
diff --git a/automation/source/server/recorder.cxx b/automation/source/server/recorder.cxx
index ef6f90b88b57..dda348885dfc 100644
--- a/automation/source/server/recorder.cxx
+++ b/automation/source/server/recorder.cxx
@@ -578,14 +578,14 @@ IMPL_LINK( MacroRecorder, EventListener, VclSimpleEvent*, pEvent )
case WINDOW_DOCKINGWINDOW:
{
// case 1 .. 0xffff:
- DBG_TRACE3( "TT_VCLMessage %u %u %X",nEventID, pWin->GetType(), pWin );
+ OSL_TRACE( "TT_VCLMessage %u %u %X",nEventID, pWin->GetType(), pWin );
// sal_Bool bx = ((DockingWindow*)pWin)->IsFloatingMode();
// break;
}
break;
case WINDOW_FLOATINGWINDOW:
{
- DBG_TRACE3( "TT_VCLMessage %u %u %X",nEventID, pWin->GetType(), pWin );
+ OSL_TRACE( "TT_VCLMessage %u %u %X",nEventID, pWin->GetType(), pWin );
// FloatingWindow *pFW = ((FloatingWindow*)pWin);
}
break;
diff --git a/automation/source/server/scmdstrm.cxx b/automation/source/server/scmdstrm.cxx
index 7a95e19f9414..2b0ed50eee7b 100644
--- a/automation/source/server/scmdstrm.cxx
+++ b/automation/source/server/scmdstrm.cxx
@@ -133,7 +133,7 @@ void SCmdStream::Read ( SfxPoolItem *&pItem )
}
break;
default:
- DBG_ERROR1( "Ungültiger Typ im Stream:%hu", nType );
+ OSL_TRACE( "Ungültiger Typ im Stream:%hu", nType );
#if OSL_DEBUG_LEVEL > 1
StatementList::m_pDbgWin->AddText( "Ungültiger Typ !!!! " );
#endif
@@ -203,7 +203,7 @@ void SCmdStream::Read ( ::com::sun::star::beans::PropertyValue &rItem )
}
break;
default:
- DBG_ERROR1( "Ungültiger Typ im Stream:%hu", nType );
+ OSL_TRACE( "Ungültiger Typ im Stream:%hu", nType );
#if OSL_DEBUG_LEVEL > 1
StatementList::m_pDbgWin->AddText( "Ungültiger Typ !!!! " );
#endif
diff --git a/automation/source/server/server.cxx b/automation/source/server/server.cxx
index 4f233afe8068..544772bb2bd5 100644
--- a/automation/source/server/server.cxx
+++ b/automation/source/server/server.cxx
@@ -700,7 +700,7 @@ sal_Bool ImplRemoteControl::QueCommands( sal_uLong nServiceId, SvStream *pIn )
if( nServiceId != SI_IPCCommandBlock && nServiceId != SI_DirectCommandBlock )
{
- DBG_ERROR1( "Ung�ltiger Request :%i", (int)nServiceId );
+ OSL_TRACE( "Ungültiger Request :%i", (int)nServiceId );
return sal_False;
}
@@ -738,7 +738,7 @@ sal_Bool ImplRemoteControl::QueCommands( sal_uLong nServiceId, SvStream *pIn )
break;
}
default:
- DBG_ERROR1( "Unbekannter Request Nr:%i", nId );
+ OSL_TRACE( "Unbekannter Request Nr:%i", nId );
break;
}
if( !pIn->IsEof() )
diff --git a/automation/source/server/statemnt.cxx b/automation/source/server/statemnt.cxx
index 85a69ccdf82c..fdd5e1e0e781 100644
--- a/automation/source/server/statemnt.cxx
+++ b/automation/source/server/statemnt.cxx
@@ -949,7 +949,7 @@ void StatementCommand::WriteControlData( Window *pBase, sal_uLong nConf, sal_Boo
aToolBoxItemType.AssignAscii("TOOLBOXITEM_BREAK");
break;
default:
- DBG_ERROR1( "Unknown TOOLBOXITEM %i", pTB->GetItemType( i ) );
+ OSL_TRACE( "Unknown TOOLBOXITEM %i", pTB->GetItemType( i ) );
}
if ( pTB->GetItemCommand(pTB->GetItemId( i )).Len() || ( nConf & DH_MODE_ALLWIN ) )
pRet->GenReturn ( RET_WinInfo, Str2Id( pTB->GetItemCommand(pTB->GetItemId( i )) ), (comm_ULONG)WINDOW_BASE,
@@ -1052,7 +1052,7 @@ void StatementCommand::WriteControlData( Window *pBase, sal_uLong nConf, sal_Boo
aMenuItemType.AssignAscii("MENUITEM_DONTKNOW");
break;
default:
- DBG_ERROR1( "Unknown MENUITEM %i", pMenu->GetItemType( i ) );
+ OSL_TRACE( "Unknown MENUITEM %i", pMenu->GetItemType( i ) );
}
if ( pMenu->GetItemCommand(nID).Len() || ( nConf & DH_MODE_ALLWIN ) )
pRet->GenReturn ( RET_WinInfo, Str2Id( pMenu->GetItemCommand(nID) ), (comm_ULONG)0,
diff --git a/automation/source/testtool/cretstrm.cxx b/automation/source/testtool/cretstrm.cxx
index b0247efb4ee3..a768d51af4ae 100644
--- a/automation/source/testtool/cretstrm.cxx
+++ b/automation/source/testtool/cretstrm.cxx
@@ -63,7 +63,7 @@ void CRetStream::Read( SbxValue &aValue )
*pSammel >> nId;
if (nId != BinSbxValue)
{
- DBG_ERROR1( "Falscher Typ im Stream: Erwartet SbxValue, gefunden :%hu", nId );
+ OSL_TRACE( "Falscher Typ im Stream: Erwartet SbxValue, gefunden :%hu", nId );
}
SbxBaseRef xBase = SbxBase::Load( *pSammel );
if ( IS_TYPE( SbxValue, xBase ) )
diff --git a/automation/source/testtool/objtest.cxx b/automation/source/testtool/objtest.cxx
index 85ac8e2f7455..7569c69f3be3 100644
--- a/automation/source/testtool/objtest.cxx
+++ b/automation/source/testtool/objtest.cxx
@@ -2349,7 +2349,7 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
long aMS = long( aDiff.GetMSFromTime() );
if ( Abs( aMS - nWait ) > 100 )
{
- DBG_ERROR1("Wait was off limit by %i", aDiff.GetMSFromTime() - nWait );
+ OSL_TRACE("Wait was off limit by %i", aDiff.GetMSFromTime() - nWait );
}
#endif
}
@@ -3490,7 +3490,7 @@ sal_Bool TestToolObj::ReturnResults( SvStream *pIn )
break;
}
default:
- DBG_ERROR1("Unbekannter Sub Return Code bei Profile: %hu", nUId );
+ OSL_TRACE("Unbekannter Sub Return Code bei Profile: %hu", nUId );
break;
}
}
@@ -3775,7 +3775,7 @@ sal_Bool TestToolObj::ReturnResults( SvStream *pIn )
}
break;
default:
- DBG_ERROR1( "Unbekannter Return Code: %iu", nRet );
+ OSL_TRACE( "Unbekannter Return Code: %iu", nRet );
break;
}
@@ -3816,7 +3816,7 @@ sal_Bool TestToolObj::ReturnResults( SvStream *pIn )
break;
}
default:
- DBG_ERROR1( "Unbekannter Request im Return Stream Nr: %iu", nId );
+ OSL_TRACE( "Unbekannter Request im Return Stream Nr: %iu", nId );
break;
}
if( !pIn->IsEof() )
diff --git a/basctl/source/basicide/basobj2.cxx b/basctl/source/basicide/basobj2.cxx
index 7a578f20f186..c14f7688ff58 100644
--- a/basctl/source/basicide/basobj2.cxx
+++ b/basctl/source/basicide/basobj2.cxx
@@ -173,7 +173,7 @@ bool RenameModule( Window* pErrorParent, const ScriptDocument& rDocument, const
{
if ( !rDocument.hasModule( rLibName, rOldName ) )
{
- OSL_ENSURE( false, "BasicIDE::RenameModule: old module name is invalid!" );
+ OSL_FAIL( "BasicIDE::RenameModule: old module name is invalid!" );
return false;
}
diff --git a/basctl/source/basicide/basobj3.cxx b/basctl/source/basicide/basobj3.cxx
index c255eb830b74..ff27f5452ae2 100644
--- a/basctl/source/basicide/basobj3.cxx
+++ b/basctl/source/basicide/basobj3.cxx
@@ -178,7 +178,7 @@ bool RenameDialog( Window* pErrorParent, const ScriptDocument& rDocument, const
{
if ( !rDocument.hasDialog( rLibName, rOldName ) )
{
- OSL_ENSURE( false, "BasicIDE::RenameDialog: old module name is invalid!" );
+ OSL_FAIL( "BasicIDE::RenameDialog: old module name is invalid!" );
return false;
}
diff --git a/basctl/source/basicide/scriptdocument.cxx b/basctl/source/basicide/scriptdocument.cxx
index 306eeac4b9be..6018eea4f1bd 100644
--- a/basctl/source/basicide/scriptdocument.cxx
+++ b/basctl/source/basicide/scriptdocument.cxx
@@ -1134,7 +1134,7 @@ namespace basctl
}
}
- OSL_ENSURE( false, "ScriptDocument::getDocumentForBasicManager: did not find a document for this manager!" );
+ OSL_FAIL( "ScriptDocument::getDocumentForBasicManager: did not find a document for this manager!" );
return ScriptDocument( NoDocument );
}
diff --git a/crashrep/source/unx/main.cxx b/crashrep/source/unx/main.cxx
index 7c7df75ec53e..f0e6630658c5 100644
--- a/crashrep/source/unx/main.cxx
+++ b/crashrep/source/unx/main.cxx
@@ -368,7 +368,7 @@ bool SendHTTPRequest(
if ( g_bDebugMode )
{
printf( "*** Sending HTTP request ***\n\n" );
- printf( buffer );
+ printf( "%s", buffer );
}
if ( SOCKET_ERROR != send( s, buffer, strlen(buffer), 0 ) )
@@ -405,7 +405,7 @@ bool SendHTTPRequest(
if ( g_bDebugMode )
do
{
- printf( buffer );
+ printf( "%s", buffer );
memset( buffer, 0, sizeof(buffer) );
} while ( 0 < recv( s, buffer, sizeof(buffer), 0 ) );
}
diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx
index 62731acc4b68..007ad3d2ab1e 100644
--- a/cui/source/customize/macropg.cxx
+++ b/cui/source/customize/macropg.cxx
@@ -541,7 +541,7 @@ void _SvxMacroTabPage::DisplayAppEvents( bool appEvents)
EventsHash::iterator h_it = eventsHash->find( sEventName );
if( h_it == eventsHash->end() )
{
- OSL_ENSURE( false, "_SvxMacroTabPage::DisplayAppEvents: something's suspicious here!" );
+ OSL_FAIL( "_SvxMacroTabPage::DisplayAppEvents: something's suspicious here!" );
continue;
}
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx
index 175cde07daa1..c0a53730baca 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -904,9 +904,7 @@ void SpellDialog::SetTitle_Impl(LanguageType nLang)
sTitle.SearchAndReplaceAscii( "$LANGUAGE ($LOCATION)", SvtLanguageTable::GetLanguageString(nLang) );
SetText( sTitle );
}
-/*-------------------------------------------------------------------------
- -----------------------------------------------------------------------*/
void SpellDialog::InitUserDicts()
{
const LanguageType nLang = aLanguageLB.GetSelectLanguage();
diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index 9b2c7cc52606..c25b11f48f65 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -261,7 +261,7 @@ IMPL_LINK( SearchProgress, CleanUpHdl, void*, EMPTYARG )
short SearchProgress::Execute()
{
- DBG_ERROR( "SearchProgress cannot be executed via Dialog::Execute!\n"
+ OSL_FAIL( "SearchProgress cannot be executed via Dialog::Execute!\n"
"It creates a thread that will call back to VCL apartment => deadlock!\n"
"Use Dialog::StartExecuteModal to execute the dialog!" );
return RET_CANCEL;
@@ -436,7 +436,7 @@ IMPL_LINK( TakeProgress, CleanUpHdl, void*, EMPTYARG )
short TakeProgress::Execute()
{
- DBG_ERROR( "TakeProgress cannot be executed via Dialog::Execute!\n"
+ OSL_FAIL( "TakeProgress cannot be executed via Dialog::Execute!\n"
"It creates a thread that will call back to VCL apartment => deadlock!\n"
"Use Dialog::StartExecuteModal to execute the dialog!" );
return RET_CANCEL;
diff --git a/cui/source/options/optchart.cxx b/cui/source/options/optchart.cxx
index ec1aa4bc7960..d43fc3437cb2 100644
--- a/cui/source/options/optchart.cxx
+++ b/cui/source/options/optchart.cxx
@@ -69,9 +69,9 @@ SvxDefaultColorOptPage::SvxDefaultColorOptPage( Window* pParent, const SfxItemSe
aValSetColorBox.SetSelectHdl( LINK( this, SvxDefaultColorOptPage, BoxClickedHdl ) );
aValSetColorBox.SetStyle( aValSetColorBox.GetStyle()
- | WB_VSCROLL | WB_ITEMBORDER | WB_NAMEFIELD );
+ | WB_ITEMBORDER | WB_NAMEFIELD );
aValSetColorBox.SetColCount( 8 );
- aValSetColorBox.SetLineCount( 12 );
+ aValSetColorBox.SetLineCount( 13 );
aValSetColorBox.SetExtraSpacing( 0 );
aValSetColorBox.Show();
@@ -143,6 +143,9 @@ void SvxDefaultColorOptPage::FillColorBox()
long nCount = pColorTab->Count();
XColorEntry* pColorEntry;
+ if( nCount > 104 )
+ aValSetColorBox.SetStyle( aValSetColorBox.GetStyle() | WB_VSCROLL );
+
for( long i = 0; i < nCount; i++ )
{
pColorEntry = pColorTab->GetColor( i );
diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx
index c0747362a64d..df99ea8f597f 100644
--- a/cui/source/options/optsave.cxx
+++ b/cui/source/options/optsave.cxx
@@ -482,7 +482,7 @@ void SfxSaveTabPage::Reset( const SfxItemSet& )
catch(Exception& e)
{
(void) e;
- DBG_ERROR(
+ OSL_FAIL(
rtl::OUStringToOString(
(rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM(
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index 830bdaa7a2cb..f3db1a861b48 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -1163,13 +1163,13 @@ void SvxBackgroundTabPage::FillColorValueSets_Impl()
aBackgroundColorSet.InsertItem( i + 1, pEntry->GetColor(), pEntry->GetName() );
}
- while ( i < 80 )
+ while ( i < 104 )
{
aBackgroundColorSet.InsertItem( i + 1, aColWhite, aStrWhite );
i++;
}
- if ( nCount > 80 )
+ if ( nCount > 104 )
{
aBackgroundColorSet.SetStyle( nBits | WB_VSCROLL );
}
@@ -1178,8 +1178,8 @@ void SvxBackgroundTabPage::FillColorValueSets_Impl()
if ( bOwn )
delete pColorTable;
- aBackgroundColorSet.SetColCount( 10 );
- aBackgroundColorSet.SetLineCount( 10 );
+ aBackgroundColorSet.SetColCount( 8 );
+ aBackgroundColorSet.SetLineCount( 13 );
aBackgroundColorSet.CalcWindowSizePixel( aSize15x15 );
}
diff --git a/cui/source/tabpages/numpages.src b/cui/source/tabpages/numpages.src
index e66e3dc2dd98..626c7114c95a 100644
--- a/cui/source/tabpages/numpages.src
+++ b/cui/source/tabpages/numpages.src
@@ -216,7 +216,8 @@ TabPage RID_SVXPAGE_NUM_OPTIONS
< "а, б, .., аа, аб, ... (Serbian)" ; 49 /*CHARS_CYRILLIC_LOWER_LETTER_SR */; > ;
< "Ð, Б, .., Ðа, Бб, ... (Serbian)" ; 50 /*CHARS_CYRILLIC_UPPER_LETTER_N_SR */; > ;
< "а, б, .., аа, бб, ... (Serbian)" ; 51 /*CHARS_CYRILLIC_LOWER_LETTER_N_SR */; > ;
-
+ < "Α, Β, Γ, ... (Greek Upper Letter)"; 52 /*CHARS_GREEK_UPPER_LETTER */; > ;
+ < "α, β, γ, ... (Greek Lower Letter)"; 53 /*CHARS_GREEK_LOWER_LETTER */; > ;
};
};
FixedText FT_PREFIX
diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index 5a71867ef587..a750b060c08c 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -162,7 +162,7 @@ SvxColorTabPage::SvxColorTabPage
// ValueSet
aValSetColorTable.SetStyle( aValSetColorTable.GetStyle() | WB_VSCROLL | WB_ITEMBORDER );
aValSetColorTable.SetColCount( 8 );
- aValSetColorTable.SetLineCount( 10 );
+ aValSetColorTable.SetLineCount( 13 );
aValSetColorTable.SetExtraSpacing( 0 );
aValSetColorTable.Show();
@@ -1153,6 +1153,9 @@ void SvxColorTabPage::FillValueSet_Impl( ValueSet& rVs )
long nCount = pColorTab->Count();
XColorEntry* pColorEntry;
+ if( nCount > 104 )
+ rVs.SetStyle( rVs.GetStyle() | WB_VSCROLL );
+
for( long i = 0; i < nCount; i++ )
{
pColorEntry = pColorTab->GetColor( i );
diff --git a/extensions/source/bibliography/datman.cxx b/extensions/source/bibliography/datman.cxx
index 8783c7ad8aae..b2698154fd03 100644
--- a/extensions/source/bibliography/datman.cxx
+++ b/extensions/source/bibliography/datman.cxx
@@ -215,7 +215,7 @@ Reference< XNameAccess > getColumns(const Reference< XForm > & _rxForm)
String sMsg(String::CreateFromAscii("::getColumns : catched an exception ("));
sMsg += String(e.Message);
sMsg.AppendAscii(") ...");
- DBG_ERROR( ByteString(sMsg, RTL_TEXTENCODING_ASCII_US ).GetBuffer());
+ OSL_FAIL( ByteString(sMsg, RTL_TEXTENCODING_ASCII_US ).GetBuffer());
#endif
}
@@ -748,9 +748,7 @@ BibDataManager::BibDataManager()
{
}
-/* --------------------------------------------------
- --------------------------------------------------*/
BibDataManager::~BibDataManager()
{
Reference< XLoadable > xLoad( m_xForm, UNO_QUERY );
@@ -864,16 +862,12 @@ void BibDataManager::InsertFields(const Reference< XFormComponent > & _rxGrid)
OSL_FAIL("Exception in BibDataManager::InsertFields");
}
}
-/* --------------------------------------------------
- --------------------------------------------------*/
Reference< awt::XControlModel > BibDataManager::updateGridModel()
{
return updateGridModel( m_xForm );
}
-/* --------------------------------------------------
- --------------------------------------------------*/
Reference< awt::XControlModel > BibDataManager::updateGridModel(const Reference< XForm > & xDbForm)
{
try
@@ -903,9 +897,7 @@ Reference< awt::XControlModel > BibDataManager::updateGridModel(const Reference<
return m_xGridModel;
}
-/* --------------------------------------------------
- --------------------------------------------------*/
Reference< XForm > BibDataManager::createDatabaseForm(BibDBDescriptor& rDesc)
{
Reference< XForm > xResult;
@@ -1185,9 +1177,7 @@ void BibDataManager::setActiveDataSource(const ::rtl::OUString& rURL)
}
}
-/* --------------------------------------------------
- --------------------------------------------------*/
void BibDataManager::setActiveDataTable(const ::rtl::OUString& rTable)
{
ResetIdentifierMapping();
@@ -1649,9 +1639,7 @@ void BibDataManager::CreateMappingDialog(Window* pParent)
}
delete pDlg;
}
-/* --------------------------------------------------
- --------------------------------------------------*/
::rtl::OUString BibDataManager::CreateDBChangeDialog(Window* pParent)
{
::rtl::OUString uRet;
diff --git a/extensions/source/config/ldap/ldapaccess.cxx b/extensions/source/config/ldap/ldapaccess.cxx
index be3eccf99205..976b4a4bbbe6 100644
--- a/extensions/source/config/ldap/ldapaccess.cxx
+++ b/extensions/source/config/ldap/ldapaccess.cxx
@@ -269,7 +269,7 @@ void LdapConnection::initConnection()
}
else
{
- OSL_ENSURE( false, "LdapConnection::findUserDn-could not get DN for User ");
+ OSL_FAIL( "LdapConnection::findUserDn-could not get DN for User ");
}
return userDn ;
diff --git a/extensions/source/dbpilots/gridwizard.cxx b/extensions/source/dbpilots/gridwizard.cxx
index ba80d2f9deaa..9fddfd0635e0 100644
--- a/extensions/source/dbpilots/gridwizard.cxx
+++ b/extensions/source/dbpilots/gridwizard.cxx
@@ -227,9 +227,9 @@ namespace dbp
}
catch(Exception&)
{
- DBG_ERROR( ::rtl::OString("OGridWizard::implApplySettings: unexpected exception while creating the grid column for field ")
- += ::rtl::OString(pFormFieldName->getStr(), pFormFieldName->getLength(), gsl_getSystemTextEncoding())
- += ::rtl::OString("!"));
+ OSL_FAIL( ( ::rtl::OString("OGridWizard::implApplySettings: unexpected exception while creating the grid column for field ")
+ += ::rtl::OString(pFormFieldName->getStr(), pFormFieldName->getLength(), gsl_getSystemTextEncoding())
+ += ::rtl::OString("!") ).getStr() );
}
}
}
diff --git a/extensions/source/logging/filehandler.cxx b/extensions/source/logging/filehandler.cxx
index e0680441a85a..8aef979c00c1 100644
--- a/extensions/source/logging/filehandler.cxx
+++ b/extensions/source/logging/filehandler.cxx
@@ -208,7 +208,7 @@ namespace logging
sMessage.append( ::rtl::OString( m_sFileURL.getStr(), m_sFileURL.getLength(), osl_getThreadTextEncoding() ) );
sMessage.append( "\nerror code: " );
sMessage.append( (sal_Int32)res );
- OSL_ENSURE( false, sMessage.makeStringAndClear() );
+ OSL_FAIL( sMessage.makeStringAndClear() );
}
#endif
if ( m_eFileValidity == eValid )
diff --git a/extensions/source/ole/oleobjw.cxx b/extensions/source/ole/oleobjw.cxx
index 80517c680e01..6648d1773560 100644
--- a/extensions/source/ole/oleobjw.cxx
+++ b/extensions/source/ole/oleobjw.cxx
@@ -333,7 +333,7 @@ void SAL_CALL IUnknownWrapper_Impl::setValue( const OUString& aPropertyName,
OUString msg(OUSTR("[automation bridge] Property ") + aPropertyName +
OUSTR(" is read-only"));
OString sMsg = OUStringToOString(msg, osl_getThreadTextEncoding());
- OSL_ENSURE(0, sMsg.getStr());
+ OSL_FAIL(sMsg.getStr());
// ignore silently
return;
}
diff --git a/extensions/source/plugin/aqua/sysplug.cxx b/extensions/source/plugin/aqua/sysplug.cxx
index ef3c7bd3ee8d..01e10ddc1f14 100644
--- a/extensions/source/plugin/aqua/sysplug.cxx
+++ b/extensions/source/plugin/aqua/sysplug.cxx
@@ -488,11 +488,11 @@ long MacPluginComm::doIt()
break;
case eNPP_Initialize:
TRACE( "eNPP_Initialize" );
- OSL_ENSURE( false, "NPP_Initialize: not implemented!" );
+ OSL_FAIL( "NPP_Initialize: not implemented!" );
break;
case eNPP_GetJavaClass:
TRACE( "eNPP_GetJavaClass" );
- OSL_ENSURE( false, "NPP_GetJavaClass: not implemented!" );
+ OSL_FAIL( "NPP_GetJavaClass: not implemented!" );
break;
}
return nRet;
diff --git a/extensions/source/plugin/win/sysplug.cxx b/extensions/source/plugin/win/sysplug.cxx
index 59e62c15188d..a65ff1b5e766 100644
--- a/extensions/source/plugin/win/sysplug.cxx
+++ b/extensions/source/plugin/win/sysplug.cxx
@@ -271,11 +271,11 @@ long PluginComm_Impl::doIt()
break;
case eNPP_Initialize:
TRACE( "eNPP_Initialize" );
- OSL_ENSURE( false, "NPP_Initialize: not implemented!" );
+ OSL_FAIL( "NPP_Initialize: not implemented!" );
break;
case eNPP_GetJavaClass:
TRACE( "eNPP_GetJavaClass" );
- OSL_ENSURE( false, "NPP_GetJavaClass: not implemented!" );
+ OSL_FAIL( "NPP_GetJavaClass: not implemented!" );
break;
}
return nRet;
diff --git a/extensions/source/propctrlr/browserlistbox.cxx b/extensions/source/propctrlr/browserlistbox.cxx
index e9f0243a4134..ce558559b21f 100644
--- a/extensions/source/propctrlr/browserlistbox.cxx
+++ b/extensions/source/propctrlr/browserlistbox.cxx
@@ -282,21 +282,21 @@ namespace pcr
//--------------------------------------------------------------------
void SAL_CALL PropertyControlContext_Impl::focusGained( const Reference< XPropertyControl >& Control ) throw (RuntimeException)
{
- DBG_TRACE( "PropertyControlContext_Impl: FOCUS_GAINED" );
+ OSL_TRACE( "PropertyControlContext_Impl: FOCUS_GAINED" );
impl_notify_throw( Control, FOCUS_GAINED );
}
//--------------------------------------------------------------------
void SAL_CALL PropertyControlContext_Impl::valueChanged( const Reference< XPropertyControl >& Control ) throw (RuntimeException)
{
- DBG_TRACE( "PropertyControlContext_Impl: VALUE_CHANGED" );
+ OSL_TRACE( "PropertyControlContext_Impl: VALUE_CHANGED" );
impl_notify_throw( Control, VALUE_CHANGED );
}
//--------------------------------------------------------------------
void SAL_CALL PropertyControlContext_Impl::activateNextControl( const Reference< XPropertyControl >& CurrentControl ) throw (RuntimeException)
{
- DBG_TRACE( "PropertyControlContext_Impl: ACTIVATE_NEXT" );
+ OSL_TRACE( "PropertyControlContext_Impl: ACTIVATE_NEXT" );
impl_notify_throw( CurrentControl, ACTIVATE_NEXT );
}
@@ -338,15 +338,15 @@ namespace pcr
switch ( rControlEvent.eType )
{
case FOCUS_GAINED:
- DBG_TRACE( "PropertyControlContext_Impl::processEvent: FOCUS_GAINED" );
+ OSL_TRACE( "PropertyControlContext_Impl::processEvent: FOCUS_GAINED" );
m_pContext->focusGained( rControlEvent.xControl );
break;
case VALUE_CHANGED:
- DBG_TRACE( "PropertyControlContext_Impl::processEvent: VALUE_CHANGED" );
+ OSL_TRACE( "PropertyControlContext_Impl::processEvent: VALUE_CHANGED" );
m_pContext->valueChanged( rControlEvent.xControl );
break;
case ACTIVATE_NEXT:
- DBG_TRACE( "PropertyControlContext_Impl::processEvent: ACTIVATE_NEXT" );
+ OSL_TRACE( "PropertyControlContext_Impl::processEvent: ACTIVATE_NEXT" );
m_pContext->activateNextControl( rControlEvent.xControl );
break;
}
@@ -919,7 +919,7 @@ namespace pcr
::rtl::OUString sPropertyName( _rLine.pLine->GetEntryName() );
sMessage += ::rtl::OString( sPropertyName.getStr(), sPropertyName.getLength(), RTL_TEXTENCODING_ASCII_US );
sMessage += ::rtl::OString( "')!" );
- DBG_ERROR( sMessage );
+ OSL_FAIL( sMessage.getStr() );
}
#endif
if ( _rLine.xHandler.is() )
@@ -950,7 +950,7 @@ namespace pcr
::rtl::OUString sPropertyName( _rLine.pLine->GetEntryName() );
sMessage += ::rtl::OString( sPropertyName.getStr(), sPropertyName.getLength(), RTL_TEXTENCODING_ASCII_US );
sMessage += ::rtl::OString( "')!" );
- DBG_ERROR( sMessage );
+ OSL_FAIL( sMessage.getStr() );
}
#endif
if ( _rLine.xHandler.is() )
@@ -1264,7 +1264,7 @@ namespace pcr
m_aOrderedLines[ nFocusControlPos ]->second.pLine->GrabFocus();
}
else
- OSL_ENSURE( false, "OBrowserListBox::PreNotify: internal error, invalid focus control position!" );
+ OSL_FAIL( "OBrowserListBox::PreNotify: internal error, invalid focus control position!" );
}
}
diff --git a/extensions/source/propctrlr/composeduiupdate.cxx b/extensions/source/propctrlr/composeduiupdate.cxx
index f78349c651e5..e7b8c072438a 100644
--- a/extensions/source/propctrlr/composeduiupdate.cxx
+++ b/extensions/source/propctrlr/composeduiupdate.cxx
@@ -374,7 +374,7 @@ namespace pcr
//--------------------------------------------------------------------
void SAL_CALL CachedInspectorUI::registerControlObserver( const Reference< XPropertyControlObserver >& _Observer ) throw (RuntimeException)
{
- OSL_ENSURE( false, "CachedInspectorUI::registerControlObserver: not expected to be called!" );
+ OSL_FAIL( "CachedInspectorUI::registerControlObserver: not expected to be called!" );
// CachedInspectorUI is used as context for the controls, and we don't expect them to
// register listeners themself
m_rMaster.getDelegatorUI()->registerControlObserver( _Observer );
@@ -383,7 +383,7 @@ namespace pcr
//--------------------------------------------------------------------
void SAL_CALL CachedInspectorUI::revokeControlObserver( const Reference< XPropertyControlObserver >& _Observer ) throw (RuntimeException)
{
- OSL_ENSURE( false, "CachedInspectorUI::revokeControlObserver: not expected to be called!" );
+ OSL_FAIL( "CachedInspectorUI::revokeControlObserver: not expected to be called!" );
// CachedInspectorUI is used as context for the controls, and we don't expect them to
// register listeners themself
m_rMaster.getDelegatorUI()->revokeControlObserver( _Observer );
diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx
index bbfef69b8ebe..b676176bf375 100644
--- a/extensions/source/propctrlr/formcomponenthandler.cxx
+++ b/extensions/source/propctrlr/formcomponenthandler.cxx
@@ -618,7 +618,7 @@ namespace pcr
case 1: nWritingMode = WritingMode2::RL_TB; break;
case 2: nWritingMode = WritingMode2::CONTEXT; break;
default:
- OSL_ENSURE( false, "FormComponentPropertyHandler::convertToPropertyValue: unexpected 'normalized value' for WritingMode!" );
+ OSL_FAIL( "FormComponentPropertyHandler::convertToPropertyValue: unexpected 'normalized value' for WritingMode!" );
nWritingMode = WritingMode2::CONTEXT;
break;
}
@@ -754,7 +754,7 @@ namespace pcr
case WritingMode2::RL_TB: nNormalized = 1; break;
case WritingMode2::CONTEXT: nNormalized = 2; break;
default:
- OSL_ENSURE( false, "FormComponentPropertyHandler::convertToControlValue: unsupported API value for WritingMode!" );
+ OSL_FAIL( "FormComponentPropertyHandler::convertToControlValue: unsupported API value for WritingMode!" );
nNormalized = 2;
break;
}
@@ -2015,7 +2015,7 @@ namespace pcr
break;
default:
- OSL_ENSURE( false, "FormComponentPropertyHandler::impl_updateDependentProperty_nothrow: unexpected property to update!" );
+ OSL_FAIL( "FormComponentPropertyHandler::impl_updateDependentProperty_nothrow: unexpected property to update!" );
break;
} // switch
@@ -3140,7 +3140,7 @@ namespace pcr
return sValue;
}
- OSL_ENSURE( false, "ValueListCommandUI::getSQLCommand: unexpected property type!" );
+ OSL_FAIL( "ValueListCommandUI::getSQLCommand: unexpected property type!" );
return sValue;
}
@@ -3215,7 +3215,7 @@ namespace pcr
xCommandUI = new ValueListCommandUI( xComponentProperties );
break;
default:
- OSL_ENSURE( false, "FormComponentPropertyHandler::OnDesignerClosed: invalid property id!" );
+ OSL_FAIL( "FormComponentPropertyHandler::OnDesignerClosed: invalid property id!" );
return false;
}
@@ -3296,7 +3296,7 @@ namespace pcr
}
catch( const Exception& )
{
- OSL_ENSURE( false, "FormComponentPropertyHandler::impl_hasValidDataSourceSignature_nothrow: caught an exception!" );
+ OSL_FAIL( "FormComponentPropertyHandler::impl_hasValidDataSourceSignature_nothrow: caught an exception!" );
}
}
return bHas;
diff --git a/extensions/source/propctrlr/formgeometryhandler.cxx b/extensions/source/propctrlr/formgeometryhandler.cxx
index 209b466cfe9f..d93f023e4add 100644
--- a/extensions/source/propctrlr/formgeometryhandler.cxx
+++ b/extensions/source/propctrlr/formgeometryhandler.cxx
@@ -376,7 +376,7 @@ namespace pcr
break;
default:
- OSL_ENSURE( false, "FormGeometryHandler::getPropertyValue: huh?" );
+ OSL_FAIL( "FormGeometryHandler::getPropertyValue: huh?" );
break;
}
}
@@ -443,7 +443,7 @@ namespace pcr
break;
default:
- OSL_ENSURE( false, "FormGeometryHandler::getPropertyValue: huh?" );
+ OSL_FAIL( "FormGeometryHandler::getPropertyValue: huh?" );
break;
}
}
@@ -491,7 +491,7 @@ namespace pcr
break;
default:
- OSL_ENSURE( false, "FormGeometryHandler::describePropertyLine: huh?" );
+ OSL_FAIL( "FormGeometryHandler::describePropertyLine: huh?" );
break;
}
}
@@ -547,7 +547,7 @@ namespace pcr
}
break;
default:
- OSL_ENSURE( false, "FormGeometryHandler::actuatingPropertyChanged: not registered for this property!" );
+ OSL_FAIL( "FormGeometryHandler::actuatingPropertyChanged: not registered for this property!" );
break;
}
}
@@ -706,7 +706,7 @@ namespace pcr
break;
default:
- OSL_ENSURE( false, "FormGeometryHandler::impl_setSheetAnchorType_nothrow: illegal anchor type!" );
+ OSL_FAIL( "FormGeometryHandler::impl_setSheetAnchorType_nothrow: illegal anchor type!" );
break;
}
}
diff --git a/extensions/source/propctrlr/genericpropertyhandler.cxx b/extensions/source/propctrlr/genericpropertyhandler.cxx
index ef4d8d1f4e02..3802e68dd039 100644
--- a/extensions/source/propctrlr/genericpropertyhandler.cxx
+++ b/extensions/source/propctrlr/genericpropertyhandler.cxx
@@ -516,7 +516,7 @@ namespace pcr
}
catch( const UnknownPropertyException& )
{
- OSL_ENSURE( false, "GenericPropertyHandler::addPropertyChangeListener:\nThe inspected component does not allow registering for all properties at once! This violates the interface contract!" );
+ OSL_FAIL( "GenericPropertyHandler::addPropertyChangeListener:\nThe inspected component does not allow registering for all properties at once! This violates the interface contract!" );
}
}
}
@@ -533,7 +533,7 @@ namespace pcr
}
catch( const UnknownPropertyException& )
{
- OSL_ENSURE( false, "GenericPropertyHandler::removePropertyChangeListener:\nThe inspected component does not allow de-registering for all properties at once! This violates the interface contract!" );
+ OSL_FAIL( "GenericPropertyHandler::removePropertyChangeListener:\nThe inspected component does not allow de-registering for all properties at once! This violates the interface contract!" );
}
}
m_aPropertyListeners.removeInterface( _rxListener );
diff --git a/extensions/source/propctrlr/propcontroller.cxx b/extensions/source/propctrlr/propcontroller.cxx
index c885df94a79b..3c1da2b3b53b 100644
--- a/extensions/source/propctrlr/propcontroller.cxx
+++ b/extensions/source/propctrlr/propcontroller.cxx
@@ -1257,7 +1257,7 @@ namespace pcr
::rtl::OString sMessage( "OPropertyBrowserController::UpdateUI: empty category provided for property '" );
sMessage += ::rtl::OString( property->second.Name.getStr(), property->second.Name.getLength(), osl_getThreadTextEncoding() );
sMessage += "'!";
- OSL_ENSURE( false, sMessage );
+ OSL_FAIL( sMessage );
}
#endif
// finally insert this property control
@@ -1365,7 +1365,7 @@ namespace pcr
// also okay, we expect that the handler has disabled the UI as necessary
break;
default:
- OSL_ENSURE( false, "OPropertyBrowserController::Clicked: unknown result value!" );
+ OSL_FAIL( "OPropertyBrowserController::Clicked: unknown result value!" );
break;
}
}
diff --git a/extensions/source/propctrlr/propertycomposer.cxx b/extensions/source/propctrlr/propertycomposer.cxx
index 4f88c2a0bed9..d8b97c0c9faf 100644
--- a/extensions/source/propctrlr/propertycomposer.cxx
+++ b/extensions/source/propctrlr/propertycomposer.cxx
@@ -355,7 +355,7 @@ namespace pcr
case InteractiveSelectionResult_Success:
case InteractiveSelectionResult_Pending:
- OSL_ENSURE( false, "PropertyComposer::onInteractivePropertySelection: no chance to forward the new value to the other handlers!" );
+ OSL_FAIL( "PropertyComposer::onInteractivePropertySelection: no chance to forward the new value to the other handlers!" );
// This means that we cannot know the new property value, which either has already been set
// at the first component ("Success"), or will be set later on once the asynchronous input
// is finished ("Pending"). So, we also cannot forward this new property value to the other
@@ -372,7 +372,7 @@ namespace pcr
break;
default:
- OSL_ENSURE( false, "OPropertyBrowserController::onInteractivePropertySelection: unknown result value!" );
+ OSL_FAIL( "OPropertyBrowserController::onInteractivePropertySelection: unknown result value!" );
break;
}
diff --git a/extensions/source/propctrlr/stringrepresentation.cxx b/extensions/source/propctrlr/stringrepresentation.cxx
index e2e6c0d7fd49..318b14293d6f 100644
--- a/extensions/source/propctrlr/stringrepresentation.cxx
+++ b/extensions/source/propctrlr/stringrepresentation.cxx
@@ -181,7 +181,7 @@ uno::Sequence< ::rtl::OUString > SAL_CALL StringRepresentation::getSupportedSer
::rtl::OString sMessage( "StringRepresentation::convertPropertyValueToStringRepresentation: cannot convert values of type '" );
sMessage += ::rtl::OString( PropertyValue.getValueType().getTypeName().getStr(), PropertyValue.getValueType().getTypeName().getLength(), RTL_TEXTENCODING_ASCII_US );
sMessage += ::rtl::OString( "'!" );
- DBG_ERROR( sMessage.getStr() );
+ OSL_FAIL( sMessage.getStr() );
}
#endif
}
@@ -226,7 +226,7 @@ uno::Any SAL_CALL StringRepresentation::convertToPropertyValue(const ::rtl::OUSt
::rtl::OString sMessage( "StringRepresentation::convertStringRepresentationToPropertyValue: cannot convert into values of type '" );
sMessage += ::rtl::OString( ControlValueType.getTypeName().getStr(), ControlValueType.getTypeName().getLength(), RTL_TEXTENCODING_ASCII_US );
sMessage += ::rtl::OString( "'!" );
- DBG_ERROR( sMessage.getStr() );
+ OSL_FAIL( sMessage.getStr() );
}
#endif
}
@@ -428,7 +428,7 @@ bool StringRepresentation::convertGenericValueToString( const uno::Any& _rValue,
// some structs
case uno::TypeClass_STRUCT:
- OSL_ENSURE( false, "StringRepresentation::convertGenericValueToString(STRUCT): this is dead code - isn't it?" );
+ OSL_FAIL( "StringRepresentation::convertGenericValueToString(STRUCT): this is dead code - isn't it?" );
if ( _rValue.getValueType().equals( ::getCppuType( static_cast< util::Date* >( NULL ) ) ) )
{
// weird enough, the string representation of dates, as used
@@ -572,7 +572,7 @@ bool StringRepresentation::convertStringToGenericValue( const ::rtl::OUString& _
break;
case uno::TypeClass_STRUCT:
- OSL_ENSURE( false, "StringRepresentation::convertStringToGenericValue(STRUCT): this is dead code - isn't it?" );
+ OSL_FAIL( "StringRepresentation::convertStringToGenericValue(STRUCT): this is dead code - isn't it?" );
if ( _rTargetType.equals( ::getCppuType( static_cast< util::Date* >( NULL ) ) ) )
{
// weird enough, the string representation of dates, as used
diff --git a/extensions/source/resource/oooresourceloader.cxx b/extensions/source/resource/oooresourceloader.cxx
index ff87b3d51724..ee5cc2a0ea3f 100644
--- a/extensions/source/resource/oooresourceloader.cxx
+++ b/extensions/source/resource/oooresourceloader.cxx
@@ -447,7 +447,7 @@ namespace res
Sequence< ::rtl::OUString > SAL_CALL OpenOfficeResourceBundle::getElementNames( ) throw (RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
- OSL_ENSURE( false, "OpenOfficeResourceBundle::getElementNames: not implemented!" );
+ OSL_FAIL( "OpenOfficeResourceBundle::getElementNames: not implemented!" );
// the (Simple)ResManager does not provide an API to enumerate the resources
return Sequence< ::rtl::OUString >( );
}
@@ -478,7 +478,7 @@ namespace res
::sal_Bool SAL_CALL OpenOfficeResourceBundle::hasElements( ) throw (RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
- OSL_ENSURE( false, "OpenOfficeResourceBundle::hasElements: not implemented!" );
+ OSL_FAIL( "OpenOfficeResourceBundle::hasElements: not implemented!" );
// the (Simple)ResManager does not provide an API to enumerate the resources
return ::sal_Bool( );
}
diff --git a/extensions/source/svg/svgaction.cxx b/extensions/source/svg/svgaction.cxx
index 22d9d8c52872..324fefa16b6f 100644
--- a/extensions/source/svg/svgaction.cxx
+++ b/extensions/source/svg/svgaction.cxx
@@ -1449,7 +1449,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, const NMSP_RTL:
default :
ByteString aDbgOut( "SVGActionWriter::ImplWriteActions: unsupported MetaAction #" );
aDbgOut.Append( ByteString::CreateFromInt32( nType ) );
- DBG_ERROR( aDbgOut.GetBuffer() );
+ OSL_FAIL( aDbgOut.GetBuffer() );
break;
#endif
}
diff --git a/extensions/source/update/check/updatehdl.cxx b/extensions/source/update/check/updatehdl.cxx
index ff1c2abc919e..b25854fc64a1 100644
--- a/extensions/source/update/check/updatehdl.cxx
+++ b/extensions/source/update/check/updatehdl.cxx
@@ -380,7 +380,7 @@ void SAL_CALL UpdateHandler::actionPerformed( awt::ActionEvent const & rEvent )
case HELP_BUTTON:
break;
default:
- OSL_ENSURE( false, "UpdateHandler::actionPerformed: unknown command!" );
+ OSL_FAIL( "UpdateHandler::actionPerformed: unknown command!" );
}
}
@@ -650,7 +650,7 @@ rtl::OUString UpdateHandler::loadString( const uno::Reference< resource::XResour
}
catch( const uno::Exception& )
{
- OSL_ENSURE( false, "UpdateHandler::loadString: caught an exception!" );
+ OSL_FAIL( "UpdateHandler::loadString: caught an exception!" );
sString = UNISTRING("Missing ") + sKey;
}
@@ -686,7 +686,7 @@ void UpdateHandler::loadStrings()
}
catch( const uno::Exception& )
{
- OSL_ENSURE( false, "UpdateHandler::loadStrings: could not create the resource loader!" );
+ OSL_FAIL( "UpdateHandler::loadStrings: could not create the resource loader!" );
}
if ( !xLoader.is() ) return;
@@ -699,7 +699,7 @@ void UpdateHandler::loadStrings()
}
catch( const resource::MissingResourceException& )
{
- OSL_ENSURE( false, "UpdateHandler::loadStrings: missing the resource bundle!" );
+ OSL_FAIL( "UpdateHandler::loadStrings: missing the resource bundle!" );
}
if ( !xBundle.is() ) return;
@@ -792,7 +792,7 @@ void UpdateHandler::setControlProperty( const rtl::OUString &rCtrlName,
}
catch( const beans::UnknownPropertyException& )
{
- OSL_ENSURE( false, "UpdateHandler::setControlProperty: caught an exception!" );
+ OSL_FAIL( "UpdateHandler::setControlProperty: caught an exception!" );
}
}
@@ -803,7 +803,7 @@ void UpdateHandler::showControl( const rtl::OUString &rCtrlName, bool bShow )
if ( !xContainer.is() )
{
- OSL_ENSURE( false, "UpdateHandler::showControl: could not get control container!" );
+ OSL_FAIL( "UpdateHandler::showControl: could not get control container!" );
return;
}
@@ -819,7 +819,7 @@ void UpdateHandler::focusControl( DialogControls eID )
if ( !xContainer.is() )
{
- OSL_ENSURE( false, "UpdateHandler::focusControl: could not get control container!" );
+ OSL_FAIL( "UpdateHandler::focusControl: could not get control container!" );
return;
}
diff --git a/extensions/source/update/check/updateprotocol.cxx b/extensions/source/update/check/updateprotocol.cxx
index c757bcb55e5c..5a59b4e070fe 100755
--- a/extensions/source/update/check/updateprotocol.cxx
+++ b/extensions/source/update/check/updateprotocol.cxx
@@ -284,7 +284,7 @@ bool checkForExtensionUpdates( const uno::Reference< uno::XComponentContext > &
}
catch( const uno::Exception& )
{
- OSL_ENSURE( false, "checkForExtensionUpdates: could not create the PackageInformationProvider!" );
+ OSL_FAIL( "checkForExtensionUpdates: could not create the PackageInformationProvider!" );
}
if ( !xInfoProvider.is() ) return false;
@@ -310,7 +310,7 @@ bool checkForPendingUpdates( const uno::Reference< uno::XComponentContext > & rx
}
catch( const uno::Exception& )
{
- OSL_ENSURE( false, "checkForExtensionUpdates: could not create the PackageInformationProvider!" );
+ OSL_FAIL( "checkForExtensionUpdates: could not create the PackageInformationProvider!" );
}
if ( !xInfoProvider.is() ) return false;
diff --git a/forms/source/component/ComboBox.cxx b/forms/source/component/ComboBox.cxx
index 4ddf4532f51b..f2c8cbfa2ccf 100644
--- a/forms/source/component/ComboBox.cxx
+++ b/forms/source/component/ComboBox.cxx
@@ -668,7 +668,7 @@ void OComboBoxModel::loadData( bool _bForce )
}
break;
default:
- OSL_ENSURE( false, "OComboBoxModel::loadData: unreachable!" );
+ OSL_FAIL( "OComboBoxModel::loadData: unreachable!" );
break;
}
}
diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx
index b3e9b55dc280..4eeb9970da33 100644
--- a/forms/source/component/FormComponent.cxx
+++ b/forms/source/component/FormComponent.cxx
@@ -992,7 +992,7 @@ Any OControlModel::getPropertyDefaultByHandle( sal_Int32 _nHandle ) const
if ( m_aPropertyBagHelper.hasDynamicPropertyByHandle( _nHandle ) )
m_aPropertyBagHelper.getDynamicPropertyDefaultByHandle( _nHandle, aReturn );
else
- OSL_ENSURE( false, "OControlModel::convertFastPropertyValue: unknown handle!" );
+ OSL_FAIL( "OControlModel::convertFastPropertyValue: unknown handle!" );
}
return aReturn;
}
@@ -1050,7 +1050,7 @@ sal_Bool OControlModel::convertFastPropertyValue(
if ( m_aPropertyBagHelper.hasDynamicPropertyByHandle( _nHandle ) )
bModified = m_aPropertyBagHelper.convertDynamicFastPropertyValue( _nHandle, _rValue, _rConvertedValue, _rOldValue );
else
- OSL_ENSURE( false, "OControlModel::convertFastPropertyValue: unknown handle!" );
+ OSL_FAIL( "OControlModel::convertFastPropertyValue: unknown handle!" );
break;
}
return bModified;
@@ -1084,7 +1084,7 @@ void OControlModel::setFastPropertyValue_NoBroadcast(sal_Int32 _nHandle, const A
if ( m_aPropertyBagHelper.hasDynamicPropertyByHandle( _nHandle ) )
m_aPropertyBagHelper.setDynamicFastPropertyValue( _nHandle, _rValue );
else
- OSL_ENSURE( false, "OControlModel::setFastPropertyValue_NoBroadcast: unknown handle!" );
+ OSL_FAIL( "OControlModel::setFastPropertyValue_NoBroadcast: unknown handle!" );
break;
}
}
diff --git a/forms/source/component/Grid.cxx b/forms/source/component/Grid.cxx
index 7fdb83591834..274e77fbd407 100644
--- a/forms/source/component/Grid.cxx
+++ b/forms/source/component/Grid.cxx
@@ -256,7 +256,7 @@ Reference< XRowSet > SAL_CALL OGridControlModel::getRowSet( ) throw (RuntimeExc
//------------------------------------------------------------------------------
void SAL_CALL OGridControlModel::setRowSet( const Reference< XRowSet >& /*_rxDataSource*/ ) throw (RuntimeException)
{
- OSL_ENSURE( false, "OGridControlModel::setRowSet: not supported!" );
+ OSL_FAIL( "OGridControlModel::setRowSet: not supported!" );
}
//--------------------------------------------------------------------
diff --git a/forms/source/component/ImageControl.cxx b/forms/source/component/ImageControl.cxx
index 7664a51519f3..c05e9e3f2828 100644
--- a/forms/source/component/ImageControl.cxx
+++ b/forms/source/component/ImageControl.cxx
@@ -488,7 +488,7 @@ sal_Bool OImageControlModel::impl_handleNewImageURL_lck( ValueChangeInstigator _
break;
case ImageStoreInvalid:
- OSL_ENSURE( false, "OImageControlModel::impl_handleNewImageURL_lck: image storage type type!" );
+ OSL_FAIL( "OImageControlModel::impl_handleNewImageURL_lck: image storage type type!" );
break;
}
@@ -588,7 +588,7 @@ Any OImageControlModel::translateDbColumnToControlValue()
return makeAny( sImageLink );
}
case ImageStoreInvalid:
- OSL_ENSURE( false, "OImageControlModel::translateDbColumnToControlValue: invalid field type!" );
+ OSL_FAIL( "OImageControlModel::translateDbColumnToControlValue: invalid field type!" );
break;
}
return Any();
@@ -630,7 +630,7 @@ void OImageControlModel::doSetControlValue( const Any& _rValue )
break;
case ImageStoreInvalid:
- OSL_ENSURE( false, "OImageControlModel::doSetControlValue: invalid field type!" );
+ OSL_FAIL( "OImageControlModel::doSetControlValue: invalid field type!" );
break;
} // switch ( lcl_getImageStoreType( getFieldType() ) )
diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx
index 749cc0afbad0..a489f50ffeda 100644
--- a/forms/source/component/ListBox.cxx
+++ b/forms/source/component/ListBox.cxx
@@ -341,7 +341,7 @@ namespace frm
break;
case PROPERTY_ID_VALUE_SEQ :
- OSL_ENSURE( false, "ValueItemList is read-only!" );
+ OSL_FAIL( "ValueItemList is read-only!" );
throw PropertyVetoException();
case PROPERTY_ID_DEFAULT_SELECT_SEQ :
@@ -392,7 +392,7 @@ namespace frm
break;
case PROPERTY_ID_VALUE_SEQ :
- OSL_ENSURE( false, "ValueItemList is read-only!" );
+ OSL_FAIL( "ValueItemList is read-only!" );
throw PropertyVetoException();
case PROPERTY_ID_DEFAULT_SELECT_SEQ :
@@ -900,7 +900,7 @@ namespace frm
}
break;
default:
- OSL_ENSURE( false, "OListBoxModel::loadData: unreachable!" );
+ OSL_FAIL( "OListBoxModel::loadData: unreachable!" );
break;
}
}
@@ -1002,7 +1002,7 @@ namespace frm
size_t selectedValue = aSelectedIndices[0];
if ( selectedValue >= aValues.size() )
{
- OSL_ENSURE( false, "OListBoxModel::getFirstSelectedValue: inconsistent selection/valuelist!" );
+ OSL_FAIL( "OListBoxModel::getFirstSelectedValue: inconsistent selection/valuelist!" );
return s_aEmptyVaue;
}
@@ -1041,7 +1041,7 @@ namespace frm
Reference< XPropertySet > xBoundField( getField() );
if ( !xBoundField.is() )
{
- OSL_ENSURE( false, "OListBoxModel::translateDbColumnToControlValue: no field? How could that happen?!" );
+ OSL_FAIL( "OListBoxModel::translateDbColumnToControlValue: no field? How could that happen?!" );
return Any();
}
@@ -1149,7 +1149,7 @@ namespace frm
default:
break;
}
- OSL_ENSURE( false, "lcl_getCurrentExchangeType: unsupported (unexpected) exchange type!" );
+ OSL_FAIL( "lcl_getCurrentExchangeType: unsupported (unexpected) exchange type!" );
return eEntry;
}
}
diff --git a/forms/source/component/imgprod.cxx b/forms/source/component/imgprod.cxx
index 39d025719297..702f7fca461b 100644
--- a/forms/source/component/imgprod.cxx
+++ b/forms/source/component/imgprod.cxx
@@ -204,9 +204,6 @@ ImageProducer::~ImageProducer()
delete mpStm;
mpStm = NULL;
-
- for( void* pCons = maConsList.First(); pCons; pCons = maConsList.Next() )
- delete (::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > *) pCons;
}
// ------------------------------------------------------------
@@ -226,24 +223,17 @@ void ImageProducer::addConsumer( const ::com::sun::star::uno::Reference< ::com::
{
DBG_ASSERT( rxConsumer.is(), "::AddConsumer(...): No consumer referenced!" );
if( rxConsumer.is() )
- maConsList.Insert( new ::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > ( rxConsumer ), LIST_APPEND );
+ maConsList.push_back( new ::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > ( rxConsumer ));
}
// ------------------------------------------------------------
void ImageProducer::removeConsumer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer >& rxConsumer ) throw(::com::sun::star::uno::RuntimeException)
{
- for( sal_uInt32 n = maConsList.Count(); n; )
- {
- ::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > * pRef = (::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > *) maConsList.GetObject( --n );
+ ConsumerList_t::reverse_iterator riter = std::find(maConsList.rbegin(),maConsList.rend(),rxConsumer);
- if( *pRef == rxConsumer )
- {
- delete pRef;
- maConsList.Remove( n );
- break;
- }
- }
+ if (riter != maConsList.rend())
+ maConsList.erase(riter.base()-1);
}
// ------------------------------------------------------------
@@ -307,7 +297,7 @@ void ImageProducer::NewDataAvailable()
void ImageProducer::startProduction() throw(::com::sun::star::uno::RuntimeException)
{
- if( maConsList.Count() || maDoneHdl.IsSet() )
+ if( !maConsList.empty() || maDoneHdl.IsSet() )
{
bool bNotifyEmptyGraphics = false;
@@ -333,24 +323,16 @@ void ImageProducer::startProduction() throw(::com::sun::star::uno::RuntimeExcept
if ( bNotifyEmptyGraphics )
{
// reset image
- List aTmp;
- void* pCons;
-
// create temporary list to hold interfaces
- for( pCons = maConsList.First(); pCons; pCons = maConsList.Next() )
- aTmp.Insert( new ::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > ( *(::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > *) pCons ), LIST_APPEND );
+ ConsumerList_t aTmp = maConsList;
// iterate through interfaces
- for( pCons = aTmp.First(); pCons; pCons = aTmp.Next() )
+ for( ConsumerList_t::iterator iter = aTmp.begin(); iter != aTmp.end(); ++iter )
{
- ( *(::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > *) pCons )->init( 0, 0 );
- ( *(::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > *) pCons )->complete( ::com::sun::star::awt::ImageStatus::IMAGESTATUS_STATICIMAGEDONE, this );
+ (*iter)->init( 0, 0 );
+ (*iter)->complete( ::com::sun::star::awt::ImageStatus::IMAGESTATUS_STATICIMAGEDONE, this );
}
- // delete interfaces in temporary list
- for( pCons = aTmp.First(); pCons; pCons = aTmp.Next() )
- delete (::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > *) pCons;
-
if ( maDoneHdl.IsSet() )
maDoneHdl.Call( NULL );
}
@@ -380,25 +362,17 @@ void ImageProducer::ImplUpdateData( const Graphic& rGraphic )
{
ImplInitConsumer( rGraphic );
- if( mbConsInit && maConsList.Count() )
+ if( mbConsInit && !maConsList.empty() )
{
- List aTmp;
- void* pCons;
+ // create temporary list to hold interfaces
+ ConsumerList_t aTmp = maConsList;
ImplUpdateConsumer( rGraphic );
mbConsInit = sal_False;
- // create temporary list to hold interfaces
- for( pCons = maConsList.First(); pCons; pCons = maConsList.Next() )
- aTmp.Insert( new ::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > ( *(::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > *) pCons ), LIST_APPEND );
-
// iterate through interfaces
- for( pCons = aTmp.First(); pCons; pCons = aTmp.Next() )
- ( *(::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > *) pCons )->complete( ::com::sun::star::awt::ImageStatus::IMAGESTATUS_STATICIMAGEDONE, this );
-
- // delete interfaces in temporary list
- for( pCons = aTmp.First(); pCons; pCons = aTmp.Next() )
- delete (::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > *) pCons;
+ for( ConsumerList_t::iterator iter = aTmp.begin(); iter != aTmp.end(); ++iter )
+ (*iter)->complete( ::com::sun::star::awt::ImageStatus::IMAGESTATUS_STATICIMAGEDONE, this );
}
}
@@ -411,8 +385,6 @@ void ImageProducer::ImplInitConsumer( const Graphic& rGraphic )
if( pBmpAcc )
{
- List aTmp;
- void * pCons;
sal_uInt16 nPalCount = 0;
sal_uInt32 nRMask = 0;
sal_uInt32 nGMask = 0;
@@ -461,21 +433,15 @@ void ImageProducer::ImplInitConsumer( const Graphic& rGraphic )
}
// create temporary list to hold interfaces
- for( pCons = maConsList.First(); pCons; pCons = maConsList.Next() )
- aTmp.Insert( new ::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > ( *(::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > *) pCons ), LIST_APPEND );
+ ConsumerList_t aTmp = maConsList;
// iterate through interfaces
- for( pCons = aTmp.First(); pCons; pCons = aTmp.Next() )
+ for( ConsumerList_t::iterator iter = aTmp.begin(); iter != aTmp.end(); ++iter)
{
- ( *(::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > *) pCons )->init( pBmpAcc->Width(), pBmpAcc->Height() );
- ( *(::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > *) pCons )->setColorModel( pBmpAcc->GetBitCount(),
- aRGBPal, nRMask, nGMask, nBMask, nAMask );
+ (*iter)->init( pBmpAcc->Width(), pBmpAcc->Height() );
+ (*iter)->setColorModel( pBmpAcc->GetBitCount(),aRGBPal, nRMask, nGMask, nBMask, nAMask );
}
- // delete interfaces in temporary list
- for( pCons = aTmp.First(); pCons; pCons = aTmp.Next() )
- delete (::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > *) pCons;
-
aBmp.ReleaseAccess( pBmpAcc );
mbConsInit = sal_True;
}
@@ -491,8 +457,6 @@ void ImageProducer::ImplUpdateConsumer( const Graphic& rGraphic )
if( pBmpAcc )
{
- List aTmp;
- void* pCons;
Bitmap aMask( aBmpEx.GetMask() );
BitmapReadAccess* pMskAcc = !!aMask ? aMask.AcquireReadAccess() : NULL;
const long nWidth = pBmpAcc->Width();
@@ -512,8 +476,7 @@ void ImageProducer::ImplUpdateConsumer( const Graphic& rGraphic )
}
// create temporary list to hold interfaces
- for( pCons = maConsList.First(); pCons; pCons = maConsList.Next() )
- aTmp.Insert( new ::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > ( *(::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > *) pCons ), LIST_APPEND );
+ ConsumerList_t aTmp = maConsList;
if( pBmpAcc->HasPalette() )
{
@@ -537,9 +500,8 @@ void ImageProducer::ImplUpdateConsumer( const Graphic& rGraphic )
}
// iterate through interfaces
- for( pCons = aTmp.First(); pCons; pCons = aTmp.Next() )
- ( *(::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > *) pCons )->setPixelsByBytes( nStartX, nStartY, nPartWidth, nPartHeight,
- aData, 0UL, nPartWidth );
+ for (ConsumerList_t::iterator iter = aTmp.begin(); iter != aTmp.end(); ++iter)
+ (*iter)->setPixelsByBytes( nStartX, nStartY, nPartWidth, nPartHeight, aData, 0UL, nPartWidth );
}
else
{
@@ -558,9 +520,8 @@ void ImageProducer::ImplUpdateConsumer( const Graphic& rGraphic )
}
// iterate through interfaces
- for( pCons = aTmp.First(); pCons; pCons = aTmp.Next() )
- ( *(::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > *) pCons )->setPixelsByLongs( nStartX, nStartY, nPartWidth, nPartHeight,
- aData, 0UL, nPartWidth );
+ for (ConsumerList_t::iterator iter = aTmp.begin(); iter != aTmp.end(); ++iter)
+ (*iter)->setPixelsByLongs( nStartX, nStartY, nPartWidth, nPartHeight, aData, 0UL, nPartWidth );
}
}
else
@@ -585,15 +546,10 @@ void ImageProducer::ImplUpdateConsumer( const Graphic& rGraphic )
}
// iterate through interfaces
- for( pCons = aTmp.First(); pCons; pCons = aTmp.Next() )
- ( *(::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > *) pCons )->setPixelsByLongs( nStartX, nStartY, nPartWidth, nPartHeight,
- aData, 0UL, nPartWidth );
+ for (ConsumerList_t::iterator iter = aTmp.begin(); iter != aTmp.end(); ++iter)
+ (*iter)->setPixelsByLongs( nStartX, nStartY, nPartWidth, nPartHeight, aData, 0UL, nPartWidth );
}
- // delete interfaces in temporary list
- for( pCons = aTmp.First(); pCons; pCons = aTmp.Next() )
- delete (::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > *) pCons;
-
aBmp.ReleaseAccess( pBmpAcc );
aMask.ReleaseAccess( pMskAcc );
}
diff --git a/forms/source/component/imgprod.hxx b/forms/source/component/imgprod.hxx
index ee949ce56575..53d673cbe065 100644
--- a/forms/source/component/imgprod.hxx
+++ b/forms/source/component/imgprod.hxx
@@ -29,9 +29,10 @@
#ifndef _PRODUCE_HXX
#define _PRODUCE_HXX
+#include <boost/ptr_container/ptr_vector.hpp>
+
#include <tools/link.hxx>
#include <tools/string.hxx>
-#include <tools/list.hxx>
#include <com/sun/star/awt/ImageStatus.hpp>
#include <com/sun/star/awt/XImageConsumer.hpp>
#include <com/sun/star/awt/XImageProducer.hpp>
@@ -61,8 +62,10 @@ class ImageProducer : public ::com::sun::star::awt::XImageProducer,
{
private:
+ typedef boost::ptr_vector< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > > ConsumerList_t;
+
::rtl::OUString maURL;
- List maConsList;
+ ConsumerList_t maConsList;
Graphic* mpGraphic;
SvStream* mpStm;
sal_uInt32 mnTransIndex;
diff --git a/forms/source/component/refvaluecomponent.cxx b/forms/source/component/refvaluecomponent.cxx
index ab32ff5bcce3..9fdf49d5117d 100644
--- a/forms/source/component/refvaluecomponent.cxx
+++ b/forms/source/component/refvaluecomponent.cxx
@@ -218,7 +218,7 @@ namespace frm
}
else
{
- OSL_ENSURE( false, "OReferenceValueComponent::translateExternalValueToControlValue: unexpected value type!" );
+ OSL_FAIL( "OReferenceValueComponent::translateExternalValueToControlValue: unexpected value type!" );
}
return makeAny( nState );
diff --git a/forms/source/richtext/attributedispatcher.cxx b/forms/source/richtext/attributedispatcher.cxx
index 0599aef47105..201c6b998e4d 100644
--- a/forms/source/richtext/attributedispatcher.cxx
+++ b/forms/source/richtext/attributedispatcher.cxx
@@ -114,7 +114,7 @@ namespace frm
sMessage += "\n (URL: ";
sMessage += ::rtl::OString( _rURL.Complete.getStr(), _rURL.Complete.getLength(), RTL_TEXTENCODING_ASCII_US );
sMessage += ")";
- DBG_ERROR( sMessage.getStr() );
+ OSL_FAIL( sMessage.getStr() );
}
#endif
diff --git a/forms/source/richtext/richtextcontrol.cxx b/forms/source/richtext/richtextcontrol.cxx
index 3ed1ca22efe5..42f6dad4ca41 100644
--- a/forms/source/richtext/richtextcontrol.cxx
+++ b/forms/source/richtext/richtextcontrol.cxx
@@ -633,7 +633,7 @@ namespace frm
#if OSL_DEBUG_LEVEL > 0
::rtl::OString sTrace( "ORichTextPeer::implCreateDispatcher: creating *parametrized* dispatcher for " );
sTrace += ::rtl::OString( _rURL.Complete.getStr(), _rURL.Complete.getLength(), RTL_TEXTENCODING_ASCII_US );
- DBG_TRACE( sTrace.getStr() );
+ OSL_TRACE( "%s", sTrace.getStr() );
#endif
pAttributeDispatcher = new OParametrizedAttributeDispatcher( pRichTextControl->getView(), _nSlotId, _rURL, pRichTextControl );
}
@@ -642,7 +642,7 @@ namespace frm
#if OSL_DEBUG_LEVEL > 0
::rtl::OString sTrace( "ORichTextPeer::implCreateDispatcher: creating *normal* dispatcher for " );
sTrace += ::rtl::OString( _rURL.Complete.getStr(), _rURL.Complete.getLength(), RTL_TEXTENCODING_ASCII_US );
- DBG_TRACE( sTrace.getStr() );
+ OSL_TRACE( "%s", sTrace.getStr() );
#endif
pAttributeDispatcher = new OAttributeDispatcher( pRichTextControl->getView(), _nSlotId, _rURL, pRichTextControl );
}
@@ -652,7 +652,7 @@ namespace frm
{
::rtl::OString sTrace( "ORichTextPeer::implCreateDispatcher: not creating dispatcher (unsupported slot) for " );
sTrace += ::rtl::OString( _rURL.Complete.getStr(), _rURL.Complete.getLength(), RTL_TEXTENCODING_ASCII_US );
- DBG_TRACE( sTrace.getStr() );
+ OSL_TRACE( "%s", sTrace.getStr() );
}
#endif
}
diff --git a/forms/source/solar/control/navtoolbar.cxx b/forms/source/solar/control/navtoolbar.cxx
index a5aa69ba9cae..f87cd2c9d3a6 100644
--- a/forms/source/solar/control/navtoolbar.cxx
+++ b/forms/source/solar/control/navtoolbar.cxx
@@ -102,7 +102,7 @@ namespace frm
if ( pAsciiCommandName != NULL )
return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:" ) ) + ::rtl::OUString::createFromAscii( pAsciiCommandName );
- OSL_ENSURE( false, "lcl_getCommandURL: unknown FormFeature!" );
+ OSL_FAIL( "lcl_getCommandURL: unknown FormFeature!" );
return ::rtl::OUString();
}
}
diff --git a/forms/source/xforms/datatypes.cxx b/forms/source/xforms/datatypes.cxx
index 329e65b76cc8..c8c76c8d848f 100644
--- a/forms/source/xforms/datatypes.cxx
+++ b/forms/source/xforms/datatypes.cxx
@@ -503,7 +503,7 @@ namespace xforms
break;
default:
- OSL_ENSURE( false, "OValueLimitedType::_explainInvalid: unknown reason!" );
+ OSL_FAIL( "OValueLimitedType::_explainInvalid: unknown reason!" );
break;
}
diff --git a/forms/source/xforms/model.cxx b/forms/source/xforms/model.cxx
index 26074f2a1c6f..e463a4b9e3ad 100644
--- a/forms/source/xforms/model.cxx
+++ b/forms/source/xforms/model.cxx
@@ -385,7 +385,7 @@ bool Model::setSimpleContent( const XNode_t& xConstNode,
default:
{
- OSL_ENSURE( false, "bound to unknown node type?" );
+ OSL_FAIL( "bound to unknown node type?" );
}
break;
diff --git a/forms/source/xforms/model_ui.cxx b/forms/source/xforms/model_ui.cxx
index f78bccfea00b..1ed98a49a709 100644
--- a/forms/source/xforms/model_ui.cxx
+++ b/forms/source/xforms/model_ui.cxx
@@ -257,7 +257,7 @@ OUString Model::getDefaultBindingExpressionForNode(
default:
// unknown type? fail!
- OSL_ENSURE( false, "unknown node type!" );
+ OSL_FAIL( "unknown node type!" );
xCurrent.set( NULL );
aBuffer.makeStringAndClear();
// we'll remove the slash below
@@ -332,7 +332,7 @@ OUString Model::getNodeDisplayName( const XNode_t& xNode,
default:
// unknown type? fail!
- OSL_ENSURE( false, "unknown node type!" );
+ OSL_FAIL( "unknown node type!" );
break;
}
@@ -355,7 +355,7 @@ OUString Model::getNodeName( const XNode_t& xNode )
case NodeType_DOCUMENT_NODE:
default:
// unknown type? fail!
- OSL_ENSURE( false, "no name for this node type!" );
+ OSL_FAIL( "no name for this node type!" );
break;
}
@@ -684,7 +684,7 @@ Model::XNode_t Model::renameNode( const XNode_t& xNode,
}
else
{
- OSL_ENSURE( false, "can't rename this node type" );
+ OSL_FAIL( "can't rename this node type" );
}
// adjust bindings (if necessary):
diff --git a/package/source/zipapi/ZipOutputStream.cxx b/package/source/zipapi/ZipOutputStream.cxx
index 1ba30b2cb3d3..4e08b7e8520d 100644
--- a/package/source/zipapi/ZipOutputStream.cxx
+++ b/package/source/zipapi/ZipOutputStream.cxx
@@ -129,7 +129,7 @@ void SAL_CALL ZipOutputStream::closeEntry( )
{
if (pEntry->nSize != aDeflater.getTotalIn())
{
- OSL_ENSURE(false,"Invalid entry size");
+ OSL_FAIL("Invalid entry size");
}
if (pEntry->nCompressedSize != aDeflater.getTotalOut())
{
@@ -139,7 +139,7 @@ void SAL_CALL ZipOutputStream::closeEntry( )
}
if (pEntry->nCrc != aCRC.getValue())
{
- OSL_ENSURE(false,"Invalid entry CRC-32");
+ OSL_FAIL("Invalid entry CRC-32");
}
}
else
@@ -156,10 +156,10 @@ void SAL_CALL ZipOutputStream::closeEntry( )
break;
case STORED:
if (!((pEntry->nFlag & 8) == 0))
- OSL_ENSURE ( false, "Serious error, one of compressed size, size or CRC was -1 in a STORED stream");
+ OSL_FAIL( "Serious error, one of compressed size, size or CRC was -1 in a STORED stream");
break;
default:
- OSL_ENSURE(false,"Invalid compression method");
+ OSL_FAIL("Invalid compression method");
break;
}
@@ -230,7 +230,7 @@ void SAL_CALL ZipOutputStream::finish( )
closeEntry();
if (aZipList.size() < 1)
- OSL_ENSURE(false,"Zip file must have at least one entry!\n");
+ OSL_FAIL("Zip file must have at least one entry!\n");
sal_Int32 nOffset= static_cast < sal_Int32 > (aChucker.GetPosition());
for (sal_Int32 i =0, nEnd = aZipList.size(); i < nEnd; i++)
diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx
index afc913237023..454a4e66094f 100644
--- a/package/source/zippackage/ZipPackage.cxx
+++ b/package/source/zippackage/ZipPackage.cxx
@@ -988,7 +988,7 @@ void ZipPackage::WriteMimetypeMagicFile( ZipOutputStream& aZipOut )
}
catch ( ::com::sun::star::io::IOException & r )
{
- OSL_ENSURE( 0, "Error adding mimetype to the ZipOutputStream" );
+ OSL_FAIL( "Error adding mimetype to the ZipOutputStream" );
throw WrappedTargetException(
OUString( RTL_CONSTASCII_USTRINGPARAM ( OSL_LOG_PREFIX "Error adding mimetype to the ZipOutputStream!" ) ),
static_cast < OWeakObject * > ( this ),
@@ -1033,7 +1033,7 @@ void ZipPackage::WriteManifest( ZipOutputStream& aZipOut, const vector< Sequence
}
else
{
- OSL_ENSURE ( 0, "Couldn't get a ManifestWriter!" );
+ OSL_FAIL( "Couldn't get a ManifestWriter!" );
IOException aException;
throw WrappedTargetException(
OUString( RTL_CONSTASCII_USTRINGPARAM ( OSL_LOG_PREFIX "Couldn't get a ManifestWriter!" ) ),
diff --git a/package/source/zippackage/ZipPackageFolder.cxx b/package/source/zippackage/ZipPackageFolder.cxx
index 5816b070a152..c771e65e0a89 100644
--- a/package/source/zippackage/ZipPackageFolder.cxx
+++ b/package/source/zippackage/ZipPackageFolder.cxx
@@ -339,12 +339,12 @@ void ZipPackageFolder::saveContents(OUString &rPath, std::vector < Sequence < Pr
}
catch ( ZipException& )
{
- OSL_ENSURE( 0, "Error writing ZipOutputStream" );
+ OSL_FAIL( "Error writing ZipOutputStream" );
bWritingFailed = sal_True;
}
catch ( IOException& )
{
- OSL_ENSURE( 0, "Error writing ZipOutputStream" );
+ OSL_FAIL( "Error writing ZipOutputStream" );
bWritingFailed = sal_True;
}
}
@@ -439,7 +439,7 @@ void ZipPackageFolder::saveContents(OUString &rPath, std::vector < Sequence < Pr
if ( !xStream.is() )
{
- OSL_ENSURE( 0, "ZipPackageStream didn't have a stream associated with it, skipping!" );
+ OSL_FAIL( "ZipPackageStream didn't have a stream associated with it, skipping!" );
bWritingFailed = sal_True;
continue;
}
@@ -492,14 +492,14 @@ void ZipPackageFolder::saveContents(OUString &rPath, std::vector < Sequence < Pr
}
else
{
- OSL_ENSURE( 0, "The package component requires that every stream either be FROM a package or it must support XSeekable!" );
+ OSL_FAIL( "The package component requires that every stream either be FROM a package or it must support XSeekable!" );
continue;
}
}
}
catch ( Exception& )
{
- OSL_ENSURE( 0, "The stream provided to the package component has problems!" );
+ OSL_FAIL( "The stream provided to the package component has problems!" );
bWritingFailed = sal_True;
continue;
}
@@ -561,7 +561,7 @@ void ZipPackageFolder::saveContents(OUString &rPath, std::vector < Sequence < Pr
if ( !xStream.is() )
{
// Make sure that we actually _got_ a new one !
- OSL_ENSURE( 0, "ZipPackageStream didn't have a stream associated with it, skipping!" );
+ OSL_FAIL( "ZipPackageStream didn't have a stream associated with it, skipping!" );
continue;
}
}
@@ -589,12 +589,12 @@ void ZipPackageFolder::saveContents(OUString &rPath, std::vector < Sequence < Pr
}
catch ( ZipException& )
{
- OSL_ENSURE( 0, "Error writing ZipOutputStream" );
+ OSL_FAIL( "Error writing ZipOutputStream" );
bWritingFailed = sal_True;
}
catch ( IOException& )
{
- OSL_ENSURE( 0, "Error writing ZipOutputStream" );
+ OSL_FAIL( "Error writing ZipOutputStream" );
bWritingFailed = sal_True;
}
}
@@ -616,7 +616,7 @@ void ZipPackageFolder::saveContents(OUString &rPath, std::vector < Sequence < Pr
if ( !xStream.is() )
{
// Make sure that we actually _got_ a new one !
- OSL_ENSURE( 0, "ZipPackageStream didn't have a stream associated with it, skipping!" );
+ OSL_FAIL( "ZipPackageStream didn't have a stream associated with it, skipping!" );
continue;
}
}
@@ -646,12 +646,12 @@ void ZipPackageFolder::saveContents(OUString &rPath, std::vector < Sequence < Pr
}
catch ( ZipException& )
{
- OSL_ENSURE( 0, "Error writing ZipOutputStream" );
+ OSL_FAIL( "Error writing ZipOutputStream" );
bWritingFailed = sal_True;
}
catch ( IOException& )
{
- OSL_ENSURE( 0, "Error writing ZipOutputStream" );
+ OSL_FAIL( "Error writing ZipOutputStream" );
bWritingFailed = sal_True;
}
diff --git a/package/source/zippackage/ZipPackageStream.cxx b/package/source/zippackage/ZipPackageStream.cxx
index 823b5c1951ef..06a4413492c1 100644
--- a/package/source/zippackage/ZipPackageStream.cxx
+++ b/package/source/zippackage/ZipPackageStream.cxx
@@ -416,12 +416,12 @@ Reference< io::XInputStream > SAL_CALL ZipPackageStream::getRawData()
}
catch (ZipException &)//rException)
{
- OSL_ENSURE( 0, "ZipException thrown");//rException.Message);
+ OSL_FAIL( "ZipException thrown");//rException.Message);
return Reference < io::XInputStream > ();
}
catch (Exception &)
{
- OSL_ENSURE( 0, "Exception is thrown during stream wrapping!\n");
+ OSL_FAIL( "Exception is thrown during stream wrapping!\n");
return Reference < io::XInputStream > ();
}
}
@@ -447,12 +447,12 @@ Reference< io::XInputStream > SAL_CALL ZipPackageStream::getInputStream( )
}
catch (ZipException &)//rException)
{
- OSL_ENSURE( 0,"ZipException thrown");//rException.Message);
+ OSL_FAIL( "ZipException thrown");//rException.Message);
return Reference < io::XInputStream > ();
}
catch (Exception &)
{
- OSL_ENSURE( 0, "Exception is thrown during stream wrapping!\n");
+ OSL_FAIL( "Exception is thrown during stream wrapping!\n");
return Reference < io::XInputStream > ();
}
}
diff --git a/xmlsecurity/source/component/documentdigitalsignatures.cxx b/xmlsecurity/source/component/documentdigitalsignatures.cxx
index 8d654da6007c..89401fab3b1e 100644
--- a/xmlsecurity/source/component/documentdigitalsignatures.cxx
+++ b/xmlsecurity/source/component/documentdigitalsignatures.cxx
@@ -340,7 +340,7 @@ DocumentDigitalSignatures::ImplVerifySignatures(
rSigInfo.CertificateStatus = xSecEnv->verifyCertificate(rSigInfo.Signer,
Sequence<Reference<css::security::XCertificate> >());
} catch (SecurityException& ) {
- OSL_ENSURE(0, "Verification of certificate failed");
+ OSL_FAIL("Verification of certificate failed");
rSigInfo.CertificateStatus = css::security::CertificateValidity::INVALID;
}
}
diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
index b303b27cda20..d9def4cb80bb 100644
--- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
+++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
@@ -640,7 +640,7 @@ void DigitalSignaturesDialog::ImplFillSignaturesBox()
nValidCerts++;
} catch (css::uno::SecurityException& ) {
- OSL_ENSURE(0, "Verification of certificate failed");
+ OSL_FAIL("Verification of certificate failed");
bCertValid = false;
}