Kaydet (Commit) f824b1b5 authored tarafından Miklos Vajna's avatar Miklos Vajna

fdo#82858 RTF export: fix "none" line style of TextFrames

Regression from commit 9e6a5b94
(RtfAttributeOutput::FormatBox: export line{Color,Width} shape
properties, 2013-04-15), in case lineColor is written, but there is no
border style, then an explicit fLine=0 property is needed, otherwise a
black border shows up.

Change-Id: I6d6eedbc8d3ee4bee0f2aadb51a376c7734c6640
üst 8f97b20e
...@@ -76,6 +76,7 @@ $(eval $(call gb_CppunitTest_use_components,sw_rtfexport,\ ...@@ -76,6 +76,7 @@ $(eval $(call gb_CppunitTest_use_components,sw_rtfexport,\
uui/util/uui \ uui/util/uui \
writerfilter/util/writerfilter \ writerfilter/util/writerfilter \
xmloff/util/xo \ xmloff/util/xo \
oox/util/oox \
)) ))
$(eval $(call gb_CppunitTest_use_configuration,sw_rtfexport)) $(eval $(call gb_CppunitTest_use_configuration,sw_rtfexport))
......
...@@ -719,6 +719,12 @@ DECLARE_RTFEXPORT_TEST(testFdo82860, "fdo82860.odt") ...@@ -719,6 +719,12 @@ DECLARE_RTFEXPORT_TEST(testFdo82860, "fdo82860.odt")
CPPUNIT_ASSERT_EQUAL(OUString("hello"), getParagraphOfText(1, xText)->getString()); CPPUNIT_ASSERT_EQUAL(OUString("hello"), getParagraphOfText(1, xText)->getString());
} }
DECLARE_RTFEXPORT_TEST(testFdo82858, "fdo82858.docx")
{
// This was table::BorderLineStyle::SOLID, exporter failed to write explicit no line when line color was written.
CPPUNIT_ASSERT_EQUAL(table::BorderLineStyle::NONE, getProperty<table::BorderLine2>(getShape(1), "TopBorder").LineStyle);
}
CPPUNIT_PLUGIN_IMPLEMENT(); CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -3104,6 +3104,9 @@ void RtfAttributeOutput::FormatBox(const SvxBoxItem& rBox) ...@@ -3104,6 +3104,9 @@ void RtfAttributeOutput::FormatBox(const SvxBoxItem& rBox)
sal_Int32 nWidth = sal_Int32(fConverted * 635); // Twips -> EMUs sal_Int32 nWidth = sal_Int32(fConverted * 635); // Twips -> EMUs
m_aFlyProperties.push_back(std::make_pair<OString, OString>("lineWidth", OString::number(nWidth))); m_aFlyProperties.push_back(std::make_pair<OString, OString>("lineWidth", OString::number(nWidth)));
} }
else
// No border: no line.
m_aFlyProperties.push_back(std::make_pair<OString, OString>("fLine", "0"));
} }
return; return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment