diff --git a/src/apps/haiku-depot/textview/Paragraph.cpp b/src/apps/haiku-depot/textview/Paragraph.cpp index 26ad3e95ff..ffcd0c5454 100644 --- a/src/apps/haiku-depot/textview/Paragraph.cpp +++ b/src/apps/haiku-depot/textview/Paragraph.cpp @@ -143,3 +143,9 @@ Paragraph::Length() const return length; } + +bool +Paragraph::IsEmpty() const +{ + return fTextSpans.CountItems() == 0; +} diff --git a/src/apps/haiku-depot/textview/Paragraph.h b/src/apps/haiku-depot/textview/Paragraph.h index 4ad83f4ede..2c8ead001c 100644 --- a/src/apps/haiku-depot/textview/Paragraph.h +++ b/src/apps/haiku-depot/textview/Paragraph.h @@ -35,6 +35,7 @@ public: void Clear(); int32 Length() const; + bool IsEmpty() const; private: ParagraphStyle fStyle;