diff options
-rw-r--r-- | include/xmloff/odffields.hxx | 1 | ||||
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/tdf151548_activeContentDemo.docm | bin | 0 -> 47797 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport8.cxx | 12 | ||||
-rw-r--r-- | sw/source/filter/ww8/docxattributeoutput.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par3.cxx | 1 |
5 files changed, 13 insertions, 5 deletions
diff --git a/include/xmloff/odffields.hxx b/include/xmloff/odffields.hxx index 8dd75e038189..d5439d873a0f 100644 --- a/include/xmloff/odffields.hxx +++ b/include/xmloff/odffields.hxx @@ -27,7 +27,6 @@ inline constexpr OUStringLiteral ODF_FORMTEXT = u"vnd.oasis.opendocument.field.F inline constexpr OUStringLiteral ODF_FORMCHECKBOX = u"vnd.oasis.opendocument.field.FORMCHECKBOX"; inline constexpr OUStringLiteral ODF_FORMCHECKBOX_HELPTEXT = u"Checkbox_HelpText"; -inline constexpr OUStringLiteral ODF_FORMCHECKBOX_NAME = u"Checkbox_Name"; inline constexpr OUStringLiteral ODF_FORMCHECKBOX_RESULT = u"Checkbox_Checked"; inline constexpr OUStringLiteral ODF_FORMDROPDOWN = u"vnd.oasis.opendocument.field.FORMDROPDOWN"; diff --git a/sw/qa/extras/ooxmlexport/data/tdf151548_activeContentDemo.docm b/sw/qa/extras/ooxmlexport/data/tdf151548_activeContentDemo.docm Binary files differnew file mode 100644 index 000000000000..80886d864a15 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/tdf151548_activeContentDemo.docm diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx index 4378f3b1a0c7..bccfbddb7eb0 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx @@ -1046,6 +1046,18 @@ DECLARE_OOXMLEXPORT_TEST(testN820509, "n820509.docx") } } +DECLARE_OOXMLEXPORT_TEST(testTdf151548_activeContentDemo, "tdf151548_activeContentDemo.docm") +{ + SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get()); + SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc(); + IDocumentMarkAccess* pMarkAccess = pDoc->getIDocumentMarkAccess(); + for(auto aIter = pMarkAccess->getFieldmarksBegin(); aIter != pMarkAccess->getFieldmarksEnd(); ++aIter) + { + const OUString sName = (*aIter)->GetName(); + CPPUNIT_ASSERT(sName == "Check1" || sName == "Text1" || sName == "Dropdown1"); + } +} + DECLARE_OOXMLEXPORT_TEST(testN830205, "n830205.docx") { // Previously import just crashed (due to infinite recursion). diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 0bc7e87f1469..a30cabad7ea7 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -2263,11 +2263,9 @@ void DocxAttributeOutput::WriteFFData( const FieldInfos& rInfos ) } else if ( rInfos.eType == ww::eFORMCHECKBOX ) { - OUString sName; + const OUString sName = params.getName(); bool bChecked = false; - params.extractParam( ODF_FORMCHECKBOX_NAME, sName ); - const sw::mark::ICheckboxFieldmark* pCheckboxFm = dynamic_cast<const sw::mark::ICheckboxFieldmark*>(&rFieldmark); if ( pCheckboxFm && pCheckboxFm->IsChecked() ) bChecked = true; diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index 445e5442a0fe..451cae7b2778 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -231,7 +231,6 @@ eF_ResT SwWW8ImplReader::Read_F_FormCheckBox( WW8FieldDesc* pF, OUString& rStr ) if (pFieldmark!=nullptr) { IFieldmark::parameter_map_t* const pParameters = pFieldmark->GetParameters(); ICheckboxFieldmark* pCheckboxFm = dynamic_cast<ICheckboxFieldmark*>(pFieldmark); - (*pParameters)[ODF_FORMCHECKBOX_NAME] <<= aFormula.msTitle; (*pParameters)[ODF_FORMCHECKBOX_HELPTEXT] <<= aFormula.msToolTip; if(pCheckboxFm) |