[Libreoffice-commits] .: svtools/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Oct 30 07:29:37 PDT 2012


 svtools/source/filter/wmf/winmtf.cxx |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit d941d4d723afbc0b9e88bd19cb50ad711158e3a5
Author: Radek Doulik <rodo at novell.com>
Date:   Tue Oct 30 15:26:43 2012 +0100

    fix character positions translation (partial fix for n#757387)
    
    Change-Id: I042d6de9533f0f33e1fb64c3b92dc1bafaa6149f

diff --git a/svtools/source/filter/wmf/winmtf.cxx b/svtools/source/filter/wmf/winmtf.cxx
index 3cc3ef9..23a8c90 100644
--- a/svtools/source/filter/wmf/winmtf.cxx
+++ b/svtools/source/filter/wmf/winmtf.cxx
@@ -1459,9 +1459,10 @@ void WinMtfOutput::DrawText( Point& rPosition, String& rText, sal_Int32* pDXArry
 
         for( i = 0, nSum = 0; i < nLen; i++ )
         {
-            sal_Int32 nTemp = ImplMap( Size( pDXArry[ i ], 0 ) ).Width();
-            nSum += nTemp;
-            pDXArry[ i ] = nSum;
+            if ( i ) {
+                pDXArry[ i - 1 ] = ImplMap( Size( nSum, 0 ) ).Width();
+            }
+            nSum += pDXArry[ i ];
         }
     }
     if ( mnLatestTextLayoutMode != mnTextLayoutMode )


More information about the Libreoffice-commits mailing list