Kaydet (Commit) d57735ba authored tarafından Justin Luth's avatar Justin Luth Kaydeden (comit) Justin Luth

revert tdf#123912 ww8 export: re-protect implicit section

Revert LO 6.3 bugfix d9a6eab1
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 d9a6eab1
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: 's avatarJustin Luth <justin_luth@sil.org>
üst 4b893906
...@@ -135,7 +135,7 @@ DECLARE_OOXMLEXPORT_TEST(tdf123912_protectedForm, "tdf123912_protectedForm.odt") ...@@ -135,7 +135,7 @@ DECLARE_OOXMLEXPORT_TEST(tdf123912_protectedForm, "tdf123912_protectedForm.odt")
uno::Reference<container::XIndexAccess> xSections(xTextSectionsSupplier->getTextSections(), uno::UNO_QUERY); uno::Reference<container::XIndexAccess> xSections(xTextSectionsSupplier->getTextSections(), uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xSect(xSections->getByIndex(0), uno::UNO_QUERY); uno::Reference<beans::XPropertySet> xSect(xSections->getByIndex(0), uno::UNO_QUERY);
if ( xSect.is() ) 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") DECLARE_OOXMLEXPORT_TEST(testDateControl, "empty-date-control.odt")
......
...@@ -1520,11 +1520,7 @@ void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAtt ...@@ -1520,11 +1520,7 @@ void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAtt
AttrOutput().SectFootnoteEndnotePr(); AttrOutput().SectFootnoteEndnotePr();
// forms // forms
bool bFormProtection = rSepInfo.IsProtected(); AttrOutput().SectionFormProtection( 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 );
// line numbers // line numbers
const SwLineNumberInfo& rLnNumInfo = m_pDoc->GetLineNumberInfo(); const SwLineNumberInfo& rLnNumInfo = m_pDoc->GetLineNumberInfo();
......
...@@ -66,7 +66,7 @@ ...@@ -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">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">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">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">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">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> <item translatable="yes" context="optcompatpage|format">Hide paragraphs of database fields (e.g., mail merge) with an empty value</item>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment