[Libreoffice-commits] .: sw/source

Lubos Lunak llunak at kemper.freedesktop.org
Mon Nov 15 05:14:40 PST 2010


 sw/source/filter/ww8/docxattributeoutput.cxx |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 182f36db9b2927395b86d3f87ac60a24b125476e
Author: Luboš Luňák <l.lunak at suse.cz>
Date:   Mon Nov 15 14:14:13 2010 +0100

    use <wp:anchor> or <wp:inline> appropriately (bnc#513579)

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index bbac317..7f0fcf4 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -97,6 +97,7 @@
 #include <docufld.hxx>
 #include <flddropdown.hxx>
 #include <format.hxx>
+#include <fmtanchr.hxx>
 #include <fmtclds.hxx>
 #include <fmtinfmt.hxx>
 #include <fmtfld.hxx>
@@ -1677,7 +1678,8 @@ void DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode& rGrfNode, const Size
 
     m_pSerializer->startElementNS( XML_w, XML_drawing,
             FSEND );
-    m_pSerializer->startElementNS( XML_wp, XML_inline,
+    sal_Int32 anchorOrInline = rGrfNode.GetFlyFmt()->GetAnchor().GetAnchorId() == FLY_AS_CHAR ? XML_inline : XML_anchor;
+    m_pSerializer->startElementNS( XML_wp, anchorOrInline,
             XML_distT, "0", XML_distB, "0", XML_distL, "0", XML_distR, "0",
             FSEND );
 
@@ -1806,7 +1808,7 @@ void DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode& rGrfNode, const Size
 
     m_pSerializer->endElementNS( XML_a, XML_graphicData );
     m_pSerializer->endElementNS( XML_a, XML_graphic );
-    m_pSerializer->endElementNS( XML_wp, XML_inline );
+    m_pSerializer->endElementNS( XML_wp, anchorOrInline );
 
     m_pSerializer->endElementNS( XML_w, XML_drawing );
 }


More information about the Libreoffice-commits mailing list