diff options
author | Noel Grandin <noel@peralex.com> | 2014-02-05 10:41:04 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2014-02-12 15:31:40 +0000 |
commit | 15535e32ddcfee451d4dbc9be9de0b8c9f9d78d4 (patch) | |
tree | db4badc477cea1ecd51f5fab82ce0f24ae20f155 /connectivity | |
parent | 7accbd8c0d7f1d0b87748f0de599c4d8b469a61e (diff) |
convert SvStream::operator>> methods to ReadXXX methods
First, I updated the clang rewriter to do the conversion.
Then I lightly hand-tweaked the output for the few places where
the rewriter messed up, mostly when dealing with calls on "this".
Change-Id: I40a6a977959cd97415c678eafc8507de8aa3b1a9
Reviewed-on: https://gerrit.libreoffice.org/7879
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/drivers/dbase/DTable.cxx | 18 | ||||
-rw-r--r-- | connectivity/source/drivers/dbase/dindexnode.cxx | 8 |
2 files changed, 13 insertions, 13 deletions
diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx index 2970cb51bd8a..3705e3302b26 100644 --- a/connectivity/source/drivers/dbase/DTable.cxx +++ b/connectivity/source/drivers/dbase/DTable.cxx @@ -85,7 +85,7 @@ sal_Int32 lcl_getFileSize(SvStream& _rStream) _rStream.Seek(STREAM_SEEK_TO_END); _rStream.SeekRel(-1); char cEOL; - _rStream >> cEOL; + _rStream.ReadChar( cEOL ); nFileSize = _rStream.Tell(); if ( cEOL == DBF_EOL ) nFileSize -= 1; @@ -200,20 +200,20 @@ void ODbaseTable::readHeader() m_pFileStream->Seek(STREAM_SEEK_TO_BEGIN); sal_uInt8 nType=0; - (*m_pFileStream) >> nType; + (*m_pFileStream).ReadUChar( nType ); if(ERRCODE_NONE != m_pFileStream->GetErrorCode()) throwInvalidDbaseFormat(); m_pFileStream->Read((char*)(&m_aHeader.db_aedat), 3*sizeof(sal_uInt8)); if(ERRCODE_NONE != m_pFileStream->GetErrorCode()) throwInvalidDbaseFormat(); - (*m_pFileStream) >> m_aHeader.db_anz; + (*m_pFileStream).ReadUInt32( m_aHeader.db_anz ); if(ERRCODE_NONE != m_pFileStream->GetErrorCode()) throwInvalidDbaseFormat(); - (*m_pFileStream) >> m_aHeader.db_kopf; + (*m_pFileStream).ReadUInt16( m_aHeader.db_kopf ); if(ERRCODE_NONE != m_pFileStream->GetErrorCode()) throwInvalidDbaseFormat(); - (*m_pFileStream) >> m_aHeader.db_slng; + (*m_pFileStream).ReadUInt16( m_aHeader.db_slng ); if(ERRCODE_NONE != m_pFileStream->GetErrorCode()) throwInvalidDbaseFormat(); m_pFileStream->Read((char*)(&m_aHeader.db_frei), 20*sizeof(sal_uInt8)); @@ -562,14 +562,14 @@ sal_Bool ODbaseTable::ReadMemoHeader() m_pMemoStream->RefreshBuffer(); // make sure that the header information is actually read again m_pMemoStream->Seek(0L); - (*m_pMemoStream) >> m_aMemoHeader.db_next; + (*m_pMemoStream).ReadUInt32( m_aMemoHeader.db_next ); switch (m_aHeader.db_typ) { case dBaseIIIMemo: // dBase III: fixed block size case dBaseIVMemo: // sometimes dBase3 is attached to dBase4 memo m_pMemoStream->Seek(20L); - (*m_pMemoStream) >> m_aMemoHeader.db_size; + (*m_pMemoStream).ReadUInt16( m_aMemoHeader.db_size ); if (m_aMemoHeader.db_size > 1 && m_aMemoHeader.db_size != 512) // 1 is also for dBase 3 m_aMemoHeader.db_typ = MemodBaseIV; else if (m_aMemoHeader.db_size > 1 && m_aMemoHeader.db_size == 512) @@ -596,7 +596,7 @@ sal_Bool ODbaseTable::ReadMemoHeader() m_aMemoHeader.db_typ = MemoFoxPro; m_pMemoStream->Seek(6L); m_pMemoStream->SetNumberFormatInt(NUMBERFORMAT_INT_BIGENDIAN); - (*m_pMemoStream) >> m_aMemoHeader.db_size; + (*m_pMemoStream).ReadUInt16( m_aMemoHeader.db_size ); break; default: SAL_WARN( "connectivity.drivers", "ODbaseTable::ReadMemoHeader: unsupported memo type!" ); @@ -2716,7 +2716,7 @@ sal_Bool ODbaseTable::ReadMemo(sal_uIntPtr nBlockNo, ORowSetValue& aVariable) } sal_uInt32 nLength(0); - (*m_pMemoStream) >> nLength; + (*m_pMemoStream).ReadUInt32( nLength ); if (m_aMemoHeader.db_typ == MemodBaseIV) nLength -= 8; diff --git a/connectivity/source/drivers/dbase/dindexnode.cxx b/connectivity/source/drivers/dbase/dindexnode.cxx index b795ea869098..7e519fc27837 100644 --- a/connectivity/source/drivers/dbase/dindexnode.cxx +++ b/connectivity/source/drivers/dbase/dindexnode.cxx @@ -654,12 +654,12 @@ void ONDXPage::Merge(sal_uInt16 nParentNodePos, ONDXPagePtr xPage) //------------------------------------------------------------------ void ONDXNode::Read(SvStream &rStream, ODbaseIndex& rIndex) { - rStream >> aKey.nRecord; // key + rStream.ReadUInt32( aKey.nRecord ); // key if (rIndex.getHeader().db_keytype) { double aDbl; - rStream >> aDbl; + rStream.ReadDouble( aDbl ); aKey = ONDXKey(aDbl,aKey.nRecord); } else @@ -787,7 +787,7 @@ const ORowSetValue& ONDXKey::getValue() const // ----------------------------------------------------------------------------- SvStream& connectivity::dbase::operator >> (SvStream &rStream, ONDXPagePtr& rPage) { - rStream >> rPage.nPagePos; + rStream.ReadUInt32( rPage.nPagePos ); return rStream; } // ----------------------------------------------------------------------------- @@ -836,7 +836,7 @@ static sal_uInt32 nValue; SvStream& connectivity::dbase::operator >> (SvStream &rStream, ONDXPage& rPage) { rStream.Seek(rPage.GetPagePos() * DINDEX_PAGE_SIZE); - rStream >> nValue >> rPage.aChild; + rStream.ReadUInt32( nValue ) >> rPage.aChild; rPage.nCount = sal_uInt16(nValue); for (sal_uInt16 i = 0; i < rPage.nCount; i++) |