incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r1220836 [2/4] - in /incubator/ooo/trunk: ./ main/ main/basegfx/inc/basegfx/color/ main/basegfx/inc/basegfx/matrix/ main/basegfx/inc/basegfx/polygon/ main/basegfx/source/color/ main/basegfx/source/polygon/ main/cppcanvas/source/mtfrenderer/...
Date Mon, 19 Dec 2011 16:41:25 GMT
Modified: incubator/ooo/trunk/main/drawinglayer/source/processor2d/vclprocessor2d.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/drawinglayer/source/processor2d/vclprocessor2d.cxx?rev=1220836&r1=1220835&r2=1220836&view=diff
==============================================================================
--- incubator/ooo/trunk/main/drawinglayer/source/processor2d/vclprocessor2d.cxx (original)
+++ incubator/ooo/trunk/main/drawinglayer/source/processor2d/vclprocessor2d.cxx Mon Dec 19 16:41:21 2011
@@ -31,7 +31,6 @@
 #include <vcl/outdev.hxx>
 #include <drawinglayer/primitive2d/polygonprimitive2d.hxx>
 #include <drawinglayer/primitive2d/bitmapprimitive2d.hxx>
-#include <drawinglayer/primitive2d/rendergraphicprimitive2d.hxx>
 #include <vclhelperbitmaptransform.hxx>
 #include <basegfx/polygon/b2dpolygontools.hxx>
 #include <vclhelperbitmaprender.hxx>
@@ -57,7 +56,6 @@
 #include <vcl/metric.hxx>
 #include <drawinglayer/primitive2d/textenumsprimitive2d.hxx>
 #include <drawinglayer/primitive2d/epsprimitive2d.hxx>
-#include <vcl/rendergraphicrasterizer.hxx>
 
 //////////////////////////////////////////////////////////////////////////////
 // control support
@@ -419,75 +417,6 @@ namespace drawinglayer
 			}
 		}
 
-    	void VclProcessor2D::RenderRenderGraphicPrimitive2D(const primitive2d::RenderGraphicPrimitive2D& rRenderGraphicCandidate)
-        {
-            // create local transform
-			basegfx::B2DHomMatrix aLocalTransform(maCurrentTransformation * rRenderGraphicCandidate.getTransform());
-			vcl::RenderGraphic aRenderGraphic(rRenderGraphicCandidate.getRenderGraphic());
-			bool bPainted(false);
-
-			if(maBColorModifierStack.count())
-			{
-				// !!! TODO
-                // aRenderGraphic = impModifyRenderGraphic(maBColorModifierStack, aRenderGraphic);
-
-				if(aRenderGraphic.IsEmpty())
-				{
-					// color gets completely replaced, get it
-					const basegfx::BColor aModifiedColor(maBColorModifierStack.getModifiedColor(basegfx::BColor()));
-					basegfx::B2DPolygon aPolygon(basegfx::tools::createUnitPolygon());
-					aPolygon.transform(aLocalTransform);
-
-					mpOutputDevice->SetFillColor(Color(aModifiedColor));
-					mpOutputDevice->SetLineColor();
-					mpOutputDevice->DrawPolygon(aPolygon);
-
-					bPainted = true;
-				}
-			}
-
-			if(!bPainted)
-			{
-				// decompose matrix to check for shear, rotate and mirroring
-				basegfx::B2DVector aScale, aTranslate;
-				double fRotate, fShearX;
-				aLocalTransform.decompose(aScale, aTranslate, fRotate, fShearX);
-
-				basegfx::B2DRange aOutlineRange(0.0, 0.0, 1.0, 1.0);
-
-				if( basegfx::fTools::equalZero( fRotate ) )
-                {
-                    aOutlineRange.transform( aLocalTransform );
-                }
-                else
-                {
-                    // !!! TODO
-                    // if rotated, create the unrotated output rectangle for the GraphicManager paint
-                    /*
-                    const basegfx::B2DHomMatrix aSimpleObjectMatrix(basegfx::tools::createScaleTranslateB2DHomMatrix(
-                        fabs(aScale.getX()), fabs(aScale.getY()),
-                        aTranslate.getX(), aTranslate.getY()));
-
-                    aOutlineRange.transform(aSimpleObjectMatrix);
-                    */
-                }
-
-                // prepare dest coordinates
-                const Point                         aPoint( basegfx::fround(aOutlineRange.getMinX() ),
-                                                            basegfx::fround(aOutlineRange.getMinY() ) );
-                const Size                          aSize( basegfx::fround(aOutlineRange.getWidth() ),
-                                                           basegfx::fround(aOutlineRange.getHeight() ) );
-                const Size                          aSizePixel( mpOutputDevice->LogicToPixel( aSize ) );
-                const vcl::RenderGraphicRasterizer  aRasterizer( aRenderGraphic );
-                const BitmapEx                      aBitmapEx( aRasterizer.Rasterize( aSizePixel, fRotate, fShearX ) );
-
-                if( !aBitmapEx.IsEmpty() )
-                {
-                    mpOutputDevice->DrawBitmapEx( aPoint, aSize, aBitmapEx );
-                }
-            }
-        }
-
 		void VclProcessor2D::RenderFillBitmapPrimitive2D(const primitive2d::FillBitmapPrimitive2D& rFillBitmapCandidate)
 		{
 			const attribute::FillBitmapAttribute& rFillBitmapAttribute(rFillBitmapCandidate.getFillBitmap());

Modified: incubator/ooo/trunk/main/drawinglayer/source/processor3d/shadow3dextractor.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/drawinglayer/source/processor3d/shadow3dextractor.cxx?rev=1220836&r1=1220835&r2=1220836&view=diff
==============================================================================
--- incubator/ooo/trunk/main/drawinglayer/source/processor3d/shadow3dextractor.cxx (original)
+++ incubator/ooo/trunk/main/drawinglayer/source/processor3d/shadow3dextractor.cxx Mon Dec 19 16:41:21 2011
@@ -47,25 +47,6 @@ namespace drawinglayer
 {
 	namespace processor3d
 	{
-        /// helper to convert from BasePrimitive2DVector to primitive2d::Primitive2DSequence
-        const primitive2d::Primitive2DSequence Shadow3DExtractingProcessor::getPrimitive2DSequenceFromBasePrimitive2DVector(
-            const BasePrimitive2DVector& rVector) const
-        {
-            const sal_uInt32 nCount(rVector.size());
-            primitive2d::Primitive2DSequence aRetval(nCount);
-
-            for(sal_uInt32 a(0); a < nCount; a++)
-            {
-                aRetval[a] = rVector[a];
-            }
-
-            // all entries taken over; no need to delete entries, just reset to
-            // mark as empty
-            const_cast< BasePrimitive2DVector& >(rVector).clear();
-
-            return aRetval;
-        }
-
         // as tooling, the process() implementation takes over API handling and calls this
 		// virtual render method when the primitive implementation is BasePrimitive3D-based.
 		void Shadow3DExtractingProcessor::processBasePrimitive3D(const primitive3d::BasePrimitive3D& rCandidate)
@@ -79,8 +60,8 @@ namespace drawinglayer
 					const primitive3d::ShadowPrimitive3D& rPrimitive = static_cast< const primitive3d::ShadowPrimitive3D& >(rCandidate);
 
 					// set new target
-					BasePrimitive2DVector aNewSubList;
-					BasePrimitive2DVector* pLastTargetSequence = mpPrimitive2DSequence;
+					primitive2d::Primitive2DVector aNewSubList;
+					primitive2d::Primitive2DVector* pLastTargetSequence = mpPrimitive2DSequence;
 					mpPrimitive2DSequence = &aNewSubList;
 					
 					// activate convert
@@ -104,7 +85,7 @@ namespace drawinglayer
 					primitive2d::BasePrimitive2D* pNew = new primitive2d::ShadowPrimitive2D(
                         rPrimitive.getShadowTransform(), 
                         rPrimitive.getShadowColor(), 
-                        getPrimitive2DSequenceFromBasePrimitive2DVector(aNewSubList));
+                        primitive2d::Primitive2DVectorToPrimitive2DSequence(aNewSubList));
 
 					if(basegfx::fTools::more(rPrimitive.getShadowTransparence(), 0.0))
 					{
@@ -328,7 +309,7 @@ namespace drawinglayer
 
         const primitive2d::Primitive2DSequence Shadow3DExtractingProcessor::getPrimitive2DSequence() const 
         { 
-            return getPrimitive2DSequenceFromBasePrimitive2DVector(maPrimitive2DSequence);
+            return Primitive2DVectorToPrimitive2DSequence(maPrimitive2DSequence);
         }
 
     } // end of namespace processor3d

Modified: incubator/ooo/trunk/main/editeng/inc/editeng/unoprnms.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/editeng/inc/editeng/unoprnms.hxx?rev=1220836&r1=1220835&r2=1220836&view=diff
==============================================================================
--- incubator/ooo/trunk/main/editeng/inc/editeng/unoprnms.hxx (original)
+++ incubator/ooo/trunk/main/editeng/inc/editeng/unoprnms.hxx Mon Dec 19 16:41:21 2011
@@ -176,6 +176,7 @@
 
 #define	UNO_NAME_GRAPHOBJ_FILLBITMAP			"GraphicObjectFillBitmap"
 #define UNO_NAME_GRAPHOBJ_GRAFURL				"GraphicURL"
+#define UNO_NAME_GRAPHOBJ_REPLACEMENTGRAFURL	"ReplacementGraphicURL"
 #define UNO_NAME_GRAPHOBJ_GRAFSTREAMURL			"GraphicStreamURL"
 #define UNO_NAME_GRAPHOBJ_URLPREFIX				"vnd.sun.star.GraphicObject:"
 #define UNO_NAME_GRAPHOBJ_URLPKGPREFIX			"vnd.sun.star.Package:"

Modified: incubator/ooo/trunk/main/filter/source/flash/swfwriter1.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/filter/source/flash/swfwriter1.cxx?rev=1220836&r1=1220835&r2=1220836&view=diff
==============================================================================
--- incubator/ooo/trunk/main/filter/source/flash/swfwriter1.cxx (original)
+++ incubator/ooo/trunk/main/filter/source/flash/swfwriter1.cxx Mon Dec 19 16:41:21 2011
@@ -36,7 +36,6 @@
 #include <basegfx/matrix/b2dhommatrixtools.hxx>
 #include <svtools/filter.hxx>
 #include <vcl/graphictools.hxx>
-#include <vcl/rendergraphicrasterizer.hxx>
 
 #ifndef _ZLIB_H
 #ifdef SYSTEM_ZLIB
@@ -1887,19 +1886,6 @@ void Writer::Impl_writeActions( const GD
 			}
 			break;
 
-            case( META_RENDERGRAPHIC_ACTION ):
-            {
-                const MetaRenderGraphicAction*	        pA = (const MetaRenderGraphicAction*) pAction;
-                const ::vcl::RenderGraphicRasterizer    aRasterizer( pA->GetRenderGraphic() );
-                const Point                             aPointPixel;
-                const Size                              aSizePixel( mpVDev->LogicToPixel( pA->GetSize() ) );
-                const BitmapEx                          aBmpEx( aRasterizer.Rasterize( aSizePixel ) );
-
-				Impl_writeImage( aBmpEx, pA->GetPoint(), pA->GetSize(),
-                                 aPointPixel, aBmpEx.GetSizePixel(), clipRect, 1 == bMap );
-			}
-			break;
-
 			case( META_MAPMODE_ACTION ):
 			{
 //				const MetaMapModeAction *pA = (const MetaMapModeAction*) pAction;

Modified: incubator/ooo/trunk/main/filter/source/graphicfilter/eos2met/eos2met.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/filter/source/graphicfilter/eos2met/eos2met.cxx?rev=1220836&r1=1220835&r2=1220836&view=diff
==============================================================================
--- incubator/ooo/trunk/main/filter/source/graphicfilter/eos2met/eos2met.cxx (original)
+++ incubator/ooo/trunk/main/filter/source/graphicfilter/eos2met/eos2met.cxx Mon Dec 19 16:41:21 2011
@@ -40,7 +40,6 @@
 #include <vcl/virdev.hxx>
 #include <vcl/svapp.hxx>
 #include <vcl/msgbox.hxx>
-#include <vcl/rendergraphicrasterizer.hxx>
 #include <svl/solar.hrc>
 
 
@@ -323,7 +322,6 @@ void METWriter::CountActionsAndBitmaps(c
 			case META_BMPEX_ACTION:
 			case META_BMPEXSCALE_ACTION:
 			case META_BMPEXSCALEPART_ACTION:
-			case META_RENDERGRAPHIC_ACTION:
 				nNumberOfBitmaps++;
 			break;
 		}
@@ -797,16 +795,6 @@ void METWriter::WriteImageObjects(const 
 			}
 			break;
 
-			case( META_RENDERGRAPHIC_ACTION ):
-			{
-				const MetaRenderGraphicAction*	        pA = (const MetaRenderGraphicAction*) pMA;
-				const ::vcl::RenderGraphicRasterizer    aRasterizer( pA->GetRenderGraphic() );
-				const BitmapEx                          aBmpEx( aRasterizer.Rasterize( pCompDev->LogicToPixel( pA->GetSize() ) ) );
-
-				METSetMix( eGDIRasterOp );
-				WriteImageObject( Graphic( aBmpEx ).GetBitmap() );
-			}
-			break;
 		}
 
 		if (bStatus==sal_False)
@@ -2355,14 +2343,6 @@ void METWriter::WriteOrders( const GDIMe
 			}
 			break;
 
-			case( META_RENDERGRAPHIC_ACTION ):
-			{
-                const MetaRenderGraphicAction*	pA = (const MetaRenderGraphicAction*) pMA;
-
-                METSetMix( eGDIRasterOp );
-                METBitBlt( pA->GetPoint(), pA->GetSize(), pCompDev->LogicToPixel( pA->GetSize(), pMTF->GetPrefMapMode() ) );
-			}
-			break;
 	  }
 
 	  nWrittenActions++;

Modified: incubator/ooo/trunk/main/filter/source/graphicfilter/epict/epict.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/filter/source/graphicfilter/epict/epict.cxx?rev=1220836&r1=1220835&r2=1220836&view=diff
==============================================================================
--- incubator/ooo/trunk/main/filter/source/graphicfilter/epict/epict.cxx (original)
+++ incubator/ooo/trunk/main/filter/source/graphicfilter/epict/epict.cxx Mon Dec 19 16:41:21 2011
@@ -42,7 +42,6 @@
 #include <vcl/svapp.hxx>
 #include <vcl/msgbox.hxx>
 #include <vcl/gdimtf.hxx>
-#include <vcl/rendergraphicrasterizer.hxx>
 
 #include <tools/bigint.hxx>
 
@@ -223,7 +222,6 @@ void PictWriter::CountActionsAndBitmaps(
 			case META_BMPEX_ACTION:
 			case META_BMPEXSCALE_ACTION:
 			case META_BMPEXSCALEPART_ACTION:
-			case META_RENDERGRAPHIC_ACTION:
 				nNumberOfBitmaps++;
 			break;
 		}
@@ -2153,17 +2151,6 @@ void PictWriter::WriteOpcodes( const GDI
 			}
 			break;
 
-			case( META_RENDERGRAPHIC_ACTION ):
-			{
-				const MetaRenderGraphicAction*	        pA = (const MetaRenderGraphicAction*) pMA;
-				const ::vcl::RenderGraphicRasterizer    aRasterizer( pA->GetRenderGraphic() );
-				VirtualDevice                           aVirDev;
-				const Bitmap                            aBmp( Graphic( aRasterizer.Rasterize(
-                                                            aVirDev.LogicToPixel( pA->GetSize() ) ) ).GetBitmap() );
-
-				WriteOpcode_BitsRect( pA->GetPoint(), pA->GetSize(), aBmp );
-			}
-			break;
 		}
 
 		nWrittenActions++;

Modified: incubator/ooo/trunk/main/filter/source/graphicfilter/eps/eps.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/filter/source/graphicfilter/eps/eps.cxx?rev=1220836&r1=1220835&r2=1220836&view=diff
==============================================================================
--- incubator/ooo/trunk/main/filter/source/graphicfilter/eps/eps.cxx (original)
+++ incubator/ooo/trunk/main/filter/source/graphicfilter/eps/eps.cxx Mon Dec 19 16:41:21 2011
@@ -43,7 +43,6 @@
 #include <svtools/fltcall.hxx>
 #include <svtools/FilterConfigItem.hxx>
 #include <vcl/graphictools.hxx>
-#include <vcl/rendergraphicrasterizer.hxx>
 #include "strings.hrc"
 
 #include <math.h>
@@ -1336,7 +1335,6 @@ void PSWriter::ImplWriteActions( const G
 											case META_BMPSCALEPART_ACTION :
 											case META_BMPEXSCALE_ACTION :
 											case META_BMPEXSCALEPART_ACTION :
-											case META_RENDERGRAPHIC_ACTION :
 											{
 												nBitmapCount++;
 												nBitmapAction = nCurAction;
@@ -1396,22 +1394,6 @@ void PSWriter::ImplWriteActions( const G
 			}
 			break;
 
-            case( META_RENDERGRAPHIC_ACTION ):
-            {
-                const MetaRenderGraphicAction*	        pA = (const MetaRenderGraphicAction*) pMA;
-                const ::vcl::RenderGraphicRasterizer    aRasterizer( pA->GetRenderGraphic() );
-                const BitmapEx                          aBmpEx( aRasterizer.Rasterize( rVDev.LogicToPixel( pA->GetSize() ) ) );
-				Bitmap                                  aBmp( aBmpEx.GetBitmap() );
-
-				if ( mbGrayScale )
-					aBmp.Convert( BMP_CONVERSION_8BIT_GREYS );
-
-				Bitmap  aMask( aBmpEx.GetMask() );
-				Size    aSize( pA->GetSize() );
-
-				ImplBmp( &aBmp, &aMask, pA->GetPoint(), aSize.Width(), aSize.Height() );
-            }
-            break;
 		}
 	}
 }

Modified: incubator/ooo/trunk/main/filter/source/svg/svgwriter.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/filter/source/svg/svgwriter.cxx?rev=1220836&r1=1220835&r2=1220836&view=diff
==============================================================================
--- incubator/ooo/trunk/main/filter/source/svg/svgwriter.cxx (original)
+++ incubator/ooo/trunk/main/filter/source/svg/svgwriter.cxx Mon Dec 19 16:41:21 2011
@@ -1658,24 +1658,6 @@ void SVGActionWriter::ImplWriteActions( 
 			}
 			break;
 
-            case( META_RENDERGRAPHIC_ACTION ):
-            {
-				if( nWriteFlags & SVGWRITER_WRITE_FILL )
-				{
-                    // TODO KA: try to embed the native data in case the RenderGraphic
-                    // contains valid SVG data (MimeType "image/svg+xml")
-                    // => incorporate 'use' or 'image' element (KA 01/2011)
-					const MetaRenderGraphicAction*          pA = (const MetaRenderGraphicAction*) pAction;
-                    const ::vcl::RenderGraphicRasterizer    aRasterizer( pA->GetRenderGraphic() );
-                    const Point                             aPointPixel;
-                    const Size                              aSizePixel( mpVDev->LogicToPixel( pA->GetSize() ) );
-                    const BitmapEx                          aBmpEx( aRasterizer.Rasterize( aSizePixel ) );
-				
-					ImplWriteBmp( aBmpEx, pA->GetPoint(), pA->GetSize(), aPointPixel, aBmpEx.GetSizePixel() );
-				}
-			}
-			break;
-
 			case( META_CLIPREGION_ACTION ):
 			case( META_ISECTRECTCLIPREGION_ACTION ):
 			case( META_ISECTREGIONCLIPREGION_ACTION	):

Modified: incubator/ooo/trunk/main/filter/source/svg/svgwriter.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/filter/source/svg/svgwriter.hxx?rev=1220836&r1=1220835&r2=1220836&view=diff
==============================================================================
--- incubator/ooo/trunk/main/filter/source/svg/svgwriter.hxx (original)
+++ incubator/ooo/trunk/main/filter/source/svg/svgwriter.hxx Mon Dec 19 16:41:21 2011
@@ -50,7 +50,6 @@
 #include <vcl/cvtgrf.hxx>
 #endif
 #include <vcl/graphictools.hxx>
-#include <vcl/rendergraphicrasterizer.hxx>
 #include <xmloff/xmlexp.hxx>
 #include <xmloff/nmspmap.hxx>
 

Modified: incubator/ooo/trunk/main/offapi/com/sun/star/graphic/makefile.mk
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/offapi/com/sun/star/graphic/makefile.mk?rev=1220836&r1=1220835&r2=1220836&view=diff
==============================================================================
--- incubator/ooo/trunk/main/offapi/com/sun/star/graphic/makefile.mk (original)
+++ incubator/ooo/trunk/main/offapi/com/sun/star/graphic/makefile.mk Mon Dec 19 16:41:21 2011
@@ -48,6 +48,8 @@ IDLFILES= \
 	GraphicRendererVCL.idl \
 	GraphicType.idl \
 	MediaProperties.idl \
+	Primitive2DTools.idl \
+	SvgTools.idl \
 	XPrimitive2D.idl \
 	XPrimitive3D.idl \
 	XPrimitiveFactory2D.idl \
@@ -56,7 +58,9 @@ IDLFILES= \
 	XGraphicRasterizer.idl \
 	XGraphicRenderer.idl \
 	XGraphicObject.idl \
-	XGraphicTransformer.idl
+	XGraphicTransformer.idl \
+	XPrimitive2DRenderer.idl \
+	XSvgParser.idl
 	
 # --- Targets ------------------------------------------------------
 

Modified: incubator/ooo/trunk/main/postprocess/packcomponents/makefile.mk
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/postprocess/packcomponents/makefile.mk?rev=1220836&r1=1220835&r2=1220836&view=diff
==============================================================================
--- incubator/ooo/trunk/main/postprocess/packcomponents/makefile.mk (original)
+++ incubator/ooo/trunk/main/postprocess/packcomponents/makefile.mk Mon Dec 19 16:41:21 2011
@@ -55,12 +55,14 @@ my_components = \
     charttools \
     chartview \
     component/comphelper/util/comphelp \
+    component/drawinglayer/drawinglayer \
     component/framework/util/fwk \
     component/framework/util/fwl \
     component/framework/util/fwm \
     component/vbahelper/util/msforms \
     component/sfx2/util/sfx \
     component/sot/util/sot \
+    component/svgio/svgio \
     component/svl/source/fsstor/fsstorage \
     component/svl/source/passwordcontainer/passwordcontainer \
     component/svl/util/svl \

Modified: incubator/ooo/trunk/main/postprocess/prj/build.lst
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/postprocess/prj/build.lst?rev=1220836&r1=1220835&r2=1220836&view=diff
==============================================================================
--- incubator/ooo/trunk/main/postprocess/prj/build.lst (original)
+++ incubator/ooo/trunk/main/postprocess/prj/build.lst Mon Dec 19 16:41:21 2011
@@ -1,4 +1,4 @@
-po      postprocess     ::      accessibility automation basctl bean BINFILTER:binfilter chart2 configmgr CRASHREP:crashrep cui dbaccess desktop dtrans embeddedobj embedserv EPM:epm eventattacher extensions extras fileaccess filter forms fpicker helpcontent2 hwpfilter io JAVAINSTALLER2:javainstaller2 lingucomponent MATHMLDTD:MathMLDTD ODK:odk officecfg package padmin psprint_config remotebridges sc scaddins scp2 scripting sd setup_native slideshow starmath sw sysui testtools ucb UnoControls unoxml ure wizards xmerge xmlsecurity MORE_FONTS:more_fonts OOo:pyuno OOo:readlicense_oo SO:top unodevtools JFREEREPORT:jfreereport REPORTBUILDER:reportbuilder reportdesign SDEXT:sdext SWEXT:swext smoketestdoc uui writerfilter oox MYSQLC:mysqlc LIBXSLT:libxslt NULL
+po      postprocess     ::      svgio accessibility automation basctl bean BINFILTER:binfilter chart2 configmgr CRASHREP:crashrep cui dbaccess desktop dtrans embeddedobj embedserv EPM:epm eventattacher extensions extras fileaccess filter forms fpicker helpcontent2 hwpfilter io JAVAINSTALLER2:javainstaller2 lingucomponent MATHMLDTD:MathMLDTD ODK:odk officecfg package padmin psprint_config remotebridges sc scaddins scp2 scripting sd setup_native slideshow starmath sw sysui testtools ucb UnoControls unoxml ure wizards xmerge xmlsecurity MORE_FONTS:more_fonts OOo:pyuno OOo:readlicense_oo SO:top unodevtools JFREEREPORT:jfreereport REPORTBUILDER:reportbuilder reportdesign SDEXT:sdext SWEXT:swext smoketestdoc uui writerfilter oox MYSQLC:mysqlc LIBXSLT:libxslt NULL
 po	postprocess			    	usr1	-	all	po_mkout NULL
 po	postprocess\checkxml		nmake	-	all	po_checkxml NULL
 po	postprocess\checkdeliver	nmake	-	all	po_checkdlv NULL

Modified: incubator/ooo/trunk/main/scp2/source/ooo/file_library_ooo.scp
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/scp2/source/ooo/file_library_ooo.scp?rev=1220836&r1=1220835&r2=1220836&view=diff
==============================================================================
--- incubator/ooo/trunk/main/scp2/source/ooo/file_library_ooo.scp (original)
+++ incubator/ooo/trunk/main/scp2/source/ooo/file_library_ooo.scp Mon Dec 19 16:41:21 2011
@@ -378,6 +378,7 @@ End
 #endif
 
 STD_LIB_FILE(gid_File_Lib_Drawinglayer,drawinglayer)
+STD_LIB_FILE(gid_File_Lib_SvgIo,svgio)
 
 SPECIAL_LIB_FILE(gid_File_Lib_Embobj,embobj)
 

Modified: incubator/ooo/trunk/main/scp2/source/ooo/module_hidden_ooo.scp
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/scp2/source/ooo/module_hidden_ooo.scp?rev=1220836&r1=1220835&r2=1220836&view=diff
==============================================================================
--- incubator/ooo/trunk/main/scp2/source/ooo/module_hidden_ooo.scp (original)
+++ incubator/ooo/trunk/main/scp2/source/ooo/module_hidden_ooo.scp Mon Dec 19 16:41:21 2011
@@ -173,6 +173,7 @@ Module gid_Module_Root_Files_4
 	gid_File_Lib_Dbt,
 	gid_File_Lib_Dbfile,
 	gid_File_Lib_Drawinglayer,
+    gid_File_Lib_SvgIo,
         gid_File_Lib_Editeng,
 	gid_File_Lib_Flat,
 	gid_File_Lib_For,

Modified: incubator/ooo/trunk/main/sd/source/ui/view/drviews2.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sd/source/ui/view/drviews2.cxx?rev=1220836&r1=1220835&r2=1220836&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sd/source/ui/view/drviews2.cxx (original)
+++ incubator/ooo/trunk/main/sd/source/ui/view/drviews2.cxx Mon Dec 19 16:41:21 2011
@@ -627,7 +627,9 @@ void DrawViewShell::FuTemporary(SfxReque
 				else
 				{
 					if( mpDrawView->IsVectorizeAllowed() )
+                    {
 						SetCurrentFunction( FuVectorize::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq ) );
+                    }
 					else
 					{
 						WaitObject aWait( (Window*)GetActiveWindow() );
@@ -709,8 +711,31 @@ void DrawViewShell::FuTemporary(SfxReque
 					break;
 					case SID_CONVERT_TO_BITMAP:
 					{
-						Bitmap aBitmap (mpDrawView->GetAllMarkedBitmap ());
-						aGraphic = Graphic(aBitmap);
+                        bool bDone(false);
+                        
+                        // I have to get the image here directly since GetAllMarkedBitmap works
+                        // based on Bitmaps, but not on BitmapEx, thus throwing away the alpha
+                        // channel. Argh! GetAllMarkedBitmap itself is too widely used to safely
+                        // change that, e.g. in the exchange formats. For now I can only add this 
+                        // exception to get good results for Svgs. This is how the code gets more 
+                        // and more crowded, at last I made a remark for myself to change this
+                        // as one of the next tasks.
+                        if(1 == mpDrawView->GetMarkedObjectCount())
+                        {
+                            const SdrGrafObj* pSdrGrafObj = dynamic_cast< const SdrGrafObj* >(mpDrawView->GetMarkedObjectByIndex(0));
+
+                            if(pSdrGrafObj && pSdrGrafObj->isEmbeddedSvg())
+                            {
+                                aGraphic = Graphic(pSdrGrafObj->GetGraphic().getSvgData()->getReplacement());
+                                bDone = true;
+                            }
+                        }
+
+                        if(!bDone)
+                        {
+                            Bitmap aBitmap (mpDrawView->GetAllMarkedBitmap ());
+                            aGraphic = Graphic(aBitmap);
+                        }
 					}
 					break;
 				}

Modified: incubator/ooo/trunk/main/sd/source/ui/view/drviews6.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sd/source/ui/view/drviews6.cxx?rev=1220836&r1=1220835&r2=1220836&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sd/source/ui/view/drviews6.cxx (original)
+++ incubator/ooo/trunk/main/sd/source/ui/view/drviews6.cxx Mon Dec 19 16:41:21 2011
@@ -446,7 +446,7 @@ void DrawViewShell::GetBmpMaskState( Sfx
 
 	// valid graphic object?
 	if( pObj && pObj->ISA( SdrGrafObj ) && 
-        !( ((SdrGrafObj*) pObj)->IsEPS() || ((SdrGrafObj*) pObj)->IsRenderGraphic() ) &&
+        !((SdrGrafObj*) pObj)->IsEPS() &&
         !mpDrawView->IsTextEdit() )
     {
 		bEnable = sal_True;

Modified: incubator/ooo/trunk/main/sd/source/ui/view/drviews7.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sd/source/ui/view/drviews7.cxx?rev=1220836&r1=1220835&r2=1220836&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sd/source/ui/view/drviews7.cxx (original)
+++ incubator/ooo/trunk/main/sd/source/ui/view/drviews7.cxx Mon Dec 19 16:41:21 2011
@@ -1426,11 +1426,17 @@ void DrawViewShell::GetMenuState( SfxIte
     					bFoundMetafile = true;
 						break;
 					case OBJ_GRAF :
+                    {
 						bSingleGraphicSelected = nMarkCount == 1;
-						switch ( ((SdrGrafObj*)pObj)->GetGraphicType() )
+                        const SdrGrafObj* pSdrGrafObj = static_cast< const SdrGrafObj* >(pObj);
+						switch(pSdrGrafObj->GetGraphicType())
 						{
 							case GRAPHIC_BITMAP :
 								bFoundBitmap = sal_True;
+                                if(pSdrGrafObj->isEmbeddedSvg())
+                                {
+                                    bFoundMetafile = true;
+                                }
 								break;
 							case GRAPHIC_GDIMETAFILE :
 								bFoundMetafile = sal_True;
@@ -1442,6 +1448,7 @@ void DrawViewShell::GetMenuState( SfxIte
 						// #i25616# bFoundObjNoLine = sal_True;
 						// #i25616# bFoundObjNoArea = sal_True;
 						break;
+                    }
 					case OBJ_TABLE:
 						bFoundTable = true;
 						break;

Modified: incubator/ooo/trunk/main/sd/source/ui/view/drviewsc.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sd/source/ui/view/drviewsc.cxx?rev=1220836&r1=1220835&r2=1220836&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sd/source/ui/view/drviewsc.cxx (original)
+++ incubator/ooo/trunk/main/sd/source/ui/view/drviewsc.cxx Mon Dec 19 16:41:21 2011
@@ -363,10 +363,23 @@ void DrawViewShell::FuTemp03(SfxRequest&
 				    SdrObject*   pObj=pM->GetMarkedSdrObj();
 				    SdrGrafObj*  pGraf=PTR_CAST(SdrGrafObj,pObj);
 					SdrOle2Obj*  pOle2=PTR_CAST(SdrOle2Obj,pObj);
-			        if (pGraf!=NULL && pGraf->HasGDIMetaFile())
-						nCount += pGraf->GetGraphic().GetGDIMetaFile().GetActionCount();
-                    if(pOle2!=NULL && pOle2->GetGraphic())
+
+                    if(pGraf)
+                    {
+                        if(pGraf->HasGDIMetaFile())
+                        {
+                            nCount += pGraf->GetGraphic().GetGDIMetaFile().GetActionCount();
+                        }
+                        else if(pGraf->isEmbeddedSvg())
+                        {
+                            nCount += pGraf->getMetafileFromEmbeddedSvg().GetActionCount();
+                        }
+                    }
+                    
+                    if(pOle2 && pOle2->GetGraphic())
+                    {
                         nCount += pOle2->GetGraphic()->GetGDIMetaFile().GetActionCount();
+                    }
 				}
 
 				// anhand der erm. Summe entscheiden ob mit

Modified: incubator/ooo/trunk/main/sd/source/ui/view/drviewsj.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sd/source/ui/view/drviewsj.cxx?rev=1220836&r1=1220835&r2=1220836&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sd/source/ui/view/drviewsj.cxx (original)
+++ incubator/ooo/trunk/main/sd/source/ui/view/drviewsj.cxx Mon Dec 19 16:41:21 2011
@@ -127,22 +127,22 @@ void DrawViewShell::GetMenuStateSel( Sfx
 			SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_TEXTATTR_DLG ) )
 		{
 			const SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
+            const SdrGrafObj* pSdrGrafObj = dynamic_cast< const SdrGrafObj* >(pObj);
+            const SdrOle2Obj* pSdrOle2Obj = dynamic_cast< const SdrOle2Obj* >(pObj);
 			sal_uInt32 nInv = pObj->GetObjInventor();
 			sal_uInt16 nId = pObj->GetObjIdentifier();
 			SdrObjTransformInfoRec aInfoRec;
 			pObj->TakeObjInfo( aInfoRec );
 
-
 			// #91929#; don't show original size entry if not possible
-            if ( pObj->ISA( SdrOle2Obj ) )
+            if(pSdrOle2Obj)
 			{
-				SdrOle2Obj* pOleObj = PTR_CAST(SdrOle2Obj, pObj);
-                if (pOleObj->GetObjRef().is() &&
-                    ((pOleObj->GetObjRef()->getStatus( pOleObj->GetAspect() ) & embed::EmbedMisc::MS_EMBED_RECOMPOSEONRESIZE) ) )
+                if (pSdrOle2Obj->GetObjRef().is() &&
+                    ((pSdrOle2Obj->GetObjRef()->getStatus( pSdrOle2Obj->GetAspect() ) & embed::EmbedMisc::MS_EMBED_RECOMPOSEONRESIZE) ) )
 					rSet.DisableItem(SID_ORIGINAL_SIZE);
             }
 
-			if ( !( pObj->ISA( SdrGrafObj ) ) )
+			if(!pSdrGrafObj)
 			{
 				rSet.DisableItem(SID_SAVEGRAPHIC);
 			}
@@ -167,9 +167,10 @@ void DrawViewShell::GetMenuStateSel( Sfx
 				rSet.DisableItem( SID_NAME_GROUP );
 			}
 */
-			if (!pObj->ISA(SdrGrafObj) ||
-				((SdrGrafObj*) pObj)->GetGraphicType() != GRAPHIC_BITMAP ||
-				((SdrGrafObj*) pObj)->IsLinkedGraphic())
+			if(!pSdrGrafObj ||
+				pSdrGrafObj->GetGraphicType() != GRAPHIC_BITMAP ||
+				pSdrGrafObj->IsLinkedGraphic() ||
+                pSdrGrafObj->isEmbeddedSvg())
 			{
 				rSet.DisableItem(SID_CONVERT_TO_1BIT_THRESHOLD);
 				rSet.DisableItem(SID_CONVERT_TO_1BIT_MATRIX);

Modified: incubator/ooo/trunk/main/sd/source/ui/view/sdview.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sd/source/ui/view/sdview.cxx?rev=1220836&r1=1220835&r2=1220836&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sd/source/ui/view/sdview.cxx (original)
+++ incubator/ooo/trunk/main/sd/source/ui/view/sdview.cxx Mon Dec 19 16:41:21 2011
@@ -1073,10 +1073,15 @@ sal_Bool View::IsVectorizeAllowed() cons
 
 	if( rMarkList.GetMarkCount() == 1 )
 	{
-		const SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj();
+		const SdrGrafObj* pObj = dynamic_cast< const SdrGrafObj* >(rMarkList.GetMark( 0 )->GetMarkedSdrObj());
 
-		if( pObj->ISA( SdrGrafObj ) && ( (SdrGrafObj*) pObj )->GetGraphicType() == GRAPHIC_BITMAP )
-			bRet = sal_True;
+        if(pObj)
+        {
+            if(GRAPHIC_BITMAP == pObj->GetGraphicType() && !pObj->isEmbeddedSvg())
+            {
+                bRet = sal_True;
+            }
+        }
 	}
 
 	return bRet;

Modified: incubator/ooo/trunk/main/sd/source/ui/view/sdview3.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sd/source/ui/view/sdview3.cxx?rev=1220836&r1=1220835&r2=1220836&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sd/source/ui/view/sdview3.cxx (original)
+++ incubator/ooo/trunk/main/sd/source/ui/view/sdview3.cxx Mon Dec 19 16:41:21 2011
@@ -219,7 +219,6 @@ if( aPreviewSizePixel.Width() && aPrevie
 				case META_GRADIENTEX_ACTION:
 				case META_BMPSCALEPART_ACTION:
 				case META_BMPEXSCALEPART_ACTION:
-				case META_RENDERGRAPHIC_ACTION:
 					bVector = true;
 					break;
 				case META_BMP_ACTION:

Modified: incubator/ooo/trunk/main/sd/source/ui/view/sdview4.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sd/source/ui/view/sdview4.cxx?rev=1220836&r1=1220835&r2=1220836&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sd/source/ui/view/sdview4.cxx (original)
+++ incubator/ooo/trunk/main/sd/source/ui/view/sdview4.cxx Mon Dec 19 16:41:21 2011
@@ -395,8 +395,10 @@ IMPL_LINK( View, DropInsertFileHdl, Time
 				const bool bLink = ( ( nTempAction & DND_ACTION_LINK ) != 0 );
 				SdrGrafObj* pGrafObj = InsertGraphic( aGraphic, nTempAction, maDropPos, NULL, NULL );
 
-				if( pGrafObj && bLink )
-					pGrafObj->SetGraphicLink( aCurrentDropFile, String() );
+				if(pGrafObj && bLink)
+                {
+    				pGrafObj->SetGraphicLink( aCurrentDropFile, String() );
+                }
 
 				// return action from first inserted graphic
 				if( aIter == maDropFileVector.begin() )

Modified: incubator/ooo/trunk/main/solenv/inc/libs.mk
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/solenv/inc/libs.mk?rev=1220836&r1=1220835&r2=1220836&view=diff
==============================================================================
--- incubator/ooo/trunk/main/solenv/inc/libs.mk (original)
+++ incubator/ooo/trunk/main/solenv/inc/libs.mk Mon Dec 19 16:41:21 2011
@@ -139,6 +139,7 @@ VCLLIB=-lvcl$(DLLPOSTFIX)
 OOXLIB=-loox$(DLLPOSTFIX)
 BASEGFXLIB=-lbasegfx$(DLLPOSTFIX)
 DRAWINGLAYERLIB=-ldrawinglayer$(DLLPOSTFIX)
+SVGIOLIB=-lsvgio$(DLLPOSTFIX)
 BASEBMPLIB=-lbasebmp$(DLLPOSTFIX)
 CANVASTOOLSLIB=-lcanvastools$(DLLPOSTFIX)
 CPPCANVASLIB=-lcppcanvas$(DLLPOSTFIX)
@@ -463,6 +464,7 @@ VCLLIB=ivcl.lib
 OOXLIB=ioox.lib
 BASEGFXLIB=ibasegfx.lib
 DRAWINGLAYERLIB=idrawinglayer.lib
+SVGIOLIB=isvgio.lib
 BASEBMPLIB=ibasebmp.lib
 CANVASTOOLSLIB=icanvastools.lib
 CPPCANVASLIB=icppcanvas.lib

Modified: incubator/ooo/trunk/main/splitbuild/framework.lst
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/splitbuild/framework.lst?rev=1220836&r1=1220835&r2=1220836&view=diff
==============================================================================
--- incubator/ooo/trunk/main/splitbuild/framework.lst (original)
+++ incubator/ooo/trunk/main/splitbuild/framework.lst Mon Dec 19 16:41:21 2011
@@ -1 +1 @@
-automation avmedia basic basctl cui desktop drawinglayer extensions forms formula framework idl scripting sfx2 svx xmlsecurity vbahelper
+automation avmedia basic basctl cui desktop drawinglayer svgio extensions forms formula framework idl scripting sfx2 svx xmlsecurity vbahelper

Modified: incubator/ooo/trunk/main/svtools/inc/svtools/grfmgr.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svtools/inc/svtools/grfmgr.hxx?rev=1220836&r1=1220835&r2=1220836&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svtools/inc/svtools/grfmgr.hxx (original)
+++ incubator/ooo/trunk/main/svtools/inc/svtools/grfmgr.hxx Mon Dec 19 16:41:21 2011
@@ -217,8 +217,6 @@ private:
 	sal_Bool				mbIsInSwapOut	: 1;
 	sal_Bool				mbAlpha			: 1;
 	sal_Bool				mbDummyFlag8	: 1;
-	sal_Bool				mbIsRenderGraphic   : 1;
-	sal_Bool				mbHasRenderGraphic  : 1;
 
 	void					SVT_DLLPRIVATE ImplConstruct();
 	void					SVT_DLLPRIVATE ImplAssignGraphicData();
@@ -400,8 +398,6 @@ public:
 	sal_Bool				IsAlpha() const { return mbAlpha; }
 	sal_Bool				IsAnimated() const { return mbAnimated; }
 	sal_Bool				IsEPS() const { return mbEPS; }
-	sal_Bool				IsRenderGraphic() const { return mbIsRenderGraphic; }
-	sal_Bool				HasRenderGraphic() const { return mbHasRenderGraphic; }
 
 	void					ResetAnimationLoopCount();
 	List*					GetAnimationInfoList() const;

Modified: incubator/ooo/trunk/main/svtools/source/filter/filter.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svtools/source/filter/filter.cxx?rev=1220836&r1=1220835&r2=1220836&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svtools/source/filter/filter.cxx (original)
+++ incubator/ooo/trunk/main/svtools/source/filter/filter.cxx Mon Dec 19 16:41:21 2011
@@ -35,7 +35,7 @@
 #include <vcl/salctype.hxx>
 #include <vcl/pngread.hxx>
 #include <vcl/pngwrite.hxx>
-#include <vcl/svgread.hxx>
+#include <vcl/svgdata.hxx>
 #include <vcl/virdev.hxx>
 #include <vcl/svapp.hxx>
 #include <osl/file.hxx>
@@ -71,6 +71,7 @@
 #include <comphelper/processfactory.hxx>
 #include <rtl/bootstrap.hxx>
 #include <rtl/instance.hxx>
+#include <vcl/metaact.hxx>
 
 #include "SvFilterOptionsDialog.hxx"
 
@@ -675,13 +676,19 @@ static sal_Bool ImpPeekGraphicFormat( Sv
 	}
 
     //--------------------------- SVG ------------------------------------
-	if( !bTest || ( rFormatExtension.CompareToAscii( "SVG", 3 ) == COMPARE_EQUAL ) )
+	if( !bTest )
 	{
-        bSomethingTested=sal_True;
-
-		// just a simple test for the extension
-        if( rFormatExtension.CompareToAscii( "SVG", 3 ) == COMPARE_EQUAL )
+		if( ImplSearchEntry( sFirstBytes, (sal_uInt8*)"DOCTYPE", 256, 7 ) 
+            && ImplSearchEntry( sFirstBytes, (sal_uInt8*)"svg", 256, 3 ) )
+		{
+			rFormatExtension = UniString::CreateFromAscii( "SVG", 3 );
 			return sal_True;
+		}
+	}
+	else if( rFormatExtension.CompareToAscii( "SVG", 3 ) == COMPARE_EQUAL )
+	{
+		bSomethingTested = sal_True;
+		return sal_True;
 	}
 
 	//--------------------------- TGA ------------------------------------
@@ -1500,21 +1507,38 @@ sal_uInt16 GraphicFilter::ImportGraphic(
 			if( rGraphic.GetContext() == (GraphicReader*) 1 )
 				rGraphic.SetContext( NULL );
 
-            vcl::SVGReader  aSVGReader( rIStream );
-            GDIMetaFile     aSVGMtf;
+            const sal_uInt32 nStmPos(rIStream.Tell());
+            const sal_uInt32 nStmLen(rIStream.Seek(STREAM_SEEK_TO_END) - nStmPos);
+            bool bOkay(false);
 
-            if( 0 == aSVGReader.Read( aSVGMtf ).GetActionCount() )
-                nStatus = GRFILTER_FILTERERROR;
+            if(nStmLen)
+            {
+                SvgDataArray aNewData(new sal_uInt8[nStmLen]);
+
+                rIStream.Seek(nStmPos);
+                rIStream.Read(aNewData.get(), nStmLen);
+
+                if(!rIStream.GetError())
+                {
+                    SvgDataPtr aSvgDataPtr(
+                        new SvgData(
+                            aNewData,
+                            nStmLen,
+                            rPath));
+
+                    rGraphic = Graphic(aSvgDataPtr);
+                    bOkay = true;
+                }
+            }
+
+            if(bOkay)
+            {
+                eLinkType = GFX_LINK_TYPE_NATIVE_SVG;
+            }
             else
-                rGraphic = Graphic( aSVGMtf );
-            
-            // Dont set any GfxLink here, since the MetaRenderGraphicAction
-            // inside the just read MetaFile contains excatly this native data;
-            // setting a Ç´fxLink would also affect other program parts, since
-            // GfxLinks are preferably written to the file format in general, 
-            // which would be a bad idea in case of SVG files, since earlier
-            // implementations are not able to handle native SVG data in any
-            // case. (KA 01/19/2011)
+            {
+                nStatus = GRFILTER_FILTERERROR;
+            }
 		}
 		else if( aFilterName.EqualsIgnoreCaseAscii( IMP_XBM ) )
 		{
@@ -1856,7 +1880,7 @@ sal_uInt16 GraphicFilter::ExportGraphic(
 					aMTF.SetPrefSize( aGraphic.GetPrefSize() );
 					aMTF.SetPrefMapMode( aGraphic.GetPrefMapMode() );
 				}
-				aMTF.Write( rOStm, GDIMETAFILE_WRITE_REPLACEMENT_RENDERGRAPHIC );
+				aMTF.Write( rOStm );
 				if( rOStm.GetError() )
 					nStatus = GRFILTER_IOERROR;
 			}
@@ -1973,24 +1997,22 @@ sal_uInt16 GraphicFilter::ExportGraphic(
 			}
 			else if( aFilterName.EqualsIgnoreCaseAscii( EXP_SVG ) )
 			{
-                sal_Bool bDone = sal_False;
+                bool bDone(false);
                
                 // do we have a native SVG RenderGraphic, whose data can be written directly?
-				if( ( GRAPHIC_GDIMETAFILE == eType ) && aGraphic.IsRenderGraphic() )
-				{
-                    const ::vcl::RenderGraphic aRenderGraphic( aGraphic.GetRenderGraphic() );
+                const SvgDataPtr aSvgDataPtr(rGraphic.getSvgData());
 
-                    if( aRenderGraphic.GetGraphicDataLength() &&
-                        aRenderGraphic.GetGraphicDataMimeType().equalsIgnoreAsciiCase(
-                            ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "image/svg+xml" ) ) ) )
-                    {
-                        rOStm.Write( aRenderGraphic.GetGraphicData().get(),
-                                     aRenderGraphic.GetGraphicDataLength() );
+                if(aSvgDataPtr.get() && aSvgDataPtr->getSvgDataArrayLength())
+				{
+                    rOStm.Write(aSvgDataPtr->getSvgDataArray().get(), aSvgDataPtr->getSvgDataArrayLength());
             
-           				if( rOStm.GetError() )
-                        {
-                            nStatus = GRFILTER_IOERROR;
-                        }
+           			if( rOStm.GetError() )
+                    {
+                        nStatus = GRFILTER_IOERROR;
+                    }
+                    else
+                    {
+                        bDone = true;
                     }
                 }
 

Modified: incubator/ooo/trunk/main/svtools/source/filter/wmf/emfwr.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svtools/source/filter/wmf/emfwr.cxx?rev=1220836&r1=1220835&r2=1220836&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svtools/source/filter/wmf/emfwr.cxx (original)
+++ incubator/ooo/trunk/main/svtools/source/filter/wmf/emfwr.cxx Mon Dec 19 16:41:21 2011
@@ -33,7 +33,6 @@
 #include <basegfx/polygon/b2dpolygon.hxx>
 #include <basegfx/polygon/b2dpolypolygon.hxx>
 #include <vcl/lineinfo.hxx>
-#include <vcl/rendergraphicrasterizer.hxx>
 
 // -----------
 // - Defines -
@@ -1408,26 +1407,6 @@ void EMFWriter::ImplWrite( const GDIMeta
 			}
 			break;
 
-			case( META_RENDERGRAPHIC_ACTION ):
-			{
-				const MetaRenderGraphicAction*	        pA = (const MetaRenderGraphicAction*) pAction;
-				const ::vcl::RenderGraphicRasterizer    aRasterizer( pA->GetRenderGraphic() );
-				const BitmapEx                          aBmpEx( aRasterizer.Rasterize( maVDev.LogicToPixel( pA->GetSize() ) ) );
-				Bitmap						            aBmp( aBmpEx.GetBitmap() );
-				Bitmap						            aMsk( aBmpEx.GetMask() );
-
-				if( !!aMsk )
-				{
-					aBmp.Replace( aMsk, COL_WHITE );
-					aMsk.Invert();
-					ImplWriteBmpRecord( aMsk, pA->GetPoint(), pA->GetSize(), WIN_SRCPAINT );
-					ImplWriteBmpRecord( aBmp, pA->GetPoint(), pA->GetSize(), WIN_SRCAND );
-				}
-				else
-					ImplWriteBmpRecord( aBmp, pA->GetPoint(), pA->GetSize(), WIN_SRCCOPY );
-			}
-			break;
-
 			default:
 				DBG_ERROR( ( ByteString( "EMFWriter::ImplWriteActions: unsupported MetaAction #" ) += ByteString::CreateFromInt32( nType ) ).GetBuffer() );
 			break;

Modified: incubator/ooo/trunk/main/svtools/source/filter/wmf/wmfwr.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svtools/source/filter/wmf/wmfwr.cxx?rev=1220836&r1=1220835&r2=1220836&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svtools/source/filter/wmf/wmfwr.cxx (original)
+++ incubator/ooo/trunk/main/svtools/source/filter/wmf/wmfwr.cxx Mon Dec 19 16:41:21 2011
@@ -29,7 +29,6 @@
 #include "precompiled_svtools.hxx"
 
 #include <vcl/salbtype.hxx>
-#include <vcl/rendergraphicrasterizer.hxx>
 #include "wmfwr.hxx"
 #include <unotools/fontcvt.hxx>
 #include "emfwr.hxx"
@@ -319,7 +318,6 @@ void WMFWriter::CountActionsAndBitmaps( 
 			case META_BMPEX_ACTION:
 			case META_BMPEXSCALE_ACTION:
 			case META_BMPEXSCALEPART_ACTION:
-			case META_RENDERGRAPHIC_ACTION:
 				nNumberOfBitmaps++;
 			break;
 		}
@@ -1799,26 +1797,6 @@ void WMFWriter::WriteRecords( const GDIM
 				}
 				break;
 
-				case( META_RENDERGRAPHIC_ACTION ):
-				{
-                    const MetaRenderGraphicAction*	        pA = (const MetaRenderGraphicAction*) pMA;
-                    const ::vcl::RenderGraphicRasterizer    aRasterizer( pA->GetRenderGraphic() );
-                    const BitmapEx                          aBmpEx( aRasterizer.Rasterize( pVirDev->LogicToPixel( pA->GetSize(), aSrcMapMode ) ) );
-                    Bitmap						            aBmp( aBmpEx.GetBitmap() );
-                    Bitmap						            aMsk( aBmpEx.GetMask() );
-
-					if( !!aMsk )
-					{
-						aBmp.Replace( aMsk, COL_WHITE );
-						aMsk.Invert();
-						WMFRecord_StretchDIB( pA->GetPoint(), pA->GetSize(), aMsk, W_SRCPAINT );
-						WMFRecord_StretchDIB( pA->GetPoint(), pA->GetSize(), aBmp, W_SRCAND );
-					}
-					else
-						WMFRecord_StretchDIB( pA->GetPoint(), pA->GetSize(), aBmp );
-				}
-				break;
-
 				default:
 				{
 					DBG_ERROR( "Unsupported meta action!" );

Modified: incubator/ooo/trunk/main/svtools/source/graphic/descriptor.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svtools/source/graphic/descriptor.cxx?rev=1220836&r1=1220835&r2=1220836&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svtools/source/graphic/descriptor.cxx (original)
+++ incubator/ooo/trunk/main/svtools/source/graphic/descriptor.cxx Mon Dec 19 16:41:21 2011
@@ -393,7 +393,10 @@ void GraphicDescriptor::_getPropertyValu
 							case( GFX_LINK_TYPE_NATIVE_PNG ): pMimeType = MIMETYPE_PNG; break;
 							case( GFX_LINK_TYPE_NATIVE_WMF ): pMimeType = MIMETYPE_WMF; break;
 							case( GFX_LINK_TYPE_NATIVE_MET ): pMimeType = MIMETYPE_MET; break;
-							case( GFX_LINK_TYPE_NATIVE_PCT ): pMimeType = MIMETYPE_PCT ; break;
+							case( GFX_LINK_TYPE_NATIVE_PCT ): pMimeType = MIMETYPE_PCT; break;
+
+                            // added Svg mimetype support
+                            case( GFX_LINK_TYPE_NATIVE_SVG ): pMimeType = MIMETYPE_SVG; break;
 							
 							default:
 								pMimeType = NULL;

Modified: incubator/ooo/trunk/main/svtools/source/graphic/grfcache.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svtools/source/graphic/grfcache.cxx?rev=1220836&r1=1220835&r2=1220836&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svtools/source/graphic/grfcache.cxx (original)
+++ incubator/ooo/trunk/main/svtools/source/graphic/grfcache.cxx Mon Dec 19 16:41:21 2011
@@ -29,7 +29,7 @@
 #include <vcl/outdev.hxx>
 #include <tools/poly.hxx>
 #include "grfcache.hxx"
-
+#include <rtl/crc.h>
 #include <memory>
 
 // -----------
@@ -88,7 +88,17 @@ GraphicID::GraphicID( const GraphicObjec
 	{
 		case( GRAPHIC_BITMAP ):
 		{
-			if( rGraphic.IsAnimated() )
+            if(rGraphic.getSvgData().get())
+            {
+                const SvgDataPtr& rSvgDataPtr = rGraphic.getSvgData();
+                const basegfx::B2DRange& rRange = rSvgDataPtr->getRange();
+                
+                mnID1 |= rSvgDataPtr->getSvgDataArrayLength();
+                mnID2 = basegfx::fround(rRange.getWidth());
+                mnID3 = basegfx::fround(rRange.getHeight());
+                mnID4 = rtl_crc32(0, rSvgDataPtr->getSvgDataArray().get(), rSvgDataPtr->getSvgDataArrayLength());
+            }
+			else if( rGraphic.IsAnimated() )
 			{
 				const Animation aAnimation( rGraphic.GetAnimation() );
 
@@ -163,10 +173,13 @@ private:
 	BitmapEx*			mpBmpEx;
 	GDIMetaFile*		mpMtf;
 	Animation*			mpAnimation;
-	sal_Bool				mbSwappedAll;
-						
-	sal_Bool				ImplInit( const GraphicObject& rObj );
-	sal_Bool				ImplMatches( const GraphicObject& rObj ) const { return( GraphicID( rObj ) == maID ); }
+	sal_Bool			mbSwappedAll;
+
+    // SvgData support
+    SvgDataPtr          maSvgData;
+
+    sal_Bool			ImplInit( const GraphicObject& rObj );
+	sal_Bool			ImplMatches( const GraphicObject& rObj ) const { return( GraphicID( rObj ) == maID ); }
 	void				ImplFillSubstitute( Graphic& rSubstitute );
 						
 public:					
@@ -194,8 +207,9 @@ GraphicCacheEntry::GraphicCacheEntry( co
 	mpBmpEx			( NULL ),
 	mpMtf			( NULL ),
 	mpAnimation		( NULL ),
-	mbSwappedAll    ( !ImplInit( rObj ) )
+	mbSwappedAll    ( true )
 {
+	mbSwappedAll = !ImplInit(rObj);
 	maGraphicObjectList.Insert( (void*) &rObj, LIST_APPEND );
 }
 
@@ -233,10 +247,18 @@ sal_Bool GraphicCacheEntry::ImplInit( co
 		{
 			case( GRAPHIC_BITMAP ):
 			{
-				if( rGraphic.IsAnimated() )
+                if(rGraphic.getSvgData().get())
+                {
+                    maSvgData = rGraphic.getSvgData();
+                }
+				else if( rGraphic.IsAnimated() )
+                {
 					mpAnimation = new Animation( rGraphic.GetAnimation() );
+                }
 				else
+                {
 					mpBmpEx = new BitmapEx( rGraphic.GetBitmapEx() );
+                }
 			}
 			break;
 					
@@ -280,28 +302,44 @@ void GraphicCacheEntry::ImplFillSubstitu
 	if( rSubstitute.IsLink() && ( GFX_LINK_TYPE_NONE == maGfxLink.GetType() ) )
 		maGfxLink = rSubstitute.GetLink();
 
-	if( mpBmpEx )
+    if(maSvgData.get())
+    {
+        rSubstitute = maSvgData;
+    }
+	else if( mpBmpEx )
+    {
 		rSubstitute = *mpBmpEx;
+    }
 	else if( mpAnimation )
+    {
 		rSubstitute = *mpAnimation;
+    }
 	else if( mpMtf )
+    {
 		rSubstitute = *mpMtf;
+    }
 	else
+    {
 		rSubstitute.Clear();
+    }
 
 	if( eOldType != GRAPHIC_NONE )
 	{
-		rSubstitute.SetPrefSize( aPrefSize );
-		rSubstitute.SetPrefMapMode( aPrefMapMode );
+    	rSubstitute.SetPrefSize( aPrefSize );
+	    rSubstitute.SetPrefMapMode( aPrefMapMode );
 		rSubstitute.SetAnimationNotifyHdl( aAnimationNotifyHdl );
 		rSubstitute.SetDocFileName( aDocFileName, nDocFilePos );
 	}
 
 	if( GFX_LINK_TYPE_NONE != maGfxLink.GetType() )
+    {
 		rSubstitute.SetLink( maGfxLink );
+    }
 
 	if( bDefaultType )
+    {
 		rSubstitute.SetDefaultType();
+    }
 }
 
 // -----------------------------------------------------------------------------

Modified: incubator/ooo/trunk/main/svtools/source/graphic/grfmgr.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svtools/source/graphic/grfmgr.cxx?rev=1220836&r1=1220835&r2=1220836&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svtools/source/graphic/grfmgr.cxx (original)
+++ incubator/ooo/trunk/main/svtools/source/graphic/grfmgr.cxx Mon Dec 19 16:41:21 2011
@@ -187,8 +187,6 @@ void GraphicObject::ImplAssignGraphicDat
 	mbAlpha = maGraphic.IsAlpha();
 	mbAnimated = maGraphic.IsAnimated();
 	mbEPS = maGraphic.IsEPS();
-	mbIsRenderGraphic = maGraphic.IsRenderGraphic();
-	mbHasRenderGraphic = maGraphic.HasRenderGraphic();
     mnAnimationLoopCount = ( mbAnimated ? maGraphic.GetAnimationLoopCount() : 0 );
 }
 
@@ -438,7 +436,7 @@ void GraphicObject::Assign( const SvData
 
 ByteString GraphicObject::GetUniqueID() const
 {
-	if ( !IsInSwapIn() && ( IsEPS() || IsRenderGraphic() ) )
+	if ( !IsInSwapIn() && IsEPS() )
 		const_cast<GraphicObject*>(this)->FireSwapInRequest();
 
 	ByteString aRet;

Modified: incubator/ooo/trunk/main/svtools/source/graphic/grfmgr2.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svtools/source/graphic/grfmgr2.cxx?rev=1220836&r1=1220835&r2=1220836&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svtools/source/graphic/grfmgr2.cxx (original)
+++ incubator/ooo/trunk/main/svtools/source/graphic/grfmgr2.cxx Mon Dec 19 16:41:21 2011
@@ -865,8 +865,6 @@ sal_Bool GraphicManager::ImplCreateOutpu
                     // FALLTHROUGH intended
                 case META_GRADIENTEX_ACTION:
                     // FALLTHROUGH intended
-                case META_RENDERGRAPHIC_ACTION:
-                    // FALLTHROUGH intended
 
                     // OutDev state changes that _do_ affect bitmap
                     // output

Modified: incubator/ooo/trunk/main/svtools/source/graphic/provider.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svtools/source/graphic/provider.cxx?rev=1220836&r1=1220835&r2=1220836&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svtools/source/graphic/provider.cxx (original)
+++ incubator/ooo/trunk/main/svtools/source/graphic/provider.cxx Mon Dec 19 16:41:21 2011
@@ -628,17 +628,24 @@ void ImplApplyFilterData( ::Graphic& rGr
 	}
 	if ( rGraphic.GetType() == GRAPHIC_BITMAP )
 	{
-		Rectangle aCropPixel( Point( 0, 0 ), rGraphic.GetSizePixel() );
-		ImplCalculateCropRect( rGraphic, aCropLogic, aCropPixel );
-		if ( bRemoveCropArea )
-		{
-			BitmapEx aBmpEx( rGraphic.GetBitmapEx() );
-			aBmpEx.Crop( aCropPixel );
-			rGraphic = aBmpEx;
-		}
-		Size aVisiblePixelSize( bRemoveCropArea ? rGraphic.GetSizePixel() : aCropPixel.GetSize() );
-		ImplApplyBitmapResolution( rGraphic, nImageResolution, aVisiblePixelSize, aLogicalSize );
-		ImplApplyBitmapScaling( rGraphic, nPixelWidth, nPixelHeight );
+        if(rGraphic.getSvgData().get())
+        {
+            // embedded Svg, no need to scale. Also no method to apply crop data currently
+        }
+        else
+        {
+		    Rectangle aCropPixel( Point( 0, 0 ), rGraphic.GetSizePixel() );
+		    ImplCalculateCropRect( rGraphic, aCropLogic, aCropPixel );
+		    if ( bRemoveCropArea )
+		    {
+			    BitmapEx aBmpEx( rGraphic.GetBitmapEx() );
+			    aBmpEx.Crop( aCropPixel );
+			    rGraphic = aBmpEx;
+		    }
+		    Size aVisiblePixelSize( bRemoveCropArea ? rGraphic.GetSizePixel() : aCropPixel.GetSize() );
+		    ImplApplyBitmapResolution( rGraphic, nImageResolution, aVisiblePixelSize, aLogicalSize );
+		    ImplApplyBitmapScaling( rGraphic, nPixelWidth, nPixelHeight );
+        }
 	}
 	else if ( ( rGraphic.GetType() == GRAPHIC_GDIMETAFILE ) && nImageResolution )
 	{

Modified: incubator/ooo/trunk/main/svx/inc/svx/sdr/contact/objectcontacttools.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/inc/svx/sdr/contact/objectcontacttools.hxx?rev=1220836&r1=1220835&r2=1220836&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/inc/svx/sdr/contact/objectcontacttools.hxx (original)
+++ incubator/ooo/trunk/main/svx/inc/svx/sdr/contact/objectcontacttools.hxx Mon Dec 19 16:41:21 2011
@@ -25,6 +25,7 @@
 #define _SDR_CONTACT_OBJECTCONTACTTOOLS_HXX
 
 #include <drawinglayer/geometry/viewinformation2d.hxx>
+#include <svx/svxdllapi.h>
 
 //////////////////////////////////////////////////////////////////////////////
 // predeclarations
@@ -44,7 +45,7 @@ namespace sdr
 		// create a mating VCL-Provessor for given OutputDevice. This includes
 		// looking for MetaFile-recording. The returned renderer changes owner,
 		// deletion is duty of the caller
-		drawinglayer::processor2d::BaseProcessor2D* createBaseProcessor2DFromOutputDevice(
+		SVX_DLLPUBLIC drawinglayer::processor2d::BaseProcessor2D* createBaseProcessor2DFromOutputDevice(
             OutputDevice& rTargetOutDev, 
             const drawinglayer::geometry::ViewInformation2D& rViewInformation2D);
 

Modified: incubator/ooo/trunk/main/svx/inc/svx/svdograf.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/inc/svx/svdograf.hxx?rev=1220836&r1=1220835&r2=1220836&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/inc/svx/svdograf.hxx (original)
+++ incubator/ooo/trunk/main/svx/inc/svx/svdograf.hxx Mon Dec 19 16:41:21 2011
@@ -101,6 +101,7 @@ protected:
 	String					aFileName;			// Wenn es sich um einen Link handelt, steht hier der Dateiname drin.
 	String					aFilterName;
 	GraphicObject*			pGraphic;			// Zur Beschleunigung von Bitmapausgaben, besonders von gedrehten.
+    GraphicObject*			mpReplacementGraphic;
 	SdrGraphicLink*			pGraphicLink;		// Und hier noch ein Pointer fuer gelinkte Grafiken
 	bool    				bMirrored;			// True bedeutet, die Grafik ist horizontal, d.h. ueber die Y-Achse gespiegelt auszugeben.
 
@@ -129,8 +130,9 @@ public:
 							SdrGrafObj(const Graphic& rGrf, const Rectangle& rRect);
 	virtual					~SdrGrafObj();
 
-	void					SetGraphicObject( const GraphicObject& rGrfObj );
+    void					SetGraphicObject( const GraphicObject& rGrfObj );
 	const GraphicObject&	GetGraphicObject( bool bForceSwapIn = false) const;
+    const GraphicObject*    GetReplacementGraphicObject() const;
 
 	void					NbcSetGraphic(const Graphic& rGrf);
 	void					SetGraphic(const Graphic& rGrf);
@@ -144,8 +146,6 @@ public:
 	// Keep ATM for SD.
 	sal_Bool IsAnimated() const;
 	sal_Bool IsEPS() const;
-	sal_Bool IsRenderGraphic() const;
-	sal_Bool HasRenderGraphic() const;
 	sal_Bool IsSwappedOut() const;
 
 	const MapMode&			GetGrafPrefMapMode() const;
@@ -199,7 +199,10 @@ public:
 	virtual void			SetPage(SdrPage* pNewPage);
 	virtual void			SetModel(SdrModel* pNewModel);
 
-	virtual SdrObject*		DoConvertToPolyObj(sal_Bool bBezier, bool bAddText) const;
+    bool isEmbeddedSvg() const;
+    GDIMetaFile getMetafileFromEmbeddedSvg() const;
+
+    virtual SdrObject*		DoConvertToPolyObj(sal_Bool bBezier, bool bAddText) const;
 
 	virtual void			AdjustToMaxRect( const Rectangle& rMaxRect, bool bShrinkOnly = false );
 

Modified: incubator/ooo/trunk/main/svx/inc/svx/svdstr.hrc
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/inc/svx/svdstr.hrc?rev=1220836&r1=1220835&r2=1220836&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/inc/svx/svdstr.hrc (original)
+++ incubator/ooo/trunk/main/svx/inc/svx/svdstr.hrc Mon Dec 19 16:41:21 2011
@@ -181,11 +181,16 @@
 #define STR_ObjNameSingulMEDIA				(STR_ObjNameBegin + 143)
 #define STR_ObjNamePluralMEDIA				(STR_ObjNameBegin + 144)
 
-//#define STR_ObjNameEnd               (STR_ObjNamePluralMEDIA)
 //IAccessibility2 Implementation 2009-----
 #define STR_ObjNameSingulFONTWORK			(STR_ObjNameBegin+145)
 #define STR_ObjNamePluralFONTWORK			(STR_ObjNameBegin+146)
-#define STR_ObjNameEnd               		(STR_ObjNamePluralFONTWORK)
+
+// Svg support
+#define STR_ObjNameSingulGRAFSVG        (STR_ObjNameBegin + 147)
+#define STR_ObjNamePluralGRAFSVG        (STR_ObjNameBegin + 148)
+
+#define STR_ObjNameEnd               		(STR_ObjNamePluralGRAFSVG)
+
 //-----IAccessibility2 Implementation 2009
 #define STR_EditBegin                (STR_ObjNameEnd+1)
 #define STR_EditWithCopy             (STR_EditBegin  +  0)

Modified: incubator/ooo/trunk/main/svx/inc/svx/svdxcgv.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/inc/svx/svdxcgv.hxx?rev=1220836&r1=1220835&r2=1220836&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/inc/svx/svdxcgv.hxx (original)
+++ incubator/ooo/trunk/main/svx/inc/svx/svdxcgv.hxx Mon Dec 19 16:41:21 2011
@@ -75,7 +75,7 @@ public:
 
 	// Alle markierten Objekte auf eine Bitmap malen. Diese hat die Farbtiefe
 	// und Aufloesung des Bildschirms.
-	virtual Bitmap      GetMarkedObjBitmap(sal_Bool bNoVDevIfOneBmpMarked=sal_False) const;
+	BitmapEx GetMarkedObjBitmap(bool bNoVDevIfOneBmpMarked = false) const;
 
 	// Alle markierten Objekte in ein neues Model kopieren. Dieses neue Model
 	// hat dann genau eine Page. Das Flag PageNotValid an diesem Model ist
@@ -90,7 +90,7 @@ public:
 	virtual SdrModel*   GetMarkedObjModel() const;
 
 	GDIMetaFile     GetAllMarkedMetaFile(sal_Bool bNoVDevIfOneMtfMarked=sal_False) const { return GetMarkedObjMetaFile(bNoVDevIfOneMtfMarked); }
-	Bitmap          GetAllMarkedBitmap(sal_Bool bNoVDevIfOneBmpMarked=sal_False) const { return GetMarkedObjBitmap(bNoVDevIfOneBmpMarked); }
+	Bitmap          GetAllMarkedBitmap(sal_Bool bNoVDevIfOneBmpMarked=sal_False) const { return GetMarkedObjBitmap(bNoVDevIfOneBmpMarked).GetBitmap(); }
 	Graphic         GetAllMarkedGraphic() const;
 	SdrModel*       GetAllMarkedModel() const { return GetMarkedObjModel(); }
 

Modified: incubator/ooo/trunk/main/svx/inc/svx/unoshprp.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/inc/svx/unoshprp.hxx?rev=1220836&r1=1220835&r2=1220836&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/inc/svx/unoshprp.hxx (original)
+++ incubator/ooo/trunk/main/svx/inc/svx/unoshprp.hxx Mon Dec 19 16:41:21 2011
@@ -125,6 +125,9 @@
 #define OWN_ATTR_TRANSFORMATION					(OWN_ATTR_VALUE_START+46)
 #define OWN_ATTR_BASE_GEOMETRY					(OWN_ATTR_VALUE_START+47)
 
+/// reuse attr slots for GraphicObject which will never be used together with graphic object
+#define OWN_ATTR_REPLACEMENTGRAFURL				(OWN_ATTR_VALUE_START+14)
+
 #define OWN_ATTR_APPLET_DOCBASE                 (OWN_ATTR_VALUE_START+48)
 #define OWN_ATTR_APPLET_CODEBASE				(OWN_ATTR_VALUE_START+49)
 #define OWN_ATTR_APPLET_NAME					(OWN_ATTR_VALUE_START+50)
@@ -415,11 +418,12 @@
 
 #define SPECIAL_GRAPHOBJ_PROPERTIES \
 	SPECIAL_GRAPHOBJ_PROPERTIES_DEFAULTS \
-	{ MAP_CHAR_LEN(UNO_NAME_GRAPHIC_GRAPHICCROP),	SDRATTR_GRAFCROP			, &::getCppuType((const ::com::sun::star::text::GraphicCrop*)0),		0,	0 }, \
-	{ MAP_CHAR_LEN(UNO_NAME_GRAPHOBJ_GRAFURL),		OWN_ATTR_GRAFURL			, &::getCppuType((const ::rtl::OUString*)0), 0, 0 }, \
-	{ MAP_CHAR_LEN(UNO_NAME_GRAPHOBJ_GRAFSTREAMURL),OWN_ATTR_GRAFSTREAMURL		, &::getCppuType((const ::rtl::OUString*)0), ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0 }, \
-	{ MAP_CHAR_LEN(UNO_NAME_GRAPHOBJ_FILLBITMAP),	OWN_ATTR_VALUE_FILLBITMAP	, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XBitmap>*)0)  , 	0,     0},    \
-	{ MAP_CHAR_LEN(UNO_NAME_GRAPHOBJ_GRAPHIC),	    OWN_ATTR_VALUE_GRAPHIC	    , &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic>*)0)  , 	0,     0},
+	{ MAP_CHAR_LEN(UNO_NAME_GRAPHIC_GRAPHICCROP),	        SDRATTR_GRAFCROP			, &::getCppuType((const ::com::sun::star::text::GraphicCrop*)0),		0,	0 }, \
+	{ MAP_CHAR_LEN(UNO_NAME_GRAPHOBJ_GRAFURL),		        OWN_ATTR_GRAFURL			, &::getCppuType((const ::rtl::OUString*)0), 0, 0 }, \
+	{ MAP_CHAR_LEN(UNO_NAME_GRAPHOBJ_REPLACEMENTGRAFURL),   OWN_ATTR_REPLACEMENTGRAFURL , &::getCppuType((const ::rtl::OUString*)0), 0, 0 }, \
+	{ MAP_CHAR_LEN(UNO_NAME_GRAPHOBJ_GRAFSTREAMURL),        OWN_ATTR_GRAFSTREAMURL		, &::getCppuType((const ::rtl::OUString*)0), ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0 }, \
+	{ MAP_CHAR_LEN(UNO_NAME_GRAPHOBJ_FILLBITMAP),	        OWN_ATTR_VALUE_FILLBITMAP	, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XBitmap>*)0)  , 	0,     0},    \
+	{ MAP_CHAR_LEN(UNO_NAME_GRAPHOBJ_GRAPHIC),	            OWN_ATTR_VALUE_GRAPHIC	    , &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic>*)0)  , 	0,     0},
 
 
 #define SPECIAL_3DSCENEOBJECT_PROPERTIES_DEFAULTS \

Modified: incubator/ooo/trunk/main/svx/source/dialog/_bmpmask.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/source/dialog/_bmpmask.cxx?rev=1220836&r1=1220835&r2=1220836&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/source/dialog/_bmpmask.cxx (original)
+++ incubator/ooo/trunk/main/svx/source/dialog/_bmpmask.cxx Mon Dec 19 16:41:21 2011
@@ -1034,9 +1034,6 @@ GDIMetaFile SvxBmpMask::ImpMask( const G
 
 				default:
 				{
-				    OSL_ENSURE( pAction->GetType() != META_RENDERGRAPHIC_ACTION,
-                                "META_RENDERGRAPHIC_ACTION currently not supported at masking" );
-
 					pAction->Duplicate();
 					aMtf.AddAction( pAction );
 				}

Modified: incubator/ooo/trunk/main/svx/source/sdr/contact/viewcontactofgraphic.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/source/sdr/contact/viewcontactofgraphic.cxx?rev=1220836&r1=1220835&r2=1220836&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/source/sdr/contact/viewcontactofgraphic.cxx (original)
+++ incubator/ooo/trunk/main/svx/source/sdr/contact/viewcontactofgraphic.cxx Mon Dec 19 16:41:21 2011
@@ -410,11 +410,12 @@ namespace sdr
             {
 			    // create primitive. Info: Calling the copy-constructor of GraphicObject in this
 				// SdrGrafPrimitive2D constructor will force a full swap-in of the graphic
-			    const drawinglayer::primitive2d::Primitive2DReference xReference(new drawinglayer::primitive2d::SdrGrafPrimitive2D(
-				    aObjectMatrix, 
-					aAttribute, 
-					rGraphicObject, 
-					aLocalGrafInfo));
+			    const drawinglayer::primitive2d::Primitive2DReference xReference(
+                    new drawinglayer::primitive2d::SdrGrafPrimitive2D(
+                        aObjectMatrix, 
+                        aAttribute, 
+                        rGraphicObject, 
+                        aLocalGrafInfo));
 
 			    xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
             }

Modified: incubator/ooo/trunk/main/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx?rev=1220836&r1=1220835&r2=1220836&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx (original)
+++ incubator/ooo/trunk/main/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx Mon Dec 19 16:41:21 2011
@@ -19,8 +19,6 @@
  * 
  *************************************************************/
 
-
-
 #include "precompiled_svx.hxx"
 #include <svx/sdr/primitive2d/sdrgrafprimitive2d.hxx>
 #include <drawinglayer/primitive2d/graphicprimitive2d.hxx>
@@ -30,6 +28,8 @@
 #include <svx/sdr/primitive2d/svx_primitivetypes2d.hxx>
 #include <drawinglayer/primitive2d/sdrdecompositiontools2d.hxx>
 #include <basegfx/polygon/b2dpolygon.hxx>
+#include <basegfx/matrix/b2dhommatrixtools.hxx>
+#include <drawinglayer/primitive2d/transformprimitive2d.hxx>
 
 //////////////////////////////////////////////////////////////////////////////
 
@@ -94,7 +94,8 @@ namespace drawinglayer
 			// add graphic content
 			if(255L != getGraphicAttr().GetTransparency())
 			{
-				const Primitive2DReference xGraphicContentPrimitive(
+                // standard graphic fill
+                const Primitive2DReference xGraphicContentPrimitive(
                     new GraphicPrimitive2D(
                         getTransform(), 
                         getGraphicObject(), 
@@ -160,7 +161,8 @@ namespace drawinglayer
 
 		bool SdrGrafPrimitive2D::isTransparent() const
 		{
-			return ((0L != getGraphicAttr().GetTransparency()) || (getGraphicObject().IsTransparent()));
+			return ((0L != getGraphicAttr().GetTransparency()) 
+                || (getGraphicObject().IsTransparent()));
 		}
 
 		// provide unique ID

Modified: incubator/ooo/trunk/main/svx/source/svdraw/svddrgmt.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/source/svdraw/svddrgmt.cxx?rev=1220836&r1=1220835&r2=1220836&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/source/svdraw/svddrgmt.cxx (original)
+++ incubator/ooo/trunk/main/svx/source/svdraw/svddrgmt.cxx Mon Dec 19 16:41:21 2011
@@ -3628,6 +3628,19 @@ bool SdrDragCrop::EndSdrDrag(bool bCopy)
 	double fScaleX = ( aGraphicSize.Width() - rOldCrop.GetLeft() - rOldCrop.GetRight() ) / (double)aOldRect.GetWidth();
 	double fScaleY = ( aGraphicSize.Height() - rOldCrop.GetTop() - rOldCrop.GetBottom() ) / (double)aOldRect.GetHeight();
 
+    // to correct the never working combination of cropped images and mirroring
+    // I have to correct the rectangles the calculation is based on here. In the current
+    // core geometry stuff a vertical mirror is expressed as 180 degree rotation. All
+    // this can be removed again when aw080 will have cleaned up the old 
+    // (non-)transformation mess in the core.
+    if(18000 == pObj->GetGeoStat().nDrehWink)
+    {
+        // old notation of vertical mirror, need to correct diffs since both rects
+        // are rotated by 180 degrees
+        aOldRect = Rectangle(aOldRect.TopLeft() - (aOldRect.BottomRight() - aOldRect.TopLeft()), aOldRect.TopLeft());
+        aNewRect = Rectangle(aNewRect.TopLeft() - (aNewRect.BottomRight() - aNewRect.TopLeft()), aNewRect.TopLeft());
+    }
+
 	sal_Int32 nDiffLeft = aNewRect.nLeft - aOldRect.nLeft;
 	sal_Int32 nDiffTop = aNewRect.nTop - aOldRect.nTop;
 	sal_Int32 nDiffRight = aNewRect.nRight - aOldRect.nRight;

Modified: incubator/ooo/trunk/main/svx/source/svdraw/svdedtv.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/source/svdraw/svdedtv.cxx?rev=1220836&r1=1220835&r2=1220836&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/source/svdraw/svdedtv.cxx (original)
+++ incubator/ooo/trunk/main/svx/source/svdraw/svdedtv.cxx Mon Dec 19 16:41:21 2011
@@ -636,19 +636,20 @@ void SdrEditView::CheckPossibilities()
 				if (!bOrthoDesiredOnMarked && !aInfo.bNoOrthoDesired) bOrthoDesiredOnMarked=sal_True;
 				// ImportMtf checken
 
-                if (!bImportMtfPossible) {
-                    sal_Bool bGraf=HAS_BASE(SdrGrafObj,pObj);
-                    sal_Bool bOle2=HAS_BASE(SdrOle2Obj,pObj);
-
-					if( bGraf &&
-                        ((SdrGrafObj*)pObj)->HasGDIMetaFile() &&
-                        !( ((SdrGrafObj*)pObj)->IsEPS() || ((SdrGrafObj*)pObj)->IsRenderGraphic() ) )
+                if (!bImportMtfPossible) 
+                {
+                    const SdrGrafObj* pSdrGrafObj = dynamic_cast< const SdrGrafObj* >(pObj);
+                    const SdrOle2Obj* pSdrOle2Obj = dynamic_cast< const SdrOle2Obj* >(pObj);
+
+                    if(pSdrGrafObj && ((pSdrGrafObj->HasGDIMetaFile() && !pSdrGrafObj->IsEPS()) || pSdrGrafObj->isEmbeddedSvg()))
                     {
-						bImportMtfPossible = sal_True;
+                        bImportMtfPossible = sal_True;
                     }
 
-					if (bOle2)
-                        bImportMtfPossible=((SdrOle2Obj*)pObj)->GetObjRef().is();
+                    if(pSdrOle2Obj)
+                    {
+                        bImportMtfPossible = pSdrOle2Obj->GetObjRef().is();
+                    }
                 }
 			}
 

Modified: incubator/ooo/trunk/main/svx/source/svdraw/svdedtv2.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/source/svdraw/svdedtv2.cxx?rev=1220836&r1=1220835&r2=1220836&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/source/svdraw/svdedtv2.cxx (original)
+++ incubator/ooo/trunk/main/svx/source/svdraw/svdedtv2.cxx Mon Dec 19 16:41:21 2011
@@ -2073,18 +2073,31 @@ void SdrEditView::DoImportMarkedMtf(SvdP
 		sal_uIntPtr        nInsAnz=0;
         Rectangle aLogicRect;
 
-		if (pGraf!=NULL && pGraf->HasGDIMetaFile())
-		{
-			ImpSdrGDIMetaFileImport aFilter(*pMod);
-			
-            aLogicRect = pGraf->GetLogicRect();
-            aFilter.SetScaleRect(aLogicRect);
-			aFilter.SetLayer(pObj->GetLayer());
-			
-            nInsAnz=aFilter.DoImport(pGraf->GetTransformedGraphic(
-                SDRGRAFOBJ_TRANSFORMATTR_COLOR|SDRGRAFOBJ_TRANSFORMATTR_MIRROR).GetGDIMetaFile(),
-                *pOL,nInsPos,pProgrInfo);
-		}
+		if(pGraf && (pGraf->HasGDIMetaFile() || pGraf->isEmbeddedSvg()))
+        {
+            GDIMetaFile aMetaFile;
+
+            if(pGraf->HasGDIMetaFile())
+            {
+                aMetaFile = pGraf->GetTransformedGraphic(
+                    SDRGRAFOBJ_TRANSFORMATTR_COLOR|SDRGRAFOBJ_TRANSFORMATTR_MIRROR).GetGDIMetaFile();
+            }
+            else if(pGraf->isEmbeddedSvg())
+            {
+                aMetaFile = pGraf->getMetafileFromEmbeddedSvg();
+            }
+
+            if(aMetaFile.GetActionCount())
+            {
+                ImpSdrGDIMetaFileImport aFilter(*pMod);
+
+                aLogicRect = pGraf->GetLogicRect();
+                aFilter.SetScaleRect(aLogicRect);
+                aFilter.SetLayer(pObj->GetLayer());
+
+                nInsAnz = aFilter.DoImport(aMetaFile, *pOL, nInsPos, pProgrInfo);
+            }
+        }
         if ( pOle2!=NULL && pOle2->GetGraphic() )
 		{
             //const GDIMetaFile* pMtf=pOle2->GetGDIMetaFile();

Modified: incubator/ooo/trunk/main/svx/source/svdraw/svdfmtf.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/source/svdraw/svdfmtf.cxx?rev=1220836&r1=1220835&r2=1220836&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/source/svdraw/svdfmtf.cxx (original)
+++ incubator/ooo/trunk/main/svx/source/svdraw/svdfmtf.cxx Mon Dec 19 16:41:21 2011
@@ -191,7 +191,6 @@ sal_uIntPtr ImpSdrGDIMetaFileImport::DoI
 			case META_POP_ACTION            : DoAction((MetaPopAction            &)*pAct); break;
 			case META_HATCH_ACTION			: DoAction((MetaHatchAction          &)*pAct); break;
 			case META_COMMENT_ACTION		: DoAction((MetaCommentAction        &)*pAct, pMtf); break;
-            case META_RENDERGRAPHIC_ACTION  : DoAction((MetaRenderGraphicAction  &)*pAct); break;
 		}
 
 		if(pProgrInfo != NULL)
@@ -1025,24 +1024,4 @@ void ImpSdrGDIMetaFileImport::DoAction( 
 }
 
 ////////////////////////////////////////////////////////////////////////////////////////////////////
-
-void ImpSdrGDIMetaFileImport::DoAction(MetaRenderGraphicAction& rAct)
-{
-	GDIMetaFile                 aMtf;
-	const ::vcl::RenderGraphic& rRenderGraphic = rAct.GetRenderGraphic();
-	Rectangle                   aRect( rAct.GetPoint(), rAct.GetSize() );
-    const Point                 aPos;
-    const Size                  aPrefSize( rRenderGraphic.GetPrefSize() );
-
-	aRect.Right()++; aRect.Bottom()++;
-
-    aMtf.SetPrefMapMode( rRenderGraphic.GetPrefMapMode() );
-    aMtf.SetPrefSize( aPrefSize );
-    aMtf.AddAction( new MetaRenderGraphicAction( aPos, aPrefSize, rRenderGraphic ) );
-    aMtf.WindStart();
-
-	SdrGrafObj* pGraf=new SdrGrafObj( aMtf, aRect );
-	InsertObj( pGraf );
-}
-
 // eof

Modified: incubator/ooo/trunk/main/svx/source/svdraw/svdfmtf.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/source/svdraw/svdfmtf.hxx?rev=1220836&r1=1220835&r2=1220836&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/source/svdraw/svdfmtf.hxx (original)
+++ incubator/ooo/trunk/main/svx/source/svdraw/svdfmtf.hxx Mon Dec 19 16:41:21 2011
@@ -136,7 +136,6 @@ protected:
 	void DoAction(MetaISectRectClipRegionAction& rAct) { rAct.Execute(&aVD); }
 	void DoAction(MetaISectRegionClipRegionAction& rAct) { rAct.Execute(&aVD); }
 	void DoAction(MetaCommentAction& rAct, GDIMetaFile* pMtf);
-	void DoAction(MetaRenderGraphicAction& rAct);
 
 	void ImportText( const Point& rPos, const XubString& rStr, const MetaAction& rAct );
 	void SetAttributes(SdrObject* pObj, FASTBOOL bForceTextAttr=sal_False);

Modified: incubator/ooo/trunk/main/svx/source/svdraw/svdobj.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/source/svdraw/svdobj.cxx?rev=1220836&r1=1220835&r2=1220836&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/source/svdraw/svdobj.cxx (original)
+++ incubator/ooo/trunk/main/svx/source/svdraw/svdobj.cxx Mon Dec 19 16:41:21 2011
@@ -1203,7 +1203,7 @@ basegfx::B2DPolyPolygon SdrObject::TakeC
 		    // create extractor, process and get result
 		    drawinglayer::processor2d::ContourExtractor2D aExtractor(aViewInformation2D);
 		    aExtractor.process(xSequence);
-            const std::vector< basegfx::B2DPolyPolygon >& rResult(aExtractor.getExtractedContour());
+            const basegfx::B2DPolyPolygonVector& rResult(aExtractor.getExtractedContour());
             const sal_uInt32 nSize(rResult.size());
 
             // when count is one, it is implied that the object has only it's normal
@@ -2434,7 +2434,7 @@ SdrObject* SdrObject::ImpConvertToContou
 			aExtractor.process(xSequence);
 
 			// #i102241# check for line results
-			const std::vector< basegfx::B2DPolygon >& rHairlineVector = aExtractor.getExtractedHairlines();
+			const basegfx::B2DPolygonVector& rHairlineVector = aExtractor.getExtractedHairlines();
 
 			if(!rHairlineVector.empty())
 			{
@@ -2446,7 +2446,7 @@ SdrObject* SdrObject::ImpConvertToContou
 			}
 
 			// #i102241# check for fill rsults
-			const std::vector< basegfx::B2DPolyPolygon >& rLineFillVector(aExtractor.getExtractedLineFills());
+			const basegfx::B2DPolyPolygonVector& rLineFillVector(aExtractor.getExtractedLineFills());
 
 			if(!rLineFillVector.empty())
 			{



Mime
View raw message