diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2022-05-14 13:53:23 +0200 |
---|---|---|
committer | Aron Budea <aron.budea@collabora.com> | 2022-05-17 23:52:53 +0200 |
commit | 3ee53f02082d09f95c1417c7125fb5efac3bf1cf (patch) | |
tree | a4cfea6a2435ed23ca7a70f28941100ad1414827 /sw | |
parent | b95ba188a605414c9312193b23d70afd7ce4f778 (diff) |
Related tdf#149072: avoid warning "misuse of method"
complete warning log:
<SwTextFormatColl::GetAssignedOutlineStyleLevel()> - misuse of method
part of bt when opening attachment of tdf#149072
0 SwTextFormatColl::GetAssignedOutlineStyleLevel() const (this=0x77064d0) at sw/source/core/doc/fmtcol.cxx:608
1 0x00007f8a52aa7941 in sw::(anonymous namespace)::HeaderCheck::check(SwNode*) (this=0xa457630, pCurrent=0x7705e98) at sw/source/core/access/AccessibilityCheck.cxx:622
2 0x00007f8a52a9a6a3 in sw::AccessibilityCheck::check() (this=0x7ffe4a14ab10) at sw/source/core/access/AccessibilityCheck.cxx:947
3 0x00007f8a53ed2ad7 in SwDocShell::runAccessibilityCheck() (this=0x74ef0e0) at sw/source/uibase/app/docst.cxx:1559
4 0x00007f8a16e7fdec in ImpPDFTabDialog::OkHdl(weld::Button&) (this=0xa0e9990) at filter/source/pdf/impdialog.cxx:324
5 0x00007f8a16e7fb2d in ImpPDFTabDialog::LinkStubOkHdl(void*, weld::Button&) (instance=0xa0e9990, data=...) at filter/source/pdf/impdialog.cxx:317
Change-Id: I2ed50f14eff01babd47ada3831c0a051fc767dbe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134312
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
(cherry picked from commit 86050db1b0c15651335d1b0bf89ee8f6409dee1d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134496
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Aron Budea <aron.budea@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/access/AccessibilityCheck.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sw/source/core/access/AccessibilityCheck.cxx b/sw/source/core/access/AccessibilityCheck.cxx index 03162a0a33ad..986a875327e6 100644 --- a/sw/source/core/access/AccessibilityCheck.cxx +++ b/sw/source/core/access/AccessibilityCheck.cxx @@ -619,10 +619,11 @@ public: SwTextNode* pTextNode = pCurrent->GetTextNode(); SwTextFormatColl* pCollection = pTextNode->GetTextColl(); - int nLevel = pCollection->GetAssignedOutlineStyleLevel(); - if (nLevel < 0) + if (!pCollection->IsAssignedToListLevelOfOutlineStyle()) return; + int nLevel = pCollection->GetAssignedOutlineStyleLevel(); + assert(nLevel >= 0); if (nLevel > m_nPreviousLevel && std::abs(nLevel - m_nPreviousLevel) > 1) { lclAddIssue(m_rIssueCollection, SwResId(STR_HEADINGS_NOT_IN_ORDER)); |