[Libreoffice-commits] .: Branch 'feature/template-dialog' - 3 commits - drawinglayer/inc drawinglayer/Library_drawinglayer.mk drawinglayer/source sfx2/source svx/source

Rafael Dominguez rdominguez at kemper.freedesktop.org
Thu Jun 28 07:16:53 PDT 2012


 drawinglayer/Library_drawinglayer.mk                           |    5 +--
 drawinglayer/inc/drawinglayer/primitive2d/mediaprimitive2d.hxx |    6 +++-
 drawinglayer/source/primitive2d/mediaprimitive2d.cxx           |   14 ++++------
 sfx2/source/control/templateview.cxx                           |    1 
 sfx2/source/control/thumbnailview.cxx                          |    2 -
 svx/source/sdr/contact/viewcontactofsdrmediaobj.cxx            |    4 ++
 6 files changed, 18 insertions(+), 14 deletions(-)

New commits:
commit fd174268bdea92d966feffbb312c0c3d19de3c5f
Author: Rafael Dominguez <venccsralph at gmail.com>
Date:   Thu Jun 28 09:47:41 2012 -0430

    Remove avmedia dependency from drawinglayer.
    
    Change-Id: If5c6bacd77783cc58da7fc31043bb9dd5bc4403d

diff --git a/drawinglayer/Library_drawinglayer.mk b/drawinglayer/Library_drawinglayer.mk
index 8995f52..54f6df8 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 bc9dcb9..a030933 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 9c59997..68daf6e 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 4b6eb22..e1d0950 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);
         }
commit 9295ceb1d3f9ba78881aef62c7059b4ef10177c4
Author: Rafael Dominguez <venccsralph at gmail.com>
Date:   Tue Jun 26 16:47:19 2012 -0430

    Change toolbar buttons when selecting an item through checkbox.
    
    Change-Id: I1f0828b4b93fb13e01d7609726a9a7ec34ae8aaa

diff --git a/sfx2/source/control/templateview.cxx b/sfx2/source/control/templateview.cxx
index eb81867..961029e 100644
--- a/sfx2/source/control/templateview.cxx
+++ b/sfx2/source/control/templateview.cxx
@@ -119,6 +119,7 @@ void TemplateView::InsertItems (const std::vector<TemplateViewItem*> &rTemplates
         pItem->setPath(pCur->getPath());
         pItem->setFileType(pCur->getFileType());
         pItem->maPreview1 = pCur->maPreview1;
+        pItem->setSelectClickHdl(LINK(this,ThumbnailView,OnFolderSelected));
 
         mItemList.push_back(pItem);
     }
diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx
index f4fb699..fd0d412 100644
--- a/sfx2/source/control/thumbnailview.cxx
+++ b/sfx2/source/control/thumbnailview.cxx
@@ -628,6 +628,7 @@ void ThumbnailView::ImplEndTracking( const Point& rPos, bool bCancel )
 
 IMPL_LINK (ThumbnailView, OnFolderSelected, ThumbnailViewItem*, pItem)
 {
+    maItemStateHdl.Call(pItem);
     return 0;
 }
 
commit af4c2d3ff25418fbc4659f88c5fd2f39103f534e
Author: Rafael Dominguez <venccsralph at gmail.com>
Date:   Mon Jun 25 21:46:31 2012 -0430

    Remove unneeded call to DrawItem.
    
    Change-Id: Idb36498006715d945ed6b02f8935fc72a90145cd

diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx
index 0ede266..f4fb699 100644
--- a/sfx2/source/control/thumbnailview.cxx
+++ b/sfx2/source/control/thumbnailview.cxx
@@ -628,7 +628,6 @@ void ThumbnailView::ImplEndTracking( const Point& rPos, bool bCancel )
 
 IMPL_LINK (ThumbnailView, OnFolderSelected, ThumbnailViewItem*, pItem)
 {
-    DrawItem(pItem);
     return 0;
 }
 


More information about the Libreoffice-commits mailing list