summaryrefslogtreecommitdiff
path: root/tools/source/stream/stream.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'tools/source/stream/stream.cxx')
-rw-r--r--tools/source/stream/stream.cxx16
1 files changed, 4 insertions, 12 deletions
diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx
index b0976ddf89c0..69e908db81fb 100644
--- a/tools/source/stream/stream.cxx
+++ b/tools/source/stream/stream.cxx
@@ -780,22 +780,21 @@ bool SvStream::WriteUniOrByteChar( sal_Unicode ch, rtl_TextEncoding eDestCharSet
return m_nError == SVSTREAM_OK;
}
-bool SvStream::StartWritingUnicodeText()
+void SvStream::StartWritingUnicodeText()
{
// BOM, Byte Order Mark, U+FEFF, see
// http://www.unicode.org/faq/utf_bom.html#BOM
// Upon read: 0xfeff(-257) => no swap; 0xfffe(-2) => swap
sal_uInt16 v = 0xfeff;
WRITENUMBER_WITHOUT_SWAP(sal_uInt16, v); // write native format
- return m_nError == SVSTREAM_OK;
}
-bool SvStream::StartReadingUnicodeText( rtl_TextEncoding eReadBomCharSet )
+void SvStream::StartReadingUnicodeText( rtl_TextEncoding eReadBomCharSet )
{
if (!( eReadBomCharSet == RTL_TEXTENCODING_DONTKNOW ||
eReadBomCharSet == RTL_TEXTENCODING_UNICODE ||
eReadBomCharSet == RTL_TEXTENCODING_UTF8))
- return true; // nothing to read
+ return; // nothing to read
bool bTryUtf8 = false;
sal_uInt16 nFlag(0);
@@ -843,7 +842,6 @@ bool SvStream::StartReadingUnicodeText( rtl_TextEncoding eReadBomCharSet )
}
if (nBack)
SeekRel( -nBack ); // no BOM, pure data
- return m_nError == SVSTREAM_OK;
}
sal_uInt64 SvStream::SeekRel(sal_Int64 const nPos)
@@ -1738,20 +1736,16 @@ sal_uInt64 SvMemoryStream::GetSize()
return nLength;
}
-void* SvMemoryStream::SetBuffer( void* pNewBuf, sal_Size nCount,
+void SvMemoryStream::SetBuffer( void* pNewBuf, sal_Size nCount,
bool bOwnsDat, sal_Size nEOF )
{
- void* pResult;
SetBufferSize( 0 ); // Buffering in der Basisklasse initialisieren
Seek( 0 );
if( bOwnsData )
{
- pResult = nullptr;
if( pNewBuf != pBuf )
FreeMemory();
}
- else
- pResult = pBuf;
pBuf = static_cast<sal_uInt8 *>(pNewBuf);
nPos = 0;
@@ -1764,8 +1758,6 @@ void* SvMemoryStream::SetBuffer( void* pNewBuf, sal_Size nCount,
nEndOfData = nEOF;
ResetError();
-
- return pResult;
}
sal_Size SvMemoryStream::GetData( void* pData, sal_Size nCount )