[Libreoffice-commits] .: vcl/source

Caolán McNamara caolan at kemper.freedesktop.org
Thu Aug 11 08:23:37 PDT 2011


 vcl/source/gdi/gdimtf.cxx |   37 +++++++++++++++++--------------------
 1 file changed, 17 insertions(+), 20 deletions(-)

New commits:
commit 1a6628bbddc13af51461879d155b139dbbab17ed
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 11 16:20:52 2011 +0100

    smoketest fails: revert "fix rendering of metafiles embedded in emf+"
    
    This reverts commit d0a69c9a1ffee644a8d2a2881c03847687e60af8 because
    make dev-install's smoketest is failing on --enable-debug and
    reportedly no --enable-debug

diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index faedf86..bdbca9d 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -565,30 +565,27 @@ void GDIMetaFile::Play( OutputDevice* pOut, size_t nPos )
         pOut->SetLayoutMode( 0 );
         pOut->SetDigitLanguage( 0 );
 
-        OSL_TRACE("GDIMetaFile::Play on device of size: %d x %d", pOut->GetOutputSizePixel().Width(), pOut->GetOutputSizePixel().Height());
-        if( !ImplPlayWithRenderer( pOut, Point(0,0), pOut->GetOutputSizePixel() ) ) {
-            for( size_t nCurPos = nCurrentActionElement; nCurPos < nPos; nCurPos++ )
+        for( size_t nCurPos = nCurrentActionElement; nCurPos < nPos; nCurPos++ )
+        {
+            if( !Hook() )
             {
-                if( !Hook() )
+                MetaCommentAction* pCommentAct = static_cast<MetaCommentAction*>(pAction);
+                if( pAction->GetType() == META_COMMENT_ACTION &&
+                    pCommentAct->GetComment().Equals("DELEGATE_PLUGGABLE_RENDERER") )
                 {
-                    MetaCommentAction* pCommentAct = static_cast<MetaCommentAction*>(pAction);
-                    if( pAction->GetType() == META_COMMENT_ACTION &&
-                        pCommentAct->GetComment().Equals("DELEGATE_PLUGGABLE_RENDERER") )
-                    {
-                        ImplDelegate2PluggableRenderer(pCommentAct, pOut);
-                    }
-                    else
-                    {
-                        pAction->Execute( pOut );
-                    }
-
-                    // flush output from time to time
-                    if( i++ > nSyncCount )
-                        ( (Window*) pOut )->Flush(), i = 0;
+                    ImplDelegate2PluggableRenderer(pCommentAct, pOut);
+                }
+                else
+                {
+                    pAction->Execute( pOut );
                 }
 
-                pAction = NextAction();
+                // flush output from time to time
+                if( i++ > nSyncCount )
+                    ( (Window*) pOut )->Flush(), i = 0;
             }
+
+            pAction = NextAction();
         }
 
         pOut->Pop();
@@ -756,7 +753,7 @@ void GDIMetaFile::Play( OutputDevice* pOut, const Point& rPos,
     {
         GDIMetaFile*    pMtf = pOut->GetConnectMetaFile();
 
-        if( bUseCanvas && ImplPlayWithRenderer( pOut, rPos, aDestSize ) )
+        if( bUseCanvas && !pMtf && ImplPlayWithRenderer( pOut, rPos, aDestSize ) )
             return;
 
         Size aTmpPrefSize( pOut->LogicToPixel( GetPrefSize(), aDrawMap ) );


More information about the Libreoffice-commits mailing list