From caa4b718ac0e77c72a53c84e376fb5b98f3cebfe Mon Sep 17 00:00:00 2001 From: John Levon Date: Wed, 19 Mar 2003 18:25:36 +0000 Subject: [PATCH] remove unused methods git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6543 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/insets/ChangeLog | 11 ++++++++ src/insets/insetfloat.C | 22 +-------------- src/insets/insetfloat.h | 6 ---- src/insets/insetinclude.C | 6 ---- src/insets/insetinclude.h | 7 +---- src/insets/insetminipage.C | 57 -------------------------------------- src/insets/insetminipage.h | 16 ----------- src/insets/insetwrap.C | 35 +---------------------- src/insets/insetwrap.h | 10 ------- 9 files changed, 14 insertions(+), 156 deletions(-) diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index ddb3570ba6..1e88950ef7 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,3 +1,14 @@ +2003-03-19 John Levon + + * insetfloat.h: + * insetfloat.C: + * insetinclude.h: + * insetinclude.C: + * insetminipage.h: + * insetminipage.C: + * insetwrap.h: + * insetwrap.C: remove unused getter/setters + 2003-03-19 John Levon * several files: bv->updateInset() doesn't take diff --git a/src/insets/insetfloat.C b/src/insets/insetfloat.C index 5e3ddf271a..30fd7e0a27 100644 --- a/src/insets/insetfloat.C +++ b/src/insets/insetfloat.C @@ -245,7 +245,7 @@ void InsetFloat::read(Buffer const * buf, LyXLex & lex) void InsetFloat::validate(LaTeXFeatures & features) const { - if (contains(placement(), "H")) { + if (contains(params_.placement, "H")) { features.require("float"); } @@ -347,20 +347,6 @@ string const & InsetFloat::type() const } -void InsetFloat::placement(string const & p) -{ - // FIX: Here we should only allow the placement to be set - // if a valid value. - params_.placement = p; -} - - -string const & InsetFloat::placement() const -{ - return params_.placement; -} - - void InsetFloat::wide(bool w, BufferParams const & bp) { params_.wide = w; @@ -375,12 +361,6 @@ void InsetFloat::wide(bool w, BufferParams const & bp) } -bool InsetFloat::wide() const -{ - return params_.wide; -} - - void InsetFloat::addToToc(toc::TocList & toclist, Buffer const * buf) const { ParIterator pit(inset.paragraph()); diff --git a/src/insets/insetfloat.h b/src/insets/insetfloat.h index 0001b38167..7eb8a54e31 100644 --- a/src/insets/insetfloat.h +++ b/src/insets/insetfloat.h @@ -72,14 +72,8 @@ public: /// string const & type() const; /// - void placement(string const & p); - /// - string const & placement() const; - /// void wide(bool w, BufferParams const &); /// - bool wide() const; - /// void addToToc(toc::TocList &, Buffer const *) const; /// bool showInsetDialog(BufferView *) const; diff --git a/src/insets/insetinclude.C b/src/insets/insetinclude.C index ab4d2dc727..a69245f07d 100644 --- a/src/insets/insetinclude.C +++ b/src/insets/insetinclude.C @@ -277,12 +277,6 @@ string const InsetInclude::getScreenLabel(Buffer const *) const } -string const InsetInclude::getRelFileBaseName() const -{ - return OnlyFilename(ChangeExtension(params_.cparams.getContents(), string())); -} - - string const InsetInclude::getFileName() const { return MakeAbsPath(params_.cparams.getContents(), diff --git a/src/insets/insetinclude.h b/src/insets/insetinclude.h index ef7d8e06eb..6d04d8cd1f 100644 --- a/src/insets/insetinclude.h +++ b/src/insets/insetinclude.h @@ -107,14 +107,9 @@ public: /// void validate(LaTeXFeatures &) const; - /** Input inserts anything inside a paragraph. - Display can give some visual feedback - */ + /// take up a whole row if we're not type INPUT bool display() const; - /// return the filename stub of the included file - string const getRelFileBaseName() const; - /// return true if the file is or got loaded. bool loadIfNeeded() const; diff --git a/src/insets/insetminipage.C b/src/insets/insetminipage.C index d61b119f65..f2e5c635ec 100644 --- a/src/insets/insetminipage.C +++ b/src/insets/insetminipage.C @@ -305,63 +305,6 @@ bool InsetMinipage::insetAllowed(Inset::Code code) const } -InsetMinipage::Position InsetMinipage::pos() const -{ - return params_.pos; -} - - -void InsetMinipage::pos(InsetMinipage::Position p) -{ - if (params_.pos != p) { - params_.pos = p; - need_update = FULL; - } -} - - -InsetMinipage::InnerPosition InsetMinipage::innerPos() const -{ - return params_.inner_pos; -} - - -void InsetMinipage::innerPos(InsetMinipage::InnerPosition ip) -{ - params_.inner_pos = ip; -} - - -LyXLength const & InsetMinipage::pageHeight() const -{ - return params_.height; -} - - -void InsetMinipage::pageHeight(LyXLength const & ll) -{ - if (params_.height != ll) { - params_.height = ll; - need_update = FULL; - } -} - - -LyXLength const & InsetMinipage::pageWidth() const -{ - return params_.width; -} - - -void InsetMinipage::pageWidth(LyXLength const & ll) -{ - if (ll != params_.width) { - params_.width = ll; - need_update = FULL; - } -} - - bool InsetMinipage::showInsetDialog(BufferView * bv) const { if (!inset.showInsetDialog(bv)) { diff --git a/src/insets/insetminipage.h b/src/insets/insetminipage.h index 18237157ec..5b2fcc52c0 100644 --- a/src/insets/insetminipage.h +++ b/src/insets/insetminipage.h @@ -81,22 +81,6 @@ public: /// bool insetAllowed(Inset::Code) const; /// - Position pos() const; - /// - void pos(Position); - /// - InnerPosition innerPos() const; - /// - void innerPos(InnerPosition); - /// - LyXLength const & pageHeight() const; - /// - void pageHeight(LyXLength const &); - /// - LyXLength const & pageWidth() const; - /// - void pageWidth(LyXLength const &); - /// int getMaxWidth(BufferView *, UpdatableInset const *) const; /// bool needFullRow() const { return false; } diff --git a/src/insets/insetwrap.C b/src/insets/insetwrap.C index b1d92c0d40..1699bb263d 100644 --- a/src/insets/insetwrap.C +++ b/src/insets/insetwrap.C @@ -253,39 +253,6 @@ int InsetWrap::latexTextWidth(BufferView * bv) const } -string const & InsetWrap::type() const -{ - return params_.type; -} - - -LyXLength const & InsetWrap::pageWidth() const -{ - return params_.width; -} - - -void InsetWrap::pageWidth(LyXLength const & ll) -{ - if (ll != params_.width) { - params_.width = ll; - need_update = FULL; - } -} - - -void InsetWrap::placement(string const & p) -{ - params_.placement = p; -} - - -string const & InsetWrap::placement() const -{ - return params_.placement; -} - - bool InsetWrap::showInsetDialog(BufferView * bv) const { if (!inset.showInsetDialog(bv)) { @@ -305,7 +272,7 @@ void InsetWrap::addToToc(toc::TocList & toclist, Buffer const * buf) const Paragraph * tmp = inset.paragraph(); while (tmp) { if (tmp->layout()->name() == caplayout) { - string const name = floatname(type(), buf->params); + string const name = floatname(params_.type, buf->params); string const str = tostr(toclist[name].size() + 1) + ". " + tmp->asString(buf, false); diff --git a/src/insets/insetwrap.h b/src/insets/insetwrap.h index 2090d350f9..f53691d2fe 100644 --- a/src/insets/insetwrap.h +++ b/src/insets/insetwrap.h @@ -65,16 +65,6 @@ public: /// int getMaxWidth(BufferView *, UpdatableInset const *) const; /// - string const & type() const; - /// - LyXLength const & pageWidth() const; - /// - void pageWidth(LyXLength const &); - /// - void placement(string const & p); - /// - string const & placement() const; - /// void addToToc(toc::TocList &, Buffer const *) const; /// bool showInsetDialog(BufferView *) const;