[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - 10 commits - configure.ac lingucomponent/source vcl/inc vcl/osx
Tor Lillqvist
tml at collabora.com
Wed Jun 11 00:04:06 PDT 2014
configure.ac | 19 ++++--
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 +
8 files changed, 52 insertions(+), 30 deletions(-)
New commits:
commit 6380b5cd065f1bf7ebb9116fd46872e600a52b1e
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 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 3ecf7502465695e5d4632de5ab589dead2ca5ab9
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/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 0cb2f6e08e2a61621fc363437c794a6fc6a479a8
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/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 c5c317ed20933c6508b35c34039df31669943f1c
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/osx/salprn.cxx b/vcl/osx/salprn.cxx
index 6043726..cc4e971 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 839263fb53dc8c226a044fba1fcb6ac70fcf98cd
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/osx/salprn.cxx b/vcl/osx/salprn.cxx
index a973505..6043726 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 0c1eb1da562945c2daf497e4d24912a6b660faf2
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/osx/salinst.cxx b/vcl/osx/salinst.cxx
index 39a7ce2..eedc03e 100644
--- a/vcl/osx/salinst.cxx
+++ b/vcl/osx/salinst.cxx
@@ -1056,8 +1056,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 9b4acc6638c0ef2ce489193d95b4e163331068e2
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/osx/salinst.cxx b/vcl/osx/salinst.cxx
index b779109..39a7ce2 100644
--- a/vcl/osx/salinst.cxx
+++ b/vcl/osx/salinst.cxx
@@ -452,7 +452,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 179334dd45828d02e4e323cbdda435963fa3f4a5
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/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
- at interface SalFrameView : AquaA11yWrapper <NSTextInput>
+ at 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 45bce99..8b68f90 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 5ca6c22bd37ce0768078ea1edac201bcf8f3b9ee
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/osx/salframeview.mm b/vcl/osx/salframeview.mm
index 6825c9b..45bce99 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];
}
commit 285607d73a354e72066787dfac05079793270714
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 d2ffa7d..3eba31d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2760,8 +2760,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 values are 10.5--9])
+ AC_MSG_ERROR([with-macosx-sdk $with_macosx_sdk is not a supported value, supported values are 10.5--10])
;;
esac
@@ -2813,7 +2816,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"
@@ -2862,8 +2865,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 values are 10.5--9])
+ AC_MSG_ERROR([with-macosx-version-min-required $with_macosx_version_min_required is not a supported value, supported values are 10.5--10])
;;
esac
@@ -2925,7 +2931,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])
@@ -2965,8 +2971,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 values are 10.5--9])
+ AC_MSG_ERROR([with-macosx-version-max-allowed $with_macosx_version_max_allowed is not a supported value, supported values are 10.5--10])
;;
esac
More information about the Libreoffice-commits
mailing list