summaryrefslogtreecommitdiffstats
path: root/vcl
diff options
context:
space:
mode:
authorHerbert Dürr <hdu@apache.org>2014-02-06 14:07:50 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-02-06 20:57:54 +0000
commit3c7530411e8f466d9949d998ec40773e4e9a762e (patch)
treefc3a57c307d99e72d47b4845e190be09b2d8ac91 /vcl
parentTypo: applictaion -> application (diff)
downloadcore-3c7530411e8f466d9949d998ec40773e4e9a762e.tar.gz
core-3c7530411e8f466d9949d998ec40773e4e9a762e.zip
Related: #i123795# add a windowForParent() method for AquaA11yWrapper
for getting the parent window of an A11y enabled NSView. The method viewElementForParent() was abused for that purpose, but it was mis-named and mis-typed. The new method cleans this up and the now unused viewElementForParent() method can be retired. (cherry picked from commit 96cd47d49a3aa5b1e3b96b649f40e516ca568d4b) Conflicts: vcl/osx/a11ywrapper.mm vcl/osx/salframeview.mm Change-Id: Ib88aa1ad442d3b8fb3adbf7a76b3ed8ca268fa87 (cherry picked from commit a7d6569fdecc36bd5ca093442a9b7aec093637d5)
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/osx/a11ywrapper.h2
-rw-r--r--vcl/inc/osx/salframeview.h2
-rw-r--r--vcl/osx/a11ywrapper.mm8
-rw-r--r--vcl/osx/salframeview.mm6
4 files changed, 8 insertions, 10 deletions
diff --git a/vcl/inc/osx/a11ywrapper.h b/vcl/inc/osx/a11ywrapper.h
index 7f291b45ab71..a49230b7cb0e 100644
--- a/vcl/inc/osx/a11ywrapper.h
+++ b/vcl/inc/osx/a11ywrapper.h
@@ -86,7 +86,7 @@ struct ReferenceWrapper
// Wrapper-specific
-(void)setActsAsRadioGroup:(BOOL)actsAsRadioGroup;
-(BOOL)actsAsRadioGroup;
--(NSView *)viewElementForParent;
+-(NSWindow*)windowForParent;
-(id)initWithAccessibleContext: (::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleContext >) anAccessibleContext;
-(void) setDefaults: (::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessibleContext >) rxAccessibleContext;
-(void) dealloc;
diff --git a/vcl/inc/osx/salframeview.h b/vcl/inc/osx/salframeview.h
index db3d588dec70..fa3222e1b916 100644
--- a/vcl/inc/osx/salframeview.h
+++ b/vcl/inc/osx/salframeview.h
@@ -174,7 +174,7 @@
-(void)resetCursorRects;
-(::com::sun::star::accessibility::XAccessibleContext *)accessibleContext;
-(id)parentAttribute;
--(NSView *)viewElementForParent;
+-(NSWindow*)windowForParent;
/*
Event hook for D&D service.
diff --git a/vcl/osx/a11ywrapper.mm b/vcl/osx/a11ywrapper.mm
index 85ee3ff3ab05..da7f202ff62e 100644
--- a/vcl/osx/a11ywrapper.mm
+++ b/vcl/osx/a11ywrapper.mm
@@ -397,8 +397,8 @@ static std::ostream &operator<<(std::ostream &s, NSPoint point) {
[ aWrapper autorelease ];
}
// get associated NSWindow
- NSView * theView = [ aWrapper viewElementForParent ];
- return theView;
+ NSWindow* theWindow = [ aWrapper windowForParent ];
+ return theWindow;
}
-(id)topLevelUIElementAttribute {
@@ -1125,8 +1125,8 @@ Reference < XAccessibleContext > hitTestRunner ( com::sun::star::awt::Point poin
return mpReferenceWrapper -> rAccessibleTextMarkup.get();
}
--(NSView *)viewElementForParent {
- return self;
+-(NSWindow*)windowForParent {
+ return [self window];
}
// These four are for AXTextAreas only. They are needed, because bold and italic
diff --git a/vcl/osx/salframeview.mm b/vcl/osx/salframeview.mm
index 3fc51245ec54..a8fda42f2e97 100644
--- a/vcl/osx/salframeview.mm
+++ b/vcl/osx/salframeview.mm
@@ -1740,11 +1740,9 @@ private:
return [ super accessibleContext ];
}
--(NSView*)viewElementForParent
+-(NSWindow*)windowForParent
{
- // Interestingly enough, despite being declared as returning a NSView*, what this method actually
- // does return is a NSWindow*, and that is what the caller expects. Go figure.
- return (NSView*) mpFrame->getNSWindow();
+ return mpFrame->getNSWindow();
}
-(void)registerMouseEventListener: (id)theListener