commit 597de9bb8d93fe293d2d6fce76bd32bde5198c5d
Author: Guillaume Munch <[email protected]>
Date: Mon Jan 9 23:15:16 2017 +0100
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 6c7c1f9..1256a49 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 e13773f..1e58ec2 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.
+ *
+ * Here is a summary of built-in toc types
+ *
+ * Non-customizable (used without TocBuilder): "tableofcontents", "change",
+ * "citation", "label", "senseless".
+ *
+ * Built-in but customizable (used with TocBuilder): "child", "graphics",
+ * "equation", "index", "index:<user-str>", "nomencl", "listings",
"math-macro",
+ * "external", any float type (as defined in the layouts).
*
- * I leave this for documentation purposes for the moment.
+ * The following are used for XHTML output: "tableofcontents" (InsetText),
+ * "citation" (InsetCitation), any float type.
*
-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:<user-str>" (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
-}
+ * Other types are defined in the layouts.
*/
///