X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fsupport%2Fnumpunct_lyx_char_type.h;h=9e4dbe2d75ffade1dc1c2e503444b60d823ded6d;hb=cf14e814124ccbc8155fa1dde98d03be319c0e87;hp=d5b339b7ce1bdb6f6d98adf5ae936fac0cae01bd;hpb=52c51e5485cf9c8e01a32962372a57fd53b3c742;p=lyx.git diff --git a/src/support/numpunct_lyx_char_type.h b/src/support/numpunct_lyx_char_type.h index d5b339b7ce..9e4dbe2d75 100644 --- a/src/support/numpunct_lyx_char_type.h +++ b/src/support/numpunct_lyx_char_type.h @@ -1,59 +1,58 @@ -// -*- C++ -*- -/** - * \file numpunct_lyx_char_type.h - * This file is part of LyX, the document processor. - * Licence details can be found in the file COPYING. - * - * \author Peter Kümmel - * - * Full author contact details are available in file CREDITS. - */ - -#ifndef LYX_NUMPUNCT_LYX_CHAR_TYPE_H -#define LYX_NUMPUNCT_LYX_CHAR_TYPE_H - - -#include - - -namespace std -{ - - template<> - class numpunct : public numpunct - { - public: - - typedef lyx::char_type char_type; - typedef basic_string string_type; - - static locale::id id; - - explicit numpunct(size_t __refs = 0) : numpunct(__refs) - {} - - char_type decimal_point() const - { return numpunct::decimal_point(); } - - char_type thousands_sep() const - { return numpunct::thousands_sep(); } - - string grouping() const - { return numpunct::grouping(); } - - string_type truename() const - { return lyx::from_ascii(numpunct::truename()); } - - string_type falsename() const - { return lyx::from_ascii(numpunct::falsename()); } - - - protected: - virtual ~numpunct(); - - }; - - - -} -#endif +// -*- C++ -*- +/** + * \file numpunct_lyx_char_type.h + * This file is part of LyX, the document processor. + * Licence details can be found in the file COPYING. + * + * \author Peter Kümmel + * + * Full author contact details are available in file CREDITS. + */ + +#ifndef LYX_NUMPUNCT_LYX_CHAR_TYPE_H +#define LYX_NUMPUNCT_LYX_CHAR_TYPE_H + + +#include + + +namespace std +{ + + template<> + class numpunct : public numpunct + { + public: + + typedef lyx::char_type char_type; + typedef basic_string string_type; + + static locale::id id; + + explicit numpunct(size_t __refs = 0) : numpunct(__refs) + {} + + char_type decimal_point() const + { return numpunct::decimal_point(); } + + char_type thousands_sep() const + { return numpunct::thousands_sep(); } + + string grouping() const + { return numpunct::grouping(); } + + // Implementation can be found in docstream.cpp + string_type truename() const; + string_type falsename() const; + + + protected: + virtual ~numpunct(); + + }; + + // Fixed in VC11: + // http://connect.microsoft.com/VisualStudio/feedback/details/572376/msvc10-c-std-numpunct-has-a-hardcoded-dllimport-in-definition + +} // namespace std +#endif