summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-11-27 20:30:50 +0000
committerCaolán McNamara <caolanm@redhat.com>2011-11-28 08:48:20 +0000
commitf563c10b5bb6795974ad32f7912a9f736941daef (patch)
tree8104465dd11aa007bd4750b4d018552edf041147
parentaStr is unused (diff)
downloadbinfilter-f563c10b5bb6795974ad32f7912a9f736941daef.tar.gz
binfilter-f563c10b5bb6795974ad32f7912a9f736941daef.zip
ByteString->rtl::OUStringToOString
-rw-r--r--binfilter/bf_basic/source/comp/buffer.cxx4
-rw-r--r--binfilter/bf_basic/source/sbx/sbxobj.cxx58
-rw-r--r--binfilter/bf_basic/source/sbx/sbxscan.cxx4
-rw-r--r--binfilter/bf_basic/source/sbx/sbxvar.cxx12
-rw-r--r--binfilter/bf_forms/source/component/forms_DatabaseForm.cxx2
-rw-r--r--binfilter/bf_sc/source/core/data/sc_cell2.cxx11
-rw-r--r--binfilter/bf_sc/source/core/data/sc_column2.cxx4
-rw-r--r--binfilter/bf_sc/source/core/tool/sc_interpr4.cxx22
-rw-r--r--binfilter/bf_sch/source/core/sch_chtmode2.cxx8
-rw-r--r--binfilter/bf_sch/source/core/sch_chtmode4.cxx12
-rw-r--r--binfilter/bf_sch/source/core/sch_memchrt.cxx6
-rw-r--r--binfilter/bf_sfx2/source/config/sfx2_cfgmgr.cxx6
-rw-r--r--binfilter/bf_sfx2/source/doc/sfx2_docinf.cxx2
-rw-r--r--binfilter/bf_sfx2/source/doc/sfx2_objstor.cxx2
-rw-r--r--binfilter/bf_starmath/source/starmath_parse.cxx2
-rw-r--r--binfilter/bf_svtools/source/filter.vcl/wmf/svt_enhwmf.cxx5
-rw-r--r--binfilter/bf_svtools/source/filter.vcl/wmf/svt_winwmf.cxx7
-rw-r--r--binfilter/bf_svtools/source/filter.vcl/wmf/svt_wmfwr.cxx22
-rw-r--r--binfilter/bf_svx/source/items/svx_frmitems.cxx4
-rw-r--r--binfilter/bf_svx/source/unodraw/svx_unobtabl.cxx4
-rw-r--r--binfilter/bf_svx/source/unodraw/svx_unoshap2.cxx4
-rw-r--r--binfilter/bf_svx/source/xml/svx_xmlgrhlp.cxx10
-rw-r--r--binfilter/bf_sw/source/core/sw3io/sw_sw3field.cxx12
-rw-r--r--binfilter/bf_sw/source/core/tox/sw_toxhlp.cxx33
-rw-r--r--binfilter/bf_sw/source/core/unocore/sw_unoframe.cxx8
-rw-r--r--binfilter/bf_sw/source/core/unocore/sw_unotbl.cxx4
-rw-r--r--binfilter/bf_sw/source/ui/app/sw_docsh.cxx4
-rw-r--r--binfilter/bf_xmloff/source/chart/xmloff_SchXMLExport.cxx14
-rw-r--r--binfilter/bf_xmloff/source/chart/xmloff_SchXMLPlotAreaContext.cxx14
-rw-r--r--binfilter/bf_xmloff/source/core/xmloff_xmlerror.cxx6
30 files changed, 153 insertions, 153 deletions
diff --git a/binfilter/bf_basic/source/comp/buffer.cxx b/binfilter/bf_basic/source/comp/buffer.cxx
index adf3ea36b..b2404d245 100644
--- a/binfilter/bf_basic/source/comp/buffer.cxx
+++ b/binfilter/bf_basic/source/comp/buffer.cxx
@@ -158,8 +158,8 @@ BOOL SbiBuffer::operator +=( const String& n )
USHORT l = n.Len() + 1;
if( Check( l ) )
{
- ByteString aByteStr( n, osl_getThreadTextEncoding() );
- memcpy( pCur, aByteStr.GetBuffer(), l );
+ rtl::OString aByteStr(rtl::OUStringToOString(n, osl_getThreadTextEncoding()));
+ memcpy( pCur, aByteStr.getStr(), l );
pCur += l;
nOff = nOff + l;
return TRUE;
diff --git a/binfilter/bf_basic/source/sbx/sbxobj.cxx b/binfilter/bf_basic/source/sbx/sbxobj.cxx
index 7bef1ac71..fad14c395 100644
--- a/binfilter/bf_basic/source/sbx/sbxobj.cxx
+++ b/binfilter/bf_basic/source/sbx/sbxobj.cxx
@@ -214,12 +214,12 @@ SbxVariable* SbxObject::Find( const XubString& rName, SbxClassType t )
static USHORT nLvl = 0;
static const char* pCls[] =
{ "DontCare","Array","Value","Variable","Method","Property","Object" };
- ByteString aNameStr1( (const UniString&)rName, RTL_TEXTENCODING_ASCII_US );
- ByteString aNameStr2( (const UniString&)SbxVariable::GetName(), RTL_TEXTENCODING_ASCII_US );
+ rtl::OString aNameStr1(rtl::OUStringToOString(rName, RTL_TEXTENCODING_ASCII_US));
+ rtl::OString aNameStr2(rtl::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.GetBuffer(), aNameStr1.GetBuffer() );
+ ? pCls[ t-1 ] : "Unknown class", aNameStr1.getStr(), aNameStr1.getStr() );
#endif
if( !GetAll( t ) )
@@ -276,10 +276,10 @@ SbxVariable* SbxObject::Find( const XubString& rName, SbxClassType t )
nLvl--;
if( pRes )
{
- ByteString aNameStr3( (const UniString&)rName, RTL_TEXTENCODING_ASCII_US );
- ByteString aNameStr4( (const UniString&)SbxVariable::GetName(), RTL_TEXTENCODING_ASCII_US );
+ rtl::OString aNameStr3(rtl::OUStringToOString(rName, RTL_TEXTENCODING_ASCII_US));
+ rtl::OString aNameStr4(rtl::OUStringToOString(SbxVariable::GetName(), RTL_TEXTENCODING_ASCII_US));
DbgOutf( "SBX: Found %.*s %s in %s",
- nLvl, " ", aNameStr3.GetBuffer(), aNameStr4.GetBuffer() );
+ nLvl, " ", aNameStr3.getStr(), aNameStr4.getStr() );
}
#endif
return pRes;
@@ -467,12 +467,12 @@ void SbxObject::Insert( SbxVariable* pVar )
XubString aVarName( pVar->GetName() );
if ( !aVarName.Len() && pVar->ISA(SbxObject) )
aVarName = PTR_CAST(SbxObject,pVar)->GetClassName();
- ByteString aNameStr1( (const UniString&)aVarName, RTL_TEXTENCODING_ASCII_US );
- ByteString aNameStr2( (const UniString&)SbxVariable::GetName(), RTL_TEXTENCODING_ASCII_US );
+ rtl::OString aNameStr1(rtl::OUStringToOString(aVarName, RTL_TEXTENCODING_ASCII_US));
+ rtl::OString aNameStr2(rtl::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.GetBuffer(), aNameStr1.GetBuffer() );
+ ? pCls[ pVar->GetClass()-1 ] : "Unknown class", aNameStr1.getStr(), aNameStr1.getStr() );
#endif
}
}
@@ -507,12 +507,12 @@ void SbxObject::QuickInsert( SbxVariable* pVar )
XubString aVarName( pVar->GetName() );
if ( !aVarName.Len() && pVar->ISA(SbxObject) )
aVarName = PTR_CAST(SbxObject,pVar)->GetClassName();
- ByteString aNameStr1( (const UniString&)aVarName, RTL_TEXTENCODING_ASCII_US );
- ByteString aNameStr2( (const UniString&)SbxVariable::GetName(), RTL_TEXTENCODING_ASCII_US );
+ rtl::OString aNameStr1(rtl::OUStringToOString(aVarName, RTL_TEXTENCODING_ASCII_US));
+ rtl::OString aNameStr2(rtl::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.GetBuffer(), aNameStr1.GetBuffer() );
+ ? pCls[ pVar->GetClass()-1 ] : "Unknown class", aNameStr1.getStr(), aNameStr1.getStr() );
#endif
}
}
@@ -532,8 +532,8 @@ void SbxObject::Remove( SbxVariable* pVar )
XubString aVarName( pVar->GetName() );
if ( !aVarName.Len() && pVar->ISA(SbxObject) )
aVarName = PTR_CAST(SbxObject,pVar)->GetClassName();
- ByteString aNameStr1( (const UniString&)aVarName, RTL_TEXTENCODING_ASCII_US );
- ByteString aNameStr2( (const UniString&)SbxVariable::GetName(), RTL_TEXTENCODING_ASCII_US );
+ rtl::OString aNameStr1(rtl::OUStringToOString(aVarName, RTL_TEXTENCODING_ASCII_US));
+ rtl::OString aNameStr2(rtl::OUStringToOString(SbxVariable::GetName(), RTL_TEXTENCODING_ASCII_US));
#endif
SbxVariableRef pVar_ = pArray->Get( nIdx );
if( pVar_->IsBroadcaster() )
@@ -717,38 +717,38 @@ void SbxObject::Dump( SvStream& rStrm, BOOL bFill )
GetAll( SbxCLASS_DONTCARE );
// Daten des Objekts selbst ausgeben
- ByteString aNameStr( (const UniString&)GetName(), RTL_TEXTENCODING_ASCII_US );
- ByteString aClassNameStr( (const UniString&)aClassName, RTL_TEXTENCODING_ASCII_US );
+ rtl::OString aNameStr(rtl::OUStringToOString(GetName(), RTL_TEXTENCODING_ASCII_US));
+ rtl::OString aClassNameStr(rtl::OUStringToOString(aClassName, RTL_TEXTENCODING_ASCII_US));
rStrm << "Object( "
<< rtl::OString::valueOf(reinterpret_cast<sal_Int64>(this)).getStr() << "=='"
- << ( aNameStr.Len() ? aNameStr.GetBuffer() : "<unnamed>" ) << "', "
- << "of class '" << aClassNameStr.GetBuffer() << "', "
+ << ( aNameStr.getLength() ? aNameStr.getStr() : "<unnamed>" ) << "', "
+ << "of class '" << aClassNameStr.getStr() << "', "
<< "counts "
<< rtl::OString::valueOf(static_cast<sal_Int64>(GetRefCount())).getStr()
<< " refs, ";
if ( GetParent() )
{
- ByteString aParentNameStr( (const UniString&)GetName(), RTL_TEXTENCODING_ASCII_US );
+ rtl::OString aParentNameStr(rtl::OUStringToOString(GetName(), RTL_TEXTENCODING_ASCII_US));
rStrm << "in parent "
<< rtl::OString::valueOf(reinterpret_cast<sal_Int64>(GetParent())).getStr()
- << "=='" << ( aParentNameStr.Len() ? aParentNameStr.GetBuffer() : "<unnamed>" ) << "'";
+ << "=='" << ( aParentNameStr.getLength() ? aParentNameStr.getStr() : "<unnamed>" ) << "'";
}
else
rStrm << "no parent ";
rStrm << " )" << endl;
- ByteString aIndentNameStr( (const UniString&)aIndent, RTL_TEXTENCODING_ASCII_US );
- rStrm << aIndentNameStr.GetBuffer() << "{" << endl;
+ rtl::OString aIndentNameStr(rtl::OUStringToOString(aIndent, RTL_TEXTENCODING_ASCII_US));
+ rStrm << aIndentNameStr.getStr() << "{" << endl;
// Flags
XubString aAttrs;
if( CollectAttrs( this, aAttrs ) )
{
- ByteString aAttrStr( (const UniString&)aAttrs, RTL_TEXTENCODING_ASCII_US );
- rStrm << aIndentNameStr.GetBuffer() << "- Flags: " << aAttrStr.GetBuffer() << endl;
+ rtl::OString aAttrStr(rtl::OUStringToOString(aAttrs, RTL_TEXTENCODING_ASCII_US));
+ rStrm << aIndentNameStr.getStr() << "- Flags: " << aAttrStr.getStr() << endl;
}
// Methods
- rStrm << aIndentNameStr.GetBuffer() << "- Methods:" << endl;
+ rStrm << aIndentNameStr.getStr() << "- Methods:" << endl;
for( USHORT i = 0; i < pMethods->Count(); i++ )
{
SbxVariableRef& r = pMethods->GetRef( i );
@@ -780,7 +780,7 @@ void SbxObject::Dump( SvStream& rStrm, BOOL bFill )
}
// Properties
- rStrm << aIndentNameStr.GetBuffer() << "- Properties:" << endl;
+ rStrm << aIndentNameStr.getStr() << "- Properties:" << endl;
{
for( USHORT i = 0; i < pProps->Count(); i++ )
{
@@ -814,7 +814,7 @@ void SbxObject::Dump( SvStream& rStrm, BOOL bFill )
}
// Objects
- rStrm << aIndentNameStr.GetBuffer() << "- Objects:" << endl;
+ rStrm << aIndentNameStr.getStr() << "- Objects:" << endl;
{
for( USHORT i = 0; i < pObjs->Count(); i++ )
{
@@ -822,7 +822,7 @@ void SbxObject::Dump( SvStream& rStrm, BOOL bFill )
SbxVariable* pVar = r;
if ( pVar )
{
- rStrm << aIndentNameStr.GetBuffer() << " - Sub";
+ rStrm << aIndentNameStr.getStr() << " - Sub";
if ( pVar->ISA(SbxObject) )
((SbxObject*) pVar)->Dump( rStrm, bFill );
else if ( pVar->ISA(SbxVariable) )
@@ -831,7 +831,7 @@ void SbxObject::Dump( SvStream& rStrm, BOOL bFill )
}
}
- rStrm << aIndentNameStr.GetBuffer() << "}" << endl << endl;
+ rStrm << aIndentNameStr.getStr() << "}" << endl << endl;
--nLevel;
}
diff --git a/binfilter/bf_basic/source/sbx/sbxscan.cxx b/binfilter/bf_basic/source/sbx/sbxscan.cxx
index 916b21605..d6874e351 100644
--- a/binfilter/bf_basic/source/sbx/sbxscan.cxx
+++ b/binfilter/bf_basic/source/sbx/sbxscan.cxx
@@ -65,7 +65,7 @@ void ImpGetIntntlSep( sal_Unicode& rcDecimalSep, sal_Unicode& rcThousandSep )
SbxError ImpScan( const XubString& rWSrc, double& nVal, SbxDataType& rType,
USHORT* pLen, BOOL bAllowIntntl, BOOL bOnlyIntntl )
{
- ByteString aBStr( rWSrc, RTL_TEXTENCODING_ASCII_US );
+ rtl::OString aBStr(rtl::OUStringToOString(rWSrc, RTL_TEXTENCODING_ASCII_US));
// Bei International Komma besorgen
char cIntntlComma, cIntntl1000;
@@ -91,7 +91,7 @@ SbxError ImpScan( const XubString& rWSrc, double& nVal, SbxDataType& rType,
cIntntl1000 = (char)cThousandSep;
}
- const char* pStart = aBStr.GetBuffer();
+ const char* pStart = aBStr.getStr();
const char* p = pStart;
char buf[ 80 ], *q = buf;
BOOL bRes = TRUE;
diff --git a/binfilter/bf_basic/source/sbx/sbxvar.cxx b/binfilter/bf_basic/source/sbx/sbxvar.cxx
index 0a3a16094..a8526d102 100644
--- a/binfilter/bf_basic/source/sbx/sbxvar.cxx
+++ b/binfilter/bf_basic/source/sbx/sbxvar.cxx
@@ -305,8 +305,8 @@ void SbxVariable::SetParent( SbxObject* p )
aMsg.AppendAscii( "].SetParent([" );
aMsg += p->GetName();
aMsg.AppendAscii( "])" );
- ByteString aBStr( (const UniString&)aMsg, RTL_TEXTENCODING_ASCII_US );
- DbgOut( aBStr.GetBuffer(), DBG_OUT_WARNING, __FILE__, __LINE__);
+ rtl::OString aBStr(rtl::OUStringToOString(aMsg, RTL_TEXTENCODING_ASCII_US));
+ DbgOut( aBStr.getStr(), DBG_OUT_WARNING, __FILE__, __LINE__);
}
}
#endif
@@ -466,13 +466,13 @@ void SbxAlias::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
void SbxVariable::Dump( SvStream& rStrm, BOOL bFill )
{
- ByteString aBNameStr( (const UniString&)GetName( SbxNAME_SHORT_TYPES ), RTL_TEXTENCODING_ASCII_US );
+ rtl::OString aBNameStr(rtl::OUStringToOString(GetName( SbxNAME_SHORT_TYPES ), RTL_TEXTENCODING_ASCII_US));
rStrm << "Variable( "
<< rtl::OString::valueOf(reinterpret_cast<sal_Int64>(this)).getStr() << "=="
- << aBNameStr.GetBuffer();
- ByteString aBParentNameStr( (const UniString&)GetParent()->GetName(), RTL_TEXTENCODING_ASCII_US );
+ << aBNameStr.getStr();
+ rtl::OString aBParentNameStr(rtl::OUStringToOString(GetParent()->GetName(), RTL_TEXTENCODING_ASCII_US));
if ( GetParent() )
- rStrm << " in parent '" << aBParentNameStr.GetBuffer() << "'";
+ rStrm << " in parent '" << aBParentNameStr.getStr() << "'";
else
rStrm << " no parent";
rStrm << " ) ";
diff --git a/binfilter/bf_forms/source/component/forms_DatabaseForm.cxx b/binfilter/bf_forms/source/component/forms_DatabaseForm.cxx
index fdbf59fac..bdd57dfb0 100644
--- a/binfilter/bf_forms/source/component/forms_DatabaseForm.cxx
+++ b/binfilter/bf_forms/source/component/forms_DatabaseForm.cxx
@@ -1049,7 +1049,7 @@ void ODatabaseForm::InsertTextPart( INetMIMEMessage& rParent, const ::rtl::OUStr
// Body
SvMemoryStream* pStream = new SvMemoryStream;
- pStream->WriteLine( ByteString( UniString(rData), rtl_getTextEncodingFromMimeCharset(pBestMatchingEncoding) ) );
+ pStream->WriteLine( rtl::OUStringToOString(rData, rtl_getTextEncodingFromMimeCharset(pBestMatchingEncoding)) );
pStream->Flush();
pStream->Seek( 0 );
pChild->SetDocumentLB( new SvLockBytes(pStream, sal_True) );
diff --git a/binfilter/bf_sc/source/core/data/sc_cell2.cxx b/binfilter/bf_sc/source/core/data/sc_cell2.cxx
index 9d8f620e9..e64cd28a1 100644
--- a/binfilter/bf_sc/source/core/data/sc_cell2.cxx
+++ b/binfilter/bf_sc/source/core/data/sc_cell2.cxx
@@ -32,6 +32,7 @@
// INCLUDE ---------------------------------------------------------------
+#include <rtl/strbuf.hxx>
#include <vcl/mapmod.hxx>
#include <bf_svx/editobj.hxx>
@@ -449,13 +450,13 @@ const USHORT nMemPoolEditCell = (0x1000 - 64) / sizeof(ScNoteCell);
/*N*/ {
/*N*/ #ifdef DBG_UTIL
/*N*/ String aTmp;
-/*N*/ ByteString aMsg( "broken Matrix, no MatFormula at origin, Pos: " );
+/*N*/ rtl::OStringBuffer aMsg( "broken Matrix, no MatFormula at origin, Pos: " );
/*N*/ aPos.Format( aTmp, SCA_VALID_COL | SCA_VALID_ROW, pDocument );
-/*N*/ aMsg += ByteString( aTmp, RTL_TEXTENCODING_ASCII_US );
-/*N*/ aMsg += ", MatOrg: ";
+/*N*/ aMsg.append(rtl::OUStringToOString(aTmp, RTL_TEXTENCODING_ASCII_US));
+/*N*/ aMsg.append(", MatOrg: ");
/*N*/ aOrg.Format( aTmp, SCA_VALID_COL | SCA_VALID_ROW, pDocument );
-/*N*/ aMsg += ByteString( aTmp, RTL_TEXTENCODING_ASCII_US );
-/*N*/ DBG_ERRORFILE( aMsg.GetBuffer() );
+/*N*/ aMsg.append(rtl::OUStringToOString(aTmp, RTL_TEXTENCODING_ASCII_US));
+/*N*/ DBG_ERRORFILE(aMsg.getStr());
/*N*/ #endif
/*N*/ return 0; // bad luck ...
/*N*/ }
diff --git a/binfilter/bf_sc/source/core/data/sc_column2.cxx b/binfilter/bf_sc/source/core/data/sc_column2.cxx
index c04bcb9c4..a40fcf2e7 100644
--- a/binfilter/bf_sc/source/core/data/sc_column2.cxx
+++ b/binfilter/bf_sc/source/core/data/sc_column2.cxx
@@ -247,10 +247,10 @@ namespace binfilter {
/*?*/ pStrCell->GetString( aOldStr );
/*?*/
/*?*/ // convert back to stream character set (get original data)
-/*?*/ ByteString aByteStr( aOldStr, eStreamCharSet );
+/*?*/ rtl::OString aByteStr(rtl::OUStringToOString(aOldStr, eStreamCharSet));
/*?*/
/*?*/ // convert using symbol encoding, as for CELLTYPE_SYMBOLS cells
-/*?*/ String aNewStr( aByteStr, RTL_TEXTENCODING_SYMBOL );
+/*?*/ String aNewStr(rtl::OStringToOUString(aByteStr, RTL_TEXTENCODING_SYMBOL));
/*?*/ pStrCell->SetString( aNewStr );
/*?*/
/*?*/ ScSymbolStringCellEntry * pEntry = new ScSymbolStringCellEntry;
diff --git a/binfilter/bf_sc/source/core/tool/sc_interpr4.cxx b/binfilter/bf_sc/source/core/tool/sc_interpr4.cxx
index 34d42b12e..cace9a1e4 100644
--- a/binfilter/bf_sc/source/core/tool/sc_interpr4.cxx
+++ b/binfilter/bf_sc/source/core/tool/sc_interpr4.cxx
@@ -456,14 +456,14 @@ BOOL ScInterpreter::CreateStringArr(USHORT nCol1, USHORT nRow1, USHORT nTab1,
}
if (bOk)
{
- ByteString aTmp( aStr, osl_getThreadTextEncoding() );
+ rtl::OString aTmp(rtl::OUStringToOString(aStr, osl_getThreadTextEncoding()));
// In case the xub_StrLen will be longer than USHORT
// one day, and room for pad byte check.
- if ( aTmp.Len() > ((USHORT)(~0)) - 2 )
+ if ( aTmp.getLength() > ((USHORT)(~0)) - 2 )
return FALSE;
// Append a 0-pad-byte if string length is not even
//! MUST be USHORT and not xub_StrLen
- USHORT nStrLen = (USHORT) aTmp.Len();
+ USHORT nStrLen = (USHORT) aTmp.getLength();
USHORT nLen = ( nStrLen + 2 ) & ~1;
if (((ULONG)nPos + (5 * sizeof(USHORT)) + nLen) > MAXARRSIZE)
@@ -473,7 +473,7 @@ BOOL ScInterpreter::CreateStringArr(USHORT nCol1, USHORT nRow1, USHORT nTab1,
*p++ = nTab;
*p++ = nErr;
*p++ = nLen;
- memcpy( p, aTmp.GetBuffer(), nStrLen + 1);
+ memcpy( p, aTmp.getStr(), nStrLen + 1);
nPos += 10 + nStrLen + 1;
BYTE* q = ( pCellArr + nPos );
if( !nStrLen & 1 )
@@ -572,19 +572,19 @@ BOOL ScInterpreter::CreateCellArr(USHORT nCol1, USHORT nRow1, USHORT nTab1,
}
else
{
- ByteString aTmp( aStr, osl_getThreadTextEncoding() );
+ rtl::OString aTmp(rtl::OUStringToOString(aStr, osl_getThreadTextEncoding()));
// In case the xub_StrLen will be longer than USHORT
// one day, and room for pad byte check.
- if ( aTmp.Len() > ((USHORT)(~0)) - 2 )
+ if ( aTmp.getLength() > ((USHORT)(~0)) - 2 )
return FALSE;
// Append a 0-pad-byte if string length is not even
//! MUST be USHORT and not xub_StrLen
- USHORT nStrLen = (USHORT) aTmp.Len();
+ USHORT nStrLen = (USHORT) aTmp.getLength();
USHORT nLen = ( nStrLen + 2 ) & ~1;
if ( ((ULONG)nPos + 2 + nLen) > MAXARRSIZE)
return FALSE;
*p++ = nLen;
- memcpy( p, aTmp.GetBuffer(), nStrLen + 1);
+ memcpy( p, aTmp.getStr(), nStrLen + 1);
nPos += 2 + nStrLen + 1;
BYTE* q = ( pCellArr + nPos );
if( !nStrLen & 1 )
@@ -1463,13 +1463,13 @@ BOOL ScInterpreter::DoubleRefToPosSingleRef( const ScRange& rRange, ScAddress& r
/*?*/ break;
/*?*/ case PTR_STRING :
/*?*/ {
-/*?*/ ByteString aStr( GetString(), osl_getThreadTextEncoding() );
-/*?*/ if ( aStr.Len() >= MAXSTRLEN )
+/*?*/ rtl::OString aStr(rtl::OUStringToOString(GetString(), osl_getThreadTextEncoding()));
+/*?*/ if ( aStr.getLength() >= MAXSTRLEN )
/*?*/ SetError( errStringOverflow );
/*?*/ else
/*?*/ {
/*?*/ pStr[i-1] = new sal_Char[MAXSTRLEN];
-/*?*/ strncpy( pStr[i-1], aStr.GetBuffer(), MAXSTRLEN );
+/*?*/ strncpy( pStr[i-1], aStr.getStr(), MAXSTRLEN );
/*?*/ pStr[i-1][MAXSTRLEN-1] = 0;
/*?*/ ppParam[i] = pStr[i-1];
/*?*/ }
diff --git a/binfilter/bf_sch/source/core/sch_chtmode2.cxx b/binfilter/bf_sch/source/core/sch_chtmode2.cxx
index e3c827735..d82304f4f 100644
--- a/binfilter/bf_sch/source/core/sch_chtmode2.cxx
+++ b/binfilter/bf_sch/source/core/sch_chtmode2.cxx
@@ -627,8 +627,8 @@ enum ChartStyleV0
/*N*/ void ChartModel::StoreAttributes(SvStream& rOut) const
/*N*/ {
/*N*/ #ifdef DBG_UTIL
-/*N*/ ByteString aBStr( aMainTitle, RTL_TEXTENCODING_ASCII_US );
-/*N*/ CHART_TRACE1( "ChartModel::StoreAttributes (%s)", aBStr.GetBuffer() );
+/*N*/ rtl::OString aBStr(rtl::OUStringToOString(aMainTitle, RTL_TEXTENCODING_ASCII_US));
+/*N*/ CHART_TRACE1( "ChartModel::StoreAttributes (%s)", aBStr.getStr() );
/*N*/ #endif
/*N*/
/*N*/ rtl_TextEncoding eSysSet = ::GetSOStoreTextEncoding( osl_getThreadTextEncoding());
@@ -1144,8 +1144,8 @@ enum ChartStyleV0
/*N*/ void ChartModel::LoadAttributes(SvStream& rIn)
/*N*/ {
/*N*/ #ifdef DBG_UTIL
-/*N*/ ByteString aBStr( aMainTitle, RTL_TEXTENCODING_ASCII_US );
-/*N*/ CHART_TRACE1( "ChartModel::LoadAttributes (%s)", aBStr.GetBuffer() );
+/*N*/ rtl::OString aBStr(rtl::OUStringToOString(aMainTitle, RTL_TEXTENCODING_ASCII_US));
+/*N*/ CHART_TRACE1( "ChartModel::LoadAttributes (%s)", aBStr.getStr() );
/*N*/ #endif
/*N*/
/*N*/ // aInfo is a member of SdrModel
diff --git a/binfilter/bf_sch/source/core/sch_chtmode4.cxx b/binfilter/bf_sch/source/core/sch_chtmode4.cxx
index 6c735e5cb..6729cbb4a 100644
--- a/binfilter/bf_sch/source/core/sch_chtmode4.cxx
+++ b/binfilter/bf_sch/source/core/sch_chtmode4.cxx
@@ -1228,8 +1228,8 @@ private:
/*N*/ RTL_LOGFILE_CONTEXT_AUTHOR (context, "sch", "af119097", "::ChartModel::BuildChart");
/*N*/
/*N*/ #ifdef DBG_UTIL
-/*N*/ ByteString aBStr( aMainTitle, RTL_TEXTENCODING_ASCII_US );
-/*N*/ CHART_TRACE1( "ChartModel::BuildChart (%s)", aBStr.GetBuffer());
+/*N*/ rtl::OString aBStr(rtl::OUStringToOString(aMainTitle, RTL_TEXTENCODING_ASCII_US));
+/*N*/ CHART_TRACE1( "ChartModel::BuildChart (%s)", aBStr.getStr());
/*N*/ #endif
/*N*/
/*N*/ //kein setzen der p*Attr durch die Objekte
@@ -1404,10 +1404,10 @@ private:
/*?*/ catch( ::com::sun::star::uno::Exception aEx )
/*?*/ {
/*?*/ #ifdef DBG_UTIL
-/*?*/ // convert ::rtl::OUString => tools String => ByteString
-/*?*/ String aStr( aEx.Message );
-/*?*/ ByteString aTmpBStr( aStr, RTL_TEXTENCODING_ASCII_US );
-/*?*/ OSL_TRACE( "AddIn threw exception during refresh(): %s", aTmpBStr.GetBuffer());
+/*?*/ rtl::OString aTmpBStr(rtl::OUStringToOString(aEx.Message, RTL_TEXTENCODING_ASCII_US));
+/*?*/ OSL_TRACE( "AddIn threw exception during refresh(): %s", aTmpBStr.getStr());
+/*?*/ #else
+/*?*/ (void)aEx;
/*?*/ #endif
/*?*/ }
/*?*/ ResetChartStatusFlag( CHS_NO_ADDIN_REFRESH );
diff --git a/binfilter/bf_sch/source/core/sch_memchrt.cxx b/binfilter/bf_sch/source/core/sch_memchrt.cxx
index da43dbb68..e401d2740 100644
--- a/binfilter/bf_sch/source/core/sch_memchrt.cxx
+++ b/binfilter/bf_sch/source/core/sch_memchrt.cxx
@@ -855,9 +855,9 @@ using namespace ::com::sun::star;
/*N*/ nDelimiterPos >= nEndPos )
/*N*/ {
/*N*/ #if OSL_DEBUG_LEVEL > 0
-/*N*/ String aStr( rXMLString.copy( nStartPos, nEndPos - nStartPos + 1 ));
-/*N*/ ByteString aBstr( aStr, RTL_TEXTENCODING_ASCII_US );
-/*N*/ OSL_TRACE( "Invalid Cell Range <%s> found in XML file", aBstr.GetBuffer());
+/*N*/ rtl::OUString aStr( rXMLString.copy( nStartPos, nEndPos - nStartPos + 1 ));
+/*N*/ rtl::OString aBstr(rtl::OUStringToOString(aStr, RTL_TEXTENCODING_ASCII_US));
+/*N*/ OSL_TRACE( "Invalid Cell Range <%s> found in XML file", aBstr.getStr());
/*N*/ #endif
/*N*/ return false;
/*N*/ }
diff --git a/binfilter/bf_sfx2/source/config/sfx2_cfgmgr.cxx b/binfilter/bf_sfx2/source/config/sfx2_cfgmgr.cxx
index bc763ceb9..3f87ee9dd 100644
--- a/binfilter/bf_sfx2/source/config/sfx2_cfgmgr.cxx
+++ b/binfilter/bf_sfx2/source/config/sfx2_cfgmgr.cxx
@@ -470,10 +470,10 @@ static const char pStorageName[] = "Configurations";
/*?*/ USHORT SfxConfigManagerImExport_Impl::GetType( const String& rStreamName )
/*?*/ {
-/*NBFF*/ ByteString aCmp( rStreamName, RTL_TEXTENCODING_ASCII_US );
+/*NBFF*/ rtl::OString aCmp(rtl::OUStringToOString(rStreamName, RTL_TEXTENCODING_ASCII_US));
/*NBFF*/
-/*NBFF*/ if ( !strcmp( aCmp.GetBuffer(), "eventbindings.xml" ) )
-/*NBFF*/ return 11;
+/*NBFF*/ if ( !strcmp( aCmp.getStr(), "eventbindings.xml" ) )
+/*NBFF*/ return 11;
/*NBFF*/
/*?*/ return 0;
/*?*/ }
diff --git a/binfilter/bf_sfx2/source/doc/sfx2_docinf.cxx b/binfilter/bf_sfx2/source/doc/sfx2_docinf.cxx
index ad6494509..15918f095 100644
--- a/binfilter/bf_sfx2/source/doc/sfx2_docinf.cxx
+++ b/binfilter/bf_sfx2/source/doc/sfx2_docinf.cxx
@@ -216,7 +216,7 @@ static const char pDocInfoHeader[] = "SfxDocumentInfo";
/*N*/ else
/*N*/ {
/*N*/ // Non-unicode strings are always stored with UTF8 encoding
-/*N*/ return ByteString( aString, RTL_TEXTENCODING_UTF8 ).Len() + 5;
+/*N*/ return rtl::OUStringToOString(aString, RTL_TEXTENCODING_UTF8).getLength() + 5;
/*N*/ }
/*N*/ }
diff --git a/binfilter/bf_sfx2/source/doc/sfx2_objstor.cxx b/binfilter/bf_sfx2/source/doc/sfx2_objstor.cxx
index e0bf9c8e6..c325032a0 100644
--- a/binfilter/bf_sfx2/source/doc/sfx2_objstor.cxx
+++ b/binfilter/bf_sfx2/source/doc/sfx2_objstor.cxx
@@ -99,7 +99,7 @@
#include "bf_so3/staticbaseurl.hxx"
namespace binfilter {
-#define S2BS(s) ByteString( s, RTL_TEXTENCODING_MS_1252 )
+#define S2BS(s) rtl::OUStringToOString(s, RTL_TEXTENCODING_MS_1252)
extern sal_uInt32 CheckPasswd_Impl( SfxObjectShell*, SfxItemPool&, SfxMedium* );
diff --git a/binfilter/bf_starmath/source/starmath_parse.cxx b/binfilter/bf_starmath/source/starmath_parse.cxx
index b473efa82..a090b9585 100644
--- a/binfilter/bf_starmath/source/starmath_parse.cxx
+++ b/binfilter/bf_starmath/source/starmath_parse.cxx
@@ -1850,7 +1850,7 @@ const sal_Int32 coNumContFlags =
/*N*/ double fTmp;
/*N*/ Fraction aValue;
/*N*/ if(lcl_IsNumber(CurToken.aText) &&
-/*N*/ sscanf(ByteString(CurToken.aText, RTL_TEXTENCODING_ASCII_US).GetBuffer(), "%lf", &fTmp) == 1)
+/*N*/ sscanf(rtl::OUStringToOString(CurToken.aText, RTL_TEXTENCODING_ASCII_US).getStr(), "%lf", &fTmp) == 1)
/*N*/ aValue = fTmp;
/*N*/
/*N*/ NextToken();
diff --git a/binfilter/bf_svtools/source/filter.vcl/wmf/svt_enhwmf.cxx b/binfilter/bf_svtools/source/filter.vcl/wmf/svt_enhwmf.cxx
index e40076669..cf13a6a04 100644
--- a/binfilter/bf_svtools/source/filter.vcl/wmf/svt_enhwmf.cxx
+++ b/binfilter/bf_svtools/source/filter.vcl/wmf/svt_enhwmf.cxx
@@ -979,9 +979,10 @@ BOOL EnhWMFReader::ReadEnhWMF()
pDX = new sal_Int32[ aText.Len() ];
for ( i = 0, j = 0; i < aText.Len(); i++ )
{
- ByteString aCharacter( aText.GetChar( i ), pOut->GetCharSet() );
+ sal_Unicode cUniChar = aText.GetChar(i);
+ rtl::OString aCharacter(&cUniChar, 1, pOut->GetCharSet());
pDX[ i ] = 0;
- for ( k = 0; ( k < aCharacter.Len() ) && ( j < nLen ) && ( i < aText.Len() ); k++ )
+ for ( k = 0; ( k < aCharacter.getLength() ) && ( j < nLen ) && ( i < aText.Len() ); k++ )
pDX[ i ] += pOldDx[ j++ ];
}
delete[] pOldDx;
diff --git a/binfilter/bf_svtools/source/filter.vcl/wmf/svt_winwmf.cxx b/binfilter/bf_svtools/source/filter.vcl/wmf/svt_winwmf.cxx
index 11f8b941a..23e111412 100644
--- a/binfilter/bf_svtools/source/filter.vcl/wmf/svt_winwmf.cxx
+++ b/binfilter/bf_svtools/source/filter.vcl/wmf/svt_winwmf.cxx
@@ -461,10 +461,11 @@ void WMFReader::ReadRecordParams( USHORT nFunc )
*pWMF >> nDx;
if ( nNewTextLen != nOriginalTextLen )
{
- ByteString aTmp( aText.GetChar( i ), pOut->GetCharSet() );
- if ( aTmp.Len() > 1 )
+ sal_Unicode cUniChar = aText.GetChar(i);
+ rtl::OString aTmp(&cUniChar, 1, pOut->GetCharSet());
+ if ( aTmp.getLength() > 1 )
{
- sal_Int32 nDxCount = aTmp.Len() - 1;
+ sal_Int32 nDxCount = aTmp.getLength() - 1;
if ( ( ( nDxCount * 2 ) + pWMF->Tell() ) > nMaxStreamPos )
break;
while ( nDxCount-- )
diff --git a/binfilter/bf_svtools/source/filter.vcl/wmf/svt_wmfwr.cxx b/binfilter/bf_svtools/source/filter.vcl/wmf/svt_wmfwr.cxx
index bfb2f6811..a9843001b 100644
--- a/binfilter/bf_svtools/source/filter.vcl/wmf/svt_wmfwr.cxx
+++ b/binfilter/bf_svtools/source/filter.vcl/wmf/svt_wmfwr.cxx
@@ -450,7 +450,8 @@ void WMFWriter::WMFRecord_CreateFontIndirect(const Font & rFont)
case PITCH_VARIABLE: nPitchFamily=W_VARIABLE_PITCH; break;
default: nPitchFamily=W_DEFAULT_PITCH;
}
- switch (rFont.GetFamily()) {
+ switch (rFont.GetFamily())
+ {
case FAMILY_DECORATIVE: nPitchFamily|=W_FF_DECORATIVE; break;
case FAMILY_MODERN: nPitchFamily|=W_FF_MODERN; break;
case FAMILY_ROMAN: nPitchFamily|=W_FF_ROMAN; break;
@@ -460,10 +461,10 @@ void WMFWriter::WMFRecord_CreateFontIndirect(const Font & rFont)
}
*pWMF << nPitchFamily;
- ByteString aFontName( rFont.GetName(), eFontNameEncoding );
+ rtl::OString aFontName(rtl::OUStringToOString(rFont.GetName(), eFontNameEncoding));
for ( i = 0; i < W_LF_FACESIZE; i++ )
{
- sal_Char nChar = ( i < aFontName.Len() ) ? aFontName.GetChar( i ) : 0;
+ sal_Char nChar = ( i < aFontName.getLength() ) ? aFontName[i] : 0;
*pWMF << nChar;
}
UpdateRecordHeader();
@@ -562,8 +563,8 @@ sal_Bool WMFWriter::WMFRecord_Escape_Unicode( const Point& rPoint, const String&
{
const sal_Unicode* pBuf = rUniStr.GetBuffer();
- ByteString aByteStr( rUniStr, aSrcFont.GetCharSet() );
- String aUniStr2( aByteStr, aSrcFont.GetCharSet() );
+ rtl::OString aByteStr(rtl::OUStringToOString(rUniStr, aSrcFont.GetCharSet()));
+ String aUniStr2( aByteStr, aSrcFont.GetCharSet() );
const sal_Unicode* pConversion = aUniStr2.GetBuffer(); // this is the unicode array after bytestring <-> unistring conversion
for ( i = 0; i < nStringLen; i++ )
{
@@ -630,8 +631,8 @@ void WMFWriter::WMFRecord_ExtTextOut( const Point & rPoint,
return;
}
rtl_TextEncoding eChrSet = aSrcFont.GetCharSet();
- ByteString aByteString(rString, eChrSet);
- TrueExtTextOut(rPoint,rString,aByteString,pDXAry);
+ rtl::OString aByteString(rtl::OUStringToOString(rString, eChrSet));
+ TrueExtTextOut(rPoint, rString, aByteString, pDXAry);
}
void WMFWriter::TrueExtTextOut( const Point & rPoint, const String & rString,
@@ -662,8 +663,9 @@ void WMFWriter::TrueExtTextOut( const Point & rPoint, const String & rString,
*pWMF << nDx;
if ( nOriginalTextLen < nNewTextLen )
{
- ByteString aTemp( rString.GetChar( i ), aSrcFont.GetCharSet());
- j = aTemp.Len();
+ sal_Unicode cUniChar = rString.GetChar(i);
+ rtl::OString aTemp(&cUniChar, 1, aSrcFont.GetCharSet());
+ j = aTemp.getLength();
while ( --j > 0 )
*pWMF << (sal_uInt16)0;
}
@@ -919,7 +921,7 @@ void WMFWriter::WMFRecord_StretchDIB( const Point & rPoint, const Size & rSize,
void WMFWriter::WMFRecord_TextOut(const Point & rPoint, const String & rStr)
{
rtl_TextEncoding eChrSet = aSrcFont.GetCharSet();
- ByteString aString( rStr, eChrSet );
+ rtl::OString aString(rtl::OUStringToOString(rStr, eChrSet));
TrueTextOut(rPoint, aString);
}
diff --git a/binfilter/bf_svx/source/items/svx_frmitems.cxx b/binfilter/bf_svx/source/items/svx_frmitems.cxx
index 85fb58c3c..78a61942e 100644
--- a/binfilter/bf_svx/source/items/svx_frmitems.cxx
+++ b/binfilter/bf_svx/source/items/svx_frmitems.cxx
@@ -2160,9 +2160,9 @@ public:
/*N*/ {
/*N*/ DELETEZ( pStrLink );
/*N*/ String sTmp( sLink );
-/*N*/ ByteString sId( sTmp.Copy(
+/*N*/ rtl::OString sId(rtl::OUStringToOString(sTmp.Copy(
/*N*/ sizeof(UNO_NAME_GRAPHOBJ_URLPREFIX)-1),
-/*N*/ RTL_TEXTENCODING_ASCII_US );
+/*N*/ RTL_TEXTENCODING_ASCII_US));
/*N*/ BfGraphicObject *pOldGrfObj = pImpl->pGraphicObject;
/*N*/ pImpl->pGraphicObject = new BfGraphicObject( sId );
/*N*/ ApplyGraphicTransparency_Impl();
diff --git a/binfilter/bf_svx/source/unodraw/svx_unobtabl.cxx b/binfilter/bf_svx/source/unodraw/svx_unobtabl.cxx
index a1701cfbd..5459d98a4 100644
--- a/binfilter/bf_svx/source/unodraw/svx_unobtabl.cxx
+++ b/binfilter/bf_svx/source/unodraw/svx_unobtabl.cxx
@@ -114,8 +114,8 @@ BfGraphicObject CreateGraphicObjectFromURL( const ::rtl::OUString &rURL ) throw(
if( aURL.Search( aPrefix ) == 0 )
{
// graphic manager url
- ByteString aUniqueID( String(rURL.copy( sizeof( UNO_NAME_GRAPHOBJ_URLPREFIX ) - 1 )), RTL_TEXTENCODING_UTF8 );
- return BfGraphicObject( aUniqueID );
+ rtl::OString aUniqueID(rtl::OUStringToOString(rURL.copy(sizeof(UNO_NAME_GRAPHOBJ_URLPREFIX)-1), RTL_TEXTENCODING_UTF8));
+ return BfGraphicObject(aUniqueID);
}
else
{
diff --git a/binfilter/bf_svx/source/unodraw/svx_unoshap2.cxx b/binfilter/bf_svx/source/unodraw/svx_unoshap2.cxx
index e3a55d492..35df67cad 100644
--- a/binfilter/bf_svx/source/unodraw/svx_unoshap2.cxx
+++ b/binfilter/bf_svx/source/unodraw/svx_unoshap2.cxx
@@ -1572,8 +1572,8 @@ void SAL_CALL SvxGraphicObject::setPropertyValue( const OUString& aPropertyName,
// graphic manager url
aURL = aURL.copy( sizeof( UNO_NAME_GRAPHOBJ_URLPREFIX ) - 1 );
String aTmpStr(aURL);
- ByteString aUniqueID( aTmpStr, RTL_TEXTENCODING_UTF8 );
- BfGraphicObject aGrafObj( aUniqueID );
+ rtl::OString aUniqueID(rtl::OUStringToOString(aTmpStr, RTL_TEXTENCODING_UTF8));
+ BfGraphicObject aGrafObj(aUniqueID);
// #101808# since loading a graphic can cause a reschedule of the office
// it is possible that our shape is removed while where in this
diff --git a/binfilter/bf_svx/source/xml/svx_xmlgrhlp.cxx b/binfilter/bf_svx/source/xml/svx_xmlgrhlp.cxx
index 91ead1ae3..4f0f72ea8 100644
--- a/binfilter/bf_svx/source/xml/svx_xmlgrhlp.cxx
+++ b/binfilter/bf_svx/source/xml/svx_xmlgrhlp.cxx
@@ -86,8 +86,7 @@ public:
/*N*/ SvXMLGraphicInputStream::SvXMLGraphicInputStream( const OUString& rGraphicId )
/*N*/ {
-/*N*/ String aGraphicId( rGraphicId );
-/*N*/ BfGraphicObject aGrfObject( ByteString( aGraphicId, RTL_TEXTENCODING_ASCII_US ) );
+/*N*/ BfGraphicObject aGrfObject(rtl::OUStringToOString(rGraphicId, RTL_TEXTENCODING_ASCII_US));
/*N*/
/*N*/ maTmp.EnableKillingFile();
/*N*/
@@ -433,7 +432,7 @@ public:
/*N*/
/*N*/ if( ( rFileName.Len() >= 4 ) && ( rFileName.GetChar( rFileName.Len() - 4 ) == '.' ) )
/*N*/ {
-/*N*/ const ByteString aExt( rFileName.Copy( rFileName.Len() - 3 ), RTL_TEXTENCODING_ASCII_US );
+/*N*/ const ByteString aExt(rtl::OUStringToOString(rFileName.Copy( rFileName.Len() - 3 ), RTL_TEXTENCODING_ASCII_US));
/*N*/
/*N*/ for( long i = 0, nCount = SAL_N_ELEMENTS( aMapper ); ( i < nCount ) && !aMimeType.Len(); i++ )
/*N*/ if( aExt == aMapper[ i ].pExt )
@@ -463,8 +462,7 @@ public:
/*N*/ const ::rtl::OUString& rPictureStreamName,
/*N*/ const ::rtl::OUString& rGraphicId )
/*N*/ {
-/*N*/ String aGraphicId( rGraphicId );
-/*N*/ BfGraphicObject aGrfObject( ByteString( aGraphicId, RTL_TEXTENCODING_ASCII_US ) );
+/*N*/ BfGraphicObject aGrfObject(rtl::OUStringToOString(rGraphicId, RTL_TEXTENCODING_ASCII_US));
/*N*/ sal_Bool bRet = sal_False;
/*N*/
/*N*/ if( aGrfObject.GetType() != GRAPHIC_NONE )
@@ -563,7 +561,7 @@ public:
/*N*/ else
/*N*/ {
/*N*/ const String aGraphicObjectId( aPictureStreamName );
-/*N*/ const BfGraphicObject aGrfObject( ByteString( aGraphicObjectId, RTL_TEXTENCODING_ASCII_US ) );
+/*N*/ const BfGraphicObject aGrfObject( rtl::OUStringToOString(aGraphicObjectId, RTL_TEXTENCODING_ASCII_US) );
/*N*/
/*N*/ if( aGrfObject.GetType() != GRAPHIC_NONE )
/*N*/ {
diff --git a/binfilter/bf_sw/source/core/sw3io/sw_sw3field.cxx b/binfilter/bf_sw/source/core/sw3io/sw_sw3field.cxx
index 9b5fc3283..1cf36c1bc 100644
--- a/binfilter/bf_sw/source/core/sw3io/sw_sw3field.cxx
+++ b/binfilter/bf_sw/source/core/sw3io/sw_sw3field.cxx
@@ -399,8 +399,8 @@ static OldFormats aOldGetSetExpFmt30[] =
/*N*/
/*N*/ p->SetContent( aContent );
/*N*/ sal_Char* dummy;
-/*N*/ ByteString sTmp( aValue, RTL_TEXTENCODING_ASCII_US );
-/*N*/ p->SetValue( strtod( sTmp.GetBuffer(), &dummy ) );
+/*N*/ rtl::OString sTmp(rtl::OUStringToOString(aValue, RTL_TEXTENCODING_ASCII_US));
+/*N*/ p->SetValue( strtod( sTmp.getStr(), &dummy ) );
/*N*/ if( !nType )
/*N*/ nType = GSE_STRING;
/*N*/ p->SetType( nType );
@@ -645,8 +645,8 @@ SwAuthorityFieldType* lcl_sw3io_InAuthorityFieldType( Sw3IoImp& rIo )
/*N*/ if( rIo.nVersion >= SWG_SHORTFIELDS && (0x01 & cFlag) )
/*N*/ {
sal_Char* dummy;
-/*?*/ ByteString sTmp( aExpand, RTL_TEXTENCODING_ASCII_US );
-/*?*/ pFld->ChgValue( strtod( sTmp.GetBuffer(), &dummy ), TRUE );
+/*?*/ rtl::OString sTmp(rtl::OUStringToOString(aExpand, RTL_TEXTENCODING_ASCII_US));
+/*?*/ pFld->ChgValue( strtod( sTmp.getStr(), &dummy ), TRUE );
/*N*/ }
/*N*/ else
/*N*/ pFld->InitContent( aExpand );
@@ -1237,8 +1237,8 @@ SwAuthorityFieldType* lcl_sw3io_InAuthorityFieldType( Sw3IoImp& rIo )
/*N*/ if( GSE_SEQ & nType )
/*N*/ {
/*N*/ sal_Char* dummy;
-/*N*/ ByteString sTmp( aExpand, RTL_TEXTENCODING_ASCII_US );
-/*N*/ pFld->SetValue( strtod( sTmp.GetBuffer(), &dummy ) );
+/*N*/ rtl::OString sTmp(rtl::OUStringToOString(aExpand, RTL_TEXTENCODING_ASCII_US));
+/*N*/ pFld->SetValue( strtod( sTmp.getStr(), &dummy ) );
/*N*/
/*N*/ USHORT n = (USHORT)pFld->GetValue();
/*N*/
diff --git a/binfilter/bf_sw/source/core/tox/sw_toxhlp.cxx b/binfilter/bf_sw/source/core/tox/sw_toxhlp.cxx
index 75f2f6d6a..e82cbd072 100644
--- a/binfilter/bf_sw/source/core/tox/sw_toxhlp.cxx
+++ b/binfilter/bf_sw/source/core/tox/sw_toxhlp.cxx
@@ -34,6 +34,7 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <comphelper/processfactory.hxx>
#include <com/sun/star/i18n/XExtendedIndexEntrySupplier.hpp>
+#include <rtl/strbuf.hxx>
#include <tools/string.hxx>
#include <tools/debug.hxx>
@@ -57,12 +58,12 @@ namespace binfilter {
x >>= xIES;
}
}
- catch ( UNO_NMSPC::Exception& e )
+ catch ( const UNO_NMSPC::Exception& e )
{
#ifdef DBG_UTIL
- ByteString aMsg( "IndexEntrySupplierWrapper: Exception caught\n" );
- aMsg += ByteString( String( e.Message ), RTL_TEXTENCODING_UTF8 );
- DBG_ERRORFILE( aMsg.GetBuffer() );
+ rtl::OStringBuffer aMsg("IndexEntrySupplierWrapper: Exception caught\n");
+ aMsg.append(rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8));
+ DBG_ERRORFILE(aMsg.getStr());
#endif
}
}
@@ -79,12 +80,12 @@ namespace binfilter {
try {
sRet = xIES->getAlgorithmList( rLcl );
}
- catch ( UNO_NMSPC::Exception& e )
+ catch ( const UNO_NMSPC::Exception& e )
{
#ifdef DBG_UTIL
- ByteString aMsg( "getAlgorithmList: Exception caught\n" );
- aMsg += ByteString( String( e.Message ), RTL_TEXTENCODING_UTF8 );
- DBG_ERRORFILE( aMsg.GetBuffer() );
+ rtl::OStringBuffer aMsg("getAlgorithmList: Exception caught\n");
+ aMsg.append(rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8));
+ DBG_ERRORFILE(aMsg.getStr());
#endif
}
return sRet;
@@ -98,12 +99,12 @@ namespace binfilter {
try {
bRet = xIES->loadAlgorithm( rLcl, sSortAlgorithm, nOptions );
}
- catch ( UNO_NMSPC::Exception& e )
+ catch (const UNO_NMSPC::Exception& e)
{
#ifdef DBG_UTIL
- ByteString aMsg( "loadAlgorithm: Exception caught\n" );
- aMsg += ByteString( String( e.Message ), RTL_TEXTENCODING_UTF8 );
- DBG_ERRORFILE( aMsg.GetBuffer() );
+ rtl::OStringBuffer aMsg("loadAlgorithm: Exception caught\n");
+ aMsg.append(rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8));
+ DBG_ERRORFILE(aMsg.getStr());
#endif
}
return bRet;
@@ -120,12 +121,12 @@ namespace binfilter {
nRet = xIES->compareIndexEntry( rTxt1, rTxtReading1, rLocale1,
rTxt2, rTxtReading2, rLocale2 );
}
- catch ( UNO_NMSPC::Exception& e )
+ catch (const UNO_NMSPC::Exception& e)
{
#ifdef DBG_UTIL
- ByteString aMsg( "compareIndexEntry: Exception caught\n" );
- aMsg += ByteString( String( e.Message ), RTL_TEXTENCODING_UTF8 );
- DBG_ERRORFILE( aMsg.GetBuffer() );
+ rtl::OStringBuffer aMsg( "compareIndexEntry: Exception caught\n" );
+ aMsg.append(rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8));
+ DBG_ERRORFILE(aMsg.getStr());
#endif
}
return nRet;
diff --git a/binfilter/bf_sw/source/core/unocore/sw_unoframe.cxx b/binfilter/bf_sw/source/core/unocore/sw_unoframe.cxx
index 9b0544885..15fc05771 100644
--- a/binfilter/bf_sw/source/core/unocore/sw_unoframe.cxx
+++ b/binfilter/bf_sw/source/core/unocore/sw_unoframe.cxx
@@ -1066,8 +1066,8 @@ void SwXFrame::setPropertyValue(const OUString& rPropertyName, const uno::Any& a
else if( sTmp.EqualsAscii( sGraphicObjectProtocol,
0, sizeof(sGraphicObjectProtocol)-1 ) )
{
- ByteString sId( sTmp.Copy(sizeof(sGraphicObjectProtocol)-1),
- RTL_TEXTENCODING_ASCII_US );
+ rtl::OString sId(rtl::OUStringToOString(sTmp.Copy(sizeof(sGraphicObjectProtocol)-1),
+ RTL_TEXTENCODING_ASCII_US));
pGrfObj = new BfGraphicObject( sId );
sGrfName.Erase();
}
@@ -1787,8 +1787,8 @@ void SwXFrame::attachToRange(const uno::Reference< XTextRange > & xTextRange)
else if( sGraphicURL.EqualsAscii( sGraphicObjectProtocol,
0, sizeof(sGraphicObjectProtocol)-1 ) )
{
- ByteString sId( sGraphicURL.Copy( sizeof(sGraphicObjectProtocol)-1 ),
- RTL_TEXTENCODING_ASCII_US );
+ rtl::OString sId(rtl::OUStringToOString(sGraphicURL.Copy( sizeof(sGraphicObjectProtocol)-1 ),
+ RTL_TEXTENCODING_ASCII_US));
pGrfObj = new BfGraphicObject( sId );
sGraphicURL.Erase();
}
diff --git a/binfilter/bf_sw/source/core/unocore/sw_unotbl.cxx b/binfilter/bf_sw/source/core/unocore/sw_unotbl.cxx
index 66ec438e2..7a32a4022 100644
--- a/binfilter/bf_sw/source/core/unocore/sw_unotbl.cxx
+++ b/binfilter/bf_sw/source/core/unocore/sw_unotbl.cxx
@@ -2840,7 +2840,7 @@ void SwXTextTable::setPropertyValue(const OUString& rPropertyName,
{
String aPropertyName(rPropertyName);
if(!pTableProps->SetProperty(
- ByteString( aPropertyName, RTL_TEXTENCODING_ASCII_US).GetBuffer(),
+ rtl::OUStringToOString(aPropertyName, RTL_TEXTENCODING_ASCII_US).getStr(),
aValue))
throw IllegalArgumentException();
}
@@ -2981,7 +2981,7 @@ uno::Any SwXTextTable::getPropertyValue(const OUString& rPropertyName) throw( be
{
uno::Any* pAny = 0;
String aPropertyName(rPropertyName);
- if(!pTableProps->GetProperty(ByteString(aPropertyName, RTL_TEXTENCODING_ASCII_US).GetBuffer(),
+ if(!pTableProps->GetProperty(rtl::OUStringToOString(aPropertyName, RTL_TEXTENCODING_ASCII_US).getStr(),
pAny))
throw IllegalArgumentException();
else if(pAny)
diff --git a/binfilter/bf_sw/source/ui/app/sw_docsh.cxx b/binfilter/bf_sw/source/ui/app/sw_docsh.cxx
index 5f7f7fa74..2032c1606 100644
--- a/binfilter/bf_sw/source/ui/app/sw_docsh.cxx
+++ b/binfilter/bf_sw/source/ui/app/sw_docsh.cxx
@@ -185,8 +185,8 @@ SFX_IMPL_OBJECTFACTORY_DLL(SwDocShell, SFXOBJECTSHELL_STD_NORMAL|SFXOBJECTSHELL_
if(pSet && SFX_ITEM_SET == pSet->GetItemState(SID_PASSWORD, TRUE, &pItem))
{
DBG_ASSERT(pItem->IsA( TYPE(SfxStringItem) ), "Fehler Parametertype");
- ByteString aLclPasswd( ((const SfxStringItem *)pItem)->GetValue(),
- osl_getThreadTextEncoding() );
+ rtl::OString aLclPasswd(rtl::OUStringToOString(((const SfxStringItem *)pItem)->GetValue(),
+ osl_getThreadTextEncoding()));
aStor->SetKey( aLclPasswd );
}
// Fuer's Dokument-Einfuegen noch die FF-Version, wenn's der
diff --git a/binfilter/bf_xmloff/source/chart/xmloff_SchXMLExport.cxx b/binfilter/bf_xmloff/source/chart/xmloff_SchXMLExport.cxx
index 6b700a9ef..fae1ada15 100644
--- a/binfilter/bf_xmloff/source/chart/xmloff_SchXMLExport.cxx
+++ b/binfilter/bf_xmloff/source/chart/xmloff_SchXMLExport.cxx
@@ -1006,11 +1006,10 @@ void SchXMLExportHelper::exportPlotArea( uno::Reference< chart::XDiagram > xDiag
xDiaProp->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "NumberOfLines" )))
>>= nNumberOfLinesInBarChart;
}
- catch( uno::Exception & aEx )
+ catch(const uno::Exception & aEx)
{
- String aStr( aEx.Message );
- ByteString aBStr( aStr, RTL_TEXTENCODING_ASCII_US );
- OSL_TRACE( "Exception caught for property NumberOfLines: %s", aBStr.GetBuffer());
+ rtl::OString aBStr(rtl::OUStringToOString(aEx.Message, RTL_TEXTENCODING_ASCII_US));
+ OSL_TRACE( "Exception caught for property NumberOfLines: %s", aBStr.getStr());
}
}
else if( 0 == xDiagram->getDiagramType().reverseCompareToAsciiL(
@@ -1022,11 +1021,10 @@ void SchXMLExportHelper::exportPlotArea( uno::Reference< chart::XDiagram > xDiag
xDiaProp->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Volume" )))
>>= bStockHasVolume;
}
- catch( uno::Exception & aEx )
+ catch (const uno::Exception & aEx)
{
- String aStr( aEx.Message );
- ByteString aBStr( aStr, RTL_TEXTENCODING_ASCII_US );
- OSL_TRACE( "Exception caught for property Volume: %s", aBStr.GetBuffer());
+ rtl::OString aBStr(rtl::OUStringToOString(aEx.Message, RTL_TEXTENCODING_ASCII_US));
+ OSL_TRACE( "Exception caught for property Volume: %s", aBStr.getStr());
}
}
}
diff --git a/binfilter/bf_xmloff/source/chart/xmloff_SchXMLPlotAreaContext.cxx b/binfilter/bf_xmloff/source/chart/xmloff_SchXMLPlotAreaContext.cxx
index b2d54a6e4..d0c9125aa 100644
--- a/binfilter/bf_xmloff/source/chart/xmloff_SchXMLPlotAreaContext.cxx
+++ b/binfilter/bf_xmloff/source/chart/xmloff_SchXMLPlotAreaContext.cxx
@@ -365,11 +365,10 @@ void SchXMLPlotAreaContext::EndElement()
xProp->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "NumberOfLines" )),
uno::makeAny( mnNumOfLines ));
}
- catch( uno::Exception & aEx )
+ catch (const uno::Exception & aEx)
{
- String aStr( aEx.Message );
- ByteString aBStr( aStr, RTL_TEXTENCODING_ASCII_US );
- OSL_TRACE( "Exception caught for property NumberOfLines: %s", aBStr.GetBuffer());
+ rtl::OString aBStr(rtl::OUStringToOString(aEx.Message, RTL_TEXTENCODING_ASCII_US));
+ OSL_TRACE( "Exception caught for property NumberOfLines: %s", aBStr.getStr());
}
}
@@ -382,11 +381,10 @@ void SchXMLPlotAreaContext::EndElement()
xProp->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Volume" )),
uno::makeAny( mbStockHasVolume ));
}
- catch( uno::Exception & aEx )
+ catch (const uno::Exception & aEx)
{
- String aStr( aEx.Message );
- ByteString aBStr( aStr, RTL_TEXTENCODING_ASCII_US );
- OSL_TRACE( "Exception caught for property NumberOfLines: %s", aBStr.GetBuffer());
+ rtl::OString aBStr(rtl::OUStringToOString(aEx.Message, RTL_TEXTENCODING_ASCII_US));
+ OSL_TRACE( "Exception caught for property NumberOfLines: %s", aBStr.getStr());
}
}
}
diff --git a/binfilter/bf_xmloff/source/core/xmloff_xmlerror.cxx b/binfilter/bf_xmloff/source/core/xmloff_xmlerror.cxx
index 4717909e1..fc77b611e 100644
--- a/binfilter/bf_xmloff/source/core/xmloff_xmlerror.cxx
+++ b/binfilter/bf_xmloff/source/core/xmloff_xmlerror.cxx
@@ -196,9 +196,9 @@ void XMLErrors::AddRecord(
}
// convert to byte string and signal the error
- ByteString aError( String( sMessage.makeStringAndClear() ),
- RTL_TEXTENCODING_ASCII_US );
- OSL_FAIL( aError.GetBuffer() );
+ rtl::OString aError(rtl::OUStringToOString( sMessage.makeStringAndClear(),
+ RTL_TEXTENCODING_ASCII_US));
+ OSL_FAIL(aError.getStr());
#endif
}