summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@suse.cz>2012-04-11 12:05:34 +0200
committerLuboš Luňák <l.lunak@suse.cz>2012-04-12 17:11:33 +0200
commit88a8c0891474a4936a67bcd119ff968369a93869 (patch)
treee2d6670d5046ebfa6232e5bed2baae4091bff735 /sw
parent2110e5e838648ae4054ca74cdc587c12370223a5 (diff)
write w:relativeHeight
the z-order is actually already implied by the order the items are written, but why not
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx19
1 files changed, 13 insertions, 6 deletions
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index ba2420fbbd91..ae25879596e2 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -2015,12 +2015,19 @@ void DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode& rGrfNode, const Size
bool isAnchor = rGrfNode.GetFlyFmt()->GetAnchor().GetAnchorId() != FLY_AS_CHAR;
if( isAnchor )
{
- m_pSerializer->startElementNS( XML_wp, XML_anchor,
- XML_distT, "0", XML_distB, "0", XML_distL, "0", XML_distR, "0", XML_simplePos, "0",
- XML_relativeHeight, "0", // TODO
- XML_behindDoc, rGrfNode.GetFlyFmt()->GetOpaque().GetValue() ? "0" : "1",
- XML_locked, "0", XML_layoutInCell, "1", XML_allowOverlap, "1", // TODO
- FSEND );
+ ::sax_fastparser::FastAttributeList* attrList = m_pSerializer->createAttrList();
+ attrList->add( FSNS( XML_w, XML_behindDoc ), rGrfNode.GetFlyFmt()->GetOpaque().GetValue() ? "0" : "1" );
+ attrList->add( FSNS( XML_w, XML_distT ), "0" );
+ attrList->add( FSNS( XML_w, XML_distB ), "0" );
+ attrList->add( FSNS( XML_w, XML_distL ), "0" );
+ attrList->add( FSNS( XML_w, XML_distR ), "0" );
+ attrList->add( FSNS( XML_w, XML_simplePos ), "0" );
+ attrList->add( FSNS( XML_w, XML_locked ), "0" );
+ attrList->add( FSNS( XML_w, XML_layoutInCell ), "1" );
+ attrList->add( FSNS( XML_w, XML_allowOverlap ), "1" ); // TODO
+ if( const SdrObject* pObj = rGrfNode.GetFlyFmt()->FindRealSdrObject())
+ attrList->add( FSNS( XML_w, XML_relativeHeight ), OString::valueOf( sal_Int32( pObj->GetOrdNum())));
+ m_pSerializer->startElementNS( XML_wp, XML_anchor, XFastAttributeListRef( attrList ));
m_pSerializer->singleElementNS( XML_wp, XML_simplePos, XML_x, "0", XML_y, "0", FSEND ); // required, unused
const char* relativeFromH;
const char* relativeFromV;