From 597de9bb8d93fe293d2d6fce76bd32bde5198c5d Mon Sep 17 00:00:00 2001 From: Guillaume Munch Date: Mon, 9 Jan 2017 23:15:16 +0100 Subject: [PATCH] Remove comments about enumification of toc types This is no longer likely to happen. --- src/TocBackend.cpp | 1 - src/TocBackend.h | 47 +++++++++++++++------------------------------- 2 files changed, 15 insertions(+), 33 deletions(-) diff --git a/src/TocBackend.cpp b/src/TocBackend.cpp index 6c7c1f906d..1256a49865 100644 --- a/src/TocBackend.cpp +++ b/src/TocBackend.cpp @@ -353,7 +353,6 @@ docstring TocBackend::outlinerName(string const & type) const bool TocBackend::isOther(std::string const & type) { - // This is where having an Enum of types would have been more elegant... return type == "graphics" || type == "note" || type == "branch" diff --git a/src/TocBackend.h b/src/TocBackend.h index e13773fa23..1e58ec2f34 100644 --- a/src/TocBackend.h +++ b/src/TocBackend.h @@ -30,40 +30,23 @@ namespace lyx { class Buffer; - -/* FIXME: toc types are currently identified by strings. It cannot be converted - * into an enum because of the user-configurable indexing categories and - * the user-definable float types provided by layout files. +/* Toc types are described by strings. They cannot be converted into an enum + * because of the user-configurable categories for index and the user-definable + * toc types provided in layout files. * - * I leave this for documentation purposes for the moment. + * Here is a summary of built-in toc types * -enum TocType { -// Non-customizable (does not use TocBuilder) - //The following is used for XHTML output - TABLE_OF_CONTENTS,//"tableofcontents" - CHANGE,//"change" - //The following is used for XHTML output - CITATION,//"citation" - LABEL,//"label" - SENSELESS,//"senseless" -// Built-in but customizable - CHILD,//"child" - GRAPHICS,//"graphics" - EQUATION,//"equation" - INDEX,//"index", "index:" (from interface) - NOMENCL,//"nomencl" - LISTING,//"listings" - //The following are used for XHTML output - FLOAT,//"figure", "table", "algorithm", user-defined (from layout?) - MATH_MACRO,//"math-macro" - EXTERNAL,//"external" -// Defined in layouts - NOTE,//"note" - FOOTNOTE,//"footnote" - MARGINAL_NOTE,//"marginalnote" - BRANCH,//"branch" - USER_DEFINED //any value defined in the layouts -} + * Non-customizable (used without TocBuilder): "tableofcontents", "change", + * "citation", "label", "senseless". + * + * Built-in but customizable (used with TocBuilder): "child", "graphics", + * "equation", "index", "index:", "nomencl", "listings", "math-macro", + * "external", any float type (as defined in the layouts). + * + * The following are used for XHTML output: "tableofcontents" (InsetText), + * "citation" (InsetCitation), any float type. + * + * Other types are defined in the layouts. */ ///