diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2024-02-11 12:49:09 +0900 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2024-02-12 07:27:40 +0100 |
commit | d0d83b8b4a8ee5a889e1ffdf1293b858bf69caaf (patch) | |
tree | 3aea067bd549b5a27699d8564105201330fbc251 /editeng/inc | |
parent | 3fa841c864bb17cfd405814188efa99e4d334ffc (diff) |
editeng: move isEmpty impl. from ParaPortion to TextPortionList
Change-Id: Ib305963b1f5ffcef9122dd4353826cc9033810f6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163225
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'editeng/inc')
-rw-r--r-- | editeng/inc/ParagraphPortion.hxx | 2 | ||||
-rw-r--r-- | editeng/inc/TextPortionList.hxx | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/editeng/inc/ParagraphPortion.hxx b/editeng/inc/ParagraphPortion.hxx index 97b37ebe1134..2b0664ec0c2d 100644 --- a/editeng/inc/ParagraphPortion.hxx +++ b/editeng/inc/ParagraphPortion.hxx @@ -111,7 +111,7 @@ public: void SetVisible(bool bVisible) { mbVisible = bVisible; } bool IsVisible() const { return mbVisible; } - bool IsEmpty() { return GetTextPortions().Count() == 1 && GetTextPortions()[0].GetLen() == 0; } + bool IsEmpty() { return GetTextPortions().isEmpty(); } tools::Long GetHeight() const { return mbVisible ? mnHeight : 0; } sal_Int32 GetFirstLineOffset() const { return mbVisible ? mnFirstLineOffset : 0; } diff --git a/editeng/inc/TextPortionList.hxx b/editeng/inc/TextPortionList.hxx index b25f4156155b..7c646ebbbee9 100644 --- a/editeng/inc/TextPortionList.hxx +++ b/editeng/inc/TextPortionList.hxx @@ -57,6 +57,8 @@ public: void Remove(sal_Int32 nPosition) { maPortions.erase(maPortions.begin() + nPosition); } sal_Int32 GetPos(const TextPortion* p) const; + + bool isEmpty() { return Count() == 1 && maPortions[0]->GetLen() == 0; } }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |