X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fsupport%2Fnumpunct_lyx_char_type.h;h=6ef22e61e4f7f375fb2b0720af4fb3cbb60526c7;hb=dae8555234f0e5c8358b91c307d91b219c664617;hp=9dbdeb2c168a0c7d014da236d024d2795f77b109;hpb=e948caf63779f24f49b7b3e64932368710f1e582;p=lyx.git diff --git a/src/support/numpunct_lyx_char_type.h b/src/support/numpunct_lyx_char_type.h index 9dbdeb2c16..6ef22e61e4 100644 --- a/src/support/numpunct_lyx_char_type.h +++ b/src/support/numpunct_lyx_char_type.h @@ -1,64 +1,60 @@ -// -*- 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 locale::facet - { - public: - - typedef lyx::char_type char_type; - typedef basic_string string_type; - - - static locale::id id; - - explicit numpunct(size_t __refs = 0) : chared(__refs) - {} - - char_type decimal_point() const - { return chared.decimal_point(); } - - char_type thousands_sep() const - { return chared.thousands_sep(); } - - string grouping() const - { return chared.grouping(); } - - string_type truename() const - { return lyx::from_ascii(chared.truename()); } - - string_type falsename() const - { return lyx::from_ascii(chared.falsename()); } - - - protected: - virtual ~numpunct(); - - - private: - numpunct chared; - - }; - - - -} -#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(); } + + string_type truename() const + { return lyx::from_ascii(numpunct::truename()); } + + string_type falsename() const + { return lyx::from_ascii(numpunct::falsename()); } + + + protected: + virtual ~numpunct(); + + }; + + // Fixed in VC11: + // http://connect.microsoft.com/VisualStudio/feedback/details/572376/msvc10-c-std-numpunct-has-a-hardcoded-dllimport-in-definition + +} +#endif