[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.2' - 10 commits - configure.ac lingucomponent/source vcl/aqua vcl/inc

Tor Lillqvist tml at collabora.com
Wed Jun 11 00:03:01 PDT 2014


 configure.ac                                                |   19 ++++--
 lingucomponent/source/spellcheck/macosxspell/macspellimp.mm |    2 
 vcl/aqua/source/app/salinst.cxx                             |    6 +-
 vcl/aqua/source/gdi/salprn.cxx                              |    5 +
 vcl/aqua/source/window/salframe.cxx                         |    5 +
 vcl/aqua/source/window/salframeview.mm                      |   35 ++++++------
 vcl/aqua/source/window/salmenu.cxx                          |    4 +
 vcl/inc/aqua/salframeview.h                                 |    6 +-
 8 files changed, 52 insertions(+), 30 deletions(-)

New commits:
commit 8468568ed488b845f4b22e28a034aea6ca8d2306
Author: Tor Lillqvist <tml at collabora.com>
Date:   Tue Jun 3 11:35:24 2014 +0300

    WaE: 'guessesForWord:' is deprecated: first deprecated in OS X 10.6
    
    Change-Id: I861d4012c12096958c73c7008b0a9dfa6934fda2

diff --git a/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm b/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm
index 9bed126..6ad2277 100644
--- a/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm
+++ b/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm
@@ -351,7 +351,7 @@ Reference< XSpellAlternatives >
             aLang = [aLang  stringByAppendingString:aTaggedCountry];
         }
         [macSpell setLanguage:aLang];
-        NSArray *guesses = [macSpell guessesForWord:aNSStr];
+        NSArray *guesses = [macSpell guessesForWordRange:NSMakeRange(0, [aNSStr length]) inString:aNSStr language:aLang inSpellDocumentWithTag:0];
         count = [guesses count];
         if (count)
         {
commit 9476323771836985c5f8980bf888c0c45e51df2c
Author: Tor Lillqvist <tml at collabora.com>
Date:   Tue Jun 3 10:26:34 2014 +0300

    WaE: 'convertBaseToScreen:' is deprecated: first deprecated in OS X 10.7
    
    Change-Id: I04cc155e69d25021d294bccc588450b1f20e1fde

diff --git a/vcl/aqua/source/window/salmenu.cxx b/vcl/aqua/source/window/salmenu.cxx
index 6ec003c..b2e2216 100644
--- a/vcl/aqua/source/window/salmenu.cxx
+++ b/vcl/aqua/source/window/salmenu.cxx
@@ -891,8 +891,12 @@ Rectangle AquaSalMenu::GetMenuBarButtonRectPixel( sal_uInt16 i_nItemId, SalFrame
     if( ! pWin )
         return Rectangle();
 
+#if MACOSX_SDK_VERSION >= 1070
+    NSRect aRect = [pWin convertRectToScreen:[pWin frame]];
+#else
     NSRect aRect = [pWin frame];
     aRect.origin = [pWin convertBaseToScreen: NSMakePoint( 0, 0 )];
+#endif
 
     // make coordinates relative to reference frame
     static_cast<AquaSalFrame*>(i_pReferenceFrame)->CocoaToVCL( aRect.origin );
commit 7b39a65227bc4226bf9eff262584c5f2a29a93cf
Author: Tor Lillqvist <tml at collabora.com>
Date:   Tue Jun 3 10:21:38 2014 +0300

    WaE: 'scrollerWidth' is deprecated: first deprecated in OS X 10.7
    
    Change-Id: I2451687c10f91e7d5242b04974cb7bdd745de51c

diff --git a/vcl/aqua/source/window/salframe.cxx b/vcl/aqua/source/window/salframe.cxx
index 523fbda..8a73b6c 100644
--- a/vcl/aqua/source/window/salframe.cxx
+++ b/vcl/aqua/source/window/salframe.cxx
@@ -1302,8 +1302,11 @@ 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( sal_True );
commit 21efca24cf34e1c8c3713e258bb03896147df969
Author: Tor Lillqvist <tml at collabora.com>
Date:   Tue Jun 3 10:16:26 2014 +0300

    WaE: 'NSPrintSavePath' is deprecated: first deprecated in OS X 10.6
    
    Change-Id: I810b42da1d62c66c2ab6fb7bb6f71d1d00115dfa

diff --git a/vcl/aqua/source/gdi/salprn.cxx b/vcl/aqua/source/gdi/salprn.cxx
index 83e126d..8237d1c 100644
--- a/vcl/aqua/source/gdi/salprn.cxx
+++ b/vcl/aqua/source/gdi/salprn.cxx
@@ -492,7 +492,7 @@ sal_Bool AquaSalInfoPrinter::StartJob( const OUString* i_pFileName,
             {
                 [mpPrintInfo setJobDisposition: NSPrintSaveJob];
                 NSString* pPath = CreateNSString( *i_pFileName );
-                [pPrintDict setObject: pPath forKey: NSPrintSavePath];
+                [pPrintDict setObject:[NSURL fileURLWithPath:pPath] forKey:NSPrintJobSavingURL];
                 [pPath release];
             }
 
commit 34a2eb09d094b9bd47e4b27ceeaada12dfafec3c
Author: Tor Lillqvist <tml at collabora.com>
Date:   Tue Jun 3 10:10:19 2014 +0300

    WaE: comparison of two values with different enumeration types
    
    Change-Id: I611eefd20043386d00984f76a28d111e1c0495f1

diff --git a/vcl/aqua/source/gdi/salprn.cxx b/vcl/aqua/source/gdi/salprn.cxx
index a71c8d6..83e126d 100644
--- a/vcl/aqua/source/gdi/salprn.cxx
+++ b/vcl/aqua/source/gdi/salprn.cxx
@@ -68,10 +68,11 @@ AquaSalInfoPrinter::AquaSalInfoPrinter( const SalPrinterQueueInfo& i_rQueue ) :
     {
         mpPrintInfo = [pShared copy];
         [mpPrintInfo setPrinter: mpPrinter];
-        mePageOrientation = ([mpPrintInfo orientation] == NSLandscapeOrientation) ? ORIENTATION_LANDSCAPE : ORIENTATION_PORTRAIT;
 #if MACOSX_SDK_VERSION >= 1090
+        mePageOrientation = ([mpPrintInfo orientation] == NSPaperOrientationPortrait) ? ORIENTATION_LANDSCAPE : ORIENTATION_PORTRAIT;
         [mpPrintInfo setOrientation: NSPaperOrientationPortrait];
 #else
+        mePageOrientation = ([mpPrintInfo orientation] == NSLandscapeOrientation) ? ORIENTATION_LANDSCAPE : ORIENTATION_PORTRAIT;
         [mpPrintInfo setOrientation: NSPortraitOrientation];
 #endif
     }
commit 15971ac9850ff125b444443dd2b085a261a55029
Author: Tor Lillqvist <tml at collabora.com>
Date:   Tue Jun 3 09:16:32 2014 +0300

    WaE: 'setFlipped' is deprecated: first deprecated in OS X 10.6
    
    Not sure if using lockFocusFlipped: has the same effect, but will
    see...
    
    Change-Id: I957874bcf59c2c521bd5b2b2ca6f44fb0400e64f

diff --git a/vcl/aqua/source/app/salinst.cxx b/vcl/aqua/source/app/salinst.cxx
index 4f21fc5..6ed4c88 100644
--- a/vcl/aqua/source/app/salinst.cxx
+++ b/vcl/aqua/source/app/salinst.cxx
@@ -1189,8 +1189,7 @@ NSImage* CreateNSImage( const Image& rImage )
     NSImage* pImage = [[NSImage alloc] initWithSize: NSMakeSize( aSize.Width(), aSize.Height() )];
     if( pImage )
     {
-        [pImage setFlipped: YES];
-        [pImage lockFocus];
+        [pImage lockFocusFlipped:YES];
 
         NSGraphicsContext* pContext = [NSGraphicsContext currentContext];
         CGContextRef rCGContext = reinterpret_cast<CGContextRef>([pContext graphicsPort]);
commit b34370a90cf46c8553e7b4f892f78b29842f7ab7
Author: Tor Lillqvist <tml at collabora.com>
Date:   Tue Jun 3 09:09:20 2014 +0300

    WaE: case value not in enumerated type 'NSEventSubtype'
    
    Change-Id: Iaf5de07b7f0da7294681b9cdc152575a756a73c7

diff --git a/vcl/aqua/source/app/salinst.cxx b/vcl/aqua/source/app/salinst.cxx
index 424b734..4f21fc5 100644
--- a/vcl/aqua/source/app/salinst.cxx
+++ b/vcl/aqua/source/app/salinst.cxx
@@ -516,7 +516,8 @@ bool AquaSalInstance::isNSAppThread() const
 
 void AquaSalInstance::handleAppDefinedEvent( NSEvent* pEvent )
 {
-    switch( [pEvent subtype] )
+    int nSubtype = [pEvent subtype];
+    switch( nSubtype )
     {
     case AppStartTimerEvent:
         AquaSalTimer::handleStartTimerEvent( pEvent );
commit b16e7f907b7d72058b0ee0dc8967cef1071935c0
Author: Tor Lillqvist <tml at collabora.com>
Date:   Tue Jun 3 09:04:45 2014 +0300

    Initial attempt at implementing NSTextInputClient instead of NSTextInput
    
    NSTextInput was deprecated in 10.6.
    
    Change-Id: I6bce9e91a68014a6ca28bff6a820c27817f9baaf

diff --git a/vcl/aqua/source/window/salframeview.mm b/vcl/aqua/source/window/salframeview.mm
index 48e6adf..f41a7e2 100644
--- a/vcl/aqua/source/window/salframeview.mm
+++ b/vcl/aqua/source/window/salframeview.mm
@@ -1017,8 +1017,10 @@ private:
     }
 }
 
--(void)insertText:(id)aString
+-(void)insertText:(id)aString replacementRange:(NSRange)replacementRange
 {
+    (void) replacementRange; // FIXME: surely it must be used
+
     YIELD_GUARD;
     
     if( AquaSalFrame::isAlive( mpFrame ) )
@@ -1538,7 +1540,7 @@ private:
 }
 
 
-// NSTextInput protocol
+// NSTextInputClient protocol
 - (NSArray *)validAttributesForMarkedText
 {
     return [NSArray arrayWithObjects:NSUnderlineStyleAttributeName, nil];
@@ -1589,8 +1591,10 @@ private:
     return mSelectedRange;
 }
 
-- (void)setMarkedText:(id)aString selectedRange:(NSRange)selRange
+- (void)setMarkedText:(id)aString selectedRange:(NSRange)selRange replacementRange:(NSRange)replacementRange
 {
+    (void) replacementRange; // FIXME - use it!
+
     if( ![aString isKindOfClass:[NSAttributedString class]] )
         aString = [[[NSAttributedString alloc] initWithString:aString] autorelease];
     NSRange rangeToReplace = [self hasMarkedText] ? [self markedRange] : [self selectedRange];
@@ -1658,10 +1662,12 @@ private:
     mSelectedRange = mMarkedRange = NSMakeRange(NSNotFound, 0);
 }
 
-- (NSAttributedString *)attributedSubstringFromRange:(NSRange)theRange
+- (NSAttributedString *)attributedSubstringForProposedRange:(NSRange)aRange actualRange:(NSRangePointer)actualRange
 {
-    (void)theRange;
-    // FIXME
+    (void) aRange;
+    (void) actualRange;
+
+    // FIXME - Implement
     return nil;
 }
 
@@ -1703,9 +1709,12 @@ private:
     mpLastEvent = nil;
 }
 
-- (NSRect)firstRectForCharacterRange:(NSRange)theRange
+- (NSRect)firstRectForCharacterRange:(NSRange)aRange actualRange:(NSRangePointer)actualRange
 {
-    (void)theRange;
+     // FIXME - These should probably be used?
+    (void) aRange;
+    (void) actualRange;
+
     SalExtTextInputPosEvent aPosEvent;
     mpFrame->CallCallback( SALEVENT_EXTTEXTINPUTPOS, (void *)&aPosEvent );
 
diff --git a/vcl/inc/aqua/salframeview.h b/vcl/inc/aqua/salframeview.h
index 4be71b3..44f1654 100644
--- a/vcl/inc/aqua/salframeview.h
+++ b/vcl/inc/aqua/salframeview.h
@@ -56,11 +56,11 @@
 -(void)unregisterDraggingDestinationHandler:(id)theHandler;
 @end
 
- at interface SalFrameView : AquaA11yWrapper <NSTextInput>
+ at interface SalFrameView : AquaA11yWrapper <NSTextInputClient>
 {
     AquaSalFrame*       mpFrame;
 
-    // for NSTextInput
+    // for NSTextInputClient
     NSEvent*        mpLastEvent;
     BOOL            mbNeedSpecialKeyHandle;
     BOOL            mbInKeyInput;
@@ -110,7 +110,7 @@
 /*
     text action methods
 */
--(void)insertText:(id)aString;
+-(void)insertText:(id)aString replacementRange:(NSRange)replacementRange;
 -(void)insertTab: (id)aSender;
 -(void)insertBacktab: (id)aSender;
 -(void)moveLeft: (id)aSender;
commit 1bbc9b7e4e55e627158a29b07ccd3f9fb4faabf1
Author: Tor Lillqvist <tml at collabora.com>
Date:   Tue Jun 3 08:45:04 2014 +0300

    WaE: 'NSCountWindows' is deprecated: first deprecated in OS X 10.6
    
    Change-Id: I7163d3821ac0dfc0d471cf31e98f72953c78d878

diff --git a/vcl/aqua/source/window/salframeview.mm b/vcl/aqua/source/window/salframeview.mm
index 4bb1dfde..48e6adf 100644
--- a/vcl/aqua/source/window/salframeview.mm
+++ b/vcl/aqua/source/window/salframeview.mm
@@ -164,15 +164,11 @@ static const struct ExceptionalKey
 
 static AquaSalFrame* getMouseContainerFrame()
 {
-    NSInteger nWindows = 0;
-    NSCountWindows( &nWindows );
-    NSInteger* pWindows = (NSInteger*)alloca( nWindows * sizeof(NSInteger) );
-    // note: NSWindowList is supposed to be in z-order front to back
-    NSWindowList( nWindows, pWindows );
+    NSArray* aWindows = [NSWindow windowNumbersWithOptions:0];
     AquaSalFrame* pDispatchFrame = NULL;
-    for(int i = 0; i < nWindows && ! pDispatchFrame; i++ )
+    for(NSUInteger i = 0; i < [aWindows count] && ! pDispatchFrame; i++ )
     {
-        NSWindow* pWin = [NSApp windowWithWindowNumber: pWindows[i]];
+        NSWindow* pWin = [NSApp windowWithWindowNumber:[[aWindows objectAtIndex:i] integerValue]];
         if( pWin && [pWin isMemberOfClass: [SalFrameWindow class]] && [(SalFrameWindow*)pWin containsMouse] )
             pDispatchFrame = [(SalFrameWindow*)pWin getSalFrame];
     }
commit bab30961726da9e5ab9388121970bad33213a421
Author: Tor Lillqvist <tml at collabora.com>
Date:   Mon Jun 2 23:44:23 2014 +0300

    Accept the OS X 10.10 SDK
    
    Change-Id: Ic9c210e51f9f6b776e77988fdb1c719ee3d9d73a

diff --git a/configure.ac b/configure.ac
index b75708b..84427b9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2675,8 +2675,11 @@ if test $_os = Darwin; then
     10.9)
         MACOSX_SDK_VERSION=1090
         ;;
+    10.10)
+        MACOSX_SDK_VERSION=101000
+        ;;
     *)
-        AC_MSG_ERROR([with-macosx-sdk $with_macosx_sdk is not a supported value, supported value are 10.6--8])
+        AC_MSG_ERROR([with-macosx-sdk $with_macosx_sdk is not a supported value, supported values are 10.6--10])
         ;;
     esac
 
@@ -2714,7 +2717,7 @@ if test $_os = Darwin; then
                 fi
             fi
             ;;
-        10.8|10.9)
+        10.8|10.9|10.10)
             xcodepath="`xcode-select -print-path`"
             if test -d "$xcodepath/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$with_macosx_sdk.sdk"; then
                 MACOSX_SDK_PATH="$xcodepath/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$with_macosx_sdk.sdk"
@@ -2755,8 +2758,11 @@ if test $_os = Darwin; then
     10.9)
         MAC_OS_X_VERSION_MIN_REQUIRED="1090"
         ;;
+    10.10)
+        MAC_OS_X_VERSION_MIN_REQUIRED="101000"
+        ;;
     *)
-        AC_MSG_ERROR([with-macosx-version-min-required $with_macosx_version_min_required is not a supported value, supported value are 10.6--9])
+        AC_MSG_ERROR([with-macosx-version-min-required $with_macosx_version_min_required is not a supported value, supported values are 10.6--10])
         ;;
     esac
 
@@ -2799,7 +2805,7 @@ if test $_os = Darwin; then
             INSTALL_NAME_TOOL=`xcrun -find install_name_tool`
             LIBTOOL=libtool
             ;;
-        10.7|10.8|10.9)
+        10.7|10.8|10.9|10.10)
             if test "$enable_libc__" = yes; then
                 if test "$with_macosx_version_min_required" = 10.6; then
                     AC_MSG_ERROR([--enable-libc++ requires --with-macosx-version-min-required >= 10.7])
@@ -2836,8 +2842,11 @@ if test $_os = Darwin; then
     10.9)
         MAC_OS_X_VERSION_MAX_ALLOWED="1090"
         ;;
+    10.10)
+        MAC_OS_X_VERSION_MAX_ALLOWED="101000"
+        ;;
     *)
-        AC_MSG_ERROR([with-macosx-version-max-allowed $with_macosx_version_max_allowed is not a supported value, supported value are 10.6--8])
+        AC_MSG_ERROR([with-macosx-version-max-allowed $with_macosx_version_max_allowed is not a supported value, supported values are 10.6--10])
         ;;
     esac
 


More information about the Libreoffice-commits mailing list