Compare commits

...

4 Commits

Author SHA1 Message Date
Pavel Sanda
2facf6eecc Merged compilation does not exist anymore. 2024-10-04 20:53:26 +02:00
Pavel Sanda
854b53bff5 Document gcc 5 dependency.
https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg223072.html
2024-10-04 20:51:51 +02:00
Pavel Sanda
b8f1f113f3 Remove trivstring.
Needed in times when std:string was not thread-safe,
but should be ok nowadays.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=21334
https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg223068.html
2024-10-04 20:49:55 +02:00
Pavel Sanda
9ccda98e6e Remove strfwd.h.
Will break cygwin due to trivstring header.

https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg223056.html
2024-10-04 20:49:33 +02:00
113 changed files with 115 additions and 641 deletions

View File

@ -53,7 +53,7 @@ Requirements
------------ ------------
First of all, you will need a C++11 standard conforming compiler, like g++ (at First of all, you will need a C++11 standard conforming compiler, like g++ (at
least 4.9, to have proper srd::regex) or clang++. least 5.0, to have proper std::regex & std::string) or clang++.
LyX makes great use of the C++ Standard Library. This means that gcc LyX makes great use of the C++ Standard Library. This means that gcc
users will have to install the relevant libstdc++ library to be able users will have to install the relevant libstdc++ library to be able

4
README
View File

@ -87,8 +87,8 @@ How do I upgrade from an earlier LyX version?
What do I need to compile LyX from the source distribution? What do I need to compile LyX from the source distribution?
* A C++11 compiler. Development is being done mainly with gcc/g++, * A C++11 compiler. Development is being done mainly with gcc/g++,
but clang and MSVC are known to work too. As of LyX 2.4.0, you but clang and MSVC are known to work too. As of LyX 2.5.0, you
need at least gcc 4.9. need at least gcc 5.0.
* The Qt library, at least version 5.2 (5.6 recommended). It is * The Qt library, at least version 5.2 (5.6 recommended). It is
also possible to compile with Qt 6.x. also possible to compile with Qt 6.x.

View File

@ -168,9 +168,4 @@
#define HAVE_MODE_T #define HAVE_MODE_T
#endif #endif
#if defined(_MSC_VER) && (_MSC_VER >= 1600)
#include "support/strfwd.h" // always first, to prevent compiler's interpretation/instantiations of some typedef
#endif
#endif #endif

View File

@ -38,6 +38,8 @@
- The support for (long unmaintained) eLyXer was removed. - The support for (long unmaintained) eLyXer was removed.
- When compiling with GCC, LyX know needs at least version >= 5.
!!Known issues in version 2.5.0 !!Known issues in version 2.5.0

View File

@ -12,7 +12,7 @@
#ifndef BOX_H #ifndef BOX_H
#define BOX_H #define BOX_H
#include "support/strfwd.h" #include <ostream>
namespace lyx { namespace lyx {

View File

@ -16,13 +16,12 @@
#include "OutputEnums.h" #include "OutputEnums.h"
#include "support/unique_ptr.h" #include "support/unique_ptr.h"
#include "support/strfwd.h" #include "support/docstring.h"
#include "support/types.h" #include "support/types.h"
#include <map> #include <map>
#include <list> #include <list>
#include <set> #include <set>
#include <string>
#include <vector> #include <vector>

View File

@ -16,8 +16,6 @@
#include "Encoding.h" #include "Encoding.h"
#include "support/strfwd.h"
namespace lyx { namespace lyx {
class Buffer; class Buffer;

View File

@ -12,8 +12,7 @@
#ifndef BUFFER_LIST_H #ifndef BUFFER_LIST_H
#define BUFFER_LIST_H #define BUFFER_LIST_H
#include "support/strfwd.h" #include <string>
#include <vector> #include <vector>

View File

@ -20,7 +20,6 @@
#include "TexRow.h" #include "TexRow.h"
#include "update_flags.h" #include "update_flags.h"
#include "support/strfwd.h"
#include "support/types.h" #include "support/types.h"
namespace lyx { namespace lyx {

View File

@ -15,7 +15,6 @@
#ifndef CHANGES_H #ifndef CHANGES_H
#define CHANGES_H #define CHANGES_H
#include "support/strfwd.h"
#include "support/types.h" #include "support/types.h"
#include "support/lyxtime.h" #include "support/lyxtime.h"

View File

@ -13,7 +13,6 @@
#define CITATION_H #define CITATION_H
#include "support/docstring.h" #include "support/docstring.h"
#include <string>
#include <vector> #include <vector>
namespace lyx { namespace lyx {

View File

@ -12,10 +12,9 @@
#ifndef CMDDEF_H #ifndef CMDDEF_H
#define CMDDEF_H #define CMDDEF_H
#include "support/strfwd.h"
#include <map> #include <map>
#include <set> #include <set>
#include <string>
namespace lyx { namespace lyx {

View File

@ -21,7 +21,7 @@
#include "ColorCode.h" #include "ColorCode.h"
#include "support/strfwd.h" #include <string>
namespace lyx { namespace lyx {

View File

@ -19,10 +19,10 @@
#ifndef COLORSET_H #ifndef COLORSET_H
#define COLORSET_H #define COLORSET_H
#include "support/docstring.h"
#include "Color.h" #include "Color.h"
#include <map> #include <map>
#include <string>
namespace lyx { namespace lyx {

View File

@ -13,12 +13,11 @@
#define CONVERTER_H #define CONVERTER_H
#include "Graph.h" #include "Graph.h"
#include "support/trivstring.h" #include "support/docstring.h"
#include <memory> #include <memory>
#include <vector> #include <vector>
#include <set> #include <set>
#include <string>
namespace lyx { namespace lyx {

View File

@ -21,7 +21,7 @@
#ifndef CONVERTERCACHE_H #ifndef CONVERTERCACHE_H
#define CONVERTERCACHE_H #define CONVERTERCACHE_H
#include "support/strfwd.h" #include <string>
namespace lyx { namespace lyx {

View File

@ -18,7 +18,6 @@
#define CURSORSLICE_H #define CURSORSLICE_H
#include "support/types.h" #include "support/types.h"
#include "support/strfwd.h"
#include "insets/Inset.h" #include "insets/Inset.h"

View File

@ -17,7 +17,6 @@
#include "Author.h" #include "Author.h"
#include "DocumentClassPtr.h" #include "DocumentClassPtr.h"
#include "support/strfwd.h"
#include "support/types.h" #include "support/types.h"
#include "frontends/Clipboard.h" #include "frontends/Clipboard.h"

View File

@ -14,7 +14,6 @@
#define ENCODING_H #define ENCODING_H
#include "support/docstring.h" #include "support/docstring.h"
#include "support/trivstring.h"
#include "support/types.h" #include "support/types.h"
#include <map> #include <map>

View File

@ -14,8 +14,6 @@
#include "TexRow.h" #include "TexRow.h"
#include "support/strfwd.h"
#include <vector> #include <vector>

View File

@ -12,10 +12,7 @@
#ifndef FLOATING_H #ifndef FLOATING_H
#define FLOATING_H #define FLOATING_H
#include "support/strfwd.h" #include "support/docstring.h"
#include <string>
namespace lyx { namespace lyx {

View File

@ -17,8 +17,6 @@
#include "FontInfo.h" #include "FontInfo.h"
#include "support/strfwd.h"
namespace lyx { namespace lyx {

View File

@ -27,7 +27,6 @@
#include "support/lstrings.h" #include "support/lstrings.h"
#include <algorithm> #include <algorithm>
#include <ostream>
#include <sstream> #include <sstream>
using namespace std; using namespace std;

View File

@ -20,7 +20,7 @@
#include "FontEnums.h" #include "FontEnums.h"
#include "support/Changer.h" #include "support/Changer.h"
#include "support/strfwd.h" #include "support/docstring.h"
namespace lyx { namespace lyx {

View File

@ -12,11 +12,9 @@
#ifndef FORMAT_H #ifndef FORMAT_H
#define FORMAT_H #define FORMAT_H
#include "support/strfwd.h" #include "support/docstring.h"
#include "support/trivstring.h"
#include <vector> #include <vector>
#include <string>
namespace lyx { namespace lyx {

View File

@ -17,8 +17,6 @@
#include "FuncRequest.h" #include "FuncRequest.h"
#include "KeySequence.h" #include "KeySequence.h"
#include "support/strfwd.h"
#include <memory> #include <memory>
#include <vector> #include <vector>

View File

@ -16,7 +16,6 @@
#include "OutputParams.h" #include "OutputParams.h"
#include "support/strfwd.h"
#include "support/FileName.h" #include "support/FileName.h"
#include "support/signals.h" #include "support/signals.h"

View File

@ -16,7 +16,6 @@
#define LANGUAGE_H #define LANGUAGE_H
#include "support/docstring.h" #include "support/docstring.h"
#include "support/trivstring.h"
#include <map> #include <map>
#include <set> #include <set>

View File

@ -22,7 +22,6 @@
#include <map> #include <map>
#include <set> #include <set>
#include <string>
namespace lyx { namespace lyx {

View File

@ -15,8 +15,6 @@
#include "TextClass.h" #include "TextClass.h"
#include "support/strfwd.h"
#include <string> #include <string>
#include <vector> #include <vector>

View File

@ -14,8 +14,7 @@
#ifndef LYX_H #ifndef LYX_H
#define LYX_H #define LYX_H
#include "support/strfwd.h" #include <string>
#include <vector> #include <vector>
namespace lyx { namespace lyx {

View File

@ -22,7 +22,6 @@
#include "update_flags.h" #include "update_flags.h"
#include "support/Length.h" #include "support/Length.h"
#include "support/strfwd.h"
#include "support/userinfo.h" #include "support/userinfo.h"
#include <map> #include <map>

View File

@ -15,8 +15,6 @@
#include "support/docstring.h" #include "support/docstring.h"
#include "support/unique_ptr.h" #include "support/unique_ptr.h"
#include <string>
namespace lyx { namespace lyx {

View File

@ -17,7 +17,6 @@
#include "ColorCode.h" #include "ColorCode.h"
#include "FontInfo.h" #include "FontInfo.h"
#include "support/strfwd.h"
#include "support/Changer.h" #include "support/Changer.h"
#include "insets/Inset.h" #include "insets/Inset.h"

View File

@ -26,7 +26,6 @@
#include "support/lstrings.h" #include "support/lstrings.h"
#include <sstream> #include <sstream>
#include <string>
#include <algorithm> #include <algorithm>
using namespace std; using namespace std;

View File

@ -19,7 +19,6 @@
#include "LayoutEnums.h" #include "LayoutEnums.h"
#include "SpellChecker.h" #include "SpellChecker.h"
#include "support/strfwd.h"
#include "support/types.h" #include "support/types.h"
#include "insets/InsetCode.h" #include "insets/InsetCode.h"

View File

@ -18,7 +18,6 @@
#include "Spacing.h" #include "Spacing.h"
#include "support/types.h" #include "support/types.h"
#include "support/strfwd.h"
#include "support/Length.h" #include "support/Length.h"

View File

@ -12,7 +12,6 @@
#ifndef PERSONAL_WORD_LIST_H #ifndef PERSONAL_WORD_LIST_H
#define PERSONAL_WORD_LIST_H #define PERSONAL_WORD_LIST_H
#include "support/strfwd.h"
#include "support/docstring_list.h" #include "support/docstring_list.h"
#include "support/FileName.h" #include "support/FileName.h"

View File

@ -12,8 +12,6 @@
#ifndef SPACING_H #ifndef SPACING_H
#define SPACING_H #define SPACING_H
#include "support/strfwd.h"
#include <string> #include <string>
namespace lyx { namespace lyx {

View File

@ -13,7 +13,7 @@
#ifndef SPELL_BASE_H #ifndef SPELL_BASE_H
#define SPELL_BASE_H #define SPELL_BASE_H
#include "support/strfwd.h" #include "support/docstring.h"
#include <vector> #include <vector>

View File

@ -12,7 +12,7 @@
#ifndef STATISTICS_H #ifndef STATISTICS_H
#define STATISTICS_H #define STATISTICS_H
#include "support/strfwd.h" #include "support/docstring.h"
#include "support/types.h" #include "support/types.h"
namespace lyx { namespace lyx {

View File

@ -26,7 +26,6 @@
#include <list> #include <list>
#include <map> #include <map>
#include <set> #include <set>
#include <string>
#include <vector> #include <vector>
#ifdef ERROR #ifdef ERROR

View File

@ -13,7 +13,7 @@
#ifndef THESAURUS_H #ifndef THESAURUS_H
#define THESAURUS_H #define THESAURUS_H
#include "support/strfwd.h" #include "support/docstring.h"
#include <map> #include <map>
#include <vector> #include <vector>

View File

@ -21,7 +21,6 @@
#include "Toc.h" #include "Toc.h"
#include "TocBuilder.h" #include "TocBuilder.h"
#include "support/strfwd.h"
#include "support/unique_ptr.h" #include "support/unique_ptr.h"

View File

@ -14,7 +14,7 @@
#include "Toc.h" #include "Toc.h"
#include "support/strfwd.h" #include "support/docstring.h"
#include <stack> #include <stack>

View File

@ -15,7 +15,7 @@
#include "FuncCode.h" #include "FuncCode.h"
#include "update_flags.h" #include "update_flags.h"
#include "support/strfwd.h" #include "support/docstring.h"
#include <functional> #include <functional>

View File

@ -14,8 +14,6 @@
#ifndef BASE_CLIPBOARD_H #ifndef BASE_CLIPBOARD_H
#define BASE_CLIPBOARD_H #define BASE_CLIPBOARD_H
#include "support/strfwd.h"
namespace lyx { namespace lyx {
class Cursor; class Cursor;

View File

@ -12,7 +12,7 @@
#ifndef DELEGATES_H #ifndef DELEGATES_H
#define DELEGATES_H #define DELEGATES_H
#include "support/strfwd.h" #include "support/docstring.h"
namespace lyx { namespace lyx {

View File

@ -12,7 +12,7 @@
#ifndef FONTLOADER_H #ifndef FONTLOADER_H
#define FONTLOADER_H #define FONTLOADER_H
#include "support/strfwd.h" #include "support/docstring.h"
namespace lyx { namespace lyx {

View File

@ -16,7 +16,7 @@
#include "support/mute_warning.h" #include "support/mute_warning.h"
#include "support/strfwd.h" #include "support/docstring.h"
#include <vector> #include <vector>

View File

@ -13,7 +13,7 @@
#ifndef PAINTER_H #ifndef PAINTER_H
#define PAINTER_H #define PAINTER_H
#include "support/strfwd.h" #include "support/docstring.h"
#include "support/types.h" #include "support/types.h"
namespace lyx { namespace lyx {

View File

@ -14,7 +14,7 @@
#ifndef SELECTION_H #ifndef SELECTION_H
#define SELECTION_H #define SELECTION_H
#include "support/strfwd.h" #include "support/docstring.h"
namespace lyx { namespace lyx {
namespace frontend { namespace frontend {

View File

@ -12,7 +12,7 @@
#ifndef LYX_ALERT_H #ifndef LYX_ALERT_H
#define LYX_ALERT_H #define LYX_ALERT_H
#include "support/strfwd.h" #include "support/docstring.h"
namespace lyx { namespace lyx {

View File

@ -17,8 +17,6 @@
#ifndef LYX_CATEGORIZEDCOMBO_H #ifndef LYX_CATEGORIZEDCOMBO_H
#define LYX_CATEGORIZEDCOMBO_H #define LYX_CATEGORIZEDCOMBO_H
#include "support/strfwd.h"
#include <QComboBox> #include <QComboBox>

View File

@ -16,8 +16,6 @@
#include "insets/InsetCode.h" #include "insets/InsetCode.h"
#include "support/strfwd.h"
#include <QString> #include <QString>
class QSettings; class QSettings;

View File

@ -18,7 +18,6 @@
#include "ui_FindAndReplaceUi.h" #include "ui_FindAndReplaceUi.h"
#include "support/docstring.h" #include "support/docstring.h"
#include <string>
namespace lyx { namespace lyx {

View File

@ -49,7 +49,6 @@
#include <algorithm> #include <algorithm>
#include <regex> #include <regex>
#include <string>
#include <vector> #include <vector>
using namespace std; using namespace std;

View File

@ -34,7 +34,6 @@
#include <QScrollBar> #include <QScrollBar>
#include <map> #include <map>
#include <string>
using namespace std; using namespace std;

View File

@ -12,6 +12,8 @@
#ifndef GUIDELIMITERDIALOG_H #ifndef GUIDELIMITERDIALOG_H
#define GUIDELIMITERDIALOG_H #define GUIDELIMITERDIALOG_H
#include "support/docstring.h"
#include "GuiDialog.h" #include "GuiDialog.h"
#include "ui_DelimiterUi.h" #include "ui_DelimiterUi.h"

View File

@ -12,11 +12,12 @@
#ifndef GUISYMBOLSDIALOG_H #ifndef GUISYMBOLSDIALOG_H
#define GUISYMBOLSDIALOG_H #define GUISYMBOLSDIALOG_H
#include "support/docstring.h"
#include "DialogView.h" #include "DialogView.h"
#include "ui_SymbolsUi.h" #include "ui_SymbolsUi.h"
#include <map> #include <map>
#include <string>
#include <vector> #include <vector>
namespace lyx { namespace lyx {

View File

@ -20,8 +20,6 @@
#include <QToolBar> #include <QToolBar>
#include <QToolButton> #include <QToolButton>
#include "support/strfwd.h"
class QSettings; class QSettings;
namespace lyx { namespace lyx {

View File

@ -4437,8 +4437,7 @@ void GuiView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
case LFUN_BUFFER_EXPORT: { case LFUN_BUFFER_EXPORT: {
if (!doc_buffer) if (!doc_buffer)
break; break;
// GCC only sees strfwd.h when building merged if (cmd.argument() == "custom") {
if (::lyx::operator==(cmd.argument(), "custom")) {
// LFUN_MASTER_BUFFER_EXPORT is not enabled for this case, // LFUN_MASTER_BUFFER_EXPORT is not enabled for this case,
// so the following test should not be needed. // so the following test should not be needed.
// In principle, we could try to switch to such a view... // In principle, we could try to switch to such a view...

View File

@ -17,8 +17,6 @@
#include "frontends/Delegates.h" #include "frontends/Delegates.h"
#include "support/strfwd.h"
#include <QMainWindow> #include <QMainWindow>
#include <QLabel> #include <QLabel>
#include <QMenu> #include <QMenu>

View File

@ -12,6 +12,8 @@
#ifndef INSET_PARAMS_DIALOG_H #ifndef INSET_PARAMS_DIALOG_H
#define INSET_PARAMS_DIALOG_H #define INSET_PARAMS_DIALOG_H
#include "support/docstring.h"
#include "DialogView.h" #include "DialogView.h"
#include "ui_InsetParamsUi.h" #include "ui_InsetParamsUi.h"

View File

@ -16,7 +16,7 @@
#include "FuncCode.h" #include "FuncCode.h"
#include "support/strfwd.h" #include "support/docstring.h"
#include <QWidget> #include <QWidget>

View File

@ -16,7 +16,7 @@
#ifndef LYX_LAYOUT_BOX_H #ifndef LYX_LAYOUT_BOX_H
#define LYX_LAYOUT_BOX_H #define LYX_LAYOUT_BOX_H
#include "support/strfwd.h" #include "support/docstring.h"
#include <QComboBox> #include <QComboBox>

View File

@ -15,9 +15,6 @@
#ifndef GRAPHICSTYPES_H #ifndef GRAPHICSTYPES_H
#define GRAPHICSTYPES_H #define GRAPHICSTYPES_H
#include "support/strfwd.h"
namespace lyx { namespace lyx {
namespace graphics { namespace graphics {

View File

@ -12,7 +12,7 @@
#ifndef PREVIEWIMAGE_H #ifndef PREVIEWIMAGE_H
#define PREVIEWIMAGE_H #define PREVIEWIMAGE_H
#include "support/strfwd.h" #include "support/docstring.h"
namespace lyx { namespace lyx {

View File

@ -24,7 +24,6 @@
#include "RowFlags.h" #include "RowFlags.h"
#include "support/docstring.h" #include "support/docstring.h"
#include "support/strfwd.h"
#include "support/types.h" #include "support/types.h"
#include <climits> #include <climits>

View File

@ -18,7 +18,6 @@
#include "support/docstring.h" #include "support/docstring.h"
#include <string>
#include <vector> #include <vector>
#include <map> #include <map>

View File

@ -20,7 +20,6 @@
#include "support/docstring.h" #include "support/docstring.h"
#include <set> #include <set>
#include <string>
namespace lyx { namespace lyx {

View File

@ -16,8 +16,6 @@
#ifndef LYXFIND_H #ifndef LYXFIND_H
#define LYXFIND_H #define LYXFIND_H
#include "support/strfwd.h"
// FIXME // FIXME
#include "support/docstring.h" #include "support/docstring.h"

View File

@ -30,7 +30,6 @@
#include "support/lstrings.h" #include "support/lstrings.h"
#include <algorithm> #include <algorithm>
#include <ostream>
using namespace lyx::support; using namespace lyx::support;

View File

@ -13,7 +13,6 @@
#define MATH_MATRIXINSET_H #define MATH_MATRIXINSET_H
#include "InsetMathGrid.h" #include "InsetMathGrid.h"
#include "support/strfwd.h"
namespace lyx { namespace lyx {

View File

@ -12,7 +12,7 @@
#ifndef MATHAUTOCORRECT_H #ifndef MATHAUTOCORRECT_H
#define MATHAUTOCORRECT_H #define MATHAUTOCORRECT_H
#include "support/strfwd.h" #include "support/docstring.h"
namespace lyx { namespace lyx {

View File

@ -20,8 +20,6 @@
#include "support/docstring.h" #include "support/docstring.h"
#include "support/lassert.h" #include "support/lassert.h"
#include <ostream>
using namespace std; using namespace std;
namespace lyx { namespace lyx {

View File

@ -12,7 +12,7 @@
#ifndef MATH_CLASS_H #ifndef MATH_CLASS_H
#define MATH_CLASS_H #define MATH_CLASS_H
#include "support/strfwd.h" #include "support/docstring.h"
namespace lyx { namespace lyx {

View File

@ -21,8 +21,6 @@
#include "Dimension.h" #include "Dimension.h"
#include "OutputEnums.h" #include "OutputEnums.h"
#include "support/strfwd.h"
#include <cstddef> #include <cstddef>
#include <vector> #include <vector>

View File

@ -12,7 +12,7 @@
#ifndef MATH_EXTERN_H #ifndef MATH_EXTERN_H
#define MATH_EXTERN_H #define MATH_EXTERN_H
#include "support/strfwd.h" #include "support/docstring.h"
namespace lyx { namespace lyx {

View File

@ -14,8 +14,6 @@
#include "MathParser.h" #include "MathParser.h"
#include "support/strfwd.h"
#include <map> #include <map>
namespace lyx { namespace lyx {

View File

@ -25,7 +25,6 @@
#include <algorithm> #include <algorithm>
#include <cstring> #include <cstring>
#include <ostream>
#include <FontInfo.h> #include <FontInfo.h>
using namespace std; using namespace std;

View File

@ -19,7 +19,6 @@
#include "texstream.h" #include "texstream.h"
#include "support/Changer.h" #include "support/Changer.h"
#include "support/strfwd.h"
namespace lyx { namespace lyx {

View File

@ -14,7 +14,7 @@
#define MATH_SUPPORT_H #define MATH_SUPPORT_H
#include "MathParser_flags.h" #include "MathParser_flags.h"
#include "support/strfwd.h" #include "support/docstring.h"
namespace lyx { namespace lyx {

View File

@ -28,7 +28,6 @@
#include "ParagraphList.h" #include "ParagraphList.h"
#include "support/docstream.h" #include "support/docstream.h"
#include "support/strfwd.h"
#include "xml.h" #include "xml.h"
namespace lyx { namespace lyx {

View File

@ -12,7 +12,7 @@
#ifndef OUTPUT_PLAINTEXT_H #ifndef OUTPUT_PLAINTEXT_H
#define OUTPUT_PLAINTEXT_H #define OUTPUT_PLAINTEXT_H
#include "support/strfwd.h" #include "support/docstring.h"
#include "support/types.h" #include "support/types.h"
#include <climits> #include <climits>

View File

@ -14,7 +14,6 @@
#include "LayoutEnums.h" #include "LayoutEnums.h"
#include "support/strfwd.h"
#include "xml.h" #include "xml.h"

View File

@ -11,7 +11,7 @@
#ifndef CONSOLEAPPLICATION_H #ifndef CONSOLEAPPLICATION_H
#define CONSOLEAPPLICATION_H #define CONSOLEAPPLICATION_H
#include "support/strfwd.h" #include <string>
namespace lyx { namespace lyx {

View File

@ -13,7 +13,6 @@
#define FILENAME_H #define FILENAME_H
#include "support/os.h" #include "support/os.h"
#include "support/strfwd.h"
#include <ctime> #include <ctime>
#include <set> #include <set>

View File

@ -15,7 +15,7 @@
#define FORKEDCALLS_H #define FORKEDCALLS_H
#include "support/signals.h" #include "support/signals.h"
#include "support/strfwd.h" #include "support/docstring.h"
#ifdef HAVE_SYS_TYPES_H #ifdef HAVE_SYS_TYPES_H
# include <sys/types.h> # include <sys/types.h>

View File

@ -15,7 +15,7 @@
#ifndef LENGTH_H #ifndef LENGTH_H
#define LENGTH_H #define LENGTH_H
#include "support/strfwd.h" #include "support/docstring.h"
namespace lyx { namespace lyx {

View File

@ -17,8 +17,7 @@
#ifndef LEXER_H #ifndef LEXER_H
#define LEXER_H #define LEXER_H
#include "support/strfwd.h" #include "support/docstring.h"
#include <string>
namespace lyx { namespace lyx {

View File

@ -106,7 +106,6 @@ liblyxsupport_a_SOURCES = \
signals.h \ signals.h \
socktools.cpp \ socktools.cpp \
socktools.h \ socktools.h \
strfwd.h \
Systemcall.cpp \ Systemcall.cpp \
Systemcall.h \ Systemcall.h \
SystemcallPrivate.h \ SystemcallPrivate.h \
@ -116,8 +115,6 @@ liblyxsupport_a_SOURCES = \
Translator.h \ Translator.h \
Timeout.cpp \ Timeout.cpp \
Timeout.h \ Timeout.h \
trivstring.cpp \
trivstring.h \
types.h \ types.h \
unique_ptr.h \ unique_ptr.h \
userinfo.cpp \ userinfo.cpp \

View File

@ -14,7 +14,6 @@
#include "support/docstring.h" #include "support/docstring.h"
#include <map> #include <map>
#include <string>
namespace lyx { namespace lyx {

View File

@ -12,7 +12,7 @@
#ifndef LYX_SUPPORT_PROGRESSINTERFACE_H #ifndef LYX_SUPPORT_PROGRESSINTERFACE_H
#define LYX_SUPPORT_PROGRESSINTERFACE_H #define LYX_SUPPORT_PROGRESSINTERFACE_H
#include "support/strfwd.h" #include "support/docstring.h"
class QString; class QString;

View File

@ -15,8 +15,6 @@
#ifndef SYSTEMCALL_H #ifndef SYSTEMCALL_H
#define SYSTEMCALL_H #define SYSTEMCALL_H
#include "strfwd.h"
namespace lyx { namespace lyx {
namespace support { namespace support {

View File

@ -14,7 +14,6 @@
#include "support/convert.h" #include "support/convert.h"
#include "support/docstring.h" #include "support/docstring.h"
#include <string>
#include <sstream> #include <sstream>
//needed for Mac OSX 10.5.2 Leopard //needed for Mac OSX 10.5.2 Leopard
#include <cstdlib> #include <cstdlib>

View File

@ -16,7 +16,7 @@
#ifndef CONVERT_H #ifndef CONVERT_H
#define CONVERT_H #define CONVERT_H
#include "support/strfwd.h" #include "support/docstring.h"
namespace lyx { namespace lyx {

View File

@ -17,7 +17,7 @@
#ifndef COUNTER_REPS_H #ifndef COUNTER_REPS_H
#define COUNTER_REPS_H #define COUNTER_REPS_H
#include "support/strfwd.h" #include "support/docstring.h"
namespace lyx { namespace lyx {

View File

@ -15,7 +15,7 @@
#ifndef LYXDEBUG_H #ifndef LYXDEBUG_H
#define LYXDEBUG_H #define LYXDEBUG_H
#include "support/strfwd.h" #include "support/docstring.h"
// Forward definitions do not work with libc++ // Forward definitions do not work with libc++
// but ios_base has already been defined in strfwd // but ios_base has already been defined in strfwd

View File

@ -13,12 +13,68 @@
#ifndef LYX_DOCSTRING_H #ifndef LYX_DOCSTRING_H
#define LYX_DOCSTRING_H #define LYX_DOCSTRING_H
#include "support/strfwd.h" #ifdef USE_WCHAR_T
// Prefer this if possible because GNU libstdc++ has usable
// std::ctype<wchar_t> locale facets but not
// std::ctype<boost::uint32_t>. gcc older than 3.4 is also missing
// usable std::char_traits<boost::uint32_t>.
namespace lyx { typedef wchar_t char_type; }
#else
#include <cstdint>
#if defined(_MSC_VER) && (_MSC_VER >= 1600)
namespace lyx { typedef uint32_t char_type; }
#include "support/numpunct_lyx_char_type.h" // implementation for our char_type needed
#else
namespace lyx { typedef std::uint32_t char_type; }
#endif
#endif
#include <string> #include <string>
namespace lyx { namespace lyx {
/**
* String type for storing the main text in UCS4 encoding.
* Use std::string only in cases 7-bit ASCII is to be manipulated
* within the variable.
*/
typedef std::basic_string<char_type, std::char_traits<char_type>,
std::allocator<char_type> > docstring;
/// Base class for UCS4 input streams
typedef std::basic_istream<char_type, std::char_traits<char_type> > idocstream;
/// Base class for UCS4 output streams
typedef std::basic_ostream<char_type, std::char_traits<char_type> > odocstream;
/// UCS4 output stringstream
typedef std::basic_ostringstream<char_type, std::char_traits<char_type>, std::allocator<char_type> > odocstringstream;
#if ! defined(USE_WCHAR_T)
extern odocstream & operator<<(odocstream &, char);
#endif
// defined in lstrings.cpp
docstring const & empty_docstring();
std::string const & empty_string();
// defined in docstring.cpp
bool operator==(docstring const &, char const *);
//trivstring signalizes thread-safety request; should not be needed for any
//C++11 conformant std::basic_string, e.g. GCC >= 5.
//Once properly tested we can ditch these two in favour of std::string/docstring.
typedef std::string trivstring;
typedef docstring trivdocstring;
} // namespace lyx
namespace lyx {
/// Creates a docstring from a C string of ASCII characters /// Creates a docstring from a C string of ASCII characters
docstring const from_ascii(char const *); docstring const from_ascii(char const *);

Some files were not shown because too many files have changed in this diff Show More