[LyX/master] Reduce includes in header files

Yuriy Skalko yuriy.skalko at gmail.com
Mon Oct 19 14:06:26 UTC 2020


commit fa6ac23e1c96d3dd39128b827b675738f668e3a4
Author: Yuriy Skalko <yuriy.skalko at gmail.com>
Date:   Mon Oct 19 11:51:00 2020 +0300

    Reduce includes in header files
---
 src/BiblioInfo.h        |    4 ++--
 src/Buffer.h            |    2 +-
 src/BufferView.h        |    1 -
 src/CiteEnginesList.cpp |    1 -
 src/CmdDef.cpp          |    1 +
 src/CmdDef.h            |    4 ++--
 src/Compare.cpp         |    1 +
 src/Compare.h           |    4 ++--
 src/DepTable.cpp        |    1 +
 src/DepTable.h          |    5 +++--
 src/LayoutFile.h        |    3 ++-
 src/Text.h              |    1 +
 src/TextClass.h         |    2 --
 src/buffer_funcs.cpp    |    1 +
 14 files changed, 17 insertions(+), 14 deletions(-)

diff --git a/src/BiblioInfo.h b/src/BiblioInfo.h
index 34bbaf8..ca5cdad 100644
--- a/src/BiblioInfo.h
+++ b/src/BiblioInfo.h
@@ -17,8 +17,6 @@
 
 #include "support/docstring.h"
 
-#include "Citation.h"
-
 #include <map>
 #include <set>
 #include <vector>
