diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-11-17 10:40:39 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-11-17 10:40:39 +0100 |
commit | 7ab065c124e8110b14b6c91f210cea3c5f0d0c83 (patch) | |
tree | 512f29c06301c1dd4f955eae2701690fac2b28a7 /sc | |
parent | 1a97d7b9a479554d4b1f937323ca993b61da2cdc (diff) |
Don't assume sal_Unicode is unsigned short
Change-Id: I6125c2abe1dbfd0a5ecf020b8363fc277d195157
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/excel/xestream.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx index 26f8bbb1b49c..07564e371885 100644 --- a/sc/source/filter/excel/xestream.cxx +++ b/sc/source/filter/excel/xestream.cxx @@ -730,7 +730,9 @@ OString XclXmlUtils::ToOString( const ScfUInt16Vec& rBuffer ) return OString(); const sal_uInt16* pBuffer = &rBuffer [0]; - return OString( pBuffer, rBuffer.size(), RTL_TEXTENCODING_UTF8 ); + return OString( + reinterpret_cast<sal_Unicode const *>(pBuffer), rBuffer.size(), + RTL_TEXTENCODING_UTF8); } OString XclXmlUtils::ToOString( const ScRange& rRange ) @@ -802,7 +804,10 @@ OUString XclXmlUtils::ToOUString( const ScfUInt16Vec& rBuf, sal_Int32 nStart, sa if( nLength == -1 || ( nLength > ((sal_Int32)rBuf.size() - nStart) ) ) nLength = (rBuf.size() - nStart); - return (nLength > 0) ? OUString( &rBuf[nStart], nLength ) : OUString(); + return nLength > 0 + ? OUString( + reinterpret_cast<sal_Unicode const *>(&rBuf[nStart]), nLength) + : OUString(); } OUString XclXmlUtils::ToOUString( |