sw/source/filter/ww8/docxattributeoutput.cxx | 34 +++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-)
New commits: commit 75c05bd7d2e0e2fb41d4218eb0bb8f5631ca46fe Author: Pierre-Eric Pelloux-Prayer <pierre-e...@lanedo.com> Date: Fri Dec 14 16:05:24 2012 +0100 docx export: graphics relativeFrom attributes now matches import code Change-Id: I9f543c08f5e19c11c7e1b8020b8c5f62ae040f6e Reviewed-on: https://gerrit.libreoffice.org/1342 Reviewed-by: LuboÅ¡ LuÅák <l.lu...@suse.cz> Tested-by: LuboÅ¡ LuÅák <l.lu...@suse.cz> diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 29bef4a..b97b368 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -2077,8 +2077,38 @@ void DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode* pGrfNode, const Size break; case FLY_AT_CHAR: default: - relativeFromH = "character"; - relativeFromV = "line"; + // We apply the same conversion that we do in import + // (see writerfilter/source/dmapper/GraphicHelper.cxx) + switch (pFrmFmt->GetVertOrient().GetRelationOrient() ) + { + case text::RelOrientation::PAGE_PRINT_AREA: + relativeFromV = "margin"; + break; + case text::RelOrientation::PAGE_FRAME: + relativeFromV = "page"; + break; + case text::RelOrientation::FRAME: + relativeFromV = "paragraph"; + break; + case text::RelOrientation::TEXT_LINE: + default: + relativeFromV = "line"; + } + switch (pFrmFmt->GetHoriOrient().GetRelationOrient() ) + { + case text::RelOrientation::PAGE_PRINT_AREA: + relativeFromH = "margin"; + break; + case text::RelOrientation::PAGE_FRAME: + relativeFromH = "page"; + break; + case text::RelOrientation::CHAR: + relativeFromH = "character"; + break; + case text::RelOrientation::FRAME: + default: + relativeFromH = "column"; + } break; }; Point pos( 0, 0 );
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits