[Libreoffice-commits] .: 3 commits - basic/source connectivity/source dbaccess/source editeng/source filter/source idl/source sc/source sd/source sfx2/source sot/source svl/source svtools/source svx/inc svx/source sw/source tools/inc tools/qa tools/source vcl/source vcl/win
Caolán McNamara
caolan at kemper.freedesktop.org
Wed Dec 21 05:45:33 PST 2011
basic/source/basmgr/basmgr.cxx | 11 +-
basic/source/classes/image.cxx | 16 +--
basic/source/classes/sbxmod.cxx | 4
basic/source/runtime/iosys.cxx | 2
basic/source/runtime/methods1.cxx | 4
basic/source/sbx/sbxbase.cxx | 18 ++--
basic/source/sbx/sbxcoll.cxx | 6 -
basic/source/sbx/sbxobj.cxx | 14 +--
basic/source/sbx/sbxvalue.cxx | 23 ++---
basic/source/sbx/sbxvar.cxx | 19 ++--
connectivity/source/drivers/dbase/DTable.cxx | 2
connectivity/source/drivers/dbase/dindexnode.cxx | 2
dbaccess/source/ui/tabledesign/TableRow.cxx | 16 +--
editeng/source/editeng/editobj.cxx | 15 +--
editeng/source/items/bulitem.cxx | 12 +-
editeng/source/items/flditem.cxx | 4
editeng/source/items/frmitems.cxx | 8 -
editeng/source/items/numitem.cxx | 6 -
editeng/source/items/textitem.cxx | 16 +--
filter/source/msfilter/mstoolbar.cxx | 2
idl/source/objects/bastype.cxx | 8 -
idl/source/objects/module.cxx | 20 ++--
idl/source/objects/object.cxx | 4
idl/source/objects/types.cxx | 8 -
sc/source/core/data/patattr.cxx | 8 -
sc/source/core/tool/autoform.cxx | 14 ++-
sc/source/core/tool/ddelink.cxx | 12 +-
sc/source/core/tool/zforauto.cxx | 4
sc/source/filter/ftools/ftools.cxx | 6 -
sc/source/filter/inc/ftools.hxx | 6 -
sc/source/filter/lotus/lotform.cxx | 6 -
sc/source/filter/qpro/qproform.cxx | 2
sc/source/ui/unoobj/scdetect.cxx | 2
sd/source/filter/eppt/epptso.cxx | 2
sd/source/filter/html/pubdlg.cxx | 48 +++++++----
sfx2/source/appl/appmisc.cxx | 4
sfx2/source/bastyp/sfxhtml.cxx | 2
sot/source/sdstor/ucbstorage.cxx | 5 -
svl/source/items/cntwall.cxx | 3
svl/source/items/poolitem.cxx | 8 -
svl/source/numbers/zformat.cxx | 13 +--
svtools/source/filter/igif/gifread.cxx | 4
svtools/source/graphic/grfmgr.cxx | 7 -
svtools/source/misc/imap.cxx | 37 +++-----
svtools/source/misc/templatefoldercache.cxx | 6 -
svtools/source/misc/transfer.cxx | 8 -
svtools/source/urlobj/inetimg.cxx | 8 -
svx/inc/svx/gallery1.hxx | 48 +++++------
svx/inc/svx/galmisc.hxx | 14 +--
svx/inc/svx/galtheme.hxx | 18 ++--
svx/source/gallery2/gallery1.cxx | 51 ++++--------
svx/source/gallery2/galobj.cxx | 36 ++------
svx/source/gallery2/galtheme.cxx | 19 +---
svx/source/items/hlnkitem.cxx | 32 +++----
svx/source/items/pageitem.cxx | 4
sw/source/core/doc/tblafmt.cxx | 14 +--
sw/source/filter/ww1/w1class.cxx | 2
sw/source/filter/ww8/ww8par.cxx | 2
sw/source/filter/ww8/ww8par2.cxx | 2
sw/source/filter/ww8/ww8scan.cxx | 21 +----
sw/source/filter/ww8/ww8scan.hxx | 5 -
sw/source/filter/ww8/ww8toolbar.cxx | 2
sw/source/ui/config/uinums.cxx | 24 ++---
sw/source/ui/dochdl/swdtflvr.cxx | 6 -
tools/inc/tools/inetmsg.hxx | 96 +++++++++++------------
tools/inc/tools/stream.hxx | 70 ++++++++++++++--
tools/qa/cppunit/test_stream.cxx | 59 ++++++++++++--
tools/source/inet/inetmsg.cxx | 22 ++---
tools/source/inet/inetstrm.cxx | 2
tools/source/stream/stream.cxx | 40 ++-------
vcl/source/gdi/animate.cxx | 6 -
vcl/source/gdi/cvtsvm.cxx | 11 +-
vcl/source/gdi/font.cxx | 8 -
vcl/source/gdi/jobset.cxx | 27 ++++--
vcl/source/gdi/metaact.cxx | 25 ++---
vcl/source/gdi/print.cxx | 21 +----
vcl/source/gdi/rendergraphic.cxx | 6 -
vcl/win/source/gdi/salgdi3.cxx | 13 +--
78 files changed, 610 insertions(+), 551 deletions(-)
New commits:
commit c1d49234e5e8e7faa84f4d118500a138decfb04e
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Dec 21 13:33:58 2011 +0000
tweak for pre language-defect #77
diff --git a/basic/source/sbx/sbxbase.cxx b/basic/source/sbx/sbxbase.cxx
index 7ab2d6c..9e1baf3 100644
--- a/basic/source/sbx/sbxbase.cxx
+++ b/basic/source/sbx/sbxbase.cxx
@@ -383,9 +383,9 @@ sal_Bool SbxInfo::LoadData( SvStream& rStrm, sal_uInt16 nVer )
{
aParams.Remove( 0, aParams.Count() );
sal_uInt16 nParam;
- aComment = read_lenPrefixed_uInt8s_ToOUString(rStrm,
+ aComment = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rStrm,
RTL_TEXTENCODING_ASCII_US);
- aHelpFile = read_lenPrefixed_uInt8s_ToOUString(rStrm,
+ aHelpFile = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rStrm,
RTL_TEXTENCODING_ASCII_US);
rStrm >> nHelpId >> nParam;
while( nParam-- )
@@ -393,7 +393,7 @@ sal_Bool SbxInfo::LoadData( SvStream& rStrm, sal_uInt16 nVer )
XubString aName;
sal_uInt16 nType, nFlags;
sal_uInt32 nUserData = 0;
- aName = read_lenPrefixed_uInt8s_ToOUString(rStrm,
+ aName = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rStrm,
RTL_TEXTENCODING_ASCII_US);
rStrm >> nType >> nFlags;
if( nVer > 1 )
@@ -407,15 +407,15 @@ sal_Bool SbxInfo::LoadData( SvStream& rStrm, sal_uInt16 nVer )
sal_Bool SbxInfo::StoreData( SvStream& rStrm ) const
{
- write_lenPrefixed_uInt8s_FromOUString(rStrm, aComment,
+ write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rStrm, aComment,
RTL_TEXTENCODING_ASCII_US );
- write_lenPrefixed_uInt8s_FromOUString(rStrm, aHelpFile,
+ write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rStrm, aHelpFile,
RTL_TEXTENCODING_ASCII_US);
rStrm << nHelpId << aParams.Count();
for( sal_uInt16 i = 0; i < aParams.Count(); i++ )
{
SbxParamInfo* p = aParams.GetObject( i );
- write_lenPrefixed_uInt8s_FromOUString(rStrm, p->aName,
+ write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rStrm, p->aName,
RTL_TEXTENCODING_ASCII_US);
rStrm << (sal_uInt16) p->eType
<< (sal_uInt16) p->nFlags
diff --git a/basic/source/sbx/sbxcoll.cxx b/basic/source/sbx/sbxcoll.cxx
index 9757387..0e3f911 100644
--- a/basic/source/sbx/sbxcoll.cxx
+++ b/basic/source/sbx/sbxcoll.cxx
@@ -279,7 +279,7 @@ sal_Bool SbxStdCollection::LoadData( SvStream& rStrm, sal_uInt16 nVer )
sal_Bool bRes = SbxCollection::LoadData( rStrm, nVer );
if( bRes )
{
- aElemClass = read_lenPrefixed_uInt8s_ToOUString(rStrm,
+ aElemClass = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rStrm,
RTL_TEXTENCODING_ASCII_US);
rStrm >> bAddRemoveOk;
}
@@ -291,7 +291,7 @@ sal_Bool SbxStdCollection::StoreData( SvStream& rStrm ) const
sal_Bool bRes = SbxCollection::StoreData( rStrm );
if( bRes )
{
- write_lenPrefixed_uInt8s_FromOUString(rStrm, aElemClass,
+ write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rStrm, aElemClass,
RTL_TEXTENCODING_ASCII_US);
rStrm << bAddRemoveOk;
}
diff --git a/basic/source/sbx/sbxobj.cxx b/basic/source/sbx/sbxobj.cxx
index 0c98fca..fd919d6 100644
--- a/basic/source/sbx/sbxobj.cxx
+++ b/basic/source/sbx/sbxobj.cxx
@@ -591,9 +591,9 @@ sal_Bool SbxObject::LoadData( SvStream& rStrm, sal_uInt16 nVer )
aData.pObj = this;
sal_uInt32 nSize;
XubString aDfltProp;
- aClassName = read_lenPrefixed_uInt8s_ToOUString(rStrm,
+ aClassName = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rStrm,
RTL_TEXTENCODING_ASCII_US);
- aDfltProp = read_lenPrefixed_uInt8s_ToOUString(rStrm,
+ aDfltProp = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rStrm,
RTL_TEXTENCODING_ASCII_US);
sal_uIntPtr nPos = rStrm.Tell();
rStrm >> nSize;
@@ -622,8 +622,8 @@ sal_Bool SbxObject::StoreData( SvStream& rStrm ) const
XubString aDfltProp;
if( pDfltProp )
aDfltProp = pDfltProp->GetName();
- write_lenPrefixed_uInt8s_FromOUString(rStrm, aClassName, RTL_TEXTENCODING_ASCII_US);
- write_lenPrefixed_uInt8s_FromOUString(rStrm, aDfltProp, RTL_TEXTENCODING_ASCII_US);
+ write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rStrm, aClassName, RTL_TEXTENCODING_ASCII_US);
+ write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rStrm, aDfltProp, RTL_TEXTENCODING_ASCII_US);
sal_uIntPtr nPos = rStrm.Tell();
rStrm << (sal_uInt32) 0L;
if( !StorePrivateData( rStrm ) )
@@ -799,7 +799,7 @@ void SbxObject::Dump( SvStream& rStrm, sal_Bool bFill )
aLine += aAttrs2;
if( !pVar->IsA( TYPE(SbxMethod) ) )
aLine.AppendAscii( " !! Not a Method !!" );
- write_lenPrefixed_uInt8s_FromOUString(rStrm, aLine, RTL_TEXTENCODING_ASCII_US);
+ write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rStrm, aLine, RTL_TEXTENCODING_ASCII_US);
// Output also the object at object-methods
if ( pVar->GetValues_Impl().eType == SbxOBJECT &&
@@ -832,7 +832,7 @@ void SbxObject::Dump( SvStream& rStrm, sal_Bool bFill )
aLine += aAttrs3;
if( !pVar->IsA( TYPE(SbxProperty) ) )
aLine.AppendAscii( " !! Not a Property !!" );
- write_lenPrefixed_uInt8s_FromOUString(rStrm, aLine, RTL_TEXTENCODING_ASCII_US);
+ write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rStrm, aLine, RTL_TEXTENCODING_ASCII_US);
// output also the object at object properties
if ( pVar->GetValues_Impl().eType == SbxOBJECT &&
diff --git a/basic/source/sbx/sbxvalue.cxx b/basic/source/sbx/sbxvalue.cxx
index 692959a..7f00ecc 100644
--- a/basic/source/sbx/sbxvalue.cxx
+++ b/basic/source/sbx/sbxvalue.cxx
@@ -1479,7 +1479,7 @@ sal_Bool SbxValue::LoadData( SvStream& r, sal_uInt16 )
case SbxSINGLE:
{
// Floats as ASCII
- XubString aVal = read_lenPrefixed_uInt8s_ToOUString(r,
+ XubString aVal = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(r,
RTL_TEXTENCODING_ASCII_US);
double d;
SbxDataType t;
@@ -1495,7 +1495,7 @@ sal_Bool SbxValue::LoadData( SvStream& r, sal_uInt16 )
case SbxDOUBLE:
{
// Floats as ASCII
- XubString aVal = read_lenPrefixed_uInt8s_ToOUString(r,
+ XubString aVal = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(r,
RTL_TEXTENCODING_ASCII_US);
SbxDataType t;
if( ImpScan( aVal, aData.nDouble, t, NULL ) != SbxERR_OK )
@@ -1524,7 +1524,7 @@ sal_Bool SbxValue::LoadData( SvStream& r, sal_uInt16 )
}
case SbxSTRING:
{
- rtl::OUString aVal = read_lenPrefixed_uInt8s_ToOUString(r,
+ rtl::OUString aVal = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(r,
RTL_TEXTENCODING_ASCII_US);
if( aVal.getLength() )
aData.pOUString = new ::rtl::OUString( aVal );
@@ -1621,12 +1621,12 @@ sal_Bool SbxValue::StoreData( SvStream& r ) const
case SbxDATE:
// #49935: Save as double, elsewise an error during the read in
((SbxValue*)this)->aData.eType = (SbxDataType)( ( nType & 0xF000 ) | SbxDOUBLE );
- write_lenPrefixed_uInt8s_FromOUString(r, GetCoreString(), RTL_TEXTENCODING_ASCII_US);
+ write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(r, GetCoreString(), RTL_TEXTENCODING_ASCII_US);
((SbxValue*)this)->aData.eType = (SbxDataType)nType;
break;
case SbxSINGLE:
case SbxDOUBLE:
- write_lenPrefixed_uInt8s_FromOUString(r, GetCoreString(), RTL_TEXTENCODING_ASCII_US);
+ write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(r, GetCoreString(), RTL_TEXTENCODING_ASCII_US);
break;
case SbxSALUINT64:
case SbxSALINT64:
@@ -1643,11 +1643,11 @@ sal_Bool SbxValue::StoreData( SvStream& r ) const
case SbxSTRING:
if( aData.pOUString )
{
- write_lenPrefixed_uInt8s_FromOUString(r, *aData.pOUString, RTL_TEXTENCODING_ASCII_US);
+ write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(r, *aData.pOUString, RTL_TEXTENCODING_ASCII_US);
}
else
{
- write_lenPrefixed_uInt8s_FromOUString(r, rtl::OUString(), RTL_TEXTENCODING_ASCII_US);
+ write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(r, rtl::OUString(), RTL_TEXTENCODING_ASCII_US);
}
break;
case SbxERROR:
diff --git a/basic/source/sbx/sbxvar.cxx b/basic/source/sbx/sbxvar.cxx
index 6ca2533..386c8d3 100644
--- a/basic/source/sbx/sbxvar.cxx
+++ b/basic/source/sbx/sbxvar.cxx
@@ -445,7 +445,7 @@ sal_Bool SbxVariable::LoadData( SvStream& rStrm, sal_uInt16 nVer )
{
if( !SbxValue::LoadData( rStrm, nVer ) )
return sal_False;
- maName = read_lenPrefixed_uInt8s_ToOUString(rStrm,
+ maName = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rStrm,
RTL_TEXTENCODING_ASCII_US);
sal_uInt32 nTemp;
rStrm >> nTemp;
@@ -455,7 +455,7 @@ sal_Bool SbxVariable::LoadData( SvStream& rStrm, sal_uInt16 nVer )
{
rStrm.SeekRel( -1L );
rStrm >> nType;
- maName = read_lenPrefixed_uInt8s_ToOUString(rStrm,
+ maName = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rStrm,
RTL_TEXTENCODING_ASCII_US);
sal_uInt32 nTemp;
rStrm >> nTemp;
@@ -479,7 +479,7 @@ sal_Bool SbxVariable::LoadData( SvStream& rStrm, sal_uInt16 nVer )
case SbxSINGLE:
{
// Floats as ASCII
- aTmpString = read_lenPrefixed_uInt8s_ToOUString(
+ aTmpString = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(
rStrm, RTL_TEXTENCODING_ASCII_US);
double d;
SbxDataType t;
@@ -495,7 +495,7 @@ sal_Bool SbxVariable::LoadData( SvStream& rStrm, sal_uInt16 nVer )
case SbxDOUBLE:
{
// Floats as ASCII
- aTmpString = read_lenPrefixed_uInt8s_ToOUString(rStrm,
+ aTmpString = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rStrm,
RTL_TEXTENCODING_ASCII_US);
SbxDataType t;
if( ImpScan( aTmpString, aTmp.nDouble, t, NULL ) != SbxERR_OK )
@@ -506,7 +506,7 @@ sal_Bool SbxVariable::LoadData( SvStream& rStrm, sal_uInt16 nVer )
break;
}
case SbxSTRING:
- aVal = read_lenPrefixed_uInt8s_ToOUString(rStrm,
+ aVal = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rStrm,
RTL_TEXTENCODING_ASCII_US);
break;
case SbxEMPTY:
@@ -565,7 +565,7 @@ sal_Bool SbxVariable::StoreData( SvStream& rStrm ) const
bValStore = SbxValue::StoreData( rStrm );
if( !bValStore )
return sal_False;
- write_lenPrefixed_uInt8s_FromOUString(rStrm, maName,
+ write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rStrm, maName,
RTL_TEXTENCODING_ASCII_US);
rStrm << (sal_uInt32)nUserData;
if( pInfo.Is() )
diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx
index 8435e66..e6ca9a5 100644
--- a/editeng/source/editeng/editobj.cxx
+++ b/editeng/source/editeng/editobj.cxx
@@ -1131,10 +1131,10 @@ void BinTextObject::StoreData( SvStream& rOStream ) const
// Convert CH_FEATURE to CH_FEATURE_OLD
aText.SearchAndReplaceAll( cFeatureConverted, CH_FEATURE_OLD );
- write_lenPrefixed_uInt8s_FromOString(rOStream, aText);
+ write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rOStream, aText);
// StyleName and Family...
- write_lenPrefixed_uInt8s_FromOUString(rOStream, pC->GetStyle(), eEncoding);
+ write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOStream, pC->GetStyle(), eEncoding);
rOStream << (sal_uInt16)pC->GetFamily();
// Paragraph attributes ...
@@ -1226,7 +1226,7 @@ void BinTextObject::CreateData( SvStream& rIStream )
ContentInfo* pC = CreateAndInsertContent();
// The Text...
- ByteString aByteString = read_lenPrefixed_uInt8s_ToOString(rIStream);
+ ByteString aByteString = read_lenPrefixed_uInt8s_ToOString<sal_uInt16>(rIStream);
pC->GetText() = rtl::OStringToOUString(aByteString, eSrcEncoding);
// StyleName and Family...
diff --git a/idl/source/objects/bastype.cxx b/idl/source/objects/bastype.cxx
index afeb004..365d5f3 100644
--- a/idl/source/objects/bastype.cxx
+++ b/idl/source/objects/bastype.cxx
@@ -228,13 +228,13 @@ sal_Bool SvIdentifier::WriteSvIdl( SvStringHashEntry * pName,
SvStream& operator << (SvStream & rStm, const SvIdentifier & r )
{
- write_lenPrefixed_uInt8s_FromOString(rStm, r);
+ write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rStm, r);
return rStm;
}
SvStream& operator >> (SvStream & rStm, SvIdentifier & r )
{
- r = read_lenPrefixed_uInt8s_ToOString(rStm);
+ r = read_lenPrefixed_uInt8s_ToOString<sal_uInt16>(rStm);
return rStm;
}
@@ -343,13 +343,13 @@ sal_Bool SvString::WriteSvIdl( SvStringHashEntry * pName, SvStream & rOutStm,
SvStream& operator << (SvStream & rStm, const SvString & r )
{
- write_lenPrefixed_uInt8s_FromOString(rStm, r);
+ write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rStm, r);
return rStm;
}
SvStream& operator >> (SvStream & rStm, SvString & r )
{
- r = read_lenPrefixed_uInt8s_ToOString(rStm);
+ r = read_lenPrefixed_uInt8s_ToOString<sal_uInt16>(rStm);
return rStm;
}
diff --git a/idl/source/objects/module.cxx b/idl/source/objects/module.cxx
index e8e6542..8766f10 100644
--- a/idl/source/objects/module.cxx
+++ b/idl/source/objects/module.cxx
@@ -66,9 +66,9 @@ void SvMetaModule::Load( SvPersistStream & rStm )
rStm >> aAttrList;
// browser
rStm.ReadUniOrByteString( aIdlFileName, rStm.GetStreamCharSet() );
- aHelpFileName = read_lenPrefixed_uInt8s_ToOString(rStm);
- aSlotIdFile = read_lenPrefixed_uInt8s_ToOString(rStm);
- aModulePrefix = read_lenPrefixed_uInt8s_ToOString(rStm);
+ aHelpFileName = read_lenPrefixed_uInt8s_ToOString<sal_uInt16>(rStm);
+ aSlotIdFile = read_lenPrefixed_uInt8s_ToOString<sal_uInt16>(rStm);
+ aModulePrefix = read_lenPrefixed_uInt8s_ToOString<sal_uInt16>(rStm);
// read compiler data
sal_uInt16 nCmpLen;
@@ -91,9 +91,9 @@ void SvMetaModule::Save( SvPersistStream & rStm )
rStm << aAttrList;
// browser
rStm.WriteUniOrByteString( aIdlFileName, rStm.GetStreamCharSet() );
- write_lenPrefixed_uInt8s_FromOString(rStm, aHelpFileName);
- write_lenPrefixed_uInt8s_FromOString(rStm, aSlotIdFile);
- write_lenPrefixed_uInt8s_FromOString(rStm, aModulePrefix);
+ write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rStm, aHelpFileName);
+ write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rStm, aSlotIdFile);
+ write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rStm, aModulePrefix);
// write compiler data
sal_uInt16 nCmpLen = 0;
diff --git a/idl/source/objects/object.cxx b/idl/source/objects/object.cxx
index 798acbc..9388843 100644
--- a/idl/source/objects/object.cxx
+++ b/idl/source/objects/object.cxx
@@ -55,7 +55,7 @@ void SvClassElement::Load( SvPersistStream & rStm )
return;
}
if( nMask & 0x01 ) rStm >> aAutomation;
- if( nMask & 0x02 ) aPrefix = read_lenPrefixed_uInt8s_ToOString(rStm);
+ if( nMask & 0x02 ) aPrefix = read_lenPrefixed_uInt8s_ToOString<sal_uInt16>(rStm);
if( nMask & 0x04 )
{
SvMetaClass * p;
@@ -75,7 +75,7 @@ void SvClassElement::Save( SvPersistStream & rStm )
// write data
rStm << nMask;
if( nMask & 0x01 ) rStm << aAutomation;
- if( nMask & 0x02 ) write_lenPrefixed_uInt8s_FromOString(rStm, aPrefix);
+ if( nMask & 0x02 ) write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rStm, aPrefix);
if( nMask & 0x04 ) rStm << xClass;
}
diff --git a/idl/source/objects/types.cxx b/idl/source/objects/types.cxx
index f2488aa..1063baa 100644
--- a/idl/source/objects/types.cxx
+++ b/idl/source/objects/types.cxx
@@ -1780,7 +1780,7 @@ void SvMetaEnumValue::Load( SvPersistStream & rStm )
OSL_FAIL( "wrong format" );
return;
}
- if( nMask & 0x01 ) aEnumValue = read_lenPrefixed_uInt8s_ToOString(rStm);
+ if( nMask & 0x01 ) aEnumValue = read_lenPrefixed_uInt8s_ToOString<sal_uInt16>(rStm);
}
void SvMetaEnumValue::Save( SvPersistStream & rStm )
@@ -1793,7 +1793,7 @@ void SvMetaEnumValue::Save( SvPersistStream & rStm )
// write data
rStm << nMask;
- if( nMask & 0x01 ) write_lenPrefixed_uInt8s_FromOString(rStm, aEnumValue);
+ if( nMask & 0x01 ) write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rStm, aEnumValue);
}
sal_Bool SvMetaEnumValue::ReadSvIdl( SvIdlDataBase & rBase,
@@ -1837,7 +1837,7 @@ void SvMetaTypeEnum::Load( SvPersistStream & rStm )
return;
}
if( nMask & 0x01 ) rStm >> aEnumValueList;
- if( nMask & 0x02 ) aPrefix = read_lenPrefixed_uInt8s_ToOString(rStm);
+ if( nMask & 0x02 ) aPrefix = read_lenPrefixed_uInt8s_ToOString<sal_uInt16>(rStm);
}
void SvMetaTypeEnum::Save( SvPersistStream & rStm )
@@ -1852,7 +1852,7 @@ void SvMetaTypeEnum::Save( SvPersistStream & rStm )
// write data
rStm << nMask;
if( nMask & 0x01 ) rStm << aEnumValueList;
- if( nMask & 0x02 ) write_lenPrefixed_uInt8s_FromOString(rStm, aPrefix);
+ if( nMask & 0x02 ) write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rStm, aPrefix);
}
void SvMetaTypeEnum::ReadContextSvIdl( SvIdlDataBase & rBase,
diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx
index 61b8355..c938a17 100644
--- a/sc/source/core/tool/autoform.cxx
+++ b/sc/source/core/tool/autoform.cxx
@@ -799,7 +799,7 @@ sal_Bool ScAutoFormatData::Load( SvStream& rStream, const ScAfVersions& rVersion
// --- from 680/dr25 on: store strings as UTF-8
if (nVer >= AUTOFORMAT_ID_680DR25)
{
- aName = read_lenPrefixed_uInt8s_ToOUString(rStream,
+ aName = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rStream,
RTL_TEXTENCODING_UTF8);
}
else
@@ -869,7 +869,7 @@ sal_Bool ScAutoFormatData::Save(SvStream& rStream)
sal_Bool b;
rStream << nVal;
// --- from 680/dr25 on: store strings as UTF-8
- write_lenPrefixed_uInt8s_FromOUString(rStream, aName, RTL_TEXTENCODING_UTF8);
+ write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rStream, aName, RTL_TEXTENCODING_UTF8);
rStream << nStrResId;
rStream << ( b = bIncludeFont );
diff --git a/sd/source/filter/html/pubdlg.cxx b/sd/source/filter/html/pubdlg.cxx
index 5571461..0e41298 100644
--- a/sd/source/filter/html/pubdlg.cxx
+++ b/sd/source/filter/html/pubdlg.cxx
@@ -267,24 +267,24 @@ SvStream& operator >> (SvStream& rIn, SdPublishingDesign& rDesign)
sal_uInt16 nTemp16;
- rDesign.m_aDesignName = read_lenPrefixed_uInt8s_ToOUString(rIn,
+ rDesign.m_aDesignName = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIn,
RTL_TEXTENCODING_UTF8);
rIn >> nTemp16;
rDesign.m_eMode = (HtmlPublishMode)nTemp16;
rIn >> rDesign.m_bContentPage;
rIn >> rDesign.m_bNotes;
rIn >> rDesign.m_nResolution;
- rDesign.m_aCompression = read_lenPrefixed_uInt8s_ToOUString(rIn,
+ rDesign.m_aCompression = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIn,
RTL_TEXTENCODING_UTF8);
rIn >> nTemp16;
rDesign.m_eFormat = (PublishingFormat)nTemp16;
- rDesign.m_aAuthor = read_lenPrefixed_uInt8s_ToOUString(rIn,
+ rDesign.m_aAuthor = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIn,
RTL_TEXTENCODING_UTF8);
- rDesign.m_aEMail = read_lenPrefixed_uInt8s_ToOUString(rIn,
+ rDesign.m_aEMail = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIn,
RTL_TEXTENCODING_UTF8);
- rDesign.m_aWWW = read_lenPrefixed_uInt8s_ToOUString(rIn,
+ rDesign.m_aWWW = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIn,
RTL_TEXTENCODING_UTF8);
- rDesign.m_aMisc = read_lenPrefixed_uInt8s_ToOUString(rIn,
+ rDesign.m_aMisc = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIn,
RTL_TEXTENCODING_UTF8);
rIn >> rDesign.m_bDownload;
rIn >> rDesign.m_bCreated; // not used
@@ -300,9 +300,9 @@ SvStream& operator >> (SvStream& rIn, SdPublishingDesign& rDesign)
rIn >> nTemp16;
rDesign.m_eScript = (PublishingScript)nTemp16;
- rDesign.m_aURL = read_lenPrefixed_uInt8s_ToOUString(rIn,
+ rDesign.m_aURL = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIn,
RTL_TEXTENCODING_UTF8);
- rDesign.m_aCGI = read_lenPrefixed_uInt8s_ToOUString(rIn,
+ rDesign.m_aCGI = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIn,
RTL_TEXTENCODING_UTF8);
rIn >> rDesign.m_bAutoSlide;
@@ -323,23 +323,23 @@ SvStream& operator << (SvStream& rOut, const SdPublishingDesign& rDesign)
SdIOCompat aIO(rOut, STREAM_WRITE, 0);
// Name
- write_lenPrefixed_uInt8s_FromOUString(rOut, rDesign.m_aDesignName,
+ write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOut, rDesign.m_aDesignName,
RTL_TEXTENCODING_UTF8);
rOut << (sal_uInt16)rDesign.m_eMode;
rOut << rDesign.m_bContentPage;
rOut << rDesign.m_bNotes;
rOut << rDesign.m_nResolution;
- write_lenPrefixed_uInt8s_FromOUString(rOut, rDesign.m_aCompression,
+ write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOut, rDesign.m_aCompression,
RTL_TEXTENCODING_UTF8);
rOut << (sal_uInt16)rDesign.m_eFormat;
- write_lenPrefixed_uInt8s_FromOUString(rOut, rDesign.m_aAuthor,
+ write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOut, rDesign.m_aAuthor,
RTL_TEXTENCODING_UTF8);
- write_lenPrefixed_uInt8s_FromOUString(rOut, rDesign.m_aEMail,
+ write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOut, rDesign.m_aEMail,
RTL_TEXTENCODING_UTF8);
- write_lenPrefixed_uInt8s_FromOUString(rOut, rDesign.m_aWWW,
+ write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOut, rDesign.m_aWWW,
RTL_TEXTENCODING_UTF8);
- write_lenPrefixed_uInt8s_FromOUString(rOut, rDesign.m_aMisc,
+ write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOut, rDesign.m_aMisc,
RTL_TEXTENCODING_UTF8);
rOut << rDesign.m_bDownload;
rOut << rDesign.m_bCreated; // not used
@@ -354,9 +354,9 @@ SvStream& operator << (SvStream& rOut, const SdPublishingDesign& rDesign)
rOut << rDesign.m_bUseColor;
rOut << (sal_uInt16)rDesign.m_eScript;
- write_lenPrefixed_uInt8s_FromOUString(rOut, rDesign.m_aURL,
+ write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOut, rDesign.m_aURL,
RTL_TEXTENCODING_UTF8);
- write_lenPrefixed_uInt8s_FromOUString(rOut, rDesign.m_aCGI,
+ write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOut, rDesign.m_aCGI,
RTL_TEXTENCODING_UTF8);
rOut << rDesign.m_bAutoSlide;
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index 49c7bd3..6fdf5fb 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -3303,7 +3303,7 @@ String UCBStorage::GetLinkedFile( SvStream &rStream )
rStream >> nBytes;
if( nBytes == 0x04034b50 )
{
- ByteString aTmp = read_lenPrefixed_uInt8s_ToOString(rStream);
+ ByteString aTmp = read_lenPrefixed_uInt8s_ToOString<sal_uInt16>(rStream);
if ( aTmp.CompareTo( "ContentURL=", 11 ) == COMPARE_EQUAL )
{
aTmp.Erase( 0, 11 );
@@ -3375,7 +3375,7 @@ String UCBStorage::CreateLinkFile( const String& rName )
// store it as key/value pair
String aLink = String::CreateFromAscii("ContentURL=");
aLink += aURL;
- write_lenPrefixed_uInt8s_FromOUString(*pStream, aLink, RTL_TEXTENCODING_UTF8);
+ write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(*pStream, aLink, RTL_TEXTENCODING_UTF8);
pStream->Flush();
// move the stream to its desired location
diff --git a/svl/source/items/cntwall.cxx b/svl/source/items/cntwall.cxx
index 31ef07e..245596e 100644
--- a/svl/source/items/cntwall.cxx
+++ b/svl/source/items/cntwall.cxx
@@ -80,7 +80,7 @@ CntWallpaperItem::CntWallpaperItem( sal_uInt16 which, SvStream& rStream, sal_uIn
readUnicodeString(rStream, _aURL, false);
// "Read" SfxWallpaperItem's string member _aFilter.
- read_lenPrefixed_uInt8s_ToOString(rStream);
+ read_lenPrefixed_uInt8s_ToOString<sal_uInt16>(rStream);
}
}
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index 852e16d..0414185 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -1768,7 +1768,7 @@ void SvNumberformat::ConvertLanguage( SvNumberFormatter& rConverter,
void SvNumberformat::LoadString( SvStream& rStream, String& rStr )
{
CharSet eStream = rStream.GetStreamCharSet();
- ByteString aStr = read_lenPrefixed_uInt8s_ToOString(rStream);
+ ByteString aStr = read_lenPrefixed_uInt8s_ToOString<sal_uInt16>(rStream);
sal_Char cStream = NfCurrencyEntry::GetEuroSymbol( eStream );
if ( aStr.Search( cStream ) == STRING_NOTFOUND )
{ // simple conversion to unicode
diff --git a/svtools/source/graphic/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx
index db3e872..eec9b4f 100644
--- a/svtools/source/graphic/grfmgr.cxx
+++ b/svtools/source/graphic/grfmgr.cxx
@@ -1134,7 +1134,7 @@ SvStream& operator>>( SvStream& rIStm, GraphicObject& rGraphicObj )
if( bLink )
{
- rtl::OUString aLink = read_lenPrefixed_uInt8s_ToOUString(rIStm, RTL_TEXTENCODING_UTF8);
+ rtl::OUString aLink = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIStm, RTL_TEXTENCODING_UTF8);
rGraphicObj.SetLink(aLink);
}
else
@@ -1153,7 +1153,7 @@ SvStream& operator<<( SvStream& rOStm, const GraphicObject& rGraphicObj )
rOStm << rGraphicObj.GetGraphic() << rGraphicObj.GetAttr() << bLink;
if( bLink )
- write_lenPrefixed_uInt8s_FromOUString(rOStm, rGraphicObj.GetLink(), RTL_TEXTENCODING_UTF8);
+ write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOStm, rGraphicObj.GetLink(), RTL_TEXTENCODING_UTF8);
return rOStm;
}
diff --git a/svtools/source/misc/imap.cxx b/svtools/source/misc/imap.cxx
index bb720f6..d4199e2 100644
--- a/svtools/source/misc/imap.cxx
+++ b/svtools/source/misc/imap.cxx
@@ -104,16 +104,16 @@ void IMapObject::Write( SvStream& rOStm, const String& rBaseURL ) const
const rtl::OString aRelURL = rtl::OUStringToOString(
URIHelper::simpleNormalizedMakeRelative(rBaseURL, aURL), eEncoding);
- write_lenPrefixed_uInt8s_FromOString(rOStm, aRelURL);
- write_lenPrefixed_uInt8s_FromOUString(rOStm, aAltText, eEncoding);
+ write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rOStm, aRelURL);
+ write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOStm, aAltText, eEncoding);
rOStm << bActive;
- write_lenPrefixed_uInt8s_FromOUString(rOStm, aTarget, eEncoding);
+ write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOStm, aTarget, eEncoding);
pCompat = new IMapCompat( rOStm, STREAM_WRITE );
WriteIMapObject( rOStm );
aEventList.Write( rOStm ); // V4
- write_lenPrefixed_uInt8s_FromOUString(rOStm, aName, eEncoding); // V5
+ write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOStm, aName, eEncoding); // V5
delete pCompat;
}
@@ -134,10 +134,10 @@ void IMapObject::Read( SvStream& rIStm, const String& rBaseURL )
rIStm.SeekRel( 2 );
rIStm >> nReadVersion;
rIStm >> nTextEncoding;
- aURL = read_lenPrefixed_uInt8s_ToOUString(rIStm, nTextEncoding);
- aAltText = read_lenPrefixed_uInt8s_ToOUString(rIStm, nTextEncoding);
+ aURL = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIStm, nTextEncoding);
+ aAltText = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIStm, nTextEncoding);
rIStm >> bActive;
- aTarget = read_lenPrefixed_uInt8s_ToOUString(rIStm, nTextEncoding);
+ aTarget = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIStm, nTextEncoding);
// URL absolut machen
aURL = URIHelper::SmartRel2Abs( INetURLObject(rBaseURL), aURL, URIHelper::GetMaybeFileHdl(), true, false, INetURLObject::WAS_ENCODED, INetURLObject::DECODE_UNAMBIGUOUS );
@@ -152,7 +152,7 @@ void IMapObject::Read( SvStream& rIStm, const String& rBaseURL )
// ab Version 5 kann ein Objektname vorhanden sein
if ( nReadVersion >= 0x0005 )
- aName = read_lenPrefixed_uInt8s_ToOUString(rIStm, nTextEncoding);
+ aName = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIStm, nTextEncoding);
}
delete pCompat;
@@ -1123,10 +1123,10 @@ void ImageMap::Write( SvStream& rOStm, const String& rBaseURL ) const
// MagicCode schreiben
rOStm << IMAPMAGIC;
rOStm << GetVersion();
- write_lenPrefixed_uInt8s_FromOUString(rOStm, aImageName, eEncoding);
- write_lenPrefixed_uInt8s_FromOString(rOStm, rtl::OString()); //dummy
+ write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOStm, aImageName, eEncoding);
+ write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rOStm, rtl::OString()); //dummy
rOStm << nCount;
- write_lenPrefixed_uInt8s_FromOUString(rOStm, aImageName, eEncoding);
+ write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOStm, aImageName, eEncoding);
pCompat = new IMapCompat( rOStm, STREAM_WRITE );
@@ -1165,10 +1165,10 @@ void ImageMap::Read( SvStream& rIStm, const String& rBaseURL )
// Version ueberlesen wir
rIStm.SeekRel( 2 );
- aName = read_lenPrefixed_uInt8s_ToOUString(rIStm, osl_getThreadTextEncoding());
- read_lenPrefixed_uInt8s_ToOString(rIStm); // Dummy
+ aName = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIStm, osl_getThreadTextEncoding());
+ read_lenPrefixed_uInt8s_ToOString<sal_uInt16>(rIStm); // Dummy
rIStm >> nCount;
- read_lenPrefixed_uInt8s_ToOString(rIStm); // Dummy
+ read_lenPrefixed_uInt8s_ToOString<sal_uInt16>(rIStm); // Dummy
pCompat = new IMapCompat( rIStm, STREAM_READ );
diff --git a/svx/source/gallery2/gallery1.cxx b/svx/source/gallery2/gallery1.cxx
index 9b7cfe2..2170c1f 100644
--- a/svx/source/gallery2/gallery1.cxx
+++ b/svx/source/gallery2/gallery1.cxx
@@ -132,12 +132,12 @@ void GalleryThemeEntry::SetId( sal_uInt32 nNewId, sal_Bool bResetThemeName )
SvStream& operator<<( SvStream& rOut, const GalleryImportThemeEntry& rEntry )
{
- write_lenPrefixed_uInt8s_FromOUString(rOut, rEntry.aThemeName, RTL_TEXTENCODING_UTF8);
- write_lenPrefixed_uInt8s_FromOUString(rOut, rEntry.aUIName, RTL_TEXTENCODING_UTF8);
- write_lenPrefixed_uInt8s_FromOUString(rOut, (rEntry.aURL.GetMainURL( INetURLObject::NO_DECODE )), RTL_TEXTENCODING_UTF8);
- write_lenPrefixed_uInt8s_FromOUString(rOut, rEntry.aImportName, RTL_TEXTENCODING_UTF8);
+ write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOut, rEntry.aThemeName, RTL_TEXTENCODING_UTF8);
+ write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOut, rEntry.aUIName, RTL_TEXTENCODING_UTF8);
+ write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOut, (rEntry.aURL.GetMainURL( INetURLObject::NO_DECODE )), RTL_TEXTENCODING_UTF8);
+ write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOut, rEntry.aImportName, RTL_TEXTENCODING_UTF8);
- write_lenPrefixed_uInt8s_FromOString(rOut, rtl::OString());
+ write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rOut, rtl::OString());
return rOut;
}
@@ -145,11 +145,11 @@ SvStream& operator<<( SvStream& rOut, const GalleryImportThemeEntry& rEntry )
SvStream& operator>>( SvStream& rIn, GalleryImportThemeEntry& rEntry )
{
- rEntry.aThemeName = read_lenPrefixed_uInt8s_ToOUString(rIn, RTL_TEXTENCODING_UTF8);
- rEntry.aUIName = read_lenPrefixed_uInt8s_ToOUString(rIn, RTL_TEXTENCODING_UTF8);
- rEntry.aURL = read_lenPrefixed_uInt8s_ToOUString(rIn, RTL_TEXTENCODING_UTF8);
- rEntry.aImportName = read_lenPrefixed_uInt8s_ToOUString(rIn, RTL_TEXTENCODING_UTF8);
- read_lenPrefixed_uInt8s_ToOString(rIn);
+ rEntry.aThemeName = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIn, RTL_TEXTENCODING_UTF8);
+ rEntry.aUIName = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIn, RTL_TEXTENCODING_UTF8);
+ rEntry.aURL = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIn, RTL_TEXTENCODING_UTF8);
+ rEntry.aImportName = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIn, RTL_TEXTENCODING_UTF8);
+ read_lenPrefixed_uInt8s_ToOString<sal_uInt16>(rIn);
return rIn;
}
diff --git a/svx/source/gallery2/galobj.cxx b/svx/source/gallery2/galobj.cxx
index ddf56cb..9bfa16b 100644
--- a/svx/source/gallery2/galobj.cxx
+++ b/svx/source/gallery2/galobj.cxx
@@ -168,7 +168,7 @@ void SgaObject::WriteData( SvStream& rOut, const String& rDestDir ) const
String aURLWithoutDestDir = String(aURL.GetMainURL( INetURLObject::NO_DECODE ));
aURLWithoutDestDir.SearchAndReplace(rDestDir, String());
- write_lenPrefixed_uInt8s_FromOUString(rOut, aURLWithoutDestDir, RTL_TEXTENCODING_UTF8);
+ write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOut, aURLWithoutDestDir, RTL_TEXTENCODING_UTF8);
}
// ------------------------------------------------------------------------
@@ -185,7 +185,7 @@ void SgaObject::ReadData(SvStream& rIn, sal_uInt16& rReadVersion )
else
rIn >> aThumbMtf;
- rtl::OUString aTmpStr = read_lenPrefixed_uInt8s_ToOUString(rIn, RTL_TEXTENCODING_UTF8);
+ rtl::OUString aTmpStr = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIn, RTL_TEXTENCODING_UTF8);
aURL = INetURLObject(aTmpStr);
}
@@ -293,8 +293,8 @@ void SgaObjectBmp::WriteData( SvStream& rOut, const String& rDestDir ) const
SgaObject::WriteData( rOut, rDestDir );
char aDummy[ 10 ];
rOut.Write( aDummy, 10 );
- write_lenPrefixed_uInt8s_FromOString(rOut, rtl::OString()); //dummy
- write_lenPrefixed_uInt8s_FromOUString(rOut, aTitle, RTL_TEXTENCODING_UTF8);
+ write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rOut, rtl::OString()); //dummy
+ write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOut, aTitle, RTL_TEXTENCODING_UTF8);
}
// ------------------------------------------------------------------------
@@ -304,10 +304,10 @@ void SgaObjectBmp::ReadData( SvStream& rIn, sal_uInt16& rReadVersion )
SgaObject::ReadData( rIn, rReadVersion );
rIn.SeekRel( 10 ); // 16, 16, 32, 16
- read_lenPrefixed_uInt8s_ToOString(rIn); //dummy
+ read_lenPrefixed_uInt8s_ToOString<sal_uInt16>(rIn); //dummy
if( rReadVersion >= 5 )
- aTitle = read_lenPrefixed_uInt8s_ToOUString(rIn, RTL_TEXTENCODING_UTF8);
+ aTitle = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIn, RTL_TEXTENCODING_UTF8);
}
// ------------------
@@ -374,7 +374,7 @@ void SgaObjectSound::WriteData( SvStream& rOut, const String& rDestDir ) const
{
SgaObject::WriteData( rOut, rDestDir );
rOut << (sal_uInt16) eSoundType;
- write_lenPrefixed_uInt8s_FromOUString(rOut, aTitle, RTL_TEXTENCODING_UTF8);
+ write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOut, aTitle, RTL_TEXTENCODING_UTF8);
}
// ------------------------------------------------------------------------
@@ -390,7 +390,7 @@ void SgaObjectSound::ReadData( SvStream& rIn, sal_uInt16& rReadVersion )
rIn >> nTmp16; eSoundType = (GalSoundType) nTmp16;
if( rReadVersion >= 6 )
- aTitle = read_lenPrefixed_uInt8s_ToOUString(rIn, RTL_TEXTENCODING_UTF8);
+ aTitle = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIn, RTL_TEXTENCODING_UTF8);
}
}
@@ -581,7 +581,7 @@ sal_Bool SgaObjectSvDraw::DrawCentered( OutputDevice* pOut, const FmFormModel& r
void SgaObjectSvDraw::WriteData( SvStream& rOut, const String& rDestDir ) const
{
SgaObject::WriteData( rOut, rDestDir );
- write_lenPrefixed_uInt8s_FromOUString(rOut, aTitle, RTL_TEXTENCODING_UTF8);
+ write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOut, aTitle, RTL_TEXTENCODING_UTF8);
}
// ------------------------------------------------------------------------
@@ -591,7 +591,7 @@ void SgaObjectSvDraw::ReadData( SvStream& rIn, sal_uInt16& rReadVersion )
SgaObject::ReadData( rIn, rReadVersion );
if( rReadVersion >= 5 )
- aTitle = read_lenPrefixed_uInt8s_ToOUString(rIn, RTL_TEXTENCODING_UTF8);
+ aTitle = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIn, RTL_TEXTENCODING_UTF8);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx
index 4a34a85..9ce8d48 100644
--- a/svx/source/gallery2/galtheme.cxx
+++ b/svx/source/gallery2/galtheme.cxx
@@ -733,7 +733,7 @@ GalleryThemeEntry* GalleryTheme::CreateThemeEntry( const INetURLObject& rURL, sa
{
sal_uInt32 nThemeId = 0;
- rtl::OString aTmpStr = read_lenPrefixed_uInt8s_ToOString(*pIStm);
+ rtl::OString aTmpStr = read_lenPrefixed_uInt8s_ToOString<sal_uInt16>(*pIStm);
aThemeName = rtl::OStringToOUString(aTmpStr, RTL_TEXTENCODING_UTF8);
// Charakterkonvertierung durchfuehren
@@ -1354,7 +1354,7 @@ SvStream& GalleryTheme::WriteData( SvStream& rOStm ) const
sal_Bool bRel;
rOStm << (sal_uInt16) 0x0004;
- write_lenPrefixed_uInt8s_FromOUString(rOStm, GetRealName(), RTL_TEXTENCODING_UTF8);
+ write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOStm, GetRealName(), RTL_TEXTENCODING_UTF8);
rOStm << nCount << (sal_uInt16) osl_getThreadTextEncoding();
for( sal_uInt32 i = 0; i < nCount; i++ )
@@ -1394,7 +1394,7 @@ SvStream& GalleryTheme::WriteData( SvStream& rOStm ) const
aPath.SearchAndReplace(m_aDestDir, String());
rOStm << bRel;
- write_lenPrefixed_uInt8s_FromOUString(rOStm, aPath, RTL_TEXTENCODING_UTF8);
+ write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOStm, aPath, RTL_TEXTENCODING_UTF8);
rOStm << pObj->nOffset << (sal_uInt16) pObj->eObjKind;
}
@@ -1434,7 +1434,7 @@ SvStream& GalleryTheme::ReadData( SvStream& rIStm )
aImportName = rtl::OUString();
rIStm >> nVersion;
- rtl::OString aTmpStr = read_lenPrefixed_uInt8s_ToOString(rIStm);
+ rtl::OString aTmpStr = read_lenPrefixed_uInt8s_ToOString<sal_uInt16>(rIStm);
rIStm >> nCount;
if( nVersion >= 0x0004 )
@@ -1474,7 +1474,7 @@ SvStream& GalleryTheme::ReadData( SvStream& rIStm )
sal_uInt16 nTemp;
rIStm >> bRel;
- rtl::OString aTempFileName = read_lenPrefixed_uInt8s_ToOString(rIStm);
+ rtl::OString aTempFileName = read_lenPrefixed_uInt8s_ToOString<sal_uInt16>(rIStm);
rIStm >> pObj->nOffset;
rIStm >> nTemp; pObj->eObjKind = (SgaObjKind) nTemp;
diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx
index be2d325..4ecbd2a 100644
--- a/sw/source/core/doc/tblafmt.cxx
+++ b/sw/source/core/doc/tblafmt.cxx
@@ -486,7 +486,7 @@ sal_Bool SwBoxAutoFmt::Save( SvStream& rStream ) const
aRotateMode.Store( rStream, aRotateMode.GetVersion(SOFFICE_FILEFORMAT_40) );
// --- from 680/dr25 on: store strings as UTF-8
- write_lenPrefixed_uInt8s_FromOUString(rStream, sNumFmtString,
+ write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rStream, sNumFmtString,
RTL_TEXTENCODING_UTF8);
rStream << (sal_uInt16)eSysLanguage << (sal_uInt16)eNumFmtLanguage;
@@ -861,7 +861,7 @@ sal_Bool SwTableAutoFmt::Save( SvStream& rStream ) const
sal_Bool b;
rStream << nVal;
// --- from 680/dr25 on: store strings as UTF-8
- write_lenPrefixed_uInt8s_FromOUString(rStream, aName,
+ write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rStream, aName,
RTL_TEXTENCODING_UTF8 );
rStream << nStrResId;
rStream << ( b = bInclFont );
diff --git a/tools/inc/tools/inetmsg.hxx b/tools/inc/tools/inetmsg.hxx
index 7c88b9c..0c34680 100644
--- a/tools/inc/tools/inetmsg.hxx
+++ b/tools/inc/tools/inetmsg.hxx
@@ -80,16 +80,16 @@ public:
friend SvStream& operator<< (
SvStream& rStrm, const INetMessageHeader& rHdr)
{
- write_lenPrefixed_uInt8s_FromOString(rStrm, rHdr.m_aName);
- write_lenPrefixed_uInt8s_FromOString(rStrm, rHdr.m_aValue);
+ write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rStrm, rHdr.m_aName);
+ write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rStrm, rHdr.m_aValue);
return rStrm;
}
friend SvStream& operator>> (
SvStream& rStrm, INetMessageHeader& rHdr)
{
- rHdr.m_aName = read_lenPrefixed_uInt8s_ToOString(rStrm);
- rHdr.m_aValue = read_lenPrefixed_uInt8s_ToOString(rStrm);
+ rHdr.m_aName = read_lenPrefixed_uInt8s_ToOString<sal_uInt16>(rStrm);
+ rHdr.m_aValue = read_lenPrefixed_uInt8s_ToOString<sal_uInt16>(rStrm);
return rStrm;
}
};
diff --git a/tools/inc/tools/stream.hxx b/tools/inc/tools/stream.hxx
index 4d31670..2270eff 100644
--- a/tools/inc/tools/stream.hxx
+++ b/tools/inc/tools/stream.hxx
@@ -566,7 +566,7 @@ TOOLS_DLLPUBLIC rtl::OUString read_zeroTerminated_uInt8s_ToOUString(SvStream& rS
//Attempt to read a pascal-style length (of type prefix) prefixed sequence of
//8bit units to an OString, returned rtl::OString's length is number of units
//successfully read.
-template<typename prefix=sal_uInt16> rtl::OString read_lenPrefixed_uInt8s_ToOString(SvStream& rStrm)
+template<typename prefix> rtl::OString read_lenPrefixed_uInt8s_ToOString(SvStream& rStrm)
{
prefix nLen = 0;
rStrm >> nLen;
@@ -575,7 +575,7 @@ template<typename prefix=sal_uInt16> rtl::OString read_lenPrefixed_uInt8s_ToOStr
//Attempt to read a pascal-style length (of type prefix) prefixed sequence of
//8bit units to an OUString
-template<typename prefix=sal_uInt16> rtl::OUString read_lenPrefixed_uInt8s_ToOUString(SvStream& rStrm,
+template<typename prefix> rtl::OUString read_lenPrefixed_uInt8s_ToOUString(SvStream& rStrm,
rtl_TextEncoding eEnc)
{
return rtl::OStringToOUString(read_lenPrefixed_uInt8s_ToOString<prefix>(rStrm), eEnc);
@@ -584,7 +584,7 @@ template<typename prefix=sal_uInt16> rtl::OUString read_lenPrefixed_uInt8s_ToOUS
//Attempt to write a pascal-style length (of type prefix) prefixed sequence of
//8bit units from an OString, returned value is number of bytes written (including
//byte-count of prefix)
-template<typename prefix=sal_uInt16> sal_Size write_lenPrefixed_uInt8s_FromOString(SvStream& rStrm,
+template<typename prefix> sal_Size write_lenPrefixed_uInt8s_FromOString(SvStream& rStrm,
const rtl::OString &rStr)
{
SAL_WARN_IF(rStr.getLength() > std::numeric_limits<prefix>::max(),
@@ -605,7 +605,7 @@ template<typename prefix=sal_uInt16> sal_Size write_lenPrefixed_uInt8s_FromOStri
//Attempt to write a pascal-style length (of type prefix) prefixed sequence of
//8bit units from an OUString, returned value is number of bytes written (including
//byte-count of prefix)
-template<typename prefix=sal_uInt16> sal_Size write_lenPrefixed_uInt8s_FromOUString(SvStream& rStrm,
+template<typename prefix> sal_Size write_lenPrefixed_uInt8s_FromOUString(SvStream& rStrm,
const rtl::OUString &rStr, rtl_TextEncoding eEnc)
{
return write_lenPrefixed_uInt8s_FromOString<prefix>(rStrm, rtl::OUStringToOString(rStr, eEnc));
diff --git a/tools/source/inet/inetmsg.cxx b/tools/source/inet/inetmsg.cxx
index a49d382..45bd0cb 100644
--- a/tools/source/inet/inetmsg.cxx
+++ b/tools/source/inet/inetmsg.cxx
@@ -137,7 +137,7 @@ sal_uIntPtr INetMessage::SetHeaderField (
SvStream& INetMessage::operator<< (SvStream& rStrm) const
{
rStrm << static_cast<sal_uInt32>(m_nDocSize);
- write_lenPrefixed_uInt8s_FromOUString(rStrm, m_aDocName, RTL_TEXTENCODING_UTF8);
+ write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rStrm, m_aDocName, RTL_TEXTENCODING_UTF8);
sal_uIntPtr i, n = m_aHeaderList.size();
rStrm << static_cast<sal_uInt32>(n);
@@ -163,7 +163,7 @@ SvStream& INetMessage::operator>> (SvStream& rStrm)
// Copy.
rStrm >> nTemp;
m_nDocSize = nTemp;
- m_aDocName = read_lenPrefixed_uInt8s_ToOUString(rStrm, RTL_TEXTENCODING_UTF8);
+ m_aDocName = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rStrm, RTL_TEXTENCODING_UTF8);
sal_uIntPtr i, n = 0;
rStrm >> nTemp;
@@ -1161,7 +1161,7 @@ SvStream& INetMIMEMessage::operator<< (SvStream& rStrm) const
for (sal_uInt16 i = 0; i < INETMSG_MIME_NUMHDR; i++)
rStrm << static_cast<sal_uInt32>(m_nIndex[i]);
- write_lenPrefixed_uInt8s_FromOString(rStrm, m_aBoundary);
+ write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rStrm, m_aBoundary);
rStrm << static_cast<sal_uInt32>(aChildren.size());
return rStrm;
@@ -1181,7 +1181,7 @@ SvStream& INetMIMEMessage::operator>> (SvStream& rStrm)
m_nIndex[i] = nTemp;
}
- m_aBoundary = read_lenPrefixed_uInt8s_ToOString(rStrm);
+ m_aBoundary = read_lenPrefixed_uInt8s_ToOString<sal_uInt16>(rStrm);
rStrm >> nTemp;
diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx
index aab11a6..2a5cd4a 100644
--- a/tools/source/stream/stream.cxx
+++ b/tools/source/stream/stream.cxx
@@ -1517,7 +1517,7 @@ SvStream& SvStream::ReadUniOrByteString( UniString& rStr, rtl_TextEncoding eSrcC
return *this;
}
- rStr = read_lenPrefixed_uInt8s_ToOUString(*this, eSrcCharSet);
+ rStr = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(*this, eSrcCharSet);
return *this;
}
@@ -1551,7 +1551,7 @@ SvStream& SvStream::WriteUniOrByteString( const UniString& rStr, rtl_TextEncodin
return *this;
}
- write_lenPrefixed_uInt8s_FromOUString(*this, rStr, eDestCharSet);
+ write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(*this, rStr, eDestCharSet);
return *this;
}
diff --git a/vcl/source/gdi/animate.cxx b/vcl/source/gdi/animate.cxx
index 636df96..28eca90 100644
--- a/vcl/source/gdi/animate.cxx
+++ b/vcl/source/gdi/animate.cxx
@@ -824,7 +824,7 @@ SvStream& operator<<( SvStream& rOStm, const Animation& rAnimation )
rOStm << nDummy32; // unbenutzt
rOStm << nDummy32; // unbenutzt
rOStm << nDummy32; // unbenutzt
- write_lenPrefixed_uInt8s_FromOString(rOStm, rtl::OString()); // dummy
+ write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rOStm, rtl::OString()); // dummy
rOStm << nRest; // Anzahl der Strukturen, die noch _folgen_
}
}
@@ -888,7 +888,7 @@ SvStream& operator>>( SvStream& rIStm, Animation& rAnimation )
rIStm >> nTmp32; // unbenutzt
rIStm >> nTmp32; // unbenutzt
rIStm >> nTmp32; // unbenutzt
- read_lenPrefixed_uInt8s_ToOString(rIStm); // unbenutzt
+ read_lenPrefixed_uInt8s_ToOString<sal_uInt16>(rIStm); // unbenutzt
rIStm >> nTmp16; // Rest zu lesen
rAnimation.Insert( aAnimBmp );
diff --git a/vcl/source/gdi/cvtsvm.cxx b/vcl/source/gdi/cvtsvm.cxx
index 738a590..2026ceb 100644
--- a/vcl/source/gdi/cvtsvm.cxx
+++ b/vcl/source/gdi/cvtsvm.cxx
@@ -1327,7 +1327,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
sal_uInt8* pData;
sal_Int32 nFollowingActionCount;
- rtl::OString aComment = read_lenPrefixed_uInt8s_ToOString(rIStm);
+ rtl::OString aComment = read_lenPrefixed_uInt8s_ToOString<sal_uInt16>(rIStm);
rIStm >> nValue >> nDataSize;
if( nDataSize )
@@ -2412,7 +2412,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
rOStm.SeekRel( 4 );
// write data
- write_lenPrefixed_uInt8s_FromOString(rOStm, pA->GetComment());
+ write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rOStm, pA->GetComment());
rOStm << pA->GetValue() << nDataSize;
if( nDataSize )
diff --git a/vcl/source/gdi/jobset.cxx b/vcl/source/gdi/jobset.cxx
index 8d3ef57..2415500 100644
--- a/vcl/source/gdi/jobset.cxx
+++ b/vcl/source/gdi/jobset.cxx
@@ -334,8 +334,8 @@ SvStream& operator>>( SvStream& rIStream, JobSetup& rJobSetup )
rIStream.Seek( nFirstPos + sizeof( ImplOldJobSetupData ) + 4 + sizeof( Impl364JobSetupData ) + pJobData->mnDriverDataLen );
while( rIStream.Tell() < nFirstPos + nLen )
{
- String aKey = read_lenPrefixed_uInt8s_ToOUString(rIStream, RTL_TEXTENCODING_UTF8);
- String aValue = read_lenPrefixed_uInt8s_ToOUString(rIStream, RTL_TEXTENCODING_UTF8);
+ String aKey = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIStream, RTL_TEXTENCODING_UTF8);
+ String aValue = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIStream, RTL_TEXTENCODING_UTF8);
if( aKey.EqualsAscii( "COMPAT_DUPLEX_MODE" ) )
{
if( aValue.EqualsAscii( "DUPLEX_UNKNOWN" ) )
@@ -406,23 +406,23 @@ SvStream& operator<<( SvStream& rOStream, const JobSetup& rJobSetup )
::boost::unordered_map< ::rtl::OUString, ::rtl::OUString, ::rtl::OUStringHash >::const_iterator it;
for( it = pJobData->maValueMap.begin(); it != pJobData->maValueMap.end(); ++it )
{
- write_lenPrefixed_uInt8s_FromOUString(rOStream, it->first, RTL_TEXTENCODING_UTF8);
- write_lenPrefixed_uInt8s_FromOUString(rOStream, it->second, RTL_TEXTENCODING_UTF8);
+ write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOStream, it->first, RTL_TEXTENCODING_UTF8);
+ write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOStream, it->second, RTL_TEXTENCODING_UTF8);
}
- write_lenPrefixed_uInt8s_FromOString(rOStream, "COMPAT_DUPLEX_MODE");
+ write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rOStream, "COMPAT_DUPLEX_MODE");
switch( pJobData->meDuplexMode )
{
case DUPLEX_UNKNOWN:
- write_lenPrefixed_uInt8s_FromOString(rOStream, "DUPLEX_UNKNOWN");
+ write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rOStream, "DUPLEX_UNKNOWN");
break;
case DUPLEX_OFF:
- write_lenPrefixed_uInt8s_FromOString(rOStream, "DUPLEX_OFF");
+ write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rOStream, "DUPLEX_OFF");
break;
case DUPLEX_SHORTEDGE:
- write_lenPrefixed_uInt8s_FromOString(rOStream, "DUPLEX_SHORTEDGE");
+ write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rOStream, "DUPLEX_SHORTEDGE");
break;
case DUPLEX_LONGEDGE:
- write_lenPrefixed_uInt8s_FromOString(rOStream, "DUPLEX_LONGEDGE");
+ write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rOStream, "DUPLEX_LONGEDGE");
break;
}
nLen = sal::static_int_cast<sal_uInt16>(rOStream.Tell() - nPos);
diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx
index 2fd96e8..74881f6 100644
--- a/vcl/source/gdi/metaact.cxx
+++ b/vcl/source/gdi/metaact.cxx
@@ -4198,7 +4198,7 @@ sal_Bool MetaCommentAction::Compare( const MetaAction& rMetaAction ) const
void MetaCommentAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
{
WRITE_BASE_COMPAT( rOStm, 1, pData );
- write_lenPrefixed_uInt8s_FromOString(rOStm, maComment);
+ write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rOStm, maComment);
rOStm << mnValue << mnDataSize;
if ( mnDataSize )
@@ -4210,7 +4210,7 @@ void MetaCommentAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
void MetaCommentAction::Read( SvStream& rIStm, ImplMetaReadData* )
{
COMPAT( rIStm );
- maComment = read_lenPrefixed_uInt8s_ToOString(rIStm);
+ maComment = read_lenPrefixed_uInt8s_ToOString<sal_uInt16>(rIStm);
rIStm >> mnValue >> mnDataSize;
delete[] mpData;
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index 9cede25..e25aa3a 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -280,10 +280,10 @@ SvStream& operator<<( SvStream& rOStream, const QueueInfo& rInfo )
{
VersionCompat aCompat( rOStream, STREAM_WRITE, 1 );
- write_lenPrefixed_uInt8s_FromOUString(rOStream, rInfo.maPrinterName, RTL_TEXTENCODING_UTF8);
- write_lenPrefixed_uInt8s_FromOUString(rOStream, rInfo.maDriver, RTL_TEXTENCODING_UTF8);
- write_lenPrefixed_uInt8s_FromOUString(rOStream, rInfo.maLocation, RTL_TEXTENCODING_UTF8);
- write_lenPrefixed_uInt8s_FromOUString(rOStream, rInfo.maComment, RTL_TEXTENCODING_UTF8);
+ write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOStream, rInfo.maPrinterName, RTL_TEXTENCODING_UTF8);
+ write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOStream, rInfo.maDriver, RTL_TEXTENCODING_UTF8);
+ write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOStream, rInfo.maLocation, RTL_TEXTENCODING_UTF8);
+ write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOStream, rInfo.maComment, RTL_TEXTENCODING_UTF8);
rOStream << rInfo.mnStatus;
rOStream << rInfo.mnJobs;
@@ -296,10 +296,10 @@ SvStream& operator>>( SvStream& rIStream, QueueInfo& rInfo )
{
VersionCompat aCompat( rIStream, STREAM_READ );
- rInfo.maPrinterName = read_lenPrefixed_uInt8s_ToOUString(rIStream, RTL_TEXTENCODING_UTF8);
- rInfo.maDriver = read_lenPrefixed_uInt8s_ToOUString(rIStream, RTL_TEXTENCODING_UTF8);
- rInfo.maLocation = read_lenPrefixed_uInt8s_ToOUString(rIStream, RTL_TEXTENCODING_UTF8);
- rInfo.maComment = read_lenPrefixed_uInt8s_ToOUString(rIStream, RTL_TEXTENCODING_UTF8);
+ rInfo.maPrinterName = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIStream, RTL_TEXTENCODING_UTF8);
+ rInfo.maDriver = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIStream, RTL_TEXTENCODING_UTF8);
+ rInfo.maLocation = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIStream, RTL_TEXTENCODING_UTF8);
+ rInfo.maComment = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIStream, RTL_TEXTENCODING_UTF8);
rIStream >> rInfo.mnStatus;
rIStream >> rInfo.mnJobs;
diff --git a/vcl/source/gdi/rendergraphic.cxx b/vcl/source/gdi/rendergraphic.cxx
index 16b08c4..4f333cd 100644
--- a/vcl/source/gdi/rendergraphic.cxx
+++ b/vcl/source/gdi/rendergraphic.cxx
@@ -194,7 +194,7 @@ void RenderGraphic::ImplGetDefaults() const
::VersionCompat aVCompat( rIStm, STREAM_READ );
sal_uInt32 nGraphicDataLength = 0;
- rtl::OUString aGraphicDataMimeType = read_lenPrefixed_uInt8s_ToOUString(rIStm, RTL_TEXTENCODING_ASCII_US);
+ rtl::OUString aGraphicDataMimeType = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIStm, RTL_TEXTENCODING_ASCII_US);
rIStm >> nGraphicDataLength;
rRenderGraphic = RenderGraphic( aGraphicDataMimeType, nGraphicDataLength );
@@ -214,7 +214,7 @@ void RenderGraphic::ImplGetDefaults() const
::VersionCompat aVCompat( rOStm, STREAM_WRITE, 1 );
const sal_uInt32 nGraphicDataLength = rRenderGraphic.GetGraphicDataLength();
- write_lenPrefixed_uInt8s_FromOUString(rOStm, rRenderGraphic.GetGraphicDataMimeType(),
+ write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOStm, rRenderGraphic.GetGraphicDataMimeType(),
RTL_TEXTENCODING_ASCII_US);
rOStm << nGraphicDataLength;
diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx
index 44ca911..32fd0f3 100644
--- a/vcl/win/source/gdi/salgdi3.cxx
+++ b/vcl/win/source/gdi/salgdi3.cxx
@@ -160,10 +160,10 @@ ImplFontAttrCache::ImplFontAttrCache( const String& rFileNameURL, const String&
ImplDevFontAttributes aDFA;
for(;;)
{
- aFontFileURL = read_lenPrefixed_uInt8s_ToOUString(aCacheFile, RTL_TEXTENCODING_UTF8);
+ aFontFileURL = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(aCacheFile, RTL_TEXTENCODING_UTF8);
if( !aFontFileURL.Len() )
break;
- aDFA.maName = read_lenPrefixed_uInt8s_ToOUString(aCacheFile, RTL_TEXTENCODING_UTF8);
+ aDFA.maName = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(aCacheFile, RTL_TEXTENCODING_UTF8);
short n;
aCacheFile >> n; aDFA.meWeight = static_cast<FontWeight>(n);
@@ -195,8 +195,8 @@ ImplFontAttrCache::~ImplFontAttrCache()
{
const String rFontFileURL( (*aIter).first );
const ImplDevFontAttributes& rDFA( (*aIter).second );
- write_lenPrefixed_uInt8s_FromOUString(aCacheFile, rFontFileURL, RTL_TEXTENCODING_UTF8);
- write_lenPrefixed_uInt8s_FromOUString(aCacheFile, rDFA.maName, RTL_TEXTENCODING_UTF8);
+ write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(aCacheFile, rFontFileURL, RTL_TEXTENCODING_UTF8);
+ write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(aCacheFile, rDFA.maName, RTL_TEXTENCODING_UTF8);
aCacheFile << static_cast<short>(rDFA.meWeight);
aCacheFile << static_cast<short>(rDFA.meItalic);
@@ -205,7 +205,7 @@ ImplFontAttrCache::~ImplFontAttrCache()
aCacheFile << static_cast<short>(rDFA.meFamily);
aCacheFile << static_cast<short>(rDFA.mbSymbolFlag != false);
- write_lenPrefixed_uInt8s_FromOUString(aCacheFile, rDFA.maStyleName, RTL_TEXTENCODING_UTF8);
+ write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(aCacheFile, rDFA.maStyleName, RTL_TEXTENCODING_UTF8);
++aIter;
}
commit 5c24789ca33d7b2b0c39626208cf0708fb470d95
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Dec 21 10:45:54 2011 +0000
disentangle Read/WriteByteString OUString variants
The ones which use a definite 8-bit encoding read/write pascal-style
strings with a 16bit length prefix.
The ones which use a definite 16-bit encoding read/write pascal-style
UTF-16 strings with a 32bit length prefix, i.e. not ByteStrings at all
The "I dunno" ones might be UTF-16 strings or 8-bit strings, depending
on the charset. Rename to ReadUniOrByteString like the other
similar horrors to flag this misery
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index e6c829a..9052458 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -643,17 +643,17 @@ BasicLibInfo* BasicLibInfo::Create( SotStorageStream& rSStream )
// The name of the lib...
String aName;
- rSStream.ReadByteString(aName);
+ rSStream.ReadUniOrByteString(aName, rSStream.GetStreamCharSet());
pInfo->SetLibName( aName );
// Absolute path...
String aStorageName;
- rSStream.ReadByteString(aStorageName);
+ rSStream.ReadUniOrByteString(aStorageName, rSStream.GetStreamCharSet());
pInfo->SetStorageName( aStorageName );
// Relative path...
String aRelStorageName;
- rSStream.ReadByteString(aRelStorageName);
+ rSStream.ReadUniOrByteString(aRelStorageName, rSStream.GetStreamCharSet());
pInfo->SetRelStorageName( aRelStorageName );
if ( nVer >= 2 )
@@ -1041,7 +1041,7 @@ void BasicManager::LoadOldBasicManager( SotStorage& rStorage )
}
xManagerStream->Seek( nBasicEndOff+1 ); // +1: 0x00 as separator
String aLibs;
- xManagerStream->ReadByteString(aLibs);
+ xManagerStream->ReadUniOrByteString(aLibs, xManagerStream->GetStreamCharSet());
xManagerStream->SetBufferSize( 0 );
xManagerStream.Clear(); // Close stream
@@ -1235,7 +1235,8 @@ sal_Bool BasicManager::ImpLoadLibary( BasicLibInfo* pLibInfo, SotStorage* pCurSt
if ( ( nPasswordMarker == PASSWORD_MARKER ) && !xBasicStream->IsEof() )
{
String aPassword;
- xBasicStream->ReadByteString(aPassword);
+ xBasicStream->ReadUniOrByteString(aPassword,
+ xBasicStream->GetStreamCharSet());
pLibInfo->SetPassword( aPassword );
}
xBasicStream->SetCryptMaskKey(rtl::OString());
diff --git a/basic/source/classes/image.cxx b/basic/source/classes/image.cxx
index 1208184..79b3765 100644
--- a/basic/source/classes/image.cxx
+++ b/basic/source/classes/image.cxx
@@ -147,15 +147,15 @@ sal_Bool SbiImage::Load( SvStream& r, sal_uInt32& nVersion )
switch( nSign )
{
case B_NAME:
- r.ReadByteString( aName, eCharSet );
+ r.ReadUniOrByteString( aName, eCharSet );
break;
case B_COMMENT:
- r.ReadByteString( aComment, eCharSet );
+ r.ReadUniOrByteString( aComment, eCharSet );
break;
case B_SOURCE:
{
String aTmp;
- r.ReadByteString( aTmp, eCharSet );
+ r.ReadUniOrByteString( aTmp, eCharSet );
aOUSource = aTmp;
break;
}
@@ -164,7 +164,7 @@ sal_Bool SbiImage::Load( SvStream& r, sal_uInt32& nVersion )
for( sal_uInt16 j = 0 ; j < nCount ; j++ )
{
String aTmp;
- r.ReadByteString( aTmp, eCharSet );
+ r.ReadUniOrByteString( aTmp, eCharSet );
aOUSource += aTmp;
}
break;
@@ -274,14 +274,14 @@ sal_Bool SbiImage::Save( SvStream& r, sal_uInt32 nVer )
if( aName.Len() && SbiGood( r ) )
{
nPos = SbiOpenRecord( r, B_NAME, 1 );
- r.WriteByteString( aName, eCharSet );
+ r.WriteUniOrByteString( aName, eCharSet );
SbiCloseRecord( r, nPos );
}
// Comment?
if( aComment.Len() && SbiGood( r ) )
{
nPos = SbiOpenRecord( r, B_COMMENT, 1 );
- r.WriteByteString( aComment, eCharSet );
+ r.WriteUniOrByteString( aComment, eCharSet );
SbiCloseRecord( r, nPos );
}
// Source?
@@ -295,7 +295,7 @@ sal_Bool SbiImage::Save( SvStream& r, sal_uInt32 nVer )
aTmp = aOUSource.copy( 0, nMaxUnitSize );
else
aTmp = aOUSource;
- r.WriteByteString( aTmp, eCharSet );
+ r.WriteUniOrByteString( aTmp, eCharSet );
SbiCloseRecord( r, nPos );
if( nLen > STRING_MAXLEN )
@@ -309,7 +309,7 @@ sal_Bool SbiImage::Save( SvStream& r, sal_uInt32 nVer )
(nRemainingLen > nMaxUnitSize) ? nMaxUnitSize : nRemainingLen;
String aTmp2 = aOUSource.copy( (i+1) * nMaxUnitSize, nCopyLen );
nRemainingLen -= nCopyLen;
- r.WriteByteString( aTmp2, eCharSet );
+ r.WriteUniOrByteString( aTmp2, eCharSet );
}
SbiCloseRecord( r, nPos );
}
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index 07194fa..975ecc2 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -2002,7 +2002,7 @@ sal_Bool SbJScriptModule::LoadData( SvStream& rStrm, sal_uInt16 nVer )
// Get the source string
String aTmp;
- rStrm.ReadByteString( aTmp, osl_getThreadTextEncoding() );
+ rStrm.ReadUniOrByteString( aTmp, osl_getThreadTextEncoding() );
aOUSource = aTmp;
return sal_True;
}
@@ -2014,7 +2014,7 @@ sal_Bool SbJScriptModule::StoreData( SvStream& rStrm ) const
// Write the source string
String aTmp = aOUSource;
- rStrm.WriteByteString( aTmp, osl_getThreadTextEncoding() );
+ rStrm.WriteUniOrByteString( aTmp, osl_getThreadTextEncoding() );
return sal_True;
}
diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx
index 2ff6990..5b25252 100644
--- a/basic/source/runtime/methods1.cxx
+++ b/basic/source/runtime/methods1.cxx
@@ -991,7 +991,7 @@ sal_Bool lcl_WriteSbxVariable( const SbxVariable& rVar, SvStream* pStrm,
{
if( bIsVariant )
*pStrm << (sal_uInt16)SbxSTRING;
- pStrm->WriteByteString( rStr, osl_getThreadTextEncoding() );
+ pStrm->WriteUniOrByteString( rStr, osl_getThreadTextEncoding() );
}
else
{
@@ -1107,7 +1107,7 @@ sal_Bool lcl_ReadSbxVariable( SbxVariable& rVar, SvStream* pStrm,
case SbxLPSTR:
{
String aStr;
- pStrm->ReadByteString( aStr, osl_getThreadTextEncoding() );
+ pStrm->ReadUniOrByteString( aStr, osl_getThreadTextEncoding() );
rVar.PutString( aStr );
}
break;
diff --git a/basic/source/sbx/sbxbase.cxx b/basic/source/sbx/sbxbase.cxx
index 711efdc..7ab2d6c 100644
--- a/basic/source/sbx/sbxbase.cxx
+++ b/basic/source/sbx/sbxbase.cxx
@@ -383,15 +383,18 @@ sal_Bool SbxInfo::LoadData( SvStream& rStrm, sal_uInt16 nVer )
{
aParams.Remove( 0, aParams.Count() );
sal_uInt16 nParam;
- rStrm.ReadByteString( aComment, RTL_TEXTENCODING_ASCII_US );
- rStrm.ReadByteString( aHelpFile, RTL_TEXTENCODING_ASCII_US );
+ aComment = read_lenPrefixed_uInt8s_ToOUString(rStrm,
+ RTL_TEXTENCODING_ASCII_US);
+ aHelpFile = read_lenPrefixed_uInt8s_ToOUString(rStrm,
+ RTL_TEXTENCODING_ASCII_US);
rStrm >> nHelpId >> nParam;
while( nParam-- )
{
XubString aName;
sal_uInt16 nType, nFlags;
sal_uInt32 nUserData = 0;
- rStrm.ReadByteString( aName, RTL_TEXTENCODING_ASCII_US );
+ aName = read_lenPrefixed_uInt8s_ToOUString(rStrm,
+ RTL_TEXTENCODING_ASCII_US);
rStrm >> nType >> nFlags;
if( nVer > 1 )
rStrm >> nUserData;
@@ -404,13 +407,16 @@ sal_Bool SbxInfo::LoadData( SvStream& rStrm, sal_uInt16 nVer )
sal_Bool SbxInfo::StoreData( SvStream& rStrm ) const
{
- rStrm.WriteByteString( aComment, RTL_TEXTENCODING_ASCII_US );
- rStrm.WriteByteString( aHelpFile, RTL_TEXTENCODING_ASCII_US );
+ write_lenPrefixed_uInt8s_FromOUString(rStrm, aComment,
+ RTL_TEXTENCODING_ASCII_US );
+ write_lenPrefixed_uInt8s_FromOUString(rStrm, aHelpFile,
+ RTL_TEXTENCODING_ASCII_US);
rStrm << nHelpId << aParams.Count();
for( sal_uInt16 i = 0; i < aParams.Count(); i++ )
{
SbxParamInfo* p = aParams.GetObject( i );
- rStrm.WriteByteString( p->aName, RTL_TEXTENCODING_ASCII_US );
+ write_lenPrefixed_uInt8s_FromOUString(rStrm, p->aName,
+ RTL_TEXTENCODING_ASCII_US);
rStrm << (sal_uInt16) p->eType
<< (sal_uInt16) p->nFlags
<< (sal_uInt32) p->nUserData;
diff --git a/basic/source/sbx/sbxcoll.cxx b/basic/source/sbx/sbxcoll.cxx
index 7803ee0..9757387 100644
--- a/basic/source/sbx/sbxcoll.cxx
+++ b/basic/source/sbx/sbxcoll.cxx
@@ -279,7 +279,8 @@ sal_Bool SbxStdCollection::LoadData( SvStream& rStrm, sal_uInt16 nVer )
sal_Bool bRes = SbxCollection::LoadData( rStrm, nVer );
if( bRes )
{
- rStrm.ReadByteString( aElemClass, RTL_TEXTENCODING_ASCII_US );
+ aElemClass = read_lenPrefixed_uInt8s_ToOUString(rStrm,
+ RTL_TEXTENCODING_ASCII_US);
rStrm >> bAddRemoveOk;
}
return bRes;
@@ -290,7 +291,8 @@ sal_Bool SbxStdCollection::StoreData( SvStream& rStrm ) const
sal_Bool bRes = SbxCollection::StoreData( rStrm );
if( bRes )
{
- rStrm.WriteByteString( aElemClass, RTL_TEXTENCODING_ASCII_US );
+ write_lenPrefixed_uInt8s_FromOUString(rStrm, aElemClass,
+ RTL_TEXTENCODING_ASCII_US);
rStrm << bAddRemoveOk;
}
return bRes;
diff --git a/basic/source/sbx/sbxobj.cxx b/basic/source/sbx/sbxobj.cxx
index 81574ef..0c98fca 100644
--- a/basic/source/sbx/sbxobj.cxx
+++ b/basic/source/sbx/sbxobj.cxx
@@ -591,8 +591,10 @@ sal_Bool SbxObject::LoadData( SvStream& rStrm, sal_uInt16 nVer )
aData.pObj = this;
sal_uInt32 nSize;
XubString aDfltProp;
- rStrm.ReadByteString( aClassName, RTL_TEXTENCODING_ASCII_US );
- rStrm.ReadByteString( aDfltProp, RTL_TEXTENCODING_ASCII_US );
+ aClassName = read_lenPrefixed_uInt8s_ToOUString(rStrm,
+ RTL_TEXTENCODING_ASCII_US);
+ aDfltProp = read_lenPrefixed_uInt8s_ToOUString(rStrm,
+ RTL_TEXTENCODING_ASCII_US);
sal_uIntPtr nPos = rStrm.Tell();
rStrm >> nSize;
if( !LoadPrivateData( rStrm, nVer ) )
@@ -620,8 +622,8 @@ sal_Bool SbxObject::StoreData( SvStream& rStrm ) const
XubString aDfltProp;
if( pDfltProp )
aDfltProp = pDfltProp->GetName();
- rStrm.WriteByteString( aClassName, RTL_TEXTENCODING_ASCII_US );
- rStrm.WriteByteString( aDfltProp, RTL_TEXTENCODING_ASCII_US );
+ write_lenPrefixed_uInt8s_FromOUString(rStrm, aClassName, RTL_TEXTENCODING_ASCII_US);
+ write_lenPrefixed_uInt8s_FromOUString(rStrm, aDfltProp, RTL_TEXTENCODING_ASCII_US);
sal_uIntPtr nPos = rStrm.Tell();
rStrm << (sal_uInt32) 0L;
if( !StorePrivateData( rStrm ) )
@@ -797,7 +799,7 @@ void SbxObject::Dump( SvStream& rStrm, sal_Bool bFill )
aLine += aAttrs2;
if( !pVar->IsA( TYPE(SbxMethod) ) )
aLine.AppendAscii( " !! Not a Method !!" );
- rStrm.WriteByteString( aLine, RTL_TEXTENCODING_ASCII_US );
+ write_lenPrefixed_uInt8s_FromOUString(rStrm, aLine, RTL_TEXTENCODING_ASCII_US);
// Output also the object at object-methods
if ( pVar->GetValues_Impl().eType == SbxOBJECT &&
@@ -830,7 +832,7 @@ void SbxObject::Dump( SvStream& rStrm, sal_Bool bFill )
aLine += aAttrs3;
if( !pVar->IsA( TYPE(SbxProperty) ) )
aLine.AppendAscii( " !! Not a Property !!" );
- rStrm.WriteByteString( aLine, RTL_TEXTENCODING_ASCII_US );
+ write_lenPrefixed_uInt8s_FromOUString(rStrm, aLine, RTL_TEXTENCODING_ASCII_US);
// output also the object at object properties
if ( pVar->GetValues_Impl().eType == SbxOBJECT &&
diff --git a/basic/source/sbx/sbxvalue.cxx b/basic/source/sbx/sbxvalue.cxx
index 0d6aa84..692959a 100644
--- a/basic/source/sbx/sbxvalue.cxx
+++ b/basic/source/sbx/sbxvalue.cxx
@@ -1479,8 +1479,8 @@ sal_Bool SbxValue::LoadData( SvStream& r, sal_uInt16 )
case SbxSINGLE:
{
// Floats as ASCII
- XubString aVal;
- r.ReadByteString( aVal, RTL_TEXTENCODING_ASCII_US );
+ XubString aVal = read_lenPrefixed_uInt8s_ToOUString(r,
+ RTL_TEXTENCODING_ASCII_US);
double d;
SbxDataType t;
if( ImpScan( aVal, d, t, NULL ) != SbxERR_OK || t == SbxDOUBLE )
@@ -1495,8 +1495,8 @@ sal_Bool SbxValue::LoadData( SvStream& r, sal_uInt16 )
case SbxDOUBLE:
{
// Floats as ASCII
- XubString aVal;
- r.ReadByteString( aVal, RTL_TEXTENCODING_ASCII_US );
+ XubString aVal = read_lenPrefixed_uInt8s_ToOUString(r,
+ RTL_TEXTENCODING_ASCII_US);
SbxDataType t;
if( ImpScan( aVal, aData.nDouble, t, NULL ) != SbxERR_OK )
{
@@ -1524,9 +1524,9 @@ sal_Bool SbxValue::LoadData( SvStream& r, sal_uInt16 )
}
case SbxSTRING:
{
- XubString aVal;
- r.ReadByteString( aVal, RTL_TEXTENCODING_ASCII_US );
- if( aVal.Len() )
+ rtl::OUString aVal = read_lenPrefixed_uInt8s_ToOUString(r,
+ RTL_TEXTENCODING_ASCII_US);
+ if( aVal.getLength() )
aData.pOUString = new ::rtl::OUString( aVal );
else
aData.pOUString = NULL; // JSM 1995-09-22
@@ -1621,12 +1621,12 @@ sal_Bool SbxValue::StoreData( SvStream& r ) const
case SbxDATE:
// #49935: Save as double, elsewise an error during the read in
((SbxValue*)this)->aData.eType = (SbxDataType)( ( nType & 0xF000 ) | SbxDOUBLE );
- r.WriteByteString( GetCoreString(), RTL_TEXTENCODING_ASCII_US );
+ write_lenPrefixed_uInt8s_FromOUString(r, GetCoreString(), RTL_TEXTENCODING_ASCII_US);
((SbxValue*)this)->aData.eType = (SbxDataType)nType;
break;
case SbxSINGLE:
case SbxDOUBLE:
- r.WriteByteString( GetCoreString(), RTL_TEXTENCODING_ASCII_US );
+ write_lenPrefixed_uInt8s_FromOUString(r, GetCoreString(), RTL_TEXTENCODING_ASCII_US);
break;
case SbxSALUINT64:
case SbxSALINT64:
@@ -1643,12 +1643,11 @@ sal_Bool SbxValue::StoreData( SvStream& r ) const
case SbxSTRING:
if( aData.pOUString )
{
- r.WriteByteString( *aData.pOUString, RTL_TEXTENCODING_ASCII_US );
+ write_lenPrefixed_uInt8s_FromOUString(r, *aData.pOUString, RTL_TEXTENCODING_ASCII_US);
}
else
{
- String aEmpty;
- r.WriteByteString( aEmpty, RTL_TEXTENCODING_ASCII_US );
+ write_lenPrefixed_uInt8s_FromOUString(r, rtl::OUString(), RTL_TEXTENCODING_ASCII_US);
}
break;
case SbxERROR:
diff --git a/basic/source/sbx/sbxvar.cxx b/basic/source/sbx/sbxvar.cxx
index 58b3cb7..6ca2533 100644
--- a/basic/source/sbx/sbxvar.cxx
+++ b/basic/source/sbx/sbxvar.cxx
@@ -445,7 +445,8 @@ sal_Bool SbxVariable::LoadData( SvStream& rStrm, sal_uInt16 nVer )
{
if( !SbxValue::LoadData( rStrm, nVer ) )
return sal_False;
- rStrm.ReadByteString( maName, RTL_TEXTENCODING_ASCII_US );
+ maName = read_lenPrefixed_uInt8s_ToOUString(rStrm,
+ RTL_TEXTENCODING_ASCII_US);
sal_uInt32 nTemp;
rStrm >> nTemp;
nUserData = nTemp;
@@ -454,7 +455,8 @@ sal_Bool SbxVariable::LoadData( SvStream& rStrm, sal_uInt16 nVer )
{
rStrm.SeekRel( -1L );
rStrm >> nType;
- rStrm.ReadByteString( maName, RTL_TEXTENCODING_ASCII_US );
+ maName = read_lenPrefixed_uInt8s_ToOUString(rStrm,
+ RTL_TEXTENCODING_ASCII_US);
sal_uInt32 nTemp;
rStrm >> nTemp;
nUserData = nTemp;
@@ -477,7 +479,8 @@ sal_Bool SbxVariable::LoadData( SvStream& rStrm, sal_uInt16 nVer )
case SbxSINGLE:
{
// Floats as ASCII
- rStrm.ReadByteString( aTmpString, RTL_TEXTENCODING_ASCII_US );
+ aTmpString = read_lenPrefixed_uInt8s_ToOUString(
+ rStrm, RTL_TEXTENCODING_ASCII_US);
double d;
SbxDataType t;
if( ImpScan( aTmpString, d, t, NULL ) != SbxERR_OK || t == SbxDOUBLE )
@@ -492,7 +495,8 @@ sal_Bool SbxVariable::LoadData( SvStream& rStrm, sal_uInt16 nVer )
case SbxDOUBLE:
{
// Floats as ASCII
- rStrm.ReadByteString( aTmpString, RTL_TEXTENCODING_ASCII_US );
+ aTmpString = read_lenPrefixed_uInt8s_ToOUString(rStrm,
+ RTL_TEXTENCODING_ASCII_US);
SbxDataType t;
if( ImpScan( aTmpString, aTmp.nDouble, t, NULL ) != SbxERR_OK )
{
@@ -502,8 +506,8 @@ sal_Bool SbxVariable::LoadData( SvStream& rStrm, sal_uInt16 nVer )
break;
}
case SbxSTRING:
- rStrm.ReadByteString( aTmpString, RTL_TEXTENCODING_ASCII_US );
- aVal = aTmpString;
+ aVal = read_lenPrefixed_uInt8s_ToOUString(rStrm,
+ RTL_TEXTENCODING_ASCII_US);
break;
case SbxEMPTY:
case SbxNULL:
@@ -561,7 +565,8 @@ sal_Bool SbxVariable::StoreData( SvStream& rStrm ) const
bValStore = SbxValue::StoreData( rStrm );
if( !bValStore )
return sal_False;
- rStrm.WriteByteString( maName, RTL_TEXTENCODING_ASCII_US );
+ write_lenPrefixed_uInt8s_FromOUString(rStrm, maName,
+ RTL_TEXTENCODING_ASCII_US);
rStrm << (sal_uInt32)nUserData;
if( pInfo.Is() )
{
diff --git a/dbaccess/source/ui/tabledesign/TableRow.cxx b/dbaccess/source/ui/tabledesign/TableRow.cxx
index b4ed28a..35be52c 100644
--- a/dbaccess/source/ui/tabledesign/TableRow.cxx
+++ b/dbaccess/source/ui/tabledesign/TableRow.cxx
@@ -128,9 +128,9 @@ namespace dbaui
if(pFieldDesc)
{
_rStr << (sal_Int32)1;
- _rStr.WriteByteString(pFieldDesc->GetName());
- _rStr.WriteByteString(pFieldDesc->GetDescription());
- _rStr.WriteByteString(pFieldDesc->GetHelpText());
+ _rStr.WriteUniOrByteString(pFieldDesc->GetName(), _rStr.GetStreamCharSet());
+ _rStr.WriteUniOrByteString(pFieldDesc->GetDescription(), _rStr.GetStreamCharSet());
+ _rStr.WriteUniOrByteString(pFieldDesc->GetHelpText(), _rStr.GetStreamCharSet());
double nValue = 0.0;
Any aValue = pFieldDesc->GetControlDefault();
if ( aValue >>= nValue )
@@ -141,7 +141,7 @@ namespace dbaui
else
{
_rStr << sal_Int32(2);
- _rStr.WriteByteString(::comphelper::getString(aValue));
+ _rStr.WriteUniOrByteString(::comphelper::getString(aValue), _rStr.GetStreamCharSet());
}
_rStr << pFieldDesc->GetType();
@@ -170,12 +170,12 @@ namespace dbaui
OFieldDescription* pFieldDesc = new OFieldDescription();
_rRow.m_pActFieldDescr = pFieldDesc;
String sValue;
- _rStr.ReadByteString(sValue);
+ _rStr.ReadUniOrByteString(sValue, _rStr.GetStreamCharSet());
pFieldDesc->SetName(sValue);
- _rStr.ReadByteString(sValue);
+ _rStr.ReadUniOrByteString(sValue, _rStr.GetStreamCharSet());
pFieldDesc->SetDescription(sValue);
- _rStr.ReadByteString(sValue);
+ _rStr.ReadUniOrByteString(sValue, _rStr.GetStreamCharSet());
pFieldDesc->SetHelpText(sValue);
_rStr >> nValue;
@@ -190,7 +190,7 @@ namespace dbaui
break;
}
case 2:
- _rStr.ReadByteString(sValue);
+ _rStr.ReadUniOrByteString(sValue, _rStr.GetStreamCharSet());
aControlDefault <<= ::rtl::OUString(sValue);
break;
}
diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx
index 0fd144b..8435e66 100644
--- a/editeng/source/editeng/editobj.cxx
+++ b/editeng/source/editeng/editobj.cxx
@@ -1230,7 +1230,7 @@ void BinTextObject::CreateData( SvStream& rIStream )
pC->GetText() = rtl::OStringToOUString(aByteString, eSrcEncoding);
// StyleName and Family...
- rIStream.ReadByteString( pC->GetStyle(), eSrcEncoding );
+ rIStream.ReadUniOrByteString( pC->GetStyle(), eSrcEncoding );
sal_uInt16 nStyleFamily;
rIStream >> nStyleFamily;
pC->GetFamily() = (SfxStyleFamily)nStyleFamily;
@@ -1522,10 +1522,10 @@ void BinTextObject::CreateData300( SvStream& rIStream )
ContentInfo* pC = CreateAndInsertContent();
// The Text...
- rIStream.ReadByteString( pC->GetText() );
+ rIStream.ReadUniOrByteString( pC->GetText(), rIStream.GetStreamCharSet() );
// StyleName and Family...
- rIStream.ReadByteString( pC->GetStyle() );
+ rIStream.ReadUniOrByteString( pC->GetStyle(), rIStream.GetStreamCharSet() );
sal_uInt16 nStyleFamily;
rIStream >> nStyleFamily;
pC->GetFamily() = (SfxStyleFamily)nStyleFamily;
diff --git a/editeng/source/items/bulitem.cxx b/editeng/source/items/bulitem.cxx
index 2d0e066..caca392 100644
--- a/editeng/source/items/bulitem.cxx
+++ b/editeng/source/items/bulitem.cxx
@@ -64,7 +64,7 @@ void SvxBulletItem::StoreFont( SvStream& rStream, const Font& rFont )
nTemp = (sal_uInt16)rFont.GetItalic(); rStream << nTemp;
// UNICODE: rStream << rFont.GetName();
- rStream.WriteByteString(rFont.GetName());
+ rStream.WriteUniOrByteString(rFont.GetName(), rStream.GetStreamCharSet());
rStream << rFont.IsOutline();
rStream << rFont.IsShadow();
@@ -94,7 +94,7 @@ Font SvxBulletItem::CreateFont( SvStream& rStream, sal_uInt16 nVer )
// UNICODE: rStream >> aName; aFont.SetName( aName );
String aName;
- rStream.ReadByteString(aName);
+ rStream.ReadUniOrByteString(aName, rStream.GetStreamCharSet());
aFont.SetName( aName );
if( nVer == 1 )
@@ -217,10 +217,10 @@ SvxBulletItem::SvxBulletItem( SvStream& rStrm, sal_uInt16 _nWhich ) :
rStrm >> nScale;
// UNICODE: rStrm >> aPrevText;
- rStrm.ReadByteString(aPrevText);
+ rStrm.ReadUniOrByteString(aPrevText, rStrm.GetStreamCharSet());
// UNICODE: rStrm >> aFollowText;
- rStrm.ReadByteString(aFollowText);
+ rStrm.ReadUniOrByteString(aFollowText, rStrm.GetStreamCharSet());
nValidMask = 0xFFFF;
}
@@ -416,10 +416,10 @@ SvStream& SvxBulletItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/ ) c
rStrm << nScale;
// UNICODE: rStrm << aPrevText;
- rStrm.WriteByteString(aPrevText);
+ rStrm.WriteUniOrByteString(aPrevText, rStrm.GetStreamCharSet());
// UNICODE: rStrm << aFollowText;
- rStrm.WriteByteString(aFollowText);
+ rStrm.WriteUniOrByteString(aFollowText, rStrm.GetStreamCharSet());
return rStrm;
}
diff --git a/editeng/source/items/flditem.cxx b/editeng/source/items/flditem.cxx
index 56b2d71..bafb976 100644
--- a/editeng/source/items/flditem.cxx
+++ b/editeng/source/items/flditem.cxx
@@ -735,7 +735,7 @@ void SvxExtFileField::Load( SvPersistStream & rStm )
sal_uInt16 nType, nFormat;
// UNICODE: rStm >> aFile;
- rStm.ReadByteString(aFile);
+ rStm.ReadUniOrByteString(aFile, rStm.GetStreamCharSet());
rStm >> nType;
rStm >> nFormat;
@@ -749,7 +749,7 @@ void SvxExtFileField::Load( SvPersistStream & rStm )
void SvxExtFileField::Save( SvPersistStream & rStm )
{
// UNICODE: rStm << aFile;
- rStm.WriteByteString(aFile);
+ rStm.WriteUniOrByteString(aFile, rStm.GetStreamCharSet());
rStm << (sal_uInt16) eType;
rStm << (sal_uInt16) eFormat;
diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx
index addb3f6..18af4a6 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -3443,7 +3443,7 @@ SvxBrushItem::SvxBrushItem( SvStream& rStream, sal_uInt16 nVersion,
{
String aRel;
// UNICODE: rStream >> aRel;
- rStream.ReadByteString(aRel);
+ rStream.ReadUniOrByteString(aRel, rStream.GetStreamCharSet());
// TODO/MBA: how can we get a BaseURL here?!
OSL_FAIL("No BaseURL!");
@@ -3456,7 +3456,7 @@ SvxBrushItem::SvxBrushItem( SvStream& rStream, sal_uInt16 nVersion,
{
pStrFilter = new String;
// UNICODE: rStream >> *pStrFilter;
- rStream.ReadByteString(*pStrFilter);
+ rStream.ReadUniOrByteString(*pStrFilter, rStream.GetStreamCharSet());
}
rStream >> nPos;
@@ -3834,12 +3834,12 @@ SvStream& SvxBrushItem::Store( SvStream& rStream , sal_uInt16 /*nItemVersion*/ )
// TODO/MBA: how to get a BaseURL?!
String aRel = INetURLObject::GetRelURL( String(), *pStrLink );
// UNICODE: rStream << aRel;
- rStream.WriteByteString(aRel);
+ rStream.WriteUniOrByteString(aRel, rStream.GetStreamCharSet());
}
if ( pStrFilter )
{
// UNICODE: rStream << *pStrFilter;
- rStream.WriteByteString(*pStrFilter);
+ rStream.WriteUniOrByteString(*pStrFilter, rStream.GetStreamCharSet());
}
rStream << (sal_Int8)eGraphicPos;
return rStream;
diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx
index 8f71ff2..01fc463 100644
--- a/editeng/source/items/numitem.cxx
+++ b/editeng/source/items/numitem.cxx
@@ -219,9 +219,9 @@ SvStream& SvxNumberFormat::Store(SvStream &rStream, FontToSubsFontConverter pC
rStream << nCharTextDistance;
rtl_TextEncoding eEnc = osl_getThreadTextEncoding();
- rStream.WriteByteString(sPrefix, eEnc);
- rStream.WriteByteString(sSuffix, eEnc);
- rStream.WriteByteString(sCharStyleName, eEnc);
+ rStream.WriteUniOrByteString(sPrefix, eEnc);
+ rStream.WriteUniOrByteString(sSuffix, eEnc);
+ rStream.WriteUniOrByteString(sCharStyleName, eEnc);
if(pGraphicBrush)
{
rStream << (sal_uInt16)1;
diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx
index 4f5dc8d..e306907 100644
--- a/editeng/source/items/textitem.cxx
+++ b/editeng/source/items/textitem.cxx
@@ -398,16 +398,16 @@ SvStream& SvxFontItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) co
String aStoreFamilyName( GetFamilyName() );
if( bToBats )
aStoreFamilyName = String( "StarBats", sizeof("StarBats")-1, RTL_TEXTENCODING_ASCII_US );
- rStrm.WriteByteString(aStoreFamilyName);
- rStrm.WriteByteString(GetStyleName());
+ rStrm.WriteUniOrByteString(aStoreFamilyName, rStrm.GetStreamCharSet());
+ rStrm.WriteUniOrByteString(GetStyleName(), rStrm.GetStreamCharSet());
// cach for EditEngine, only set while creating clipboard stream.
if ( bEnableStoreUnicodeNames )
{
sal_uInt32 nMagic = STORE_UNICODE_MAGIC_MARKER;
rStrm << nMagic;
- rStrm.WriteByteString( aStoreFamilyName, RTL_TEXTENCODING_UNICODE );
- rStrm.WriteByteString( GetStyleName(), RTL_TEXTENCODING_UNICODE );
+ rStrm.WriteUniOrByteString( aStoreFamilyName, RTL_TEXTENCODING_UNICODE );
+ rStrm.WriteUniOrByteString( GetStyleName(), RTL_TEXTENCODING_UNICODE );
}
return rStrm;
@@ -424,10 +424,10 @@ SfxPoolItem* SvxFontItem::Create(SvStream& rStrm, sal_uInt16) const
rStrm >> eFontTextEncoding;
// UNICODE: rStrm >> aName;
- rStrm.ReadByteString(aName);
+ rStrm.ReadUniOrByteString(aName, rStrm.GetStreamCharSet());
// UNICODE: rStrm >> aStyle;
- rStrm.ReadByteString(aStyle);
+ rStrm.ReadUniOrByteString(aStyle, rStrm.GetStreamCharSet());
// Set the "correct" textencoding
eFontTextEncoding = (sal_uInt8)GetSOLoadTextEncoding( eFontTextEncoding, (sal_uInt16)rStrm.GetVersion() );
@@ -442,8 +442,8 @@ SfxPoolItem* SvxFontItem::Create(SvStream& rStrm, sal_uInt16) const
rStrm >> nMagic;
if ( nMagic == STORE_UNICODE_MAGIC_MARKER )
{
- rStrm.ReadByteString( aName, RTL_TEXTENCODING_UNICODE );
- rStrm.ReadByteString( aStyle, RTL_TEXTENCODING_UNICODE );
+ rStrm.ReadUniOrByteString( aName, RTL_TEXTENCODING_UNICODE );
+ rStrm.ReadUniOrByteString( aStyle, RTL_TEXTENCODING_UNICODE );
}
else
{
diff --git a/idl/source/objects/module.cxx b/idl/source/objects/module.cxx
index 4fd5c78..e8e6542 100644
--- a/idl/source/objects/module.cxx
+++ b/idl/source/objects/module.cxx
@@ -65,7 +65,7 @@ void SvMetaModule::Load( SvPersistStream & rStm )
rStm >> aTypeList;
rStm >> aAttrList;
// browser
- rStm.ReadByteString( aIdlFileName );
+ rStm.ReadUniOrByteString( aIdlFileName, rStm.GetStreamCharSet() );
aHelpFileName = read_lenPrefixed_uInt8s_ToOString(rStm);
aSlotIdFile = read_lenPrefixed_uInt8s_ToOString(rStm);
aModulePrefix = read_lenPrefixed_uInt8s_ToOString(rStm);
@@ -90,7 +90,7 @@ void SvMetaModule::Save( SvPersistStream & rStm )
rStm << aTypeList;
rStm << aAttrList;
// browser
- rStm.WriteByteString( aIdlFileName );
+ rStm.WriteUniOrByteString( aIdlFileName, rStm.GetStreamCharSet() );
write_lenPrefixed_uInt8s_FromOString(rStm, aHelpFileName);
write_lenPrefixed_uInt8s_FromOString(rStm, aSlotIdFile);
write_lenPrefixed_uInt8s_FromOString(rStm, aModulePrefix);
@@ -368,9 +368,9 @@ void SvMetaModule::WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm,
{
rOutStm << SvHash_module()->GetName().GetBuffer() << endl
<< '\"';
- rOutStm.WriteByteString( aBeginName.GetHexName() );
+ rOutStm.WriteUniOrByteString( aBeginName.GetHexName(), rOutStm.GetStreamCharSet() );
rOutStm << '\"' << endl << '\"';
- rOutStm.WriteByteString( aEndName.GetHexName() );
+ rOutStm.WriteUniOrByteString( aEndName.GetHexName(), rOutStm.GetStreamCharSet() );
rOutStm << '\"' << endl;
SvMetaExtern::WriteSvIdl( rBase, rOutStm, nTab );
}
diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx
index fbd982d..93adcfe 100644
--- a/sc/source/core/data/patattr.cxx
+++ b/sc/source/core/data/patattr.cxx
@@ -172,7 +172,7 @@ SfxPoolItem* ScPatternAttr::Create( SvStream& rStream, sal_uInt16 /* nVersion */
{
short eFamDummy;
pStr = new String;
- rStream.ReadByteString( *pStr, rStream.GetStreamCharSet() );
+ rStream.ReadUniOrByteString( *pStr, rStream.GetStreamCharSet() );
rStream >> eFamDummy; // wg. altem Dateiformat
}
else
@@ -194,11 +194,11 @@ SvStream& ScPatternAttr::Store(SvStream& rStream, sal_uInt16 /* nItemVersion */)
rStream << (sal_Bool)sal_True;
if ( pStyle )
- rStream.WriteByteString( pStyle->GetName(), rStream.GetStreamCharSet() );
+ rStream.WriteUniOrByteString( pStyle->GetName(), rStream.GetStreamCharSet() );
else if ( pName ) // wenn Style geloescht ist/war
- rStream.WriteByteString( *pName, rStream.GetStreamCharSet() );
+ rStream.WriteUniOrByteString( *pName, rStream.GetStreamCharSet() );
else
- rStream.WriteByteString( ScGlobal::GetRscString(STR_STYLENAME_STANDARD),
+ rStream.WriteUniOrByteString( ScGlobal::GetRscString(STR_STYLENAME_STANDARD),
rStream.GetStreamCharSet() );
rStream << (short)SFX_STYLE_FAMILY_PARA; // wg. altem Dateiformat
diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx
index fa7836b..61b8355 100644
--- a/sc/source/core/tool/autoform.cxx
+++ b/sc/source/core/tool/autoform.cxx
@@ -797,8 +797,14 @@ sal_Bool ScAutoFormatData::Load( SvStream& rStream, const ScAfVersions& rVersion
(AUTOFORMAT_DATA_ID_504 <= nVer && nVer <= AUTOFORMAT_DATA_ID)) )
{
// --- from 680/dr25 on: store strings as UTF-8
- CharSet eCharSet = (nVer >= AUTOFORMAT_ID_680DR25) ? RTL_TEXTENCODING_UTF8 : rStream.GetStreamCharSet();
- rStream.ReadByteString( aName, eCharSet );
+ if (nVer >= AUTOFORMAT_ID_680DR25)
+ {
+ aName = read_lenPrefixed_uInt8s_ToOUString(rStream,
+ RTL_TEXTENCODING_UTF8);
+ }
+ else
+ rStream.ReadUniOrByteString( aName, rStream.GetStreamCharSet() );
+
if( AUTOFORMAT_DATA_ID_552 <= nVer )
{
rStream >> nStrResId;
@@ -838,7 +844,7 @@ sal_Bool ScAutoFormatData::LoadOld( SvStream& rStream, const ScAfVersions& rVers
bRet = (rStream.GetError() == 0);
if (bRet && (nVal == AUTOFORMAT_OLD_DATA_ID))
{
- rStream.ReadByteString( aName, rStream.GetStreamCharSet() );
+ rStream.ReadUniOrByteString( aName, rStream.GetStreamCharSet() );
sal_Bool b;
rStream >> b; bIncludeFont = b;
rStream >> b; bIncludeJustify = b;
@@ -863,7 +869,7 @@ sal_Bool ScAutoFormatData::Save(SvStream& rStream)
sal_Bool b;
rStream << nVal;
// --- from 680/dr25 on: store strings as UTF-8
- rStream.WriteByteString( aName, RTL_TEXTENCODING_UTF8 );
+ write_lenPrefixed_uInt8s_FromOUString(rStream, aName, RTL_TEXTENCODING_UTF8);
rStream << nStrResId;
rStream << ( b = bIncludeFont );
diff --git a/sc/source/core/tool/ddelink.cxx b/sc/source/core/tool/ddelink.cxx
index 7fbb58b..ca95681 100644
--- a/sc/source/core/tool/ddelink.cxx
+++ b/sc/source/core/tool/ddelink.cxx
@@ -92,9 +92,9 @@ ScDdeLink::ScDdeLink( ScDocument* pD, SvStream& rStream, ScMultipleReadHeader& r
rHdr.StartEntry();
rtl_TextEncoding eCharSet = rStream.GetStreamCharSet();
- rStream.ReadByteString( aAppl, eCharSet );
- rStream.ReadByteString( aTopic, eCharSet );
- rStream.ReadByteString( aItem, eCharSet );
+ rStream.ReadUniOrByteString( aAppl, eCharSet );
+ rStream.ReadUniOrByteString( aTopic, eCharSet );
+ rStream.ReadUniOrByteString( aItem, eCharSet );
sal_Bool bHasValue;
rStream >> bHasValue;
@@ -114,9 +114,9 @@ void ScDdeLink::Store( SvStream& rStream, ScMultipleWriteHeader& rHdr ) const
rHdr.StartEntry();
rtl_TextEncoding eCharSet = rStream.GetStreamCharSet();
- rStream.WriteByteString( aAppl, eCharSet );
- rStream.WriteByteString( aTopic, eCharSet );
- rStream.WriteByteString( aItem, eCharSet );
+ rStream.WriteUniOrByteString( aAppl, eCharSet );
+ rStream.WriteUniOrByteString( aTopic, eCharSet );
+ rStream.WriteUniOrByteString( aItem, eCharSet );
sal_Bool bHasValue = ( pResult != NULL );
rStream << bHasValue;
diff --git a/sc/source/core/tool/zforauto.cxx b/sc/source/core/tool/zforauto.cxx
index 4ebbee3..048c981 100644
--- a/sc/source/core/tool/zforauto.cxx
+++ b/sc/source/core/tool/zforauto.cxx
@@ -61,7 +61,7 @@ ScNumFormatAbbrev::ScNumFormatAbbrev(sal_uLong nFormat,
void ScNumFormatAbbrev::Load( SvStream& rStream, CharSet eByteStrSet )
{
sal_uInt16 nSysLang, nLang;
- rStream.ReadByteString( sFormatstring, eByteStrSet );
+ rStream.ReadUniOrByteString( sFormatstring, eByteStrSet );
rStream >> nSysLang >> nLang;
eLnge = (LanguageType) nLang;
eSysLnge = (LanguageType) nSysLang;
@@ -71,7 +71,7 @@ void ScNumFormatAbbrev::Load( SvStream& rStream, CharSet eByteStrSet )
void ScNumFormatAbbrev::Save( SvStream& rStream, CharSet eByteStrSet ) const
{
- rStream.WriteByteString( sFormatstring, eByteStrSet );
+ rStream.WriteUniOrByteString( sFormatstring, eByteStrSet );
rStream << (sal_uInt16) eSysLnge << (sal_uInt16) eLnge;
}
diff --git a/sd/source/filter/html/pubdlg.cxx b/sd/source/filter/html/pubdlg.cxx
index 6a9515d..5571461 100644
--- a/sd/source/filter/html/pubdlg.cxx
+++ b/sd/source/filter/html/pubdlg.cxx
@@ -267,19 +267,25 @@ SvStream& operator >> (SvStream& rIn, SdPublishingDesign& rDesign)
sal_uInt16 nTemp16;
- rIn.ReadByteString( rDesign.m_aDesignName, RTL_TEXTENCODING_UTF8 );
+ rDesign.m_aDesignName = read_lenPrefixed_uInt8s_ToOUString(rIn,
+ RTL_TEXTENCODING_UTF8);
rIn >> nTemp16;
rDesign.m_eMode = (HtmlPublishMode)nTemp16;
rIn >> rDesign.m_bContentPage;
rIn >> rDesign.m_bNotes;
rIn >> rDesign.m_nResolution;
- rIn.ReadByteString( rDesign.m_aCompression, RTL_TEXTENCODING_UTF8 );
+ rDesign.m_aCompression = read_lenPrefixed_uInt8s_ToOUString(rIn,
+ RTL_TEXTENCODING_UTF8);
rIn >> nTemp16;
rDesign.m_eFormat = (PublishingFormat)nTemp16;
- rIn.ReadByteString( rDesign.m_aAuthor, RTL_TEXTENCODING_UTF8 );
- rIn.ReadByteString( rDesign.m_aEMail, RTL_TEXTENCODING_UTF8 );
- rIn.ReadByteString( rDesign.m_aWWW, RTL_TEXTENCODING_UTF8 );
- rIn.ReadByteString( rDesign.m_aMisc, RTL_TEXTENCODING_UTF8 );
+ rDesign.m_aAuthor = read_lenPrefixed_uInt8s_ToOUString(rIn,
+ RTL_TEXTENCODING_UTF8);
+ rDesign.m_aEMail = read_lenPrefixed_uInt8s_ToOUString(rIn,
+ RTL_TEXTENCODING_UTF8);
+ rDesign.m_aWWW = read_lenPrefixed_uInt8s_ToOUString(rIn,
+ RTL_TEXTENCODING_UTF8);
+ rDesign.m_aMisc = read_lenPrefixed_uInt8s_ToOUString(rIn,
+ RTL_TEXTENCODING_UTF8);
rIn >> rDesign.m_bDownload;
rIn >> rDesign.m_bCreated; // not used
rIn >> rDesign.m_nButtonThema;
@@ -294,8 +300,10 @@ SvStream& operator >> (SvStream& rIn, SdPublishingDesign& rDesign)
rIn >> nTemp16;
rDesign.m_eScript = (PublishingScript)nTemp16;
- rIn.ReadByteString( rDesign.m_aURL, RTL_TEXTENCODING_UTF8 );
- rIn.ReadByteString( rDesign.m_aCGI, RTL_TEXTENCODING_UTF8 );
+ rDesign.m_aURL = read_lenPrefixed_uInt8s_ToOUString(rIn,
+ RTL_TEXTENCODING_UTF8);
+ rDesign.m_aCGI = read_lenPrefixed_uInt8s_ToOUString(rIn,
+ RTL_TEXTENCODING_UTF8);
rIn >> rDesign.m_bAutoSlide;
rIn >> rDesign.m_nSlideDuration;
@@ -315,18 +323,24 @@ SvStream& operator << (SvStream& rOut, const SdPublishingDesign& rDesign)
SdIOCompat aIO(rOut, STREAM_WRITE, 0);
// Name
- rOut.WriteByteString( rDesign.m_aDesignName, RTL_TEXTENCODING_UTF8 );
+ write_lenPrefixed_uInt8s_FromOUString(rOut, rDesign.m_aDesignName,
+ RTL_TEXTENCODING_UTF8);
rOut << (sal_uInt16)rDesign.m_eMode;
rOut << rDesign.m_bContentPage;
rOut << rDesign.m_bNotes;
rOut << rDesign.m_nResolution;
- rOut.WriteByteString( rDesign.m_aCompression, RTL_TEXTENCODING_UTF8 );
+ write_lenPrefixed_uInt8s_FromOUString(rOut, rDesign.m_aCompression,
+ RTL_TEXTENCODING_UTF8);
rOut << (sal_uInt16)rDesign.m_eFormat;
- rOut.WriteByteString( rDesign.m_aAuthor, RTL_TEXTENCODING_UTF8 );
- rOut.WriteByteString( rDesign.m_aEMail, RTL_TEXTENCODING_UTF8 );
- rOut.WriteByteString( rDesign.m_aWWW, RTL_TEXTENCODING_UTF8 );
- rOut.WriteByteString( rDesign.m_aMisc, RTL_TEXTENCODING_UTF8 );
+ write_lenPrefixed_uInt8s_FromOUString(rOut, rDesign.m_aAuthor,
+ RTL_TEXTENCODING_UTF8);
+ write_lenPrefixed_uInt8s_FromOUString(rOut, rDesign.m_aEMail,
+ RTL_TEXTENCODING_UTF8);
+ write_lenPrefixed_uInt8s_FromOUString(rOut, rDesign.m_aWWW,
+ RTL_TEXTENCODING_UTF8);
+ write_lenPrefixed_uInt8s_FromOUString(rOut, rDesign.m_aMisc,
+ RTL_TEXTENCODING_UTF8);
rOut << rDesign.m_bDownload;
rOut << rDesign.m_bCreated; // not used
rOut << rDesign.m_nButtonThema;
@@ -340,8 +354,10 @@ SvStream& operator << (SvStream& rOut, const SdPublishingDesign& rDesign)
rOut << rDesign.m_bUseColor;
rOut << (sal_uInt16)rDesign.m_eScript;
- rOut.WriteByteString( rDesign.m_aURL, RTL_TEXTENCODING_UTF8 );
- rOut.WriteByteString( rDesign.m_aCGI, RTL_TEXTENCODING_UTF8 );
+ write_lenPrefixed_uInt8s_FromOUString(rOut, rDesign.m_aURL,
+ RTL_TEXTENCODING_UTF8);
+ write_lenPrefixed_uInt8s_FromOUString(rOut, rDesign.m_aCGI,
+ RTL_TEXTENCODING_UTF8);
rOut << rDesign.m_bAutoSlide;
rOut << rDesign.m_nSlideDuration;
diff --git a/sfx2/source/appl/appmisc.cxx b/sfx2/source/appl/appmisc.cxx
index e323361..eaef4b4 100644
--- a/sfx2/source/appl/appmisc.cxx
+++ b/sfx2/source/appl/appmisc.cxx
@@ -192,7 +192,7 @@ std::vector<sal_uInt16>* SfxApplication::GetDisabledSlotList_Impl()
{
// Read Slot file
String aTitle;
- pStream->ReadByteString(aTitle);
+ pStream->ReadUniOrByteString(aTitle, pStream->GetStreamCharSet());
if ( aTitle.CompareToAscii("SfxSlotFile" ) == COMPARE_EQUAL )
{
sal_uInt16 nCount;
@@ -207,7 +207,7 @@ std::vector<sal_uInt16>* SfxApplication::GetDisabledSlotList_Impl()
pList->push_back( nSlot );
}
- pStream->ReadByteString(aTitle);
+ pStream->ReadUniOrByteString(aTitle, pStream->GetStreamCharSet());
if ( aTitle.CompareToAscii("END" ) != COMPARE_EQUAL || pStream->GetError() )
{
// Read failed
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index f1cf5c0..49c7bd3 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list