[Libreoffice-commits] core.git: 5 commits - basic/Library_sb.mk ios/CustomTarget_iOS_prelink.mk svx/source sw/source vcl/source

jan Iversen jani at libreoffice.org
Sun Jan 7 13:20:39 UTC 2018


 basic/Library_sb.mk                 |    2 +-
 ios/CustomTarget_iOS_prelink.mk     |   30 +++++++++++++++++++++++++++---
 svx/source/svdraw/svdomedia.cxx     |   10 ++++++++++
 svx/source/unodraw/unoshap4.cxx     |   30 ++++++++++++++++++++++++++++++
 sw/source/uibase/app/swmodule.cxx   |    2 ++
 vcl/source/opengl/OpenGLContext.cxx |    4 ++++
 6 files changed, 74 insertions(+), 4 deletions(-)

New commits:
commit 54cd9ab0e1051f78a5d23bfbeeaf400abfccafcc
Author: jan Iversen <jani at libreoffice.org>
Date:   Sun Jan 7 14:17:00 2018 +0100

    iOS, first step towards use of .dylib
    
    .dylib will shorten the swift link time with factors.
    
    Change-Id: Icfbc649f058988580005fe66eb8c03d7b242fe2d

diff --git a/ios/CustomTarget_iOS_prelink.mk b/ios/CustomTarget_iOS_prelink.mk
index 1d1e54f703a2..4ced2da31977 100644
--- a/ios/CustomTarget_iOS_prelink.mk
+++ b/ios/CustomTarget_iOS_prelink.mk
@@ -1,4 +1,4 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#  -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
 #
 # This file is part of the LibreOffice project.
 #
@@ -10,7 +10,7 @@ IOSLD = /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoo
 IOSOBJ = $(WORKDIR)/CObject/ios/Kit.o
 
 ifeq ($(ENABLE_DEBUG),TRUE)
-IOSKIT = $(SRCDIR)/ios/generated/libKit_$(CPUNAME)_debug.a
+IOSKIT = $(SRCDIR)/ios/generated/libKit_$(CPUNAME)_debug.dylib
 else
 IOSKIT = $(SRCDIR)/ios/generated/libKit_$(CPUNAME).a
 endif
@@ -28,7 +28,30 @@ $(call gb_CustomTarget_get_target,ios/iOS_prelink): $(IOSKIT)
 .PHONY: FORCE
 FORCE:
 
-$(IOSKIT): $(call gb_StaticLibrary_get_target,iOS_kitBridge) FORCE
+
+$(IOSKIT): $(IOSOBJ)
+	$(SRCDIR)/bin/lo-all-static-libs > $(SRCDIR)/ios/generated/lib.list
+ifeq ($(ENABLE_DEBUG),TRUE)
+	$(IOSLD) -dylib -ios_version_min $(IOS_DEPLOYMENT_VERSION) \
+	    -syslibroot $(MACOSX_SDK_PATH) \
+	    -arch `echo $(CPUNAME) |  tr '[:upper:]' '[:lower:]'` \
+	    -framework CoreFoundation \
+	    -framework CoreGraphics \
+	    -framework CoreText \
+	    -lc++ \
+	    -lobjc \
+	    -lz \
+	    -liconv \
+	    -lpthread \
+	    -objc_abi_version 2 \
+	    -rpath  @executable_path/Frameworks \
+	    -rpath  @loader_path/Frameworks \
+	    -export_dynamic \
+	    -no_deduplicate \
+	    $(WORKDIR)/CObject/ios/source/LibreOfficeKit.o \
+	    `$(SRCDIR)/bin/lo-all-static-libs` \
+	    -o $(IOSKIT)
+else
 	$(IOSLD) -r -ios_version_min 11.2 \
 	    -syslibroot $(MACOSX_SDK_PATH) \
 	    -arch `echo $(CPUNAME) |  tr '[:upper:]' '[:lower:]'` \
@@ -36,6 +59,7 @@ $(IOSKIT): $(call gb_StaticLibrary_get_target,iOS_kitBridge) FORCE
 	    $(WORKDIR)/CObject/ios/source/LibreOfficeKit.o \
 	    `$(SRCDIR)/bin/lo-all-static-libs`
 	$(AR) -r $(IOSKIT) $(IOSOBJ)
