diff options
author | Justin Luth <justin_luth@sil.org> | 2016-07-23 15:23:25 +0300 |
---|---|---|
committer | Justin Luth <justin_luth@sil.org> | 2016-07-28 09:34:26 +0000 |
commit | 11ded42ef7f056072e7bf1fb66a0e1ec5a556317 (patch) | |
tree | c356f8a5e43668e4d53c04aa7fc57a1e87e2664f | |
parent | 878c4f2490f0554cd0b261ff3699cb156e73b59e (diff) |
unit test for docprotection only when enforced
Change-Id: I99cd5424855892846120c62b333d0e66aa3c7071
Reviewed-on: https://gerrit.libreoffice.org/27457
Reviewed-by: Justin Luth <justin_luth@sil.org>
Tested-by: Justin Luth <justin_luth@sil.org>
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index b904bdf88e15..19266ef2b306 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -1749,6 +1749,13 @@ DECLARE_OOXMLIMPORT_TEST(testTdf75573, "tdf75573_page1frame.docx") // the frame should be located near the bottom[23186]/center[2955] of the page CPPUNIT_ASSERT(sal_Int32(20000) < getProperty<sal_Int32>(xPropertySet, "VertOrientPosition")); CPPUNIT_ASSERT(sal_Int32(2500) < getProperty<sal_Int32>(xPropertySet, "HoriOrientPosition")); + + css::uno::Reference<css::lang::XMultiServiceFactory> m_xTextFactory(mxComponent, uno::UNO_QUERY); + uno::Reference< beans::XPropertySet > xSettings(m_xTextFactory->createInstance("com.sun.star.document.Settings"), uno::UNO_QUERY); + uno::Any aProtect = xSettings->getPropertyValue("ProtectForm"); + bool bProt = true; + aProtect >>= bProt; + CPPUNIT_ASSERT(!bProt); } DECLARE_OOXMLIMPORT_TEST(testFdo43093, "fdo43093.docx") |