diff options
author | Zhe Wang <wangzcdl@apache.org> | 2012-09-07 04:33:47 +0000 |
---|---|---|
committer | Zhe Wang <wangzcdl@apache.org> | 2012-09-07 04:33:47 +0000 |
commit | 155cf194a0ecf18e3b19cf73d05485c59de640a2 (patch) | |
tree | cbcd8a57b9ffe51b1a23ded848714155845c6486 | |
parent | 7692e2c8fb4e978f272e38396b605b2140a6083c (diff) |
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>
Notes
Notes:
merged as: b2603c7bc701e6f42480b59429563ad64d01b0a6
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 8655cf126588..96863da9f394 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -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; |