Rebased ref, commits from common ancestor: commit 081f8b369aecf805c89d9b9e22f19b0864f1b9f1 Author: Douglas Mencken <dougmenc...@gmail.com> Date: Sat Oct 25 11:05:30 2014 -0400
Don't assume that /usr/bin/mktemp is always a BSD mktemp on OSX, add backup for GNU mktemp Change-Id: Ifb119dd13062593cba5aa3cb1dacc54194339544 diff --git a/solenv/gbuild/platform/macosx.mk b/solenv/gbuild/platform/macosx.mk index 52a0b5a..7ba21a9 100644 --- a/solenv/gbuild/platform/macosx.mk +++ b/solenv/gbuild/platform/macosx.mk @@ -24,8 +24,8 @@ gb_SDKDIR := $(MACOSX_SDK_PATH) include $(GBUILDDIR)/platform/com_GCC_defs.mk -# Darwin mktemp -t expects a prefix, not a pattern -gb_MKTEMP ?= /usr/bin/mktemp -t gbuild. +# Note that BSD mktemp -t expects a prefix, not a pattern; if it fails, assume GNU syntax +gb_MKTEMP ?= /usr/bin/mktemp -t gbuild. 2>/dev/null || mktemp -t gbuild.XXXXXX gb_OSDEFS := \ -D$(OS) \ commit 9296343089f9b934fcaf931415ba26fbf902e697 Author: Douglas Mencken <dougmenc...@gmail.com> Date: Sat Oct 25 11:03:56 2014 -0400 vcl/osx/salframe.cxx: move includes, objc_msgSend workaround Change-Id: I39886b4590f227ec69042fed0f5240ba0b0fd7f2 diff --git a/vcl/osx/salframe.cxx b/vcl/osx/salframe.cxx index ce3e371..dacf9fe 100644 --- a/vcl/osx/salframe.cxx +++ b/vcl/osx/salframe.cxx @@ -37,11 +37,6 @@ #include "osx/a11yfactory.h" #include "quartz/utils.h" -#if MACOSX_SDK_VERSION < 1060 -#include "vcl/timer.hxx" -#include "osx/saltimer.h" -#endif - #include "salwtype.hxx" #include "premac.h" @@ -54,6 +49,11 @@ #include <Carbon/Carbon.h> #include "postmac.h" +#if MACOSX_SDK_VERSION < 1060 +#include "vcl/timer.hxx" +#include "osx/saltimer.h" +#endif + using namespace std; AquaSalFrame* AquaSalFrame::s_pCaptureFrame = NULL; @@ -201,16 +201,16 @@ void AquaSalFrame::initWindowAndView() [mpNSWindow setAcceptsMouseMovedEvents: YES]; [mpNSWindow setHasShadow: YES]; -#if MACOSX_SDK_VERSION < 1060 - objc_msgSend(mpNSWindow, @selector(setDelegate:), mpNSWindow); -#else +#if MACOSX_SDK_VERSION >= 1070 + /* objc_msgSend(mpNSWindow, @selector(setDelegate:), mpNSWindow); */ [mpNSWindow setDelegate: static_cast<id<NSWindowDelegate> >(mpNSWindow)]; -#endif if( [mpNSWindow respondsToSelector: @selector(setRestorable:)]) { objc_msgSend(mpNSWindow, @selector(setRestorable:), NO); } +#endif + const NSRect aRect = { NSZeroPoint, NSMakeSize( maGeometry.nWidth, maGeometry.nHeight )}; mnTrackingRectTag = [mpNSView addTrackingRect: aRect owner: mpNSView userData: nil assumeInside: NO]; commit 83a6b3923f63d63f9f415df5bfe36f1edce4d097 Author: Douglas Mencken <dougmenc...@gmail.com> Date: Wed Oct 8 10:38:28 2014 -0400 Use GNU objc ABI/runtime instead of NeXT ABI/runtime when compiler is GCC also, + fix "cannot find interface declaration for NXConstantString" + include <objc/objc-api.h> when OBJC_EXPORT is not defined Change-Id: I5f0df322435be8244d372642dee1c21d783306f1 diff --git a/sal/osl/unx/system.h b/sal/osl/unx/system.h index d952518..143a1bd 100644 --- a/sal/osl/unx/system.h +++ b/sal/osl/unx/system.h @@ -215,6 +215,9 @@ #ifdef MACOSX #define __OPENTRANSPORTPROVIDERS__ // these are already defined #define TimeValue CFTimeValue // Do not conflict with TimeValue in sal/inc/osl/time.h +#ifndef OBJC_EXPORT +#include <objc/objc-api.h> +#endif #include <Carbon/Carbon.h> #undef TimeValue # ifndef ETIME diff --git a/solenv/gbuild/platform/macosx.mk b/solenv/gbuild/platform/macosx.mk index 185fb26..52a0b5a 100644 --- a/solenv/gbuild/platform/macosx.mk +++ b/solenv/gbuild/platform/macosx.mk @@ -59,9 +59,21 @@ gb_CXXFLAGS := \ # these are to get g++ to switch to Objective-C++ mode # (see toolkit module for a case where it is necessary to do it this way) -gb_OBJCXXFLAGS := -x objective-c++ -fobjc-exceptions - -gb_OBJCFLAGS := -x objective-c -fobjc-exceptions +gb_OBJCXXFLAGS := \ + -x objective-c++ \ + -fobjc-exceptions \ + $(if $(filter TRUE,$(COM_GCC_IS_CLANG)),,\ + -fgnu-runtime \ + -fconstant-string-class=NSConstantString \ + ) + +gb_OBJCFLAGS := \ + -x objective-c \ + -fobjc-exceptions \ + $(if $(filter TRUE,$(COM_GCC_IS_CLANG)),,\ + -fgnu-runtime \ + -fconstant-string-class=NSConstantString \ + ) # LinkTarget class diff --git a/vcl/inc/osx/a11yfactory.h b/vcl/inc/osx/a11yfactory.h index c739f3e..4e92126 100644 --- a/vcl/inc/osx/a11yfactory.h +++ b/vcl/inc/osx/a11yfactory.h @@ -20,6 +20,10 @@ #ifndef INCLUDED_VCL_INC_OSX_A11YFACTORY_H #define INCLUDED_VCL_INC_OSX_A11YFACTORY_H +#ifndef OBJC_EXPORT +#include <objc/objc-api.h> +#endif + #include "osxvcltypes.h" #include "a11ywrapper.h" #include <com/sun/star/accessibility/XAccessibleContext.hpp> diff --git a/vcl/inc/osx/osxvcltypes.h b/vcl/inc/osx/osxvcltypes.h index f1659c4..96edccc 100644 --- a/vcl/inc/osx/osxvcltypes.h +++ b/vcl/inc/osx/osxvcltypes.h @@ -21,6 +21,9 @@ #define INCLUDED_VCL_INC_OSX_OSXVCLTYPES_H #include "premac.h" +#ifndef OBJC_EXPORT +#include <objc/objc-api.h> +#endif #import <Cocoa/Cocoa.h> #import <AppKit/NSEvent.h> #include "postmac.h" diff --git a/vcl/inc/osx/printview.h b/vcl/inc/osx/printview.h index e396bd8..b63900b 100644 --- a/vcl/inc/osx/printview.h +++ b/vcl/inc/osx/printview.h @@ -21,6 +21,9 @@ #define INCLUDED_VCL_INC_OSX_PRINTVIEW_H #include "premac.h" +#ifndef OBJC_EXPORT +#include <objc/objc-api.h> +#endif #include <Cocoa/Cocoa.h> #include "postmac.h" diff --git a/vcl/inc/osx/saldata.hxx b/vcl/inc/osx/saldata.hxx index 413754b..1665b06 100644 --- a/vcl/inc/osx/saldata.hxx +++ b/vcl/inc/osx/saldata.hxx @@ -23,6 +23,9 @@ #include <config_features.h> #include "premac.h" +#ifndef OBJC_EXPORT +#include <objc/objc-api.h> +#endif #include <Cocoa/Cocoa.h> #include "postmac.h" diff --git a/vcl/inc/osx/salinst.h b/vcl/inc/osx/salinst.h index 8a88a26..4efcbe0 100644 --- a/vcl/inc/osx/salinst.h +++ b/vcl/inc/osx/salinst.h @@ -25,6 +25,9 @@ #include "osl/conditn.h" #ifdef MACOSX +#ifndef OBJC_EXPORT +#include <objc/objc-api.h> +#endif #include "osx/osxvcltypes.h" #endif diff --git a/vcl/inc/osx/saltimer.h b/vcl/inc/osx/saltimer.h index b751a81..e663c65 100644 --- a/vcl/inc/osx/saltimer.h +++ b/vcl/inc/osx/saltimer.h @@ -21,6 +21,9 @@ #define INCLUDED_VCL_INC_OSX_SALTIMER_H #include "premac.h" +#ifndef OBJC_EXPORT +#include <objc/objc-api.h> +#endif #include <Cocoa/Cocoa.h> #include "postmac.h" diff --git a/vcl/inc/osx/vclnsapp.h b/vcl/inc/osx/vclnsapp.h index 541b509..675cacc 100644 --- a/vcl/inc/osx/vclnsapp.h +++ b/vcl/inc/osx/vclnsapp.h @@ -23,6 +23,9 @@ #include <config_features.h> #include "premac.h" +#ifndef OBJC_EXPORT +#include <objc/objc-api.h> +#endif #include "Cocoa/Cocoa.h" #include "postmac.h" diff --git a/vcl/inc/quartz/utils.h b/vcl/inc/quartz/utils.h index e408250..ac264ec 100644 --- a/vcl/inc/quartz/utils.h +++ b/vcl/inc/quartz/utils.h @@ -23,6 +23,9 @@ #include <iostream> #include <premac.h> +#ifndef OBJC_EXPORT +#include <objc/objc-api.h> +#endif #include <CoreFoundation/CoreFoundation.h> #include <Foundation/Foundation.h> #ifdef MACOSX diff --git a/vcl/osx/DataFlavorMapping.cxx b/vcl/osx/DataFlavorMapping.cxx index 33bd19b..429330c 100644 --- a/vcl/osx/DataFlavorMapping.cxx +++ b/vcl/osx/DataFlavorMapping.cxx @@ -36,6 +36,9 @@ #include <string.h> #include <premac.h> +#ifndef OBJC_EXPORT +#include <objc/objc-api.h> +#endif #include <Cocoa/Cocoa.h> #include <postmac.h> diff --git a/vcl/osx/DataFlavorMapping.hxx b/vcl/osx/DataFlavorMapping.hxx index a3cff1c..31f4eb5 100644 --- a/vcl/osx/DataFlavorMapping.hxx +++ b/vcl/osx/DataFlavorMapping.hxx @@ -26,6 +26,9 @@ #include <com/sun/star/lang/XMultiComponentFactory.hpp> #include <premac.h> +#ifndef OBJC_EXPORT +#include <objc/objc-api.h> +#endif #import <Cocoa/Cocoa.h> #include <postmac.h> diff --git a/vcl/osx/DragActionConversion.hxx b/vcl/osx/DragActionConversion.hxx index fbb5ea3..b77047d 100644 --- a/vcl/osx/DragActionConversion.hxx +++ b/vcl/osx/DragActionConversion.hxx @@ -23,6 +23,9 @@ #include <sal/types.h> #include <premac.h> +#ifndef OBJC_EXPORT +#include <objc/objc-api.h> +#endif #import <Cocoa/Cocoa.h> #include <postmac.h> diff --git a/vcl/osx/DragSource.hxx b/vcl/osx/DragSource.hxx index 491716d..403ed51 100644 --- a/vcl/osx/DragSource.hxx +++ b/vcl/osx/DragSource.hxx @@ -33,6 +33,9 @@ #include <boost/utility.hpp> #include <premac.h> +#ifndef OBJC_EXPORT +#include <objc/objc-api.h> +#endif #import <Cocoa/Cocoa.h> #include <postmac.h> diff --git a/vcl/osx/PictToBmpFlt.cxx b/vcl/osx/PictToBmpFlt.cxx index 77c67a6..097050e 100644 --- a/vcl/osx/PictToBmpFlt.cxx +++ b/vcl/osx/PictToBmpFlt.cxx @@ -18,6 +18,9 @@ */ #include <premac.h> +#ifndef OBJC_EXPORT +#include <objc/objc-api.h> +#endif #include <Carbon/Carbon.h> #include <QuickTime/QuickTime.h> #include <postmac.h> diff --git a/vcl/osx/salframe.cxx b/vcl/osx/salframe.cxx index eab873c..ce3e371 100644 --- a/vcl/osx/salframe.cxx +++ b/vcl/osx/salframe.cxx @@ -45,6 +45,9 @@ #include "salwtype.hxx" #include "premac.h" +#ifndef OBJC_EXPORT +#include <objc/objc-api.h> +#endif #include <objc/objc-runtime.h> // needed for theming // FIXME: move theming code to salnativewidgets.cxx commit b631ab1e09f58d1d9ee80cd54c643a03960f38fd Author: Douglas Mencken <dougmenc...@gmail.com> Date: Sat Oct 25 10:02:42 2014 -0400 vcl/osx: restore some pre-10.8 conditional code related commits: ec147012340219c8bb5eaf8fe3d41be7836bc261 16996c6b91b53e3c7d316296833bdb8a9cb60c22 Change-Id: Ie8962f8d26f163eed91fdf6b137b0d9830183dd2 diff --git a/vcl/osx/salframe.cxx b/vcl/osx/salframe.cxx index b9a7ac1..eab873c 100644 --- a/vcl/osx/salframe.cxx +++ b/vcl/osx/salframe.cxx @@ -1246,7 +1246,12 @@ void AquaSalFrame::UpdateSettings( AllSettings& rSettings ) getAppleScrollBarVariant(aStyleSettings); // set scrollbar size +#if MACOSX_SDK_VERSION >= 1070 aStyleSettings.SetScrollBarSize( static_cast<long int>([NSScroller scrollerWidthForControlSize:NSRegularControlSize scrollerStyle:NSScrollerStyleLegacy]) ); +#else + aStyleSettings.SetScrollBarSize( static_cast<long int>([NSScroller scrollerWidth]) ); +#endif + // images in menus false for MacOSX aStyleSettings.SetPreferredUseImagesInMenus( false ); aStyleSettings.SetHideDisabledMenuItems( true ); diff --git a/vcl/osx/salmenu.cxx b/vcl/osx/salmenu.cxx index 87d824f..32ce46b 100644 --- a/vcl/osx/salmenu.cxx +++ b/vcl/osx/salmenu.cxx @@ -880,7 +880,12 @@ Rectangle AquaSalMenu::GetMenuBarButtonRectPixel( sal_uInt16 i_nItemId, SalFrame if( ! pNSWin ) return Rectangle(); +#if MACOSX_SDK_VERSION >= 1070 NSRect aRect = [pNSWin convertRectToScreen:[pNSWin frame]]; +#else + NSRect aRect = [pNSWin frame]; + aRect.origin = [pNSWin convertBaseToScreen: NSMakePoint( 0, 0 )]; +#endif // make coordinates relative to reference frame static_cast<AquaSalFrame*>(i_pReferenceFrame)->CocoaToVCL( aRect.origin ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits