[Libreoffice-commits] core.git: accessibility/bridge accessibility/CustomTarget_bridge_inc.mk accessibility/CustomTarget_bridge.mk accessibility/Jar_uno_accessbridge.mk accessibility/Library_java_uno_accessbridge.mk accessibility/Module_accessibility.mk config_host.mk.in configure.ac desktop/source include/vcl offapi/com offapi/UnoApi_offapi.mk padmin/source postprocess/Rdb_services.mk Repository.mk RepositoryModule_host.mk scp2/source vcl/inc vcl/source vcl/win winaccessibility/Module_winaccessibility.mk
David Ostrovsky
david at ostrovsky.org
Thu Dec 5 03:32:06 PST 2013
Repository.mk | 4
RepositoryModule_host.mk | 2
accessibility/CustomTarget_bridge.mk | 33
accessibility/CustomTarget_bridge_inc.mk | 23
accessibility/Jar_uno_accessbridge.mk | 80 -
accessibility/Library_java_uno_accessbridge.mk | 32
accessibility/Module_accessibility.mk | 11
accessibility/bridge/org/openoffice/accessibility/AccessBridge.java | 232 ---
accessibility/bridge/org/openoffice/accessibility/KeyHandler.java | 125 -
accessibility/bridge/org/openoffice/accessibility/PopupWindow.java | 203 --
accessibility/bridge/org/openoffice/accessibility/WindowsAccessBridgeAdapter.java | 645 --------
accessibility/bridge/org/openoffice/accessibility/java_uno_accessbridge.component | 25
accessibility/bridge/org/openoffice/accessibility/manifest | 2
accessibility/bridge/org/openoffice/java/accessibility/AbstractButton.java | 163 --
accessibility/bridge/org/openoffice/java/accessibility/AccessibleActionImpl.java | 62
accessibility/bridge/org/openoffice/java/accessibility/AccessibleComponentImpl.java | 223 --
accessibility/bridge/org/openoffice/java/accessibility/AccessibleEditableTextImpl.java | 351 ----
accessibility/bridge/org/openoffice/java/accessibility/AccessibleExtendedState.java | 44
accessibility/bridge/org/openoffice/java/accessibility/AccessibleHypertextImpl.java | 180 --
accessibility/bridge/org/openoffice/java/accessibility/AccessibleIconImpl.java | 64
accessibility/bridge/org/openoffice/java/accessibility/AccessibleKeyBinding.java | 376 ----
accessibility/bridge/org/openoffice/java/accessibility/AccessibleObjectFactory.java | 534 -------
accessibility/bridge/org/openoffice/java/accessibility/AccessibleRoleAdapter.java | 139 -
accessibility/bridge/org/openoffice/java/accessibility/AccessibleSelectionImpl.java | 90 -
accessibility/bridge/org/openoffice/java/accessibility/AccessibleStateAdapter.java | 205 --
accessibility/bridge/org/openoffice/java/accessibility/AccessibleTextImpl.java | 663 --------
accessibility/bridge/org/openoffice/java/accessibility/AccessibleValueImpl.java | 87 -
accessibility/bridge/org/openoffice/java/accessibility/Alert.java | 57
accessibility/bridge/org/openoffice/java/accessibility/Application.java | 36
accessibility/bridge/org/openoffice/java/accessibility/Button.java | 148 -
accessibility/bridge/org/openoffice/java/accessibility/CheckBox.java | 41
accessibility/bridge/org/openoffice/java/accessibility/ComboBox.java | 114 -
accessibility/bridge/org/openoffice/java/accessibility/Component.java | 728 ---------
accessibility/bridge/org/openoffice/java/accessibility/Container.java | 754 ----------
accessibility/bridge/org/openoffice/java/accessibility/DescendantManager.java | 149 -
accessibility/bridge/org/openoffice/java/accessibility/Dialog.java | 642 --------
accessibility/bridge/org/openoffice/java/accessibility/FocusTraversalPolicy.java | 80 -
accessibility/bridge/org/openoffice/java/accessibility/Frame.java | 659 --------
accessibility/bridge/org/openoffice/java/accessibility/Icon.java | 64
accessibility/bridge/org/openoffice/java/accessibility/Label.java | 118 -
accessibility/bridge/org/openoffice/java/accessibility/List.java | 434 -----
accessibility/bridge/org/openoffice/java/accessibility/Menu.java | 321 ----
accessibility/bridge/org/openoffice/java/accessibility/MenuContainer.java | 156 --
accessibility/bridge/org/openoffice/java/accessibility/MenuItem.java | 90 -
accessibility/bridge/org/openoffice/java/accessibility/NativeFrame.java | 26
accessibility/bridge/org/openoffice/java/accessibility/Paragraph.java | 211 --
accessibility/bridge/org/openoffice/java/accessibility/RadioButton.java | 40
accessibility/bridge/org/openoffice/java/accessibility/ScrollBar.java | 114 -
accessibility/bridge/org/openoffice/java/accessibility/Separator.java | 57
accessibility/bridge/org/openoffice/java/accessibility/Table.java | 709 ---------
accessibility/bridge/org/openoffice/java/accessibility/TextComponent.java | 182 --
accessibility/bridge/org/openoffice/java/accessibility/ToggleButton.java | 53
accessibility/bridge/org/openoffice/java/accessibility/ToolTip.java | 105 -
accessibility/bridge/org/openoffice/java/accessibility/Tree.java | 751 ---------
accessibility/bridge/org/openoffice/java/accessibility/Window.java | 564 -------
accessibility/bridge/org/openoffice/java/accessibility/logging/XAccessibleEventLog.java | 178 --
accessibility/bridge/org/openoffice/java/accessibility/logging/XAccessibleHypertextLog.java | 51
accessibility/bridge/org/openoffice/java/accessibility/logging/XAccessibleTextLog.java | 261 ---
accessibility/bridge/source/java/WindowsAccessBridgeAdapter.cxx | 300 ---
config_host.mk.in | 1
configure.ac | 20
desktop/source/app/app.cxx | 7
include/vcl/svapp.hxx | 2
offapi/UnoApi_offapi.mk | 3
offapi/com/sun/star/accessibility/AccessBridge.idl | 47
padmin/source/pamain.cxx | 8
postprocess/Rdb_services.mk | 7
scp2/source/ooo/file_ooo.scp | 4
vcl/inc/pch/precompiled_vcl.hxx | 1
vcl/inc/svdata.hxx | 2
vcl/inc/svids.hrc | 10
vcl/source/app/settings.cxx | 3
vcl/source/app/svapp.cxx | 10
vcl/source/app/svdata.cxx | 255 ---
vcl/source/src/stdtext.src | 50
vcl/win/source/window/salframe.cxx | 4
winaccessibility/Module_winaccessibility.mk | 2
77 files changed, 36 insertions(+), 13191 deletions(-)
New commits:
commit 130833f80e89774269108cf30b2d1155a00354ce
Author: David Ostrovsky <david at ostrovsky.org>
Date: Tue Nov 26 15:05:51 2013 +0100
fdo#39956 Delete JAB
JAB has been discontinued in favor of the native IA2 bridge.
Change-Id: I88461f73c620507d3e97b077ea2abdd2229322e1
Reviewed-on: https://gerrit.libreoffice.org/6819
Reviewed-by: David Ostrovsky <David.Ostrovsky at gmx.de>
Tested-by: David Ostrovsky <David.Ostrovsky at gmx.de>
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
Reviewed-by: Michael Stahl <mstahl at redhat.com>
diff --git a/Repository.mk b/Repository.mk
index 02bfe0c..5405d69 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -553,9 +553,6 @@ $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
ftransl \
$(if $(DISABLE_ATL),,\
inprocserv \
- ) \
- $(if $(ENABLE_JAVA),java_uno_accessbridge) \
- $(if $(ENABLE_IA2), \
UAccCOM \
winaccessibility \
) \
@@ -662,7 +659,6 @@ $(eval $(call gb_Helper_register_jars,OOO, \
fax \
form \
htmlsoff \
- java_uno_accessbridge \
letter \
officebean \
pexcel \
diff --git a/RepositoryModule_host.mk b/RepositoryModule_host.mk
index 91141f1..48d5518 100644
--- a/RepositoryModule_host.mk
+++ b/RepositoryModule_host.mk
@@ -142,7 +142,7 @@ $(eval $(call gb_Module_add_moduledirs,libreoffice,\
uui \
vbahelper \
vcl \
- $(if $(ENABLE_IA2),winaccessibility) \
+ winaccessibility \
wizards \
writerfilter \
writerperfect \
diff --git a/accessibility/CustomTarget_bridge.mk b/accessibility/CustomTarget_bridge.mk
deleted file mode 100644
index 85f278e..0000000
--- a/accessibility/CustomTarget_bridge.mk
+++ /dev/null
@@ -1,33 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-
-$(eval $(call gb_CustomTarget_CustomTarget,accessibility/bridge))
-
-$(call gb_CustomTarget_get_target,accessibility/bridge) : \
- $(call gb_CustomTarget_get_workdir,accessibility/bridge)/org/openoffice/java/accessibility/Build.java
-
-ifeq ($(ENABLE_DBGUTIL),TRUE)
-accessibility_DEBUG := true
-accessibility_PRODUCT := false
-else
-accessibility_DEBUG := false
-accessibility_PRODUCT := true
-endif
-
-$(call gb_CustomTarget_get_workdir,accessibility/bridge)/org/openoffice/java/accessibility/Build.java :
- $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ECH,1)
- mkdir -p $(dir $@) && (\
- echo package org.openoffice.java.accessibility\; && \
- echo public class Build \{ && \
- echo public static final boolean DEBUG = $(accessibility_DEBUG)\; && \
- echo public static final boolean PRODUCT = $(accessibility_PRODUCT)\; && \
- echo \} \
- ) > $@
-
-# vim: set ts=4 sw=4 et:
diff --git a/accessibility/CustomTarget_bridge_inc.mk b/accessibility/CustomTarget_bridge_inc.mk
deleted file mode 100644
index 8160e6a..0000000
--- a/accessibility/CustomTarget_bridge_inc.mk
+++ /dev/null
@@ -1,23 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-
-$(eval $(call gb_CustomTarget_CustomTarget,accessibility/bridge/inc))
-
-$(call gb_CustomTarget_get_target,accessibility/bridge/inc) : \
- $(call gb_CustomTarget_get_workdir,accessibility/bridge/inc)/WindowsAccessBridgeAdapter.h
-
-$(call gb_CustomTarget_get_workdir,accessibility/bridge/inc)/WindowsAccessBridgeAdapter.h :| \
- $(call gb_CustomTarget_get_workdir,accessibility/bridge/inc)/.dir \
- $(call gb_Jar_get_target,java_uno_accessbridge)
- $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),JVH,1)
- cd $(call gb_JavaClassSet_get_classdir,$(call gb_Jar_get_classsetname,java_uno_accessbridge)) && \
- javah -classpath "$(call gb_Jar_get_target,ridl)$(gb_CLASSPATHSEP)$(call gb_Jar_get_target,unoil)$(gb_CLASSPATHSEP)." \
- -o $@ org.openoffice.accessibility.WindowsAccessBridgeAdapter
-
-# vim: set ts=4 sw=4 et:
diff --git a/accessibility/Jar_uno_accessbridge.mk b/accessibility/Jar_uno_accessbridge.mk
deleted file mode 100644
index 8078535..0000000
--- a/accessibility/Jar_uno_accessbridge.mk
+++ /dev/null
@@ -1,80 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-
-$(eval $(call gb_Jar_Jar,java_uno_accessbridge))
-
-$(eval $(call gb_Jar_use_jars,java_uno_accessbridge,\
- jurt \
- ridl \
- unoil \
-))
-
-$(eval $(call gb_Jar_set_packageroot,java_uno_accessbridge,org))
-
-$(eval $(call gb_Jar_set_manifest,java_uno_accessbridge,$(SRCDIR)/accessibility/bridge/org/openoffice/accessibility/manifest))
-
-$(eval $(call gb_Jar_set_componentfile,java_uno_accessbridge,accessibility/bridge/org/openoffice/accessibility/java_uno_accessbridge,OOO))
-
-$(eval $(call gb_Jar_add_sourcefiles,java_uno_accessbridge,\
- accessibility/bridge/org/openoffice/accessibility/AccessBridge \
- accessibility/bridge/org/openoffice/accessibility/KeyHandler \
- accessibility/bridge/org/openoffice/accessibility/PopupWindow \
- accessibility/bridge/org/openoffice/accessibility/WindowsAccessBridgeAdapter \
- accessibility/bridge/org/openoffice/java/accessibility/AbstractButton \
- accessibility/bridge/org/openoffice/java/accessibility/AccessibleActionImpl \
- accessibility/bridge/org/openoffice/java/accessibility/AccessibleComponentImpl \
- accessibility/bridge/org/openoffice/java/accessibility/AccessibleEditableTextImpl \
- accessibility/bridge/org/openoffice/java/accessibility/AccessibleExtendedState \
- accessibility/bridge/org/openoffice/java/accessibility/AccessibleHypertextImpl \
- accessibility/bridge/org/openoffice/java/accessibility/AccessibleIconImpl \
- accessibility/bridge/org/openoffice/java/accessibility/AccessibleKeyBinding \
- accessibility/bridge/org/openoffice/java/accessibility/AccessibleObjectFactory \
- accessibility/bridge/org/openoffice/java/accessibility/AccessibleRoleAdapter \
- accessibility/bridge/org/openoffice/java/accessibility/AccessibleSelectionImpl \
- accessibility/bridge/org/openoffice/java/accessibility/AccessibleStateAdapter \
- accessibility/bridge/org/openoffice/java/accessibility/AccessibleTextImpl \
- accessibility/bridge/org/openoffice/java/accessibility/AccessibleValueImpl \
- accessibility/bridge/org/openoffice/java/accessibility/Alert \
- accessibility/bridge/org/openoffice/java/accessibility/Application \
- accessibility/bridge/org/openoffice/java/accessibility/Button \
- accessibility/bridge/org/openoffice/java/accessibility/CheckBox \
- accessibility/bridge/org/openoffice/java/accessibility/ComboBox \
- accessibility/bridge/org/openoffice/java/accessibility/Component \
- accessibility/bridge/org/openoffice/java/accessibility/Container \
- accessibility/bridge/org/openoffice/java/accessibility/DescendantManager \
- accessibility/bridge/org/openoffice/java/accessibility/Dialog \
- accessibility/bridge/org/openoffice/java/accessibility/FocusTraversalPolicy \
- accessibility/bridge/org/openoffice/java/accessibility/Frame \
- accessibility/bridge/org/openoffice/java/accessibility/Icon \
- accessibility/bridge/org/openoffice/java/accessibility/Label \
- accessibility/bridge/org/openoffice/java/accessibility/List \
- accessibility/bridge/org/openoffice/java/accessibility/Menu \
- accessibility/bridge/org/openoffice/java/accessibility/MenuContainer \
- accessibility/bridge/org/openoffice/java/accessibility/MenuItem \
- accessibility/bridge/org/openoffice/java/accessibility/NativeFrame \
- accessibility/bridge/org/openoffice/java/accessibility/Paragraph \
- accessibility/bridge/org/openoffice/java/accessibility/RadioButton \
- accessibility/bridge/org/openoffice/java/accessibility/ScrollBar \
- accessibility/bridge/org/openoffice/java/accessibility/Separator \
- accessibility/bridge/org/openoffice/java/accessibility/Table \
- accessibility/bridge/org/openoffice/java/accessibility/TextComponent \
- accessibility/bridge/org/openoffice/java/accessibility/ToggleButton \
- accessibility/bridge/org/openoffice/java/accessibility/ToolTip \
- accessibility/bridge/org/openoffice/java/accessibility/Tree \
- accessibility/bridge/org/openoffice/java/accessibility/Window \
- accessibility/bridge/org/openoffice/java/accessibility/logging/XAccessibleEventLog \
- accessibility/bridge/org/openoffice/java/accessibility/logging/XAccessibleHypertextLog \
- accessibility/bridge/org/openoffice/java/accessibility/logging/XAccessibleTextLog \
-))
-
-$(eval $(call gb_Jar_add_generated_sourcefiles,java_uno_accessbridge,\
- CustomTarget/accessibility/bridge/org/openoffice/java/accessibility/Build \
-))
-
-# vim:set noet sw=4 ts=4:
diff --git a/accessibility/Library_java_uno_accessbridge.mk b/accessibility/Library_java_uno_accessbridge.mk
deleted file mode 100644
index 2c643e0..0000000
--- a/accessibility/Library_java_uno_accessbridge.mk
+++ /dev/null
@@ -1,32 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-
-$(eval $(call gb_Library_Library,java_uno_accessbridge))
-
-$(eval $(call gb_Library_use_custom_headers,java_uno_accessbridge,accessibility/bridge/inc))
-
-$(eval $(call gb_Library_use_external,java_uno_accessbridge,boost_headers))
-
-$(eval $(call gb_Library_use_sdk_api,java_uno_accessbridge,))
-
-$(eval $(call gb_Library_use_libraries,java_uno_accessbridge,\
- cppu \
- jvmaccess \
- sal \
- salhelper \
- tl \
- vcl \
- $(gb_UWINAPI) \
-))
-
-$(eval $(call gb_Library_add_exception_objects,java_uno_accessbridge,\
- accessibility/bridge/source/java/WindowsAccessBridgeAdapter \
-))
-
-# vim:set noet sw=4 ts=4:
diff --git a/accessibility/Module_accessibility.mk b/accessibility/Module_accessibility.mk
index e5e090c..1c565a5 100644
--- a/accessibility/Module_accessibility.mk
+++ b/accessibility/Module_accessibility.mk
@@ -17,15 +17,4 @@ $(eval $(call gb_Module_add_l10n_targets,accessibility,\
AllLangResTarget_acc \
))
-ifneq ($(ENABLE_JAVA),)
-ifeq ($(OS),WNT)
-$(eval $(call gb_Module_add_targets,accessibility,\
- CustomTarget_bridge \
- CustomTarget_bridge_inc \
- Jar_uno_accessbridge \
- Library_java_uno_accessbridge \
-))
-endif
-endif
-
# vim:set noet sw=4 ts=4:
diff --git a/accessibility/bridge/org/openoffice/accessibility/AccessBridge.java b/accessibility/bridge/org/openoffice/accessibility/AccessBridge.java
deleted file mode 100644
index ebd0552..0000000
--- a/accessibility/bridge/org/openoffice/accessibility/AccessBridge.java
+++ /dev/null
@@ -1,232 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-package org.openoffice.accessibility;
-
-import com.sun.star.accessibility.AccessibleRole;
-import com.sun.star.accessibility.XAccessible;
-import com.sun.star.accessibility.XAccessibleContext;
-import com.sun.star.awt.XExtendedToolkit;
-import com.sun.star.awt.XTopWindowListener;
-import com.sun.star.comp.loader.FactoryHelper;
-import com.sun.star.lang.XComponent;
-import com.sun.star.lang.XInitialization;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.lang.XSingleServiceFactory;
-import com.sun.star.registry.*;
-import com.sun.star.uno.*;
-
-import org.openoffice.java.accessibility.*;
-
-import java.awt.EventQueue;
-import java.awt.Window;
-
-
-public class AccessBridge {
- //
- protected static java.util.HashMap<String, Window> topWindowMap = new java.util.HashMap<String, Window>();
-
- private static java.awt.Window getTopWindowImpl(XAccessible xAccessible) {
- // Because it can not be garantied that
- // WindowsAccessBridgeAdapter.registerTopWindow() is called
- // before windowOpened(), we have to make this operation
- // atomic.
- synchronized (topWindowMap) {
- String oid = UnoRuntime.generateOid(xAccessible);
- java.awt.Window w = topWindowMap.get(oid);
-
- if (w == null) {
- w = AccessibleObjectFactory.getTopWindow(xAccessible);
-
- if (w != null) {
- topWindowMap.put(oid, w);
- }
- }
-
- return w;
- }
- }
-
- protected static java.awt.Window getTopWindow(XAccessible xAccessible) {
- if (xAccessible != null) {
- XAccessibleContext xAccessibleContext = xAccessible.getAccessibleContext();
- if (xAccessibleContext != null) {
-
- // Toolkit reports the VCL peer windows as toplevels. These have an
- // accessible parent which represents the native frame window
- switch(xAccessibleContext.getAccessibleRole()) {
- case AccessibleRole.ROOT_PANE:
- case AccessibleRole.POPUP_MENU:
- return getTopWindow(xAccessibleContext.getAccessibleParent());
-
- case AccessibleRole.WINDOW:
- case AccessibleRole.FRAME:
- case AccessibleRole.DIALOG:
- case AccessibleRole.ALERT:
- return getTopWindowImpl(xAccessible);
-
- default:
- break;
- }
- }
- }
-
- return null;
- }
-
- protected static java.awt.Window removeTopWindow(XAccessible xAccessible) {
- if (xAccessible != null) {
- XAccessibleContext xAccessibleContext = xAccessible.getAccessibleContext();
- if (xAccessibleContext != null) {
-
- // Toolkit reports the VCL peer windows as toplevels. These have an
- // accessible parent which represents the native frame window
- switch(xAccessibleContext.getAccessibleRole()) {
- case AccessibleRole.ROOT_PANE:
- case AccessibleRole.POPUP_MENU:
- return removeTopWindow(xAccessibleContext.getAccessibleParent());
-
- case AccessibleRole.WINDOW:
- case AccessibleRole.FRAME:
- case AccessibleRole.DIALOG:
- return topWindowMap.remove(UnoRuntime.generateOid(xAccessible));
-
- default:
- break;
- }
- }
- }
-
- return null;
- }
-
- public static XSingleServiceFactory __getServiceFactory(String implName,
- XMultiServiceFactory multiFactory, XRegistryKey regKey) {
- XSingleServiceFactory xSingleServiceFactory = null;
-
- if (implName.equals(AccessBridge.class.getName())) {
- // Initialize toolkit to register at Java <-> Windows access bridge
- java.awt.Toolkit.getDefaultToolkit();
-
- xSingleServiceFactory = FactoryHelper.getServiceFactory(_AccessBridge.class,
- _AccessBridge._serviceName, multiFactory, regKey);
- }
-
- return xSingleServiceFactory;
- }
-
- static public class _AccessBridge implements XTopWindowListener,
- XInitialization, XComponent {
- static final String _serviceName = "com.sun.star.accessibility.AccessBridge";
- XComponentContext xComponentContext;
-
- public _AccessBridge(XComponentContext xComponentContext) {
- this.xComponentContext = xComponentContext;
- }
-
- /*
- * XInitialization
- */
- public void initialize(java.lang.Object[] arguments) {
- try {
- // FIXME: Currently there is no way to determine if key event forwarding is needed or not,
- // so we have to do it always ..
- XExtendedToolkit unoToolkit = (XExtendedToolkit) AnyConverter.toObject(new Type(
- XExtendedToolkit.class), arguments[0]);
-
- if (unoToolkit != null) {
- // FIXME this should be done in VCL
- unoToolkit.addTopWindowListener(this);
-
- String os = System.getProperty("os.name");
-
- // Try to initialize the WindowsAccessBridgeAdapter
- if (os.startsWith("Windows")) {
- WindowsAccessBridgeAdapter.attach(xComponentContext);
- } else {
- unoToolkit.addKeyHandler(new KeyHandler());
- }
- } else if (Build.DEBUG) {
- System.err.println(
- "argument 0 is not of type XExtendedToolkit.");
- }
- } catch (com.sun.star.lang.IllegalArgumentException e) {
- // FIXME: output
- }
- }
-
- /*
- * XTopWindowListener
- */
- public void windowOpened(com.sun.star.lang.EventObject event) {
- XAccessible xAccessible = UnoRuntime.queryInterface(XAccessible.class,
- event.Source);
- java.awt.Window w = getTopWindow(xAccessible);
- }
-
- public void windowActivated(com.sun.star.lang.EventObject event) {
- }
-
- public void windowDeactivated(com.sun.star.lang.EventObject event) {
- }
-
- public void windowMinimized(com.sun.star.lang.EventObject event) {
- }
-
- public void windowNormalized(com.sun.star.lang.EventObject event) {
- }
-
- public void windowClosing(com.sun.star.lang.EventObject event) {
- }
-
- public void windowClosed(com.sun.star.lang.EventObject event) {
- XAccessible xAccessible = UnoRuntime.queryInterface(XAccessible.class,
- event.Source);
-
- java.awt.Window w = removeTopWindow(xAccessible);
-
- if (w != null) {
- w.dispose();
- }
- }
-
- public void disposing(com.sun.star.lang.EventObject event) {
- }
-
- /*
- * XComponent
- */
-
- public void addEventListener(com.sun.star.lang.XEventListener listener) {
- }
-
- public void removeEventListener(com.sun.star.lang.XEventListener listener) {
- }
-
- public void dispose() {
- try {
- EventQueue.invokeAndWait(
- new Runnable() {
- public void run() {
- }
- } );
- } catch (java.lang.InterruptedException e) {
- } catch (java.lang.reflect.InvocationTargetException e) {
- }
- }
- }
-}
diff --git a/accessibility/bridge/org/openoffice/accessibility/KeyHandler.java b/accessibility/bridge/org/openoffice/accessibility/KeyHandler.java
deleted file mode 100644
index 0975839..0000000
--- a/accessibility/bridge/org/openoffice/accessibility/KeyHandler.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-
-package org.openoffice.accessibility;
-
-import com.sun.star.awt.XKeyHandler;
-import org.openoffice.java.accessibility.AccessibleKeyBinding;
-import java.awt.*;
-import java.awt.event.KeyEvent;
-
-public class KeyHandler extends Component implements XKeyHandler, java.awt.KeyEventDispatcher {
- EventQueue eventQueue;
-
- public class VCLKeyEvent extends KeyEvent implements Runnable {
- boolean consumed = true;
-
- public VCLKeyEvent(Component c, int id, int modifiers, int keyCode, char keyChar) {
- super(c, id, System.currentTimeMillis(), modifiers, keyCode, keyChar);
- }
-
- public void run() {
- // This is a no-op ..
- }
-
- public void setConsumed(boolean b) {
- consumed = b;
- }
-
- public boolean isConsumed() {
- return consumed;
- }
- }
-
- public KeyHandler() {
- eventQueue = Toolkit.getDefaultToolkit().getSystemEventQueue();
- java.awt.KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(this);
- }
-
- /** This method is called by the current KeyboardFocusManager requesting that this KeyEventDispatcher
- * dispatch the specified event on its behalf
- */
- public boolean dispatchKeyEvent(java.awt.event.KeyEvent e) {
- if (e instanceof VCLKeyEvent) {
- VCLKeyEvent event = (VCLKeyEvent) e;
- event.setConsumed(false);
- return true;
- }
- return false;
- }
-
- /** Handler for KeyPressed events */
- public boolean keyPressed(com.sun.star.awt.KeyEvent event) {
-// try {
- VCLKeyEvent vke = new VCLKeyEvent(this, KeyEvent.KEY_PRESSED,
- AccessibleKeyBinding.convertModifiers(event.Modifiers),
- AccessibleKeyBinding.convertKeyCode(event.KeyCode),
- event.KeyChar != 0 ? event.KeyChar : KeyEvent.CHAR_UNDEFINED);
-
- eventQueue.postEvent(vke);
-
- // VCL events for TABs have empty KeyChar
- if (event.KeyCode == com.sun.star.awt.Key.TAB ) {
- event.KeyChar = '\t';
- }
-
- // Synthesize KEY_TYPED event to emulate Java behavior
- if (event.KeyChar != 0) {
- eventQueue.postEvent(new VCLKeyEvent(this,
- KeyEvent.KEY_TYPED,
- AccessibleKeyBinding.convertModifiers(event.Modifiers),
- KeyEvent.VK_UNDEFINED,
- event.KeyChar));
- }
-
- // Wait until the key event is processed
- return false;
-// eventQueue.invokeAndWait(vke);
-// return vke.isConsumed();
-// } catch(java.lang.InterruptedException e) {
-// return false;
-// } catch(java.lang.reflect.InvocationTargetException e) {
-// return false;
-// }
- }
-
- /** Handler for KeyReleased events */
- public boolean keyReleased(com.sun.star.awt.KeyEvent event) {
-// try {
- VCLKeyEvent vke = new VCLKeyEvent(this, KeyEvent.KEY_RELEASED,
- AccessibleKeyBinding.convertModifiers(event.Modifiers),
- AccessibleKeyBinding.convertKeyCode(event.KeyCode),
- event.KeyChar != 0 ? event.KeyChar : KeyEvent.CHAR_UNDEFINED);
- eventQueue.postEvent(vke);
-
- // Wait until the key event is processed
- return false;
-// eventQueue.invokeAndWait(vke);
-// return vke.isConsumed();
-// } catch(java.lang.InterruptedException e) {
-// return false;
-// } catch(java.lang.reflect.InvocationTargetException e) {
-// return false;
-// }
- }
-
- public void disposing(com.sun.star.lang.EventObject event) {
- java.awt.KeyboardFocusManager.getCurrentKeyboardFocusManager().removeKeyEventDispatcher(this);
- }
-}
diff --git a/accessibility/bridge/org/openoffice/accessibility/PopupWindow.java b/accessibility/bridge/org/openoffice/accessibility/PopupWindow.java
deleted file mode 100644
index 9f79293..0000000
--- a/accessibility/bridge/org/openoffice/accessibility/PopupWindow.java
+++ /dev/null
@@ -1,203 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-package org.openoffice.accessibility;
-
-import javax.accessibility.AccessibleContext;
-
-import org.openoffice.java.accessibility.*;
-
-
-/**
- *
- */
-public class PopupWindow extends java.awt.Window {
- javax.accessibility.AccessibleContext accessibleContext = null;
- ContainerProxy layeredPane = new ContainerProxy(javax.accessibility.AccessibleRole.LAYERED_PANE);
- ContainerProxy rootPane = new ContainerProxy(javax.accessibility.AccessibleRole.ROOT_PANE);
- ContainerProxy popupLayer = new ContainerProxy(javax.accessibility.AccessibleRole.PANEL);
- boolean opened = false;
- boolean visible = false;
-
- /** Creates a new instance of PopupWindow */
- public PopupWindow(java.awt.Window owner) {
- super(owner);
- super.add(rootPane);
- rootPane.add(layeredPane);
-
- javax.accessibility.AccessibleContext ac = rootPane.getAccessibleContext();
-
- if (ac != null) {
- ac.setAccessibleParent(this);
- }
- }
-
- static PopupWindow create(
- com.sun.star.accessibility.XAccessible xAccessible) {
- java.awt.Window parent = java.awt.KeyboardFocusManager.getCurrentKeyboardFocusManager()
- .getActiveWindow();
-
- if (parent != null) {
- PopupWindow w = new PopupWindow(parent);
- w.setVisible(true);
- AccessibleObjectFactory.invokeAndWait();
- AccessibleObjectFactory.addChild(w, xAccessible);
-
- return w;
- }
-
- return null;
- }
-
- public boolean isShowing() {
- if (isVisible()) {
- java.awt.Container parent = getParent();
-
- return (parent == null) || parent.isShowing();
- }
-
- return false;
- }
-
- public void addNotify() {
- }
-
- public void removeNotify() {
- }
-
- public boolean isVisible() {
- return visible;
- }
-
- public void setVisible(boolean b) {
- if (visible != b) {
- visible = b;
-
- if (b) {
- // If it is the first show, fire WINDOW_OPENED event
- if (!opened) {
- AccessibleObjectFactory.postWindowOpened(this);
- opened = true;
- }
- }
- }
- }
-
- public java.awt.Component add(java.awt.Component c) {
- popupLayer.add(c);
- layeredPane.add(popupLayer);
-
- if (c instanceof javax.accessibility.Accessible) {
- javax.accessibility.AccessibleContext ac = layeredPane.getAccessibleContext();
-
- if (ac != null) {
- ac.firePropertyChange(AccessibleContext.ACCESSIBLE_CHILD_PROPERTY, null,
- popupLayer.getAccessibleContext());
- }
- }
-
- return c;
- }
-
- public void remove(java.awt.Component c) {
- layeredPane.remove(popupLayer);
-
- if (c instanceof javax.accessibility.Accessible) {
- javax.accessibility.AccessibleContext ac = layeredPane.getAccessibleContext();
-
- if (ac != null) {
- ac.firePropertyChange(AccessibleContext.ACCESSIBLE_CHILD_PROPERTY,
- popupLayer.getAccessibleContext(), null);
- }
- }
-
- popupLayer.remove(c);
- }
-
- public void dispose() {
- setVisible(false);
- AccessibleObjectFactory.postWindowClosed(this);
- }
-
- public javax.accessibility.AccessibleContext getAccessibleContext() {
- if (accessibleContext == null) {
- accessibleContext = new AccessiblePopupWindow();
- }
-
- return accessibleContext;
- }
-
- protected class AccessiblePopupWindow
- extends java.awt.Window.AccessibleAWTWindow {
- AccessiblePopupWindow() {
- }
- }
-
- protected class ContainerProxy extends java.awt.Container
- implements javax.accessibility.Accessible {
- javax.accessibility.AccessibleContext accessibleContext = null;
- javax.accessibility.AccessibleRole role;
-
- protected ContainerProxy(javax.accessibility.AccessibleRole role) {
- this.role = role;
- }
-
- public java.awt.Component add(java.awt.Component c) {
- if (c instanceof javax.accessibility.Accessible) {
- javax.accessibility.Accessible a = (javax.accessibility.Accessible) c;
- javax.accessibility.AccessibleContext ac = a.getAccessibleContext();
-
- if (ac != null) {
- ac.setAccessibleParent(this);
- }
- }
-
- return super.add(c);
- }
-
- public void remove(java.awt.Component c) {
- if (c instanceof javax.accessibility.Accessible) {
- javax.accessibility.Accessible a = (javax.accessibility.Accessible) c;
- javax.accessibility.AccessibleContext ac = a.getAccessibleContext();
-
- if (ac != null) {
- ac.setAccessibleParent(null);
- }
- }
-
- super.remove(c);
- }
-
- public javax.accessibility.AccessibleContext getAccessibleContext() {
- if (accessibleContext == null) {
- accessibleContext = new AccessibleContainerProxy();
- }
-
- return accessibleContext;
- }
-
- private class AccessibleContainerProxy
- extends java.awt.Container.AccessibleAWTContainer {
- AccessibleContainerProxy() {
- }
-
- public javax.accessibility.AccessibleRole getAccessibleRole() {
- return ContainerProxy.this.role;
- }
- }
- }
-}
diff --git a/accessibility/bridge/org/openoffice/accessibility/WindowsAccessBridgeAdapter.java b/accessibility/bridge/org/openoffice/accessibility/WindowsAccessBridgeAdapter.java
deleted file mode 100644
index 5d7a817..0000000
--- a/accessibility/bridge/org/openoffice/accessibility/WindowsAccessBridgeAdapter.java
+++ /dev/null
@@ -1,645 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-package org.openoffice.accessibility;
-
-import com.sun.star.accessibility.AccessibleRole;
-import com.sun.star.accessibility.XAccessible;
-import com.sun.star.accessibility.XAccessibleContext;
-import com.sun.star.java.XJavaVM;
-import com.sun.star.uno.*;
-
-import org.openoffice.java.accessibility.*;
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-
-import javax.accessibility.*;
-
-
-public class WindowsAccessBridgeAdapter {
- private static Method registerVirtualFrame;
- private static Method revokeVirtualFrame;
- private static java.util.HashMap<Integer, Accessible> frameMap;
-
- protected static native byte[] getProcessID();
-
- protected static native boolean createMapping(long jvmaccess);
-
- // On Windows all native frames must be registered to the access bridge.
- // Therefor the bridge exports two methods that we try to find here.
- protected static void attach(XComponentContext xComponentContext) {
- try {
- Class<?> bridge = Class.forName(
- "com.sun.java.accessibility.AccessBridge");
- Class<?>[] parameterTypes = {
- javax.accessibility.Accessible.class, Integer.class
- };
-
- if (bridge != null) {
- registerVirtualFrame = bridge.getMethod("registerVirtualFrame",
- parameterTypes);
- revokeVirtualFrame = bridge.getMethod("revokeVirtualFrame",
- parameterTypes);
-
- // load the native dll
- System.loadLibrary("java_uno_accessbridge");
-
- Object any = xComponentContext.getValueByName(
- "/singletons/com.sun.star.java.theJavaVirtualMachine");
-
- if (AnyConverter.isObject(any)) {
- XJavaVM xJavaVM = UnoRuntime.queryInterface(XJavaVM.class,
- AnyConverter.toObject(new Type(XJavaVM.class), any));
-
- if (xJavaVM != null) {
- any = xJavaVM.getJavaVM(getProcessID());
-
- if (AnyConverter.isLong(any)) {
- createMapping(AnyConverter.toLong(any));
- frameMap = new java.util.HashMap<Integer, Accessible>();
- }
- }
- }
- }
- } catch (NoSuchMethodException e) {
- System.err.println("ERROR: incompatible AccessBridge found: " +
- e.getMessage());
-
- // Forward this exception to UNO to indicate that the service will
- // not work correctly.
- throw new com.sun.star.uno.RuntimeException(
- "incompatible AccessBridge class: " + e.getMessage());
- } catch (java.lang.SecurityException e) {
- System.err.println("ERROR: no access to AccessBridge: " +
- e.getMessage());
-
- // Forward this exception to UNO to indicate that the service will not work correctly.
- throw new com.sun.star.uno.RuntimeException(
- "Security exception caught: " + e.getMessage());
- } catch (ClassNotFoundException e) {
- // Forward this exception to UNO to indicate that the service will not work correctly.
- throw new com.sun.star.uno.RuntimeException(
- "ClassNotFound exception caught: " + e.getMessage());
- } catch (IllegalArgumentException e) {
- System.err.println("IllegalArgumentException caught: " +
- e.getMessage());
-
- // Forward this exception to UNO to indicate that the service will not work correctly.
- throw new com.sun.star.uno.RuntimeException(
- "IllegalArgumentException caught: " + e.getMessage());
- } catch (com.sun.star.lang.IllegalArgumentException e) {
- System.err.println("UNO IllegalArgumentException caught: " +
- e.getMessage());
-
- // Forward this exception to UNO to indicate that the service will not work correctly.
- throw new com.sun.star.uno.RuntimeException(
- "UNO IllegalArgumentException caught: " + e.getMessage());
- }
- }
-
- protected static boolean isAttached() {
- return frameMap != null;
- }
-
- protected static Accessible getAccessibleWrapper(XAccessible xAccessible) {
- Accessible a = null;
-
- try {
- XAccessibleContext xAccessibleContext = xAccessible.getAccessibleContext();
-
- if (xAccessibleContext != null) {
- switch (xAccessibleContext.getAccessibleRole()) {
- case AccessibleRole.LIST:
- a = (Accessible) AccessibleObjectFactory.getAccessibleComponent(xAccessible);
- if (a != null) {
- a = new ListProxy(a.getAccessibleContext());
- }
- break;
-
- case AccessibleRole.MENU:
-
- Accessible tmp = (Accessible) AccessibleObjectFactory.getAccessibleComponent(xAccessible);
- if (tmp != null) {
- AccessibleContext ac = tmp.getAccessibleContext();
-
- if (ac != null) {
- a = new PopupMenuProxy(ac);
- }
- }
-
- break;
-
- case AccessibleRole.TOOL_TIP:
- a = PopupWindow.create(xAccessible);
- break;
-
- default:
- a = AccessBridge.getTopWindow(xAccessible);
- break;
- }
- }
- } catch (com.sun.star.uno.RuntimeException e) {
- }
-
- return a;
- }
-
- /** Registers a native frame at the Java AccessBridge for Windows */
- public static void registerTopWindow(int handle, XAccessible xAccessible) {
- Integer hwnd = new Integer(handle);
-
- if (!frameMap.containsKey(hwnd)) {
- if (Build.DEBUG) {
- System.err.println("Native frame " + hwnd + " of role " +
- AccessibleRoleAdapter.getAccessibleRole(xAccessible) +
- " has been opened");
- }
-
- Accessible a = getAccessibleWrapper(xAccessible);
-
- if (a != null) {
- Object[] args = { a, hwnd };
-
- frameMap.put(hwnd, a);
-
- if (Build.DEBUG) {
- System.err.println("registering native frame " + hwnd);
- }
-
- try {
- registerVirtualFrame.invoke(null, args);
- } catch (IllegalAccessException e) {
- System.err.println("IllegalAccessException caught: " +
- e.getMessage());
- } catch (IllegalArgumentException e) {
- System.err.println("IllegalArgumentException caught: " +
- e.getMessage());
- } catch (InvocationTargetException e) {
- System.err.println("InvokationTargetException caught: " +
- e.getMessage());
- }
- }
- }
- }
-
- /** Revokes a native frame at the Java AccessBridge for Windows */
- public static void revokeTopWindow(int handle, XAccessible xAccessible) {
- Integer hwnd = new Integer(handle);
-
- Accessible a = frameMap.remove(hwnd);
-
- if (a != null) {
- Object[] args = { a, hwnd };
-
- if (Build.DEBUG) {
- System.err.println("revoking native frame " + hwnd);
- }
-
- try {
- revokeVirtualFrame.invoke(null, args);
- } catch (IllegalAccessException e) {
- System.err.println("IllegalAccessException caught: " +
- e.getMessage());
- } catch (IllegalArgumentException e) {
- System.err.println("IllegalArgumentException caught: " +
- e.getMessage());
- } catch (InvocationTargetException e) {
- System.err.println("InvokationTargetException caught: " +
- e.getMessage());
- }
- }
-
- if (a instanceof PopupWindow) {
- PopupWindow toolTipWindow = (PopupWindow) a;
- toolTipWindow.removeAll();
- toolTipWindow.dispose();
- }
- }
-
- protected static class PopupMenuProxy extends AccessibleContext
- implements Accessible, AccessibleComponent {
- AccessibleContext menu;
- AccessibleComponent menuComponent;
- int x = 0; int y = 0; int width = 0; int height = 0;
-
- PopupMenuProxy(AccessibleContext ac) {
- menu = ac;
- menuComponent = menu.getAccessibleComponent();
-
- /** calculate the bounding rectangle by iterating over the
- * the children.
- */
- int x2 = 0; int y2 = 0;
- int count = ac.getAccessibleChildrenCount();
- for (int i = 0; i < count; i++) {
- Accessible a = menu.getAccessibleChild(i);
-
- if (a != null) {
- AccessibleContext childAC = a.getAccessibleContext();
-
- if (childAC != null) {
- AccessibleComponent comp = ac.getAccessibleComponent();
-
- if (comp != null) {
- java.awt.Point p = comp.getLocationOnScreen();
- java.awt.Dimension d = comp.getSize();
-
- if (p != null && d != null) {
- if (p.x < x) {
- x = p.x;
- }
- if (p.y < y) {
- y = p.y;
- }
- if (p.x + d.width > x2) {
- x2 = p.x + d.width;
- }
- if (p.y + d.height > y2) {
- y2 = p.y + d.height;
- }
- }
- }
- }
- }
- }
-
- width = x2 - x;
- height = y2 - y;
- }
-
- /** Returns the AccessibleContext associated with this object */
- public javax.accessibility.AccessibleContext getAccessibleContext() {
- return this;
- }
-
- /** Returns the AccessibleContext associated with this object */
- public javax.accessibility.AccessibleComponent getAccessibleComponent() {
- return this;
- }
-
- /** Returns the AccessibleText associated with this object */
- public javax.accessibility.AccessibleText getAccessibleText() {
- return menu.getAccessibleText();
- }
-
- /** Returns the AccessibleContext associated with this object */
- public javax.accessibility.AccessibleStateSet getAccessibleStateSet() {
- return menu.getAccessibleStateSet();
- }
-
- public java.util.Locale getLocale() {
- return menu.getLocale();
- }
-
- public int getAccessibleIndexInParent() {
- return -1;
- }
-
- public int getAccessibleChildrenCount() {
- return menu.getAccessibleChildrenCount();
- }
-
- public javax.accessibility.Accessible getAccessibleChild(int i) {
- return menu.getAccessibleChild(i);
- }
-
- public javax.accessibility.AccessibleRole getAccessibleRole() {
- return javax.accessibility.AccessibleRole.POPUP_MENU;
- }
-
- /*
- * AccessibleComponent
- */
- public void addFocusListener(java.awt.event.FocusListener fl) {
- menuComponent.addFocusListener(fl);
- }
-
- public void removeFocusListener(java.awt.event.FocusListener fl) {
- menuComponent.removeFocusListener(fl);
- }
-
- /** Returns the background color of the object */
- public java.awt.Color getBackground() {
- return menuComponent.getBackground();
- }
-
- public void setBackground(java.awt.Color c) {
- // Not supported by UNO accessibility API
- }
-
- /** Returns the foreground color of the object */
- public java.awt.Color getForeground() {
- return menuComponent.getForeground();
- }
-
- public void setForeground(java.awt.Color c) {
- menuComponent.setForeground(c);
- }
-
- public java.awt.Cursor getCursor() {
- return menuComponent.getCursor();
- }
-
- public void setCursor(java.awt.Cursor cursor) {
- menuComponent.setCursor(cursor);
- }
-
- public java.awt.Font getFont() {
- return menuComponent.getFont();
- }
-
- public void setFont(java.awt.Font f) {
- menuComponent.setFont(f);
- }
-
- public java.awt.FontMetrics getFontMetrics(java.awt.Font f) {
- return menuComponent.getFontMetrics(f);
- }
-
- public boolean isEnabled() {
- return menuComponent.isEnabled();
- }
-
- public void setEnabled(boolean b) {
- menuComponent.setEnabled(b);
- }
-
- public boolean isVisible() {
- return menuComponent.isVisible();
- }
-
- public void setVisible(boolean b) {
- menuComponent.setVisible(b);
- }
-
- public boolean isShowing() {
- return menuComponent.isShowing();
- }
-
- public boolean contains(java.awt.Point p) {
- java.awt.Dimension d = getSize();
-
- if (Build.DEBUG) {
- System.err.println("PopupMenuProxy.containsPoint(" + p.x + "," +
- p.y + ") returns " +
- (((d.width >= 0) && (p.x < d.width) && (d.height >= 0) &&
- (p.y < d.height)) ? "true" : "false"));
- }
-
- if ((d.width >= 0) && (p.x < d.width) && (d.height >= 0) &&
- (p.y < d.height)) {
- return true;
- }
-
- return false;
- }
-
- /** Returns the location of the object on the screen. */
- public java.awt.Point getLocationOnScreen() {
- return new java.awt.Point(x,y);
- }
-
- /** Gets the location of this component in the form of a point specifying the component's top-left corner */
- public java.awt.Point getLocation() {
- // This object represents a toplevel, so this is the same as getLocationOnScreen()
- return getLocationOnScreen();
- }
-
- /** Moves this component to a new location */
- public void setLocation(java.awt.Point p) {
- // Not supported by UNO accessibility API
- }
-
- /** Gets the bounds of this component in the form of a Rectangle object */
- public java.awt.Rectangle getBounds() {
- return new java.awt.Rectangle(x, y, width, height);
- }
-
- /** Moves and resizes this component to conform to the new bounding rectangle r */
- public void setBounds(java.awt.Rectangle r) {
- // Not supported by UNO accessibility API
- }
-
- /** Returns the size of this component in the form of a Dimension object */
- public java.awt.Dimension getSize() {
- return new java.awt.Dimension(width, height);
- }
-
- /** Resizes this component so that it has width d.width and height d.height */
- public void setSize(java.awt.Dimension d) {
- // Not supported by UNO accessibility API
- }
-
- /** Returns the Accessible child, if one exists, contained at the local
- * coordinate Point
- */
- public javax.accessibility.Accessible getAccessibleAt(java.awt.Point p) {
- java.awt.Point p2 = menuComponent.getLocationOnScreen();
- return menuComponent.getAccessibleAt(
- new java.awt.Point(p.x + x - p2.x, p.y + y - p2.y));
- }
-
- public boolean isFocusTraversable() {
- return menuComponent.isFocusTraversable();
- }
-
- public void requestFocus() {
- menuComponent.requestFocus();
- }
- }
-
- protected static class ListProxy extends AccessibleContext
- implements Accessible, AccessibleComponent {
- AccessibleContext list;
- AccessibleComponent listComponent;
-
- ListProxy(AccessibleContext ac) {
- list = ac;
- listComponent = list.getAccessibleComponent();
- }
-
- /** Returns the AccessibleContext associated with this object */
- public javax.accessibility.AccessibleContext getAccessibleContext() {
- return this;
- }
-
- /** Returns the AccessibleContext associated with this object */
- public javax.accessibility.AccessibleComponent getAccessibleComponent() {
- return this;
- }
-
- /** Returns the AccessibleSelection associated with this object */
- public javax.accessibility.AccessibleSelection getAccessibleSelection() {
- return list.getAccessibleSelection();
- }
-
- /** Returns the AccessibleContext associated with this object */
- public javax.accessibility.AccessibleStateSet getAccessibleStateSet() {
- return list.getAccessibleStateSet();
- }
-
- public java.util.Locale getLocale() {
- return list.getLocale();
- }
-
- public int getAccessibleIndexInParent() {
- return -1;
- }
-
- public int getAccessibleChildrenCount() {
- return list.getAccessibleChildrenCount();
- }
-
- public javax.accessibility.Accessible getAccessibleChild(int i) {
- return list.getAccessibleChild(i);
- }
-
- public javax.accessibility.AccessibleRole getAccessibleRole() {
- return javax.accessibility.AccessibleRole.LIST;
- }
-
- /*
- * AccessibleComponent
- */
- public void addFocusListener(java.awt.event.FocusListener fl) {
- listComponent.addFocusListener(fl);
- }
-
- public void removeFocusListener(java.awt.event.FocusListener fl) {
- listComponent.removeFocusListener(fl);
- }
-
- /** Returns the background color of the object */
- public java.awt.Color getBackground() {
- return listComponent.getBackground();
- }
-
- public void setBackground(java.awt.Color c) {
- // Not supported by UNO accessibility API
- }
-
- /** Returns the foreground color of the object */
- public java.awt.Color getForeground() {
- return listComponent.getForeground();
- }
-
- public void setForeground(java.awt.Color c) {
- listComponent.setForeground(c);
- }
-
- public java.awt.Cursor getCursor() {
- return listComponent.getCursor();
- }
-
- public void setCursor(java.awt.Cursor cursor) {
- listComponent.setCursor(cursor);
- }
-
- public java.awt.Font getFont() {
- return listComponent.getFont();
- }
-
- public void setFont(java.awt.Font f) {
- listComponent.setFont(f);
- }
-
- public java.awt.FontMetrics getFontMetrics(java.awt.Font f) {
- return listComponent.getFontMetrics(f);
- }
-
- public boolean isEnabled() {
- return listComponent.isEnabled();
- }
-
- public void setEnabled(boolean b) {
- listComponent.setEnabled(b);
- }
-
- public boolean isVisible() {
- return listComponent.isVisible();
- }
-
- public void setVisible(boolean b) {
- listComponent.setVisible(b);
- }
-
- public boolean isShowing() {
- return listComponent.isShowing();
- }
-
- public boolean contains(java.awt.Point p) {
- return listComponent.contains(p);
- }
-
- /** Returns the location of the object on the screen. */
- public java.awt.Point getLocationOnScreen() {
- return listComponent.getLocationOnScreen();
- }
-
- /** Gets the location of this component in the form of a point specifying
- * the component's top-left corner
- */
- public java.awt.Point getLocation() {
- // This object represents a toplevel object, so getLocation() should
- // return the same as getLocationOnScreen().
- return getLocationOnScreen();
- }
-
- /** Moves this component to a new location */
- public void setLocation(java.awt.Point p) {
- // Not supported by UNO accessibility API
- }
-
- /** Gets the bounds of this component in the form of a Rectangle object */
- public java.awt.Rectangle getBounds() {
- java.awt.Point p = getLocationOnScreen();
- java.awt.Dimension d = getSize();
- return new java.awt.Rectangle(p.x, p.y, d.width, d.height);
- }
-
- /** Moves and resizes this component to conform to the new bounding rectangle r */
- public void setBounds(java.awt.Rectangle r) {
- // Not supported by UNO accessibility API
- }
-
- /** Returns the size of this component in the form of a Dimension object */
- public java.awt.Dimension getSize() {
- return listComponent.getSize();
- }
-
- /** Resizes this component so that it has width d.width and height d.height */
- public void setSize(java.awt.Dimension d) {
- // Not supported by UNO accessibility API
- }
-
- /** Returns the Accessible child, if one exists, contained at the local
- * coordinate Point
- */
- public javax.accessibility.Accessible getAccessibleAt(java.awt.Point p) {
- return listComponent.getAccessibleAt(p);
- }
-
- public boolean isFocusTraversable() {
- return listComponent.isFocusTraversable();
- }
-
- public void requestFocus() {
- listComponent.requestFocus();
- }
- }
-}
diff --git a/accessibility/bridge/org/openoffice/accessibility/java_uno_accessbridge.component b/accessibility/bridge/org/openoffice/accessibility/java_uno_accessbridge.component
deleted file mode 100644
index a1194a1..0000000
--- a/accessibility/bridge/org/openoffice/accessibility/java_uno_accessbridge.component
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- -->
-
-<component loader="com.sun.star.loader.Java2"
- xmlns="http://openoffice.org/2010/uno-components">
- <implementation name="org.openoffice.accessibility.AccessBridge">
- <service name="com.sun.star.accessibility.AccessBridge"/>
- </implementation>
-</component>
diff --git a/accessibility/bridge/org/openoffice/accessibility/manifest b/accessibility/bridge/org/openoffice/accessibility/manifest
deleted file mode 100644
index 4b5ffd5..0000000
--- a/accessibility/bridge/org/openoffice/accessibility/manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-RegistrationClassName: org.openoffice.accessibility.AccessBridge
-UNO-Type-Path:
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/AbstractButton.java b/accessibility/bridge/org/openoffice/java/accessibility/AbstractButton.java
deleted file mode 100644
index c0fc21c..0000000
--- a/accessibility/bridge/org/openoffice/java/accessibility/AbstractButton.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-package org.openoffice.java.accessibility;
-
-import com.sun.star.uno.*;
-import com.sun.star.accessibility.*;
-
-/**
- */
-public abstract class AbstractButton extends Component {
-
- protected AbstractButton(XAccessible xAccessible, XAccessibleContext xAccessibleContext) {
- super(xAccessible, xAccessibleContext);
- }
-
- protected abstract class AccessibleAbstractButton extends AccessibleUNOComponent
- implements javax.accessibility.AccessibleAction {
-
- /**
- * Though the class is abstract, this should be called by all sub-classes
- */
- protected AccessibleAbstractButton() {
- super();
- }
-
- /*
- * AccessibleContext
- */
-
- /** Gets the AccessibleAction associated with this object that supports one or more actions */
- public javax.accessibility.AccessibleAction getAccessibleAction() {
- return this;
- }
-
- /** Gets the AccessibleText associated with this object presenting text on the display */
- public javax.accessibility.AccessibleText getAccessibleText() {
-
- if (disposed)
- return null;
-
- try {
- XAccessibleText unoAccessibleText = UnoRuntime.queryInterface(XAccessibleText.class,unoAccessibleComponent);
- if (unoAccessibleText != null) {
- return new AccessibleTextImpl(unoAccessibleText);
- } else {
- return null;
- }
- } catch (com.sun.star.uno.RuntimeException e) {
- return null;
- }
- }
-
- /** Returns the relation set of this object */
- public javax.accessibility.AccessibleRelationSet getAccessibleRelationSet() {
- try {
- XAccessibleRelationSet unoAccessibleRelationSet = unoAccessibleContext.getAccessibleRelationSet();
-
- if (unoAccessibleRelationSet == null) {
- return null;
- }
-
- javax.accessibility.AccessibleRelationSet relationSet = new javax.accessibility.AccessibleRelationSet();
- int count = unoAccessibleRelationSet.getRelationCount();
-
- for (int i = 0; i < count; i++) {
- AccessibleRelation unoAccessibleRelation = unoAccessibleRelationSet.getRelation(i);
-
- switch (unoAccessibleRelation.RelationType) {
- case AccessibleRelationType.MEMBER_OF:
- relationSet.add(new javax.accessibility.AccessibleRelation(
- javax.accessibility.AccessibleRelation.MEMBER_OF,
- getAccessibleComponents(
- unoAccessibleRelation.TargetSet)));
- break;
-
- case AccessibleRelationType.LABELED_BY:
- relationSet.add(new javax.accessibility.AccessibleRelation(
- javax.accessibility.AccessibleRelation.LABELED_BY,
- getAccessibleComponents(
- unoAccessibleRelation.TargetSet)));
- break;
- default:
- break;
- }
- }
-
- return relationSet;
- } catch (com.sun.star.lang.IndexOutOfBoundsException e) {
- return null;
- } catch (com.sun.star.uno.RuntimeException e) {
- return null;
- }
- }
-
- /*
- * AccessibleAction
- */
-
- /** Performs the specified Action on the object */
- public boolean doAccessibleAction(int param) {
- if (param == 0) {
- // HACK: this action might open a modal dialog and therefor block
- // until the dialog is closed. In case of this thread being the
- // AWT EventDispatcherThread this means, the opened dialog will
- // not be accessible, so deligate this request to another thread.
- if (java.awt.EventQueue.isDispatchThread()) {
- Thread t = new Thread () {
- public void run() {
- AbstractButton.AccessibleAbstractButton.this.doAccessibleAction(0);
- }
- };
- t.start();
- return true;
- } else {
- // Actions of MenuItems may also be performed if the item is not
- // visible, so just try ..
- try {
- XAccessibleContext xAccessibleContext = unoAccessibleContext;
- if (xAccessibleContext != null) {
- // Query for XAccessibleAction interface
- XAccessibleAction xAccessibleAction = UnoRuntime.queryInterface(XAccessibleAction.class, xAccessibleContext);
-
- if (xAccessibleAction != null) {
- return xAccessibleAction.doAccessibleAction(0);
- }
- }
- } catch (com.sun.star.lang.IndexOutOfBoundsException e) {
- } catch (com.sun.star.uno.RuntimeException e) {
- }
- }
- }
-
- return false;
- }
-
- /** Returns a description of the specified action of the object */
- public java.lang.String getAccessibleActionDescription(int param) {
- return javax.swing.UIManager.getString("AbstractButton.clickText");
- }
-
- /** Returns the number of accessible actions available in this object */
- public int getAccessibleActionCount() {
- return 1;
- }
- }
-}
-
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleActionImpl.java b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleActionImpl.java
deleted file mode 100644
index a38820c..0000000
--- a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleActionImpl.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-package org.openoffice.java.accessibility;
-
-import com.sun.star.accessibility.XAccessibleAction;
-
-/** The AccessibleActionWrapper maps the calls to the java AccessibleAction interface
- * to the corresponding methods of the UNO XAccessibleAction interface.
- */
-public class AccessibleActionImpl implements javax.accessibility.AccessibleAction {
-
- protected XAccessibleAction unoObject;
-
- /** Creates new AccessibleActionWrapper */
- public AccessibleActionImpl(XAccessibleAction xAccessibleAction) {
- unoObject = xAccessibleAction;
- }
-
- public boolean doAccessibleAction(int param) {
- try {
- return unoObject.doAccessibleAction(param);
- } catch (com.sun.star.lang.IndexOutOfBoundsException e) {
- return false;
- } catch (com.sun.star.uno.RuntimeException e) {
- return false;
- }
- }
-
- public java.lang.String getAccessibleActionDescription(int param) {
- try {
- return unoObject.getAccessibleActionDescription(param);
- } catch (com.sun.star.lang.IndexOutOfBoundsException e) {
- return null;
- } catch (com.sun.star.uno.RuntimeException e) {
- return null;
- }
- }
-
- public int getAccessibleActionCount() {
- try {
- return unoObject.getAccessibleActionCount();
- } catch (com.sun.star.uno.RuntimeException e) {
- return 0;
- }
- }
-}
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleComponentImpl.java b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleComponentImpl.java
deleted file mode 100644
index 03e1fa5..0000000
--- a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleComponentImpl.java
+++ /dev/null
@@ -1,223 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-package org.openoffice.java.accessibility;
-
-import com.sun.star.accessibility.AccessibleStateType;
-import com.sun.star.accessibility.XAccessibleContext;
-import com.sun.star.accessibility.XAccessibleComponent;
-// import com.sun.star.accessibility.XAccessibleExtendedComponent;
-import com.sun.star.uno.UnoRuntime;
-
-public class AccessibleComponentImpl implements javax.accessibility.AccessibleComponent {
-
- protected XAccessibleComponent unoObject;
-// protected XAccessibleExtendedComponent unoAccessibleExtendedComponent = null;
-
- /** Creates new AccessibleComponentImpl */
- public AccessibleComponentImpl(XAccessibleComponent xAccessibleComponent) {
- unoObject = xAccessibleComponent;
- }
-
- protected boolean hasState(short state) {
- try {
- XAccessibleContext unoAccessibleContext = UnoRuntime.queryInterface(XAccessibleContext.class, unoObject);
- // All UNO accessibility implementations must support XAccessibleContext
- // and return a valid XAccessibleStateSet ..
- return unoAccessibleContext.getAccessibleStateSet().contains(state);
- } catch (com.sun.star.uno.RuntimeException e) {
- return false;
- } catch (java.lang.NullPointerException e) {
- System.err.println("XAccessibleContext unsupported or no XAccessibleStateSet returned.");
- return false;
- }
- }
-
- /*
- * XAccessibleComponent
- */
-
- /** Returns the background color of the object */
- public java.awt.Color getBackground() {
- try {
- return new java.awt.Color(unoObject.getBackground());
- } catch (com.sun.star.uno.RuntimeException e) {
- return null;
- }
- }
-
- public void setBackground(java.awt.Color c) {
- // Not supported by UNO accessibility API
- }
-
- /** Returns the foreground color of the object */
- public java.awt.Color getForeground() {
- try {
- return new java.awt.Color(unoObject.getForeground());
- } catch (com.sun.star.uno.RuntimeException e) {
- return null;
- }
- }
-
- public void setForeground(java.awt.Color c) {
- // Not supported by UNO accessibility API
- }
-
- public java.awt.Cursor getCursor() {
- // Not supported by UNO accessibility API
- return null;
- }
-
- public void setCursor(java.awt.Cursor cursor) {
- // Not supported by UNO accessibility API
- }
-
- public java.awt.Font getFont() {
- // FIXME
- return null;
- }
-
- public void setFont(java.awt.Font f) {
- // Not supported by UNO accessibility API
- }
-
- public java.awt.FontMetrics getFontMetrics(java.awt.Font f) {
- // FIXME
- return null;
- }
-
- public boolean isEnabled() {
- return hasState(AccessibleStateType.ENABLED);
- }
-
- public void setEnabled(boolean b) {
- // Not supported by UNO accessibility API
- }
-
- public boolean isVisible() {
- return hasState(AccessibleStateType.VISIBLE);
- }
-
- public void setVisible(boolean b) {
- // Not supported by UNO accessibility API
- }
-
- public boolean isShowing() {
- return hasState(AccessibleStateType.SHOWING);
- }
-
- public boolean contains(java.awt.Point p) {
- try {
- return unoObject.containsPoint(new com.sun.star.awt.Point(p.x, p.y));
- } catch (com.sun.star.uno.RuntimeException e) {
- return false;
- }
- }
-
- /** Returns the location of the object on the screen. */
- public java.awt.Point getLocationOnScreen() {
- try {
- com.sun.star.awt.Point unoPoint = unoObject.getLocationOnScreen();
- return new java.awt.Point(unoPoint.X, unoPoint.Y);
- } catch (com.sun.star.uno.RuntimeException e) {
- return null;
- }
- }
-
- /** Gets the location of this component in the form of a point specifying the component's top-left corner */
- public java.awt.Point getLocation() {
- try {
- com.sun.star.awt.Point unoPoint = unoObject.getLocation();
- return new java.awt.Point( unoPoint.X, unoPoint.Y );
- } catch (com.sun.star.uno.RuntimeException e) {
- return null;
- }
- }
-
- /** Moves this component to a new location */
- public void setLocation(java.awt.Point p) {
- // Not supported by UNO accessibility API
- }
-
- /** Gets the bounds of this component in the form of a Rectangle object */
- public java.awt.Rectangle getBounds() {
- try {
- com.sun.star.awt.Rectangle unoRect = unoObject.getBounds();
- return new java.awt.Rectangle(unoRect.X, unoRect.Y, unoRect.Width, unoRect.Height);
- } catch (com.sun.star.uno.RuntimeException e) {
- return null;
- }
- }
-
- /** Moves and resizes this component to conform to the new bounding rectangle r */
- public void setBounds(java.awt.Rectangle r) {
- // Not supported by UNO accessibility API
- }
-
- /** Returns the size of this component in the form of a Dimension object */
- public java.awt.Dimension getSize() {
- try {
- com.sun.star.awt.Size unoSize = unoObject.getSize();
- return new java.awt.Dimension(unoSize.Width, unoSize.Height);
- } catch (com.sun.star.uno.RuntimeException e) {
- return null;
- }
- }
-
- /** Resizes this component so that it has width d.width and height d.height */
- public void setSize(java.awt.Dimension d) {
- // Not supported by UNO accessibility API
- }
-
- public javax.accessibility.Accessible getAccessibleAt(java.awt.Point p) {
- // Not supported by this implementation
- return null;
- }
-
- public boolean isFocusTraversable() {
- return hasState(AccessibleStateType.FOCUSABLE);
- }
-
- public void requestFocus() {
- unoObject.grabFocus();
- }
-
- /**
- * Adds the specified focus listener to receive focus events from
- * this component when this component gains input focus.
- * If listener <code>l</code> is <code>null</code>,
- * no exception is thrown and no action is performed.
- */
-
- public void addFocusListener(java.awt.event.FocusListener l) {
- // Not supported by this implementation
- }
-
- /**
- * Removes the specified focus listener so that it no longer
- * receives focus events from this component. This method performs
- * no function, nor does it throw an exception, if the listener
- * specified by the argument was not previously added to this component.
- * If listener <code>l</code> is <code>null</code>,
- * no exception is thrown and no action is performed.
- */
-
- public void removeFocusListener(java.awt.event.FocusListener l) {
- // Not supported by this implementation
- }
-}
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleEditableTextImpl.java b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleEditableTextImpl.java
deleted file mode 100644
index 8dd7e36..0000000
--- a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleEditableTextImpl.java
+++ /dev/null
@@ -1,351 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-package org.openoffice.java.accessibility;
-
-import com.sun.star.awt.*;
-import com.sun.star.style.*;
-import com.sun.star.accessibility.XAccessibleEditableText;
-import com.sun.star.beans.PropertyValue;
-
-import javax.swing.text.StyleConstants;
-
-/** The GenericAccessibleEditableText mapps the calls to the java AccessibleEditableText
- * interface to the corresponding methods of the UNO XAccessibleEditableText interface.
- */
-public class AccessibleEditableTextImpl extends AccessibleTextImpl implements javax.accessibility.AccessibleEditableText {
- final static double toPointFactor = 1 / (7/10 + 34.5);
-
- /** Creates new GenericAccessibleEditableText object */
- public AccessibleEditableTextImpl(XAccessibleEditableText xAccessibleEditableText) {
- super(xAccessibleEditableText);
- }
-
- /** Cuts the text between two indices into the system clipboard */
- public void cut(int startIndex, int endIndex) {
- try {
- ((XAccessibleEditableText) unoObject).cutText(startIndex, endIndex);
- } catch (com.sun.star.lang.IndexOutOfBoundsException e) {
- } catch (com.sun.star.uno.RuntimeException e) {
- }
- }
-
- /** Deletes the text between two indices */
- public void delete(int startIndex, int endIndex) {
- try {
- ((XAccessibleEditableText) unoObject).deleteText(startIndex, endIndex);
- } catch (com.sun.star.lang.IndexOutOfBoundsException e) {
- } catch (com.sun.star.uno.RuntimeException e) {
- }
- }
-
- /** Returns the text range between two indices */
- public String getTextRange(int startIndex, int endIndex) {
- try {
- return unoObject.getTextRange(startIndex, endIndex);
- } catch (com.sun.star.lang.IndexOutOfBoundsException e) {
- } catch (com.sun.star.uno.RuntimeException e) {
- }
- return null;
- }
-
- /** Inserts the specified string at the given index */
- public void insertTextAtIndex(int index, String s){
- try {
- ((XAccessibleEditableText) unoObject).insertText(s, index);
- } catch (com.sun.star.lang.IndexOutOfBoundsException e) {
- } catch (com.sun.star.uno.RuntimeException e) {
- }
- }
-
- /** Pastes the text form the system clipboard into the text starting at the specified index */
- public void paste(int startIndex) {
- try {
- ((XAccessibleEditableText) unoObject).pasteText(startIndex);
- } catch (com.sun.star.lang.IndexOutOfBoundsException e) {
- } catch (com.sun.star.uno.RuntimeException e) {
- }
- }
-
- /** Replaces the text between two indices with the specified string */
- public void replaceText(int startIndex, int endIndex, String s) {
- try {
- ((XAccessibleEditableText) unoObject).replaceText(startIndex, endIndex, s);
- } catch (com.sun.star.lang.IndexOutOfBoundsException e) {
- } catch (com.sun.star.uno.RuntimeException e) {
- }
- }
-
- /** Selects the text between two indices */
- public void selectText(int startIndex, int endIndex) {
- try {
- unoObject.setSelection(startIndex, endIndex);
- } catch (com.sun.star.lang.IndexOutOfBoundsException e) {
- } catch (com.sun.star.uno.RuntimeException e) {
- }
- }
-
- /** Sets the attributes for the text between two indices */
- public void setAttributes(int startIndex, int endIndex, javax.swing.text.AttributeSet as) {
- java.util.ArrayList<PropertyValue> propertyValues = new java.util.ArrayList<PropertyValue>();
-
- // Convert Alignment attribute
- Object attribute = as.getAttribute(StyleConstants.Alignment);
- if (null != attribute) {
- com.sun.star.beans.PropertyValue propertyValue = new com.sun.star.beans.PropertyValue();
- propertyValue.Name = "ParaAdjust";
-
- switch (StyleConstants.getAlignment(as)) {
- case StyleConstants.ALIGN_RIGHT:
- propertyValue.Value = ParagraphAdjust.RIGHT;
- break;
- case StyleConstants.ALIGN_CENTER:
- propertyValue.Value = ParagraphAdjust.CENTER;
- break;
- case StyleConstants.ALIGN_JUSTIFIED:
- propertyValue.Value = ParagraphAdjust.BLOCK;
- break;
- default:
- propertyValue.Value = ParagraphAdjust.LEFT;
- break;
- }
- propertyValues.add(propertyValue);
- }
-
- // Convert Background attribute
- attribute = as.getAttribute(StyleConstants.Background);
- if (null != attribute) {
- com.sun.star.beans.PropertyValue propertyValue = new com.sun.star.beans.PropertyValue();
- propertyValue.Name = "CharBackColor";
- propertyValue.Value = new Integer(StyleConstants.getBackground(as).getRGB());
- propertyValues.add(propertyValue);
- }
-
- // FIXME: BidiLevel
-
- // Set Bold attribute
- attribute = as.getAttribute(StyleConstants.Bold);
- if (null != attribute) {
- com.sun.star.beans.PropertyValue propertyValue = new com.sun.star.beans.PropertyValue();
- propertyValue.Name = "CharWeight";
- if (StyleConstants.isBold(as)) {
- propertyValue.Value = new Float(150);
- } else {
- propertyValue.Value = new Float(100);
- }
- propertyValues.add(propertyValue);
- }
-
- // FIXME: Java 1.4 ComponentAttribute, ComponentElementName, ComposedTextAttribute
-
- // Set FirstLineIndent attribute
- attribute = as.getAttribute(StyleConstants.FirstLineIndent);
- if (null != attribute) {
- com.sun.star.beans.PropertyValue propertyValue = new com.sun.star.beans.PropertyValue();
- propertyValue.Name = "ParaFirstLineIndent";
- propertyValue.Value = new Double(StyleConstants.getFirstLineIndent(as) / toPointFactor);
- propertyValues.add(propertyValue);
- }
-
- // Set font family attribute
- attribute = as.getAttribute(StyleConstants.FontFamily);
- if (null != attribute) {
- com.sun.star.beans.PropertyValue propertyValue = new com.sun.star.beans.PropertyValue();
- propertyValue.Name = "CharFontName";
- propertyValue.Value = new String(StyleConstants.getFontFamily(as));
- propertyValues.add(propertyValue);
- }
-
- // Set font size attribute
- attribute = as.getAttribute(StyleConstants.FontSize);
- if (null != attribute) {
- com.sun.star.beans.PropertyValue propertyValue = new com.sun.star.beans.PropertyValue();
- propertyValue.Name = "CharHeight";
- propertyValue.Value = new Integer(StyleConstants.getFontSize(as));
- propertyValues.add(propertyValue);
- }
-
- // Map foreground color
- attribute = as.getAttribute(StyleConstants.Foreground);
- if (null != attribute) {
- com.sun.star.beans.PropertyValue propertyValue = new com.sun.star.beans.PropertyValue();
- propertyValue.Name = "CharColor";
- propertyValue.Value = new Integer (StyleConstants.getForeground(as).getRGB());
- propertyValues.add(propertyValue);
- }
-
- // FIXME: IconAttribute, IconElementName
-
- // Set italic attribute
- attribute = as.getAttribute(StyleConstants.Italic);
- if (null != attribute) {
- com.sun.star.beans.PropertyValue propertyValue = new com.sun.star.beans.PropertyValue();
- propertyValue.Name = "CharPosture";
-
- if (StyleConstants.isItalic(as)) {
- propertyValue.Value = FontSlant.ITALIC;
- } else {
- propertyValue.Value = FontSlant.DONTKNOW;
- }
- propertyValues.add(propertyValue);
- }
-
- // Set left indent attribute
- attribute = as.getAttribute(StyleConstants.LeftIndent);
- if (null != attribute) {
- com.sun.star.beans.PropertyValue propertyValue = new com.sun.star.beans.PropertyValue();
- propertyValue.Name = "ParaFirstLeftMargin";
- propertyValue.Value = new Integer(new Double(StyleConstants.getLeftIndent(as) / toPointFactor).intValue());
- propertyValues.add(propertyValue);
- }
-
- // Set right indent attribute
- attribute = as.getAttribute(StyleConstants.RightIndent);
- if (null != attribute) {
- com.sun.star.beans.PropertyValue propertyValue = new com.sun.star.beans.PropertyValue();
- propertyValue.Name = "ParaFirstRightMargin";
- propertyValue.Value = new Integer(new Double(StyleConstants.getRightIndent(as) / toPointFactor).intValue());
- propertyValues.add(propertyValue);
- }
-
- // Set line spacing attribute
- attribute = as.getAttribute(StyleConstants.LineSpacing);
- if (null != attribute) {
- com.sun.star.beans.PropertyValue propertyValue = new com.sun.star.beans.PropertyValue();
- propertyValue.Name = "ParaLineSpacing";
- propertyValue.Value = new Integer(new Double(StyleConstants.getLineSpacing(as) / toPointFactor).intValue());
- propertyValues.add(propertyValue);
- }
-
- // FIXME: Java 1.4 NameAttribute, Orientation, ResolveAttribute
-
- // Set space above attribute
- attribute = as.getAttribute(StyleConstants.SpaceAbove);
- if (null != attribute) {
- com.sun.star.beans.PropertyValue propertyValue = new com.sun.star.beans.PropertyValue();
- propertyValue.Name = "ParaTopMargin";
- propertyValue.Value = new Integer(new Double( StyleConstants.getSpaceAbove(as) / toPointFactor).intValue());
- propertyValues.add(propertyValue);
- }
-
- // Set space below attribute
- attribute = as.getAttribute(StyleConstants.SpaceBelow);
- if (null != attribute) {
- com.sun.star.beans.PropertyValue propertyValue = new com.sun.star.beans.PropertyValue();
- propertyValue.Name = "ParaBottomMargin";
- propertyValue.Value = new Integer(new Double(StyleConstants.getSpaceBelow(as) / toPointFactor).intValue());
- propertyValues.add(propertyValue);
- }
-
- // Set strike through attribute
- attribute = as.getAttribute(StyleConstants.StrikeThrough);
- if (null != attribute) {
- com.sun.star.beans.PropertyValue propertyValue = new com.sun.star.beans.PropertyValue();
- propertyValue.Name = "CharPosture";
- if (StyleConstants.isStrikeThrough(as)) {
- propertyValue.Value = new Short(FontStrikeout.SINGLE);
- } else {
- propertyValue.Value = new Short(FontStrikeout.NONE);
- }
- propertyValues.add(propertyValue);
- }
-
- // Set sub-/superscript attribute
- attribute = as.getAttribute(StyleConstants.Superscript);
- if (null == attribute) {
- attribute = as.getAttribute(StyleConstants.Subscript);
- }
- if (null != attribute) {
- com.sun.star.beans.PropertyValue propertyValue = new com.sun.star.beans.PropertyValue();
- propertyValue.Name = "CharEscapement";
-
- if (StyleConstants.isSuperscript(as)) {
- propertyValue.Value = new Short( "1" );
- } else if (StyleConstants.isSubscript(as)) {
- propertyValue.Value = new Short( "-1" );
- } else {
- propertyValue.Value = new Short( "0" );
- }
- propertyValues.add(propertyValue);
- }
-
- // Set tabset attribute
- attribute = as.getAttribute(StyleConstants.TabSet);
- if (null != attribute) {
- com.sun.star.beans.PropertyValue propertyValue = new com.sun.star.beans.PropertyValue();
- propertyValue.Name = "ParaTabStops";
-
- javax.swing.text.TabSet tabSet = StyleConstants.getTabSet(as);
- java.util.ArrayList<TabStop> tabStops = new java.util.ArrayList<TabStop>(tabSet.getTabCount());
-
- for (int i = 0, max = tabSet.getTabCount(); i < max; i++) {
- javax.swing.text.TabStop tab = tabSet.getTab(i);
- com.sun.star.style.TabStop unoTab = new com.sun.star.style.TabStop();
-
- unoTab.Position = new Double(tab.getPosition() / toPointFactor).intValue();
-
- switch (tab.getAlignment()) {
- case javax.swing.text.TabStop.ALIGN_CENTER:
- unoTab.Alignment = TabAlign.CENTER;
- break;
- case javax.swing.text.TabStop.ALIGN_RIGHT:
- unoTab.Alignment = TabAlign.RIGHT;
- break;
- case javax.swing.text.TabStop.ALIGN_DECIMAL:
- unoTab.Alignment = TabAlign.DECIMAL;
- break;
- default:
- unoTab.Alignment = TabAlign.LEFT;
- break;
- }
-
- tabStops.add(unoTab);
- }
- propertyValue.Value = tabStops.toArray();
- propertyValues.add(propertyValue);
- }
-
- // Set underline attribute
- attribute = as.getAttribute(StyleConstants.Underline);
- if (null != attribute) {
- com.sun.star.beans.PropertyValue propertyValue = new com.sun.star.beans.PropertyValue();
- propertyValue.Name = "CharUnderline";
-
- if (StyleConstants.isUnderline(as)) {
- propertyValue.Value = new Short(FontUnderline.SINGLE);
- } else {
- propertyValue.Value = new Short(FontUnderline.NONE);
- }
- propertyValues.add(propertyValue);
- }
-
- try {
- ((XAccessibleEditableText) unoObject).setAttributes(startIndex, endIndex, (com.sun.star.beans.PropertyValue[]) propertyValues.toArray());
- } catch (com.sun.star.lang.IndexOutOfBoundsException e) {
- } catch (com.sun.star.uno.RuntimeException e) {
- }
- }
-
- /** Sets the text contents to the specified string */
- public void setTextContents(String s) {
- try {
- ((XAccessibleEditableText) unoObject).setText(s);
- } catch (com.sun.star.uno.RuntimeException e) {
- }
- }
-}
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleExtendedState.java b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleExtendedState.java
deleted file mode 100644
index 300b5a9..0000000
--- a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleExtendedState.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-package org.openoffice.java.accessibility;
-
-import javax.accessibility.AccessibleState;
-
-public class AccessibleExtendedState extends AccessibleState {
- public static final AccessibleState DEFUNCT;
- public static final AccessibleState INDETERMINATE;
- public static final AccessibleState MANAGES_DESCENDANTS;
- public static final AccessibleState SENSITIVE;
- public static final AccessibleState STALE;
-
- static {
- DEFUNCT = new AccessibleExtendedState("defunct");
-
- // JAVA 1.5: will come with manages_descendants and indeterminate
- INDETERMINATE = new AccessibleExtendedState("indeterminate");
- MANAGES_DESCENDANTS = new AccessibleExtendedState("managesDescendants");
-
- SENSITIVE = new AccessibleExtendedState("sensitive");
- STALE = new AccessibleExtendedState("stale");
- }
-
- protected AccessibleExtendedState(String key) {
- super(key);
- }
-}
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleHypertextImpl.java b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleHypertextImpl.java
deleted file mode 100644
index 24ab5ef..0000000
--- a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleHypertextImpl.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-package org.openoffice.java.accessibility;
-
-import org.openoffice.java.accessibility.logging.*;
-
-import com.sun.star.accessibility.*;
-import com.sun.star.uno.*;
-
-/** The AccessibleHypertextImpl mapps all calls to the java AccessibleHypertext
- * interface to the corresponding methods of the UNO XAccessibleHypertext
- * interface.
- */
-public class AccessibleHypertextImpl extends AccessibleTextImpl
- implements javax.accessibility.AccessibleHypertext {
-
- protected class Hyperlink extends javax.accessibility.AccessibleHyperlink {
- protected XAccessibleHyperlink unoObject;
-
- public Hyperlink(XAccessibleHyperlink xHyperlink) {
- unoObject = xHyperlink;
- }
-
- public int getStartIndex() {
- try {
- System.err.println("StartIndex: " + unoObject.getStartIndex());
- return unoObject.getStartIndex();
- } catch (com.sun.star.uno.RuntimeException e) {
- return -1;
- }
- }
-
- public Object getAccessibleActionObject(int param) {
- System.err.println("getActionObject");
- try {
- Object any = unoObject.getAccessibleActionObject(param);
- if (AnyConverter.isString(any)) {
- String url = AnyConverter.toString(any);
- if (null != url) {
- return new java.net.URL(url);
- }
- }
- } catch (com.sun.star.lang.IndexOutOfBoundsException e) {
- } catch (com.sun.star.lang.IllegalArgumentException e) {
- } catch (java.net.MalformedURLException exception) {
- } catch (com.sun.star.uno.RuntimeException e) {
- }
-
- return null;
- }
-
- public int getEndIndex() {
- try {
- System.err.println("StartIndex: " + unoObject.getEndIndex());
- return unoObject.getEndIndex();
- } catch (com.sun.star.uno.RuntimeException e) {
- return -1;
- }
- }
-
- public Object getAccessibleActionAnchor(int param) {
- System.err.println("getActionAnchor");
- try {
- Object any = unoObject.getAccessibleActionObject(param);
- if (AnyConverter.isString(any)) {
- System.err.println("Anchor: " + AnyConverter.toString(any));
- return AnyConverter.toString(any);
- }
- } catch (com.sun.star.lang.IndexOutOfBoundsException e) {
- } catch (com.sun.star.lang.IllegalArgumentException e) {
- } catch (com.sun.star.uno.RuntimeException e) {
- }
- return null;
- }
-
- public boolean isValid() {
- return unoObject.isValid();
- }
-
- public boolean doAccessibleAction(int param) {
- try {
- return unoObject.doAccessibleAction(param);
- } catch (com.sun.star.lang.IndexOutOfBoundsException e) {
- return false;
- } catch (com.sun.star.uno.RuntimeException e) {
- return false;
- }
- }
-
- public String getAccessibleActionDescription(int param) {
- try {
- return unoObject.getAccessibleActionDescription(param);
- } catch (com.sun.star.lang.IndexOutOfBoundsException e) {
- return null;
- }
- }
-
- public int getAccessibleActionCount() {
- try {
- return unoObject.getAccessibleActionCount();
- } catch (com.sun.star.uno.RuntimeException e) {
- return 0;
- }
- }
- }
-
- /** Creates new AccessibleHypertextImpl */
- public AccessibleHypertextImpl(XAccessibleHypertext xAccessibleHypertext) {
- if (Build.PRODUCT) {
- unoObject = xAccessibleHypertext;
- } else {
- String property = System.getProperty("AccessBridgeLogging");
- if ((property != null) && (property.indexOf("text") != -1)) {
- unoObject = new XAccessibleHypertextLog(xAccessibleHypertext);
- } else {
- unoObject = xAccessibleHypertext;
- }
- }
- }
-
- public static javax.accessibility.AccessibleText get(com.sun.star.uno.XInterface unoObject) {
- try {
- XAccessibleHypertext unoAccessibleHypertext = UnoRuntime.queryInterface(XAccessibleHypertext.class, unoObject);
- if (unoAccessibleHypertext != null) {
- return new AccessibleHypertextImpl(unoAccessibleHypertext);
- }
-
- XAccessibleText unoAccessibleText = UnoRuntime.queryInterface(XAccessibleText.class, unoObject);
- if (unoAccessibleText != null) {
- return new AccessibleTextImpl(unoAccessibleText);
- }
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list