diff options
author | Steve Yin <steve_y@apache.org> | 2013-11-26 12:06:30 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-11-26 12:08:54 +0000 |
commit | 2f973aa90d508cd88050b0273634482de2174a08 (patch) | |
tree | 20cf1be8e30e0b990cc8b64cddaacc477e93c696 /formula | |
parent | 1da6609eb8d3d70bb620d949b1935a5789c2d2ce (diff) |
Integrate branch of IAccessible2
Change-Id: Id8c4ff1d10eccda2d7279d625822759c1f520a46
Diffstat (limited to 'formula')
-rw-r--r-- | formula/source/ui/dlg/ControlHelper.hxx | 1 | ||||
-rw-r--r-- | formula/source/ui/dlg/formdlgs.src | 3 | ||||
-rw-r--r-- | formula/source/ui/dlg/funcutl.cxx | 16 | ||||
-rw-r--r-- | formula/source/ui/dlg/parawin.cxx | 4 |
4 files changed, 23 insertions, 1 deletions
diff --git a/formula/source/ui/dlg/ControlHelper.hxx b/formula/source/ui/dlg/ControlHelper.hxx index c2d6c8a35bf9..86f4f1d01c4c 100644 --- a/formula/source/ui/dlg/ControlHelper.hxx +++ b/formula/source/ui/dlg/ControlHelper.hxx @@ -176,6 +176,7 @@ public: void Hide(); void Show(); + void UpdateAccessibleNames(); }; } diff --git a/formula/source/ui/dlg/formdlgs.src b/formula/source/ui/dlg/formdlgs.src index 3095b82b9a8e..83ef11b56343 100644 --- a/formula/source/ui/dlg/formdlgs.src +++ b/formula/source/ui/dlg/formdlgs.src @@ -189,11 +189,12 @@ ModalDialog RID_FORMULADLG_FORMULA_MODAL Right = TRUE ; Text [ en-US ] = "Function result" ; }; - Window WND_RESULT + FixedText WND_RESULT { Border = TRUE ; Pos = MAP_APPFONT ( 255 , 4 ) ; Size = MAP_APPFONT ( 60 , 12 ) ; + Text [ en-US ] = "Function result" ; }; FixedText FT_FORMULA_RESULT { diff --git a/formula/source/ui/dlg/funcutl.cxx b/formula/source/ui/dlg/funcutl.cxx index 890ac41bc1f6..9b7be4c4a195 100644 --- a/formula/source/ui/dlg/funcutl.cxx +++ b/formula/source/ui/dlg/funcutl.cxx @@ -26,6 +26,7 @@ #include "ControlHelper.hxx" #include "ModuleHelper.hxx" #include "ForResId.hrc" +#include "com/sun/star/accessibility/AccessibleRole.hpp" namespace formula @@ -61,6 +62,7 @@ ValWnd::ValWnd( Window* pParent, const ResId& rId ) : Window( pParent, rId ) aRectOut = Rectangle( Point( 1, ( nDiff<2 ) ? 1 : nDiff/2), Size ( aSzWnd.Width()-2, nHeight ) ); SetClipRegion( Region( aRectOut ) ); + SetAccessibleRole( ::com::sun::star::accessibility::AccessibleRole::LABEL ); } //---------------------------------------------------------------------------- @@ -421,6 +423,20 @@ void ArgInput::Show() } } +void ArgInput::UpdateAccessibleNames() +{ + OUString aArgName(":"); + aArgName += pFtArg->GetText(); + + OUString aName = pBtnFx->GetQuickHelpText(); + aName += aArgName; + pBtnFx->SetAccessibleName(aName); + + aName = pRefBtn->GetQuickHelpText(); + aName += aArgName; + pRefBtn->SetAccessibleName(aName); +} + /************************************************************************* #* Member: FxClick Date:13.01.97 #*------------------------------------------------------------------------ diff --git a/formula/source/ui/dlg/parawin.cxx b/formula/source/ui/dlg/parawin.cxx index c209c3761da8..24a22c2056f0 100644 --- a/formula/source/ui/dlg/parawin.cxx +++ b/formula/source/ui/dlg/parawin.cxx @@ -353,6 +353,7 @@ void ParaWin::SetEditDesc(const OUString& aText) void ParaWin::SetArgName(sal_uInt16 no,const OUString& aText) { aArgInput[no].SetArgName(aText); + aArgInput[no].UpdateAccessibleNames(); } void ParaWin::SetArgNameFont(sal_uInt16 no,const Font& aFont) @@ -398,6 +399,7 @@ void ParaWin::InitArgInput( sal_uInt16 nPos, FixedText& rFtArg, ImageButton& rBt aArgInput[nPos].SetFxFocusHdl ( LINK( this, ParaWin, GetFxFocusHdl ) ); aArgInput[nPos].SetEdFocusHdl ( LINK( this, ParaWin, GetEdFocusHdl ) ); aArgInput[nPos].SetEdModifyHdl ( LINK( this, ParaWin, ModifyHdl ) ); + aArgInput[nPos].UpdateAccessibleNames(); } void ParaWin::ClearAll() @@ -494,6 +496,7 @@ void ParaWin::SliderMoved() aArgInput[nEdFocus].SetArgSelection(Selection(0,SELECTION_MAX )); nActiveLine=nEdFocus+nOffset; ArgumentModified(); + aArgInput[nEdFocus].UpdateAccessibleNames(); } aScrollLink.Call(this); } @@ -574,6 +577,7 @@ IMPL_LINK( ParaWin, GetEdFocusHdl, ArgInput*, pPtr ) UpdateArgDesc( nEdFocus ); nActiveLine=nEdFocus+nOffset; ArgumentModified(); + aArgInput[nEdFocus].UpdateAccessibleNames(); } return 0; |