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

related tdf#120225 ww8export: save PROTECT_FORM

Change-Id: I20664f8c2dc2c49feec17ee6a1df72776d43cc40
Reviewed-on: https://gerrit.libreoffice.org/61635
Tested-by: Jenkins
Reviewed-by: 's avatarJustin Luth <justin_luth@sil.org>
üst 4af4a473
......@@ -11,6 +11,7 @@
//#include <com/sun/star/text/XDependentTextField.hpp>
#include <IDocumentSettingAccess.hxx>
#include <com/sun/star/awt/FontWeight.hpp>
#include <com/sun/star/awt/Size.hpp>
#include <com/sun/star/awt/XBitmap.hpp>
......@@ -358,6 +359,11 @@ DECLARE_WW8EXPORT_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()));
SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
CPPUNIT_ASSERT(pTextDoc);
SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
CPPUNIT_ASSERT_EQUAL( true, pDoc->getIDocumentSettingAccess().get( DocumentSettingId::PROTECT_FORM ) );
}
DECLARE_WW8EXPORT_TEST(testBorderColours, "bordercolours.doc")
......
......@@ -511,6 +511,7 @@ static void WriteDop( WW8Export& rWrt )
}
if ((rWrt.pSepx && rWrt.pSepx->DocumentIsProtected()) ||
rWrt.m_pDoc->getIDocumentSettingAccess().get(DocumentSettingId::PROTECT_FORM ) ||
rDop.lKeyProtDoc != 0)
{
rDop.fProtEnabled = true;
......
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