sw: Use primitive renderer for graphics

To allow using the prepared VectorData of imported
Metafiles (and EMF+), let Writer use a Primitive
Renderer for Graphic output. For now, use a temp
PrimitiveRenderer (until sw is fully adapted to
primitives).

Change-Id: Iaa39111c5ef35a052394be6e4d1b86a5a8e33068
Reviewed-on: https://gerrit.libreoffice.org/41411
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx
index 5baaef5..c2c4cfa 100644
--- a/sw/source/core/doc/notxtfrm.cxx
+++ b/sw/source/core/doc/notxtfrm.cxx
@@ -1027,23 +1027,45 @@ void SwNoTextFrame::PaintPicture( vcl::RenderContext* pOut, const SwRect &rGrfAr

        if(!bDone && pOLENd)
        {
            Point aPosition(aAlignedGrfArea.Pos());
            Size aSize(aAlignedGrfArea.SSize());

            // SwOLENode does not have a known GraphicObject, need to
            // work with Graphic instead
            const Graphic* pGraphic = pOLENd->GetGraphic();

            if ( pGraphic && pGraphic->GetType() != GraphicType::NONE )
            {
                pGraphic->Draw( pOut, aPosition, aSize );
                GraphicObject aTempGraphicObject(*pGraphic);
                GraphicAttr aGrfAttr;

                paintGraphicUsingPrimitivesHelper(
                    *pOut,
                    aTempGraphicObject,
                    aGrfAttr,
                    aAlignedGrfArea);

                // shade the representation if the object is activated outplace
                uno::Reference < embed::XEmbeddedObject > xObj = pOLENd->GetOLEObj().GetOleRef();
                if ( xObj.is() && xObj->getCurrentState() == embed::EmbedStates::ACTIVE )
                {
                    ::svt::EmbeddedObjectRef::DrawShading( tools::Rectangle( aPosition, aSize ), pOut );
                    const Point aPosition(aAlignedGrfArea.Pos());
                    const Size aSize(aAlignedGrfArea.SSize());

                    ::svt::EmbeddedObjectRef::DrawShading(
                        tools::Rectangle(
                            aPosition,
                            aSize),
                        pOut);
                }
            }
            else
                ::svt::EmbeddedObjectRef::DrawPaintReplacement( tools::Rectangle( aPosition, aSize ), pOLENd->GetOLEObj().GetCurrentPersistName(), pOut );
            {
                const Point aPosition(aAlignedGrfArea.Pos());
                const Size aSize(aAlignedGrfArea.SSize());

                ::svt::EmbeddedObjectRef::DrawPaintReplacement(
                    tools::Rectangle(aPosition, aSize),
                    pOLENd->GetOLEObj().GetCurrentPersistName(),
                    pOut);
            }

            sal_Int64 nMiscStatus = pOLENd->GetOLEObj().GetOleRef()->getStatus( pOLENd->GetAspect() );
            if ( !bPrn && dynamic_cast< const SwCursorShell *>( pShell ) !=  nullptr && (