summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2013-01-22 12:06:54 +0100
committerMiklos Vajna <vmiklos@suse.cz>2013-01-22 16:13:25 +0100
commitf04bcdc4681e76b26b2f5e78232ccfb2d3cb891e (patch)
tree42cb4984684a6b24b1aacadc8a0bf43c1f099e1e /sw
parent6eb6fc826e54d4464ecc56911a9cb192382319ea (diff)
sw: DOCX export of TextFrame border width / color
Change-Id: If88abe20eeec478d340f913973d4f4815dc0e510
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index a6b7dffd2369..9cb2c3371489 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -4512,7 +4512,23 @@ void DocxAttributeOutput::FormatBackground( const SvxBrushItem& rBrush )
void DocxAttributeOutput::FormatBox( const SvxBoxItem& rBox )
{
if (m_bTextFrameSyntax)
+ {
+ 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)
+ {
+ OString sColor("#" + impl_ConvertColor(pTop->GetColor()));
+ m_pFlyAttrList->add(XML_strokecolor, sColor);
+
+ double const fConverted(editeng::ConvertBorderWidthToWord(pTop->GetBorderLineStyle(), pTop->GetWidth()));
+ sal_Int32 nWidth = sal_Int32(fConverted / 20);
+ m_pFlyAttrList->add(XML_strokeweight, OString::valueOf(nWidth) + "pt");
+ }
return;
+ }
if ( !m_bOpenedSectPr )
{