From 923892583651189e5da49a733cb81e4940a5a910 Mon Sep 17 00:00:00 2001 From: Thorsten Behrens Date: Fri, 23 Mar 2012 17:46:43 +0100 Subject: [PATCH] Fix fdo#47406 incorrect relative moves after closePath I missed the fact that odf export still uses the old exporter in xmloff/source/draw/xexptran.cxx, which was not fixed wrt. the update of current position in basegfx/source/polygon/b2dsvgpolypolygon.cxx --- xmloff/source/draw/xexptran.cxx | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/xmloff/source/draw/xexptran.cxx b/xmloff/source/draw/xexptran.cxx index 15ef848..6032984 100644 --- a/xmloff/source/draw/xexptran.cxx +++ b/xmloff/source/draw/xexptran.cxx @@ -1606,6 +1606,7 @@ void SdXMLImExSvgDElement::AddPolygon( // bezier poly, handle curves bool bDidWriteStart(false); + sal_Int32 nStartX(0), nStartY(0); for(sal_Int32 a(0L); a < nCnt; a++) { @@ -2080,6 +2081,8 @@ void SdXMLImExSvgDElement::AddPolygon( // remember start written bDidWriteStart = true; + nStartX = nX; + nStartY = nY; } // remember new last position @@ -2100,6 +2103,13 @@ void SdXMLImExSvgDElement::AddPolygon( aNewString += rtl::OUString(static_cast('z')); else aNewString += rtl::OUString(static_cast('Z')); + + // update current point - we're back at the start + if( bDidWriteStart ) + { + mnLastX = nStartX; + mnLastY = nStartY; + } } // append new string -- 1.7.7