summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/tabledesign
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 /dbaccess/source/ui/tabledesign
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 'dbaccess/source/ui/tabledesign')
-rw-r--r--dbaccess/source/ui/tabledesign/TableRow.cxx28
-rw-r--r--dbaccess/source/ui/tabledesign/TableRowExchange.cxx2
2 files changed, 15 insertions, 15 deletions
diff --git a/dbaccess/source/ui/tabledesign/TableRow.cxx b/dbaccess/source/ui/tabledesign/TableRow.cxx
index de928de77517..63284a4a9f6c 100644
--- a/dbaccess/source/ui/tabledesign/TableRow.cxx
+++ b/dbaccess/source/ui/tabledesign/TableRow.cxx
@@ -108,11 +108,11 @@ namespace dbaui
{
SvStream& operator<<( SvStream& _rStr, const OTableRow& _rRow )
{
- _rStr << _rRow.m_nPos;
+ _rStr.WriteInt32( _rRow.m_nPos );
OFieldDescription* pFieldDesc = _rRow.GetActFieldDescr();
if(pFieldDesc)
{
- _rStr << (sal_Int32)1;
+ _rStr.WriteInt32( (sal_Int32)1 );
_rStr.WriteUniOrByteString(pFieldDesc->GetName(), _rStr.GetStreamCharSet());
_rStr.WriteUniOrByteString(pFieldDesc->GetDescription(), _rStr.GetStreamCharSet());
_rStr.WriteUniOrByteString(pFieldDesc->GetHelpText(), _rStr.GetStreamCharSet());
@@ -120,28 +120,28 @@ namespace dbaui
Any aValue = pFieldDesc->GetControlDefault();
if ( aValue >>= nValue )
{
- _rStr << sal_Int32(1);
+ _rStr.WriteInt32( sal_Int32(1) );
_rStr << nValue;
}
else
{
- _rStr << sal_Int32(2);
+ _rStr.WriteInt32( sal_Int32(2) );
_rStr.WriteUniOrByteString(::comphelper::getString(aValue), _rStr.GetStreamCharSet());
}
- _rStr << pFieldDesc->GetType();
+ _rStr.WriteInt32( pFieldDesc->GetType() );
- _rStr << pFieldDesc->GetPrecision();
- _rStr << pFieldDesc->GetScale();
- _rStr << pFieldDesc->GetIsNullable();
- _rStr << pFieldDesc->GetFormatKey();
- _rStr << (sal_Int32)pFieldDesc->GetHorJustify();
- _rStr << sal_Int32(pFieldDesc->IsAutoIncrement() ? 1 : 0);
- _rStr << sal_Int32(pFieldDesc->IsPrimaryKey() ? 1 : 0);
- _rStr << sal_Int32(pFieldDesc->IsCurrency() ? 1 : 0);
+ _rStr.WriteInt32( pFieldDesc->GetPrecision() );
+ _rStr.WriteInt32( pFieldDesc->GetScale() );
+ _rStr.WriteInt32( pFieldDesc->GetIsNullable() );
+ _rStr.WriteInt32( pFieldDesc->GetFormatKey() );
+ _rStr.WriteInt32( (sal_Int32)pFieldDesc->GetHorJustify() );
+ _rStr.WriteInt32( sal_Int32(pFieldDesc->IsAutoIncrement() ? 1 : 0) );
+ _rStr.WriteInt32( sal_Int32(pFieldDesc->IsPrimaryKey() ? 1 : 0) );
+ _rStr.WriteInt32( sal_Int32(pFieldDesc->IsCurrency() ? 1 : 0) );
}
else
- _rStr << (sal_Int32)0;
+ _rStr.WriteInt32( (sal_Int32)0 );
return _rStr;
}
SvStream& operator>>( SvStream& _rStr, OTableRow& _rRow )
diff --git a/dbaccess/source/ui/tabledesign/TableRowExchange.cxx b/dbaccess/source/ui/tabledesign/TableRowExchange.cxx
index 3a14971d7dc3..0d520398bac5 100644
--- a/dbaccess/source/ui/tabledesign/TableRowExchange.cxx
+++ b/dbaccess/source/ui/tabledesign/TableRowExchange.cxx
@@ -37,7 +37,7 @@ namespace dbaui
::std::vector< ::boost::shared_ptr<OTableRow> >* pRows = reinterpret_cast< ::std::vector< ::boost::shared_ptr<OTableRow> >* >(pUserObject);
if(pRows)
{
- (*rxOStm) << (sal_Int32)pRows->size(); // first stream the size
+ (*rxOStm).WriteInt32( (sal_Int32)pRows->size() ); // first stream the size
::std::vector< ::boost::shared_ptr<OTableRow> >::const_iterator aIter = pRows->begin();
::std::vector< ::boost::shared_ptr<OTableRow> >::const_iterator aEnd = pRows->end();
for(;aIter != aEnd;++aIter)