[Libreoffice-commits] core.git: 2 commits - oox/qa oox/source

Miklos Vajna vmiklos at collabora.co.uk
Thu Oct 8 10:14:05 PDT 2015


 oox/qa/unit/vba_encryption.cxx |    4 ++++
 oox/source/ole/vbaexport.cxx   |    2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

New commits:
commit a9fd466b42b5c46d3256c01a0def9d1c85431b5a
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Thu Oct 8 19:13:30 2015 +0200

    oox: loplugin:unreffun
    
    Change-Id: I8ee7d5690495bb089ab57da0d7ad6e31bb2154b7

diff --git a/oox/qa/unit/vba_encryption.cxx b/oox/qa/unit/vba_encryption.cxx
index 785c480..08e1994 100644
--- a/oox/qa/unit/vba_encryption.cxx
+++ b/oox/qa/unit/vba_encryption.cxx
@@ -20,10 +20,12 @@ class TestVbaEncryption : public test::BootstrapFixtureBase
 {
 public:
 
+#if 0
     // an initial test for the encryption taken from the spec
     void testSimple1();
 
     void testSimple2();
+#endif
 
     void testProjKey1();
 
@@ -40,6 +42,7 @@ public:
 private:
 };
 
+#if 0
 void TestVbaEncryption::testSimple1()
 {
     sal_uInt8 nSeed = 0x07;
@@ -74,6 +77,7 @@ void TestVbaEncryption::testSimple2()
         CPPUNIT_ASSERT_EQUAL((int)pExpectedData[i], (int)sal_uInt8(val));
     }
 }
+#endif
 
 void TestVbaEncryption::testProjKey1()
 {
commit c8ee186c6a683fcf7fb12880e9d49f327b6d46a0
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Thu Oct 8 19:11:49 2015 +0200

    oox: loplugin:loopvartoosmall
    
    Change-Id: Id2f2275f1f1bdb94b032bcf3cd34e486c9620940

diff --git a/oox/source/ole/vbaexport.cxx b/oox/source/ole/vbaexport.cxx
index 717f6eb..97d7295 100644
--- a/oox/source/ole/vbaexport.cxx
+++ b/oox/source/ole/vbaexport.cxx
@@ -438,7 +438,7 @@ void VBAEncryption::writeDataLengthEnc()
 
 void VBAEncryption::writeDataEnc()
 {
-    for(sal_Int8 i = 0; i < mnLength; i++)
+    for(sal_Int16 i = 0; i < mnLength; i++)
     {
         sal_uInt8 nByteEnc = mpData[i] ^ (mnEncryptedByte2 + mnUnencryptedByte1);
         exportHexString(mrEncryptedData, nByteEnc);


More information about the Libreoffice-commits mailing list