Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index



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@collabora.com  <><, Pseudo Engineer, itinerant idiot


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.