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


Below are two commits that were necessary to make (Linux) "make check" work again post <http://cgit.freedesktop.org/libreoffice/core/commit/?id=efb23f29983f87104a684e7fab00b84fc59d131d> "Integrate branch of IAccessible2." In both cases, the problematic changes made by that commit looked rather unmotivated to me, and I do not know whether it would actually have been better to change the code under test or the test code. So, insight welcome.

Stephan

On 11/27/2013 09:15 AM, Stephan Bergmann wrote:
commit 1533129759c0017413efe2213bfe503c26dc16f0
Author: Stephan Bergmann <sbergman@redhat.com>
Date:   Wed Nov 27 09:12:38 2013 +0100

     Revert sense in VCLXAccessibleBox::getAccessibleActionCount again

     ...this had been switched from "m_bIsDropDownBox ? 1 : 0" to "m_bIsDropDownBox ?
     0 : 1" in efb23f29983f87104a684e7fab00b84fc59d131d "Integrate branch of
     IAccessible2" for no apparent reason and broke JunitTest_testtools_unoapi.

     Change-Id: I276d2f452648387a5fa693349cf868787b2d48e1

diff --git a/accessibility/source/standard/vclxaccessiblebox.cxx 
b/accessibility/source/standard/vclxaccessiblebox.cxx
index 7aa7836..764c0ca 100644
--- 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;
  }

  sal_Bool SAL_CALL VCLXAccessibleBox::doAccessibleAction (sal_Int32 nIndex)

On 11/27/2013 11:33 AM, Stephan Bergmann wrote:
commit 4f94f16ba15218e5e7a9eb4d72ddb4cb62884dbb
Author: Stephan Bergmann <sbergman@redhat.com>
Date:   Wed Nov 27 11:28:57 2013 +0100

     IAccessible2: revert some bounds-checking changes again

     ...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.

     Change-Id: I3492c3e6a49d68885df1206e9368f4483c0dc4f9

diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx 
b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
index e9941df..614294f 100644
--- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx
+++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
@@ -1381,11 +1381,7 @@ namespace accessibility
          EBulletInfo aBulletInfo = rCacheTF.GetBulletInfo( static_cast< sal_uInt16 
>(GetParagraphIndex()) );
          if (aBulletInfo.bVisible)
              nIndex += aBulletInfo.aText.getLength();
-        if (nIndex != 0 && nIndex >= getCharacterCount())
-            nIndex = getCharacterCount()-1;
-        //
-        if (nIndex != 0)
-            CheckIndex(nIndex); // may throw IndexOutOfBoundsException
+        CheckIndex(nIndex); // may throw IndexOutOfBoundsException

          bool bSupplementalMode = false;
          uno::Sequence< OUString > aPropertyNames = rRequestedAttributes;
@@ -1534,9 +1530,6 @@ namespace accessibility

          SolarMutexGuard aGuard;

-        if ((rPoint.X <= 0) && (rPoint.Y <= 0))
-            return 0;
-
          sal_Int32 nPara;
          sal_uInt16 nIndex;


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.