From b69864f3f8c9be2e1f28f4b422074d2040b084a0 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 8 Jan 2014 08:48:26 +0200 Subject: 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 Reviewed-by: Michael Stahl --- svx/source/items/hlnkitem.cxx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'svx/source/items/hlnkitem.cxx') 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() ); } } } -- cgit