diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-11-15 16:46:24 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-11-15 19:29:54 +0100 |
commit | 72bc1fad399f78c48b186dee8759e12654cdf5d5 (patch) | |
tree | dd11834938445223a69c62986987b00be8228c37 /vcl/osx/a11ywrapper.mm | |
parent | 565bcfbdcbebc68c07eee9a30e0f82b0fdf7e846 (diff) |
loplugin:fakebool and loplugin:consttobool (macOS)
Change-Id: I42d6546a9a400d8edb9ecef82614c6c88d4e6e83
Reviewed-on: https://gerrit.libreoffice.org/82806
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'vcl/osx/a11ywrapper.mm')
-rw-r--r-- | vcl/osx/a11ywrapper.mm | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/vcl/osx/a11ywrapper.mm b/vcl/osx/a11ywrapper.mm index 5af3d5f3a8ef..ec09d61b479b 100644 --- a/vcl/osx/a11ywrapper.mm +++ b/vcl/osx/a11ywrapper.mm @@ -59,7 +59,7 @@ using namespace ::com::sun::star::uno; -(Reference<XAccessibleContext>)accessibleContext; @end -static BOOL isPopupMenuOpen = NO; +static bool isPopupMenuOpen = false; static std::ostream &operator<<(std::ostream &s, NSObject *obj) { return s << [[obj description] UTF8String]; @@ -710,7 +710,7 @@ static std::ostream &operator<<(std::ostream &s, NSObject *obj) { if ( isPopupMenuOpen ) { return NO; } - BOOL ignored = NO; + bool ignored = false; sal_Int16 nRole = [ self accessibleContext ] -> getAccessibleRole(); switch ( nRole ) { //case AccessibleRole::PANEL: @@ -719,7 +719,7 @@ static std::ostream &operator<<(std::ostream &s, NSObject *obj) { case AccessibleRole::SEPARATOR: case AccessibleRole::FILLER: case AccessibleRole::DIALOG: - ignored = YES; + ignored = true; break; default: ignored = ! ( [ self accessibleContext ] -> getAccessibleStateSet() -> contains ( AccessibleStateType::VISIBLE ) ); @@ -811,7 +811,7 @@ static std::ostream &operator<<(std::ostream &s, NSObject *obj) { -(BOOL)accessibilityIsAttributeSettable:(NSString *)attribute { SAL_INFO("vcl.a11y", "[" << self << " accessibilityAttributeIsSettable:" << attribute << "]"); - BOOL isSettable = NO; + bool isSettable = false; if ( [ self accessibleText ] ) { isSettable = [ AquaA11yTextWrapper isAttributeSettable: attribute forElement: self ]; } @@ -904,7 +904,7 @@ static std::ostream &operator<<(std::ostream &s, NSObject *obj) { // get some information NSString * role = static_cast<NSString *>([ self accessibilityAttributeValue: NSAccessibilityRoleAttribute ]); id enabledAttr = [ self enabledAttribute ]; - BOOL enabled = [ enabledAttr boolValue ]; + bool enabled = [ enabledAttr boolValue ]; NSView * parent = static_cast<NSView *>([ self accessibilityAttributeValue: NSAccessibilityParentAttribute ]); AquaA11yWrapper * parentAsWrapper = nil; if ( [ parent isKindOfClass: [ AquaA11yWrapper class ] ] ) { @@ -953,7 +953,7 @@ static std::ostream &operator<<(std::ostream &s, NSObject *obj) { #pragma mark Hit Test -(BOOL)isViewElement:(NSObject *)viewElement hitByPoint:(NSPoint)point { - BOOL hit = NO; + bool hit = false; NSAutoreleasePool * pool = [ [ NSAutoreleasePool alloc ] init ]; SAL_WNODEPRECATED_DECLARATIONS_PUSH //TODO: 10.10 accessibilityAttributeValue: @@ -966,7 +966,7 @@ static std::ostream &operator<<(std::ostream &s, NSObject *obj) { float maxX = minX + [ size sizeValue ].width; float maxY = minY + [ size sizeValue ].height; if ( minX < point.x && maxX > point.x && minY < point.y && maxY > point.y ) { - hit = YES; + hit = true; } } [ pool release ]; |