diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx index aa2846126c23..a76d50855d9c 100644 --- a/editeng/source/editeng/impedit.hxx +++ b/editeng/source/editeng/impedit.hxx @@ -228,7 +228,9 @@ public: tools::Long GetVisDocLeft() const { return maVisDocStartPos.X(); } tools::Long GetVisDocTop() const { return maVisDocStartPos.Y(); } + // coverity[ tainted_data_return : FALSE ] version 2023.12.2 tools::Long GetVisDocRight() const { return maVisDocStartPos.X() + (!IsVertical() ? maOutArea.GetWidth() : maOutArea.GetHeight()); } + // coverity[ tainted_data_return : FALSE ] version 2023.12.2 tools::Long GetVisDocBottom() const { return maVisDocStartPos.Y() + (!IsVertical() ? maOutArea.GetHeight() : maOutArea.GetWidth()); } tools::Rectangle GetVisDocArea() const; @@ -387,14 +389,10 @@ public: tools::Long GetVisDocLeft() const { return maVisDocStartPos.X(); } tools::Long GetVisDocTop() const { return maVisDocStartPos.Y(); } - tools::Long GetVisDocRight() const - { - return maVisDocStartPos.X() + ( !IsVertical() ? maOutputArea.GetWidth() : maOutputArea.GetHeight() ); - } - tools::Long GetVisDocBottom() const - { - return maVisDocStartPos.Y() + ( !IsVertical() ? maOutputArea.GetHeight() : maOutputArea.GetWidth() ); - } + // coverity[ tainted_data_return : FALSE ] version 2023.12.2 + tools::Long GetVisDocRight() const { return maVisDocStartPos.X() + ( !IsVertical() ? maOutputArea.GetWidth() : maOutputArea.GetHeight() ); } + // coverity[ tainted_data_return : FALSE ] version 2023.12.2 + tools::Long GetVisDocBottom() const { return maVisDocStartPos.Y() + ( !IsVertical() ? maOutputArea.GetHeight() : maOutputArea.GetWidth() ); } tools::Rectangle GetVisDocArea() const; const EditSelection& GetEditSelection() const { return maEditSelection; } diff --git a/include/o3tl/unit_conversion.hxx b/include/o3tl/unit_conversion.hxx index 54eb8cd246eb..5f78d2ef32c6 100644 --- a/include/o3tl/unit_conversion.hxx +++ b/include/o3tl/unit_conversion.hxx @@ -103,6 +103,7 @@ constexpr sal_Int64 MulDivSaturate(I n, sal_Int64 m, sal_Int64 d) { if (m > d && std::make_unsigned_t(n) > sal_uInt64(SAL_MAX_INT64 / m * d - d_2)) return SAL_MAX_INT64; // saturate + // coverity[ tainted_data_return : FALSE ] version 2023.12.2 return saturating_add(n, d_2) / d * m; // divide before multiplication } else if constexpr (std::is_signed_v) // n < 0; don't compile for unsigned n 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(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(this)->GetDocShell(); -} - std::unique_ptr CreatePrintOptionsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet &rOptions, bool bPreview); diff --git a/vcl/source/outdev/map.cxx b/vcl/source/outdev/map.cxx index 487088bd6014..eec697efcc53 100644 --- a/vcl/source/outdev/map.cxx +++ b/vcl/source/outdev/map.cxx @@ -277,6 +277,7 @@ tools::Long OutputDevice::ImplLogicXToDevicePixel( tools::Long nX ) const if ( !mbMap ) return nX+mnOutOffX; + // coverity[ tainted_data_return : FALSE ] version 2023.12.2 return ImplLogicToPixel( nX + maMapRes.mnMapOfsX, mnDPIX, maMapRes.mnMapScNumX, maMapRes.mnMapScDenomX )+mnOutOffX+mnOutOffOrigX; } @@ -286,6 +287,7 @@ tools::Long OutputDevice::ImplLogicYToDevicePixel( tools::Long nY ) const if ( !mbMap ) return nY+mnOutOffY; + // coverity[ tainted_data_return : FALSE ] version 2023.12.2 return ImplLogicToPixel( nY + maMapRes.mnMapOfsY, mnDPIY, maMapRes.mnMapScNumY, maMapRes.mnMapScDenomY )+mnOutOffY+mnOutOffOrigY; }