sfx2/source/doc/docfile.cxx |   31 +------------------------------
 1 file changed, 1 insertion(+), 30 deletions(-)

New commits:
commit 7dce1c9fd2d26c9c2c53f0d307aa281972d2e82d
Author: Julien Nabet <serval2...@yahoo.fr>
Date:   Thu Apr 4 20:10:11 2013 +0200

    Simplification by retrieving system encoding
    
    See 
http://nabble.documentfoundation.org/Cppcheck-redundantAssignment-about-encoding-in-CreatePasswordToModifyHash-docfile-cxx-sfx2-module-td4047586.html
    
    Change-Id: I845f4e4518901be8cba6e82a3199505d63efac62

diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 1f1525c..59ccfd0 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -2619,36 +2619,7 @@ sal_uInt32 SfxMedium::CreatePasswordToModifyHash( const 
::rtl::OUString& aPasswd
         }
         else
         {
-            rtl_TextEncoding nEncoding = RTL_TEXTENCODING_UTF8;
-
-            // if the MS-filter should be used
-            // use the inconsistent algorithm to find the encoding specified 
by MS
-            nEncoding = osl_getThreadTextEncoding();
-            switch( nEncoding )
-            {
-                case RTL_TEXTENCODING_ISO_8859_15:
-                case RTL_TEXTENCODING_MS_874:
-                case RTL_TEXTENCODING_MS_1250:
-                case RTL_TEXTENCODING_MS_1251:
-                case RTL_TEXTENCODING_MS_1252:
-                case RTL_TEXTENCODING_MS_1253:
-                case RTL_TEXTENCODING_MS_1254:
-                case RTL_TEXTENCODING_MS_1255:
-                case RTL_TEXTENCODING_MS_1256:
-                case RTL_TEXTENCODING_MS_1257:
-                case RTL_TEXTENCODING_MS_1258:
-                case RTL_TEXTENCODING_SHIFT_JIS:
-                case RTL_TEXTENCODING_GB_2312:
-                case RTL_TEXTENCODING_BIG5:
-                    // in case the system uses an encoding from the list 
above, it should be used
-                    break;
-
-                default:
-                    // in case other encoding is used, use one of the 
encodings from the list
-                    nEncoding = RTL_TEXTENCODING_MS_1250;
-                    break;
-            }
-
+            rtl_TextEncoding nEncoding = osl_getThreadTextEncoding();
             nHash = ::comphelper::DocPasswordHelper::GetXLHashAsUINT16( 
aPasswd, nEncoding );
         }
     }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to