mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
Use only one file for dummy implementations
This commit is contained in:
parent
ab6c36fcae
commit
589f49ff36
@ -744,9 +744,9 @@ check_layout_SOURCES = \
|
||||
ModuleList.cpp \
|
||||
Spacing.cpp \
|
||||
TextClass.cpp \
|
||||
support/tests/dummy_functions.cpp \
|
||||
tests/check_layout.cpp \
|
||||
tests/boost.cpp \
|
||||
tests/dummy_functions.cpp
|
||||
tests/boost.cpp
|
||||
|
||||
check_ExternalTransforms_CPPFLAGS = $(AM_CPPFLAGS)
|
||||
check_ExternalTransforms_LDADD = support/liblyxsupport.a $(LIBICONV) $(BOOST_LIBS) @LIBS@ \
|
||||
@ -757,9 +757,9 @@ check_ExternalTransforms_SOURCES = \
|
||||
insets/ExternalTransforms.cpp \
|
||||
Length.cpp \
|
||||
lengthcommon.cpp \
|
||||
support/tests/dummy_functions.cpp \
|
||||
tests/check_ExternalTransforms.cpp \
|
||||
tests/boost.cpp \
|
||||
tests/dummy_functions.cpp
|
||||
tests/boost.cpp
|
||||
|
||||
check_Length_CPPFLAGS = $(AM_CPPFLAGS)
|
||||
check_Length_LDADD = support/liblyxsupport.a $(LIBICONV) $(BOOST_LIBS) @LIBS@ \
|
||||
@ -768,17 +768,17 @@ check_Length_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS)
|
||||
check_Length_SOURCES = \
|
||||
Length.cpp \
|
||||
lengthcommon.cpp \
|
||||
support/tests/dummy_functions.cpp \
|
||||
tests/check_Length.cpp \
|
||||
tests/boost.cpp \
|
||||
tests/dummy_functions.cpp
|
||||
tests/boost.cpp
|
||||
|
||||
check_ListingsCaption_CPPFLAGS = $(AM_CPPFLAGS)
|
||||
check_ListingsCaption_LDADD = support/liblyxsupport.a $(LIBICONV) $(BOOST_LIBS) @LIBS@ \
|
||||
$(ICONV_LIBS) $(ZLIB_LIBS) $(QT_LIB) $(LIBSHLWAPI)
|
||||
check_ListingsCaption_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS)
|
||||
check_ListingsCaption_SOURCES = \
|
||||
support/tests/dummy_functions.cpp \
|
||||
tests/check_ListingsCaption.cpp \
|
||||
tests/boost.cpp \
|
||||
tests/dummy_functions.cpp
|
||||
tests/boost.cpp
|
||||
|
||||
.PHONY: alltests alltests-recursive updatetests
|
||||
|
@ -1,10 +1,13 @@
|
||||
#include <config.h>
|
||||
|
||||
#include "../Messages.h"
|
||||
#include "support/Messages.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
namespace lyx {
|
||||
// Dummy verbose support
|
||||
bool verbose = false;
|
||||
|
||||
// Dummy LyXRC support
|
||||
class LyXRC { string icon_set; } lyxrc;
|
||||
|
||||
@ -34,11 +37,20 @@ namespace lyx {
|
||||
{
|
||||
return string();
|
||||
}
|
||||
|
||||
//
|
||||
// Dummy verbose support
|
||||
// Dummy FontMetrics (needed by Length)
|
||||
//
|
||||
namespace frontend {
|
||||
class FontMetrics {
|
||||
int em() const { return 0; };
|
||||
};
|
||||
}
|
||||
|
||||
bool verbose = false;
|
||||
|
||||
class FontInfo;
|
||||
|
||||
frontend::FontMetrics const & theFontMetrics(FontInfo const &) {
|
||||
static frontend::FontMetrics dummy;
|
||||
return dummy;
|
||||
}
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ set(check_layout_SOURCES)
|
||||
foreach(_f insets/InsetLayout.cpp Color.cpp Counters.cpp Floating.cpp
|
||||
FloatList.cpp FontInfo.cpp Layout.cpp LayoutFile.cpp Lexer.cpp
|
||||
ModuleList.cpp Spacing.cpp TextClass.cpp tests/check_layout.cpp
|
||||
tests/boost.cpp tests/dummy_functions.cpp)
|
||||
tests/boost.cpp support/tests/dummy_functions.cpp)
|
||||
list(APPEND check_layout_SOURCES "${TOP_SRC_DIR}/src/${_f}")
|
||||
endforeach()
|
||||
|
||||
@ -53,7 +53,7 @@ endforeach()
|
||||
set(check_ExternalTransforms_SOURCES)
|
||||
foreach(_f graphics/GraphicsParams.cpp insets/ExternalTransforms.cpp
|
||||
Length.cpp lengthcommon.cpp tests/check_ExternalTransforms.cpp
|
||||
tests/boost.cpp tests/dummy_functions.cpp)
|
||||
tests/boost.cpp support/tests/dummy_functions.cpp)
|
||||
list(APPEND check_ExternalTransforms_SOURCES ${TOP_SRC_DIR}/src/${_f})
|
||||
endforeach()
|
||||
|
||||
@ -76,7 +76,7 @@ add_test(NAME "check_ExternalTransforms"
|
||||
add_dependencies(lyx_run_tests check_ExternalTransforms)
|
||||
|
||||
set(check_Length_SOURCES)
|
||||
foreach(_f Length.cpp lengthcommon.cpp tests/check_Length.cpp tests/boost.cpp tests/dummy_functions.cpp)
|
||||
foreach(_f Length.cpp lengthcommon.cpp tests/check_Length.cpp tests/boost.cpp support/tests/dummy_functions.cpp)
|
||||
list(APPEND check_Length_SOURCES ${TOP_SRC_DIR}/src/${_f})
|
||||
endforeach()
|
||||
add_executable(check_Length ${check_Length_SOURCES})
|
||||
@ -98,7 +98,7 @@ add_dependencies(lyx_run_tests check_Length)
|
||||
|
||||
include_directories(${TOP_SRC_DIR}/src/tests)
|
||||
set(check_ListingsCaption_SOURCES)
|
||||
foreach(_f tests/check_ListingsCaption.cpp tests/boost.cpp tests/dummy_functions.cpp)
|
||||
foreach(_f tests/check_ListingsCaption.cpp tests/boost.cpp support/tests/dummy_functions.cpp)
|
||||
list(APPEND check_ListingsCaption_SOURCES ${TOP_SRC_DIR}/src/${_f})
|
||||
endforeach()
|
||||
add_executable(check_ListingsCaption ${check_ListingsCaption_SOURCES})
|
||||
|
@ -1,61 +0,0 @@
|
||||
#include <config.h>
|
||||
|
||||
#include "../support/Messages.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
namespace lyx {
|
||||
// Dummy LyXRC support
|
||||
class LyXRC { string icon_set; } lyxrc;
|
||||
|
||||
// Dummy LyXAlignment support
|
||||
enum LyXAlignment {
|
||||
DUMMY
|
||||
};
|
||||
|
||||
// Keep the linker happy on Windows
|
||||
void lyx_exit(int) {}
|
||||
|
||||
// Dummy language support
|
||||
Messages const & getGuiMessages()
|
||||
{
|
||||
static Messages lyx_messages;
|
||||
|
||||
return lyx_messages;
|
||||
}
|
||||
Messages const & getMessages(string const &)
|
||||
{
|
||||
static Messages lyx_messages;
|
||||
|
||||
return lyx_messages;
|
||||
}
|
||||
|
||||
string alignmentToCSS(LyXAlignment)
|
||||
{
|
||||
return string();
|
||||
}
|
||||
|
||||
//
|
||||
// Dummy FontMetrics (needed by Length)
|
||||
//
|
||||
|
||||
|
||||
namespace frontend {
|
||||
class FontMetrics {
|
||||
int em() const { return 0; };
|
||||
};
|
||||
}
|
||||
|
||||
class FontInfo;
|
||||
|
||||
frontend::FontMetrics const & theFontMetrics(FontInfo const &) {
|
||||
static frontend::FontMetrics dummy;
|
||||
return dummy;
|
||||
}
|
||||
//
|
||||
// Dummy verbose support
|
||||
//
|
||||
|
||||
bool verbose = false;
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user