From bd7cd85d041972be267a766b0996ccde067da328 Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Mon, 25 Feb 2008 09:26:46 +0000 Subject: [PATCH] cosmetics git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23222 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/insets/InsetText.cpp | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/insets/InsetText.cpp b/src/insets/InsetText.cpp index 453df1558f..e6cf87bff5 100644 --- a/src/insets/InsetText.cpp +++ b/src/insets/InsetText.cpp @@ -66,7 +66,8 @@ namespace lyx { using graphics::PreviewLoader; -class TextCompletionList : public Inset::CompletionList { +class TextCompletionList : public Inset::CompletionList +{ public: /// TextCompletionList(Cursor const & cur) @@ -77,11 +78,13 @@ public: /// virtual bool sorted() const { return true; } /// - virtual size_t size() const { + virtual size_t size() const + { return buf_.registeredWords().size(); } /// - virtual docstring data(size_t idx) const { + virtual docstring data(size_t idx) const + { return buf_.registeredWords().word(idx); } @@ -499,8 +502,8 @@ bool InsetText::automaticPopupCompletion() const } -Inset::CompletionList const -* InsetText::createCompletionList(Cursor const & cur) const +Inset::CompletionList const * InsetText::createCompletionList( + Cursor const & cur) const { if (!completionSupported(cur)) return 0; @@ -509,7 +512,8 @@ Inset::CompletionList const } -docstring InsetText::previousWord(Buffer const & buffer, CursorSlice const & sl) const +docstring InsetText::previousWord(Buffer const & buffer, + CursorSlice const & sl) const { CursorSlice from = sl; CursorSlice to = sl; @@ -532,7 +536,7 @@ docstring InsetText::completionPrefix(Cursor const & cur) const bool InsetText::insertCompletion(Cursor & cur, docstring const & s, - bool /*finished*/) + bool /*finished*/) { if (!completionSupported(cur)) return false; @@ -545,7 +549,7 @@ bool InsetText::insertCompletion(Cursor & cur, docstring const & s, void InsetText::completionPosAndDim(Cursor const & cur, int & x, int & y, - Dimension & dim) const + Dimension & dim) const { Cursor const & bvcur = cur.bv().cursor(); -- 2.39.2