diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx b/editeng/source/accessibility/AccessibleEditableTextPara.cxx index 3185342d16e4..b8a00af82f7c 100644 --- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx +++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx @@ -675,46 +675,7 @@ namespace accessibility OUString SAL_CALL AccessibleEditableTextPara::getAccessibleDescription() { - SolarMutexGuard aGuard; - - // append first 40 characters from text, or first line, if shorter - // (writer takes first sentence here, but that's not supported - // from EditEngine) - // throws if defunc - OUString aLine; - - if( getCharacterCount() ) - aLine = getTextAtIndex(0, AccessibleTextType::LINE).SegmentText; - - // Get the string from the resource for the specified id. - OUString sStr(EditResId(RID_SVXSTR_A11Y_PARAGRAPH_DESCRIPTION)); - OUString sParaIndex = OUString::number(GetParagraphIndex()); - sStr = sStr.replaceFirst("$(ARG)", sParaIndex); - - if( aLine.getLength() > MaxDescriptionLen ) - { - OUString aCurrWord; - sal_Int32 i; - - // search backward from MaxDescriptionLen for previous word start - for( aCurrWord=getTextAtIndex(MaxDescriptionLen, AccessibleTextType::WORD).SegmentText, - i=MaxDescriptionLen, - aLine=OUString(); - i>=0; - --i ) - { - if( getTextAtIndex(i, AccessibleTextType::WORD).SegmentText != aCurrWord ) - { - if( i == 0 ) - // prevent completely empty string - aLine = getTextAtIndex(0, AccessibleTextType::WORD).SegmentText; - else - aLine = getTextRange(0, i); - } - } - } - - return sStr + aLine; + return OUString(); } OUString SAL_CALL AccessibleEditableTextPara::getAccessibleName() diff --git a/include/editeng/editrids.hrc b/include/editeng/editrids.hrc index d0872f0a88a7..46d87cc9556b 100644 --- a/include/editeng/editrids.hrc +++ b/include/editeng/editrids.hrc @@ -313,7 +313,6 @@ #define RID_SVXSTR_A11Y_IMAGEBULLET_DESCRIPTION NC_("RID_SVXSTR_A11Y_IMAGEBULLET_DESCRIPTION", "Image bullet in paragraph") #define RID_SVXSTR_A11Y_IMAGEBULLET_NAME NC_("RID_SVXSTR_A11Y_IMAGEBULLET_NAME", "Image bullet") -#define RID_SVXSTR_A11Y_PARAGRAPH_DESCRIPTION NC_("RID_SVXSTR_A11Y_PARAGRAPH_DESCRIPTION", "Paragraph: $(ARG) ") #define RID_SVXSTR_QUERY_CONTINUE NC_("RID_SVXSTR_QUERY_CONTINUE", "Continue checking at beginning of document?") #define RID_SVXSTR_QUERY_BW_CONTINUE NC_("RID_SVXSTR_QUERY_BW_CONTINUE", "Continue checking at end of document?") diff --git a/sd/qa/unit/a11y/layout.cxx b/sd/qa/unit/a11y/layout.cxx index 9fd2abf07aca..803c9c17cb3e 100644 --- a/sd/qa/unit/a11y/layout.cxx +++ b/sd/qa/unit/a11y/layout.cxx @@ -24,12 +24,12 @@ CPPUNIT_TEST_FIXTURE(test::AccessibleTestBase, TestImpressDefaultStructure) CPPUNIT_ASSERT_EQUAL(u"" "" - "" + "" "Click to add Title" "" "" "" - "" + "" "Click to add Text" "" ""_ustr, @@ -86,47 +86,46 @@ CPPUNIT_TEST_FIXTURE(test::AccessibleTestBase, tdf150064) xDrawView->setCurrentPage(xDrawPage); Scheduler::ProcessEventsToIdle(); - CPPUNIT_ASSERT_EQUAL( - u"" - "" - "P1 title" - "" - "" - "Some text" - "" - "" - "" - "1" - "" - "" - "2" - "" - "" - "3" - "" - "" - "4" - "" - "" - "5" - "" - "" - "6" - "" - "" - "7" - "" - "" - "8" - "" - "" - "9" - "" - "" - "10" - "" - "
"_ustr, - collectText()); + CPPUNIT_ASSERT_EQUAL(u"" + "" + "P1 title" + "" + "" + "Some text" + "" + "" + "" + "1" + "" + "" + "2" + "" + "" + "3" + "" + "" + "4" + "" + "" + "5" + "" + "" + "6" + "" + "" + "7" + "" + "" + "8" + "" + "" + "9" + "" + "" + "10" + "" + "
"_ustr, + collectText()); CPPUNIT_ASSERT(xDrawPages->getByIndex(1) >>= xDrawPage); xDrawView->setCurrentPage(xDrawPage); @@ -134,16 +133,16 @@ CPPUNIT_TEST_FIXTURE(test::AccessibleTestBase, tdf150064) CPPUNIT_ASSERT_EQUAL(u"" "" - "P2 title" + "P2 title" "" "" - "1" + "1" "" "" - "2" + "2" "" "" - "3" + "3" ""_ustr, collectText()); } diff --git a/sw/qa/extras/accessibility/dialogs.cxx b/sw/qa/extras/accessibility/dialogs.cxx index 1072a2c47b1f..c56434807593 100644 --- a/sw/qa/extras/accessibility/dialogs.cxx +++ b/sw/qa/extras/accessibility/dialogs.cxx @@ -173,9 +173,9 @@ CPPUNIT_TEST_FIXTURE(test::AccessibleTestBase, BasicTestFontworkDialog) CPPUNIT_ASSERT(activateMenuItem(u"Insert", u"Fontwork...")); CPPUNIT_ASSERT(dialogWaiter->waitEndDialog()); - CPPUNIT_ASSERT_EQUAL(u"Simple"_ustr, - collectText()); + CPPUNIT_ASSERT_EQUAL( + u"Simple"_ustr, + collectText()); } CPPUNIT_TEST_FIXTURE(test::AccessibleTestBase, BasicTestFrameDialog)