sw/qa/extras/ooxmlexport/ooxmlexport2.cxx | 3 +++ sw/source/filter/ww8/docxsdrexport.cxx | 13 +++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-)
New commits: commit 0332ab4bbbad2c4fad08650d62bf7addec0d2dd7 Author: Justin Luth <jl...@mail.com> AuthorDate: Sat Jun 11 20:03:35 2022 -0400 Commit: Justin Luth <jl...@mail.com> CommitDate: Mon Jun 20 16:03:27 2022 +0200 tdf#140967 docxexport: hairline is default and not a specific value This effectively is treated as a zero, although I didn't find any documentaiton that indicated what is supposed to happen when a:ln has no w=. Otherwise these numbers are normally in the thousands, and not "2". Change-Id: I9dd6a334e88feb9a2bafe29f92229b6cfdff9747 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135674 Tested-by: Jenkins Reviewed-by: Justin Luth <jl...@mail.com> diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx index 48cec2f2cca2..aa6fc8406b96 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx @@ -647,6 +647,9 @@ CPPUNIT_TEST_FIXTURE(Test, testFdo48557) CPPUNIT_ASSERT_EQUAL(sal_Int32(150), getProperty<sal_Int32>(xFrame, "TextRightDistance")); CPPUNIT_ASSERT_EQUAL(sal_Int32(150), getProperty<sal_Int32>(xFrame, "TextUpperDistance")); CPPUNIT_ASSERT_EQUAL(sal_Int32(150), getProperty<sal_Int32>(xFrame, "TextLowerDistance")); + + //tdf#140967 frame border was too small. Expected 0 (hairline), actual was 2 + CPPUNIT_ASSERT_EQUAL(sal_uInt32(0), getProperty<sal_uInt32>(xFrame, "LineWidth")); } DECLARE_OOXMLEXPORT_TEST(testI120928, "i120928.docx") diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx index 69dbd4c29091..c3c5b742e1ed 100644 --- a/sw/source/filter/ww8/docxsdrexport.cxx +++ b/sw/source/filter/ww8/docxsdrexport.cxx @@ -1718,10 +1718,15 @@ void DocxSdrExport::writeBoxItemLine(const SvxBoxItem& rBox) } sax_fastparser::FSHelperPtr pFS = m_pImpl->getSerializer(); - double fConverted(editeng::ConvertBorderWidthToWord(pBorderLine->GetBorderLineStyle(), - pBorderLine->GetWidth())); - OString sWidth(OString::number(TwipsToEMU(fConverted))); - pFS->startElementNS(XML_a, XML_ln, XML_w, sWidth); + if (pBorderLine->GetWidth() == SvxBorderLineWidth::Hairline) + pFS->startElementNS(XML_a, XML_ln); + else + { + double fConverted(editeng::ConvertBorderWidthToWord(pBorderLine->GetBorderLineStyle(), + pBorderLine->GetWidth())); + OString sWidth(OString::number(TwipsToEMU(fConverted))); + pFS->startElementNS(XML_a, XML_ln, XML_w, sWidth); + } pFS->startElementNS(XML_a, XML_solidFill); OString sColor(msfilter::util::ConvertColor(pBorderLine->GetColor()));