[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[SCM] LibreOffice packaging repository branch, debian-experimental-3.5, updated. libreoffice_3.5.0-1-18-g2fc115d



The following commit has been merged in the debian-experimental-3.5 branch:
commit 933e801af02655f94292edb9299ae55496026032
Author: Rene Engelhard <rene@debian.org>
Date:   Tue Feb 21 16:49:03 2012 +0100

    backport updated unittest to prevent fdo#45171

diff --git a/changelog b/changelog
index 8bc9e29..e294004 100644
--- a/changelog
+++ b/changelog
@@ -8,6 +8,8 @@ libreoffice (1:3.5.0-2) UNRELEASED; urgency=low
   * debian/patches/icu-arm.diff: fix internal icu build on arm.
   * debian/patches/move-binfilter-mimetypes-in-extra-desktop-file.diff:
     as name says; imported from Fedora
+  * debian/patches/passwordTest-test-old-password-algorith-too.diff: as name
+    says (see fdo#45171 and #659733/#659720)
 
   * debian/rules:
     - remove obsolete (and buggy) conditional icu-on-arm-fails breaking
diff --git a/patches/passwordTest-test-old-password-algorith-too.diff b/patches/passwordTest-test-old-password-algorith-too.diff
new file mode 100644
index 0000000..da040cf
--- /dev/null
+++ b/patches/passwordTest-test-old-password-algorith-too.diff
@@ -0,0 +1,78 @@
+From 8f82bccf26d14d3ad4a64739edd9ba23c124b8ad Mon Sep 17 00:00:00 2001
+From: Markus Mohrhard <markus.mohrhard@googlemail.com>
+Date: Tue, 21 Feb 2012 08:30:26 +0000
+Subject: add test case for old password algorithm, related fdo#45171
+
+---
+diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
+index 9916584..3b46a91 100644
+--- a/sc/qa/unit/subsequent_filters-test.cxx
++++ b/sc/qa/unit/subsequent_filters-test.cxx
+@@ -171,7 +171,9 @@ public:
+     void testBugFixesXLSX();
+ 
+     //misc tests unrelated to the import filters
+-    void testPassword();
++    void testPasswordNew();
++    void testPasswordOld();
++
+ 
+     CPPUNIT_TEST_SUITE(ScFiltersTest);
+     CPPUNIT_TEST(testRangeName);
+@@ -185,7 +187,8 @@ public:
+     //disable testPassword on MacOSX due to problems with libsqlite3
+     //also crashes on DragonFly due to problems with nss/nspr headers
+ #if !defined(MACOSX) && !defined(DRAGONFLY)
+-    CPPUNIT_TEST(testPassword);
++    CPPUNIT_TEST(testPasswordOld);
++    CPPUNIT_TEST(testPasswordNew);
+ #endif
+ 
+ #if TEST_BUG_FILES
+@@ -196,6 +199,7 @@ public:
+     CPPUNIT_TEST_SUITE_END();
+ 
+ private:
++    void testPassword_Impl(const rtl::OUString& rFileNameBase);
+     uno::Reference<uno::XInterface> m_xCalcComponent;
+     ::rtl::OUString m_aBaseString;
+ };
+@@ -544,15 +548,13 @@ void ScFiltersTest::testBugFixesXLSX()
+     xDocSh->DoClose();
+ }
+ 
+-void ScFiltersTest::testPassword()
++void ScFiltersTest::testPassword_Impl(const rtl::OUString& aFileNameBase)
+ {
+-    const rtl::OUString aFileNameBase(RTL_CONSTASCII_USTRINGPARAM("password."));
+     rtl::OUString aFileExtension(aFileFormats[0].pName, strlen(aFileFormats[0].pName), RTL_TEXTENCODING_UTF8 );
+     rtl::OUString aFilterName(aFileFormats[0].pFilterName, strlen(aFileFormats[0].pFilterName), RTL_TEXTENCODING_UTF8) ;
+     rtl::OUString aFileName;
+     createFileURL(aFileNameBase, aFileExtension, aFileName);
+     rtl::OUString aFilterType(aFileFormats[0].pTypeName, strlen(aFileFormats[0].pTypeName), RTL_TEXTENCODING_UTF8);
+-    std::cout << aFileFormats[0].pName << " Test" << std::endl;
+ 
+     sal_uInt32 nFormat = SFX_FILTER_IMPORT | SFX_FILTER_USESOPTIONS;
+     SfxFilter* aFilter = new SfxFilter(
+@@ -577,6 +579,21 @@ void ScFiltersTest::testPassword()
+     ScDocument* pDoc = xDocSh->GetDocument();
+     CPPUNIT_ASSERT_MESSAGE("No Document", pDoc); //remove with first test
+     xDocSh->DoClose();
++
++}
++
++void ScFiltersTest::testPasswordNew()
++{
++    //tests opening a file with new password algorithm
++    const rtl::OUString aFileNameBase(RTL_CONSTASCII_USTRINGPARAM("password."));
++    testPassword_Impl(aFileNameBase);
++}
++
++void ScFiltersTest::testPasswordOld()
++{
++    //tests opening a file with old password algorithm
++    const rtl::OUString aFileNameBase(RTL_CONSTASCII_USTRINGPARAM("passwordOld."));
++    testPassword_Impl(aFileNameBase);
+ }
+ 
+ ScFiltersTest::ScFiltersTest()
diff --git a/patches/series b/patches/series
index c377606..71ae6fc 100644
--- a/patches/series
+++ b/patches/series
@@ -34,3 +34,4 @@ armhf-bridges.diff
 armhf-bridges-fix-armv4t-armel.diff
 icu-arm.diff
 move-binfilter-mimetypes-in-extra-desktop-file.diff
+passwordTest-test-old-password-algorith-too.diff
diff --git a/source/include-binaries b/source/include-binaries
index ac39496..e49da42 100644
--- a/source/include-binaries
+++ b/source/include-binaries
@@ -1,2 +1,3 @@
 debian/templates/debian-presentation.otp
 debian/templates/debian-presentation-background.xcf
+sc/qa/unit/data/ods/passwordOld.ods

-- 
LibreOffice packaging repository


Reply to: