summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-03-25 11:06:06 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-03-25 16:17:07 +0100
commitdb3d23ff9eaf57279a515730429cce8684e03c65 (patch)
tree7a614001b6c16bacaabd54c8876b08cb00689284 /basic
parent3afc276001625a613af750de755f3baa4fae3d42 (diff)
Adapt to sal/log.hxx
Change-Id: Ibb4549bcca6dd93ae31ef84fbb34f5054d50fe7b
Diffstat (limited to 'basic')
-rw-r--r--basic/source/sbx/sbxobj.cxx65
1 files changed, 34 insertions, 31 deletions
diff --git a/basic/source/sbx/sbxobj.cxx b/basic/source/sbx/sbxobj.cxx
index acd894cc8a10..0d80064153fd 100644
--- a/basic/source/sbx/sbxobj.cxx
+++ b/basic/source/sbx/sbxobj.cxx
@@ -17,6 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <iomanip>
+
#include <tools/stream.hxx>
#include <basic/sbx.hxx>
#include "sbxres.hxx"
@@ -212,14 +216,15 @@ SbxVariable* SbxObject::FindUserData( sal_uInt32 nData )
SbxVariable* SbxObject::Find( const OUString& rName, SbxClassType t )
{
#ifdef DBG_UTIL
- static sal_uInt16 nLvl = 0;
+ static int nLvl = 1;
static const char* pCls[] = { "DontCare","Array","Value","Variable","Method","Property","Object" };
- OString aNameStr1(OUStringToOString(rName, RTL_TEXTENCODING_ASCII_US));
- OString aNameStr2(OUStringToOString(SbxVariable::GetName(), RTL_TEXTENCODING_ASCII_US));
- DbgOutf( "SBX: Search %.*s %s %s in %s",
- nLvl++, " ",
- ( t >= SbxCLASS_DONTCARE && t <= SbxCLASS_OBJECT )
- ? pCls[ t-1 ] : "Unknown class", aNameStr1.getStr(), aNameStr2.getStr() );
+ SAL_INFO(
+ "basic.sbx",
+ "search" << std::setw(nLvl) << " "
+ << (t >= SbxCLASS_DONTCARE && t <= SbxCLASS_OBJECT
+ ? pCls[t - 1] : "Unknown class")
+ << " " << rName << " in " << SbxVariable::GetName());
+ ++nLvl;
#endif
if( !GetAll( t ) )
@@ -279,14 +284,11 @@ SbxVariable* SbxObject::Find( const OUString& rName, SbxClassType t )
}
}
#ifdef DBG_UTIL
- nLvl--;
- if( pRes )
- {
- OString aNameStr3(OUStringToOString(rName, RTL_TEXTENCODING_ASCII_US));
- OString aNameStr4(OUStringToOString(SbxVariable::GetName(), RTL_TEXTENCODING_ASCII_US));
- DbgOutf( "SBX: Found %.*s %s in %s",
- nLvl, " ", aNameStr3.getStr(), aNameStr4.getStr() );
- }
+ --nLvl;
+ SAL_INFO_IF(
+ pRes, "basic.sbx",
+ "found" << std::setw(nLvl) << " " << rName << " in "
+ << SbxVariable::GetName());
#endif
return pRes;
}
@@ -498,12 +500,13 @@ void SbxObject::Insert( SbxVariable* pVar )
{
aVarName = PTR_CAST(SbxObject,pVar)->GetClassName();
}
- OString aNameStr1(OUStringToOString(aVarName, RTL_TEXTENCODING_ASCII_US));
- OString aNameStr2(OUStringToOString(SbxVariable::GetName(), RTL_TEXTENCODING_ASCII_US));
- DbgOutf( "SBX: Insert %s %s in %s",
- ( pVar->GetClass() >= SbxCLASS_DONTCARE &&
- pVar->GetClass() <= SbxCLASS_OBJECT )
- ? pCls[ pVar->GetClass()-1 ] : "Unknown class", aNameStr1.getStr(), aNameStr2.getStr() );
+ SAL_INFO(
+ "basic.sbx",
+ "insert "
+ << ((pVar->GetClass() >= SbxCLASS_DONTCARE
+ && pVar->GetClass() <= SbxCLASS_OBJECT)
+ ? pCls[pVar->GetClass() - 1] : "Unknown class")
+ << " " << aVarName << " in " << SbxVariable::GetName());
#endif
}
}
@@ -541,12 +544,13 @@ void SbxObject::QuickInsert( SbxVariable* pVar )
{
aVarName = PTR_CAST(SbxObject,pVar)->GetClassName();
}
- OString aNameStr1(OUStringToOString(aVarName, RTL_TEXTENCODING_ASCII_US));
- OString aNameStr2(OUStringToOString(SbxVariable::GetName(), RTL_TEXTENCODING_ASCII_US));
- DbgOutf( "SBX: Insert %s %s in %s",
- ( pVar->GetClass() >= SbxCLASS_DONTCARE &&
- pVar->GetClass() <= SbxCLASS_OBJECT )
- ? pCls[ pVar->GetClass()-1 ] : "Unknown class", aNameStr1.getStr(), aNameStr2.getStr() );
+ SAL_INFO(
+ "basic.sbx",
+ "insert "
+ << ((pVar->GetClass() >= SbxCLASS_DONTCARE
+ && pVar->GetClass() <= SbxCLASS_OBJECT)
+ ? pCls[pVar->GetClass() - 1] : "Unknown class")
+ << " " << aVarName << " in " << SbxVariable::GetName());
#endif
}
}
@@ -568,10 +572,9 @@ void SbxObject::Remove( SbxVariable* pVar )
{
aVarName = PTR_CAST(SbxObject,pVar)->GetClassName();
}
- OString aNameStr1(OUStringToOString(aVarName, RTL_TEXTENCODING_ASCII_US));
- OString aNameStr2(OUStringToOString(SbxVariable::GetName(), RTL_TEXTENCODING_ASCII_US));
- DbgOutf( "SBX: Remove %s in %s",
- aNameStr1.getStr(), aNameStr2.getStr() );
+ SAL_INFO(
+ "basic.sbx",
+ "remove " << aVarName << " in " << SbxVariable::GetName());
#endif
SbxVariableRef pVar_ = pArray->Get( nIdx );
if( pVar_->IsBroadcaster() )