incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r1209140 [10/11] - in /incubator/ooo/branches/alg/svgreplacement/main: ./ basegfx/inc/basegfx/matrix/ basegfx/inc/basegfx/polygon/ basegfx/source/polygon/ cppcanvas/source/mtfrenderer/ drawinglayer/ drawinglayer/inc/drawinglayer/primitive2d...
Date Thu, 01 Dec 2011 16:26:53 GMT
Added: incubator/ooo/branches/alg/svgreplacement/main/svgio/source/svguno/svguno.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/svgio/source/svguno/svguno.cxx?rev=1209140&view=auto
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/svgio/source/svguno/svguno.cxx (added)
+++ incubator/ooo/branches/alg/svgreplacement/main/svgio/source/svguno/svguno.cxx Thu Dec  1 16:25:17 2011
@@ -0,0 +1,95 @@
+/**************************************************************
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_svgio.hxx"
+
+#include <svgio/svgiodllapi.h>
+#include <com/sun/star/uno/Reference.h>
+#include <com/sun/star/uno/RuntimeException.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/lang/XComponent.hpp>
+#include <com/sun/star/registry/XRegistryKey.hpp>
+#include <com/sun/star/lang/XComponent.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/lang/XSingleServiceFactory.hpp>
+#include <uno/environment.h>
+#include <cppuhelper/factory.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+
+using namespace ::com::sun::star;
+
+//////////////////////////////////////////////////////////////////////////////
+// predefines
+
+namespace svgio
+{
+    namespace svgreader
+    {
+        extern uno::Sequence< rtl::OUString > SAL_CALL XSvgParser_getSupportedServiceNames();
+        extern rtl::OUString SAL_CALL XSvgParser_getImplementationName();
+        extern uno::Reference< uno::XInterface > SAL_CALL XSvgParser_createInstance( const uno::Reference< lang::XMultiServiceFactory > & );
+    } // end of namespace svgreader
+} // end of namespace svgio
+
+//////////////////////////////////////////////////////////////////////////////
+// component_getImplementationEnvironment
+
+extern "C" 
+{
+    SVGIO_DLLPUBLIC void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** /* ppEnv */ )
+    {
+        *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
+    }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// component_getFactory
+
+extern "C" 
+{
+    SVGIO_DLLPUBLIC void* SAL_CALL component_getFactory( const sal_Char* pImplName, void* pServiceManager, void* /* pRegistryKey */ )
+    {
+        uno::Reference< lang::XSingleServiceFactory > xFactory;
+        void* pRet = 0;
+
+        if(svgio::svgreader::XSvgParser_getImplementationName().equalsAscii(pImplName))
+        {
+            xFactory = ::cppu::createSingleFactory(
+                reinterpret_cast< lang::XMultiServiceFactory * >(pServiceManager),
+                svgio::svgreader::XSvgParser_getImplementationName(),
+                svgio::svgreader::XSvgParser_createInstance,
+                svgio::svgreader::XSvgParser_getSupportedServiceNames());
+        }
+
+        if(xFactory.is())
+        {
+            xFactory->acquire();
+            pRet = xFactory.get();
+        }
+
+        return pRet;
+    }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// eof

Added: incubator/ooo/branches/alg/svgreplacement/main/svgio/source/svguno/xsvgparser.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/svgio/source/svguno/xsvgparser.cxx?rev=1209140&view=auto
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/svgio/source/svguno/xsvgparser.cxx (added)
+++ incubator/ooo/branches/alg/svgreplacement/main/svgio/source/svguno/xsvgparser.cxx Thu Dec  1 16:25:17 2011
@@ -0,0 +1,198 @@
+/**************************************************************
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_svgio.hxx"
+
+#include <com/sun/star/graphic/XSvgParser.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <cppuhelper/implbase2.hxx>
+#include <svgio/svgreader/svgdocumenthandler.hxx>
+#include <com/sun/star/xml/sax/XParser.hpp>
+#include <com/sun/star/xml/sax/InputSource.hpp>
+#include <comphelper/processfactory.hxx>
+#include <drawinglayer/geometry/viewinformation2d.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+
+using namespace ::com::sun::star;
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace svgio
+{
+    namespace svgreader
+    {
+        class XSvgParser : public ::cppu::WeakAggImplHelper2< graphic::XSvgParser, lang::XServiceInfo >
+        {
+        private:
+            XSvgParser(const XSvgParser&);
+            XSvgParser& operator=(const XSvgParser&);
+
+        protected:
+        public:
+            XSvgParser();
+            virtual ~XSvgParser();
+
+            // XSvgParser
+            virtual uno::Sequence< uno::Reference< ::graphic::XPrimitive2D > > SAL_CALL getDecomposition( 
+                const uno::Reference< ::io::XInputStream >& xSVGStream) throw (uno::RuntimeException);
+
+            // XServiceInfo
+            virtual rtl::OUString SAL_CALL getImplementationName() throw(uno::RuntimeException);
+            virtual ::sal_Bool SAL_CALL supportsService(const rtl::OUString&) throw(uno::RuntimeException);
+            virtual uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames() throw(uno::RuntimeException);
+        };
+	} // end of namespace svgreader
+} // end of namespace svgio
+
+//////////////////////////////////////////////////////////////////////////////
+// uno functions
+
+namespace svgio
+{
+    namespace svgreader
+    {
+        uno::Sequence< rtl::OUString > XSvgParser_getSupportedServiceNames()
+        {
+            static rtl::OUString aServiceName(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.graphic.SvgTools" ) );
+            static uno::Sequence< rtl::OUString > aServiceNames( &aServiceName, 1 );
+
+            return( aServiceNames );
+        }
+
+        rtl::OUString XSvgParser_getImplementationName()
+        {
+            return rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "svgio::svgreader::XSvgParser" ) );
+        }
+
+        uno::Reference< uno::XInterface > SAL_CALL XSvgParser_createInstance(const uno::Reference< lang::XMultiServiceFactory >&)
+        {
+            return static_cast< ::cppu::OWeakObject* >(new XSvgParser);
+        }
+    } // end of namespace svgreader
+} // end of namespace svgio
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace svgio
+{
+    namespace svgreader
+    {
+        XSvgParser::XSvgParser() 
+        {
+        }
+
+        XSvgParser::~XSvgParser()
+        {
+        }
+
+        uno::Sequence< uno::Reference< ::graphic::XPrimitive2D > > XSvgParser::getDecomposition(const uno::Reference< ::io::XInputStream >& xSVGStream) throw (uno::RuntimeException)
+        {
+            drawinglayer::primitive2d::Primitive2DSequence aRetval;
+
+            if(xSVGStream.is())
+            {
+                // local document handler
+                SvgDocHdl* pSvgDocHdl = new SvgDocHdl();
+                uno::Reference< xml::sax::XDocumentHandler > xSvgDocHdl(pSvgDocHdl);
+
+                try
+                {
+                    // prepare ParserInputSrouce
+                    xml::sax::InputSource myInputSource;
+                    myInputSource.aInputStream = xSVGStream;
+                
+                    // get parser
+                    uno::Reference< xml::sax::XParser > xParser(
+                        comphelper::getProcessServiceFactory()->createInstance(
+                            rtl::OUString::createFromAscii("com.sun.star.xml.sax.Parser") ),
+                        uno::UNO_QUERY_THROW );
+                
+                    // connect parser and filter
+                    xParser->setDocumentHandler(xSvgDocHdl);
+                
+                    // finally, parse the stream to a hierarchy of
+                    // SVGGraphicPrimitive2D which will be embedded to the
+                    // primitive sequence. Their decompositions will in the
+                    // end create local low-level primitives, thus SVG will
+                    // be processable from all our processors
+                    xParser->parseStream(myInputSource);
+                }
+                catch(uno::Exception&)
+                {
+                    OSL_ENSURE(false, "Parse error (!)");
+                }
+                
+                // decompose to primitives
+                const SvgNodeVector& rResults = pSvgDocHdl->getSvgDocument().getSvgNodeVector();
+                const sal_uInt32 nCount(rResults.size());
+                drawinglayer::primitive2d::Primitive2DVector aTarget;
+
+                for(sal_uInt32 a(0); a < nCount; a++)
+                {
+                    rResults[a]->decomposeSvgNode(aTarget, false);
+                }
+
+                if(!aTarget.empty())
+                {
+                    // append created primitives
+                    aRetval = drawinglayer::primitive2d::Primitive2DVectorToPrimitive2DSequence(aTarget);
+                }
+            }
+            else
+            {
+                OSL_ENSURE(false, "Invalid stream (!)");
+            }
+
+            return aRetval;
+        }
+
+        rtl::OUString SAL_CALL XSvgParser::getImplementationName() throw(uno::RuntimeException)
+        {
+            return(XSvgParser_getImplementationName());
+        }
+
+        sal_Bool SAL_CALL XSvgParser::supportsService(const rtl::OUString& rServiceName) throw(uno::RuntimeException)
+        {
+            const uno::Sequence< rtl::OUString > aServices(XSvgParser_getSupportedServiceNames());
+
+            for(sal_Int32 nService(0); nService < aServices.getLength(); nService++)
+            {
+                if(rServiceName == aServices[nService])
+                {
+                    return sal_True;
+                }
+            }
+
+            return sal_False;
+        }
+
+        uno::Sequence< rtl::OUString > SAL_CALL XSvgParser::getSupportedServiceNames() throw(uno::RuntimeException)
+        {
+            return XSvgParser_getSupportedServiceNames();
+        }
+
+    } // end of namespace svgreader
+} // end of namespace svgio
+
+//////////////////////////////////////////////////////////////////////////////
+// eof

Added: incubator/ooo/branches/alg/svgreplacement/main/svgio/svgio.component
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/svgio/svgio.component?rev=1209140&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/ooo/branches/alg/svgreplacement/main/svgio/svgio.component
------------------------------------------------------------------------------
    svn:mime-type = application/xml

Modified: incubator/ooo/branches/alg/svgreplacement/main/svtools/inc/svtools/grfmgr.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/svtools/inc/svtools/grfmgr.hxx?rev=1209140&r1=1209139&r2=1209140&view=diff
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/svtools/inc/svtools/grfmgr.hxx (original)
+++ incubator/ooo/branches/alg/svgreplacement/main/svtools/inc/svtools/grfmgr.hxx Thu Dec  1 16:25:17 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/branches/alg/svgreplacement/main/svtools/source/filter/filter.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/svtools/source/filter/filter.cxx?rev=1209140&r1=1209139&r2=1209140&view=diff
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/svtools/source/filter/filter.cxx (original)
+++ incubator/ooo/branches/alg/svgreplacement/main/svtools/source/filter/filter.cxx Thu Dec  1 16:25:17 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,37 @@ 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));
+
+                    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 +1879,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;
 			}
@@ -1976,21 +1999,19 @@ sal_uInt16 GraphicFilter::ExportGraphic(
                 sal_Bool bDone = sal_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/branches/alg/svgreplacement/main/svtools/source/filter/wmf/emfwr.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/svtools/source/filter/wmf/emfwr.cxx?rev=1209140&r1=1209139&r2=1209140&view=diff
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/svtools/source/filter/wmf/emfwr.cxx (original)
+++ incubator/ooo/branches/alg/svgreplacement/main/svtools/source/filter/wmf/emfwr.cxx Thu Dec  1 16:25:17 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/branches/alg/svgreplacement/main/svtools/source/filter/wmf/wmfwr.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/svtools/source/filter/wmf/wmfwr.cxx?rev=1209140&r1=1209139&r2=1209140&view=diff
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/svtools/source/filter/wmf/wmfwr.cxx (original)
+++ incubator/ooo/branches/alg/svgreplacement/main/svtools/source/filter/wmf/wmfwr.cxx Thu Dec  1 16:25:17 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/branches/alg/svgreplacement/main/svtools/source/graphic/grfcache.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/svtools/source/graphic/grfcache.cxx?rev=1209140&r1=1209139&r2=1209140&view=diff
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/svtools/source/graphic/grfcache.cxx (original)
+++ incubator/ooo/branches/alg/svgreplacement/main/svtools/source/graphic/grfcache.cxx Thu Dec  1 16:25:17 2011
@@ -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/branches/alg/svgreplacement/main/svtools/source/graphic/grfmgr.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/svtools/source/graphic/grfmgr.cxx?rev=1209140&r1=1209139&r2=1209140&view=diff
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/svtools/source/graphic/grfmgr.cxx (original)
+++ incubator/ooo/branches/alg/svgreplacement/main/svtools/source/graphic/grfmgr.cxx Thu Dec  1 16:25:17 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/branches/alg/svgreplacement/main/svtools/source/graphic/grfmgr2.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/svtools/source/graphic/grfmgr2.cxx?rev=1209140&r1=1209139&r2=1209140&view=diff
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/svtools/source/graphic/grfmgr2.cxx (original)
+++ incubator/ooo/branches/alg/svgreplacement/main/svtools/source/graphic/grfmgr2.cxx Thu Dec  1 16:25:17 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/branches/alg/svgreplacement/main/svx/inc/svx/svdograf.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/svx/inc/svx/svdograf.hxx?rev=1209140&r1=1209139&r2=1209140&view=diff
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/svx/inc/svx/svdograf.hxx (original)
+++ incubator/ooo/branches/alg/svgreplacement/main/svx/inc/svx/svdograf.hxx Thu Dec  1 16:25:17 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;

Modified: incubator/ooo/branches/alg/svgreplacement/main/svx/inc/svx/svdstr.hrc
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/svx/inc/svx/svdstr.hrc?rev=1209140&r1=1209139&r2=1209140&view=diff
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/svx/inc/svx/svdstr.hrc (original)
+++ incubator/ooo/branches/alg/svgreplacement/main/svx/inc/svx/svdstr.hrc Thu Dec  1 16:25:17 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/branches/alg/svgreplacement/main/svx/inc/svx/unoshprp.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/svx/inc/svx/unoshprp.hxx?rev=1209140&r1=1209139&r2=1209140&view=diff
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/svx/inc/svx/unoshprp.hxx (original)
+++ incubator/ooo/branches/alg/svgreplacement/main/svx/inc/svx/unoshprp.hxx Thu Dec  1 16:25:17 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/branches/alg/svgreplacement/main/svx/source/dialog/_bmpmask.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/svx/source/dialog/_bmpmask.cxx?rev=1209140&r1=1209139&r2=1209140&view=diff
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/svx/source/dialog/_bmpmask.cxx (original)
+++ incubator/ooo/branches/alg/svgreplacement/main/svx/source/dialog/_bmpmask.cxx Thu Dec  1 16:25:17 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/branches/alg/svgreplacement/main/svx/source/sdr/contact/viewcontactofgraphic.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/svx/source/sdr/contact/viewcontactofgraphic.cxx?rev=1209140&r1=1209139&r2=1209140&view=diff
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/svx/source/sdr/contact/viewcontactofgraphic.cxx (original)
+++ incubator/ooo/branches/alg/svgreplacement/main/svx/source/sdr/contact/viewcontactofgraphic.cxx Thu Dec  1 16:25:17 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/branches/alg/svgreplacement/main/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx?rev=1209140&r1=1209139&r2=1209140&view=diff
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx (original)
+++ incubator/ooo/branches/alg/svgreplacement/main/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx Thu Dec  1 16:25:17 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,13 +94,45 @@ namespace drawinglayer
 			// add graphic content
 			if(255L != getGraphicAttr().GetTransparency())
 			{
-				const Primitive2DReference xGraphicContentPrimitive(
-                    new GraphicPrimitive2D(
-                        getTransform(), 
-                        getGraphicObject(), 
-                        getGraphicAttr()));
+                const SvgDataPtr& rSvgDataPtr = getGraphicObject().GetGraphic().getSvgData();
+
+                if(rSvgDataPtr.get())
+                {
+                    // Svg fill, use already decomposed svg directly
+                    const basegfx::B2DRange& rRange(rSvgDataPtr->getRange());
+
+                    if(basegfx::fTools::more(rRange.getWidth(), 0.0) && basegfx::fTools::more(rRange.getHeight(), 0.0))
+                    {
+                        basegfx::B2DHomMatrix aEmbeddingTransform(
+                            basegfx::tools::createTranslateB2DHomMatrix(
+                                -rRange.getMinX(),
+                                -rRange.getMinY()));
+                                    
+                        aEmbeddingTransform.scale(
+                            1.0 / rRange.getWidth(),
+                            1.0 / rRange.getHeight());
+
+                        aEmbeddingTransform = getTransform() * aEmbeddingTransform;
+                                    
+                        const Primitive2DReference xPrimitive(
+                            new TransformPrimitive2D(
+                                aEmbeddingTransform,
+                                rSvgDataPtr->getPrimitive2DSequence()));
+
+                        appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, xPrimitive);
+                    }
+                }
+                else
+                {
+                    // standard graphic fill
+				    const Primitive2DReference xGraphicContentPrimitive(
+                        new GraphicPrimitive2D(
+                            getTransform(), 
+                            getGraphicObject(), 
+                            getGraphicAttr()));
 
-                appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, xGraphicContentPrimitive);
+                    appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, xGraphicContentPrimitive);
+                }
 			}
 
 			// add text
@@ -160,7 +192,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/branches/alg/svgreplacement/main/svx/source/svdraw/svdedtv.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/svx/source/svdraw/svdedtv.cxx?rev=1209140&r1=1209139&r2=1209140&view=diff
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/svx/source/svdraw/svdedtv.cxx (original)
+++ incubator/ooo/branches/alg/svgreplacement/main/svx/source/svdraw/svdedtv.cxx Thu Dec  1 16:25:17 2011
@@ -642,7 +642,7 @@ void SdrEditView::CheckPossibilities()
 
 					if( bGraf &&
                         ((SdrGrafObj*)pObj)->HasGDIMetaFile() &&
-                        !( ((SdrGrafObj*)pObj)->IsEPS() || ((SdrGrafObj*)pObj)->IsRenderGraphic() ) )
+                        !((SdrGrafObj*)pObj)->IsEPS())
                     {
 						bImportMtfPossible = sal_True;
                     }

Modified: incubator/ooo/branches/alg/svgreplacement/main/svx/source/svdraw/svdfmtf.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/svx/source/svdraw/svdfmtf.cxx?rev=1209140&r1=1209139&r2=1209140&view=diff
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/svx/source/svdraw/svdfmtf.cxx (original)
+++ incubator/ooo/branches/alg/svgreplacement/main/svx/source/svdraw/svdfmtf.cxx Thu Dec  1 16:25:17 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/branches/alg/svgreplacement/main/svx/source/svdraw/svdfmtf.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/svx/source/svdraw/svdfmtf.hxx?rev=1209140&r1=1209139&r2=1209140&view=diff
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/svx/source/svdraw/svdfmtf.hxx (original)
+++ incubator/ooo/branches/alg/svgreplacement/main/svx/source/svdraw/svdfmtf.hxx Thu Dec  1 16:25:17 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/branches/alg/svgreplacement/main/svx/source/svdraw/svdobj.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/svx/source/svdraw/svdobj.cxx?rev=1209140&r1=1209139&r2=1209140&view=diff
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/svx/source/svdraw/svdobj.cxx (original)
+++ incubator/ooo/branches/alg/svgreplacement/main/svx/source/svdraw/svdobj.cxx Thu Dec  1 16:25:17 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())
 			{

Modified: incubator/ooo/branches/alg/svgreplacement/main/svx/source/svdraw/svdograf.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/svx/source/svdraw/svdograf.cxx?rev=1209140&r1=1209139&r2=1209140&view=diff
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/svx/source/svdraw/svdograf.cxx (original)
+++ incubator/ooo/branches/alg/svgreplacement/main/svx/source/svdraw/svdograf.cxx Thu Dec  1 16:25:17 2011
@@ -321,6 +321,7 @@ SdrGrafObj::SdrGrafObj()
 	bMirrored		( sal_False )
 {
 	pGraphic = new GraphicObject;
+    mpReplacementGraphic = 0;
 	pGraphic->SetSwapStreamHdl( LINK( this, SdrGrafObj, ImpSwapHdl ), SWAPGRAPHIC_TIMEOUT );
 	
     // #i118485# Shear allowed and possible now
@@ -346,6 +347,7 @@ SdrGrafObj::SdrGrafObj(const Graphic& rG
 	bMirrored		( sal_False )
 {
 	pGraphic = new GraphicObject( rGrf );
+    mpReplacementGraphic = 0;
 	pGraphic->SetSwapStreamHdl( LINK( this, SdrGrafObj, ImpSwapHdl ), SWAPGRAPHIC_TIMEOUT );
 
     // #i118485# Shear allowed and possible now
@@ -371,6 +373,7 @@ SdrGrafObj::SdrGrafObj( const Graphic& r
 	bMirrored		( sal_False )
 {
 	pGraphic = new GraphicObject( rGrf );
+    mpReplacementGraphic = 0;
 	pGraphic->SetSwapStreamHdl( LINK( this, SdrGrafObj, ImpSwapHdl ), SWAPGRAPHIC_TIMEOUT );
 
     // #i118485# Shear allowed and possible now
@@ -393,6 +396,7 @@ SdrGrafObj::SdrGrafObj( const Graphic& r
 SdrGrafObj::~SdrGrafObj()
 {
 	delete pGraphic;
+    delete mpReplacementGraphic;
 	ImpLinkAbmeldung();
 }
 
@@ -401,6 +405,8 @@ SdrGrafObj::~SdrGrafObj()
 void SdrGrafObj::SetGraphicObject( const GraphicObject& rGrfObj )
 {
 	*pGraphic = rGrfObj;
+    delete mpReplacementGraphic;
+    mpReplacementGraphic = 0;
 	pGraphic->SetSwapStreamHdl( LINK( this, SdrGrafObj, ImpSwapHdl ), SWAPGRAPHIC_TIMEOUT );
 	pGraphic->SetUserData();
 	mbIsPreview = sal_False;
@@ -420,11 +426,28 @@ const GraphicObject& SdrGrafObj::GetGrap
 	return *pGraphic;
 }
 
+const GraphicObject* SdrGrafObj::GetReplacementGraphicObject() const
+{
+    if(!mpReplacementGraphic && pGraphic)
+    {
+        const SvgDataPtr& rSvgDataPtr = pGraphic->GetGraphic().getSvgData();
+
+        if(rSvgDataPtr.get())
+        {
+            const_cast< SdrGrafObj* >(this)->mpReplacementGraphic = new GraphicObject(rSvgDataPtr->getReplacement());
+        }
+    }
+
+    return mpReplacementGraphic;
+}
+
 // -----------------------------------------------------------------------------
 
 void SdrGrafObj::NbcSetGraphic( const Graphic& rGrf )
 {
 	pGraphic->SetGraphic( rGrf );
+    delete mpReplacementGraphic;
+    mpReplacementGraphic = 0;
 	pGraphic->SetUserData();
 	mbIsPreview = sal_False;
 }
@@ -503,16 +526,6 @@ sal_Bool SdrGrafObj::IsEPS() const
 	return pGraphic->IsEPS();
 }
 
-sal_Bool SdrGrafObj::IsRenderGraphic() const
-{
-	return pGraphic->IsRenderGraphic();
-}
-
-sal_Bool SdrGrafObj::HasRenderGraphic() const
-{
-	return pGraphic->HasRenderGraphic();
-}
-
 sal_Bool SdrGrafObj::IsSwappedOut() const
 {
 	return mbIsPreview ? sal_True : pGraphic->IsSwappedOut();
@@ -667,7 +680,6 @@ void SdrGrafObj::ReleaseGraphicLink()
 void SdrGrafObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const
 {
 	FASTBOOL bAnim = pGraphic->IsAnimated();
-    FASTBOOL bRenderGraphic = pGraphic->HasRenderGraphic();
 	FASTBOOL bNoPresGrf = ( pGraphic->GetType() != GRAPHIC_NONE ) && !bEmptyPresObj;
 
 	rInfo.bResizeFreeAllowed = aGeo.nDrehWink % 9000 == 0 ||
@@ -675,11 +687,11 @@ void SdrGrafObj::TakeObjInfo(SdrObjTrans
 							   aGeo.nDrehWink % 27000 == 0;
 
 	rInfo.bResizePropAllowed = sal_True;
-	rInfo.bRotateFreeAllowed = bNoPresGrf && !bAnim && !bRenderGraphic;
-	rInfo.bRotate90Allowed = bNoPresGrf && !bAnim && !bRenderGraphic;
-	rInfo.bMirrorFreeAllowed = bNoPresGrf && !bAnim && !bRenderGraphic;
-	rInfo.bMirror45Allowed = bNoPresGrf && !bAnim && !bRenderGraphic;
-	rInfo.bMirror90Allowed = !bEmptyPresObj && !bRenderGraphic;
+	rInfo.bRotateFreeAllowed = bNoPresGrf && !bAnim;
+	rInfo.bRotate90Allowed = bNoPresGrf && !bAnim;
+	rInfo.bMirrorFreeAllowed = bNoPresGrf && !bAnim;
+	rInfo.bMirror45Allowed = bNoPresGrf && !bAnim;
+	rInfo.bMirror90Allowed = !bEmptyPresObj;
 	rInfo.bTransparenceAllowed = sal_False;
 	rInfo.bGradientAllowed = sal_False;
 
@@ -687,10 +699,10 @@ void SdrGrafObj::TakeObjInfo(SdrObjTrans
 	rInfo.bShearAllowed = true;
 
     rInfo.bEdgeRadiusAllowed=sal_False;
-	rInfo.bCanConvToPath = !IsEPS() && !bRenderGraphic;
+	rInfo.bCanConvToPath = !IsEPS();
 	rInfo.bCanConvToPathLineToArea = sal_False;
 	rInfo.bCanConvToPolyLineToArea = sal_False;
-	rInfo.bCanConvToPoly = !IsEPS() && !bRenderGraphic;
+	rInfo.bCanConvToPoly = !IsEPS();
 	rInfo.bCanConvToContour = (rInfo.bCanConvToPoly || LineGeometryUsageIsNecessary());
 }
 
@@ -735,78 +747,102 @@ void SdrGrafObj::ImpSetLinkedGraphic( co
 
 void SdrGrafObj::TakeObjNameSingul(XubString& rName) const
 {
-	switch( pGraphic->GetType() )
-	{
-		case GRAPHIC_BITMAP:
-        {
-            const sal_uInt16 nId = ( ( pGraphic->IsTransparent() || ( (const SdrGrafTransparenceItem&) GetObjectItem( SDRATTR_GRAFTRANSPARENCE ) ).GetValue() ) ?
-                                 ( IsLinkedGraphic() ? STR_ObjNameSingulGRAFBMPTRANSLNK : STR_ObjNameSingulGRAFBMPTRANS ) :
-                                 ( IsLinkedGraphic() ? STR_ObjNameSingulGRAFBMPLNK : STR_ObjNameSingulGRAFBMP ) );
+    if(pGraphic)
+    {
+        const SvgDataPtr& rSvgDataPtr = pGraphic->GetGraphic().getSvgData();
 
-            rName=ImpGetResStr( nId );
+        if(rSvgDataPtr.get())
+        {
+            rName = ImpGetResStr(STR_ObjNameSingulGRAFSVG);
         }
-        break;
+        else
+        {
+	        switch( pGraphic->GetType() )
+	        {
+		        case GRAPHIC_BITMAP:
+                {
+                    const sal_uInt16 nId = ( ( pGraphic->IsTransparent() || ( (const SdrGrafTransparenceItem&) GetObjectItem( SDRATTR_GRAFTRANSPARENCE ) ).GetValue() ) ?
+                                         ( IsLinkedGraphic() ? STR_ObjNameSingulGRAFBMPTRANSLNK : STR_ObjNameSingulGRAFBMPTRANS ) :
+                                         ( IsLinkedGraphic() ? STR_ObjNameSingulGRAFBMPLNK : STR_ObjNameSingulGRAFBMP ) );
 
-		case GRAPHIC_GDIMETAFILE:
-            rName=ImpGetResStr( IsLinkedGraphic() ? STR_ObjNameSingulGRAFMTFLNK : STR_ObjNameSingulGRAFMTF );
-        break;
+                    rName=ImpGetResStr( nId );
+                }
+                break;
 
-        case GRAPHIC_NONE:
-            rName=ImpGetResStr( IsLinkedGraphic() ? STR_ObjNameSingulGRAFNONELNK : STR_ObjNameSingulGRAFNONE );
-        break;
-
-        default:
-            rName=ImpGetResStr(  IsLinkedGraphic() ? STR_ObjNameSingulGRAFLNK : STR_ObjNameSingulGRAF );
-        break;
-	}
+		        case GRAPHIC_GDIMETAFILE:
+                    rName=ImpGetResStr( IsLinkedGraphic() ? STR_ObjNameSingulGRAFMTFLNK : STR_ObjNameSingulGRAFMTF );
+                break;
+
+                case GRAPHIC_NONE:
+                    rName=ImpGetResStr( IsLinkedGraphic() ? STR_ObjNameSingulGRAFNONELNK : STR_ObjNameSingulGRAFNONE );
+                break;
+
+                default:
+                    rName=ImpGetResStr(  IsLinkedGraphic() ? STR_ObjNameSingulGRAFLNK : STR_ObjNameSingulGRAF );
+                break;
+	        }
+        }
 
-	const String aName(GetName());
+	    const String aName(GetName());
 
-	if( aName.Len() )
-	{
-		rName.AppendAscii( " '" );
-		rName += aName;
-		rName += sal_Unicode( '\'' );
-	}
+	    if( aName.Len() )
+	    {
+		    rName.AppendAscii( " '" );
+		    rName += aName;
+		    rName += sal_Unicode( '\'' );
+	    }
+    }
 }
 
 // -----------------------------------------------------------------------------
 
 void SdrGrafObj::TakeObjNamePlural( XubString& rName ) const
 {
-	switch( pGraphic->GetType() )
-	{
-		case GRAPHIC_BITMAP:
-        {
-            const sal_uInt16 nId = ( ( pGraphic->IsTransparent() || ( (const SdrGrafTransparenceItem&) GetObjectItem( SDRATTR_GRAFTRANSPARENCE ) ).GetValue() ) ?
-                                 ( IsLinkedGraphic() ? STR_ObjNamePluralGRAFBMPTRANSLNK : STR_ObjNamePluralGRAFBMPTRANS ) :
-                                 ( IsLinkedGraphic() ? STR_ObjNamePluralGRAFBMPLNK : STR_ObjNamePluralGRAFBMP ) );
+    if(pGraphic)
+    {
+        const SvgDataPtr& rSvgDataPtr = pGraphic->GetGraphic().getSvgData();
 
-            rName=ImpGetResStr( nId );
+        if(rSvgDataPtr.get())
+        {
+            rName = ImpGetResStr(STR_ObjNamePluralGRAFSVG);
         }
-        break;
+        else
+        {
+	        switch( pGraphic->GetType() )
+	        {
+		        case GRAPHIC_BITMAP:
+                {
+                    const sal_uInt16 nId = ( ( pGraphic->IsTransparent() || ( (const SdrGrafTransparenceItem&) GetObjectItem( SDRATTR_GRAFTRANSPARENCE ) ).GetValue() ) ?
+                                         ( IsLinkedGraphic() ? STR_ObjNamePluralGRAFBMPTRANSLNK : STR_ObjNamePluralGRAFBMPTRANS ) :
+                                         ( IsLinkedGraphic() ? STR_ObjNamePluralGRAFBMPLNK : STR_ObjNamePluralGRAFBMP ) );
 
-		case GRAPHIC_GDIMETAFILE:
-            rName=ImpGetResStr( IsLinkedGraphic() ? STR_ObjNamePluralGRAFMTFLNK : STR_ObjNamePluralGRAFMTF );
-        break;
+                    rName=ImpGetResStr( nId );
+                }
+                break;
 
-        case GRAPHIC_NONE:
-            rName=ImpGetResStr( IsLinkedGraphic() ? STR_ObjNamePluralGRAFNONELNK : STR_ObjNamePluralGRAFNONE );
-        break;
-
-        default:
-            rName=ImpGetResStr(  IsLinkedGraphic() ? STR_ObjNamePluralGRAFLNK : STR_ObjNamePluralGRAF );
-        break;
-	}
+		        case GRAPHIC_GDIMETAFILE:
+                    rName=ImpGetResStr( IsLinkedGraphic() ? STR_ObjNamePluralGRAFMTFLNK : STR_ObjNamePluralGRAFMTF );
+                break;
+
+                case GRAPHIC_NONE:
+                    rName=ImpGetResStr( IsLinkedGraphic() ? STR_ObjNamePluralGRAFNONELNK : STR_ObjNamePluralGRAFNONE );
+                break;
+
+                default:
+                    rName=ImpGetResStr(  IsLinkedGraphic() ? STR_ObjNamePluralGRAFLNK : STR_ObjNamePluralGRAF );
+                break;
+	        }
+        }
 
-	const String aName(GetName());
+	    const String aName(GetName());
 
-	if( aName.Len() )
-	{
-		rName.AppendAscii( " '" );
-		rName += aName;
-		rName += sal_Unicode( '\'' );
-	}
+	    if( aName.Len() )
+	    {
+		    rName.AppendAscii( " '" );
+		    rName += aName;
+		    rName += sal_Unicode( '\'' );
+	    }
+    }
 }
 
 // -----------------------------------------------------------------------------
@@ -1343,9 +1379,6 @@ IMPL_LINK( SdrGrafObj, ImpSwapHdl, Graph
                     
 					if(mbInsidePaint && !GetViewContact().HasViewObjectContacts(true))
                     {
-//							Rectangle aSnapRect(GetSnapRect());
-//							const Rectangle aSnapRectPixel(pOutDev->LogicToPixel(aSnapRect));
-
                         pFilterData = new com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >( 3 );
 
                         com::sun::star::awt::Size aPreviewSizeHint( 64, 64 );
@@ -1361,8 +1394,9 @@ IMPL_LINK( SdrGrafObj, ImpSwapHdl, Graph
                         mbIsPreview = sal_True;
                     }
 
-                    if( !GraphicFilter::GetGraphicFilter()->ImportGraphic( aGraphic, String(), *pStream,
-                                                        GRFILTER_FORMAT_DONTKNOW, NULL, 0, pFilterData ) )
+                    if(!GraphicFilter::GetGraphicFilter()->ImportGraphic(
+                        aGraphic, aStreamInfo.maUserData, *pStream,
+                        GRFILTER_FORMAT_DONTKNOW, NULL, 0, pFilterData))
                     {
                         const String aUserData( pGraphic->GetUserData() );
 

Modified: incubator/ooo/branches/alg/svgreplacement/main/svx/source/svdraw/svdstr.src
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/svx/source/svdraw/svdstr.src?rev=1209140&r1=1209139&r2=1209140&view=diff
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/svx/source/svdraw/svdstr.src (original)
+++ incubator/ooo/branches/alg/svgreplacement/main/svx/source/svdraw/svdstr.src Thu Dec  1 16:25:17 2011
@@ -474,7 +474,21 @@ String STR_ObjNamePluralGRAFMACLNK
 {
 	Text [ en-US ] = "Linked Mac graphics" ;
 };
- ////////////////////////////////////////////////////////////////////////////////////////////////////
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// Svg support
+
+String STR_ObjNameSingulGRAFSVG
+{
+	Text [ en-US ] = "SVG" ;
+};
+String STR_ObjNamePluralGRAFSVG
+{
+	Text [ en-US ] = "SVGs" ;
+};
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
 String STR_ObjNameSingulOLE2
 {
 	Text [ en-US ] = "embedded object (OLE)" ;

Modified: incubator/ooo/branches/alg/svgreplacement/main/svx/source/tbxctrls/grafctrl.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/svx/source/tbxctrls/grafctrl.cxx?rev=1209140&r1=1209139&r2=1209140&view=diff
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/svx/source/tbxctrls/grafctrl.cxx (original)
+++ incubator/ooo/branches/alg/svgreplacement/main/svx/source/tbxctrls/grafctrl.cxx Thu Dec  1 16:25:17 2011
@@ -1145,8 +1145,7 @@ void SvxGrafAttrHelper::GetGrafAttrState
 
         if( !pGrafObj ||
             ( pGrafObj->GetGraphicType() == GRAPHIC_NONE ) ||
-            ( pGrafObj->GetGraphicType() == GRAPHIC_DEFAULT  ) ||
-            pGrafObj->HasRenderGraphic() )
+            ( pGrafObj->GetGraphicType() == GRAPHIC_DEFAULT  ))
         {
             bEnableColors = bEnableTransparency = bEnableCrop = false;
             break;

Modified: incubator/ooo/branches/alg/svgreplacement/main/svx/source/unodraw/unoshap2.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/svx/source/unodraw/unoshap2.cxx?rev=1209140&r1=1209139&r2=1209140&view=diff
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/svx/source/unodraw/unoshap2.cxx (original)
+++ incubator/ooo/branches/alg/svgreplacement/main/svx/source/unodraw/unoshap2.cxx Thu Dec  1 16:25:17 2011
@@ -1843,7 +1843,21 @@ bool SvxGraphicObject::getPropertyValueI
 		break;
 	}
 
-	case OWN_ATTR_GRAFSTREAMURL:
+	case OWN_ATTR_REPLACEMENTGRAFURL:
+	{
+		const GraphicObject* pGrafObj = static_cast< SdrGrafObj* >(mpObj.get())->GetReplacementGraphicObject();
+
+        if(pGrafObj)
+        {
+			OUString aURL(RTL_CONSTASCII_USTRINGPARAM(UNO_NAME_GRAPHOBJ_URLPREFIX));
+			aURL += OUString::createFromAscii(pGrafObj->GetUniqueID().GetBuffer());
+			rValue <<= aURL;
+        }
+
+		break;
+	}
+
+    case OWN_ATTR_GRAFSTREAMURL:
 	{
 		const OUString	aStreamURL( ( (SdrGrafObj*) mpObj.get() )->GetGrafStreamURL() );
 		if( aStreamURL.getLength() )

Modified: incubator/ooo/branches/alg/svgreplacement/main/svx/source/xml/xmlgrhlp.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/svx/source/xml/xmlgrhlp.cxx?rev=1209140&r1=1209139&r2=1209140&view=diff
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/svx/source/xml/xmlgrhlp.cxx (original)
+++ incubator/ooo/branches/alg/svgreplacement/main/svx/source/xml/xmlgrhlp.cxx Thu Dec  1 16:25:17 2011
@@ -149,7 +149,7 @@ SvXMLGraphicInputStream::SvXMLGraphicInp
 				{
 					pStm->SetVersion( SOFFICE_FILEFORMAT_8 );
 					pStm->SetCompressMode( COMPRESSMODE_ZBITMAP );
-					( (GDIMetaFile&) aGraphic.GetGDIMetaFile() ).Write( *pStm, GDIMETAFILE_WRITE_REPLACEMENT_RENDERGRAPHIC );
+					( (GDIMetaFile&) aGraphic.GetGDIMetaFile() ).Write( *pStm );
     			    bRet = ( pStm->GetError() == 0 );
 				}
 			}
@@ -645,7 +645,7 @@ sal_Bool SvXMLGraphicHelper::ImplWriteGr
 						pStream->Write( rLink.GetData(), rLink.GetDataSize() );
 					}
 					else
-						rMtf.Write( *pStream, GDIMETAFILE_WRITE_REPLACEMENT_RENDERGRAPHIC );
+						rMtf.Write( *pStream );
 
 					bRet = ( pStream->GetError() == 0 );
 				}

Modified: incubator/ooo/branches/alg/svgreplacement/main/sw/inc/cmdid.h
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/sw/inc/cmdid.h?rev=1209140&r1=1209139&r2=1209140&view=diff
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/sw/inc/cmdid.h (original)
+++ incubator/ooo/branches/alg/svgreplacement/main/sw/inc/cmdid.h Thu Dec  1 16:25:17 2011
@@ -910,6 +910,8 @@ Achtung: Ab sofort sind in diesem File k
 
 #define FN_EMBEDDED_OBJECT                  (FN_EXTRA2 + 116)
 
+#define FN_UNO_REPLACEMENT_GRAPHIC_U_R_L    (FN_EXTRA2 + 117)
+
 /*--------------------------------------------------------------------
 	Bereich: Hilfe
  --------------------------------------------------------------------*/

Modified: incubator/ooo/branches/alg/svgreplacement/main/sw/inc/ndgrf.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/sw/inc/ndgrf.hxx?rev=1209140&r1=1209139&r2=1209140&view=diff
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/sw/inc/ndgrf.hxx (original)
+++ incubator/ooo/branches/alg/svgreplacement/main/sw/inc/ndgrf.hxx Thu Dec  1 16:25:17 2011
@@ -46,6 +46,7 @@ class SW_DLLPUBLIC SwGrfNode: public SwN
 	friend class SwNodes;
 
 	GraphicObject aGrfObj;
+	GraphicObject* mpReplacementGraphic;
     ::sfx2::SvBaseLinkRef refLink;       // falls Grafik nur als Link, dann Pointer gesetzt
 	Size nGrfSize;
 //	String aStrmName;			// SW3: Name des Storage-Streams fuer Embedded
@@ -146,6 +147,7 @@ public:
 	const Graphic& 			GetGrf() const  	{ return aGrfObj.GetGraphic(); }
 	const GraphicObject&	GetGrfObj() const  	{ return aGrfObj; }
 		  GraphicObject&	GetGrfObj() 		{ return aGrfObj; }
+    const GraphicObject* GetReplacementGrfObj() const;
 
     virtual SwCntntNode *SplitCntntNode( const SwPosition & );
 

Modified: incubator/ooo/branches/alg/svgreplacement/main/sw/inc/unoprnms.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/sw/inc/unoprnms.hxx?rev=1209140&r1=1209139&r2=1209140&view=diff
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/sw/inc/unoprnms.hxx (original)
+++ incubator/ooo/branches/alg/svgreplacement/main/sw/inc/unoprnms.hxx Thu Dec  1 16:25:17 2011
@@ -803,7 +803,10 @@ enum SwPropNameIds
 /* 0738 */  UNO_NAME_META,       // #i91565#
 /* 0739 */  UNO_NAME_NESTED_TEXT_CONTENT, // #i109601#
 /* 0740 */  UNO_NAME_EMBEDDED_OBJECT,
-/* 0741 */  SW_PROPNAME_END
+
+/* 0741 */	UNO_NAME_REPLACEMENT_GRAPHIC_URL,
+
+/* 0742 */  SW_PROPNAME_END
 };
 
 

Modified: incubator/ooo/branches/alg/svgreplacement/main/sw/source/core/graphic/ndgrf.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/sw/source/core/graphic/ndgrf.cxx?rev=1209140&r1=1209139&r2=1209140&view=diff
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/sw/source/core/graphic/ndgrf.cxx (original)
+++ incubator/ooo/branches/alg/svgreplacement/main/sw/source/core/graphic/ndgrf.cxx Thu Dec  1 16:25:17 2011
@@ -73,6 +73,8 @@ SwGrfNode::SwGrfNode(
         SwGrfFmtColl *pGrfColl,
         SwAttrSet* pAutoAttr ) :
     SwNoTxtNode( rWhere, ND_GRFNODE, pGrfColl, pAutoAttr ),
+    aGrfObj(),
+    mpReplacementGraphic(0),
     // --> OD 2007-01-23 #i73788#
     mbLinkedInputStreamReady( false ),
     mbIsStreamReadOnly( sal_False )
@@ -90,6 +92,8 @@ SwGrfNode::SwGrfNode( const SwNodeIndex 
 				  		const GraphicObject& rGrfObj,
                       SwGrfFmtColl *pGrfColl, SwAttrSet* pAutoAttr ) :
     SwNoTxtNode( rWhere, ND_GRFNODE, pGrfColl, pAutoAttr ),
+	aGrfObj(rGrfObj),
+    mpReplacementGraphic(0),
     // --> OD 2007-01-23 #i73788#
     mbLinkedInputStreamReady( false ),
     mbIsStreamReadOnly( sal_False )
@@ -113,6 +117,8 @@ SwGrfNode::SwGrfNode( const SwNodeIndex 
                       SwGrfFmtColl *pGrfColl,
                       SwAttrSet* pAutoAttr ) :
     SwNoTxtNode( rWhere, ND_GRFNODE, pGrfColl, pAutoAttr ),
+    aGrfObj(),
+    mpReplacementGraphic(0),
     // --> OD 2007-01-23 #i73788#
     mbLinkedInputStreamReady( false ),
     mbIsStreamReadOnly( sal_False )
@@ -146,6 +152,8 @@ sal_Bool SwGrfNode::ReRead(
     sal_Bool bNewGrf )
 {
 	sal_Bool bReadGrf = sal_False, bSetTwipSize = sal_True;
+    delete mpReplacementGraphic;
+    mpReplacementGraphic = 0;
 
 	ASSERT( pGraphic || pGrfObj || rGrfName.Len(),
 			"GraphicNode without a name, Graphic or GraphicObject" );
@@ -315,6 +323,9 @@ sal_Bool SwGrfNode::ReRead(
 
 SwGrfNode::~SwGrfNode()
 {
+    delete mpReplacementGraphic;
+    mpReplacementGraphic = 0;
+
     // --> OD 2007-03-30 #i73788#
     mpThreadConsumer.reset();
     // <--
@@ -348,6 +359,21 @@ SwGrfNode::~SwGrfNode()
 }
 
 
+const GraphicObject* SwGrfNode::GetReplacementGrfObj() const
+{
+    if(!mpReplacementGraphic)
+    {
+        const SvgDataPtr& rSvgDataPtr = GetGrfObj().GetGraphic().getSvgData();
+
+        if(rSvgDataPtr.get())
+        {
+            const_cast< SwGrfNode* >(this)->mpReplacementGraphic = new GraphicObject(rSvgDataPtr->getReplacement());
+        }
+    }
+
+    return mpReplacementGraphic;
+}
+
 SwCntntNode *SwGrfNode::SplitCntntNode( const SwPosition & )
 {
 	return this;
@@ -394,12 +420,15 @@ Size SwGrfNode::GetTwipSize() const
 sal_Bool SwGrfNode::ImportGraphic( SvStream& rStrm )
 {
 	Graphic aGraphic;
-	if( !GraphicFilter::GetGraphicFilter()->ImportGraphic( aGraphic, String(), rStrm ) )
-	{
-		const String aUserData( aGrfObj.GetUserData() );
-
-		aGrfObj.SetGraphic( aGraphic );
-		aGrfObj.SetUserData( aUserData );
+    const String aURL(aGrfObj.GetUserData());
+	
+    if(!GraphicFilter::GetGraphicFilter()->ImportGraphic(aGraphic, aURL, rStrm))
+	{
+        delete mpReplacementGraphic;
+        mpReplacementGraphic = 0;
+		
+        aGrfObj.SetGraphic( aGraphic );
+		aGrfObj.SetUserData( aURL );
 		return sal_True;
 	}
 
@@ -432,6 +461,9 @@ short SwGrfNode::SwapIn( sal_Bool bWaitF
 			else if( GRAPHIC_DEFAULT == aGrfObj.GetType() )
 			{
 				// keine default Bitmap mehr, also neu Painten!
+                delete mpReplacementGraphic;
+                mpReplacementGraphic = 0;
+
 				aGrfObj.SetGraphic( Graphic() );
 				SwMsgPoolItem aMsgHint( RES_GRAPHIC_PIECE_ARRIVED );
 				ModifyNotification( &aMsgHint, &aMsgHint );
@@ -904,7 +936,8 @@ SwCntntNode* SwGrfNode::MakeCopy( SwDoc*
             SvStream* pStrm = _GetStreamForEmbedGrf( refPics, aStrmName );
             if ( pStrm )
             {
-                GraphicFilter::GetGraphicFilter()->ImportGraphic( aTmpGrf, String(), *pStrm );
+                const String aURL(aGrfObj.GetUserData());
+                GraphicFilter::GetGraphicFilter()->ImportGraphic(aTmpGrf, aURL, *pStrm);
                 delete pStrm;
             }
             // <--

Modified: incubator/ooo/branches/alg/svgreplacement/main/sw/source/core/unocore/unoframe.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/sw/source/core/unocore/unoframe.cxx?rev=1209140&r1=1209139&r2=1209140&view=diff
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/sw/source/core/unocore/unoframe.cxx (original)
+++ incubator/ooo/branches/alg/svgreplacement/main/sw/source/core/unocore/unoframe.cxx Thu Dec  1 16:25:17 2011
@@ -1499,6 +1499,30 @@ uno::Any SwXFrame::getPropertyValue(cons
 			}
 			aAny <<= OUString(sGrfName);
 		}
+        else if( FN_UNO_REPLACEMENT_GRAPHIC_U_R_L == pEntry->nWID)
+        {
+            String sGrfName;
+            const SwNodeIndex* pIdx = pFmt->GetCntnt().GetCntntIdx();
+            
+            if(pIdx)
+            {
+                SwNodeIndex aIdx(*pIdx, 1);
+                SwGrfNode* pGrfNode = aIdx.GetNode().GetGrfNode();
+                if(!pGrfNode)
+                    throw uno::RuntimeException();
+
+                const GraphicObject* pGraphicObject = pGrfNode->GetReplacementGrfObj();
+
+                if(pGraphicObject)
+                {
+                    String sPrefix( RTL_CONSTASCII_STRINGPARAM(sGraphicObjectProtocol) );
+                    String sId( pGraphicObject->GetUniqueID(), RTL_TEXTENCODING_ASCII_US );
+                    (sGrfName = sPrefix) += sId;
+                }
+            }
+
+            aAny <<= OUString(sGrfName);
+        }
         else if( FN_UNO_GRAPHIC_FILTER == pEntry->nWID )
 		{
 			String sFltName;

Modified: incubator/ooo/branches/alg/svgreplacement/main/sw/source/core/unocore/unomap.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/sw/source/core/unocore/unomap.cxx?rev=1209140&r1=1209139&r2=1209140&view=diff
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/sw/source/core/unocore/unomap.cxx (original)
+++ incubator/ooo/branches/alg/svgreplacement/main/sw/source/core/unocore/unomap.cxx Thu Dec  1 16:25:17 2011
@@ -1108,6 +1108,7 @@ const SfxItemPropertyMapEntry* SwUnoProp
 					{ SW_PROP_NMID(UNO_NAME_HORI_MIRRORED_ON_ODD_PAGES), RES_GRFATR_MIRRORGRF,	CPPU_E2T(CPPUTYPE_BOOLEAN), 			PROPERTY_NONE,		MID_MIRROR_HORZ_ODD_PAGES				  },
 					{ SW_PROP_NMID(UNO_NAME_VERT_MIRRORED), RES_GRFATR_MIRRORGRF,   CPPU_E2T(CPPUTYPE_BOOLEAN), 			PROPERTY_NONE,     MID_MIRROR_VERT			  },
                     { SW_PROP_NMID(UNO_NAME_GRAPHIC_URL), FN_UNO_GRAPHIC_U_R_L, CPPU_E2T(CPPUTYPE_OUSTRING), 0, 0 },
+                    { SW_PROP_NMID(UNO_NAME_REPLACEMENT_GRAPHIC_URL), FN_UNO_REPLACEMENT_GRAPHIC_U_R_L, CPPU_E2T(CPPUTYPE_OUSTRING), 0, 0 },
                     { SW_PROP_NMID(UNO_NAME_GRAPHIC_FILTER), FN_UNO_GRAPHIC_FILTER,      CPPU_E2T(CPPUTYPE_OUSTRING), 0, 0 },
                     { SW_PROP_NMID(UNO_NAME_GRAPHIC), FN_UNO_GRAPHIC, CPPU_E2T(CPPUTYPE_REFXGRAPHIC), 0, 0 },
                     { SW_PROP_NMID(UNO_NAME_ACTUAL_SIZE), FN_UNO_ACTUAL_SIZE,    CPPU_E2T(CPPUTYPE_AWTSIZE),  PropertyAttribute::READONLY, CONVERT_TWIPS},

Modified: incubator/ooo/branches/alg/svgreplacement/main/sw/source/core/unocore/unoprnms.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/sw/source/core/unocore/unoprnms.cxx?rev=1209140&r1=1209139&r2=1209140&view=diff
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/sw/source/core/unocore/unoprnms.cxx (original)
+++ incubator/ooo/branches/alg/svgreplacement/main/sw/source/core/unocore/unoprnms.cxx Thu Dec  1 16:25:17 2011
@@ -776,6 +776,7 @@ const SwPropNameTab aPropNameTab = {
 /* 0738 UNO_NAME_META */        {MAP_CHAR_LEN("InContentMetadata")},
 /* 0739 UNO_NAME_NESTED_TEXT_CONTENT */ {MAP_CHAR_LEN("NestedTextContent")},
 /* 0740 UNO_NAME_EMBEDDED_OBJECT */ {MAP_CHAR_LEN("EmbeddedObject")},
+/* 0741 UNO_NAME_REPLACEMENT_GRAPHIC_URL */ {MAP_CHAR_LEN("ReplacementGraphicURL")},
 };
 
 const SwPropNameLen& SwGetPropName( sal_uInt16 nId )

Modified: incubator/ooo/branches/alg/svgreplacement/main/sw/source/ui/shells/grfsh.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/sw/source/ui/shells/grfsh.cxx?rev=1209140&r1=1209139&r2=1209140&view=diff
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/sw/source/ui/shells/grfsh.cxx (original)
+++ incubator/ooo/branches/alg/svgreplacement/main/sw/source/ui/shells/grfsh.cxx Thu Dec  1 16:25:17 2011
@@ -515,13 +515,6 @@ void SwGrfShell::GetAttrState(SfxItemSet
     rSh.GetCurAttr( aCoreSet );
 	sal_Bool bParentCntProt = 0 != rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT );
 	sal_Bool bIsGrfCntnt = CNT_GRF == GetShell().GetCntType();
-//    const GraphicObject* pGrfObj = ( bIsGrfCntnt ? rSh.GetGraphicObj() : NULL );
-//    sal_Bool bIsRenderGraphicGrfCntnt = ( pGrfObj && pGrfObj->IsRenderGraphic() );
-
-    // --> OD 2006-11-03 #i59688#
-//    sal_Bool bSwappedOut = rSh.IsGrfSwapOut( sal_True );
-//    sal_Bool bBitmapType = !bSwappedOut && GRAPHIC_BITMAP == rSh.GetGraphicType();
-    // <--
 
     SetGetStateSet( &rSet );
 

Modified: incubator/ooo/branches/alg/svgreplacement/main/vcl/Library_vcl.mk
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/vcl/Library_vcl.mk?rev=1209140&r1=1209139&r2=1209140&view=diff
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/vcl/Library_vcl.mk (original)
+++ incubator/ooo/branches/alg/svgreplacement/main/vcl/Library_vcl.mk Thu Dec  1 16:25:17 2011
@@ -379,14 +379,12 @@ $(eval $(call gb_Library_add_exception_o
     vcl/source/gdi/print \
     vcl/source/gdi/regband \
     vcl/source/gdi/region \
-    vcl/source/gdi/rendergraphic \
-    vcl/source/gdi/rendergraphicrasterizer \
     vcl/source/gdi/salgdilayout \
     vcl/source/gdi/sallayout \
     vcl/source/gdi/salmisc \
     vcl/source/gdi/salnativewidgets-none \
-    vcl/source/gdi/svgread \
-	vcl/source/gdi/textlayout \
+    vcl/source/gdi/svgdata \
+    vcl/source/gdi/textlayout \
     vcl/source/gdi/virdev \
     vcl/source/gdi/wall \
     vcl/source/helper/canvasbitmap \

Modified: incubator/ooo/branches/alg/svgreplacement/main/vcl/Package_inc.mk
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/vcl/Package_inc.mk?rev=1209140&r1=1209139&r2=1209140&view=diff
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/vcl/Package_inc.mk (original)
+++ incubator/ooo/branches/alg/svgreplacement/main/vcl/Package_inc.mk Thu Dec  1 16:25:17 2011
@@ -119,8 +119,6 @@ $(eval $(call gb_Package_add_file,vcl_in
 $(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/quickselectionengine.hxx,vcl/quickselectionengine.hxx))
 $(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/regband.hxx,vcl/regband.hxx))
 $(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/region.hxx,vcl/region.hxx))
-$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/rendergraphicrasterizer.hxx,vcl/rendergraphicrasterizer.hxx))
-$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/rendergraphic.hxx,vcl/rendergraphic.hxx))
 $(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/salbtype.hxx,vcl/salbtype.hxx))
 $(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/salctype.hxx,vcl/salctype.hxx))
 $(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/salgtype.hxx,vcl/salgtype.hxx))
@@ -141,7 +139,7 @@ $(eval $(call gb_Package_add_file,vcl_in
 $(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/strhelper.hxx,vcl/strhelper.hxx))
 $(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/svapp.hxx,vcl/svapp.hxx))
 $(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/sv.h,vcl/sv.h))
-$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/svgread.hxx,vcl/svgread.hxx))
+$(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/svgdata.hxx,vcl/svgdata.hxx))
 $(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/symbol.hxx,vcl/symbol.hxx))
 $(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/syschild.hxx,vcl/syschild.hxx))
 $(eval $(call gb_Package_add_file,vcl_inc,inc/vcl/sysdata.hxx,vcl/sysdata.hxx))

Modified: incubator/ooo/branches/alg/svgreplacement/main/vcl/inc/impgraph.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/vcl/inc/impgraph.hxx?rev=1209140&r1=1209139&r2=1209140&view=diff
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/vcl/inc/impgraph.hxx (original)
+++ incubator/ooo/branches/alg/svgreplacement/main/vcl/inc/impgraph.hxx Thu Dec  1 16:25:17 2011
@@ -33,8 +33,8 @@
 #include <vcl/bitmapex.hxx>
 #include <vcl/animate.hxx>
 #include <vcl/gdimtf.hxx>
-#include <vcl/rendergraphic.hxx>
 #include <vcl/graph.h>
+#include <vcl/svgdata.hxx>
 
 // ---------------
 // - ImpSwapInfo -
@@ -70,11 +70,14 @@ private:
 	GfxLink*			mpGfxLink;
 	GraphicType			meType;
 	String				maDocFileURLStr;
-	sal_uLong				mnDocFilePos;
-    mutable sal_uLong       mnSizeBytes;
-	sal_uLong				mnRefCount;
-	sal_Bool				mbSwapOut;
-	sal_Bool				mbSwapUnderway;
+	sal_uLong			mnDocFilePos;
+    mutable sal_uLong   mnSizeBytes;
+	sal_uLong			mnRefCount;
+	sal_Bool			mbSwapOut;
+	sal_Bool			mbSwapUnderway;
+
+    // SvgData support
+    SvgDataPtr          maSvgData;
 
 private:
 
@@ -82,11 +85,12 @@ private:
 						ImpGraphic( const ImpGraphic& rImpGraphic );
 						ImpGraphic( const Bitmap& rBmp );
 						ImpGraphic( const BitmapEx& rBmpEx );
+						ImpGraphic(const SvgDataPtr& rSvgDataPtr);
 						ImpGraphic( const Animation& rAnimation );
 						ImpGraphic( const GDIMetaFile& rMtf );
 	virtual				~ImpGraphic();
 
-	ImpGraphic&			operator=( const ImpGraphic& rImpGraphic );
+    ImpGraphic&			operator=( const ImpGraphic& rImpGraphic );
 	sal_Bool				operator==( const ImpGraphic& rImpGraphic ) const;
 	sal_Bool				operator!=( const ImpGraphic& rImpGraphic ) const { return !( *this == rImpGraphic ); }
 
@@ -101,14 +105,11 @@ private:
 	sal_Bool			ImplIsAlpha() const;
 	sal_Bool			ImplIsAnimated() const;
 	sal_Bool			ImplIsEPS() const;
-	sal_Bool			ImplIsRenderGraphic() const;
-	sal_Bool			ImplHasRenderGraphic() const;
 
 	Bitmap				    ImplGetBitmap(const GraphicConversionParameters& rParameters) const;
 	BitmapEx			    ImplGetBitmapEx(const GraphicConversionParameters& rParameters) const;
 	Animation			    ImplGetAnimation() const;
 	const GDIMetaFile&	    ImplGetGDIMetaFile() const;
-    ::vcl::RenderGraphic    ImplGetRenderGraphic() const;
 
 
 	Size				ImplGetPrefSize() const;
@@ -177,6 +178,9 @@ private:
 
 	friend SvStream&	operator<<( SvStream& rOStm, const ImpGraphic& rImpGraphic );
 	friend SvStream&	operator>>( SvStream& rIStm, ImpGraphic& rImpGraphic );
+
+    // SvgData support
+    const SvgDataPtr& getSvgData() const;
 };
 
 #endif // _SV_IMPGRAPH_HXX

Modified: incubator/ooo/branches/alg/svgreplacement/main/vcl/inc/sallayout.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/vcl/inc/sallayout.hxx?rev=1209140&r1=1209139&r2=1209140&view=diff
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/vcl/inc/sallayout.hxx (original)
+++ incubator/ooo/branches/alg/svgreplacement/main/vcl/inc/sallayout.hxx Thu Dec  1 16:25:17 2011
@@ -29,12 +29,8 @@
 #define _SV_SALLAYOUT_HXX
 
 #include <tools/gen.hxx>
-
 #include <vector>
-namespace basegfx {
-	class B2DPolyPolygon;
-	typedef std::vector<B2DPolyPolygon> B2DPolyPolygonVector;
-}
+#include <basegfx/polygon/b2dpolypolygon.hxx>
 
 #ifndef _TOOLS_LANG_HXX
 typedef unsigned short LanguageType;

Modified: incubator/ooo/branches/alg/svgreplacement/main/vcl/inc/vcl/gdimtf.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/vcl/inc/vcl/gdimtf.hxx?rev=1209140&r1=1209139&r2=1209140&view=diff
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/vcl/inc/vcl/gdimtf.hxx (original)
+++ incubator/ooo/branches/alg/svgreplacement/main/vcl/inc/vcl/gdimtf.hxx Thu Dec  1 16:25:17 2011
@@ -64,15 +64,6 @@ class Gradient;
 #define MTF_MIRROR_HORZ				0x00000001UL
 #define MTF_MIRROR_VERT				0x00000002UL
 
-// -----------------------------
-// - Write flags for streaming -
-// -----------------------------
-
-#define GDIMETAFILE_WRITE_DEFAULT                   0x00000000
-#define GDIMETAFILE_WRITE_REPLACEMENT_RENDERGRAPHIC 0x00000001
-
-typedef sal_uInt32 GDIMetaFileWriteFlags;
-
 // ---------
 // - Enums -
 // ---------
@@ -242,7 +233,7 @@ public:
 	// Methoden zum Lesen und Schreiben des neuen Formats;
 	// die Read-Methode kann auch das alte Format lesen
 	SvStream&		Read( SvStream& rIStm );
-	SvStream&		Write( SvStream& rOStm, GDIMetaFileWriteFlags = GDIMETAFILE_WRITE_DEFAULT );
+	SvStream&		Write( SvStream& rOStm );
 
 	// Stream-Operatoren schreiben das alte Format (noch)
 	// und lesen sowohl das alte wie auch das neue Format

Modified: incubator/ooo/branches/alg/svgreplacement/main/vcl/inc/vcl/graph.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/vcl/inc/vcl/graph.hxx?rev=1209140&r1=1209139&r2=1209140&view=diff
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/vcl/inc/vcl/graph.hxx (original)
+++ incubator/ooo/branches/alg/svgreplacement/main/vcl/inc/vcl/graph.hxx Thu Dec  1 16:25:17 2011
@@ -31,10 +31,10 @@
 #include <vcl/bitmapex.hxx>
 #include <vcl/animate.hxx>
 #include <vcl/gdimtf.hxx>
-#include <vcl/rendergraphic.hxx>
 #include <vcl/graph.h>
 #include <vcl/gfxlink.hxx>
 #include <com/sun/star/uno/Reference.hxx>
+#include <vcl/svgdata.hxx>
 
 namespace com { namespace sun { namespace star { namespace graphic { class XGraphic;} } } }
 
@@ -100,6 +100,7 @@ public:
                         Graphic( const Graphic& rGraphic );
                         Graphic( const Bitmap& rBmp );
                         Graphic( const BitmapEx& rBmpEx );
+                        Graphic(const SvgDataPtr& rSvgDataPtr);
                         Graphic( const Animation& rAnimation );
                         Graphic( const GDIMetaFile& rMtf );
 						Graphic( const ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic >& rxGraphic );
@@ -120,8 +121,6 @@ public:
     sal_Bool            IsAlpha() const;
     sal_Bool            IsAnimated() const;
     sal_Bool            IsEPS() const;
-    sal_Bool            IsRenderGraphic() const;
-    sal_Bool            HasRenderGraphic() const;
 
     // #i102089# Access of Bitmap potentially will have to rasterconvert the Graphic
     // if it is a MetaFile. To be able to control this conversion it is necessary to
@@ -133,7 +132,6 @@ public:
 
     Animation               GetAnimation() const;
     const GDIMetaFile&      GetGDIMetaFile() const;
-    ::vcl::RenderGraphic    GetRenderGraphic() const;
 
 	::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > GetXGraphic() const;
 
@@ -217,6 +215,9 @@ public:
     virtual void        Load( SvStream& );
     virtual void        Save( SvStream& );
     virtual void        Assign( const SvDataCopyStream& );
+
+    // SvgData support
+    const SvgDataPtr& getSvgData() const;
 };
 
 #endif  // _SV_GRAPH_HXX

Modified: incubator/ooo/branches/alg/svgreplacement/main/vcl/inc/vcl/metaact.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/vcl/inc/vcl/metaact.hxx?rev=1209140&r1=1209139&r2=1209140&view=diff
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/vcl/inc/vcl/metaact.hxx (original)
+++ incubator/ooo/branches/alg/svgreplacement/main/vcl/inc/vcl/metaact.hxx Thu Dec  1 16:25:17 2011
@@ -38,7 +38,6 @@
 #include <vcl/gdimtf.hxx>
 #include <vcl/gfxlink.hxx>
 #include <vcl/lineinfo.hxx>
-#include <vcl/rendergraphic.hxx>
 
 class SvStream;
 
@@ -99,7 +98,6 @@ class SvStream;
 #define META_LAYOUTMODE_ACTION 				(149)
 #define META_TEXTLANGUAGE_ACTION 			(150)
 #define META_OVERLINECOLOR_ACTION			(151)
-#define META_RENDERGRAPHIC_ACTION			(152)
 
 #define META_COMMENT_ACTION 				(512)
 
@@ -120,11 +118,9 @@ struct ImplMetaReadData
 struct ImplMetaWriteData
 {
 	rtl_TextEncoding        meActualCharSet;
-	GDIMetaFileWriteFlags   mnWriteFlags;
 
                             ImplMetaWriteData() :
-                                meActualCharSet( RTL_TEXTENCODING_ASCII_US ),
-                                mnWriteFlags( GDIMETAFILE_WRITE_DEFAULT )
+                                meActualCharSet( RTL_TEXTENCODING_ASCII_US )
                             {
                             }
 };
@@ -1553,41 +1549,4 @@ public:
     LanguageType		GetTextLanguage() const { return meTextLanguage; }
 };
 
-// ---------------------------
-// - MetaRenderGraphicAction -
-// ---------------------------
-
-class VCL_DLLPUBLIC MetaRenderGraphicAction : public MetaAction
-{
-private:
-
-	::vcl::RenderGraphic        maRenderGraphic;
-	Point                       maPoint;
-	Size                        maSize;
-	double						mfRotateAngle;
-	double						mfShearAngleX;
-	double						mfShearAngleY;
-
-	virtual	sal_Bool            Compare( const MetaAction& ) const;
-
-public:
-                                DECL_META_ACTION( RenderGraphic, META_RENDERGRAPHIC_ACTION )
-
-                                MetaRenderGraphicAction( const Point& rPoint, const Size& rSize,
-                                                         const vcl::RenderGraphic& rRenderData,
-                                                         double fRotateAngle = 0.0,
-                                                         double fShearAngleX = 0.0,
-                                                         double fShearAngleY = 0.0 );
-
-	virtual void                Move( long nHorzMove, long nVertMove );
-	virtual void                Scale( double fScaleX, double fScaleY );
-
-	const ::vcl::RenderGraphic& GetRenderGraphic() const { return maRenderGraphic; }
-	const Point&                GetPoint() const { return maPoint; }
-	const Size&                 GetSize() const { return maSize; }
-	double						GetRotateAngle() const { return mfRotateAngle; }
-	double						GetShearAngleX() const { return mfShearAngleX; }
-	double						GetShearAngleY() const { return mfShearAngleY; }
-};
-
 #endif // _SV_METAACT_HXX



Mime
View raw message