diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 05:54:39 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 05:54:39 +0000 |
commit | 267c6f2ac71f92999e969232431ba04678e7437e (patch) | |
tree | 358c9467650e1d0a1d7227a21dac2e3d08b622b2 /sw/qa/core/accessibilitycheck | |
parent | Initial commit. (diff) | |
download | libreoffice-267c6f2ac71f92999e969232431ba04678e7437e.tar.xz libreoffice-267c6f2ac71f92999e969232431ba04678e7437e.zip |
Adding upstream version 4:24.2.0.upstream/4%24.2.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sw/qa/core/accessibilitycheck')
17 files changed, 408 insertions, 0 deletions
diff --git a/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx b/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx new file mode 100644 index 0000000000..117b48d016 --- /dev/null +++ b/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx @@ -0,0 +1,390 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include <swmodeltestbase.hxx> +#include <AccessibilityCheck.hxx> +#include <AccessibilityIssue.hxx> +#include <OnlineAccessibilityCheck.hxx> +#include <wrtsh.hxx> +#include <vcl/scheduler.hxx> +#include <comphelper/propertysequence.hxx> + +#include <comphelper/scopeguard.hxx> +#include <officecfg/Office/Common.hxx> + +class AccessibilityCheckTest : public SwModelTestBase +{ +public: + AccessibilityCheckTest() + : SwModelTestBase("/sw/qa/core/accessibilitycheck/data/") + { + } +}; + +CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, testCheckDocumentIssues) +{ + createSwDoc("DocumentTest.odt"); + SwDoc* pDoc = getSwDoc(); + CPPUNIT_ASSERT(pDoc); + sw::AccessibilityCheck aCheck(pDoc); + aCheck.check(); + auto& aIssues = aCheck.getIssueCollection().getIssues(); + CPPUNIT_ASSERT_EQUAL(size_t(2), aIssues.size()); + CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::DOCUMENT_LANGUAGE, aIssues[0]->m_eIssueID); + CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::DOCUMENT_TITLE, aIssues[1]->m_eIssueID); +} + +CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, testTableSplitMergeAndAltText) +{ + createSwDoc("AccessibilityTests1.odt"); + SwDoc* pDoc = getSwDoc(); + CPPUNIT_ASSERT(pDoc); + sw::AccessibilityCheck aCheck(pDoc); + aCheck.check(); + auto& aIssues = aCheck.getIssueCollection().getIssues(); + CPPUNIT_ASSERT_EQUAL(size_t(6), aIssues.size()); + + CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::NO_ALT_GRAPHIC, aIssues[0]->m_eIssueID); + CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TABLE_MERGE_SPLIT, aIssues[1]->m_eIssueID); + CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TABLE_MERGE_SPLIT, aIssues[2]->m_eIssueID); + CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TABLE_MERGE_SPLIT, aIssues[3]->m_eIssueID); + CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TABLE_MERGE_SPLIT, aIssues[4]->m_eIssueID); + CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::NO_ALT_SHAPE, aIssues[5]->m_eIssueID); +} + +CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, testCheckParagraphIssues) +{ + // Tests whether formatting issues are detected when the whole paragraph has them instead of + // some text inside the paragraph + createSwDoc("ParagraphTest.odt"); + SwDoc* pDoc = getSwDoc(); + CPPUNIT_ASSERT(pDoc); + sw::AccessibilityCheck aCheck(pDoc); + aCheck.check(); + auto& aIssues = aCheck.getIssueCollection().getIssues(); + CPPUNIT_ASSERT_EQUAL(size_t(1), aIssues.size()); + CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, aIssues[0]->m_eIssueID); +} + +CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, testCheckBackgroundImage) +{ + createSwDoc("BackgroundImageTest.odt"); + SwDoc* pDoc = getSwDoc(); + CPPUNIT_ASSERT(pDoc); + sw::AccessibilityCheck aCheck(pDoc); + aCheck.check(); + auto& aIssues = aCheck.getIssueCollection().getIssues(); + CPPUNIT_ASSERT_EQUAL(size_t(1), aIssues.size()); + CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::DOCUMENT_BACKGROUND, aIssues[0]->m_eIssueID); +} + +CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, testCheckLinkedImage) +{ + createSwDoc("LinkedImageTest.fodt"); + SwDoc* pDoc = getSwDoc(); + CPPUNIT_ASSERT(pDoc); + sw::AccessibilityCheck aCheck(pDoc); + aCheck.check(); + auto& aIssues = aCheck.getIssueCollection().getIssues(); + CPPUNIT_ASSERT_EQUAL(size_t(4), aIssues.size()); + CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::LINKED_GRAPHIC, aIssues[1]->m_eIssueID); +} + +CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, testCheckNewlineSpace) +{ + createSwDoc("NewlineTest.odt"); + SwDoc* pDoc = getSwDoc(); + CPPUNIT_ASSERT(pDoc); + sw::AccessibilityCheck aCheck(pDoc); + aCheck.check(); + auto& aIssues = aCheck.getIssueCollection().getIssues(); + CPPUNIT_ASSERT_EQUAL(size_t(2), aIssues.size()); + CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, aIssues[0]->m_eIssueID); + CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, aIssues[1]->m_eIssueID); +} + +CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, testCheckSpacebarSpace) +{ + createSwDoc("SpaceTest.odt"); + SwDoc* pDoc = getSwDoc(); + CPPUNIT_ASSERT(pDoc); + sw::AccessibilityCheck aCheck(pDoc); + aCheck.check(); + auto& aIssues = aCheck.getIssueCollection().getIssues(); + CPPUNIT_ASSERT_EQUAL(size_t(1), aIssues.size()); + CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, aIssues[0]->m_eIssueID); +} + +CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, testHyperlinks) +{ + createSwDoc("HyperlinkTest.odt"); + SwDoc* pDoc = getSwDoc(); + CPPUNIT_ASSERT(pDoc); + sw::AccessibilityCheck aCheck(pDoc); + aCheck.check(); + auto& aIssues = aCheck.getIssueCollection().getIssues(); + CPPUNIT_ASSERT_EQUAL(size_t(2), aIssues.size()); + CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::HYPERLINK_SHORT, aIssues[0]->m_eIssueID); + CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::HYPERLINK_IS_TEXT, aIssues[1]->m_eIssueID); +} + +CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, testCheckHighlightedText) +{ + createSwDoc("HighlightTest.odt"); + SwDoc* pDoc = getSwDoc(); + CPPUNIT_ASSERT(pDoc); + sw::AccessibilityCheck aCheck(pDoc); + aCheck.check(); + auto& aIssues = aCheck.getIssueCollection().getIssues(); + CPPUNIT_ASSERT_EQUAL(size_t(1), aIssues.size()); + CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, aIssues[0]->m_eIssueID); +} + +CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, testNumberingCheck) +{ + createSwDoc("AccessibilityTests_NumberingCheck.odt"); + SwDoc* pDoc = getSwDoc(); + CPPUNIT_ASSERT(pDoc); + sw::AccessibilityCheck aCheck(pDoc); + aCheck.check(); + auto& aIssues = aCheck.getIssueCollection().getIssues(); + CPPUNIT_ASSERT_EQUAL(size_t(5), aIssues.size()); + CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::MANUAL_NUMBERING, aIssues[0]->m_eIssueID); + CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::MANUAL_NUMBERING, aIssues[1]->m_eIssueID); + CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::MANUAL_NUMBERING, aIssues[2]->m_eIssueID); + CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::MANUAL_NUMBERING, aIssues[3]->m_eIssueID); + CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::MANUAL_NUMBERING, aIssues[4]->m_eIssueID); +} + +CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, testCheckFakeFootnote) +{ + createSwDoc("FakeFootnoteTest.odt"); + SwDoc* pDoc = getSwDoc(); + CPPUNIT_ASSERT(pDoc); + sw::AccessibilityCheck aCheck(pDoc); + aCheck.check(); + auto& aIssues = aCheck.getIssueCollection().getIssues(); + CPPUNIT_ASSERT_EQUAL(size_t(2), aIssues.size()); + CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::FAKE_FOOTNOTE, aIssues[0]->m_eIssueID); + CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::FAKE_FOOTNOTE, aIssues[1]->m_eIssueID); +} + +CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, testCheckFakeCaption) +{ + createSwDoc("FakeCaptionTest.odt"); + SwDoc* pDoc = getSwDoc(); + CPPUNIT_ASSERT(pDoc); + sw::AccessibilityCheck aCheck(pDoc); + aCheck.check(); + auto& aIssues = aCheck.getIssueCollection().getIssues(); + CPPUNIT_ASSERT_EQUAL(size_t(1), aIssues.size()); + CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::FAKE_CAPTION, aIssues[0]->m_eIssueID); +} + +CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, testCheckTableFormatting) +{ + createSwDoc("TableFormattingTest.odt"); + SwDoc* pDoc = getSwDoc(); + CPPUNIT_ASSERT(pDoc); + sw::AccessibilityCheck aCheck(pDoc); + aCheck.check(); + auto& aIssues = aCheck.getIssueCollection().getIssues(); + CPPUNIT_ASSERT_EQUAL(size_t(1), aIssues.size()); + CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TABLE_FORMATTING, aIssues[0]->m_eIssueID); +} + +CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, testCheckTabsFormatting) +{ + createSwDoc("TabsTest.odt"); + SwDoc* pDoc = getSwDoc(); + CPPUNIT_ASSERT(pDoc); + sw::AccessibilityCheck aCheck(pDoc); + aCheck.check(); + auto& aIssues = aCheck.getIssueCollection().getIssues(); + CPPUNIT_ASSERT_EQUAL(size_t(4), aIssues.size()); + CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, aIssues[0]->m_eIssueID); + CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, aIssues[1]->m_eIssueID); + CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, aIssues[2]->m_eIssueID); + CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, aIssues[3]->m_eIssueID); +} + +//tdf#156550 - Accessibility sidebar complains about TOC hyperlinks +CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, testCheckTOCHyperlink) +{ + createSwDoc("TOCHyperlinkTest.odt"); + SwDoc* pDoc = getSwDoc(); + CPPUNIT_ASSERT(pDoc); + sw::AccessibilityCheck aCheck(pDoc); + aCheck.check(); + auto& aIssues = aCheck.getIssueCollection().getIssues(); + // Without the fix in place, this test would have failed with + // - Expected: 0 (No Detected HYPERLINK_IS_TEXT Issues) + // - Actual : 4 (Number of TOC Hyperlinks) + CPPUNIT_ASSERT_EQUAL(size_t(0), aIssues.size()); +} + +namespace +{ +std::vector<std::shared_ptr<sfx::AccessibilityIssue>> +scanAccessibilityIssuesOnNodes(SwDoc* pDocument) +{ + std::vector<std::shared_ptr<sfx::AccessibilityIssue>> aIssues; + auto const& pNodes = pDocument->GetNodes(); + for (SwNodeOffset n(0); n < pNodes.Count(); ++n) + { + SwNode* pNode = pNodes[n]; + auto& pCollection = pNode->getAccessibilityCheckStatus().pCollection; + if (pCollection) + { + for (auto& pIssue : pCollection->getIssues()) + { + aIssues.push_back(pIssue); + } + } + } + return aIssues; +} + +void checkIssuePosition(std::shared_ptr<sfx::AccessibilityIssue> const& pIssue, int nLine, + sal_Int32 nStart, sal_Int32 nEnd, SwNodeOffset nIndex) +{ + auto* pSwIssue = static_cast<sw::AccessibilityIssue*>(pIssue.get()); + + OString sFailMessage = OString::Concat("Start doesn't match at line: ") + + OString::Concat(OString::number(nLine)); + CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailMessage.getStr(), nStart, pSwIssue->getStart()); + + sFailMessage + = OString::Concat("End doesn't match at line: ") + OString::Concat(OString::number(nLine)); + CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailMessage.getStr(), nEnd, pSwIssue->getEnd()); + + sFailMessage = OString::Concat("Offset doesn't match at line: ") + + OString::Concat(OString::number(nLine)); + CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailMessage.getStr(), nIndex, pSwIssue->getNode()->GetIndex()); +} + +} // end anonymous ns + +CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, testOnlineNodeSplitAppend) +{ + // Checks the a11y checker is setting the a11y issues to the nodes + // correctly when splitting and appending nodes (through undo), which + // happen on editing all the time. + // When a node is split, it can happen that both nodes get a11y issues + // if the node splits the area of direct formatting. + + createSwDoc("OnlineCheck.odt"); + SwDoc* pDoc = getSwDoc(); + CPPUNIT_ASSERT(pDoc); + SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); + CPPUNIT_ASSERT(pWrtShell); + + // Enable online a11y checker + { + auto pBatch(comphelper::ConfigurationChanges::create()); + officecfg::Office::Common::Accessibility::OnlineAccessibilityCheck::set(true, pBatch); + pBatch->commit(); + } + comphelper::ScopeGuard g([] { + auto pBatch(comphelper::ConfigurationChanges::create()); + officecfg::Office::Common::Accessibility::OnlineAccessibilityCheck::set(false, pBatch); + pBatch->commit(); + }); + + Scheduler::ProcessEventsToIdle(); + + // Check we have 2 a11y issue + CPPUNIT_ASSERT_EQUAL(sal_Int32(2), + pDoc->getOnlineAccessibilityCheck()->getNumberOfAccessibilityIssues()); + auto aIssues = scanAccessibilityIssuesOnNodes(pDoc); + CPPUNIT_ASSERT_EQUAL(size_t(2), aIssues.size()); + CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, aIssues[0]->m_eIssueID); + CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, aIssues[1]->m_eIssueID); + checkIssuePosition(aIssues[0], __LINE__, 0, 32, SwNodeOffset(9)); + checkIssuePosition(aIssues[1], __LINE__, 33, 136, SwNodeOffset(9)); + + // Position the cursor and hit "enter" (trigger split-node action) + pWrtShell->Right(SwCursorSkipMode::Chars, /*bSelect=*/false, 33, /*bBasicCall=*/false); + pWrtShell->SplitNode(); + + // Check the result + CPPUNIT_ASSERT_EQUAL(OUString("He heard quiet steps behind him. "), + getParagraph(1)->getString()); + CPPUNIT_ASSERT_EQUAL(OUString("That didn't bode well. Who could be following him this late at " + "night and in this deadbeat part of town?"), + getParagraph(2)->getString()); + CPPUNIT_ASSERT_EQUAL(sal_Int32(2), + pDoc->getOnlineAccessibilityCheck()->getNumberOfAccessibilityIssues()); + + aIssues = scanAccessibilityIssuesOnNodes(pDoc); + CPPUNIT_ASSERT_EQUAL(size_t(2), aIssues.size()); + CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, aIssues[0]->m_eIssueID); + CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, aIssues[1]->m_eIssueID); + checkIssuePosition(aIssues[0], __LINE__, 0, 32, SwNodeOffset(9)); + checkIssuePosition(aIssues[1], __LINE__, 0, 103, SwNodeOffset(10)); + + // Position cursor and split again + pWrtShell->Down(/*bSelect*/ false, /*nCount*/ 0); + pWrtShell->Right(SwCursorSkipMode::Chars, /*bSelect=*/false, 23, /*bBasicCall=*/false); + pWrtShell->SplitNode(); + + // Check the result + CPPUNIT_ASSERT_EQUAL(OUString("He heard quiet steps behind him. "), + getParagraph(1)->getString()); + CPPUNIT_ASSERT_EQUAL(OUString("That didn't bode well. "), getParagraph(2)->getString()); + CPPUNIT_ASSERT_EQUAL( + OUString( + "Who could be following him this late at night and in this deadbeat part of town?"), + getParagraph(3)->getString()); + CPPUNIT_ASSERT_EQUAL(sal_Int32(3), + pDoc->getOnlineAccessibilityCheck()->getNumberOfAccessibilityIssues()); + aIssues = scanAccessibilityIssuesOnNodes(pDoc); + CPPUNIT_ASSERT_EQUAL(size_t(3), aIssues.size()); + CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, aIssues[0]->m_eIssueID); + CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, aIssues[1]->m_eIssueID); + CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, aIssues[2]->m_eIssueID); + checkIssuePosition(aIssues[0], __LINE__, 0, 32, SwNodeOffset(9)); + checkIssuePosition(aIssues[1], __LINE__, 0, 23, SwNodeOffset(10)); + checkIssuePosition(aIssues[2], __LINE__, 0, 80, SwNodeOffset(11)); + + // Undo second change + dispatchCommand(mxComponent, ".uno:Undo", {}); + CPPUNIT_ASSERT_EQUAL(OUString("He heard quiet steps behind him. "), + getParagraph(1)->getString()); + CPPUNIT_ASSERT_EQUAL(OUString("That didn't bode well. Who could be following him this late at " + "night and in this deadbeat part of town?"), + getParagraph(2)->getString()); + CPPUNIT_ASSERT_EQUAL(sal_Int32(2), + pDoc->getOnlineAccessibilityCheck()->getNumberOfAccessibilityIssues()); + aIssues = scanAccessibilityIssuesOnNodes(pDoc); + CPPUNIT_ASSERT_EQUAL(size_t(2), aIssues.size()); + CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, aIssues[0]->m_eIssueID); + CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, aIssues[1]->m_eIssueID); + checkIssuePosition(aIssues[0], __LINE__, 0, 32, SwNodeOffset(9)); + checkIssuePosition(aIssues[1], __LINE__, 0, 103, SwNodeOffset(10)); + + // Undo first change + dispatchCommand(mxComponent, ".uno:Undo", {}); + CPPUNIT_ASSERT_EQUAL(sal_Int32(2), + pDoc->getOnlineAccessibilityCheck()->getNumberOfAccessibilityIssues()); + CPPUNIT_ASSERT_EQUAL( + OUString("He heard quiet steps behind him. That didn't bode well. Who could be following " + "him this late at night and in this deadbeat part of town?"), + getParagraph(1)->getString()); + aIssues = scanAccessibilityIssuesOnNodes(pDoc); + CPPUNIT_ASSERT_EQUAL(size_t(2), aIssues.size()); + CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, aIssues[0]->m_eIssueID); + CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, aIssues[1]->m_eIssueID); + checkIssuePosition(aIssues[0], __LINE__, 0, 32, SwNodeOffset(9)); + checkIssuePosition(aIssues[1], __LINE__, 33, 136, SwNodeOffset(9)); +} + +CPPUNIT_PLUGIN_IMPLEMENT(); + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/qa/core/accessibilitycheck/data/AccessibilityTests1.odt b/sw/qa/core/accessibilitycheck/data/AccessibilityTests1.odt Binary files differnew file mode 100644 index 0000000000..405fd6647a --- /dev/null +++ b/sw/qa/core/accessibilitycheck/data/AccessibilityTests1.odt diff --git a/sw/qa/core/accessibilitycheck/data/AccessibilityTests_NumberingCheck.odt b/sw/qa/core/accessibilitycheck/data/AccessibilityTests_NumberingCheck.odt Binary files differnew file mode 100644 index 0000000000..190ee91a8f --- /dev/null +++ b/sw/qa/core/accessibilitycheck/data/AccessibilityTests_NumberingCheck.odt diff --git a/sw/qa/core/accessibilitycheck/data/BackgroundImageTest.odt b/sw/qa/core/accessibilitycheck/data/BackgroundImageTest.odt Binary files differnew file mode 100644 index 0000000000..eff6f17839 --- /dev/null +++ b/sw/qa/core/accessibilitycheck/data/BackgroundImageTest.odt diff --git a/sw/qa/core/accessibilitycheck/data/DocumentTest.odt b/sw/qa/core/accessibilitycheck/data/DocumentTest.odt Binary files differnew file mode 100644 index 0000000000..65b9a7c2fd --- /dev/null +++ b/sw/qa/core/accessibilitycheck/data/DocumentTest.odt diff --git a/sw/qa/core/accessibilitycheck/data/FakeCaptionTest.odt b/sw/qa/core/accessibilitycheck/data/FakeCaptionTest.odt Binary files differnew file mode 100644 index 0000000000..9630bfcf73 --- /dev/null +++ b/sw/qa/core/accessibilitycheck/data/FakeCaptionTest.odt diff --git a/sw/qa/core/accessibilitycheck/data/FakeFootnoteTest.odt b/sw/qa/core/accessibilitycheck/data/FakeFootnoteTest.odt Binary files differnew file mode 100644 index 0000000000..fdacf6cb35 --- /dev/null +++ b/sw/qa/core/accessibilitycheck/data/FakeFootnoteTest.odt diff --git a/sw/qa/core/accessibilitycheck/data/HighlightTest.odt b/sw/qa/core/accessibilitycheck/data/HighlightTest.odt Binary files differnew file mode 100644 index 0000000000..a8f13e142c --- /dev/null +++ b/sw/qa/core/accessibilitycheck/data/HighlightTest.odt diff --git a/sw/qa/core/accessibilitycheck/data/HyperlinkTest.odt b/sw/qa/core/accessibilitycheck/data/HyperlinkTest.odt Binary files differnew file mode 100644 index 0000000000..1eba1932ce --- /dev/null +++ b/sw/qa/core/accessibilitycheck/data/HyperlinkTest.odt diff --git a/sw/qa/core/accessibilitycheck/data/LinkedImageTest.fodt b/sw/qa/core/accessibilitycheck/data/LinkedImageTest.fodt new file mode 100644 index 0000000000..c73162b183 --- /dev/null +++ b/sw/qa/core/accessibilitycheck/data/LinkedImageTest.fodt @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rpt="http://openoffice.org/2005/report" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:css3t="http://www.w3.org/TR/css3-text/" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text"> + <office:body> + <office:text> + <text:h text:style-name="P3" text:outline-level="1">Linked graphic</text:h> + <text:p text:style-name="P1"><draw:frame draw:style-name="fr1" draw:name="Image2" text:anchor-type="as-char" svg:width="92.3pt" svg:height="92.3pt" draw:z-index="0"><draw:image xlink:href="x2.jpg" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"/> + </draw:frame></text:p> + <text:h text:style-name="P3" text:outline-level="1">Embedded graphic</text:h> + <text:p text:style-name="P2"><draw:frame draw:style-name="fr1" draw:name="Image1" text:anchor-type="as-char" svg:width="89.89pt" svg:height="89.89pt" draw:z-index="0"><draw:image draw:mime-type="image/gif"> + <office:binary-data>R0lGODlhAgACAPABAAAAAP///yH5BAAAAAAAIf4tIFRoaXMgaXMgYW4gZXhhbXBsZSBiaXRt + YXAgb2YgdGhlIGxldHRlciAiSiIKACH/C0ltYWdlTWFnaWNrDmdhbW1hPTAuNDU0NTQ1ACwA + AAAAAgACAAACA0QCBQA7 + </office:binary-data> + </draw:image> + </draw:frame></text:p> + </office:text> + </office:body> +</office:document> diff --git a/sw/qa/core/accessibilitycheck/data/NewlineTest.odt b/sw/qa/core/accessibilitycheck/data/NewlineTest.odt Binary files differnew file mode 100644 index 0000000000..9ff715916f --- /dev/null +++ b/sw/qa/core/accessibilitycheck/data/NewlineTest.odt diff --git a/sw/qa/core/accessibilitycheck/data/OnlineCheck.odt b/sw/qa/core/accessibilitycheck/data/OnlineCheck.odt Binary files differnew file mode 100644 index 0000000000..d24fb4ff1a --- /dev/null +++ b/sw/qa/core/accessibilitycheck/data/OnlineCheck.odt diff --git a/sw/qa/core/accessibilitycheck/data/ParagraphTest.odt b/sw/qa/core/accessibilitycheck/data/ParagraphTest.odt Binary files differnew file mode 100644 index 0000000000..766ecd0b4e --- /dev/null +++ b/sw/qa/core/accessibilitycheck/data/ParagraphTest.odt diff --git a/sw/qa/core/accessibilitycheck/data/SpaceTest.odt b/sw/qa/core/accessibilitycheck/data/SpaceTest.odt Binary files differnew file mode 100644 index 0000000000..0f00f78f96 --- /dev/null +++ b/sw/qa/core/accessibilitycheck/data/SpaceTest.odt diff --git a/sw/qa/core/accessibilitycheck/data/TOCHyperlinkTest.odt b/sw/qa/core/accessibilitycheck/data/TOCHyperlinkTest.odt Binary files differnew file mode 100644 index 0000000000..506fc935ac --- /dev/null +++ b/sw/qa/core/accessibilitycheck/data/TOCHyperlinkTest.odt diff --git a/sw/qa/core/accessibilitycheck/data/TableFormattingTest.odt b/sw/qa/core/accessibilitycheck/data/TableFormattingTest.odt Binary files differnew file mode 100644 index 0000000000..adc63daaf7 --- /dev/null +++ b/sw/qa/core/accessibilitycheck/data/TableFormattingTest.odt diff --git a/sw/qa/core/accessibilitycheck/data/TabsTest.odt b/sw/qa/core/accessibilitycheck/data/TabsTest.odt Binary files differnew file mode 100644 index 0000000000..29b415df87 --- /dev/null +++ b/sw/qa/core/accessibilitycheck/data/TabsTest.odt |