summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Luth <jluth@mail.com>2022-06-11 20:03:35 -0400
committerJustin Luth <jluth@mail.com>2022-06-20 16:03:27 +0200
commit0332ab4bbbad2c4fad08650d62bf7addec0d2dd7 (patch)
tree1ad6c00e10585b279624e8c9db2804d586c220c8
parentff9ff6018bea7c1a4524c8edca8ef554c74e4b3f (diff)
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 <jluth@mail.com>
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport2.cxx3
-rw-r--r--sw/source/filter/ww8/docxsdrexport.cxx13
2 files changed, 12 insertions, 4 deletions
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()));