[Libreoffice-commits] dev-tools.git: NSAXSpy/NSAXSpy
NSAXSpy/NSAXSpy/main.m |8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) New commits: commit fe19c2d72aeb763e6d7cbc970b6bebe5cf6ae22a Author: Boris Dušek Date: Sat Sep 7 11:46:25 2013 +0200 Adjust NSAXSpy for current TextMate version. The code for finding the TextMate text component was written before TextMate's text component was added to a group with related elements. So it now has to be adjusted to find that group before finding the scroll area containing the text component. Change-Id: Ib1aa2ecb0fa3a206b50c23362f4f83183f1630f7 Reviewed-on: https://gerrit.libreoffice.org/5854 Reviewed-by: Boris Dušek Tested-by: Boris Dušek diff --git a/NSAXSpy/NSAXSpy/main.m b/NSAXSpy/NSAXSpy/main.m index 47490f1..6afc20d 100644 --- a/NSAXSpy/NSAXSpy/main.m +++ b/NSAXSpy/NSAXSpy/main.m @@ -128,9 +128,11 @@ static AXError findTextMateTextComponent(AXObserverCallback callback, AXObserver AXError err = kAXErrorSuccess; AX_APPLICATION(@"TextMate", TextMate, callback, observer) { AX_CHILD(TextMate, Window, 0, window) { -AX_CHILD(window, ScrollArea, 0, scrollArea) { -AX_CHILD(scrollArea, TextArea, 0, textArea) { -*component = textArea; +AX_CHILD(window, Group, 0, group) { +AX_CHILD(group, ScrollArea, 0, scrollArea) { +AX_CHILD(scrollArea, TextArea, 0, textArea) { +*component = textArea; +} } } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] dev-tools.git: NSAXSpy/NSAXSpy
NSAXSpy/NSAXSpy/main.m | 20 1 file changed, 20 insertions(+) New commits: commit 20277bef69f8f13dd74a07a0883d65b106871c7f Author: Boris Dušek Date: Mon Aug 5 23:24:15 2013 +0200 Add code to "spy" on Pages text component. Change-Id: I0150a79c313e2f0dca8651befd819095bf9d74ea Reviewed-on: https://gerrit.libreoffice.org/5289 Reviewed-by: Norbert Thiebaud Tested-by: Norbert Thiebaud diff --git a/NSAXSpy/NSAXSpy/main.m b/NSAXSpy/NSAXSpy/main.m index e96ed40..47490f1 100644 --- a/NSAXSpy/NSAXSpy/main.m +++ b/NSAXSpy/NSAXSpy/main.m @@ -154,6 +154,26 @@ static AXError findLibreOfficeTextComponent(AXObserverCallback callback, AXObser return err; } +static AXError findPagesTextComponent(AXObserverCallback callback, AXObserverRef *observer, AXUIElementRef *component) { +AXError err = kAXErrorSuccess; +AX_APPLICATION(@"Pages", Pages, callback, observer) { +AX_CHILD(Pages, Window, 0, window) { +AX_CHILD(window, SplitGroup, 0, splitGroup) { +AX_CHILD(splitGroup, ScrollArea, 0, scrollArea) { +AX_CHILD(scrollArea, LayoutArea, 0, layoutArea) { +AX_CHILD(layoutArea, Group, 0, group) { +AX_CHILD(group, TextArea, 0, textArea) { +*component = textArea; +} +} +} +} +} +} +} +return err; +} + static AXError reportOnAXTextArea(AXUIElementRef textArea) { AXError err = kAXErrorSuccess; AX_VALUE(textArea, CFNumberRef, length, NumberOfCharacters) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] dev-tools.git: NSAXSpy/NSAXSpy
NSAXSpy/NSAXSpy/main.m | 21 + 1 file changed, 21 insertions(+) New commits: commit c6332b0e1c80e84fa380324e7f2214aa119b5f04 Author: Boris Dušek Date: Tue Jul 30 19:55:41 2013 +0200 Add license to NSAXSpy - Simplified BSD License Change-Id: Ie0d9bb13a29001f255d4a8529e22375842a3470a Reviewed-on: https://gerrit.libreoffice.org/5204 Reviewed-by: Norbert Thiebaud Tested-by: Norbert Thiebaud diff --git a/NSAXSpy/NSAXSpy/main.m b/NSAXSpy/NSAXSpy/main.m index d504d65..e96ed40 100644 --- a/NSAXSpy/NSAXSpy/main.m +++ b/NSAXSpy/NSAXSpy/main.m @@ -5,6 +5,27 @@ // Created by Boris Dušek on 14.10.12. // Copyright (c) 2012 Boris Dušek. All rights reserved. // +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// 1. Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// //This tool currently logs the AXAttributedString of the first AXTextArea //found in LibreOffice (suited for Writer), and logs all AXValueChanged //and AXSelectedTextChanged notifications of that AXTextArea and also all ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits