summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAron Budea <aron.budea@collabora.com>2019-03-26 11:06:29 +0100
committerAron Budea <aron.budea@collabora.com>2019-03-26 11:52:24 +0100
commitd2fd88f8fab892185ab0d845fdba6e8fac1ad1c5 (patch)
tree11c77ad408fe2515eb384a6667c3be844ad5bb0d
parent567dce36f7b07ac2454040abe35f6c88c6470223 (diff)
Revert "sw mso export: PROTECT_FORM shouldn't force section to protected"
-rw-r--r--sw/qa/extras/ww8export/ww8export3.cxx1
-rw-r--r--sw/source/filter/ww8/wrtw8sty.cxx4
2 files changed, 4 insertions, 1 deletions
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();