From 348e0241af2dd8e5e1dda30e28d89c3a7f1fc03b Mon Sep 17 00:00:00 2001 From: Guillaume Munch Date: Sat, 4 Jun 2016 09:41:13 +0100 Subject: [PATCH] Do not include MetricsInfo.h in MathStream.h Fixes the FIXME in MathStream.h --- src/mathed/InsetMathCancel.cpp | 4 +++- src/mathed/InsetMathCancelto.cpp | 6 ++++-- src/mathed/InsetMathDiagram.cpp | 4 +++- src/mathed/InsetMathEnsureMath.cpp | 4 +++- src/mathed/InsetMathHull.cpp | 1 + src/mathed/InsetMathKern.cpp | 4 +++- src/mathed/InsetMathNest.cpp | 1 + src/mathed/InsetMathNumber.cpp | 2 ++ src/mathed/InsetMathOverset.cpp | 2 ++ src/mathed/InsetMathPar.cpp | 2 ++ src/mathed/InsetMathPhantom.cpp | 3 +++ src/mathed/InsetMathRoot.cpp | 5 ++++- src/mathed/InsetMathScript.cpp | 16 +++++++++------- src/mathed/InsetMathSideset.cpp | 14 ++++++++------ src/mathed/InsetMathSpace.cpp | 1 + src/mathed/InsetMathSqrt.cpp | 5 ++++- src/mathed/InsetMathStackrel.cpp | 6 ++++-- src/mathed/InsetMathString.cpp | 1 + src/mathed/InsetMathSubstack.cpp | 5 +++-- src/mathed/InsetMathSymbol.cpp | 6 ++++-- src/mathed/InsetMathTabular.cpp | 2 ++ src/mathed/InsetMathUnderset.cpp | 3 +++ src/mathed/InsetMathUnknown.cpp | 4 +++- src/mathed/InsetMathXArrow.cpp | 3 +++ src/mathed/InsetMathXYMatrix.cpp | 4 +++- src/mathed/MathMacro.cpp | 1 + src/mathed/MathMacroTemplate.cpp | 5 +++-- src/mathed/MathStream.h | 2 -- src/mathed/MathSupport.cpp | 2 ++ 29 files changed, 85 insertions(+), 33 deletions(-) diff --git a/src/mathed/InsetMathCancel.cpp b/src/mathed/InsetMathCancel.cpp index 755470fdd8..dcda5b63ea 100644 --- a/src/mathed/InsetMathCancel.cpp +++ b/src/mathed/InsetMathCancel.cpp @@ -12,9 +12,11 @@ #include "InsetMathCancel.h" -#include "LaTeXFeatures.h" #include "MathStream.h" +#include "LaTeXFeatures.h" +#include "MetricsInfo.h" + #include "frontends/Painter.h" #include diff --git a/src/mathed/InsetMathCancelto.cpp b/src/mathed/InsetMathCancelto.cpp index d6d2233dd2..6a04cfa246 100644 --- a/src/mathed/InsetMathCancelto.cpp +++ b/src/mathed/InsetMathCancelto.cpp @@ -12,11 +12,13 @@ #include "InsetMathCancelto.h" -#include "Cursor.h" -#include "LaTeXFeatures.h" #include "MathData.h" #include "MathStream.h" +#include "Cursor.h" +#include "LaTeXFeatures.h" +#include "MetricsInfo.h" + #include "frontends/Painter.h" #include diff --git a/src/mathed/InsetMathDiagram.cpp b/src/mathed/InsetMathDiagram.cpp index 5c8887c76f..d5a1b5231a 100644 --- a/src/mathed/InsetMathDiagram.cpp +++ b/src/mathed/InsetMathDiagram.cpp @@ -13,9 +13,11 @@ #include "InsetMathDiagram.h" -#include "LaTeXFeatures.h" #include "MathStream.h" +#include "LaTeXFeatures.h" +#include "MetricsInfo.h" + #include namespace lyx { diff --git a/src/mathed/InsetMathEnsureMath.cpp b/src/mathed/InsetMathEnsureMath.cpp index 1cc9971705..5a4252f682 100644 --- a/src/mathed/InsetMathEnsureMath.cpp +++ b/src/mathed/InsetMathEnsureMath.cpp @@ -13,11 +13,13 @@ #include "InsetMathEnsureMath.h" -#include "LaTeXFeatures.h" #include "MathData.h" #include "MathStream.h" #include "MathSupport.h" +#include "LaTeXFeatures.h" +#include "MetricsInfo.h" + #include diff --git a/src/mathed/InsetMathHull.cpp b/src/mathed/InsetMathHull.cpp index 9cb3eefa39..fbf7208189 100644 --- a/src/mathed/InsetMathHull.cpp +++ b/src/mathed/InsetMathHull.cpp @@ -38,6 +38,7 @@ #include "MacroTable.h" #include "MathMacro.h" #include "MathMacroTemplate.h" +#include "MetricsInfo.h" #include "output_xhtml.h" #include "Paragraph.h" #include "ParIterator.h" diff --git a/src/mathed/InsetMathKern.cpp b/src/mathed/InsetMathKern.cpp index 80e3243ae6..71723b9956 100644 --- a/src/mathed/InsetMathKern.cpp +++ b/src/mathed/InsetMathKern.cpp @@ -11,10 +11,12 @@ #include #include "InsetMathKern.h" -#include "MathStream.h" + #include "MathStream.h" #include "MathSupport.h" + #include "Dimension.h" +#include "MetricsInfo.h" #include "support/docstring.h" diff --git a/src/mathed/InsetMathNest.cpp b/src/mathed/InsetMathNest.cpp index 7357b5f922..3e3877253f 100644 --- a/src/mathed/InsetMathNest.cpp +++ b/src/mathed/InsetMathNest.cpp @@ -50,6 +50,7 @@ #include "FuncStatus.h" #include "LyX.h" #include "LyXRC.h" +#include "MetricsInfo.h" #include "OutputParams.h" #include "Text.h" diff --git a/src/mathed/InsetMathNumber.cpp b/src/mathed/InsetMathNumber.cpp index 6a67ce18d7..5237cebab6 100644 --- a/src/mathed/InsetMathNumber.cpp +++ b/src/mathed/InsetMathNumber.cpp @@ -15,6 +15,8 @@ #include "MathStream.h" #include "MathSupport.h" +#include "MetricsInfo.h" + using namespace std; diff --git a/src/mathed/InsetMathOverset.cpp b/src/mathed/InsetMathOverset.cpp index d2044a1bec..f05bbd7df7 100644 --- a/src/mathed/InsetMathOverset.cpp +++ b/src/mathed/InsetMathOverset.cpp @@ -11,11 +11,13 @@ #include #include "InsetMathOverset.h" + #include "MathData.h" #include "MathStream.h" #include "Cursor.h" #include "LaTeXFeatures.h" +#include "MetricsInfo.h" using namespace std; diff --git a/src/mathed/InsetMathPar.cpp b/src/mathed/InsetMathPar.cpp index 3578399db5..e1227ac4af 100644 --- a/src/mathed/InsetMathPar.cpp +++ b/src/mathed/InsetMathPar.cpp @@ -15,6 +15,8 @@ #include "MathData.h" #include "MathStream.h" +#include "MetricsInfo.h" + #include namespace lyx { diff --git a/src/mathed/InsetMathPhantom.cpp b/src/mathed/InsetMathPhantom.cpp index 9b1c80ad32..4a190ea760 100644 --- a/src/mathed/InsetMathPhantom.cpp +++ b/src/mathed/InsetMathPhantom.cpp @@ -14,6 +14,9 @@ #include "LaTeXFeatures.h" #include "MathStream.h" + +#include "MetricsInfo.h" + #include "frontends/Painter.h" #include diff --git a/src/mathed/InsetMathRoot.cpp b/src/mathed/InsetMathRoot.cpp index 38ffb18ff3..2b4b668b9d 100644 --- a/src/mathed/InsetMathRoot.cpp +++ b/src/mathed/InsetMathRoot.cpp @@ -13,13 +13,16 @@ #include "InsetMathRoot.h" -#include "LaTeXFeatures.h" #include "MathData.h" #include "MathStream.h" + #include "Cursor.h" +#include "LaTeXFeatures.h" +#include "MetricsInfo.h" #include "frontends/Painter.h" + using namespace std; namespace lyx { diff --git a/src/mathed/InsetMathScript.cpp b/src/mathed/InsetMathScript.cpp index bfe7d1847f..b4cd5909be 100644 --- a/src/mathed/InsetMathScript.cpp +++ b/src/mathed/InsetMathScript.cpp @@ -10,22 +10,24 @@ #include +#include "InsetMathScript.h" + +#include "InsetMathBrace.h" +#include "InsetMathSymbol.h" +#include "MathData.h" +#include "MathStream.h" +#include "MathSupport.h" + #include "BufferView.h" #include "Cursor.h" #include "DispatchResult.h" #include "FuncRequest.h" #include "FuncStatus.h" -#include "InsetMathBrace.h" -#include "InsetMathScript.h" -#include "InsetMathSymbol.h" #include "LaTeXFeatures.h" -#include "MathData.h" -#include "MathStream.h" -#include "MathSupport.h" +#include "MetricsInfo.h" #include "support/debug.h" #include "support/gettext.h" - #include "support/lassert.h" diff --git a/src/mathed/InsetMathSideset.cpp b/src/mathed/InsetMathSideset.cpp index 3b364ec0d5..37f437db4f 100644 --- a/src/mathed/InsetMathSideset.cpp +++ b/src/mathed/InsetMathSideset.cpp @@ -11,20 +11,22 @@ #include +#include "InsetMathSideset.h" + +#include "InsetMathSymbol.h" +#include "MathData.h" +#include "MathStream.h" +#include "MathSupport.h" + #include "BufferView.h" #include "Cursor.h" #include "DispatchResult.h" #include "FuncRequest.h" #include "FuncStatus.h" -#include "InsetMathSideset.h" -#include "InsetMathSymbol.h" #include "LaTeXFeatures.h" -#include "MathData.h" -#include "MathStream.h" -#include "MathSupport.h" +#include "MetricsInfo.h" #include "support/debug.h" - #include "support/lassert.h" diff --git a/src/mathed/InsetMathSpace.cpp b/src/mathed/InsetMathSpace.cpp index c84bc771d8..e6aa834ea8 100644 --- a/src/mathed/InsetMathSpace.cpp +++ b/src/mathed/InsetMathSpace.cpp @@ -21,6 +21,7 @@ #include "FuncRequest.h" #include "FuncStatus.h" #include "LaTeXFeatures.h" +#include "MetricsInfo.h" #include "insets/InsetSpace.h" diff --git a/src/mathed/InsetMathSqrt.cpp b/src/mathed/InsetMathSqrt.cpp index a8a1122f49..d04eab3abf 100644 --- a/src/mathed/InsetMathSqrt.cpp +++ b/src/mathed/InsetMathSqrt.cpp @@ -12,10 +12,13 @@ #include "InsetMathSqrt.h" -#include "LaTeXFeatures.h" #include "MathData.h" #include "MathStream.h" + +#include "LaTeXFeatures.h" +#include "MetricsInfo.h" #include "TextPainter.h" + #include "frontends/Painter.h" diff --git a/src/mathed/InsetMathStackrel.cpp b/src/mathed/InsetMathStackrel.cpp index d43e466964..9412d99182 100644 --- a/src/mathed/InsetMathStackrel.cpp +++ b/src/mathed/InsetMathStackrel.cpp @@ -12,11 +12,13 @@ #include "InsetMathStackrel.h" -#include "Cursor.h" -#include "LaTeXFeatures.h" #include "MathData.h" #include "MathStream.h" +#include "Cursor.h" +#include "LaTeXFeatures.h" +#include "MetricsInfo.h" + using namespace std; namespace lyx { diff --git a/src/mathed/InsetMathString.cpp b/src/mathed/InsetMathString.cpp index d38a15e19c..8aac4f38a8 100644 --- a/src/mathed/InsetMathString.cpp +++ b/src/mathed/InsetMathString.cpp @@ -18,6 +18,7 @@ #include "MathSupport.h" #include "Encoding.h" +#include "MetricsInfo.h" #include "support/debug.h" #include "support/gettext.h" diff --git a/src/mathed/InsetMathSubstack.cpp b/src/mathed/InsetMathSubstack.cpp index 179d44c3d4..06fd296a98 100644 --- a/src/mathed/InsetMathSubstack.cpp +++ b/src/mathed/InsetMathSubstack.cpp @@ -12,14 +12,15 @@ #include "InsetMathSubstack.h" -#include "LaTeXFeatures.h" #include "MathData.h" #include "MathStream.h" #include "FuncRequest.h" #include "FuncStatus.h" -#include "support/gettext.h" +#include "LaTeXFeatures.h" +#include "MetricsInfo.h" +#include "support/gettext.h" #include "support/lstrings.h" #include diff --git a/src/mathed/InsetMathSymbol.cpp b/src/mathed/InsetMathSymbol.cpp index bdca11105b..9d923ce767 100644 --- a/src/mathed/InsetMathSymbol.cpp +++ b/src/mathed/InsetMathSymbol.cpp @@ -12,13 +12,15 @@ #include "InsetMathSymbol.h" -#include "Dimension.h" -#include "LaTeXFeatures.h" #include "MathAtom.h" #include "MathParser.h" #include "MathStream.h" #include "MathSupport.h" +#include "Dimension.h" +#include "LaTeXFeatures.h" +#include "MetricsInfo.h" + #include "support/debug.h" #include "support/docstream.h" #include "support/lyxlib.h" diff --git a/src/mathed/InsetMathTabular.cpp b/src/mathed/InsetMathTabular.cpp index 40cf58d37c..89a8f26289 100644 --- a/src/mathed/InsetMathTabular.cpp +++ b/src/mathed/InsetMathTabular.cpp @@ -16,6 +16,8 @@ #include "MathStream.h" #include "MathStream.h" +#include "MetricsInfo.h" + #include "support/lstrings.h" #include diff --git a/src/mathed/InsetMathUnderset.cpp b/src/mathed/InsetMathUnderset.cpp index 3f4d0c49c4..46f5277543 100644 --- a/src/mathed/InsetMathUnderset.cpp +++ b/src/mathed/InsetMathUnderset.cpp @@ -11,11 +11,14 @@ #include #include "InsetMathUnderset.h" + #include "MathData.h" #include "MathStream.h" #include "Cursor.h" #include "LaTeXFeatures.h" +#include "MetricsInfo.h" + using namespace std; diff --git a/src/mathed/InsetMathUnknown.cpp b/src/mathed/InsetMathUnknown.cpp index d7e2875521..926e7dd5d5 100644 --- a/src/mathed/InsetMathUnknown.cpp +++ b/src/mathed/InsetMathUnknown.cpp @@ -11,10 +11,12 @@ #include #include "InsetMathUnknown.h" + #include "MathSupport.h" #include "MathAtom.h" #include "MathStream.h" -#include "MathStream.h" + +#include "MetricsInfo.h" #include "frontends/Painter.h" diff --git a/src/mathed/InsetMathXArrow.cpp b/src/mathed/InsetMathXArrow.cpp index fbdac6922f..96fdc83aac 100644 --- a/src/mathed/InsetMathXArrow.cpp +++ b/src/mathed/InsetMathXArrow.cpp @@ -13,12 +13,15 @@ #include "support/lassert.h" #include "InsetMathXArrow.h" + #include "MathData.h" #include "MathStream.h" #include "MathStream.h" #include "MathSupport.h" #include "LaTeXFeatures.h" +#include "MetricsInfo.h" + #include diff --git a/src/mathed/InsetMathXYMatrix.cpp b/src/mathed/InsetMathXYMatrix.cpp index 95941b85ce..52043db56a 100644 --- a/src/mathed/InsetMathXYMatrix.cpp +++ b/src/mathed/InsetMathXYMatrix.cpp @@ -12,9 +12,11 @@ #include "InsetMathXYMatrix.h" -#include "LaTeXFeatures.h" #include "MathStream.h" +#include "LaTeXFeatures.h" +#include "MetricsInfo.h" + #include namespace lyx { diff --git a/src/mathed/MathMacro.cpp b/src/mathed/MathMacro.cpp index 80948fd824..d745b01009 100644 --- a/src/mathed/MathMacro.cpp +++ b/src/mathed/MathMacro.cpp @@ -30,6 +30,7 @@ #include "LaTeXFeatures.h" #include "LyX.h" #include "LyXRC.h" +#include "MetricsInfo.h" #include "frontends/Painter.h" diff --git a/src/mathed/MathMacroTemplate.cpp b/src/mathed/MathMacroTemplate.cpp index 4b68626062..8516c39b0a 100644 --- a/src/mathed/MathMacroTemplate.cpp +++ b/src/mathed/MathMacroTemplate.cpp @@ -13,8 +13,6 @@ #include "MathMacroTemplate.h" -#include "DocIterator.h" -#include "LaTeXFeatures.h" #include "InsetMathBrace.h" #include "InsetMathChar.h" #include "InsetMathHull.h" @@ -31,9 +29,12 @@ #include "Color.h" #include "Cursor.h" #include "DispatchResult.h" +#include "DocIterator.h" #include "FuncRequest.h" #include "FuncStatus.h" +#include "LaTeXFeatures.h" #include "Lexer.h" +#include "MetricsInfo.h" #include "TocBackend.h" #include "frontends/Painter.h" diff --git a/src/mathed/MathStream.h b/src/mathed/MathStream.h index 6cfd5855ec..b8378ef0d9 100644 --- a/src/mathed/MathStream.h +++ b/src/mathed/MathStream.h @@ -15,8 +15,6 @@ #include "support/strfwd.h" #include "InsetMath.h" -// FIXME: Move to individual insets -#include "MetricsInfo.h" #include "texstream.h" diff --git a/src/mathed/MathSupport.cpp b/src/mathed/MathSupport.cpp index 7769176e7a..6a393cb5f5 100644 --- a/src/mathed/MathSupport.cpp +++ b/src/mathed/MathSupport.cpp @@ -19,6 +19,8 @@ #include "MathParser.h" #include "MathStream.h" +#include "MetricsInfo.h" + #include "frontends/FontLoader.h" #include "frontends/FontMetrics.h" #include "frontends/Painter.h" -- 2.39.2