]> git.lyx.org Git - features.git/blobdiff - src/insets/InsetText.cpp
move more stuff from buffer_func to Buffer
[features.git] / src / insets / InsetText.cpp
index db179fdcf59373e1aaf9bf824d514572856c6265..078d8154dbca4a0b4c76c6f32d357aaadcbfb0a4 100644 (file)
@@ -3,7 +3,7 @@
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
- * \author Jürgen Vigna
+ * \author Jürgen Vigna
  *
  * Full author contact details are available in file CREDITS.
  */
@@ -105,7 +105,7 @@ void InsetText::initParagraphs()
        paragraphs().push_back(Paragraph());
        Paragraph & ourpar = paragraphs().back();
        ourpar.setInsetOwner(this);
-       ourpar.setPlainOrDefaultLayout(buffer_->params().documentClass());
+       ourpar.setDefaultLayout(buffer_->params().documentClass());
 }
 
 
@@ -458,13 +458,13 @@ void InsetText::updateLabels(ParIterator const & it)
 {
        ParIterator it2 = it;
        it2.forwardPos();
-       LASSERT(&it2.inset() == this && it2.pit() == 0, /**/);
-       if (producesOutput())
-               lyx::updateLabels(buffer(), it2);
-       else {
-               DocumentClass const & tclass = buffer().params().documentClass();
+       LASSERT(&it2.inset() == this && it2.pit() == 0, return);
+       if (producesOutput()) {
+               buffer().updateLabels(it2);
+       else {
+               DocumentClass const & tclass = buffer().masterBuffer()->params().documentClass();
                Counters const savecnt = tclass.counters();
-               lyx::updateLabels(buffer(), it2);
+               buffer().updateLabels(it2);
                tclass.counters() = savecnt;
        }
 }
@@ -504,7 +504,7 @@ void InsetText::addToToc(DocIterator const & cdit)
                                        *static_cast<InsetOptArg&>(inset).paragraphs().begin();
                                if (!par.labelString().empty())
                                        tocstring = par.labelString() + ' ';
-                               tocstring += insetpar.asString();
+                               tocstring += insetpar.asString(AS_STR_INSETS);
                                break;
                        }
                        default:
@@ -517,7 +517,7 @@ void InsetText::addToToc(DocIterator const & cdit)
                        dit.pos() = 0;
                        // insert this into the table of contents
                        if (tocstring.empty())
-                               tocstring = par.asString(AS_STR_LABEL);
+                               tocstring = par.asString(AS_STR_LABEL | AS_STR_INSETS);
                        toc.push_back(TocItem(dit, toclevel - min_toclevel, tocstring));
                }