Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/1602
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/02/1602/1
fdo#43157 - Clean up OSL_ASSERT, DBG_ASSERT
- Clean up OSL_
- Clean up DBG_
- Clean up OUString
Change-Id: I002d17ffbbd8371b0518ede34931b2eea30865a3
---
M basic/source/classes/sbxmod.cxx
M basic/source/runtime/iosys.cxx
M basic/source/runtime/methods1.cxx
M basic/source/runtime/runtime.cxx
4 files changed, 73 insertions(+), 70 deletions(-)
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index dc66887..3810293 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -37,6 +37,7 @@
#include "sbunoobj.hxx"
#include <svtools/syntaxhighlight.hxx>
+#include "sal/log.hxx"
#include <basic/basrdll.hxx>
#include <osl/mutex.hxx>
@@ -162,7 +163,7 @@
}
catch(const Exception& )
{
- OSL_FAIL( "DocObjectWrapper::DocObjectWrapper: Caught exception!" );
+ SAL_WARN( "basic", "DocObjectWrapper::DocObjectWrapper: Caught exception!" );
}
}
@@ -188,19 +189,19 @@
DocObjectWrapper::acquire() throw ()
{
osl_atomic_increment( &m_refCount );
- OSL_TRACE("DocObjectWrapper::acquire(%s) 0x%x refcount is now %d", rtl::OUStringToOString(
mName, RTL_TEXTENCODING_UTF8 ).getStr(), this, m_refCount );
+ SAL_INFO("basic","DocObjectWrapper::acquire(%s)"<< OUStringToOString( mName,
RTL_TEXTENCODING_UTF8 ).getStr() << " 0x%x " << this << "refcount is now %d" << m_refCount );
}
void SAL_CALL
DocObjectWrapper::release() throw ()
{
if ( osl_atomic_decrement( &m_refCount ) == 0 )
{
- OSL_TRACE("DocObjectWrapper::release(%s) 0x%x refcount is now %d", rtl::OUStringToOString(
mName, RTL_TEXTENCODING_UTF8 ).getStr(), this, m_refCount );
+ SAL_INFO("basic","DocObjectWrapper::release(%s)"<< OUStringToOString( mName,
RTL_TEXTENCODING_UTF8 ).getStr() << " 0x%x " << this << "refcount is now %d" << m_refCount );
delete this;
}
else
{
- OSL_TRACE("DocObjectWrapper::release(%s) 0x%x refcount is now %d", rtl::OUStringToOString(
mName, RTL_TEXTENCODING_UTF8 ).getStr(), this, m_refCount );
+ SAL_INFO("basic","DocObjectWrapper::release(%s)"<< OUStringToOString( mName,
RTL_TEXTENCODING_UTF8 ).getStr() << " 0x%x " << this << "refcount is now %d" << m_refCount );
}
}
@@ -266,7 +267,7 @@
sal_Int32 nSbxCount = n - 1;
if ( nParamsCount < nSbxCount - nSbxOptional )
{
- throw RuntimeException( OUString( "wrong number of parameters!" ), Reference<
XInterface >() );
+ throw RuntimeException( "wrong number of parameters!", Reference< XInterface >() );
}
}
// set parameters
@@ -451,7 +452,7 @@
try
{
uno::Reference< beans::XPropertySet > xModelProps( rxModel, uno::UNO_QUERY_THROW );
- xVBACompat.set( xModelProps->getPropertyValue( OUString( "BasicLibraries" ) ),
uno::UNO_QUERY );
+ xVBACompat.set( xModelProps->getPropertyValue( "BasicLibraries" ), uno::UNO_QUERY );
}
catch(const uno::Exception& )
{
@@ -494,7 +495,7 @@
// could be found from other module.
SbModule::SbModule( const OUString& rName, sal_Bool bVBACompat )
- : SbxObject( OUString("StarBASICModule") ),
+ : SbxObject( "StarBASICModule" ),
pImage( NULL ), pBreaks( NULL ), pClassData( NULL ), mbVBACompat( bVBACompat ),
pDocObject( NULL ), bIsProxyModule( false )
{
SetName( rName );
@@ -502,7 +503,7 @@
SetModuleType( script::ModuleType::NORMAL );
// #i92642: Set name property to intitial name
- SbxVariable* pNameProp = pProps->Find( OUString("Name"), SbxCLASS_PROPERTY );
+ SbxVariable* pNameProp = pProps->Find( "Name", SbxCLASS_PROPERTY );
if( pNameProp != NULL )
{
pNameProp->PutString( GetName() );
@@ -511,7 +512,7 @@
SbModule::~SbModule()
{
- OSL_TRACE("Module named %s is destructing", rtl::OUStringToOString( GetName(),
RTL_TEXTENCODING_UTF8 ).getStr() );
+ SAL_INFO("basic","Module named %s" << OUStringToOString( GetName(), RTL_TEXTENCODING_UTF8
).getStr() << " is destructing");
delete pImage;
delete pBreaks;
delete pClassData;
@@ -524,7 +525,7 @@
if ( !mxWrapper.is() )
mxWrapper = new DocObjectWrapper( this );
- OSL_TRACE("Module named %s returning wrapper mxWrapper (0x%x)", rtl::OUStringToOString(
GetName(), RTL_TEXTENCODING_UTF8 ).getStr(), mxWrapper.get() );
+ SAL_INFO("basic","Module named %s" << OUStringToOString( GetName(), RTL_TEXTENCODING_UTF8
).getStr() << " returning wrapper mxWrapper (0x%x)" << mxWrapper.get() );
return mxWrapper;
}
@@ -1097,7 +1098,7 @@
{
StarBASIC* pBasic = static_cast< StarBASIC* >( GetParent() );
uno::Reference< lang::XMultiServiceFactory > xFactory( getDocumentModel( pBasic ),
uno::UNO_QUERY_THROW );
- xFactory->createInstance( OUString("ooo.vba.VBAGlobals") );
+ xFactory->createInstance( "ooo.vba.VBAGlobals" );
}
catch( Exception& )
{
@@ -1108,7 +1109,7 @@
// Run a Basic-subprogram
sal_uInt16 SbModule::Run( SbMethod* pMeth )
{
- OSL_TRACE("About to run %s, vba compatmode is %d", rtl::OUStringToOString( pMeth->GetName(),
RTL_TEXTENCODING_UTF8 ).getStr(), mbVBACompat );
+ SAL_INFO("basic","About to run %s" << OUStringToOString( pMeth->GetName(),
RTL_TEXTENCODING_UTF8 ).getStr() << ", vba compatmode is %d" << mbVBACompat );
static sal_uInt16 nMaxCallLevel = 0;
sal_uInt16 nRes = 0;
@@ -1144,7 +1145,7 @@
// Launcher problem
// i80726 The Find below will genarate an error in Testtool so we reset it unless there
was one before already
sal_Bool bWasError = SbxBase::GetError() != 0;
- SbxVariable* pMSOMacroRuntimeLibVar = Find( OUString("Launcher"), SbxCLASS_OBJECT );
+ SbxVariable* pMSOMacroRuntimeLibVar = Find( "Launcher", SbxCLASS_OBJECT );
if ( !bWasError && (SbxBase::GetError() == SbxERR_PROC_UNDEFINED) )
SbxBase::ResetError();
if( pMSOMacroRuntimeLibVar )
@@ -1154,7 +1155,7 @@
{
sal_uInt16 nGblFlag = pMSOMacroRuntimeLib->GetFlags() & SBX_GBLSEARCH;
pMSOMacroRuntimeLib->ResetFlag( SBX_GBLSEARCH );
- SbxVariable* pAppSymbol = pMSOMacroRuntimeLib->Find( OUString("Application"),
SbxCLASS_METHOD );
+ SbxVariable* pAppSymbol = pMSOMacroRuntimeLib->Find( "Application",
SbxCLASS_METHOD );
pMSOMacroRuntimeLib->SetFlag( nGblFlag );
if( pAppSymbol )
{
@@ -1255,7 +1256,7 @@
clearNativeObjectWrapperVector();
- DBG_ASSERT(GetSbData()->pInst->nCallLvl==0,"BASIC-Call-Level > 0");
+ SAL_WARN_IF(GetSbData()->pInst->nCallLvl != 0,"basic","BASIC-Call-Level > 0");
delete GetSbData()->pInst, GetSbData()->pInst = NULL, bDelInst = false;
// #i30690
@@ -1547,7 +1548,7 @@
nPC++;
if( bFollowJumps && eOp == _JUMP && pImg )
{
- DBG_ASSERT( pImg, "FindNextStmnt: pImg==NULL with FollowJumps option" );
+ SAL_WARN_IF( !pImg, "basic", "FindNextStmnt: pImg==NULL with FollowJumps option" );
sal_uInt32 nOp1 = *p++; nOp1 |= *p++ << 8;
nOp1 |= *p++ << 16; nOp1 |= *p++ << 24;
p = (const sal_uInt8*) pImg->GetCode() + nOp1;
@@ -2108,7 +2109,7 @@
{
if ( pCaller )
{
- OSL_TRACE("SbMethod::Call Have been passed a caller 0x%x", pCaller );
+ SAL_INFO("basic", "SbMethod::Call Have been passed a caller 0x%x" << pCaller );
mCaller = pCaller;
}
// RefCount vom Modul hochzaehlen
@@ -2203,7 +2204,7 @@
SetModuleType( mInfo.ModuleType );
if ( mInfo.ModuleType == script::ModuleType::FORM )
{
- SetClassName( OUString("Form" ) );
+ SetClassName( "Form" );
}
else if ( mInfo.ModuleObject.is() )
{
@@ -2224,13 +2225,13 @@
pDocObject = new SbUnoObject( GetName(), uno::makeAny( aObj ) );
com::sun::star::uno::Reference< com::sun::star::lang::XServiceInfo > xServiceInfo( aObj,
com::sun::star::uno::UNO_QUERY_THROW );
- if( xServiceInfo->supportsService( OUString("ooo.vba.excel.Worksheet" ) ) )
+ if( xServiceInfo->supportsService( "ooo.vba.excel.Worksheet" ) )
{
- SetClassName( OUString("Worksheet" ) );
+ SetClassName( "Worksheet" );
}
- else if( xServiceInfo->supportsService( OUString("ooo.vba.excel.Workbook" ) ) )
+ else if( xServiceInfo->supportsService( "ooo.vba.excel.Workbook" ) )
{
- SetClassName( OUString("Workbook" ) );
+ SetClassName( "Workbook" );
}
}
@@ -2282,7 +2283,7 @@
{
if ( mxComponent.is() )
{
- OSL_TRACE("*********** Registering the listeners");
+ SAL_INFO("basic", "*********** Registering the listeners");
try
{
uno::Reference< awt::XTopWindow >( mxComponent, uno::UNO_QUERY_THROW
)->addTopWindowListener( this );
@@ -2316,7 +2317,7 @@
{
if ( mxComponent.is() && !mbDisposed )
{
- OSL_TRACE("*********** Removing the listeners");
+ SAL_INFO("basic", "*********** Removing the listeners");
try
{
uno::Reference< awt::XTopWindow >( mxComponent, uno::UNO_QUERY_THROW
)->removeTopWindowListener( this );
@@ -2376,14 +2377,14 @@
aParams[0] <<= nCancel;
aParams[1] <<= nCloseMode;
- mpUserForm->triggerMethod( OUString("Userform_QueryClose" ), aParams);
+ mpUserForm->triggerMethod( "Userform_QueryClose", aParams);
return;
}
}
}
- mpUserForm->triggerMethod( OUString("Userform_QueryClose" ) );
+ mpUserForm->triggerMethod( "Userform_QueryClose" );
#endif
}
@@ -2458,7 +2459,7 @@
virtual void SAL_CALL disposing( const lang::EventObject& /*Source*/ ) throw
(uno::RuntimeException)
{
- OSL_TRACE("** Userform/Dialog disposing");
+ SAL_INFO("basic", "** Userform/Dialog disposing");
removeListener();
mbDisposed = true;
if ( mpUserForm )
@@ -2480,7 +2481,7 @@
void SbUserFormModule::ResetApiObj( bool bTriggerTerminateEvent )
{
- OSL_TRACE(" SbUserFormModule::ResetApiObj( %s )", bTriggerTerminateEvent ? "true" : "false" );
+ SAL_INFO("basic", " SbUserFormModule::ResetApiObj( %s )" << (bTriggerTerminateEvent ? "true" :
"false") );
if ( bTriggerTerminateEvent && m_xDialog.is() ) // probably someone close the dialog window
{
triggerTerminateEvent();
@@ -2497,7 +2498,7 @@
void SbUserFormModule::triggerMethod( const OUString& aMethodToRun, Sequence< Any >& aArguments )
{
- OSL_TRACE("*** trigger %s ***", rtl::OUStringToOString( aMethodToRun, RTL_TEXTENCODING_UTF8
).getStr() );
+ SAL_INFO("basic", "*** trigger %s ***" << OUStringToOString( aMethodToRun,
RTL_TEXTENCODING_UTF8 ).getStr() );
// Search method
SbxVariable* pMeth = SbObjModule::Find( aMethodToRun, SbxCLASS_METHOD );
if( pMeth )
@@ -2538,22 +2539,22 @@
void SbUserFormModule::triggerActivateEvent( void )
{
- OSL_TRACE("**** entering SbUserFormModule::triggerActivate");
- triggerMethod( OUString( "UserForm_Activate" ) );
- OSL_TRACE("**** leaving SbUserFormModule::triggerActivate");
+ SAL_INFO("basic", "**** entering SbUserFormModule::triggerActivate");
+ triggerMethod( "UserForm_Activate" );
+ SAL_INFO("basic", "**** leaving SbUserFormModule::triggerActivate");
}
void SbUserFormModule::triggerDeactivateEvent( void )
{
- OSL_TRACE("**** SbUserFormModule::triggerDeactivate");
- triggerMethod( OUString("Userform_Deactivate" ) );
+ SAL_INFO("basic", "**** SbUserFormModule::triggerDeactivate");
+ triggerMethod( "Userform_Deactivate" );
}
void SbUserFormModule::triggerInitializeEvent( void )
{
if ( mbInit )
return;
- OSL_TRACE("**** SbUserFormModule::triggerInitializeEvent");
+ SAL_INFO("basic", "**** SbUserFormModule::triggerInitializeEvent");
static OUString aInitMethodName( "Userform_Initialize");
triggerMethod( aInitMethodName );
mbInit = true;
@@ -2561,7 +2562,7 @@
void SbUserFormModule::triggerTerminateEvent( void )
{
- OSL_TRACE("**** SbUserFormModule::triggerTerminateEvent");
+ SAL_INFO("basic", "**** SbUserFormModule::triggerTerminateEvent");
static OUString aTermMethodName( "Userform_Terminate" );
triggerMethod( aTermMethodName );
mbInit=false;
@@ -2608,7 +2609,7 @@
void SbUserFormModule::Load()
{
- OSL_TRACE("** load() ");
+ SAL_INFO("basic", "** load() ");
// forces a load
if ( !pDocObject )
InitObject();
@@ -2617,7 +2618,7 @@
void SbUserFormModule::Unload()
{
- OSL_TRACE("** Unload() ");
+ SAL_INFO("basic", "** Unload() ");
sal_Int8 nCancel = 0;
sal_Int8 nCloseMode = ::ooo::vba::VbQueryClose::vbFormCode;
@@ -2627,7 +2628,7 @@
aParams[0] <<= nCancel;
aParams[1] <<= nCloseMode;
- triggerMethod( OUString("Userform_QueryClose" ), aParams);
+ triggerMethod( "Userform_QueryClose", aParams);
aParams[0] >>= nCancel;
// basic boolean ( and what the user might use ) can be ambiguous ( e.g. basic true = -1 )
@@ -2643,17 +2644,17 @@
triggerTerminateEvent();
}
// Search method
- SbxVariable* pMeth = SbObjModule::Find( OUString("UnloadObject"), SbxCLASS_METHOD );
+ SbxVariable* pMeth = SbObjModule::Find( "UnloadObject", SbxCLASS_METHOD );
if( pMeth )
{
- OSL_TRACE("Attempting too run the UnloadObjectMethod");
+ SAL_INFO("basic", "Attempting too run the UnloadObjectMethod");
m_xDialog.clear(); //release ref to the uno object
SbxValues aVals;
bool bWaitForDispose = true; // assume dialog is showing
if ( m_DialogListener.get() )
{
bWaitForDispose = m_DialogListener->isShowing();
- OSL_TRACE("Showing %d", bWaitForDispose );
+ SAL_INFO("basic", "Showing %d" << bWaitForDispose );
}
pMeth->Get( aVals);
if ( !bWaitForDispose )
@@ -2661,7 +2662,7 @@
// we've either already got a dispose or we'er never going to get one
ResetApiObj();
} // else wait for dispose
- OSL_TRACE("UnloadObject completed ( we hope )");
+ SAL_INFO("basic", "UnloadObject completed ( we hope )");
}
}
@@ -2690,14 +2691,14 @@
try
{
Reference< beans::XPropertySet > xProps( m_xModel, UNO_QUERY_THROW );
- uno::Reference< script::vba::XVBACompatibility > xVBAMode(
xProps->getPropertyValue( OUString( "BasicLibraries" ) ), uno::UNO_QUERY_THROW );
+ uno::Reference< script::vba::XVBACompatibility > xVBAMode(
xProps->getPropertyValue( "BasicLibraries" ), uno::UNO_QUERY_THROW );
sProjectName = xVBAMode->getProjectName();
}
catch(const Exception& ) {}
sDialogUrl = sDialogUrl + sProjectName + "." + GetName() + "?location=document";
- uno::Reference< awt::XDialogProvider > xProvider(
xFactory->createInstanceWithArguments( OUString( "com.sun.star.awt.DialogProvider"), aArgs ),
uno::UNO_QUERY_THROW );
+ uno::Reference< awt::XDialogProvider > xProvider(
xFactory->createInstanceWithArguments( "com.sun.star.awt.DialogProvider", aArgs ),
uno::UNO_QUERY_THROW );
m_xDialog = xProvider->createDialog( sDialogUrl );
// create vba api object
@@ -2706,7 +2707,7 @@
aArgs[ 1 ] <<= m_xDialog;
aArgs[ 2 ] <<= m_xModel;
aArgs[ 3 ] <<= rtl::OUString( GetParent()->GetName() );
- pDocObject = new SbUnoObject( GetName(), uno::makeAny(
xVBAFactory->createInstanceWithArguments( rtl::OUString( "ooo.vba.msforms.UserForm"), aArgs ) ) );
+ pDocObject = new SbUnoObject( GetName(), uno::makeAny(
xVBAFactory->createInstanceWithArguments( "ooo.vba.msforms.UserForm", aArgs ) ) );
uno::Reference< lang::XComponent > xComponent( m_xDialog, uno::UNO_QUERY_THROW );
@@ -2721,7 +2722,7 @@
}
while( pParentBasic == NULL && pCurObject != NULL );
- OSL_ASSERT( pParentBasic != NULL );
+ SAL_WARN_IF( pParentBasic == NULL, "basic", "pParentBasic == NULL" );
registerComponentToBeDisposedForBasic( xComponent, pParentBasic );
// if old listener object exists, remove it from dialog and document model
@@ -2739,7 +2740,7 @@
}
SbxVariable*
-SbUserFormModule::Find( const rtl::OUString& rName, SbxClassType t )
+SbUserFormModule::Find( const OUString& rName, SbxClassType t )
{
if ( !pDocObject && !GetSbData()->bRunInit && GetSbData()->pInst )
InitObject();
diff --git a/basic/source/runtime/iosys.cxx b/basic/source/runtime/iosys.cxx
index bc4d78a..1fccd92 100644
--- a/basic/source/runtime/iosys.cxx
+++ b/basic/source/runtime/iosys.cxx
@@ -547,7 +547,7 @@
{
(void)nSize;
- OSL_FAIL( "not allowed to call from basic" );
+ SAL_WARN("basic", "UCBStream::SetSize not allowed to call from basic" );
SetError( ERRCODE_IO_GENERAL );
}
diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx
index 4412eb0..7f7529a 100644
--- a/basic/source/runtime/methods1.cxx
+++ b/basic/source/runtime/methods1.cxx
@@ -44,6 +44,7 @@
#include <iosys.hxx>
#include "sbunoobj.hxx"
#include "propacc.hxx"
+#include "sal/log.hxx"
#include <comphelper/processfactory.hxx>
@@ -722,7 +723,7 @@
}
else
{
- rtl::OUString aStr(comphelper::string::strip(rPar.Get(1)->GetOUString(), ' '));
+ OUString aStr(comphelper::string::strip(rPar.Get(1)->GetOUString(), ' '));
rPar.Get(0)->PutString(aStr);
}
}
@@ -1197,7 +1198,7 @@
static sal_Bool lcl_WriteReadSbxArray( SbxDimArray& rArr, SvStream* pStrm,
sal_Bool bBinary, short nCurDim, short* pOtherDims, sal_Bool bWrite )
{
- DBG_ASSERT( nCurDim > 0,"Bad Dim");
+ SAL_WARN_IF( nCurDim <= 0,"basic", "Bad Dim");
short nLower, nUpper;
if( !rArr.GetDim( nCurDim, nLower, nUpper ) )
return sal_False;
@@ -1327,7 +1328,7 @@
const char* pEnvStr = getenv(aByteStr.getStr());
if ( pEnvStr )
{
- aResult = rtl::OUString::createFromAscii( pEnvStr );
+ aResult = OUString::createFromAscii( pEnvStr );
}
rPar.Get(0)->PutString( aResult );
}
@@ -2673,7 +2674,7 @@
Reference< XMultiServiceFactory > xFactory( getProcessServiceFactory() );
if( xFactory.is() )
{
- xFunc.set(
xFactory->createInstance(OUString("com.sun.star.sheet.FunctionAccess")), UNO_QUERY_THROW);
+ xFunc.set( xFactory->createInstance("com.sun.star.sheet.FunctionAccess"),
UNO_QUERY_THROW);
}
}
Any aRet = xFunc->callFunction( sFuncName, aArgs );
@@ -2708,7 +2709,7 @@
aParams[ 2 ] <<= makeAny( rPar.Get(3)->GetDouble() );
aParams[ 3 ] <<= makeAny( rPar.Get(4)->GetDouble() );
- CallFunctionAccessFunction( aParams, OUString( "SYD" ), rPar.Get( 0 ) );
+ CallFunctionAccessFunction( aParams, "SYD", rPar.Get( 0 ) );
}
RTLFUNC(SLN)
@@ -2731,7 +2732,7 @@
aParams[ 1 ] <<= makeAny( rPar.Get(2)->GetDouble() );
aParams[ 2 ] <<= makeAny( rPar.Get(3)->GetDouble() );
- CallFunctionAccessFunction( aParams, OUString( "SLN" ), rPar.Get( 0 ) );
+ CallFunctionAccessFunction( aParams, "SLN", rPar.Get( 0 ) );
}
RTLFUNC(Pmt)
@@ -2776,7 +2777,7 @@
aParams[ 3 ] <<= fv;
aParams[ 4 ] <<= type;
- CallFunctionAccessFunction( aParams, OUString( "Pmt" ), rPar.Get( 0 ) );
+ CallFunctionAccessFunction( aParams, "Pmt", rPar.Get( 0 ) );
}
RTLFUNC(PPmt)
@@ -2823,7 +2824,7 @@
aParams[ 4 ] <<= fv;
aParams[ 5 ] <<= type;
- CallFunctionAccessFunction( aParams, OUString( "PPmt" ), rPar.Get( 0 ) );
+ CallFunctionAccessFunction( aParams, "PPmt", rPar.Get( 0 ) );
}
RTLFUNC(PV)
@@ -2868,7 +2869,7 @@
aParams[ 3 ] <<= fv;
aParams[ 4 ] <<= type;
- CallFunctionAccessFunction( aParams, OUString( "PV" ), rPar.Get( 0 ) );
+ CallFunctionAccessFunction( aParams, "PV", rPar.Get( 0 ) );
}
RTLFUNC(NPV)
@@ -2896,7 +2897,7 @@
aParams[ 1 ] <<= aValues;
- CallFunctionAccessFunction( aParams, OUString( "NPV" ), rPar.Get( 0 ) );
+ CallFunctionAccessFunction( aParams, "NPV", rPar.Get( 0 ) );
}
RTLFUNC(NPer)
@@ -2941,7 +2942,7 @@
aParams[ 3 ] <<= fv;
aParams[ 4 ] <<= type;
- CallFunctionAccessFunction( aParams, OUString( "NPer" ), rPar.Get( 0 ) );
+ CallFunctionAccessFunction( aParams, "NPer", rPar.Get( 0 ) );
}
RTLFUNC(MIRR)
@@ -2972,7 +2973,7 @@
aParams[ 1 ] <<= makeAny( rPar.Get(2)->GetDouble() );
aParams[ 2 ] <<= makeAny( rPar.Get(3)->GetDouble() );
- CallFunctionAccessFunction( aParams, OUString( "MIRR" ), rPar.Get( 0 ) );
+ CallFunctionAccessFunction( aParams, "MIRR", rPar.Get( 0 ) );
}
RTLFUNC(IRR)
@@ -3009,7 +3010,7 @@
aParams[ 0 ] <<= aValues;
aParams[ 1 ] <<= guess;
- CallFunctionAccessFunction( aParams, OUString( "IRR" ), rPar.Get( 0 ) );
+ CallFunctionAccessFunction( aParams, "IRR", rPar.Get( 0 ) );
}
RTLFUNC(IPmt)
@@ -3056,7 +3057,7 @@
aParams[ 4 ] <<= fv;
aParams[ 5 ] <<= type;
- CallFunctionAccessFunction( aParams, OUString( "IPmt" ), rPar.Get( 0 ) );
+ CallFunctionAccessFunction( aParams, "IPmt", rPar.Get( 0 ) );
}
RTLFUNC(FV)
@@ -3101,7 +3102,7 @@
aParams[ 3 ] <<= pv;
aParams[ 4 ] <<= type;
- CallFunctionAccessFunction( aParams, OUString( "FV" ), rPar.Get( 0 ) );
+ CallFunctionAccessFunction( aParams, "FV", rPar.Get( 0 ) );
}
RTLFUNC(DDB)
@@ -3140,7 +3141,7 @@
aParams[ 3 ] <<= period;
aParams[ 4 ] <<= factor;
- CallFunctionAccessFunction( aParams, OUString( "DDB" ), rPar.Get( 0 ) );
+ CallFunctionAccessFunction( aParams, "DDB", rPar.Get( 0 ) );
}
RTLFUNC(Rate)
@@ -3199,7 +3200,7 @@
aParams[ 4 ] <<= type;
aParams[ 5 ] <<= guess;
- CallFunctionAccessFunction( aParams, OUString( "Rate" ), rPar.Get( 0 ) );
+ CallFunctionAccessFunction( aParams, "Rate", rPar.Get( 0 ) );
}
RTLFUNC(StrReverse)
@@ -3220,7 +3221,7 @@
return;
}
- rtl::OUString aStr = comphelper::string::reverseString(pSbxVariable->GetOUString());
+ OUString aStr = comphelper::string::reverseString(pSbxVariable->GetOUString());
rPar.Get(0)->PutString( aStr );
}
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index f8309a0..eba6064 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -34,6 +34,7 @@
#include <com/sun/star/container/XEnumerationAccess.hpp>
#include "sbunoobj.hxx"
#include "errobject.hxx"
+#include "sal/log.hxx"
#include "comenumwrapper.hxx"
@@ -303,7 +304,7 @@
}
catch( const Exception& )
{
- OSL_FAIL( "SbiInstance::~SbiInstance: caught an exception while disposing the components!"
);
+ SAL_WARN("basic", "SbiInstance::~SbiInstance: caught an exception while disposing the
components!" );
}
ComponentVector.clear();
@@ -916,7 +917,7 @@
// TEST, has to be vb here always
#ifdef DBG_UTIL
SbError nTmp = StarBASIC::GetSfxFromVBError( (sal_uInt16)nError );
- DBG_ASSERT( nTmp, "No VB error!" );
+ SAL_WARN_IF( nTmp == 0, "basic", "No VB error!" );
#endif
StarBASIC::MakeErrorText( nError, rMsg );
@@ -964,7 +965,7 @@
SbxVariableRef xVar = refExprStk->Get( --nExprLvl );
#ifdef DBG_UTIL
if ( xVar->GetName().equalsAscii( "Cells" ) )
- OSL_TRACE( "" );
+ SAL_INFO("basic", "" );
#endif
// methods hold themselves in parameter 0
if( xVar->IsA( TYPE(SbxMethod) ) )
--
To view, visit https://gerrit.libreoffice.org/1602
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I002d17ffbbd8371b0518ede34931b2eea30865a3
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Ioan Radu <ioan.radu.g@gmail.com>
Context
- [PATCH] fdo#43157 - Clean up OSL_ASSERT, DBG_ASSERT · Ioan Radu (via Code Review)
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.