sw/qa/extras/ooxmlexport/data/tdf154703_framePr.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport18.cxx | 6 ++++++ writerfilter/source/dmapper/DomainMapper_Impl.cxx | 3 ++- 3 files changed, 8 insertions(+), 1 deletion(-)
New commits: commit 40eb10b30dc65c8ab808f5f4c276843cdfdd3d5d Author: Justin Luth <justin.l...@collabora.com> AuthorDate: Sat Apr 8 08:22:45 2023 -0400 Commit: Justin Luth <jl...@mail.com> CommitDate: Fri May 19 18:43:08 2023 +0200 tdf#154703 writerfilter framePr: avoid exception with hasValue I'm assuming that because the range has multiple border definitions in the various paragraphs that the left border was considered undefined. Whatever the reason, a (void) uno::Any as a border was causing the conversion to fail. No matching existing unit tests found. make CppunitTest_sw_ooxmlexport18 CPPUNIT_TEST_NAME=testTdf154703_framePr Change-Id: I02fabfd035cad0f2094b023936ff1d33ed7f3fb7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150156 Reviewed-by: Justin Luth <jl...@mail.com> Tested-by: Jenkins Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151988 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> diff --git a/sw/qa/extras/ooxmlexport/data/tdf154703_framePr.docx b/sw/qa/extras/ooxmlexport/data/tdf154703_framePr.docx new file mode 100644 index 000000000000..2ec5b493ecd3 Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf154703_framePr.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx index 8c14caaf2768..2064329e132f 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx @@ -147,6 +147,12 @@ DECLARE_OOXMLEXPORT_TEST(testTdf154129_framePr1, "tdf154129_framePr1.docx") } } +DECLARE_OOXMLEXPORT_TEST(testTdf154703_framePr, "tdf154703_framePr.docx") +{ + // the frame conversion had been failing, so it imported as plain text only. + CPPUNIT_ASSERT_EQUAL(1, getShapes()); +} + DECLARE_OOXMLEXPORT_TEST(testTdf153613_anchoredAfterPgBreak, "tdf153613_anchoredAfterPgBreak.docx") { const auto& pLayout = parseLayoutDump(); diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index f599764c291d..54e3e346b015 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -1527,9 +1527,10 @@ static void lcl_MoveBorderPropertiesToFrame(std::vector<beans::PropertyValue>& r beans::PropertyValue aValue; aValue.Name = sPropertyName; aValue.Value = xTextRangeProperties->getPropertyValue(sPropertyName); - rFrameProperties.push_back(aValue); if( nProperty < 4 ) xTextRangeProperties->setPropertyValue( sPropertyName, uno::Any(table::BorderLine2())); + if (aValue.Value.hasValue()) + rFrameProperties.push_back(aValue); } } catch( const uno::Exception& )