Hi Stephan, I am unable to reproduce it here. Do you have some other way to reproduce it other then make check?
I am attaching updated patch with fixed loop. Please could you try it? Cheers Radek On Wed, 2012-01-25 at 10:42 +0100, Stephan Bergmann wrote: > One thing I did notice with the first hunk of your patch is that it > moved "pAction = NextAction();" outside the for loop -- but that looks > irrelevant to the problem at hand, as ImplPlayWithRenderer appears to > always return true in the newly introduced if here. > > Also, forms_unoapi now triggers lots of > > > warn:legacy.osl:10979:9:/data/lo/core/cppcanvas/source/mtfrenderer/implrenderer.cxx:2715: > > Unknown meta action type encountered > > from within ImplPlayWithRenderer and at least once triggers that > function's catch (RuntimeException) block with an exception with message > > > basegfx::B2DPolyPolygon > > cppcanvas::tools::createTextLinesPolyPolygon(basegfx::B2DPoint, const > > double&, const cppcanvas::tools::TextLineInfo&), > > ::cppcanvas::internal::createTextLinesPolyPolygon(): Unexpected strikeout > > case > > -- anomalies the original code did not exhibit. > > Stephan >
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx index e9ac49e..1f7a670 100644 --- a/vcl/source/gdi/gdimtf.cxx +++ b/vcl/source/gdi/gdimtf.cxx @@ -406,29 +406,31 @@ 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().equalsL(RTL_CONSTASCII_STRINGPARAM("DELEGATE_PLUGGABLE_RENDERER")) ) - { - ImplDelegate2PluggableRenderer(pCommentAct, pOut); - } - else + if( !Hook() ) { - pAction->Execute( pOut ); + MetaCommentAction* pCommentAct = static_cast<MetaCommentAction*>(pAction); + if( pAction->GetType() == META_COMMENT_ACTION && + pCommentAct->GetComment().equalsL(RTL_CONSTASCII_STRINGPARAM("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(); } } @@ -608,7 +610,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 ) );
_______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice