summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorRadek Doulik <rodo@novell.com>2011-08-09 11:54:03 +0200
committerRadek Doulik <rodo@novell.com>2011-08-10 22:42:47 +0200
commitd0a69c9a1ffee644a8d2a2881c03847687e60af8 (patch)
tree08008a6f626811bb3510cac18f2b1f573c381bb3 /vcl
parent2c9d31b48de5e1d7e57637f77654aa50eca048d1 (diff)
fix rendering of metafiles embedded in emf+
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/gdi/gdimtf.cxx37
1 files changed, 20 insertions, 17 deletions
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index 30740176d676..6fe6504b8340 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -568,27 +568,30 @@ void GDIMetaFile::Play( OutputDevice* pOut, size_t nPos )
pOut->SetLayoutMode( 0 );
pOut->SetDigitLanguage( 0 );
- for( size_t nCurPos = nCurrentActionElement; nCurPos < nPos; nCurPos++ )
- {
- if( !Hook() )
+ 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++ )
{
- MetaCommentAction* pCommentAct = static_cast<MetaCommentAction*>(pAction);
- if( pAction->GetType() == META_COMMENT_ACTION &&
- pCommentAct->GetComment().Equals("DELEGATE_PLUGGABLE_RENDERER") )
+ if( !Hook() )
{
- ImplDelegate2PluggableRenderer(pCommentAct, pOut);
- }
- else
- {
- pAction->Execute( pOut );
+ 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;
}
- // flush output from time to time
- if( i++ > nSyncCount )
- ( (Window*) pOut )->Flush(), i = 0;
+ pAction = NextAction();
}
-
- pAction = NextAction();
}
pOut->Pop();
@@ -756,7 +759,7 @@ void GDIMetaFile::Play( OutputDevice* pOut, const Point& rPos,
{
GDIMetaFile* pMtf = pOut->GetConnectMetaFile();
- if( bUseCanvas && !pMtf && ImplPlayWithRenderer( pOut, rPos, aDestSize ) )
+ if( bUseCanvas && ImplPlayWithRenderer( pOut, rPos, aDestSize ) )
return;
Size aTmpPrefSize( pOut->LogicToPixel( GetPrefSize(), aDrawMap ) );