@@ -28,6 +26,8 @@ namespace lyx {
 
 class Buffer;
 class BufferParams;
+class CitationStyle;
+class CiteItem;
 class XMLStream;
 
 /// \param latex_str a LaTeX command, "cite", "Citep*", etc
diff --git a/src/Buffer.h b/src/Buffer.h
index 8aa8478..2d96ff9 100644
--- a/src/Buffer.h
+++ b/src/Buffer.h
@@ -17,7 +17,6 @@
 #include "support/unique_ptr.h"
 #include "support/strfwd.h"
 #include "support/types.h"
-#include "support/FileNameList.h"
 
 #include <map>
 #include <list>
@@ -66,6 +65,7 @@ class WorkAreaManager;
 namespace support {
 class DocFileName;
 class FileName;
+class FileNameList;
 } // namespace support
 
 namespace graphics {
diff --git a/src/BufferView.h b/src/BufferView.h
index 22f0d92..74e29c6 100644
--- a/src/BufferView.h
+++ b/src/BufferView.h
@@ -46,7 +46,6 @@ class MathData;
 class MathRow;
 class ParagraphMetrics;
 class Point;
-class TexRow;
 class Text;
 class TextMetrics;
 
diff --git a/src/CiteEnginesList.cpp b/src/CiteEnginesList.cpp
index 7d7ad3f..aeb60dd 100644
--- a/src/CiteEnginesList.cpp
+++ b/src/CiteEnginesList.cpp
@@ -14,7 +14,6 @@
 
 #include "CiteEnginesList.h"
 
-#include "Citation.h"
 #include "LaTeXFeatures.h"
 #include "Lexer.h"
 
diff --git a/src/CmdDef.cpp b/src/CmdDef.cpp
index 8a480bd..08cd7dd 100644
--- a/src/CmdDef.cpp
+++ b/src/CmdDef.cpp
@@ -12,6 +12,7 @@
 
 #include "CmdDef.h"
 
+#include "FuncRequest.h"
 #include "LyXAction.h"
 #include "Lexer.h"
 
diff --git a/src/CmdDef.h b/src/CmdDef.h
index 5fb6e36..946730e 100644
--- a/src/CmdDef.h
+++ b/src/CmdDef.h
@@ -12,8 +12,6 @@
 #ifndef CMDDEF_H
 #define CMDDEF_H
 
-#include "FuncRequest.h"
-
 #include "support/strfwd.h"
 
 #include <map>
@@ -21,6 +19,8 @@
 
 namespace lyx {
 
+class FuncRequest;
+
 /// Creates command definitions
 class CmdDef {
 private:
diff --git a/src/Compare.cpp b/src/Compare.cpp
index aaadf82..490a2ec 100644
--- a/src/Compare.cpp
+++ b/src/Compare.cpp
@@ -13,6 +13,7 @@
 #include "Compare.h"
 
 #include "Author.h"
+#include "Buffer.h"
 #include "BufferParams.h"
 #include "Changes.h"
 #include "CutAndPaste.h"
diff --git a/src/Compare.h b/src/Compare.h
index 40ecf5c..1c93fb5 100644
--- a/src/Compare.h
+++ b/src/Compare.h
@@ -12,8 +12,6 @@
 #ifndef COMPARE_H
 #define COMPARE_H
 
-#include "Buffer.h"
-
 #include <QObject>
 #include <QThread>
 #include <QTimer>
@@ -22,6 +20,8 @@
 
 namespace lyx {
 
+class Buffer;
+
 /**
  * The options that are used by the Comparison algorithm
  * and are set in the GuiCompare Dialog.
diff --git a/src/DepTable.cpp b/src/DepTable.cpp
index 853edf2..f8058fe 100644
--- a/src/DepTable.cpp
+++ b/src/DepTable.cpp
@@ -15,6 +15,7 @@
 #include "DepTable.h"
 
 #include "support/debug.h"
+#include "support/FileName.h"
 #include "support/filetools.h"
 #include "support/lstrings.h"
 #include "support/lyxtime.h"
diff --git a/src/DepTable.h b/src/DepTable.h
index 0d78ab8..13498b7 100644
--- a/src/DepTable.h
+++ b/src/DepTable.h
@@ -13,14 +13,15 @@
 #ifndef DEP_TABLE_H
 #define DEP_TABLE_H
 
-#include "support/FileName.h"
-
+#include <ctime>
 #include <map>
 #include <string>
 
 
 namespace lyx {
 
+namespace support { class FileName; }
+
 ///
 class DepTable {
 public:
diff --git a/src/LayoutFile.h b/src/LayoutFile.h
index fe86532..81dff9d 100644
--- a/src/LayoutFile.h
+++ b/src/LayoutFile.h
@@ -13,7 +13,6 @@
 #ifndef BASECLASSLIST_H
 #define BASECLASSLIST_H
 
-#include "LayoutModuleList.h"
 #include "TextClass.h"
 
 #include "support/strfwd.h"
@@ -24,6 +23,8 @@
 
 namespace lyx {
 
+class LayoutModuleList;
+
 /// Index into LayoutFileList. Basically a 'strong typedef'.
 class LayoutFileIndex {
 public:
diff --git a/src/Text.h b/src/Text.h
index 723e66b..3faccb8 100644
--- a/src/Text.h
+++ b/src/Text.h
@@ -33,6 +33,7 @@ class FontInfo;
 class FuncRequest;
 class FuncStatus;
 class Inset;
+class InsetText;
 class Lexer;
 class PainterInfo;
 class Spacing;
diff --git a/src/TextClass.h b/src/TextClass.h
index 5314f39..741bf33 100644
--- a/src/TextClass.h
+++ b/src/TextClass.h
@@ -15,7 +15,6 @@
 #include "DocumentClassPtr.h"
 #include "FloatList.h"
 #include "FontInfo.h"
-#include "Layout.h"
 #include "LayoutEnums.h"
 #include "LayoutModuleList.h"
 
@@ -38,7 +37,6 @@ namespace lyx {
 
 namespace support { class FileName; }
 
-class Counters;
 class FloatList;
 class Layout;
 class LayoutFile;
diff --git a/src/buffer_funcs.cpp b/src/buffer_funcs.cpp
index 8ac7e97..58aa12d 100644
--- a/src/buffer_funcs.cpp
+++ b/src/buffer_funcs.cpp
@@ -22,6 +22,7 @@
 #include "support/lassert.h"
 #include "support/convert.h"
 #include "support/debug.h"
+#include "support/FileName.h"
 #include "support/filetools.h"
 #include "support/gettext.h"
 #include "support/lstrings.h"


More information about the lyx-cvs mailing list