diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-06-14 20:39:36 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-06-14 22:51:17 +0200 |
commit | 28fb60fe9094f9f88c196dad8429258c38e660ad (patch) | |
tree | 4b3f1667412904758f750353514bb58570d1d4a5 | |
parent | 3a907c593fe623b28670f32df75c7d96c6b2905b (diff) |
sw_core_accessibilitycheck: remove duplicated createDoc method
Change-Id: Icdd1cded776544b5d2f4b7c3335f235aca490726
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117187
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r-- | sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx b/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx index bc3446f30514..2545171d6c38 100644 --- a/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx +++ b/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx @@ -12,21 +12,15 @@ #include <unotxdoc.hxx> #include <docsh.hxx> +constexpr OUStringLiteral DATA_DIRECTORY = u"/sw/qa/core/accessibilitycheck/data/"; + class AccessibilityCheckTest : public SwModelTestBase { -public: - SwDoc* createDoc(const char* pName = nullptr) - { - load(u"/sw/qa/core/accessibilitycheck/data/", pName); - SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get()); - CPPUNIT_ASSERT(pTextDoc); - return pTextDoc->GetDocShell()->GetDoc(); - } }; CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, testCheckDocumentIssues) { - SwDoc* pDoc = createDoc("DocumentTest.odt"); + SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "DocumentTest.odt"); CPPUNIT_ASSERT(pDoc); sw::AccessibilityCheck aCheck(pDoc); aCheck.check(); @@ -38,7 +32,7 @@ CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, testCheckDocumentIssues) CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, testTableSplitMergeAndAltText) { - SwDoc* pDoc = createDoc("AccessibilityTests1.odt"); + SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "AccessibilityTests1.odt"); CPPUNIT_ASSERT(pDoc); sw::AccessibilityCheck aCheck(pDoc); aCheck.check(); |