summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/qa/extras/rtfexport/data/abi10201.rtf3
-rw-r--r--sw/qa/extras/rtfexport/rtfexport.cxx5
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.cxx9
3 files changed, 14 insertions, 3 deletions
diff --git a/sw/qa/extras/rtfexport/data/abi10201.rtf b/sw/qa/extras/rtfexport/data/abi10201.rtf
new file mode 100644
index 000000000000..08cbe0cfe743
--- /dev/null
+++ b/sw/qa/extras/rtfexport/data/abi10201.rtf
@@ -0,0 +1,3 @@
+{\rtf1
+{\*\do\dobxpage\dobypara\dodhgt8192\dptxbx\dptxbxmar0\dpx2914\dpy5119\dpxsize6474\dpysize221\dplinehollow0}
+}
diff --git a/sw/qa/extras/rtfexport/rtfexport.cxx b/sw/qa/extras/rtfexport/rtfexport.cxx
index b6084cbed641..f04e315cc49b 100644
--- a/sw/qa/extras/rtfexport/rtfexport.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport.cxx
@@ -579,6 +579,11 @@ DECLARE_RTFEXPORT_TEST(testFdo66743, "fdo66743.rtf")
CPPUNIT_ASSERT_EQUAL(sal_Int32(0xd8d8d8), getProperty<sal_Int32>(xCell, "BackColor"));
}
+DECLARE_RTFEXPORT_TEST(testAbi10201, "abi10201.rtf")
+{
+ // crashtest
+}
+
#endif
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index fd1eca3dece6..d60d5c8a32f5 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -3021,9 +3021,12 @@ void RtfAttributeOutput::FormatBox( const SvxBoxItem& rBox )
// We in fact need RGB to BGR, but the transformation is symmetric.
m_aFlyProperties.push_back(std::make_pair<OString, OString>("lineColor", OString::number(msfilter::util::BGRToRGB(rColor.GetColor()))));
- double const fConverted(editeng::ConvertBorderWidthToWord(pTop->GetBorderLineStyle(), pTop->GetWidth()));
- sal_Int32 nWidth = sal_Int32(fConverted * 635); // Twips -> EMUs
- m_aFlyProperties.push_back(std::make_pair<OString, OString>("lineWidth", OString::number(nWidth)));
+ if (pTop->GetBorderLineStyle() != table::BorderLineStyle::NONE)
+ {
+ double const fConverted(editeng::ConvertBorderWidthToWord(pTop->GetBorderLineStyle(), pTop->GetWidth()));
+ sal_Int32 nWidth = sal_Int32(fConverted * 635); // Twips -> EMUs
+ m_aFlyProperties.push_back(std::make_pair<OString, OString>("lineWidth", OString::number(nWidth)));
+ }
}
return;