]> git.lyx.org Git - features.git/commitdiff
c++ casts, remvoe dead code, use LFUN_MESSAGE
authorLars Gullik Bjønnes <larsbj@gullik.org>
Tue, 17 Apr 2001 14:17:11 +0000 (14:17 +0000)
committerLars Gullik Bjønnes <larsbj@gullik.org>
Tue, 17 Apr 2001 14:17:11 +0000 (14:17 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1931 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/ChangeLog
src/insets/ExternalTemplate.h
src/insets/insetcollapsable.C
src/insets/insetcommand.h
src/insets/insetinclude.h
src/insets/insettabular.C
src/insets/insettext.C

index 0df54bd375ba90a4f9b6bf06cff0a73c4e0c63a4..d46e9d6033646c2b558f98bf39682340e3287506 100644 (file)
@@ -1,3 +1,19 @@
+2001-04-17  Lars Gullik Bjønnes  <larsbj@birdstep.com>
+
+       * insettext.C (init): remvoe leftovers from cursor_visible change
+       (draw): use c++ cast
+       (LocalDispatch): dispatch LFUN_MESSAGE
+
+       * insettabular.C (InsetTabular): remove leftovers from
+       cursor_visible, and scoped_ptr changes
+       (draw): use c++ cast
+
+       * insetcollapsable.C (draw): use c++ cast
+
+       * ExternalTemplate.h: inherit privaely from noncopyable
+       * insetcommand.h: ditto
+       * insetinclude.h: ditto
+
 2001-04-16  Allan Rae  <rae@lyx.org>
 
        * insettoc.C (Ascii): 
index 505365d2244790a963b5af6fbab598da040d6f0e..97670011b170886126019e74641fc19cb4953288 100644 (file)
@@ -72,7 +72,7 @@ struct ExternalTemplate {
 /**
    A singleton class that manages the external inset templates
 */
-class ExternalTemplateManager : public boost::noncopyable {
+class ExternalTemplateManager : boost::noncopyable {
 public:
        /// Map from the LyX name of the template to the template structure
        typedef std::map<string, ExternalTemplate> Templates;
index ba3b72318cf0becac025cdf2bddcd57fbdfa7ee5..6fcd31120ca89029a35633af4e5226288bead464 100644 (file)
@@ -194,7 +194,7 @@ void InsetCollapsable::draw(BufferView * bv, LyXFont const & f,
        UpdatableInset::draw(bv, f, baseline, x, cleared);
 #else
        if (!owner())
-               x += (float)scroll();
+               x += static_cast<float>(scroll());
 #endif
        if (!cleared && (inset.need_update == InsetText::FULL ||
                         inset.need_update == InsetText::INIT ||
index cb0645420865dbeebd1fc408f2d99333d2fe77b0..99f0592dd8ac7ddeedc33c058019e4e0b49bbcf0 100644 (file)
@@ -74,7 +74,7 @@ private:
 
 
 ///
-class InsetCommand : public InsetButton, public boost::noncopyable {
+class InsetCommand : public InsetButton, boost::noncopyable {
 public:
        ///
        explicit
index e57afeb0c7e23bd0de8edbaaa4af5591701504eb..2fa0040fefa64dbac27442ccb99515469963a478 100644 (file)
@@ -24,7 +24,7 @@ struct LaTeXFeatures;
 
 /**  Used to include files
  */
-class InsetInclude: public InsetButton, public boost::noncopyable {
+class InsetInclude: public InsetButton, boost::noncopyable {
 public:
         /// the type of inclusion
         enum Flags {
index dc9f2bc45a7bfda5fa351339c901748ccf1b2ecc..c5521d3a2755ec889536d8fdc95de6ae6be1943c 100644 (file)
@@ -126,15 +126,11 @@ InsetTabular::InsetTabular(Buffer const & buf, int rows, int columns)
                rows = 1;
        if (columns <= 0)
                columns = 1;
-       //tabular = new LyXTabular(this, rows,columns);
        tabular.reset(new LyXTabular(this, rows,columns));
        // for now make it always display as display() inset
        // just for test!!!
        the_locking_inset = 0;
        locked = no_selection = false;
-#if 0
-       cursor_visible = false;
-#endif
        oldcell = -1;
        actrow = actcell = 0;
        clearSelection();
@@ -145,13 +141,9 @@ InsetTabular::InsetTabular(Buffer const & buf, int rows, int columns)
 InsetTabular::InsetTabular(InsetTabular const & tab, Buffer const & buf)
        : buffer(&buf)
 {
-       //tabular = new LyXTabular(this, *(tab.tabular));
        tabular.reset(new LyXTabular(this, *(tab.tabular)));
        the_locking_inset = 0;
        locked = no_selection = false;
-#if 0
-       cursor_visible = false;
-#endif
        oldcell = -1;
        actrow = actcell = 0;
        sel_cell_start = sel_cell_end = 0;
@@ -247,7 +239,7 @@ void InsetTabular::draw(BufferView * bv, LyXFont const & font, int baseline,
        UpdatableInset::draw(bv, font, baseline, x, cleared);
 #else
        if (!owner())
-               x += (float)scroll();
+               x += static_cast<float>(scroll());
 #endif
        if (!cleared && ((need_update == INIT) || (need_update == FULL) ||
                         (top_x != int(x)) || (top_baseline != baseline))) {
index 4484a9cca249b60c3701098b9230ddfe6df4fa56..cd18251615a89010490ee42a4ed24d114a474261 100644 (file)
@@ -37,7 +37,6 @@
 #include "lyxcursor.h"
 #include "CutAndPaste.h"
 #include "font.h"
-#include "minibuffer.h"
 #include "LColor.h"
 #include "support/textutils.h"
 #include "support/LAssert.h"
@@ -47,6 +46,8 @@
 #include "trans_mgr.h"
 #include "lyxscreen.h"
 #include "WorkArea.h"
+#include "lyxfunc.h"
+#include "gettext.h"
 
 using std::ostream;
 using std::ifstream;
@@ -91,9 +92,6 @@ void InsetText::init(InsetText const * ins)
        insetDescent = 0;
        insetWidth = 0;
        the_locking_inset = 0;
-#if 0
-       cursor_visible = false;
-#endif
        interline_space = 1;
        no_selection = false;
        need_update = INIT;
@@ -322,7 +320,7 @@ void InsetText::draw(BufferView * bv, LyXFont const & f,
        UpdatableInset::draw(bv, f, baseline, x, cleared);
 #else
        if (!owner())
-               x += (float)scroll();
+               x += static_cast<float>(scroll());
 #endif
        // update insetWidth and insetHeight with dummy calls
        (void)ascent(bv, f);
@@ -1112,9 +1110,9 @@ InsetText::LocalDispatch(BufferView * bv,
 
                        // see if we found the layout number:
                        if (!layout.first) {
-                               string msg = string(N_("Layout ")) + arg + N_(" not known");
-
-                               bv->owner()->getMiniBuffer()->Set(msg);
+                               string const msg = string(N_("Layout ")) + arg + N_(" not known");
+                               bv->owner()->getLyXFunc()
+                                       ->Dispatch(LFUN_MESSAGE, msg);
                                break;
                        }