From 72c13323d8c2631adc23d2d23fb12d04e58d2d29 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Wed, 21 Aug 2013 12:45:00 +0200 Subject: [PATCH] Remove dependency on NO_LAYOUT_CSS #define in Layout.cpp Remove all traces of this #define. --- src/Layout.cpp | 3 --- src/Makefile.am | 2 +- src/support/tests/dummy_functions.cpp | 11 +++++++++++ src/tests/CMakeLists.txt | 1 - src/tex2lyx/CMakeLists.txt | 1 - src/tex2lyx/Makefile.am | 2 +- src/tex2lyx/dummy_impl.cpp | 6 ++++++ 7 files changed, 19 insertions(+), 7 deletions(-) diff --git a/src/Layout.cpp b/src/Layout.cpp index 46035513c7..08540efd15 100644 --- a/src/Layout.cpp +++ b/src/Layout.cpp @@ -1505,14 +1505,11 @@ void Layout::makeDefaultCSS() const htmldefaultstyle_ += from_ascii(tmp); } -// tex2lyx does not see output_xhtml.cpp -#ifndef NO_LAYOUT_CSS // alignment string where = alignmentToCSS(align); if (!where.empty()) { htmldefaultstyle_ += from_ascii("text-align: " + where + ";\n"); } -#endif // wrap up what we have, if anything if (!htmldefaultstyle_.empty()) diff --git a/src/Makefile.am b/src/Makefile.am index 024cf45661..c1949a7e0a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -689,7 +689,7 @@ if INSTALL_MACOSX ADD_FRAMEWORKS = -framework QtGui -framework QtCore -framework AppKit -framework ApplicationServices endif -check_layout_CPPFLAGS = $(AM_CPPFLAGS) -DNO_LAYOUT_CSS +check_layout_CPPFLAGS = $(AM_CPPFLAGS) check_layout_LDADD = support/liblyxsupport.a $(LIBICONV) $(BOOST_LIBS) @LIBS@ $(QT4_CORE_LIBS) $(LIBSHLWAPI) check_layout_LDFLAGS = $(QT4_CORE_LDFLAGS) $(ADD_FRAMEWORKS) check_layout_SOURCES = \ diff --git a/src/support/tests/dummy_functions.cpp b/src/support/tests/dummy_functions.cpp index cb87ee5f47..5a99081b77 100644 --- a/src/support/tests/dummy_functions.cpp +++ b/src/support/tests/dummy_functions.cpp @@ -8,6 +8,11 @@ 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) {} @@ -24,4 +29,10 @@ namespace lyx { return lyx_messages; } + + string alignmentToCSS(LyXAlignment) + { + return string(); + } + } diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index 82eb68eb1b..2a8b39e44f 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -12,7 +12,6 @@ foreach(_f insets/InsetLayout.cpp Color.cpp Counters.cpp Floating.cpp list(APPEND check_layout_SOURCES "${TOP_SRC_DIR}/src/${_f}") endforeach() -add_definitions(-DNO_LAYOUT_CSS) add_executable(check_layout ${check_layout_SOURCES}) target_link_libraries(check_layout support diff --git a/src/tex2lyx/CMakeLists.txt b/src/tex2lyx/CMakeLists.txt index b1d7463b6e..789c3f86af 100644 --- a/src/tex2lyx/CMakeLists.txt +++ b/src/tex2lyx/CMakeLists.txt @@ -30,7 +30,6 @@ include_directories(BEFORE ${ZLIB_INCLUDE_DIR}) add_definitions(-DTEX2LYX) -add_definitions(-DNO_LAYOUT_CSS) if(WIN32) set(FILE_RC ${TOP_CMAKE_PATH}/lyx.rc) diff --git a/src/tex2lyx/Makefile.am b/src/tex2lyx/Makefile.am index 5b933a8d2f..2f1c853ffb 100644 --- a/src/tex2lyx/Makefile.am +++ b/src/tex2lyx/Makefile.am @@ -16,7 +16,7 @@ bin_PROGRAMS = tex2lyx DEFAULT_INCLUDES = -AM_CPPFLAGS += -DTEX2LYX -DNO_LAYOUT_CSS $(PCH_FLAGS) -I$(top_srcdir)/src/tex2lyx \ +AM_CPPFLAGS += -DTEX2LYX $(PCH_FLAGS) -I$(top_srcdir)/src/tex2lyx \ -I$(top_srcdir)/src -I$(top_builddir) $(BOOST_INCLUDES) TEST_FILES = \ diff --git a/src/tex2lyx/dummy_impl.cpp b/src/tex2lyx/dummy_impl.cpp index b20db6d9d6..6fb1a84b76 100644 --- a/src/tex2lyx/dummy_impl.cpp +++ b/src/tex2lyx/dummy_impl.cpp @@ -21,6 +21,7 @@ #include "Format.h" #include "LaTeXFeatures.h" #include "LyXRC.h" +#include "output_xhtml.h" #include "support/Messages.h" @@ -115,6 +116,11 @@ bool LaTeXFeatures::isAvailable(string const &) } +string alignmentToCSS(LyXAlignment) +{ + return string(); +} + // // Keep the linker happy on Windows // -- 2.39.5