#9376 prepare use of Length in lyxrc - move the class Length to support

This commit is contained in:
Stephan Witt 2020-08-03 14:15:09 +02:00
parent 582296d79a
commit 0fa4b7e736
41 changed files with 53 additions and 55 deletions

View File

@ -32,7 +32,6 @@
#include "Language.h" #include "Language.h"
#include "LaTeXFeatures.h" #include "LaTeXFeatures.h"
#include "LaTeXFonts.h" #include "LaTeXFonts.h"
#include "Length.h"
#include "ModuleList.h" #include "ModuleList.h"
#include "Font.h" #include "Font.h"
#include "Lexer.h" #include "Lexer.h"
@ -54,6 +53,7 @@
#include "support/FileName.h" #include "support/FileName.h"
#include "support/filetools.h" #include "support/filetools.h"
#include "support/gettext.h" #include "support/gettext.h"
#include "support/Length.h"
#include "support/Messages.h" #include "support/Messages.h"
#include "support/mutex.h" #include "support/mutex.h"
#include "support/Package.h" #include "support/Package.h"

View File

@ -35,7 +35,6 @@
#include "Language.h" #include "Language.h"
#include "LaTeXFeatures.h" #include "LaTeXFeatures.h"
#include "LayoutFile.h" #include "LayoutFile.h"
#include "Length.h"
#include "Lexer.h" #include "Lexer.h"
#include "LyX.h" #include "LyX.h"
#include "LyXAction.h" #include "LyXAction.h"
@ -81,6 +80,7 @@
#include "support/filetools.h" #include "support/filetools.h"
#include "support/gettext.h" #include "support/gettext.h"
#include "support/lassert.h" #include "support/lassert.h"
#include "support/Length.h"
#include "support/lstrings.h" #include "support/lstrings.h"
#include "support/lyxlib.h" #include "support/lyxlib.h"
#include "support/Package.h" #include "support/Package.h"

View File

@ -18,9 +18,9 @@
#ifndef LYXRC_H #ifndef LYXRC_H
#define LYXRC_H #define LYXRC_H
#include "Length.h"
#include "LyX.h" #include "LyX.h"
#include "support/Length.h"
#include "support/strfwd.h" #include "support/strfwd.h"
#include "support/userinfo.h" #include "support/userinfo.h"

View File

@ -147,8 +147,6 @@ SOURCEFILESCORE = \
LaTeXPackages.cpp \ LaTeXPackages.cpp \
LayoutFile.cpp \ LayoutFile.cpp \
LayoutModuleList.cpp \ LayoutModuleList.cpp \
Length.cpp \
lengthcommon.cpp \
Lexer.cpp \ Lexer.cpp \
LyX.cpp \ LyX.cpp \
LyXAction.cpp \ LyXAction.cpp \
@ -251,7 +249,6 @@ HEADERFILESCORE = \
LayoutEnums.h \ LayoutEnums.h \
LayoutFile.h \ LayoutFile.h \
LayoutModuleList.h \ LayoutModuleList.h \
Length.h \
Lexer.h \ Lexer.h \
LyXAction.h \ LyXAction.h \
lyxfind.h \ lyxfind.h \
@ -733,20 +730,15 @@ check_ExternalTransforms_SOURCES = \
tests/boost.cpp tests/boost.cpp
check_ExternalTransforms_LYX_OBJS = \ check_ExternalTransforms_LYX_OBJS = \
graphics/GraphicsParams.o \ graphics/GraphicsParams.o \
insets/ExternalTransforms.o \ insets/ExternalTransforms.o
Length.o \
lengthcommon.o
check_Length_CPPFLAGS = $(AM_CPPFLAGS) check_Length_CPPFLAGS = $(AM_CPPFLAGS)
check_Length_LDADD = $(check_Length_LYX_OBJS) $(TESTS_LIBS) check_Length_LDADD = $(TESTS_LIBS)
check_Length_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS) check_Length_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS)
check_Length_SOURCES = \ check_Length_SOURCES = \
tests/check_Length.cpp \ tests/check_Length.cpp \
tests/dummy_functions.cpp \ tests/dummy_functions.cpp \
tests/boost.cpp tests/boost.cpp
check_Length_LYX_OBJS = \
Length.o \
lengthcommon.o
check_ListingsCaption_CPPFLAGS = $(AM_CPPFLAGS) check_ListingsCaption_CPPFLAGS = $(AM_CPPFLAGS)
check_ListingsCaption_LDADD = $(check_ListingsCaption_LYX_OBJS) $(TESTS_LIBS) check_ListingsCaption_LDADD = $(check_ListingsCaption_LYX_OBJS) $(TESTS_LIBS)

View File

@ -30,7 +30,6 @@
#include "Language.h" #include "Language.h"
#include "LaTeXFeatures.h" #include "LaTeXFeatures.h"
#include "Layout.h" #include "Layout.h"
#include "Length.h"
#include "Font.h" #include "Font.h"
#include "FontList.h" #include "FontList.h"
#include "LyXRC.h" #include "LyXRC.h"
@ -62,6 +61,7 @@
#include "support/ExceptionMessage.h" #include "support/ExceptionMessage.h"
#include "support/gettext.h" #include "support/gettext.h"
#include "support/lassert.h" #include "support/lassert.h"
#include "support/Length.h"
#include "support/lstrings.h" #include "support/lstrings.h"
#include "support/textutils.h" #include "support/textutils.h"
#include "output_docbook.h" #include "output_docbook.h"

View File

@ -15,12 +15,12 @@
#define PARAGRAPHPARAMETERS_H #define PARAGRAPHPARAMETERS_H
#include "LayoutEnums.h" #include "LayoutEnums.h"
#include "Length.h"
#include "Spacing.h" #include "Spacing.h"
#include "support/debug.h" #include "support/debug.h"
#include "support/types.h" #include "support/types.h"
#include "support/docstring.h" #include "support/docstring.h"
#include "support/Length.h"
namespace lyx { namespace lyx {

View File

@ -37,7 +37,6 @@
#include "InsetList.h" #include "InsetList.h"
#include "Language.h" #include "Language.h"
#include "Layout.h" #include "Layout.h"
#include "Length.h"
#include "Lexer.h" #include "Lexer.h"
#include "lyxfind.h" #include "lyxfind.h"
#include "LyXRC.h" #include "LyXRC.h"
@ -65,6 +64,7 @@
#include "support/docstream.h" #include "support/docstream.h"
#include "support/gettext.h" #include "support/gettext.h"
#include "support/lassert.h" #include "support/lassert.h"
#include "support/Length.h"
#include "support/lstrings.h" #include "support/lstrings.h"
#include "support/lyxalgo.h" #include "support/lyxalgo.h"
#include "support/lyxtime.h" #include "support/lyxtime.h"

View File

@ -16,11 +16,11 @@
#include "BufferParams.h" #include "BufferParams.h"
#include "BufferView.h" #include "BufferView.h"
#include "support/gettext.h" #include "support/gettext.h"
#include "Length.h"
#include "Text.h" #include "Text.h"
#include "TextMetrics.h" // for defaultRowHeight() #include "TextMetrics.h" // for defaultRowHeight()
#include "support/convert.h" #include "support/convert.h"
#include "support/Length.h"
#include "support/lstrings.h" #include "support/lstrings.h"
#include "support/lassert.h" #include "support/lassert.h"

View File

@ -12,7 +12,7 @@
#ifndef VSPACE_H #ifndef VSPACE_H
#define VSPACE_H #define VSPACE_H
#include "Length.h" #include "support/Length.h"
namespace lyx { namespace lyx {

View File

@ -19,13 +19,13 @@
#include "ColorCache.h" #include "ColorCache.h"
#include "ColorSet.h" #include "ColorSet.h"
#include "LengthCombo.h" #include "LengthCombo.h"
#include "Length.h"
#include "qt_helpers.h" #include "qt_helpers.h"
#include "Validator.h" #include "Validator.h"
#include "insets/InsetBox.h" #include "insets/InsetBox.h"
#include "support/gettext.h" #include "support/gettext.h"
#include "support/Length.h"
#include "support/lstrings.h" #include "support/lstrings.h"
#include <QComboBox> #include <QComboBox>

View File

@ -17,7 +17,6 @@
#include "Buffer.h" #include "Buffer.h"
#include "FuncRequest.h" #include "FuncRequest.h"
#include "support/gettext.h" #include "support/gettext.h"
#include "Length.h"
#include "LyXRC.h" #include "LyXRC.h"
#include "insets/ExternalSupport.h" #include "insets/ExternalSupport.h"
@ -31,6 +30,7 @@
#include "support/convert.h" #include "support/convert.h"
#include "support/filetools.h" #include "support/filetools.h"
#include "support/Length.h"
#include "support/lstrings.h" #include "support/lstrings.h"
#include "support/lyxlib.h" #include "support/lyxlib.h"
#include "support/os.h" #include "support/os.h"

View File

@ -22,7 +22,6 @@
#include "Buffer.h" #include "Buffer.h"
#include "FuncRequest.h" #include "FuncRequest.h"
#include "LengthCombo.h" #include "LengthCombo.h"
#include "Length.h"
#include "LyXRC.h" #include "LyXRC.h"
#include "graphics/epstools.h" #include "graphics/epstools.h"
@ -36,6 +35,7 @@
#include "support/debug.h" #include "support/debug.h"
#include "support/filetools.h" #include "support/filetools.h"
#include "support/gettext.h" #include "support/gettext.h"
#include "support/Length.h"
#include "support/lstrings.h" #include "support/lstrings.h"
#include "support/os.h" #include "support/os.h"
#include "support/Package.h" #include "support/Package.h"

View File

@ -14,7 +14,7 @@
#include <QComboBox> #include <QComboBox>
#include "Length.h" #include "support/Length.h"
namespace lyx { namespace lyx {

View File

@ -25,9 +25,10 @@
#ifndef VALIDATOR_H #ifndef VALIDATOR_H
#define VALIDATOR_H #define VALIDATOR_H
#include "Length.h"
#include "Dialog.h" // KernelDocType #include "Dialog.h" // KernelDocType
#include "support/Length.h"
#include <QValidator> #include <QValidator>
class QWidget; class QWidget;

View File

@ -22,12 +22,12 @@
#include "BufferParams.h" #include "BufferParams.h"
#include "FloatList.h" #include "FloatList.h"
#include "Language.h" #include "Language.h"
#include "Length.h"
#include "TextClass.h" #include "TextClass.h"
#include "support/convert.h" #include "support/convert.h"
#include "support/debug.h" #include "support/debug.h"
#include "support/gettext.h" #include "support/gettext.h"
#include "support/Length.h"
#include "support/lstrings.h" #include "support/lstrings.h"
#include "support/lyxalgo.h" #include "support/lyxalgo.h"
#include "support/os.h" #include "support/os.h"

View File

@ -14,7 +14,7 @@
#define QTHELPERS_H #define QTHELPERS_H
#include "ColorSet.h" #include "ColorSet.h"
#include "Length.h" #include "support/Length.h"
#include "support/qstring_helpers.h" #include "support/qstring_helpers.h"
#include "support/filetools.h" #include "support/filetools.h"
#include "qt_i18n.h" #include "qt_i18n.h"

View File

@ -14,9 +14,8 @@
#ifndef GRAPHICSPARAMS_H #ifndef GRAPHICSPARAMS_H
#define GRAPHICSPARAMS_H #define GRAPHICSPARAMS_H
#include "Length.h"
#include "support/FileName.h" #include "support/FileName.h"
#include "support/Length.h"
#include <string> #include <string>
#include <iosfwd> #include <iosfwd>

View File

@ -12,10 +12,9 @@
#ifndef EXTERNALTRANSFORMS_H #ifndef EXTERNALTRANSFORMS_H
#define EXTERNALTRANSFORMS_H #define EXTERNALTRANSFORMS_H
#include "Length.h"
#include "graphics/GraphicsParams.h" #include "graphics/GraphicsParams.h"
#include "support/Length.h"
#include "support/unique_ptr.h" #include "support/unique_ptr.h"
#include <boost/any.hpp> #include <boost/any.hpp>

View File

@ -15,7 +15,8 @@
#define INSETBOX_H #define INSETBOX_H
#include "InsetCollapsible.h" #include "InsetCollapsible.h"
#include "Length.h"
#include "support/Length.h"
namespace lyx { namespace lyx {

View File

@ -62,7 +62,6 @@ TODO
#include "FuncStatus.h" #include "FuncStatus.h"
#include "InsetIterator.h" #include "InsetIterator.h"
#include "LaTeXFeatures.h" #include "LaTeXFeatures.h"
#include "Length.h"
#include "Lexer.h" #include "Lexer.h"
#include "MetricsInfo.h" #include "MetricsInfo.h"
#include "Mover.h" #include "Mover.h"
@ -86,6 +85,7 @@ TODO
#include "support/ExceptionMessage.h" #include "support/ExceptionMessage.h"
#include "support/filetools.h" #include "support/filetools.h"
#include "support/gettext.h" #include "support/gettext.h"
#include "support/Length.h"
#include "support/lyxlib.h" #include "support/lyxlib.h"
#include "support/lstrings.h" #include "support/lstrings.h"
#include "support/os.h" #include "support/os.h"

View File

@ -25,7 +25,6 @@
#include "LaTeXFeatures.h" #include "LaTeXFeatures.h"
#include "Language.h" #include "Language.h"
#include "LayoutFile.h" #include "LayoutFile.h"
#include "Length.h"
#include "LyXAction.h" #include "LyXAction.h"
#include "LyXRC.h" #include "LyXRC.h"
#include "LyXVC.h" #include "LyXVC.h"
@ -45,6 +44,7 @@
#include "support/FileName.h" #include "support/FileName.h"
#include "support/filetools.h" #include "support/filetools.h"
#include "support/gettext.h" #include "support/gettext.h"
#include "support/Length.h"
#include "support/Messages.h" #include "support/Messages.h"
#include "support/lstrings.h" #include "support/lstrings.h"
#include "support/qstring_helpers.h" #include "support/qstring_helpers.h"

View File

@ -21,7 +21,6 @@
#include "FuncRequest.h" #include "FuncRequest.h"
#include "FuncStatus.h" #include "FuncStatus.h"
#include "LaTeXFeatures.h" #include "LaTeXFeatures.h"
#include "Length.h"
#include "MetricsInfo.h" #include "MetricsInfo.h"
#include "OutputParams.h" #include "OutputParams.h"
#include "output_docbook.h" #include "output_docbook.h"
@ -35,6 +34,7 @@
#include "support/debug.h" #include "support/debug.h"
#include "support/docstream.h" #include "support/docstream.h"
#include "support/gettext.h" #include "support/gettext.h"
#include "support/Length.h"
#include "support/lstrings.h" #include "support/lstrings.h"
#include <cstdlib> #include <cstdlib>

View File

@ -13,7 +13,7 @@
#include "InsetListingsParams.h" #include "InsetListingsParams.h"
#include "Length.h" #include "support/Length.h"
#include "Lexer.h" #include "Lexer.h"
#include "support/convert.h" #include "support/convert.h"

View File

@ -26,7 +26,6 @@
#include "InsetList.h" #include "InsetList.h"
#include "Language.h" #include "Language.h"
#include "LaTeXFeatures.h" #include "LaTeXFeatures.h"
#include "Length.h"
#include "LyX.h" #include "LyX.h"
#include "OutputParams.h" #include "OutputParams.h"
#include "xml.h" #include "xml.h"
@ -38,6 +37,7 @@
#include "support/debug.h" #include "support/debug.h"
#include "support/docstream.h" #include "support/docstream.h"
#include "support/gettext.h" #include "support/gettext.h"
#include "support/Length.h"
#include "support/lstrings.h" #include "support/lstrings.h"
using namespace std; using namespace std;

View File

@ -22,7 +22,6 @@
#include "FuncStatus.h" #include "FuncStatus.h"
#include "Language.h" #include "Language.h"
#include "LaTeXFeatures.h" #include "LaTeXFeatures.h"
#include "Length.h"
#include "Lexer.h" #include "Lexer.h"
#include "MetricsInfo.h" #include "MetricsInfo.h"
#include "OutputParams.h" #include "OutputParams.h"
@ -33,6 +32,7 @@
#include "support/docstream.h" #include "support/docstream.h"
#include "support/gettext.h" #include "support/gettext.h"
#include "support/lassert.h" #include "support/lassert.h"
#include "support/Length.h"
#include "support/lstrings.h" #include "support/lstrings.h"
#include "frontends/Application.h" #include "frontends/Application.h"

View File

@ -16,7 +16,8 @@
#define INSET_SPACE_H #define INSET_SPACE_H
#include "Inset.h" #include "Inset.h"
#include "Length.h"
#include "support/Length.h"
namespace lyx { namespace lyx {

View File

@ -25,7 +25,8 @@
#define INSET_TABULAR_H #define INSET_TABULAR_H
#include "InsetText.h" #include "InsetText.h"
#include "Length.h"
#include "support/Length.h"
#include <climits> #include <climits>
#include <iosfwd> #include <iosfwd>

View File

@ -13,7 +13,8 @@
#define INSETWRAP_H #define INSETWRAP_H
#include "InsetCaptionable.h" #include "InsetCaptionable.h"
#include "Length.h"
#include "support/Length.h"
namespace lyx { namespace lyx {

View File

@ -13,7 +13,8 @@
#define MATH_GRID_H #define MATH_GRID_H
#include "InsetMathNest.h" #include "InsetMathNest.h"
#include "Length.h"
#include "support/Length.h"
#include <map> #include <map>

View File

@ -13,7 +13,8 @@
#define MATH_CHEATINSET_H #define MATH_CHEATINSET_H
#include "InsetMath.h" #include "InsetMath.h"
#include "Length.h"
#include "support/Length.h"
namespace lyx { namespace lyx {

View File

@ -13,7 +13,8 @@
#define MATH_SPACEINSET_H #define MATH_SPACEINSET_H
#include "InsetMath.h" #include "InsetMath.h"
#include "Length.h"
#include "support/Length.h"
namespace lyx { namespace lyx {

View File

@ -12,9 +12,10 @@
#ifndef MATH_XYMATRIX_H #ifndef MATH_XYMATRIX_H
#define MATH_XYMATRIX_H #define MATH_XYMATRIX_H
#include "Length.h"
#include "InsetMathGrid.h" #include "InsetMathGrid.h"
#include "support/Length.h"
namespace lyx { namespace lyx {

View File

@ -15,7 +15,6 @@
#include "InsetMathFont.h" #include "InsetMathFont.h"
#include "InsetMathSymbol.h" #include "InsetMathSymbol.h"
#include "Length.h"
#include "MathData.h" #include "MathData.h"
#include "MathFactory.h" #include "MathFactory.h"
#include "MathParser.h" #include "MathParser.h"
@ -31,6 +30,7 @@
#include "support/debug.h" #include "support/debug.h"
#include "support/docstream.h" #include "support/docstream.h"
#include "support/lassert.h" #include "support/lassert.h"
#include "support/Length.h"
#include "support/lyxlib.h" #include "support/lyxlib.h"
#include <map> #include <map>

View File

@ -15,11 +15,11 @@
#include <config.h> #include <config.h>
#include "Length.h"
#include "LyXRC.h" #include "LyXRC.h"
#include "support/debug.h" #include "support/debug.h"
#include "support/docstream.h" #include "support/docstream.h"
#include "support/Length.h"
#include "support/lstrings.h" #include "support/lstrings.h"
#include "support/lyxlib.h" #include "support/lyxlib.h"

View File

@ -71,6 +71,9 @@ liblyxsupport_a_SOURCES = \
kill.cpp \ kill.cpp \
lassert.h \ lassert.h \
lassert.cpp \ lassert.cpp \
Length.cpp \
Length.h \
lengthcommon.cpp \
limited_stack.h \ limited_stack.h \
lstrings.cpp \ lstrings.cpp \
lstrings.h \ lstrings.h \

View File

@ -12,11 +12,10 @@
#include <config.h> #include <config.h>
#include "Length.h"
#include "support/convert.h" #include "support/convert.h"
#include "support/gettext.h" #include "support/gettext.h"
#include "support/lassert.h" #include "support/lassert.h"
#include "support/Length.h"
#include "support/lstrings.h" #include "support/lstrings.h"
using namespace std; using namespace std;

View File

@ -66,7 +66,7 @@ endforeach()
set(check_ExternalTransforms_SOURCES) set(check_ExternalTransforms_SOURCES)
foreach(_f graphics/GraphicsParams.cpp insets/ExternalTransforms.cpp foreach(_f graphics/GraphicsParams.cpp insets/ExternalTransforms.cpp
Length.cpp lengthcommon.cpp tests/check_ExternalTransforms.cpp tests/check_ExternalTransforms.cpp
tests/boost.cpp tests/dummy_functions.cpp) tests/boost.cpp tests/dummy_functions.cpp)
list(APPEND check_ExternalTransforms_SOURCES ${TOP_SRC_DIR}/src/${_f}) list(APPEND check_ExternalTransforms_SOURCES ${TOP_SRC_DIR}/src/${_f})
endforeach() endforeach()
@ -90,7 +90,7 @@ add_test(NAME "check_ExternalTransforms"
add_dependencies(lyx_run_tests check_ExternalTransforms) add_dependencies(lyx_run_tests check_ExternalTransforms)
set(check_Length_SOURCES) set(check_Length_SOURCES)
foreach(_f Length.cpp lengthcommon.cpp tests/check_Length.cpp tests/boost.cpp tests/dummy_functions.cpp) foreach(_f tests/check_Length.cpp tests/boost.cpp tests/dummy_functions.cpp)
list(APPEND check_Length_SOURCES ${TOP_SRC_DIR}/src/${_f}) list(APPEND check_Length_SOURCES ${TOP_SRC_DIR}/src/${_f})
endforeach() endforeach()
add_executable(check_Length ${check_Length_SOURCES}) add_executable(check_Length ${check_Length_SOURCES})

View File

@ -7,14 +7,13 @@
project(${_tex2lyx}) project(${_tex2lyx})
# There is no header file lengthcommon.h set(LINKED_sources)
set(LINKED_sources ${TOP_SRC_DIR}/src/lengthcommon.cpp)
set(LINKED_headers) set(LINKED_headers)
foreach(_src graphics/GraphicsParams insets/ExternalTemplate foreach(_src graphics/GraphicsParams insets/ExternalTemplate
insets/ExternalTransforms insets/InsetLayout Author CiteEnginesList Color Counters insets/ExternalTransforms insets/InsetLayout Author CiteEnginesList Color Counters
Encoding FloatList Floating FontInfo LaTeXPackages Layout Encoding FloatList Floating FontInfo LaTeXPackages Layout
LayoutFile LayoutModuleList Length Lexer ModuleList TextClass LayoutFile LayoutModuleList Lexer ModuleList TextClass
Spacing version) Spacing version)
list(APPEND LINKED_sources ${TOP_SRC_DIR}/src/${_src}.cpp) list(APPEND LINKED_sources ${TOP_SRC_DIR}/src/${_src}.cpp)
list(APPEND LINKED_headers ${TOP_SRC_DIR}/src/${_src}.h) list(APPEND LINKED_headers ${TOP_SRC_DIR}/src/${_src}.h)

View File

@ -102,8 +102,6 @@ LYX_OBJS = \
../Layout.o \ ../Layout.o \
../LayoutFile.o \ ../LayoutFile.o \
../LayoutModuleList.o \ ../LayoutModuleList.o \
../Length.o \
../lengthcommon.o \
../Lexer.o \ ../Lexer.o \
../ModuleList.o \ ../ModuleList.o \
../Spacing.o \ ../Spacing.o \

View File

@ -21,7 +21,6 @@
#include "FloatList.h" #include "FloatList.h"
#include "LaTeXPackages.h" #include "LaTeXPackages.h"
#include "Layout.h" #include "Layout.h"
#include "Length.h"
#include "Preamble.h" #include "Preamble.h"
#include "insets/ExternalTemplate.h" #include "insets/ExternalTemplate.h"
@ -30,6 +29,7 @@
#include "support/convert.h" #include "support/convert.h"
#include "support/FileName.h" #include "support/FileName.h"
#include "support/filetools.h" #include "support/filetools.h"
#include "support/Length.h"
#include "support/lstrings.h" #include "support/lstrings.h"
#include "support/lyxtime.h" #include "support/lyxtime.h"