DocxAttributeOutput::FlyFrameGraphic: avoid <a:ln> when there is no border
Change-Id: Ia94f490c0ad8c392bd8bbfbe889f5333c13e0022
This commit is contained in:
BIN
sw/qa/extras/ooxmlexport/data/image-noborder.docx
Normal file
BIN
sw/qa/extras/ooxmlexport/data/image-noborder.docx
Normal file
Binary file not shown.
@@ -721,6 +721,12 @@ DECLARE_OOXMLEXPORT_TEST(testTblpprShape, "tblppr-shape.docx")
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2540), getProperty<sal_Int32>(xPageStyle, "LeftMargin"));
|
||||
}
|
||||
|
||||
DECLARE_OOXMLEXPORT_TEST(testImageNoborder, "image-noborder.docx")
|
||||
{
|
||||
// This was 26; we exported border for an image that had no border.
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(0), getProperty<table::BorderLine2>(getShape(1), "TopBorder").LineWidth);
|
||||
}
|
||||
|
||||
CPPUNIT_PLUGIN_IMPLEMENT();
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
@@ -4215,21 +4215,28 @@ void DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode* pGrfNode, const Size
|
||||
m_pSerializer->singleElementNS( XML_a, XML_avLst,
|
||||
FSEND );
|
||||
m_pSerializer->endElementNS( XML_a, XML_prstGeom );
|
||||
m_pSerializer->singleElementNS( XML_a, XML_noFill,
|
||||
FSEND );
|
||||
m_pSerializer->startElementNS( XML_a, XML_ln,
|
||||
XML_w, "9525",
|
||||
FSEND );
|
||||
m_pSerializer->singleElementNS( XML_a, XML_noFill,
|
||||
FSEND );
|
||||
m_pSerializer->singleElementNS( XML_a, XML_miter,
|
||||
XML_lim, "800000",
|
||||
FSEND );
|
||||
m_pSerializer->singleElementNS( XML_a, XML_headEnd,
|
||||
FSEND );
|
||||
m_pSerializer->singleElementNS( XML_a, XML_tailEnd,
|
||||
FSEND );
|
||||
m_pSerializer->endElementNS( XML_a, XML_ln );
|
||||
|
||||
const SvxBoxItem& rBoxItem = pFrmFmt->GetBox();
|
||||
const SvxBorderLine* pLeft = rBoxItem.GetLine(BOX_LINE_LEFT);
|
||||
const SvxBorderLine* pRight = rBoxItem.GetLine(BOX_LINE_RIGHT);
|
||||
const SvxBorderLine* pTop = rBoxItem.GetLine(BOX_LINE_TOP);
|
||||
const SvxBorderLine* pBottom = rBoxItem.GetLine(BOX_LINE_BOTTOM);
|
||||
if (pLeft || pRight || pTop || pBottom)
|
||||
{
|
||||
m_pSerializer->startElementNS( XML_a, XML_ln,
|
||||
XML_w, "9525",
|
||||
FSEND );
|
||||
m_pSerializer->singleElementNS( XML_a, XML_noFill,
|
||||
FSEND );
|
||||
m_pSerializer->singleElementNS( XML_a, XML_miter,
|
||||
XML_lim, "800000",
|
||||
FSEND );
|
||||
m_pSerializer->singleElementNS( XML_a, XML_headEnd,
|
||||
FSEND );
|
||||
m_pSerializer->singleElementNS( XML_a, XML_tailEnd,
|
||||
FSEND );
|
||||
m_pSerializer->endElementNS( XML_a, XML_ln );
|
||||
}
|
||||
|
||||
m_rExport.SdrExporter().writeDMLEffectLst(*pFrmFmt);
|
||||
|
||||
|
Reference in New Issue
Block a user