incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wangz...@apache.org
Subject svn commit: r1381883 - /incubator/ooo/trunk/main/vcl/source/gdi/pdfwriter_impl.cxx
Date Fri, 07 Sep 2012 05:33:47 GMT
Author: wangzcdl
Date: Fri Sep  7 05:33:47 2012
New Revision: 1381883

URL: http://svn.apache.org/viewvc?rev=1381883&view=rev
Log:
 Fix issue #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<tmyl2010@gmail.com>
   Suggested by: Wang Zhe <kingwisemmx@gmail.com>
   Found by: Tang Meng <tmyl2010@gmail.com>
   Review by: Wang Zhe <kingwisemmx@gmail.com>

Modified:
    incubator/ooo/trunk/main/vcl/source/gdi/pdfwriter_impl.cxx

Modified: incubator/ooo/trunk/main/vcl/source/gdi/pdfwriter_impl.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/vcl/source/gdi/pdfwriter_impl.cxx?rev=1381883&r1=1381882&r2=1381883&view=diff
==============================================================================
--- incubator/ooo/trunk/main/vcl/source/gdi/pdfwriter_impl.cxx (original)
+++ incubator/ooo/trunk/main/vcl/source/gdi/pdfwriter_impl.cxx Fri Sep  7 05:33:47 2012
@@ -7175,7 +7175,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;
 



Mime
View raw message