vcl/source/gdi/pdfwriter_impl.cxx | 56 ++++---------------------------------- 1 file changed, 6 insertions(+), 50 deletions(-)
New commits: commit 40a0e22203c4426a561a84422a1dd06024465974 Author: Xisco Fauli <aniste...@gmail.com> Date: Wed Mar 13 20:12:16 2013 +0100 remove commented code Change-Id: Ib62d4513e27791a848594925392a45ec9ff13983 diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 9244b57..f81b215 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -226,18 +226,6 @@ void doTestCode() // enable structure aWriter.EndStructureElement(); - // add something to the long paragraph as an afterthought - /* PDFWriter::aWriter.GetCurrentStructureElement removed as an unusedcode.easy item: - http://cgit.freedesktop.org/libreoffice/core/commit/?id=09279fe3dad24ab58121e4f0a9564d252b64d81a - - sal_Int32 nSaveStruct = aWriter.GetCurrentStructureElement(); - aWriter.SetCurrentStructureElement( nLongPara ); - aWriter.DrawText( Rectangle( Point( 4500,4500 ), Size( 12000, 1000 ) ), - String( RTL_CONSTASCII_USTRINGPARAM( "Add something to the longish paragraph above." ) ), - TEXT_DRAW_MULTILINE | TEXT_DRAW_WORDBREAK ); - aWriter.SetCurrentStructureElement( nSaveStruct ); - */ - aWriter.EndStructureElement(); aWriter.EndStructureElement(); aWriter.BeginStructureElement( PDFWriter::Figure ); @@ -304,20 +292,6 @@ void doTestCode() aWriter.SetFillColor( Color( COL_LIGHTRED ) ); aWriter.DrawRect( aTranspRect ); - /* - EndTransparencyGroup( const Rectangle& rBoundRect, const Bitmap& rAlphaMask ) is removed as an unusedcode.easy item: - http://cgit.freedesktop.org/libreoffice/core/commit/?id=581e7d7057afa87036d84e42c0e0a8a7368e20c7 - - aWriter.BeginTransparencyGroup(); - aWriter.SetFillColor( Color( COL_LIGHTGREEN ) ); - aWriter.DrawEllipse( aTranspRect ); - aWriter.SetTextColor( Color( COL_LIGHTBLUE ) ); - aWriter.DrawText( aTranspRect, - String( RTL_CONSTASCII_USTRINGPARAM( "Some transparent text" ) ), - TEXT_DRAW_CENTER | TEXT_DRAW_VCENTER | TEXT_DRAW_MULTILINE | TEXT_DRAW_WORDBREAK ); - aWriter.EndTransparencyGroup( aTranspRect, aTransMask ); - */ - Bitmap aImageBmp( Size( 256, 256 ), 24 ); pAcc = aImageBmp.AcquireWriteAccess(); pAcc->SetFillColor( Color( 0xff, 0, 0xff ) ); @@ -354,29 +328,6 @@ void doTestCode() aWall.SetStyle( WALLPAPER_TILE ); aWriter.DrawWallpaper( Rectangle( Point( 4400, 4200 ), Size( 10200, 6300 ) ), aWall ); - /* - BeginPattern/EndPattern is removed as an unusedcode.easy item: - http://cgit.freedesktop.org/libreoffice/core/commit/?id=581e7d7057afa87036d84e42c0e0a8a7368e20c7 - - aWriter.Push( PUSH_ALL ); - aWriter.BeginPattern(Rectangle(Point(0,0),Size(2000,1000))); - aWriter.SetFillColor( Color( COL_RED ) ); - aWriter.SetLineColor( Color( COL_LIGHTBLUE ) ); - Point aFillPoints[] = { Point( 1000, 0 ), - Point( 0, 1000 ), - Point( 2000, 1000 ) }; - aWriter.DrawPolygon( Polygon( 3, aFillPoints ) ); - aWriter.DrawBitmap( Point( 200, 200 ), Size( 1600, 600 ), aTransMask ); - aWriter.DrawText( Rectangle( Point( 200, 200 ), Size( 1600, 600 ) ), String( RTL_CONSTASCII_USTRINGPARAM( "Pattern" ) ) ); - sal_Int32 nPattern = aWriter.EndPattern( SvtGraphicFill::Transform() ); - aWriter.Pop(); - Rectangle aPolyRect( Point( 3800, 11200 ), Size( 10200, 6300 ) ); - aWriter.DrawPolyPolygon( PolyPolygon( Polygon( aPolyRect ) ), nPattern, true ); - aWriter.SetFillColor(); - aWriter.SetLineColor( Color( COL_LIGHTBLUE ) ); - aWriter.DrawRect( aPolyRect ); - */ - aWriter.NewPage( 595, 842 ); aWriter.SetMapMode( MapMode( MAP_100TH_MM ) ); aWriter.SetFont( Font( String( "Times" ), Size( 0, 500 ) ) ); commit 58b6a6161e7edd10d33fdb67510e7d68440128f9 Author: Zhe Wang <wangz...@apache.org> Date: Fri Sep 7 04:33:47 2012 +0000 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<tmyl2...@gmail.com> Suggested by: Wang Zhe <kingwise...@gmail.com> Found by: Tang Meng <tmyl2...@gmail.com> Review by: Wang Zhe <kingwise...@gmail.com> diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 636cd94..9244b57 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -7514,7 +7514,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