[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sw/qa sw/source

Aron Budea (via logerrit) logerrit at kemper.freedesktop.org
Tue Mar 26 10:53:17 UTC 2019


 sw/qa/extras/ww8export/ww8export3.cxx |    1 +
 sw/source/filter/ww8/wrtw8sty.cxx     |    4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)

New commits:
commit d2fd88f8fab892185ab0d845fdba6e8fac1ad1c5
Author:     Aron Budea <aron.budea at collabora.com>
AuthorDate: Tue Mar 26 11:06:29 2019 +0100
Commit:     Aron Budea <aron.budea at collabora.com>
CommitDate: Tue Mar 26 11:52:24 2019 +0100

    Revert "sw mso export: PROTECT_FORM shouldn't force section to protected"
    
    Causes tdf#123912.
    
    This reverts commit 0507a1578da0de9cebda999ec4d916d3bc8b290c.

diff --git a/sw/qa/extras/ww8export/ww8export3.cxx b/sw/qa/extras/ww8export/ww8export3.cxx
index d5a888e60dd6..84f9e2f2d6cf 100644
--- a/sw/qa/extras/ww8export/ww8export3.cxx
+++ b/sw/qa/extras/ww8export/ww8export3.cxx
@@ -63,6 +63,7 @@ DECLARE_WW8EXPORT_TEST(testFdo53985, "fdo53985.doc")
     uno::Reference<beans::XPropertySet> xSect(xSections->getByIndex(0), uno::UNO_QUERY);
     CPPUNIT_ASSERT_EQUAL_MESSAGE("Section1 is protected", true, getProperty<bool>(xSect, "IsProtected"));
     xSect.set(xSections->getByIndex(3), uno::UNO_QUERY);
+if ( !mbExported )
     CPPUNIT_ASSERT_EQUAL_MESSAGE("Section4 is protected", false, getProperty<bool>(xSect, "IsProtected"));
 }
 
diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx
index 437220ee0763..3353084ef6e3 100644
--- a/sw/source/filter/ww8/wrtw8sty.cxx
+++ b/sw/source/filter/ww8/wrtw8sty.cxx
@@ -1535,7 +1535,9 @@ void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAtt
     AttrOutput().SectFootnoteEndnotePr();
 
     // forms
-    AttrOutput().SectionFormProtection( rSepInfo.IsProtected() );
+    bool formProtection = m_pDoc->getIDocumentSettingAccess().get( DocumentSettingId::PROTECT_FORM );
+    formProtection |= rSepInfo.IsProtected();
+    AttrOutput().SectionFormProtection( formProtection );
 
     // line numbers
     const SwLineNumberInfo& rLnNumInfo = m_pDoc->GetLineNumberInfo();


More information about the Libreoffice-commits mailing list