ooo-build r12826 - in branches/ooo-build-2-4-1: . patches/emf+ patches/src680
- From: pmladek svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r12826 - in branches/ooo-build-2-4-1: . patches/emf+ patches/src680
- Date: Fri, 6 Jun 2008 12:55:34 +0000 (UTC)
Author: pmladek
Date: Fri Jun 6 12:55:34 2008
New Revision: 12826
URL: http://svn.gnome.org/viewvc/ooo-build?rev=12826&view=rev
Log:
2008-06-05 Radek Doulik <rodo novell com>
* patches/src680/apply: split original
emf+-embedded-mf-image-and-roundcorners-fix.diff into
emf+-embedded-mf-image.diff and cppcanvas-fix-roundcorners.diff so
that round cornes can be applied without emf+ patches enabled as
well (bnc#355638)
* patches/emf+/emf+-embedded-mf-image-and-roundcorners-fix.diff:
added new patch with changes below, also enabled it in apply
* cppcanvas/source/mtfrenderer/implrenderer.cxx: fixed round
corners rectangle drawing (basegfx tools use portion of width and
height to specify the corners width and height)
* cppcanvas/source/mtfrenderer/emfplus.cxx: implemented reading of
metafile images in Image object record
Added:
branches/ooo-build-2-4-1/patches/emf+/emf+-embedded-mf-image.diff
branches/ooo-build-2-4-1/patches/src680/cppcanvas-fix-roundcorners.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+-embedded-mf-image.diff
==============================================================================
--- (empty file)
+++ branches/ooo-build-2-4-1/patches/emf+/emf+-embedded-mf-image.diff Fri Jun 6 12:55:34 2008
@@ -0,0 +1,62 @@
+diff -rup cppcanvas-orig-mp/source/mtfrenderer/emfplus.cxx cppcanvas/source/mtfrenderer/emfplus.cxx
+--- cppcanvas-orig-mp/source/mtfrenderer/emfplus.cxx 2008-06-03 12:26:31.000000000 +0200
++++ cppcanvas/source/mtfrenderer/emfplus.cxx 2008-06-03 12:26:44.000000000 +0200
+@@ -632,12 +632,10 @@ namespace cppcanvas
+ Graphic graphic;
+
+
+- void Read (SvStream &s)
++ void Read (SvMemoryStream &s)
+ {
+ sal_uInt32 header, unknown;
+
+- EMFP_DEBUG (dumpWords(s, 16));
+-
+ s >> header >> type;
+
+ EMFP_DEBUG (printf ("EMF+\timage\nEMF+\theader: 0x%08x type: 0x%08x\n", header, type));
+@@ -652,6 +650,24 @@ namespace cppcanvas
+ EMFP_DEBUG (printf ("EMF+\tbitmap width: %d height: %d\n", graphic.GetBitmap ().GetSizePixel ().Width (), graphic.GetBitmap ().GetSizePixel ().Height ()));
+ }
+
++ } else if (type == 2) {
++ sal_Int32 mfType, mfSize;
++
++ s >> mfType >> mfSize;
++ EMFP_DEBUG (printf ("EMF+\tmetafile type: %d dataSize: %d\n", mfType, mfSize));
++
++ GraphicFilter filter;
++ SvMemoryStream mfStream (((char *)s.GetData()) + s.Tell(), mfSize, STREAM_READ);
++
++ filter.ImportGraphic (graphic, String (), mfStream);
++
++ // debug code - write the stream to debug file /tmp/emf-stream.emf
++ EMFP_DEBUG(mfStream.Seek(0);
++ SvFileStream file( UniString::CreateFromAscii( "/tmp/emf-embedded-stream.emf" ), STREAM_WRITE | STREAM_TRUNC );
++
++ mfStream >> file;
++ file.Flush();
++ file.Close());
+ }
+ }
+ };
+@@ -1040,7 +1056,7 @@ namespace cppcanvas
+ mMFlags = flags;
+ mMStream.Seek(0);
+ }
+- EMFP_DEBUG (dumpWords(rMF, 16));
++
+ // 1st 4 bytes are unknown
+ mMStream.Write (((const char *)rMF.GetData()) + rMF.Tell() + 4, dataSize - 4);
+ EMFP_DEBUG (printf ("EMF+ read next object part size: %d type: %04hx flags: %04hx data size: %d\n", size, type, flags, dataSize));
+diff -rup cppcanvas-orig-mp/source/mtfrenderer/implrenderer.cxx cppcanvas/source/mtfrenderer/implrenderer.cxx
+--- cppcanvas-orig-mp/source/mtfrenderer/implrenderer.cxx 2008-06-03 12:26:31.000000000 +0200
++++ cppcanvas/source/mtfrenderer/implrenderer.cxx 2008-06-03 12:26:44.000000000 +0200
+@@ -1845,6 +1845,7 @@ namespace cppcanvas
+ char *env;
+ if (env = getenv ("EMF_PLUS_LIMIT")) {
+ limit = atoi (env);
++ EMFP_DEBUG (printf ("EMF+ records limit: %d\n", limit));
+ }
+ }
+ EMFP_DEBUG (printf ("EMF+ passed to canvas mtf renderer, size: %d\n", pAct->GetDataSize ()));
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 Fri Jun 6 12:55:34 2008
@@ -2269,6 +2269,7 @@
cairocanvas-alpha-pixmap-rewrite.diff, rodo
emf+-use-canvas-only-for-emf+.diff, rodo
emf+-multipart-objects.diff, n#385338, rodo
+emf+-embedded-mf-image.diff, n#355638, rodo
[ TransparentPrinting ]
# adds fixes for printing transparent content
@@ -2452,3 +2453,6 @@
SectionOwner => tml
i87401-packagelist.diff
+
+[ Fixes ]
+cppcanvas-fix-roundcorners.diff, i#355638, rodo
Added: branches/ooo-build-2-4-1/patches/src680/cppcanvas-fix-roundcorners.diff
==============================================================================
--- (empty file)
+++ branches/ooo-build-2-4-1/patches/src680/cppcanvas-fix-roundcorners.diff Fri Jun 6 12:55:34 2008
@@ -0,0 +1,14 @@
+diff -rup cppcanvas-orig-mp/source/mtfrenderer/implrenderer.cxx cppcanvas/source/mtfrenderer/implrenderer.cxx
+--- cppcanvas-orig-mp/source/mtfrenderer/implrenderer.cxx 2008-06-03 12:26:31.000000000 +0200
++++ cppcanvas/source/mtfrenderer/implrenderer.cxx 2008-06-03 12:26:44.000000000 +0200
+@@ -2039,8 +2040,8 @@ namespace cppcanvas
+ ::vcl::unotools::b2DPointFromPoint( rRect.TopLeft() ),
+ ::vcl::unotools::b2DPointFromPoint( rRect.BottomRight() ) +
+ ::basegfx::B2DPoint(1,1) ),
+- static_cast<MetaRoundRectAction*>(pCurrAct)->GetHorzRound(),
+- static_cast<MetaRoundRectAction*>(pCurrAct)->GetVertRound() ));
++ ( (double) static_cast<MetaRoundRectAction*>(pCurrAct)->GetHorzRound() ) / rRect.GetWidth(),
++ ( (double) static_cast<MetaRoundRectAction*>(pCurrAct)->GetVertRound() ) / rRect.GetHeight() ) );
+ aPoly.transform( getState( rStates ).mapModeTransform );
+
+ createFillAndStroke( aPoly,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]