ooo-build r12711 - in branches/ooo-build-2-4-1: . patches/emf+ patches/src680
- From: rodo svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r12711 - in branches/ooo-build-2-4-1: . patches/emf+ patches/src680
- Date: Thu, 29 May 2008 16:50:55 +0000 (UTC)
Author: rodo
Date: Thu May 29 16:50:54 2008
New Revision: 12711
URL: http://svn.gnome.org/viewvc/ooo-build?rev=12711&view=rev
Log:
2008-05-29 Radek Doulik <rodo novell com>
* patches/src680/apply: added emf+-use-canvas-only-for-emf+.diff
with changes described below
* svtools/source/filter.vcl/wmf/winmtf.cxx: enable canvas
rendering for emf+/emf dual metafiles
* vcl/source/gdi/gdimtf.cxx: added bUseCanvas flag, which is used
during rendering, if set, the metafile is rendered with cppcanvas
metafile renderer instead of vcl renderer. it is set to false by
default, the reasoning is to improve performance for non emf+
metafiles as rendering thru canvas takes longer. it was cooked
together with Thorsten so that his new svg graphic import filter
works better
Added:
branches/ooo-build-2-4-1/patches/emf+/emf+-use-canvas-only-for-emf+.diff
Modified:
branches/ooo-build-2-4-1/ChangeLog
branches/ooo-build-2-4-1/patches/src680/apply
Added: branches/ooo-build-2-4-1/patches/emf+/emf+-use-canvas-only-for-emf+.diff
==============================================================================
--- (empty file)
+++ branches/ooo-build-2-4-1/patches/emf+/emf+-use-canvas-only-for-emf+.diff Thu May 29 16:50:54 2008
@@ -0,0 +1,83 @@
+diff --git vcl/inc/vcl/gdimtf.hxx vcl/inc/vcl/gdimtf.hxx
+index 077742d..833d9de 100644
+--- vcl/inc/vcl/gdimtf.hxx
++++ vcl/inc/vcl/gdimtf.hxx
+@@ -128,6 +128,7 @@ private:
+ ImpLabelList* pLabelList;
+ BOOL bPause;
+ BOOL bRecord;
++ BOOL bUseCanvas;
+
+ //#if 0 // _SOLAR__PRIVATE
+
+@@ -256,6 +257,8 @@ public:
+ friend VCL_DLLPUBLIC SvStream& operator<<( SvStream& rOStm, const GDIMetaFile& rGDIMetaFile );
+
+ BOOL CreateThumbnail( sal_uInt32 nMaximumExtent, BitmapEx& rBmpEx, const BitmapEx* pOverlay = NULL, const Rectangle* pOverlayRect = NULL ) const;
++
++ void UseCanvas( BOOL _bUseCanvas );
+ };
+
+ #endif // _SV_GDIMTF_HXX
+diff --git vcl/source/gdi/gdimtf.cxx vcl/source/gdi/gdimtf.cxx
+index 2104bcb..93ac803 100644
+--- vcl/source/gdi/gdimtf.cxx
++++ vcl/source/gdi/gdimtf.cxx
+@@ -266,7 +266,8 @@ GDIMetaFile::GDIMetaFile() :
+ pOutDev ( NULL ),
+ pLabelList ( NULL ),
+ bPause ( FALSE ),
+- bRecord ( FALSE )
++ bRecord ( FALSE ),
++ bUseCanvas ( FALSE )
+ {
+ }
+
+@@ -281,7 +282,8 @@ GDIMetaFile::GDIMetaFile( const GDIMetaFile& rMtf ) :
+ pNext ( rMtf.pNext ),
+ pOutDev ( NULL ),
+ bPause ( FALSE ),
+- bRecord ( FALSE )
++ bRecord ( FALSE ),
++ bUseCanvas ( rMtf.bUseCanvas )
+ {
+ // RefCount der MetaActions erhoehen
+ for( void* pAct = First(); pAct; pAct = Next() )
+@@ -335,6 +337,7 @@ GDIMetaFile& GDIMetaFile::operator=( const GDIMetaFile& rMtf )
+ pOutDev = NULL;
+ bPause = FALSE;
+ bRecord = FALSE;
++ bUseCanvas = rMtf.bUseCanvas;
+
+ if( rMtf.bRecord )
+ {
+@@ -622,7 +625,7 @@ void GDIMetaFile::Play( OutputDevice* pOut, const Point& rPos,
+ {
+ GDIMetaFile* pMtf = pOut->GetConnectMetaFile();
+
+- if( !pMtf && ImplPlayWithRenderer( pOut, rPos, aDestSize ) )
++ if( bUseCanvas && !pMtf && ImplPlayWithRenderer( pOut, rPos, aDestSize ) )
+ return;
+
+ Size aTmpPrefSize( pOut->LogicToPixel( GetPrefSize(), aDrawMap ) );
+@@ -2649,3 +2652,8 @@ BOOL GDIMetaFile::CreateThumbnail( sal_uInt32 nMaximumExtent,
+
+ return !rBmpEx.IsEmpty();
+ }
++
++void GDIMetaFile::UseCanvas( BOOL _bUseCanvas )
++{
++ bUseCanvas = _bUseCanvas;
++}
+diff --git svtools/source/filter.vcl/wmf/winmtf.cxx svtools/source/filter.vcl/wmf/winmtf.cxx
+index ded3948..c28a1c6 100644
+--- svtools/source/filter.vcl/wmf/winmtf.cxx
++++ svtools/source/filter.vcl/wmf/winmtf.cxx
+@@ -2263,6 +2263,7 @@ void WinMtfOutput::PassEMFPlusHeaderInfo()
+ mem << one << zero << zero << one << zero << zero;
+
+ mpGDIMetaFile->AddAction( new MetaCommentAction( "EMF_PLUS_HEADER_INFO", 0, (const BYTE*) mem.GetData(), mem.GetSize() ) );
++ mpGDIMetaFile->UseCanvas( TRUE );
+ }
+
+ void WinMtfOutput::PassEMFPlus( void* pBuffer, UINT32 nLength )
Modified: branches/ooo-build-2-4-1/patches/src680/apply
==============================================================================
--- branches/ooo-build-2-4-1/patches/src680/apply (original)
+++ branches/ooo-build-2-4-1/patches/src680/apply Thu May 29 16:50:54 2008
@@ -2260,6 +2260,7 @@
emf+-crash-fix.diff, n#361534, rodo
vcl-grey-alpha-unix-sal-bitmap.diff, rodo
cairocanvas-alpha-pixmap-rewrite.diff, rodo
+emf+-use-canvas-only-for-emf+.diff, rodo
[ TransparentPrinting ]
# adds fixes for printing transparent content
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]