diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2023-04-10 22:43:04 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2023-04-10 23:13:32 +0200 |
commit | 5fe96b6dcec8f0ccb7c606fa8e981112e6160e7e (patch) | |
tree | 7c19b02613c6c573c5bf577fb3cae94df6df5078 /basic/source/sbx | |
parent | 5dba03b200564e2f891fc7e75e948f93ea769c10 (diff) |
Drop SvStream::WriteCharPtr
WriteOString is a better replacement
Change-Id: Ic431b9aeb98d19fe61cff71360eee555105cc2bf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150192
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'basic/source/sbx')
-rw-r--r-- | basic/source/sbx/sbxobj.cxx | 40 | ||||
-rw-r--r-- | basic/source/sbx/sbxvar.cxx | 12 |
2 files changed, 26 insertions, 26 deletions
diff --git a/basic/source/sbx/sbxobj.cxx b/basic/source/sbx/sbxobj.cxx index 002abfe38301..d405ff344417 100644 --- a/basic/source/sbx/sbxobj.cxx +++ b/basic/source/sbx/sbxobj.cxx @@ -689,7 +689,7 @@ void SbxObject::Dump( SvStream& rStrm, bool bFill ) static sal_uInt16 nLevel = 0; if ( nLevel > 10 ) { - rStrm.WriteCharPtr( "<too deep>" ) << endl; + rStrm.WriteOString( "<too deep>" ) << endl; return; } ++nLevel; @@ -701,38 +701,38 @@ void SbxObject::Dump( SvStream& rStrm, bool bFill ) // Output the data of the object itself OString aNameStr(OUStringToOString(GetName(), RTL_TEXTENCODING_ASCII_US)); OString aClassNameStr(OUStringToOString(aClassName, RTL_TEXTENCODING_ASCII_US)); - rStrm.WriteCharPtr( "Object( " ) - .WriteOString( OString::number(reinterpret_cast<sal_IntPtr>(this)) ).WriteCharPtr( "=='" ) - .WriteCharPtr( aNameStr.isEmpty() ? "<unnamed>" : aNameStr.getStr() ).WriteCharPtr( "', " ) - .WriteCharPtr( "of class '" ).WriteOString( aClassNameStr ).WriteCharPtr( "', " ) - .WriteCharPtr( "counts " ) + rStrm.WriteOString( "Object( " ) + .WriteOString( OString::number(reinterpret_cast<sal_IntPtr>(this)) ).WriteOString( "=='" ) + .WriteOString( aNameStr.isEmpty() ? "<unnamed>" : aNameStr ).WriteOString( "', " ) + .WriteOString( "of class '" ).WriteOString( aClassNameStr ).WriteOString( "', " ) + .WriteOString( "counts " ) .WriteOString( OString::number(GetRefCount()) ) - .WriteCharPtr( " refs, " ); + .WriteOString( " refs, " ); if ( GetParent() ) { OString aParentNameStr(OUStringToOString(GetName(), RTL_TEXTENCODING_ASCII_US)); - rStrm.WriteCharPtr( "in parent " ) + rStrm.WriteOString( "in parent " ) .WriteOString( OString::number(reinterpret_cast<sal_IntPtr>(GetParent())) ) - .WriteCharPtr( "=='" ).WriteCharPtr( aParentNameStr.isEmpty() ? "<unnamed>" : aParentNameStr.getStr() ).WriteCharPtr( "'" ); + .WriteOString( "=='" ).WriteOString( aParentNameStr.isEmpty() ? "<unnamed>" : aParentNameStr ).WriteOString( "'" ); } else { - rStrm.WriteCharPtr( "no parent " ); + rStrm.WriteOString( "no parent " ); } - rStrm.WriteCharPtr( " )" ) << endl; + rStrm.WriteOString( " )" ) << endl; OString aIndentNameStr(OUStringToOString(aIndent, RTL_TEXTENCODING_ASCII_US)); - rStrm.WriteOString( aIndentNameStr ).WriteCharPtr( "{" ) << endl; + rStrm.WriteOString( aIndentNameStr ).WriteOString( "{" ) << endl; // Flags OUString aAttrs; if( CollectAttrs( this, aAttrs ) ) { OString aAttrStr(OUStringToOString(aAttrs, RTL_TEXTENCODING_ASCII_US)); - rStrm.WriteOString( aIndentNameStr ).WriteCharPtr( "- Flags: " ).WriteOString( aAttrStr ) << endl; + rStrm.WriteOString( aIndentNameStr ).WriteOString( "- Flags: " ).WriteOString( aAttrStr ) << endl; } // Methods - rStrm.WriteOString( aIndentNameStr ).WriteCharPtr( "- Methods:" ) << endl; + rStrm.WriteOString( aIndentNameStr ).WriteOString( "- Methods:" ) << endl; for (sal_uInt32 i = 0; i < pMethods->Count(); i++) { SbxVariableRef& r = pMethods->GetRef(i); @@ -757,7 +757,7 @@ void SbxObject::Dump( SvStream& rStrm, bool bFill ) pVar->GetValues_Impl().pObj != this && pVar->GetValues_Impl().pObj != GetParent() ) { - rStrm.WriteCharPtr( " contains " ); + rStrm.WriteOString( " contains " ); static_cast<SbxObject*>(pVar->GetValues_Impl().pObj)->Dump( rStrm, bFill ); } else @@ -768,7 +768,7 @@ void SbxObject::Dump( SvStream& rStrm, bool bFill ) } // Properties - rStrm.WriteOString( aIndentNameStr ).WriteCharPtr( "- Properties:" ) << endl; + rStrm.WriteOString( aIndentNameStr ).WriteOString( "- Properties:" ) << endl; { for (sal_uInt32 i = 0; i < pProps->Count(); i++) { @@ -794,7 +794,7 @@ void SbxObject::Dump( SvStream& rStrm, bool bFill ) pVar->GetValues_Impl().pObj != this && pVar->GetValues_Impl().pObj != GetParent() ) { - rStrm.WriteCharPtr( " contains " ); + rStrm.WriteOString( " contains " ); static_cast<SbxObject*>(pVar->GetValues_Impl().pObj)->Dump( rStrm, bFill ); } else @@ -806,7 +806,7 @@ void SbxObject::Dump( SvStream& rStrm, bool bFill ) } // Objects - rStrm.WriteOString( aIndentNameStr ).WriteCharPtr( "- Objects:" ) << endl; + rStrm.WriteOString( aIndentNameStr ).WriteOString( "- Objects:" ) << endl; { for (sal_uInt32 i = 0; i < pObjs->Count(); i++) { @@ -814,7 +814,7 @@ void SbxObject::Dump( SvStream& rStrm, bool bFill ) SbxVariable* pVar = r.get(); if ( pVar ) { - rStrm.WriteOString( aIndentNameStr ).WriteCharPtr( " - Sub" ); + rStrm.WriteOString( aIndentNameStr ).WriteOString( " - Sub" ); if (SbxObject *pSbxObj = dynamic_cast<SbxObject*>(pVar)) { pSbxObj->Dump(rStrm, bFill); @@ -827,7 +827,7 @@ void SbxObject::Dump( SvStream& rStrm, bool bFill ) } } - rStrm.WriteOString( aIndentNameStr ).WriteCharPtr( "}" ) << endl << endl; + rStrm.WriteOString( aIndentNameStr ).WriteOString( "}" ) << endl << endl; --nLevel; } diff --git a/basic/source/sbx/sbxvar.cxx b/basic/source/sbx/sbxvar.cxx index effcfc495366..cc57a804bc61 100644 --- a/basic/source/sbx/sbxvar.cxx +++ b/basic/source/sbx/sbxvar.cxx @@ -572,19 +572,19 @@ SbxInfo::SbxInfo( OUString a, sal_uInt32 n ) void SbxVariable::Dump( SvStream& rStrm, bool bFill ) { OString aBNameStr(OUStringToOString(GetName( SbxNameType::ShortTypes ), RTL_TEXTENCODING_ASCII_US)); - rStrm.WriteCharPtr( "Variable( " ) - .WriteOString( OString::number(reinterpret_cast<sal_IntPtr>(this)) ).WriteCharPtr( "==" ) + rStrm.WriteOString( "Variable( " ) + .WriteOString( OString::number(reinterpret_cast<sal_IntPtr>(this)) ).WriteOString( "==" ) .WriteOString( aBNameStr ); OString aBParentNameStr(OUStringToOString(GetParent()->GetName(), RTL_TEXTENCODING_ASCII_US)); if ( GetParent() ) { - rStrm.WriteCharPtr( " in parent '" ).WriteOString( aBParentNameStr ).WriteCharPtr( "'" ); + rStrm.WriteOString( " in parent '" ).WriteOString( aBParentNameStr ).WriteOString( "'" ); } else { - rStrm.WriteCharPtr( " no parent" ); + rStrm.WriteOString( " no parent" ); } - rStrm.WriteCharPtr( " ) " ); + rStrm.WriteOString( " ) " ); // output also the object at object-vars if ( GetValues_Impl().eType == SbxOBJECT && @@ -592,7 +592,7 @@ void SbxVariable::Dump( SvStream& rStrm, bool bFill ) GetValues_Impl().pObj != this && GetValues_Impl().pObj != GetParent() ) { - rStrm.WriteCharPtr( " contains " ); + rStrm.WriteOString( " contains " ); static_cast<SbxObject*>(GetValues_Impl().pObj)->Dump( rStrm, bFill ); } else |