diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-11-14 13:12:46 +0000 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-11-16 22:55:53 +0100 |
commit | 2b8394b36bf1602ca3f33a00dacd18329cc91d2d (patch) | |
tree | 10ea12ab3e990f128f8f971750b009eab28d17fe /sw/inc | |
parent | 0847c140a16ddc2d39ebfbacd432efb50f25d64c (diff) |
cid#1606752 silence Overflowed return value
and
cid#1607158 Overflowed return value
cid#1607271 Overflowed return value
cid#1608107 Overflowed return value
cid#1606975 Overflowed return value
cid#1608009 Overflowed return value
cid#1608353 Overflowed return value
cid#1608486 Overflowed return value
cid#1607009 Overflowed return value
cid#1606780 Overflowed return value
its totally unclear what the source of these warnings is
Change-Id: If46cac6a329dec397bd784f57d9ffe5e53af9a1a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176683
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'sw/inc')
-rw-r--r-- | sw/inc/view.hxx | 29 |
1 files changed, 9 insertions, 20 deletions
diff --git a/sw/inc/view.hxx b/sw/inc/view.hxx index 9d096d9171d8..c57d8d228f92 100644 --- a/sw/inc/view.hxx +++ b/sw/inc/view.hxx @@ -294,8 +294,11 @@ class SW_DLLPUBLIC SwView: public SfxViewShell DECL_DLLPRIVATE_LINK( TimeoutHdl, Timer*, void ); - inline tools::Long GetXScroll() const; - inline tools::Long GetYScroll() const; + // coverity[ tainted_data_return : FALSE ] version 2023.12.2 + tools::Long GetXScroll() const { return (m_aVisArea.GetWidth() * nScrollX) / 100; } + // coverity[ tainted_data_return : FALSE ] version 2023.12.2 + tools::Long GetYScroll() const { return (m_aVisArea.GetHeight() * nScrollY) / 100; } + SAL_DLLPRIVATE Point AlignToPixel(const Point& rPt) const; SAL_DLLPRIVATE void CalcPt( Point* pPt,const tools::Rectangle& rRect, sal_uInt16 nRangeX, @@ -590,9 +593,10 @@ public: } // hand over Shell - SfxShell *GetCurShell() { return m_pShell; } - SwDocShell *GetDocShell(); - inline const SwDocShell *GetDocShell() const; + SfxShell *GetCurShell() { return m_pShell; } + SwDocShell *GetDocShell(); + const SwDocShell *GetDocShell() const { return const_cast<SwView*>(this)->GetDocShell(); } + virtual FmFormShell *GetFormShell() override { return m_pFormShell; } virtual const FmFormShell *GetFormShell() const override { return m_pFormShell; } @@ -738,21 +742,6 @@ public: void BringToAttention(const SwNode* pNode); }; -inline tools::Long SwView::GetXScroll() const -{ - return (m_aVisArea.GetWidth() * nScrollX) / 100; -} - -inline tools::Long SwView::GetYScroll() const -{ - return (m_aVisArea.GetHeight() * nScrollY) / 100; -} - -inline const SwDocShell *SwView::GetDocShell() const -{ - return const_cast<SwView*>(this)->GetDocShell(); -} - std::unique_ptr<SfxTabPage> CreatePrintOptionsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet &rOptions, bool bPreview); |