31#include <osl/endian.h>
32#include <osl/diagnose.h>
33#include <rtl/strbuf.hxx>
34#include <rtl/string.hxx>
35#include <rtl/ustrbuf.hxx>
44 unsigned char nSwapTmp=c;
52#include <osl/thread.h>
56template <
typename T, std::enable_if_t<std::is_
integral_v<T> && sizeof(T) == 2,
int> = 0>
58 { r = OSL_SWAPWORD(r); }
59template <
typename T, std::enable_if_t<std::is_
integral_v<T> && sizeof(T) == 4,
int> = 0>
61 { r = OSL_SWAPDWORD(r); }
62template <
typename T, std::enable_if_t<std::is_
integral_v<T> && sizeof(T) == 8,
int> = 0>
72 std::swap(s.c[0], s.c[1]);
74 s.c[0] = OSL_SWAPDWORD(s.c[0]);
75 s.c[1] = OSL_SWAPDWORD(s.c[1]);
89 s.c = OSL_SWAPDWORD( s.c );
95 if(
sizeof(
double) != 8 )
97 SAL_WARN(
"tools.stream",
"Can only swap 8-Byte-doubles" );
111 s.c[0] = OSL_SWAPDWORD(s.c[0]);
112 s.c[1] = OSL_SWAPDWORD(s.c[1]);
124 for (
int i = 0;
i < nDataSize;
i++)
141 for (
int i = 0;
i < nDataSize;
i++)
142 m_pBufPos[
i] =
static_cast<const char*
>(pDataSrc)[
i];
167 std::size_t * pRead)
const
171 OSL_FAIL(
"SvLockBytes::ReadAt(): Bad stream");
184 std::size_t * pWritten)
188 OSL_FAIL(
"SvLockBytes::WriteAt(): Bad stream");
195 *pWritten = nTheWritten;
204 OSL_FAIL(
"SvLockBytes::Flush(): Bad stream");
217 OSL_FAIL(
"SvLockBytes::SetSize(): Bad stream");
229 OSL_FAIL(
"SvLockBytes::Stat(): Bad stream");
316 , m_eStreamCharSet(osl_getThreadTextEncoding())
382 sal_uInt64
const nActualFilePos =
Tell();
383 bool bDontSeek = (
m_pRWBuf ==
nullptr);
424 sal_Int32 nMaxBytesToRead )
428 rStr = OStringToOUString(
aStr, eSrcCharSet);
434 OStringBuffer
aBuf(4096);
436 rStr =
aBuf.makeStringAndClear();
444 sal_uInt64 nOldFilePos =
Tell();
446 std::size_t nTotalLen = 0;
452 sal_uInt16 nLen =
static_cast<sal_uInt16
>(
ReadBytes(buf,
sizeof(buf)-1));
455 if (
aBuf.isEmpty() )
467 for( j =
n = 0; j < nLen ; ++j )
470 if ( c ==
'\n' || c ==
'\r' )
482 n -= nTotalLen - nMaxBytesToRead;
483 nTotalLen = nMaxBytesToRead;
493 nOldFilePos += nTotalLen;
494 if(
Tell() > nOldFilePos )
498 if ( bEnd && (c==
'\r' || c==
'\n') )
501 std::size_t nLen =
ReadBytes(&cTemp,
sizeof(cTemp));
503 if( cTemp == c || (cTemp !=
'\n' && cTemp !=
'\r') )
517 sal_uInt64 nOldFilePos =
Tell();
519 std::size_t nTotalLen = 0;
521 DBG_ASSERT(
sizeof(
sal_Unicode) ==
sizeof(sal_uInt16),
"ReadUniStringLine: swapping sizeof(sal_Unicode) not implemented" );
523 OUStringBuffer
aBuf(4096);
531 if (
aBuf.isEmpty() )
543 for( j =
n = 0; j < nLen ; ++j )
548 if ( c ==
'\n' || c ==
'\r' )
567 n -= nTotalLen - nMaxCodepointsToRead;
568 nTotalLen = nMaxCodepointsToRead;
572 aBuf.append( buf,
n );
579 if(
Tell() > nOldFilePos )
583 if ( bEnd && (c==
'\r' || c==
'\n') )
589 if( cTemp == c || (cTemp !=
'\n' && cTemp !=
'\r') )
595 rStr =
aBuf.makeStringAndClear();
600 sal_Int32 nMaxCodepointsToRead )
602 if ( eSrcCharSet == RTL_TEXTENCODING_UNICODE )
610 OStringBuffer aOutput(256);
614 sal_uInt64 nFilePos = rStream.
Tell();
616 while( !bEnd && !rStream.
GetError() )
618 std::size_t nLen = rStream.
ReadBytes(buf,
sizeof(buf)-1);
622 std::size_t nReallyRead = nLen;
623 const char* pPtr = buf;
624 while (nLen && *pPtr)
630 bEnd = ( nReallyRead <
sizeof(buf)-1 )
635 aOutput.append(buf, pPtr - buf);
638 nFilePos += aOutput.getLength();
639 if (rStream.
Tell() > nFilePos)
640 rStream.
Seek(nFilePos+1);
641 return aOutput.makeStringAndClear();
646 return OStringToOUString(
655 DBG_ASSERT(
sizeof(
sal_Unicode) ==
sizeof(sal_uInt16),
"write_uInt16s_FromOUString: swapping sizeof(sal_Unicode) not implemented" );
656 std::size_t nWritten;
661 std::size_t nLen = nUnits;
664 memcpy( pTmp, rStr.data(), nLen *
sizeof(
sal_Unicode) );
681 if ( eDestCharSet == RTL_TEXTENCODING_UNICODE )
708 if ( eDestCharSet == RTL_TEXTENCODING_UNICODE )
712 OString
aStr(&
ch, 1, eDestCharSet);
729 if (!( eReadBomCharSet == RTL_TEXTENCODING_DONTKNOW ||
730 eReadBomCharSet == RTL_TEXTENCODING_UNICODE ||
731 eReadBomCharSet == RTL_TEXTENCODING_UTF8))
734 const sal_uInt64 nOldPos =
Tell();
735 bool bGetBack =
true;
736 unsigned char nFlag(0);
741 if ( eReadBomCharSet == RTL_TEXTENCODING_DONTKNOW ||
742 eReadBomCharSet == RTL_TEXTENCODING_UNICODE)
753 if ( eReadBomCharSet == RTL_TEXTENCODING_DONTKNOW ||
754 eReadBomCharSet == RTL_TEXTENCODING_UNICODE)
765 if ( eReadBomCharSet == RTL_TEXTENCODING_DONTKNOW ||
766 eReadBomCharSet == RTL_TEXTENCODING_UTF8)
786 sal_uInt64 nActualPos =
Tell();
795 sal_uInt64
const nAbsPos =
static_cast<sal_uInt64
>(-
nPos);
796 if ( nActualPos >= nAbsPos )
797 nActualPos -= nAbsPos;
805 return Seek( nActualPos );
890 SAL_WARN_IF(c > 1,
"tools.stream",
unsigned(c) <<
" not 0/1");
929 const sal_uInt32 cBufLen = 0x8000;
930 std::unique_ptr<char[]> pBuf(
new char[ cBufLen ] );
936 }
while(
nCount == cBufLen );
999 *
reinterpret_cast<unsigned char*
>(
m_pBufPos) =
v;
1052 const sal_uInt32 cBufLen = 0x8000;
1053 std::unique_ptr<char[]> pBuf(
new char[ cBufLen ] );
1058 }
while(
nCount == cBufLen );
1065 const sal_uInt32 cBufLen = 0x8000;
1066 std::unique_ptr<char[]> pBuf(
new char[ cBufLen ] );
1067 sal_uInt32 nCurBufLen = cBufLen;
1069 sal_uInt64 nWriteSize = nSize;
1073 nCurBufLen = std::min<sal_uInt64>(nCurBufLen, nWriteSize);
1078 while( nWriteSize &&
nCount == nCurBufLen );
1080 return nSize - nWriteSize;
1086 if (eSrcCharSet == RTL_TEXTENCODING_UNICODE)
1094 if (eDestCharSet == RTL_TEXTENCODING_UNICODE)
1116 std::size_t nSaveCount =
nCount;
1294 const sal_uInt64 nMaxSeek = rSt.
TellEnd();
1295 return (nOffset <= nMaxSeek && rSt.
Seek(nOffset) == nOffset);
1322 sal_uInt64
const nCurr =
Tell();
1323 sal_uInt64
const nEnd =
TellEnd();
1324 sal_uInt64 nMaxAvailable = nEnd > nCurr ? (nEnd-nCurr) : 0;
1325 return nMaxAvailable;
1331 sal_uInt64
const nCurr =
Tell();
1356#define CRYPT_BUFSIZE 1024
1362 unsigned char const * pDataPtr =
static_cast<unsigned char const *
>(pStart);
1364 std::size_t nBufCount;
1373 memcpy( pTemp, pDataPtr,
static_cast<sal_uInt16
>(nBufCount) );
1375 for (
unsigned char & rn : pTemp)
1377 unsigned char aCh = rn;
1384 pDataPtr += nBufCount;
1392 unsigned char* pTemp =
static_cast<unsigned char*
>(pStart);
1395 for ( std::size_t
n=0;
n < nLen;
n++, pTemp++ )
1397 unsigned char aCh = *pTemp;
1406 unsigned char nCryptMask = 0;
1415 nCryptMask ^= *pStr;
1422 for( sal_Int32
i = 0;
i < nLen;
i++ ) {
1423 nCryptMask ^= pStr[
i];
1424 if( nCryptMask & 0x80 ) {
1449 sal_uInt64 nFPos =
Tell();
1624 assert(
pBuf &&
"Possibly Reallocate failed");
1646 if( nNewPos >=
nSize )
1691 bool bRetVal =
false;
1694 std::size_t nNewSize =
static_cast<std::size_t
>(nTemp);
1701 if( nNewSize <
nSize )
1703 memcpy( pNewBuf,
pBuf, nNewSize );
1704 if(
nPos > nNewSize )
1715 memset(pNewBuf +
nSize, 0x00, nNewSize -
nSize);
1753 void* pRetVal =
pBuf;
1761 std::size_t nInitSize = 512;
1793 rtl_String *pStr =
nullptr;
1801 pStr = rtl_string_alloc(sal::static_int_cast<sal_Int32>(nLen));
1802 SAL_WARN_IF(!pStr,
"tools.stream",
"allocation failed");
1806 if (nWasRead != nLen)
1811 pStr->length = sal::static_int_cast<sal_Int32>(nWasRead);
1812 pStr->buffer[pStr->length] = 0;
1818 return pStr ? OString(pStr, SAL_NO_ACQUIRE) : OString();
1825 rtl_uString *pStr =
nullptr;
1833 pStr = rtl_uString_alloc(sal::static_int_cast<sal_Int32>(nLen));
1834 SAL_WARN_IF(!pStr,
"tools.stream",
"allocation failed");
1838 if (nWasRead != nLen)
1843 pStr->length = sal::static_int_cast<sal_Int32>(nWasRead);
1844 pStr->buffer[pStr->length] = 0;
1848 for (sal_Int32
i = 0;
i < pStr->length; ++
i)
1849 pStr->buffer[
i] = OSL_SWAPWORD(pStr->buffer[
i]);
1856 return pStr ? OUString(pStr, SAL_NO_ACQUIRE) : OUString();
1861 template <
typename T,
typename O> T tmpl_convertLineEnd(
const T &rIn,
LineEnd eLineEnd)
1864 bool bConvert =
false;
1865 sal_Int32 nStrLen = rIn.getLength();
1866 sal_Int32 nLineEndLen = (eLineEnd ==
LINEEND_CRLF) ? 2 : 1;
1873 if ( (rIn[i] ==
'\r') || (rIn[
i] ==
'\n') )
1875 nLen = nLen + nLineEndLen;
1881 if ( ((eLineEnd !=
LINEEND_LF) && (rIn[
i] ==
'\n')) ||
1882 ((eLineEnd ==
LINEEND_CRLF) && (i+1) < nStrLen && (rIn[
i+1] !=
'\n')) ||
1884 ((rIn[i] ==
'\r') || ((
i+1) < nStrLen && rIn[i+1] ==
'\r'))) ||
1886 ((rIn[i] ==
'\n') || ((
i+1) < nStrLen && rIn[i+1] ==
'\n'))) )
1891 if ( (i+1) < nStrLen && ((rIn[
i+1] ==
'\r') || (rIn[i+1] ==
'\n')) &&
1892 (rIn[i] != rIn[i+1]) )
1909 if ( (rIn[i] ==
'\r') || (rIn[i] ==
'\n') )
1913 aNewData.append(
'\r');
1914 aNewData.append(
'\n');
1919 aNewData.append(
'\r');
1921 aNewData.append(
'\n');
1924 if ( (i+1) < nStrLen && ((rIn[i+1] ==
'\r') || (rIn[i+1] ==
'\n')) &&
1925 (rIn[i] != rIn[i+1]) )
1930 aNewData.append(rIn[i]);
1936 return aNewData.makeStringAndClear();
1942 return tmpl_convertLineEnd<OString, OStringBuffer>(rIn, eLineEnd);
1947 return tmpl_convertLineEnd<OUString, OUStringBuffer>(rIn, eLineEnd);
1951 std::u16string_view rStr)
1953 std::size_t nWritten = 0;
1954 sal_uInt32 nUnits = std::min<std::size_t>(rStr.size(), std::numeric_limits<sal_uInt32>::max());
1955 SAL_WARN_IF(
static_cast<std::size_t
>(nUnits) !=
static_cast<std::size_t
>(rStr.size()),
1957 "string too long for prefix count to fit in output type");
1961 nWritten +=
sizeof(sal_uInt32);
1968 std::u16string_view rStr)
1970 std::size_t nWritten = 0;
1971 sal_uInt16 nUnits = std::min<std::size_t>(rStr.size(), std::numeric_limits<sal_uInt16>::max());
1974 "string too long for prefix count to fit in output type");
1978 nWritten +=
sizeof(nUnits);
1985 std::string_view rStr)
1987 std::size_t nWritten = 0;
1988 sal_uInt16 nUnits = std::min<std::size_t>(rStr.size(), std::numeric_limits<sal_uInt16>::max());
1989 SAL_WARN_IF(
static_cast<std::size_t
>(nUnits) !=
static_cast<std::size_t
>(rStr.size()),
1991 "string too long for sal_uInt16 count to fit in output type");
1995 nWritten +=
sizeof(sal_uInt16);
virtual ErrCode WriteAt(sal_uInt64 nPos, const void *pBuffer, std::size_t nCount, std::size_t *pWritten)
virtual ErrCode ReadAt(sal_uInt64 nPos, void *pBuffer, std::size_t nCount, std::size_t *pRead) const
const SvStream * GetStream() const
virtual ErrCode Flush() const
virtual ErrCode Stat(SvLockBytesStat *pStat) const
virtual ErrCode SetSize(sal_uInt64 nSize)
void FreeMemory()
Is called when this stream allocated the buffer or the buffer is resized.
void SetBuffer(void *pBuf, std::size_t nSize, std::size_t nEOF)
virtual sal_uInt64 SeekPos(sal_uInt64 nPos) override
virtual ~SvMemoryStream() override
SvMemoryStream(const SvMemoryStream &)=delete
virtual std::size_t PutData(const void *pData, std::size_t nSize) override
bool ReAllocateMemory(tools::Long nDiff)
ReAllocateMemory must update the following variables:
virtual void SetSize(sal_uInt64 nSize) override
virtual void ResetError() override
void MakeReadOnly()
Makes the stream read-only after it was (possibly) initially writable, without having to copy the dat...
void AllocateMemory(std::size_t nSize)
AllocateMemory must update pBuf accordingly.
virtual void FlushData() override
virtual void ResetError()
SvStream & ReadCharAsBool(bool &rBool)
SvStream & ReadStream(SvStream &rStream)
SvStream & WriteInt64(sal_Int64 nInt64)
SvStream & WriteDouble(const double &rDouble)
SvStream & ReadUInt64(sal_uInt64 &rUInt64)
void StartWritingUnicodeText()
Switch to no endian swapping and write 0xfeff.
SvStream & WriteInt32(sal_Int32 nInt32)
void StartReadingUnicodeText(rtl_TextEncoding eReadBomCharSet)
If eReadBomCharSet==RTL_TEXTENCODING_DONTKNOW: read 16bit, if 0xfeff do nothing (UTF-16),...
SAL_DLLPRIVATE bool ReadUniStringLine(OUString &rStr, sal_Int32 nMaxCodepointsToRead)
Read a line of Unicode.
void SetEndian(SvStreamEndian SvStreamEndian)
bool good() const
Get state.
SvStream & WriteUniOrByteString(std::u16string_view rStr, rtl_TextEncoding eDestCharSet)
Write a 32bit length prefixed sequence of utf-16 if eSrcCharSet==RTL_TEXTENCODING_UNICODE,...
sal_uInt16 m_nBufFree
number of free slots in buffer to IO of type eIOMode
SvStream & WriteUnicode(sal_Unicode)
OUString ReadUniOrByteString(rtl_TextEncoding eSrcCharSet)
Read a 32bit length prefixed sequence of utf-16 if eSrcCharSet==RTL_TEXTENCODING_UNICODE,...
virtual sal_uInt64 TellEnd()
virtual sal_uInt64 SeekPos(sal_uInt64 nPos)
SAL_DLLPRIVATE void ClearBuffer()
void readNumberWithoutSwap(T &rDataDest)
SAL_DLLPRIVATE void readNumberWithoutSwap_(void *pDataDest, int nDataSize)
SvLockBytesRef m_xLockBytes
Default implementation.
virtual void SetSize(sal_uInt64 nSize)
sal_uInt8 * m_pBufPos
m_pRWBuf + m_nBufActualPos
void SetCryptMaskKey(const OString &rCryptMaskKey)
SvStream & ReadDouble(double &rDouble)
SvStream & ReadInt16(sal_Int16 &rInt16)
bool WriteByteStringLine(std::u16string_view rStr, rtl_TextEncoding eDestCharSet)
sal_uInt16 m_nBufActualPos
current position in buffer (0..m_nBufSize-1)
void SetBufferSize(sal_uInt16 m_nBufSize)
LineEnd GetLineDelimiter() const
bool ReadByteStringLine(OUString &rStr, rtl_TextEncoding eSrcCharSet, sal_Int32 nMaxBytesToRead=0xFFFE)
Read a line of bytes.
std::size_t WriteBytes(const void *pData, std::size_t nSize)
SAL_DLLPRIVATE std::size_t CryptAndWriteBuffer(const void *pStart, std::size_t nLen)
Encrypt and write.
bool IsEndianSwap() const
returns status of endian swap flag
SvStream & WriteInt16(sal_Int16 nInt16)
SAL_DLLPRIVATE void ClearError()
SvStream & WriteUChar(unsigned char nChar)
bool SetStreamSize(sal_uInt64 nSize)
sal_uInt64 m_nBufFilePos
File position of pBuf[0].
bool ReadUniOrByteStringLine(OUString &rStr, rtl_TextEncoding eSrcCharSet, sal_Int32 nMaxCodepointsToRead=0xFFFE)
Read a line of Unicode if eSrcCharSet==RTL_TEXTENCODING_UNICODE, otherwise read a line of Bytecode an...
SvStream & WriteUInt16(sal_uInt16 nUInt16)
SvStream & WriteUInt64(sal_uInt64 nuInt64)
std::unique_ptr< sal_uInt8[]> m_pRWBuf
Points to read/write buffer.
SvStream & ReadNumber(T &r)
bool WriteUnicodeOrByteText(std::u16string_view rStr, rtl_TextEncoding eDestCharSet)
Write a sequence of Unicode characters if eDestCharSet==RTL_TEXTENCODING_UNICODE, otherwise write a s...
unsigned char m_nCryptMask
bool WriteUniOrByteChar(sal_Unicode ch, rtl_TextEncoding eDestCharSet)
Write a Unicode character if eDestCharSet==RTL_TEXTENCODING_UNICODE, otherwise write as Bytecode conv...
sal_Int32 GetVersion() const
bool WriteLine(std::string_view rStr)
SAL_DLLPRIVATE void writeNumberWithoutSwap_(const void *pDataSrc, int nDataSize)
virtual std::size_t GetData(void *pData, std::size_t nSize)
SvStream & ReadFloat(float &rFloat)
SvStream & WriteUInt32(sal_uInt32 nUInt32)
bool ReadLine(OStringBuffer &rStr, sal_Int32 nMaxBytesToRead=0xFFFE)
Read a line of bytes.
bool m_isDirty
true: Stream != buffer content
SvStream & WriteFloat(float nFloat)
SvStream & ReadUInt32(sal_uInt32 &rUInt32)
SvStream & WriteUInt8(sal_uInt8 nuInt8)
SvStreamEndian GetEndian() const
sal_uInt16 m_nBufActualLen
Length of used segment of buffer.
SvStream & WriteNumber(T n)
void SetError(ErrCode nErrorCode)
void writeNumberWithoutSwap(T const &rDataSrc)
SvStream & ReadUtf16(sal_Unicode &rUtf16)
SvStream & ReadChar(char &rChar)
sal_uInt64 Seek(sal_uInt64 nPos)
void Flush()
Call FlushBuffer() and then call flush on the underlying OS stream.
SvStream & WriteChar(char nChar)
SvStream & ReadInt32(sal_Int32 &rInt32)
std::size_t ReadBytes(void *pData, std::size_t nSize)
rtl_TextEncoding GetStreamCharSet() const
virtual std::size_t PutData(const void *pData, std::size_t nSize)
sal_uInt64 SeekRel(sal_Int64 nPos)
SvStream & ReadSChar(signed char &rChar)
void FlushBuffer()
If we have data in our internal buffers, write them out.
SvStream & ReadUInt16(sal_uInt16 &rUInt16)
ErrCode const & GetErrorCode() const
SvStream & WriteSChar(signed char nChar)
sal_uInt64 remainingSize()
SvStream & ReadInt64(sal_Int64 &rInt64)
SAL_DLLPRIVATE void EncryptBuffer(void *pStart, std::size_t nLen) const
sal_uInt16 m_nBufSize
Allocated size of buffer.
SvStream & ReadUChar(unsigned char &rChar)
SvStream & WriteStream(SvStream &rStream)
#define DBG_ASSERT(sCon, aError)
#define SVSTREAM_WRITE_ERROR
#define SVSTREAM_OUTOFMEMORY
#define ERRCODE_IO_PENDING
#define ERRCODE_IO_CANTWRITE
#define SVSTREAM_INVALID_HANDLE
#define SAL_WARN_IF(condition, area, stream)
#define SAL_WARN(area, stream)
if(aStr !=aBuf) UpdateName_Impl(m_xFollowLb.get()
std::unique_ptr< sal_Int32[]> pData
COMPHELPER_DLLPUBLIC bool isFileUrl(std::u16string_view url)
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
OString OUStringToOString(std::u16string_view str, ConnectionSettings const *settings)
OUString read_uInt16s_ToOUString(SvStream &rStrm, std::size_t nLen)
Attempt to read nUnits 16bit units to an OUString, returned OUString's length is number of units succ...
std::size_t write_uInt16_lenPrefixed_uInt16s_FromOUString(SvStream &rStrm, std::u16string_view rStr)
OString read_uInt8s_ToOString(SvStream &rStrm, std::size_t nLen)
Attempt to read nUnits 8bit units to an OString, returned OString's length is number of units success...
static unsigned char implGetCryptMask(const char *pStr, sal_Int32 nLen, tools::Long nVersion)
SvStream & endl(SvStream &rStr)
static void swapNibbles(unsigned char &c)
static void SwapNumber(T &r)
OString read_zeroTerminated_uInt8s_ToOString(SvStream &rStream)
Attempt to write a pascal-style length (of type prefix) prefixed sequence of 16bit units from an OUSt...
static void SwapFloat(float &r)
OString convertLineEnd(const OString &rIn, LineEnd eLineEnd)
static void SwapDouble(double &r)
SvStream & endlub(SvStream &rStrm)
call endlu() if m_eStreamCharSet==RTL_TEXTECODING_UNICODE otherwise endl()
std::size_t write_uInt32_lenPrefixed_uInt16s_FromOUString(SvStream &rStrm, std::u16string_view rStr)
Attempt to write a pascal-style length (of type prefix) prefixed sequence of 16bit units from an OUSt...
SvStream & endlu(SvStream &rStrm)
same as endl() but Unicode
OUString read_zeroTerminated_uInt8s_ToOUString(SvStream &rStream, rtl_TextEncoding eEnc)
Attempt to read 8bit units assuming source encoding eEnc to an OUString until a zero terminator is en...
std::size_t write_uInt16_lenPrefixed_uInt8s_FromOString(SvStream &rStrm, std::string_view rStr)
Attempt to write a pascal-style length (of type prefix) prefixed sequence of units from a string-type...
bool checkSeek(SvStream &rSt, sal_uInt64 nOffset)
std::size_t write_uInt16s_FromOUString(SvStream &rStrm, std::u16string_view rStr, std::size_t nUnits)
Attempt to write a prefixed sequence of nUnits 16bit units from an OUString, returned value is number...
#define STREAM_SEEK_TO_END
OUString read_uInt16_lenPrefixed_uInt8s_ToOUString(SvStream &rStrm, rtl_TextEncoding eEnc)
@ READ
allow read accesses
@ WRITE
allow write accesses
OUString read_uInt32_lenPrefixed_uInt16s_ToOUString(SvStream &rStrm)
#define STREAM_SEEK_TO_BEGIN
std::size_t write_uInt8s_FromOString(SvStream &rStrm, std::string_view rStr, std::size_t nUnits)
Attempt to write a prefixed sequence of nUnits 8bit units from an OString, returned value is number o...
std::size_t write_uInt16_lenPrefixed_uInt8s_FromOUString(SvStream &rStrm, std::u16string_view rStr, rtl_TextEncoding eEnc)
Attempt to write a pascal-style length (of type prefix) prefixed sequence of 8bit units from an OUStr...