diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2009-08-26 13:37:34 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2009-08-26 13:37:34 +0000 |
commit | 0f5a6721731d28f0b5a7a3b3e5e274ec99e20e27 (patch) | |
tree | d6099d6b98313a38c2cfa701fda10254d8946d13 /vcl | |
parent | 27a1e85b656bad222f113f650b03397aa3bc59d3 (diff) |
CWS-TOOLING: integrate CWS swa11y32_2nd
2009-08-13 13:04:09 +0200 mav r274936 : #i104204# remove support for Ctrl-Tab
2009-08-13 09:59:22 +0200 od r274924 : #i93269# method <atk_wrapper_focus_idle_handler(..)>
- emit also object:state-changed:focus, if cursor is inside <XAccessibleText> object
2009-08-11 12:15:11 +0200 tl r274851 : CWS-TOOLING: rebase CWS swa11y32_2nd to trunk@274622 (milestone: DEV300:m54)
2009-07-14 17:35:03 +0200 tl r273982 : 2009-07-10 10:46:39 +0200 tl r273879 : CWS-TOOLING: rebase CWS swa11y32 to trunk@273468 (milestone: DEV300:m51)
2009-07-01 14:00:25 +0200 mav r273577 : #i102879# the text of the button should not change
2009-07-01 13:16:19 +0200 od r273574 : #159496# method <GetHelpAnchor_Impl(..)>
- do not release the solar mutex
2009-06-29 15:29:10 +0200 od r273476 : #i95042# method <CreateXWindow(..)>
- return instance <VCLXComboBox> for <Window> instance of type <MetricBox>.
note: <MetricBox> is inherited from <ComboBox>
2009-06-23 15:49:32 +0200 mav r273283 : #i101967# fix tab-control implementation
2009-06-22 13:56:22 +0200 od r273229 : #i100938# method <text_wrapper_get_run_attributes(..)>
- always provide start_offset and end_offset
- do _not_ increment the end_offset provide by <accessibility::TextSegment> instance
2009-06-02 12:09:03 +0200 mav r272492 : #i101959# Let the additional dialog window add its childred to the parents tab-hierarchy
2009-06-02 09:55:39 +0200 mav r272484 : #i102015# allow to have indirect child windows in tab-hierarchy
2009-06-02 09:49:42 +0200 mav r272482 : #i102015# Let the windows containing the extension dialog controls add controls to the tab hierarchy
2009-05-27 15:45:33 +0200 od r272354 : #i101012# method <SvxIconChoiceCtrl_Impl::EntrySelected(..)>
- emit vcl event LISTBOX_SELECT only in case that the given entry is selected.
2009-05-27 09:54:36 +0200 od r272333 : #i92103# map UNO-API accessible events list box entry expanded/collapsed
to corresponding atk events.
2009-05-27 09:52:15 +0200 od r272331 : #i92103# process list box entry expanded/collapsed events
2009-05-27 09:49:19 +0200 od r272330 : #i92103# emit vcl event list box entry expanded/collapsed
2009-05-26 10:42:05 +0200 od r272283 : #i93269# correct fix: check success of <queryInterface> call
2009-05-04 15:52:04 +0200 od r271469 : #i92103# new vcl event ids VCLEVENT_LISTBOX_ENTRY_EXPANDED and VCLEVENT_LISTBOX_ENTRY_COLLAPSED
2009-05-04 15:10:20 +0200 od r271460 : #i92103# refine definition of new constants
2009-05-04 14:36:44 +0200 od r271454 : #i92103# new constants for indicating that a list box entry is
expanded respectively collapsed.
2009-04-30 16:09:40 +0200 od r271421 : #i93269# method <atk_wrapper_focus_idle_handler(..)>
- emit text_caret_moved event for <XAccessibleText> object,
if cursor is inside the <XAccessibleText> object.
2009-04-22 14:00:10 +0200 tl r271105 : warning-free code
2009-04-22 09:17:30 +0200 tl r271073 : CWS-TOOLING: rebase CWS swa11y32 to trunk@270723 (milestone: DEV300:m46)
2009-04-20 12:53:03 +0200 cd r270974 : #i83639# Check extendedhelp state to provide correct tool tip text
2009-04-03 13:07:13 +0200 tl r270471 : #i63983# changed accessible object names to empty strings
2009-04-01 15:52:09 +0200 tl r270336 : #i90991# accessible names and description for paragraphs should be empty
2009-04-01 15:12:42 +0200 tl r270333 : #i90991# accessible names and description for paragraphs should be empty
2009-04-01 15:10:34 +0200 tl r270331 : warning-free code
2009-04-01 12:54:44 +0200 tl r270319 : #i89176# Implementation of XAccessibleMultiLineText in EditEngine
2009-04-01 12:52:56 +0200 tl r270318 : #i89176# Implementation of XAccessibleMultiLineText in EditEngine
2009-03-27 18:31:01 +0100 tbe r270166 : #i92143# text getRangeExtents reports incorrect 'x' values for spreadsheet cells
2009-03-13 13:43:54 +0100 tl r269476 : #i94322# ImpEditView::ShowCursor and nPara == USHRT_MAX problem fixed
2009-03-12 10:27:30 +0100 tl r269366 : warning-free code; unresolved external dbg_out when compiling with debug=t
2009-03-11 12:40:31 +0100 tl r269312 : warning-free code Solaris x86
2009-03-10 15:49:01 +0100 tl r269279 : #i86443# handle GetColumnCount() == 0
2009-03-10 10:48:32 +0100 cl r269254 : #i91742# name cells for accessibility
2009-03-09 17:06:33 +0100 cl r269203 : #i91742# call init on accessible cells
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/vcl/vclevent.hxx | 4 | ||||
-rw-r--r-- | vcl/source/window/dlgctrl.cxx | 65 | ||||
-rw-r--r-- | vcl/source/window/taskpanelist.cxx | 28 | ||||
-rw-r--r-- | vcl/unx/gtk/a11y/atklistener.cxx | 26 | ||||
-rw-r--r-- | vcl/unx/gtk/a11y/atktext.cxx | 11 | ||||
-rw-r--r-- | vcl/unx/gtk/a11y/atkutil.cxx | 31 |
6 files changed, 145 insertions, 20 deletions
diff --git a/vcl/inc/vcl/vclevent.hxx b/vcl/inc/vcl/vclevent.hxx index 88ad880e26ab..a28127dd6f82 100644 --- a/vcl/inc/vcl/vclevent.hxx +++ b/vcl/inc/vcl/vclevent.hxx @@ -146,6 +146,10 @@ class Menu; #define VCLEVENT_ROADMAP_ITEMSELECTED 1171 #define VCLEVENT_TOOLBOX_FORMATCHANGED 1172 // request new layout #define VCLEVENT_COMBOBOX_SETTEXT 1173 +// --> OD 2009-04-01 #i92103# +#define VCLEVENT_LISTBOX_ENTRY_EXPANDED 1174 +#define VCLEVENT_LISTBOX_ENTRY_COLLAPSED 1175 +// <-- // VclMenuEvent #define VCLEVENT_MENU_ACTIVATE 1200 diff --git a/vcl/source/window/dlgctrl.cxx b/vcl/source/window/dlgctrl.cxx index 392c2ceaa478..c6f64d74c5fc 100644 --- a/vcl/source/window/dlgctrl.cxx +++ b/vcl/source/window/dlgctrl.cxx @@ -46,10 +46,41 @@ using namespace ::com::sun::star; // ======================================================================= +static BOOL ImplHasIndirectTabParent( Window* pWindow ) +{ + // The window has inderect tab parent if it is included in tab hierarchy + // of the indirect parent window + + return ( pWindow && pWindow->GetParent() + && ( pWindow->GetParent()->ImplGetWindow()->GetStyle() & WB_CHILDDLGCTRL ) ); +} + +// ----------------------------------------------------------------------- + +static Window* ImplGetTopParentOfTabHierarchy( Window* pParent ) +{ + // The method allows to find the most close parent containing all the + // window from the current tab-hierarchy + // The direct parent should be provided as a parameter here + + Window* pResult = pParent; + + if ( pResult ) + { + while ( pResult->GetParent() && ( pResult->ImplGetWindow()->GetStyle() & WB_CHILDDLGCTRL ) ) + pResult = pResult->GetParent(); + } + + return pResult; +} + +// ----------------------------------------------------------------------- + static Window* ImplGetSubChildWindow( Window* pParent, USHORT n, USHORT& nIndex ) { Window* pTabPage = NULL; Window* pFoundWindow = NULL; + Window* pWindow = pParent->GetWindow( WINDOW_FIRSTCHILD ); Window* pNextWindow = pWindow; while ( pWindow ) @@ -96,7 +127,8 @@ static Window* ImplGetSubChildWindow( Window* pParent, USHORT n, USHORT& nIndex } } } - else if ( pWindow->GetStyle() & WB_DIALOGCONTROL ) + else if ( ( pWindow->GetStyle() & WB_DIALOGCONTROL ) + || ( pWindow->GetStyle() & WB_CHILDDLGCTRL ) ) pFoundWindow = ImplGetSubChildWindow( pWindow, n, nIndex ); } @@ -122,6 +154,8 @@ static Window* ImplGetSubChildWindow( Window* pParent, USHORT n, USHORT& nIndex static Window* ImplGetChildWindow( Window* pParent, USHORT n, USHORT& nIndex, BOOL bTestEnable ) { + pParent = ImplGetTopParentOfTabHierarchy( pParent ); + nIndex = 0; Window* pWindow = ImplGetSubChildWindow( pParent, n, nIndex ); if ( bTestEnable ) @@ -284,14 +318,16 @@ static Window* ImplFindDlgCtrlWindow( Window* pParent, Window* pWindow, USHORT& USHORT nFormEnd; // Focus-Fenster in der Child-Liste suchen - pSWindow = ImplGetChildWindow( pParent, 0, i, FALSE ); + Window* pFirstChildWindow = pSWindow = ImplGetChildWindow( pParent, 0, i, FALSE ); if( pWindow == NULL ) pWindow = pSWindow; while ( pSWindow ) { - if ( pSWindow->ImplGetWindow()->IsDialogControlStart() ) + // the DialogControlStart mark is only accepted for the direct children + if ( !ImplHasIndirectTabParent( pSWindow ) + && pSWindow->ImplGetWindow()->IsDialogControlStart() ) nFormStart = i; // SecondWindow wegen zusammengesetzten Controls wie @@ -331,12 +367,33 @@ static Window* ImplFindDlgCtrlWindow( Window* pParent, Window* pWindow, USHORT& // Formularende suchen nFormEnd = nFormStart; pTempWindow = pSWindow; + sal_Int32 nIteration = 0; do { nFormEnd = i; pTempWindow = ImplGetNextWindow( pParent, i, i, FALSE ); - if ( !i || (pTempWindow && pTempWindow->ImplGetWindow()->IsDialogControlStart()) ) + + // the DialogControlStart mark is only accepted for the direct children + if ( !i + || ( pTempWindow && !ImplHasIndirectTabParent( pTempWindow ) + && pTempWindow->ImplGetWindow()->IsDialogControlStart() ) ) break; + + if ( pTempWindow && pTempWindow == pFirstChildWindow ) + { + // It is possible to go through the begin of hierarchy once + // while looking for DialogControlStart mark. + // If it happens second time, it looks like an endless loop, + // that should be impossible, but just for the case... + nIteration++; + if ( nIteration >= 2 ) + { + // this is an unexpected scenario + DBG_ASSERT( FALSE, "It seems to be an endless loop!" ); + rFormStart = 0; + break; + } + } } while ( pTempWindow ); rFormEnd = nFormEnd; diff --git a/vcl/source/window/taskpanelist.cxx b/vcl/source/window/taskpanelist.cxx index bae6d99430f0..d1e598532b88 100644 --- a/vcl/source/window/taskpanelist.cxx +++ b/vcl/source/window/taskpanelist.cxx @@ -197,18 +197,21 @@ BOOL TaskPaneList::HandleKeyEvent( KeyEvent aKeyEvent ) { // F6 cycles through everything and works always - // Ctrl-TAB cycles through Menubar, Toolbars and Floatingwindows only and is - // only active if one of those items has the focus - BOOL bF6 = FALSE; + + // MAV, #i104204# + // The old design was the following one: + // < Ctrl-TAB cycles through Menubar, Toolbars and Floatingwindows only and is + // < only active if one of those items has the focus + // + // Since the design of Ctrl-Tab looks to be inconsistent ( non-modal dialogs are not reachable + // and the shortcut conflicts with tab-control shortcut ), it is no more supported BOOL bSplitterOnly = FALSE; BOOL bFocusInList = FALSE; KeyCode aKeyCode = aKeyEvent.GetKeyCode(); BOOL bForward = !aKeyCode.IsShift(); - if( ( (aKeyCode.IsMod1() || aKeyCode.IsMod2()) && aKeyCode.GetCode() == KEY_TAB ) // Ctrl-TAB or Alt-TAB - || ( bF6 = ( aKeyCode.GetCode()) == KEY_F6 ) != FALSE // F6 - ) + if( aKeyCode.GetCode() == KEY_F6 ) // F6 { - bSplitterOnly = bF6 && aKeyCode.IsMod1() && aKeyCode.IsShift(); + bSplitterOnly = aKeyCode.IsMod1() && aKeyCode.IsShift(); // is the focus in the list ? ::std::vector< Window* >::iterator p = mTaskPanes.begin(); @@ -219,12 +222,8 @@ BOOL TaskPaneList::HandleKeyEvent( KeyEvent aKeyEvent ) { bFocusInList = TRUE; - // Ctrl-TAB does not work in Dialogs - if( !bF6 && pWin->IsDialog() ) - return FALSE; - // Ctrl-F6 goes directly to the document - if( !pWin->IsDialog() && bF6 && aKeyCode.IsMod1() && !aKeyCode.IsShift() ) + if( !pWin->IsDialog() && aKeyCode.IsMod1() && !aKeyCode.IsShift() ) { pWin->GrabFocusToDocument(); return TRUE; @@ -236,7 +235,8 @@ BOOL TaskPaneList::HandleKeyEvent( KeyEvent aKeyEvent ) if( bSplitterOnly ) pNextWin = FindNextSplitter( *p, TRUE ); else - pNextWin = bF6 ? FindNextFloat( *p, bForward ) : FindNextPane( *p, bForward ); + pNextWin = FindNextFloat( *p, bForward ); + if( pNextWin != pWin ) { ImplGetSVData()->maWinData.mbNoSaveFocus = TRUE; @@ -261,7 +261,7 @@ BOOL TaskPaneList::HandleKeyEvent( KeyEvent aKeyEvent ) } // the focus is not in the list: activate first float if F6 was pressed - if( !bFocusInList && bF6 ) + if( !bFocusInList ) { Window *pWin; if( bSplitterOnly ) diff --git a/vcl/unx/gtk/a11y/atklistener.cxx b/vcl/unx/gtk/a11y/atklistener.cxx index c3b2859f7c3f..f083e7cc584e 100644 --- a/vcl/unx/gtk/a11y/atklistener.cxx +++ b/vcl/unx/gtk/a11y/atklistener.cxx @@ -360,6 +360,32 @@ void AtkListener::notifyEvent( const accessibility::AccessibleEventObject& aEven break; } + // --> OD 2009-05-26 #i92103# + case accessibility::AccessibleEventId::LISTBOX_ENTRY_EXPANDED: + { + AtkObject *pChild = getObjFromAny( aEvent.NewValue ); + if( pChild ) + { + AtkStateType eExpandedState = ATK_STATE_EXPANDED; + atk_object_notify_state_change( pChild, eExpandedState, true ); + g_object_unref( pChild ); + } + break; + } + + case accessibility::AccessibleEventId::LISTBOX_ENTRY_COLLAPSED: + { + AtkObject *pChild = getObjFromAny( aEvent.NewValue ); + if( pChild ) + { + AtkStateType eExpandedState = ATK_STATE_EXPANDED; + atk_object_notify_state_change( pChild, eExpandedState, false ); + g_object_unref( pChild ); + } + break; + } + // <-- + // AtkAction signals ... case accessibility::AccessibleEventId::ACTION_CHANGED: g_signal_emit_by_name( G_OBJECT( atk_obj ), "property_change::accessible-actions"); diff --git a/vcl/unx/gtk/a11y/atktext.cxx b/vcl/unx/gtk/a11y/atktext.cxx index 1c839ed58839..8bdfe1706962 100644 --- a/vcl/unx/gtk/a11y/atktext.cxx +++ b/vcl/unx/gtk/a11y/atktext.cxx @@ -442,13 +442,20 @@ text_wrapper_get_run_attributes( AtkText *text, pTextAttributes->getRunAttributes( offset, uno::Sequence< rtl::OUString > () ); pSet = attribute_set_new_from_property_values( aAttributeList, true, text ); - if( pSet ) + // --> OD 2009-06-22 #i100938# + // - always provide start_offset and end_offset +// if( pSet ) + // <-- { accessibility::TextSegment aTextSegment = pText->getTextAtIndex(offset, accessibility::AccessibleTextType::ATTRIBUTE_RUN); *start_offset = aTextSegment.SegmentStart; - *end_offset = aTextSegment.SegmentEnd + 1; // FIXME: TESTME + // --> OD 2009-06-22 #i100938# + // Do _not_ increment the end_offset provide by <accessibility::TextSegment> instance +// *end_offset = aTextSegment.SegmentEnd + 1; // FIXME: TESTME + *end_offset = aTextSegment.SegmentEnd; + // <-- } } } diff --git a/vcl/unx/gtk/a11y/atkutil.cxx b/vcl/unx/gtk/a11y/atkutil.cxx index 91f4b3280448..5206c8ce87ca 100644 --- a/vcl/unx/gtk/a11y/atkutil.cxx +++ b/vcl/unx/gtk/a11y/atkutil.cxx @@ -36,6 +36,9 @@ #include <com/sun/star/accessibility/XAccessibleSelection.hpp> #include <com/sun/star/accessibility/AccessibleEventId.hpp> #include <com/sun/star/accessibility/AccessibleStateType.hpp> +// --> OD 2009-04-14 #i93269# +#include <com/sun/star/accessibility/XAccessibleText.hpp> +// <-- #include <cppuhelper/implbase1.hxx> #include <vos/mutex.hxx> #include <rtl/ref.hxx> @@ -86,6 +89,34 @@ atk_wrapper_focus_idle_handler (gpointer data) fprintf(stderr, "notifying focus event for %p\n", atk_obj); #endif atk_focus_tracker_notify(atk_obj); + // --> OD 2009-04-14 #i93269# + // emit text_caret_moved event for <XAccessibleText> object, + // if cursor is inside the <XAccessibleText> object. + // also emit state-changed:focused event under the same condition. + { + AtkObjectWrapper* wrapper_obj = ATK_OBJECT_WRAPPER (atk_obj); + if( !wrapper_obj->mpText && wrapper_obj->mpContext ) + { + uno::Any any = wrapper_obj->mpContext->queryInterface( accessibility::XAccessibleText::static_type(NULL) ); + if ( typelib_TypeClass_INTERFACE == any.pType->eTypeClass && + any.pReserved != 0 ) + { + wrapper_obj->mpText = reinterpret_cast< accessibility::XAccessibleText * > (any.pReserved); + if ( wrapper_obj->mpText != 0 ) + { + wrapper_obj->mpText->acquire(); + gint caretPos = wrapper_obj->mpText->getCaretPosition(); + + if ( caretPos != -1 ) + { + atk_object_notify_state_change( atk_obj, ATK_STATE_FOCUSED, TRUE ); + g_signal_emit_by_name( atk_obj, "text_caret_moved", caretPos ); + } + } + } + } + } + // <-- g_object_unref(atk_obj); } } |