[Libreoffice-commits] core.git: sw/source

Stephan Bergmann sbergman at redhat.com
Tue Nov 17 01:42:43 PST 2015


 sw/source/filter/ww8/wrtww8.cxx  |    2 +-
 sw/source/filter/ww8/ww8par.cxx  |    2 +-
 sw/source/filter/ww8/ww8par2.cxx |    2 +-
 sw/source/filter/ww8/ww8scan.cxx |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 34c254f64b5a5d52cdca94080089e4ef2bcf7b5c
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Nov 17 10:42:16 2015 +0100

    Don't assume sal_Unicode is unsigned short
    
    Change-Id: I3411c688361e95b4c72b5257cdd63b137dab0538

diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index bf659bc..d1d8bbf 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -3016,7 +3016,7 @@ bool SwWW8Writer::InitStd97CodecUpdateMedium( ::msfilter::MSCodec_Std97& rCodec
 
                 rtl_random_destroyPool( aRandomPool );
 
-                sal_Unicode aPassword[16];
+                sal_uInt16 aPassword[16];
                 memset( aPassword, 0, sizeof( aPassword ) );
 
                 OUString sPassword(pPasswordItem->GetValue());
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 00c39fa..0fe320c 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -5597,7 +5597,7 @@ namespace
             sal_Int32 nLen = sUniPassword.getLength();
             if ( nLen <= 15 )
             {
-                sal_Unicode pPassword[16];
+                sal_uInt16 pPassword[16];
                 memset( pPassword, 0, sizeof( pPassword ) );
                 for( sal_Int32 nChar = 0; nChar < nLen; ++nChar )
                     pPassword[nChar] = sUniPassword[nChar];
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index 7f692bc..3861e6c 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -658,7 +658,7 @@ void SwWW8ImplReader::SetAnlvStrings(SwNumFormat &rNum, WW8_ANLV const &rAV,
     {
         for(sal_Int32 i = 0; i < rAV.cbTextBefore + rAV.cbTextAfter; ++i, pText += 2)
         {
-            sText += OUString(SVBT16ToShort(*reinterpret_cast<SVBT16 const *>(pText)));
+            sText += OUString(sal_Unicode(SVBT16ToShort(*reinterpret_cast<SVBT16 const *>(pText))));
         }
     }
 
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 7a82746..aeb5f97 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -80,7 +80,7 @@ namespace
     {
         bool bRet = false;
         sal_uInt32 nOldPos = rStrm.Tell();
-        sal_Unicode nBelt(0);
+        sal_uInt16 nBelt(0);
         rStrm.ReadUInt16( nBelt );
         nBelt *= sizeof(sal_Unicode);
         if (rStrm.good() && (rStrm.remainingSize() >= (nBelt + sizeof(sal_Unicode))))


More information about the Libreoffice-commits mailing list