]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiDocument.cpp
Andre's s/getBaseClass/baseClass/ cleanup.
[lyx.git] / src / frontends / qt4 / GuiDocument.cpp
index dcfaf3985f82d12dbef25f4a32a1f68a1f7498b0..6adc1f52e9a7ce7c5c568410b03b9c4294a6b7f9 100644 (file)
@@ -518,7 +518,7 @@ GuiDocument::GuiDocument(GuiView & lv)
                this, SLOT(change_adaptor()));
        connect(textLayoutModule->lspacingCO, SIGNAL(activated(int)),
                this, SLOT(setLSpacing(int)));
-       connect(textLayoutModule->lspacingLE, SIGNAL(textChanged(const QString&)),
+       connect(textLayoutModule->lspacingLE, SIGNAL(textChanged(const QString &)),
                this, SLOT(change_adaptor()));
        connect(textLayoutModule->skipRB, SIGNAL(clicked()),
                this, SLOT(change_adaptor()));
@@ -1212,7 +1212,7 @@ void GuiDocument::updatePagestyle(string const & items, string const & sel)
 
 void GuiDocument::classChanged()
 {
-       TextClassIndex const tc = latexModule->classCO->currentIndex();
+       textclass_type const tc = latexModule->classCO->currentIndex();
        bp_.setBaseClass(tc);
        if (lyxrc.auto_reset_options) {
                if (applyPB->isEnabled()) {
@@ -1230,8 +1230,8 @@ void GuiDocument::classChanged()
 
 
 namespace {
-       // This is an insanely complicated attempt to make this sort of thing
-       // work with RTL languages.
+       //This is an insanely complicated attempt to make this sort of thing
+       //work with RTL languages.
        docstring formatStrVec(vector<string> const & v, docstring const & s) 
        {
                //this mess formats the list as "v[0], v[1], ..., [s] v[n]"
@@ -1363,15 +1363,13 @@ void GuiDocument::updateNumbering()
        int const toc = numberingModule->tocSL->value();
        QString const no = qt_("No");
        QString const yes = qt_("Yes");
-       TextClass::const_iterator end = tclass.end();
-       TextClass::const_iterator cit = tclass.begin();
        QTreeWidgetItem * item = 0;
-       for ( ; cit != end ; ++cit) {
-               int const toclevel = (*cit)->toclevel;
-               if (toclevel != Layout::NOT_IN_TOC
-                   && (*cit)->labeltype == LABEL_COUNTER) {
+       for (size_t i = 0; i != tclass.layoutCount(); ++i) {
+               Layout const & lt = *tclass.layout(i);
+               int const toclevel = lt.toclevel;
+               if (toclevel != Layout::NOT_IN_TOC && lt.labeltype == LABEL_COUNTER) {
                        item = new QTreeWidgetItem(numberingModule->tocTW);
-                       item->setText(0, toqstr(translateIfPossible((*cit)->name())));
+                       item->setText(0, toqstr(translateIfPossible(lt.name())));
                        item->setText(1, (toclevel <= depth) ? yes : no);
                        item->setText(2, (toclevel <= toc) ? yes : no);
                }