From acc3e7135c7d34c9b7f72aa6e437d621a00d191b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20P=C3=B6nitz?= Date: Thu, 31 Jul 2003 12:25:36 +0000 Subject: [PATCH] remove unused Paragraph::copyIntoMinibuffer remove unsed bool return values git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7463 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/ChangeLog | 7 ++++++- src/paragraph.C | 21 +-------------------- src/paragraph.h | 2 -- src/tabular.C | 22 +++++++++------------- src/tabular.h | 6 +++--- src/text2.C | 6 ++---- 6 files changed, 21 insertions(+), 43 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 82ed28ad5f..63d6fb22da 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,6 +1,11 @@ + +2003-07-30 André Pönitz + + * Paragraph.[Ch] (copyIntoMinibuffer) removed unused function + 2003-07-30 Martin Vermeer - * LColor.[Ch]: Add comment and greyedout logical colors. + * LColor.[Ch]: Add comment and greyedout logical colors. 2003-07-30 André Pönitz diff --git a/src/paragraph.C b/src/paragraph.C index 18a65dae30..1d9f555e86 100644 --- a/src/paragraph.C +++ b/src/paragraph.C @@ -251,26 +251,6 @@ void Paragraph::validate(LaTeXFeatures & features) const } -// First few functions needed for cut and paste and paragraph breaking. -void Paragraph::copyIntoMinibuffer(Buffer const & buffer, pos_type pos) const -{ - BufferParams bparams = buffer.params; - - minibuffer_char = getChar(pos); - minibuffer_font = getFontSettings(bparams, pos); - minibuffer_inset = 0; - if (minibuffer_char == Paragraph::META_INSET) { - if (getInset(pos)) { - minibuffer_inset = static_cast(getInset(pos)->clone().release()); - } else { - minibuffer_inset = 0; - minibuffer_char = ' '; - // This reflects what GetInset() does (ARRae) - } - } -} - - void Paragraph::cutIntoMinibuffer(BufferParams const & bparams, pos_type pos) { minibuffer_char = getChar(pos); @@ -305,6 +285,7 @@ bool Paragraph::insertFromMinibuffer(pos_type pos) return true; } + // end of minibuffer diff --git a/src/paragraph.h b/src/paragraph.h index 6581b639ed..1fa4612bfb 100644 --- a/src/paragraph.h +++ b/src/paragraph.h @@ -261,8 +261,6 @@ public: /** important for cut and paste Temporary change from BufferParams to Buffer. Will revert when we get rid of the argument to InsetOld::clone(Buffer const &) */ - void copyIntoMinibuffer(Buffer const &, lyx::pos_type pos) const; - /// void cutIntoMinibuffer(BufferParams const &, lyx::pos_type pos); /// bool insertFromMinibuffer(lyx::pos_type pos); diff --git a/src/tabular.C b/src/tabular.C index ceddd63e61..869fd39130 100644 --- a/src/tabular.C +++ b/src/tabular.C @@ -831,7 +831,7 @@ void LyXTabular::recalculateMulticolumnsOfColumn(int column) // returns 1 if a complete update is necessary, otherwise 0 -bool LyXTabular::setWidthOfCell(int cell, int new_width) +void LyXTabular::setWidthOfCell(int cell, int new_width) { int const row = row_of_cell(cell); int const column1 = column_of_cell(cell); @@ -843,12 +843,12 @@ bool LyXTabular::setWidthOfCell(int cell, int new_width) column1 < columns_ - 1 && leftLine(cell_info[row][column1+1].cellno, true)) { - // additional width add_width = WIDTH_OF_LINE; } - if (getWidthOfCell(cell) == new_width + 2 * WIDTH_OF_LINE + add_width) { - return false; - } + + if (getWidthOfCell(cell) == new_width + 2 * WIDTH_OF_LINE + add_width) + return; + if (isMultiColumn(cell, true)) { tmp = setWidthOfMulticolCell(cell, new_width); } else { @@ -862,9 +862,7 @@ bool LyXTabular::setWidthOfCell(int cell, int new_width) for (int i = 0; i < columns_; ++i) calculate_width_of_column(i); calculate_width_of_tabular(); - return true; } - return false; } @@ -1734,21 +1732,19 @@ bool LyXTabular::haveLTLastFoot() const // end longtable support functions -bool LyXTabular::setAscentOfRow(int row, int height) +void LyXTabular::setAscentOfRow(int row, int height) { if (row >= rows_ || row_info[row].ascent_of_row == height) - return false; + return; row_info[row].ascent_of_row = height; - return true; } -bool LyXTabular::setDescentOfRow(int row, int height) +void LyXTabular::setDescentOfRow(int row, int height) { if (row >= rows_ || row_info[row].descent_of_row == height) - return false; + return; row_info[row].descent_of_row = height; - return true; } diff --git a/src/tabular.h b/src/tabular.h index 2486a71e2d..a26244cc94 100644 --- a/src/tabular.h +++ b/src/tabular.h @@ -210,11 +210,11 @@ public: /// int getHeightOfTabular() const; /// Returns true if a complete update is necessary, otherwise false - bool setAscentOfRow(int row, int height); + void setAscentOfRow(int row, int height); /// Returns true if a complete update is necessary, otherwise false - bool setDescentOfRow(int row, int height); + void setDescentOfRow(int row, int height); /// Returns true if a complete update is necessary, otherwise false - bool setWidthOfCell(int cell, int new_width); + void setWidthOfCell(int cell, int new_width); /// void setAllLines(int cell, bool line); /// diff --git a/src/text2.C b/src/text2.C index 2498956b4c..53604f794a 100644 --- a/src/text2.C +++ b/src/text2.C @@ -166,9 +166,8 @@ LyXFont LyXText::getLayoutFont(ParagraphList::iterator pit) const { LyXLayout_ptr const & layout = pit->layout(); - if (!pit->getDepth()) { + if (!pit->getDepth()) return layout->resfont; - } LyXFont font = layout->font; // Realize with the fonts of lesser depth. @@ -183,9 +182,8 @@ LyXFont LyXText::getLabelFont(ParagraphList::iterator pit) const { LyXLayout_ptr const & layout = pit->layout(); - if (!pit->getDepth()) { + if (!pit->getDepth()) return layout->reslabelfont; - } LyXFont font = layout->labelfont; // Realize with the fonts of lesser depth. -- 2.39.5