diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2022-11-03 09:14:18 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2022-11-03 13:58:13 +0100 |
commit | e0121b2478526d803681d57d59af0cbf9cf602b4 (patch) | |
tree | ef7862c87934a2a2e2dd5f1a0c8fcec216c5fd4a /editeng | |
parent | d40d64da771427423786dc62a2f4ad08cab53179 (diff) |
-Werror=dangling-reference
In
<https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=d2249cd9adf5ae638577139177a50f7e62d8abd9>
"c++: Implement -Wdangling-reference [PR106393]" grew a new warning, included in
-Wall, and based on some more-or-less shaky heuristics, that warns about
"possibly dangling reference to a temporary". It produces quite a number of
false positives, but for these uses of SfxItemSet::Get it does look plausible
that the returned item references could, at least in theory, point at data that
is destroyed along with the temporary SfxItemSet.
Change-Id: I11afc4512db488f73170c6cfa706e9e094209550
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142217
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/accessibility/AccessibleEditableTextPara.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx b/editeng/source/accessibility/AccessibleEditableTextPara.cxx index aacb01522f51..ee2f47254765 100644 --- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx +++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx @@ -1505,8 +1505,7 @@ namespace accessibility // NumberingLevel if (rRes.Name == "NumberingLevel") { - const SvxNumBulletItem& rNumBullet = rCacheTF.GetParaAttribs(GetParagraphIndex()).Get(EE_PARA_NUMBULLET); - if(rNumBullet.GetNumRule().GetLevelCount()==0) + if(rCacheTF.GetParaAttribs(GetParagraphIndex()).Get(EE_PARA_NUMBULLET).GetNumRule().GetLevelCount()==0) { rRes.Value <<= sal_Int16(-1); rRes.Handle = -1; |