[Libreoffice-commits] core.git: 2 commits - apple_remote/Module_apple_remote.mk lo.xcent.in vcl/aqua vcl/inc vcl/Library_vcl.mk

Tor Lillqvist tml at iki.fi
Thu Aug 22 12:02:46 PDT 2013


 apple_remote/Module_apple_remote.mk |    2 ++
 lo.xcent.in                         |    2 ++
 vcl/Library_vcl.mk                  |    6 +++---
 vcl/aqua/source/app/saldata.cxx     |    5 +++++
 vcl/aqua/source/app/salinst.cxx     |    4 +++-
 vcl/aqua/source/app/vclnsapp.mm     |    6 ++++--
 vcl/inc/aqua/saldata.hxx            |    5 ++++-
 vcl/inc/aqua/vclnsapp.h             |    4 ++++
 8 files changed, 27 insertions(+), 7 deletions(-)

New commits:
commit 4fe9ef81aa83403bd3b7df555ccbd96cbdfd7c2d
Author: Tor Lillqvist <tml at iki.fi>
Date:   Thu Aug 22 18:27:19 2013 +0300

    The AppleRemote code is blocked by sandboxing so bypass it in that case
    
    Change-Id: I0e86c82fb81732468cf0a60eb8ff1d0579986767

diff --git a/apple_remote/Module_apple_remote.mk b/apple_remote/Module_apple_remote.mk
index 68cc7f1..5313df3 100644
--- a/apple_remote/Module_apple_remote.mk
+++ b/apple_remote/Module_apple_remote.mk
@@ -10,10 +10,12 @@
 $(eval $(call gb_Module_Module,apple_remote))
 
 ifeq ($(OS),MACOSX)
+ifneq ($(ENABLE_MACOSX_SANDBOX),YES)
 $(eval $(call gb_Module_add_targets,apple_remote,\
     Library_AppleRemote \
 ))
 endif
+endif
 
 
 # vim: set noet sw=4 ts=4:
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index ed9a0bd..cc1a21d 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -443,9 +443,6 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
     vcl/aqua/source/window/salmenu \
     vcl/aqua/source/window/salobj \
 ))
-$(eval $(call gb_Library_use_libraries,vcl,\
-    AppleRemote \
-))
 $(eval $(call gb_Library_use_system_darwin_frameworks,vcl,\
     $(if $(filter X86_64,$(CPUNAME)),,QuickTime) \
     Cocoa \
@@ -453,11 +450,14 @@ $(eval $(call gb_Library_use_system_darwin_frameworks,vcl,\
     CoreFoundation \
 ))
 
+ifneq ($(ENABLE_MACOSX_SANDBOX),YES)
 $(eval $(call gb_Library_use_libraries,vcl,\
     AppleRemote \
 ))
 endif
 
+endif
+
 vcl_really_generic_code= \
     vcl/generic/app/gensys \
     vcl/generic/app/geninst \
diff --git a/vcl/aqua/source/app/saldata.cxx b/vcl/aqua/source/app/saldata.cxx
index 185dd0b..4ec9506 100644
--- a/vcl/aqua/source/app/saldata.cxx
+++ b/vcl/aqua/source/app/saldata.cxx
@@ -17,6 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <config_features.h>
 
 #include "aqua/saldata.hxx"
 #include "aqua/salnsmenu.h"
@@ -47,7 +48,9 @@ SalData::SalData()
     mxP50Pattern( NULL ),
     maCursors( POINTER_COUNT, INVALID_CURSOR_PTR ),
     mbIsScrollbarDoubleMax( false ),
+#if !HAVE_FEATURE_MACOSX_SANDBOX
     mpMainController( NULL ),
+#endif
     mpDockIconClickHandler( nil ),
     mnDPIX( 0 ),
     mnDPIY( 0 )
@@ -82,8 +85,10 @@ SalData::~SalData()
         osl_destroyThreadKey( s_aAutoReleaseKey );
         s_aAutoReleaseKey = 0;
     }
+#if !HAVE_FEATURE_MACOSX_SANDBOX
     if ( mpMainController )
         [mpMainController release];
+#endif
 }
 
 void SalData::ensureThreadAutoreleasePool()
diff --git a/vcl/aqua/source/app/salinst.cxx b/vcl/aqua/source/app/salinst.cxx
index 89ce263..999a19f 100644
--- a/vcl/aqua/source/app/salinst.cxx
+++ b/vcl/aqua/source/app/salinst.cxx
@@ -17,6 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <config_features.h>
 
 #include <stdio.h>
 
@@ -167,7 +168,7 @@ static void initNSApp()
                                           selector: @selector(scrollbarSettingsChanged:)
                                           name: @"AppleNoRedisplayAppearancePreferenceChanged"
                                           object: nil ];
-
+#if !HAVE_FEATURE_MACOSX_SANDBOX
     // Initialize Apple Remote
     GetSalData()->mpMainController = [[MainController alloc] init];
 
@@ -180,6 +181,7 @@ static void initNSApp()
                                            selector: @selector(applicationWillResignActive:)
                                            name: @"AppleRemoteWillResignActive"
                                            object: nil ];
+#endif
 }
 
 sal_Bool ImplSVMainHook( int * pnInit )
diff --git a/vcl/aqua/source/app/vclnsapp.mm b/vcl/aqua/source/app/vclnsapp.mm
index e211642..738db9e 100644
--- a/vcl/aqua/source/app/vclnsapp.mm
+++ b/vcl/aqua/source/app/vclnsapp.mm
@@ -17,6 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <config_features.h>
+
 #include "sal/config.h"
 
 #include <vector>
@@ -439,8 +441,7 @@
 
 // for Apple Remote implementation
 
-#pragma mark -
-#pragma mark NSApplication Delegates
+#if !HAVE_FEATURE_MACOSX_SANDBOX
 - (void)applicationWillBecomeActive:(NSNotification *)pNotification
 {
     (void)pNotification;
@@ -490,6 +491,7 @@
         [(*it)->mpWindow setLevel: NSNormalWindowLevel];
     }
 }
+#endif
 
 - (BOOL)applicationShouldHandleReopen: (NSApplication*)pApp hasVisibleWindows: (BOOL) bWinVisible
 {
diff --git a/vcl/inc/aqua/saldata.hxx b/vcl/inc/aqua/saldata.hxx
index b0f91d8..ef6c8d2 100644
--- a/vcl/inc/aqua/saldata.hxx
+++ b/vcl/inc/aqua/saldata.hxx
@@ -20,6 +20,8 @@
 #ifndef _SV_SALDATA_HXX
 #define _SV_SALDATA_HXX
 
+#include <config_features.h>
+
 #include "premac.h"
 #include <Cocoa/Cocoa.h>
 #include "postmac.h"
@@ -89,8 +91,9 @@ public:
     static oslThreadKey                           s_aAutoReleaseKey;
 
     bool                                          mbIsScrollbarDoubleMax;   // TODO: support DoubleMin and DoubleBoth too
+#if !HAVE_FEATURE_MACOSX_SANDBOX
     MainController*                               mpMainController;         // Apple Remote
-
+#endif
     NSObject*                                     mpDockIconClickHandler;
     long                                          mnDPIX;           // #i100617# read DPI only once per office life
     long                                          mnDPIY;           // #i100617# read DPI only once per office life
diff --git a/vcl/inc/aqua/vclnsapp.h b/vcl/inc/aqua/vclnsapp.h
index eeb8376..18114c2 100644
--- a/vcl/inc/aqua/vclnsapp.h
+++ b/vcl/inc/aqua/vclnsapp.h
@@ -20,6 +20,8 @@
 #ifndef _VCL_VCLNSAPP_H
 #define _VCL_VCLNSAPP_H
 
+#include <config_features.h>
+
 #include "premac.h"
 #include "Cocoa/Cocoa.h"
 #include "postmac.h"
@@ -51,8 +53,10 @@ class AquaSalFrame;
 -(void)addFallbackMenuItem: (NSMenuItem*)pNewItem;
 -(void)removeFallbackMenuItem: (NSMenuItem*)pOldItem;
 -(void)addDockMenuItem: (NSMenuItem*)pNewItem;
+#if !HAVE_FEATURE_MACOSX_SANDBOX
 -(void)applicationWillBecomeActive: (NSNotification *)pNotification;
 -(void)applicationWillResignActive: (NSNotification *)pNotification;
+#endif
 -(BOOL)applicationShouldHandleReopen: (NSApplication*)pApp hasVisibleWindows: (BOOL)bWinVisible;
 -(void)setDockIconClickHandler: (NSObject*)pHandler;
 -(void)cycleFrameForward: (AquaSalFrame*)pCurFrame;
commit 680ff754db8d7541877b35bb8596e96db5c8ea27
Author: Tor Lillqvist <tml at iki.fi>
Date:   Thu Aug 22 17:32:23 2013 +0300

    Add the entitlement for app-scope security bookmarks
    
    Change-Id: I61c6c73965cad2cd807dbc9d33894c67a61f2c75

diff --git a/lo.xcent.in b/lo.xcent.in
index 946003b..ca636d7 100644
--- a/lo.xcent.in
+++ b/lo.xcent.in
@@ -6,6 +6,8 @@
 	<string>@MACOSX_BUNDLE_IDENTIFIER@</string>
 	<key>com.apple.security.app-sandbox</key>
 	<true/>
+	<key>com.apple.security.files.bookmarks.app-scope</key>
+	<true/>
 	<key>com.apple.security.files.bookmarks.document-scope</key>
 	<true/>
 	<key>com.apple.security.files.bookmarks.collection-scope</key>


More information about the Libreoffice-commits mailing list