diff options
-rw-r--r-- | idl/source/objects/bastype.cxx | 16 | ||||
-rw-r--r-- | idl/source/objects/object.cxx | 8 | ||||
-rw-r--r-- | idl/source/objects/types.cxx | 46 | ||||
-rw-r--r-- | svtools/bmpmaker/bmpsum.cxx | 7 | ||||
-rw-r--r-- | tools/inc/tools/inetmsg.hxx | 10 | ||||
-rw-r--r-- | tools/source/inet/inetstrm.cxx | 6 |
6 files changed, 46 insertions, 47 deletions
diff --git a/idl/source/objects/bastype.cxx b/idl/source/objects/bastype.cxx index 19e3a1170fd6..e084a4434a9d 100644 --- a/idl/source/objects/bastype.cxx +++ b/idl/source/objects/bastype.cxx @@ -253,10 +253,10 @@ sal_Bool SvNumberIdentifier::ReadSvIdl( SvIdlDataBase & rBase, } else { - ByteString aStr ("no value for identifier <"); - aStr += getString(); - aStr += "> "; - rBase.SetError( aStr, rInStm.GetToken() ); + rtl::OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM( + "no value for identifier <")); + aStr.append(getString()).append(RTL_CONSTASCII_STRINGPARAM("> ")); + rBase.SetError( aStr.makeStringAndClear(), rInStm.GetToken() ); rBase.WriteError( rInStm ); } } @@ -280,10 +280,10 @@ sal_Bool SvNumberIdentifier::ReadSvIdl( SvIdlDataBase & rBase, } else { - ByteString aStr ("no value for identifier <"); - aStr += getString(); - aStr += "> "; - rBase.SetError( aStr, rInStm.GetToken() ); + rtl::OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM( + "no value for identifier <")); + aStr.append(getString()).append(RTL_CONSTASCII_STRINGPARAM("> ")); + rBase.SetError( aStr.makeStringAndClear(), rInStm.GetToken() ); rBase.WriteError( rInStm ); } } diff --git a/idl/source/objects/object.cxx b/idl/source/objects/object.cxx index 92da00e6aaca..2e3dba877dec 100644 --- a/idl/source/objects/object.cxx +++ b/idl/source/objects/object.cxx @@ -675,10 +675,10 @@ void SvMetaClass::WriteSrc( SvIdlDataBase & rBase, SvStream & rOutStm, void SvMetaClass::WriteHxx( SvIdlDataBase &, SvStream & rOutStm, sal_uInt16 ) { - ByteString aSuperName( "SvDispatch" ); + rtl::OString aSuperName(RTL_CONSTASCII_STRINGPARAM("SvDispatch")); if( GetSuperClass() ) aSuperName = GetSuperClass()->GetName().getString(); - const char * pSup = aSuperName.GetBuffer(); + const char * pSup = aSuperName.getStr(); rOutStm << "class " << GetSvName().GetBuffer() @@ -700,10 +700,10 @@ void SvMetaClass::WriteHxx( SvIdlDataBase &, SvStream & rOutStm, sal_uInt16 ) void SvMetaClass::WriteCxx( SvIdlDataBase &, SvStream & rOutStm, sal_uInt16 ) { - ByteString aSuperName( "SvDispatch" ); + rtl::OString aSuperName(RTL_CONSTASCII_STRINGPARAM("SvDispatch")); if( GetSuperClass() ) aSuperName = GetSuperClass()->GetName().getString(); - const char * pSup = aSuperName.GetBuffer(); + const char * pSup = aSuperName.getStr(); ByteString name = GetSvName(); // GetTypeName diff --git a/idl/source/objects/types.cxx b/idl/source/objects/types.cxx index a37ba18c593e..06cdcd93ad39 100644 --- a/idl/source/objects/types.cxx +++ b/idl/source/objects/types.cxx @@ -875,13 +875,13 @@ void SvMetaType::SetType( int nT ) nType = nT; if( nType == TYPE_ENUM ) { - aOdlName.setString("short"); + aOdlName.setString(rtl::OString(RTL_CONSTASCII_STRINGPARAM("short"))); } else if( nType == TYPE_CLASS ) { - ByteString aTmp(C_PREF); - aTmp += "Object *"; - aCName.setString(aTmp); + rtl::OStringBuffer aTmp(C_PREF); + aTmp.append(RTL_CONSTASCII_STRINGPARAM("Object *")); + aCName.setString(aTmp.makeStringAndClear()); } } @@ -1103,7 +1103,7 @@ sal_Bool SvMetaType::ReadHeaderSvIdl( SvIdlDataBase & rBase, } else { - ByteString aStr = "wrong typedef: "; + rtl::OString aStr(RTL_CONSTASCII_STRINGPARAM("wrong typedef: ")); rBase.SetError( aStr, rInStm.GetToken() ); rBase.WriteError( rInStm ); } @@ -1173,7 +1173,7 @@ void SvMetaType::Write( SvIdlDataBase & rBase, SvStream & rOutStm, // write only enum return; - ByteString name = GetName().getString(); + rtl::OString name = GetName().getString(); if( nT == WRITE_ODL || nT == WRITE_C_HEADER || nT == WRITE_CXX_HEADER ) { switch( nType ) @@ -1194,10 +1194,9 @@ void SvMetaType::Write( SvIdlDataBase & rBase, SvStream & rOutStm, { if ( nT == WRITE_C_HEADER ) { - ByteString aStr = name; - aStr.ToUpperAscii(); - rOutStm << "#ifndef " << C_PREF << aStr.GetBuffer() << "_DEF " << endl; - rOutStm << "#define " << C_PREF << aStr.GetBuffer() << "_DEF " << endl; + rtl::OString aStr = name.toAsciiUpperCase(); + rOutStm << "#ifndef " << C_PREF << aStr.getStr() << "_DEF " << endl; + rOutStm << "#define " << C_PREF << aStr.getStr() << "_DEF " << endl; } WriteTab( rOutStm, nTab ); @@ -1213,7 +1212,7 @@ void SvMetaType::Write( SvIdlDataBase & rBase, SvStream & rOutStm, else rOutStm << "enum"; if( nT != WRITE_ODL && nT != WRITE_C_HEADER) - rOutStm << ' ' << name.GetBuffer(); + rOutStm << ' ' << name.getStr(); rOutStm << endl; WriteTab( rOutStm, nTab ); @@ -1223,7 +1222,7 @@ void SvMetaType::Write( SvIdlDataBase & rBase, SvStream & rOutStm, rOutStm << '}'; if( nT == WRITE_ODL || nT == WRITE_C_HEADER ) { - rOutStm << ' ' << C_PREF << name.GetBuffer(); + rOutStm << ' ' << C_PREF << name.getStr(); } rOutStm << ';' << endl; @@ -1416,27 +1415,26 @@ void SvMetaType::WriteSfxItem( const ByteString & rItemName, SvIdlDataBase &, SvStream & rOutStm ) { WriteStars( rOutStm ); - ByteString aVarName = " a"; - aVarName += rItemName; - aVarName += "_Impl"; + rtl::OStringBuffer aVarName(RTL_CONSTASCII_STRINGPARAM(" a")); + aVarName.append(rItemName).append(RTL_CONSTASCII_STRINGPARAM("_Impl")); - ByteString aTypeName = "SfxType"; + rtl::OStringBuffer aTypeName(RTL_CONSTASCII_STRINGPARAM("SfxType")); rtl::OStringBuffer aAttrArray; sal_uLong nAttrCount = MakeSfx( aAttrArray ); - ByteString aAttrCount( + rtl::OString aAttrCount( rtl::OString::valueOf(static_cast<sal_Int32>(nAttrCount))); - aTypeName += aAttrCount; + aTypeName.append(aAttrCount); - rOutStm << "extern " << aTypeName.GetBuffer() - << aVarName.GetBuffer() << ';' << endl; + rOutStm << "extern " << aTypeName.getStr() + << aVarName.getStr() << ';' << endl; // write the implementation part rOutStm << "#ifdef SFX_TYPEMAP" << endl - << aTypeName.GetBuffer() << aVarName.GetBuffer() + << aTypeName.getStr() << aVarName.getStr() << " = " << endl; rOutStm << '{' << endl << "\tTYPE(" << rItemName.GetBuffer() << "), " - << aAttrCount.GetBuffer(); + << aAttrCount.getStr(); if( nAttrCount ) { rOutStm << ", { "; @@ -1737,7 +1735,7 @@ void SvMetaType::WriteParamNames( SvIdlDataBase & rBase, for( sal_uLong n = 0; n < nAttrCount; n++ ) { SvMetaAttribute * pA = pAttrList->GetObject( n ); - ByteString aStr = pA->GetName().getString(); + rtl::OString aStr = pA->GetName().getString(); pA->GetType()->WriteParamNames( rBase, rOutStm, aStr ); if( n +1 < nAttrCount ) rOutStm << ", "; @@ -1822,7 +1820,7 @@ void SvMetaEnumValue::Write( SvIdlDataBase &, SvStream & rOutStm, sal_uInt16, SV_IMPL_META_FACTORY1( SvMetaTypeEnum, SvMetaType ); SvMetaTypeEnum::SvMetaTypeEnum() { - SetBasicName( "Integer" ); + SetBasicName(rtl::OString(RTL_CONSTASCII_STRINGPARAM("Integer"))); } void SvMetaTypeEnum::Load( SvPersistStream & rStm ) diff --git a/svtools/bmpmaker/bmpsum.cxx b/svtools/bmpmaker/bmpsum.cxx index 6426e52654a7..72ddfde089d1 100644 --- a/svtools/bmpmaker/bmpsum.cxx +++ b/svtools/bmpmaker/bmpsum.cxx @@ -328,9 +328,10 @@ void BmpSum::ProcessFileList( const String& rInFileList, for( sal_uInt32 n = 0; n < 14; ++n ) { - ByteString aLangPath( aReadLine ); - - aLangPath.SearchAndReplace( "enus", aLanguages[ n ] ); + rtl::OString aLangPath = comphelper::string::replace( + aReadLine, + rtl::OString(RTL_CONSTASCII_STRINGPARAM("enus")), + rtl::OString(aLanguages[n])); DirEntry aTestFile( aLangPath ); diff --git a/tools/inc/tools/inetmsg.hxx b/tools/inc/tools/inetmsg.hxx index 0c3468082b36..c5988f758e0e 100644 --- a/tools/inc/tools/inetmsg.hxx +++ b/tools/inc/tools/inetmsg.hxx @@ -47,15 +47,15 @@ class DateTime; *=====================================================================*/ class INetMessageHeader { - ByteString m_aName; - ByteString m_aValue; + rtl::OString m_aName; + rtl::OString m_aValue; public: INetMessageHeader() {} INetMessageHeader ( - const ByteString& rName, const ByteString& rValue) + const rtl::OString& rName, const rtl::OString& rValue) : m_aName (rName), m_aValue (rValue) {} @@ -74,8 +74,8 @@ public: return *this; } - const ByteString& GetName() const { return m_aName; } - const ByteString& GetValue() const { return m_aValue; } + const rtl::OString& GetName() const { return m_aName; } + const rtl::OString& GetValue() const { return m_aValue; } friend SvStream& operator<< ( SvStream& rStrm, const INetMessageHeader& rHdr) diff --git a/tools/source/inet/inetstrm.cxx b/tools/source/inet/inetstrm.cxx index 5345067aa0f8..557a32cc8865 100644 --- a/tools/source/inet/inetstrm.cxx +++ b/tools/source/inet/inetstrm.cxx @@ -304,12 +304,12 @@ int INetMessageIStream::GetMsgLine (sal_Char *pData, sal_uIntPtr nSize) for (i = 0; i < n; i++) { INetMessageHeader aHeader (pSourceMsg->GetHeaderField(i)); - if (aHeader.GetValue().Len()) + if (aHeader.GetValue().getLength()) { // NYI: Folding long lines. - *pMsgBuffer << (sal_Char*)(aHeader.GetName().GetBuffer()); + *pMsgBuffer << aHeader.GetName().getStr(); *pMsgBuffer << ": "; - *pMsgBuffer << (sal_Char*)(aHeader.GetValue().GetBuffer()); + *pMsgBuffer << aHeader.GetValue().getStr(); *pMsgBuffer << "\r\n"; } } |