diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-11-17 10:36:13 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-11-17 10:36:13 +0100 |
commit | 61f168d98750549107a65e846fbe5c49f277295e (patch) | |
tree | 0748b88eefa9bb49285270ac5a7bbce3d10b4ef6 /tools | |
parent | 4f76e46290b26deeb4f9660c580a5ffef58a557e (diff) |
Add SvStream::ReadUtf16 (don't assume sal_Unicode is unsigned short)
Change-Id: I74f34e3389582617fa83f8f4a3d6867cf87189e1
Diffstat (limited to 'tools')
-rw-r--r-- | tools/source/stream/stream.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx index c6d8b2a0cce6..6ad0a06e0bcf 100644 --- a/tools/source/stream/stream.cxx +++ b/tools/source/stream/stream.cxx @@ -989,6 +989,19 @@ SvStream& SvStream::ReadUChar( unsigned char& r ) return *this; } +SvStream& SvStream::ReadUtf16(sal_Unicode& r) +{ + sal_uInt16 n = 0; + READNUMBER_WITHOUT_SWAP(sal_uInt16, n) + if (good()) + { + if (m_isSwap) + SwapUShort(n); + r = sal_Unicode(n); + } + return *this; +} + SvStream& SvStream::ReadCharAsBool( bool& r ) { if ((m_isIoRead || !m_isConsistent) && |