[Libreoffice-commits] core.git: svx/source sw/source

Tor Lillqvist tml at collabora.com
Thu Apr 17 08:40:52 PDT 2014


 svx/source/svdraw/svdobj.cxx            |    4 ++++
 svx/source/unodraw/unopage.cxx          |    6 ++++++
 sw/source/core/uibase/shells/textsh.cxx |    4 ++++
 sw/source/core/uibase/uiview/view.cxx   |    3 ++-
 4 files changed, 16 insertions(+), 1 deletion(-)

New commits:
commit c0b3d5be8fcec28190b1f25c9c0fd99916299249
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu Apr 17 18:39:33 2014 +0300

    Try harder to bypass avmedia on non-desktop for now
    
    Change-Id: I8a45f7436383cb904d375d0f0d86416f3ce56567

diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index eaf24ac..9b82f10 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -17,6 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <config_features.h>
+
 #include "sal/config.h"
 
 #include <com/sun/star/lang/XComponent.hpp>
@@ -3394,7 +3396,9 @@ SdrObject* SdrObjFactory::MakeNewObject(sal_uInt32 nInvent, sal_uInt16 nIdent, S
             case sal_uInt16(OBJ_PAGE       ): pObj=new SdrPageObj;                  break;
             case sal_uInt16(OBJ_UNO        ): pObj=new SdrUnoObj(OUString());       break;
             case sal_uInt16(OBJ_CUSTOMSHAPE  ): pObj=new SdrObjCustomShape();       break;
+#if HAVE_FEATURE_DESKTOP
             case sal_uInt16(OBJ_MEDIA      ): pObj=new SdrMediaObj();               break;
+#endif
             case sal_uInt16(OBJ_TABLE      ): pObj=new ::sdr::table::SdrTableObj(pModel);   break;
             case sal_uInt16(OBJ_OPENGL     ): pObj=new SdrOpenGLObj;                break;
         }
diff --git a/svx/source/unodraw/unopage.cxx b/svx/source/unodraw/unopage.cxx
index 4352206..52c1fc9 100644
--- a/svx/source/unodraw/unopage.cxx
+++ b/svx/source/unodraw/unopage.cxx
@@ -17,6 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <config_features.h>
+
 #include <com/sun/star/document/EventObject.hpp>
 #include <com/sun/star/lang/DisposedException.hpp>
 #include <osl/mutex.hxx>
@@ -536,11 +538,13 @@ void SvxDrawPage::GetTypeAndInventor( sal_uInt16& rType, sal_uInt32& rInventor,
             rInventor = SdrInventor;
             rType = OBJ_TABLE;
         }
+#if HAVE_FEATURE_DESKTOP
         else if ( aName == "com.sun.star.presentation.MediaShape" )
         {
             rInventor = SdrInventor;
             rType = OBJ_MEDIA;
         }
+#endif
     }
     else if(nTempType & E3D_INVENTOR_FLAG)
     {
@@ -732,9 +736,11 @@ SvxShape* SvxDrawPage::CreateShapeByTypeAndInventor( sal_uInt16 nType, sal_uInt3
                 case OBJ_CUSTOMSHAPE:
                     pRet = new SvxCustomShape( pObj );
                     break;
+#if HAVE_FEATURE_DESKTOP
                 case OBJ_MEDIA:
                     pRet = new SvxMediaShape( pObj, referer );
                     break;
+#endif
                 case OBJ_TABLE:
                     pRet = new SvxTableShape( pObj );
                     break;
diff --git a/sw/source/core/uibase/shells/textsh.cxx b/sw/source/core/uibase/shells/textsh.cxx
index 635e21e..8db56d3 100644
--- a/sw/source/core/uibase/shells/textsh.cxx
+++ b/sw/source/core/uibase/shells/textsh.cxx
@@ -17,6 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <config_features.h>
+
 #include <hintids.hxx>
 #include <comphelper/string.hxx>
 #include <svl/globalnameitem.hxx>
@@ -224,6 +226,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
         rReq.Done();
         break;
 
+#if HAVE_FEATURE_DESKTOP
     case SID_INSERT_AVMEDIA:
         rReq.SetReturnValue(SfxBoolItem(nSlot, InsertMediaDlg( rReq )));
         break;
@@ -267,6 +270,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
         }
     }
     break;
+#endif
 
     case SID_INSERT_OBJECT:
     case SID_INSERT_PLUGIN:
diff --git a/sw/source/core/uibase/uiview/view.cxx b/sw/source/core/uibase/uiview/view.cxx
index f9d28d8..a952671 100644
--- a/sw/source/core/uibase/uiview/view.cxx
+++ b/sw/source/core/uibase/uiview/view.cxx
@@ -337,13 +337,14 @@ void SwView::SelectShell()
                 m_pShell = new SwBezierShell( *this );
                 rDispatcher.Push( *m_pShell );
             }
+#if HAVE_FEATURE_DESKTOP
             else if( m_nSelectionType & nsSelectionType::SEL_MEDIA )
             {
                 eShellMode = SHELL_MODE_MEDIA;
                 m_pShell = new SwMediaShell( *this );
                 rDispatcher.Push( *m_pShell );
             }
-
+#endif
             if (m_nSelectionType & nsSelectionType::SEL_EXTRUDED_CUSTOMSHAPE)
             {
                 eShellMode = SHELL_MODE_EXTRUDED_CUSTOMSHAPE;


More information about the Libreoffice-commits mailing list