sw/qa/extras/ww8import/data/cp1000044.doc |binary sw/qa/extras/ww8import/ww8import.cxx | 7 +++++++ sw/source/filter/ww8/ww8par.cxx | 4 +++- 3 files changed, 10 insertions(+), 1 deletion(-)
New commits: commit 16f1459e78bf286d029f0672ef2977d89ae3ef71 Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Wed Mar 26 13:34:08 2014 +0100 cp#1000044 DOC import: fProtEnabled means document is not totally read-only Reading the spec, it seems that we have two cases here: - if lKeyProtDoc is set and fProtEnabled is 1, then editing forms is allowed - if lKeyProtDoc is set, but fProtEnabled is 0, then the document is totally read-only So in the first case avoid the SetModifyPasswordHash() call to allow form field editing. Change-Id: Id0c48e8eb4bde75c5520a7b108fcfada51148faf (cherry picked from commit 8757bea2e88c6e349e1fe98d8e9695d7b9c6179e) Reviewed-on: https://gerrit.libreoffice.org/8762 Reviewed-by: Tor Lillqvist <t...@collabora.com> Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/sw/qa/extras/ww8import/data/cp1000044.doc b/sw/qa/extras/ww8import/data/cp1000044.doc new file mode 100755 index 0000000..ea30cc0 Binary files /dev/null and b/sw/qa/extras/ww8import/data/cp1000044.doc differ diff --git a/sw/qa/extras/ww8import/ww8import.cxx b/sw/qa/extras/ww8import/ww8import.cxx index 875c039..17296e4 100644 --- a/sw/qa/extras/ww8import/ww8import.cxx +++ b/sw/qa/extras/ww8import/ww8import.cxx @@ -243,6 +243,13 @@ DECLARE_WW8IMPORT_TEST(testBnc821208, "bnc821208.doc") CPPUNIT_ASSERT_EQUAL(beans::PropertyState_DEFAULT_VALUE, ePropertyState); } +DECLARE_WW8IMPORT_TEST(testCp1000044, "cp1000044.doc") +{ + uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY); + // It wasn't possible to fill out this form. + CPPUNIT_ASSERT_EQUAL(false, bool(xStorable->isReadonly())); +} + DECLARE_WW8IMPORT_TEST(testCp1000039, "cp1000039.doc") { // This was RTL_TEXTENCODING_SYMBOL, causing "1" rendered as a placeholder rectangle. diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index c8e89ca..213e996 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -1944,7 +1944,9 @@ void SwWW8ImplReader::ImportDop() } } - mpDocShell->SetModifyPasswordHash(pWDop->lKeyProtDoc); + // Still allow editing of form fields. + if (!pWDop->fProtEnabled) + mpDocShell->SetModifyPasswordHash(pWDop->lKeyProtDoc); const SvtFilterOptions& rOpt = SvtFilterOptions::Get(); if (rOpt.IsUseEnhancedFields())
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits