]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FormToc.C
Change glob() API to accept a dir parameter.
[lyx.git] / src / frontends / xforms / FormToc.C
index dd7c268fa56c6d9e7a0babea3338d270c6f7f942..62842e0342c0029ae6e25e43228e176a432b9431 100644 (file)
 
 #include <config.h>
 
-
 #include "FormToc.h"
-#include "xformsBC.h"
-#include "xforms_helpers.h"
 #include "ControlToc.h"
 #include "forms/form_toc.h"
+
+#include "xforms_helpers.h"
+#include "xformsBC.h"
+
 #include "support/lstrings.h" // frontStrip, strip
-#include "debug.h"
-#include "gettext.h"
+
 #include "lyx_forms.h"
 
-#include <vector>
+using std::vector;
+using std::string;
 
-using namespace lyx::support;
+namespace lyx {
 
-using std::vector;
-using std::endl;
+using support::getStringFromVector;
 
+namespace frontend {
 
 typedef FormController<ControlToc, FormView<FD_toc> > base_class;
 
@@ -88,7 +89,7 @@ void FormToc::updateType()
        fl_addto_choice(dialog_->choice_toc_type, choice.c_str());
 
        // And select the correct one
-       string const type = lyx::toc::getType(controller().params().getCmdName());
+       string const type = toc::getType(controller().params().getCmdName());
        fl_set_choice_text(dialog_->choice_toc_type, type.c_str());
 }
 
@@ -104,7 +105,7 @@ void FormToc::updateContents()
                return;
        }
 
-       lyx::toc::Toc const contents = controller().getContents(type);
+       toc::Toc const contents = controller().getContents(type);
 
        // Check if all elements are the same.
        if (toc_ == contents) {
@@ -129,8 +130,8 @@ void FormToc::updateContents()
        fl_clear_browser(dialog_->browser_toc);
        setEnabled(dialog_->browser_toc, true);
 
-       lyx::toc::Toc::const_iterator cit = contents.begin();
-       lyx::toc::Toc::const_iterator end = contents.end();
+       toc::Toc::const_iterator cit = contents.begin();
+       toc::Toc::const_iterator end = contents.end();
        for (; cit != end; ++cit) {
                fl_add_browser_line(dialog_->browser_toc,
                                    cit->asString().c_str());
@@ -139,3 +140,6 @@ void FormToc::updateContents()
        fl_set_browser_topline(dialog_->browser_toc, topline);
        fl_select_browser_line(dialog_->browser_toc, line);
 }
+
+} // namespace frontend
+} // namespace lyx