+endif
 
 
 
commit 1807d095b48889ce2b3a88d807124e51a38c73c2
Author: jan Iversen <jani at libreoffice.org>
Date:   Sun Jan 7 14:16:06 2018 +0100

    vcl, added checks for HAVE_FEATURE_OPENGL
    
    missing HAVE_FEATURE_OPENGL caused link errors
    
    Change-Id: I1c44f9c9f729f351b6acf17ae60cd855b69394db

diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx
index 958c59925db2..886c8fbe80d3 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -32,6 +32,8 @@
 
 #include <opengl/RenderState.hxx>
 
+#include <config_features.h>
+
 using namespace com::sun::star;
 
 #define MAX_FRAMEBUFFER_COUNT 30
@@ -505,8 +507,10 @@ rtl::Reference<OpenGLContext> OpenGLContext::getVCLContext(bool bMakeIfNecessary
     if (pDefWindow)
     {
         // create our magic fallback window context.
+#if HAVE_FEATURE_OPENGL
         xContext = pDefWindow->GetGraphics()->GetOpenGLContext();
         assert(xContext.is());
+#endif
     }
     else
         xContext = pContext;
commit 54982d5fea21d9e81e1561a74fd341ddb0570c91
Author: jan Iversen <jani at libreoffice.org>
Date:   Sun Jan 7 13:16:25 2018 +0100

    svx, check HAVE_FEATURE_AVMEDIA
    
    unoshap4.cxx did not obey HAVE_FEATURE_AVMEDIA.
    
    Change-Id: Id41cddd0a74c43819adc0b64c0dd84ae9d4f54ed

diff --git a/svx/source/svdraw/svdomedia.cxx b/svx/source/svdraw/svdomedia.cxx
index 974cf3b56300..bece1c68cece 100644
--- a/svx/source/svdraw/svdomedia.cxx
+++ b/svx/source/svdraw/svdomedia.cxx
@@ -308,8 +308,10 @@ void SdrMediaObj::SetInputStream(uno::Reference<io::XInputStream> const& xStream
     if (bSuccess)
     {
         m_xImpl->m_pTempFile.reset(new MediaTempFile(tempFileURL));
+#if HAVE_FEATURE_AVMEDIA
         m_xImpl->m_MediaProperties.setURL(
             m_xImpl->m_LastFailedPkgURL, tempFileURL, "");
+#endif
     }
     m_xImpl->m_LastFailedPkgURL.clear(); // once only
 }
@@ -378,12 +380,16 @@ void SdrMediaObj::mediaPropertiesChanged( const ::avmedia::MediaItem& rNewProper
                 {
                     m_xImpl->m_pTempFile.reset(
                             new MediaTempFile(tempFileURL));
+#if HAVE_FEATURE_AVMEDIA
                     m_xImpl->m_MediaProperties.setURL(url, tempFileURL, "");
+#endif
                 }
                 else // this case is for Clone via operator=
                 {
                     m_xImpl->m_pTempFile.reset();
+#if HAVE_FEATURE_AVMEDIA
                     m_xImpl->m_MediaProperties.setURL("", "", "");
+#endif
                     // UGLY: oox import also gets here, because unlike ODF
                     // getDocumentStorage() is not the imported file...
                     m_xImpl->m_LastFailedPkgURL = url;
@@ -391,14 +397,18 @@ void SdrMediaObj::mediaPropertiesChanged( const ::avmedia::MediaItem& rNewProper
             }
             else
             {
+#if HAVE_FEATURE_AVMEDIA
                 m_xImpl->m_MediaProperties.setURL(url,
                         rNewProperties.getTempURL(), "");
+#endif
             }
         }
         else
         {
             m_xImpl->m_pTempFile.reset();
+#if HAVE_FEATURE_AVMEDIA
             m_xImpl->m_MediaProperties.setURL(url, "", rNewProperties.getReferer());
+#endif
         }
         bBroadcastChanged = true;
     }
diff --git a/svx/source/unodraw/unoshap4.cxx b/svx/source/unodraw/unoshap4.cxx
index 080a2cb154c9..5a0de83053eb 100644
--- a/svx/source/unodraw/unoshap4.cxx
+++ b/svx/source/unodraw/unoshap4.cxx
@@ -54,6 +54,8 @@
 #include <vcl/wmf.hxx>
 #include <svtools/embedhlp.hxx>
 
+#include <config_features.h>
+
 
 using namespace ::cppu;
 using namespace ::com::sun::star;
@@ -797,6 +799,7 @@ bool SvxMediaShape::setPropertyValueImpl( const OUString& rName, const SfxItemPr
         switch( pProperty->nWID )
         {
         case OWN_ATTR_MEDIA_URL:
+#if HAVE_FEATURE_AVMEDIA
         {
             OUString aURL;
             if( rValue >>= aURL )
@@ -805,9 +808,11 @@ bool SvxMediaShape::setPropertyValueImpl( const OUString& rName, const SfxItemPr
                 aItem.setURL( aURL, "", referer_ );
             }
         }
+#endif
         break;
 
         case OWN_ATTR_MEDIA_LOOP:
+#if HAVE_FEATURE_AVMEDIA
         {
             bool bLoop;
 
@@ -817,9 +822,11 @@ bool SvxMediaShape::setPropertyValueImpl( const OUString& rName, const SfxItemPr
                 aItem.setLoop( bLoop );
             }
         }
+#endif
         break;
 
         case OWN_ATTR_MEDIA_MUTE:
+#if HAVE_FEATURE_AVMEDIA
         {
             bool bMute;
 
@@ -829,9 +836,11 @@ bool SvxMediaShape::setPropertyValueImpl( const OUString& rName, const SfxItemPr
                 aItem.setMute( bMute );
             }
         }
+#endif
         break;
 
         case OWN_ATTR_MEDIA_VOLUMEDB:
+#if HAVE_FEATURE_AVMEDIA
         {
             sal_Int16 nVolumeDB = sal_Int16();
 
@@ -841,9 +850,11 @@ bool SvxMediaShape::setPropertyValueImpl( const OUString& rName, const SfxItemPr
                 aItem.setVolumeDB( nVolumeDB );
             }
         }
+#endif
         break;
 
         case OWN_ATTR_MEDIA_ZOOM:
+#if HAVE_FEATURE_AVMEDIA
         {
             css::media::ZoomLevel eLevel;
 
@@ -853,9 +864,11 @@ bool SvxMediaShape::setPropertyValueImpl( const OUString& rName, const SfxItemPr
                 aItem.setZoom( eLevel );
             }
         }
+#endif
         break;
 
         case OWN_ATTR_MEDIA_MIMETYPE:
+#if HAVE_FEATURE_AVMEDIA
         {
             OUString sMimeType;
             if( rValue >>= sMimeType )
@@ -864,9 +877,11 @@ bool SvxMediaShape::setPropertyValueImpl( const OUString& rName, const SfxItemPr
                 aItem.setMimeType( sMimeType );
             }
         }
+#endif
         break;
 
         case OWN_ATTR_MEDIA_STREAM:
+#if HAVE_FEATURE_AVMEDIA
             try
             {
                 uno::Reference<io::XInputStream> xStream;
@@ -889,6 +904,7 @@ bool SvxMediaShape::setPropertyValueImpl( const OUString& rName, const SfxItemPr
                         static_cast<OWeakObject *>(this),
                         makeAny(e));
             }
+#endif
         break;
 
         default:
@@ -925,23 +941,33 @@ bool SvxMediaShape::getPropertyValueImpl( const OUString& rName, const SfxItemPr
         switch( pProperty->nWID )
         {
             case OWN_ATTR_MEDIA_URL:
+#if HAVE_FEATURE_AVMEDIA
                 rValue <<= aItem.getURL();
+#endif
                 break;
 
             case OWN_ATTR_MEDIA_LOOP:
+#if HAVE_FEATURE_AVMEDIA
                 rValue <<= aItem.isLoop();
+#endif
                 break;
 
             case OWN_ATTR_MEDIA_MUTE:
+#if HAVE_FEATURE_AVMEDIA
                 rValue <<= aItem.isMute();
+#endif
                 break;
 
             case OWN_ATTR_MEDIA_VOLUMEDB:
+#if HAVE_FEATURE_AVMEDIA
                 rValue <<= aItem.getVolumeDB();
+#endif
                 break;
 
             case OWN_ATTR_MEDIA_ZOOM:
+#if HAVE_FEATURE_AVMEDIA
                 rValue <<= aItem.getZoom();
+#endif
                 break;
 
             case OWN_ATTR_MEDIA_STREAM:
@@ -967,11 +993,15 @@ bool SvxMediaShape::getPropertyValueImpl( const OUString& rName, const SfxItemPr
                 break;
 
             case OWN_ATTR_MEDIA_TEMPFILEURL:
+#if HAVE_FEATURE_AVMEDIA
                 rValue <<= aItem.getTempURL();
+#endif
                 break;
 
             case OWN_ATTR_MEDIA_MIMETYPE:
+#if HAVE_FEATURE_AVMEDIA
                 rValue <<= aItem.getMimeType();
+#endif
                 break;
 
             case OWN_ATTR_FALLBACK_GRAPHIC:
commit 8fad35be9fe598c447fb0a76c086b59a15045c8b
Author: jan Iversen <jani at libreoffice.org>
Date:   Sun Jan 7 11:38:11 2018 +0100

    sw, obey HAVE_FEATURE_AVMEDIA
    
    added check for HAVE_FEATURE_AVMEDIA
    
    Change-Id: Ida2987564536c6d9f2b85b2599253b9252fb3881

diff --git a/sw/source/uibase/app/swmodule.cxx b/sw/source/uibase/app/swmodule.cxx
index b4c271d66852..9b901012e86c 100644
--- a/sw/source/uibase/app/swmodule.cxx
+++ b/sw/source/uibase/app/swmodule.cxx
@@ -374,8 +374,10 @@ void SwDLL::RegisterControls()
     SvxCTLTextTbxCtrl::RegisterControl(SID_ATTR_PARA_LEFT_TO_RIGHT, pMod);
     SvxCTLTextTbxCtrl::RegisterControl(SID_ATTR_PARA_RIGHT_TO_LEFT, pMod);
 
+#if HAVE_FEATURE_AVMEDIA
     ::avmedia::MediaToolBoxControl::RegisterControl(SID_AVMEDIA_TOOLBOX, pMod);
     ::avmedia::MediaPlayer::RegisterChildWindow(false, pMod);
+#endif
 
     ::sfx2::sidebar::SidebarChildWindow::RegisterChildWindow(false, pMod);
 
commit 46eeb01972bd5260ebfadb9a6cb2880e7bb547ad
Author: jan Iversen <jani at libreoffice.org>
Date:   Sun Jan 7 11:29:50 2018 +0100

    basic, changed runtime
    
    errobject is needed for runtime only
    (disable-scripting)
    
    Change-Id: I44f8c969f3e253fc3699e1bd12cd416b21ddcda3

diff --git a/basic/Library_sb.mk b/basic/Library_sb.mk
index 61424901e4e4..88cae207b166 100644
--- a/basic/Library_sb.mk
+++ b/basic/Library_sb.mk
@@ -65,7 +65,6 @@ $(eval $(call gb_Library_add_exception_objects,sb,\
 	basic/source/basmgr/basmgr \
 	basic/source/basmgr/vbahelper \
 	basic/source/classes/codecompletecache \
-	basic/source/classes/errobject \
 	basic/source/classes/eventatt \
 	basic/source/classes/global \
 	basic/source/classes/image \
@@ -102,6 +101,7 @@ $(eval $(call gb_Library_add_exception_objects,sb,\
 endif
 
 $(eval $(call gb_Library_add_exception_objects,sb,\
+	basic/source/classes/errobject \
 	basic/source/runtime/basrdll \
 	basic/source/runtime/methods \
 	basic/source/runtime/methods1 \


More information about the Libreoffice-commits mailing list