diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2020-01-05 19:22:33 +0100 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2020-01-06 23:14:38 +0100 |
commit | 12fe9d6e0d645df0ece4d545ff9e9a7dcf99cb90 (patch) | |
tree | 1b6d74c4d7baf7cfbb17b0ece61e540e680019ac | |
parent | bc62883e07d6795edfb70571f90e1b85fcfdd399 (diff) |
acc. check: add a UI goto for issues with tables
Change-Id: Ifa636ce7ee32495d81571754c29b1114f8b56cdf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86247
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
-rw-r--r-- | sw/source/core/access/AccessibilityCheck.cxx | 16 | ||||
-rw-r--r-- | sw/source/core/access/AccessibilityIssue.cxx | 6 | ||||
-rw-r--r-- | sw/source/core/inc/AccessibilityIssue.hxx | 1 |
3 files changed, 19 insertions, 4 deletions
diff --git a/sw/source/core/access/AccessibilityCheck.cxx b/sw/source/core/access/AccessibilityCheck.cxx index f33f88b57e61..0e994e0e9e29 100644 --- a/sw/source/core/access/AccessibilityCheck.cxx +++ b/sw/source/core/access/AccessibilityCheck.cxx @@ -142,9 +142,13 @@ private: SwTable const& rTable = pTableNode->GetTable(); if (rTable.IsTableComplex()) { - OUString sName = rTable.GetTableStyleName(); + const SwTableFormat* pFormat = rTable.GetFrameFormat(); + OUString sName = pFormat->GetName(); OUString sIssueText = sTableMergeSplit.replaceAll("%OBJECT_NAME%", sName); - lclAddIssue(m_rIssueCollection, sIssueText); + auto pIssue = lclAddIssue(m_rIssueCollection, sIssueText); + pIssue->setDoc(pTableNode->GetDoc()); + pIssue->setIssueObject(IssueObject::TABLE); + pIssue->setObjectID(sName); } else { @@ -172,9 +176,13 @@ private: } if (!bAllColumnsSameSize) { - OUString sName = rTable.GetTableStyleName(); + const SwTableFormat* pFormat = rTable.GetFrameFormat(); + OUString sName = pFormat->GetName(); OUString sIssueText = sTableMergeSplit.replaceAll("%OBJECT_NAME%", sName); - lclAddIssue(m_rIssueCollection, sIssueText); + auto pIssue = lclAddIssue(m_rIssueCollection, sIssueText); + pIssue->setDoc(pTableNode->GetDoc()); + pIssue->setIssueObject(IssueObject::TABLE); + pIssue->setObjectID(sName); } } } diff --git a/sw/source/core/access/AccessibilityIssue.cxx b/sw/source/core/access/AccessibilityIssue.cxx index e4ce9f658f57..1d2e1efc7708 100644 --- a/sw/source/core/access/AccessibilityIssue.cxx +++ b/sw/source/core/access/AccessibilityIssue.cxx @@ -48,6 +48,12 @@ void AccessibilityIssue::gotoIssue() const pWrtShell->GotoFly(m_sObjectID, FLYCNTTYPE_ALL, true); } break; + case IssueObject::TABLE: + { + SwWrtShell* pWrtShell = m_pDoc->GetDocShell()->GetWrtShell(); + pWrtShell->GotoTable(m_sObjectID); + } + break; default: break; } diff --git a/sw/source/core/inc/AccessibilityIssue.hxx b/sw/source/core/inc/AccessibilityIssue.hxx index 2d8776ac5c1f..11b017dea6a5 100644 --- a/sw/source/core/inc/AccessibilityIssue.hxx +++ b/sw/source/core/inc/AccessibilityIssue.hxx @@ -21,6 +21,7 @@ enum class IssueObject UNKNOWN, GRAPHIC, OLE, + TABLE, }; class SW_DLLPUBLIC AccessibilityIssue final : public svx::AccessibilityIssue |