From ee880f953e8b04c736a44fea63513d041681955f Mon Sep 17 00:00:00 2001 From: Tomaž Vajngerl Date: Fri, 12 Jan 2024 13:35:22 +0900 Subject: editeng: use EditLine as ref. and use const MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We assert the EditLine pointer is valid (not nullptr) in some methods or just expect it to be valid without asserting. If this is the case then we might as well change the parameter to be a reference. Also change EditLine to const&, where this makes sense in the code. Change-Id: Ia28810fea9d4e053f18fbb45968644545f5bf83b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162012 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl --- include/editeng/editeng.hxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/editeng/editeng.hxx b/include/editeng/editeng.hxx index e8cfb9465f7d..241473832286 100644 --- a/include/editeng/editeng.hxx +++ b/include/editeng/editeng.hxx @@ -185,10 +185,9 @@ private: sal_Int16 nWordType = css::i18n::WordType::ANYWORD_IGNOREWHITESPACES); EDITENG_DLLPRIVATE tools::Long GetXPos( - const ParaPortion* pParaPortion, const EditLine* pLine, sal_Int32 nIndex, bool bPreferPortionStart = false) const; + const ParaPortion* pParaPortion, EditLine const& rLine, sal_Int32 nIndex, bool bPreferPortionStart = false) const; - EDITENG_DLLPRIVATE Range GetLineXPosStartEnd( - const ParaPortion* pParaPortion, const EditLine* pLine) const; + EDITENG_DLLPRIVATE Range GetLineXPosStartEnd(const ParaPortion* pParaPortion, EditLine const& rLine) const; EDITENG_DLLPRIVATE InternalEditStatus& GetInternalEditStatus(); -- cgit