From: Abdelrazak Younes Date: Sat, 13 Oct 2007 12:58:43 +0000 (+0000) Subject: Remove mostly unused function. X-Git-Tag: 1.6.10~7853 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=589170bd4b44a2deb3aa57000605eee290a56658;p=features.git Remove mostly unused function. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20943 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/Text2.cpp b/src/Text2.cpp index c5171fbbd5..bd7effb23f 100644 --- a/src/Text2.cpp +++ b/src/Text2.cpp @@ -586,7 +586,7 @@ bool Text::checkAndActivateInset(Cursor & cur, bool front) if (!front && cur.pos() == 0) return false; Inset * inset = front ? cur.nextInset() : cur.prevInset(); - if (!isHighlyEditableInset(inset)) + if (!inset || inset->editable() != Inset::HIGHLY_EDITABLE) return false; /* * Apparently, when entering an inset we are expected to be positioned diff --git a/src/insets/Inset.cpp b/src/insets/Inset.cpp index 603f61fee2..1876f5ec3f 100644 --- a/src/insets/Inset.cpp +++ b/src/insets/Inset.cpp @@ -369,20 +369,4 @@ void Inset::setDimCache(MetricsInfo const & mi, Dimension const & dim) const mi.base.bv->coordCache().insets().add(this, dim); } - - -///////////////////////////////////////// - -bool isEditableInset(Inset const * inset) -{ - return inset && inset->editable(); -} - - -bool isHighlyEditableInset(Inset const * inset) -{ - return inset && inset->editable() == Inset::HIGHLY_EDITABLE; -} - - } // namespace lyx diff --git a/src/insets/Inset.h b/src/insets/Inset.h index 6179e11990..c457b8b1d0 100644 --- a/src/insets/Inset.h +++ b/src/insets/Inset.h @@ -409,21 +409,6 @@ protected: virtual void doDispatch(Cursor & cur, FuncRequest & cmd); }; - -/** - * returns true if pointer argument is valid - * and points to an editable inset - */ -bool isEditableInset(Inset const * inset); - - -/** - * returns true if pointer argument is valid - * and points to a highly editable inset - */ -bool isHighlyEditableInset(Inset const * inset); - - } // namespace lyx #endif diff --git a/src/rowpainter.cpp b/src/rowpainter.cpp index 533edcd585..9ed482c990 100644 --- a/src/rowpainter.cpp +++ b/src/rowpainter.cpp @@ -750,7 +750,7 @@ void RowPainter::paintText() } bool const highly_editable_inset = par_.isInset(pos) - && isHighlyEditableInset(par_.getInset(pos)); + && par_.getInset(pos)->editable() == Inset::HIGHLY_EDITABLE; // If we reach the end of a struck out range, paint it. // We also don't paint across things like tables