summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-12-19 22:19:52 +0000
committerCaolán McNamara <caolanm@redhat.com>2011-12-21 10:10:58 +0000
commitd00fc0e293852cfc019ffaffa65bee327397677b (patch)
tree3b28b98fb451bee33eff7c06a93dbb4063f07554 /svx
parent92f396733ebc518bcb7a9eae2dd3169d333b82b9 (diff)
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
Diffstat (limited to 'svx')
-rw-r--r--svx/source/items/hlnkitem.cxx32
-rw-r--r--svx/source/items/pageitem.cxx4
2 files changed, 18 insertions, 18 deletions
diff --git a/svx/source/items/hlnkitem.cxx b/svx/source/items/hlnkitem.cxx
index 11a26aa04d49..1f6dfa83a794 100644
--- a/svx/source/items/hlnkitem.cxx
+++ b/svx/source/items/hlnkitem.cxx
@@ -49,13 +49,13 @@ SvStream& SvxHyperlinkItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/
{
// store 'simple' data
// UNICODE: rStrm << sName;
- rStrm.WriteByteString(sName);
+ rStrm.WriteUniOrByteString(sName, rStrm.GetStreamCharSet());
// UNICODE: rStrm << sURL;
- rStrm.WriteByteString(sURL);
+ rStrm.WriteUniOrByteString(sURL, rStrm.GetStreamCharSet());
// UNICODE: rStrm << sTarget;
- rStrm.WriteByteString(sTarget);
+ rStrm.WriteUniOrByteString(sTarget, rStrm.GetStreamCharSet());
rStrm << (sal_uInt32) eType;
@@ -64,7 +64,7 @@ SvStream& SvxHyperlinkItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/
// new data
// UNICODE: rStrm << sIntName;
- rStrm.WriteByteString(sIntName);
+ rStrm.WriteUniOrByteString(sIntName, rStrm.GetStreamCharSet());
// macro-events
rStrm << nMacroEvents;
@@ -91,10 +91,10 @@ SvStream& SvxHyperlinkItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/
rStrm << (sal_uInt16)pMacroTable->GetCurKey();
// UNICODE: rStrm << pMac->GetLibName();
- rStrm.WriteByteString(pMac->GetLibName());
+ rStrm.WriteUniOrByteString(pMac->GetLibName(), rStrm.GetStreamCharSet());
// UNICODE: rStrm << pMac->GetMacName();
- rStrm.WriteByteString(pMac->GetMacName());
+ rStrm.WriteUniOrByteString(pMac->GetMacName(), rStrm.GetStreamCharSet());
}
}
}
@@ -111,10 +111,10 @@ SvStream& SvxHyperlinkItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/
rStrm << (sal_uInt16)pMacroTable->GetCurKey();
// UNICODE: rStrm << pMac->GetLibName();
- rStrm.WriteByteString(pMac->GetLibName());
+ rStrm.WriteUniOrByteString(pMac->GetLibName(), rStrm.GetStreamCharSet());
// UNICODE: rStrm << pMac->GetMacName();
- rStrm.WriteByteString(pMac->GetMacName());
+ rStrm.WriteUniOrByteString(pMac->GetMacName(), rStrm.GetStreamCharSet());
rStrm << (sal_uInt16)pMac->GetScriptType();
}
@@ -131,13 +131,13 @@ SfxPoolItem* SvxHyperlinkItem::Create( SvStream &rStrm, sal_uInt16 /*nItemVer
// simple data-types
// UNICODE: rStrm >> pNew->sName;
- rStrm.ReadByteString(pNew->sName);
+ rStrm.ReadUniOrByteString(pNew->sName, rStrm.GetStreamCharSet());
// UNICODE: rStrm >> pNew->sURL;
- rStrm.ReadByteString(pNew->sURL);
+ rStrm.ReadUniOrByteString(pNew->sURL, rStrm.GetStreamCharSet());
// UNICODE: rStrm >> pNew->sTarget;
- rStrm.ReadByteString(pNew->sTarget);
+ rStrm.ReadUniOrByteString(pNew->sTarget, rStrm.GetStreamCharSet());
rStrm >> nType;
pNew->eType = (SvxLinkInsertMode) nType;
@@ -149,7 +149,7 @@ SfxPoolItem* SvxHyperlinkItem::Create( SvStream &rStrm, sal_uInt16 /*nItemVer
{
// new data
// UNICODE: rStrm >> pNew->sIntName;
- rStrm.ReadByteString(pNew->sIntName);
+ rStrm.ReadUniOrByteString(pNew->sIntName, rStrm.GetStreamCharSet());
// macro-events
rStrm >> pNew->nMacroEvents;
@@ -164,10 +164,10 @@ SfxPoolItem* SvxHyperlinkItem::Create( SvStream &rStrm, sal_uInt16 /*nItemVer
rStrm >> nCurKey;
// UNICODE: rStrm >> aLibName;
- rStrm.ReadByteString(aLibName);
+ rStrm.ReadUniOrByteString(aLibName, rStrm.GetStreamCharSet());
// UNICODE: rStrm >> aMacName;
- rStrm.ReadByteString(aMacName);
+ rStrm.ReadUniOrByteString(aMacName, rStrm.GetStreamCharSet());
pNew->SetMacro( nCurKey, SvxMacro( aMacName, aLibName, STARBASIC ) );
}
@@ -181,10 +181,10 @@ SfxPoolItem* SvxHyperlinkItem::Create( SvStream &rStrm, sal_uInt16 /*nItemVer
rStrm >> nCurKey;
// UNICODE: rStrm >> aLibName;
- rStrm.ReadByteString(aLibName);
+ rStrm.ReadUniOrByteString(aLibName, rStrm.GetStreamCharSet());
// UNICODE: rStrm >> aMacName;
- rStrm.ReadByteString(aMacName);
+ rStrm.ReadUniOrByteString(aMacName, rStrm.GetStreamCharSet());
rStrm >> nScriptType;
diff --git a/svx/source/items/pageitem.cxx b/svx/source/items/pageitem.cxx
index 0ac676debe0a..7dcffd0c9dd4 100644
--- a/svx/source/items/pageitem.cxx
+++ b/svx/source/items/pageitem.cxx
@@ -251,7 +251,7 @@ SfxPoolItem* SvxPageItem::Create( SvStream& rStream, sal_uInt16 ) const
sal_uInt16 nUse;
// UNICODE: rStream >> sStr;
- rStream.ReadByteString( sStr );
+ rStream.ReadUniOrByteString( sStr, rStream.GetStreamCharSet() );
rStream >> eType;
rStream >> bLand;
@@ -270,7 +270,7 @@ SfxPoolItem* SvxPageItem::Create( SvStream& rStream, sal_uInt16 ) const
SvStream& SvxPageItem::Store( SvStream &rStrm, sal_uInt16 /*nItemVersion*/ ) const
{
// UNICODE: rStrm << aDescName;
- rStrm.WriteByteString(aDescName);
+ rStrm.WriteUniOrByteString(aDescName, rStrm.GetStreamCharSet());
rStrm << (sal_uInt8)eNumType << bLandscape << eUse;
return rStrm;