summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-10-02 11:38:22 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2013-10-03 08:31:49 +0000
commitf21ee4bd0d7b6082e8aa1a9f00ba467063fa5b27 (patch)
tree7ab94bd1272ccebf5cdbf654d7314c7c5cfb87f4 /sc
parenta16c5c551f302c628d0118b95db09c4a16a784ce (diff)
Resolves: rhbz#1013844 fdo#47482 encrypted OOo 1.0 docs cannot be reopened
Workaround for the encrypted OpenOffice.org 1.0 documents generated by Libreoffice <= 3.6 with the new encryption format and using SHA256, but missing a specified startkey of SHA256 Change-Id: Ib1acc4441b5adc6721cb3cde7a1191aa978e9a1b (cherry picked from commit 11ad93f4ba84f190c908e92a2c960f7a9fa800c0) Reviewed-on: https://gerrit.libreoffice.org/6105 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/unit/data/ods/passwordWrongSHA.odsbin0 -> 6560 bytes
-rw-r--r--sc/qa/unit/subsequent_filters-test.cxx10
2 files changed, 10 insertions, 0 deletions
diff --git a/sc/qa/unit/data/ods/passwordWrongSHA.ods b/sc/qa/unit/data/ods/passwordWrongSHA.ods
new file mode 100644
index 000000000000..b8a0e80dc675
--- /dev/null
+++ b/sc/qa/unit/data/ods/passwordWrongSHA.ods
Binary files differ
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index 19147b7a788d..662c802c5d6c 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -120,6 +120,7 @@ public:
//misc tests unrelated to the import filters
void testPasswordNew();
void testPasswordOld();
+ void testPasswordWrongSHA();
//test shape import
void testControlImport();
@@ -190,6 +191,7 @@ 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) && !defined(WNT)
+ CPPUNIT_TEST(testPasswordWrongSHA);
CPPUNIT_TEST(testPasswordOld);
CPPUNIT_TEST(testPasswordNew);
#endif
@@ -1294,6 +1296,14 @@ void ScFiltersTest::testPasswordOld()
testPassword_Impl(aFileNameBase);
}
+void ScFiltersTest::testPasswordWrongSHA()
+{
+ //tests opening a file wrongly using the new password algorithm
+ //in a sxc with the key algorithm missing
+ const OUString aFileNameBase("passwordWrongSHA.");
+ testPassword_Impl(aFileNameBase);
+}
+
void ScFiltersTest::testControlImport()
{
ScDocShellRef xDocSh = loadDoc("singlecontrol.", XLSX);