]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetFlex.cpp
* src/paragraph_funcs.cpp (breakParagraph): change parameter 'flag' to
[lyx.git] / src / insets / InsetFlex.cpp
index ae0430d07ee9236901564edf2562c8a811818895..378a21ad0c3bae8a8fb0e4b39add1c73d458c37d 100644 (file)
@@ -78,7 +78,7 @@ void InsetFlex::setLayout(InsetLayout il)
 
 docstring const InsetFlex::editMessage() const
 {
-       return _("Opened CharStyle Inset");
+       return _("Opened Flex Inset");
 }
 
 
@@ -96,22 +96,19 @@ void InsetFlex::read(Buffer const & buf, Lexer & lex)
 }
 
 
-bool InsetFlex::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetFlex::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        Font tmpfont = mi.base.font;
        getDrawFont(mi.base.font);
        mi.base.font.reduce(Font(Font::ALL_SANE));
        mi.base.font.realize(tmpfont);
-       bool changed = InsetCollapsable::metrics(mi, dim);
+       InsetCollapsable::metrics(mi, dim);
        mi.base.font = tmpfont;
-       return changed;
 }
 
 
 void InsetFlex::draw(PainterInfo & pi, int x, int y) const
 {
-       setPosCache(pi, x, y);
-
        Font tmpfont = pi.base.font;
        getDrawFont(pi.base.font);
        // I don't understand why the above .reduce and .realize aren't
@@ -137,9 +134,8 @@ bool InsetFlex::getStatus(Cursor & cur, FuncRequest const & cmd,
        FuncStatus & status) const
 {
        switch (cmd.action) {
-               // paragraph breaks not allowed in charstyle insets
+               // paragraph breaks not allowed in flex insets
                case LFUN_BREAK_PARAGRAPH:
-               case LFUN_BREAK_PARAGRAPH_KEEP_LAYOUT:
                case LFUN_BREAK_PARAGRAPH_SKIP:
                        status.enabled(false);
                        return true;
@@ -190,7 +186,7 @@ void InsetFlex::textString(Buffer const & buf, odocstream & os) const
 
 void InsetFlexParams::write(ostream & os) const
 {
-       os << "CharStyle " << name << "\n";
+       os << "Flex " << name << "\n";
 }
 
 
@@ -200,7 +196,7 @@ void InsetFlexParams::read(Lexer & lex)
                lex.next();
                string token = lex.getString();
 
-               if (token == "CharStyle") {
+               if (token == "Flex") {
                        lex.next();
                        name = lex.getString();
                }