summaryrefslogtreecommitdiff
path: root/idl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-06-29 08:59:06 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-06-29 09:04:33 +0100
commit97e3d208bad8f08591fb30c510ed351a695fb334 (patch)
treead8a78732a068939a5313c82885c6f5348be819e /idl
parente8696e99dbc05a83625083e805f4d330451aa04a (diff)
remove deprecated ByteString::CreateFromInt64
Diffstat (limited to 'idl')
-rw-r--r--idl/inc/database.hxx2
-rw-r--r--idl/source/objects/basobj.cxx4
-rw-r--r--idl/source/prj/database.cxx29
3 files changed, 18 insertions, 17 deletions
diff --git a/idl/inc/database.hxx b/idl/inc/database.hxx
index adeda2d6e517..c8ad5cf2bff7 100644
--- a/idl/inc/database.hxx
+++ b/idl/inc/database.hxx
@@ -126,7 +126,7 @@ public:
void Write( const ByteString & rText );
void WriteError( const ByteString & rErrWrn,
const ByteString & rFileName,
- const ByteString & rErrorText,
+ const rtl::OString& rErrorText,
sal_uLong nRow = 0, sal_uLong nColumn = 0 ) const;
void WriteError( SvTokenStream & rInStm );
void SetError( const ByteString & rError, SvToken * pTok );
diff --git a/idl/source/objects/basobj.cxx b/idl/source/objects/basobj.cxx
index 7a284999e6eb..177ace6d4749 100644
--- a/idl/source/objects/basobj.cxx
+++ b/idl/source/objects/basobj.cxx
@@ -401,8 +401,8 @@ void SvMetaName::WriteAttributes( SvIdlDataBase &, SvStream & rOutStm,
{
WriteTab( rOutStm, nTab );
rOutStm << "helpcontext("
- << ByteString::CreateFromInt64(
- GetHelpContext().GetValue() ).GetBuffer()
+ << rtl::OString::valueOf(static_cast<sal_Int64>(
+ GetHelpContext().GetValue())).getStr()
<< ")," << endl;
}
}
diff --git a/idl/source/prj/database.cxx b/idl/source/prj/database.cxx
index 40831709fe65..fa37d2d003a3 100644
--- a/idl/source/prj/database.cxx
+++ b/idl/source/prj/database.cxx
@@ -36,6 +36,7 @@
#include <tools/debug.hxx>
#include <database.hxx>
#include <globals.hxx>
+#include <rtl/strbuf.hxx>
SvIdlDataBase::SvIdlDataBase( const SvCommand& rCmd )
: bExport( sal_False )
@@ -541,16 +542,16 @@ void SvIdlDataBase::Write( const ByteString & rText )
void SvIdlDataBase::WriteError( const ByteString & rErrWrn,
const ByteString & rFileName,
- const ByteString & rErrorText,
+ const rtl::OString& rErrorText,
sal_uLong nRow, sal_uLong nColumn ) const
{
// error treatment
fprintf( stderr, "\n%s --- %s: ( %ld, %ld )\n",
rFileName.GetBuffer(), rErrWrn.GetBuffer(), nRow, nColumn );
- if( rErrorText.Len() )
+ if( !rErrorText.isEmpty() )
{ // error set
- fprintf( stderr, "\t%s\n", rErrorText.GetBuffer() );
+ fprintf( stderr, "\t%s\n", rErrorText.getStr() );
}
}
@@ -558,7 +559,7 @@ void SvIdlDataBase::WriteError( SvTokenStream & rInStm )
{
// error treatment
String aFileName( rInStm.GetFileName() );
- ByteString aErrorText;
+ rtl::OStringBuffer aErrorText;
sal_uLong nRow = 0, nColumn = 0;
rInStm.SeekEnd();
@@ -574,8 +575,8 @@ void SvIdlDataBase::WriteError( SvTokenStream & rInStm )
// error text
if( aError.GetText().Len() )
{
- aErrorText = "may be <";
- aErrorText += aError.GetText();
+ aErrorText.append(RTL_CONSTASCII_STRINGPARAM("may be <"));
+ aErrorText.append(aError.GetText());
}
SvToken * pPrevTok = NULL;
while( pTok != pPrevTok )
@@ -588,17 +589,17 @@ void SvIdlDataBase::WriteError( SvTokenStream & rInStm )
}
// error position
- aErrorText += "> at ( ";
- aErrorText += ByteString::CreateFromInt64(aError.nLine);
- aErrorText += ", ";
- aErrorText += ByteString::CreateFromInt64(aError.nColumn);
- aErrorText += " )";
+ aErrorText.append(RTL_CONSTASCII_STRINGPARAM("> at ( "));
+ aErrorText.append(static_cast<sal_Int64>(aError.nLine));
+ aErrorText.append(RTL_CONSTASCII_STRINGPARAM(", "));
+ aErrorText.append(static_cast<sal_Int64>(aError.nColumn));
+ aErrorText.append(RTL_CONSTASCII_STRINGPARAM(" )"));
// reset error
aError = SvIdlError();
}
- WriteError( "error", ByteString( aFileName, RTL_TEXTENCODING_UTF8 ), aErrorText, nRow, nColumn );
+ WriteError( "error", ByteString( aFileName, RTL_TEXTENCODING_UTF8 ), aErrorText.makeStringAndClear(), nRow, nColumn );
DBG_ASSERT( pTok, "token must be found" );
if( !pTok )
@@ -714,8 +715,8 @@ sal_Bool SvIdlWorkingBase::WriteSvIdl( SvStream & rOutStm )
SvStringHashEntry* pEntry = aList[ i ];
rOutStm << "#define " << pEntry->GetName().GetBuffer()
<< '\t'
- << ByteString::CreateFromInt64(
- pEntry->GetValue() ).GetBuffer()
+ << rtl::OString::valueOf(static_cast<sal_Int64>(
+ pEntry->GetValue())).getStr()
<< endl;
}
}