[Libreoffice-commits] core.git: formula/source
Steve Yin
steve_y at apache.org
Tue Nov 26 04:09:28 PST 2013
formula/source/ui/dlg/ControlHelper.hxx | 1 +
formula/source/ui/dlg/formdlgs.src | 3 ++-
formula/source/ui/dlg/funcutl.cxx | 16 ++++++++++++++++
formula/source/ui/dlg/parawin.cxx | 4 ++++
4 files changed, 23 insertions(+), 1 deletion(-)
New commits:
commit 2f973aa90d508cd88050b0273634482de2174a08
Author: Steve Yin <steve_y at apache.org>
Date: Tue Nov 26 12:06:30 2013 +0000
Integrate branch of IAccessible2
Change-Id: Id8c4ff1d10eccda2d7279d625822759c1f520a46
diff --git a/formula/source/ui/dlg/ControlHelper.hxx b/formula/source/ui/dlg/ControlHelper.hxx
index c2d6c8a..86f4f1d 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 3095b82..83ef11b 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 890ac41..9b7be4c 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 c209c37..24a22c2 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;
More information about the Libreoffice-commits
mailing list