diff options
author | Ivo Hinkelmann <ihi@openoffice.org> | 2011-02-16 15:09:19 +0100 |
---|---|---|
committer | Ivo Hinkelmann <ihi@openoffice.org> | 2011-02-16 15:09:19 +0100 |
commit | ac7aee76690f0356056a0ce4d48db77a870585c3 (patch) | |
tree | 9be94591b775222f5df17b1c86a09757863e6ade | |
parent | 5836ef5ca62a974b598e0cabf5889a876a0be80d (diff) | |
parent | bf3f4fe64712e3443b04caa8b9107ae5b47eb43a (diff) |
CWS-TOOLING: integrate CWS accfixes
-rw-r--r-- | svtools/inc/svtools/svtools.hrc | 9 | ||||
-rw-r--r-- | svtools/source/contnr/svcontnr.src | 27 | ||||
-rwxr-xr-x[-rw-r--r--] | svtools/source/control/filectrl.src | 40 | ||||
-rwxr-xr-x | svtools/source/control/ruler.cxx | 1 | ||||
-rwxr-xr-x | svtools/source/control/tabbar.cxx | 13 | ||||
-rw-r--r-- | svtools/source/control/toolbarmenuacc.cxx | 2 | ||||
-rw-r--r-- | svtools/source/control/valueacc.cxx | 2 | ||||
-rw-r--r-- | svtools/source/dialogs/colrdlg.hrc | 2 | ||||
-rw-r--r-- | svtools/source/dialogs/colrdlg.src | 38 | ||||
-rw-r--r-- | svtools/source/inc/filectrl.hrc | 7 | ||||
-rw-r--r-- | toolkit/inc/toolkit/awt/vclxcontainer.hxx | 2 | ||||
-rw-r--r-- | toolkit/inc/toolkit/awt/vclxtopwindow.hxx | 2 | ||||
-rw-r--r-- | toolkit/inc/toolkit/awt/vclxwindows.hxx | 2 | ||||
-rw-r--r-- | toolkit/source/awt/vclxaccessiblecomponent.cxx | 4 | ||||
-rw-r--r-- | toolkit/source/helper/unowrapper.cxx | 1 | ||||
-rw-r--r-- | tools/inc/tools/wintypes.hxx | 3 | ||||
-rw-r--r-- | vcl/inc/vcl/window.h | 18 | ||||
-rwxr-xr-x | vcl/inc/vcl/window.hxx | 14 | ||||
-rw-r--r-- | vcl/source/window/dlgctrl.cxx | 73 | ||||
-rw-r--r-- | vcl/source/window/window.cxx | 65 |
20 files changed, 206 insertions, 119 deletions
diff --git a/svtools/inc/svtools/svtools.hrc b/svtools/inc/svtools/svtools.hrc index b4bf84532b26..554fc63f5c7c 100644 --- a/svtools/inc/svtools/svtools.hrc +++ b/svtools/inc/svtools/svtools.hrc @@ -252,6 +252,10 @@ #define STR_SVT_ACC_DESC_FOLDER (STR_SVT_ACC_BEGIN+4) #define STR_SVT_ACC_DESC_FILE (STR_SVT_ACC_BEGIN+5) #define STR_SVT_ACC_EMPTY_FIELD (STR_SVT_ACC_BEGIN+6) +//IAccessible2 implementation +#define STR_SVT_ACC_LISTENTRY_SELCTED_STATE (STR_SVT_ACC_BEGIN+7) +#define STR_SVT_ACC_RULER_VERT_NAME (STR_SVT_ACC_BEGIN+8) +#define STR_SVT_ACC_RULER_HORZ_NAME (STR_SVT_ACC_BEGIN+9) #define STR_SVT_ACC_END (STR_SVT_ACC_EMPTY_FIELD) #define STR_SVT_INDEXENTRY_START (STR_SVT_ACC_END + 1) @@ -390,6 +394,11 @@ #define RID_IMG_PRNDLG_COLLATE_HC (STR_SVT_PRNDLG_START + 31) #define RID_IMG_PRNDLG_NOCOLLATE_HC (STR_SVT_PRNDLG_START + 32) +// IAccessible2 implementation in 2009 +#define STR_PARAGRAPH_START (STR_SVT_PRNDLG_START + 50) +#define STR_PARAGRAPH (STR_PARAGRAPH_START + 0) +#define STR_PARAGRAPH_END (STR_PARAGRAPH) + #endif // #ifndef _SVTOOLS_HRC // ******************************************************************* EOF diff --git a/svtools/source/contnr/svcontnr.src b/svtools/source/contnr/svcontnr.src index bcd1e060664f..e0449fc3f644 100644 --- a/svtools/source/contnr/svcontnr.src +++ b/svtools/source/contnr/svcontnr.src @@ -74,30 +74,3 @@ String STR_SVT_ACC_EMPTY_FIELD Text [ en-US ] = "Empty Field"; }; - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/svtools/source/control/filectrl.src b/svtools/source/control/filectrl.src index dc8bbb5905d6..f9d63b65b838 100644..100755 --- a/svtools/source/control/filectrl.src +++ b/svtools/source/control/filectrl.src @@ -31,28 +31,20 @@ String STR_FILECTRL_BUTTONTEXT Text [ en-US ] = "Browse..." ; }; - - - - - - - - - - - - - - - - - - - - - - - - +String STR_TABBAR_PUSHBUTTON_MOVET0HOME +{ + Text [ en-US ] = "Move To Home" ; +}; +String STR_TABBAR_PUSHBUTTON_MOVELEFT +{ + Text [ en-US ] = "Move Left" ; +}; +String STR_TABBAR_PUSHBUTTON_MOVERIGHT +{ + Text [ en-US ] = "Move Right" ; +}; +String STR_TABBAR_PUSHBUTTON_MOVETOEND +{ + Text [ en-US ] = "Move To End" ; +}; diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx index 164118d12ef9..1c5b95460232 100755 --- a/svtools/source/control/ruler.cxx +++ b/svtools/source/control/ruler.cxx @@ -303,6 +303,7 @@ void Ruler::ImplInit( WinBits nWinBits ) else aDefSize.Width() = nDefHeight; SetOutputSizePixel( aDefSize ); + SetType(WINDOW_RULER); } // ----------------------------------------------------------------------- diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx index 033ae63e8a0a..b7511d24b5c8 100755 --- a/svtools/source/control/tabbar.cxx +++ b/svtools/source/control/tabbar.cxx @@ -38,7 +38,8 @@ #include <vcl/button.hxx> #include <vcl/edit.hxx> #include "svtaccessiblefactory.hxx" - +#include <filectrl.hrc> +#include <svtools/svtdata.hxx> #include <limits> // ======================================================================= @@ -397,6 +398,16 @@ void TabBar::ImplInit( WinBits nWinStyle ) mnOffY++; ImplInitControls(); + + if(mpFirstBtn) + mpFirstBtn->SetAccessibleName(String(SvtResId(STR_TABBAR_PUSHBUTTON_MOVET0HOME))); + if(mpPrevBtn) + mpPrevBtn->SetAccessibleName( String(SvtResId(STR_TABBAR_PUSHBUTTON_MOVELEFT))); + if(mpNextBtn) + mpNextBtn->SetAccessibleName(String(SvtResId(STR_TABBAR_PUSHBUTTON_MOVERIGHT))); + if(mpLastBtn) + mpLastBtn->SetAccessibleName( String(SvtResId(STR_TABBAR_PUSHBUTTON_MOVETOEND))); + SetSizePixel( Size( 100, CalcWindowSizePixel().Height() ) ); ImplInitSettings( sal_True, sal_True ); } diff --git a/svtools/source/control/toolbarmenuacc.cxx b/svtools/source/control/toolbarmenuacc.cxx index 9ffc4fc55f04..620002017e6c 100644 --- a/svtools/source/control/toolbarmenuacc.cxx +++ b/svtools/source/control/toolbarmenuacc.cxx @@ -252,7 +252,7 @@ OUString SAL_CALL ToolbarMenuAcc::getAccessibleName() throw (RuntimeException) if( !aRet.getLength() ) { - Window* pLabel = mpParent->mrMenu.GetLabeledBy(); + Window* pLabel = mpParent->mrMenu.GetAccessibleRelationLabeledBy(); if( pLabel && pLabel != &mpParent->mrMenu ) aRet = OutputDevice::GetNonMnemonicString( pLabel->GetText() ); } diff --git a/svtools/source/control/valueacc.cxx b/svtools/source/control/valueacc.cxx index 848ef4c3e10e..1b98e3197bd3 100644 --- a/svtools/source/control/valueacc.cxx +++ b/svtools/source/control/valueacc.cxx @@ -317,7 +317,7 @@ sal_Int16 SAL_CALL ValueSetAcc::getAccessibleRole() if ( !aRet.Len() ) { - Window* pLabel = mpParent->GetLabeledBy(); + Window* pLabel = mpParent->GetAccessibleRelationLabeledBy(); if ( pLabel && pLabel != mpParent ) aRet = OutputDevice::GetNonMnemonicString( pLabel->GetText() ); } diff --git a/svtools/source/dialogs/colrdlg.hrc b/svtools/source/dialogs/colrdlg.hrc index 41329df6e366..b1e785bd2f17 100644 --- a/svtools/source/dialogs/colrdlg.hrc +++ b/svtools/source/dialogs/colrdlg.hrc @@ -65,3 +65,5 @@ #define BTN_CANCEL 1 #define BTN_HELP 1 +//IAccessibility2 Implementation 2009----- +#define STR_COLORDES 3001 diff --git a/svtools/source/dialogs/colrdlg.src b/svtools/source/dialogs/colrdlg.src index a93642b0bd05..fee6314b28cc 100644 --- a/svtools/source/dialogs/colrdlg.src +++ b/svtools/source/dialogs/colrdlg.src @@ -277,45 +277,19 @@ ModalDialog DLG_COLOR Border = TRUE ; Pos = MAP_APPFONT ( 200 , 109 ) ; Size = MAP_APPFONT ( 26 , 51 + DIFF ) ; - TabStop = TRUE ; + TabStop = FALSE ; }; Control CTL_PREVIEW { Border = TRUE ; Pos = MAP_APPFONT ( 229 , 109 ) ; Size = MAP_APPFONT ( 26 , 51 + DIFF ) ; - TabStop = TRUE ; + TabStop = FALSE ; }; }; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +String STR_COLORDES +{ + Text [ en-US ] = "RGB(%1, %2, %3) Hue:%4 Saturation:%5 Brightness:%6"; +}; diff --git a/svtools/source/inc/filectrl.hrc b/svtools/source/inc/filectrl.hrc index 1707e306e1b0..150bbba4ac68 100644 --- a/svtools/source/inc/filectrl.hrc +++ b/svtools/source/inc/filectrl.hrc @@ -30,5 +30,12 @@ #define STR_FILECTRL_BUTTONTEXT 333 // ID-Range?! +//IAccessibility2 Implementation 2009----- +#define STR_TABBAR_PUSHBUTTON_MOVET0HOME ( STR_FILECTRL_BUTTONTEXT+ 1) +#define STR_TABBAR_PUSHBUTTON_MOVELEFT ( STR_FILECTRL_BUTTONTEXT+ 2) +#define STR_TABBAR_PUSHBUTTON_MOVERIGHT ( STR_FILECTRL_BUTTONTEXT+ 3) +#define STR_TABBAR_PUSHBUTTON_MOVETOEND ( STR_FILECTRL_BUTTONTEXT+ 4) +//-----IAccessibility2 Implementation 2009 + #endif diff --git a/toolkit/inc/toolkit/awt/vclxcontainer.hxx b/toolkit/inc/toolkit/awt/vclxcontainer.hxx index b854844ae7f1..dbf8c62f4580 100644 --- a/toolkit/inc/toolkit/awt/vclxcontainer.hxx +++ b/toolkit/inc/toolkit/awt/vclxcontainer.hxx @@ -42,7 +42,7 @@ // class VCLXContainer // ---------------------------------------------------- -class VCLXContainer : public ::com::sun::star::awt::XVclContainer, +class TOOLKIT_DLLPUBLIC VCLXContainer : public ::com::sun::star::awt::XVclContainer, public ::com::sun::star::awt::XVclContainerPeer, public VCLXWindow { diff --git a/toolkit/inc/toolkit/awt/vclxtopwindow.hxx b/toolkit/inc/toolkit/awt/vclxtopwindow.hxx index d8e467b01499..d3b130cc8202 100644 --- a/toolkit/inc/toolkit/awt/vclxtopwindow.hxx +++ b/toolkit/inc/toolkit/awt/vclxtopwindow.hxx @@ -91,7 +91,7 @@ public: // class VCLXTopWindow // ---------------------------------------------------- -class VCLXTopWindow: public VCLXTopWindow_Base, +class TOOLKIT_DLLPUBLIC VCLXTopWindow: public VCLXTopWindow_Base, public VCLXContainer { protected: diff --git a/toolkit/inc/toolkit/awt/vclxwindows.hxx b/toolkit/inc/toolkit/awt/vclxwindows.hxx index 547ee86c66e4..8dcf05c9f8db 100644 --- a/toolkit/inc/toolkit/awt/vclxwindows.hxx +++ b/toolkit/inc/toolkit/awt/vclxwindows.hxx @@ -377,7 +377,7 @@ public: // ---------------------------------------------------- // class VCLXDialog // ---------------------------------------------------- -class VCLXDialog : public ::com::sun::star::awt::XDialog2, +class TOOLKIT_DLLPUBLIC VCLXDialog : public ::com::sun::star::awt::XDialog2, public VCLXTopWindow { public: diff --git a/toolkit/source/awt/vclxaccessiblecomponent.cxx b/toolkit/source/awt/vclxaccessiblecomponent.cxx index 80991e0a2a77..de5ebab36b2a 100644 --- a/toolkit/source/awt/vclxaccessiblecomponent.cxx +++ b/toolkit/source/awt/vclxaccessiblecomponent.cxx @@ -445,7 +445,7 @@ void VCLXAccessibleComponent::FillAccessibleRelationSet( utl::AccessibleRelation Window* pWindow = GetWindow(); if ( pWindow ) { - Window *pLabeledBy = pWindow->GetLabeledBy(); + Window *pLabeledBy = pWindow->GetAccessibleRelationLabeledBy(); if ( pLabeledBy && pLabeledBy != pWindow ) { uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1); @@ -453,7 +453,7 @@ void VCLXAccessibleComponent::FillAccessibleRelationSet( utl::AccessibleRelation rRelationSet.AddRelation( accessibility::AccessibleRelation( accessibility::AccessibleRelationType::LABELED_BY, aSequence ) ); } - Window* pLabelFor = pWindow->GetLabelFor(); + Window* pLabelFor = pWindow->GetAccessibleRelationLabelFor(); if ( pLabelFor && pLabelFor != pWindow ) { uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1); diff --git a/toolkit/source/helper/unowrapper.cxx b/toolkit/source/helper/unowrapper.cxx index 1b676ec0edb3..943723ea5910 100644 --- a/toolkit/source/helper/unowrapper.cxx +++ b/toolkit/source/helper/unowrapper.cxx @@ -68,7 +68,6 @@ using namespace ::com::sun::star; // instead of only a <VCLXWindow> instance, especially regarding its // corresponding accessibility API. case WINDOW_METRICBOX: - // <-- case WINDOW_COMBOBOX: return new VCLXComboBox; case WINDOW_SPINFIELD: case WINDOW_NUMERICFIELD: diff --git a/tools/inc/tools/wintypes.hxx b/tools/inc/tools/wintypes.hxx index 3e6081fa2b82..18adfbab37ef 100644 --- a/tools/inc/tools/wintypes.hxx +++ b/tools/inc/tools/wintypes.hxx @@ -117,7 +117,8 @@ typedef sal_uInt16 WindowType; #define WINDOW_INTROWINDOW (WINDOW_FIRST + 0x4f) #define WINDOW_LISTBOXWINDOW (WINDOW_FIRST + 0x50) #define WINDOW_DOCKINGAREA (WINDOW_FIRST + 0x51) -#define WINDOW_LAST (WINDOW_DOCKINGAREA) +#define WINDOW_RULER (WINDOW_FIRST + 0x52) +#define WINDOW_LAST (WINDOW_RULER) // --------------- diff --git a/vcl/inc/vcl/window.h b/vcl/inc/vcl/window.h index 4a9afddea8b0..4011584890cf 100644 --- a/vcl/inc/vcl/window.h +++ b/vcl/inc/vcl/window.h @@ -210,6 +210,24 @@ struct ImplFrameData sal_Bool mbInternalDragGestureRecognizer; }; +// ----------------------- +// - ImplAccessibleInfos - +// ----------------------- + +struct ImplAccessibleInfos +{ + sal_uInt16 nAccessibleRole; + String* pAccessibleName; + String* pAccessibleDescription; + Window* pLabeledByWindow; + Window* pLabelForWindow; + Window* pMemberOfWindow; + + ImplAccessibleInfos(); + ~ImplAccessibleInfos(); +}; + + // --------------- // - WindowImpl - // --------------- diff --git a/vcl/inc/vcl/window.hxx b/vcl/inc/vcl/window.hxx index 364fef4ef015..f367be85051d 100755 --- a/vcl/inc/vcl/window.hxx +++ b/vcl/inc/vcl/window.hxx @@ -1053,9 +1053,20 @@ public: void SetAccessibleDescription( const String& rDescr ); String GetAccessibleDescription() const; + void SetAccessibleRelationLabeledBy( Window* pLabeledBy ); + Window* GetAccessibleRelationLabeledBy() const; + + void SetAccessibleRelationLabelFor( Window* pLabelFor ); + Window* GetAccessibleRelationLabelFor() const; + + void SetAccessibleRelationMemberOf( Window* pMemberOf ); + Window* GetAccessibleRelationMemberOf() const; + + // to avoid sending accessibility events in cases like closing dialogs // by default checks complete parent path sal_Bool IsAccessibilityEventsSuppressed( sal_Bool bTraverseParentPath = sal_True ); + void SetAccessibilityEventsSuppressed(sal_Bool bSuppressed); /// request XCanvas render interface for this window ::com::sun::star::uno::Reference< @@ -1080,8 +1091,7 @@ public: sal_Bool IsCreatedWithToolkit() const; void SetCreatedWithToolkit( sal_Bool b ); - Window* GetLabelFor() const; - Window* GetLabeledBy() const; + // Deprecated - can use SetAccessibleRelationLabelFor/By nowadys virtual Window* GetParentLabelFor( const Window* pLabel ) const; virtual Window* GetParentLabeledBy( const Window* pLabeled ) const; KeyEvent GetActivationKey() const; diff --git a/vcl/source/window/dlgctrl.cxx b/vcl/source/window/dlgctrl.cxx index bf4cc231fcc7..32fc4755a62d 100644 --- a/vcl/source/window/dlgctrl.cxx +++ b/vcl/source/window/dlgctrl.cxx @@ -1120,11 +1120,15 @@ static Window* ImplGetLabelFor( Window* pFrameWindow, WindowType nMyType, Window return pWindow; } -Window* Window::GetLabelFor() const +Window* Window::GetAccessibleRelationLabelFor() const { if ( mpWindowImpl->mbDisableAccessibleLabelForRelation ) return NULL; + if ( mpWindowImpl->mpAccessibleInfos && mpWindowImpl->mpAccessibleInfos->pLabelForWindow ) + return mpWindowImpl->mpAccessibleInfos->pLabelForWindow; + + Window* pWindow = NULL; Window* pFrameWindow = ImplGetFrameWindow(); @@ -1205,11 +1209,14 @@ static Window* ImplGetLabeledBy( Window* pFrameWindow, WindowType nMyType, Windo return pWindow; } -Window* Window::GetLabeledBy() const +Window* Window::GetAccessibleRelationLabeledBy() const { if ( mpWindowImpl->mbDisableAccessibleLabeledByRelation ) return NULL; + if ( mpWindowImpl->mpAccessibleInfos && mpWindowImpl->mpAccessibleInfos->pLabeledByWindow ) + return mpWindowImpl->mpAccessibleInfos->pLabeledByWindow; + Window* pWindow = NULL; Window* pFrameWindow = ImplGetFrameWindow(); @@ -1238,6 +1245,62 @@ Window* Window::GetLabeledBy() const return pWindow; } +Window* Window::GetAccessibleRelationMemberOf() const +{ + Window* pWindow = NULL; + Window* pFrameWindow = GetParent(); + if ( !pFrameWindow ) + { + pFrameWindow = ImplGetFrameWindow(); + } + // if( ! ( GetType() == WINDOW_FIXEDTEXT || + if( !( GetType() == WINDOW_FIXEDLINE || + GetType() == WINDOW_GROUPBOX ) ) + { + // search for a control that makes member of this window + // it is considered the last fixed line or group box + // that comes before this control; with the exception of push buttons + // which are labeled only if the fixed line or group box + // is directly before the control + // get form start and form end and index of this control + sal_uInt16 nIndex, nFormStart, nFormEnd; + Window* pSWindow = ::ImplFindDlgCtrlWindow( pFrameWindow, + const_cast<Window*>(this), + nIndex, + nFormStart, + nFormEnd ); + if( pSWindow && nIndex != nFormStart ) + { + if( GetType() == WINDOW_PUSHBUTTON || + GetType() == WINDOW_HELPBUTTON || + GetType() == WINDOW_OKBUTTON || + GetType() == WINDOW_CANCELBUTTON ) + { + nFormStart = nIndex-1; + } + for( sal_uInt16 nSearchIndex = nIndex-1; nSearchIndex >= nFormStart; nSearchIndex-- ) + { + sal_uInt16 nFoundIndex = 0; + pSWindow = ::ImplGetChildWindow( pFrameWindow, + nSearchIndex, + nFoundIndex, + sal_False ); + if( pSWindow && pSWindow->IsVisible() && + ( pSWindow->GetType() == WINDOW_FIXEDLINE || + pSWindow->GetType() == WINDOW_GROUPBOX ) ) + { + pWindow = pSWindow; + break; + } + if( nFoundIndex > nSearchIndex || nSearchIndex == 0 ) + break; + } + } + } + return pWindow; +} +//-----IAccessibility2 Implementation 2009 + // ----------------------------------------------------------------------- KeyEvent Window::GetActivationKey() const @@ -1247,7 +1310,7 @@ KeyEvent Window::GetActivationKey() const sal_Unicode nAccel = getAccel( GetText() ); if( ! nAccel ) { - Window* pWindow = GetLabeledBy(); + Window* pWindow = GetAccessibleRelationLabeledBy(); if( pWindow ) nAccel = getAccel( pWindow->GetText() ); } @@ -1260,6 +1323,10 @@ KeyEvent Window::GetActivationKey() const nCode = KEY_A + (nAccel-'A'); else if( nAccel >= '0' && nAccel <= '9' ) nCode = KEY_0 + (nAccel-'0'); + else if( nAccel == '.' ) + nCode = KEY_POINT; + else if( nAccel == '-' ) + nCode = KEY_SUBTRACT; KeyCode aKeyCode( nCode, sal_False, sal_False, sal_True, sal_False ); aKeyEvent = KeyEvent( nAccel, aKeyCode ); } diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index cfd9c99f54d2..6ddb10c92cd7 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -134,25 +134,21 @@ struct ImplCalcToTopData Region* mpInvalidateRegion; }; -struct ImplAccessibleInfos +ImplAccessibleInfos::ImplAccessibleInfos() { - sal_uInt16 nAccessibleRole; - String* pAccessibleName; - String* pAccessibleDescription; - - ImplAccessibleInfos() - { - nAccessibleRole = 0xFFFF; - pAccessibleName = NULL; - pAccessibleDescription = NULL; - } + nAccessibleRole = 0xFFFF; + pAccessibleName = NULL; + pAccessibleDescription = NULL; + pLabeledByWindow = NULL; + pLabelForWindow = NULL; + pMemberOfWindow = NULL; +} - ~ImplAccessibleInfos() - { - delete pAccessibleName; - delete pAccessibleDescription; - } -}; +ImplAccessibleInfos::~ImplAccessibleInfos() +{ + delete pAccessibleName; + delete pAccessibleDescription; +} // ----------------------------------------------------------------------- @@ -8086,7 +8082,7 @@ void Window::SetText( const XubString& rStr ) // name change. if ( IsReallyVisible() ) { - Window* pWindow = GetLabelFor(); + Window* pWindow = GetAccessibleRelationLabelFor(); if ( pWindow && pWindow != this ) pWindow->ImplCallEventListeners( VCLEVENT_WINDOW_FRAMETITLECHANGED, &oldTitle ); } @@ -9134,6 +9130,7 @@ sal_uInt16 Window::GetAccessibleRole() const case WINDOW_HELPTEXTWINDOW: nRole = accessibility::AccessibleRole::TOOL_TIP; break; + case WINDOW_RULER: nRole = accessibility::AccessibleRole::RULER; break; case WINDOW_WINDOW: case WINDOW_CONTROL: case WINDOW_BORDERWINDOW: @@ -9160,7 +9157,7 @@ void Window::SetAccessibleName( const String& rName ) if ( !mpWindowImpl->mpAccessibleInfos ) mpWindowImpl->mpAccessibleInfos = new ImplAccessibleInfos; - DBG_ASSERT( !mpWindowImpl->mpAccessibleInfos->pAccessibleName, "AccessibleName already set!" ); + DBG_ASSERT( !mpWindowImpl->mpAccessibleInfos->pAccessibleName || !rName.Len(), "AccessibleName already set!" ); delete mpWindowImpl->mpAccessibleInfos->pAccessibleName; mpWindowImpl->mpAccessibleInfos->pAccessibleName = new String( rName ); } @@ -9201,9 +9198,9 @@ String Window::GetAccessibleName() const case WINDOW_LISTBOX: case WINDOW_MULTILISTBOX: case WINDOW_TREELISTBOX: - + case WINDOW_METRICBOX: { - Window *pLabel = GetLabeledBy(); + Window *pLabel = GetAccessibleRelationLabeledBy(); if ( pLabel && pLabel != this ) aAccessibleName = pLabel->GetText(); } @@ -9262,6 +9259,27 @@ String Window::GetAccessibleDescription() const return aAccessibleDescription; } +void Window::SetAccessibleRelationLabeledBy( Window* pLabeledBy ) +{ + if ( !mpWindowImpl->mpAccessibleInfos ) + mpWindowImpl->mpAccessibleInfos = new ImplAccessibleInfos; + mpWindowImpl->mpAccessibleInfos->pLabeledByWindow = pLabeledBy; +} + +void Window::SetAccessibleRelationLabelFor( Window* pLabelFor ) +{ + if ( !mpWindowImpl->mpAccessibleInfos ) + mpWindowImpl->mpAccessibleInfos = new ImplAccessibleInfos; + mpWindowImpl->mpAccessibleInfos->pLabelForWindow = pLabelFor; +} + +void Window::SetAccessibleRelationMemberOf( Window* pMemberOfWin ) +{ + if ( !mpWindowImpl->mpAccessibleInfos ) + mpWindowImpl->mpAccessibleInfos = new ImplAccessibleInfos; + mpWindowImpl->mpAccessibleInfos->pMemberOfWindow = pMemberOfWin; +} + sal_Bool Window::IsAccessibilityEventsSuppressed( sal_Bool bTraverseParentPath ) { if( !bTraverseParentPath ) @@ -9280,6 +9298,11 @@ sal_Bool Window::IsAccessibilityEventsSuppressed( sal_Bool bTraverseParentPath ) } } +void Window::SetAccessibilityEventsSuppressed(sal_Bool bSuppressed) +{ + mpWindowImpl->mbSuppressAccessibilityEvents = bSuppressed; +} + void Window::RecordLayoutData( vcl::ControlLayoutData* pLayout, const Rectangle& rRect ) { if( ! mpOutDevData ) |