summaryrefslogtreecommitdiff
path: root/svx/source/svdraw/svdfmtf.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/svdraw/svdfmtf.cxx')
-rw-r--r--svx/source/svdraw/svdfmtf.cxx23
1 files changed, 22 insertions, 1 deletions
diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx
index 884d7b0d79..dbda297e80 100644
--- a/svx/source/svdraw/svdfmtf.cxx
+++ b/svx/source/svdraw/svdfmtf.cxx
@@ -197,7 +197,7 @@ sal_uIntPtr ImpSdrGDIMetaFileImport::DoImport(const GDIMetaFile& rMtf,
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)
@@ -1026,6 +1026,27 @@ void ImpSdrGDIMetaFileImport::DoAction( MetaCommentAction& rAct, GDIMetaFile* pM
}
}
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+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
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */