lingucomponent/source/spellcheck/macosxspell/macspellimp.mm |    2 
 vcl/inc/osx/salframeview.h                                  |    6 +-
 vcl/osx/salframe.cxx                                        |    5 +
 vcl/osx/salframeview.mm                                     |   35 ++++++------
 vcl/osx/salinst.cxx                                         |    6 +-
 vcl/osx/salmenu.cxx                                         |    4 +
 vcl/osx/salprn.cxx                                          |    5 +
 7 files changed, 38 insertions(+), 25 deletions(-)

New commits:
commit 96840ff0ce697c5c05b59d53409b3cf27ac35e5f
Author: Tor Lillqvist <t...@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 567062d..9294525 100644
--- a/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm
+++ b/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm
@@ -350,7 +350,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 2116b92f0266685430d31470c9914ce05b44f130
Author: Tor Lillqvist <t...@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/osx/salmenu.cxx b/vcl/osx/salmenu.cxx
index 303c1fe..59b7651 100644
--- a/vcl/osx/salmenu.cxx
+++ b/vcl/osx/salmenu.cxx
@@ -880,8 +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 );
commit 74ae541c328cffb168a98faa746d0faceffb3e84
Author: Tor Lillqvist <t...@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/osx/salframe.cxx b/vcl/osx/salframe.cxx
index b3a1015..c799407 100644
--- a/vcl/osx/salframe.cxx
+++ b/vcl/osx/salframe.cxx
@@ -1250,8 +1250,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( true );
commit e1d82a7e2db1ea837303c072913cd52cacf75b3d
Author: Tor Lillqvist <t...@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/osx/salprn.cxx b/vcl/osx/salprn.cxx
index f1dd2fa..9440bb3 100644
--- a/vcl/osx/salprn.cxx
+++ b/vcl/osx/salprn.cxx
@@ -462,7 +462,7 @@ 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 5f27a6864420815d0d0abc409333fec963536faf
Author: Tor Lillqvist <t...@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/osx/salprn.cxx b/vcl/osx/salprn.cxx
index 93e52e7..f1dd2fa 100644
--- a/vcl/osx/salprn.cxx
+++ b/vcl/osx/salprn.cxx
@@ -66,10 +66,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 b3818f53812053e94196a58bbe474e2c3b72ac69
Author: Tor Lillqvist <t...@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/osx/salinst.cxx b/vcl/osx/salinst.cxx
index 7936b4a..9e9b35c 100644
--- a/vcl/osx/salinst.cxx
+++ b/vcl/osx/salinst.cxx
@@ -1049,8 +1049,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 39ffccd26151d255168b072a2d439df48d172011
Author: Tor Lillqvist <t...@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/osx/salinst.cxx b/vcl/osx/salinst.cxx
index 78755d1..7936b4a 100644
--- a/vcl/osx/salinst.cxx
+++ b/vcl/osx/salinst.cxx
@@ -445,7 +445,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 e4dc93f5d8d0df50f1a8b4594220d0c57703e03d
Author: Tor Lillqvist <t...@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/inc/osx/salframeview.h b/vcl/inc/osx/salframeview.h
index d187f94..4f0c685 100644
--- a/vcl/inc/osx/salframeview.h
+++ b/vcl/inc/osx/salframeview.h
@@ -63,11 +63,11 @@
 -(void)unregisterDraggingDestinationHandler:(id)theHandler;
 @end
 
-@interface SalFrameView : AquaA11yWrapper <NSTextInput>
+@interface SalFrameView : AquaA11yWrapper <NSTextInputClient>
 {
     AquaSalFrame*       mpFrame;
 
-    // for NSTextInput
+    // for NSTextInputClient
     NSEvent*        mpLastEvent;
     BOOL            mbNeedSpecialKeyHandle;
     BOOL            mbInKeyInput;
@@ -117,7 +117,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;
diff --git a/vcl/osx/salframeview.mm b/vcl/osx/salframeview.mm
index 34cd70a..fadd508 100644
--- a/vcl/osx/salframeview.mm
+++ b/vcl/osx/salframeview.mm
@@ -1026,8 +1026,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 ) )
@@ -1545,7 +1547,7 @@ private:
 }
 
 
-// NSTextInput protocol
+// NSTextInputClient protocol
 - (NSArray *)validAttributesForMarkedText
 {
     return [NSArray arrayWithObjects:NSUnderlineStyleAttributeName, nil];
@@ -1596,8 +1598,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];
@@ -1664,10 +1668,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;
 }
 
@@ -1709,9 +1715,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 );
 
commit 1b89f986f0e7e6303c4e44cb1ca5d42a5c78c8d4
Author: Tor Lillqvist <t...@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/osx/salframeview.mm b/vcl/osx/salframeview.mm
index c022178..34cd70a 100644
--- a/vcl/osx/salframeview.mm
+++ b/vcl/osx/salframeview.mm
@@ -165,15 +165,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];
     }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to