summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8/rtfattributeoutput.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2013-04-15 11:52:44 +0200
committerMiklos Vajna <vmiklos@suse.cz>2013-04-15 13:36:56 +0200
commit9e6a5b94e00f0054b058dbb42c2c0b6c75236c9d (patch)
treef7a7ef33f35410a07496000e25c375b6795a8e61 /sw/source/filter/ww8/rtfattributeoutput.cxx
parentb9233625b411f051fc0b777951925f2b98666844 (diff)
RtfAttributeOutput::FormatBox: export line{Color,Width} shape properties
Change-Id: Id1fd8b4c7ebcc8ffd3b6914596385eb3eda922c6
Diffstat (limited to 'sw/source/filter/ww8/rtfattributeoutput.cxx')
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.cxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 2918e5d428e9..1521b75b2634 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -2948,6 +2948,22 @@ void RtfAttributeOutput::FormatBox( const SvxBoxItem& rBox )
m_aFlyProperties.push_back(std::make_pair<OString, OString>("dyTextTop", OString::number(rBox.GetDistance(BOX_LINE_TOP) * 635)));
m_aFlyProperties.push_back(std::make_pair<OString, OString>("dxTextRight", OString::number(rBox.GetDistance(BOX_LINE_RIGHT) * 635)));
m_aFlyProperties.push_back(std::make_pair<OString, OString>("dyTextBottom", OString::number(rBox.GetDistance(BOX_LINE_BOTTOM) * 635)));
+
+ const SvxBorderLine* pLeft = rBox.GetLine(BOX_LINE_LEFT);
+ const SvxBorderLine* pRight = rBox.GetLine(BOX_LINE_RIGHT);
+ const SvxBorderLine* pTop = rBox.GetLine(BOX_LINE_TOP);
+ const SvxBorderLine* pBottom = rBox.GetLine(BOX_LINE_BOTTOM);
+ if (pLeft && pRight && pTop && pBottom && *pLeft == *pRight && *pLeft == *pTop && *pLeft == *pBottom)
+ {
+ const Color& rColor = pTop->GetColor();
+ // 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)));
+ }
+
return;
}