summaryrefslogtreecommitdiff
path: root/svx/source/items
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-01-08 08:48:26 +0200
committerMichael Stahl <mstahl@redhat.com>2014-01-10 13:26:24 +0000
commitb69864f3f8c9be2e1f28f4b422074d2040b084a0 (patch)
tree93d51bc91257472198beffccb92188ceee61667d /svx/source/items
parentde84529b55f5b295b089043a7119d6b0d8b92408 (diff)
re-write SvStream operator<< to non-overloaded methods
This is the actual re-write. Use a clang rewriter to rewrite SvStream::operator<< to methods like WriteuInt32. Note that the rewriter is not perfect, and I hand-tweaked the output. In particular, I had to adjust places doing things like (*this) << 1; Change-Id: I5923eda3f4ebaa8b452b6ef109e726e116235a2a Reviewed-on: https://gerrit.libreoffice.org/7342 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'svx/source/items')
-rw-r--r--svx/source/items/algitem.cxx8
-rw-r--r--svx/source/items/grfitem.cxx2
-rw-r--r--svx/source/items/hlnkitem.cxx16
-rw-r--r--svx/source/items/pageitem.cxx2
4 files changed, 14 insertions, 14 deletions
diff --git a/svx/source/items/algitem.cxx b/svx/source/items/algitem.cxx
index 3c129d6f7f9a..790190f5458f 100644
--- a/svx/source/items/algitem.cxx
+++ b/svx/source/items/algitem.cxx
@@ -324,10 +324,10 @@ SfxPoolItem* SvxMarginItem::Create( SvStream& rStream, sal_uInt16 ) const
SvStream& SvxMarginItem::Store( SvStream &rStream, sal_uInt16 /*nItemVersion*/) const
{
- rStream << nLeftMargin;
- rStream << nTopMargin;
- rStream << nRightMargin;
- rStream << nBottomMargin;
+ rStream.WriteInt16( nLeftMargin );
+ rStream.WriteInt16( nTopMargin );
+ rStream.WriteInt16( nRightMargin );
+ rStream.WriteInt16( nBottomMargin );
return rStream;
}
diff --git a/svx/source/items/grfitem.cxx b/svx/source/items/grfitem.cxx
index d63e32e06e59..fa8b5778133c 100644
--- a/svx/source/items/grfitem.cxx
+++ b/svx/source/items/grfitem.cxx
@@ -80,7 +80,7 @@ SvStream& SvxGrfCrop::Store( SvStream& rStrm, sal_uInt16 nVersion ) const
if( GRFCROP_VERSION_SWDEFAULT == nVersion )
top = -top, bottom = -bottom, left = -left, right = -right;
- rStrm << top << left << right << bottom;
+ rStrm.WriteInt32( top ).WriteInt32( left ).WriteInt32( right ).WriteInt32( bottom );
return rStrm;
}
diff --git a/svx/source/items/hlnkitem.cxx b/svx/source/items/hlnkitem.cxx
index 3e4d6923b3b5..65e6bb467af0 100644
--- a/svx/source/items/hlnkitem.cxx
+++ b/svx/source/items/hlnkitem.cxx
@@ -44,17 +44,17 @@ SvStream& SvxHyperlinkItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/
// UNICODE: rStrm << sTarget;
rStrm.WriteUniOrByteString(sTarget, rStrm.GetStreamCharSet());
- rStrm << (sal_uInt32) eType;
+ rStrm.WriteUInt32( (sal_uInt32) eType );
// marker for versioninfo
- rStrm << (sal_uInt32) HYPERLINKFF_MARKER;
+ rStrm.WriteUInt32( (sal_uInt32) HYPERLINKFF_MARKER );
// new data
// UNICODE: rStrm << sIntName;
rStrm.WriteUniOrByteString(sIntName, rStrm.GetStreamCharSet());
// macro-events
- rStrm << nMacroEvents;
+ rStrm.WriteUInt16( nMacroEvents );
// store macros
sal_uInt16 nCnt = pMacroTable ? (sal_uInt16)pMacroTable->size() : 0;
@@ -67,7 +67,7 @@ SvStream& SvxHyperlinkItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/
--nCnt;
}
- rStrm << nCnt;
+ rStrm.WriteUInt16( nCnt );
if( nCnt )
{
@@ -78,7 +78,7 @@ SvStream& SvxHyperlinkItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/
const SvxMacro& rMac = it->second;
if( STARBASIC == rMac.GetScriptType() )
{
- rStrm << (sal_uInt16)it->first;
+ rStrm.WriteUInt16( (sal_uInt16)it->first );
// UNICODE: rStrm << pMac->GetLibName();
rStrm.WriteUniOrByteString(rMac.GetLibName(), rStrm.GetStreamCharSet());
@@ -90,7 +90,7 @@ SvStream& SvxHyperlinkItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/
}
nCnt = nMax - nCnt;
- rStrm << nCnt;
+ rStrm.WriteUInt16( nCnt );
if( nCnt )
{
// 2. ::com::sun::star::script::JavaScript-Macros
@@ -100,7 +100,7 @@ SvStream& SvxHyperlinkItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/
const SvxMacro& rMac = it->second;
if( STARBASIC != rMac.GetScriptType() )
{
- rStrm << (sal_uInt16)it->first;
+ rStrm.WriteUInt16( (sal_uInt16)it->first );
// UNICODE: rStrm << pMac->GetLibName();
rStrm.WriteUniOrByteString(rMac.GetLibName(), rStrm.GetStreamCharSet());
@@ -108,7 +108,7 @@ SvStream& SvxHyperlinkItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/
// UNICODE: rStrm << pMac->GetMacName();
rStrm.WriteUniOrByteString(rMac.GetMacName(), rStrm.GetStreamCharSet());
- rStrm << (sal_uInt16)rMac.GetScriptType();
+ rStrm.WriteUInt16( (sal_uInt16)rMac.GetScriptType() );
}
}
}
diff --git a/svx/source/items/pageitem.cxx b/svx/source/items/pageitem.cxx
index 8f1321e5eee6..a431a9fea121 100644
--- a/svx/source/items/pageitem.cxx
+++ b/svx/source/items/pageitem.cxx
@@ -264,7 +264,7 @@ SvStream& SvxPageItem::Store( SvStream &rStrm, sal_uInt16 /*nItemVersion*/ ) con
// UNICODE: rStrm << aDescName;
rStrm.WriteUniOrByteString(aDescName, rStrm.GetStreamCharSet());
- rStrm << (sal_uInt8)eNumType << bLandscape << eUse;
+ rStrm.WriteUChar( (sal_uInt8)eNumType ).WriteUChar( bLandscape ).WriteUInt16( eUse );
return rStrm;
}