summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2024-01-12 13:35:22 +0900
committerTomaž Vajngerl <quikee@gmail.com>2024-01-14 16:06:07 +0100
commitee880f953e8b04c736a44fea63513d041681955f (patch)
tree7eb9067e5f7ee5902e8fa422843ec883a3c58c03 /include
parentb5c81b6c36dcd539d3104e7902373d96b3e025f6 (diff)
editeng: use EditLine as ref. and use const
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 <quikee@gmail.com>
Diffstat (limited to 'include')
-rw-r--r--include/editeng/editeng.hxx5
1 files changed, 2 insertions, 3 deletions
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();