[Libreoffice-commits] core.git: sw/qa sw/source sw/uiconfig

Justin Luth (via logerrit) logerrit at kemper.freedesktop.org
Sat May 25 05:37:05 UTC 2019


 sw/qa/extras/ooxmlexport/ooxmlexport13.cxx |    2 +-
 sw/source/filter/ww8/wrtw8sty.cxx          |    6 +-----
 sw/uiconfig/swriter/ui/optcompatpage.ui    |    2 +-
 3 files changed, 3 insertions(+), 7 deletions(-)

New commits:
commit d57735bad093d028d69d131672c71308acf02f74
Author:     Justin Luth <justin.luth at collabora.com>
AuthorDate: Thu May 2 21:59:33 2019 +0300
Commit:     Justin Luth <justin_luth at sil.org>
CommitDate: Sat May 25 07:36:25 2019 +0200

    revert tdf#123912 ww8 export: re-protect implicit section
    
    Revert LO 6.3 bugfix d9a6eab15a747cf4c8a3d04f4b21fe1a1c3d0721
    because LO has changed the behaviour of implicit sections
    when Protect Forms is enabled.  Now they are editable,
    making the Protect Form compatibility option nearly useless.
    (tdf#122201 commit d9a6eab15a747cf4c8a3d04f4b21fe1a1c3d0721
    which was backported to LO 6.2). Since implicit sections are
    now editable in LO, they should export as editable.
    See tdf#124451 for a one-sided discussion about this.
    
    Since many people may have used this switch as a simple way
    to create a protected form in the past, document this change
    and point to sections as the way to set protection natively.
    
    Protect Form is now only good for protecting the form field
    itself from being deleted while the user is filling out the form,
    and that is true only for legacy sw::mark::IFieldmark form fields
    which have no UI in LO for adding them (.doc compatibility forms).
    
    Change-Id: I938f015fe63c22e831654e96de77b5809bb924ff
    Reviewed-on: https://gerrit.libreoffice.org/71716
    Tested-by: Jenkins
    Reviewed-by: Justin Luth <justin_luth at sil.org>

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
index b7d5132c47c2..4254a619e17a 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
@@ -135,7 +135,7 @@ DECLARE_OOXMLEXPORT_TEST(tdf123912_protectedForm, "tdf123912_protectedForm.odt")
     uno::Reference<container::XIndexAccess> xSections(xTextSectionsSupplier->getTextSections(), uno::UNO_QUERY);
     uno::Reference<beans::XPropertySet> xSect(xSections->getByIndex(0), uno::UNO_QUERY);
     if ( xSect.is() )
-        CPPUNIT_ASSERT_EQUAL_MESSAGE("Section1 is protected", true, getProperty<bool>(xSect, "IsProtected"));
+        CPPUNIT_ASSERT_EQUAL_MESSAGE("Section1 is protected", false, getProperty<bool>(xSect, "IsProtected"));
 }
 
 DECLARE_OOXMLEXPORT_TEST(testDateControl, "empty-date-control.odt")
diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx
index 8725e7474278..1ec391a298b8 100644
--- a/sw/source/filter/ww8/wrtw8sty.cxx
+++ b/sw/source/filter/ww8/wrtw8sty.cxx
@@ -1520,11 +1520,7 @@ void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAtt
     AttrOutput().SectFootnoteEndnotePr();
 
     // forms
-    bool bFormProtection = rSepInfo.IsProtected();
-    // use document settings when SepInfo has no protect settings (last section fragment or no sections at all)
-    if ( !rSepInfo.pSectionFormat || (reinterpret_cast<SwSectionFormat*>(sal_IntPtr(-1)) == rSepInfo.pSectionFormat) )
-        bFormProtection |= m_pDoc->getIDocumentSettingAccess().get( DocumentSettingId::PROTECT_FORM );
-    AttrOutput().SectionFormProtection( bFormProtection );
+    AttrOutput().SectionFormProtection( rSepInfo.IsProtected() );
 
     // line numbers
     const SwLineNumberInfo& rLnNumInfo = m_pDoc->GetLineNumberInfo();
diff --git a/sw/uiconfig/swriter/ui/optcompatpage.ui b/sw/uiconfig/swriter/ui/optcompatpage.ui
index 3965324f43bb..1e2942b79c21 100644
--- a/sw/uiconfig/swriter/ui/optcompatpage.ui
+++ b/sw/uiconfig/swriter/ui/optcompatpage.ui
@@ -66,7 +66,7 @@
                       <item translatable="yes" context="optcompatpage|format">Use OpenOffice.org 1.1 text wrapping around objects</item>
                       <item translatable="yes" context="optcompatpage|format">Consider wrapping style when positioning objects</item>
                       <item translatable="yes" context="optcompatpage|format">Expand word space on lines with manual line breaks in justified paragraphs</item>
-                      <item translatable="yes" context="optcompatpage|format">Protect form</item>
+                      <item translatable="yes" context="optcompatpage|format">Protect form (no longer protects whole document. Insert write protected section instead)</item>
                       <item translatable="yes" context="optcompatpage|format">Word-compatible trailing blanks</item>
                       <item translatable="yes" context="optcompatpage|format">Tolerate white lines of PDF page backgrounds for compatibility with old documents</item>
                       <item translatable="yes" context="optcompatpage|format">Hide paragraphs of database fields (e.g., mail merge) with an empty value</item>


More information about the Libreoffice-commits mailing list