vcl/source/gdi/pdfwriter_impl.cxx |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 798287e15f566dd73e58d858a102917d6c765bf0
Author: Zhe Wang <wangz...@apache.org>
Date:   Fri Sep 7 04:33:47 2012 +0000

    bnc#817250, fdo#33281, i#120627 [From Symphony]the text on the Y axis is 
reversed when export ppt file to PDF format.
    
    * subversion/main/vcl/source/gdi/pdfwriter_impl.cxx
    []Change nXOffset value from the distance of axis Y between two points to 
the distance between two points.
    
    Patch by: Tang Meng<tmyl2...@gmail.com>
    Suggested by: Wang Zhe <kingwise...@gmail.com>
    Found by: Tang Meng <tmyl2...@gmail.com>
    Review by: Wang Zhe <kingwise...@gmail.com>
    (cherry picked from commit 58b6a6161e7edd10d33fdb67510e7d68440128f9)
    
    Signed-off-by: Miklos Vajna <vmik...@suse.cz>

diff --git a/vcl/source/gdi/pdfwriter_impl.cxx 
b/vcl/source/gdi/pdfwriter_impl.cxx
index e93b111..d96a7f0 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -7513,7 +7513,12 @@ void PDFWriterImpl::drawVerticalGlyphs(
         }
         aDeltaPos += (m_pReferenceDevice->PixelToLogic( Point( 
(int)((double)nXOffset/fXScale), 0 ) ) - m_pReferenceDevice->PixelToLogic( 
Point() ) );
         if( i < rGlyphs.size()-1 )
-            nXOffset += rGlyphs[i+1].m_aPos.Y() - rGlyphs[i].m_aPos.Y();
+        // [Bug 120627] the text on the Y axis is reversed when export ppt 
file to PDF format
+        {
+            long nOffsetX = rGlyphs[i+1].m_aPos.X() - rGlyphs[i].m_aPos.X();
+            long nOffsetY = rGlyphs[i+1].m_aPos.Y() - rGlyphs[i].m_aPos.Y();
+            nXOffset += (int)sqrt(double(nOffsetX*nOffsetX + 
nOffsetY*nOffsetY));
+        }
         if( ! rGlyphs[i].m_nGlyphId )
             continue;
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to