[Libreoffice-commits] .: 3 commits - editeng/inc slideshow/source solenv/gbuild svl/inc svx/inc svx/source

Michael Stahl mst at kemper.freedesktop.org
Mon Dec 12 12:58:02 PST 2011


 editeng/inc/editeng/eeitem.hxx                    |    8 +++++---
 slideshow/source/engine/shapes/viewmediashape.cxx |   18 ++++++++++++++----
 solenv/gbuild/extensions/post_BuildplTargets.mk   |   16 +++++++++++-----
 svl/inc/svl/solar.hrc                             |    2 +-
 svx/inc/svx/unoshprp.hxx                          |    6 +++++-
 svx/source/unodraw/unoprov.cxx                    |    3 ++-
 svx/source/unodraw/unoshap4.cxx                   |    9 +++++++--
 7 files changed, 45 insertions(+), 17 deletions(-)

New commits:
commit 5924454a867bd500fdc696bb9939c84425c5e025
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon Dec 12 19:40:38 2011 +0100

    slideshow: play back embedded media:
    
    The slideshow uses the UNO API to access the drawing objects,
    so add a property to get the temp file URL from the media object.

diff --git a/slideshow/source/engine/shapes/viewmediashape.cxx b/slideshow/source/engine/shapes/viewmediashape.cxx
index ebd4343..5957cf6 100644
--- a/slideshow/source/engine/shapes/viewmediashape.cxx
+++ b/slideshow/source/engine/shapes/viewmediashape.cxx
@@ -286,11 +286,21 @@ namespace slideshow
                         xPropSet.set( mxShape, uno::UNO_QUERY );
 
                         // create Player
-                        if( xPropSet.is() &&
-                            ( xPropSet->getPropertyValue(
-                                  ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MediaURL" ) ) ) >>=aURL ) )
+                        if (xPropSet.is())
                         {
-                            implInitializeMediaPlayer( aURL );
+                            if ((xPropSet->getPropertyValue(
+                                  ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+                                          "PrivateTempFileURL"))) >>= aURL)
+                                && aURL.getLength())
+                            {
+                                implInitializeMediaPlayer( aURL );
+                            }
+                            else if (xPropSet->getPropertyValue(
+                                  ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+                                          "MediaURL"))) >>= aURL)
+                            {
+                                implInitializeMediaPlayer( aURL );
+                            }
                         }
 
                         // create visible object
diff --git a/svl/inc/svl/solar.hrc b/svl/inc/svl/solar.hrc
index 6d13d46..3dc3363 100644
--- a/svl/inc/svl/solar.hrc
+++ b/svl/inc/svl/solar.hrc
@@ -31,7 +31,7 @@
 // defines ------------------------------------------------------------------
 
 #define OWN_ATTR_VALUE_START                    3900
-#define OWN_ATTR_VALUE_END                      3988
+#define OWN_ATTR_VALUE_END                      3990
 
 #define CREATERESMGR_NAME( Name )   #Name
 #define CREATERESMGR( Name )        ResMgr::CreateResMgr( CREATERESMGR_NAME( Name ) )
diff --git a/svx/inc/svx/unoshprp.hxx b/svx/inc/svx/unoshprp.hxx
index 5e4bdf5..6cf3619 100644
--- a/svx/inc/svx/unoshprp.hxx
+++ b/svx/inc/svx/unoshprp.hxx
@@ -187,7 +187,11 @@
 
 #define OWN_ATTR_STYLE                          (OWN_ATTR_VALUE_START+87)
 
-#define OWN_ATTR_EDGE_POLYPOLYGONBEZIER         (OWN_ATTR_VALUE_START+88)   // maximum is OWN_ATTR_VALUE_START+88, see svl/inc/svl/solar.hrc
+#define OWN_ATTR_EDGE_POLYPOLYGONBEZIER         (OWN_ATTR_VALUE_START+88)
+
+#define OWN_ATTR_MEDIA_STREAM                   (OWN_ATTR_VALUE_START+89)
+#define OWN_ATTR_MEDIA_TEMPFILEURL              (OWN_ATTR_VALUE_START+90)
+// ATTENTION: maximum is OWN_ATTR_VALUE_START+90, see svl/inc/svl/solar.hrc
 
 // #FontWork#
 #define FONTWORK_PROPERTIES \
diff --git a/svx/source/unodraw/unoprov.cxx b/svx/source/unodraw/unoprov.cxx
index f800afb..c469672 100644
--- a/svx/source/unodraw/unoprov.cxx
+++ b/svx/source/unodraw/unoprov.cxx
@@ -761,7 +761,8 @@ SfxItemPropertyMapEntry* ImplGetSvxMediaShapePropertyMap()
         // #i68101#
         { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_TITLE),        OWN_ATTR_MISC_OBJ_TITLE         , &::getCppuType((const ::rtl::OUString*)0),    0,  0},
         { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_DESCRIPTION),  OWN_ATTR_MISC_OBJ_DESCRIPTION   , &::getCppuType((const ::rtl::OUString*)0),    0,  0},
-        {MAP_CHAR_LEN("PrivateStream"), OWN_ATTR_GRAPHIC_STREAM, &::com::sun::star::io::XInputStream::static_type(), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
+        {MAP_CHAR_LEN("PrivateStream"), OWN_ATTR_MEDIA_STREAM, &::com::sun::star::io::XInputStream::static_type(), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
+        {MAP_CHAR_LEN("PrivateTempFileURL"), OWN_ATTR_MEDIA_TEMPFILEURL, &::getCppuType((const ::rtl::OUString*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0},
         {0,0,0,0,0,0}
 
     };
diff --git a/svx/source/unodraw/unoshap4.cxx b/svx/source/unodraw/unoshap4.cxx
index c4c7e68..ad517c2 100644
--- a/svx/source/unodraw/unoshap4.cxx
+++ b/svx/source/unodraw/unoshap4.cxx
@@ -955,7 +955,8 @@ bool SvxMediaShape::getPropertyValueImpl( const ::rtl::OUString& rName, const Sf
 {
     if (   ((pProperty->nWID >= OWN_ATTR_MEDIA_URL) &&
             (pProperty->nWID <= OWN_ATTR_MEDIA_ZOOM))
-        || (pProperty->nWID == OWN_ATTR_GRAPHIC_STREAM))
+        || (pProperty->nWID == OWN_ATTR_MEDIA_STREAM)
+        || (pProperty->nWID == OWN_ATTR_MEDIA_TEMPFILEURL))
     {
         SdrMediaObj* pMedia = static_cast< SdrMediaObj* >( mpObj.get() );
         const ::avmedia::MediaItem aItem( pMedia->getMediaProperties() );
@@ -982,10 +983,14 @@ bool SvxMediaShape::getPropertyValueImpl( const ::rtl::OUString& rName, const Sf
                 rValue <<= aItem.getZoom();
                 break;
 
-            case OWN_ATTR_GRAPHIC_STREAM:
+            case OWN_ATTR_MEDIA_STREAM:
                 rValue <<= pMedia->GetInputStream();
                 break;
 
+            case OWN_ATTR_MEDIA_TEMPFILEURL:
+                rValue <<= aItem.getTempURL();
+                break;
+
             default:
                 OSL_FAIL("SvxMediaShape::getPropertyValueImpl(), unknown property!");
         }
commit 41927a4f2fe824dd1588c4ed0e14de0f2220c039
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon Dec 12 17:40:28 2011 +0100

    editeng: EE_ITEMS_START:
    
    This evidently depends on the values of OWN_ATTR_VALUE_START and
    OWN_ATTR_VALUE_END, so define it that way.

diff --git a/editeng/inc/editeng/eeitem.hxx b/editeng/inc/editeng/eeitem.hxx
index 085ffb2..27cca13 100644
--- a/editeng/inc/editeng/eeitem.hxx
+++ b/editeng/inc/editeng/eeitem.hxx
@@ -26,10 +26,12 @@
  *
  ************************************************************************/
 
-#ifndef _EEITEM_HXX
-#define _EEITEM_HXX
+#ifndef EEITEM_HXX
+#define EEITEM_HXX
 
-#define EE_ITEMS_START              3989
+#include <svl/solar.hrc>
+
+#define EE_ITEMS_START              (OWN_ATTR_VALUE_END+1)
 
 // Paragraph attributes:
 #define EE_PARA_START               (EE_ITEMS_START+0)
commit 8bd011b527dbe77456c4822c57e0c6a1c1b93cfd
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon Dec 12 17:27:30 2011 +0100

    gbuild: fix top-level "make check":
    
    This should first build, then run smoketest, then run subsequenttests.

diff --git a/solenv/gbuild/extensions/post_BuildplTargets.mk b/solenv/gbuild/extensions/post_BuildplTargets.mk
index cd98688..b2e650d 100644
--- a/solenv/gbuild/extensions/post_BuildplTargets.mk
+++ b/solenv/gbuild/extensions/post_BuildplTargets.mk
@@ -36,7 +36,7 @@ ifeq ($(gb_SourceEnvAndRecurse_STAGE),buildpl)
 
 all: build
 	@true
-        
+
 # fake targets -- whatever is requested from gbuild requires a full build before (dev-install for JunitTests)
 $(call gb_Package_get_target,%): build
 	@true
@@ -61,7 +61,7 @@ $(call gb_Pyuno_get_target,%): build
 
 $(call gb_WinResTarget_get_target,%): build
 	@true
- 
+
 $(call gb_CppunitTest_get_target,%): build
 	@true
 
@@ -104,8 +104,14 @@ define gb_BuildplTarget_command
 cd $(SRCDIR)/$(1) && unset MAKEFLAGS && export gb_SourceEnvAndRecurse_STAGE=gbuild && $(SOLARENV)/bin/build.pl $(if $(findstring s,$(MAKEFLAGS)),,VERBOSE=T) -P$(BUILD_NCPUS) $(2) -- -P$(GMAKE_PARALLELISM) gb_MAKETARGET=$(gb_MAKETARGET)
 endef
 
-dev-install: $(WORKDIR)/bootstrap  $(SRCDIR)/src.downloaded $(if $(filter $(INPATH),$(INPATH_FOR_BUILD)),,cross_toolset) | $(filter build,$(MAKECMDGOALS))
-	$(call gb_BuildplTarget_command,smoketestoo_native,--from instsetoo_native)
+# the build order dependencies are rather ugly...
+dev-install: \
+			$(WORKDIR)/bootstrap \
+			$(SRCDIR)/src.downloaded \
+			$(if $(filter $(INPATH),$(INPATH_FOR_BUILD)),,cross_toolset) \
+		|   $(filter build,$(MAKECMDGOALS)) \
+			$(if $(filter check,$(MAKECMDGOALS)),build)
+	$(call gb_BuildplTarget_command,smoketestoo_native,)
 
 build: $(WORKDIR)/bootstrap $(SRCDIR)/src.downloaded $(if $(filter $(INPATH),$(INPATH_FOR_BUILD)),,cross_toolset)
 	$(call gb_BuildplTarget_command,instsetoo_native,--all)
@@ -150,7 +156,7 @@ debugrun:
 	@true
 
 endif # gb_SourceEnvAndRecurse_STAGE=buildpl
-    
+
 ifeq ($(gb_SourceEnvAndRecurse_STAGE),gbuild)
 
 clean: clean-host clean-build


More information about the Libreoffice-commits mailing list