summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2018-10-29 08:01:14 +0300
committerJustin Luth <justin_luth@sil.org>2018-11-06 07:19:09 +0100
commit8f8d6bee47b5c41ef551e18d2f9d117d82f01e3f (patch)
tree9b84b8932fbf4abaaf989acf848fa646be7c2163 /sw
parentfff34169fa912ad5096f1652172ea2455e5cb4d3 (diff)
tdf#118166 writerfilter: no design mode if ole controls exist
...just like sdt controls already turned off design mode. I'm not sure why design mode wasn't entirely turned off right from the start, but I don't want to do that now because forms are becoming more prominent in Writer. If design mode is ALWAYS turned off for .docx files, then the workflow will be different for *new* forms, since writer defaults to on. Change-Id: I91c771f1ebd5e640da8067d38cb06076d8c50d5a Reviewed-on: https://gerrit.libreoffice.org/62491 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport9.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
index 750a3cc24e07..e396ac0bea0b 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
@@ -26,6 +26,7 @@
#include <com/sun/star/text/RelOrientation.hpp>
#include <com/sun/star/text/VertOrientation.hpp>
#include <com/sun/star/text/WrapTextMode.hpp>
+#include <com/sun/star/view/XFormLayerAccess.hpp>
#include <com/sun/star/view/XViewSettingsSupplier.hpp>
#include <com/sun/star/view/XSelectionSupplier.hpp>
#include <com/sun/star/style/LineSpacing.hpp>
@@ -976,6 +977,11 @@ DECLARE_OOXMLEXPORT_TEST( testActiveXTextfield, "activex_textbox.docx" )
// Check textfield is single-line
CPPUNIT_ASSERT_EQUAL( false, getProperty<bool>(xPropertySet2, "MultiLine") );
+
+ // Don't open in design mode when form controls exist
+ uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
+ uno::Reference<view::XFormLayerAccess> xFormLayerAccess(xModel->getCurrentController(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT( !xFormLayerAccess->isFormDesignMode() );
}
DECLARE_OOXMLEXPORT_TEST( testActiveXCheckbox, "activex_checkbox.docx" )