]> git.lyx.org Git - features.git/commitdiff
remove unused Paragraph::copyIntoMinibuffer
authorAndré Pönitz <poenitz@gmx.net>
Thu, 31 Jul 2003 12:25:36 +0000 (12:25 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Thu, 31 Jul 2003 12:25:36 +0000 (12:25 +0000)
remove unsed bool return values

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7463 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/paragraph.C
src/paragraph.h
src/tabular.C
src/tabular.h
src/text2.C

index 82ed28ad5fd21a363d94bfab2550b6708d52ab88..63d6fb22da8ac4591e029d3093b576c020a93480 100644 (file)
@@ -1,6 +1,11 @@
+
+2003-07-30  André Pönitz  <poenitz@gmx.net>
+
+       * Paragraph.[Ch] (copyIntoMinibuffer) removed unused function
+
 2003-07-30  Martin Vermeer  <martin.vermeer@hut.fi>
 
-        * LColor.[Ch]: Add comment and greyedout logical colors.
+       * LColor.[Ch]: Add comment and greyedout logical colors.
 
 2003-07-30  André Pönitz  <poenitz@gmx.net>
 
index 18a65dae301803561a49ae29158394c372da0f4d..1d9f555e8631bfc6e4343beed7cfaac9cae4643f 100644 (file)
@@ -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<InsetOld *>(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
 
 
index 6581b639ed89022dcd4761d10726410a01b197ef..1fa4612bfb000e08ad185e6021fd69314008a548 100644 (file)
@@ -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);
index ceddd63e611cef2366bd97ae900fd16370b0d4e3..869fd39130b7e2596c629bb7145d36930ae61d90 100644 (file)
@@ -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;
 }
 
 
index 2486a71e2ddeb2b10f5f11534860d952f6858ac2..a26244cc945798eeae8565ef9a9dd4f160a7dd95 100644 (file)
@@ -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);
        ///
index 2498956b4c2f67dd030b0c3824e9ccd6603defa4..53604f794a0166efeb10644a1980bd8eb9497064 100644 (file)
@@ -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.