summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Dominguez <venccsralph@gmail.com>2012-06-28 09:47:41 -0430
committerRafael Dominguez <venccsralph@gmail.com>2012-06-28 09:47:41 -0430
commitfd174268bdea92d966feffbb312c0c3d19de3c5f (patch)
treee4619c6bfc5e1fdf6fe8aa471d5652d864bdff01
parent9295ceb1d3f9ba78881aef62c7059b4ef10177c4 (diff)
Remove avmedia dependency from drawinglayer.
Change-Id: If5c6bacd77783cc58da7fc31043bb9dd5bc4403d
-rw-r--r--drawinglayer/Library_drawinglayer.mk5
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/mediaprimitive2d.hxx6
-rw-r--r--drawinglayer/source/primitive2d/mediaprimitive2d.cxx14
-rw-r--r--svx/source/sdr/contact/viewcontactofsdrmediaobj.cxx4
4 files changed, 16 insertions, 13 deletions
diff --git a/drawinglayer/Library_drawinglayer.mk b/drawinglayer/Library_drawinglayer.mk
index 8995f52ede8d..54f6df81e717 100644
--- a/drawinglayer/Library_drawinglayer.mk
+++ b/drawinglayer/Library_drawinglayer.mk
@@ -34,7 +34,7 @@ $(eval $(call gb_Library_set_include,drawinglayer,\
))
$(eval $(call gb_Library_add_defs,drawinglayer,\
- -DDRAWINGLAYER_DLLIMPLEMENTATION \
+ -DDRAWINGLAYER_DLLIMPLEMENTATION \
))
$(eval $(call gb_Library_use_api,drawinglayer,\
@@ -43,7 +43,6 @@ $(eval $(call gb_Library_use_api,drawinglayer,\
))
$(eval $(call gb_Library_use_libraries,drawinglayer,\
- avmedia \
basegfx \
canvastools \
comphelper \
@@ -158,7 +157,7 @@ $(eval $(call gb_Library_add_exception_objects,drawinglayer,\
drawinglayer/source/processor2d/helperwrongspellrenderer \
drawinglayer/source/processor2d/hittestprocessor2d \
drawinglayer/source/processor2d/linegeometryextractor2d \
- drawinglayer/source/processor2d/processorfromoutputdevice \
+ drawinglayer/source/processor2d/processorfromoutputdevice \
drawinglayer/source/processor2d/textaspolygonextractor2d \
drawinglayer/source/processor2d/vclhelperbitmaprender \
drawinglayer/source/processor2d/vclhelperbitmaptransform \
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/mediaprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/mediaprimitive2d.hxx
index bc9dcb9a495e..a0309334d54b 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/mediaprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/mediaprimitive2d.hxx
@@ -34,6 +34,7 @@
#include <drawinglayer/primitive2d/baseprimitive2d.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/color/bcolor.hxx>
+#include <vcl/graph.hxx>
//////////////////////////////////////////////////////////////////////////////
@@ -65,6 +66,8 @@ namespace drawinglayer
/// discrete border (in 'pixels')
sal_uInt32 mnDiscreteBorder;
+ const Graphic maSnapshot;
+
protected:
/// local decomposition
virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
@@ -75,7 +78,8 @@ namespace drawinglayer
const basegfx::B2DHomMatrix& rTransform,
const rtl::OUString& rURL,
const basegfx::BColor& rBackgroundColor,
- sal_uInt32 nDiscreteBorder);
+ sal_uInt32 nDiscreteBorder,
+ const Graphic &rSnapshot);
/// data read access
const basegfx::B2DHomMatrix& getTransform() const { return maTransform; }
diff --git a/drawinglayer/source/primitive2d/mediaprimitive2d.cxx b/drawinglayer/source/primitive2d/mediaprimitive2d.cxx
index 9c59997347de..68daf6e9c678 100644
--- a/drawinglayer/source/primitive2d/mediaprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/mediaprimitive2d.cxx
@@ -30,7 +30,6 @@
#include <basegfx/polygon/b2dpolygon.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
#include <drawinglayer/primitive2d/polypolygonprimitive2d.hxx>
-#include <avmedia/mediawindow.hxx>
#include <svtools/grfmgr.hxx>
#include <drawinglayer/primitive2d/graphicprimitive2d.hxx>
#include <drawinglayer/geometry/viewinformation2d.hxx>
@@ -57,12 +56,9 @@ namespace drawinglayer
getBackgroundColor()));
xRetval[0] = xRefBackground;
- // try to get graphic snapshot
- const Graphic aGraphic(avmedia::MediaWindow::grabFrame(getURL(), true));
-
- if(GRAPHIC_BITMAP == aGraphic.GetType() || GRAPHIC_GDIMETAFILE == aGraphic.GetType())
+ if(GRAPHIC_BITMAP == maSnapshot.GetType() || GRAPHIC_GDIMETAFILE == maSnapshot.GetType())
{
- const GraphicObject aGraphicObject(aGraphic);
+ const GraphicObject aGraphicObject(maSnapshot);
const GraphicAttr aGraphicAttr;
xRetval.realloc(2);
xRetval[0] = xRefBackground;
@@ -110,12 +106,14 @@ namespace drawinglayer
const basegfx::B2DHomMatrix& rTransform,
const rtl::OUString& rURL,
const basegfx::BColor& rBackgroundColor,
- sal_uInt32 nDiscreteBorder)
+ sal_uInt32 nDiscreteBorder,
+ const Graphic &rSnapshot)
: BufferedDecompositionPrimitive2D(),
maTransform(rTransform),
maURL(rURL),
maBackgroundColor(rBackgroundColor),
- mnDiscreteBorder(nDiscreteBorder)
+ mnDiscreteBorder(nDiscreteBorder),
+ maSnapshot(rSnapshot)
{
}
diff --git a/svx/source/sdr/contact/viewcontactofsdrmediaobj.cxx b/svx/source/sdr/contact/viewcontactofsdrmediaobj.cxx
index 4b6eb2280b69..e1d0950d12a3 100644
--- a/svx/source/sdr/contact/viewcontactofsdrmediaobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrmediaobj.cxx
@@ -31,6 +31,7 @@
#include <svx/svdomedia.hxx>
#include <svx/sdr/contact/viewobjectcontactofsdrmediaobj.hxx>
#include <drawinglayer/primitive2d/mediaprimitive2d.hxx>
+#include <avmedia/mediawindow.hxx>
namespace sdr { namespace contact {
@@ -150,7 +151,8 @@ namespace sdr
const sal_uInt32 nPixelBorder(4L);
const drawinglayer::primitive2d::Primitive2DReference xRetval(
new drawinglayer::primitive2d::MediaPrimitive2D(
- aTransform, rURL, aBackgroundColor, nPixelBorder));
+ aTransform, rURL, aBackgroundColor, nPixelBorder,
+ avmedia::MediaWindow::grabFrame(rURL, true)));
return drawinglayer::primitive2d::Primitive2DSequence(&xRetval, 1);
}