[Libreoffice-commits] core.git: apple_remote/source avmedia/source fpicker/source

2021-10-27 Thread Stephan Bergmann (via logerrit)
 apple_remote/source/HIDRemoteControlDevice.m |2 ++
 apple_remote/source/KeyspanFrontRowControl.m |2 ++
 avmedia/source/macavf/framegrabber.mm|2 ++
 fpicker/source/aqua/SalAquaFilePicker.mm |4 
 4 files changed, 10 insertions(+)

New commits:
commit 323a2a249a6c87ffde52a1e826d5d12be649e018
Author: Stephan Bergmann 
AuthorDate: Wed Oct 27 14:10:02 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Oct 27 16:32:04 2021 +0200

Add support for macOS SDK 12.0

...and for now just silence all the new deprecation warnings

Change-Id: Ic6e04f4bade91a823872cd4e453c41ee1950bd77
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124275
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/apple_remote/source/HIDRemoteControlDevice.m 
b/apple_remote/source/HIDRemoteControlDevice.m
index 6ed20b8eb6bf..56e2b930d137 100644
--- a/apple_remote/source/HIDRemoteControlDevice.m
+++ b/apple_remote/source/HIDRemoteControlDevice.m
@@ -507,7 +507,9 @@ static void QueueCallbackFunction(void* target,  IOReturn 
result, void* refcon,
 hidMatchDictionary = IOServiceMatching([self remoteControlDeviceName]);
 
 // Now search I/O Registry for matching devices.
+SAL_WNODEPRECATED_DECLARATIONS_PUSH // kIOMasterPortDefault (12.0)
 ioReturnValue = IOServiceGetMatchingServices(kIOMasterPortDefault, 
hidMatchDictionary, );
+SAL_WNODEPRECATED_DECLARATIONS_POP
 
 if ((ioReturnValue == kIOReturnSuccess) && (hidObjectIterator != 0)) {
 hidDevice = IOIteratorNext(hidObjectIterator);
diff --git a/apple_remote/source/KeyspanFrontRowControl.m 
b/apple_remote/source/KeyspanFrontRowControl.m
index a337c497844f..46bc7917486a 100644
--- a/apple_remote/source/KeyspanFrontRowControl.m
+++ b/apple_remote/source/KeyspanFrontRowControl.m
@@ -81,7 +81,9 @@
 }
 
 // Now search I/O Registry for matching devices.
+SAL_WNODEPRECATED_DECLARATIONS_PUSH // kIOMasterPortDefault (12.0)
 ioReturnValue = IOServiceGetMatchingServices(kIOMasterPortDefault, 
hidMatchDictionary, );
+SAL_WNODEPRECATED_DECLARATIONS_POP
 
 if ((ioReturnValue == kIOReturnSuccess) && (hidObjectIterator != 0)) {
 hidDevice = IOIteratorNext(hidObjectIterator);
diff --git a/avmedia/source/macavf/framegrabber.mm 
b/avmedia/source/macavf/framegrabber.mm
index 7803fa4f1063..e0b8bad61171 100644
--- a/avmedia/source/macavf/framegrabber.mm
+++ b/avmedia/source/macavf/framegrabber.mm
@@ -67,7 +67,9 @@ uno::Reference< graphic::XGraphic > SAL_CALL 
FrameGrabber::grabFrame( double fMe
 
 // convert the image to a TIFF-formatted byte-array
 CFMutableDataRef pCFData = CFDataCreateMutable( kCFAllocatorDefault, 0 );
+SAL_WNODEPRECATED_DECLARATIONS_PUSH // kUTTypeTIFF (12.0)
 CGImageDestination* pCGImgDest = CGImageDestinationCreateWithData( 
pCFData, kUTTypeTIFF, 1, nullptr );
+SAL_WNODEPRECATED_DECLARATIONS_POP
 CGImageDestinationAddImage( pCGImgDest, pCGImage, nullptr );
 CGImageDestinationFinalize( pCGImgDest );
 CFRelease( pCGImgDest );
diff --git a/fpicker/source/aqua/SalAquaFilePicker.mm 
b/fpicker/source/aqua/SalAquaFilePicker.mm
index 6c16b04fc702..fa2ec600c2ec 100644
--- a/fpicker/source/aqua/SalAquaFilePicker.mm
+++ b/fpicker/source/aqua/SalAquaFilePicker.mm
@@ -539,7 +539,9 @@ void SalAquaFilePicker::updateSaveFileNameExtension()
 SolarMutexGuard aGuard;
 
 if (!m_pControlHelper->isAutoExtensionEnabled()) {
+SAL_WNODEPRECATED_DECLARATIONS_PUSH // setAllowedFileTypes (12.0)
 [m_pDialog setAllowedFileTypes:nil];
+SAL_WNODEPRECATED_DECLARATIONS_POP
 [m_pDialog setAllowsOtherFileTypes:YES];
 } else {
 ensureFilterHelper();
@@ -551,7 +553,9 @@ void SalAquaFilePicker::updateSaveFileNameExtension()
 OUString suffix = (*(aStringList.begin())).copy(1);
 NSString *requiredFileType = [NSString stringWithOUString:suffix];
 
+SAL_WNODEPRECATED_DECLARATIONS_PUSH // setAllowedFileTypes (12.0)
 [m_pDialog setAllowedFileTypes:[NSArray 
arrayWithObjects:requiredFileType, nil]];
+SAL_WNODEPRECATED_DECLARATIONS_POP
 
 [m_pDialog setAllowsOtherFileTypes:NO];
 }


[Libreoffice-commits] core.git: apple_remote/source

2021-06-10 Thread Stephan Bergmann (via logerrit)
 apple_remote/source/HIDRemoteControlDevice.m |   16 +---
 1 file changed, 1 insertion(+), 15 deletions(-)

New commits:
commit 893c8fa232b0c78c5f390f7d35b6e1a7f6538ed1
Author: Stephan Bergmann 
AuthorDate: Thu Jun 10 14:29:52 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Jun 10 15:52:51 2021 +0200

-Werror,-Wunused-but-set-variable (Clang 13 trunk)

all three variables were unused ever since the code's introduction in
229a0de9c81554dfe6c96a0095a582476abc87ba "CWS-TOOLING: integrate CWS
appleremote01"

Change-Id: Ib755b86c81a6823c440f9f6a392b8f4b7de973ad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116984
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/apple_remote/source/HIDRemoteControlDevice.m 
b/apple_remote/source/HIDRemoteControlDevice.m
index 9a875d1910c4..6ed20b8eb6bf 100644
--- a/apple_remote/source/HIDRemoteControlDevice.m
+++ b/apple_remote/source/HIDRemoteControlDevice.m
@@ -407,8 +407,6 @@ static void QueueCallbackFunction(void* target,  IOReturn 
result, void* refcon,
 - (BOOL) initializeCookies {
 IOHIDDeviceInterface122** handle = 
(IOHIDDeviceInterface122**)hidDeviceInterface;
 IOHIDElementCookie  cookie;
-longusage;
-longusagePage;
 id  object;
 NSArray*elements = nil;
 NSDictionary*   element;
@@ -439,16 +437,6 @@ static void QueueCallbackFunction(void* target,  IOReturn 
result, void* refcon,
 if (object == NULL || CFGetTypeID(object) != CFNumberGetTypeID()) 
continue;
 cookie = (IOHIDElementCookie) [object longValue];
 
-//Get usage
-object = [element valueForKey: 
(NSString*)CFSTR(kIOHIDElementUsageKey) ];
-if (object == nil || ![object isKindOfClass:[NSNumber class]]) 
continue;
-usage = [object longValue];
-
-//Get usage page
-object = [element valueForKey: 
(NSString*)CFSTR(kIOHIDElementUsagePageKey) ];
-if (object == nil || ![object isKindOfClass:[NSNumber class]]) 
continue;
-usagePage = [object longValue];
-
 [allCookies addObject: [NSNumber numberWithInt:(int)cookie]];
 }
 CFRelease(elements);
@@ -461,8 +449,6 @@ static void QueueCallbackFunction(void* target,  IOReturn 
result, void* refcon,
 }
 
 - (BOOL) openDevice {
-HRESULT  result;
-
 IOHIDOptionsType openMode = kIOHIDOptionsTypeNone;
 if ([self isOpenInExclusiveMode]) openMode = kIOHIDOptionsTypeSeizeDevice;
 IOReturn ioReturnValue = (*hidDeviceInterface)->open(hidDeviceInterface, 
openMode);
@@ -470,7 +456,7 @@ static void QueueCallbackFunction(void* target,  IOReturn 
result, void* refcon,
 if (ioReturnValue == KERN_SUCCESS) {
 queue = (*hidDeviceInterface)->allocQueue(hidDeviceInterface);
 if (queue) {
-result = (*queue)->create(queue, 0, 12);//depth: maximum 
number of elements in queue before oldest elements in queue begin to be lost.
+(*queue)->create(queue, 0, 12);//depth: maximum number of 
elements in queue before oldest elements in queue begin to be lost.
 
 IOHIDElementCookie cookie;
 NSEnumerator *allCookiesEnumerator = [allCookies objectEnumerator];
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: apple_remote/source solenv/clang-format

2020-11-16 Thread Philipp Hofer (via logerrit)
 apple_remote/source/AppleRemote.h  |3 +-
 apple_remote/source/GlobalKeyboardDevice.h |   16 ++--
 apple_remote/source/HIDRemoteControlDevice.h   |   21 
 apple_remote/source/KeyspanFrontRowControl.h   |4 +--
 apple_remote/source/MultiClickRemoteBehavior.h |   32 +
 apple_remote/source/RemoteControlContainer.h   |7 +++--
 solenv/clang-format/excludelist|6 
 7 files changed, 44 insertions(+), 45 deletions(-)

New commits:
commit 03e79e8ab515e061fbfc435e6660e1f57b4f460d
Author: Philipp Hofer 
AuthorDate: Mon Nov 9 18:55:36 2020 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Mon Nov 16 12:29:44 2020 +0100

tdf#123936 Formatting files in module apple_remote with clang-format

Change-Id: Ifd469bf8348c3f35222a2cfae13c66bc444ec1b6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105489
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 

diff --git a/apple_remote/source/AppleRemote.h 
b/apple_remote/source/AppleRemote.h
index f80431bfacbf..a4d6337a641b 100644
--- a/apple_remote/source/AppleRemote.h
+++ b/apple_remote/source/AppleRemote.h
@@ -36,7 +36,8 @@
 /*  Interacts with the Apple Remote Control HID device
 The class is not thread safe
 */
-@interface AppleRemote : HIDRemoteControlDevice {
+@interface AppleRemote : HIDRemoteControlDevice
+{
 }
 
 @end
diff --git a/apple_remote/source/GlobalKeyboardDevice.h 
b/apple_remote/source/GlobalKeyboardDevice.h
index 752b1eecf8c2..97f3eec7ebcb 100644
--- a/apple_remote/source/GlobalKeyboardDevice.h
+++ b/apple_remote/source/GlobalKeyboardDevice.h
@@ -33,23 +33,23 @@
 
 #import 
 
-
 /*
  This class registers for a number of global keyboard shortcuts to simulate a 
remote control
  */
 
-@interface GlobalKeyboardDevice : RemoteControl {
-
+@interface GlobalKeyboardDevice : RemoteControl
+{
 NSMutableDictionary* hotKeyRemoteEventMapping;
 EventHandlerRef eventHandlerRef;
-
 }
 
-- (void) mapRemoteButton: (RemoteControlEventIdentifier) 
remoteButtonIdentifier defaultKeycode: (unsigned int) defaultKeycode 
defaultModifiers: (unsigned int) defaultModifiers;
-
-- (BOOL)registerHotKeyCode: (unsigned int) keycode modifiers: (unsigned int) 
modifiers remoteEventIdentifier: (RemoteControlEventIdentifier) identifier;
-
+- (void)mapRemoteButton:(RemoteControlEventIdentifier)remoteButtonIdentifier
+ defaultKeycode:(unsigned int)defaultKeycode
+   defaultModifiers:(unsigned int)defaultModifiers;
 
+- (BOOL)registerHotKeyCode:(unsigned int)keycode
+ modifiers:(unsigned int)modifiers
+ remoteEventIdentifier:(RemoteControlEventIdentifier)identifier;
 
 @end
 
diff --git a/apple_remote/source/HIDRemoteControlDevice.h 
b/apple_remote/source/HIDRemoteControlDevice.h
index 3f56870579c7..cf81fac85612 100644
--- a/apple_remote/source/HIDRemoteControlDevice.h
+++ b/apple_remote/source/HIDRemoteControlDevice.h
@@ -36,12 +36,13 @@
 /*
 Base class for HID based remote control devices
  */
-@interface HIDRemoteControlDevice : RemoteControl {
+@interface HIDRemoteControlDevice : RemoteControl
+{
 IOHIDDeviceInterface** hidDeviceInterface; // see IOKit/hid/IOHIDLib.h
-IOHIDQueueInterface**  queue;  // IOKit/hid/IOHIDLib.h
-NSMutableArray*allCookies;
-NSMutableDictionary*   cookieToButtonMapping;
-CFRunLoopSourceRef eventSource;
+IOHIDQueueInterface** queue; // IOKit/hid/IOHIDLib.h
+NSMutableArray* allCookies;
+NSMutableDictionary* cookieToButtonMapping;
+CFRunLoopSourceRef eventSource;
 
 BOOL fixSecureEventInputBug;
 BOOL openInExclusiveMode;
@@ -54,15 +55,15 @@
 // may already be received which are put on a backlog. As soon as your main 
thread
 // has some spare time this backlog is processed and may flood your delegate 
with calls.
 // Backlog processing is turned off by default.
-- (BOOL) processesBacklog;
-- (void) setProcessesBacklog: (BOOL) value;
+- (BOOL)processesBacklog;
+- (void)setProcessesBacklog:(BOOL)value;
 
 // methods that should be overwritten by subclasses
-- (void) setCookieMappingInDictionary: (NSMutableDictionary*) 
cookieToButtonMapping;
+- 
(void)setCookieMappingInDictionary:(NSMutableDictionary*)cookieToButtonMapping;
 
-- (void) sendRemoteButtonEvent: (RemoteControlEventIdentifier) event 
pressedDown: (BOOL) pressedDown;
+- (void)sendRemoteButtonEvent:(RemoteControlEventIdentifier)event 
pressedDown:(BOOL)pressedDown;
 
-+ (BOOL) isRemoteAvailable;
++ (BOOL)isRemoteAvailable;
 
 @end
 
diff --git a/apple_remote/source/KeyspanFrontRowControl.h 
b/apple_remote/source/KeyspanFrontRowControl.h
index c75e86b08629..e7f8971fb47d 100644
--- a/apple_remote/source/KeyspanFrontRowControl.h
+++ b/apple_remote/source/KeyspanFrontRowControl.h
@@ -36,8 +36,8 @@
 /*  Interacts with the Keyspan FrontRow Remote Control HID device
 The class is not thread safe
 */
-@interface KeyspanFrontRowControl : HIDRemoteControlDevice {
-
+@interface 

[Libreoffice-commits] core.git: apple_remote/source

2020-02-21 Thread Stephan Bergmann (via logerrit)
 apple_remote/source/HIDRemoteControlDevice.m |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0540b098b7dab73c32947ed4b52cf3068eaa5125
Author: Stephan Bergmann 
AuthorDate: Fri Feb 21 14:52:33 2020 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Feb 21 16:30:11 2020 +0100

Blind fix of -Werror,-Wpointer-to-int-cast in apple_remote

(That warning is probably new in recent Clang 10 trunk, hence the issue 
only got
reported now.)

To me, this looks like a bug introduced with

> commit aaf218d025326ef54dcbc724b33666d7ddcff187
> Author: ericb2 
> AuthorDate: Sun Oct 30 22:57:34 2011 +
> Commit: Thorsten Behrens 
> CommitDate: Mon Dec 5 13:00:11 2011 +0100
>
> Propragating the modif in the implementation 
(HIDRemoteControlDevice.m)
>
>  * found under MIT-style at svn rev 1195272 
(http://svn.apache.org/viewvc?view=revision=1195272)
>
> diff --git a/apple_remote/HIDRemoteControlDevice.m 
b/apple_remote/HIDRemoteControlDevice.m
> index 94215900717b..2cd7506e60d3 100644
> --- a/apple_remote/HIDRemoteControlDevice.m
> +++ b/apple_remote/HIDRemoteControlDevice.m
> @@ -281,7 +281,17 @@ - (void) handleEventWithCookieString: (NSString*) 
cookieString sumOfValues: (SIn
>
> NSNumber* buttonId = [[self cookieToButtonMapping] objectForKey: 
cookieString];
> if (buttonId != nil) {
> -   [self sendRemoteButtonEvent: [buttonId intValue] 
pressedDown: (sumOfValues>0)];
> +   switch ( (int)buttonId )
> +   {
> +   case kMetallicRemote2009ButtonPlay:
> +   case kMetallicRemote2009ButtonMiddlePlay:
> +   buttonId = [NSNumber numberWithInt:kRemoteButtonPlay];
> +   break;
> +   default:
> +   break;
> +   }
> +   [self sendRemoteButtonEvent: [buttonId intValue] pressedDown: 
(sumOfValues>0)];
> +
> } else {
> // let's see if a number of events are stored in the 
cookie string. this does
> // happen when the main thread is too busy to handle all 
incoming events in time.

(which indeed appears to be a faithful copy of all the non-whitespace 
changes
made at the cited 

"Propragating the modif in the implementation (HIDRemoteControlDevice.m)").

I assume that my fix here is what was originally intended, but I don't know 
how
to actually test this code (if it is still testable at all).

Change-Id: If8faa8e068c7d7dffb4677efdaa5896cf6fd4c0e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89209
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/apple_remote/source/HIDRemoteControlDevice.m 
b/apple_remote/source/HIDRemoteControlDevice.m
index 58f936d180cb..9a875d1910c4 100644
--- a/apple_remote/source/HIDRemoteControlDevice.m
+++ b/apple_remote/source/HIDRemoteControlDevice.m
@@ -286,7 +286,7 @@ cleanup:
 
 NSNumber* buttonId = [[self cookieToButtonMapping] objectForKey: 
cookieString];
 if (buttonId != nil) {
-   switch ( (int)buttonId )
+   switch ( [buttonId intValue] )
{
case kMetallicRemote2009ButtonPlay:
case kMetallicRemote2009ButtonMiddlePlay:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: apple_remote/source

2019-04-11 Thread Andrea Gelmini (via logerrit)
 apple_remote/source/KeyspanFrontRowControl.m |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 79ed7a64f6f43dff1d0285d7d450300bc941c251
Author: Andrea Gelmini 
AuthorDate: Wed Apr 10 16:06:17 2019 +
Commit: Julien Nabet 
CommitDate: Thu Apr 11 08:54:41 2019 +0200

Fix typo

Change-Id: I1b5424df5b26cd18b6f28e48b8a1c3e4a3f1d0c8
Reviewed-on: https://gerrit.libreoffice.org/70576
Tested-by: Jenkins
Reviewed-by: himajin10 
Reviewed-by: Julien Nabet 

diff --git a/apple_remote/source/KeyspanFrontRowControl.m 
b/apple_remote/source/KeyspanFrontRowControl.m
index ed0cd106869c..a337c497844f 100644
--- a/apple_remote/source/KeyspanFrontRowControl.m
+++ b/apple_remote/source/KeyspanFrontRowControl.m
@@ -45,7 +45,7 @@
 [_cookieToButtonMapping setObject:[NSNumber 
numberWithInt:kRemoteButtonPlay] forKey:@"11_18_61_10_"];
 [_cookieToButtonMapping setObject:[NSNumber 
numberWithInt:kRemoteButtonRight]forKey:@"11_18_96_10_"];
 [_cookieToButtonMapping setObject:[NSNumber 
numberWithInt:kRemoteButtonLeft] forKey:@"11_18_97_10_"];
-/* hold events are not being send by this device
+/* hold events are not being sent by this device
 [_cookieToButtonMapping setObject:[NSNumber 
numberWithInt:kRemoteButtonRight_Hold]  forKey:@"14_6_4_2_"];
 [_cookieToButtonMapping setObject:[NSNumber 
numberWithInt:kRemoteButtonLeft_Hold]   forKey:@"14_6_3_2_"];
 [_cookieToButtonMapping setObject:[NSNumber 
numberWithInt:kRemoteButtonMenu_Hold]   forKey:@"14_6_14_6_"];
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: apple_remote/source

2019-02-05 Thread Libreoffice Gerrit user
 apple_remote/source/HIDRemoteControlDevice.h |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6770cddd9d8fad5a151129c5f3d17ac2d7d39b9e
Author: Andrea Gelmini 
AuthorDate: Tue Feb 5 22:59:15 2019 +
Commit: Julien Nabet 
CommitDate: Wed Feb 6 07:07:36 2019 +0100

Fix typo

Change-Id: I1ba3434d13b8976ee80a8c45c137dccf27cecac7
Reviewed-on: https://gerrit.libreoffice.org/67432
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/apple_remote/source/HIDRemoteControlDevice.h 
b/apple_remote/source/HIDRemoteControlDevice.h
index f4bc068417da..3f56870579c7 100644
--- a/apple_remote/source/HIDRemoteControlDevice.h
+++ b/apple_remote/source/HIDRemoteControlDevice.h
@@ -50,7 +50,7 @@
 int supportedButtonEvents;
 }
 
-// When your application needs to much time on the main thread when processing 
an event other events
+// When your application needs too much time on the main thread when 
processing an event other events
 // may already be received which are put on a backlog. As soon as your main 
thread
 // has some spare time this backlog is processed and may flood your delegate 
with calls.
 // Backlog processing is turned off by default.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: apple_remote/source

2017-10-11 Thread Julien Nabet
 apple_remote/source/HIDRemoteControlDevice.m |1 -
 1 file changed, 1 deletion(-)

New commits:
commit b8a6998342fbbeb77bca354df306dd94d94d57e9
Author: Julien Nabet 
Date:   Thu Oct 12 07:12:40 2017 +0200

Following tdf#111561: no need to autorelease "elements" (apple_remote)

Change-Id: Ic074af74a9f48618ac1c4b3752b15661f2003815
Reviewed-on: https://gerrit.libreoffice.org/4
Reviewed-by: Julien Nabet 
Tested-by: Julien Nabet 

diff --git a/apple_remote/source/HIDRemoteControlDevice.m 
b/apple_remote/source/HIDRemoteControlDevice.m
index eb62c02f52df..d7aaeaecb4e7 100644
--- a/apple_remote/source/HIDRemoteControlDevice.m
+++ b/apple_remote/source/HIDRemoteControlDevice.m
@@ -424,7 +424,6 @@ static void QueueCallbackFunction(void* target,  IOReturn 
result, void* refcon,
 
if (success == kIOReturnSuccess) {
 
-   [elements autorelease];
/*
cookies = calloc(NUMBER_OF_APPLE_REMOTE_ACTIONS, 
sizeof(IOHIDElementCookie));
memset(cookies, 0, sizeof(IOHIDElementCookie) * 
NUMBER_OF_APPLE_REMOTE_ACTIONS);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: apple_remote/source

2017-10-11 Thread Julien Nabet
 apple_remote/source/HIDRemoteControlDevice.m |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 47039a11dae0a614213cae136fe705d32f9efa1c
Author: Julien Nabet 
Date:   Wed Oct 11 19:08:39 2017 +0200

tdf#111561: try to fix leak in HIDRemoteControlDevice (apple_remote)

Change-Id: I6539f1cc9612eb3380381a54d3d1d674fd66cc03
Reviewed-on: https://gerrit.libreoffice.org/43329
Tested-by: Jenkins 
Reviewed-by: Julien Nabet 

diff --git a/apple_remote/source/HIDRemoteControlDevice.m 
b/apple_remote/source/HIDRemoteControlDevice.m
index b96ac721b3b3..eb62c02f52df 100644
--- a/apple_remote/source/HIDRemoteControlDevice.m
+++ b/apple_remote/source/HIDRemoteControlDevice.m
@@ -452,6 +452,8 @@ static void QueueCallbackFunction(void* target,  IOReturn 
result, void* refcon,
 
[allCookies addObject: [NSNumber 
numberWithInt:(int)cookie]];
}
+CFRelease(elements);
+elements=nil;
} else {
return NO;
}
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: apple_remote/source include/apple_remote

2017-08-20 Thread Julien Nabet
 apple_remote/source/HIDRemoteControlDevice.m |   12 ++--
 apple_remote/source/RemoteControl.m  |8 
 include/apple_remote/RemoteControl.h |4 ++--
 3 files changed, 12 insertions(+), 12 deletions(-)

New commits:
commit 59fd62fc2ff86320da67f99171eedbfe2d931c2b
Author: Julien Nabet 
Date:   Sun Aug 20 22:28:39 2017 +0200

Typo notifcation->notification

Change-Id: I411105f1a3d519dd08bee55c722e4a06a14f238d
Reviewed-on: https://gerrit.libreoffice.org/41368
Tested-by: Jenkins 
Reviewed-by: Julien Nabet 

diff --git a/apple_remote/source/HIDRemoteControlDevice.m 
b/apple_remote/source/HIDRemoteControlDevice.m
index ba1ebb25d243..b96ac721b3b3 100644
--- a/apple_remote/source/HIDRemoteControlDevice.m
+++ b/apple_remote/source/HIDRemoteControlDevice.m
@@ -43,7 +43,7 @@
 - (IOHIDQueueInterface**) queue;
 - (IOHIDDeviceInterface**) hidDeviceInterface;
 - (void) handleEventWithCookieString: (NSString*) cookieString sumOfValues: 
(SInt32) sumOfValues;
-- (void) removeNotifcationObserver;
+- (void) removeNotificationObserver;
 - (void) remoteControlAvailable:(NSNotification *)notification;
 
 @end
@@ -96,7 +96,7 @@
 }
 
 - (void) dealloc {
-   [self removeNotifcationObserver];
+   [self removeNotificationObserver];
[self stopListening:self];
[cookieToButtonMapping release];
[super dealloc];
@@ -168,7 +168,7 @@
 
if ([self isOpenInExclusiveMode] && fixSecureEventInputBug) 
EnableSecureEventInput();
 
-   [self removeNotifcationObserver];
+   [self removeNotificationObserver];
 
io_object_t hidDevice = [[self class] findRemoteDevice];
if (hidDevice == 0) return;
@@ -240,7 +240,7 @@ cleanup:
if ([self isOpenInExclusiveMode] && fixSecureEventInputBug) 
DisableSecureEventInput();
 
if ([self isOpenInExclusiveMode] && sendNotification) {
-   [[self class] sendFinishedNotifcationForAppIdentifier: nil];
+   [[self class] sendFinishedNotificationForAppIdentifier: nil];
}
// be KVO friendly
[self willChangeValueForKey:@"listeningToRemote"];
@@ -320,13 +320,13 @@ cleanup:
}
 }
 
-- (void) removeNotifcationObserver {
+- (void) removeNotificationObserver {
[[NSDistributedNotificationCenter defaultCenter] removeObserver:self 
name:FINISHED_USING_REMOTE_CONTROL_NOTIFICATION object:nil];
 }
 
 - (void) remoteControlAvailable:(NSNotification *)notification {
 (void)notification;
-   [self removeNotifcationObserver];
+   [self removeNotificationObserver];
[self startListening: self];
 }
 
diff --git a/apple_remote/source/RemoteControl.m 
b/apple_remote/source/RemoteControl.m
index 1f1b7f179350..9cf840527bd3 100644
--- a/apple_remote/source/RemoteControl.m
+++ b/apple_remote/source/RemoteControl.m
@@ -34,7 +34,7 @@
 // notification names that are being used to signal that an application wants 
to
 // have access to the remote control device or if the application has finished
 // using the remote control device
-NSString* REQUEST_FOR_REMOTE_CONTROL_NOTIFCATION = 
@"mac.remotecontrols.RequestForRemoteControl";
+NSString* REQUEST_FOR_REMOTE_CONTROL_NOTIFICATION = 
@"mac.remotecontrols.RequestForRemoteControl";
 NSString* FINISHED_USING_REMOTE_CONTROL_NOTIFICATION = 
@"mac.remotecontrols.FinishedUsingRemoteControl";
 
 // keys used in user objects for distributed notifications
@@ -132,14 +132,14 @@ NSString* kTargetApplicationIdentifier = 
@"TargetBundleIdentifier";
  deliverImmediately:YES];
 }
 
-+ (void) sendFinishedNotifcationForAppIdentifier: (NSString*) identifier {
++ (void) sendFinishedNotificationForAppIdentifier: (NSString*) identifier {
 [self 
sendDistributedNotification:FINISHED_USING_REMOTE_CONTROL_NOTIFICATION 
targetBundleIdentifier:identifier];
 #ifdef DEBUG
-NSLog( @"Apple RemoteControl: sendFinishedNotifcationForAppIdentifier 
...");
+NSLog( @"Apple RemoteControl: sendFinishedNotificationForAppIdentifier 
...");
 #endif
 }
 + (void) sendRequestForRemoteControlNotification {
-[self sendDistributedNotification:REQUEST_FOR_REMOTE_CONTROL_NOTIFCATION 
targetBundleIdentifier:nil];
+[self sendDistributedNotification:REQUEST_FOR_REMOTE_CONTROL_NOTIFICATION 
targetBundleIdentifier:nil];
 #ifdef DEBUG
 NSLog( @"Apple RemoteControl: sendRequestForRemoteControlNotification 
...");
 #endif
diff --git a/include/apple_remote/RemoteControl.h 
b/include/apple_remote/RemoteControl.h
index 0b943920e6ee..2d9c189b8e31 100644
--- a/include/apple_remote/RemoteControl.h
+++ b/include/apple_remote/RemoteControl.h
@@ -38,7 +38,7 @@
 // notification names that are being used to signal that an application wants 
to
 // have access to the remote control device or if the application has finished
 // using the remote control device
-extern NSString* 

[Libreoffice-commits] core.git: apple_remote/source

2017-03-30 Thread Stephan Bergmann
 apple_remote/source/RemoteControlContainer.m |   18 ++
 1 file changed, 6 insertions(+), 12 deletions(-)

New commits:
commit 817b026bcb07bc71355d7d0f68d184e66d1b7bd1
Author: Stephan Bergmann 
Date:   Thu Mar 30 10:26:24 2017 +0200

loplugin:loopvartoosmall

Change-Id: Idd385c764778313bfb419a04ca7a3884b78e88f6

diff --git a/apple_remote/source/RemoteControlContainer.m 
b/apple_remote/source/RemoteControlContainer.m
index 0071c80301b6..14ecb36f1336 100644
--- a/apple_remote/source/RemoteControlContainer.m
+++ b/apple_remote/source/RemoteControlContainer.m
@@ -92,15 +92,13 @@
 }
 
 - (void) setListeningToRemote: (BOOL) value {
-unsigned int i;
-for(i=0; i < [remoteControls count]; i++) {
+for(NSUInteger i=0; i < [remoteControls count]; i++) {
 [[remoteControls objectAtIndex: i] setListeningToRemote: value];
 }
 if (value && value != [self isListeningToRemote]) [self 
performSelector:@selector(reset) withObject:nil afterDelay:0.01];
 }
 - (BOOL) isListeningToRemote {
-unsigned int i;
-for(i=0; i < [remoteControls count]; i++) {
+for(NSUInteger i=0; i < [remoteControls count]; i++) {
 if ([[remoteControls objectAtIndex: i] isListeningToRemote]) {
 return YES;
 }
@@ -112,8 +110,7 @@
 #ifdef DEBUG
 NSLog(@"Apple Remote: start listening to events... ");
 #endif
-unsigned int i;
-for(i=0; i < [remoteControls count]; i++) {
+for(NSUInteger i=0; i < [remoteControls count]; i++) {
 [[remoteControls objectAtIndex: i] startListening: sender];
 }
 }
@@ -121,23 +118,20 @@
 #ifdef DEBUG
 NSLog(@"Apple Remote: stopListening to events... ");
 #endif
-unsigned int i;
-for(i=0; i < [remoteControls count]; i++) {
+for(NSUInteger i=0; i < [remoteControls count]; i++) {
 [[remoteControls objectAtIndex: i] stopListening: sender];
 }
 }
 
 - (BOOL) isOpenInExclusiveMode {
 BOOL mode = YES;
-unsigned int i;
-for(i=0; i < [remoteControls count]; i++) {
+for(NSUInteger i=0; i < [remoteControls count]; i++) {
 mode = mode && ([[remoteControls objectAtIndex: i] 
isOpenInExclusiveMode]);
 }
 return mode;
 }
 - (void) setOpenInExclusiveMode: (BOOL) value {
-unsigned int i;
-for(i=0; i < [remoteControls count]; i++) {
+for(NSUInteger i=0; i < [remoteControls count]; i++) {
 [[remoteControls objectAtIndex: i] setOpenInExclusiveMode:value];
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: apple_remote/source

2017-01-09 Thread Stephan Bergmann
 apple_remote/source/AppleRemote.m  |2 +-
 apple_remote/source/MultiClickRemoteBehavior.m |4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 04900bf971196a3b27473fd35d4726cd8cadd0e0
Author: Stephan Bergmann 
Date:   Mon Jan 9 20:02:01 2017 +0100

loplugin:externvar

Change-Id: I35449ee2d7294024fde83e36af83311a08a7ccae

diff --git a/apple_remote/source/AppleRemote.m 
b/apple_remote/source/AppleRemote.m
index 48dd9ef..fe50af4 100644
--- a/apple_remote/source/AppleRemote.m
+++ b/apple_remote/source/AppleRemote.m
@@ -37,7 +37,7 @@
 #import 
 #import 
 
-const char* AppleRemoteDeviceName = "AppleIRController";
+static const char* AppleRemoteDeviceName = "AppleIRController";
 
 @implementation AppleRemote
 
diff --git a/apple_remote/source/MultiClickRemoteBehavior.m 
b/apple_remote/source/MultiClickRemoteBehavior.m
index 0972a5a..f69f13a 100644
--- a/apple_remote/source/MultiClickRemoteBehavior.m
+++ b/apple_remote/source/MultiClickRemoteBehavior.m
@@ -31,8 +31,8 @@
 
 #import "MultiClickRemoteBehavior.h"
 
-const NSTimeInterval DEFAULT_MAXIMUM_CLICK_TIME_DIFFERENCE = 0.35;
-const NSTimeInterval HOLD_RECOGNITION_TIME_INTERVAL = 0.4;
+static const NSTimeInterval DEFAULT_MAXIMUM_CLICK_TIME_DIFFERENCE = 0.35;
+static const NSTimeInterval HOLD_RECOGNITION_TIME_INTERVAL = 0.4;
 
 @implementation MultiClickRemoteBehavior
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: apple_remote/source vcl/osx

2016-10-05 Thread Stephan Bergmann
 apple_remote/source/RemoteMainController.m |3 ++
 vcl/osx/DropTarget.cxx |5 
 vcl/osx/a11ytextattributeswrapper.mm   |6 
 vcl/osx/salframe.cxx   |   28 +++
 vcl/osx/salframeview.mm|   35 +
 vcl/osx/salinst.cxx|   27 ++
 vcl/osx/salmenu.cxx|9 +++
 vcl/osx/salnsmenu.mm   |   10 
 vcl/osx/saltimer.cxx   |3 ++
 vcl/osx/vclnsapp.mm|   13 ++
 10 files changed, 139 insertions(+)

New commits:
commit a6c88e4bf1d148ac462c2bcd7061eff602b627d6
Author: Stephan Bergmann 
Date:   Wed Oct 5 20:29:06 2016 +0200

SAL_WNODEPRECATED_DECLARATIONS_PUSH/POP around new macOS 10.12 deprecations

...for now

Change-Id: I64a0a8f6a006d75b6f82d7aae570aef414984a78

diff --git a/apple_remote/source/RemoteMainController.m 
b/apple_remote/source/RemoteMainController.m
index 79af22f..9e933a3 100644
--- a/apple_remote/source/RemoteMainController.m
+++ b/apple_remote/source/RemoteMainController.m
@@ -85,6 +85,8 @@
 
 - (void) postTheEvent: (short int)buttonIdentifier 
modifierFlags:(int)modifierFlags
 {
+SAL_WNODEPRECATED_DECLARATIONS_PUSH
+// 'NSApplicationDefined' is deprecated: first deprecated in macOS 
10.12
 [NSApp postEvent:
 [NSEventotherEventWithType:NSApplicationDefined
 location:NSZeroPoint
@@ -96,6 +98,7 @@
 data1: buttonIdentifier
 data2: 0]
 atStart: NO];
+SAL_WNODEPRECATED_DECLARATIONS_POP
 }
 
 
diff --git a/vcl/osx/DropTarget.cxx b/vcl/osx/DropTarget.cxx
index 9253598..2da3805 100644
--- a/vcl/osx/DropTarget.cxx
+++ b/vcl/osx/DropTarget.cxx
@@ -371,7 +371,12 @@ void SAL_CALL DropTarget::initialize(const Sequence< Any 
>& aArguments)
 
 id wnd = [mView window];
 NSWindow* parentWnd = [wnd parentWindow];
+SAL_WNODEPRECATED_DECLARATIONS_PUSH
+// 'NSClosableWindowMask' is deprecated: first deprecated in macOS 
10.12
+// 'NSResizableWindowMask' is deprecated: first deprecated in macOS 
10.12
+// 'NSTitleWindowMask' is deprecated: first deprecated in macOS 10.12
 unsigned int topWndStyle = (NSTitledWindowMask | NSClosableWindowMask | 
NSResizableWindowMask);
+SAL_WNODEPRECATED_DECLARATIONS_POP
 unsigned int wndStyles = [wnd styleMask] & topWndStyle;
 
 if (parentWnd == nil && (wndStyles == topWndStyle))
diff --git a/vcl/osx/a11ytextattributeswrapper.mm 
b/vcl/osx/a11ytextattributeswrapper.mm
index 546c312..6483c01 100644
--- a/vcl/osx/a11ytextattributeswrapper.mm
+++ b/vcl/osx/a11ytextattributeswrapper.mm
@@ -272,6 +272,11 @@ using namespace ::com::sun::star::uno;
 sal_Int32 alignment;
 property.Value >>= alignment;
 NSNumber *textAlignment = nil;
+SAL_WNODEPRECATED_DECLARATIONS_PUSH
+// 'NSCenterTextAlignment' is deprecated: first deprecated in macOS 10.12
+// 'NSJustifiedTextAlignment' is deprecated: first deprecated in macOS 
10.12
+// 'NSLeftTextAlignment' is deprecated: first deprecated in macOS 10.12
+// 'NSRightTextAlignment' is deprecated: first deprecated in macOS 10.12
 switch(alignment) {
 case css::style::ParagraphAdjust_RIGHT : textAlignment = 
[NSNumber numberWithInteger:NSRightTextAlignment]; break;
 case css::style::ParagraphAdjust_CENTER: textAlignment = 
[NSNumber numberWithInteger:NSCenterTextAlignment]   ; break;
@@ -279,6 +284,7 @@ using namespace ::com::sun::star::uno;
 case css::style::ParagraphAdjust_LEFT  :
 default : 
textAlignment = [NSNumber numberWithInteger:NSLeftTextAlignment] ; break;
 }
+SAL_WNODEPRECATED_DECLARATIONS_POP
 NSDictionary *paragraphStyle = [NSDictionary 
dictionaryWithObjectsAndKeys:textAlignment, @"AXTextAlignment", textAlignment, 
@"AXVisualTextAlignment", nil];
 [string addAttribute:@"AXParagraphStyle" value:paragraphStyle 
range:range];
 }
diff --git a/vcl/osx/salframe.cxx b/vcl/osx/salframe.cxx
index a5214b7..fad4e6b 100644
--- a/vcl/osx/salframe.cxx
+++ b/vcl/osx/salframe.cxx
@@ -151,6 +151,12 @@ void AquaSalFrame::initWindowAndView()
 maGeometry.nHeight = static_cast(aVisibleRect.size.height * 
0.8);
 
 // calculate style mask
+SAL_WNODEPRECATED_DECLARATIONS_PUSH
+// 'NSBorderlessWindowMask' is deprecated: first deprecated in macOS 
10.12
+// 'NSClosableWindowMask' is deprecated: first deprecated in macOS 
10.12
+// 'NSMiniaturizableWindowMask' is deprecated: first deprecated in 
macOS 10.12
+// 'NSResizableWindowMask' is deprecated: first deprecated in macOS 
10.12
+// 'NSTitledWindowMask' is deprecated: first 

[Libreoffice-commits] core.git: apple_remote/source

2016-03-07 Thread Douglas Mencken
 apple_remote/source/RemoteMainController.m |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit d676bd620afe47a0b7a445d864bfcdd2e6e3473f
Author: Douglas Mencken 
Date:   Mon Mar 7 06:23:31 2016 -0500

apple_remote: autorelease --> release in dealloc (destructor)

using autorelease here leads to “just leaking” because there's no 
autorelease pool for thread
besides, make sure that released fields do not contain 
used•to•be•a•valid•pointer value

Change-Id: Id6cb37643230f64dbe9f6128f52236f04d0c88e4
Reviewed-on: https://gerrit.libreoffice.org/22981
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 

diff --git a/apple_remote/source/RemoteMainController.m 
b/apple_remote/source/RemoteMainController.m
index 1972c5f..79af22f 100644
--- a/apple_remote/source/RemoteMainController.m
+++ b/apple_remote/source/RemoteMainController.m
@@ -155,9 +155,9 @@
 }
 
 - (void) dealloc {
-[remoteControl autorelease];
-   [remoteControlBehavior autorelease];
-   [super dealloc];
+[ remoteControl release ]; remoteControl = nil;
+[ remoteControlBehavior release ]; remoteControlBehavior = nil;
+[super dealloc];
 }
 
 // for bindings access
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: apple_remote/source

2016-03-07 Thread Douglas Mencken
 apple_remote/source/RemoteMainController.m |8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

New commits:
commit 487ba71c9ea30fe3b77dfc15e86d67f44c7cc79a
Author: Douglas Mencken 
Date:   Thu Mar 3 06:57:58 2016 -0500

apple_remote: fix “variable set but not used” for non-debug builds

Change-Id: I038fd0bee0e983a91557226aaba1dcff56512ccb
Reviewed-on: https://gerrit.libreoffice.org/22856
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 

diff --git a/apple_remote/source/RemoteMainController.m 
b/apple_remote/source/RemoteMainController.m
index 82dd055..1972c5f 100644
--- a/apple_remote/source/RemoteMainController.m
+++ b/apple_remote/source/RemoteMainController.m
@@ -102,15 +102,15 @@
 - (void) remoteButton: (RemoteControlEventIdentifier)buttonIdentifier 
pressedDown: (BOOL) pressedDown clickCount: (unsigned int)clickCount
 {
 (void)clickCount;
-NSString* pressed = @"";
 #ifdef DEBUG
+NSString* pressed = @"";
 NSString* buttonName = nil;
 #endif
 if (pressedDown)
 {
+#ifdef DEBUG
 pressed = @"(AppleRemoteMainController: button pressed)";
 
-#ifdef DEBUG
 switch(buttonIdentifier)
 {
 case kRemoteButtonPlus: buttonName = @"Volume up"; 
 break;  // MEDIA_COMMAND_VOLUME_UP  ( see include/vcl/commandevent.hxx )
@@ -134,14 +134,16 @@
 }
 else // not pressed
 {
+#ifdef DEBUG
 pressed = @"(AppleRemoteMainController: button released)";
+#endif
 }
 
 #ifdef DEBUG
//NSLog(@"Button %@ pressed %@", buttonName, pressed);
NSString* clickCountString = @"";
if (clickCount > 1) clickCountString = [NSString stringWithFormat: @"%d 
clicks", clickCount];
-   NSString* feedbackString = [NSString stringWithFormat:@"(Value:%4d) %@  
%@ %@",buttonIdentifier, buttonName, pressed, clickCountString];
+   NSString* feedbackString = [NSString stringWithFormat:@"(Value:%4d) %@  
%@ %@", buttonIdentifier, buttonName, pressed, clickCountString];
 
// print out events
NSLog(@"%@", feedbackString);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: apple_remote/source

2014-11-01 Thread Andrea Gelmini
 apple_remote/source/AppleRemote.h|2 +-
 apple_remote/source/HIDRemoteControlDevice.h |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 87578eb519c6280c1d67083d4028f5cee5371113
Author: Andrea Gelmini andrea.gelm...@gelma.net
Date:   Thu Oct 30 10:23:54 2014 +0100

Fixed license encoding to have all the same apple_remote/source/*

Change-Id: Ibeee5a8c49f2d4710de6a1e0ee2013f3755a177b
Reviewed-on: https://gerrit.libreoffice.org/12149
Reviewed-by: Samuel Mehrbrodt s.mehrbr...@gmail.com
Tested-by: Samuel Mehrbrodt s.mehrbr...@gmail.com

diff --git a/apple_remote/source/AppleRemote.h 
b/apple_remote/source/AppleRemote.h
index 0e4187f..f80431b 100644
--- a/apple_remote/source/AppleRemote.h
+++ b/apple_remote/source/AppleRemote.h
@@ -19,7 +19,7 @@
  * The above copyright notice and this permission notice shall be included
  * in all copies or substantial portions of the Software.
  *
- * THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, 
EXPRESS OR
+ * THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS 
OR
  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
diff --git a/apple_remote/source/HIDRemoteControlDevice.h 
b/apple_remote/source/HIDRemoteControlDevice.h
index be975fb..f4bc068 100644
--- a/apple_remote/source/HIDRemoteControlDevice.h
+++ b/apple_remote/source/HIDRemoteControlDevice.h
@@ -19,7 +19,7 @@
  * The above copyright notice and this permission notice shall be included
  * in all copies or substantial portions of the Software.
  *
- * THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, 
EXPRESS OR
+ * THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS 
OR
  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: apple_remote/source

2014-02-25 Thread Alexander Wilms
 apple_remote/source/AppleRemote.m  |   22 -
 apple_remote/source/HIDRemoteControlDevice.m   |   10 ++--
 apple_remote/source/KeyspanFrontRowControl.m   |   34 +++---
 apple_remote/source/MultiClickRemoteBehavior.m |   58 -
 apple_remote/source/RemoteMainController.m |4 -
 5 files changed, 64 insertions(+), 64 deletions(-)

New commits:
commit b2afdb85c30c27c7fce96f206aeb115cb2a193ab
Author: Alexander Wilms f.alexander.wi...@gmail.com
Date:   Tue Feb 25 17:23:41 2014 +0100

Remove visual noise from apple_remote

Change-Id: I12bec42cb699d8cbcfab2eb4d2f8ad8f5ed83b78
Reviewed-on: https://gerrit.libreoffice.org/8229
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/apple_remote/source/AppleRemote.m 
b/apple_remote/source/AppleRemote.m
index 8f1b2ce..48dd9ef 100644
--- a/apple_remote/source/AppleRemote.m
+++ b/apple_remote/source/AppleRemote.m
@@ -3,13 +3,13 @@
  * RemoteControlWrapper.m
  * RemoteControlWrapper
  *
- * Created by Martin Kahr on 11.03.06 under a MIT-style license. 
+ * Created by Martin Kahr on 11.03.06 under a MIT-style license.
  * Copyright (c) 2006 martinkahr.com. All rights reserved.
  *
- * Code modified and adapted to OpenOffice.org 
+ * Code modified and adapted to OpenOffice.org
  * by Eric Bachard on 11.08.2008 under the same license
  *
- * Permission is hereby granted, free of charge, to any person obtaining a 
+ * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the Software),
  * to deal in the Software without restriction, including without limitation
  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
@@ -21,7 +21,7 @@
  *
  * THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS 
OR
  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 
FROM,
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
@@ -45,15 +45,15 @@ const char* AppleRemoteDeviceName = AppleIRController;
return AppleRemoteDeviceName;
 }
 
-- (void) setCookieMappingInDictionary: (NSMutableDictionary*) 
_cookieToButtonMapping   {   
-
-// TODO : avoid such magics 
+- (void) setCookieMappingInDictionary: (NSMutableDictionary*) 
_cookieToButtonMapping   {
+
+// TODO : avoid such magics
 #ifdef DEBUG
 NSLog( @Apple Remote: setting 10.6 cookies );
 #endif
 // 10.6.x Snow Leopard
 [_cookieToButtonMapping setObject:[NSNumber 
numberWithInt:kRemoteButtonPlus]   forKey:@33_31_30_21_20_2_];
-[_cookieToButtonMapping setObject:[NSNumber 
numberWithInt:kRemoteButtonMinus]  forKey:@33_32_30_21_20_2_];   
+[_cookieToButtonMapping setObject:[NSNumber 
numberWithInt:kRemoteButtonMinus]  forKey:@33_32_30_21_20_2_];
 [_cookieToButtonMapping setObject:[NSNumber 
numberWithInt:kRemoteButtonMenu]   
forKey:@33_22_21_20_2_33_22_21_20_2_];
 [_cookieToButtonMapping setObject:[NSNumber 
numberWithInt:kRemoteButtonPlay]   
forKey:@33_23_21_20_2_33_23_21_20_2_];
 [_cookieToButtonMapping setObject:[NSNumber 
numberWithInt:kRemoteButtonRight]  
forKey:@33_24_21_20_2_33_24_21_20_2_];
@@ -72,10 +72,10 @@ const char* AppleRemoteDeviceName = AppleIRController;
if (pressedDown == NO  event == kRemoteButtonMenu_Hold) {
// There is no separate event for pressed down on menu hold. We 
are simulating that event here
[super sendRemoteButtonEvent:event pressedDown:YES];
-   }   
-   
+   }
+
[super sendRemoteButtonEvent:event pressedDown:pressedDown];
-   
+
if (pressedDown  (event == kRemoteButtonRight || event == 
kRemoteButtonLeft || event == kRemoteButtonPlay || event == kRemoteButtonMenu 
|| event == kRemoteButtonPlay_Hold)) {
// There is no separate event when the button is being 
released. We are simulating that event here
[super sendRemoteButtonEvent:event pressedDown:NO];
diff --git a/apple_remote/source/HIDRemoteControlDevice.m 
b/apple_remote/source/HIDRemoteControlDevice.m
index cffcfa0..e820348 100644
--- a/apple_remote/source/HIDRemoteControlDevice.m
+++ b/apple_remote/source/HIDRemoteControlDevice.m
@@ -149,23 +149,23 @@
if ([self isListeningToRemote]) return;
 
// 4th July 2007
-   //
+
// A security update in february of 2007 introduced an odd behavior.
// Whenever SecureEventInput is activated or deactivated the exclusive 
access
// to the 

[Libreoffice-commits] core.git: apple_remote/source

2014-02-10 Thread Herbert Dürr
 apple_remote/source/AppleRemote.m|2 -
 apple_remote/source/GlobalKeyboardDevice.m   |2 -
 apple_remote/source/HIDRemoteControlDevice.m |   16 ++--
 apple_remote/source/RemoteControl.m  |   34 ++-
 apple_remote/source/RemoteControlContainer.m |   12 -
 apple_remote/source/RemoteMainController.m   |6 ++--
 6 files changed, 37 insertions(+), 35 deletions(-)

New commits:
commit 9d5841aa433ee325b702c3a8c4c8784052e09b3a
Author: Herbert Dürr h...@apache.org
Date:   Mon Feb 10 14:36:17 2014 +

Resolved: #i124201# mark debug-infos from the apple_remote...

module appropriately

to make the source of some log messages more clear

(cherry picked from commit fe4ae4735c5a5e2b2210e684e97228cd91174e4c)

Conflicts:
apple_remote/AppleRemote.m
apple_remote/source/HIDRemoteControlDevice.m
apple_remote/source/RemoteControl.m
apple_remote/source/RemoteControlContainer.m

Change-Id: Ie57114f4d2d67f258808d03e01dff8bc05ba9f2c

diff --git a/apple_remote/source/AppleRemote.m 
b/apple_remote/source/AppleRemote.m
index 120297e..8f1b2ce 100644
--- a/apple_remote/source/AppleRemote.m
+++ b/apple_remote/source/AppleRemote.m
@@ -49,7 +49,7 @@ const char* AppleRemoteDeviceName = AppleIRController;
 
 // TODO : avoid such magics 
 #ifdef DEBUG
-NSLog( @setting 10.6 cookies );
+NSLog( @Apple Remote: setting 10.6 cookies );
 #endif
 // 10.6.x Snow Leopard
 [_cookieToButtonMapping setObject:[NSNumber 
numberWithInt:kRemoteButtonPlus]   forKey:@33_31_30_21_20_2_];
diff --git a/apple_remote/source/GlobalKeyboardDevice.m 
b/apple_remote/source/GlobalKeyboardDevice.m
index 27322d2..f5ecb1f 100644
--- a/apple_remote/source/GlobalKeyboardDevice.m
+++ b/apple_remote/source/GlobalKeyboardDevice.m
@@ -112,7 +112,7 @@ static OSStatus hotKeyEventHandler(EventHandlerCallRef, 
EventRef, void*);
break;
default:
 #ifdef DEBUG
-   NSLog(@Unknown global keyboard defaults key for remote 
button identifier %d, remoteButtonIdentifier);
+   NSLog( @Apple Remote: Unknown global keyboard defaults 
key for button identifier %d, remoteButtonIdentifier);
 #endif
 break;
}
diff --git a/apple_remote/source/HIDRemoteControlDevice.m 
b/apple_remote/source/HIDRemoteControlDevice.m
index c7c6263..cffcfa0 100644
--- a/apple_remote/source/HIDRemoteControlDevice.m
+++ b/apple_remote/source/HIDRemoteControlDevice.m
@@ -279,7 +279,7 @@ cleanup:
/*
if (previousRemainingCookieString) {
cookieString = [previousRemainingCookieString 
stringByAppendingString: cookieString];
-   NSLog(@New cookie string is %@, cookieString);
+   NSLog( @Apple Remote: New cookie string is %@, cookieString);
[previousRemainingCookieString release], 
previousRemainingCookieString=nil;
}*/
if (cookieString == nil || [cookieString length] == 0) return;
@@ -315,7 +315,7 @@ cleanup:
[self handleEventWithCookieString: lastSubCookieString 
sumOfValues:0];
}
if ([cookieString length]  0) {
-   NSLog(@Unknown button for cookiestring %@, 
cookieString);
+   NSLog( @Apple Remote: Unknown button for cookiestring 
%@, cookieString);
}
}
 }
@@ -339,7 +339,7 @@ static void QueueCallbackFunction(void* target,  IOReturn 
result, void* refcon,
 (void)refcon;
 (void)sender;
if ((intptr_t)target  0) {
-   NSLog(@QueueCallbackFunction called with invalid target!);
+   NSLog( @Apple Remote: QueueCallbackFunction called with 
invalid target!);
return;
}
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
@@ -381,7 +381,7 @@ static void QueueCallbackFunction(void* target,  IOReturn 
result, void* refcon,
ioReturnValue = IOObjectGetClass(hidDevice, className);
 
if (ioReturnValue != kIOReturnSuccess) {
-   NSLog(@Error: Failed to get class name.);
+   NSLog( @Apple Remote: Error: Failed to get RemoteControlDevice 
class name.);
return NULL;
}
 
@@ -396,7 +396,7 @@ static void QueueCallbackFunction(void* target,  IOReturn 
result, void* refcon,
plugInResult = 
(*plugInInterface)-QueryInterface(plugInInterface, 
CFUUIDGetUUIDBytes(kIOHIDDeviceInterfaceID), (LPVOID) hidDeviceInterface);
 
if (plugInResult != S_OK) {
-   NSLog(@Error: Couldn't create HID class device 
interface);
+   NSLog( @Apple Remote: Error: Couldn't create HID class 
device interface);
}
// Release
if (plugInInterface) 
(*plugInInterface)-Release(plugInInterface);
@@ -489,13 +489,13 @@ static void