[Libreoffice-commits] IAccessible2 problems
Michael Meeks
michael.meeks at collabora.com
Wed Nov 27 23:29:47 PST 2013
On Wed, 2013-11-27 at 16:44 +0100, Stephan Bergmann wrote:
> Below are two commits that were necessary to make (Linux) "make check"
> work again post
> > --- a/accessibility/source/standard/vclxaccessiblebox.cxx
> > +++ b/accessibility/source/standard/vclxaccessiblebox.cxx
> > @@ -409,7 +409,7 @@ sal_Int32 SAL_CALL VCLXAccessibleBox::getAccessibleActionCount (void)
> > // There is one action for drop down boxes (toggle popup) and none for
> > // the other boxes.
> > - return m_bIsDropDownBox ? 0 : 1;
> > + return m_bIsDropDownBox ? 1 : 0;
> > }
Well - if you believe the comment the revert is correct :-) Then again
the implementation of:
OUString SAL_CALL VCLXAccessibleBox::getAccessibleActionDescription
(sal_Int32 nIndex)
...
return
m_bIsDropDownBox?::rtl::OUString():TK_RES_STRING( RID_STR_ACC_ACTION_TOGGLEPOPUP);
Prolly also needs it's polarity switching in this case too. I'd be
inclined to armour 'doAccessibleAction' to work in either case and (I
suspect) whatever anyone's view of what it should do - it'll work ;-)
> > ...that were introduced with c23ab5eaed57cc3fb5860e26c591c73c5b22687b "Integrate
> > branch of IAccessible2" but broke JunitTest_sc_unoapi, which expects calls to
> > getCharacterAttributes and getIndexAtPoint to actually fail for out-of-bounds
> > arguments. The above commit does not make it obvious why those changes were
> > actually made.
Right; this looks reasonable to me FWIW - the only place in the
winaccessibility/ bridge that calls this already does invalid bounds
rejection:
STDMETHODIMP CAccTextBase::get_attributes(long offset, long *
startOffset, long * endOffset, BSTR * textAttributes)
{
...
if( offset < 0 || offset > GetXInterface()->getCharacterCount() )
return E_FAIL;
...
Sequence< ::com::sun::star::beans::PropertyValue > pValues =
GetXInterface()->getCharacterAttributes(offset, Sequence< rtl::OUString
>());
So unless there is some obscure internal usage I guess it's a redundant
relaxation of the rules there. Not done any fixing - but I hope that's
helpful ;-)
HTH,
Michael.
--
michael.meeks at collabora.com <><, Pseudo Engineer, itinerant idiot
More information about the LibreOffice
mailing list