diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000..51a1fc9aba --- /dev/null +++ b/.gitattributes @@ -0,0 +1,3 @@ +# configure.ac needs to have unix line ends on windows, see #10053 +configure.ac eol=lf + diff --git a/3rdparty/Makefile.am b/3rdparty/Makefile.am index 40eb64367a..c32db865b8 100644 --- a/3rdparty/Makefile.am +++ b/3rdparty/Makefile.am @@ -6,4 +6,16 @@ if USE_INCLUDED_BOOST BOOST = boost endif -SUBDIRS = $(BOOST) +if USE_INCLUDED_HUNSPELL +HUNSPELL = hunspell +endif + +if USE_INCLUDED_ICONV +ICONV = libiconv +endif + +if USE_INCLUDED_ZLIB +ZLIB = zlib +endif + +SUBDIRS = $(BOOST) $(HUNSPELL) $(ICONV) $(ZLIB) diff --git a/3rdparty/boost/boost/format.hpp b/3rdparty/boost/boost/format.hpp deleted file mode 100644 index 73464a819f..0000000000 --- a/3rdparty/boost/boost/format.hpp +++ /dev/null @@ -1,59 +0,0 @@ -// ---------------------------------------------------------------------------- -// format.hpp : primary header -// ---------------------------------------------------------------------------- - -// Copyright Samuel Krempp 2003. Use, modification, and distribution are -// subject to the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/libs/format for library home page - - -// ---------------------------------------------------------------------------- - -#ifndef BOOST_FORMAT_HPP -#define BOOST_FORMAT_HPP - -#include -#include -#include -#include - -#ifndef BOOST_NO_STD_LOCALE -#include -#endif - -// *** Compatibility framework -#include - -#ifdef BOOST_NO_LOCALE_ISIDIGIT -#include // we'll use the non-locale 's std::isdigit(int) -#endif - -// **** Forward declarations ---------------------------------- -#include // basic_format, and other frontends -#include // misc forward declarations for internal use - -// **** Auxiliary structs (stream_format_state , and format_item ) -#include - -// **** Format class interface -------------------------------- -#include - -// **** Exceptions ----------------------------------------------- -#include - -// **** Implementation ------------------------------------------- -#include // member functions -#include // class for grouping arguments -#include // argument-feeding functions -#include // format-string parsing (member-)functions - -// **** Implementation of the free functions ---------------------- -#include - - -// *** Undefine 'local' macros : -#include - -#endif // BOOST_FORMAT_HPP diff --git a/3rdparty/boost/boost/format/alt_sstream.hpp b/3rdparty/boost/boost/format/alt_sstream.hpp deleted file mode 100644 index e236be3526..0000000000 --- a/3rdparty/boost/boost/format/alt_sstream.hpp +++ /dev/null @@ -1,176 +0,0 @@ -// ---------------------------------------------------------------------------- -// alt_sstream.hpp : alternative stringstream -// ---------------------------------------------------------------------------- - -// Copyright Samuel Krempp 2003. Use, modification, and distribution are -// subject to the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/libs/format for library home page - -// ---------------------------------------------------------------------------- - - - -#ifndef BOOST_SK_ALT_SSTREAM_HPP -#define BOOST_SK_ALT_SSTREAM_HPP - -#include -#include -#include -#include -#include - -namespace boost { - namespace io { - - template, - class Alloc=::std::allocator > - class basic_altstringbuf; - - template, - class Alloc=::std::allocator > - class basic_oaltstringstream; - - - template - class basic_altstringbuf - : public ::std::basic_streambuf - { - typedef ::std::basic_streambuf streambuf_t; - typedef typename CompatAlloc::compatible_type compat_allocator_type; - typedef typename CompatTraits::compatible_type compat_traits_type; - public: - typedef Ch char_type; - typedef Tr traits_type; - typedef typename compat_traits_type::int_type int_type; - typedef typename compat_traits_type::pos_type pos_type; - typedef typename compat_traits_type::off_type off_type; - typedef Alloc allocator_type; - typedef ::std::basic_string string_type; - typedef typename string_type::size_type size_type; - - typedef ::std::streamsize streamsize; - - - explicit basic_altstringbuf(std::ios_base::openmode mode - = std::ios_base::in | std::ios_base::out) - : putend_(NULL), is_allocated_(false), mode_(mode) - {} - explicit basic_altstringbuf(const string_type& s, - ::std::ios_base::openmode mode - = ::std::ios_base::in | ::std::ios_base::out) - : putend_(NULL), is_allocated_(false), mode_(mode) - { dealloc(); str(s); } - virtual ~basic_altstringbuf() - { dealloc(); } - using streambuf_t::pbase; - using streambuf_t::pptr; - using streambuf_t::epptr; - using streambuf_t::eback; - using streambuf_t::gptr; - using streambuf_t::egptr; - - void clear_buffer(); - void str(const string_type& s); - - // 0-copy access : - Ch * begin() const; - size_type size() const; - size_type cur_size() const; // stop at current pointer - Ch * pend() const // the highest position reached by pptr() since creation - { return ((putend_ < pptr()) ? pptr() : putend_); } - size_type pcount() const - { return static_cast( pptr() - pbase()) ;} - - // copy buffer to string : - string_type str() const - { return string_type(begin(), size()); } - string_type cur_str() const - { return string_type(begin(), cur_size()); } - protected: - explicit basic_altstringbuf (basic_altstringbuf * s, - ::std::ios_base::openmode mode - = ::std::ios_base::in | ::std::ios_base::out) - : putend_(NULL), is_allocated_(false), mode_(mode) - { dealloc(); str(s); } - - virtual pos_type seekoff(off_type off, ::std::ios_base::seekdir way, - ::std::ios_base::openmode which - = ::std::ios_base::in | ::std::ios_base::out); - virtual pos_type seekpos (pos_type pos, - ::std::ios_base::openmode which - = ::std::ios_base::in | ::std::ios_base::out); - virtual int_type underflow(); - virtual int_type pbackfail(int_type meta = compat_traits_type::eof()); - virtual int_type overflow(int_type meta = compat_traits_type::eof()); - void dealloc(); - private: - enum { alloc_min = 256}; // minimum size of allocations - - Ch *putend_; // remembers (over seeks) the highest value of pptr() - bool is_allocated_; - ::std::ios_base::openmode mode_; - compat_allocator_type alloc_; // the allocator object - }; - - -// --- class basic_oaltstringstream ---------------------------------------- - template - class basic_oaltstringstream - : private base_from_member< shared_ptr< basic_altstringbuf< Ch, Tr, Alloc> > >, - public ::std::basic_ostream - { - class No_Op { - // used as no-op deleter for (not-owner) shared_pointers - public: - template - const T & operator()(const T & arg) { return arg; } - }; - typedef ::std::basic_ostream stream_t; - typedef boost::base_from_member > > - pbase_type; - typedef ::std::basic_string string_type; - typedef typename string_type::size_type size_type; - typedef basic_altstringbuf stringbuf_t; - public: - typedef Alloc allocator_type; - basic_oaltstringstream() - : pbase_type(new stringbuf_t), stream_t(rdbuf()) - { } - basic_oaltstringstream(::boost::shared_ptr buf) - : pbase_type(buf), stream_t(rdbuf()) - { } - basic_oaltstringstream(stringbuf_t * buf) - : pbase_type(buf, No_Op() ), stream_t(rdbuf()) - { } - stringbuf_t * rdbuf() const - { return pbase_type::member.get(); } - void clear_buffer() - { rdbuf()->clear_buffer(); } - - // 0-copy access : - Ch * begin() const - { return rdbuf()->begin(); } - size_type size() const - { return rdbuf()->size(); } - size_type cur_size() const // stops at current position - { return rdbuf()->cur_size(); } - - // copy buffer to string : - string_type str() const // [pbase, epptr[ - { return rdbuf()->str(); } - string_type cur_str() const // [pbase, pptr[ - { return rdbuf()->cur_str(); } - void str(const string_type& s) - { rdbuf()->str(s); } - }; - - } // N.S. io -} // N.S. boost - -#include - -#endif // include guard - diff --git a/3rdparty/boost/boost/format/alt_sstream_impl.hpp b/3rdparty/boost/boost/format/alt_sstream_impl.hpp deleted file mode 100644 index 9975e4f96b..0000000000 --- a/3rdparty/boost/boost/format/alt_sstream_impl.hpp +++ /dev/null @@ -1,313 +0,0 @@ -// ---------------------------------------------------------------------------- -// alt_sstream_impl.hpp : alternative stringstream, templates implementation -// ---------------------------------------------------------------------------- - -// Copyright Samuel Krempp 2003. Use, modification, and distribution are -// subject to the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/libs/format for library home page - -// ---------------------------------------------------------------------------- - -#ifndef BOOST_SK_ALT_SSTREAM_IMPL_HPP -#define BOOST_SK_ALT_SSTREAM_IMPL_HPP - -namespace boost { - namespace io { -// --- Implementation ------------------------------------------------------// - - template - void basic_altstringbuf:: - clear_buffer () { - const Ch * p = pptr(); - const Ch * b = pbase(); - if(p != NULL && p != b) { - seekpos(0, ::std::ios_base::out); - } - p = gptr(); - b = eback(); - if(p != NULL && p != b) { - seekpos(0, ::std::ios_base::in); - } - } - - template - void basic_altstringbuf:: - str (const string_type& s) { - size_type sz=s.size(); - if(sz != 0 && mode_ & (::std::ios_base::in | ::std::ios_base::out) ) { -#ifdef _RWSTD_NO_CLASS_PARTIAL_SPEC - void *vd_ptr = alloc_.allocate(sz, is_allocated_? eback() : 0); - Ch *new_ptr = static_cast(vd_ptr); -#else - Ch *new_ptr = alloc_.allocate(sz, is_allocated_? eback() : 0); -#endif - // if this didnt throw, we're safe, update the buffer - dealloc(); - sz = s.copy(new_ptr, sz); - putend_ = new_ptr + sz; - if(mode_ & ::std::ios_base::in) - streambuf_t::setg(new_ptr, new_ptr, new_ptr + sz); - if(mode_ & ::std::ios_base::out) { - streambuf_t::setp(new_ptr, new_ptr + sz); - if(mode_ & (::std::ios_base::app | ::std::ios_base::ate)) - streambuf_t::pbump(static_cast(sz)); - if(gptr() == NULL) - streambuf_t::setg(new_ptr, NULL, new_ptr); - } - is_allocated_ = true; - } - else - dealloc(); - } - template - Ch* basic_altstringbuf:: - begin () const { - if(mode_ & ::std::ios_base::out && pptr() != NULL) - return pbase(); - else if(mode_ & ::std::ios_base::in && gptr() != NULL) - return eback(); - return NULL; - } - - template - typename std::basic_string::size_type - basic_altstringbuf:: - size () const { - if(mode_ & ::std::ios_base::out && pptr()) - return static_cast(pend() - pbase()); - else if(mode_ & ::std::ios_base::in && gptr()) - return static_cast(egptr() - eback()); - else - return 0; - } - - template - typename std::basic_string::size_type - basic_altstringbuf:: - cur_size () const { - if(mode_ & ::std::ios_base::out && pptr()) - return static_cast( pptr() - pbase()); - else if(mode_ & ::std::ios_base::in && gptr()) - return static_cast( gptr() - eback()); - else - return 0; - } - - template - typename basic_altstringbuf::pos_type - basic_altstringbuf:: - seekoff (off_type off, ::std::ios_base::seekdir way, ::std::ios_base::openmode which) { - if(pptr() != NULL && putend_ < pptr()) - putend_ = pptr(); - if(which & ::std::ios_base::in && gptr() != NULL) { - // get area - if(way == ::std::ios_base::end) - off += static_cast(putend_ - gptr()); - else if(way == ::std::ios_base::beg) - off += static_cast(eback() - gptr()); - else if(way != ::std::ios_base::cur || (which & ::std::ios_base::out) ) - // (altering in&out is only supported if way is beg or end, not cur) - return pos_type(off_type(-1)); - if(eback() <= off+gptr() && off+gptr() <= putend_ ) { - // set gptr - streambuf_t::gbump(static_cast(off)); - if(which & ::std::ios_base::out && pptr() != NULL) - // update pptr to match gptr - streambuf_t::pbump(static_cast(gptr()-pptr())); - } - else - off = off_type(-1); - } - else if(which & ::std::ios_base::out && pptr() != NULL) { - // put area - if(way == ::std::ios_base::end) - off += static_cast(putend_ - pptr()); - else if(way == ::std::ios_base::beg) - off += static_cast(pbase() - pptr()); - else if(way != ::std::ios_base::beg) - return pos_type(off_type(-1)); - if(pbase() <= off+pptr() && off+pptr() <= putend_) - // set pptr - streambuf_t::pbump(static_cast(off)); - else - off = off_type(-1); - } - else // neither in nor out - off = off_type(-1); - return (pos_type(off)); - } - //- end seekoff(..) - - - template - typename basic_altstringbuf::pos_type - basic_altstringbuf:: - seekpos (pos_type pos, ::std::ios_base::openmode which) { - off_type off = off_type(pos); // operation guaranteed by 27.4.3.2 table 88 - if(pptr() != NULL && putend_ < pptr()) - putend_ = pptr(); - if(off != off_type(-1)) { - if(which & ::std::ios_base::in && gptr() != NULL) { - // get area - if(0 <= off && off <= putend_ - eback()) { - streambuf_t::gbump(static_cast(eback() - gptr() + off)); - if(which & ::std::ios_base::out && pptr() != NULL) { - // update pptr to match gptr - streambuf_t::pbump(static_cast(gptr()-pptr())); - } - } - else - off = off_type(-1); - } - else if(which & ::std::ios_base::out && pptr() != NULL) { - // put area - if(0 <= off && off <= putend_ - eback()) - streambuf_t::pbump(static_cast(eback() - pptr() + off)); - else - off = off_type(-1); - } - else // neither in nor out - off = off_type(-1); - return (pos_type(off)); - } - else { - BOOST_ASSERT(0); // §27.4.3.2 allows undefined-behaviour here - return pos_type(off_type(-1)); - } - } - // -end seekpos(..) - - - template - typename basic_altstringbuf::int_type - basic_altstringbuf:: - underflow () { - if(gptr() == NULL) // no get area -> nothing to get. - return (compat_traits_type::eof()); - else if(gptr() < egptr()) // ok, in buffer - return (compat_traits_type::to_int_type(*gptr())); - else if(mode_ & ::std::ios_base::in && pptr() != NULL - && (gptr() < pptr() || gptr() < putend_) ) - { // expand get area - if(putend_ < pptr()) - putend_ = pptr(); // remember pptr reached this far - streambuf_t::setg(eback(), gptr(), putend_); - return (compat_traits_type::to_int_type(*gptr())); - } - else // couldnt get anything. EOF. - return (compat_traits_type::eof()); - } - // -end underflow(..) - - - template - typename basic_altstringbuf::int_type - basic_altstringbuf:: - pbackfail (int_type meta) { - if(gptr() != NULL && (eback() < gptr()) - && (mode_ & (::std::ios_base::out) - || compat_traits_type::eq_int_type(compat_traits_type::eof(), meta) - || compat_traits_type::eq(compat_traits_type::to_char_type(meta), gptr()[-1]) ) ) { - streambuf_t::gbump(-1); // back one character - if(!compat_traits_type::eq_int_type(compat_traits_type::eof(), meta)) - // put-back meta into get area - *gptr() = compat_traits_type::to_char_type(meta); - return (compat_traits_type::not_eof(meta)); - } - else - return (compat_traits_type::eof()); // failed putback - } - // -end pbackfail(..) - - - template - typename basic_altstringbuf::int_type - basic_altstringbuf:: - overflow (int_type meta) { -#ifdef BOOST_MSVC -#pragma warning(push) -#pragma warning(disable:4996) -#endif - if(compat_traits_type::eq_int_type(compat_traits_type::eof(), meta)) - return compat_traits_type::not_eof(meta); // nothing to do - else if(pptr() != NULL && pptr() < epptr()) { - streambuf_t::sputc(compat_traits_type::to_char_type(meta)); - return meta; - } - else if(! (mode_ & ::std::ios_base::out)) - // no write position, and cant make one - return compat_traits_type::eof(); - else { // make a write position available - std::size_t prev_size = pptr() == NULL ? 0 : epptr() - eback(); - std::size_t new_size = prev_size; - // exponential growth : size *= 1.5 - std::size_t add_size = new_size / 2; - if(add_size < alloc_min) - add_size = alloc_min; - Ch * newptr = NULL, *oldptr = eback(); - - // make sure adding add_size wont overflow size_t - while (0 < add_size && ((std::numeric_limits::max)() - - add_size < new_size) ) - add_size /= 2; - if(0 < add_size) { - new_size += add_size; -#ifdef _RWSTD_NO_CLASS_PARTIAL_SPEC - void *vdptr = alloc_.allocate(new_size, is_allocated_? oldptr : 0); - newptr = static_cast(vdptr); -#else - newptr = alloc_.allocate(new_size, is_allocated_? oldptr : 0); -#endif - } - - if(0 < prev_size) - compat_traits_type::copy(newptr, oldptr, prev_size); - if(is_allocated_) - alloc_.deallocate(oldptr, prev_size); - is_allocated_=true; - - if(prev_size == 0) { // first allocation - putend_ = newptr; - streambuf_t::setp(newptr, newptr + new_size); - if(mode_ & ::std::ios_base::in) - streambuf_t::setg(newptr, newptr, newptr + 1); - else - streambuf_t::setg(newptr, 0, newptr); - } - else { // update pointers - putend_ = putend_ - oldptr + newptr; - int pptr_count = static_cast(pptr()-pbase()); - int gptr_count = static_cast(gptr()-eback()); - streambuf_t::setp(pbase() - oldptr + newptr, newptr + new_size); - streambuf_t::pbump(pptr_count); - if(mode_ & ::std::ios_base::in) - streambuf_t::setg(newptr, newptr + gptr_count, pptr() + 1); - else - streambuf_t::setg(newptr, 0, newptr); - } - streambuf_t::sputc(compat_traits_type::to_char_type(meta)); - return meta; - } -#ifdef BOOST_MSVC -#pragma warning(pop) -#endif - } - // -end overflow(..) - - template - void basic_altstringbuf:: dealloc() { - if(is_allocated_) - alloc_.deallocate(eback(), (pptr() != NULL ? epptr() : egptr()) - eback()); - is_allocated_ = false; - streambuf_t::setg(0, 0, 0); - streambuf_t::setp(0, 0); - putend_ = NULL; - } - - }// N.S. io -} // N.S. boost - -#endif // include guard - diff --git a/3rdparty/boost/boost/format/detail/compat_workarounds.hpp b/3rdparty/boost/boost/format/detail/compat_workarounds.hpp deleted file mode 100644 index 8e51514f3e..0000000000 --- a/3rdparty/boost/boost/format/detail/compat_workarounds.hpp +++ /dev/null @@ -1,86 +0,0 @@ -// ---------------------------------------------------------------------------- -// compat_workarounds : general framework for non-conformance workarounds -// ---------------------------------------------------------------------------- - -// Copyright Samuel Krempp 2003. Use, modification, and distribution are -// subject to the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// see http://www.boost.org/libs/format for library home page - -// ---------------------------------------------------------------------------- - - -// this file defines wrapper classes to hide non-conforming -// std::char_traits<> and std::allocator<> traits -// and Includes : config_macros.hpp (defines config macros -// and compiler-specific switches) - -// Non-conformant Std-libs fail to supply conformant traits (std::char_traits, -// std::allocator) and/or the std::string doesnt support them. -// We don't want to have hundreds of #ifdef workarounds, so we define -// replacement traits. -// But both char_traits and allocator traits are visible in the interface, -// (inside the final string type), thus we need to keep both -// the replacement type (typedefed to 'compatible_type') for real use, -// and the original stdlib type (typedef to 'type_for_string') for interface -// visibility. This is what Compat* classes do (as well as be transparent -// when good allocator and char traits are present) - -#ifndef BOOST_FORMAT_COMPAT_WORKAROUNDS_HPP -#define BOOST_FORMAT_COMPAT_WORKAROUNDS_HPP - -namespace boost { - namespace io { - - // gcc-2.95 char traits (non-conformantly named string_char_traits) - // lack several functions so we extend them in a replacement class. - template - class CompatTraits; - - // std::allocator in gcc-2.95 is ok, but basic_string only works - // with plain 'std::alloc' still, alt_stringbuf requires a functionnal - // alloc template argument, so we need a replacement allocator - template - class CompatAlloc; - } // N.S. io -}// N.S. boost - - -#include - // sets-up macros and load compiler-specific workarounds headers. - -#if !defined(BOOST_FORMAT_STREAMBUF_DEFINED) -// workarounds-gcc-2.95 might have defined own streambuf -#include -#endif - -#if !defined(BOOST_FORMAT_OSTREAM_DEFINED) -// workarounds-gcc-2.95 might already have included -#include -#endif - - - -namespace boost { - namespace io { - - // **** CompatTraits general definitions : ---------------------------- - template - class CompatTraits - { // general case : be transparent - public: - typedef Tr compatible_type; - }; - - // **** CompatAlloc general definitions : ----------------------------- - template - class CompatAlloc - { // general case : be transparent - public: - typedef Alloc compatible_type; - }; - - } //N.S. io -} // N.S. boost -#endif // include guard diff --git a/3rdparty/boost/boost/format/detail/config_macros.hpp b/3rdparty/boost/boost/format/detail/config_macros.hpp deleted file mode 100644 index 44d1e86c63..0000000000 --- a/3rdparty/boost/boost/format/detail/config_macros.hpp +++ /dev/null @@ -1,95 +0,0 @@ -// -*- C++ -*- -// ---------------------------------------------------------------------------- -// config_macros.hpp : configuration macros for the format library -// only BOOST_IO_STD is absolutely needed (it should be 'std::' in general) -// others are compiler-specific workaround macros used in #ifdef switches -// ---------------------------------------------------------------------------- - -// Copyright Samuel Krempp 2003. Use, modification, and distribution are -// subject to the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// see http://www.boost.org/libs/format for library home page - - -// ---------------------------------------------------------------------------- - -#ifndef BOOST_FORMAT_CONFIG_MACROS_HPP -#define BOOST_FORMAT_CONFIG_MACROS_HPP - -#include -#include - -// make sure our local macros wont override something : -#if defined(BOOST_NO_LOCALE_ISDIGIT) || defined(BOOST_OVERLOAD_FOR_NON_CONST) \ - || defined(BOOST_IO_STD) || defined( BOOST_IO_NEEDS_USING_DECLARATION ) \ - || defined(BOOST_NO_TEMPLATE_STD_STREAM) \ - || defined(BOOST_FORMAT_STREAMBUF_DEFINED) || defined(BOOST_FORMAT_OSTREAM_DEFINED) -#error "boost::format uses a local macro that is already defined." -#endif - -// specific workarounds. each header can define BOOS_IO_STD if it -// needs. (e.g. because of IO_NEEDS_USING_DECLARATION) -#include -#include - -#ifndef BOOST_IO_STD -# define BOOST_IO_STD ::std:: -#endif - -#if defined(BOOST_NO_STD_LOCALE) || \ - ( BOOST_WORKAROUND(__BORLANDC__, <= 0x564) \ - || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT( 0x570 ) ) ) -// some future __BORLANDC__ >0x564 versions might not need this -// 0x570 is Borland's kylix branch -#define BOOST_NO_LOCALE_ISDIGIT -#endif - -#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570) ) || BOOST_WORKAROUND( BOOST_MSVC, BOOST_TESTED_AT(1300)) -#define BOOST_NO_OVERLOAD_FOR_NON_CONST -#endif - -// **** Workaround for io streams, stlport and msvc. -#ifdef BOOST_IO_NEEDS_USING_DECLARATION -namespace boost { - using std::char_traits; - using std::basic_ostream; - namespace io { - using std::basic_ostream; - namespace detail { - using std::basic_ios; - using std::basic_ostream; - } - } -#if ! defined(BOOST_NO_STD_LOCALE) - using std::locale; - namespace io { - using std::locale; - namespace detail { - using std::locale; - } - } -#endif // locale -} - // -end N.S. boost -#endif // needs_using_declaration - -#if ! defined(BOOST_NO_STD_LOCALE) -#include -#endif - - -// *** hide std::locale if it doesnt exist. -// this typedef is either std::locale or int, avoids placing ifdefs everywhere -namespace boost { namespace io { namespace detail { -#if ! defined(BOOST_NO_STD_LOCALE) - typedef BOOST_IO_STD locale locale_t; -#else - typedef int locale_t; -#endif -} } } - - -// ---------------------------------------------------------------------------- - -#endif // BOOST_FORMAT_MACROS_DEFAULT_HPP diff --git a/3rdparty/boost/boost/format/detail/msvc_disambiguater.hpp b/3rdparty/boost/boost/format/detail/msvc_disambiguater.hpp deleted file mode 100644 index c2692c4435..0000000000 --- a/3rdparty/boost/boost/format/detail/msvc_disambiguater.hpp +++ /dev/null @@ -1,54 +0,0 @@ -// ---------------------------------------------------------------------------- -// msvc_disambiguater.hpp : msvc workarounds. (for put_{head|last} overloads) -// the trick was described in boost's list by Aleksey Gurtovoy -// ---------------------------------------------------------------------------- - -// Copyright Samuel Krempp 2003. Use, modification, and distribution are -// subject to the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// see http://www.boost.org/libs/format for library home page - -// ---------------------------------------------------------------------------- - -#ifndef BOOST_MSVC_DISAMBIGUATER_HPP -#define BOOST_MSVC_DISAMBIGUATER_HPP - -#if BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590042)) - -#include -#include - -namespace boost { -namespace io { -namespace detail { - -template< class Ch, class Tr, class T > -struct disambiguater -{ - template< typename U > - static void put_head(BOOST_IO_STD basic_ostream& os, group1 const& x, long) - { - os << group_head(x.a1_); - } - static void put_head(BOOST_IO_STD basic_ostream& os, T const& x, int) - { - } - template< typename U > - static void put_last(BOOST_IO_STD basic_ostream& os, group1 const& x, long) - { - os << group_last(x.a1_); - } - static void put_last(BOOST_IO_STD basic_ostream& os, T const& x, int) - { - os << x; - } -}; - -} // namespace detail -} // namespace io -} // namespace boost - -#endif // -__DECCXX_VER - -#endif // -BOOST_MSVC_DISAMBIGUATER_HPP diff --git a/3rdparty/boost/boost/format/detail/unset_macros.hpp b/3rdparty/boost/boost/format/detail/unset_macros.hpp deleted file mode 100644 index b3ac47b42b..0000000000 --- a/3rdparty/boost/boost/format/detail/unset_macros.hpp +++ /dev/null @@ -1,34 +0,0 @@ -// ---------------------------------------------------------------------------- -// unset_macros.hpp -// ---------------------------------------------------------------------------- - -// Copyright Samuel Krempp 2003. Use, modification, and distribution are -// subject to the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/libs/format for library home page - -// ---------------------------------------------------------------------------- - -// *** Undefine 'local' macros : -#ifdef BOOST_NO_OVERLOAD_FOR_NON_CONST -#undef BOOST_NO_OVERLOAD_FOR_NON_CONST -#endif -#ifdef BOOST_NO_LOCALE_ISDIGIT -#undef BOOST_NO_LOCALE_ISDIGIT -#endif -#ifdef BOOST_IO_STD -#undef BOOST_IO_STD -#endif -#ifdef BOOST_IO_NEEDS_USING_DECLARATION -#undef BOOST_IO_NEEDS_USING_DECLARATION -#endif -#ifdef BOOST_NO_TEMPLATE_STD_STREAM -#undef BOOST_NO_TEMPLATE_STD_STREAM -#endif -#ifdef BOOST_FORMAT_STREAMBUF_DEFINED -#undef BOOST_FORMAT_STREAMBUF_DEFINED -#endif -#ifdef BOOST_FORMAT_OSTREAM_DEFINED -#undef BOOST_FORMAT_OSTREAM_DEFINED -#endif diff --git a/3rdparty/boost/boost/format/detail/workarounds_gcc-2_95.hpp b/3rdparty/boost/boost/format/detail/workarounds_gcc-2_95.hpp deleted file mode 100644 index 8c49d42d02..0000000000 --- a/3rdparty/boost/boost/format/detail/workarounds_gcc-2_95.hpp +++ /dev/null @@ -1,162 +0,0 @@ -// ---------------------------------------------------------------------------- -// workarounds for gcc < 3.0. -// ---------------------------------------------------------------------------- - -// Copyright Samuel Krempp 2003. Use, modification, and distribution are -// subject to the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/libs/format for library home page - - -// ---------------------------------------------------------------------------- - -// There's a lot to do, the stdlib shipped with gcc prior to 3.x -// was terribly non-conforming. -// . defines macros switches -// . supplies template classes basic_foo where gcc only supplies foo. -// i.e : -// - basic_ios from ios -// - basic_ostream from ostream -// - basic_srteambuf from streambuf -// these can be used transparently. (it obviously does not work for wchar_t) -// . specialise CompatAlloc and CompatTraits to wrap gcc-2.95's -// string_char_traits and std::alloc - -#if BOOST_WORKAROUND(__GNUC__, < 3) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) - // only for gcc-2.95's native stdlib - -#ifndef BOOST_FORMAT_WORKAROUNDS_GCC295_H -#define BOOST_FORMAT_WORKAROUNDS_GCC295_H - -// SGI STL doesnt have and others, so we need iostream. -#include -#define BOOST_FORMAT_OSTREAM_DEFINED - -#include -#define BOOST_FORMAT_STREAMBUF_DEFINED - -#define BOOST_NO_TEMPLATE_STD_STREAM - -#ifndef BOOST_IO_STD -# define BOOST_IO_STD std:: -#endif - - - -// *** -// gcc's simple classes turned into standard-like template classes : - -namespace std { - - - // gcc has string_char_traits, it's incomplete. - // we declare a std::char_traits, and specialize CompatTraits<..> on it - // to do what is required - template - class char_traits; // no definition here, we will just use it as a tag. - - template - class basic_streambuf; - - template - class basic_streambuf : public streambuf { - }; - - template > - class basic_ios; - - template - class basic_ios : public ostream { - public: - basic_ios(streambuf * p) : ostream(p) {}; - char fill() const { return ios::fill(); } // gcc returns wchar.. - char fill(char c) { return ios::fill(c); } // gcc takes wchar.. - char widen(char c) { return c; } - char narrow(char c, char def) { return c; } - basic_ios& copyfmt(const ios& right) { - fill(right.fill()); - flags(right.flags() ); - exceptions(right.exceptions()); - width(right.width()); - precision(right.precision()); - return *this; - } - }; - - - typedef ios ios_base; - - template - class basic_ostream; - - template - class basic_ostream : public basic_ios - { - public: - basic_ostream(streambuf * p) : basic_ios (p) {} - }; - -} // namespace std - - -namespace boost { - namespace io { - - - // ** CompatTraits gcc2.95 specialisations ---------------------------- - template - class CompatTraits< ::std::string_char_traits > - : public ::std::string_char_traits - { - public: - typedef CompatTraits compatible_type; - - typedef Ch char_type; - typedef int int_type; - typedef ::std::streampos pos_type; - typedef ::std::streamoff off_type; - - static char_type - to_char_type(const int_type& meta) { - return static_cast(meta); } - static int_type - to_int_type(const char_type& ch) { - return static_cast(static_cast(ch) );} - static bool - eq_int_type(const int_type& left, const int_type& right) { - return left == right; } - static int_type - eof() { - return static_cast(EOF); - } - static int_type - not_eof(const int_type& meta) { - return (meta == eof()) ? 0 : meta; - } - }; - - template - class CompatTraits< ::std::char_traits > { - public: - typedef CompatTraits< ::std::string_char_traits > compatible_type; - }; - - // ** CompatAlloc gcc-2.95 specialisations --------------------------- - template<> - class CompatAlloc< ::std::alloc> - { - public: - typedef ::std::allocator compatible_type; - }; - - } // N.S. io -} // N.S. boost - - - - - -#endif // include guard - -#endif // if workaround diff --git a/3rdparty/boost/boost/format/detail/workarounds_stlport.hpp b/3rdparty/boost/boost/format/detail/workarounds_stlport.hpp deleted file mode 100644 index 5d435b98a0..0000000000 --- a/3rdparty/boost/boost/format/detail/workarounds_stlport.hpp +++ /dev/null @@ -1,36 +0,0 @@ -// ---------------------------------------------------------------------------- -// workarounds_stlport.hpp : workaround STLport issues -// ---------------------------------------------------------------------------- - -// Copyright Samuel Krempp 2003. Use, modification, and distribution are -// subject to the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// see http://www.boost.org/libs/format for library home page - -// ---------------------------------------------------------------------------- - -#ifndef BOOST_MACROS_STLPORT_HPP -#define BOOST_MACROS_STLPORT_HPP - -// *** This should go to "boost/config/stdlib/stlport.hpp". - -// If the streams are not native and there are problems with using templates -// accross namespaces, we define some macros to enable a workaround for this. - -// STLport 4.5 -#if !defined(_STLP_OWN_IOSTREAMS) && defined(_STLP_USE_NAMESPACES) && defined(BOOST_NO_USING_TEMPLATE) -# define BOOST_IO_STD -# define BOOST_IO_NEEDS_USING_DECLARATION -#endif - -// STLport 4.0 -#if !defined(__SGI_STL_OWN_IOSTREAMS) && defined(__STL_USE_OWN_NAMESPACE) && defined(BOOST_NO_USING_TEMPLATE) -# define BOOST_IO_STD -# define BOOST_IO_NEEDS_USING_DECLARATION -#endif - - -// ---------------------------------------------------------------------------- - -#endif // BOOST_MACROS_STLPORT_HPP diff --git a/3rdparty/boost/boost/format/exceptions.hpp b/3rdparty/boost/boost/format/exceptions.hpp deleted file mode 100644 index 56ee30dce0..0000000000 --- a/3rdparty/boost/boost/format/exceptions.hpp +++ /dev/null @@ -1,103 +0,0 @@ -// ---------------------------------------------------------------------------- -// boost/format/exceptions.hpp -// ---------------------------------------------------------------------------- - -// Copyright Samuel Krempp 2003. -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// -// See http://www.boost.org/libs/format/ for library home page - -// ---------------------------------------------------------------------------- - -#ifndef BOOST_FORMAT_EXCEPTIONS_HPP -#define BOOST_FORMAT_EXCEPTIONS_HPP - - -#include - - -namespace boost { - - namespace io { - -// **** exceptions ----------------------------------------------- - - class format_error : public std::exception - { - public: - format_error() {} - virtual const char *what() const throw() { - return "boost::format_error: " - "format generic failure"; - } - }; - - class bad_format_string : public format_error - { - std::size_t pos_, next_; - public: - bad_format_string(std::size_t pos, std::size_t size) - : pos_(pos), next_(size) {} - std::size_t get_pos() const { return pos_; } - std::size_t get_next() const { return next_; } - virtual const char *what() const throw() { - return "boost::bad_format_string: format-string is ill-formed"; - } - }; - - class too_few_args : public format_error - { - std::size_t cur_, expected_; - public: - too_few_args(std::size_t cur, std::size_t expected) - : cur_(cur), expected_(expected) {} - std::size_t get_cur() const { return cur_; } - std::size_t get_expected() const { return expected_; } - virtual const char *what() const throw() { - return "boost::too_few_args: " - "format-string referred to more arguments than were passed"; - } - }; - - class too_many_args : public format_error - { - std::size_t cur_, expected_; - public: - too_many_args(std::size_t cur, std::size_t expected) - : cur_(cur), expected_(expected) {} - std::size_t get_cur() const { return cur_; } - std::size_t get_expected() const { return expected_; } - virtual const char *what() const throw() { - return "boost::too_many_args: " - "format-string referred to fewer arguments than were passed"; - } - }; - - - class out_of_range : public format_error - { - int index_, beg_, end_; // range is [ beg, end [ - public: - out_of_range(int index, int beg, int end) - : index_(index), beg_(beg), end_(end) {} - int get_index() const { return index_; } - int get_beg() const { return beg_; } - int get_end() const { return end_; } - virtual const char *what() const throw() { - return "boost::out_of_range: " - "tried to refer to an argument (or item) number which" - " is out of range, according to the format string"; - } - }; - - - } // namespace io - -} // namespace boost - - -#endif // BOOST_FORMAT_EXCEPTIONS_HPP diff --git a/3rdparty/boost/boost/format/feed_args.hpp b/3rdparty/boost/boost/format/feed_args.hpp deleted file mode 100644 index fa45d215d8..0000000000 --- a/3rdparty/boost/boost/format/feed_args.hpp +++ /dev/null @@ -1,319 +0,0 @@ -// ---------------------------------------------------------------------------- -// feed_args.hpp : functions for processing each argument -// (feed, feed_manip, and distribute) -// ---------------------------------------------------------------------------- - -// Copyright Samuel Krempp 2003. Use, modification, and distribution are -// subject to the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/libs/format for library home page - -// ---------------------------------------------------------------------------- - -#ifndef BOOST_FORMAT_FEED_ARGS_HPP -#define BOOST_FORMAT_FEED_ARGS_HPP - -#include -#include -#include - -#include -#include -#include - -namespace boost { -namespace io { -namespace detail { - - template - void mk_str( std::basic_string & res, - const Ch * beg, - typename std::basic_string::size_type size, - std::streamsize w, - const Ch fill_char, - std::ios_base::fmtflags f, - const Ch prefix_space, // 0 if no space-padding - bool center) - // applies centered/left/right padding to the string [beg, beg+size[ - // Effects : the result is placed in res. - { - typedef typename std::basic_string::size_type size_type; - res.resize(0); - if(w<=0 || static_cast(w) <=size) { - // no need to pad. - res.reserve(size + !!prefix_space); - if(prefix_space) - res.append(1, prefix_space); - if (size) - res.append(beg, size); - } - else { - std::streamsize n=static_cast(w-size-!!prefix_space); - std::streamsize n_after = 0, n_before = 0; - res.reserve(static_cast(w)); // allocate once for the 2 inserts - if(center) - n_after = n/2, n_before = n - n_after; - else - if(f & std::ios_base::left) - n_after = n; - else - n_before = n; - // now make the res string : - if(n_before) res.append(static_cast(n_before), fill_char); - if(prefix_space) - res.append(1, prefix_space); - if (size) - res.append(beg, size); - if(n_after) res.append(static_cast(n_after), fill_char); - } - } // -mk_str(..) - - -#if BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590042)) -// __DECCXX needs to be tricked to disambiguate this simple overload.. -// the trick is in "boost/format/msvc_disambiguater.hpp" - - template< class Ch, class Tr, class T> inline - void put_head (BOOST_IO_STD basic_ostream & os, const T& x ) { - disambiguater::put_head(os, x, 1L); - } - template< class Ch, class Tr, class T> inline - void put_last (BOOST_IO_STD basic_ostream & os, const T& x ) { - disambiguater::put_last(os, x, 1L); - } - -#else - - template< class Ch, class Tr, class T> inline - void put_head (BOOST_IO_STD basic_ostream &, const T& ) { - } - - template< class Ch, class Tr, class T> inline - void put_head( BOOST_IO_STD basic_ostream & os, const group1& x ) { - os << group_head(x.a1_); // send the first N-1 items, not the last - } - - template< class Ch, class Tr, class T> inline - void put_last( BOOST_IO_STD basic_ostream & os, const T& x ) { - os << x ; - } - - template< class Ch, class Tr, class T> inline - void put_last( BOOST_IO_STD basic_ostream & os, const group1& x ) { - os << group_last(x.a1_); // this selects the last element - } - -#ifndef BOOST_NO_OVERLOAD_FOR_NON_CONST - template< class Ch, class Tr, class T> inline - void put_head( BOOST_IO_STD basic_ostream &, T& ) { - } - - template< class Ch, class Tr, class T> inline - void put_last( BOOST_IO_STD basic_ostream & os, T& x) { - os << x ; - } -#endif -#endif // -__DECCXX workaround - - template< class Ch, class Tr, class T> - void call_put_head(BOOST_IO_STD basic_ostream & os, const void* x) { - put_head(os, *(typename ::boost::remove_reference::type*)x); - } - - template< class Ch, class Tr, class T> - void call_put_last(BOOST_IO_STD basic_ostream & os, const void* x) { - put_last(os, *(T*)x); - } - - template< class Ch, class Tr> - struct put_holder { - template - put_holder(T& t) - : arg(&t), - put_head(&call_put_head), - put_last(&call_put_last) - {} - const void* arg; - void (*put_head)(BOOST_IO_STD basic_ostream & os, const void* x); - void (*put_last)(BOOST_IO_STD basic_ostream & os, const void* x); - }; - - template< class Ch, class Tr> inline - void put_head( BOOST_IO_STD basic_ostream & os, const put_holder& t) { - t.put_head(os, t.arg); - } - - template< class Ch, class Tr> inline - void put_last( BOOST_IO_STD basic_ostream & os, const put_holder& t) { - t.put_last(os, t.arg); - } - - - template< class Ch, class Tr, class Alloc, class T> - void put( T x, - const format_item& specs, - typename basic_format::string_type& res, - typename basic_format::internal_streambuf_t & buf, - io::detail::locale_t *loc_p = NULL) - { -#ifdef BOOST_MSVC - // If std::min or std::max are already instantiated - // at this point then we get a blizzard of warning messages when we call - // those templates with std::size_t as arguments. Weird and very annoyning... -#pragma warning(push) -#pragma warning(disable:4267) -#endif - // does the actual conversion of x, with given params, into a string - // using the supplied stringbuf. - - typedef typename basic_format::string_type string_type; - typedef typename basic_format::format_item_t format_item_t; - typedef typename string_type::size_type size_type; - - basic_oaltstringstream oss( &buf); - - if(loc_p != NULL) - oss.imbue(*loc_p); - - specs.fmtstate_.apply_on(oss, loc_p); - - // the stream format state can be modified by manipulators in the argument : - put_head( oss, x ); - // in case x is a group, apply the manip part of it, - // in order to find width - - const std::ios_base::fmtflags fl=oss.flags(); - const bool internal = (fl & std::ios_base::internal) != 0; - const std::streamsize w = oss.width(); - const bool two_stepped_padding= internal && (w!=0); - - res.resize(0); - if(! two_stepped_padding) { - if(w>0) // handle padding via mk_str, not natively in stream - oss.width(0); - put_last( oss, x); - const Ch * res_beg = buf.pbase(); - Ch prefix_space = 0; - if(specs.pad_scheme_ & format_item_t::spacepad) - if(buf.pcount()== 0 || - (res_beg[0] !=oss.widen('+') && res_beg[0] !=oss.widen('-') )) - prefix_space = oss.widen(' '); - size_type res_size = (std::min)( - static_cast(specs.truncate_ - !!prefix_space), - buf.pcount() ); - mk_str(res, res_beg, res_size, w, oss.fill(), fl, - prefix_space, (specs.pad_scheme_ & format_item_t::centered) !=0 ); - } - else { // 2-stepped padding - // internal can be implied by zeropad, or user-set. - // left, right, and centered alignment overrule internal, - // but spacepad or truncate might be mixed with internal (using manipulator) - put_last( oss, x); // may pad - const Ch * res_beg = buf.pbase(); - size_type res_size = buf.pcount(); - bool prefix_space=false; - if(specs.pad_scheme_ & format_item_t::spacepad) - if(buf.pcount()== 0 || - (res_beg[0] !=oss.widen('+') && res_beg[0] !=oss.widen('-') )) - prefix_space = true; - if(res_size == static_cast(w) && w<=specs.truncate_ && !prefix_space) { - // okay, only one thing was printed and padded, so res is fine - res.assign(res_beg, res_size); - } - else { // length w exceeded - // either it was multi-output with first output padding up all width.. - // either it was one big arg and we are fine. - // Note that res_size oss2( &buf); - specs.fmtstate_.apply_on(oss2, loc_p); - put_head( oss2, x ); - - oss2.width(0); - if(prefix_space) - oss2 << ' '; - put_last(oss2, x ); - if(buf.pcount()==0 && specs.pad_scheme_ & format_item_t::spacepad) { - prefix_space =true; - oss2 << ' '; - } - // we now have the minimal-length output - const Ch * tmp_beg = buf.pbase(); - size_type tmp_size = (std::min)(static_cast(specs.truncate_), - buf.pcount() ); - - - if(static_cast(w) <= tmp_size) { - // minimal length is already >= w, so no padding (cool!) - res.assign(tmp_beg, tmp_size); - } - else { // hum.. we need to pad (multi_output, or spacepad present) - //find where we should pad - size_type sz = (std::min)(res_size + (prefix_space ? 1 : 0), tmp_size); - size_type i = prefix_space; - for(; i=tmp_size) i=prefix_space; - res.assign(tmp_beg, i); - std::streamsize d = w - static_cast(tmp_size); - BOOST_ASSERT(d>0); - res.append(static_cast( d ), oss2.fill()); - res.append(tmp_beg+i, tmp_size-i); - BOOST_ASSERT(i+(tmp_size-i)+(std::max)(d,(std::streamsize)0) - == static_cast(w)); - BOOST_ASSERT(res.size() == static_cast(w)); - } - } - } - buf.clear_buffer(); -#ifdef BOOST_MSVC -#pragma warning(pop) -#endif - } // end- put(..) - - - template< class Ch, class Tr, class Alloc, class T> - void distribute (basic_format& self, T x) { - // call put(x, ..) on every occurrence of the current argument : - if(self.cur_arg_ >= self.num_args_) { - if( self.exceptions() & too_many_args_bit ) - boost::throw_exception(too_many_args(self.cur_arg_, self.num_args_)); - else return; - } - for(unsigned long i=0; i < self.items_.size(); ++i) { - if(self.items_[i].argN_ == self.cur_arg_) { - put (x, self.items_[i], self.items_[i].res_, - self.buf_, boost::get_pointer(self.loc_) ); - } - } - } - - template - basic_format& - feed_impl (basic_format& self, T x) { - if(self.dumped_) self.clear(); - distribute (self, x); - ++self.cur_arg_; - if(self.bound_.size() != 0) { - while( self.cur_arg_ < self.num_args_ && self.bound_[self.cur_arg_] ) - ++self.cur_arg_; - } - return self; - } - - template inline - basic_format& - feed (basic_format& self, T x) { - return feed_impl&>(self, put_holder(x)); - } - -} // namespace detail -} // namespace io -} // namespace boost - - -#endif // BOOST_FORMAT_FEED_ARGS_HPP diff --git a/3rdparty/boost/boost/format/format_class.hpp b/3rdparty/boost/boost/format/format_class.hpp deleted file mode 100644 index 2ac59ef280..0000000000 --- a/3rdparty/boost/boost/format/format_class.hpp +++ /dev/null @@ -1,168 +0,0 @@ -// ---------------------------------------------------------------------------- -// format_class.hpp : class interface -// ---------------------------------------------------------------------------- - -// Copyright Samuel Krempp 2003. Use, modification, and distribution are -// subject to the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/libs/format for library home page - -// ---------------------------------------------------------------------------- - -#ifndef BOOST_FORMAT_CLASS_HPP -#define BOOST_FORMAT_CLASS_HPP - - -#include -#include - -#include // to store locale when needed - -#include -#include -#include -#include - -namespace boost { - - template - class basic_format - { - typedef typename io::CompatTraits::compatible_type compat_traits; - public: - typedef Ch CharT; // borland fails in operator% if we use Ch and Tr directly - typedef std::basic_string string_type; - typedef typename string_type::size_type size_type; - typedef io::detail::format_item format_item_t; - typedef io::basic_altstringbuf internal_streambuf_t; - - - explicit basic_format(const Ch* str=NULL); - explicit basic_format(const string_type& s); - basic_format(const basic_format& x); - basic_format& operator= (const basic_format& x); - void swap(basic_format& x); - -#if !defined(BOOST_NO_STD_LOCALE) - explicit basic_format(const Ch* str, const std::locale & loc); - explicit basic_format(const string_type& s, const std::locale & loc); -#endif - io::detail::locale_t getloc() const; - - basic_format& clear(); // empty all converted string buffers (except bound items) - basic_format& clear_binds(); // unbind all bound items, and call clear() - basic_format& parse(const string_type&); // resets buffers and parse a new format string - - // ** formatted result ** // - size_type size() const; // sum of the current string pieces sizes - string_type str() const; // final string - - // ** arguments passing ** // - template - basic_format& operator%(const T& x) - { return io::detail::feed(*this,x); } - -#ifndef BOOST_NO_OVERLOAD_FOR_NON_CONST - template basic_format& operator%(T& x) - { return io::detail::feed(*this,x); } -#endif - -#if defined(__GNUC__) - // GCC can't handle anonymous enums without some help - // ** arguments passing ** // - basic_format& operator%(const int& x) - { return io::detail::feed(*this,x); } - -#ifndef BOOST_NO_OVERLOAD_FOR_NON_CONST - basic_format& operator%(int& x) - { return io::detail::feed(*this,x); } -#endif -#endif - - // The total number of arguments expected to be passed to the format objectt - int expected_args() const - { return num_args_; } - // The number of arguments currently bound (see bind_arg(..) ) - int bound_args() const; - // The number of arguments currently fed to the format object - int fed_args() const; - // The index (1-based) of the current argument (i.e. next to be formatted) - int cur_arg() const; - // The number of arguments still required to be fed - int remaining_args() const; // same as expected_args() - bound_args() - fed_args() - - - // ** object modifying **// - template - basic_format& bind_arg(int argN, const T& val) - { return io::detail::bind_arg_body(*this, argN, val); } - basic_format& clear_bind(int argN); - template - basic_format& modify_item(int itemN, T manipulator) - { return io::detail::modify_item_body (*this, itemN, manipulator);} - - // Choosing which errors will throw exceptions : - unsigned char exceptions() const; - unsigned char exceptions(unsigned char newexcept); - -#if !defined( BOOST_NO_MEMBER_TEMPLATE_FRIENDS ) \ - && !BOOST_WORKAROUND(__BORLANDC__, <= 0x570) \ - && !BOOST_WORKAROUND( _CRAYC, != 0) \ - && !BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590042)) - // use friend templates and private members only if supported - -#ifndef BOOST_NO_TEMPLATE_STD_STREAM - template - friend std::basic_ostream & - operator<<( std::basic_ostream & , - const basic_format& ); -#else - template - friend std::ostream & - operator<<( std::ostream & , - const basic_format& ); -#endif - - template - friend basic_format& - io::detail::feed_impl (basic_format&, T); - - template friend - void io::detail::distribute (basic_format&, T); - - template friend - basic_format& - io::detail::modify_item_body (basic_format&, int, T); - - template friend - basic_format& - io::detail::bind_arg_body (basic_format&, int, const T&); - - private: -#endif - typedef io::detail::stream_format_state stream_format_state; - // flag bits, used for style_ - enum style_values { ordered = 1, // set only if all directives are positional - special_needs = 4 }; - - void make_or_reuse_data(std::size_t nbitems);// used for (re-)initialisation - - // member data --------------------------------------------// - std::vector items_; // each '%..' directive leads to a format_item - std::vector bound_; // stores which arguments were bound. size() == 0 || num_args - - int style_; // style of format-string : positional or not, etc - int cur_arg_; // keep track of wich argument is current - int num_args_; // number of expected arguments - mutable bool dumped_; // true only after call to str() or << - string_type prefix_; // piece of string to insert before first item - unsigned char exceptions_; - internal_streambuf_t buf_; // the internal stream buffer. - boost::optional loc_; - }; // class basic_format - -} // namespace boost - - -#endif // BOOST_FORMAT_CLASS_HPP diff --git a/3rdparty/boost/boost/format/format_fwd.hpp b/3rdparty/boost/boost/format/format_fwd.hpp deleted file mode 100644 index 16b8565468..0000000000 --- a/3rdparty/boost/boost/format/format_fwd.hpp +++ /dev/null @@ -1,43 +0,0 @@ -// ---------------------------------------------------------------------------- -// format_fwd.hpp : forward declarations -// ---------------------------------------------------------------------------- - -// Copyright Samuel Krempp 2003. Use, modification, and distribution are -// subject to the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/libs/format for library home page - -// ---------------------------------------------------------------------------- - -#ifndef BOOST_FORMAT_FWD_HPP -#define BOOST_FORMAT_FWD_HPP - -#include -#include - -#include - -namespace boost { - - template , class Alloc = std::allocator > - class basic_format; - - typedef basic_format format; - -#if !defined(BOOST_NO_STD_WSTRING) && !defined(BOOST_NO_STD_WSTREAMBUF) - typedef basic_format wformat; -#endif - - namespace io { - enum format_error_bits { bad_format_string_bit = 1, - too_few_args_bit = 2, too_many_args_bit = 4, - out_of_range_bit = 8, - all_error_bits = 255, no_error_bits=0 }; - - } // namespace io - -} // namespace boost - -#endif // BOOST_FORMAT_FWD_HPP diff --git a/3rdparty/boost/boost/format/format_implementation.hpp b/3rdparty/boost/boost/format/format_implementation.hpp deleted file mode 100644 index 2abb5c4b03..0000000000 --- a/3rdparty/boost/boost/format/format_implementation.hpp +++ /dev/null @@ -1,329 +0,0 @@ -// ---------------------------------------------------------------------------- -// format_implementation.hpp Implementation of the basic_format class -// ---------------------------------------------------------------------------- - -// Copyright Samuel Krempp 2003. Use, modification, and distribution are -// subject to the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/libs/format for library home page - - -// ---------------------------------------------------------------------------- - -#ifndef BOOST_FORMAT_IMPLEMENTATION_HPP -#define BOOST_FORMAT_IMPLEMENTATION_HPP - -#include -#include -#include -#include -#include // std::swap - -namespace boost { - -// --- basic_format implementation -----------------------------------------// - - template< class Ch, class Tr, class Alloc> - basic_format:: basic_format(const Ch* s) - : style_(0), cur_arg_(0), num_args_(0), dumped_(false), - exceptions_(io::all_error_bits) - { - if( s) - parse( s ); - } - -#if !defined(BOOST_NO_STD_LOCALE) - template< class Ch, class Tr, class Alloc> - basic_format:: basic_format(const Ch* s, const std::locale & loc) - : style_(0), cur_arg_(0), num_args_(0), dumped_(false), - exceptions_(io::all_error_bits), loc_(loc) - { - if(s) parse( s ); - } - - template< class Ch, class Tr, class Alloc> - basic_format:: basic_format(const string_type& s, const std::locale & loc) - : style_(0), cur_arg_(0), num_args_(0), dumped_(false), - exceptions_(io::all_error_bits), loc_(loc) - { - parse(s); - } -#endif // ! BOOST_NO_STD_LOCALE - template< class Ch, class Tr, class Alloc> - io::detail::locale_t basic_format:: - getloc() const { - return loc_ ? loc_.get() : io::detail::locale_t(); - } - - template< class Ch, class Tr, class Alloc> - basic_format:: basic_format(const string_type& s) - : style_(0), cur_arg_(0), num_args_(0), dumped_(false), - exceptions_(io::all_error_bits) - { - parse(s); - } - - template< class Ch, class Tr, class Alloc> // just don't copy the buf_ member - basic_format:: basic_format(const basic_format& x) - : items_(x.items_), bound_(x.bound_), style_(x.style_), - cur_arg_(x.cur_arg_), num_args_(x.num_args_), dumped_(x.dumped_), - prefix_(x.prefix_), exceptions_(x.exceptions_), loc_(x.loc_) - { - } - - template< class Ch, class Tr, class Alloc> // just don't copy the buf_ member - basic_format& basic_format:: - operator= (const basic_format& x) { - if(this == &x) - return *this; - (basic_format(x)).swap(*this); - return *this; - } - template< class Ch, class Tr, class Alloc> - void basic_format:: - swap (basic_format & x) { - std::swap(exceptions_, x.exceptions_); - std::swap(style_, x.style_); - std::swap(cur_arg_, x.cur_arg_); - std::swap(num_args_, x.num_args_); - std::swap(dumped_, x.dumped_); - - items_.swap(x.items_); - prefix_.swap(x.prefix_); - bound_.swap(x.bound_); - } - - template< class Ch, class Tr, class Alloc> - unsigned char basic_format:: exceptions() const { - return exceptions_; - } - - template< class Ch, class Tr, class Alloc> - unsigned char basic_format:: exceptions(unsigned char newexcept) { - unsigned char swp = exceptions_; - exceptions_ = newexcept; - return swp; - } - - template - void basic_format:: - make_or_reuse_data (std::size_t nbitems) { -#if !defined(BOOST_NO_STD_LOCALE) - Ch fill = ( BOOST_USE_FACET(std::ctype, getloc()) ). widen(' '); -#else - Ch fill = ' '; -#endif - if(items_.size() == 0) - items_.assign( nbitems, format_item_t(fill) ); - else { - if(nbitems>items_.size()) - items_.resize(nbitems, format_item_t(fill)); - bound_.resize(0); - for(std::size_t i=0; i < nbitems; ++i) - items_[i].reset(fill); // strings are resized, instead of reallocated - } - prefix_.resize(0); - } - - template< class Ch, class Tr, class Alloc> - basic_format& basic_format:: - clear () { - // empty the string buffers (except bound arguments) - // and make the format object ready for formatting a new set of arguments - - BOOST_ASSERT( bound_.size()==0 || num_args_ == static_cast(bound_.size()) ); - - for(unsigned long i=0; i - basic_format& basic_format:: - clear_binds () { - // remove all binds, then clear() - bound_.resize(0); - clear(); - return *this; - } - - template< class Ch, class Tr, class Alloc> - basic_format& basic_format:: - clear_bind (int argN) { - // remove the bind of ONE argument then clear() - if(argN<1 || argN > num_args_ || bound_.size()==0 || !bound_[argN-1] ) { - if( exceptions() & io::out_of_range_bit) - boost::throw_exception(io::out_of_range(argN, 1, num_args_+1 ) ); - else return *this; - } - bound_[argN-1]=false; - clear(); - return *this; - } - - template< class Ch, class Tr, class Alloc> - int basic_format:: - bound_args() const { - if(bound_.size()==0) - return 0; - int n=0; - for(int i=0; i - int basic_format:: - fed_args() const { - if(bound_.size()==0) - return cur_arg_; - int n=0; - for(int i=0; i - int basic_format:: - cur_arg() const { - return cur_arg_+1; } - - template< class Ch, class Tr, class Alloc> - int basic_format:: - remaining_args() const { - if(bound_.size()==0) - return num_args_-cur_arg_; - int n=0; - for(int i=cur_arg_; i - typename basic_format::string_type - basic_format:: - str () const { - if(items_.size()==0) - return prefix_; - if( cur_arg_ < num_args_) - if( exceptions() & io::too_few_args_bit ) - // not enough variables supplied - boost::throw_exception(io::too_few_args(cur_arg_, num_args_)); - - unsigned long i; - string_type res; - res.reserve(size()); - res += prefix_; - for(i=0; i < items_.size(); ++i) { - const format_item_t& item = items_[i]; - res += item.res_; - if( item.argN_ == format_item_t::argN_tabulation) { - BOOST_ASSERT( item.pad_scheme_ & format_item_t::tabulation); - if( static_cast(item.fmtstate_.width_) > res.size() ) - res.append( static_cast(item.fmtstate_.width_) - res.size(), - item.fmtstate_.fill_ ); - } - res += item.appendix_; - } - dumped_=true; - return res; - } - template< class Ch, class Tr, class Alloc> - typename std::basic_string::size_type basic_format:: - size () const { -#ifdef BOOST_MSVC - // If std::min or std::max are already instantiated - // at this point then we get a blizzard of warning messages when we call - // those templates with std::size_t as arguments. Weird and very annoyning... -#pragma warning(push) -#pragma warning(disable:4267) -#endif - BOOST_USING_STD_MAX(); - size_type sz = prefix_.size(); - unsigned long i; - for(i=0; i < items_.size(); ++i) { - const format_item_t& item = items_[i]; - sz += item.res_.size(); - if( item.argN_ == format_item_t::argN_tabulation) - sz = max BOOST_PREVENT_MACRO_SUBSTITUTION (sz, - static_cast(item.fmtstate_.width_) ); - sz += item.appendix_.size(); - } - return sz; -#ifdef BOOST_MSVC -#pragma warning(pop) -#endif - } - -namespace io { -namespace detail { - - template - basic_format& - bind_arg_body (basic_format& self, int argN, const T& val) { - // bind one argument to a fixed value - // this is persistent over clear() calls, thus also over str() and << - if(self.dumped_) - self.clear(); // needed because we will modify cur_arg_ - if(argN<1 || argN > self.num_args_) { - if( self.exceptions() & io::out_of_range_bit ) - boost::throw_exception(io::out_of_range(argN, 1, self.num_args_+1 ) ); - else return self; - } - if(self.bound_.size()==0) - self.bound_.assign(self.num_args_,false); - else - BOOST_ASSERT( self.num_args_ == static_cast(self.bound_.size()) ); - int o_cur_arg = self.cur_arg_; - self.cur_arg_ = argN-1; // arrays begin at 0 - - self.bound_[self.cur_arg_]=false; // if already set, we unset and re-sets.. - self.operator%(val); // put val at the right place, because cur_arg is set - - - // Now re-position cur_arg before leaving : - self.cur_arg_ = o_cur_arg; - self.bound_[argN-1]=true; - if(self.cur_arg_ == argN-1 ) { - // hum, now this arg is bound, so move to next free arg - while(self.cur_arg_ < self.num_args_ && self.bound_[self.cur_arg_]) - ++self.cur_arg_; - } - // In any case, we either have all args, or are on an unbound arg : - BOOST_ASSERT( self.cur_arg_ >= self.num_args_ || ! self.bound_[self.cur_arg_]); - return self; - } - - template basic_format& - modify_item_body (basic_format& self, int itemN, T manipulator) { - // applies a manipulator to the format_item describing a given directive. - // this is a permanent change, clear or reset won't cancel that. - if(itemN<1 || itemN > static_cast(self.items_.size() )) { - if( self.exceptions() & io::out_of_range_bit ) - boost::throw_exception(io::out_of_range(itemN, 1, static_cast(self.items_.size()) )); - else return self; - } - self.items_[itemN-1].fmtstate_. template apply_manip ( manipulator ); - return self; - } - -} // namespace detail -} // namespace io -} // namespace boost - - - -#endif // BOOST_FORMAT_IMPLEMENTATION_HPP diff --git a/3rdparty/boost/boost/format/free_funcs.hpp b/3rdparty/boost/boost/format/free_funcs.hpp deleted file mode 100644 index 3a51545526..0000000000 --- a/3rdparty/boost/boost/format/free_funcs.hpp +++ /dev/null @@ -1,70 +0,0 @@ -// ---------------------------------------------------------------------------- -// free_funcs.hpp : implementation of the free functions of boost::format -// ---------------------------------------------------------------------------- - -// Copyright Samuel Krempp 2003. Use, modification, and distribution are -// subject to the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/libs/format for library home page - -// ---------------------------------------------------------------------------- - -#ifndef BOOST_FORMAT_FUNCS_HPP -#define BOOST_FORMAT_FUNCS_HPP - -#include -#include - -namespace boost { - - template inline - std::basic_string str(const basic_format& f) { - // adds up all pieces of strings and converted items, and return the formatted string - return f.str(); - } - namespace io { - using ::boost::str; // keep compatibility with when it was defined in this N.S. - } // - namespace io - -#ifndef BOOST_NO_TEMPLATE_STD_STREAM - template - std::basic_ostream & - operator<<( std::basic_ostream & os, - const basic_format& f) -#else - template - std::ostream & - operator<<( std::ostream & os, - const basic_format& f) -#endif - // effect: "return os << str(f);" but we can do it faster - { - typedef boost::basic_format format_t; - if(f.items_.size()==0) - os << f.prefix_; - else { - if(f.cur_arg_ < f.num_args_) - if( f.exceptions() & io::too_few_args_bit ) - // not enough variables supplied - boost::throw_exception(io::too_few_args(f.cur_arg_, f.num_args_)); - if(f.style_ & format_t::special_needs) - os << f.str(); - else { - // else we dont have to count chars output, so we dump directly to os : - os << f.prefix_; - for(unsigned long i=0; i - - -namespace boost { -namespace io { - - -namespace detail { - - -// empty group, but useful even though. -struct group0 -{ - group0() {} -}; - -template -inline -BOOST_IO_STD basic_ostream& -operator << ( BOOST_IO_STD basic_ostream& os, - const group0& ) -{ - return os; -} - -template -struct group1 -{ - T1 a1_; - group1(T1 a1) - : a1_(a1) - {} -private: - group1& operator=(const group1&); -}; - -template -inline -BOOST_IO_STD basic_ostream& -operator << (BOOST_IO_STD basic_ostream& os, - const group1& x) -{ - os << x.a1_; - return os; -} - - - - -template -struct group2 -{ - T1 a1_; - T2 a2_; - group2(T1 a1,T2 a2) - : a1_(a1),a2_(a2) - {} -private: - group2& operator=(const group2&); -}; - -template -inline -BOOST_IO_STD basic_ostream& -operator << (BOOST_IO_STD basic_ostream& os, - const group2& x) -{ - os << x.a1_<< x.a2_; - return os; -} - -template -struct group3 -{ - T1 a1_; - T2 a2_; - T3 a3_; - group3(T1 a1,T2 a2,T3 a3) - : a1_(a1),a2_(a2),a3_(a3) - {} -private: - group3& operator=(const group3&); -}; - -template -inline -BOOST_IO_STD basic_ostream& -operator << (BOOST_IO_STD basic_ostream& os, - const group3& x) -{ - os << x.a1_<< x.a2_<< x.a3_; - return os; -} - -template -struct group4 -{ - T1 a1_; - T2 a2_; - T3 a3_; - T4 a4_; - group4(T1 a1,T2 a2,T3 a3,T4 a4) - : a1_(a1),a2_(a2),a3_(a3),a4_(a4) - {} -private: - group4& operator=(const group4&); -}; - -template -inline -BOOST_IO_STD basic_ostream& -operator << (BOOST_IO_STD basic_ostream& os, - const group4& x) -{ - os << x.a1_<< x.a2_<< x.a3_<< x.a4_; - return os; -} - -template -struct group5 -{ - T1 a1_; - T2 a2_; - T3 a3_; - T4 a4_; - T5 a5_; - group5(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5) - : a1_(a1),a2_(a2),a3_(a3),a4_(a4),a5_(a5) - {} -}; - -template -inline -BOOST_IO_STD basic_ostream& -operator << (BOOST_IO_STD basic_ostream& os, - const group5& x) -{ - os << x.a1_<< x.a2_<< x.a3_<< x.a4_<< x.a5_; - return os; -} - -template -struct group6 -{ - T1 a1_; - T2 a2_; - T3 a3_; - T4 a4_; - T5 a5_; - T6 a6_; - group6(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6) - : a1_(a1),a2_(a2),a3_(a3),a4_(a4),a5_(a5),a6_(a6) - {} -}; - -template -inline -BOOST_IO_STD basic_ostream& -operator << (BOOST_IO_STD basic_ostream& os, - const group6& x) -{ - os << x.a1_<< x.a2_<< x.a3_<< x.a4_<< x.a5_<< x.a6_; - return os; -} - -template -struct group7 -{ - T1 a1_; - T2 a2_; - T3 a3_; - T4 a4_; - T5 a5_; - T6 a6_; - T7 a7_; - group7(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7) - : a1_(a1),a2_(a2),a3_(a3),a4_(a4),a5_(a5),a6_(a6),a7_(a7) - {} -}; - -template -inline -BOOST_IO_STD basic_ostream& -operator << (BOOST_IO_STD basic_ostream& os, - const group7& x) -{ - os << x.a1_<< x.a2_<< x.a3_<< x.a4_<< x.a5_<< x.a6_<< x.a7_; - return os; -} - -template -struct group8 -{ - T1 a1_; - T2 a2_; - T3 a3_; - T4 a4_; - T5 a5_; - T6 a6_; - T7 a7_; - T8 a8_; - group8(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8) - : a1_(a1),a2_(a2),a3_(a3),a4_(a4),a5_(a5),a6_(a6),a7_(a7),a8_(a8) - {} -}; - -template -inline -BOOST_IO_STD basic_ostream& -operator << (BOOST_IO_STD basic_ostream& os, - const group8& x) -{ - os << x.a1_<< x.a2_<< x.a3_<< x.a4_<< x.a5_<< x.a6_<< x.a7_<< x.a8_; - return os; -} - -template -struct group9 -{ - T1 a1_; - T2 a2_; - T3 a3_; - T4 a4_; - T5 a5_; - T6 a6_; - T7 a7_; - T8 a8_; - T9 a9_; - group9(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8,T9 a9) - : a1_(a1),a2_(a2),a3_(a3),a4_(a4),a5_(a5),a6_(a6),a7_(a7),a8_(a8),a9_(a9) - {} -}; - -template -inline -BOOST_IO_STD basic_ostream& -operator << (BOOST_IO_STD basic_ostream& os, - const group9& x) -{ - os << x.a1_<< x.a2_<< x.a3_<< x.a4_<< x.a5_<< x.a6_<< x.a7_<< x.a8_<< x.a9_; - return os; -} - -template -struct group10 -{ - T1 a1_; - T2 a2_; - T3 a3_; - T4 a4_; - T5 a5_; - T6 a6_; - T7 a7_; - T8 a8_; - T9 a9_; - T10 a10_; - group10(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8,T9 a9,T10 a10) - : a1_(a1),a2_(a2),a3_(a3),a4_(a4),a5_(a5),a6_(a6),a7_(a7),a8_(a8),a9_(a9),a10_(a10) - {} -}; - -template -inline -BOOST_IO_STD basic_ostream& -operator << (BOOST_IO_STD basic_ostream& os, - const group10& x) -{ - os << x.a1_<< x.a2_<< x.a3_<< x.a4_<< x.a5_<< x.a6_<< x.a7_<< x.a8_<< x.a9_<< x.a10_; - return os; -} - - - - -template -inline -group1 -group_head( group2 const& x) -{ - return group1 (x.a1_); -} - -template -inline -group1 -group_last( group2 const& x) -{ - return group1 (x.a2_); -} - - - -template -inline -group2 -group_head( group3 const& x) -{ - return group2 (x.a1_,x.a2_); -} - -template -inline -group1 -group_last( group3 const& x) -{ - return group1 (x.a3_); -} - - - -template -inline -group3 -group_head( group4 const& x) -{ - return group3 (x.a1_,x.a2_,x.a3_); -} - -template -inline -group1 -group_last( group4 const& x) -{ - return group1 (x.a4_); -} - - - -template -inline -group4 -group_head( group5 const& x) -{ - return group4 (x.a1_,x.a2_,x.a3_,x.a4_); -} - -template -inline -group1 -group_last( group5 const& x) -{ - return group1 (x.a5_); -} - - - -template -inline -group5 -group_head( group6 const& x) -{ - return group5 (x.a1_,x.a2_,x.a3_,x.a4_,x.a5_); -} - -template -inline -group1 -group_last( group6 const& x) -{ - return group1 (x.a6_); -} - - - -template -inline -group6 -group_head( group7 const& x) -{ - return group6 (x.a1_,x.a2_,x.a3_,x.a4_,x.a5_,x.a6_); -} - -template -inline -group1 -group_last( group7 const& x) -{ - return group1 (x.a7_); -} - - - -template -inline -group7 -group_head( group8 const& x) -{ - return group7 (x.a1_,x.a2_,x.a3_,x.a4_,x.a5_,x.a6_,x.a7_); -} - -template -inline -group1 -group_last( group8 const& x) -{ - return group1 (x.a8_); -} - - - -template -inline -group8 -group_head( group9 const& x) -{ - return group8 (x.a1_,x.a2_,x.a3_,x.a4_,x.a5_,x.a6_,x.a7_,x.a8_); -} - -template -inline -group1 -group_last( group9 const& x) -{ - return group1 (x.a9_); -} - - - -template -inline -group9 -group_head( group10 const& x) -{ - return group9 (x.a1_,x.a2_,x.a3_,x.a4_,x.a5_,x.a6_,x.a7_,x.a8_,x.a9_); -} - -template -inline -group1 -group_last( group10 const& x) -{ - return group1 (x.a10_); -} - - - - - -} // namespace detail - - - -// helper functions - - -inline detail::group1< detail::group0 > -group() { return detail::group1< detail::group0 > ( detail::group0() ); } - -template -inline -detail::group1< detail::group2 > - group(T1 a1, Var const& var) -{ - return detail::group1< detail::group2 > - ( detail::group2 - (a1, var) - ); -} - -template -inline -detail::group1< detail::group3 > - group(T1 a1,T2 a2, Var const& var) -{ - return detail::group1< detail::group3 > - ( detail::group3 - (a1,a2, var) - ); -} - -template -inline -detail::group1< detail::group4 > - group(T1 a1,T2 a2,T3 a3, Var const& var) -{ - return detail::group1< detail::group4 > - ( detail::group4 - (a1,a2,a3, var) - ); -} - -template -inline -detail::group1< detail::group5 > - group(T1 a1,T2 a2,T3 a3,T4 a4, Var const& var) -{ - return detail::group1< detail::group5 > - ( detail::group5 - (a1,a2,a3,a4, var) - ); -} - -template -inline -detail::group1< detail::group6 > - group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5, Var const& var) -{ - return detail::group1< detail::group6 > - ( detail::group6 - (a1,a2,a3,a4,a5, var) - ); -} - -template -inline -detail::group1< detail::group7 > - group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6, Var const& var) -{ - return detail::group1< detail::group7 > - ( detail::group7 - (a1,a2,a3,a4,a5,a6, var) - ); -} - -template -inline -detail::group1< detail::group8 > - group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7, Var const& var) -{ - return detail::group1< detail::group8 > - ( detail::group8 - (a1,a2,a3,a4,a5,a6,a7, var) - ); -} - -template -inline -detail::group1< detail::group9 > - group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8, Var const& var) -{ - return detail::group1< detail::group9 > - ( detail::group9 - (a1,a2,a3,a4,a5,a6,a7,a8, var) - ); -} - -template -inline -detail::group1< detail::group10 > - group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8,T9 a9, Var const& var) -{ - return detail::group1< detail::group10 > - ( detail::group10 - (a1,a2,a3,a4,a5,a6,a7,a8,a9, var) - ); -} - - -#ifndef BOOST_NO_OVERLOAD_FOR_NON_CONST - -template -inline -detail::group1< detail::group2 > - group(T1 a1, Var& var) -{ - return detail::group1< detail::group2 > - ( detail::group2 - (a1, var) - ); -} - -template -inline -detail::group1< detail::group3 > - group(T1 a1,T2 a2, Var& var) -{ - return detail::group1< detail::group3 > - ( detail::group3 - (a1,a2, var) - ); -} - -template -inline -detail::group1< detail::group4 > - group(T1 a1,T2 a2,T3 a3, Var& var) -{ - return detail::group1< detail::group4 > - ( detail::group4 - (a1,a2,a3, var) - ); -} - -template -inline -detail::group1< detail::group5 > - group(T1 a1,T2 a2,T3 a3,T4 a4, Var& var) -{ - return detail::group1< detail::group5 > - ( detail::group5 - (a1,a2,a3,a4, var) - ); -} - -template -inline -detail::group1< detail::group6 > - group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5, Var& var) -{ - return detail::group1< detail::group6 > - ( detail::group6 - (a1,a2,a3,a4,a5, var) - ); -} - -template -inline -detail::group1< detail::group7 > - group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6, Var& var) -{ - return detail::group1< detail::group7 > - ( detail::group7 - (a1,a2,a3,a4,a5,a6, var) - ); -} - -template -inline -detail::group1< detail::group8 > - group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7, Var& var) -{ - return detail::group1< detail::group8 > - ( detail::group8 - (a1,a2,a3,a4,a5,a6,a7, var) - ); -} - -template -inline -detail::group1< detail::group9 > - group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8, Var& var) -{ - return detail::group1< detail::group9 > - ( detail::group9 - (a1,a2,a3,a4,a5,a6,a7,a8, var) - ); -} - -template -inline -detail::group1< detail::group10 > - group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8,T9 a9, Var& var) -{ - return detail::group1< detail::group10 > - ( detail::group10 - (a1,a2,a3,a4,a5,a6,a7,a8,a9, var) - ); -} - - -#endif // - BOOST_NO_OVERLOAD_FOR_NON_CONST - - -} // namespace io - -} // namespace boost - - -#endif // BOOST_FORMAT_GROUP_HPP diff --git a/3rdparty/boost/boost/format/internals.hpp b/3rdparty/boost/boost/format/internals.hpp deleted file mode 100644 index 1c67006aee..0000000000 --- a/3rdparty/boost/boost/format/internals.hpp +++ /dev/null @@ -1,202 +0,0 @@ -// ---------------------------------------------------------------------------- -// internals.hpp : internal structs : stream_format_state, format_item. -// included by format.hpp -// ---------------------------------------------------------------------------- - -// Copyright Samuel Krempp 2003. Use, modification, and distribution are -// subject to the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/libs/format for library home page - -// ---------------------------------------------------------------------------- - -#ifndef BOOST_FORMAT_INTERNALS_HPP -#define BOOST_FORMAT_INTERNALS_HPP - - -#include -#include -#include -#include -#include -#include // used as a dummy stream - -namespace boost { -namespace io { -namespace detail { - - -//---- stream_format_state --------------------------------------------------// - -// set of params that define the format state of a stream - template - struct stream_format_state - { - typedef BOOST_IO_STD basic_ios basic_ios; - - stream_format_state(Ch fill) { reset(fill); } -// stream_format_state(const basic_ios& os) { set_by_stream(os); } - - void reset(Ch fill); //- sets to default state. - void set_by_stream(const basic_ios& os); //- sets to os's state. - void apply_on(basic_ios & os, //- applies format_state to the stream - boost::io::detail::locale_t * loc_default = 0) const; - template - void apply_manip(T manipulator) //- modifies state by applying manipulator - { apply_manip_body( *this, manipulator) ; } - - // --- data --- - std::streamsize width_; - std::streamsize precision_; - Ch fill_; - std::ios_base::fmtflags flags_; - std::ios_base::iostate rdstate_; - std::ios_base::iostate exceptions_; - boost::optional loc_; - }; - - -//---- format_item ---------------------------------------------------------// - -// stores all parameters that can be specified in format strings - template - struct format_item - { - enum pad_values { zeropad = 1, spacepad =2, centered=4, tabulation = 8 }; - // 1. if zeropad is set, all other bits are not, - // 2. if tabulation is set, all others are not. - // centered and spacepad can be mixed freely. - enum arg_values { argN_no_posit = -1, // non-positional directive. will set argN later - argN_tabulation = -2, // tabulation directive. (no argument read) - argN_ignored = -3 // ignored directive. (no argument read) - }; - typedef BOOST_IO_STD basic_ios basic_ios; - typedef detail::stream_format_state stream_format_state; - typedef ::std::basic_string string_type; - - format_item(Ch fill) :argN_(argN_no_posit), fmtstate_(fill), - truncate_(max_streamsize()), pad_scheme_(0) {} - void reset(Ch fill); - void compute_states(); // sets states according to truncate and pad_scheme. - - static std::streamsize max_streamsize() { - return (std::numeric_limits::max)(); - } - - // --- data --- - int argN_; //- argument number (starts at 0, eg : %1 => argN=0) - // negative values for items that don't process an argument - string_type res_; //- result of the formatting of this item - string_type appendix_; //- piece of string between this item and the next - - stream_format_state fmtstate_;// set by parsing, is only affected by modify_item - - std::streamsize truncate_;//- is set for directives like %.5s that ask truncation - unsigned int pad_scheme_;//- several possible padding schemes can mix. see pad_values - }; - - - -//--- Definitions ------------------------------------------------------------ - -// - stream_format_state:: ------------------------------------------------- - template - void stream_format_state:: apply_on (basic_ios & os, - boost::io::detail::locale_t * loc_default) const { - // If a locale is available, set it first. "os.fill(fill_);" may chrash otherwise. -#if !defined(BOOST_NO_STD_LOCALE) - if(loc_) - os.imbue(loc_.get()); - else if(loc_default) - os.imbue(*loc_default); -#else - (void) loc_default; // keep compiler quiet if we don't support locales -#endif - // set the state of this stream according to our params - if(width_ != -1) - os.width(width_); - if(precision_ != -1) - os.precision(precision_); - if(fill_ != 0) - os.fill(fill_); - os.flags(flags_); - os.clear(rdstate_); - os.exceptions(exceptions_); - } - - template - void stream_format_state:: set_by_stream(const basic_ios& os) { - // set our params according to the state of this stream - flags_ = os.flags(); - width_ = os.width(); - precision_ = os.precision(); - fill_ = os.fill(); - rdstate_ = os.rdstate(); - exceptions_ = os.exceptions(); - } - - - template - void apply_manip_body( stream_format_state& self, - T manipulator) { - // modify our params according to the manipulator - basic_oaltstringstream ss; - self.apply_on( ss ); - ss << manipulator; - self.set_by_stream( ss ); - } - - template inline - void stream_format_state:: reset(Ch fill) { - // set our params to standard's default state. cf 27.4.4.1 of the C++ norm - width_=0; precision_=6; - fill_=fill; // default is widen(' '), but we cant compute it without the locale - flags_ = std::ios_base::dec | std::ios_base::skipws; - // the adjust_field part is left equal to 0, which means right. - exceptions_ = std::ios_base::goodbit; - rdstate_ = std::ios_base::goodbit; - } - - -// --- format_item:: -------------------------------------------------------- - - template - void format_item:: - reset (Ch fill) { - argN_=argN_no_posit; truncate_ = max_streamsize(); pad_scheme_ =0; - res_.resize(0); appendix_.resize(0); - fmtstate_.reset(fill); - } - - template - void format_item:: - compute_states() { - // reflect pad_scheme_ on fmt_state_ - // because some pad_schemes has complex consequences on several state params. - if(pad_scheme_ & zeropad) { - // ignore zeropad in left alignment : - if(fmtstate_.flags_ & std::ios_base::left) { - BOOST_ASSERT(!(fmtstate_.flags_ &(std::ios_base::adjustfield ^std::ios_base::left))); - // only left bit might be set. (not right, nor internal) - pad_scheme_ = pad_scheme_ & (~zeropad); - } - else { - pad_scheme_ &= ~spacepad; // printf ignores spacepad when zeropadding - fmtstate_.fill_='0'; - fmtstate_.flags_ = (fmtstate_.flags_ & ~std::ios_base::adjustfield) - | std::ios_base::internal; - // removes all adjustfield bits, and adds internal. - } - } - if(pad_scheme_ & spacepad) { - if(fmtstate_.flags_ & std::ios_base::showpos) - pad_scheme_ &= ~spacepad; - } - } - - -} } } // namespaces boost :: io :: detail - - -#endif // BOOST_FORMAT_INTERNALS_HPP diff --git a/3rdparty/boost/boost/format/internals_fwd.hpp b/3rdparty/boost/boost/format/internals_fwd.hpp deleted file mode 100644 index 18cf122412..0000000000 --- a/3rdparty/boost/boost/format/internals_fwd.hpp +++ /dev/null @@ -1,64 +0,0 @@ -// ---------------------------------------------------------------------------- -// internals_fwd.hpp : forward declarations, for internal headers -// ---------------------------------------------------------------------------- - -// Copyright Samuel Krempp 2003. Use, modification, and distribution are -// subject to the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/libs/format for library home page - -// ---------------------------------------------------------------------------- - -#ifndef BOOST_FORMAT_INTERNAL_FWD_HPP -#define BOOST_FORMAT_INTERNAL_FWD_HPP - -#include -#include - - -namespace boost { -namespace io { - -namespace detail { - template struct stream_format_state; - template struct format_item; - - - // these functions were intended as methods, - // but MSVC have problems with template member functions : - // defined in format_implementation.hpp : - template - basic_format& - modify_item_body (basic_format& self, - int itemN, T manipulator); - - template - basic_format& - bind_arg_body (basic_format& self, - int argN, const T& val); - - // in internals.hpp : - template - void apply_manip_body (stream_format_state& self, - T manipulator); - - // argument feeding (defined in feed_args.hpp ) : - template - void distribute (basic_format& self, T x); - - template - basic_format& - feed (basic_format& self, T x); - - template - basic_format& - feed_impl (basic_format& self, T x); - -} // namespace detail - -} // namespace io -} // namespace boost - - -#endif // BOOST_FORMAT_INTERNAL_FWD_HPP diff --git a/3rdparty/boost/boost/format/parsing.hpp b/3rdparty/boost/boost/format/parsing.hpp deleted file mode 100644 index 04ddf368e1..0000000000 --- a/3rdparty/boost/boost/format/parsing.hpp +++ /dev/null @@ -1,501 +0,0 @@ -// ---------------------------------------------------------------------------- -// parsing.hpp : implementation of the parsing member functions -// ( parse, parse_printf_directive) -// ---------------------------------------------------------------------------- - -// Copyright Samuel Krempp 2003. Use, modification, and distribution are -// subject to the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// see http://www.boost.org/libs/format for library home page - -// ---------------------------------------------------------------------------- - -#ifndef BOOST_FORMAT_PARSING_HPP -#define BOOST_FORMAT_PARSING_HPP - - -#include -#include -#include -#include - - -namespace boost { -namespace io { -namespace detail { - -#if defined(BOOST_NO_STD_LOCALE) - // streams will be used for narrow / widen. but these methods are not const - template - T& const_or_not(const T& x) { - return const_cast (x); - } -#else - template - const T& const_or_not(const T& x) { - return x; - } -#endif - - template inline - char wrap_narrow(const Facet& fac, Ch c, char deflt) { - return const_or_not(fac).narrow(c, deflt); - } - - template inline - bool wrap_isdigit(const Facet& fac, Ch c) { -#if ! defined( BOOST_NO_LOCALE_ISDIGIT ) - return fac.is(std::ctype::digit, c); -# else - (void) fac; // remove "unused parameter" warning - using namespace std; - return isdigit(c) != 0; -#endif - } - - template - Iter wrap_scan_notdigit(const Facet & fac, Iter beg, Iter end) { - using namespace std; - for( ; beg!=end && wrap_isdigit(fac, *beg); ++beg) ; - return beg; - } - - - // Input : [start, last) iterators range and a - // a Facet to use its widen/narrow member function - // Effects : read sequence and convert digits into integral n, of type Res - // Returns : n - template - Iter str2int (const Iter & start, const Iter & last, Res & res, - const Facet& fac) - { - using namespace std; - Iter it; - res=0; - for(it=start; it != last && wrap_isdigit(fac, *it); ++it ) { - char cur_ch = wrap_narrow(fac, *it, 0); // cant fail. - res *= 10; - res += cur_ch - '0'; // 22.2.1.1.2.13 of the C++ standard - } - return it; - } - - // skip printf's "asterisk-fields" directives in the format-string buf - // Input : char string, with starting index *pos_p - // a Facet merely to use its widen/narrow member function - // Effects : advance *pos_p by skipping printf's asterisk fields. - // Returns : nothing - template - Iter skip_asterisk(Iter start, Iter last, const Facet& fac) - { - using namespace std; - ++ start; - start = wrap_scan_notdigit(fac, start, last); - if(start!=last && *start== const_or_not(fac).widen( '$') ) - ++start; - return start; - } - - - // auxiliary func called by parse_printf_directive - // for centralising error handling - // it either throws if user sets the corresponding flag, or does nothing. - inline void maybe_throw_exception(unsigned char exceptions, - std::size_t pos, std::size_t size) - { - if(exceptions & io::bad_format_string_bit) - boost::throw_exception(io::bad_format_string(pos, size) ); - } - - - // Input: the position of a printf-directive in the format-string - // a basic_ios& merely to use its widen/narrow member function - // a bitset'exceptions' telling whether to throw exceptions on errors. - // Returns: - // true if parse succeeded (ignore some errors if exceptions disabled) - // false if it failed so bad that the directive should be printed verbatim - // Effects: - // start is incremented so that *start is the first char after - // this directive - // *fpar is set with the parameters read in the directive - template - bool parse_printf_directive(Iter & start, const Iter& last, - detail::format_item * fpar, - const Facet& fac, - std::size_t offset, unsigned char exceptions) - { - typedef typename basic_format::format_item_t format_item_t; - - fpar->argN_ = format_item_t::argN_no_posit; // if no positional-directive - bool precision_set = false; - bool in_brackets=false; - Iter start0 = start; - std::size_t fstring_size = last-start0+offset; - - if(start>= last) { // empty directive : this is a trailing % - maybe_throw_exception(exceptions, start-start0 + offset, fstring_size); - return false; - } - - if(*start== const_or_not(fac).widen( '|')) { - in_brackets=true; - if( ++start >= last ) { - maybe_throw_exception(exceptions, start-start0 + offset, fstring_size); - return false; - } - } - - // the flag '0' would be picked as a digit for argument order, but here it's a flag : - if(*start== const_or_not(fac).widen( '0')) - goto parse_flags; - - // handle argument order (%2$d) or possibly width specification: %2d - if(wrap_isdigit(fac, *start)) { - int n; - start = str2int(start, last, n, fac); - if( start >= last ) { - maybe_throw_exception(exceptions, start-start0+offset, fstring_size); - return false; - } - - // %N% case : this is already the end of the directive - if( *start == const_or_not(fac).widen( '%') ) { - fpar->argN_ = n-1; - ++start; - if( in_brackets) - maybe_throw_exception(exceptions, start-start0+offset, fstring_size); - // but don't return. maybe "%" was used in lieu of '$', so we go on. - else - return true; - } - - if ( *start== const_or_not(fac).widen( '$') ) { - fpar->argN_ = n-1; - ++start; - } - else { - // non-positionnal directive - fpar->fmtstate_.width_ = n; - fpar->argN_ = format_item_t::argN_no_posit; - goto parse_precision; - } - } - - parse_flags: - // handle flags - while ( start != last) { // as long as char is one of + - = _ # 0 l h or ' ' - // misc switches - switch ( wrap_narrow(fac, *start, 0)) { - case '\'' : break; // no effect yet. (painful to implement) - case 'l': - case 'h': // short/long modifier : for printf-comaptibility (no action needed) - break; - case '-': - fpar->fmtstate_.flags_ |= std::ios_base::left; - break; - case '=': - fpar->pad_scheme_ |= format_item_t::centered; - break; - case '_': - fpar->fmtstate_.flags_ |= std::ios_base::internal; - break; - case ' ': - fpar->pad_scheme_ |= format_item_t::spacepad; - break; - case '+': - fpar->fmtstate_.flags_ |= std::ios_base::showpos; - break; - case '0': - fpar->pad_scheme_ |= format_item_t::zeropad; - // need to know alignment before really setting flags, - // so just add 'zeropad' flag for now, it will be processed later. - break; - case '#': - fpar->fmtstate_.flags_ |= std::ios_base::showpoint | std::ios_base::showbase; - break; - default: - goto parse_width; - } - ++start; - } // loop on flag. - - if( start>=last) { - maybe_throw_exception(exceptions, start-start0+offset, fstring_size); - return true; - } - parse_width: - // handle width spec - // first skip 'asterisk fields' : *, or *N$ - if(*start == const_or_not(fac).widen( '*') ) - start = skip_asterisk(start, last, fac); - if(start!=last && wrap_isdigit(fac, *start)) - start = str2int(start, last, fpar->fmtstate_.width_, fac); - - parse_precision: - if( start>= last) { - maybe_throw_exception(exceptions, start-start0+offset, fstring_size); - return true; - } - // handle precision spec - if (*start== const_or_not(fac).widen( '.')) { - ++start; - if(start != last && *start == const_or_not(fac).widen( '*') ) - start = skip_asterisk(start, last, fac); - if(start != last && wrap_isdigit(fac, *start)) { - start = str2int(start, last, fpar->fmtstate_.precision_, fac); - precision_set = true; - } - else - fpar->fmtstate_.precision_ =0; - } - - // handle formatting-type flags : - while( start != last && ( *start== const_or_not(fac).widen( 'l') - || *start== const_or_not(fac).widen( 'L') - || *start== const_or_not(fac).widen( 'h')) ) - ++start; - if( start>=last) { - maybe_throw_exception(exceptions, start-start0+offset, fstring_size); - return true; - } - - if( in_brackets && *start== const_or_not(fac).widen( '|') ) { - ++start; - return true; - } - switch ( wrap_narrow(fac, *start, 0) ) { - case 'X': - fpar->fmtstate_.flags_ |= std::ios_base::uppercase; - case 'p': // pointer => set hex. - case 'x': - fpar->fmtstate_.flags_ &= ~std::ios_base::basefield; - fpar->fmtstate_.flags_ |= std::ios_base::hex; - break; - - case 'o': - fpar->fmtstate_.flags_ &= ~std::ios_base::basefield; - fpar->fmtstate_.flags_ |= std::ios_base::oct; - break; - - case 'E': - fpar->fmtstate_.flags_ |= std::ios_base::uppercase; - case 'e': - fpar->fmtstate_.flags_ &= ~std::ios_base::floatfield; - fpar->fmtstate_.flags_ |= std::ios_base::scientific; - - fpar->fmtstate_.flags_ &= ~std::ios_base::basefield; - fpar->fmtstate_.flags_ |= std::ios_base::dec; - break; - - case 'f': - fpar->fmtstate_.flags_ &= ~std::ios_base::floatfield; - fpar->fmtstate_.flags_ |= std::ios_base::fixed; - case 'u': - case 'd': - case 'i': - fpar->fmtstate_.flags_ &= ~std::ios_base::basefield; - fpar->fmtstate_.flags_ |= std::ios_base::dec; - break; - - case 'T': - ++start; - if( start >= last) - maybe_throw_exception(exceptions, start-start0+offset, fstring_size); - else - fpar->fmtstate_.fill_ = *start; - fpar->pad_scheme_ |= format_item_t::tabulation; - fpar->argN_ = format_item_t::argN_tabulation; - break; - case 't': - fpar->fmtstate_.fill_ = const_or_not(fac).widen( ' '); - fpar->pad_scheme_ |= format_item_t::tabulation; - fpar->argN_ = format_item_t::argN_tabulation; - break; - - case 'G': - fpar->fmtstate_.flags_ |= std::ios_base::uppercase; - break; - case 'g': // 'g' conversion is default for floats. - fpar->fmtstate_.flags_ &= ~std::ios_base::basefield; - fpar->fmtstate_.flags_ |= std::ios_base::dec; - - // CLEAR all floatield flags, so stream will CHOOSE - fpar->fmtstate_.flags_ &= ~std::ios_base::floatfield; - break; - - case 'C': - case 'c': - fpar->truncate_ = 1; - break; - case 'S': - case 's': - if(precision_set) // handle truncation manually, with own parameter. - fpar->truncate_ = fpar->fmtstate_.precision_; - fpar->fmtstate_.precision_ = 6; // default stream precision. - break; - case 'n' : - fpar->argN_ = format_item_t::argN_ignored; - break; - default: - maybe_throw_exception(exceptions, start-start0+offset, fstring_size); - } - ++start; - - if( in_brackets ) { - if( start != last && *start== const_or_not(fac).widen( '|') ) { - ++start; - return true; - } - else maybe_throw_exception(exceptions, start-start0+offset, fstring_size); - } - return true; - } - // -end parse_printf_directive() - - template - int upper_bound_from_fstring(const String& buf, - const typename String::value_type arg_mark, - const Facet& fac, - unsigned char exceptions) - { - // quick-parsing of the format-string to count arguments mark (arg_mark, '%') - // returns : upper bound on the number of format items in the format strings - using namespace boost::io; - typename String::size_type i1=0; - int num_items=0; - while( (i1=buf.find(arg_mark,i1)) != String::npos ) { - if( i1+1 >= buf.size() ) { - if(exceptions & bad_format_string_bit) - boost::throw_exception(bad_format_string(i1, buf.size() )); // must not end in ".. %" - else { - ++num_items; - break; - } - } - if(buf[i1+1] == buf[i1] ) {// escaped "%%" - i1+=2; continue; - } - - ++i1; - // in case of %N% directives, dont count it double (wastes allocations..) : - i1 = detail::wrap_scan_notdigit(fac, buf.begin()+i1, buf.end()) - buf.begin(); - if( i1 < buf.size() && buf[i1] == arg_mark ) - ++i1; - ++num_items; - } - return num_items; - } - template inline - void append_string(String& dst, const String& src, - const typename String::size_type beg, - const typename String::size_type end) { - dst.append(src.begin()+beg, src.begin()+end); - } - -} // detail namespace -} // io namespace - - - -// ----------------------------------------------- -// format :: parse(..) - - template - basic_format& basic_format:: - parse (const string_type& buf) { - // parse the format-string - using namespace std; -#if !defined(BOOST_NO_STD_LOCALE) - const std::ctype & fac = BOOST_USE_FACET( std::ctype, getloc()); -#else - io::basic_oaltstringstream fac; - //has widen and narrow even on compilers without locale -#endif - - const Ch arg_mark = io::detail::const_or_not(fac).widen( '%'); - bool ordered_args=true; - int max_argN=-1; - - // A: find upper_bound on num_items and allocates arrays - int num_items = io::detail::upper_bound_from_fstring(buf, arg_mark, fac, exceptions()); - make_or_reuse_data(num_items); - - // B: Now the real parsing of the format string : - num_items=0; - typename string_type::size_type i0=0, i1=0; - typename string_type::const_iterator it; - bool special_things=false; - int cur_item=0; - while( (i1=buf.find(arg_mark,i1)) != string_type::npos ) { - string_type & piece = (cur_item==0) ? prefix_ : items_[cur_item-1].appendix_; - if( buf[i1+1] == buf[i1] ) { // escaped mark, '%%' - io::detail::append_string(piece, buf, i0, i1+1); - i1+=2; i0=i1; - continue; - } - BOOST_ASSERT( static_cast(cur_item) < items_.size() || cur_item==0); - - if(i1!=i0) { - io::detail::append_string(piece, buf, i0, i1); - i0=i1; - } - ++i1; - it = buf.begin()+i1; - bool parse_ok = io::detail::parse_printf_directive( - it, buf.end(), &items_[cur_item], fac, i1, exceptions()); - i1 = it - buf.begin(); - if( ! parse_ok ) // the directive will be printed verbatim - continue; - i0=i1; - items_[cur_item].compute_states(); // process complex options, like zeropad, into params - - int argN=items_[cur_item].argN_; - if(argN == format_item_t::argN_ignored) - continue; - if(argN ==format_item_t::argN_no_posit) - ordered_args=false; - else if(argN == format_item_t::argN_tabulation) special_things=true; - else if(argN > max_argN) max_argN = argN; - ++num_items; - ++cur_item; - } // loop on %'s - BOOST_ASSERT(cur_item == num_items); - - // store the final piece of string - { - string_type & piece = (cur_item==0) ? prefix_ : items_[cur_item-1].appendix_; - io::detail::append_string(piece, buf, i0, buf.size()); - } - - if( !ordered_args) { - if(max_argN >= 0 ) { // dont mix positional with non-positionnal directives - if(exceptions() & io::bad_format_string_bit) - boost::throw_exception( - io::bad_format_string(static_cast(max_argN), 0)); - // else do nothing. => positionnal arguments are processed as non-positionnal - } - // set things like it would have been with positional directives : - int non_ordered_items = 0; - for(int i=0; i< num_items; ++i) - if(items_[i].argN_ == format_item_t::argN_no_posit) { - items_[i].argN_ = non_ordered_items; - ++non_ordered_items; - } - max_argN = non_ordered_items-1; - } - - // C: set some member data : - items_.resize(num_items, format_item_t(io::detail::const_or_not(fac).widen( ' ')) ); - - if(special_things) style_ |= special_needs; - num_args_ = max_argN + 1; - if(ordered_args) style_ |= ordered; - else style_ &= ~ordered; - return *this; - } - -} // namespace boost - - -#endif // BOOST_FORMAT_PARSING_HPP diff --git a/3rdparty/boost/boost/iterator/minimum_category.hpp b/3rdparty/boost/boost/iterator/minimum_category.hpp deleted file mode 100644 index 15679bc77d..0000000000 --- a/3rdparty/boost/boost/iterator/minimum_category.hpp +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright David Abrahams 2003. Use, modification and distribution is -// subject to the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -#ifndef BOOST_ITERATOR_MINIMUM_CATEGORY_HPP_INCLUDED_ -# define BOOST_ITERATOR_MINIMUM_CATEGORY_HPP_INCLUDED_ - -# include -# include -# include - -# include -# include - -namespace boost { -namespace iterators { -namespace detail { - -template -struct minimum_category_impl; - -template -struct error_not_related_by_convertibility; - -template <> -struct minimum_category_impl -{ - template struct apply - { - typedef T2 type; - }; -}; - -template <> -struct minimum_category_impl -{ - template struct apply - { - typedef T1 type; - }; -}; - -template <> -struct minimum_category_impl -{ - template struct apply - { - BOOST_STATIC_ASSERT((is_same::value)); - typedef T1 type; - }; -}; - -template <> -struct minimum_category_impl -{ - template struct apply - : error_not_related_by_convertibility - { - }; -}; - -} // namespace detail - -// -// Returns the minimum category type or fails to compile -// if T1 and T2 are unrelated. -// -template -struct minimum_category -{ - typedef boost::iterators::detail::minimum_category_impl< - ::boost::is_convertible::value - , ::boost::is_convertible::value - > outer; - - typedef typename outer::template apply inner; - typedef typename inner::type type; - - BOOST_MPL_AUX_LAMBDA_SUPPORT(2,minimum_category,(T1,T2)) -}; - -template <> -struct minimum_category -{ - template - struct apply : minimum_category - {}; - - BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2,minimum_category,(mpl::_1,mpl::_2)) -}; - -} // namespace iterators - -} // namespace boost - -#endif // BOOST_ITERATOR_MINIMUM_CATEGORY_HPP_INCLUDED_ diff --git a/3rdparty/boost/boost/mpl/aux_/empty_impl.hpp b/3rdparty/boost/boost/mpl/aux_/empty_impl.hpp deleted file mode 100644 index cfe55ae252..0000000000 --- a/3rdparty/boost/boost/mpl/aux_/empty_impl.hpp +++ /dev/null @@ -1,43 +0,0 @@ - -#ifndef BOOST_MPL_AUX_EMPTY_IMPL_HPP_INCLUDED -#define BOOST_MPL_AUX_EMPTY_IMPL_HPP_INCLUDED - -// Copyright Aleksey Gurtovoy 2000-2004 -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/mpl for documentation. - -// $Id$ -// $Date$ -// $Revision$ - -#include -#include -#include -#include - -namespace boost { namespace mpl { - -// default implementation; conrete sequences might override it by -// specializing either the 'empty_impl' or the primary 'empty' template - -template< typename Tag > -struct empty_impl -{ - template< typename Sequence > struct apply - : is_same< - typename begin::type - , typename end::type - > - { - }; -}; - -BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1,empty_impl) - -}} - -#endif // BOOST_MPL_AUX_EMPTY_IMPL_HPP_INCLUDED diff --git a/3rdparty/boost/boost/mpl/aux_/insert_impl.hpp b/3rdparty/boost/boost/mpl/aux_/insert_impl.hpp deleted file mode 100644 index 03a304b580..0000000000 --- a/3rdparty/boost/boost/mpl/aux_/insert_impl.hpp +++ /dev/null @@ -1,68 +0,0 @@ - -#ifndef BOOST_MPL_INSERT_IMPL_HPP_INCLUDED -#define BOOST_MPL_INSERT_IMPL_HPP_INCLUDED - -// Copyright Aleksey Gurtovoy 2000-2004 -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/mpl for documentation. - -// $Id$ -// $Date$ -// $Revision$ - -#include -#include -#include -#include -#include -#include -#include - -namespace boost { namespace mpl { - -// default implementation; conrete sequences might override it by -// specializing either the 'insert_impl' or the primary 'insert' template - -template< typename Tag > -struct insert_impl -{ - template< - typename Sequence - , typename Pos - , typename T - > - struct apply - { - typedef iterator_range< - typename begin::type - , Pos - > first_half_; - - typedef iterator_range< - Pos - , typename end::type - > second_half_; - - typedef typename reverse_fold< - second_half_ - , typename clear::type - , push_front<_,_> - >::type half_sequence_; - - typedef typename reverse_fold< - first_half_ - , typename push_front::type - , push_front<_,_> - >::type type; - }; -}; - -BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(3,insert_impl) - -}} - -#endif // BOOST_MPL_INSERT_IMPL_HPP_INCLUDED diff --git a/3rdparty/boost/boost/mpl/aux_/insert_range_impl.hpp b/3rdparty/boost/boost/mpl/aux_/insert_range_impl.hpp deleted file mode 100644 index fa4331562d..0000000000 --- a/3rdparty/boost/boost/mpl/aux_/insert_range_impl.hpp +++ /dev/null @@ -1,80 +0,0 @@ - -#ifndef BOOST_MPL_AUX_INSERT_RANGE_IMPL_HPP_INCLUDED -#define BOOST_MPL_AUX_INSERT_RANGE_IMPL_HPP_INCLUDED - -// Copyright Aleksey Gurtovoy 2000-2004 -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/mpl for documentation. - -// $Id$ -// $Date$ -// $Revision$ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace boost { namespace mpl { - -// default implementation; conrete sequences might override it by -// specializing either the 'insert_range_impl' or the primary -// 'insert_range' template - - -template< typename Tag > -struct insert_range_impl -{ - template< - typename Sequence - , typename Pos - , typename Range - > - struct apply -#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING) - : reverse_fold< - joint_view< - iterator_range::type,Pos> - , joint_view< - Range - , iterator_range::type> - > - > - , typename clear::type - , insert<_1, begin<_1>, _2> - > - { -#else - { - typedef typename reverse_fold< - joint_view< - iterator_range::type,Pos> - , joint_view< - Range - , iterator_range::type> - > - > - , typename clear::type - , insert<_1, begin<_1>, _2> - >::type type; -#endif - }; -}; - -BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(3,insert_range_impl) - -}} - -#endif // BOOST_MPL_AUX_INSERT_RANGE_IMPL_HPP_INCLUDED diff --git a/3rdparty/boost/boost/mpl/aux_/iter_push_front.hpp b/3rdparty/boost/boost/mpl/aux_/iter_push_front.hpp deleted file mode 100644 index 35ccc4dfbb..0000000000 --- a/3rdparty/boost/boost/mpl/aux_/iter_push_front.hpp +++ /dev/null @@ -1,36 +0,0 @@ - -#ifndef BOOST_MPL_ITER_PUSH_FRONT_HPP_INCLUDED -#define BOOST_MPL_ITER_PUSH_FRONT_HPP_INCLUDED - -// Copyright Aleksey Gurtovoy 2002-2004 -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/mpl for documentation. - -// $Id$ -// $Date$ -// $Revision$ - -#include -#include - -namespace boost { namespace mpl { namespace aux { - -template< - typename Sequence - , typename Iterator - > -struct iter_push_front -{ - typedef typename push_front< - Sequence - , typename deref::type - >::type type; -}; - -}}} - -#endif // BOOST_MPL_ITER_PUSH_FRONT_HPP_INCLUDED diff --git a/3rdparty/boost/boost/mpl/aux_/joint_iter.hpp b/3rdparty/boost/boost/mpl/aux_/joint_iter.hpp deleted file mode 100644 index 277580eebf..0000000000 --- a/3rdparty/boost/boost/mpl/aux_/joint_iter.hpp +++ /dev/null @@ -1,120 +0,0 @@ - -#ifndef BOOST_MPL_AUX_JOINT_ITER_HPP_INCLUDED -#define BOOST_MPL_AUX_JOINT_ITER_HPP_INCLUDED - -// Copyright Aleksey Gurtovoy 2000-2004 -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/mpl for documentation. - -// $Id$ -// $Date$ -// $Revision$ - -#include -#include -#include -#include -#include - -#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) -# include -#endif - -namespace boost { namespace mpl { - -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) - -template< - typename Iterator1 - , typename LastIterator1 - , typename Iterator2 - > -struct joint_iter -{ - typedef Iterator1 base; - typedef forward_iterator_tag category; -}; - -template< - typename LastIterator1 - , typename Iterator2 - > -struct joint_iter -{ - typedef Iterator2 base; - typedef forward_iterator_tag category; -}; - - -template< typename I1, typename L1, typename I2 > -struct deref< joint_iter > -{ - typedef typename joint_iter::base base_; - typedef typename deref::type type; -}; - -template< typename I1, typename L1, typename I2 > -struct next< joint_iter > -{ - typedef joint_iter< typename mpl::next::type,L1,I2 > type; -}; - -template< typename L1, typename I2 > -struct next< joint_iter > -{ - typedef joint_iter< L1,L1,typename mpl::next::type > type; -}; - -#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -template< - typename Iterator1 - , typename LastIterator1 - , typename Iterator2 - > -struct joint_iter; - -template< bool > struct joint_iter_impl -{ - template< typename I1, typename L1, typename I2 > struct result_ - { - typedef I1 base; - typedef forward_iterator_tag category; - typedef joint_iter< typename mpl::next::type,L1,I2 > next; - typedef typename deref::type type; - }; -}; - -template<> struct joint_iter_impl -{ - template< typename I1, typename L1, typename I2 > struct result_ - { - typedef I2 base; - typedef forward_iterator_tag category; - typedef joint_iter< L1,L1,typename mpl::next::type > next; - typedef typename deref::type type; - }; -}; - -template< - typename Iterator1 - , typename LastIterator1 - , typename Iterator2 - > -struct joint_iter - : joint_iter_impl< is_same::value > - ::template result_ -{ -}; - -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(3, joint_iter) - -}} - -#endif // BOOST_MPL_AUX_JOINT_ITER_HPP_INCLUDED diff --git a/3rdparty/boost/boost/mpl/char.hpp b/3rdparty/boost/boost/mpl/char.hpp deleted file mode 100644 index 08828c247a..0000000000 --- a/3rdparty/boost/boost/mpl/char.hpp +++ /dev/null @@ -1,22 +0,0 @@ - -#ifndef BOOST_MPL_CHAR_HPP_INCLUDED -#define BOOST_MPL_CHAR_HPP_INCLUDED - -// Copyright Eric Niebler 2008 -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/mpl for documentation. - -// $Source$ -// $Date: 2008-06-14 08:41:37 -0700 (Sat, 16 Jun 2008) $ -// $Revision: 24874 $ - -#include - -#define AUX_WRAPPER_VALUE_TYPE char -#include - -#endif // BOOST_MPL_CHAR_HPP_INCLUDED diff --git a/3rdparty/boost/boost/mpl/char_fwd.hpp b/3rdparty/boost/boost/mpl/char_fwd.hpp deleted file mode 100644 index 442d0a1619..0000000000 --- a/3rdparty/boost/boost/mpl/char_fwd.hpp +++ /dev/null @@ -1,27 +0,0 @@ - -#ifndef BOOST_MPL_CHAR_FWD_HPP_INCLUDED -#define BOOST_MPL_CHAR_FWD_HPP_INCLUDED - -// Copyright Eric Niebler 2008 -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/mpl for documentation. - -// $Source$ -// $Date: 2008-06-14 08:41:37 -0700 (Sat, 16 Jun 2008) $ -// $Revision: 24874 $ - -#include -#include - -BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN - -template< BOOST_MPL_AUX_NTTP_DECL(char, N) > struct char_; - -BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE -BOOST_MPL_AUX_ADL_BARRIER_DECL(char_) - -#endif // BOOST_MPL_CHAR_FWD_HPP_INCLUDED diff --git a/3rdparty/boost/boost/mpl/copy.hpp b/3rdparty/boost/boost/mpl/copy.hpp deleted file mode 100644 index 6eafba3982..0000000000 --- a/3rdparty/boost/boost/mpl/copy.hpp +++ /dev/null @@ -1,58 +0,0 @@ - -#ifndef BOOST_MPL_COPY_HPP_INCLUDED -#define BOOST_MPL_COPY_HPP_INCLUDED - -// Copyright Aleksey Gurtovoy 2000-2004 -// Copyright David Abrahams 2003-2004 -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/mpl for documentation. - -// $Id$ -// $Date$ -// $Revision$ - -#include -#include -#include - -namespace boost { namespace mpl { - -namespace aux { - -template< - typename Sequence - , typename Inserter - > -struct copy_impl - : fold< - Sequence - , typename Inserter::state - , typename Inserter::operation - > -{ -}; - -template< - typename Sequence - , typename Inserter - > -struct reverse_copy_impl - : reverse_fold< - Sequence - , typename Inserter::state - , typename Inserter::operation - > -{ -}; - -} // namespace aux - -BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(2, copy) - -}} - -#endif // BOOST_MPL_COPY_HPP_INCLUDED diff --git a/3rdparty/boost/boost/mpl/empty.hpp b/3rdparty/boost/boost/mpl/empty.hpp deleted file mode 100644 index 1185324c1b..0000000000 --- a/3rdparty/boost/boost/mpl/empty.hpp +++ /dev/null @@ -1,39 +0,0 @@ - -#ifndef BOOST_MPL_EMPTY_HPP_INCLUDED -#define BOOST_MPL_EMPTY_HPP_INCLUDED - -// Copyright Aleksey Gurtovoy 2000-2004 -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/mpl for documentation. - -// $Id$ -// $Date$ -// $Revision$ - -#include -#include -#include -#include -#include - -namespace boost { namespace mpl { - -template< - typename BOOST_MPL_AUX_NA_PARAM(Sequence) - > -struct empty - : empty_impl< typename sequence_tag::type > - ::template apply< Sequence > -{ - BOOST_MPL_AUX_LAMBDA_SUPPORT(1,empty,(Sequence)) -}; - -BOOST_MPL_AUX_NA_SPEC(1, empty) - -}} - -#endif // BOOST_MPL_EMPTY_HPP_INCLUDED diff --git a/3rdparty/boost/boost/mpl/insert.hpp b/3rdparty/boost/boost/mpl/insert.hpp deleted file mode 100644 index 5e379a4978..0000000000 --- a/3rdparty/boost/boost/mpl/insert.hpp +++ /dev/null @@ -1,41 +0,0 @@ - -#ifndef BOOST_MPL_INSERT_HPP_INCLUDED -#define BOOST_MPL_INSERT_HPP_INCLUDED - -// Copyright Aleksey Gurtovoy 2000-2004 -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/mpl for documentation. - -// $Id$ -// $Date$ -// $Revision$ - -#include -#include -#include -#include -#include - -namespace boost { namespace mpl { - -template< - typename BOOST_MPL_AUX_NA_PARAM(Sequence) - , typename BOOST_MPL_AUX_NA_PARAM(Pos_or_T) - , typename BOOST_MPL_AUX_NA_PARAM(T) - > -struct insert - : insert_impl< typename sequence_tag::type > - ::template apply< Sequence,Pos_or_T,T > -{ - BOOST_MPL_AUX_LAMBDA_SUPPORT(3,insert,(Sequence,Pos_or_T,T)) -}; - -BOOST_MPL_AUX_NA_SPEC(3, insert) - -}} - -#endif // BOOST_MPL_INSERT_HPP_INCLUDED diff --git a/3rdparty/boost/boost/mpl/insert_fwd.hpp b/3rdparty/boost/boost/mpl/insert_fwd.hpp deleted file mode 100644 index ba6b161760..0000000000 --- a/3rdparty/boost/boost/mpl/insert_fwd.hpp +++ /dev/null @@ -1,24 +0,0 @@ - -#ifndef BOOST_MPL_INSERT_FWD_HPP_INCLUDED -#define BOOST_MPL_INSERT_FWD_HPP_INCLUDED - -// Copyright Aleksey Gurtovoy 2000-2004 -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/mpl for documentation. - -// $Id$ -// $Date$ -// $Revision$ - -namespace boost { namespace mpl { - -template< typename Tag > struct insert_impl; -template< typename Sequence, typename Pos_or_T, typename T > struct insert; - -}} - -#endif // BOOST_MPL_INSERT_FWD_HPP_INCLUDED diff --git a/3rdparty/boost/boost/mpl/insert_range.hpp b/3rdparty/boost/boost/mpl/insert_range.hpp deleted file mode 100644 index 0c362f5ae1..0000000000 --- a/3rdparty/boost/boost/mpl/insert_range.hpp +++ /dev/null @@ -1,41 +0,0 @@ - -#ifndef BOOST_MPL_INSERT_RANGE_HPP_INCLUDED -#define BOOST_MPL_INSERT_RANGE_HPP_INCLUDED - -// Copyright Aleksey Gurtovoy 2000-2004 -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/mpl for documentation. - -// $Id$ -// $Date$ -// $Revision$ - -#include -#include -#include -#include -#include - -namespace boost { namespace mpl { - -template< - typename BOOST_MPL_AUX_NA_PARAM(Sequence) - , typename BOOST_MPL_AUX_NA_PARAM(Pos) - , typename BOOST_MPL_AUX_NA_PARAM(Range) - > -struct insert_range - : insert_range_impl< typename sequence_tag::type > - ::template apply< Sequence,Pos,Range > -{ - BOOST_MPL_AUX_LAMBDA_SUPPORT(3,insert_range,(Sequence,Pos,Range)) -}; - -BOOST_MPL_AUX_NA_SPEC(3, insert_range) - -}} - -#endif // BOOST_MPL_INSERT_RANGE_HPP_INCLUDED diff --git a/3rdparty/boost/boost/mpl/insert_range_fwd.hpp b/3rdparty/boost/boost/mpl/insert_range_fwd.hpp deleted file mode 100644 index d9c946f2a9..0000000000 --- a/3rdparty/boost/boost/mpl/insert_range_fwd.hpp +++ /dev/null @@ -1,24 +0,0 @@ - -#ifndef BOOST_MPL_INSERT_RANGE_FWD_HPP_INCLUDED -#define BOOST_MPL_INSERT_RANGE_FWD_HPP_INCLUDED - -// Copyright Aleksey Gurtovoy 2000-2004 -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/mpl for documentation. - -// $Id$ -// $Date$ -// $Revision$ - -namespace boost { namespace mpl { - -template< typename Tag > struct insert_range_impl; -template< typename Sequence, typename Pos, typename Range > struct insert_range; - -}} - -#endif // BOOST_MPL_INSERT_RANGE_FWD_HPP_INCLUDED diff --git a/3rdparty/boost/boost/mpl/joint_view.hpp b/3rdparty/boost/boost/mpl/joint_view.hpp deleted file mode 100644 index cd9cddac7e..0000000000 --- a/3rdparty/boost/boost/mpl/joint_view.hpp +++ /dev/null @@ -1,65 +0,0 @@ - -#ifndef BOOST_MPL_JOINT_VIEW_HPP_INCLUDED -#define BOOST_MPL_JOINT_VIEW_HPP_INCLUDED - -// Copyright Aleksey Gurtovoy 2000-2004 -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/mpl for documentation. - -// $Id$ -// $Date$ -// $Revision$ - -#include -#include -#include -#include -#include - -namespace boost { namespace mpl { - -namespace aux { -struct joint_view_tag; -} - -template<> -struct size_impl< aux::joint_view_tag > -{ - template < typename JointView > struct apply - : plus< - size - , size - > - {}; -}; - -template< - typename BOOST_MPL_AUX_NA_PARAM(Sequence1_) - , typename BOOST_MPL_AUX_NA_PARAM(Sequence2_) - > -struct joint_view -{ - typedef typename mpl::begin::type first1_; - typedef typename mpl::end::type last1_; - typedef typename mpl::begin::type first2_; - typedef typename mpl::end::type last2_; - - // agurt, 25/may/03: for the 'size_traits' implementation above - typedef Sequence1_ sequence1_; - typedef Sequence2_ sequence2_; - - typedef joint_view type; - typedef aux::joint_view_tag tag; - typedef joint_iter begin; - typedef joint_iter end; -}; - -BOOST_MPL_AUX_NA_SPEC(2, joint_view) - -}} - -#endif // BOOST_MPL_JOINT_VIEW_HPP_INCLUDED diff --git a/3rdparty/boost/boost/mpl/limits/string.hpp b/3rdparty/boost/boost/mpl/limits/string.hpp deleted file mode 100644 index eb85aa389f..0000000000 --- a/3rdparty/boost/boost/mpl/limits/string.hpp +++ /dev/null @@ -1,21 +0,0 @@ - -#ifndef BOOST_MPL_LIMITS_STRING_HPP_INCLUDED -#define BOOST_MPL_LIMITS_STRING_HPP_INCLUDED - -// Copyright Eric Niebler 2009 -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/mpl for documentation. - -// $Id: string.hpp 49239 2009-04-01 09:10:26Z eric_niebler $ -// $Date: 2009-04-01 02:10:26 -0700 (Wed, 1 Apr 2009) $ -// $Revision: 49239 $ - -#if !defined(BOOST_MPL_LIMIT_STRING_SIZE) -# define BOOST_MPL_LIMIT_STRING_SIZE 32 -#endif - -#endif // BOOST_MPL_LIMITS_STRING_HPP_INCLUDED diff --git a/3rdparty/boost/boost/mpl/string.hpp b/3rdparty/boost/boost/mpl/string.hpp deleted file mode 100644 index e7898562df..0000000000 --- a/3rdparty/boost/boost/mpl/string.hpp +++ /dev/null @@ -1,607 +0,0 @@ - -#ifndef BOOST_MPL_STRING_HPP_INCLUDED -#define BOOST_MPL_STRING_HPP_INCLUDED - -// Copyright Eric Niebler 2009 -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/mpl for documentation. - -// $Id: string.hpp 49239 2009-04-01 09:10:26Z eric_niebler $ -// $Date: 2009-04-01 02:10:26 -0700 (Wed, 1 Apr 2009) $ -// $Revision: 49239 $ -// -// Thanks to: -// Dmitry Goncharov for porting this to the Sun compiler - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include // for bidirectional_iterator_tag -#include - -namespace boost { namespace mpl -{ - #define BOOST_MPL_STRING_MAX_PARAMS \ - BOOST_PP_DIV(BOOST_PP_ADD(BOOST_MPL_LIMIT_STRING_SIZE, 3), 4) - - // Low-level bit-twiddling is done by macros. Any implementation-defined behavior of - // multi-character literals should be localized to these macros. - - #define BOOST_MPL_MULTICHAR_LENGTH(c) \ - (std::size_t)((c0xffffff)+(c>0xffff)+(c>0xff)+1)) - - #if BOOST_ENDIAN_LITTLE_BYTE && defined(__SUNPRO_CC) - - #define BOOST_MPL_MULTICHAR_AT(c,i) \ - (char)(0xff&((unsigned)(c)>>(8*(std::size_t)(i)))) - - #define BOOST_MPL_MULTICHAR_PUSH_BACK(c,i) \ - ((((unsigned char)(i))<<(BOOST_MPL_MULTICHAR_LENGTH(c)*8))|(unsigned)(c)) - - #define BOOST_MPL_MULTICHAR_PUSH_FRONT(c,i) \ - (((unsigned)(c)<<8)|(unsigned char)(i)) - - #define BOOST_MPL_MULTICHAR_POP_BACK(c) \ - (((1<<((BOOST_MPL_MULTICHAR_LENGTH(c)-1)*8))-1)&(unsigned)(c)) - - #define BOOST_MPL_MULTICHAR_POP_FRONT(c) \ - ((unsigned)(c)>>8) - - #else - - #define BOOST_MPL_MULTICHAR_AT(c,i) \ - (char)(0xff&((unsigned)(c)>>(8*(BOOST_MPL_MULTICHAR_LENGTH(c)-(std::size_t)(i)-1)))) - - #define BOOST_MPL_MULTICHAR_PUSH_BACK(c,i) \ - (((unsigned)(c)<<8)|(unsigned char)(i)) - - #define BOOST_MPL_MULTICHAR_PUSH_FRONT(c,i) \ - ((((unsigned char)(i))<<(BOOST_MPL_MULTICHAR_LENGTH(c)*8))|(unsigned)(c)) - - #define BOOST_MPL_MULTICHAR_POP_BACK(c) \ - ((unsigned)(c)>>8) - - #define BOOST_MPL_MULTICHAR_POP_FRONT(c) \ - (((1<<((BOOST_MPL_MULTICHAR_LENGTH(c)-1)*8))-1)&(unsigned)(c)) - - #endif - - struct string_tag; - struct string_iterator_tag; - - template - struct string; - - template - struct string_iterator; - - template - struct sequence_tag; - - template - struct size_impl; - - template<> - struct size_impl - { - template - struct apply; - - #define M0(z, n, data) \ - + BOOST_MPL_MULTICHAR_LENGTH(BOOST_PP_CAT(C,n)) - - #define M1(z, n, data) \ - template \ - struct apply > \ - : mpl::size_t<(0 BOOST_PP_REPEAT_ ## z(n, M0, ~))> \ - {}; - - BOOST_PP_REPEAT_FROM_TO(1, BOOST_PP_INC(BOOST_MPL_STRING_MAX_PARAMS), M1, ~) - #undef M0 - #undef M1 - }; - - template<> - struct size_impl::apply > - : mpl::size_t<0> - {}; - - template - struct begin_impl; - - template<> - struct begin_impl - { - template - struct apply - { - typedef mpl::string_iterator type; - }; - }; - - template - struct end_impl; - - template<> - struct end_impl - { - template - struct apply; - - #define M0(z,n,data) \ - template \ - struct apply > \ - { \ - typedef mpl::string_iterator, n, 0> type; \ - }; - - BOOST_PP_REPEAT_FROM_TO(1, BOOST_PP_INC(BOOST_MPL_STRING_MAX_PARAMS), M0, ~) - #undef M0 - }; - - template<> - struct end_impl::apply > - { - typedef mpl::string_iterator, 0, 0> type; - }; - - template - struct push_back_impl; - - template<> - struct push_back_impl - { - template - struct apply - { - BOOST_MPL_ASSERT_MSG( - (BOOST_MPL_LIMIT_STRING_SIZE != mpl::size::type::value) - , PUSH_BACK_FAILED_MPL_STRING_IS_FULL - , (Sequence) - ); - // If the above assertion didn't fire, then the string is sparse. - // Repack the string and retry the push_back - typedef - typename mpl::push_back< - typename mpl::copy< - Sequence - , mpl::back_inserter > - >::type - , Value - >::type - type; - }; - - template - struct apply, Value, false> - { - typedef mpl::string<(char)Value::value> type; - }; - - #define M0(z,n,data) \ - template \ - struct apply, Value, false> \ - { \ - typedef \ - mpl::string< \ - BOOST_PP_ENUM_PARAMS_Z(z, BOOST_PP_DEC(n), C) \ - BOOST_PP_COMMA_IF(BOOST_PP_DEC(n)) \ - ((unsigned)BOOST_PP_CAT(C,BOOST_PP_DEC(n))>0xffffff) \ - ?BOOST_PP_CAT(C,BOOST_PP_DEC(n)) \ - :BOOST_MPL_MULTICHAR_PUSH_BACK(BOOST_PP_CAT(C,BOOST_PP_DEC(n)), Value::value) \ - , ((unsigned)BOOST_PP_CAT(C,BOOST_PP_DEC(n))>0xffffff) \ - ?(char)Value::value \ - :0 \ - > \ - type; \ - }; - - BOOST_PP_REPEAT_FROM_TO(1, BOOST_MPL_STRING_MAX_PARAMS, M0, ~) - #undef M0 - - template - struct apply, Value, false> - { - typedef - mpl::string< - BOOST_PP_ENUM_PARAMS(BOOST_PP_DEC(BOOST_MPL_STRING_MAX_PARAMS), C) - , BOOST_MPL_MULTICHAR_PUSH_BACK(BOOST_PP_CAT(C,BOOST_PP_DEC(BOOST_MPL_STRING_MAX_PARAMS)), Value::value) - > - type; - }; - }; - - template - struct has_push_back_impl; - - template<> - struct has_push_back_impl - { - template - struct apply - : mpl::true_ - {}; - }; - - template - struct pop_back_impl; - - template<> - struct pop_back_impl - { - template - struct apply; - - #define M0(z,n,data) \ - template \ - struct apply > \ - { \ - BOOST_MPL_ASSERT_MSG((C0 != 0), POP_BACK_FAILED_MPL_STRING_IS_EMPTY, (mpl::string<>)); \ - typedef \ - mpl::string< \ - BOOST_PP_ENUM_PARAMS_Z(z, BOOST_PP_DEC(n), C) \ - BOOST_PP_COMMA_IF(BOOST_PP_DEC(n)) \ - BOOST_MPL_MULTICHAR_POP_BACK(BOOST_PP_CAT(C,BOOST_PP_DEC(n))) \ - > \ - type; \ - }; - - BOOST_PP_REPEAT_FROM_TO(1, BOOST_PP_INC(BOOST_MPL_STRING_MAX_PARAMS), M0, ~) - #undef M0 - }; - - template - struct has_pop_back_impl; - - template<> - struct has_pop_back_impl - { - template - struct apply - : mpl::true_ - {}; - }; - - template - struct push_front_impl; - - template<> - struct push_front_impl - { - template - struct apply - { - BOOST_MPL_ASSERT_MSG( - (BOOST_MPL_LIMIT_STRING_SIZE != mpl::size::type::value) - , PUSH_FRONT_FAILED_MPL_STRING_IS_FULL - , (Sequence) - ); - // If the above assertion didn't fire, then the string is sparse. - // Repack the string and retry the push_front. - typedef - typename mpl::push_front< - typename mpl::reverse_copy< - Sequence - , mpl::front_inserter > - >::type - , Value - >::type - type; - }; - - #if !BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x590)) - template - struct apply, Value, false> - { - typedef mpl::string<(char)Value::value> type; - }; - #endif - - #define M0(z,n,data) \ - template \ - struct apply, Value, true> \ - { \ - typedef \ - mpl::string< \ - (char)Value::value \ - BOOST_PP_ENUM_TRAILING_PARAMS_Z(z, n, C) \ - > \ - type; \ - }; - - BOOST_PP_REPEAT_FROM_TO(1, BOOST_MPL_STRING_MAX_PARAMS, M0, ~) - #undef M0 - - template - struct apply, Value, false> - { - typedef - mpl::string< - BOOST_MPL_MULTICHAR_PUSH_FRONT(C0, Value::value) - , BOOST_PP_ENUM_SHIFTED_PARAMS(BOOST_MPL_STRING_MAX_PARAMS, C) - > - type0; - - #if BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x590)) - typedef - typename mpl::if_< - mpl::empty > - , mpl::string<(char)Value::value> - , type0 - >::type - type; - #else - typedef type0 type; - #endif - }; - }; - - template - struct has_push_front_impl; - - template<> - struct has_push_front_impl - { - template - struct apply - : mpl::true_ - {}; - }; - - template - struct pop_front_impl; - - template<> - struct pop_front_impl - { - template - struct apply; - - #define M0(z,n,data) \ - template \ - struct apply, true> \ - { \ - BOOST_MPL_ASSERT_MSG((C0 != 0), POP_FRONT_FAILED_MPL_STRING_IS_EMPTY, (mpl::string<>)); \ - typedef \ - mpl::string \ - type; \ - }; - - BOOST_PP_REPEAT_FROM_TO(1, BOOST_MPL_STRING_MAX_PARAMS, M0, ~) - #undef M0 - - template - struct apply, false> - { - typedef - mpl::string< - BOOST_MPL_MULTICHAR_POP_FRONT(C0) - , BOOST_PP_ENUM_SHIFTED_PARAMS(BOOST_MPL_STRING_MAX_PARAMS, C) - > - type; - }; - }; - - template - struct has_pop_front_impl; - - template<> - struct has_pop_front_impl - { - template - struct apply - : mpl::true_ - {}; - }; - - template - struct insert_range_impl; - - template<> - struct insert_range_impl - { - template - struct apply - : mpl::copy< - mpl::joint_view< - mpl::iterator_range< - mpl::string_iterator - , Pos - > - , mpl::joint_view< - Range - , mpl::iterator_range< - Pos - , typename mpl::end::type - > - > - > - , mpl::back_inserter > - > - {}; - }; - - template - struct insert_impl; - - template<> - struct insert_impl - { - template - struct apply - : mpl::insert_range > - {}; - }; - - template - struct erase_impl; - - template<> - struct erase_impl - { - template - struct apply - : mpl::copy< - mpl::joint_view< - mpl::iterator_range< - mpl::string_iterator - , First - > - , mpl::iterator_range< - typename mpl::if_na::type>::type - , typename mpl::end::type - > - > - , mpl::back_inserter > - > - {}; - }; - - template - struct clear_impl; - - template<> - struct clear_impl - { - template - struct apply - { - typedef mpl::string<> type; - }; - }; - - #define M0(z, n, data) \ - template \ - struct string_iterator, n, J> \ - { \ - enum { eomc_ = (BOOST_MPL_MULTICHAR_LENGTH(BOOST_PP_CAT(C, n)) == J + 1) }; \ - typedef mpl::string string; \ - typedef std::bidirectional_iterator_tag category; \ - typedef \ - mpl::string_iterator \ - next; \ - typedef \ - mpl::string_iterator \ - prior; \ - typedef mpl::char_ type; \ - }; \ - template \ - struct string_iterator, n, 0> \ - { \ - enum { eomc_ = (BOOST_MPL_MULTICHAR_LENGTH(BOOST_PP_CAT(C, n)) == 1) }; \ - typedef mpl::string string; \ - typedef std::bidirectional_iterator_tag category; \ - typedef \ - mpl::string_iterator \ - next; \ - typedef \ - mpl::string_iterator< \ - string \ - , n - 1 \ - , BOOST_MPL_MULTICHAR_LENGTH(BOOST_PP_CAT(C, BOOST_PP_DEC(n))) - 1 \ - > \ - prior; \ - typedef mpl::char_ type; \ - }; - - BOOST_PP_REPEAT(BOOST_MPL_STRING_MAX_PARAMS, M0, ~) - #undef M0 - - template - struct string - { - /// INTERNAL ONLY - enum - { - front_ = C0 - , back_ = BOOST_PP_CAT(C, BOOST_PP_DEC(BOOST_MPL_STRING_MAX_PARAMS)) - }; - - typedef char value_type; - typedef string type; - typedef string_tag tag; - }; - - namespace aux_ - { - template - struct next_unless - : mpl::next - {}; - - template - struct next_unless - { - typedef End type; - }; - - template - struct deref_unless - : mpl::deref - {}; - - template - struct deref_unless - { - typedef mpl::char_<'\0'> type; - }; - } - - template - struct c_str - { - typedef typename mpl::end::type iend; - typedef typename mpl::begin::type i0; - #define M0(z, n, data) \ - typedef \ - typename mpl::aux_::next_unless::type \ - BOOST_PP_CAT(i, BOOST_PP_INC(n)); - BOOST_PP_REPEAT(BOOST_MPL_LIMIT_STRING_SIZE, M0, ~) - #undef M0 - - typedef c_str type; - static typename Sequence::value_type const value[BOOST_MPL_LIMIT_STRING_SIZE+1]; - }; - - template - typename Sequence::value_type const c_str::value[BOOST_MPL_LIMIT_STRING_SIZE+1] = - { - #define M0(z, n, data) \ - mpl::aux_::deref_unless::type::value, - BOOST_PP_REPEAT(BOOST_MPL_LIMIT_STRING_SIZE, M0, ~) - #undef M0 - '\0' - }; - -}} // namespace boost - -#endif // BOOST_MPL_STRING_HPP_INCLUDED diff --git a/3rdparty/boost/boost/preprocessor/arithmetic/div.hpp b/3rdparty/boost/boost/preprocessor/arithmetic/div.hpp deleted file mode 100644 index 277596cea9..0000000000 --- a/3rdparty/boost/boost/preprocessor/arithmetic/div.hpp +++ /dev/null @@ -1,39 +0,0 @@ -# /* Copyright (C) 2001 -# * Housemarque Oy -# * http://www.housemarque.com -# * -# * Distributed under the Boost Software License, Version 1.0. (See -# * accompanying file LICENSE_1_0.txt or copy at -# * http://www.boost.org/LICENSE_1_0.txt) -# */ -# -# /* Revised by Paul Mensonides (2002) */ -# -# /* See http://www.boost.org for most recent version. */ -# -# ifndef BOOST_PREPROCESSOR_ARITHMETIC_DIV_HPP -# define BOOST_PREPROCESSOR_ARITHMETIC_DIV_HPP -# -# include -# include -# include -# -# /* BOOST_PP_DIV */ -# -# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() -# define BOOST_PP_DIV(x, y) BOOST_PP_TUPLE_ELEM(3, 0, BOOST_PP_DIV_BASE(x, y)) -# else -# define BOOST_PP_DIV(x, y) BOOST_PP_DIV_I(x, y) -# define BOOST_PP_DIV_I(x, y) BOOST_PP_TUPLE_ELEM(3, 0, BOOST_PP_DIV_BASE(x, y)) -# endif -# -# /* BOOST_PP_DIV_D */ -# -# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() -# define BOOST_PP_DIV_D(d, x, y) BOOST_PP_TUPLE_ELEM(3, 0, BOOST_PP_DIV_BASE_D(d, x, y)) -# else -# define BOOST_PP_DIV_D(d, x, y) BOOST_PP_DIV_D_I(d, x, y) -# define BOOST_PP_DIV_D_I(d, x, y) BOOST_PP_TUPLE_ELEM(3, 0, BOOST_PP_DIV_BASE_D(d, x, y)) -# endif -# -# endif diff --git a/3rdparty/boost/boost/token_functions.hpp b/3rdparty/boost/boost/token_functions.hpp deleted file mode 100644 index be245a047f..0000000000 --- a/3rdparty/boost/boost/token_functions.hpp +++ /dev/null @@ -1,651 +0,0 @@ -// Boost token_functions.hpp ------------------------------------------------// - -// Copyright John R. Bandela 2001. - -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/libs/tokenizer/ for documentation. - -// Revision History: -// 01 Oct 2004 Joaquin M Lopez Munoz -// Workaround for a problem with string::assign in msvc-stlport -// 06 Apr 2004 John Bandela -// Fixed a bug involving using char_delimiter with a true input iterator -// 28 Nov 2003 Robert Zeh and John Bandela -// Converted into "fast" functions that avoid using += when -// the supplied iterator isn't an input_iterator; based on -// some work done at Archelon and a version that was checked into -// the boost CVS for a short period of time. -// 20 Feb 2002 John Maddock -// Removed using namespace std declarations and added -// workaround for BOOST_NO_STDC_NAMESPACE (the library -// can be safely mixed with regex). -// 06 Feb 2002 Jeremy Siek -// Added char_separator. -// 02 Feb 2002 Jeremy Siek -// Removed tabs and a little cleanup. - - -#ifndef BOOST_TOKEN_FUNCTIONS_JRB120303_HPP_ -#define BOOST_TOKEN_FUNCTIONS_JRB120303_HPP_ - -#include -#include -#include -#include -#include // for find_if -#include -#include -#include -#include -#include -#if !defined(BOOST_NO_CWCTYPE) -#include -#endif - -// -// the following must not be macros if we are to prefix them -// with std:: (they shouldn't be macros anyway...) -// -#ifdef ispunct -# undef ispunct -#endif -#ifdef iswpunct -# undef iswpunct -#endif -#ifdef isspace -# undef isspace -#endif -#ifdef iswspace -# undef iswspace -#endif -// -// fix namespace problems: -// -#ifdef BOOST_NO_STDC_NAMESPACE -namespace std{ - using ::ispunct; - using ::isspace; -#if !defined(BOOST_NO_CWCTYPE) - using ::iswpunct; - using ::iswspace; -#endif -} -#endif - -namespace boost{ - //=========================================================================== - // The escaped_list_separator class. Which is a model of TokenizerFunction - // An escaped list is a super-set of what is commonly known as a comma - // separated value (csv) list.It is separated into fields by a comma or - // other character. If the delimiting character is inside quotes, then it is - // counted as a regular character.To allow for embedded quotes in a field, - // there can be escape sequences using the \ much like C. - // The role of the comma, the quotation mark, and the escape - // character (backslash \), can be assigned to other characters. - - struct escaped_list_error : public std::runtime_error{ - escaped_list_error(const std::string& what_arg):std::runtime_error(what_arg) { } - }; - - -// The out of the box GCC 2.95 on cygwin does not have a char_traits class. -// MSVC does not like the following typename - template ::traits_type > - class escaped_list_separator { - - private: - typedef std::basic_string string_type; - struct char_eq { - Char e_; - char_eq(Char e):e_(e) { } - bool operator()(Char c) { - return Traits::eq(e_,c); - } - }; - string_type escape_; - string_type c_; - string_type quote_; - bool last_; - - bool is_escape(Char e) { - char_eq f(e); - return std::find_if(escape_.begin(),escape_.end(),f)!=escape_.end(); - } - bool is_c(Char e) { - char_eq f(e); - return std::find_if(c_.begin(),c_.end(),f)!=c_.end(); - } - bool is_quote(Char e) { - char_eq f(e); - return std::find_if(quote_.begin(),quote_.end(),f)!=quote_.end(); - } - template - void do_escape(iterator& next,iterator end,Token& tok) { - if (++next == end) - BOOST_THROW_EXCEPTION(escaped_list_error(std::string("cannot end with escape"))); - if (Traits::eq(*next,'n')) { - tok+='\n'; - return; - } - else if (is_quote(*next)) { - tok+=*next; - return; - } - else if (is_c(*next)) { - tok+=*next; - return; - } - else if (is_escape(*next)) { - tok+=*next; - return; - } - else - BOOST_THROW_EXCEPTION(escaped_list_error(std::string("unknown escape sequence"))); - } - - public: - - explicit escaped_list_separator(Char e = '\\', - Char c = ',',Char q = '\"') - : escape_(1,e), c_(1,c), quote_(1,q), last_(false) { } - - escaped_list_separator(string_type e, string_type c, string_type q) - : escape_(e), c_(c), quote_(q), last_(false) { } - - void reset() {last_=false;} - - template - bool operator()(InputIterator& next,InputIterator end,Token& tok) { - bool bInQuote = false; - tok = Token(); - - if (next == end) { - if (last_) { - last_ = false; - return true; - } - else - return false; - } - last_ = false; - for (;next != end;++next) { - if (is_escape(*next)) { - do_escape(next,end,tok); - } - else if (is_c(*next)) { - if (!bInQuote) { - // If we are not in quote, then we are done - ++next; - // The last character was a c, that means there is - // 1 more blank field - last_ = true; - return true; - } - else tok+=*next; - } - else if (is_quote(*next)) { - bInQuote=!bInQuote; - } - else { - tok += *next; - } - } - return true; - } - }; - - //=========================================================================== - // The classes here are used by offset_separator and char_separator to implement - // faster assigning of tokens using assign instead of += - - namespace tokenizer_detail { - //=========================================================================== - // Tokenizer was broken for wide character separators, at least on Windows, since - // CRT functions isspace etc only expect values in [0, 0xFF]. Debug build asserts - // if higher values are passed in. The traits extension class should take care of this. - // Assuming that the conditional will always get optimized out in the function - // implementations, argument types are not a problem since both forms of character classifiers - // expect an int. - -#if !defined(BOOST_NO_CWCTYPE) - template - struct traits_extension_details : public traits { - typedef typename traits::char_type char_type; - static bool isspace(char_type c) - { - return std::iswspace(c) != 0; - } - static bool ispunct(char_type c) - { - return std::iswpunct(c) != 0; - } - }; - - template - struct traits_extension_details : public traits { - typedef typename traits::char_type char_type; - static bool isspace(char_type c) - { - return std::isspace(c) != 0; - } - static bool ispunct(char_type c) - { - return std::ispunct(c) != 0; - } - }; -#endif - - - // In case there is no cwctype header, we implement the checks manually. - // We make use of the fact that the tested categories should fit in ASCII. - template - struct traits_extension : public traits { - typedef typename traits::char_type char_type; - static bool isspace(char_type c) - { -#if !defined(BOOST_NO_CWCTYPE) - return traits_extension_details::isspace(c); -#else - return static_cast< unsigned >(c) <= 255 && std::isspace(c) != 0; -#endif - } - - static bool ispunct(char_type c) - { -#if !defined(BOOST_NO_CWCTYPE) - return traits_extension_details::ispunct(c); -#else - return static_cast< unsigned >(c) <= 255 && std::ispunct(c) != 0; -#endif - } - }; - - // The assign_or_plus_equal struct contains functions that implement - // assign, +=, and clearing based on the iterator type. The - // generic case does nothing for plus_equal and clearing, while - // passing through the call for assign. - // - // When an input iterator is being used, the situation is reversed. - // The assign method does nothing, plus_equal invokes operator +=, - // and the clearing method sets the supplied token to the default - // token constructor's result. - // - - template - struct assign_or_plus_equal { - template - static void assign(Iterator b, Iterator e, Token &t) { - t.assign(b, e); - } - - template - static void plus_equal(Token &, const Value &) { } - - // If we are doing an assign, there is no need for the - // the clear. - // - template - static void clear(Token &) { } - }; - - template <> - struct assign_or_plus_equal { - template - static void assign(Iterator , Iterator , Token &) { } - template - static void plus_equal(Token &t, const Value &v) { - t += v; - } - template - static void clear(Token &t) { - t = Token(); - } - }; - - - template - struct pointer_iterator_category{ - typedef std::random_access_iterator_tag type; - }; - - - template - struct class_iterator_category{ - typedef typename Iterator::iterator_category type; - }; - - - - // This portably gets the iterator_tag without partial template specialization - template - struct get_iterator_category{ - typedef typename mpl::if_, - pointer_iterator_category, - class_iterator_category - >::type cat; - - typedef typename cat::type iterator_category; - }; - - - } // namespace tokenizer_detail - - - //=========================================================================== - // The offset_separator class, which is a model of TokenizerFunction. - // Offset breaks a string into tokens based on a range of offsets - - class offset_separator { - private: - - std::vector offsets_; - unsigned int current_offset_; - bool wrap_offsets_; - bool return_partial_last_; - - public: - template - offset_separator(Iter begin, Iter end, bool wrap_offsets = true, - bool return_partial_last = true) - : offsets_(begin,end), current_offset_(0), - wrap_offsets_(wrap_offsets), - return_partial_last_(return_partial_last) { } - - offset_separator() - : offsets_(1,1), current_offset_(), - wrap_offsets_(true), return_partial_last_(true) { } - - void reset() { - current_offset_ = 0; - } - - template - bool operator()(InputIterator& next, InputIterator end, Token& tok) - { - typedef tokenizer_detail::assign_or_plus_equal< - BOOST_DEDUCED_TYPENAME tokenizer_detail::get_iterator_category< - InputIterator - >::iterator_category - > assigner; - - BOOST_ASSERT(!offsets_.empty()); - - assigner::clear(tok); - InputIterator start(next); - - if (next == end) - return false; - - if (current_offset_ == offsets_.size()) - { - if (wrap_offsets_) - current_offset_=0; - else - return false; - } - - int c = offsets_[current_offset_]; - int i = 0; - for (; i < c; ++i) { - if (next == end)break; - assigner::plus_equal(tok,*next++); - } - assigner::assign(start,next,tok); - - if (!return_partial_last_) - if (i < (c-1) ) - return false; - - ++current_offset_; - return true; - } - }; - - - //=========================================================================== - // The char_separator class breaks a sequence of characters into - // tokens based on the character delimiters (very much like bad old - // strtok). A delimiter character can either be kept or dropped. A - // kept delimiter shows up as an output token, whereas a dropped - // delimiter does not. - - // This class replaces the char_delimiters_separator class. The - // constructor for the char_delimiters_separator class was too - // confusing and needed to be deprecated. However, because of the - // default arguments to the constructor, adding the new constructor - // would cause ambiguity, so instead I deprecated the whole class. - // The implementation of the class was also simplified considerably. - - enum empty_token_policy { drop_empty_tokens, keep_empty_tokens }; - - // The out of the box GCC 2.95 on cygwin does not have a char_traits class. - template ::traits_type > - class char_separator - { - typedef tokenizer_detail::traits_extension Traits; - typedef std::basic_string string_type; - public: - explicit - char_separator(const Char* dropped_delims, - const Char* kept_delims = 0, - empty_token_policy empty_tokens = drop_empty_tokens) - : m_dropped_delims(dropped_delims), - m_use_ispunct(false), - m_use_isspace(false), - m_empty_tokens(empty_tokens), - m_output_done(false) - { - // Borland workaround - if (kept_delims) - m_kept_delims = kept_delims; - } - - // use ispunct() for kept delimiters and isspace for dropped. - explicit - char_separator() - : m_use_ispunct(true), - m_use_isspace(true), - m_empty_tokens(drop_empty_tokens) { } - - void reset() { } - - template - bool operator()(InputIterator& next, InputIterator end, Token& tok) - { - typedef tokenizer_detail::assign_or_plus_equal< - BOOST_DEDUCED_TYPENAME tokenizer_detail::get_iterator_category< - InputIterator - >::iterator_category - > assigner; - - assigner::clear(tok); - - // skip past all dropped_delims - if (m_empty_tokens == drop_empty_tokens) - for (; next != end && is_dropped(*next); ++next) - { } - - InputIterator start(next); - - if (m_empty_tokens == drop_empty_tokens) { - - if (next == end) - return false; - - - // if we are on a kept_delims move past it and stop - if (is_kept(*next)) { - assigner::plus_equal(tok,*next); - ++next; - } else - // append all the non delim characters - for (; next != end && !is_dropped(*next) && !is_kept(*next); ++next) - assigner::plus_equal(tok,*next); - } - else { // m_empty_tokens == keep_empty_tokens - - // Handle empty token at the end - if (next == end) - { - if (m_output_done == false) - { - m_output_done = true; - assigner::assign(start,next,tok); - return true; - } - else - return false; - } - - if (is_kept(*next)) { - if (m_output_done == false) - m_output_done = true; - else { - assigner::plus_equal(tok,*next); - ++next; - m_output_done = false; - } - } - else if (m_output_done == false && is_dropped(*next)) { - m_output_done = true; - } - else { - if (is_dropped(*next)) - start=++next; - for (; next != end && !is_dropped(*next) && !is_kept(*next); ++next) - assigner::plus_equal(tok,*next); - m_output_done = true; - } - } - assigner::assign(start,next,tok); - return true; - } - - private: - string_type m_kept_delims; - string_type m_dropped_delims; - bool m_use_ispunct; - bool m_use_isspace; - empty_token_policy m_empty_tokens; - bool m_output_done; - - bool is_kept(Char E) const - { - if (m_kept_delims.length()) - return m_kept_delims.find(E) != string_type::npos; - else if (m_use_ispunct) { - return Traits::ispunct(E) != 0; - } else - return false; - } - bool is_dropped(Char E) const - { - if (m_dropped_delims.length()) - return m_dropped_delims.find(E) != string_type::npos; - else if (m_use_isspace) { - return Traits::isspace(E) != 0; - } else - return false; - } - }; - - //=========================================================================== - // The following class is DEPRECATED, use class char_separators instead. - // - // The char_delimiters_separator class, which is a model of - // TokenizerFunction. char_delimiters_separator breaks a string - // into tokens based on character delimiters. There are 2 types of - // delimiters. returnable delimiters can be returned as - // tokens. These are often punctuation. nonreturnable delimiters - // cannot be returned as tokens. These are often whitespace - - // The out of the box GCC 2.95 on cygwin does not have a char_traits class. - template ::traits_type > - class char_delimiters_separator { - private: - - typedef tokenizer_detail::traits_extension Traits; - typedef std::basic_string string_type; - string_type returnable_; - string_type nonreturnable_; - bool return_delims_; - bool no_ispunct_; - bool no_isspace_; - - bool is_ret(Char E)const - { - if (returnable_.length()) - return returnable_.find(E) != string_type::npos; - else{ - if (no_ispunct_) {return false;} - else{ - int r = Traits::ispunct(E); - return r != 0; - } - } - } - bool is_nonret(Char E)const - { - if (nonreturnable_.length()) - return nonreturnable_.find(E) != string_type::npos; - else{ - if (no_isspace_) {return false;} - else{ - int r = Traits::isspace(E); - return r != 0; - } - } - } - - public: - explicit char_delimiters_separator(bool return_delims = false, - const Char* returnable = 0, - const Char* nonreturnable = 0) - : returnable_(returnable ? returnable : string_type().c_str()), - nonreturnable_(nonreturnable ? nonreturnable:string_type().c_str()), - return_delims_(return_delims), no_ispunct_(returnable!=0), - no_isspace_(nonreturnable!=0) { } - - void reset() { } - - public: - - template - bool operator()(InputIterator& next, InputIterator end,Token& tok) { - tok = Token(); - - // skip past all nonreturnable delims - // skip past the returnable only if we are not returning delims - for (;next!=end && ( is_nonret(*next) || (is_ret(*next) - && !return_delims_ ) );++next) { } - - if (next == end) { - return false; - } - - // if we are to return delims and we are one a returnable one - // move past it and stop - if (is_ret(*next) && return_delims_) { - tok+=*next; - ++next; - } - else - // append all the non delim characters - for (;next!=end && !is_nonret(*next) && !is_ret(*next);++next) - tok+=*next; - - - return true; - } - }; - - -} //namespace boost - -#endif diff --git a/3rdparty/boost/boost/token_iterator.hpp b/3rdparty/boost/boost/token_iterator.hpp deleted file mode 100644 index 584fac28f4..0000000000 --- a/3rdparty/boost/boost/token_iterator.hpp +++ /dev/null @@ -1,128 +0,0 @@ -// Boost token_iterator.hpp -------------------------------------------------// - -// Copyright John R. Bandela 2001 -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/libs/tokenizer for documentation. - -// Revision History: -// 16 Jul 2003 John Bandela -// Allowed conversions from convertible base iterators -// 03 Jul 2003 John Bandela -// Converted to new iterator adapter - - - -#ifndef BOOST_TOKENIZER_POLICY_JRB070303_HPP_ -#define BOOST_TOKENIZER_POLICY_JRB070303_HPP_ - -#include -#include -#include -#include -#include - -namespace boost -{ - template - class token_iterator - : public iterator_facade< - token_iterator - , Type - , typename iterators::minimum_category< - forward_traversal_tag - , typename iterator_traversal::type - >::type - , const Type& - > - { - - friend class iterator_core_access; - - TokenizerFunc f_; - Iterator begin_; - Iterator end_; - bool valid_; - Type tok_; - - void increment(){ - BOOST_ASSERT(valid_); - valid_ = f_(begin_,end_,tok_); - } - - const Type& dereference() const { - BOOST_ASSERT(valid_); - return tok_; - } - template - bool equal(const Other& a) const{ - return (a.valid_ && valid_) - ?( (a.begin_==begin_) && (a.end_ == end_) ) - :(a.valid_==valid_); - - } - - void initialize(){ - if(valid_) return; - f_.reset(); - valid_ = (begin_ != end_)? - f_(begin_,end_,tok_):false; - } - public: - token_iterator():begin_(),end_(),valid_(false),tok_() { } - - token_iterator(TokenizerFunc f, Iterator begin, Iterator e = Iterator()) - : f_(f),begin_(begin),end_(e),valid_(false),tok_(){ initialize(); } - - token_iterator(Iterator begin, Iterator e = Iterator()) - : f_(),begin_(begin),end_(e),valid_(false),tok_() {initialize();} - - template - token_iterator( - token_iterator const& t - , typename enable_if_convertible::type* = 0) - : f_(t.tokenizer_function()),begin_(t.base()) - ,end_(t.end()),valid_(!t.at_end()),tok_(t.current_token()) {} - - Iterator base()const{return begin_;} - - Iterator end()const{return end_;} - - TokenizerFunc tokenizer_function()const{return f_;} - - Type current_token()const{return tok_;} - - bool at_end()const{return !valid_;} - - - - - }; - template < - class TokenizerFunc = char_delimiters_separator, - class Iterator = std::string::const_iterator, - class Type = std::string - > - class token_iterator_generator { - - private: - public: - typedef token_iterator type; - }; - - - // Type has to be first because it needs to be explicitly specified - // because there is no way the function can deduce it. - template - typename token_iterator_generator::type - make_token_iterator(Iterator begin, Iterator end,const TokenizerFunc& fun){ - typedef typename - token_iterator_generator::type ret_type; - return ret_type(fun,begin,end); - } - -} // namespace boost - -#endif diff --git a/3rdparty/boost/boost/tokenizer.hpp b/3rdparty/boost/boost/tokenizer.hpp deleted file mode 100644 index 081e5ba2f7..0000000000 --- a/3rdparty/boost/boost/tokenizer.hpp +++ /dev/null @@ -1,98 +0,0 @@ -// Boost tokenizer.hpp -----------------------------------------------------// - -// (c) Copyright Jeremy Siek and John R. Bandela 2001. - -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/libs/tokenizer for documenation - -// Revision History: -// 03 Jul 2003 John Bandela -// Converted to new iterator adapter -// 02 Feb 2002 Jeremy Siek -// Removed tabs and a little cleanup. - -#ifndef BOOST_TOKENIZER_JRB070303_HPP_ -#define BOOST_TOKENIZER_JRB070303_HPP_ - -#include - -namespace boost { - - - //=========================================================================== - // A container-view of a tokenized "sequence" - template < - typename TokenizerFunc = char_delimiters_separator, - typename Iterator = std::string::const_iterator, - typename Type = std::string - > - class tokenizer { - private: - typedef token_iterator_generator TGen; - - // It seems that MSVC does not like the unqualified use of iterator, - // Thus we use iter internally when it is used unqualified and - // the users of this class will always qualify iterator. - typedef typename TGen::type iter; - - public: - - typedef iter iterator; - typedef iter const_iterator; - typedef Type value_type; - typedef value_type& reference; - typedef const value_type& const_reference; - typedef value_type* pointer; - typedef const pointer const_pointer; - typedef void size_type; - typedef void difference_type; - - tokenizer(Iterator first, Iterator last, - const TokenizerFunc& f = TokenizerFunc()) - : first_(first), last_(last), f_(f) { } - - template - tokenizer(const Container& c) - : first_(c.begin()), last_(c.end()), f_() { } - - template - tokenizer(const Container& c,const TokenizerFunc& f) - : first_(c.begin()), last_(c.end()), f_(f) { } - - void assign(Iterator first, Iterator last){ - first_ = first; - last_ = last; - } - - void assign(Iterator first, Iterator last, const TokenizerFunc& f){ - assign(first,last); - f_ = f; - } - - template - void assign(const Container& c){ - assign(c.begin(),c.end()); - } - - - template - void assign(const Container& c, const TokenizerFunc& f){ - assign(c.begin(),c.end(),f); - } - - iter begin() const { return iter(f_,first_,last_); } - iter end() const { return iter(f_,last_,last_); } - - private: - Iterator first_; - Iterator last_; - TokenizerFunc f_; - }; - - -} // namespace boost - -#endif diff --git a/3rdparty/boost/boost/type_traits/same_traits.hpp b/3rdparty/boost/boost/type_traits/same_traits.hpp deleted file mode 100644 index dab7dac783..0000000000 --- a/3rdparty/boost/boost/type_traits/same_traits.hpp +++ /dev/null @@ -1,15 +0,0 @@ -// (C) Copyright Steve Cleary, Beman Dawes, Aleksey Gurtovoy, Howard Hinnant & John Maddock 2000. -// Use, modification and distribution are subject to the Boost Software License, -// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt). -// -// See http://www.boost.org/libs/type_traits for most recent version including documentation. -// -// defines is_same: - -#ifndef BOOST_TT_SAME_TRAITS_HPP_INCLUDED -#define BOOST_TT_SAME_TRAITS_HPP_INCLUDED - -#include - -#endif // BOOST_TT_SAME_TRAITS_HPP_INCLUDED diff --git a/3rdparty/boost/extract.sh b/3rdparty/boost/extract.sh index 2fa7bc8371..e1ba8faafe 100755 --- a/3rdparty/boost/extract.sh +++ b/3rdparty/boost/extract.sh @@ -25,24 +25,17 @@ bcp --boost=$1 \ boost/bind.hpp \ boost/crc.hpp \ boost/cstdint.hpp \ - boost/format.hpp \ boost/function.hpp \ boost/functional.hpp \ boost/lexical_cast.hpp \ boost/noncopyable.hpp \ boost/regex.hpp \ - boost/scoped_array.hpp \ boost/scoped_ptr.hpp \ boost/shared_ptr.hpp \ boost/signal.hpp \ boost/signals/connection.hpp \ boost/signals/trackable.hpp \ - boost/tokenizer.hpp \ boost/tuple/tuple.hpp \ - boost/mpl/string.hpp \ - boost/mpl/fold.hpp \ - boost/mpl/size_t.hpp \ - boost/functional/hash.hpp \ \ needed diff --git a/3rdparty/hunspell/Makefile.am b/3rdparty/hunspell/Makefile.am index a4e3aeb373..8a5b31283c 100644 --- a/3rdparty/hunspell/Makefile.am +++ b/3rdparty/hunspell/Makefile.am @@ -1,8 +1,5 @@ include $(top_srcdir)/config/common.am -# This is prepared for compilation, but currently only used for packaging, -# because configure support for compilation is still missing. - noinst_LIBRARIES = liblyxhunspell.a EXTRA_DIST = \ @@ -20,7 +17,10 @@ EXTRA_DIST = \ 1.3.3/src/hunspell/license.hunspell \ 1.3.3/src/hunspell/license.myspell \ 1.3.3/src/hunspell/makefile.mk \ - 1.3.3/src/hunspell/README + 1.3.3/src/hunspell/README \ + 1.3.3/src/hunspell/utf_info.cxx + +AM_CPPFLAGS += -DHUNSPELL_STATIC liblyxhunspell_a_SOURCES = \ 1.3.3/src/hunspell/affentry.cxx \ @@ -51,7 +51,6 @@ liblyxhunspell_a_SOURCES = \ 1.3.3/src/hunspell/replist.hxx \ 1.3.3/src/hunspell/suggestmgr.cxx \ 1.3.3/src/hunspell/suggestmgr.hxx \ - 1.3.3/src/hunspell/utf_info.cxx \ 1.3.3/src/hunspell/w_char.hxx \ 1.3.3/src/parsers/firstparser.cxx \ 1.3.3/src/parsers/firstparser.hxx \ diff --git a/3rdparty/libiconv/Makefile.am b/3rdparty/libiconv/Makefile.am index d965f380f1..d03032d131 100644 --- a/3rdparty/libiconv/Makefile.am +++ b/3rdparty/libiconv/Makefile.am @@ -1,10 +1,7 @@ include $(top_srcdir)/config/common.am -# This is prepared for compilation, but currently only used for packaging, -# because configure support for compilation is still missing. - # We do not build right now -#noinst_LIBRARIES = liblyxiconv.a +noinst_LIBRARIES = liblyxiconv.a EXTRA_DIST = \ CMakeLists.txt \ @@ -33,11 +30,15 @@ EXTRA_DIST = \ 1.14/libcharset/lib/ref-add.sin \ 1.14/libcharset/lib/ref-del.sin -# If/when we decide to build, this will do in liblyxiconv_a_SOURCES -# But for now it confuses automake < 1.14, where we do not use subdir-objects. -# The issue here is that there are two relocatable.c files, and they would -# create the same .o file. -EXTRA_DIST += \ +AM_CPPFLAGS += -I$(srcdir)/1.14/srclib -DLIBDIR="" + +# The two relocatable.c files confuse automake < 1.14, where we do not use +# subdir-objects. Therefore we cannot put both in liblyxiconv_a_SOURCES +# (they would both create the same .o file). Fortunately their contents is +# identical, so it is enough to build only one. +EXTRA_DIST += 1.14/libcharset/lib/relocatable.c + +liblyxiconv_a_SOURCES = \ 1.14/include/export.h \ 1.14/lib/aliases2.h \ 1.14/lib/aliases_aix.h \ @@ -263,7 +264,6 @@ EXTRA_DIST += \ 1.14/lib/viscii.h \ 1.14/libcharset/include/export.h \ 1.14/libcharset/lib/localcharset.c \ - 1.14/libcharset/lib/relocatable.c \ 1.14/libcharset/lib/relocatable.h \ 1.14/srclib/localcharset.h \ 1.14/srclib/unitypes.in.h \ diff --git a/3rdparty/zlib/1.2.8/zconf.h.in b/3rdparty/zlib/1.2.8/zconf.h.in new file mode 100644 index 0000000000..9987a77553 --- /dev/null +++ b/3rdparty/zlib/1.2.8/zconf.h.in @@ -0,0 +1,511 @@ +/* zconf.h -- configuration of the zlib compression library + * Copyright (C) 1995-2013 Jean-loup Gailly. + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* @(#) $Id$ */ + +#ifndef ZCONF_H +#define ZCONF_H + +/* + * If you *really* need a unique prefix for all types and library functions, + * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. + * Even better than compiling with -DZ_PREFIX would be to use configure to set + * this permanently in zconf.h using "./configure --zprefix". + */ +#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */ +# define Z_PREFIX_SET + +/* all linked symbols */ +# define _dist_code z__dist_code +# define _length_code z__length_code +# define _tr_align z__tr_align +# define _tr_flush_bits z__tr_flush_bits +# define _tr_flush_block z__tr_flush_block +# define _tr_init z__tr_init +# define _tr_stored_block z__tr_stored_block +# define _tr_tally z__tr_tally +# define adler32 z_adler32 +# define adler32_combine z_adler32_combine +# define adler32_combine64 z_adler32_combine64 +# ifndef Z_SOLO +# define compress z_compress +# define compress2 z_compress2 +# define compressBound z_compressBound +# endif +# define crc32 z_crc32 +# define crc32_combine z_crc32_combine +# define crc32_combine64 z_crc32_combine64 +# define deflate z_deflate +# define deflateBound z_deflateBound +# define deflateCopy z_deflateCopy +# define deflateEnd z_deflateEnd +# define deflateInit2_ z_deflateInit2_ +# define deflateInit_ z_deflateInit_ +# define deflateParams z_deflateParams +# define deflatePending z_deflatePending +# define deflatePrime z_deflatePrime +# define deflateReset z_deflateReset +# define deflateResetKeep z_deflateResetKeep +# define deflateSetDictionary z_deflateSetDictionary +# define deflateSetHeader z_deflateSetHeader +# define deflateTune z_deflateTune +# define deflate_copyright z_deflate_copyright +# define get_crc_table z_get_crc_table +# ifndef Z_SOLO +# define gz_error z_gz_error +# define gz_intmax z_gz_intmax +# define gz_strwinerror z_gz_strwinerror +# define gzbuffer z_gzbuffer +# define gzclearerr z_gzclearerr +# define gzclose z_gzclose +# define gzclose_r z_gzclose_r +# define gzclose_w z_gzclose_w +# define gzdirect z_gzdirect +# define gzdopen z_gzdopen +# define gzeof z_gzeof +# define gzerror z_gzerror +# define gzflush z_gzflush +# define gzgetc z_gzgetc +# define gzgetc_ z_gzgetc_ +# define gzgets z_gzgets +# define gzoffset z_gzoffset +# define gzoffset64 z_gzoffset64 +# define gzopen z_gzopen +# define gzopen64 z_gzopen64 +# ifdef _WIN32 +# define gzopen_w z_gzopen_w +# endif +# define gzprintf z_gzprintf +# define gzvprintf z_gzvprintf +# define gzputc z_gzputc +# define gzputs z_gzputs +# define gzread z_gzread +# define gzrewind z_gzrewind +# define gzseek z_gzseek +# define gzseek64 z_gzseek64 +# define gzsetparams z_gzsetparams +# define gztell z_gztell +# define gztell64 z_gztell64 +# define gzungetc z_gzungetc +# define gzwrite z_gzwrite +# endif +# define inflate z_inflate +# define inflateBack z_inflateBack +# define inflateBackEnd z_inflateBackEnd +# define inflateBackInit_ z_inflateBackInit_ +# define inflateCopy z_inflateCopy +# define inflateEnd z_inflateEnd +# define inflateGetHeader z_inflateGetHeader +# define inflateInit2_ z_inflateInit2_ +# define inflateInit_ z_inflateInit_ +# define inflateMark z_inflateMark +# define inflatePrime z_inflatePrime +# define inflateReset z_inflateReset +# define inflateReset2 z_inflateReset2 +# define inflateSetDictionary z_inflateSetDictionary +# define inflateGetDictionary z_inflateGetDictionary +# define inflateSync z_inflateSync +# define inflateSyncPoint z_inflateSyncPoint +# define inflateUndermine z_inflateUndermine +# define inflateResetKeep z_inflateResetKeep +# define inflate_copyright z_inflate_copyright +# define inflate_fast z_inflate_fast +# define inflate_table z_inflate_table +# ifndef Z_SOLO +# define uncompress z_uncompress +# endif +# define zError z_zError +# ifndef Z_SOLO +# define zcalloc z_zcalloc +# define zcfree z_zcfree +# endif +# define zlibCompileFlags z_zlibCompileFlags +# define zlibVersion z_zlibVersion + +/* all zlib typedefs in zlib.h and zconf.h */ +# define Byte z_Byte +# define Bytef z_Bytef +# define alloc_func z_alloc_func +# define charf z_charf +# define free_func z_free_func +# ifndef Z_SOLO +# define gzFile z_gzFile +# endif +# define gz_header z_gz_header +# define gz_headerp z_gz_headerp +# define in_func z_in_func +# define intf z_intf +# define out_func z_out_func +# define uInt z_uInt +# define uIntf z_uIntf +# define uLong z_uLong +# define uLongf z_uLongf +# define voidp z_voidp +# define voidpc z_voidpc +# define voidpf z_voidpf + +/* all zlib structs in zlib.h and zconf.h */ +# define gz_header_s z_gz_header_s +# define internal_state z_internal_state + +#endif + +#if defined(__MSDOS__) && !defined(MSDOS) +# define MSDOS +#endif +#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2) +# define OS2 +#endif +#if defined(_WINDOWS) && !defined(WINDOWS) +# define WINDOWS +#endif +#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__) +# ifndef WIN32 +# define WIN32 +# endif +#endif +#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32) +# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__) +# ifndef SYS16BIT +# define SYS16BIT +# endif +# endif +#endif + +/* + * Compile with -DMAXSEG_64K if the alloc function cannot allocate more + * than 64k bytes at a time (needed on systems with 16-bit int). + */ +#ifdef SYS16BIT +# define MAXSEG_64K +#endif +#ifdef MSDOS +# define UNALIGNED_OK +#endif + +#ifdef __STDC_VERSION__ +# ifndef STDC +# define STDC +# endif +# if __STDC_VERSION__ >= 199901L +# ifndef STDC99 +# define STDC99 +# endif +# endif +#endif +#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus)) +# define STDC +#endif +#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__)) +# define STDC +#endif +#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32)) +# define STDC +#endif +#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__)) +# define STDC +#endif + +#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */ +# define STDC +#endif + +#ifndef STDC +# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */ +# define const /* note: need a more gentle solution here */ +# endif +#endif + +#if defined(ZLIB_CONST) && !defined(z_const) +# define z_const const +#else +# define z_const +#endif + +/* Some Mac compilers merge all .h files incorrectly: */ +#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__) +# define NO_DUMMY_DECL +#endif + +/* Maximum value for memLevel in deflateInit2 */ +#ifndef MAX_MEM_LEVEL +# ifdef MAXSEG_64K +# define MAX_MEM_LEVEL 8 +# else +# define MAX_MEM_LEVEL 9 +# endif +#endif + +/* Maximum value for windowBits in deflateInit2 and inflateInit2. + * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files + * created by gzip. (Files created by minigzip can still be extracted by + * gzip.) + */ +#ifndef MAX_WBITS +# define MAX_WBITS 15 /* 32K LZ77 window */ +#endif + +/* The memory requirements for deflate are (in bytes): + (1 << (windowBits+2)) + (1 << (memLevel+9)) + that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) + plus a few kilobytes for small objects. For example, if you want to reduce + the default memory requirements from 256K to 128K, compile with + make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" + Of course this will generally degrade compression (there's no free lunch). + + The memory requirements for inflate are (in bytes) 1 << windowBits + that is, 32K for windowBits=15 (default value) plus a few kilobytes + for small objects. +*/ + + /* Type declarations */ + +#ifndef OF /* function prototypes */ +# ifdef STDC +# define OF(args) args +# else +# define OF(args) () +# endif +#endif + +#ifndef Z_ARG /* function prototypes for stdarg */ +# if defined(STDC) || defined(Z_HAVE_STDARG_H) +# define Z_ARG(args) args +# else +# define Z_ARG(args) () +# endif +#endif + +/* The following definitions for FAR are needed only for MSDOS mixed + * model programming (small or medium model with some far allocations). + * This was tested only with MSC; for other MSDOS compilers you may have + * to define NO_MEMCPY in zutil.h. If you don't need the mixed model, + * just define FAR to be empty. + */ +#ifdef SYS16BIT +# if defined(M_I86SM) || defined(M_I86MM) + /* MSC small or medium model */ +# define SMALL_MEDIUM +# ifdef _MSC_VER +# define FAR _far +# else +# define FAR far +# endif +# endif +# if (defined(__SMALL__) || defined(__MEDIUM__)) + /* Turbo C small or medium model */ +# define SMALL_MEDIUM +# ifdef __BORLANDC__ +# define FAR _far +# else +# define FAR far +# endif +# endif +#endif + +#if defined(WINDOWS) || defined(WIN32) + /* If building or using zlib as a DLL, define ZLIB_DLL. + * This is not mandatory, but it offers a little performance increase. + */ +# ifdef ZLIB_DLL +# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500)) +# ifdef ZLIB_INTERNAL +# define ZEXTERN extern __declspec(dllexport) +# else +# define ZEXTERN extern __declspec(dllimport) +# endif +# endif +# endif /* ZLIB_DLL */ + /* If building or using zlib with the WINAPI/WINAPIV calling convention, + * define ZLIB_WINAPI. + * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI. + */ +# ifdef ZLIB_WINAPI +# ifdef FAR +# undef FAR +# endif +# include + /* No need for _export, use ZLIB.DEF instead. */ + /* For complete Windows compatibility, use WINAPI, not __stdcall. */ +# define ZEXPORT WINAPI +# ifdef WIN32 +# define ZEXPORTVA WINAPIV +# else +# define ZEXPORTVA FAR CDECL +# endif +# endif +#endif + +#if defined (__BEOS__) +# ifdef ZLIB_DLL +# ifdef ZLIB_INTERNAL +# define ZEXPORT __declspec(dllexport) +# define ZEXPORTVA __declspec(dllexport) +# else +# define ZEXPORT __declspec(dllimport) +# define ZEXPORTVA __declspec(dllimport) +# endif +# endif +#endif + +#ifndef ZEXTERN +# define ZEXTERN extern +#endif +#ifndef ZEXPORT +# define ZEXPORT +#endif +#ifndef ZEXPORTVA +# define ZEXPORTVA +#endif + +#ifndef FAR +# define FAR +#endif + +#if !defined(__MACTYPES__) +typedef unsigned char Byte; /* 8 bits */ +#endif +typedef unsigned int uInt; /* 16 bits or more */ +typedef unsigned long uLong; /* 32 bits or more */ + +#ifdef SMALL_MEDIUM + /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */ +# define Bytef Byte FAR +#else + typedef Byte FAR Bytef; +#endif +typedef char FAR charf; +typedef int FAR intf; +typedef uInt FAR uIntf; +typedef uLong FAR uLongf; + +#ifdef STDC + typedef void const *voidpc; + typedef void FAR *voidpf; + typedef void *voidp; +#else + typedef Byte const *voidpc; + typedef Byte FAR *voidpf; + typedef Byte *voidp; +#endif + +#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC) +# include +# if (UINT_MAX == 0xffffffffUL) +# define Z_U4 unsigned +# elif (ULONG_MAX == 0xffffffffUL) +# define Z_U4 unsigned long +# elif (USHRT_MAX == 0xffffffffUL) +# define Z_U4 unsigned short +# endif +#endif + +#ifdef Z_U4 + typedef Z_U4 z_crc_t; +#else + typedef unsigned long z_crc_t; +#endif + +#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */ +# define Z_HAVE_UNISTD_H +#endif + +#ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */ +# define Z_HAVE_STDARG_H +#endif + +#ifdef STDC +# ifndef Z_SOLO +# include /* for off_t */ +# endif +#endif + +#if defined(STDC) || defined(Z_HAVE_STDARG_H) +# ifndef Z_SOLO +# include /* for va_list */ +# endif +#endif + +#ifdef _WIN32 +# ifndef Z_SOLO +# include /* for wchar_t */ +# endif +#endif + +/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and + * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even + * though the former does not conform to the LFS document), but considering + * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as + * equivalently requesting no 64-bit operations + */ +#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1 +# undef _LARGEFILE64_SOURCE +#endif + +#if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H) +# define Z_HAVE_UNISTD_H +#endif +#ifndef Z_SOLO +# if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE) +# include /* for SEEK_*, off_t, and _LFS64_LARGEFILE */ +# ifdef VMS +# include /* for off_t */ +# endif +# ifndef z_off_t +# define z_off_t off_t +# endif +# endif +#endif + +#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0 +# define Z_LFS64 +#endif + +#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64) +# define Z_LARGE64 +#endif + +#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64) +# define Z_WANT64 +#endif + +#if !defined(SEEK_SET) && !defined(Z_SOLO) +# define SEEK_SET 0 /* Seek from beginning of file. */ +# define SEEK_CUR 1 /* Seek from current position. */ +# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ +#endif + +#ifndef z_off_t +# define z_off_t long +#endif + +#if !defined(_WIN32) && defined(Z_LARGE64) +# define z_off64_t off64_t +#else +# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO) +# define z_off64_t __int64 +# else +# define z_off64_t z_off_t +# endif +#endif + +/* MVS linker does not support external names larger than 8 bytes */ +#if defined(__MVS__) + #pragma map(deflateInit_,"DEIN") + #pragma map(deflateInit2_,"DEIN2") + #pragma map(deflateEnd,"DEEND") + #pragma map(deflateBound,"DEBND") + #pragma map(inflateInit_,"ININ") + #pragma map(inflateInit2_,"ININ2") + #pragma map(inflateEnd,"INEND") + #pragma map(inflateSync,"INSY") + #pragma map(inflateSetDictionary,"INSEDI") + #pragma map(compressBound,"CMBND") + #pragma map(inflate_table,"INTABL") + #pragma map(inflate_fast,"INFA") + #pragma map(inflate_copyright,"INCOPY") +#endif + +#endif /* ZCONF_H */ diff --git a/3rdparty/zlib/Makefile.am b/3rdparty/zlib/Makefile.am index 4fa7458520..c80e963a1d 100644 --- a/3rdparty/zlib/Makefile.am +++ b/3rdparty/zlib/Makefile.am @@ -1,14 +1,12 @@ include $(top_srcdir)/config/common.am -# This is prepared for compilation, but currently only used for packaging, -# because configure support for compilation is still missing. - noinst_LIBRARIES = liblyxzlib.a EXTRA_DIST = \ CMakeLists.txt \ 1.2.8/README \ 1.2.8/treebuild.xml \ + 1.2.8/zconf.h.in \ 1.2.8/zconf.h.cmakein \ 1.2.8/zlib.3 \ 1.2.8/zlib.map \ diff --git a/INSTALL.Win32 b/INSTALL.Win32 index 3b71427200..1cc9928216 100644 --- a/INSTALL.Win32 +++ b/INSTALL.Win32 @@ -107,3 +107,45 @@ Creating the Installer - Copy the 3 dll-files from there to the DLL folder of the NSIS installation - Check whether the file locations/paths in settings.nsh match your setup. - Right-click on lyx.nsi and click "Compile NSIS Script". + + +Compiling with GCC with MinGW64 + MSYS2 Environment using autotools +=================================================================== +1 Install MSYS2, MINGW64, Qt5+ + https://wiki.qt.io/MSYS2 +2 Install bc (Bench calculater), which autotools uses for some reason to compile LyX + pacman -S bc +3 Run the standard autotools install (Adapt paths and arguments accordingly) + ./autogen.sh + ./configure --without-x --enable-qt5 --disable-debug --enable-optimization --prefix=/mingw64 + make + make install + + +Cross-Compiling on unix with MXE using autotools +================================================= +1 Install MXE: http://mxe.cc + You can either install from sources, the generic .tar binaries or debian .deb packages. + Installing the following .deb packages will drag in all needed dependencies: + mxe-x86-64-w64-mingw32.shared-file + mxe-x86-64-w64-mingw32.shared-gcc + mxe-x86-64-w64-mingw32.shared-libiconv + mxe-x86-64-w64-mingw32.shared-qtimageformats + mxe-x86-64-w64-mingw32.shared-qtsvg + mxe-x86-64-w64-mingw32.shared-qtwinextras + Of course you can also use the static and/or 32bit versions. +2 Run the standard autotools install (Adapt paths and arguments accordingly) + ./autogen.sh + mkdir builddir-mingw + cd builddir-mingw + PATH="/usr/lib/mxe/usr/bin:$PATH" ../configure --host=x86-64-w64-mingw32.shared --with-qt-dir=/usr/lib/mxe/usr/x86_64-w64-mingw32.shared/qt5 --enable-qt5 --with-included-boost --with-included-hunspell --with-included-mythes --disable-debug --enable-optimization --prefix=/mingw64 + PATH="/usr/lib/mxe/usr/bin:$PATH" make + PATH="/usr/lib/mxe/usr/bin:$PATH" DESTDIR=/tmp/lyxinstall make install + This uses the paths from the 64bit shared MXE version installed from .deb packages. +3 If you want to run the resulting lyx.exe from the build directory using wine, + create symlinks for all needed .dlls: + cd builddir-mingw/src + ln -s /usr/lib/mxe/usr/x86_64-w64-mingw32.shared/bin/*.dll . + ln -s /usr/lib/mxe/usr/x86_64-w64-mingw32.shared/qt5/bin/*.dll . + wine64 lyx.exe + diff --git a/config/lyxinclude.m4 b/config/lyxinclude.m4 index 8decd37ed9..1f1fdb67e7 100644 --- a/config/lyxinclude.m4 +++ b/config/lyxinclude.m4 @@ -454,6 +454,100 @@ AC_DEFUN([LYX_USE_INCLUDED_BOOST],[ ]) +dnl Usage: LYX_USE_INCLUDED_ICONV : select if the included iconv should +dnl be used. +AC_DEFUN([LYX_USE_INCLUDED_ICONV],[ + AC_MSG_CHECKING([whether to use included iconv library]) + AC_ARG_WITH(included-iconv, + [AC_HELP_STRING([--without-included-iconv], [do not use the iconv lib supplied with LyX, try to find one in the system directories - compilation will abort if nothing suitable is found])], + [lyx_cv_with_included_iconv=$withval], + [lyx_cv_with_included_iconv=no]) + AM_CONDITIONAL(USE_INCLUDED_ICONV, test x$lyx_cv_with_included_iconv = xyes) + AC_MSG_RESULT([$lyx_cv_with_included_iconv]) + if test x$lyx_cv_with_included_iconv = xyes ; then +dnl Some bits from libiconv configure.ac to avoid a nested configure call: + AC_EILSEQ + AC_TYPE_MBSTATE_T + AC_CHECK_FUNCS([getc_unlocked mbrtowc wcrtomb mbsinit setlocale]) +dnl Ymbstate_t is used if HAVE_WCRTOMB || HAVE_MBRTOWC, see 3rdparty/libiconv/1.14/lib/loop_wchar.h. + if test $ac_cv_func_wcrtomb = yes || test $ac_cv_func_mbrtowc = yes; then + USE_MBSTATE_T=1 + else + USE_MBSTATE_T=0 + fi + AC_SUBST([USE_MBSTATE_T]) + AC_CACHE_CHECK([whether is standalone], + [gl_cv_header_wchar_h_standalone], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include + wchar_t w;]], + [[]])], + [gl_cv_header_wchar_h_standalone=yes], + [gl_cv_header_wchar_h_standalone=no])]) + if test $gl_cv_header_wchar_h_standalone = yes; then + BROKEN_WCHAR_H=0 + else + BROKEN_WCHAR_H=1 + fi + AC_SUBST([BROKEN_WCHAR_H]) +dnl we want const correctness + AC_DEFINE_UNQUOTED([ICONV_CONST], [const], + [Define as const if the declaration of iconv() needs const.]) + ICONV_CONST=const + AC_SUBST([ICONV_CONST]) +dnl we build a static lib + DLL_VARIABLE= + AC_SUBST([DLL_VARIABLE]) + ICONV_INCLUDES='-I$(top_srcdir)/3rdparty/libiconv/1.14 -I$(top_builddir)/3rdparty/libiconv' + ICONV_LIBS='\$(top_builddir)/3rdparty/libiconv/liblyxiconv.a' + ICONV_ICONV_H_IN=3rdparty/libiconv/iconv.h:3rdparty/libiconv/1.14/include/iconv.h.in + else + ICONV_INCLUDES= + AM_ICONV + if test "$am_cv_func_iconv" = no; then + AC_MSG_ERROR([cannot find required library iconv.]) + else + ICONV_LIBS="$LIBICONV" + fi + ICONV_ICONV_H_IN= + fi + AC_SUBST(ICONV_INCLUDES) + AC_SUBST(ICONV_LIBS) + AC_SUBST(ICONV_ICONV_H_IN) +]) + + +dnl Usage: LYX_USE_INCLUDED_ZLIB : select if the included zlib should +dnl be used. +AC_DEFUN([LYX_USE_INCLUDED_ZLIB],[ + AC_MSG_CHECKING([whether to use included zlib library]) + AC_ARG_WITH(included-zlib, + [AC_HELP_STRING([--without-included-zlib], [do not use the zlib lib supplied with LyX, try to find one in the system directories - compilation will abort if nothing suitable is found])], + [lyx_cv_with_included_zlib=$withval], + [lyx_cv_with_included_zlib=no]) + AM_CONDITIONAL(USE_INCLUDED_ZLIB, test x$lyx_cv_with_included_zlib = xyes) + AC_MSG_RESULT([$lyx_cv_with_included_zlib]) + if test x$lyx_cv_with_included_zlib = xyes ; then + ZLIB_INCLUDES='-I$(top_srcdir)/3rdparty/zlib/1.2.8 -I$(top_builddir)/3rdparty/zlib' + ZLIB_LIBS='$(top_builddir)/3rdparty/zlib/liblyxzlib.a' + mkdir -p 3rdparty/zlib +dnl include standard config.h for HAVE_UNISTD_H + echo "#include <../../config.h>" > 3rdparty/zlib/zconf.h +dnl prevent clash with system zlib that might be dragged in by other libs + echo "#define Z_PREFIX 1" >> 3rdparty/zlib/zconf.h + cat "${srcdir}/3rdparty/zlib/1.2.8/zconf.h.in" >> 3rdparty/zlib/zconf.h + else + ZLIB_INCLUDES= + AC_CHECK_HEADERS(zlib.h, + [AC_CHECK_LIB(z, gzopen, [ZLIB_LIBS="-lz"], LYX_LIB_ERROR(libz,zlib))], + [LYX_LIB_ERROR(zlib.h,zlib)]) + fi + AC_SUBST(ZLIB_INCLUDES) + AC_SUBST(ZLIB_LIBS) +]) + + dnl Usage: LYX_CHECK_CALLSTACK_PRINTING: define LYX_CALLSTACK_PRINTING if the dnl necessary APIs are available to print callstacks. AC_DEFUN([LYX_CHECK_CALLSTACK_PRINTING], @@ -600,7 +694,8 @@ AC_ARG_WITH(packaging, [lyx_use_packaging="$withval"], [ case $host in *-apple-darwin*) lyx_use_packaging=macosx ;; - *-pc-mingw32*) lyx_use_packaging=windows ;; + *-pc-mingw*) lyx_use_packaging=windows ;; + *-mingw32*) lyx_use_packaging=windows ;; *haiku*) lyx_use_packaging=haiku ;; *) lyx_use_packaging=posix ;; esac]) diff --git a/config/qt4.m4 b/config/qt4.m4 index 33029b933d..2bcd4f3bfc 100644 --- a/config/qt4.m4 +++ b/config/qt4.m4 @@ -253,8 +253,13 @@ AC_DEFUN([QT_DO_PKG_CONFIG], AC_DEFUN([QT_DO_MANUAL_CONFIG], [ dnl Check for X libraries - AC_PATH_X - AC_PATH_XTRA + case ${host} in + *mingw*) ;; + *) \ + AC_PATH_X \ + AC_PATH_XTRA \ + ;; + esac case $have_x in yes) LIBS="$X_PRE_LIBS $LIBS $X_LIBS -lX11 $X_EXTRA_LIBS" CPPFLAGS="$CPPFLAGS $X_CFLAGS";; diff --git a/config/spell.m4 b/config/spell.m4 index 1a2a1e9522..fffad96aa5 100644 --- a/config/spell.m4 +++ b/config/spell.m4 @@ -68,16 +68,43 @@ AC_DEFUN([CHECK_WITH_HUNSPELL], fi ]) +dnl Usage: LYX_USE_INCLUDED_HUNSPELL : select if the included hunspell should +dnl be used. +AC_DEFUN([LYX_USE_INCLUDED_HUNSPELL],[ + AC_MSG_CHECKING([whether to use included hunspell library]) + AC_ARG_WITH(included-hunspell, + [AC_HELP_STRING([--without-included-hunspell], [do not use the hunspell lib supplied with LyX, try to find one in the system directories - compilation will abort if nothing suitable is found])], + [lyx_cv_with_included_hunspell=$withval], + [lyx_cv_with_included_hunspell=no]) + AM_CONDITIONAL(USE_INCLUDED_HUNSPELL, test x$lyx_cv_with_included_hunspell = xyes) + AC_MSG_RESULT([$lyx_cv_with_included_hunspell]) + if test x$lyx_cv_with_included_hunspell = xyes ; then + HUNSPELL_CFLAGS='-I$(top_srcdir)/3rdparty/hunspell/1.3.3/src' + HUNSPELL_LIBS='$(top_builddir)/3rdparty/hunspell/liblyxhunspell.a' + AC_SUBST(HUNSPELL_CFLAGS) + AC_SUBST(HUNSPELL_LIBS) + fi + ]) + ### Check if we want spell libraries, prefer new aspell or hunspell AC_DEFUN([LYX_CHECK_SPELL_ENGINES], [ - CHECK_WITH_ASPELL + LYX_USE_INCLUDED_HUNSPELL + if test x$lyx_cv_with_included_hunspell = xyes ; then +dnl the user wanted to use the included hunspell, so do not check for the other spell checkers + lyx_use_aspell=false + lyx_use_enchant=false + lyx_use_hunspell=true + lyx_flags="$lyx_flags use-hunspell" + else + CHECK_WITH_ASPELL + CHECK_WITH_ENCHANT + CHECK_WITH_HUNSPELL + fi + AM_CONDITIONAL(USE_ASPELL, $lyx_use_aspell) - - CHECK_WITH_ENCHANT AM_CONDITIONAL(USE_ENCHANT, $lyx_use_enchant) - - CHECK_WITH_HUNSPELL AM_CONDITIONAL(USE_HUNSPELL, $lyx_use_hunspell) ]) + diff --git a/configure.ac b/configure.ac index bf3111a6c1..8438b14485 100644 --- a/configure.ac +++ b/configure.ac @@ -74,6 +74,9 @@ AM_PATH_PYTHON # Tools for creating libraries (note that we do not use libtool) m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) dnl AM_PROG_AR requires automake 1.12 AC_PROG_RANLIB +dnl Recent debian/ubuntu (at least) have built 'ar' so that deterministic mode is the default. +dnl This means that it does not make sense to use the 'u' flag (default ARFLAGS is 'cru'). +AC_SUBST([ARFLAGS], [cr]) ### Check for a C++ compiler dnl We have to do weird tricks so that autoconf does not touch CXXFLAGS even @@ -116,6 +119,7 @@ AC_SUBST(LIBSHLWAPI) AC_CHECK_LIB(psapi, main, [LIBPSAPI=-lpsapi]) AC_SUBST(LIBPSAPI) AC_CHECK_LIB(gdi32, main) +AC_CHECK_LIB(ole32, main) LYX_USE_INCLUDED_BOOST LYX_USE_INCLUDED_MYTHES @@ -129,18 +133,31 @@ LYX_CHECK_CALLSTACK_PRINTING # Needed for our char_type AC_CHECK_SIZEOF(wchar_t) -### We need iconv for unicode support (Qt4 frontend requires it too) -AM_ICONV -if test "$am_cv_func_iconv" = no; then - AC_MSG_ERROR([cannot find required library iconv.]) +# Taken from gettext, needed for libiconv +AC_CACHE_CHECK([for wchar_t], [gt_cv_c_wchar_t], + [AC_TRY_COMPILE([#include + wchar_t foo = (wchar_t)'\0';], , + [gt_cv_c_wchar_t=yes], [gt_cv_c_wchar_t=no])]) +if test $gt_cv_c_wchar_t = yes; then + AC_DEFINE([HAVE_WCHAR_T], [1], [Define if you have the 'wchar_t' type.]) + HAVE_WCHAR_T=1 else - LIBS="$LIBS $LIBICONV" + HAVE_WCHAR_T=0 +fi +AC_SUBST([HAVE_WCHAR_T]) + +# Needed for Mingw-w64 +AC_TYPE_LONG_LONG_INT +if test "$ac_cv_type_long_long_int" = yes; then + AC_CHECK_SIZEOF(long) + AC_CHECK_SIZEOF(long long) fi +### We need iconv for unicode support (Qt4 frontend requires it too) +LYX_USE_INCLUDED_ICONV + ### check for compression support -AC_CHECK_HEADERS(zlib.h, - [AC_CHECK_LIB(z, gzopen, [LIBS="$LIBS -lz"], LYX_LIB_ERROR(libz,zlib))], - [LYX_LIB_ERROR(zlib.h,zlib)]) +LYX_USE_INCLUDED_ZLIB ### check for file magic support (currently optional) AC_CHECK_HEADERS(magic.h, @@ -191,14 +208,6 @@ AC_TYPE_OFF_T AC_TYPE_PID_T AC_TYPE_SIZE_T AC_TYPE_UID_T -# Taken from gettext -AC_CACHE_CHECK([for wchar_t], [gt_cv_c_wchar_t], - [AC_TRY_COMPILE([#include - wchar_t foo = (wchar_t)'\0';], , - [gt_cv_c_wchar_t=yes], [gt_cv_c_wchar_t=no])]) -if test $gt_cv_c_wchar_t = yes; then - AC_DEFINE([HAVE_WCHAR_T], [1], [Define if you have the 'wchar_t' type.]) -fi LYX_CHECK_DEF(PATH_MAX, limits.h, [int n = PATH_MAX;]) @@ -229,6 +238,12 @@ lyx_win_res=false; case ${host} in *mingw*|*cygwin*) lyx_win_res=true;; esac +if test "x$lyx_win_res" = "xtrue"; then + AC_CHECK_TOOL(RC, windres,) + if test -z "$RC"; then + AC_ERROR([Could not find a resource compiler]) + fi +fi AM_CONDITIONAL(LYX_WIN_RESOURCE, $lyx_win_res) LYX_SET_VERSION_INFO @@ -290,12 +305,6 @@ extern "C" char * strerror(int n); #endif -#if defined(HAVE_OSTREAM) && defined(HAVE_LOCALE) && defined(HAVE_SSTREAM) -# define USE_BOOST_FORMAT 1 -#else -# define USE_BOOST_FORMAT 0 -#endif - #define BOOST_USER_CONFIG #if !defined(ENABLE_ASSERTIONS) @@ -325,6 +334,12 @@ char * strerror(int n); # define USE_WCHAR_T #endif +#ifdef HAVE_LONG_LONG_INT +#if SIZEOF_LONG_LONG > SIZEOF_LONG +#define LYX_USE_LONG_LONG +#endif +#endif + #endif ]) @@ -356,6 +371,7 @@ AC_CONFIG_FILES([Makefile \ 3rdparty/boost/Makefile \ 3rdparty/hunspell/Makefile \ 3rdparty/libiconv/Makefile \ + $ICONV_ICONV_H_IN \ 3rdparty/zlib/Makefile \ autotests/Makefile \ config/Makefile \ diff --git a/development/Makefile.am b/development/Makefile.am index 43ca80821e..796e964d4a 100644 --- a/development/Makefile.am +++ b/development/Makefile.am @@ -159,7 +159,6 @@ cmake/modules/PCHSupport_26.cmake \ cmake/modules/ProjectSourceGroup.cmake \ cmake/pcheaders.h \ cmake/po/cat.py \ -cmake/po/dos2unix.py \ cmake/po/unix2dos.py \ cmake/post_install/CMakeLists.txt \ cmake/scripts/LyXCreateImagesResource.cmake \ diff --git a/development/cmake/ConfigureChecks.cmake b/development/cmake/ConfigureChecks.cmake index 6dc82a7d87..825813b501 100644 --- a/development/cmake/ConfigureChecks.cmake +++ b/development/cmake/ConfigureChecks.cmake @@ -114,6 +114,13 @@ check_cxx_source_compiles( " SIZEOF_WCHAR_T_IS_4) +check_cxx_source_compiles( + " + int i[ ( sizeof(long long)>sizeof(long) ? 1 : -1 ) ]; + int main(){return 0;} + " +SIZEOF_LONG_LONG_GREATER_THAN_SIZEOF_LONG) + check_cxx_source_compiles( " #include diff --git a/development/cmake/configCompiler.h.cmake b/development/cmake/configCompiler.h.cmake index 858cfc9711..29ff1990e6 100644 --- a/development/cmake/configCompiler.h.cmake +++ b/development/cmake/configCompiler.h.cmake @@ -42,6 +42,7 @@ #cmakedefine HAVE_MAGIC_H 1 #cmakedefine SIZEOF_WCHAR_T_IS_2 1 #cmakedefine SIZEOF_WCHAR_T_IS_4 1 +#cmakedefine SIZEOF_LONG_LONG_GREATER_THAN_SIZEOF_LONG 1 #ifdef SIZEOF_WCHAR_T_IS_2 # define SIZEOF_WCHAR_T 2 @@ -51,6 +52,12 @@ # endif #endif +#ifdef HAVE_LONG_LONG +#ifdef SIZEOF_LONG_LONG_GREATER_THAN_SIZEOF_LONG +#define LYX_USE_LONG_LONG +#endif +#endif + #cmakedefine GETTEXT_FOUND 1 #cmakedefine HAVE_ALLOCA 1 @@ -78,12 +85,6 @@ #define BOOST_ALL_NO_LIB 1 -#if defined(HAVE_OSTREAM) && defined(HAVE_LOCALE) && defined(HAVE_SSTREAM) -# define USE_BOOST_FORMAT 1 -#else -# define USE_BOOST_FORMAT 0 -#endif - #ifdef _DEBUG # define ENABLE_ASSERTIONS 1 #endif diff --git a/development/cmake/configCompiler.h.msvc b/development/cmake/configCompiler.h.msvc index 334015b5e9..bec1a4113c 100644 --- a/development/cmake/configCompiler.h.msvc +++ b/development/cmake/configCompiler.h.msvc @@ -124,12 +124,6 @@ #define BOOST_ALL_NO_LIB 1 -#if defined(HAVE_OSTREAM) && defined(HAVE_LOCALE) && defined(HAVE_SSTREAM) -# define USE_BOOST_FORMAT 1 -#else -# define USE_BOOST_FORMAT 0 -#endif - #ifdef _DEBUG # define ENABLE_ASSERTIONS 1 #endif @@ -152,6 +146,12 @@ # define USE_WCHAR_T #endif +#ifdef HAVE_LONG_LONG +#ifdef SIZEOF_LONG_LONG_GREATER_THAN_SIZEOF_LONG +#define LYX_USE_LONG_LONG +#endif +#endif + #if defined(MAKE_INTL_LIB) && defined(_MSC_VER) #define __attribute__(x) #define inline diff --git a/development/cmake/po/cat.py b/development/cmake/po/cat.py index 02655dc564..7a1ee2699b 100644 --- a/development/cmake/po/cat.py +++ b/development/cmake/po/cat.py @@ -25,11 +25,17 @@ for (opt, param) in options: out = sys.stdout if outfile: - out = open(outfile, "w") + # always write unix line endings, even on windows + out = open(outfile, "wb") for f in args: - fil = open(f, "r") + # accept both windows and unix line endings, since it can happen that we + # are on unix, but the file has been written on windows or vice versa. + fil = open(f, "rU") for l in fil: + # this does always write unix line endings since the file has + # been opened in binary mode. This is needed since both gettext + # and our .pot file manipulation scripts assume unix line ends. out.write(l) fil.close() diff --git a/development/cmake/po/dos2unix.py b/development/cmake/po/dos2unix.py deleted file mode 100644 index a5b6431429..0000000000 --- a/development/cmake/po/dos2unix.py +++ /dev/null @@ -1,17 +0,0 @@ -#! /usr/bin/env python - -############### -import sys - -for fname in sys.argv[1:]: - infile = open( fname, "r" ) - instr = infile.read() - infile.close() - outstr = instr.replace( "\r\n", "\n" ).replace( "\r", "\n" ) - - if outstr == instr: - continue - - outfile = open( fname , "w" ) - outfile.write( outstr ) - outfile.close() diff --git a/lib/CREDITS b/lib/CREDITS index 3967ef5100..bcc9f4c6ad 100644 --- a/lib/CREDITS +++ b/lib/CREDITS @@ -169,6 +169,9 @@ @bStefano Ghirlanda @iE-mail: stefano.ghirlanda () unibo ! it Improvements to lyxserver +@bShankar Giri Venkita Giri +@iE-mail: girivs () gmx ! com + Mingw-w64 build fixes @bHartmut Goebel @iE-mail: h.goebel () crazy-compilers ! com Improvements to Koma-Script classes diff --git a/lib/doc/MergedManuals.lyx b/lib/doc/MergedManuals.lyx index 44cbae87de..cf72312c36 100644 --- a/lib/doc/MergedManuals.lyx +++ b/lib/doc/MergedManuals.lyx @@ -233,7 +233,7 @@ filename "../examples/linguistics.lyx" \begin_layout Plain Layout \begin_inset CommandInset include LatexCommand include -filename "../lib/examples/xypic.lyx" +filename "../examples/xypic.lyx" \end_inset diff --git a/lib/doc/UserGuide.lyx b/lib/doc/UserGuide.lyx index 961910fcae..4bff11008f 100644 --- a/lib/doc/UserGuide.lyx +++ b/lib/doc/UserGuide.lyx @@ -134,11 +134,12 @@ enumitem \papercolumns 1 \papersides 2 \paperpagestyle default -\tracking_changes false +\tracking_changes true \output_changes false \html_math_output 0 \html_css_as_file 0 \html_be_strict true +\author 986154928 "Gnter Milde" \end_header \begin_body @@ -8310,14 +8311,12 @@ Verbatim \end_layout \begin_layout Verbatim - This is Verbatim. \end_layout \begin_layout Verbatim \noindent \align block - The following 2 lines are empty: \end_layout @@ -8330,7 +8329,6 @@ The following 2 lines are empty: \end_layout \begin_layout Verbatim - Almost everything is allowed in Verbatim:"%&$§#~'` \backslash }][{| @@ -8354,7 +8352,6 @@ Verbatim \end_layout \begin_layout Verbatim* - This is Verbatim*. \end_layout @@ -16982,6 +16979,42 @@ open close " \family default , generates this automatically. +\change_inserted 986154928 1464030688 + +\begin_inset Foot +status collapsed + +\begin_layout Plain Layout + +\change_inserted 986154928 1464016381 +You can, of course, remove this +\begin_inset Quotes eld +\end_inset + +smart quotes +\begin_inset Quotes erd +\end_inset + + keybinding if you prefer. + See section +\begin_inset space ~ +\end_inset + + +\begin_inset CommandInset ref +LatexCommand ref +reference "subsec:Editing-Shortcuts" + +\end_inset + +. +\end_layout + +\end_inset + + +\change_unchanged + \end_layout \begin_layout Standard @@ -17153,7 +17186,23 @@ this \end_layout \begin_layout Standard -For single quotes you have to use the shortcut +For +\change_inserted 986154928 1464016392 + +\begin_inset Quotes eld +\end_inset + +smart +\begin_inset Quotes erd +\end_inset + + +\change_unchanged +single quotes +\change_deleted 986154928 1464016400 +you have to +\change_unchanged +use the shortcut \begin_inset Info type "shortcut" arg "quote-insert single" diff --git a/lib/doc/de/UserGuide.lyx b/lib/doc/de/UserGuide.lyx index 112be2ba78..565b537a52 100644 --- a/lib/doc/de/UserGuide.lyx +++ b/lib/doc/de/UserGuide.lyx @@ -148,6 +148,7 @@ enumitem \html_math_output 0 \html_css_as_file 0 \html_be_strict false +\author 986154928 "Gnter Milde" \end_header \begin_body @@ -526,7 +527,15 @@ Sie können Dokumente in \SpecialChar LyX \end_inset B. - DocBook als „Backend“ das PDFs erzeugen kann. + DocBook als +\begin_inset Quotes gld +\end_inset + +Backend +\begin_inset Quotes grd +\end_inset + + das PDFs erzeugen kann. Des Weiteren können Sie \SpecialChar LyX -Dokumente jederzeit als reine Textdatei oder XHTML ausgeben. @@ -1321,8 +1330,23 @@ beachten \family default können Sie festlegen, ob bei der Suche die Schreibweise berücksichtigt werden soll. - Ist sie aktiv, wird zum Beispiel bei der Suche nach „Treffen“ das Wort - „treffen“ nicht gefunden. + Ist sie aktiv, wird zum Beispiel bei der Suche nach +\begin_inset Quotes gld +\end_inset + +Treffen +\begin_inset Quotes grd +\end_inset + + das Wort +\begin_inset Quotes gld +\end_inset + +treffen +\begin_inset Quotes grd +\end_inset + + nicht gefunden. \end_layout \begin_layout Standard @@ -1338,8 +1362,31 @@ ganze Wörter \family default - schaltet den Modus „nur ganze Worte suchen“ ein und aus. - Dann wird beispielsweise bei der Suche nach „Treff“ das Wort „Treffer“ + schaltet den Modus +\begin_inset Quotes gld +\end_inset + +nur ganze Worte suchen +\begin_inset Quotes grd +\end_inset + + ein und aus. + Dann wird beispielsweise bei der Suche nach +\begin_inset Quotes gld +\end_inset + +Treff +\begin_inset Quotes grd +\end_inset + + das Wort +\begin_inset Quotes gld +\end_inset + +Treffer +\begin_inset Quotes grd +\end_inset + nicht gefunden. \end_layout @@ -1741,7 +1788,7 @@ Mit der F5 \family default -Taste wird der Cursor vertikal in \SpecialChar LyX -’ Hauptfenster zentriert. +' Hauptfenster zentriert. \end_layout \begin_layout Subsection @@ -1829,13 +1876,16 @@ Rechts-klicken auf Elemente in der Gliederung öffnet in vielen Fällen ein \end_layout \begin_layout Standard -Das Feld -\family sans -Filter -\family default - erlaubt es, die angezeigten Einträge einzugrenzen. +Das Feld `Filter' erlaubt es, die angezeigten Einträge einzugrenzen. Wenn zum Beispiel die Liste der Marken und Querverweise angezeigt ist und - Sie nur Verweise auf Unterabschnitte sehen wollen, geben Sie den Text „sub:“ + Sie nur Verweise auf Unterabschnitte sehen wollen, geben Sie den Text +\begin_inset Quotes gld +\end_inset + +sub: +\begin_inset Quotes grd +\end_inset + in den Filter ein und nur Einträge mit diesem Text werden angezeigt. \end_layout @@ -1963,8 +2013,7 @@ Navigieren ! Horizontaler Bildlauf \begin_layout Standard \SpecialChar LyX - hat keine horizontale Bildlauf\SpecialChar ligaturebreak -leiste, denn die Standard Seitenformate der + hat keine horizontale Bildlaufleiste, denn die Standard Seitenformate der Ausgabe, wie z. \begin_inset space \thinspace{} \end_inset @@ -2250,7 +2299,7 @@ B. autocorrect \family default zu finden, die sich irgendwo in \SpecialChar LyX -’ Installationsordner befindet. +' Installationsordner befindet. Die Automatische Korrektur kann jederzeit angeschaltet werden in dem man das Ausrufezeichen drückt '!'. Durch Drücken der Leertaste wird sie ausgeschaltet. @@ -2282,7 +2331,7 @@ emacs \family default . \SpecialChar LyX -’ Voreinstellung ist +' Voreinstellung ist \family typewriter cua \family default @@ -2293,8 +2342,7 @@ Bearbeiten\SpecialChar menuseparator Tastenkürzel \family default geändert werden kann. - (Man kann dort auch alle Tastenkürzel auf\SpecialChar ligaturebreak -listen oder ändern, wie es in + (Man kann dort auch alle Tastenkürzel auflisten oder ändern, wie es in Abschnitt \begin_inset space \thinspace{} \end_inset @@ -2458,7 +2506,15 @@ Es gibt drei Hilfstasten: \family sans Steuerung \family default - (in der Dokumentation als „Strg“ + (in der Dokumentation als +\begin_inset Quotes gld +\end_inset + +Strg +\begin_inset Quotes erd +\end_inset + + \begin_inset CommandInset nomenclature LatexCommand nomenclature symbol "Strg" @@ -2523,10 +2579,18 @@ Ende des Dokuments. Umschalt \family default (in der Dokumentation als +\begin_inset Quotes gld +\end_inset + + \family sans -„Umschalt +Umschalt \family default -“ + +\begin_inset Quotes erd +\end_inset + + \begin_inset CommandInset nomenclature LatexCommand nomenclature symbol "Umschalt" @@ -2544,7 +2608,15 @@ description "Umschalt-Taste" \family sans Alt \family default - (in der Dokumentation als „Alt“ + (in der Dokumentation als +\begin_inset Quotes gld +\end_inset + +Alt +\begin_inset Quotes erd +\end_inset + + \begin_inset CommandInset nomenclature LatexCommand nomenclature symbol "Alt" @@ -2553,7 +2625,15 @@ description "Alt oder Meta-Taste" \end_inset bezeichnet) Dies ist auf den meisten Tastaturen die Alt Taste, es sei denn - dass die Tastatur eine spezielle „Meta“ Taste besitzt. + dass die Tastatur eine spezielle +\begin_inset Quotes gld +\end_inset + +Meta +\begin_inset Quotes grd +\end_inset + + Taste besitzt. Haben Sie beide Tasten, müssen Sie herausfinden welche die Funktion der Alt Taste hat. \begin_inset Newline newline @@ -2571,8 +2651,12 @@ Diese Taste macht verschiedene Dinge und aktiviert zudem die Menü Schnellauswah \begin_deeper \begin_layout Standard Zum Beispiel öffnet die Sequenz +\begin_inset Quotes gld +\end_inset + + \family sans -„Alt +Alt \begin_inset space ~ \end_inset @@ -2590,16 +2674,36 @@ t \family sans b \family default -“ den „Textstil“ Dialog. + +\begin_inset Quotes erd +\end_inset + + den +\begin_inset Quotes gld +\end_inset + +Textstil +\begin_inset Quotes grd +\end_inset + + Dialog. +\begin_inset Quotes gld +\end_inset + + \family sans -„Alt +Alt \begin_inset space ~ \end_inset d \family default -“ öffnet das + +\begin_inset Quotes grd +\end_inset + + öffnet das \family sans Datei \family default @@ -2663,8 +2767,7 @@ Einstellungen Bearbeiten\SpecialChar menuseparator Tastenkürzel \family default - alle Tastenkürzel auf\SpecialChar ligaturebreak -listen oder ändern, wie es in Abschnitt + alle Tastenkürzel auflisten oder ändern, wie es in Abschnitt \begin_inset space ~ \end_inset @@ -2855,7 +2958,7 @@ Broadway Layout zum Schreiben von Theaterstücken. Dies ist keine \SpecialChar LaTeX \begin_inset ERT -status open +status collapsed \begin_layout Plain Layout @@ -3019,7 +3122,15 @@ Dokument ! Einstellungen \end_inset - gelistet sind, als „nicht verfügbar“ markiert sind. + gelistet sind, als +\begin_inset Quotes gld +\end_inset + +nicht verfügbar +\begin_inset Quotes grd +\end_inset + + markiert sind. Oder sie sind überrascht wenn sie z. \begin_inset space \thinspace{} \end_inset @@ -3060,15 +3171,29 @@ IOP \begin_layout Standard Falls es eine Dokumentklasse gibt, die Sie benutzen möchten, die aber als - „nicht verfügbar“ gekennzeichnet ist, müssen Sie die entsprechenden Paketdateie -n installieren. + +\begin_inset Quotes gld +\end_inset + +nicht verfügbar +\begin_inset Quotes grd +\end_inset + + gekennzeichnet ist, müssen Sie die entsprechenden Paketdateien installieren. Der einfachste Weg herauszufinden welche Dateien Sie installieren müssen, ist es, die Dokumentklasse für eine neue Datei zu verwenden. \SpecialChar LyX - wird dann einen Dialog zeigen, der die fehlenden Dateien auf\SpecialChar ligaturebreak -listet. - In Abschnitt „Installation eines neuen \SpecialChar LaTeX --Paketes“ des + wird dann einen Dialog zeigen, der die fehlenden Dateien auflistet. + In Abschnitt +\begin_inset Quotes gld +\end_inset + +Installation eines neuen \SpecialChar LaTeX +-Paketes +\begin_inset Quotes grd +\end_inset + + des \emph on Anpassung \emph default @@ -3251,7 +3376,7 @@ m Dokumenten verwendet zu werden. nur in diesem einen Dokument. Also so etwas wie einen dokumentspezifischen \SpecialChar LaTeX -Vorspann: \SpecialChar LyX -’ sogenanntes +' sogenanntes \begin_inset Quotes gld \end_inset @@ -3879,19 +4004,19 @@ Standard \begin_layout Itemize \family sans -A0 – A6 +A0 - A6 \end_layout \begin_layout Itemize \family sans -B0 – B6 +B0 - B6 \end_layout \begin_layout Itemize \family sans -C0 – C6 +C0 - C6 \end_layout \begin_layout Itemize @@ -3903,7 +4028,7 @@ US letter, US legal, US executive \begin_layout Itemize \family sans -JIS B0 – JIS B6 +JIS B0 - JIS B6 \end_layout \begin_layout Itemize @@ -4404,7 +4529,15 @@ Die verschiedenen Absatzumgebungen machen den Gebrauch unsauberer Tabstops, \end_layout \begin_layout Standard -Eine Absatzumgebung wählt man mit dem „Pull-down“-Menü +Eine Absatzumgebung wählt man mit dem +\begin_inset Quotes gld +\end_inset + +Pull-down +\begin_inset Quotes grd +\end_inset + +-Menü \begin_inset Graphics filename ../clipart/ToolbarEnvBox.png scale 70 @@ -4423,8 +4556,15 @@ Alt+A+Leertaste . Wenn das Menü geöffnet ist, können Sie die Einträge einschränken, wenn Sie Buchstaben eingeben, die in dem von Ihnen gesuchten Eintrag vorkommen. - Geben Sie zum Beispiel „abs“ ein, werden alle Einträge angezeigt, die mit - Abschnitten zu tun haben. + Geben Sie zum Beispiel +\begin_inset Quotes gld +\end_inset + +abs +\begin_inset Quotes grd +\end_inset + + ein, werden alle Einträge angezeigt, die mit Abschnitten zu tun haben. Mit der \family sans Esc @@ -5030,7 +5170,15 @@ s des Abschnittes und, falls möglich, des Kapitels, in dem der Unter-Unterabschni tt steht. Beispiel: der fünfte Abschnitt des zweiten Kapitels dieses Handbuches hat - die Marke „2.5“. + die Marke +\begin_inset Quotes gld +\end_inset + +2.5 +\begin_inset Quotes grd +\end_inset + +. \end_layout \begin_layout Subsubsection @@ -5194,8 +5342,15 @@ Einfügen Kurztitel \family default . - Dies fügt eine mit „Kurztitel“ beschriftete Box ein, in die man den Kurztitel - eingeben kann. + Dies fügt eine mit +\begin_inset Quotes gld +\end_inset + +Kurztitel +\begin_inset Quotes grd +\end_inset + + beschriftete Box ein, in die man den Kurztitel eingeben kann. Dies funktioniert auch für Beschriftungen innerhalb von Gleitumgebungen. Pro Ãœberschrift ist nur ein Kurztitel zulässig. \end_layout @@ -5586,7 +5741,7 @@ gekrochen ist auf einen Baum, \begin_inset Newline newline \end_inset -schon meint, dass er ein Vöglein wär’ +schon meint, dass er ein Vöglein wär' \begin_inset Newline newline \end_inset @@ -5657,8 +5812,7 @@ name "subsec:Listen" hat vier verschiedene Absatzumgebungen, um unterschiedliche Listen zu erzeugen. In den \family sans -Auf\SpecialChar ligaturebreak -listung +Auflistung \family default - und \family sans @@ -5761,8 +5915,7 @@ name "subsec:Auflistung" \begin_layout Standard Der erste Listentyp, den wir genauer beschreiben werden, ist die \family sans -Auf\SpecialChar ligaturebreak -listung +Auflistung \family default -Absatz\SpecialChar softhyphen umgebung. @@ -5794,8 +5947,7 @@ Die Elemente können beliebig lang sein. rückt den linken Rand jedes Elements automatisch ein. Die Einrückung ist immer relativ zu der Umgebung, in der die \family sans -Auf\SpecialChar ligaturebreak -listung +Auflistung \family default sich befindet. \end_layout @@ -5803,8 +5955,7 @@ listung \begin_layout Itemize Wenn Sie \family sans -Auf\SpecialChar ligaturebreak -listung +Auflistung \family default -Umgebungen schachteln, bekommt jede Stufe ein neues Symbol als Markierung. \end_layout @@ -5831,14 +5982,12 @@ reference "sec:Umgebungen-schachteln" \begin_layout Standard Natürlich war diese Erklärung auch ein Beispiel für eine \family sans -Auf\SpecialChar ligaturebreak -listung +Auflistung \family default . Die \family sans -Auf\SpecialChar ligaturebreak -listung +Auflistung \family default -Umgebung eignet sich am besten für Listen, bei denen die Reihenfolge keine Rolle spielt. @@ -5853,8 +6002,7 @@ Wir sagten, dass unterschiedliche Stufen unterschiedliche Symbole als Markierung \begin_layout Itemize Die Marke für die erste Stufe von \family sans -Auf\SpecialChar ligaturebreak -listung +Auflistung \family default ist ein schwarzer Kreis. \begin_inset Separator latexpar @@ -5904,8 +6052,7 @@ Und zurück zu Stufe eins. \begin_layout Standard Dieses sind die Standardmarken für eine \family sans -Auf\SpecialChar ligaturebreak -listung +Auflistung \family default . Sie können diese Marken Ihren Wünschen anpassen, indem Sie im Dialogfenster @@ -5925,8 +6072,7 @@ Dokument ! Einstellungen unter \family sans -Auf\SpecialChar ligaturebreak -listungszeichen +Auflistungszeichen \family default die \family sans @@ -6075,8 +6221,7 @@ Aufzählung \begin_layout Enumerate Ebenso wie die \family sans -Auf\SpecialChar ligaturebreak -listung +Auflistung \family default -Umgebung macht die \family sans @@ -6113,8 +6258,7 @@ maximal vier Schachtelungsstufen sind erlaubt. \begin_layout Standard Anders als bei der \family sans -Auf\SpecialChar ligaturebreak -listung +Auflistung \family default -Umgebung sind die verschiedenen Marken von \family sans @@ -6355,8 +6499,7 @@ Beschreibung -Umgebung aber nicht benutzen, wenn Sie einen ganzen Satz hervorheben wollen. Dann benutzt man besser \family sans -Auf\SpecialChar ligaturebreak -listung +Auflistung \family default oder \family sans @@ -6560,7 +6703,7 @@ type "icon" arg "layout-paragraph" \end_inset -. +). Der Text im Feld \family sans Längste @@ -6571,11 +6714,27 @@ Marke \family default bestimmt die Standardmarkenbreite. Wenn Sie wollen, können Sie hier den Text Ihrer breitesten Marke eintragen - oder stattdessen den Buchstaben 'M' mehrfach hintereinander verwenden. + oder stattdessen den Buchstaben +\begin_inset Quotes gld +\end_inset + +M +\begin_inset Quotes grd +\end_inset + + mehrfach hintereinander verwenden. Das M ist der breiteste Buchstabe und eine Standard-Einheit von Längen in \SpecialChar LaTeX . - Verwendet man 'M' als Einheit der Breite, muss man die + Verwendet man +\begin_inset Quotes gld +\end_inset + +M +\begin_inset Quotes grd +\end_inset + + als Einheit der Breite, muss man die \family sans Längste \begin_inset space ~ @@ -6591,7 +6750,15 @@ Liste \begin_inset Newline newline \end_inset -Die voreingestellte Breite ist die Länge von „00.00.0000“ (entspricht 6 +Die voreingestellte Breite ist die Länge von +\begin_inset Quotes gld +\end_inset + +00.00.0000 +\begin_inset Quotes grd +\end_inset + + (entspricht 6 \begin_inset space ~ \end_inset @@ -6833,8 +7000,15 @@ Roman arabic \series default . - Um Punkte mit großen oder kleinen Buchstaben zu „nummerieren“, verwenden - Sie die Befehle + Um Punkte mit großen oder kleinen Buchstaben zu +\begin_inset Quotes gld +\end_inset + +nummerieren +\begin_inset Quotes grd +\end_inset + +, verwenden Sie die Befehle \series bold \backslash @@ -7880,8 +8054,7 @@ article \family sans report \family default --Dokument\SpecialChar softhyphen -klassen benutzen. +-Dokumentklassen benutzen. \end_layout \begin_layout Standard @@ -7963,7 +8136,7 @@ Zusammenfassung \begin_inset Float figure wide false sideways false -status collapsed +status open \begin_layout Plain Layout \align center @@ -8315,7 +8488,22 @@ Ein Schreibmaschinen-Anführungszeichen erreichen Sie nicht durch Eingabe \family sans ", \family default - weil das ein reales Anführungszeichen erzeugt. + weil das ein reales Anführungszeichen erzeugt +\change_inserted 986154928 1464017746 + (siehe Abschnitt +\begin_inset space ~ +\end_inset + + +\begin_inset CommandInset ref +LatexCommand ref +reference "subsec:Anführungszeichen" + +\end_inset + + +\change_unchanged +. Sie erhalten es stattdessen über das Menü \family sans Einfügen\SpecialChar menuseparator @@ -8489,10 +8677,12 @@ Unformatiert \end_layout \begin_layout Verbatim + Dies ist Unformatiert. \end_layout \begin_layout Verbatim + Die folgenden 2 Zeilen sind leer: \end_layout @@ -8505,6 +8695,7 @@ Die folgenden 2 Zeilen sind leer: \end_layout \begin_layout Verbatim + Fast alles ist in Unformatiert erlaubt:"%&$§#~'` \backslash }][{| @@ -8528,6 +8719,7 @@ Unformatiert \end_layout \begin_layout Verbatim* + Dies ist Unformatiert*. \end_layout @@ -8574,11 +8766,18 @@ reference "sec:Umgebungen-schachteln" \begin_layout Standard \SpecialChar LyX - unterscheidet sich vom normalen Konzept der „Textverarbeitung-als-Super\SpecialChar softhyphen + unterscheidet sich vom normalen Konzept der +\begin_inset Quotes gld +\end_inset + +Textverarbeitung-als-Super\SpecialChar softhyphen schreib\SpecialChar softhyphen -m -a\SpecialChar softhyphen -schine“ sehr stark. +ma\SpecialChar softhyphen +schine +\begin_inset Quotes grd +\end_inset + + sehr stark. Mit einer Schreibmaschine ist Text bloß Tinte auf Papier. Bei einigen Textverarbeitungen ist das auch heute noch das Hauptproblem. \SpecialChar LyX @@ -8617,11 +8816,11 @@ zwei \begin_deeper \begin_layout Enumerate -Unterliste – Punkt 1 +Unterliste - Punkt 1 \end_layout \begin_layout Enumerate -Unterliste – Punkt 2 +Unterliste - Punkt 2 \end_layout \end_deeper @@ -8869,8 +9068,7 @@ Zitat \begin_layout Itemize \family sans -Auf\SpecialChar ligaturebreak -listung +Auflistung \end_layout \begin_layout Itemize @@ -9480,7 +9678,7 @@ Wenn Sie dies in \SpecialChar LyX \end_layout \begin_layout Enumerate -Stufe 1 – außen +Stufe 1 - außen \begin_inset Separator latexpar \end_inset @@ -9563,17 +9761,24 @@ Aufzählung \family default -Umgebung und die \family sans -Auf\SpecialChar ligaturebreak -listung +Auflistung \family default -Umgebung nur vierfach schachteln. Wenn wir zum Beispiel eine weitere \family sans Aufzählung \family default - innerhalb von „A.“ erstellen wollten, würden wir Fehlermeldungen erhalten. + innerhalb von +\begin_inset Quotes gld +\end_inset + +A. +\begin_inset Quotes grd +\end_inset + + erstellen wollten, würden wir Fehlermeldungen erhalten. \begin_inset Foot -status open +status collapsed \begin_layout Plain Layout Noch einmal: \SpecialChar LyX @@ -9678,7 +9883,15 @@ Dies ist eine \family sans Standard \family default --Umgebung, in „3-a“ geschachtelt. +-Umgebung, in +\begin_inset Quotes gld +\end_inset + +3-a +\begin_inset Quotes grd +\end_inset + + geschachtelt. Also ist sie auf Stufe 4. Wir haben dies durch \family sans @@ -9707,8 +9920,7 @@ Aufzählung \family default - und \family sans -Auf\SpecialChar ligaturebreak -listung +Auflistung \family default -Umgebungen! \end_layout @@ -9750,7 +9962,15 @@ bung kann man nichts schachteln, deswegen sind wir noch auf 4. \emph on können \emph default - innerhalb von „3-a“ weiterschachteln. + innerhalb von +\begin_inset Quotes gld +\end_inset + +3-a +\begin_inset Quotes grd +\end_inset + + weiterschachteln. \begin_inset Separator latexpar \end_inset @@ -9787,10 +10007,6 @@ Alt+Eingabe \family default , gefolgt von \family sans - -\begin_inset Newline newline -\end_inset - Alt+Eingabe+Links \family default . @@ -9884,6 +10100,7 @@ Dies ist die -Code \family default -Umgebung auf Stufe 1, der äußersten Stufe. + \end_layout \begin_layout LyX-Code @@ -9891,11 +10108,7 @@ Jetzt werden wir Eingabe drücken, dann \family sans Alt+Eingabe+Rechts \family default -; danach -\begin_inset Newline newline -\end_inset - -werden wir zur +; danach werden wir zur \end_layout \begin_layout LyX-Code @@ -9960,8 +10173,7 @@ Aufzählung \family default - und \family sans -Auf\SpecialChar ligaturebreak -listung +Auflistung \family default -Umgebungen \begin_inset Argument 1 @@ -9999,17 +10211,12 @@ Alt+Eingabe \family default gedrückt, gefolgt von \family sans - -\begin_inset Newline newline -\end_inset - Alt+Eingabe+Rechts \family default . Was wird passieren, wenn wir eine \family sans -Auf\SpecialChar ligaturebreak -listung +Auflistung \family default -Umgebung hier hinein schachteln? Sie wird auf Stufe 3 sein, aber welche Marke wird es sein? Ein Stern? @@ -10028,8 +10235,7 @@ erste \emph default \family sans -Auf\SpecialChar ligaturebreak -listung +Auflistung \family default -Stufe, obwohl wir auf Stufe 3 sind. Deswegen ist die Marke ein schwarzer Kreis. @@ -10037,18 +10243,13 @@ listung \family sans Alt+Eingabe \family default -, -\begin_inset Newline newline -\end_inset - -dann +, dann \family sans Alt+Eingabe+Rechts \family default , dann der Umgebungswechsel auf \family sans -Auf\SpecialChar ligaturebreak -listung +Auflistung \family default .) \begin_inset Separator latexpar @@ -10063,11 +10264,7 @@ Hier ist Stufe 4, produziert mit \family sans Alt+Eingabe \family default -, dann -\begin_inset Newline newline -\end_inset - - +, dann \family sans Alt+Eingabe+Rechts. @@ -10231,8 +10428,7 @@ Aufzählung \family default - und \family sans -Auf\SpecialChar ligaturebreak -listung +Auflistung \family default -Umgebungen benutzt. Die Anzahl von @@ -10255,8 +10451,7 @@ Aufzählung -Eintrag benutzt. Dasselbe gilt auch für die \family sans -Auf\SpecialChar ligaturebreak -listung +Auflistung \family default -Umgebung. \end_layout @@ -10587,8 +10782,7 @@ Wie Sie sehen können, erreichen Sie mit dem Schachteln von Umgebungen in eine ganze Menge mit nur wenigen Tastendrücken. Wir hätten leicht eine \family sans -Auf\SpecialChar ligaturebreak -listung +Auflistung \family default innerhalb von \family sans @@ -10616,8 +10810,7 @@ Zitat \family default innerhalb von einer \family sans -Auf\SpecialChar ligaturebreak -listung +Auflistung \family default . Sie haben jede Menge Möglichkeiten zur Auswahl. @@ -10680,8 +10873,7 @@ Aufzählung \end_layout \begin_layout Itemize -Auf\SpecialChar ligaturebreak -listung +Auflistung \end_layout \end_deeper @@ -10819,14 +11011,30 @@ reference "sec:Literaturverzeichnis" Offensic \family default \series default -htlich sollte zwischen „Abschnitt“ und „ +htlich sollte zwischen +\begin_inset Quotes gld +\end_inset + +Abschnitt +\begin_inset Quotes erd +\end_inset + + und +\begin_inset Quotes gld +\end_inset + + \begin_inset CommandInset ref LatexCommand ref reference "sec:Literaturverzeichnis" \end_inset -“ ein geschütztes Leerzeichen stehen. + +\begin_inset Quotes erd +\end_inset + + ein geschütztes Leerzeichen stehen. Dieses wird über das Menü \family sans Einfügen @@ -10880,10 +11088,6 @@ Leerraum ! horizontaler \begin_layout Standard Alle horizontalen Leerräume können über das Menü \family sans - -\begin_inset Newline newline -\end_inset - Einfügen\SpecialChar menuseparator Formatierung\SpecialChar menuseparator Horizontaler @@ -11873,7 +12077,11 @@ jumps \end_layout \begin_layout Standard -So dass die Antwortmöglichkeiten exakt nach dem Ausdruck „Mr. +So dass die Antwortmöglichkeiten exakt nach dem Ausdruck +\begin_inset Quotes gld +\end_inset + +Mr. \begin_inset space ~ \end_inset @@ -11881,7 +12089,11 @@ Edge \begin_inset space ~ \end_inset -“ beginnen. + +\begin_inset Quotes grd +\end_inset + + beginnen. Dafür können Sie die Phantom-Einfügung im Menü \family sans Einfügen\SpecialChar menuseparator @@ -11890,7 +12102,11 @@ Phantom \family default verwenden. In unserem Fall fügen Sie ein horizontales Phantom am Anfang der letzten - beiden Zeilen ein und schreiben „Mr. + beiden Zeilen ein und schreiben +\begin_inset Quotes gld +\end_inset + +Mr. \begin_inset space ~ \end_inset @@ -11898,10 +12114,30 @@ Edge \begin_inset space ~ \end_inset -“ in das Phantom (beachten sie das Leerzeichen nach „Edge“). + +\begin_inset Quotes grd +\end_inset + + in das Phantom (beachten sie das Leerzeichen nach +\begin_inset Quotes gld +\end_inset + +Edge +\begin_inset Quotes erd +\end_inset + +). Eine Phantom-Einfügung gibt nur den Leerraum ihres Inhalts aus (so wie ein Platzhalter). - Das ist der Grund warum es „Phantom“ genannt wird. + Das ist der Grund warum es +\begin_inset Quotes gld +\end_inset + +Phantom +\begin_inset Quotes grd +\end_inset + + genannt wird. Das normale Phantom gibt die Höhe und Breite des Inhalts als Leerraum aus, während die horizontale und vertikale Variante nur die entsprechende Dimension ausgibt. @@ -12375,8 +12611,16 @@ Strg+Umschalt+Enter \family default eingefügt wird, bricht die Zeile um und dehnt sie dabei so, dass sie den kompletten Raum zwischen den Seitenrändern einnimmt. - Dies ist nützlich um „Fransen“ in Blocksatz-Absätzen zu verhindern, die - eventuell durch Leerraum aufgrund eines Zeilenumbruchs entstehen. + Dies ist nützlich um +\begin_inset Quotes gld +\end_inset + +Fransen +\begin_inset Quotes grd +\end_inset + + in Blocksatz-Absätzen zu verhindern, die eventuell durch Leerraum aufgrund + eines Zeilenumbruchs entstehen. \end_layout \begin_layout Standard @@ -12916,8 +13160,7 @@ reference "subsec:LaTeX-Schriftunterstützung" -Schriften sind dann allerdings nicht verfügbar. Es ist zu beachten, dass \SpecialChar LyX dann alle verfügbaren Schriften in jeder der - drei Listen (Serifenschrift, Serifenlose, und Schreibmaschine) auf\SpecialChar ligaturebreak -führt, + drei Listen (Serifenschrift, Serifenlose, und Schreibmaschine) aufführt, da \SpecialChar LyX die Familie nicht bestimmen kann. Des Weiteren kann die Ausgabe mit einigen der Schriften fehlschlagen, entweder @@ -12944,22 +13187,38 @@ Standard, verwendet die Schrift, die die aktuelle Dokumentklasse als Standard hat. In den meisten Fällen ist dies die Standard-\SpecialChar TeX -Schrift, die als +\begin_inset Quotes gld +\end_inset + + \family typewriter -„Computer +Computer \begin_inset space ~ \end_inset Modern \family default -“ ( + +\begin_inset Quotes grd +\end_inset + + ( \family typewriter cm \family default ) oder +\begin_inset Quotes gld +\end_inset + + \family typewriter -„European Computer Modern +European Computer Modern \family default -“ ( + +\begin_inset Quotes grd +\end_inset + + ( \family typewriter ec \family default @@ -13099,7 +13358,23 @@ stehlen \emph on Guillemets \emph default - '«' und '»', + +\begin_inset Quotes gld +\end_inset + +« +\begin_inset Quotes grd +\end_inset + + und +\begin_inset Quotes gld +\end_inset + +» +\begin_inset Quotes grd +\end_inset + +, \begin_inset Foot status collapsed @@ -13155,11 +13430,31 @@ zwei brève \emph default in einer PDF-Datei suchen, werden Sie es nicht finden, weil der PDF-Betrachter - nach „è“ sucht und nicht nach „e + + nach +\emph on + +\begin_inset Quotes gld +\end_inset + + +\emph default +è +\begin_inset Quotes grd +\end_inset + + sucht und nicht nach +\begin_inset Quotes gld +\end_inset + +e + \begin_inset space ~ \end_inset - ̀“. + Ì€ +\begin_inset Quotes grd +\end_inset + +. \end_layout \begin_layout Itemize @@ -13534,7 +13829,7 @@ nicht die Bildschirmschrift! Die Änderung ist nur in der Ausgabe sichtbar; dies ist Teil des WYSIWYM Konzeptes. \SpecialChar LyX -’ Bildschirmschriften können im Dialog +' Bildschirmschriften können im Dialog \family sans Werkzeuge\SpecialChar menuseparator Einstellungen @@ -14421,7 +14716,15 @@ Winzig \family default \size tiny -Dies ist die „winzige“ Schriftgröße. +Dies ist die +\begin_inset Quotes gld +\end_inset + +winzige +\begin_inset Quotes grd +\end_inset + + Schriftgröße. \size default (Tastenkürzel: @@ -14455,7 +14758,15 @@ Klein \family default \size scriptsize -Dies ist die „sehr kleine“ Schriftgröße. +Dies ist die +\begin_inset Quotes gld +\end_inset + +sehr kleine +\begin_inset Quotes grd +\end_inset + + Schriftgröße. \size default (Tastenkürzel: @@ -14477,7 +14788,15 @@ Fußnote \family default \size footnotesize -Dies ist die „Fußnoten“-Schriftgröße. +Dies ist die +\begin_inset Quotes pld +\end_inset + +Fußnoten +\begin_inset Quotes erd +\end_inset + +-Schriftgröße. \size default ( @@ -14503,7 +14822,15 @@ Klein \family default \size small -Dies ist die „kleine“ Schriftgröße. +Dies ist die +\begin_inset Quotes gld +\end_inset + +kleine +\begin_inset Quotes erd +\end_inset + + Schriftgröße. \size default ( @@ -14535,7 +14862,15 @@ Alt+S \family sans Normal \family default - Dies ist die „normale“ Schriftgröße. + Dies ist die +\begin_inset Quotes gld +\end_inset + +normale +\begin_inset Quotes erd +\end_inset + + Schriftgröße. Dies ist auch die Standardgröße (Tastenkürzel: \family sans Alt+S @@ -14559,7 +14894,15 @@ Groß \family default \size large -Dies ist die „große“ Schriftgröße. +Dies ist die +\begin_inset Quotes gld +\end_inset + +große +\begin_inset Quotes grd +\end_inset + + Schriftgröße. \size default (Tastenkürzel: @@ -14589,7 +14932,15 @@ Größer \family default \size larger -Dies ist die „größere“ Schriftgröße. +Dies ist die +\begin_inset Quotes gld +\end_inset + +größere +\begin_inset Quotes grd +\end_inset + + Schriftgröße. \size default (Tastenkürzel: @@ -14623,7 +14974,15 @@ Größer \family default \size largest -Dies ist die „noch größere“ Schriftgröße. +Dies ist die +\begin_inset Quotes gld +\end_inset + +noch größere +\begin_inset Quotes grd +\end_inset + + Schriftgröße. \size default (Tastenkürzel: @@ -14645,7 +15004,15 @@ Riesig \family default \size huge -Dies ist die „riesige“ Schriftgröße. +Dies ist die +\begin_inset Quotes gld +\end_inset + +riesige +\begin_inset Quotes grd +\end_inset + + Schriftgröße. \size default (Tastenkürzel: @@ -14675,8 +15042,15 @@ Gigantisch \family default \size giant -Dies ist die „gigantische“ Schrift\SpecialChar softhyphen -größe. +Dies ist die +\begin_inset Quotes gld +\end_inset + +gigantische +\begin_inset Quotes grd +\end_inset + + Schriftgröße. \size default (Tastenkürzel: @@ -14784,11 +15158,7 @@ Unterstrichen Dies ist unterstrichener Text. \bar default - -\begin_inset Newline newline -\end_inset - -(Tastenkürzel + (Tastenkürzel \family sans Alt+Z \begin_inset space ~ @@ -14827,11 +15197,7 @@ unterstrichen Dies ist doppelt unterstrichener Text. \uuline default - -\begin_inset Newline newline -\end_inset - -(Tastenkürzel + (Tastenkürzel \family sans Alt+Z \begin_inset space ~ @@ -14862,11 +15228,7 @@ unterstrichen Dies ist wellig unterstrichener Text. \uwave default - -\begin_inset Newline newline -\end_inset - -(Tastenkürzel + (Tastenkürzel \family sans Alt+Z \begin_inset space ~ @@ -14895,11 +15257,7 @@ Durchgestrichen Dies ist durchgestrichener Text. \strikeout default - -\begin_inset Newline newline -\end_inset - -(Tastenkürzel + (Tastenkürzel \family sans Strg+Umschalt+O \family default @@ -15018,8 +15376,23 @@ Leertaste \family default . Will man nur die Einstellungen umschalten, die man gerade geändert hat - (angenommen man hat gerade den Schnitt auf „geneigt“ und die Strichstärke - auf „fett“ gesetzt), verwendet man die Option + (angenommen man hat gerade den Schnitt auf +\begin_inset Quotes gld +\end_inset + +geneigt +\begin_inset Quotes grd +\end_inset + + und die Strichstärke auf +\begin_inset Quotes gld +\end_inset + +fett +\begin_inset Quotes grd +\end_inset + + gesetzt), verwendet man die Option \family sans Alle \begin_inset space ~ @@ -15055,8 +15428,31 @@ Schreibmaschine \family typewriter Schreibmaschine \family default - ist eine sogenannte „nichtproportionale“ Schriftart, was bedeutet, dass - jedes Zeichen dieselbe Breite hat; das 'i' ist so breit wie das 'm'. + ist eine sogenannte +\begin_inset Quotes gld +\end_inset + +nichtproportionale +\begin_inset Quotes grd +\end_inset + + Schriftart, was bedeutet, dass jedes Zeichen dieselbe Breite hat; das +\begin_inset Quotes gld +\end_inset + +i +\begin_inset Quotes grd +\end_inset + + ist so breit wie das +\begin_inset Quotes gld +\end_inset + +m +\begin_inset Quotes grd +\end_inset + +. Hier ist ein Beispiel \begin_inset Newline newline \end_inset @@ -15109,8 +15505,15 @@ kein Schreibmaschine-Text Serifenschrift \family default Schriftarten verwenden Zeichen mit Serifen. - Dies sind die kleinen „Anhängsel“ am Ende der Striche, die ein Zeichen - bilden. + Dies sind die kleinen +\begin_inset Quotes gld +\end_inset + +Anhängsel +\begin_inset Quotes grd +\end_inset + + am Ende der Striche, die ein Zeichen bilden. Das folgende Beispiel zeigt den Unterschied: \begin_inset Newline newline \end_inset @@ -15143,7 +15546,14 @@ Serifenlos \end_layout \begin_layout Standard -„Umschalten“ bezieht sich auf das Setzen oder Entfernen von Schrifteigenschaften. +\begin_inset Quotes gld +\end_inset + +Umschalten +\begin_inset Quotes grd +\end_inset + + bezieht sich auf das Setzen oder Entfernen von Schrifteigenschaften. Wenn eine Eigenschaft fürs Umschalten im Textstil-Dialog ausgewählt ist, wird sie vom ausgewählten Text entfernt, wenn dieser schon die Eigenschaft besitzt. @@ -15156,10 +15566,32 @@ B. die Schrifteigenschaften B, C, F und G hat, und wenn B auf umschalten, C auf nicht umschalten gesetzt ist, wird der Text danach die Eigenschaften A, C, F und G haben. - „Niemals Umschalten“ und „Immer Umschalten“ bedeutet, dass man die Umschalt-Eig -enschaft nicht kontrolliert. - Für die Eigenschaften der linken Seite des Dialogs („Familie“ usw.) entscheidet - man selbst über das Umschalten. + +\begin_inset Quotes gld +\end_inset + +Niemals Umschalten +\begin_inset Quotes grd +\end_inset + + und +\begin_inset Quotes gld +\end_inset + +Immer Umschalten +\begin_inset Quotes grd +\end_inset + + bedeutet, dass man die Umschalt-Eigenschaft nicht kontrolliert. + Für die Eigenschaften der linken Seite des Dialogs ( +\begin_inset Quotes gld +\end_inset + +Familie +\begin_inset Quotes grd +\end_inset + + usw.) entscheidet man selbst über das Umschalten. Wenn \family sans Alle @@ -15170,12 +15602,36 @@ umschalten \family default gewählt ist, werden alle Eigenschaften der linken Dialogseite umgeschaltet; standardmäßig werden sie nicht umgeschaltet. - Die Einstellung „Zurücksetzen“ wird nie umgeschaltet. + Die Einstellung +\begin_inset Quotes gld +\end_inset + +Zurücksetzen +\begin_inset Quotes grd +\end_inset + + wird nie umgeschaltet. Wenn man z. \begin_inset space \thinspace{} \end_inset -B: „Strichstärke“ auf „Zurücksetzen“ setzt, +B: +\begin_inset Quotes gld +\end_inset + +Strichstärke +\begin_inset Quotes grd +\end_inset + + auf +\begin_inset Quotes gld +\end_inset + +Zurücksetzen +\begin_inset Quotes grd +\end_inset + + setzt, \family sans Alle \begin_inset space ~ @@ -15184,7 +15640,15 @@ Alle umschalten \family default wählt und dies auf fett gesetzten Text anwendet, wird auf die Voreinstellung - „Mittel“ zurückgesetzt, egal wie oft man den Stil anwendet. + +\begin_inset Quotes gld +\end_inset + +Mittel +\begin_inset Quotes grd +\end_inset + + zurückgesetzt, egal wie oft man den Stil anwendet. \end_layout \begin_layout Standard @@ -15423,7 +15887,7 @@ Dieses Dateiformat hat die Endung die Datei mit anderen Werkzeugen bearbeiten. Die \SpecialChar LaTeX -Datei wird automatisch in \SpecialChar LyX -’ temporärem Verzeichnis erstellt, wann +' temporärem Verzeichnis erstellt, wann immer Sie Ihr Dokument ansehen oder exportieren. \end_layout @@ -15466,14 +15930,29 @@ Dateiformate ! DVI \end_layout \begin_layout Standard -Dieses Dateiformat hat die Endung „ +Dieses Dateiformat hat die Endung +\begin_inset Quotes gld +\end_inset + + \family typewriter .dvi \family default -“. - Diese bedeutet „device-independent“ (geräteunabhängig) da dieses Format - genau das ist: Man kann es auf allen Computern ohne irgend welche Konvertierung -en einsetzen. + +\begin_inset Quotes grd +\end_inset + +. + Diese bedeutet +\begin_inset Quotes gld +\end_inset + +device-independent +\begin_inset Quotes grd +\end_inset + + (geräteunabhängig) da dieses Format genau das ist: Man kann es auf allen + Computern ohne irgend welche Konvertierungen einsetzen. DVIs eignen sich für schnelle Voransicht für andere Ausgabeformate wie PostScript. \end_layout @@ -15545,7 +16024,7 @@ Dateiformate ! PostScript \begin_layout Standard Dieses Dateiformat hat die Endung -\begin_inset Quotes gld +\begin_inset Quotes eld \end_inset @@ -15553,7 +16032,7 @@ Dieses Dateiformat hat die Endung .ps \family default -\begin_inset Quotes grd +\begin_inset Quotes erd \end_inset . @@ -15564,8 +16043,16 @@ Adobe als Druckersprache entwickelt. Das Format enthält daher Befehle, die Drucker verwenden um die Datei zu drucken. - PostScript kann als „Programmiersprache“ angesehen werden; man kann damit - Berechnungen durchführen und Diagramme und Bilder zeichnen. + PostScript kann als +\begin_inset Quotes gld +\end_inset + +Programmiersprache +\begin_inset Quotes grd +\end_inset + + angesehen werden; man kann damit Berechnungen durchführen und Diagramme + und Bilder zeichnen. \begin_inset Foot status collapsed @@ -15596,8 +16083,15 @@ status collapsed \end_layout \begin_layout Standard -PostScript kann Bilder nur im Format „Encapsulated PostScript“ (EPS, Dateiendung - +PostScript kann Bilder nur im Format +\begin_inset Quotes gld +\end_inset + +Encapsulated PostScript +\begin_inset Quotes grd +\end_inset + + (EPS, Dateiendung \begin_inset Quotes gld \end_inset @@ -15605,7 +16099,11 @@ PostScript kann Bilder nur im Format „Encapsulated PostScript“ (EPS, Dateien \family typewriter .eps \family default -“) enthalten. + +\begin_inset Quotes grd +\end_inset + +) enthalten. Da \SpecialChar LyX es erlaubt jedes bekannte Bildformat in Dokumente einzufügen, muss es diese im Hintergrund in EPS konvertieren. @@ -15683,19 +16181,42 @@ Dieses Dateiformat hat die Endung \end_inset . - Das „Portable Document Format“ (PDF) wurde von + Das +\begin_inset Quotes gld +\end_inset + +Portable Document Format +\begin_inset Quotes grd +\end_inset + + (PDF) wurde von \family typewriter Adobe \family default von PostScript abgeleitet. Es ist komprimierter und verwendet weniger Befehle als PostScript. - Wie der Name „portable“ (übertragbar) impliziert, kann es auf jedem Computersys -tem dargestellt werden und der Ausdruck wird exakt gleich aussehen. + Wie der Name +\begin_inset Quotes gld +\end_inset + +portable +\begin_inset Quotes grd +\end_inset + + (übertragbar) impliziert, kann es auf jedem Computersystem dargestellt + werden und der Ausdruck wird exakt gleich aussehen. \end_layout \begin_layout Standard -PDF kann Bilder in seinem eigenen PDF-Format sowie in den Formaten „Joint - Photographic Experts Group“ (JPG, Dateiendung +PDF kann Bilder in seinem eigenen PDF-Format sowie in den Formaten +\begin_inset Quotes gld +\end_inset + +Joint Photographic Experts Group +\begin_inset Quotes grd +\end_inset + + (JPG, Dateiendung \begin_inset Quotes gld \end_inset @@ -15719,7 +16240,15 @@ PDF kann Bilder in seinem eigenen PDF-Format sowie in den Formaten „Joint \begin_inset Quotes grd \end_inset -) und „Portable Network Graphics“ (PNG, Dateiendung +) und +\begin_inset Quotes gld +\end_inset + +Portable Network Graphics +\begin_inset Quotes grd +\end_inset + + (PNG, Dateiendung \begin_inset Quotes gld \end_inset @@ -15996,8 +16525,15 @@ Handbuchergänzungen \end_layout \begin_layout Standard -Die XHTML-Ausgabe ist noch „in der Entwicklung“ so dass noch nicht alle - Funktionen von \SpecialChar LyX +Die XHTML-Ausgabe ist noch +\begin_inset Quotes gld +\end_inset + +in der Entwicklung +\begin_inset Quotes grd +\end_inset + + so dass noch nicht alle Funktionen von \SpecialChar LyX unterstützt werden. Siehe das Kapitel \emph on @@ -16115,7 +16651,7 @@ Andere Formate aktualisieren \begin_layout Standard Bei der Vorschau eines Dokuments wird die Ausgabedatei nur in \SpecialChar LyX -’ temporärem +' temporärem Verzeichnis erzeugt. Für eine permanente Ausgabe muss das Dokument exportiert werden. \end_layout @@ -16160,11 +16696,19 @@ Gedankenstriche \begin_layout Standard In \SpecialChar LyX - hat das ' + hat das +\begin_inset Quotes gld +\end_inset + + \family typewriter - \family default -'-Zeichen vier Längen + +\begin_inset Quotes eld +\end_inset + +-Zeichen vier Längen \emph on : \emph default @@ -16456,7 +17000,7 @@ Minuszeichen \begin_layout Standard Wenn Sie dies in \SpecialChar LyX - lesen, sehen Sie kaum Unterschiede, aber in der gedruckten + lesen, sehen Sie keine Unterschiede, aber in der gedruckten Version erkennen Sie es. \end_layout @@ -16718,7 +17262,11 @@ reference "subsec:TeX-Code-Kästchen" \begin_inset Newline newline \end_inset -„Im Deutschen werden zusammengesetzte Worte entweder zusammengeschrieben + +\begin_inset Quotes gld +\end_inset + +Im Deutschen werden zusammengesetzte Worte entweder zusammengeschrieben wie eben oder mit einem Bindestrich zusammengefügt wie bei Programmiersprachen \begin_inset ERT status collapsed @@ -16731,7 +17279,11 @@ status collapsed \end_inset Handbücher\SpecialChar ldots -“ + +\begin_inset Quotes grd +\end_inset + + \end_layout \begin_layout Enumerate @@ -16760,8 +17312,15 @@ Weil \SpecialChar LyX \end_layout \begin_layout Standard -kann es wie hier vorkommen, dass die Zeile nach dem '-'-Zeichen umgebrochen - wird, was natürlich Unsinn ist. +kann es wie hier vorkommen, dass die Zeile nach dem +\begin_inset Quotes gld +\end_inset + +- +\begin_inset Quotes grd +\end_inset + +-Zeichen umgebrochen wird, was natürlich Unsinn ist. Dann verwendet man am besten den geschützten Trennstrich \begin_inset Index idx status collapsed @@ -16941,11 +17500,19 @@ Strg+Alt+Leertaste \end_layout \begin_layout Enumerate -Benutzen Sie einen kleinen Zwischenraum „ +Benutzen Sie einen kleinen Zwischenraum +\begin_inset Quotes gld +\end_inset + + \begin_inset space \thinspace{} \end_inset -“ ( + +\begin_inset Quotes grd +\end_inset + + ( \begin_inset CommandInset citation LatexCommand cite key "latex-einführung" @@ -17042,15 +17609,75 @@ status collapsed \end_inset +\change_inserted 986154928 1464017699 + +\begin_inset CommandInset label +LatexCommand label +name "subsec:Anführungszeichen" + +\end_inset + + +\change_unchanged + \end_layout \begin_layout Standard \SpecialChar LyX setzt Anführungszeichen normalerweise richtig. - Insbesondere wird es unterschiedliche Anführungszeichen für den Beginn - und das Ende des eingeschlossenen Textes benutzen. - Zum Beispiel „Anfang Ende“. - Das Tastaturzeichen + Insbesondere +\change_deleted 986154928 1464016816 +wird es +\change_inserted 986154928 1464017342 +werden bei der Eingabe von +\family sans + +\begin_inset Info +type "shortcut" +arg "quote-insert" +\end_inset + + +\change_unchanged + +\family default + unterschiedliche Anführungszeichen für den Beginn und das Ende des eingeschloss +enen Textes benutz +\change_inserted 986154928 1464017341 +t +\change_deleted 986154928 1464016841 +en. +\change_inserted 986154928 1464017341 +, +\change_unchanged + +\change_deleted 986154928 1464016846 +Z +\change_inserted 986154928 1464017341 +z +\change_unchanged +um +\change_inserted 986154928 1464017341 + +\begin_inset space \thinspace{} +\end_inset + + +\change_deleted 986154928 1464016866 + +\change_unchanged +Beispiel +\begin_inset Quotes gld +\end_inset + +Anfang Ende +\begin_inset Quotes grd +\end_inset + +. + +\change_deleted 986154928 1464017364 +Das Tastaturzeichen \family sans " \family default @@ -17059,12 +17686,61 @@ status collapsed Umschalt+2) \family default wird sie automatisch erzeugen. +\change_inserted 986154928 1464017500 + +\begin_inset Foot +status open + +\begin_layout Plain Layout + +\change_inserted 986154928 1464017594 +Natürlich kann diese +\begin_inset Quotes gld +\end_inset + +smart-quotes +\begin_inset Quotes grd +\end_inset + + Tastenbindung auch entfernt werden (siehe Abschnitt +\begin_inset space ~ +\end_inset + + +\begin_inset CommandInset ref +LatexCommand ref +reference "subsec:Tastenkürzel-bearbeiten" + +\end_inset + +). +\change_unchanged + +\end_layout + +\end_inset + + +\change_unchanged + \end_layout \begin_layout Standard Sie können das Verhalten der +\change_inserted 986154928 1464017416 + \family sans + +\begin_inset Info +type "shortcut" +arg "quote-insert" +\end_inset + + +\change_deleted 986154928 1464017416 " +\change_unchanged + \family default -Taste im Dialogfenster \family sans @@ -17095,75 +17771,199 @@ Anführungszeichen \family default einstellen. +\change_deleted 986154928 1464017018 + \end_layout \begin_layout Standard + +\change_deleted 986154928 1464017023 Ãœber \family sans Anführungszeichen \family default - können Sie sechs verschiedene Anführungszeichen auswählen: + können +\change_unchanged +Sie +\change_inserted 986154928 1464017026 +können +\change_unchanged +sechs verschiedene Anführungszeichen +\change_inserted 986154928 1464017048 +stile +\change_unchanged + auswählen: \end_layout \begin_layout Labeling \labelwidthstring 00.00.0000 \family sans -“Text†+\begin_inset Quotes eld +\end_inset + +Text +\begin_inset Quotes erd +\end_inset + + \family default - benutzt die Anführungszeichen: “doppelt†+ benutzt die Anführungszeichen: +\begin_inset Quotes eld +\end_inset + +doppelt +\begin_inset Quotes grd +\end_inset + + \end_layout \begin_layout Labeling \labelwidthstring 00.00.0000 \family sans -â€Text†+\begin_inset Quotes sld +\end_inset + +Text +\begin_inset Quotes srd +\end_inset + + \family default - benutzt die Anführungszeichen: â€doppelt†+ benutzt die Anführungszeichen: +\begin_inset Quotes sld +\end_inset + +doppelt +\begin_inset Quotes srd +\end_inset + + \end_layout \begin_layout Labeling \labelwidthstring 00.00.0000 \family sans -„Text“ +\begin_inset Quotes gld +\end_inset + +Text +\begin_inset Quotes grd +\end_inset + + \family default - benutzt die Anführungszeichen: „doppelt“ + benutzt die Anführungszeichen: +\begin_inset Quotes gld +\end_inset + +doppelt +\begin_inset Quotes grd +\end_inset + + \end_layout \begin_layout Labeling \labelwidthstring 00.00.0000 \family sans -„Text†+\begin_inset Quotes pld +\end_inset + +Text +\begin_inset Quotes prd +\end_inset + + \family default - benutzt die Anführungszeichen: „doppelt†+ benutzt die Anführungszeichen: +\begin_inset Quotes pld +\end_inset + +doppelt +\begin_inset Quotes prd +\end_inset + + \end_layout \begin_layout Labeling \labelwidthstring 00.00.0000 \family sans -«Text» +\begin_inset Quotes fld +\end_inset + +Text +\begin_inset Quotes frd +\end_inset + + \family default - benutzt die Anführungszeichen: «doppelt» + benutzt die Anführungszeichen: +\begin_inset Quotes fld +\end_inset + +doppelt +\begin_inset Quotes frd +\end_inset + + \end_layout \begin_layout Labeling \labelwidthstring 00.00.0000 \family sans -»Text« +\begin_inset Quotes ald +\end_inset + +Text +\begin_inset Quotes ard +\end_inset + + \family default - benutzt die Anführungszeichen: »doppelt« + benutzt die Anführungszeichen: +\begin_inset Quotes ald +\end_inset + +doppelt +\begin_inset Quotes ard +\end_inset + + \end_layout \begin_layout Standard -Um ein einfaches Anführungszeichens zu schreiben wollen, benutzen Sie +Um ein einfaches Anführungszeichens zu schreiben +\change_deleted 986154928 1464016748 + wollen +\change_unchanged +, benutzen Sie +\change_deleted 986154928 1464016754 + \family sans -Alt+" +Alt+ +\begin_inset Quotes grd +\end_inset + + +\change_inserted 986154928 1464016770 + \family default + +\begin_inset Info +type "shortcut" +arg "quote-insert single" +\end_inset + + +\change_unchanged . \end_layout @@ -17265,12 +18065,42 @@ ffl \begin_layout Standard Manchmal aber möchte man keine Ligaturen in einem Wort. - Während eine Ligatur in einem Wort wie „Graffiti“ vielleicht in Ordnung - ist, sieht es in zusammengesetzten Worten seltsam aus, zum Beispiel „Stofflappe -n“ oder „Dorffest“. + Während eine Ligatur in einem Wort wie +\begin_inset Quotes pld +\end_inset + +Graffiti +\begin_inset Quotes grd +\end_inset + + vielleicht in Ordnung ist, sieht es in zusammengesetzten Worten seltsam + aus, zum Beispiel +\begin_inset Quotes pld +\end_inset + +Stofflappen +\begin_inset Quotes grd +\end_inset + + oder +\begin_inset Quotes pld +\end_inset + +Dorffest +\begin_inset Quotes grd +\end_inset + +. Um die Ligatur aufzuheben benutzt man den \SpecialChar LaTeX --Befehl „|“ zwischen den Buchstaben - ( +-Befehl +\begin_inset Quotes pld +\end_inset + +| +\begin_inset Quotes grd +\end_inset + + zwischen den Buchstaben ( \family sans Einfügen\SpecialChar menuseparator Formatierung\SpecialChar menuseparator @@ -17291,9 +18121,41 @@ Ligatur!-trenner Strg+Umschalt+L \family default ). - Dies macht aus „Stofflappen“ „Stoff\SpecialChar ligaturebreak -lappen“ und aus „Dorffest“ „Dorf\SpecialChar ligaturebreak -fest“. + Dies macht aus +\begin_inset Quotes pld +\end_inset + +Stofflappen +\begin_inset Quotes grd +\end_inset + + +\begin_inset Quotes pld +\end_inset + +Stoff\SpecialChar ligaturebreak +lappen +\begin_inset Quotes grd +\end_inset + + und aus +\begin_inset Quotes pld +\end_inset + +Dorffest +\begin_inset Quotes grd +\end_inset + + +\begin_inset Quotes pld +\end_inset + +Dorf\SpecialChar ligaturebreak +fest +\begin_inset Quotes grd +\end_inset + +. \end_layout \begin_layout Subsection @@ -17358,11 +18220,19 @@ ietet \SpecialChar LyX \begin_layout Standard Sie wundern sich vielleicht warum die \SpecialChar LaTeX --Version „2 +-Version +\begin_inset Quotes gld +\end_inset + +2 \begin_inset Formula $\epsilon$ \end_inset -“ ist. + +\begin_inset Quotes grd +\end_inset + + ist. Es ist eine alte Tradition in der \SpecialChar TeX -Welt, dass man für Programme verrückte Versionsnummern vergibt. @@ -17371,9 +18241,25 @@ Sie wundern sich vielleicht warum die \SpecialChar LaTeX \begin_inset Formula $\pi$ \end_inset -: Die aktuelle Version ist „\SpecialChar TeX --3.141592“, die vorherige war „\SpecialChar TeX --3.14159“. +: Die aktuelle Version ist +\begin_inset Quotes gld +\end_inset + +\SpecialChar TeX +-3.141592 +\begin_inset Quotes grd +\end_inset + +, die vorherige war +\begin_inset Quotes gld +\end_inset + +\SpecialChar TeX +-3.14159 +\begin_inset Quotes grd +\end_inset + +. \end_layout \begin_layout Subsection @@ -17395,8 +18281,15 @@ Im Allgemeinen ist der Abstand zwischen Zahl und Einheit kleiner als ein normales Leerzeichen zwischen zwei Wörtern. Wie man im Beispiel sehen kann, sieht es besser aus, wenn der Abstand kleiner ist. - Um solch ein „halbes Leerzeichen“ für Einheiten einzufügen, verwendet man - das Menü + Um solch ein +\begin_inset Quotes gld +\end_inset + +halbes Leerzeichen +\begin_inset Quotes erd +\end_inset + + für Einheiten einzufügen, verwendet man das Menü \family sans Einfügen\SpecialChar menuseparator Formatierung\SpecialChar menuseparator @@ -17794,12 +18687,20 @@ arg "footnote-insert" \end_inset Diese Box ist \SpecialChar LyX -’ Darstellung einer Fußnote. +' Darstellung einer Fußnote. Klickt man mit links auf die Marke +\begin_inset Quotes gld +\end_inset + + \family sans -„Fußnote +Fußnote \family default -“, wird die Box geöffnet und man kann den Fußnotentext hineinschreiben. + +\begin_inset Quotes grd +\end_inset + +, wird die Box geöffnet und man kann den Fußnotentext hineinschreiben. Nochmaliges Klicken auf die Marke schließt die Box. Will man bestehenden Text als Fußnote setzen, markiert man ihn einfach und klickt dann auf den Fußnoten-Werkzeugleistenknopf. @@ -17876,7 +18777,15 @@ type "icon" arg "marginalnote-insert" \end_inset - eine Randnotiz einfügen, erscheint eine Box mit der Beschriftung „Rand“. + eine Randnotiz einfügen, erscheint eine Box mit der Beschriftung +\begin_inset Quotes gld +\end_inset + +Rand +\begin_inset Quotes grd +\end_inset + +. Diese Box repräsentiert in \SpecialChar LyX eine Randnotiz. \end_layout @@ -18175,11 +19084,27 @@ Treppeneffekt Aliasing \emph default ). - Bekannte Formate sind „Graphics Interchange Format“ (GIF, Dateiendung „ + Bekannte Formate sind +\begin_inset Quotes eld +\end_inset + +Graphics Interchange Format +\begin_inset Quotes erd +\end_inset + + (GIF, Dateiendung +\begin_inset Quotes eld +\end_inset + + \family typewriter .gif \family default -“) + +\begin_inset Quotes erd +\end_inset + +) \begin_inset Index idx status collapsed @@ -18211,11 +19136,27 @@ status collapsed \end_inset -, „Portable Network Graphics“ (PNG, Dateiendung „ +, +\begin_inset Quotes eld +\end_inset + +Portable Network Graphics +\begin_inset Quotes erd +\end_inset + + (PNG, Dateiendung +\begin_inset Quotes eld +\end_inset + + \family typewriter .png \family default -“) + +\begin_inset Quotes erd +\end_inset + +) \begin_inset Index idx status collapsed @@ -18247,15 +19188,39 @@ status collapsed \end_inset -, und „Joint Photographic Experts Group“ (JPG, Dateiendung „ +, und +\begin_inset Quotes eld +\end_inset + +Joint Photographic Experts Group +\begin_inset Quotes erd +\end_inset + + (JPG, Dateiendung +\begin_inset Quotes eld +\end_inset + + \family typewriter .jpg \family default -“ oder „ + +\begin_inset Quotes erd +\end_inset + + oder +\begin_inset Quotes eld +\end_inset + + \family typewriter .jpeg \family default -“) + +\begin_inset Quotes erd +\end_inset + +) \begin_inset Index idx status collapsed @@ -18308,12 +19273,27 @@ Grafiken \begin_inset Newline newline \end_inset -Skalierbare Grafikformate können „Scalable Vector Graphics“ (SVG, Dateiendung - „ +Skalierbare Grafikformate können +\begin_inset Quotes gld +\end_inset + +Scalable Vector Graphics +\begin_inset Quotes grd +\end_inset + + (SVG, Dateiendung +\begin_inset Quotes gld +\end_inset + + \family typewriter .svg \family default -“) + +\begin_inset Quotes grd +\end_inset + +) \begin_inset Index idx status collapsed @@ -18345,11 +19325,27 @@ status collapsed \end_inset -, „Encapsulated PostScript“ (EPS, Dateiendung „ +, +\begin_inset Quotes gld +\end_inset + +Encapsulated PostScript +\begin_inset Quotes grd +\end_inset + + (EPS, Dateiendung +\begin_inset Quotes gld +\end_inset + + \family typewriter .eps \family default -“) + +\begin_inset Quotes grd +\end_inset + +) \begin_inset Index idx status collapsed @@ -18381,11 +19377,27 @@ status collapsed \end_inset - und „Portable Document Format“ (PDF, Dateiendung „ + und +\begin_inset Quotes gld +\end_inset + +Portable Document Format +\begin_inset Quotes grd +\end_inset + + (PDF, Dateiendung +\begin_inset Quotes gld +\end_inset + + \family typewriter .pdf \family default -“) + +\begin_inset Quotes grd +\end_inset + +) \begin_inset Index idx status collapsed @@ -21492,8 +22504,15 @@ Einführung \begin_layout Standard Ein Gleitobjekt ist ein Teil eines Dokuments, das keinen festen Platz hat. - Es kann eine oder mehrere Seiten vorwärts oder rückwärts „gleiten“, dahin - wo es am besten passt. + Es kann eine oder mehrere Seiten vorwärts oder rückwärts +\begin_inset Quotes gld +\end_inset + +gleiten +\begin_inset Quotes grd +\end_inset + +, dahin wo es am besten passt. \family sans Fußnoten @@ -21546,11 +22565,19 @@ Gleitobjekt \end_inset B. - die Beschriftung „Abbildung + die Beschriftung +\begin_inset Quotes gld +\end_inset + +Abbildung \begin_inset space ~ \end_inset -#:“ hat (# ist die aktuelle Nummer) wird in das Dokument eingefügt. +#: +\begin_inset Quotes grd +\end_inset + + hat (# ist die aktuelle Nummer) wird in das Dokument eingefügt. Die Beschriftung wird automatisch in der Ausgabe in die Dokumentsprache übersetzt. Nach der Beschriftung kann man einen Text für die Legende eingeben. @@ -21727,9 +22754,25 @@ arg "dialog-show-new-inset ref" . Es ist wichtig Querverweise für Abbildungs-Gleitobjekte zu verwenden, und - nicht vage Formulierungen wie „die obige Abbildung“, denn \SpecialChar LaTeX - wird die Gleitobjekt -e in der Ausgabe neu anordnen, so dass sie nicht mehr „obig“ sein muss. + nicht vage Formulierungen wie +\begin_inset Quotes gld +\end_inset + +die obige Abbildung +\begin_inset Quotes grd +\end_inset + +, denn \SpecialChar LaTeX + wird die Gleitobjekte in der Ausgabe neu anordnen, so dass sie nicht + mehr +\begin_inset Quotes gld +\end_inset + +obig +\begin_inset Quotes grd +\end_inset + + sein muss. Für mehr über Querverweise siehe Abschnitt \begin_inset space ~ \end_inset @@ -21943,7 +22986,15 @@ arg "float-insert table" eingefügt werden. Sie haben dieselben Eigenschaften wie Abbildungs-Gleitobjekte bis auf dass die Tabelle darin normalerweise unter die Beschriftung statt wie bei Abbildunge -n darüber gesetzt wird und dass die Marken mit „tab:“ beginnen. +n darüber gesetzt wird und dass die Marken mit +\begin_inset Quotes gld +\end_inset + +tab: +\begin_inset Quotes grd +\end_inset + + beginnen. Tabelle \begin_inset space ~ \end_inset @@ -22741,7 +23792,14 @@ x^2 y \series default eingeben. - Wenn Sie Zeichen in der Hochstellung haben, die mit dem Zirkumflex '^' + Wenn Sie Zeichen in der Hochstellung haben, die mit dem Zirkumflex +\begin_inset Quotes gld +\end_inset + +^ +\begin_inset Quotes grd +\end_inset + akzentuiert werden können, müssen Sie die \family sans Leertaste @@ -23921,7 +24979,7 @@ Einfügen\SpecialChar menuseparator Mathe\SpecialChar menuseparator Array-Umgebung \family default -: dann bekommen Sie automatisch eine 2×2-Matrix, oder Sie klicken in der +: dann bekommen Sie automatisch eine 2x2-Matrix, oder Sie klicken in der automatischen \family sans Mathe-Werkzeugleiste @@ -24368,13 +25426,28 @@ arg "label-insert" ) eingefügt, wenn sich der Cursor in der Gleichung befindet. Es erscheint ein Dialog, in den man die Marke eingibt. Es ist empfohlen, dass man das vorgeschlagene +\begin_inset Quotes gld +\end_inset + + \family sans -„eq: +eq: \family default -“ als ersten Teil der Marke verwendet, da dies später hilft, schnell den + +\begin_inset Quotes grd +\end_inset + + als ersten Teil der Marke verwendet, da dies später hilft, schnell den Typ der Marke zu finden, wenn man viele Marken im Dokument hat. - Wir haben im folgenden Beispiel die Marke „eq:tanhExp“ in der zweiten Zeile - eingegeben: + Wir haben im folgenden Beispiel die Marke +\begin_inset Quotes gld +\end_inset + +eq:tanhExp +\begin_inset Quotes grd +\end_inset + + in der zweiten Zeile eingegeben: \begin_inset Formula \begin{eqnarray} \tanh(x) & = & \frac{\sinh(x)}{\cosh(x)}\nonumber \\ @@ -24416,7 +25489,7 @@ reference "eq:tanhExp" \begin_layout Standard Die Eigenschaften von \SpecialChar LyX -’ Querverweis-Box sind in Abschnitt +' Querverweis-Box sind in Abschnitt \begin_inset space ~ \end_inset @@ -24891,8 +25964,7 @@ Kalligrafisch Der Tastaturbefehl, um zu einem speziellen Schriftstil zu wechseln, wird im \family typewriter -Mathe\SpecialChar softhyphen -Modus +Mathe-Modus \family default wie beschrieben interpretiert. Der @@ -25269,7 +26341,7 @@ name "sec:Querverweise" \begin_layout Standard Eine von \SpecialChar LyX -’ Stärken sind Querverweise. +' Stärken sind Querverweise. Sie können auf jeden Abschnitt, jedes Gleitobjekt, jede Fußnote, Formel und Liste im Dokument referenzieren. Für eine Referenz müssen Sie zuerst eine Marke in den zu referenzieren @@ -25335,10 +26407,26 @@ enu:Zweiter-Eintrag . Der Präfix +\begin_inset Quotes gld +\end_inset + + \family sans -„enu: +enu: \family default -“ steht für „enumerate“ (auf deutsch: + +\begin_inset Quotes grd +\end_inset + + steht für +\begin_inset Quotes gld +\end_inset + +enumerate +\begin_inset Quotes grd +\end_inset + + (auf deutsch: \emph on nummeriert \emph default @@ -25350,10 +26438,18 @@ nummeriert B. +\begin_inset Quotes gld +\end_inset + + \family sans -„sec: +sec: \family default -“ (Englisch für + +\begin_inset Quotes grd +\end_inset + + (Englisch für \emph on section \emph default @@ -25384,10 +26480,18 @@ arg "dialog-show-new-inset ref" Marken. Um eine Marke einzufügen, können Sie die Marken alphabetisch sortieren und wählen dann +\begin_inset Quotes gld +\end_inset + + \family sans -„enu:Zweiter-Eintrag +enu:Zweiter-Eintrag \family default -“ aus. + +\begin_inset Quotes grd +\end_inset + + aus. Im Feld \family sans Format @@ -25488,7 +26592,15 @@ reference "tab:Ein-Tabellen-Gleitobjekt" \begin_layout Description (): druckt die Nummer umgeben von zwei runden Klammern, dies ist der Stil, wie er normalerweise für Verweise auf Formeln verwendet wird, - speziell wenn der Name „Gleichung“ weggelassen wird: + speziell wenn der Name +\begin_inset Quotes gld +\end_inset + +Gleichung +\begin_inset Quotes grd +\end_inset + + weggelassen wird: \begin_inset CommandInset ref LatexCommand eqref reference "tab:Ein-Tabellen-Gleitobjekt" @@ -25522,7 +26634,15 @@ Seite \begin_inset space ~ \end_inset -: druckt den Text „auf Seite“ und die Seitennummer: +: druckt den Text +\begin_inset Quotes gld +\end_inset + +auf Seite +\begin_inset Quotes grd +\end_inset + + und die Seitennummer: \begin_inset CommandInset ref LatexCommand vpageref reference "tab:Ein-Tabellen-Gleitobjekt" @@ -25542,10 +26662,32 @@ auf dieser Seite \end_inset gedruckt; wenn sich die Marke auf der gegenüberliegenden Seite in einem - doppelseitigen Dokument befindet, wird „auf der gegenüberliegenden Seite“ + doppelseitigen Dokument befindet, wird +\begin_inset Quotes gld +\end_inset + +auf der gegenüberliegenden Seite +\begin_inset Quotes grd +\end_inset + gedruckt; befindet sie sich auf der vorigen Seite, die keine gegenüberliegende - ist, wird „auf der vorherigen Seite“ gedruckt; wenn sie sich auf der nächsten, - nicht gegenüberliegenden Seite befindet, wird „auf der nächsten Seite“ + ist, wird +\begin_inset Quotes gld +\end_inset + +auf der vorherigen Seite +\begin_inset Quotes grd +\end_inset + + gedruckt; wenn sie sich auf der nächsten, nicht gegenüberliegenden Seite + befindet, wird +\begin_inset Quotes gld +\end_inset + +auf der nächsten Seite +\begin_inset Quotes grd +\end_inset + gedruckt. Der Wortlaut des gedruckten Texts hängt zudem von der verwendeten Dokumentklass e ab. @@ -25564,8 +26706,15 @@ Seite \begin_inset space ~ \end_inset -: druckt die Nummer, den Text „auf Seite“, und die Seitennummer: - +: druckt die Nummer, den Text +\begin_inset Quotes gld +\end_inset + +auf Seite +\begin_inset Quotes grd +\end_inset + +, und die Seitennummer: \begin_inset CommandInset ref LatexCommand vref reference "tab:Ein-Tabellen-Gleitobjekt" @@ -25699,10 +26848,18 @@ newref B. alle Verweise auf Abbildungen (die den Marken-Präfix +\begin_inset Quotes gld +\end_inset + + \family sans -„fig +fig \family default -“ haben) umzuformatieren, verwendet man den Befehl + +\begin_inset Quotes grd +\end_inset + + haben) umzuformatieren, verwendet man den Befehl \begin_inset Newline newline \end_inset @@ -25825,8 +26982,16 @@ Marken können jederzeit geändert werden. \begin_layout Standard Wenn ein Querverweis eine nicht existierende Marke referenziert, erscheint in \SpecialChar LyX - „NICHT VORHANDEN“ in der Querverweismarke und in der Ausgabe zwei Fragezeic -hen statt der Referenz. + +\begin_inset Quotes gld +\end_inset + +NICHT VORHANDEN +\begin_inset Quotes grd +\end_inset + + in der Querverweismarke und in der Ausgabe zwei Fragezeichen statt der + Referenz. \end_layout \begin_layout Standard @@ -26372,7 +27537,7 @@ Es gibt zwei Möglichkeiten, in einem \SpecialChar LyX \end_layout \begin_layout Enumerate -Sie können eine Literaturverzeichnis-Datenbank einfügen. +Sie können eine Literaturverzeichnis-Datenbank einfügen \begin_inset Foot status collapsed @@ -26391,7 +27556,7 @@ Bib\SpecialChar TeX \end_inset - Dies wird in Abschnitt +, was in Abschnitt \begin_inset space \space{} \end_inset @@ -26402,8 +27567,7 @@ reference "sec:Literaturverzeichnis-Datenbanken" \end_inset - beschrieben. - . + beschrieben wird. \end_layout \begin_layout Enumerate @@ -26518,7 +27682,15 @@ Marke \family default für einen Eintrag, erscheint die Marke statt der Nummer. Hier sind zwei Beispiele, da erste ohne Marke, das zweite mit der Marke - „Credits“: + +\begin_inset Quotes gld +\end_inset + +Credits +\begin_inset Quotes grd +\end_inset + +: \end_layout \begin_layout Standard @@ -26553,8 +27725,7 @@ key "lyxcredit" Um alle Literatureinträge auszurichten, kann man im Menü \family sans Bearbeiten\SpecialChar menuseparator -Absatz-Ein\SpecialChar softhyphen -stellungen +Absatz-Einstellungen \family default (Werkzeugleistenknopf \begin_inset Info @@ -26674,8 +27845,7 @@ Liste \end_inset Inhaltsverzeichnis\SpecialChar menuseparator -Bib\SpecialChar softhyphen -TeX-Literaturverzeichnis +BibTeX-Literaturverzeichnis \family default , woraufhin das \family sans @@ -26825,9 +27995,7 @@ Literaturverzeichnis \family default die Option \family sans -Ab\SpecialChar softhyphen -schnitt\SpecialChar softhyphen -spezifisches +Abschnittspezifisches \begin_inset space \space{} \end_inset @@ -26912,11 +28080,19 @@ Damit wird die Standardeinstellung überschrieben. \begin_layout Standard Im Dialogfenster können Sie auch Text, der vor oder nach dem Verweis erscheinen soll, festlegen. - Hier erscheint der Text „Kapitel + Hier erscheint der Text +\begin_inset Quotes gld +\end_inset + +Kapitel \begin_inset space \space{} \end_inset -3“ nach dem Verweis: +3 +\begin_inset Quotes grd +\end_inset + + nach dem Verweis: \begin_inset CommandInset citation LatexCommand cite after "Kapitel 3" @@ -26992,10 +28168,18 @@ Stichwortverzeichnis \family default eingefügt. Eine hellblaue Box namens +\begin_inset Quotes gld +\end_inset + + \family sans -„Stichwortverzeichnis +Stichwortverzeichnis \family default -“ zeigt die Stelle an, wo das Stichwortverzeichnis in der Ausgabe erscheinen + +\begin_inset Quotes grd +\end_inset + + zeigt die Stelle an, wo das Stichwortverzeichnis in der Ausgabe erscheinen wird. Die Stichwortverzeichnis-Box ist nicht wie andere \SpecialChar LyX -Boxen anklickbar. @@ -27035,8 +28219,7 @@ Stichworte werden häufig gruppiert, um dem Leser eine schnelle Suche zu ermöglichen. Wenn wir zum Beispiel \emph on -Auf\SpecialChar ligaturebreak -listung +Auflistung \emph default und \emph on @@ -27064,8 +28247,7 @@ Liste . Im Textfeld für das Stichwort \emph on - Auf\SpecialChar ligaturebreak -listung + Auflistung \emph default in Abschnitt \begin_inset space \space{} @@ -27084,8 +28266,7 @@ reference "subsec:Auflistung" \begin_layout Standard \series bold -Liste ! Auf\SpecialChar ligaturebreak -listung +Liste ! Auflistung \end_layout \begin_layout Standard @@ -27119,10 +28300,18 @@ ein. \begin_layout Standard Das Ausrufezeichen +\begin_inset Quotes gld +\end_inset + + \series bold -'! +! \series default -' markiert die Gruppierungsstufe, von denen es drei gibt. + +\begin_inset Quotes grd +\end_inset + + markiert die Gruppierungsstufe, von denen es drei gibt. Jede Stufe wird in der Druckausgabe ein wenig eingerückt. Für eine höhere Stufe ist kein Stichwort nötig, es wird aber trotzdem gedruckt, aber ohne Seitenzahl. @@ -27202,7 +28391,11 @@ Die Befehle \series bold |( \series default -“ und + +\begin_inset Quotes grd +\end_inset + + und \begin_inset Quotes gld \end_inset @@ -27210,7 +28403,11 @@ Die Befehle \series bold |) \series default -“ beginnen bzw. + +\begin_inset Quotes grd +\end_inset + + beginnen bzw. \begin_inset space \space{} \end_inset @@ -27219,7 +28416,15 @@ beenden den Indexbereich. des Dokuments einfügen. Diese erscheinen im Stichwortverzeichnis als ein Stichwort mit einer nachstehen den Liste von Seitenzahlen in denen sich das Stichwort befindet. - Ein Beispiel ist das Stichwort „Dokument ! Einstellungen“. + Ein Beispiel ist das Stichwort +\begin_inset Quotes gld +\end_inset + +Dokument ! Einstellungen +\begin_inset Quotes grd +\end_inset + +. \end_layout \begin_layout Subsection @@ -27338,9 +28543,33 @@ reference "subsec:Stichwort-Programm" \end_inset weiß nicht wie die Akzente in verschiedenen Sprachen einsortiert werden. - Als Beispiel haben wir die drei Stichworte „maison“, „maïs“ und „maître“. + Als Beispiel haben wir die drei Stichworte +\begin_inset Quotes gld +\end_inset + +maison +\begin_inset Quotes grd +\end_inset + +, +\begin_inset Quotes gld +\end_inset + +maïs +\begin_inset Quotes grd +\end_inset + + und +\begin_inset Quotes gld +\end_inset + +maître +\begin_inset Quotes grd +\end_inset + +. \begin_inset Index idx -status open +status collapsed \begin_layout Plain Layout Sinnloseintrag ! maïs @@ -27381,8 +28610,23 @@ voriger Eintrag@aktueller Eintrag \end_layout \begin_layout Standard -In unserem Fall wollen wir „maison“ nach „maïs“ haben und schreiben daher - in das Stichwort von maison: +In unserem Fall wollen wir +\begin_inset Quotes gld +\end_inset + +maison +\begin_inset Quotes grd +\end_inset + + nach +\begin_inset Quotes gld +\end_inset + +maïs +\begin_inset Quotes grd +\end_inset + + haben und schreiben daher in das Stichwort von maison: \end_layout \begin_layout Standard @@ -27450,7 +28694,11 @@ e mit \SpecialChar LaTeX -Paket ! \series default -“ beginnen. + +\begin_inset Quotes grd +\end_inset + + beginnen. Der Grund ist, dass sich das Stichwort für aeguill in einer Fußnote befindet. Um diesen Fehler von \family sans @@ -27511,8 +28759,15 @@ Dies ist ein kursiver Sinnloseintrag \end_inset - Des Weiteren kann die Seitennummer mit dem Befehl „|“, gefolgt von einem - \SpecialChar LaTeX + Des Weiteren kann die Seitennummer mit dem Befehl +\begin_inset Quotes gld +\end_inset + +| +\begin_inset Quotes grd +\end_inset + +, gefolgt von einem \SpecialChar LaTeX -Befehl ohne Backslash, formatiert werden . Man kann zum Beispiel \end_layout @@ -27544,7 +28799,11 @@ Sinnloseintrag ! kursive Seitennummer:|textit \series bold |Befehl \series default -“ + +\begin_inset Quotes grd +\end_inset + + \series bold \backslash @@ -27840,8 +29099,15 @@ Mehrere Stichwortverzeichnisse \begin_layout Standard In vielen Fällen ist es üblich mehr als ein Stichwortverzeichnis zu haben. - Zum Beispiel könnten Sie ein separates Stichwortverzeichnis „Index der - Namen“ neben dem Standard-Stichwortverzeichnis haben wollen. + Zum Beispiel könnten Sie ein separates Stichwortverzeichnis +\begin_inset Quotes gld +\end_inset + +Index der Namen +\begin_inset Quotes grd +\end_inset + + neben dem Standard-Stichwortverzeichnis haben wollen. Mit \SpecialChar LaTeX ist dies nicht direkt möglich, aber es gibt Pakete, die dies ermöglichen. \SpecialChar LyX @@ -27908,7 +29174,15 @@ Mehrere Indexe verwenden \family sans Verfügbare Indexe \family default - bereits den Standard-Index „Stichwortverzeichnis“. + bereits den Standard-Index +\begin_inset Quotes gld +\end_inset + +Stichwortverzeichnis +\begin_inset Quotes grd +\end_inset + +. Um weitere Indexe hinzuzufügen, geben Sie den Namen des Indexes in das Feld \family sans @@ -27957,7 +29231,15 @@ Wenn Sie die Index-Zuweisung eines Indexeintrags ändern wollen, klicken \begin_layout Itemize Durch Rechtsklicken auf einen Index kann man dessen Typ ändern. - Man kann des weiteren einen Index als „Unterindex“ verwenden. + Man kann des weiteren einen Index als +\begin_inset Quotes gld +\end_inset + +Unterindex +\begin_inset Quotes grd +\end_inset + + verwenden. Wenn man das macht, wird die Ãœberschrift des Indexes um eine Ebene verringert. Das bedeutet, dass wenn man z. \begin_inset space \thinspace{} @@ -27965,7 +29247,7 @@ Durch Rechtsklicken auf einen Index kann man dessen Typ ändern. B. eine Buch-Dokumentklasse verwendet, in der der Titel des Stichwortverzeichnisse -s als Kapitel definiert ist, der Titels des Unterindex’ als Abschnitt definiert +s als Kapitel definiert ist, der Titels des Unterindex' als Abschnitt definiert wird und daher in Nicht-Unterindexe eingegliedert werden kann. \end_layout @@ -28136,11 +29418,19 @@ Symbol \end_inset B. - „ + +\begin_inset Quotes gld +\end_inset + + \begin_inset Formula $\sigma$ \end_inset -“ zu bekommen, fügt man dies ein: + +\begin_inset Quotes grd +\end_inset + + zu bekommen, fügt man dies ein: \begin_inset Newline newline \end_inset @@ -28154,12 +29444,28 @@ sigma$ \series default -Das Zeichen '$' beginnt/beendet die Formel. +Das Zeichen +\begin_inset Quotes gld +\end_inset + +$ +\begin_inset Quotes grd +\end_inset + + beginnt/beendet die Formel. Der \SpecialChar LaTeX -Befehl für den griechischen Buchstaben ist dessen Name beginnend mit - einem umgekehrten Schrägstrich ' + einem umgekehrten Schrägstrich +\begin_inset Quotes gld +\end_inset + + \backslash -'. + +\begin_inset Quotes grd +\end_inset + +. Für große griechische Buchstaben beginnt der Befehl mit einem Großbuchstaben: \series bold @@ -28194,11 +29500,19 @@ Textstil Dialog nicht verwenden, um den Beschreibungstext zu formatieren, sondern man muss \SpecialChar LaTeX -Befehle verwenden. - Zum Beispiel lautet die Beschreibung für den Nomenklatureintrag für „ + Zum Beispiel lautet die Beschreibung für den Nomenklatureintrag für +\begin_inset Quotes gld +\end_inset + + \begin_inset Formula $\sigma$ \end_inset -“ in diesem Dokument: + +\begin_inset Quotes grd +\end_inset + + in diesem Dokument: \begin_inset Newline newline \end_inset @@ -28375,17 +29689,33 @@ description "Sinnsloseintrag für das Zeichen \\textsf{sigma}" Symbol \family default steht. - Sie werden daher nach „ + Sie werden daher nach +\begin_inset Quotes gld +\end_inset + + \family sans a \family default -“ und „ + +\begin_inset Quotes grd +\end_inset + + und +\begin_inset Quotes gld +\end_inset + + \family typewriter $ \backslash sigma$ \family default -“ sortiert – das + +\begin_inset Quotes grd +\end_inset + + sortiert – das \begin_inset Formula $\sigma$ \end_inset @@ -28393,7 +29723,15 @@ sigma$ \emph on a \emph default - erscheinen, denn das Befehlszeichen '$' wird bei der Sortierung berücksichtigt. + erscheinen, denn das Befehlszeichen +\begin_inset Quotes gld +\end_inset + +$ +\begin_inset Quotes grd +\end_inset + + wird bei der Sortierung berücksichtigt. \end_layout \begin_layout Standard @@ -28457,18 +29795,34 @@ nomencl \begin_layout Description refeq Verweis mit dem Ausdruck +\begin_inset Quotes gld +\end_inset + + \family sans -„, siehe Gleichung (#) +, siehe Gleichung (#) \family default -“ + +\begin_inset Quotes grd +\end_inset + + \end_layout \begin_layout Description refpage Verweis mit dem Ausdruck +\begin_inset Quotes gld +\end_inset + + \family sans -„, Seite (#) +, Seite (#) \family default -“ + +\begin_inset Quotes grd +\end_inset + + \end_layout \begin_layout Description @@ -28562,8 +29916,16 @@ nomnorefeqpage schaltet die entsprechende Option ab \end_layout \begin_layout Standard -Damit Wörter wie „Seite“ auch auf Deutsch und nicht in Englisch erscheinen, - fügen Sie diese Zeilen dem \SpecialChar LaTeX +Damit Wörter wie +\begin_inset Quotes gld +\end_inset + +Seite +\begin_inset Quotes grd +\end_inset + + auch auf Deutsch und nicht in Englisch erscheinen, fügen Sie diese Zeilen + dem \SpecialChar LaTeX -Vorspann ihres Dokuments hinzu: \end_layout @@ -28632,10 +29994,18 @@ status collapsed Verzeichnis einfügen. An der Stelle erscheint ein Kästchen mit der Aufschrift +\begin_inset Quotes gld +\end_inset + + \family sans -„Nomenklatur +Nomenklatur \family default -“, und dort wird das Verzeichnis auch gedruckt. + +\begin_inset Quotes grd +\end_inset + +, und dort wird das Verzeichnis auch gedruckt. Mit einem Rechtsklick auf das Kästchen kann man die verfügbare Breite für die Symbole einstellen. Sie können dabei zwischen diesen Einstellungen wählen: @@ -28670,7 +30040,15 @@ Benutzerdefiniert benutzerdefinierte Breite \end_layout \begin_layout Standard -In der Druckausgabe erscheint die Nomenklatur als „Nomenclature“. +In der Druckausgabe erscheint die Nomenklatur als +\begin_inset Quotes gld +\end_inset + +Nomenclature +\begin_inset Quotes grd +\end_inset + +. Sie können den Namen im \SpecialChar LaTeX -Vorspann mit dieser Zeile ändern: \end_layout @@ -28833,8 +30211,15 @@ Entfernen \family default . Des Weiteren erlaubt es der Dialog, zwei Zweige miteinander zu vereinen - (einfach einen Zweig in den Namen eines anderen umbenennen) und „unbekannte - Zweige“ (d. + (einfach einen Zweig in den Namen eines anderen umbenennen) und +\begin_inset Quotes gld +\end_inset + +unbekannte Zweige +\begin_inset Quotes grd +\end_inset + + (d. \begin_inset space \thinspace{} \end_inset @@ -28909,13 +30294,88 @@ Zweige \family default aktivieren, wird der Name des aktiven Zweigs beim Export des Dokuments an den Dateinamen angehängt. - Angenommen Sie haben eine Datei namens „Prüfung.lyx“ mit den beiden obigen - Zweigen. - Wenn „Dateinamensendung“ aktiv ist, wird die exportierte PDF-Datei „Prüfung.pdf“ - heißen wenn beide Zweige „Frage“ und „Antwort“ inaktiv waren, „Prüfung-Frage.pdf -“ wenn nur der Zweig „Frage“ aktiv war, „Prüfung-Antwort.pdf“ wenn nur der - Zweig „Antwort“ aktiv war, und „Prüfung-Frage-Antwort.pdf“ wenn beide Zweige - aktiv waren. + Angenommen Sie haben eine Datei namens +\begin_inset Quotes gld +\end_inset + +Prüfung.lyx +\begin_inset Quotes grd +\end_inset + + mit den beiden obigen Zweigen. + Wenn +\begin_inset Quotes gld +\end_inset + +Dateinamensendung +\begin_inset Quotes grd +\end_inset + + aktiv ist, wird die exportierte PDF-Datei +\begin_inset Quotes gld +\end_inset + +Prüfung.pdf +\begin_inset Quotes grd +\end_inset + + heißen wenn beide Zweige +\begin_inset Quotes gld +\end_inset + +Frage +\begin_inset Quotes grd +\end_inset + + und +\begin_inset Quotes gld +\end_inset + +Antwort +\begin_inset Quotes grd +\end_inset + + inaktiv waren, +\begin_inset Quotes eld +\end_inset + +Prüfung-Frage.pdf +\begin_inset Quotes erd +\end_inset + + wenn nur der Zweig +\begin_inset Quotes gld +\end_inset + +Frage +\begin_inset Quotes grd +\end_inset + + aktiv war, +\begin_inset Quotes eld +\end_inset + +Prüfung-Antwort.pdf +\begin_inset Quotes erd +\end_inset + + wenn nur der Zweig +\begin_inset Quotes gld +\end_inset + +Antwort +\begin_inset Quotes grd +\end_inset + + aktiv war, und +\begin_inset Quotes gld +\end_inset + +Prüfung-Frage-Antwort.pdf +\begin_inset Quotes grd +\end_inset + + wenn beide Zweige aktiv waren. Dies hilft um verschiedene Versionen einer Datei zu exportieren ohne den Ãœberblick zu verlieren. \end_layout @@ -29504,8 +30964,7 @@ Geöffnet dargestellt. Um die Darstellung zu ändern, machen Sie einen Rechtsklick auf das Kästchen und wählen in dem Dialogfenster aus, was Sie wollen. - Außerdem können Sie im geöffneten Zustand die Einfügung auf\SpecialChar ligaturebreak -lösen, das heißt, + Außerdem können Sie im geöffneten Zustand die Einfügung auflösen, das heißt, der enthaltenen Text wird normal dargestellt. Wenn das Kästchen geschlossen ist, öffnet ein Linksklick es. \end_layout @@ -29546,7 +31005,7 @@ fbox{ \begin_layout Standard \begin_inset Graphics - filename ../clipart/ERT.png + filename clipart/ERT.png scale 75 \end_inset @@ -29624,7 +31083,15 @@ Wenn Sie größere Dokumente oder Bücher schreiben, müssen Sie etwas über -Befehle wissen, die \SpecialChar LyX im Hintergrund verwendet. Da \SpecialChar LaTeX - auf Befehlen basiert, können Sie Ihren Text „programmieren“. + auf Befehlen basiert, können Sie Ihren Text +\begin_inset Quotes gld +\end_inset + +programmieren +\begin_inset Quotes grd +\end_inset + +. Dies hat den Vorteil, dass das Aussehen des Dokuments jederzeit geändert werden kann, wenn man die richtigen Befehle kennt. Stellen Sie sich zum Beispiel vor, dass Sie ein Handbuch für ein Produkt @@ -29956,7 +31423,7 @@ status open \begin_layout Plain Layout \SpecialChar LyX -’ +' \family sans \series bold \color red @@ -30055,7 +31522,15 @@ Dokument\SpecialChar menuseparator Einstellungen\SpecialChar menuseparator Module \family default - das Modul „Benutzerdefinierte Kopf/Fußzeilen“ hinzu. + das Modul +\begin_inset Quotes gld +\end_inset + +Benutzerdefinierte Kopf/Fußzeilen +\begin_inset Quotes grd +\end_inset + + hinzu. Dieses Modul bietet die 6 \begin_inset space ~ \end_inset @@ -30340,7 +31815,15 @@ Achtung \family sans Seiten-Stil \family default - auf „Standard“ gesetzt ist. + auf +\begin_inset Quotes gld +\end_inset + +Standard +\begin_inset Quotes grd +\end_inset + + gesetzt ist. Daher sollten Sie deren Stil ausprobieren bevor Sie eigenen Kopf-/Fußzeilen definieren. \end_layout @@ -30404,7 +31887,15 @@ roman{page} druckt die aktuelle Seitennummer in kleinen römischen Ziffern leftmark druckt die aktuelle Abschnittsnummer und dessen Titel. Besitzt das Dokument Kapitel, druckt es stattdessen die Kapitelnummer und dessen Name. - Es heißt „leftmark“, da man es üblicherweise links in der Kopfzeile verwendet. + Es heißt +\begin_inset Quotes pld +\end_inset + +leftmark +\begin_inset Quotes prd +\end_inset + +, da man es üblicherweise links in der Kopfzeile verwendet. \end_layout \begin_layout Description @@ -30673,7 +32164,7 @@ Fußzeile \end_inset Mitte \SpecialChar LyX -’ +' \family sans \series bold \color red @@ -31275,7 +32766,7 @@ Quelltext-Panel Das Fenster zeigt den Quellcode des gesamten Absatzes, indem sich der Cursor momentan befindet. Man kann auch Dokumentteile in \SpecialChar LyX -’ Hauptfenster markieren, dann wird nur +' Hauptfenster markieren, dann wird nur der Code der Auswahl angezeigt (wenn es mehr als ein Absatz ist). Um das gesamte Dokument als Quellcode anzusehen, verwendet man die entsprechend e Option im Quellcode-Fenster. @@ -31403,7 +32894,7 @@ ersetzen \family sans Umschalt \family default -+F) oder den Werkzeugleistenknopf ++F oder den Werkzeugleistenknopf \begin_inset Info type "icon" arg "dialog-toggle findreplaceadv" @@ -31487,10 +32978,10 @@ Suchen Wenn nach Formeln gesucht wird, werden diese gefunden, wenn sie allein stehen, aber auch wenn sie Teil einer Formel sind. Zum Beispiel werden die beiden Beispiele in dieser Formel gefunden: -\begin_inset Formula $\frac{x^{2}}{\sqrt{\frac{x^{2}}{1+x^{2}}}}$ +\begin_inset Formula $\frac{x^{2}}{\sqrt{\frac{x^{2}}{1+x^{2}}}}.$ \end_inset -. + \end_layout \begin_layout Subsubsection @@ -31607,8 +33098,15 @@ das Ersetzen mit einer formatierten Version des selben Wortes, z. \end_inset B. - Ersetzen des Namens „func()“ mit seiner Version im Stil Schreibmaschine - + Ersetzen des Namens +\begin_inset Quotes gld +\end_inset + +func() +\begin_inset Quotes grd +\end_inset + + mit seiner Version im Stil Schreibmaschine \begin_inset Quotes gld \end_inset @@ -31616,7 +33114,11 @@ B. \family typewriter func() \family default -“ + +\begin_inset Quotes grd +\end_inset + + \end_layout \begin_layout Itemize @@ -31625,15 +33127,31 @@ func() \end_inset B. - um alle Vorkommen von „ + um alle Vorkommen von +\begin_inset Quotes gld +\end_inset + + \begin_inset Formula $R$ \end_inset -“ mit „ + +\begin_inset Quotes grd +\end_inset + + mit +\begin_inset Quotes gld +\end_inset + + \begin_inset Formula $\mathbb{R}$ \end_inset -“ zu ersetzen (dabei hilft es eventuell, die Optionen + +\begin_inset Quotes grd +\end_inset + + zu ersetzen (dabei hilft es eventuell, die Optionen \family sans Ganze Wörter \family default @@ -31649,8 +33167,15 @@ Ignoriere Format \family sans Einstellungen \family default - zu deaktivieren, um zu verhindern, dass alle „R“ im normalen Text ersetzt - werden), oder + zu deaktivieren, um zu verhindern, dass alle +\begin_inset Quotes eld +\end_inset + +R +\begin_inset Quotes erd +\end_inset + + im normalen Text ersetzt werden), oder \begin_inset Formula $x_{j}^{i}$ \end_inset @@ -31926,7 +33451,7 @@ Alle von \SpecialChar LyX \begin_inset Flex URL -status open +status collapsed \begin_layout Plain Layout @@ -31946,7 +33471,7 @@ Es gibt 2 Dateien für jede Sprache. Um ein Wörterbuch unter Windows zu installieren, kopiert man beide Dateien in \SpecialChar LyX -’ Installationsunterordner +' Installationsunterordner \family sans ~ \backslash @@ -32003,7 +33528,7 @@ hunspell \family typewriter enchant \begin_inset Foot -status open +status collapsed \begin_layout Plain Layout Enchant selbst ist eine Hüllbibliothek mit verschiedenen konfigurierbaren @@ -32065,7 +33590,14 @@ Wörter \begin_inset space ~ \end_inset -akzeptieren Verhindert, dass zusammengesetzte Wörter wie „Verzeichnisname“ +akzeptieren Verhindert, dass zusammengesetzte Wörter wie +\begin_inset Quotes gld +\end_inset + +Verzeichnisname +\begin_inset Quotes erd +\end_inset + moniert werden. \end_layout @@ -32233,7 +33765,7 @@ Thesaurus-Wörterbücher \family default ) nur noch mitteilen, wo sie gespeichert sind. \begin_inset Foot -status open +status collapsed \begin_layout Plain Layout Unter Linux sind die üblichen Orte (abhängig von Ihrer Distribution und @@ -32594,7 +34126,7 @@ Farbe ! Änderungsverfolgung \end_inset Der Autor und das Datum der Änderung werden in \SpecialChar LyX -’ Statusleiste angezeigt, +' Statusleiste angezeigt, wenn sich der Cursor in geändertem Text befindet. Die selbe Information erhalten Sie, wenn Sie den Werkzeugleistenknopf \begin_inset Info @@ -33510,8 +35042,15 @@ Importieren Man kann hier Dateien von älteren \SpecialChar LyX -Versionen, HTML-Dateien, \SpecialChar LaTeX -Dateien, NoWeb-Date -ien, einfache Textdateien und „Komma-getrennte“, tabellenartige Textdateien - (CSV) importieren. +ien, einfache Textdateien und +\begin_inset Quotes gld +\end_inset + +Komma-getrennte +\begin_inset Quotes grd +\end_inset + +, tabellenartige Textdateien (CSV) importieren. Die Dateien werden als neues \SpecialChar LyX -Dokument importiert. \end_layout @@ -33831,7 +35370,23 @@ LyX z.y.x \SpecialChar LyX -Dokument in einem Format, das von der \SpecialChar LyX -Version z.y.x lesbar ist. - (z und y repräsentieren die Versionsnummer) + ( +\begin_inset Quotes gld +\end_inset + +z +\begin_inset Quotes grd +\end_inset + + und +\begin_inset Quotes gld +\end_inset + +y +\begin_inset Quotes grd +\end_inset + + repräsentieren die Versionsnummer) \end_layout \begin_layout Description @@ -33984,8 +35539,7 @@ PDF \begin_inset space ~ \end_inset -Auf\SpecialChar ligaturebreak -lösung) wie +Auflösung) wie \family sans PDF \begin_inset space ~ @@ -33993,8 +35547,7 @@ PDF (pdflatex) \family default - aber mit einer reduzierten Pixel-Auf\SpecialChar ligaturebreak -lösung von 150 + aber mit einer reduzierten Pixel-Auflösung von 150 \begin_inset space \thinspace{} \end_inset @@ -34167,7 +35720,7 @@ Fax \begin_layout Standard Dieses Menü erscheint nur, wenn ein Faxprogramm installiert ist (bei Windows muss zusätzlich dessen Programmpfad zu \SpecialChar LyX -’ PATH-Präfix hinzugefügt werden, +' PATH-Präfix hinzugefügt werden, siehe Abschnitt \begin_inset space ~ \end_inset @@ -34191,7 +35744,7 @@ kdeprintfax senden. Das voreingestellte Format der gesendeten Datei ist PostScript. Das Format kann in \SpecialChar LyX -’ Grundeinstellungen, wie in Abschnitt +' Grundeinstellungen, wie in Abschnitt \begin_inset space ~ \end_inset @@ -34407,8 +35960,7 @@ Diese Menüs sind nur aktiv, wenn sich der Cursor in einer Tabelle befindet. \end_layout \begin_layout Subsection -Einfügung auf\SpecialChar ligaturebreak -lösen +Einfügung auflösen \end_layout \begin_layout Standard @@ -34684,7 +36236,7 @@ Tabelle ist. \begin_layout Standard \SpecialChar LyX -’ Werkzeugleisten und ihre Knöpfe sind in Abschnitt +' Werkzeugleisten und ihre Knöpfe sind in Abschnitt \begin_inset space ~ \end_inset @@ -34732,7 +36284,7 @@ Hälfte teilen \family default teilt \SpecialChar LyX -’ Hauptfenster vertikal, +' Hauptfenster vertikal, \family sans Ansicht \begin_inset space ~ @@ -35515,8 +37067,15 @@ Benutzerdefinierte Einfügungen Fügt dokumentklassen-spezifische Einfügungen ein. Solche Einfügungen existieren nur, wenn sie in der Layout-Datei der Dokumentkla sse definiert sind. - Ein Beispiel ist die Dokumentklasse „article (Elsevier)“ mit drei benutzerdefin -ierten Einfügungen. + Ein Beispiel ist die Dokumentklasse +\begin_inset Quotes gld +\end_inset + +article (Elsevier) +\begin_inset Quotes grd +\end_inset + + mit drei benutzerdefinierten Einfügungen. Der Abschnitt \emph on Flexible Einfügungen und InsetLayout @@ -37640,7 +39199,7 @@ arg "textstyle-apply" \begin_inset Text \begin_layout Plain Layout -Formatiert Text mit der aktuellen Einstellungen des +Formatiert Text unter Benutzung der aktuellen Einstellungen des \family sans Bearbeiten\SpecialChar menuseparator Textstil @@ -39066,7 +40625,15 @@ Suchen \end_inset B. - nach „Seite“ suchen, werden einige Untermenüs ausgegraut und deaktiviert. + nach +\begin_inset Quotes gld +\end_inset + +Seite +\begin_inset Quotes grd +\end_inset + + suchen, werden einige Untermenüs ausgegraut und deaktiviert. Nur Untermenüs mit Seiteneinstellungen bleiben aktiviert. In diesen Untermenüs werden die Seiteneinstellungen rot hervorgehoben. \end_layout @@ -39102,7 +40669,7 @@ Lokales Format \family default können Sie eine eigene Layout-Datei laden, die sich nicht in \SpecialChar LyX -’ +' \emph on layouts \emph default @@ -39534,7 +41101,15 @@ Sprachpaket \family default legt das \SpecialChar LaTeX -Paket fest, das für die Silbentrennung und Ãœbersetzung von Ausdrücken - wie „Teil“ verwendet wird. + wie +\begin_inset Quotes gld +\end_inset + +Teil +\begin_inset Quotes grd +\end_inset + + verwendet wird. Die möglichen Einstellungen sind: \end_layout @@ -41106,13 +42681,11 @@ Objekte \end_layout \begin_layout Section -Auf\SpecialChar ligaturebreak -listungszeichen +Auflistungszeichen \end_layout \begin_layout Standard -Hier können Sie die Zeichen für die verschiedenen Auf\SpecialChar ligaturebreak -listungs- +Hier können Sie die Zeichen für die verschiedenen Auflistungs- \family sans Ebenen \family default @@ -41124,8 +42697,7 @@ Schrift \family sans Größe \family default - der Auf\SpecialChar ligaturebreak -listungszeichen angeben. + der Auflistungszeichen angeben. Die Auflistung-Umgebung ist in Abschnitt \begin_inset space ~ \end_inset @@ -41263,8 +42835,39 @@ Ausgabeformat: Das Format, welches verwendet wird, wenn Sie im Menü \family sans Dokument \family default - oder der Werkzeugleiste „Ansehen“, „Aktualisieren“, „Hauptdokument ansehen“ - oder „Hauptdokument aktualisieren“ anklicken. + oder der Werkzeugleiste +\begin_inset Quotes gld +\end_inset + +Ansehen +\begin_inset Quotes grd +\end_inset + +, +\begin_inset Quotes gld +\end_inset + +Aktualisieren +\begin_inset Quotes grd +\end_inset + +, +\begin_inset Quotes gld +\end_inset + +Hauptdokument ansehen +\begin_inset Quotes grd +\end_inset + + oder +\begin_inset Quotes gld +\end_inset + +Hauptdokument aktualisieren +\begin_inset Quotes grd +\end_inset + + anklicken. Die Standard-Einstellung wird in \family sans Werkzeuge\SpecialChar menuseparator @@ -41517,7 +43120,15 @@ Separator \family sans Icon \family default - und im Fall des Menüs „file_lastfiles“ einen + und im Fall des Menüs +\begin_inset Quotes gld +\end_inset + +file_lastfiles +\begin_inset Quotes grd +\end_inset + + einen \family sans Lastfiles \family default @@ -41531,12 +43142,28 @@ Lastfiles \series bold -Item „Menü +Item +\begin_inset Quotes eld +\end_inset + +Menü \series default oder \series bold - Knopfname“ „\SpecialChar LyX --Funktion“ + Knopfname +\begin_inset Quotes erd +\end_inset + + +\begin_inset Quotes eld +\end_inset + +\SpecialChar LyX +-Funktion +\begin_inset Quotes erd +\end_inset + + \end_layout \begin_layout Standard @@ -41576,7 +43203,23 @@ Lesezeichen \series bold -Item „Lesezeichen 6 speichern“ „bookmark-save 6“ +Item +\begin_inset Quotes eld +\end_inset + +Lesezeichen 6 speichern +\begin_inset Quotes erd +\end_inset + + +\begin_inset Quotes eld +\end_inset + +bookmark-save 6 +\begin_inset Quotes erd +\end_inset + + \end_layout \begin_layout Standard @@ -41584,7 +43227,15 @@ Item „Lesezeichen 6 speichern“ „bookmark-save 6“ \begin_inset VSpace smallskip* \end_inset -zum Menü „navigate_bookmarks“ in der Datei +zum Menü +\begin_inset Quotes gld +\end_inset + +navigate_bookmarks +\begin_inset Quotes grd +\end_inset + + in der Datei \emph on stdmenus.inc \emph default @@ -41597,7 +43248,7 @@ Mit Symboldesign \family default kann das Aussehen von \SpecialChar LyX -’ Werkzeugleisten geändert werden. +' Werkzeugleisten geändert werden. Die derzeit verfügbaren Symboldesigns sind in \begin_inset CommandInset href LatexCommand href @@ -41659,7 +43310,7 @@ Mit der Option Aussehen und Größe von Fenstern wiederherstellen \family default wird \SpecialChar LyX -’ Hauptfenster mit der Größe und dem Aussehen geöffnet, das in der +' Hauptfenster mit der Größe und dem Aussehen geöffnet, das in der letzten \SpecialChar LyX -Sitzung benutzt wurde. \end_layout @@ -42339,7 +43990,15 @@ broadway.bind \shape default , und für Sprachen. Der Name einer Tastaturkürzel-Datei für Sprachen beginnt mit dem Sprach-Code, - zum Beispiel „pt“ für Portugiesisch. + zum Beispiel +\begin_inset Quotes gld +\end_inset + +pt +\begin_inset Quotes grd +\end_inset + + für Portugiesisch. Wenn Sie \SpecialChar LyX für eine spezielle Sprache benutzen, wird es die entsprechende Tastaturkürzel-Datei benutzen. @@ -42458,8 +44117,15 @@ textstyle-apply Ein vorhandenes Tastaturkürzel wird ebenso geändert. Sie auch mehrere Funktionen einem Tastaturkürzel zuordnen, indem Sie die \SpecialChar LyX --Funktion mit „command alternatives“ beginnen und die verschiedenen Funktionen, - durch Kommas getrennt, anfügen. +-Funktion mit +\begin_inset Quotes gld +\end_inset + +command alternatives +\begin_inset Quotes grd +\end_inset + + beginnen und die verschiedenen Funktionen, durch Kommas getrennt, anfügen. \SpecialChar LyX wird dann für das Tastaturkürzel die erste Funktion benutzen, die im gerade bearbeiteten Dokumentteil aktiv ist. @@ -42480,8 +44146,24 @@ Alternativ können Sie natürlich auch die entsprechende Tastaturkürzel-Datei \series bold \backslash -bind „Tastaturkürzel“ „\SpecialChar LyX --Funktion“ +bind +\begin_inset Quotes gld +\end_inset + +Tastaturkürzel +\begin_inset Quotes grd +\end_inset + + +\begin_inset Quotes gld +\end_inset + +\SpecialChar LyX +-Funktion +\begin_inset Quotes grd +\end_inset + + \end_layout \begin_layout Subsection @@ -42780,7 +44462,15 @@ Arbeitsverzeichnis \begin_inset Newline newline \end_inset -Sicherungsdateien haben die Endung „.lyx~“. +Sicherungsdateien haben die Endung +\begin_inset Quotes gld +\end_inset + +.lyx~ +\begin_inset Quotes grd +\end_inset + +. \end_layout \begin_layout Description @@ -43016,7 +44706,7 @@ der \end_inset Benutzeroberfläche Hier kann die Sprache der \SpecialChar LyX -’ Menüs eingestellt werden. +' Menüs eingestellt werden. Der aktuelle Ãœbersetzungsstatus ist hier zu finden: \begin_inset Newline newline \end_inset @@ -43036,7 +44726,19 @@ Sprachpaket legt fest, welches \SpecialChar LaTeX -Paket für die Sprachunterstützung geladen werden soll. Zur Sprachunterstützung zählen Silbentrennmuster ebenso wie die Lokalisation - von Daten und von Klassen verwendeten Ausdrücken wie „Kapitel“ und „Tabelle“. + von Daten und von Klassen verwendeten Ausdrücken wie +\begin_inset Quotes gld +\end_inset + +Kapitel +\begin_inset Quotes grd +\end_inset + + und Tabelle +\begin_inset Quotes grd +\end_inset + +. Das verbreitetste Sprachpaket ist \series bold babel @@ -43163,7 +44865,7 @@ Standard-Dezimaltrenner Legen Sie hier den Standard-Dezimaltrenner fest, \begin_layout Description Standard-Längeneinheit Legt die Einheit fest, die als Voreinstellung für Längen in \SpecialChar LyX -’ Dialogen verwendet wird. +' Dialogen verwendet wird. \end_layout \begin_layout Description @@ -43524,10 +45226,18 @@ X2 \family default werden für Kyrillisch verwendet. Kombinationen der Kodierungen wie +\begin_inset Quotes gld +\end_inset + + \family sans -„T1, T2B +T1, T2B \family default -“ sind möglich. + +\begin_inset Quotes grd +\end_inset + + sind möglich. Die Schriftkodierung wird normalerweise automatisch von den Sprachpaketen geladen, die \SpecialChar LyX im Hintergund verwendet. @@ -43647,9 +45357,25 @@ in \SpecialChar LaTeX -Dateien Verwendet Pfade in der Notation von Windows; das bedeutet, dass - ' + +\begin_inset Quotes gld +\end_inset + + \backslash -' anstelle von '/' verwendet wird, um Verzeichnisse zu trennen. + +\begin_inset Quotes grd +\end_inset + + anstelle von +\begin_inset Quotes gld +\end_inset + +/ +\begin_inset Quotes grd +\end_inset + + verwendet wird, um Verzeichnisse zu trennen. Diese Option ist automatisch aktiv unter \SpecialChar LyX für Windows. \begin_inset Index idx @@ -43873,7 +45599,7 @@ Anpassung \begin_layout Standard Da alle Konvertierungen von einem Format in ein anderes in \SpecialChar LyX -’ temporärem +' temporärem Verzeichnis stattfinden, ist es manchmal notwendig eine Datei zu modifizieren, bevor sie ins temporäre Verzeichnis kopiert und dort konvertiert wird. Dies geschieht, indem man einen @@ -45898,7 +47624,7 @@ set_width "auto" \begin_layout Standard \begin_inset Note Note -status open +status collapsed \begin_layout Plain Layout Damit der Index den Namen @@ -45967,8 +47693,7 @@ indexname name \series default . - Eine Auf\SpecialChar ligaturebreak -listung der möglichen Namen findet man unter + Eine Auflistung der möglichen Namen findet man unter \end_layout \begin_layout Plain Layout diff --git a/lib/generate_contributions.py b/lib/generate_contributions.py index a2e6906583..822e023c1c 100755 --- a/lib/generate_contributions.py +++ b/lib/generate_contributions.py @@ -771,6 +771,14 @@ contributors = [ "28 February 2005", u"Improvements to lyxserver"), + contributor(u"Shankar Giri Venkita Giri", + "girivs () gmx ! com", + "GPL", + "Blanket permission", + "m=146162343015182", + "25 April 2016", + u"Mingw-w64 build fixes"), + contributor(u"Hartmut Goebel", "h.goebel () crazy-compilers ! com", "GPL", diff --git a/lib/images/change-accept.svgz b/lib/images/change-accept.svgz index 6241671cca..df660778f0 100644 Binary files a/lib/images/change-accept.svgz and b/lib/images/change-accept.svgz differ diff --git a/lib/images/change-next.svgz b/lib/images/change-next.svgz index bbc79125eb..8416c3b255 100644 Binary files a/lib/images/change-next.svgz and b/lib/images/change-next.svgz differ diff --git a/lib/images/change-reject.svgz b/lib/images/change-reject.svgz index e0a1cd0255..9a25915aa9 100644 Binary files a/lib/images/change-reject.svgz and b/lib/images/change-reject.svgz differ diff --git a/lib/images/cut.svgz b/lib/images/cut.svgz index 9a579b4d3e..a62a5308ac 100644 Binary files a/lib/images/cut.svgz and b/lib/images/cut.svgz differ diff --git a/lib/images/dialog-show_mathmatrix.svgz b/lib/images/dialog-show_mathmatrix.svgz index e502f85f29..a976c6bc18 100644 Binary files a/lib/images/dialog-show_mathmatrix.svgz and b/lib/images/dialog-show_mathmatrix.svgz differ diff --git a/lib/images/info-insert.svgz b/lib/images/info-insert.svgz index 2b79cdbc38..e9980de410 100644 Binary files a/lib/images/info-insert.svgz and b/lib/images/info-insert.svgz differ diff --git a/lib/images/math-macro-add-optional-param.svgz b/lib/images/math-macro-add-optional-param.svgz index 70cbea406e..72e6117367 100644 Binary files a/lib/images/math-macro-add-optional-param.svgz and b/lib/images/math-macro-add-optional-param.svgz differ diff --git a/lib/images/math-macro-add-param.svgz b/lib/images/math-macro-add-param.svgz index ae78f409bb..7619396702 100644 Binary files a/lib/images/math-macro-add-param.svgz and b/lib/images/math-macro-add-param.svgz differ diff --git a/lib/images/math-macro-remove-optional-param.svgz b/lib/images/math-macro-remove-optional-param.svgz index 5dc64732c6..a00414a266 100644 Binary files a/lib/images/math-macro-remove-optional-param.svgz and b/lib/images/math-macro-remove-optional-param.svgz differ diff --git a/lib/images/math-macro-remove-param.svgz b/lib/images/math-macro-remove-param.svgz index 5702783579..9065be4f3c 100644 Binary files a/lib/images/math-macro-remove-param.svgz and b/lib/images/math-macro-remove-param.svgz differ diff --git a/lib/images/math-matrix.svgz b/lib/images/math-matrix.svgz index f104bad6f3..123be8068f 100644 Binary files a/lib/images/math-matrix.svgz and b/lib/images/math-matrix.svgz differ diff --git a/lib/images/math/alpha.svgz b/lib/images/math/alpha.svgz index 267225572a..03f47a9f01 100644 Binary files a/lib/images/math/alpha.svgz and b/lib/images/math/alpha.svgz differ diff --git a/lib/images/math/digamma.svgz b/lib/images/math/digamma.svgz index b87026a7b7..52778f0367 100644 Binary files a/lib/images/math/digamma.svgz and b/lib/images/math/digamma.svgz differ diff --git a/lib/images/math/frac-square.svgz b/lib/images/math/frac-square.svgz index bfa5dbbee0..99c9cdd868 100644 Binary files a/lib/images/math/frac-square.svgz and b/lib/images/math/frac-square.svgz differ diff --git a/lib/images/math/frac.svgz b/lib/images/math/frac.svgz index be54c5a4b1..eb23e882c9 100644 Binary files a/lib/images/math/frac.svgz and b/lib/images/math/frac.svgz differ diff --git a/lib/images/math/intop.svgz b/lib/images/math/intop.svgz index 893cc47be7..8381a3992f 100644 Binary files a/lib/images/math/intop.svgz and b/lib/images/math/intop.svgz differ diff --git a/lib/images/math/leq.svgz b/lib/images/math/leq.svgz index 2b538d04f1..f434ec06a8 100644 Binary files a/lib/images/math/leq.svgz and b/lib/images/math/leq.svgz differ diff --git a/lib/images/math/leqq.svgz b/lib/images/math/leqq.svgz index afb0e9da0a..3ecbc83025 100644 Binary files a/lib/images/math/leqq.svgz and b/lib/images/math/leqq.svgz differ diff --git a/lib/images/math/nabla.svgz b/lib/images/math/nabla.svgz index cbb79e19f9..8af2b8617d 100644 Binary files a/lib/images/math/nabla.svgz and b/lib/images/math/nabla.svgz differ diff --git a/lib/images/math/pm.svgz b/lib/images/math/pm.svgz index 0d18540e55..42c86e7084 100644 Binary files a/lib/images/math/pm.svgz and b/lib/images/math/pm.svgz differ diff --git a/lib/images/redo.svgz b/lib/images/redo.svgz index 8c3a3c3c9e..1fd36f08ab 100644 Binary files a/lib/images/redo.svgz and b/lib/images/redo.svgz differ diff --git a/lib/images/script-insert_subscript.svgz b/lib/images/script-insert_subscript.svgz index af3e2cb08f..1bbe2105a5 100644 Binary files a/lib/images/script-insert_subscript.svgz and b/lib/images/script-insert_subscript.svgz differ diff --git a/lib/images/script-insert_superscript.svgz b/lib/images/script-insert_superscript.svgz index dc6167891c..25ca9d445d 100644 Binary files a/lib/images/script-insert_superscript.svgz and b/lib/images/script-insert_superscript.svgz differ diff --git a/lib/images/specialchar-insert_latex.svgz b/lib/images/specialchar-insert_latex.svgz index bb5820bb66..bec519c0fa 100644 Binary files a/lib/images/specialchar-insert_latex.svgz and b/lib/images/specialchar-insert_latex.svgz differ diff --git a/lib/images/specialchar-insert_latex2e.svgz b/lib/images/specialchar-insert_latex2e.svgz index b8cb25b11f..72652618b0 100644 Binary files a/lib/images/specialchar-insert_latex2e.svgz and b/lib/images/specialchar-insert_latex2e.svgz differ diff --git a/lib/images/specialchar-insert_lyx.svgz b/lib/images/specialchar-insert_lyx.svgz index 511b526f8b..499c7ab7b1 100644 Binary files a/lib/images/specialchar-insert_lyx.svgz and b/lib/images/specialchar-insert_lyx.svgz differ diff --git a/lib/images/specialchar-insert_menu-separator.svgz b/lib/images/specialchar-insert_menu-separator.svgz index 188269aa9f..22dc2c4622 100644 Binary files a/lib/images/specialchar-insert_menu-separator.svgz and b/lib/images/specialchar-insert_menu-separator.svgz differ diff --git a/lib/images/specialchar-insert_tex.svgz b/lib/images/specialchar-insert_tex.svgz index 07442561d6..14bfca9d83 100644 Binary files a/lib/images/specialchar-insert_tex.svgz and b/lib/images/specialchar-insert_tex.svgz differ diff --git a/lib/symbols b/lib/symbols index 6106b46a3b..279e64ecf0 100644 --- a/lib/symbols +++ b/lib/symbols @@ -1103,7 +1103,7 @@ pod lyxblacktext 0 0 func x amsmath # mathtools.sty -\def\vcentcolon{\kern4mu:\kern3mu} mathtools +\def\vcentcolon{:} mathtools \def\dblcolon{\vcentcolon\kern-8mu\vcentcolon} mathtools \def\coloneqq{\vcentcolon\kern-7mu=} mathtools \def\Coloneqq{\dblcolon\kern-7mu=} mathtools diff --git a/lib/ui/default.ui b/lib/ui/default.ui index 51a7f9b90e..4a1e154aab 100644 --- a/lib/ui/default.ui +++ b/lib/ui/default.ui @@ -34,7 +34,8 @@ Include "stdtoolbars.inc" # math: the toolbar is visible only when in math # mathmacrotemplate: the toolbar is visible only when in a macro definition # table: the toolbar is visible only when in a table -# review: the toolbar is visible only when inside a tracked change +# review: the toolbar is visible only when tracked changes are present or +# change tracking is enabled # ipa: the toolbar is only visible when inside an ipa inset # # top: the toolbar should be at the top of the window diff --git a/m4/Makefile.am b/m4/Makefile.am index 2fd4fbb176..6f02330e4c 100644 --- a/m4/Makefile.am +++ b/m4/Makefile.am @@ -1 +1,2 @@ -EXTRA_DIST = iconv.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 nls.m4 po.m4 progtest.m4 +EXTRA_DIST = eilseq.m4 iconv.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 nls.m4 \ + po.m4 progtest.m4 diff --git a/m4/eilseq.m4 b/m4/eilseq.m4 new file mode 100644 index 0000000000..792d514b59 --- /dev/null +++ b/m4/eilseq.m4 @@ -0,0 +1,67 @@ +#serial 1 + +AC_PREREQ(2.50) + +# The EILSEQ errno value ought to be defined in , according to +# ISO C 99 and POSIX. But some systems (like SunOS 4) don't define it, +# and some systems (like BSD/OS) define it in not . + +# Define EILSEQ as a C macro and as a substituted macro in such a way that +# 1. on all systems, after inclusion of , EILSEQ is usable, +# 2. on systems where EILSEQ is defined elsewhere, we use the same numeric +# value. + +AC_DEFUN([AC_EILSEQ], +[ + AC_REQUIRE([AC_PROG_CC])dnl + + dnl Check for any extra headers that could define EILSEQ. + AC_CHECK_HEADERS(wchar.h) + + AC_CACHE_CHECK([for EILSEQ], ac_cv_decl_EILSEQ, [ + AC_EGREP_CPP(yes,[ +#include +#ifdef EILSEQ +yes +#endif + ], have_eilseq=1) + if test -n "$have_eilseq"; then + dnl EILSEQ exists in . Don't need to define EILSEQ ourselves. + ac_cv_decl_EILSEQ=yes + else + AC_EGREP_CPP(yes,[ +#include +#if HAVE_WCHAR_H +#include +#endif +#ifdef EILSEQ +yes +#endif + ], have_eilseq=1) + if test -n "$have_eilseq"; then + dnl EILSEQ exists in some other system header. + dnl Define it to the same value. + _AC_COMPUTE_INT([EILSEQ], ac_cv_decl_EILSEQ, [ +#include +#if HAVE_WCHAR_H +#include +#endif +/* The following two lines are a workaround against an autoconf-2.52 bug. */ +#include +#include +]) + else + dnl EILSEQ isn't defined by the system. Define EILSEQ ourselves, but + dnl don't define it as EINVAL, because iconv() callers want to + dnl distinguish EINVAL and EILSEQ. + ac_cv_decl_EILSEQ=ENOENT + fi + fi + ]) + if test "$ac_cv_decl_EILSEQ" != yes; then + AC_DEFINE_UNQUOTED([EILSEQ], [$ac_cv_decl_EILSEQ], + [Define as good substitute value for EILSEQ.]) + EILSEQ="$ac_cv_decl_EILSEQ" + AC_SUBST(EILSEQ) + fi +]) diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt index 4d70d24042..3f2f9ad7e7 100755 --- a/po/CMakeLists.txt +++ b/po/CMakeLists.txt @@ -90,8 +90,6 @@ ADD_CUSTOM_COMMAND( OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${_lyxname}.cat.pot" COMMAND ${LYX_PYTHON_EXECUTABLE} ARGS "${TOP_CMAKE_PATH}/po/cat.py" ${_py_sources} > "${CMAKE_CURRENT_BINARY_DIR}/${_lyxname}.cat_tmp.pot" - COMMAND ${LYX_PYTHON_EXECUTABLE} - ARGS "${TOP_CMAKE_PATH}/po/dos2unix.py" "${CMAKE_CURRENT_BINARY_DIR}/${_lyxname}.cat_tmp.pot" COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_CURRENT_BINARY_DIR}/${_lyxname}.cat_tmp.pot" "${CMAKE_CURRENT_BINARY_DIR}/${_lyxname}.cat.pot" DEPENDS ${_py_sources} diff --git a/po/lyx_pot.py b/po/lyx_pot.py index 500185fdba..a58d8bfe06 100755 --- a/po/lyx_pot.py +++ b/po/lyx_pot.py @@ -44,7 +44,7 @@ def writeString(outfile, infile, basefile, lineno, string): def ui_l10n(input_files, output, base): '''Generate pot file from lib/ui/*''' - output = io.open(output, 'w', encoding='utf_8') + output = io.open(output, 'w', encoding='utf_8', newline='\n') Submenu = re.compile(r'^[^#]*Submenu\s+"([^"]*)"', re.IGNORECASE) Popupmenu = re.compile(r'^[^#]*PopupMenu\s+"[^"]+"\s+"([^"]*)"', re.IGNORECASE) IconPalette = re.compile(r'^[^#]*IconPalette\s+"[^"]+"\s+"([^"]*)"', re.IGNORECASE) @@ -166,7 +166,10 @@ def layouts_l10n(input_files, output, base, layouttranslations): if 'wa' in languages: languages.remove('wa') - out = io.open(output, 'w', encoding='utf_8') + if layouttranslations: + out = io.open(output, 'w', encoding='utf_8') + else: + out = io.open(output, 'w', encoding='utf_8', newline='\n') for src in input_files: readingDescription = False readingI18nPreamble = False @@ -433,7 +436,7 @@ def layouts_l10n(input_files, output, base, layouttranslations): def qt4_l10n(input_files, output, base): '''Generate pot file from src/frontends/qt4/ui/*.ui''' - output = io.open(output, 'w', encoding='utf_8') + output = io.open(output, 'w', encoding='utf_8', newline='\n') pat = re.compile(r'\s*(.*)') prop = re.compile(r'\s*d->preview_file_; preview_format_ = cloned_buffer_->d->preview_format_; preview_error_ = cloned_buffer_->d->preview_error_; + tracked_changes_present_ = cloned_buffer_->d->tracked_changes_present_; } @@ -2229,8 +2234,8 @@ void Buffer::getLabelList(vector & list) const list.clear(); shared_ptr toc = d->toc_backend.toc("label"); - TocIterator toc_it = toc->begin(); - TocIterator end = toc->end(); + Toc::const_iterator toc_it = toc->begin(); + Toc::const_iterator end = toc->end(); for (; toc_it != end; ++toc_it) { if (toc_it->depth() == 0) list.push_back(toc_it->str()); @@ -2768,6 +2773,8 @@ void Buffer::dispatch(FuncRequest const & func, DispatchResult & dr) if (params().save_transient_properties) undo().recordUndoBufferParams(CursorData()); params().track_changes = !params().track_changes; + if (!params().track_changes) + dr.forceChangesUpdate(); break; case LFUN_CHANGES_OUTPUT: @@ -4584,6 +4591,7 @@ void Buffer::updateBuffer(UpdateScope scope, UpdateType utype) const // update all caches clearReferenceCache(); updateMacros(); + setChangesPresent(false); Buffer & cbuf = const_cast(*this); @@ -4847,6 +4855,9 @@ void Buffer::updateBuffer(ParIterator & parit, UpdateType utype) const // set the counter for this paragraph d->setLabel(parit, utype); + // update change-tracking flag + parit->addChangesToBuffer(*this); + // now the insets InsetList::const_iterator iit = parit->insetList().begin(); InsetList::const_iterator end = parit->insetList().end(); @@ -5111,4 +5122,29 @@ string Buffer::includedFilePath(string const & name, string const & ext) const from_utf8(filePath()))); } + +void Buffer::setChangesPresent(bool b) const +{ + d->tracked_changes_present_ = b; +} + + +bool Buffer::areChangesPresent() const +{ + return d->tracked_changes_present_; +} + + +void Buffer::updateChangesPresent() const +{ + LYXERR(Debug::CHANGES, "Buffer::updateChangesPresent"); + setChangesPresent(false); + ParConstIterator it = par_iterator_begin(); + ParConstIterator const end = par_iterator_end(); + for (; !areChangesPresent() && it != end; ++it) + it->addChangesToBuffer(*this); +} + + + } // namespace lyx diff --git a/src/Buffer.h b/src/Buffer.h index 3f5ab2231b..d4074b0fdb 100644 --- a/src/Buffer.h +++ b/src/Buffer.h @@ -760,6 +760,12 @@ public: int wordCount() const; int charCount(bool with_blanks) const; + // this is const because it does not modify the buffer's real contents, + // only the mutable flag. + void setChangesPresent(bool) const; + bool areChangesPresent() const; + void updateChangesPresent() const; + private: friend class MarkAsExporting; /// mark the buffer as busy exporting something, or not diff --git a/src/BufferParams.h b/src/BufferParams.h index caae01dfec..f62911c262 100644 --- a/src/BufferParams.h +++ b/src/BufferParams.h @@ -42,7 +42,6 @@ class Font; class HSpace; class IndicesList; class Language; -class LatexFeatures; class LayoutFile; class LayoutFileIndex; class Lexer; diff --git a/src/BufferView.cpp b/src/BufferView.cpp index 13d4c7abad..1daee5c720 100644 --- a/src/BufferView.cpp +++ b/src/BufferView.cpp @@ -707,9 +707,7 @@ Change const BufferView::getCurrentChange() const DocIterator dit = d->cursor_.selectionBegin(); // The selected content might have been changed (see #7685) - while (dit.inMathed()) - // Find enclosing text cursor - dit.pop_back(); + dit = dit.getInnerText(); return dit.paragraph().lookupChange(dit.pos()); } @@ -1132,11 +1130,7 @@ bool BufferView::getStatus(FuncRequest const & cmd, FuncStatus & flag) case LFUN_CHANGE_PREVIOUS: case LFUN_ALL_CHANGES_ACCEPT: case LFUN_ALL_CHANGES_REJECT: - // TODO: context-sensitive enabling of LFUNs - // In principle, these command should only be enabled if there - // is a change in the document. However, without proper - // optimizations, this will inevitably result in poor performance. - flag.setEnabled(true); + flag.setEnabled(buffer_.areChangesPresent()); break; case LFUN_SCREEN_UP: @@ -1593,7 +1587,7 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr) break; case LFUN_MARK_TOGGLE: - cur.setSelection(false); + cur.selection(false); if (cur.mark()) { cur.setMark(false); dr.setMessage(from_utf8(N_("Mark removed"))); @@ -1792,7 +1786,7 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr) // Select the inset from outside. cur.pop(); cur.resetAnchor(); - cur.setSelection(true); + cur.selection(true); cur.posForward(); } else if (cells_selected) { // At least one complete cell is selected and inset is a table. @@ -1800,7 +1794,7 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr) cur.idx() = 0; cur.pos() = 0; cur.resetAnchor(); - cur.setSelection(true); + cur.selection(true); cur.idx() = cur.lastidx(); cur.pos() = cur.lastpos(); } else { @@ -1808,7 +1802,7 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr) cur.pit() = 0; cur.pos() = 0; cur.resetAnchor(); - cur.setSelection(true); + cur.selection(true); cur.pit() = cur.lastpit(); cur.pos() = cur.lastpos(); } @@ -1855,9 +1849,17 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr) if (!cur.nextInset() || cur.nextInset() == ins) cur.forwardInset(); } - cur.endUndoGroup(); cur = savecur; cur.fixIfBroken(); + /** This is a dummy undo record only to remember the cursor + * that has just been set; this will be used on a redo action + * (see ticket #10097) + + * FIXME: a better fix would be to have a way to set the + * cursor value directly, but I am not sure it is worth it. + */ + cur.recordUndo(); + cur.endUndoGroup(); dr.screenUpdate(Update::Force); dr.forceBufferUpdate(); @@ -2185,7 +2187,7 @@ void BufferView::mouseEventDispatch(FuncRequest const & cmd0) Cursor old = cursor(); Cursor cur(*this); cur.push(buffer_.inset()); - cur.setSelection(d->cursor_.selection()); + cur.selection(d->cursor_.selection()); // Either the inset under the cursor or the // surrounding Text will handle this event. @@ -2372,7 +2374,7 @@ void BufferView::setCursorFromRow(int row, TexRow const & texrow) } d->cursor_.reset(); buffer_.text().setCursor(d->cursor_, newpit, newpos); - d->cursor_.setSelection(false); + d->cursor_.selection(false); d->cursor_.resetAnchor(); recenter(); } @@ -2407,8 +2409,8 @@ void BufferView::gotoLabel(docstring const & label) // find label shared_ptr toc = buf->tocBackend().toc("label"); - TocIterator toc_it = toc->begin(); - TocIterator end = toc->end(); + Toc::const_iterator toc_it = toc->begin(); + Toc::const_iterator end = toc->end(); for (; toc_it != end; ++toc_it) { if (label == toc_it->str()) { lyx::dispatch(toc_it->action()); @@ -2458,7 +2460,7 @@ void BufferView::setCursor(DocIterator const & dit) dit[i].inset().edit(d->cursor_, true); d->cursor_.setCursor(dit); - d->cursor_.setSelection(false); + d->cursor_.selection(false); d->cursor_.setCurrentFont(); // FIXME // It seems on general grounds as if this is probably needed, but @@ -2587,7 +2589,7 @@ bool BufferView::selectIfEmpty(DocIterator & cur) d->cursor_.setCursor(cur); d->cursor_.pit() = beg_pit; d->cursor_.pos() = 0; - d->cursor_.setSelection(false); + d->cursor_.selection(false); d->cursor_.resetAnchor(); d->cursor_.pit() = end_pit; d->cursor_.pos() = end_pos; diff --git a/src/Changes.cpp b/src/Changes.cpp index 832ccacd76..877c3f1042 100644 --- a/src/Changes.cpp +++ b/src/Changes.cpp @@ -138,6 +138,8 @@ void Changes::set(Change const & change, pos_type const start, pos_type const en << ", author: " << change.author << ", time: " << long(change.changetime) << ") in range (" << start << ", " << end << ")"); + if (!isChanged()) + is_update_required_ = true; } Range const newRange(start, end); @@ -298,8 +300,21 @@ bool Changes::isChanged(pos_type const start, pos_type const end) const } +bool Changes::isChanged() const +{ + ChangeTable::const_iterator it = table_.begin(); + ChangeTable::const_iterator const itend = table_.end(); + for (; it != itend; ++it) { + if (it->change.changed()) + return true; + } + return false; +} + + void Changes::merge() { + bool merged = false; ChangeTable::iterator it = table_.begin(); while (it != table_.end()) { @@ -312,6 +327,7 @@ void Changes::merge() << it->range.start); table_.erase(it); + merged = true; // start again it = table_.begin(); continue; @@ -330,6 +346,7 @@ void Changes::merge() (it + 1)->change.changetime = max(it->change.changetime, (it + 1)->change.changetime); table_.erase(it); + merged = true; // start again it = table_.begin(); continue; @@ -337,6 +354,8 @@ void Changes::merge() ++it; } + if (merged && !isChanged()) + is_update_required_ = true; } @@ -501,7 +520,7 @@ void Changes::addToToc(DocIterator const & cdit, Buffer const & buffer, // ¶ U+00B6 PILCROW SIGN str.push_back(0xb6); docstring const & author = author_list.get(it->change.author).name(); - Toc::iterator it = change_list->item(0, author); + Toc::iterator it = TocBackend::findItem(*change_list, 0, author); if (it == change_list->end()) { change_list->push_back(TocItem(dit, 0, author, true)); change_list->push_back(TocItem(dit, 1, str, output_active, @@ -517,4 +536,15 @@ void Changes::addToToc(DocIterator const & cdit, Buffer const & buffer, } } + +void Changes::updateBuffer(Buffer const & buf) +{ + is_update_required_ = false; + if (!buf.areChangesPresent() && isChanged()) + buf.setChangesPresent(true); +} + + + + } // namespace lyx diff --git a/src/Changes.h b/src/Changes.h index 27710476a6..1d55b03b54 100644 --- a/src/Changes.h +++ b/src/Changes.h @@ -78,6 +78,8 @@ class BufferParams; class Changes { public: + Changes() : is_update_required_(false) {} + /// set the pos to the given change void set(Change const & change, pos_type pos); /// set the range (excluding end) to the given change @@ -98,6 +100,8 @@ public: /// return true if there is a change in the given range (excluding end) bool isChanged(pos_type start, pos_type end) const; + /// + bool isChanged() const; /// return true if the whole range is deleted bool isDeleted(pos_type start, pos_type end) const; @@ -119,6 +123,11 @@ public: void addToToc(DocIterator const & cdit, Buffer const & buffer, bool output_active) const; + /// + void updateBuffer(Buffer const & buf); + /// + bool isUpdateRequired() const { return is_update_required_; } + private: class Range { public: @@ -161,6 +170,10 @@ private: /// table of changes, every row a change and range descriptor ChangeTable table_; + + /// signals that the buffer's flag tracked_changes_present_ needs to be + /// recalculated + bool is_update_required_; }; diff --git a/src/Chktex.cpp b/src/Chktex.cpp index 02271e308c..816837a025 100644 --- a/src/Chktex.cpp +++ b/src/Chktex.cpp @@ -21,8 +21,6 @@ #include "support/lstrings.h" #include "support/Systemcall.h" -#include - using namespace std; using namespace lyx::support; @@ -58,11 +56,7 @@ int Chktex::scanLogFile(TeXErrors & terr) // or whether makeAbsPath(onlyFileName()) is a noop here FileName const tmp(makeAbsPath(onlyFileName(changeExtension(file, ".log")))); -#if USE_BOOST_FORMAT - boost::basic_format msg(_("ChkTeX warning id # %1$d")); -#else - docstring const msg(_("ChkTeX warning id # ")); -#endif + docstring const msg(_("ChkTeX warning id # %1$s")); docstring token; // FIXME UNICODE // We have no idea what the encoding of the error file is @@ -81,13 +75,7 @@ int Chktex::scanLogFile(TeXErrors & terr) int const lineno = convert(line); -#if USE_BOOST_FORMAT - msg % warno; - terr.insertError(lineno, msg.str(), warning); - msg.clear(); -#else - terr.insertError(lineno, msg + warno, warning); -#endif + terr.insertError(lineno, bformat(msg, warno), warning); ++retval; } diff --git a/src/Chktex.h b/src/Chktex.h index 16481e7d67..34826bbcea 100644 --- a/src/Chktex.h +++ b/src/Chktex.h @@ -17,7 +17,6 @@ namespace lyx { -class Lexer; class TeXErrors; diff --git a/src/Cursor.cpp b/src/Cursor.cpp index ed182ace64..baf529bfc8 100644 --- a/src/Cursor.cpp +++ b/src/Cursor.cpp @@ -66,32 +66,32 @@ namespace { // Find position closest to (x, y) in cell given by iter. // Used only in mathed -DocIterator bruteFind2(Cursor const & c, int x, int y) +DocIterator bruteFind(Cursor const & c, int x, int y) { double best_dist = numeric_limits::max(); DocIterator result; DocIterator it = c; - it.top().pos() = 0; + it.pos() = 0; DocIterator et = c; - et.top().pos() = et.top().asInsetMath()->cell(et.top().idx()).size(); + et.pos() = et.lastpos(); for (size_t i = 0;; ++i) { int xo; int yo; Inset const * inset = &it.inset(); - CoordCache const & cache = c.bv().coordCache(); + CoordCache::Insets const & insetCache = c.bv().coordCache().getInsets(); // FIXME: in the case where the inset is not in the cache, this // means that no part of it is visible on screen. In this case // we don't do elaborate search and we just return the forwarded // DocIterator at its beginning. - if (!cache.getInsets().has(inset)) { + if (!insetCache.has(inset)) { it.top().pos() = 0; return it; } - Point const o = cache.getInsets().xy(inset); + Point const o = insetCache.xy(inset); inset->cursorPos(c.bv(), it.top(), c.boundary(), xo, yo); // Convert to absolute xo += o.x_; @@ -113,133 +113,13 @@ DocIterator bruteFind2(Cursor const & c, int x, int y) } -/* -/// moves position closest to (x, y) in given box -bool bruteFind(Cursor & cursor, - int x, int y, int xlow, int xhigh, int ylow, int yhigh) -{ - LASSERT(!cursor.empty(), return false); - Inset & inset = cursor[0].inset(); - BufferView & bv = cursor.bv(); - - CoordCache::InnerParPosCache const & cache = - bv.coordCache().getParPos().find(cursor.bottom().text())->second; - // Get an iterator on the first paragraph in the cache - DocIterator it(inset); - it.push_back(CursorSlice(inset)); - it.pit() = cache.begin()->first; - // Get an iterator after the last paragraph in the cache - DocIterator et(inset); - et.push_back(CursorSlice(inset)); - et.pit() = prev(cache.end(), 1)->first; - if (et.pit() >= et.lastpit()) - et = doc_iterator_end(inset); - else - ++et.pit(); - - double best_dist = numeric_limits::max(); - DocIterator best_cursor = et; - - for ( ; it != et; it.forwardPos(true)) { - // avoid invalid nesting when selecting - if (!cursor.selection() || positionable(it, cursor.anchor_)) { - Point p = bv.getPos(it, false); - int xo = p.x_; - int yo = p.y_; - if (xlow <= xo && xo <= xhigh && ylow <= yo && yo <= yhigh) { - double const dx = xo - x; - double const dy = yo - y; - double const d = dx * dx + dy * dy; - // '<=' in order to take the last possible position - // this is important for clicking behind \sum in e.g. '\sum_i a' - if (d <= best_dist) { - // lyxerr << "*" << endl; - best_dist = d; - best_cursor = it; - } - } - } - } - - if (best_cursor != et) { - cursor.setCursor(best_cursor); - return true; - } - - return false; -} -*/ - -/* -/// moves position closest to (x, y) in given box -bool bruteFind3(Cursor & cur, int x, int y, bool up) -{ - BufferView & bv = cur.bv(); - int ylow = up ? 0 : y + 1; - int yhigh = up ? y - 1 : bv.workHeight(); - int xlow = 0; - int xhigh = bv.workWidth(); - -// FIXME: bit more work needed to get 'from' and 'to' right. - pit_type from = cur.bottom().pit(); - //pit_type to = cur.bottom().pit(); - //lyxerr << "Pit start: " << from << endl; - - //lyxerr << "bruteFind3: x: " << x << " y: " << y - // << " xlow: " << xlow << " xhigh: " << xhigh - // << " ylow: " << ylow << " yhigh: " << yhigh - // << endl; - DocIterator it = doc_iterator_begin(cur.buffer()); - it.pit() = from; - DocIterator et = doc_iterator_end(cur.buffer()); - - double best_dist = numeric_limits::max(); - DocIterator best_cursor = et; - - for ( ; it != et; it.forwardPos()) { - // avoid invalid nesting when selecting - if (bv.cursorStatus(it) == CUR_INSIDE - && (!cur.selection() || positionable(it, cur.realAnchor()))) { - // If this function is ever used again, check - // whether this is the same as "bv.getPos(it, - // false)" with boundary = false. - Point p = bv.getPos(it); - int xo = p.x_; - int yo = p.y_; - if (xlow <= xo && xo <= xhigh && ylow <= yo && yo <= yhigh) { - double const dx = xo - x; - double const dy = yo - y; - double const d = dx * dx + dy * dy; - //lyxerr << "itx: " << xo << " ity: " << yo << " d: " << d - // << " dx: " << dx << " dy: " << dy - // << " idx: " << it.idx() << " pos: " << it.pos() - // << " it:\n" << it - // << endl; - // '<=' in order to take the last possible position - // this is important for clicking behind \sum in e.g. '\sum_i a' - if (d <= best_dist) { - //lyxerr << "*" << endl; - best_dist = d; - best_cursor = it; - } - } - } - } - - //lyxerr << "best_dist: " << best_dist << " cur:\n" << best_cursor << endl; - if (best_cursor == et) - return false; - cur.setCursor(best_cursor); - return true; -} -*/ } // namespace anon CursorData::CursorData() : DocIterator(), anchor_(), selection_(false), mark_(false), word_selection_(false), - logicalpos_(false), current_font(inherit_font), + current_font(inherit_font), autocorrect_(false), macromode_(false) {} @@ -247,7 +127,7 @@ CursorData::CursorData() CursorData::CursorData(Buffer * buffer) : DocIterator(buffer), anchor_(), selection_(false), mark_(false), word_selection_(false), - logicalpos_(false), current_font(inherit_font), + current_font(inherit_font), autocorrect_(false), macromode_(false) {} @@ -255,7 +135,7 @@ CursorData::CursorData(Buffer * buffer) CursorData::CursorData(DocIterator const & dit) : DocIterator(dit), anchor_(), selection_(false), mark_(false), word_selection_(false), - logicalpos_(false), current_font(inherit_font), + current_font(inherit_font), autocorrect_(false), macromode_(false) {} @@ -1117,18 +997,18 @@ DocIterator Cursor::selectionEnd() const void Cursor::setSelection() { - setSelection(true); + selection(true); if (idx() == normalAnchor().idx() && pit() == normalAnchor().pit() && pos() == normalAnchor().pos()) - setSelection(false); + selection(false); } void Cursor::setSelection(DocIterator const & where, int n) { setCursor(where); - setSelection(true); + selection(true); anchor_ = where; pos() += n; } @@ -1136,7 +1016,7 @@ void Cursor::setSelection(DocIterator const & where, int n) void Cursor::clearSelection() { - setSelection(false); + selection(false); setWordSelection(false); setMark(false); resetAnchor(); @@ -1199,7 +1079,7 @@ bool Cursor::selHandle(bool sel) cap::saveSelection(*this); resetAnchor(); - setSelection(sel); + selection(sel); return true; } } // namespace lyx @@ -1439,7 +1319,7 @@ bool Cursor::backspace() // let's require two backspaces for 'big stuff' and // highlight on the first resetAnchor(); - setSelection(true); + selection(true); --pos(); } else { --pos(); @@ -1486,7 +1366,7 @@ bool Cursor::erase() // 'clever' UI hack: only erase large items if previously slected if (pos() != lastpos() && nextAtom()->nargs() > 0) { resetAnchor(); - setSelection(true); + selection(true); ++pos(); } else { plainErase(); @@ -1794,7 +1674,7 @@ bool Cursor::upDownInMath(bool up) //lyxerr << "idxUpDown triggered" << endl; // try to find best position within this inset if (!selection()) - setCursor(bruteFind2(*this, xo, yo)); + setCursor(bruteFind(*this, xo, yo)); return true; } @@ -2426,6 +2306,12 @@ void Cursor::checkBufferStructure() // In case the master has no gui associated with it, // the TocItem is not updated (part of bug 5699). buffer()->tocBackend().updateItem(*this); + + // If the last tracked change of the paragraph has just been + // deleted, then we need to recompute the buffer flag + // tracked_changes_present_. + if (inTexted() && paragraph().isChangeUpdateRequired()) + disp_.forceChangesUpdate(); } diff --git a/src/Cursor.h b/src/Cursor.h index de2405692a..aa31f91c96 100644 --- a/src/Cursor.h +++ b/src/Cursor.h @@ -101,11 +101,6 @@ protected: bool mark_; /// are we in word-selection mode? This is set when double clicking. bool word_selection_; - /// If true, we are behind the previous char, otherwise we are in front - // of the next char. This only make a difference when we are in front - // of a big inset spanning a whole row and computing coordinates for - // displaying the cursor. - bool logicalpos_; // FIXME: make them protected. public: @@ -166,8 +161,8 @@ public: // /// selection active? bool selection() const { return selection_; } - /// set selection; - void setSelection(bool sel) { selection_ = sel; } + /// set selection; this is lower level than (set|clear)Selection + void selection(bool sel) { selection_ = sel; } /// do we have a multicell selection? bool selIsMultiCell() const { return selection_ && selBegin().idx() != selEnd().idx(); } diff --git a/src/CursorSlice.cpp b/src/CursorSlice.cpp index ae3686fd1e..573ca9d4fe 100644 --- a/src/CursorSlice.cpp +++ b/src/CursorSlice.cpp @@ -92,6 +92,28 @@ CursorSlice::col_type CursorSlice::col() const } +void CursorSlice::setPitPos(pit_type pit, pos_type pos) +{ + LASSERT(pit != int(text()->paragraphs().size()), return); + pit_ = pit; + pos_ = pos; + + // Now some strict checking. None of these should happen, but + // we're scaredy-cats + if (pos < 0) { + LYXERR0("Don't like -1!"); + LATTEST(false); + } + + if (pos > paragraph().size()) { + LYXERR0("Don't like 1, pos: " << pos + << " size: " << paragraph().size() + << " par: " << pit); + LATTEST(false); + } +} + + void CursorSlice::forwardPos() { // move on one position if possible diff --git a/src/CursorSlice.h b/src/CursorSlice.h index f44c92e0c2..308b938455 100644 --- a/src/CursorSlice.h +++ b/src/CursorSlice.h @@ -119,6 +119,8 @@ public: Text * text() const { return inset_->getText(idx_); } /// paragraph in this cell Paragraph & paragraph() const; + /// + void setPitPos(pit_type pit, pos_type pos); /// /// mathed specific stuff diff --git a/src/CutAndPaste.cpp b/src/CutAndPaste.cpp index 5f3e8090fb..44bcb5e962 100644 --- a/src/CutAndPaste.cpp +++ b/src/CutAndPaste.cpp @@ -100,11 +100,11 @@ bool checkPastePossible(int index) struct PasteReturnValue { - PasteReturnValue(pit_type r_par, pos_type r_pos, bool r_nu) : - par(r_par), pos(r_pos), needupdate(r_nu) + PasteReturnValue(pit_type r_pit, pos_type r_pos, bool r_nu) : + pit(r_pit), pos(r_pos), needupdate(r_nu) {} - pit_type par; + pit_type pit; pos_type pos; bool needupdate; }; @@ -1074,7 +1074,7 @@ void pasteParagraphList(Cursor & cur, ParagraphList const & parlist, pasteSelectionHelper(cur, parlist, docclass, 0, errorList); cur.forceBufferUpdate(); cur.clearSelection(); - text->setCursor(cur, prv.par, prv.pos); + text->setCursor(cur, prv.pit, prv.pos); } // mathed is handled in InsetMathNest/InsetMathGrid @@ -1325,7 +1325,7 @@ void selClearOrDel(Cursor & cur) if (lyxrc.auto_region_delete) selDel(cur); else - cur.setSelection(false); + cur.selection(false); } diff --git a/src/DispatchResult.h b/src/DispatchResult.h index 21dfa4f92b..f546be27bc 100644 --- a/src/DispatchResult.h +++ b/src/DispatchResult.h @@ -29,7 +29,8 @@ public: error_(false), update_(Update::None), need_buf_update_(false), - need_msg_update_(true) + need_msg_update_(true), + need_changes_update_(false) {} /// DispatchResult(bool dispatched, Update::flags f) : @@ -37,7 +38,8 @@ public: error_(false), update_(f), need_buf_update_(false), - need_msg_update_(true) + need_msg_update_(true), + need_changes_update_(false) {} /// bool dispatched() const { return dispatched_; } @@ -57,12 +59,14 @@ public: Update::flags screenUpdate() const { return update_; } /// void screenUpdate(Update::flags f) { update_ = f; } + /// Does the buffer need updating? bool needBufferUpdate() const { return need_buf_update_; } /// Force the buffer to be updated void forceBufferUpdate() { need_buf_update_ = true; } /// Clear the flag indicating we need an update void clearBufferUpdate() { need_buf_update_ = false; } + /// Do we need to display a message in the status bar? bool needMessageUpdate() const { return need_msg_update_; } /// Force the message to be displayed @@ -70,6 +74,14 @@ public: /// Clear the flag indicating we need to display the message void clearMessageUpdate() { need_msg_update_ = false; } + /// Do we need to update the change tracking presence flag? + bool needChangesUpdate() { return need_changes_update_; } + /// Force the change tracking presence flag to be updated + void forceChangesUpdate() { need_changes_update_ = true; } + /// Clear the flag indicating that we need to update the change tracking + /// presence flag + void clearChangesUpdate() { need_changes_update_ = false; } + private: /// was the event fully dispatched? bool dispatched_; @@ -83,6 +95,8 @@ private: bool need_buf_update_; /// bool need_msg_update_; + /// + bool need_changes_update_; }; diff --git a/src/DocIterator.cpp b/src/DocIterator.cpp index a059ad18d2..28d23e8d11 100644 --- a/src/DocIterator.cpp +++ b/src/DocIterator.cpp @@ -229,7 +229,7 @@ CursorSlice const & DocIterator::innerTextSlice() const DocIterator DocIterator::getInnerText() const { DocIterator texted = *this; - while (!texted.inTexted()) + while (!texted.inTexted()) texted.pop_back(); return texted; } diff --git a/src/HunspellChecker.cpp b/src/HunspellChecker.cpp index 5c179762ac..ec5466f300 100644 --- a/src/HunspellChecker.cpp +++ b/src/HunspellChecker.cpp @@ -155,9 +155,9 @@ const string HunspellChecker::Private::dictPath(int selector) { switch (selector) { case 4: - return addName(hunspellPackageDictDirectory(),dictDirectory()); + return hunspellPackageDictDirectory(); case 3: - return addName(myspellPackageDictDirectory(),dictDirectory()); + return myspellPackageDictDirectory(); case 2: return addName(package().system_support().absFileName(),dictDirectory()); case 1: diff --git a/src/LaTeX.cpp b/src/LaTeX.cpp index 6063d80719..0640275a36 100644 --- a/src/LaTeX.cpp +++ b/src/LaTeX.cpp @@ -955,8 +955,7 @@ bool handleFoundFile(string const & ff, DepTable & head) return true; // strip off part after last space and try again string tmp = strippedfile; - string const stripoff = - rsplit(tmp, strippedfile, ' '); + rsplit(tmp, strippedfile, ' '); absname.set(strippedfile); if (insertIfExists(absname, head)) return true; @@ -981,8 +980,7 @@ bool handleFoundFile(string const & ff, DepTable & head) break; // strip off part after last space and try again string strippedfile; - string const stripoff = - rsplit(foundfile, strippedfile, ' '); + rsplit(foundfile, strippedfile, ' '); foundfile = strippedfile; onlyfile = onlyFileName(strippedfile); absname = makeAbsPath(onlyfile); diff --git a/src/Makefile.am b/src/Makefile.am index 047188f848..90fb3e65af 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -2,7 +2,9 @@ include $(top_srcdir)/config/common.am ############################### Core ############################## -AM_CPPFLAGS += -I$(top_srcdir)/src $(BOOST_INCLUDES) $(ENCHANT_CFLAGS) $(HUNSPELL_CFLAGS) +AM_CPPFLAGS += -I$(top_srcdir)/src +AM_CPPFLAGS += $(BOOST_INCLUDES) $(ICONV_INCLUDES) $(ZLIB_INCLUDES) +AM_CPPFLAGS += $(ENCHANT_CFLAGS) $(HUNSPELL_CFLAGS) AM_CPPFLAGS += $(QT_CPPFLAGS) $(QT_CORE_INCLUDES) if BUILD_CLIENT_SUBDIR @@ -19,7 +21,8 @@ EXTRA_DIST = lyx_commit_hash.h.in \ tests/CMakeLists.txt OTHERLIBS = $(BOOST_LIBS) $(MYTHES_LIBS) $(ENCHANT_LIBS) $(HUNSPELL_LIBS) \ - @LIBS@ $(SOCKET_LIBS) $(LIBSHLWAPI) $(LIBPSAPI) + @LIBS@ $(ICONV_LIBS) $(ZLIB_LIBS) $(SOCKET_LIBS) \ + $(LIBSHLWAPI) $(LIBPSAPI) noinst_LIBRARIES = liblyxcore.a bin_PROGRAMS = lyx @@ -39,7 +42,7 @@ lyx_LDADD = \ if LYX_WIN_RESOURCE .rc.o: cp $(top_srcdir)/development/Win32/packaging/icons/lyx_*32x32.ico . - windres -I$(top_builddir) --preprocessor "$(CPP) -xc-header -DRC_INVOKED" $< -o $@ + $(RC) -I$(top_builddir) --preprocessor "$(CPP) -xc-header -DRC_INVOKED" $< -o $@ endif if INSTALL_MACOSX @@ -289,6 +292,7 @@ HEADERFILESCORE = \ Text.h \ TextClass.h \ TextMetrics.h \ + Toc.h \ TocBackend.h \ Trans.h \ Undo.h \ @@ -732,7 +736,8 @@ ADD_FRAMEWORKS = -framework QtGui -framework QtCore -framework AppKit -framework endif check_layout_CPPFLAGS = $(AM_CPPFLAGS) -check_layout_LDADD = support/liblyxsupport.a $(LIBICONV) $(BOOST_LIBS) @LIBS@ $(QT_LIB) $(LIBSHLWAPI) +check_layout_LDADD = support/liblyxsupport.a $(LIBICONV) $(BOOST_LIBS) @LIBS@ \ + $(ICONV_LIBS) $(ZLIB_LIBS) $(QT_LIB) $(LIBSHLWAPI) check_layout_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS) check_layout_SOURCES = \ insets/InsetLayout.cpp \ @@ -752,7 +757,8 @@ check_layout_SOURCES = \ tests/dummy_functions.cpp check_ExternalTransforms_CPPFLAGS = $(AM_CPPFLAGS) -check_ExternalTransforms_LDADD = support/liblyxsupport.a $(LIBICONV) $(BOOST_LIBS) @LIBS@ $(QT_LIB) $(LIBSHLWAPI) +check_ExternalTransforms_LDADD = support/liblyxsupport.a $(LIBICONV) $(BOOST_LIBS) @LIBS@ \ + $(ICONV_LIBS) $(ZLIB_LIBS) $(QT_LIB) $(LIBSHLWAPI) check_ExternalTransforms_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS) check_ExternalTransforms_SOURCES = \ graphics/GraphicsParams.cpp \ @@ -764,7 +770,8 @@ check_ExternalTransforms_SOURCES = \ tests/dummy_functions.cpp check_Length_CPPFLAGS = $(AM_CPPFLAGS) -check_Length_LDADD = support/liblyxsupport.a $(LIBICONV) $(BOOST_LIBS) @LIBS@ $(QT_LIB) $(LIBSHLWAPI) +check_Length_LDADD = support/liblyxsupport.a $(LIBICONV) $(BOOST_LIBS) @LIBS@ \ + $(ICONV_LIBS) $(ZLIB_LIBS) $(QT_LIB) $(LIBSHLWAPI) check_Length_LDFLAGS = $(QT_LDFLAGS) $(ADD_FRAMEWORKS) check_Length_SOURCES = \ Length.cpp \ @@ -774,7 +781,8 @@ check_Length_SOURCES = \ tests/dummy_functions.cpp check_ListingsCaption_CPPFLAGS = $(AM_CPPFLAGS) -check_ListingsCaption_LDADD = support/liblyxsupport.a $(LIBICONV) $(BOOST_LIBS) @LIBS@ $(QT_LIB) $(LIBSHLWAPI) +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 = \ tests/check_ListingsCaption.cpp \ diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index a405b6a806..d6106b37d4 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -562,6 +562,18 @@ void Paragraph::addChangesToToc(DocIterator const & cdit, } +void Paragraph::addChangesToBuffer(Buffer const & buf) const +{ + d->changes_.updateBuffer(buf); +} + + +bool Paragraph::isChangeUpdateRequired() const +{ + return d->changes_.isUpdateRequired(); +} + + bool Paragraph::isDeleted(pos_type start, pos_type end) const { LASSERT(start >= 0 && start <= size(), return false); diff --git a/src/Paragraph.h b/src/Paragraph.h index d0ed94bfb0..50516d77ae 100644 --- a/src/Paragraph.h +++ b/src/Paragraph.h @@ -39,17 +39,14 @@ class DocumentClass; class Inset; class InsetBibitem; class LaTeXFeatures; -class Inset_code; class InsetList; class Language; class Layout; class Font; -class Font_size; class MetricsInfo; class OutputParams; class PainterInfo; class ParagraphParameters; -class Toc; class WordLangTuple; class XHTMLStream; class otexstream; @@ -154,6 +151,10 @@ public: /// void addChangesToToc(DocIterator const & cdit, Buffer const & buf, bool output_active) const; + /// set the buffer flag if there are changes in the paragraph + void addChangesToBuffer(Buffer const & buf) const; + /// + bool isChangeUpdateRequired() const; /// Language const * getParLanguage(BufferParams const &) const; /// diff --git a/src/Row.cpp b/src/Row.cpp index d0694f7d2e..58a23805f2 100644 --- a/src/Row.cpp +++ b/src/Row.cpp @@ -148,7 +148,8 @@ Row::Row() : separator(0), label_hfill(0), left_margin(0), right_margin(0), sel_beg(-1), sel_end(-1), begin_margin_sel(false), end_margin_sel(false), - changed_(false), crc_(0), pos_(0), end_(0), right_boundary_(false) + changed_(false), crc_(0), + pit_(0), pos_(0), end_(0), right_boundary_(false) {} diff --git a/src/Row.h b/src/Row.h index f0c5b72ca1..0bd4597746 100644 --- a/src/Row.h +++ b/src/Row.h @@ -144,6 +144,10 @@ public: void setSelectionAndMargins(DocIterator const & beg, DocIterator const & end) const; + /// + void pit(pit_type p) { pit_ = p; } + /// + pit_type pit() const { return pit_; } /// void pos(pos_type p) { pos_ = p; } /// @@ -286,6 +290,8 @@ private: mutable bool changed_; /// CRC of row contents. mutable size_type crc_; + /// Index of the paragraph that contains this row + pit_type pit_; /// first pos covered by this row pos_type pos_; /// one behind last pos covered by this row diff --git a/src/RowPainter.cpp b/src/RowPainter.cpp index 8c62926889..276664237f 100644 --- a/src/RowPainter.cpp +++ b/src/RowPainter.cpp @@ -104,42 +104,40 @@ FontInfo RowPainter::labelFont() const // This draws green lines around each inset. -void RowPainter::paintInset(Inset const * inset, Font const & font, - Change const & change, - pos_type const pos) +void RowPainter::paintInset(Row::Element const & e) { // Handle selection bool const pi_selected = pi_.selected; Cursor const & cur = pi_.base.bv->cursor(); if (cur.selection() && cur.text() == &text_ && cur.normalAnchor().text() == &text_) - pi_.selected = row_.sel_beg <= pos && row_.sel_end > pos; + pi_.selected = row_.sel_beg <= e.pos && row_.sel_end > e.pos; - LASSERT(inset, return); + LASSERT(e.inset, return); // Backup full_repaint status because some insets (InsetTabular) // requires a full repaint bool const pi_full_repaint = pi_.full_repaint; bool const pi_do_spellcheck = pi_.do_spellcheck; Change const pi_change = pi_.change_; - pi_.base.font = inset->inheritFont() ? font.fontInfo() : + pi_.base.font = e.inset->inheritFont() ? e.font.fontInfo() : pi_.base.bv->buffer().params().getFont().fontInfo(); - pi_.ltr_pos = !font.isVisibleRightToLeft(); - pi_.change_ = change_.changed() ? change_ : change; - pi_.do_spellcheck &= inset->allowSpellCheck(); + pi_.ltr_pos = !e.font.isVisibleRightToLeft(); + pi_.change_ = change_.changed() ? change_ : e.change; + pi_.do_spellcheck &= e.inset->allowSpellCheck(); int const x1 = int(x_); - pi_.base.bv->coordCache().insets().add(inset, x1, yo_); + pi_.base.bv->coordCache().insets().add(e.inset, x1, yo_); // insets are painted completely. Recursive // FIXME: it is wrong to completely paint the background // if we want to do single row painting. - inset->drawBackground(pi_, x1, yo_); - inset->drawSelection(pi_, x1, yo_); - inset->draw(pi_, x1, yo_); + e.inset->drawBackground(pi_, x1, yo_); + e.inset->drawSelection(pi_, x1, yo_); + e.inset->draw(pi_, x1, yo_); - Dimension const & dim = pi_.base.bv->coordCache().insets().dim(inset); + Dimension const & dim = pi_.base.bv->coordCache().insets().dim(e.inset); - paintForeignMark(x_, font.language(), dim.descent()); + paintForeignMark(x_, e.font.language(), dim.descent()); x_ += dim.width(); @@ -587,7 +585,7 @@ void RowPainter::paintOnlyInsets() x_ += e.full_width(); continue; } - paintInset(e.inset, e.font, e.change, e.pos); + paintInset(e); } else x_ += e.full_width(); } @@ -615,7 +613,7 @@ void RowPainter::paintText() case Row::INSET: { // If outer row has changed, nested insets are repaint completely. pi_.base.bv->coordCache().insets().add(e.inset, int(x_), yo_); - paintInset(e.inset, e.font, e.change, e.pos); + paintInset(e); foreign_descent = e.dim.descent(); } break; diff --git a/src/RowPainter.h b/src/RowPainter.h index a4120e6dfd..cb70f5d8a9 100644 --- a/src/RowPainter.h +++ b/src/RowPainter.h @@ -64,8 +64,7 @@ private: void paintMisspelledMark(double orig_x, Row::Element const & e) const; void paintChange(double orig_x , Font const & font, Change const & change) const; void paintAppendixStart(int y) const; - void paintInset(Inset const * inset, Font const & font, - Change const & change, pos_type const pos); + void paintInset(Row::Element const & e); /// return the label font for this row FontInfo labelFont() const; diff --git a/src/Server.cpp b/src/Server.cpp index b7fa35ee13..1a66682bc4 100644 --- a/src/Server.cpp +++ b/src/Server.cpp @@ -136,7 +136,7 @@ DWORD WINAPI pipeServerWrapper(void * arg) LyXComm::LyXComm(string const & pip, Server * cli, ClientCallbackfct ccb) - : pipename_(pip), client_(cli), clientcb_(ccb), stopserver_(0) + : stopserver_(0), pipename_(pip), client_(cli), clientcb_(ccb) { for (int i = 0; i < MAX_PIPES; ++i) { event_[i] = 0; @@ -209,7 +209,7 @@ bool LyXComm::pipeServer() // Determine which pipe instance completed the operation. i = wait - WAIT_OBJECT_0; - LASSERT(i >= 0 && i <= MAX_PIPES, /**/); + LASSERT(i <= MAX_PIPES, /**/); // Check whether we were waked up for stopping the pipe server. if (i == MAX_PIPES) diff --git a/src/Text.cpp b/src/Text.cpp index f6c1d392e5..c003350781 100644 --- a/src/Text.cpp +++ b/src/Text.cpp @@ -67,35 +67,12 @@ #include "support/lassert.h" #include "support/lstrings.h" #include "support/lyxalgo.h" +#include "support/lyxtime.h" #include "support/textutils.h" #include -// TODO: replace if in Text::readParToken() with compile time switch -#if 0 - -#include "support/metahash.h" - -typedef boost::mpl::string<'\\end','_lay','out'> end_layout; -typedef boost::mpl::string<'\\end','in','set'> end_inset; - -void foo() -{ - std::string token = "\\end_layout"; - - switch (boost::hash_value(token)) { - case lyx::support::hash_string::value: - return; - case lyx::support::hash_string::value: - return; - default: ; - }; - -} -#endif - - using namespace std; using namespace lyx::support; @@ -132,12 +109,12 @@ static bool moveItem(Paragraph & fromPar, pos_type fromPos, void breakParagraphConservative(BufferParams const & bparams, - ParagraphList & pars, pit_type par_offset, pos_type pos) + ParagraphList & pars, pit_type pit, pos_type pos) { // create a new paragraph - Paragraph & tmp = *pars.insert(lyx::next(pars.begin(), par_offset + 1), + Paragraph & tmp = *pars.insert(lyx::next(pars.begin(), pit + 1), Paragraph()); - Paragraph & par = pars[par_offset]; + Paragraph & par = pars[pit]; tmp.setInsetOwner(&par.inInset()); tmp.makeSameLayout(par); @@ -930,11 +907,11 @@ void Text::insertChar(Cursor & cur, char_type c) if (lyxrc.auto_number) { static docstring const number_operators = from_ascii("+-/*"); static docstring const number_unary_operators = from_ascii("+-"); - static docstring const number_seperators = from_ascii(".,:"); + static docstring const number_separators = from_ascii(".,:"); if (cur.current_font.fontInfo().number() == FONT_ON) { if (!isDigitASCII(c) && !contains(number_operators, c) && - !(contains(number_seperators, c) && + !(contains(number_separators, c) && cur.pos() != 0 && cur.pos() != cur.lastpos() && tm.displayFont(pit, cur.pos()).fontInfo().number() == FONT_ON && @@ -955,7 +932,7 @@ void Text::insertChar(Cursor & cur, char_type c) ) { setCharFont(pit, cur.pos() - 1, cur.current_font, tm.font_); - } else if (contains(number_seperators, c) + } else if (contains(number_separators, c) && cur.pos() >= 2 && tm.displayFont(pit, cur.pos() - 2).fontInfo().number() == FONT_ON) { setCharFont(pit, cur.pos() - 1, cur.current_font, @@ -1478,7 +1455,7 @@ void Text::deleteWordForward(Cursor & cur) cursorForward(cur); else { cur.resetAnchor(); - cur.setSelection(true); + cur.selection(true); cursorForwardOneWord(cur); cur.setSelection(); cutSelection(cur, true, false); @@ -1494,7 +1471,7 @@ void Text::deleteWordBackward(Cursor & cur) cursorBackward(cur); else { cur.resetAnchor(); - cur.setSelection(true); + cur.selection(true); cursorBackwardOneWord(cur); cur.setSelection(); cutSelection(cur, true, false); @@ -1624,7 +1601,7 @@ bool Text::erase(Cursor & cur) if (needsUpdate) { // Make sure the cursor is correct. Is this really needed? // No, not really... at least not here! - cur.text()->setCursor(cur.top(), cur.pit(), cur.pos()); + cur.top().setPitPos(cur.pit(), cur.pos()); cur.checkBufferStructure(); } @@ -1731,7 +1708,7 @@ bool Text::backspace(Cursor & cur) // A singlePar update is not enough in this case. // cur.screenUpdateFlags(Update::Force); - setCursor(cur.top(), cur.pit(), cur.pos()); + cur.top().setPitPos(cur.pit(), cur.pos()); return needsUpdate; } @@ -1900,13 +1877,11 @@ docstring Text::currentState(Cursor const & cur) const Change change = par.lookupChange(cur.pos()); if (change.changed()) { - Author const & a = buf.params().authors().get(change.author); - os << _("Change: ") << a.name(); - if (!a.email().empty()) - os << " (" << a.email() << ")"; - // FIXME ctime is english, we should translate that - os << _(" at ") << ctime(&change.changetime); - os << " : "; + docstring const author = + buf.params().authors().get(change.author).nameAndEmail(); + docstring const date = formatted_datetime(change.changetime); + os << bformat(_("Changed by %1$s[[author]] on %2$s[[date]]. "), + author, date); } // I think we should only show changes from the default diff --git a/src/Text.h b/src/Text.h index 2d855ecc8f..bdf2169fab 100644 --- a/src/Text.h +++ b/src/Text.h @@ -182,12 +182,10 @@ public: void rejectChanges(); /// returns true if par was empty and was removed - bool setCursor(Cursor & cur, pit_type par, pos_type pos, + bool setCursor(Cursor & cur, pit_type pit, pos_type pos, bool setfont = true, bool boundary = false); /// - void setCursor(CursorSlice &, pit_type par, pos_type pos); - /// - void setCursorIntern(Cursor & cur, pit_type par, + void setCursorIntern(Cursor & cur, pit_type pit, pos_type pos, bool setfont = true, bool boundary = false); /// Move cursor one position backwards @@ -322,20 +320,20 @@ public: docstring completionPrefix(Cursor const & cur) const; /// find a paragraph before \p par with the given \p depth, if such /// a paragraph cannot be found, \p par is returned - pit_type depthHook(pit_type par, depth_type depth) const; + pit_type depthHook(pit_type pit, depth_type depth) const; /// find a paragraph before \p par with depth less than the /// depth of \p par. If such paragraph cannot be found because /// \p par already has depth 0, lastpar + 1 is returned. If /// such paragraph cannot be found because there isn't a par /// with less depth before this one, \p par is returned. - pit_type outerHook(pit_type par) const; + pit_type outerHook(pit_type pit) const; /// Is it the first par with same depth and layout? - bool isFirstInSequence(pit_type par) const; + bool isFirstInSequence(pit_type pit) const; /// Is this paragraph in the table of contents? - int getTocLevel(pit_type par) const; + int getTocLevel(pit_type pit) const; /// Get the font of the "environment" of paragraph \p par_offset in \p pars. /// All font changes of the paragraph are relative to this font. - Font const outerFont(pit_type par_offset) const; + Font const outerFont(pit_type pit_offset) const; private: /// The InsetText owner shall have access to everything. @@ -383,7 +381,7 @@ private: /// void breakParagraphConservative(BufferParams const & bparams, ParagraphList & paragraphs, - pit_type par, + pit_type pit, pos_type pos); /** @@ -391,7 +389,7 @@ void breakParagraphConservative(BufferParams const & bparams, * Be careful, this doesent make any check at all. */ void mergeParagraph(BufferParams const & bparams, - ParagraphList & paragraphs, pit_type par); + ParagraphList & paragraphs, pit_type pit); /// accept the changes within the complete ParagraphList void acceptChanges(ParagraphList & pars, BufferParams const & bparams); diff --git a/src/Text2.cpp b/src/Text2.cpp index c3d696e7e2..96d1035243 100644 --- a/src/Text2.cpp +++ b/src/Text2.cpp @@ -547,47 +547,23 @@ void Text::insertInset(Cursor & cur, Inset * inset) } -bool Text::setCursor(Cursor & cur, pit_type par, pos_type pos, +bool Text::setCursor(Cursor & cur, pit_type pit, pos_type pos, bool setfont, bool boundary) { TextMetrics const & tm = cur.bv().textMetrics(this); - bool const update_needed = !tm.contains(par); + bool const update_needed = !tm.contains(pit); Cursor old = cur; - setCursorIntern(cur, par, pos, setfont, boundary); + setCursorIntern(cur, pit, pos, setfont, boundary); return cur.bv().checkDepm(cur, old) || update_needed; } -void Text::setCursor(CursorSlice & cur, pit_type par, pos_type pos) -{ - LASSERT(par != int(paragraphs().size()), return); - cur.pit() = par; - cur.pos() = pos; - - // now some strict checking - Paragraph & para = getPar(par); - - // None of these should happen, but we're scaredy-cats - if (pos < 0) { - LYXERR0("Don't like -1!"); - LATTEST(false); - } - - if (pos > para.size()) { - LYXERR0("Don't like 1, pos: " << pos - << " size: " << para.size() - << " par: " << par); - LATTEST(false); - } -} - - -void Text::setCursorIntern(Cursor & cur, - pit_type par, pos_type pos, bool setfont, bool boundary) +void Text::setCursorIntern(Cursor & cur, pit_type pit, pos_type pos, + bool setfont, bool boundary) { LBUFERR(this == cur.text()); cur.boundary(boundary); - setCursor(cur.top(), par, pos); + cur.top().setPitPos(pit, pos); if (setfont) cur.setCurrentFont(); } diff --git a/src/Text3.cpp b/src/Text3.cpp index 49df75efa3..0467aa8b69 100644 --- a/src/Text3.cpp +++ b/src/Text3.cpp @@ -178,7 +178,7 @@ static void mathDispatch(Cursor & cur, FuncRequest const & cmd) LASSERT(cur.inMathed(), return); cur.pos() = 0; cur.resetAnchor(); - cur.setSelection(true); + cur.selection(true); cur.pos() = cur.lastpos(); if (cmd.action() != LFUN_MATH_MODE) // LFUN_MATH_MODE has a different meaning in math mode @@ -1678,7 +1678,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd) // We continue with our existing selection or start a new one, so don't // reset the anchor. bvcur.setCursor(cur); - bvcur.setSelection(true); + bvcur.selection(true); if (cur.top() == old) { // We didn't move one iota, so no need to update the screen. cur.screenUpdateFlags(Update::SinglePar | Update::FitCursor); @@ -2060,7 +2060,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd) cur.push(*inset); cur.top().pos() = cur.top().lastpos(); cur.resetAnchor(); - cur.setSelection(true); + cur.selection(true); cur.top().pos() = 0; } break; @@ -2436,7 +2436,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd) case LFUN_ESCAPE: if (cur.selection()) { - cur.setSelection(false); + cur.selection(false); } else { cur.undispatched(); // This used to be LFUN_FINISHED_RIGHT, I think FORWARD is more @@ -3109,7 +3109,7 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd, docstring layout = cmd.argument(); if (layout.empty()) layout = tclass.defaultLayoutName(); - enable = !cur.inset().forcePlainLayout() && tclass.hasLayout(layout); + enable = !owner_->forcePlainLayout() && tclass.hasLayout(layout); flag.setOnOff(layout == cur.paragraph().layout().name()); break; @@ -3145,7 +3145,7 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd, case LFUN_PARAGRAPH_PARAMS: case LFUN_PARAGRAPH_PARAMS_APPLY: case LFUN_PARAGRAPH_UPDATE: - enable = cur.inset().allowParagraphCustomization(); + enable = owner_->allowParagraphCustomization(); break; // FIXME: why are accent lfuns forbidden with pass_thru layouts? diff --git a/src/TextMetrics.cpp b/src/TextMetrics.cpp index 810b21a584..e69ffe9c22 100644 --- a/src/TextMetrics.cpp +++ b/src/TextMetrics.cpp @@ -200,13 +200,13 @@ bool TextMetrics::metrics(MetricsInfo & mi, Dimension & dim, int min_width) int TextMetrics::rightMargin(ParagraphMetrics const & pm) const { - return main_text_? pm.rightMargin(*bv_) : 0; + return text_->isMainText() ? pm.rightMargin(*bv_) : 0; } int TextMetrics::rightMargin(pit_type const pit) const { - return main_text_? par_metrics_[pit].rightMargin(*bv_) : 0; + return text_->isMainText() ? par_metrics_[pit].rightMargin(*bv_) : 0; } @@ -353,7 +353,6 @@ bool TextMetrics::redoParagraph(pit_type const pit) pm.reset(par); Buffer & buffer = bv_->buffer(); - main_text_ = (text_ == &buffer.text()); bool changed = false; // Check whether there are InsetBibItems that need fixing @@ -443,12 +442,13 @@ bool TextMetrics::redoParagraph(pit_type const pit) if (row_index == pm.rows().size()) pm.rows().push_back(Row()); Row & row = pm.rows()[row_index]; + row.pit(pit); row.pos(first); breakRow(row, right_margin, pit); setRowHeight(row, pit); row.setChanged(false); if (row_index || row.endpos() < par.size() - || (row.right_boundary() && par.inInset().lyxCode() != CELL_CODE)) + || (row.right_boundary() && par.inInset().lyxCode() != CELL_CODE)) { /* If there is more than one row or the row has been * broken by a display inset or a newline, expand the text * to the full allowable width. This setting here is @@ -458,7 +458,9 @@ bool TextMetrics::redoParagraph(pit_type const pit) * that, and it triggers when using a caption in a * longtable (see bugs #9945 and #9757). */ - dim_.wid = max_width_; + if (dim_.wid < max_width_) + dim_.wid = max_width_; + } int const max_row_width = max(dim_.wid, row.width()); computeRowMetrics(pit, row, max_row_width); first = row.endpos(); @@ -949,15 +951,15 @@ void TextMetrics::setRowHeight(Row & row, pit_type const pit, FontInfo labelfont = text_->labelFont(par); - FontMetrics const & labelfont_metrics = theFontMetrics(labelfont); - FontMetrics const & fontmetrics = theFontMetrics(font); + FontMetrics const & lfm = theFontMetrics(labelfont); + FontMetrics const & fm = theFontMetrics(font); // these are minimum values double const spacing_val = layout.spacing.getValue() * text_->spacing(par); //lyxerr << "spacing_val = " << spacing_val << endl; - int maxasc = int(fontmetrics.maxAscent() * spacing_val); - int maxdesc = int(fontmetrics.maxDescent() * spacing_val); + int maxasc = int(fm.maxAscent() * spacing_val); + int maxdesc = int(fm.maxDescent() * spacing_val); // insets may be taller CoordCache::Insets const & insetCache = bv_->coordCache().getInsets(); @@ -1016,7 +1018,7 @@ void TextMetrics::setRowHeight(Row & row, pit_type const pit, && (!layout.isParagraphGroup() || text_->isFirstInSequence(pit)) && !par.labelString().empty()) { labeladdon = int( - labelfont_metrics.maxHeight() + lfm.maxHeight() * layout.spacing.getValue() * text_->spacing(par) + (layout.topsep + layout.labelbottomsep) * dh); @@ -1084,7 +1086,7 @@ void TextMetrics::setRowHeight(Row & row, pit_type const pit, // following code in another method specially tailored for the // main Text. The following test is thus bogus. // Top and bottom margin of the document (only at top-level) - if (main_text_ && topBottomSpace) { + if (text_->isMainText() && topBottomSpace) { if (pit == 0 && row.pos() == 0) maxasc += 20; if (pit + 1 == pit_type(pars.size()) && @@ -1111,6 +1113,16 @@ pos_type TextMetrics::getPosNearX(Row const & row, int & x, int const xo = origin_.x_; x -= xo; + int offset = 0; + CursorSlice rowSlice(const_cast(text_->inset())); + rowSlice.pit() = row.pit(); + rowSlice.pos() = row.pos(); + + // Adapt to cursor row scroll offset if applicable. + if (bv_->currentRowSlice() == rowSlice) + offset = bv_->horizScrollOffset(); + x += offset; + pos_type pos = row.pos(); boundary = false; if (row.empty()) @@ -1164,8 +1176,10 @@ pos_type TextMetrics::getPosNearX(Row const & row, int & x, else boundary = row.right_boundary(); } - x += xo; + + x += xo - offset; //LYXERR0("getPosNearX ==> pos=" << pos << ", boundary=" << boundary); + return pos; } @@ -1608,7 +1622,7 @@ void TextMetrics::deleteLineForward(Cursor & cur) text_->cursorForward(cur); } else { cur.resetAnchor(); - cur.setSelection(true); // to avoid deletion + cur.selection(true); // to avoid deletion cursorEnd(cur); cur.setSelection(); // What is this test for ??? (JMarc) @@ -1655,6 +1669,7 @@ int TextMetrics::leftMargin(int max_width, //lyxerr << "TextMetrics::leftMargin: pit: " << pit << " pos: " << pos << endl; DocumentClass const & tclass = buffer.params().documentClass(); Layout const & layout = par.layout(); + FontMetrics const & bfm = theFontMetrics(buffer.params().getFont()); docstring parindent = layout.parindent; @@ -1663,8 +1678,7 @@ int TextMetrics::leftMargin(int max_width, if (text_->isMainText()) l_margin += bv_->leftMargin(); - l_margin += theFontMetrics(buffer.params().getFont()).signedWidth( - tclass.leftmargin()); + l_margin += bfm.signedWidth(tclass.leftmargin()); int depth = par.getDepth(); if (depth != 0) { @@ -1682,8 +1696,7 @@ int TextMetrics::leftMargin(int max_width, buffer.params().paragraph_separation == BufferParams::ParagraphIndentSeparation) { docstring pi = pars[newpar].layout().parindent; - l_margin -= theFontMetrics( - buffer.params().getFont()).signedWidth(pi); + l_margin -= bfm.signedWidth(pi); } } if (tclass.isDefaultLayout(par.layout()) @@ -1712,37 +1725,36 @@ int TextMetrics::leftMargin(int max_width, } FontInfo const labelfont = text_->labelFont(par); - FontMetrics const & labelfont_metrics = theFontMetrics(labelfont); + FontMetrics const & lfm = theFontMetrics(labelfont); switch (layout.margintype) { case MARGIN_DYNAMIC: if (!layout.leftmargin.empty()) { - l_margin += theFontMetrics(buffer.params().getFont()).signedWidth( - layout.leftmargin); + l_margin += bfm.signedWidth(layout.leftmargin); } if (!par.labelString().empty()) { - l_margin += labelfont_metrics.signedWidth(layout.labelindent); - l_margin += labelfont_metrics.width(par.labelString()); - l_margin += labelfont_metrics.width(layout.labelsep); + l_margin += lfm.signedWidth(layout.labelindent); + l_margin += lfm.width(par.labelString()); + l_margin += lfm.width(layout.labelsep); } break; case MARGIN_MANUAL: { - l_margin += labelfont_metrics.signedWidth(layout.labelindent); + l_margin += lfm.signedWidth(layout.labelindent); // The width of an empty par, even with manual label, should be 0 if (!par.empty() && pos >= par.beginOfBody()) { if (!par.getLabelWidthString().empty()) { docstring labstr = par.getLabelWidthString(); - l_margin += labelfont_metrics.width(labstr); - l_margin += labelfont_metrics.width(layout.labelsep); + l_margin += lfm.width(labstr); + l_margin += lfm.width(layout.labelsep); } } break; } case MARGIN_STATIC: { - l_margin += theFontMetrics(buffer.params().getFont()). - signedWidth(layout.leftmargin) * 4 / (par.getDepth() + 4); + l_margin += bfm.signedWidth(layout.leftmargin) * 4 + / (par.getDepth() + 4); break; } @@ -1750,20 +1762,20 @@ int TextMetrics::leftMargin(int max_width, if (layout.labeltype == LABEL_MANUAL) { // if we are at position 0, we are never in the body if (pos > 0 && pos >= par.beginOfBody()) - l_margin += labelfont_metrics.signedWidth(layout.leftmargin); + l_margin += lfm.signedWidth(layout.leftmargin); else - l_margin += labelfont_metrics.signedWidth(layout.labelindent); + l_margin += lfm.signedWidth(layout.labelindent); } else if (pos != 0 // Special case to fix problems with // theorems (JMarc) || (layout.labeltype == LABEL_STATIC && layout.latextype == LATEX_ENVIRONMENT && !text_->isFirstInSequence(pit))) { - l_margin += labelfont_metrics.signedWidth(layout.leftmargin); + l_margin += lfm.signedWidth(layout.leftmargin); } else if (!layout.labelIsAbove()) { - l_margin += labelfont_metrics.signedWidth(layout.labelindent); - l_margin += labelfont_metrics.width(layout.labelsep); - l_margin += labelfont_metrics.width(par.labelString()); + l_margin += lfm.signedWidth(layout.labelindent); + l_margin += lfm.width(layout.labelsep); + l_margin += lfm.width(par.labelString()); } break; @@ -1780,7 +1792,7 @@ int TextMetrics::leftMargin(int max_width, for ( ; rit != end; ++rit) if (rit->fill() < minfill) minfill = rit->fill(); - l_margin += theFontMetrics(buffer.params().getFont()).signedWidth(layout.leftmargin); + l_margin += bfm.signedWidth(layout.leftmargin); l_margin += minfill; #endif // also wrong, but much shorter. @@ -1790,7 +1802,7 @@ int TextMetrics::leftMargin(int max_width, } if (!par.params().leftIndent().zero()) - l_margin += par.params().leftIndent().inPixels(max_width, labelfont_metrics.em()); + l_margin += par.params().leftIndent().inPixels(max_width, lfm.em()); LyXAlignment align; @@ -1824,8 +1836,7 @@ int TextMetrics::leftMargin(int max_width, // the indentation set in the document // settings if (buffer.params().getIndentation().asLyXCommand() == "default") - l_margin += theFontMetrics( - buffer.params().getFont()).signedWidth(parindent); + l_margin += bfm.signedWidth(parindent); else l_margin += buffer.params().getIndentation().inPixels(*bv_); } diff --git a/src/TextMetrics.h b/src/TextMetrics.h index f0abcb5201..eef00ffd4d 100644 --- a/src/TextMetrics.h +++ b/src/TextMetrics.h @@ -35,7 +35,7 @@ class TextMetrics { public: /// Default constructor (only here for STL containers). - TextMetrics() : bv_(0), text_(0), main_text_(false), max_width_(0) {} + TextMetrics() : bv_(0), text_(0), max_width_(0) {} /// The only useful constructor. TextMetrics(BufferView *, Text *); @@ -104,9 +104,6 @@ public: /// current text height. int height() const { return dim_.height(); } - /// - int maxWidth() const { return max_width_; } - /// int rightMargin(ParagraphMetrics const & pm) const; int rightMargin(pit_type const pit) const; @@ -150,7 +147,7 @@ private: public: /// returns the position near the specified x-coordinate of the row. /// x is an absolute screen coord, it is set to the real beginning - /// of this column. + /// of this column. This takes in account horizontal cursor row scrolling. pos_type getPosNearX(Row const & row, int & x, bool & boundary) const; /// returns pos in given par at given x coord. @@ -243,7 +240,6 @@ private: /// \todo FIXME: this should be const. Text * text_; - bool main_text_; /// A map from paragraph index number to paragraph metrics typedef std::map ParMetricsCache; /// diff --git a/src/Toc.h b/src/Toc.h new file mode 100644 index 0000000000..82f7ce1701 --- /dev/null +++ b/src/Toc.h @@ -0,0 +1,43 @@ +// -*- C++ -*- +/** + * \file Toc.h + * This file is part of LyX, the document processor. + * Licence details can be found in the file COPYING. + * + * \author Jean-Marc Lasgouttes + * \author Angus Leeming + * \author Abdelrazak Younes + * \author Guillaume Munch + * + * Full author contact details are available in file CREDITS. + */ + +#ifndef TOC_H +#define TOC_H + +#include "support/shared_ptr.h" + +#include +#include +#include + + +namespace lyx { + +// TocItem is defined in TocBackend.h +class TocItem; + +typedef std::vector Toc; + +class TocList : public std::map > +{ +private: + // TocList should never map to null pointers. + // We forbid the following method which creates null pointers. + using std::map >::operator[]; +}; + + +} // namespace lyx + +#endif // TOC_H diff --git a/src/TocBackend.cpp b/src/TocBackend.cpp index 9bd435f2f2..6526c57537 100644 --- a/src/TocBackend.cpp +++ b/src/TocBackend.cpp @@ -107,21 +107,15 @@ FuncRequest TocItem::action() const // /////////////////////////////////////////////////////////////////////////// -TocIterator Toc::item(DocIterator const & dit) const +Toc::const_iterator TocBackend::findItem(Toc const & toc, + DocIterator const & dit) { - TocIterator last = begin(); - TocIterator it = end(); + Toc::const_iterator last = toc.begin(); + Toc::const_iterator it = toc.end(); if (it == last) return it; - --it; - - DocIterator dit_text = dit; - if (dit_text.inMathed()) { - // We are only interested in text so remove the math CursorSlice. - while (dit_text.inMathed()) - dit_text.pop_back(); - } + DocIterator dit_text = dit.getInnerText(); for (; it != last; --it) { // We verify that we don't compare contents of two @@ -138,12 +132,12 @@ TocIterator Toc::item(DocIterator const & dit) const } -Toc::iterator Toc::item(int depth, docstring const & str) +Toc::iterator TocBackend::findItem(Toc & toc, int depth, docstring const & str) { - if (empty()) - return end(); - iterator it = begin(); - iterator itend = end(); + if (toc.empty()) + return toc.end(); + Toc::iterator it = toc.begin(); + Toc::iterator itend = toc.end(); for (; it != itend; ++it) { if (it->depth() == depth && it->str() == str) break; @@ -185,7 +179,7 @@ void TocBuilder::captionItem(DocIterator const & dit, docstring const & s, arg = "paragraph-goto " + paragraph_goto_arg((*toc_)[stack_.top().pos].dit_) + ";" + arg; FuncRequest func(LFUN_COMMAND_SEQUENCE, arg); - + if (!stack_.empty() && !stack_.top().is_captioned) { // The float we entered has not yet been assigned a caption. // Assign the caption string to it. @@ -286,7 +280,7 @@ bool TocBackend::updateItem(DocIterator const & dit_in) BufferParams const & bufparams = buffer_->params(); const int min_toclevel = bufparams.documentClass().min_toclevel(); - TocIterator toc_item = item("tableofcontents", dit); + Toc::const_iterator toc_item = item("tableofcontents", dit); docstring tocstring; @@ -336,14 +330,14 @@ void TocBackend::update(bool output_active, UpdateType utype) } -TocIterator TocBackend::item(string const & type, - DocIterator const & dit) const +Toc::const_iterator TocBackend::item(string const & type, + DocIterator const & dit) const { TocList::const_iterator toclist_it = tocs_.find(type); // Is the type supported? // We will try to make the best of it in release mode LASSERT(toclist_it != tocs_.end(), toclist_it = tocs_.begin()); - return toclist_it->second->item(dit); + return findItem(*toclist_it->second, dit); } @@ -352,8 +346,8 @@ void TocBackend::writePlaintextTocList(string const & type, { TocList::const_iterator cit = tocs_.find(type); if (cit != tocs_.end()) { - TocIterator ccit = cit->second->begin(); - TocIterator end = cit->second->end(); + Toc::const_iterator ccit = cit->second->begin(); + Toc::const_iterator end = cit->second->end(); for (; ccit != end; ++ccit) { os << ccit->asString() << from_utf8("\n"); if (os.str().size() > max_length) diff --git a/src/TocBackend.h b/src/TocBackend.h index cc5e4292d8..2520927406 100644 --- a/src/TocBackend.h +++ b/src/TocBackend.h @@ -18,14 +18,11 @@ #include "DocIterator.h" #include "FuncRequest.h" #include "OutputEnums.h" +#include "Toc.h" -#include "support/shared_ptr.h" #include "support/strfwd.h" -#include -#include #include -#include namespace lyx { @@ -67,7 +64,6 @@ enum TocType { */ class TocItem { - friend class Toc; friend class TocBackend; friend class TocBuilder; @@ -123,25 +119,6 @@ private: }; -/// -class Toc : public std::vector -{ -public: - // This is needed to work around a libc++ bug - // https://llvm.org/bugs/show_bug.cgi?id=24137 - Toc() {} - typedef std::vector::const_iterator const_iterator; - typedef std::vector::iterator iterator; - const_iterator item(DocIterator const & dit) const; - /// Look for a TocItem given its depth and string. - /// \return The first matching item. - /// \retval end() if no item was found. - iterator item(int depth, docstring const & str); -}; - -typedef Toc::const_iterator TocIterator; - - /// Caption-enabled TOC builders class TocBuilder { @@ -169,16 +146,6 @@ private: }; -/// The ToC list. -/// A class and no typedef because we want to forward declare it. -class TocList : public std::map > -{ -private: - // this can create null pointers - using std::map >::operator[]; -}; - - /// class TocBuilderStore { @@ -200,6 +167,12 @@ private: class TocBackend { public: + static Toc::const_iterator findItem(Toc const & toc, + DocIterator const & dit); + /// Look for a TocItem given its depth and string. + /// \return The first matching item. + /// \retval end() if no item was found. + static Toc::iterator findItem(Toc & toc, int depth, docstring const & str); /// TocBackend(Buffer const * buffer) : buffer_(buffer) {} /// @@ -216,7 +189,7 @@ public: /// nevel null shared_ptr builder(std::string const & type); /// Return the first Toc Item before the cursor - TocIterator item( + Toc::const_iterator item( std::string const & type, ///< Type of Toc. DocIterator const & dit ///< The cursor location in the document. ) const; diff --git a/src/client/Makefile.am b/src/client/Makefile.am index fac0e31bc1..3874376ab4 100644 --- a/src/client/Makefile.am +++ b/src/client/Makefile.am @@ -8,11 +8,12 @@ bin_PROGRAMS = lyxclient EXTRA_DIST = lyxclient.1in CMakeLists.txt -AM_CPPFLAGS += -I$(srcdir)/.. $(BOOST_INCLUDES) +AM_CPPFLAGS += -I$(srcdir)/.. \ + $(BOOST_INCLUDES) $(ICONV_INCLUDES) $(ZLIB_INCLUDES) lyxclient_LDADD = \ $(top_builddir)/src/support/liblyxsupport.a \ - $(BOOST_LIBS) @LIBS@ $(SOCKET_LIBS) \ + $(BOOST_LIBS) @LIBS@ $(ICONV_LIBS) $(ZLIB_LIBS) $(SOCKET_LIBS) \ $(QT_LIB) $(QT_LDFLAGS) $(LIBSHLWAPI) $(LIBPSAPI) if INSTALL_MACOSX @@ -39,7 +40,7 @@ lyxclient.cpp: if MONOLITHIC_CLIENT -AM_CPPFLAGS += -I$(srcdir)/.. $(BOOST_INCLUDES) +AM_CPPFLAGS += -I$(srcdir)/.. $(BOOST_INCLUDES) $(ZLIB_INCLUDES) BUILT_SOURCES = lyxclient.cpp CLEANFILES += lyxclient.cpp diff --git a/src/frontends/Makefile.am b/src/frontends/Makefile.am index aa74e57eca..862613a67f 100644 --- a/src/frontends/Makefile.am +++ b/src/frontends/Makefile.am @@ -6,7 +6,8 @@ DIST_SUBDIRS = qt4 . noinst_LIBRARIES = liblyxfrontends.a -AM_CPPFLAGS += -I$(srcdir)/.. $(BOOST_INCLUDES) +AM_CPPFLAGS += -I$(srcdir)/.. \ + $(BOOST_INCLUDES) $(ICONV_INCLUDES) $(ZLIB_INCLUDES) liblyxfrontends_a_SOURCES = \ alert.h \ @@ -39,7 +40,7 @@ TESTS = \ check_PROGRAMS = \ biblio -biblio_LDADD = $(BOOST_LIBS) +biblio_LDADD = $(BOOST_LIBS) $(ICONV_LIBS) $(ZLIB_LIBS) biblio_SOURCES = \ tests/biblio.cpp \ tests/boost.cpp diff --git a/src/frontends/qt4/FindAndReplace.cpp b/src/frontends/qt4/FindAndReplace.cpp index f40666c39b..ac7084a55b 100644 --- a/src/frontends/qt4/FindAndReplace.cpp +++ b/src/frontends/qt4/FindAndReplace.cpp @@ -12,23 +12,23 @@ #include "FindAndReplace.h" -#include "Lexer.h" #include "GuiApplication.h" #include "GuiView.h" #include "GuiWorkArea.h" #include "qt_helpers.h" -#include "Language.h" #include "Buffer.h" -#include "BufferParams.h" #include "BufferList.h" +#include "BufferParams.h" #include "BufferView.h" -#include "Text.h" -#include "TextClass.h" #include "Cursor.h" #include "FuncRequest.h" +#include "Language.h" +#include "Lexer.h" #include "LyX.h" #include "lyxfind.h" +#include "Text.h" +#include "TextClass.h" #include "frontends/alert.h" diff --git a/src/frontends/qt4/GuiApplication.cpp b/src/frontends/qt4/GuiApplication.cpp index 8b613794df..b3efd78a09 100644 --- a/src/frontends/qt4/GuiApplication.cpp +++ b/src/frontends/qt4/GuiApplication.cpp @@ -553,18 +553,7 @@ QString iconName(FuncRequest const & f, bool unknown) bool getPixmap(QPixmap & pixmap, QString const & path) { - if (pixmap.load(path)) { -#if QT_VERSION >= 0x050000 - if (path.endsWith(".svgz") || path.endsWith(".svg") ) { - GuiApplication const * guiApp = theGuiApp(); - if (guiApp != 0) { - pixmap.setDevicePixelRatio(guiApp->pixelRatio()); - } - } -#endif - return true; - } - return false; + return pixmap.load(path); } @@ -765,8 +754,8 @@ class QWindowsMimeMetafile : public QWINDOWSMIME { public: QWindowsMimeMetafile() {} - bool canConvertFromMime(FORMATETC const & formatetc, - QMimeData const * mimedata) const + bool canConvertFromMime(FORMATETC const & /*formatetc*/, + QMimeData const * /*mimedata*/) const { return false; } @@ -780,14 +769,14 @@ public: return pDataObj->QueryGetData(&formatetc) == S_OK; } - bool convertFromMime(FORMATETC const & formatetc, - const QMimeData * mimedata, STGMEDIUM * pmedium) const + bool convertFromMime(FORMATETC const & /*formatetc*/, + const QMimeData * /*mimedata*/, STGMEDIUM * /*pmedium*/) const { return false; } QVariant convertToMime(QString const & mimetype, IDataObject * pDataObj, - QVariant::Type preferredType) const + QVariant::Type /*preferredType*/) const { QByteArray data; if (!canConvertToMime(mimetype, pDataObj)) @@ -818,7 +807,7 @@ public: QVector formatsForMime(QString const & mimetype, - QMimeData const * mimedata) const + QMimeData const * /*mimedata*/) const { QVector formats; if (mimetype == emfMimeType() || mimetype == wmfMimeType()) @@ -1399,6 +1388,9 @@ void GuiApplication::updateCurrentView(FuncRequest const & cmd, DispatchResult & if (dr.needBufferUpdate()) { bv->cursor().clearBufferUpdate(); bv->buffer().updateBuffer(); + } else if (dr.needChangesUpdate()) { + // updateBuffer() already updates the change-tracking presence flag + bv->buffer().updateChangesPresent(); } // BufferView::update() updates the ViewMetricsInfo and // also initializes the position cache for all insets in diff --git a/src/frontends/qt4/GuiChanges.cpp b/src/frontends/qt4/GuiChanges.cpp index a27d24f580..c168d3591b 100644 --- a/src/frontends/qt4/GuiChanges.cpp +++ b/src/frontends/qt4/GuiChanges.cpp @@ -27,14 +27,13 @@ #include "FuncRequest.h" #include "LyXRC.h" +#include #include namespace lyx { namespace frontend { -using support::bformat; -using support::formatted_time; GuiChanges::GuiChanges(GuiView & lv) : GuiDialog(lv, "changes", qt_("Merge Changes")) @@ -56,16 +55,29 @@ GuiChanges::GuiChanges(GuiView & lv) void GuiChanges::updateContents() { - docstring text; - docstring author = changeAuthor(); - docstring date = changeDate(); + bool const changesPresent = buffer().areChangesPresent(); + nextPB->setEnabled(changesPresent); + previousPB->setEnabled(changesPresent); + changeTB->setEnabled(changesPresent); - if (!author.empty()) - text += bformat(_("Change by %1$s\n\n"), author); - if (!date.empty()) - text += bformat(_("Change made at %1$s\n"), date); + Change const & c = bufferview()->getCurrentChange(); + bool const changePresent = c.type != Change::UNCHANGED; + rejectPB->setEnabled(changePresent); + acceptPB->setEnabled(changePresent); - changeTB->setPlainText(toqstr(text)); + QString text; + if (changePresent) { + QString const author = + toqstr(buffer().params().authors().get(c.author).nameAndEmail()); + if (!author.isEmpty()) + text += qt_("Changed by %1\n\n").arg(author); + + QString const date = QDateTime::fromTime_t(c.changetime) + .toString(Qt::DefaultLocaleLongDate); + if (!date.isEmpty()) + text += qt_("Change made on %1\n").arg(date); + } + changeTB->setPlainText(text); } @@ -81,34 +93,6 @@ void GuiChanges::previousChange() } -docstring GuiChanges::changeDate() const -{ - Change const & c = bufferview()->getCurrentChange(); - if (c.type == Change::UNCHANGED) - return docstring(); - - // FIXME UNICODE - return from_utf8(formatted_time(c.changetime, lyxrc.date_insert_format)); -} - - -docstring GuiChanges::changeAuthor() const -{ - Change const & c = bufferview()->getCurrentChange(); - if (c.type == Change::UNCHANGED) - return docstring(); - - Author const & a = buffer().params().authors().get(c.author); - - docstring author = a.name(); - - if (!a.email().empty()) - author += " (" + a.email() + ")"; - - return author; -} - - void GuiChanges::acceptChange() { dispatch(FuncRequest(LFUN_CHANGE_ACCEPT)); diff --git a/src/frontends/qt4/GuiChanges.h b/src/frontends/qt4/GuiChanges.h index 344f5e5607..1096e6293a 100644 --- a/src/frontends/qt4/GuiChanges.h +++ b/src/frontends/qt4/GuiChanges.h @@ -15,6 +15,8 @@ #include "GuiDialog.h" #include "ui_ChangesUi.h" + +#include "support/debug.h" #include "support/docstring.h" @@ -52,11 +54,6 @@ private: bool isBufferDependent() const { return true; } /// always true since dispatchParams() is empty bool canApply() const { return true; } - - /// return date of change - docstring changeDate() const; - /// return author of change - docstring changeAuthor() const; }; } // namespace frontend diff --git a/src/frontends/qt4/GuiCommandBuffer.cpp b/src/frontends/qt4/GuiCommandBuffer.cpp index 9880e2b996..b3f56c7444 100644 --- a/src/frontends/qt4/GuiCommandBuffer.cpp +++ b/src/frontends/qt4/GuiCommandBuffer.cpp @@ -225,7 +225,6 @@ void GuiCommandBuffer::itemSelected(QListWidgetItem * item) void GuiCommandBuffer::up() { - string const input = fromqstr(edit_->text()); string const h = historyUp(); if (!h.empty()) @@ -238,7 +237,6 @@ void GuiCommandBuffer::up() void GuiCommandBuffer::down() { - string const input = fromqstr(edit_->text()); string const h = historyDown(); if (!h.empty()) diff --git a/src/frontends/qt4/GuiPainter.cpp b/src/frontends/qt4/GuiPainter.cpp index 495a11a8a6..5329624a6a 100644 --- a/src/frontends/qt4/GuiPainter.cpp +++ b/src/frontends/qt4/GuiPainter.cpp @@ -579,7 +579,7 @@ void GuiPainter::buttonText(int x, int y, docstring const & str, static int const d = Inset::TEXT_TO_INSET_OFFSET / 2; - button(x + d, y - ascent, width - d, descent + ascent, mouseHover); + button(x + d, y - ascent, width - Inset::TEXT_TO_INSET_OFFSET, descent + ascent, mouseHover); text(x + Inset::TEXT_TO_INSET_OFFSET, y, str, font); } diff --git a/src/frontends/qt4/GuiSpellchecker.cpp b/src/frontends/qt4/GuiSpellchecker.cpp index aa62a9a448..24aa43d683 100644 --- a/src/frontends/qt4/GuiSpellchecker.cpp +++ b/src/frontends/qt4/GuiSpellchecker.cpp @@ -337,9 +337,9 @@ void SpellcheckerWidget::Private::setSelection( Cursor & bvcur = bv->cursor(); bvcur.setCursor(from); bvcur.clearSelection(); - bvcur.setSelection(true); + bvcur.selection(true); bvcur.setCursor(end); - bvcur.setSelection(true); + bvcur.selection(true); } else { // FIXME LFUN // If we used a LFUN, dispatch would do all of this for us diff --git a/src/frontends/qt4/GuiToc.cpp b/src/frontends/qt4/GuiToc.cpp index f603c56716..48349fcfa5 100644 --- a/src/frontends/qt4/GuiToc.cpp +++ b/src/frontends/qt4/GuiToc.cpp @@ -50,7 +50,6 @@ GuiToc::~GuiToc() void GuiToc::updateView() { widget_->updateView(); - return; } @@ -66,9 +65,12 @@ void GuiToc::dispatchParams() } -void GuiToc::enableView(bool /*enable*/) +void GuiToc::enableView(bool enable) { - widget_->updateViewForce(); + widget_->checkModelChanged(); + if (!enable) + // In the opposite case, updateView() will be called anyway. + widget_->updateViewNow(); } diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp index 8133ac246f..6bfcdcb032 100644 --- a/src/frontends/qt4/GuiView.cpp +++ b/src/frontends/qt4/GuiView.cpp @@ -1552,8 +1552,11 @@ void GuiView::updateToolbars() context |= Toolbars::MATH; if (lyx::getStatus(FuncRequest(LFUN_LAYOUT_TABULAR)).enabled()) context |= Toolbars::TABLE; - if (lyx::getStatus(FuncRequest(LFUN_CHANGES_TRACK)).enabled() - && lyx::getStatus(FuncRequest(LFUN_CHANGES_TRACK)).onOff(true)) + if (currentBufferView()->buffer().areChangesPresent() + || (lyx::getStatus(FuncRequest(LFUN_CHANGES_TRACK)).enabled() + && lyx::getStatus(FuncRequest(LFUN_CHANGES_TRACK)).onOff(true)) + || (lyx::getStatus(FuncRequest(LFUN_CHANGES_OUTPUT)).enabled() + && lyx::getStatus(FuncRequest(LFUN_CHANGES_OUTPUT)).onOff(true))) context |= Toolbars::REVIEW; if (lyx::getStatus(FuncRequest(LFUN_IN_MATHMACROTEMPLATE)).enabled()) context |= Toolbars::MATHMACROTEMPLATE; diff --git a/src/frontends/qt4/LyXToolBox.cpp b/src/frontends/qt4/LyXToolBox.cpp index 4e754f98ab..110efa6bed 100644 --- a/src/frontends/qt4/LyXToolBox.cpp +++ b/src/frontends/qt4/LyXToolBox.cpp @@ -10,7 +10,6 @@ */ #include - #include "LyXToolBox.h" #include diff --git a/src/frontends/qt4/Makefile.am b/src/frontends/qt4/Makefile.am index 2995a41729..fb21eb692e 100644 --- a/src/frontends/qt4/Makefile.am +++ b/src/frontends/qt4/Makefile.am @@ -47,7 +47,8 @@ AM_CPPFLAGS += \ -I$(top_srcdir)/src \ -I$(top_srcdir)/src/frontends \ -I$(top_srcdir)/images \ - $(QT_INCLUDES) $(BOOST_INCLUDES) + $(QT_INCLUDES) \ + $(BOOST_INCLUDES) $(ICONV_INCLUDES) $(ZLIB_INCLUDES) SOURCEFILES = \ ButtonPolicy.cpp \ diff --git a/src/frontends/qt4/TocModel.cpp b/src/frontends/qt4/TocModel.cpp index 7b4a38b223..7654983f09 100644 --- a/src/frontends/qt4/TocModel.cpp +++ b/src/frontends/qt4/TocModel.cpp @@ -133,7 +133,8 @@ QModelIndex TocModel::modelIndex(DocIterator const & dit) const if (toc_->empty()) return QModelIndex(); - unsigned int const toc_index = toc_->item(dit) - toc_->begin(); + unsigned int const toc_index = TocBackend::findItem(*toc_, dit) - + toc_->begin(); QModelIndexList list = model()->match(model()->index(0, 0), Qt::UserRole, QVariant(toc_index), 1, @@ -329,10 +330,10 @@ TocItem const TocModels::currentItem(QString const & type, return TocItem(); } LASSERT(index.model() == it.value()->model(), return TocItem()); - + return it.value()->tocItem(index); } - + void TocModels::updateItem(QString const & type, DocIterator const & dit) { diff --git a/src/frontends/qt4/TocModel.h b/src/frontends/qt4/TocModel.h index 4d4d442719..c959aba556 100644 --- a/src/frontends/qt4/TocModel.h +++ b/src/frontends/qt4/TocModel.h @@ -12,6 +12,8 @@ #ifndef TOCMODEL_H #define TOCMODEL_H +#include "Toc.h" + #include "support/shared_ptr.h" #include @@ -22,8 +24,6 @@ namespace lyx { class Buffer; class BufferView; class DocIterator; -class Toc; -class TocItem; namespace frontend { diff --git a/src/frontends/qt4/TocWidget.cpp b/src/frontends/qt4/TocWidget.cpp index bb15f31e2b..ff929c08f7 100644 --- a/src/frontends/qt4/TocWidget.cpp +++ b/src/frontends/qt4/TocWidget.cpp @@ -35,20 +35,18 @@ #include #include -#include #include -#define DELAY_UPDATE_VIEW - using namespace std; namespace lyx { namespace frontend { TocWidget::TocWidget(GuiView & gui_view, QWidget * parent) - : QWidget(parent), depth_(0), persistent_(false), gui_view_(gui_view), update_delay_(0) - + : QWidget(parent), depth_(0), persistent_(false), gui_view_(gui_view), + update_timer_short_(new QTimer(this)), + update_timer_long_(new QTimer(this)) { setupUi(this); @@ -86,9 +84,26 @@ TocWidget::TocWidget(GuiView & gui_view, QWidget * parent) this, SLOT(showContextMenu(const QPoint &))); connect(tocTV, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(showContextMenu(const QPoint &))); - connect(filterLE, SIGNAL(textEdited(QString)), + connect(filterLE, SIGNAL(textEdited(QString)), this, SLOT(filterContents())); + // setting the update timer + update_timer_short_->setSingleShot(true); + update_timer_long_->setSingleShot(true); + update_timer_short_->setInterval(0); + update_timer_long_->setInterval(2000); + connect(update_timer_short_, SIGNAL(timeout()), + this, SLOT(realUpdateView())); + connect(update_timer_long_, SIGNAL(timeout()), + this, SLOT(realUpdateView())); + + // fix #9826: Outline disclosure of subsection content disappears one second + // after doubleclicking content item. + // This is only meant as a workaround. See #6675 for more general issues + // regarding unwanted collapse of the tree view. + connect(tocTV, SIGNAL(expanded(const QModelIndex &)), + update_timer_long_, SLOT(stop())); + init(QString()); } @@ -98,7 +113,7 @@ void TocWidget::showContextMenu(const QPoint & pos) std::string name = "context-toc-" + fromqstr(current_type_); QMenu * menu = guiApp->menus().menu(toqstr(name), gui_view_); if (!menu) - return; + return; menu->exec(mapToGlobal(pos)); } @@ -109,9 +124,9 @@ Inset * TocWidget::itemInset() const TocItem const & item = gui_view_.tocModels().currentItem(current_type_, index); DocIterator const & dit = item.dit(); - + Inset * inset = 0; - if (current_type_ == "label" + if (current_type_ == "label" || current_type_ == "graphics" || current_type_ == "citation" || current_type_ == "child") @@ -120,7 +135,7 @@ Inset * TocWidget::itemInset() const else if (current_type_ == "branch" || current_type_ == "index" || current_type_ == "change" - || current_type_ == "table" + || current_type_ == "table" || current_type_ == "listing" || current_type_ == "figure") inset = &dit.inset(); @@ -256,7 +271,7 @@ void TocWidget::on_updateTB_clicked() void TocWidget::on_sortCB_stateChanged(int state) { gui_view_.tocModels().sort(current_type_, state == Qt::Checked); - updateViewForce(); + updateViewNow(); } @@ -308,7 +323,7 @@ void TocWidget::on_typeCO_currentIndexChanged(int index) if (index == -1) return; current_type_ = typeCO->itemData(index).toString(); - updateViewForce(); + updateViewNow(); if (typeCO->hasFocus()) gui_view_.setFocus(); } @@ -380,27 +395,26 @@ void TocWidget::enableControls(bool enable) void TocWidget::updateView() { -// Enable if you dont want the delaying business, cf #7138. -#ifndef DELAY_UPDATE_VIEW - updateViewForce(); - return; -#endif - // already scheduled? - if (update_delay_ == -1) - return; - QTimer::singleShot(update_delay_, this, SLOT(updateViewForce())); // Subtler optimization for having the delay more UI invisible. // We trigger update immediately for sparse editation actions, // i.e. there was no editation/cursor movement in last 2 sec. // At worst there will be +1 redraw after 2s in a such "calm" mode. - if (update_delay_ != 0) - updateViewForce(); - update_delay_ = -1; + if (!update_timer_long_->isActive()) + update_timer_short_->start(); + // resets the timer to trigger after 2s + update_timer_long_->start(); } -void TocWidget::updateViewForce() + +void TocWidget::updateViewNow() +{ + update_timer_long_->stop(); + update_timer_short_->start(); +} + + +void TocWidget::realUpdateView() { - update_delay_ = 2000; if (!gui_view_.documentBufferView()) { tocTV->setModel(0); depthSL->setMaximum(0); @@ -415,7 +429,7 @@ void TocWidget::updateViewForce() tocTV->setEnabled(false); tocTV->setUpdatesEnabled(false); - QAbstractItemModel * toc_model = + QAbstractItemModel * toc_model = gui_view_.tocModels().model(current_type_); if (tocTV->model() != toc_model) { tocTV->setModel(toc_model); @@ -452,6 +466,14 @@ void TocWidget::updateViewForce() } +void TocWidget::checkModelChanged() +{ + if (!gui_view_.documentBufferView() || + gui_view_.tocModels().model(current_type_) != tocTV->model()) + realUpdateView(); +} + + void TocWidget::filterContents() { if (!tocTV->model()) @@ -470,7 +492,7 @@ void TocWidget::filterContents() filterLE->text(), Qt::CaseInsensitive); tocTV->setRowHidden(index.row(), index.parent(), !matches); } - // recursively unhide parents of unhidden children + // recursively unhide parents of unhidden children for (int i = size - 1; i >= 0; i--) { QModelIndex index = indices[i]; if (!tocTV->isRowHidden(index.row(), index.parent()) @@ -520,9 +542,6 @@ void TocWidget::init(QString const & str) typeCO->blockSignals(true); typeCO->setCurrentIndex(new_index); typeCO->blockSignals(false); - - // no delay when the whole outliner is reseted. - update_delay_ = 0; } } // namespace frontend diff --git a/src/frontends/qt4/TocWidget.h b/src/frontends/qt4/TocWidget.h index 608920a42a..ec1d5ad264 100644 --- a/src/frontends/qt4/TocWidget.h +++ b/src/frontends/qt4/TocWidget.h @@ -18,6 +18,7 @@ #include "Cursor.h" #include "FuncCode.h" +#include #include class QModelIndex; @@ -42,12 +43,14 @@ public: /// bool getStatus(Cursor & cur, FuncRequest const & fr, FuncStatus & status) const; + // update the view when the model has changed + void checkModelChanged(); public Q_SLOTS: - /// Schedule new update of the display unless already scheduled. + /// Schedule an update of the dialog after a delay void updateView(); - /// Update the display of the dialog whilst it is still visible. - void updateViewForce(); + /// Schedule an update of the dialog immediately + void updateViewNow(); protected Q_SLOTS: /// @@ -70,19 +73,23 @@ protected Q_SLOTS: void showContextMenu(const QPoint & pos); +private Q_SLOTS: + /// Update the display of the dialog + void realUpdateView(); + private: /// void enableControls(bool enable = true); /// - bool canOutline() + bool canOutline() { return current_type_ == "tableofcontents"; } /// It is not possible to have synchronous navigation in a correct /// and efficient way with the label and change type because Toc::item() /// does a linear search. Even when fixed, it might even not be desirable /// to do so if we want to support drag&drop of labels and references. - bool canNavigate() + bool canNavigate() { return current_type_ != "label" && current_type_ != "change"; } - /// + /// bool isSortable() { return current_type_ != "tableofcontents"; } /// @@ -101,8 +108,12 @@ private: bool persistent_; /// GuiView & gui_view_; - // next delay for outliner update in ms. -1 when already scheduled. - int update_delay_; + // Timers for scheduling updates: one immediately and one after a delay. + // This is according to the logic of the previous code: when at rest, the + // update is carried out immediately, and when an update was done recently, + // we schedule an update to occur 2s after resting. + QTimer * update_timer_short_; + QTimer * update_timer_long_; }; } // namespace frontend diff --git a/src/frontends/qt4/qt_helpers.cpp b/src/frontends/qt4/qt_helpers.cpp index c1294e56df..71498e865c 100644 --- a/src/frontends/qt4/qt_helpers.cpp +++ b/src/frontends/qt4/qt_helpers.cpp @@ -51,7 +51,6 @@ // for FileFilter. // FIXME: Remove #include "support/regex.h" -#include using namespace std; @@ -464,16 +463,12 @@ struct Filter Filter::Filter(docstring const & description, string const & globs) : desc_(description) { - typedef boost::tokenizer > Tokenizer; - boost::char_separator const separator(" "); - // Given " ... *.{abc,def} ", expand to // " ... *.abc *.def " string const expanded_globs = convert_brace_glob(globs); // Split into individual globs. - Tokenizer const tokens(expanded_globs, separator); - globs_ = vector(tokens.begin(), tokens.end()); + globs_ = getVectorFromString(expanded_globs, " "); } @@ -488,11 +483,7 @@ QString Filter::toString() const s += " ("; } - for (size_t i = 0; i != globs_.size(); ++i) { - if (i > 0) - s += ' '; - s += toqstr(globs_[i]); - } + s += toqstr(getStringFromVector(globs_, " ")); if (has_description) s += ')'; diff --git a/src/insets/InsetGraphicsParams.cpp b/src/insets/InsetGraphicsParams.cpp index 03ca0d6287..b7ea377f42 100644 --- a/src/insets/InsetGraphicsParams.cpp +++ b/src/insets/InsetGraphicsParams.cpp @@ -191,7 +191,6 @@ bool InsetGraphicsParams::Read(Lexer & lex, string const & token, lyxscale = lex.getInteger(); } else if (token == "display") { lex.next(); - string const type = lex.getString(); display = lex.getString() != "false"; } else if (token == "scale") { lex.next(); diff --git a/src/insets/InsetNewpage.cpp b/src/insets/InsetNewpage.cpp index 5e98428fcd..418bf8b361 100644 --- a/src/insets/InsetNewpage.cpp +++ b/src/insets/InsetNewpage.cpp @@ -212,13 +212,15 @@ ColorCode InsetNewpage::ColorName() const } -void InsetNewpage::latex(otexstream & os, OutputParams const &) const +void InsetNewpage::latex(otexstream & os, OutputParams const & runparams) const { switch (params_.kind) { case InsetNewpageParams::NEWPAGE: os << "\\newpage{}"; break; case InsetNewpageParams::PAGEBREAK: + if (runparams.moving_arg) + os << "\\protect"; os << "\\pagebreak{}"; break; case InsetNewpageParams::CLEARPAGE: diff --git a/src/insets/InsetScript.cpp b/src/insets/InsetScript.cpp index f8aae1e0c5..bee4c541cf 100644 --- a/src/insets/InsetScript.cpp +++ b/src/insets/InsetScript.cpp @@ -263,8 +263,6 @@ bool InsetScript::getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus & flag) const { switch (cmd.action()) { - case LFUN_LAYOUT: - case LFUN_LAYOUT_PARAGRAPH: case LFUN_MATH_DISPLAY: case LFUN_BOX_INSERT: case LFUN_BRANCH_INSERT: diff --git a/src/insets/InsetScript.h b/src/insets/InsetScript.h index decfee37ae..11864d305c 100644 --- a/src/insets/InsetScript.h +++ b/src/insets/InsetScript.h @@ -80,6 +80,10 @@ public: /// void read(Lexer & lex); /// + bool forcePlainLayout(idx_type = 0) const { return true; } + /// + bool allowParagraphCustomization(idx_type = 0) const { return false; } + /// bool neverIndent() const { return true; } /// int plaintext(odocstringstream & ods, OutputParams const & op, diff --git a/src/insets/InsetTOC.h b/src/insets/InsetTOC.h index bd6ba17973..7801f439ad 100644 --- a/src/insets/InsetTOC.h +++ b/src/insets/InsetTOC.h @@ -14,11 +14,12 @@ #include "InsetCommand.h" +#include "Toc.h" + namespace lyx { class Paragraph; -class Toc; /// Used to insert table of contents and similar lists /// at present, supports only \tableofcontents and \listoflistings. diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp index ac63676369..6477ef3fe6 100644 --- a/src/insets/InsetTabular.cpp +++ b/src/insets/InsetTabular.cpp @@ -3413,13 +3413,6 @@ bool InsetTableCell::getStatus(Cursor & cur, FuncRequest const & cmd, { bool enabled = true; switch (cmd.action()) { - case LFUN_LAYOUT: - enabled = !forcePlainLayout(); - break; - case LFUN_LAYOUT_PARAGRAPH: - enabled = allowParagraphCustomization(); - break; - case LFUN_MATH_DISPLAY: if (!hasFixedWidth()) { enabled = false; @@ -3997,7 +3990,7 @@ void InsetTabular::doDispatch(Cursor & cur, FuncRequest & cmd) cur.idx() = tabular.getLastCellInRow(r); cur.pit() = cur.lastpit(); cur.pos() = cur.lastpos(); - cur.setSelection(true); + cur.selection(true); bvcur = cur; rowselect_ = true; break; @@ -4012,7 +4005,7 @@ void InsetTabular::doDispatch(Cursor & cur, FuncRequest & cmd) cur.idx() = tabular.cellIndex(tabular.nrows() - 1, c); cur.pit() = cur.lastpit(); cur.pos() = cur.lastpos(); - cur.setSelection(true); + cur.selection(true); bvcur = cur; colselect_ = true; break; @@ -4045,7 +4038,7 @@ void InsetTabular::doDispatch(Cursor & cur, FuncRequest & cmd) cur.pit() = 0; cur.pos() = 0; bvcur.setCursor(cur); - bvcur.setSelection(true); + bvcur.selection(true); break; } // select (additional) column @@ -4057,7 +4050,7 @@ void InsetTabular::doDispatch(Cursor & cur, FuncRequest & cmd) cur.pit() = 0; cur.pos() = 0; bvcur.setCursor(cur); - bvcur.setSelection(true); + bvcur.selection(true); break; } // only update if selection changes @@ -4066,7 +4059,7 @@ void InsetTabular::doDispatch(Cursor & cur, FuncRequest & cmd) cur.noScreenUpdate(); setCursorFromCoordinates(cur, cmd.x(), cmd.y()); bvcur.setCursor(cur); - bvcur.setSelection(true); + bvcur.selection(true); // if this is a multicell selection, we just set the cursor to // the beginning of the cell's text. if (bvcur.selIsMultiCell()) { @@ -4083,12 +4076,12 @@ void InsetTabular::doDispatch(Cursor & cur, FuncRequest & cmd) case LFUN_CELL_BACKWARD: movePrevCell(cur); - cur.setSelection(false); + cur.selection(false); break; case LFUN_CELL_FORWARD: moveNextCell(cur); - cur.setSelection(false); + cur.selection(false); break; case LFUN_CHAR_FORWARD_SELECT: @@ -5186,7 +5179,7 @@ int InsetTabular::dist(BufferView & bv, idx_type const cell, int x, int y) const Inset * InsetTabular::editXY(Cursor & cur, int x, int y) { //lyxerr << "InsetTabular::editXY: " << this << endl; - cur.setSelection(false); + cur.selection(false); cur.push(*this); cur.idx() = getNearestCell(cur.bv(), x, y); return cur.bv().textMetrics(&cell(cur.idx())->text()).editXY(cur, x, y); @@ -5545,7 +5538,7 @@ void InsetTabular::tabularFeatures(Cursor & cur, cur.idx() = tabular.cellIndex(sel_row_start, column); cur.pit() = 0; cur.pos() = 0; - cur.setSelection(false); + cur.selection(false); break; case Tabular::DELETE_COLUMN: @@ -5568,7 +5561,7 @@ void InsetTabular::tabularFeatures(Cursor & cur, cur.idx() = tabular.cellIndex(row, sel_col_start); cur.pit() = 0; cur.pos() = 0; - cur.setSelection(false); + cur.selection(false); break; case Tabular::COPY_ROW: @@ -5684,7 +5677,7 @@ void InsetTabular::tabularFeatures(Cursor & cur, tabular.rightLine(cur.selEnd().idx())); cur.pit() = 0; cur.pos() = 0; - cur.setSelection(false); + cur.selection(false); break; } @@ -5741,7 +5734,7 @@ void InsetTabular::tabularFeatures(Cursor & cur, tabular.getAlignment(cur.selEnd().idx())); cur.pit() = 0; cur.pos() = 0; - cur.setSelection(false); + cur.selection(false); break; } @@ -5946,7 +5939,7 @@ void InsetTabular::tabularFeatures(Cursor & cur, cur.idx() = tabular.setLTCaption(row, true); cur.pit() = 0; cur.pos() = 0; - cur.setSelection(false); + cur.selection(false); // If a row is set as caption, then also insert // a caption. Otherwise the LaTeX output is broken. // Select cell if it is non-empty @@ -5962,7 +5955,7 @@ void InsetTabular::tabularFeatures(Cursor & cur, cur.idx() = tabular.setLTCaption(row, false); cur.pit() = 0; cur.pos() = 0; - cur.setSelection(false); + cur.selection(false); FuncRequest fr(LFUN_INSET_DISSOLVE, "caption"); if (lyx::getStatus(fr).enabled()) lyx::dispatch(fr); diff --git a/src/insets/InsetText.cpp b/src/insets/InsetText.cpp index 80b0bac013..53115277a1 100644 --- a/src/insets/InsetText.cpp +++ b/src/insets/InsetText.cpp @@ -250,7 +250,7 @@ void InsetText::edit(Cursor & cur, bool front, EntryDirection entry_from) pos = temp_cur.pos(); } - text_.setCursor(cur.top(), pit, pos); + cur.top().setPitPos(pit, pos); cur.finishUndo(); } @@ -290,10 +290,11 @@ void InsetText::doDispatch(Cursor & cur, FuncRequest & cmd) break; case LFUN_INSET_DISSOLVE: { - bool const main_inset = &buffer().inset() == this; + bool const main_inset = text_.isMainText(); bool const target_inset = cmd.argument().empty() || cmd.getArg(0) == insetName(lyxCode()); - bool const one_cell = nargs() == 1; + // cur.inset() is the tabular when this is a single cell (bug #9954) + bool const one_cell = cur.inset().nargs() == 1; if (!main_inset && target_inset && one_cell) { // Text::dissolveInset assumes that the cursor @@ -322,10 +323,11 @@ bool InsetText::getStatus(Cursor & cur, FuncRequest const & cmd, { switch (cmd.action()) { case LFUN_INSET_DISSOLVE: { - bool const main_inset = &buffer().inset() == this; + bool const main_inset = text_.isMainText(); bool const target_inset = cmd.argument().empty() || cmd.getArg(0) == insetName(lyxCode()); - bool const one_cell = nargs() == 1; + // cur.inset() is the tabular when this is a single cell (bug #9954) + bool const one_cell = cur.inset().nargs() == 1; if (target_inset) status.setEnabled(!main_inset && one_cell); @@ -338,7 +340,7 @@ bool InsetText::getStatus(Cursor & cur, FuncRequest const & cmd, status.setEnabled(false); return true; } - if (&buffer().inset() == this || !cur.paragraph().layout().args().empty()) + if (text_.isMainText() || !cur.paragraph().layout().args().empty()) return text_.getStatus(cur, cmd, status); Layout::LaTeXArgMap args = getLayout().args(); diff --git a/src/insets/RenderButton.cpp b/src/insets/RenderButton.cpp index 06fc653da7..ee1b1f44cd 100644 --- a/src/insets/RenderButton.cpp +++ b/src/insets/RenderButton.cpp @@ -51,7 +51,6 @@ void RenderButton::metrics(MetricsInfo &, Dimension & dim) const else fm.rectText(text_, dim.wid, dim.asc, dim.des); - dim.wid += 2; dim_ = dim; } @@ -64,9 +63,9 @@ void RenderButton::draw(PainterInfo & pi, int x, int y) const font.decSize(); if (editable_) { - pi.pain.buttonText(x + 1, y, text_, font, renderState()); + pi.pain.buttonText(x, y, text_, font, renderState()); } else { - pi.pain.rectText(x + 1, y, text_, font, + pi.pain.rectText(x, y, text_, font, Color_commandbg, Color_commandframe); } } diff --git a/src/insets/RenderPreview.h b/src/insets/RenderPreview.h index cc7a4b6928..83febb3bb9 100644 --- a/src/insets/RenderPreview.h +++ b/src/insets/RenderPreview.h @@ -28,7 +28,6 @@ namespace lyx { class Buffer; -class LyXRC_PreviewStatus; class MetricsInfo; class PainterInfo; diff --git a/src/mathed/InsetMath.h b/src/mathed/InsetMath.h index deb6915e9a..088fce6c2b 100644 --- a/src/mathed/InsetMath.h +++ b/src/mathed/InsetMath.h @@ -85,11 +85,9 @@ class MaximaStream; class MathematicaStream; class MathStream; class WriteStream; -class InfoStream; class MathMacroTemplate; class MathMacro; -class MathPosFinder; class Cursor; class TextPainter; class TextMetricsInfo; @@ -164,8 +162,12 @@ public: /// identifies things that can get scripts virtual bool isScriptable() const { return false; } - /// is the a relational operator (used for splitting equations) - virtual bool isRelOp() const { return false; } + /// identifies a binary operators (used for spacing) + virtual bool isMathBin() const { return false; } + /// identifies relational operators (used for spacing and splitting equations) + virtual bool isMathRel() const { return false; } + /// identifies punctuation (used for spacing) + virtual bool isMathPunct() const { return false; } /// will this get written as a single block in {..} virtual bool extraBraces() const { return false; } diff --git a/src/mathed/InsetMathChar.cpp b/src/mathed/InsetMathChar.cpp index 713e1353e6..2879ac91fc 100644 --- a/src/mathed/InsetMathChar.cpp +++ b/src/mathed/InsetMathChar.cpp @@ -26,7 +26,6 @@ #include "support/debug.h" #include "support/lstrings.h" -#include "support/lyxlib.h" #include "support/textutils.h" @@ -35,12 +34,6 @@ namespace lyx { extern bool has_math_fonts; -static bool isBinaryOp(char_type c) -{ - return support::contains("+-<>=/*", static_cast(c)); -} - - static bool slanted(char_type c) { return isAlphaASCII(c) || Encodings::isMathAlpha(c); @@ -76,11 +69,15 @@ void InsetMathChar::metrics(MetricsInfo & mi, Dimension & dim) const dim = fm.dimension(char_); kerning_ = fm.rbearing(char_) - dim.wid; } - int const em = mathed_font_em(mi.base.font); - if (isBinaryOp(char_)) - dim.wid += support::iround(0.5 * em); + if (isMathBin()) + dim.wid += 2 * mathed_medmuskip(mi.base.font); + else if (isMathRel()) + dim.wid += 2 * mathed_thickmuskip(mi.base.font); + else if (isMathPunct()) + dim.wid += mathed_thinmuskip(mi.base.font); else if (char_ == '\'') - dim.wid += support::iround(0.1667 * em); + // FIXME: don't know where this is coming from + dim.wid += mathed_thinmuskip(mi.base.font); #else whichFont(font_, code_, mi); dim = theFontMetrics(font_).dimension(char_); @@ -94,11 +91,12 @@ void InsetMathChar::metrics(MetricsInfo & mi, Dimension & dim) const void InsetMathChar::draw(PainterInfo & pi, int x, int y) const { //lyxerr << "drawing '" << char_ << "' font: " << pi.base.fontname << std::endl; - int const em = mathed_font_em(pi.base.font); - if (isBinaryOp(char_)) - x += support::iround(0.25 * em); + if (isMathBin()) + x += mathed_medmuskip(pi.base.font); + else if (isMathRel()) + x += mathed_thickmuskip(pi.base.font); else if (char_ == '\'') - x += support::iround(0.0833 * em); + x += mathed_thinmuskip(pi.base.font) / 2; #if 1 if (char_ == '=' && has_math_fonts) { FontSetChanger dummy(pi.base, "cmr"); @@ -237,9 +235,21 @@ void InsetMathChar::htmlize(HtmlStream & ms) const } -bool InsetMathChar::isRelOp() const +bool InsetMathChar::isMathBin() const { - return char_ == '=' || char_ == '<' || char_ == '>'; + return support::contains("+-*", static_cast(char_)); +} + + +bool InsetMathChar::isMathRel() const +{ + return support::contains("<>=:", static_cast(char_)); +} + + +bool InsetMathChar::isMathPunct() const +{ + return support::contains(",;", static_cast(char_)); } diff --git a/src/mathed/InsetMathChar.h b/src/mathed/InsetMathChar.h index 65fac82fff..67bbc64e8c 100644 --- a/src/mathed/InsetMathChar.h +++ b/src/mathed/InsetMathChar.h @@ -49,7 +49,11 @@ public: /// char_type getChar() const { return char_; } /// - bool isRelOp() const; + bool isMathBin() const; + /// + bool isMathRel() const; + /// + bool isMathPunct() const; /// InsetCode lyxCode() const { return MATH_CHAR_CODE; } diff --git a/src/mathed/InsetMathDelim.cpp b/src/mathed/InsetMathDelim.cpp index 8e8b6e295b..b10d37ad69 100644 --- a/src/mathed/InsetMathDelim.cpp +++ b/src/mathed/InsetMathDelim.cpp @@ -115,7 +115,7 @@ void InsetMathDelim::metrics(MetricsInfo & mi, Dimension & dim) const dw_ = 8; if (dw_ < 4) dw_ = 4; - dim.wid = dim0.width() + 2 * dw_ + 8; + dim.wid = dim0.width() + 2 * dw_ + 2 * mathed_thinmuskip(mi.base.font); dim.asc = max(a0, d0) + h0; dim.des = max(a0, d0) - h0; } @@ -125,9 +125,10 @@ void InsetMathDelim::draw(PainterInfo & pi, int x, int y) const { Dimension const dim = dimension(*pi.base.bv); int const b = y - dim.asc; - cell(0).draw(pi, x + dw_ + 4, y); - mathed_draw_deco(pi, x + 4, b, dw_, dim.height(), left_); - mathed_draw_deco(pi, x + dim.width() - dw_ - 4, + int const skip = mathed_thinmuskip(pi.base.font); + cell(0).draw(pi, x + dw_ + skip, y); + mathed_draw_deco(pi, x + skip, b, dw_, dim.height(), left_); + mathed_draw_deco(pi, x + dim.width() - dw_ - skip, b, dw_, dim.height(), right_); setPosCache(pi, x, y); } diff --git a/src/mathed/InsetMathGrid.cpp b/src/mathed/InsetMathGrid.cpp index 3d120a5da8..b505886586 100644 --- a/src/mathed/InsetMathGrid.cpp +++ b/src/mathed/InsetMathGrid.cpp @@ -1416,7 +1416,7 @@ void InsetMathGrid::doDispatch(Cursor & cur, FuncRequest & cmd) case LFUN_CELL_BACKWARD: // See below. - cur.setSelection(false); + cur.selection(false); if (!idxPrev(cur)) { cmd = FuncRequest(LFUN_FINISHED_BACKWARD); cur.undispatched(); @@ -1426,7 +1426,7 @@ void InsetMathGrid::doDispatch(Cursor & cur, FuncRequest & cmd) case LFUN_CELL_FORWARD: // Can't handle selection by additional 'shift' as this is // hard bound to LFUN_CELL_BACKWARD - cur.setSelection(false); + cur.selection(false); if (!idxNext(cur)) { cmd = FuncRequest(LFUN_FINISHED_FORWARD); cur.undispatched(); diff --git a/src/mathed/InsetMathHull.cpp b/src/mathed/InsetMathHull.cpp index e684d237f5..34955147e2 100644 --- a/src/mathed/InsetMathHull.cpp +++ b/src/mathed/InsetMathHull.cpp @@ -106,7 +106,7 @@ namespace { size_t firstRelOp(MathData const & ar) { for (MathData::const_iterator it = ar.begin(); it != ar.end(); ++it) - if ((*it)->isRelOp()) + if ((*it)->isMathRel()) return it - ar.begin(); return ar.size(); } @@ -750,9 +750,7 @@ void InsetMathHull::preparePreview(DocIterator const & pos, macro_preamble.append(*it); // set the font series and size for this snippet - DocIterator dit = pos; - while (dit.inMathed()) - dit.pop_back(); + DocIterator dit = pos.getInnerText(); Paragraph const & par = dit.paragraph(); Font font = par.getFontSettings(buffer->params(), dit.pos()); font.fontInfo().realize(par.layout().font); @@ -1097,7 +1095,7 @@ void InsetMathHull::footer_write(WriteStream & os) const } -bool InsetMathHull::isTable() const +bool InsetMathHull::allowsTabularFeatures() const { switch (type_) { case hullEqnArray: @@ -1859,7 +1857,7 @@ void InsetMathHull::doDispatch(Cursor & cur, FuncRequest & cmd) } case LFUN_TABULAR_FEATURE: - if (!isTable()) + if (!allowsTabularFeatures()) cur.undispatched(); else InsetMathGrid::doDispatch(cur, cmd); @@ -1872,6 +1870,20 @@ void InsetMathHull::doDispatch(Cursor & cur, FuncRequest & cmd) } +namespace { + +bool allowDisplayMath(Cursor cur) +{ + LATTEST(cur.depth() > 1); + cur.pop(); + FuncStatus status; + FuncRequest cmd(LFUN_MATH_DISPLAY); + return cur.getStatus(cmd, status) && status.enabled(); +} + +} + + bool InsetMathHull::getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus & status) const { @@ -1898,30 +1910,12 @@ bool InsetMathHull::getStatus(Cursor & cur, FuncRequest const & cmd, status.setOnOff(type_ == ht); status.setEnabled(isMutable(ht) && isMutable(type_)); - if (ht != hullSimple && status.enabled()) { - Cursor tmpcur = cur; - while (!tmpcur.empty()) { - InsetCode code = tmpcur.inset().lyxCode(); - if (code == BOX_CODE) { - return true; - } else if (code == TABULAR_CODE) { - FuncRequest tmpcmd(LFUN_MATH_DISPLAY); - if (tmpcur.getStatus(tmpcmd, status) && !status.enabled()) - return true; - } - tmpcur.pop_back(); - } - } + if (ht != hullSimple && status.enabled()) + status.setEnabled(allowDisplayMath(cur)); return true; } case LFUN_MATH_DISPLAY: { - bool enable = true; - if (cur.depth() > 1) { - Inset const & in = cur[cur.depth()-2].inset(); - if (in.lyxCode() == SCRIPT_CODE) - enable = display() != Inline; - } - status.setEnabled(enable); + status.setEnabled(display() != Inline || allowDisplayMath(cur)); status.setOnOff(display() != Inline); return true; } @@ -1980,7 +1974,7 @@ bool InsetMathHull::getStatus(Cursor & cur, FuncRequest const & cmd, return InsetMathGrid::getStatus(cur, cmd, status); case LFUN_TABULAR_FEATURE: { - if (!isTable()) + if (!allowsTabularFeatures()) return false; string s = cmd.getArg(0); if (!rowChangeOK() diff --git a/src/mathed/InsetMathHull.h b/src/mathed/InsetMathHull.h index b79b515ac2..c12fcc7593 100644 --- a/src/mathed/InsetMathHull.h +++ b/src/mathed/InsetMathHull.h @@ -241,7 +241,7 @@ private: /// consistency check void check() const; /// does it understand tabular-feature commands? - bool isTable() const; + bool allowsTabularFeatures() const; /// can this change its number of rows? bool rowChangeOK() const; /// can this change its number of cols? diff --git a/src/mathed/InsetMathNest.cpp b/src/mathed/InsetMathNest.cpp index 493f529d1e..7357b5f922 100644 --- a/src/mathed/InsetMathNest.cpp +++ b/src/mathed/InsetMathNest.cpp @@ -715,8 +715,10 @@ void InsetMathNest::doDispatch(Cursor & cur, FuncRequest & cmd) cur.selHandle(select); // handle autocorrect: - cur.autocorrect() = false; - cur.message(_("Autocorrect Off ('!' to enter)")); + if (lyxrc.autocorrection_math && cur.autocorrect()) { + cur.autocorrect() = false; + cur.message(_("Autocorrect Off ('!' to enter)")); + } // go up/down bool up = act == LFUN_UP || act == LFUN_UP_SELECT; @@ -738,7 +740,7 @@ void InsetMathNest::doDispatch(Cursor & cur, FuncRequest & cmd) case LFUN_WORD_SELECT: cur.pos() = 0; cur.resetAnchor(); - cur.setSelection(true); + cur.selection(true); cur.pos() = cur.lastpos(); cur.bv().cursor() = cur; break; @@ -747,7 +749,7 @@ void InsetMathNest::doDispatch(Cursor & cur, FuncRequest & cmd) cur.idx() = 0; cur.pos() = 0; cur.resetAnchor(); - cur.setSelection(true); + cur.selection(true); cur.idx() = cur.lastidx(); cur.pos() = cur.lastpos(); cur.bv().cursor() = cur; @@ -1619,7 +1621,7 @@ void InsetMathNest::lfunMouseRelease(Cursor & cur, FuncRequest & cmd) cur.noScreenUpdate(); else { Cursor & bvcur = cur.bv().cursor(); - bvcur.setSelection(true); + bvcur.selection(true); } return; } @@ -1760,7 +1762,7 @@ bool InsetMathNest::interpretChar(Cursor & cur, char_type const c) // just clear selection on pressing the space bar if (cur.selection() && c == ' ') { - cur.setSelection(false); + cur.selection(false); return true; } diff --git a/src/mathed/InsetMathSymbol.cpp b/src/mathed/InsetMathSymbol.cpp index a160dec684..a04f6e0bcf 100644 --- a/src/mathed/InsetMathSymbol.cpp +++ b/src/mathed/InsetMathSymbol.cpp @@ -21,7 +21,6 @@ #include "support/debug.h" #include "support/docstream.h" -#include "support/lyxlib.h" #include "support/textutils.h" #include @@ -68,7 +67,6 @@ void InsetMathSymbol::metrics(MetricsInfo & mi, Dimension & dim) const sym_->extra == "mathalpha" && mi.base.fontname == "mathit"; std::string const font = italic_upcase_greek ? "cmm" : sym_->inset; - int const em = mathed_font_em(mi.base.font); FontSetChanger dummy(mi.base, from_ascii(font)); mathed_string_dim(mi.base.font, sym_->draw, dim); docstring::const_reverse_iterator rit = sym_->draw.rbegin(); @@ -80,10 +78,15 @@ void InsetMathSymbol::metrics(MetricsInfo & mi, Dimension & dim) const dim.des -= h_; } // seperate things a bit - if (isRelOp()) - dim.wid += support::iround(0.5 * em); - else - dim.wid += support::iround(0.1667 * em); + if (isMathBin()) + dim.wid += 2 * mathed_medmuskip(mi.base.font); + else if (isMathRel()) + dim.wid += 2 * mathed_thickmuskip(mi.base.font); + else if (isMathPunct()) + dim.wid += mathed_thinmuskip(mi.base.font); + // FIXME: I see no reason for this + //else + // dim.wid += support::iround(0.1667 * em); scriptable_ = false; if (mi.base.style == LM_ST_DISPLAY) @@ -105,11 +108,13 @@ void InsetMathSymbol::draw(PainterInfo & pi, int x, int y) const sym_->extra == "mathalpha" && pi.base.fontname == "mathit"; std::string const font = italic_upcase_greek ? "cmm" : sym_->inset; - int const em = mathed_font_em(pi.base.font); - if (isRelOp()) - x += support::iround(0.25 * em); - else - x += support::iround(0.0833 * em); + if (isMathBin()) + x += mathed_medmuskip(pi.base.font); + else if (isMathRel()) + x += mathed_thickmuskip(pi.base.font); + // FIXME: I see no reason for this + //else + // x += support::iround(0.0833 * em); FontSetChanger dummy(pi.base, from_ascii(font)); pi.draw(x, y - h_, sym_->draw); @@ -122,12 +127,24 @@ InsetMath::mode_type InsetMathSymbol::currentMode() const } -bool InsetMathSymbol::isRelOp() const +bool InsetMathSymbol::isMathBin() const +{ + return sym_->extra == "mathbin"; +} + + +bool InsetMathSymbol::isMathRel() const { return sym_->extra == "mathrel"; } +bool InsetMathSymbol::isMathPunct() const +{ + return sym_->extra == "mathpunct"; +} + + bool InsetMathSymbol::isOrdAlpha() const { return sym_->extra == "mathord" || sym_->extra == "mathalpha"; diff --git a/src/mathed/InsetMathSymbol.h b/src/mathed/InsetMathSymbol.h index bb18217a84..6ca3ded7d1 100644 --- a/src/mathed/InsetMathSymbol.h +++ b/src/mathed/InsetMathSymbol.h @@ -40,7 +40,11 @@ public: /// mode_type currentMode() const; /// - bool isRelOp() const; + bool isMathRel() const; + /// + bool isMathBin() const; + /// + bool isMathPunct() const; /// bool isOrdAlpha() const; /// do we take scripts? diff --git a/src/mathed/MathSupport.cpp b/src/mathed/MathSupport.cpp index 9801151129..7769176e7a 100644 --- a/src/mathed/MathSupport.cpp +++ b/src/mathed/MathSupport.cpp @@ -25,6 +25,7 @@ #include "support/debug.h" #include "support/docstream.h" +#include "support/lyxlib.h" #include #include @@ -506,6 +507,46 @@ int mathed_font_em(FontInfo const & font) return theFontMetrics(font).em(); } +/* The math units. Quoting TeX by Topic, p.205: + * + * Spacing around mathematical objects is measured in mu units. A mu + * is 1/18th part of \fontdimen6 of the font in family 2 in the + * current style, the ‘quad’ value of the symbol font. + * + * A \thickmuskip (default value in plain TeX: 5mu plus 5mu) is + * inserted around (binary) relations, except where these are preceded + * or followed by other relations or punctuation, and except if they + * follow an open, or precede a close symbol. + * + * A \medmuskip (default value in plain TeX: 4mu plus 2mu minus 4mu) + * is put around binary operators. + * + * A \thinmuskip (default value in plain TeX: 3mu) follows after + * punctuation, and is put around inner objects, except where these + * are followed by a close or preceded by an open symbol, and except + * if the other object is a large operator or a binary relation. + */ + +int mathed_thinmuskip(FontInfo font) +{ + font.setFamily(SYMBOL_FAMILY); + return support::iround(3.0 / 18 * theFontMetrics(font).em()); +} + + +int mathed_medmuskip(FontInfo font) +{ + font.setFamily(SYMBOL_FAMILY); + return support::iround(4.0 / 18 * theFontMetrics(font).em()); +} + + +int mathed_thickmuskip(FontInfo font) +{ + font.setFamily(SYMBOL_FAMILY); + return support::iround(5.0 / 18 * theFontMetrics(font).em()); +} + int mathed_char_width(FontInfo const & font, char_type c) { diff --git a/src/mathed/MathSupport.h b/src/mathed/MathSupport.h index aa5ef2adc2..c14f21a807 100644 --- a/src/mathed/MathSupport.h +++ b/src/mathed/MathSupport.h @@ -29,6 +29,12 @@ class InsetMath; int mathed_font_em(FontInfo const &); +int mathed_thinmuskip(FontInfo font); + +int mathed_medmuskip(FontInfo font); + +int mathed_thickmuskip(FontInfo font); + int mathed_char_width(FontInfo const &, char_type c); int mathed_char_kerning(FontInfo const &, char_type c); diff --git a/src/support/FileName.cpp b/src/support/FileName.cpp index 6d40687a25..929c4165be 100644 --- a/src/support/FileName.cpp +++ b/src/support/FileName.cpp @@ -31,7 +31,6 @@ #include #include -#include #include #include diff --git a/src/support/Makefile.am b/src/support/Makefile.am index ed6af579d1..29f003b85d 100644 --- a/src/support/Makefile.am +++ b/src/support/Makefile.am @@ -26,7 +26,9 @@ liblyxsupport_a_DEPENDENCIES = $(MOCEDFILES) # ################################################################## -AM_CPPFLAGS += -I$(srcdir)/.. $(BOOST_INCLUDES) $(QT_CPPFLAGS) $(QT_INCLUDES) +AM_CPPFLAGS += -I$(srcdir)/.. \ + $(BOOST_INCLUDES) $(ICONV_INCLUDES) $(ZLIB_INCLUDES) \ + $(QT_CPPFLAGS) $(QT_INCLUDES) liblyxsupport_a_SOURCES = \ FileMonitor.h \ diff --git a/src/support/convert.cpp b/src/support/convert.cpp index 6b985f50ba..58a56479a3 100644 --- a/src/support/convert.cpp +++ b/src/support/convert.cpp @@ -90,6 +90,22 @@ docstring convert(unsigned long ul) } +#ifdef LYX_USE_LONG_LONG +template<> +string convert(unsigned long long ull) +{ + return lexical_cast(ull); +} + + +template<> +docstring convert(unsigned long long ull) +{ + return from_ascii(lexical_cast(ull)); +} +#endif + + template<> string convert(long l) { @@ -104,6 +120,22 @@ docstring convert(long l) } +#ifdef LYX_USE_LONG_LONG +template<> +string convert(long long ll) +{ + return lexical_cast(ll); +} + + +template<> +docstring convert(long long ll) +{ + return from_ascii(lexical_cast(ll)); +} +#endif + + template<> string convert(float f) { diff --git a/src/support/convert.h b/src/support/convert.h index e72fe61b56..fb069c98c3 100644 --- a/src/support/convert.h +++ b/src/support/convert.h @@ -33,8 +33,16 @@ template<> std::string convert(unsigned int ui); template<> docstring convert(unsigned int ui); template<> std::string convert(unsigned long ul); template<> docstring convert(unsigned long ul); +#ifdef LYX_USE_LONG_LONG +template<> std::string convert(unsigned long long ull); +template<> docstring convert(unsigned long long ull); +#endif template<> std::string convert(long l); template<> docstring convert(long l); +#ifdef LYX_USE_LONG_LONG +template<> std::string convert(long long ll); +template<> docstring convert(long long ll); +#endif template<> std::string convert(float f); template<> std::string convert(double d); template<> int convert(std::string const & s); diff --git a/src/support/debug.cpp b/src/support/debug.cpp index 538b487760..bff9bf415a 100644 --- a/src/support/debug.cpp +++ b/src/support/debug.cpp @@ -243,6 +243,12 @@ LyXErr & operator<<(LyXErr & l, long t) { return toStream(l, t); } LyXErr & operator<<(LyXErr & l, unsigned long t) { return toStream(l, t); } +#ifdef LYX_USE_LONG_LONG +LyXErr & operator<<(LyXErr & l, long long t) +{ return toStream(l, t); } +LyXErr & operator<<(LyXErr & l, unsigned long long t) +{ return toStream(l, t); } +#endif LyXErr & operator<<(LyXErr & l, double t) { return toStream(l, t); } LyXErr & operator<<(LyXErr & l, string const & t) diff --git a/src/support/debug.h b/src/support/debug.h index 216538958d..b98dfd0eab 100644 --- a/src/support/debug.h +++ b/src/support/debug.h @@ -202,6 +202,10 @@ LyXErr & operator<<(LyXErr &, int); LyXErr & operator<<(LyXErr &, unsigned int); LyXErr & operator<<(LyXErr &, long); LyXErr & operator<<(LyXErr &, unsigned long); +#ifdef LYX_USE_LONG_LONG +LyXErr & operator<<(LyXErr &, long long); +LyXErr & operator<<(LyXErr &, unsigned long long); +#endif LyXErr & operator<<(LyXErr &, double); LyXErr & operator<<(LyXErr &, std::string const &); LyXErr & operator<<(LyXErr &, docstring const &); diff --git a/src/support/docstring.cpp b/src/support/docstring.cpp index f44259d349..95c86b3665 100644 --- a/src/support/docstring.cpp +++ b/src/support/docstring.cpp @@ -514,7 +514,7 @@ protected: return do_put_helper(oit, b, fill, v); } -#ifdef _GLIBCXX_USE_LONG_LONG +#ifdef LYX_USE_LONG_LONG iter_type do_put(iter_type oit, ios_base & b, char_type fill, long long v) const { @@ -675,7 +675,7 @@ protected: return do_get_integer(iit, eit, b, err, v); } -#ifdef _GLIBCXX_USE_LONG_LONG +#ifdef LYX_USE_LONG_LONG iter_type do_get(iter_type iit, iter_type eit, ios_base & b, ios_base::iostate & err, long long & v) const diff --git a/src/support/environment.cpp b/src/support/environment.cpp index ceaca60f54..091fa278c0 100644 --- a/src/support/environment.cpp +++ b/src/support/environment.cpp @@ -15,10 +15,10 @@ #include "support/environment.h" #include "support/docstring.h" +#include "support/lstrings.h" #include "support/os.h" -#include - +#include // for remove #include #include #include @@ -45,20 +45,10 @@ string const getEnv(string const & name) vector const getEnvPath(string const & name) { - typedef boost::char_separator Separator; - typedef boost::tokenizer Tokenizer; - string const env_var = getEnv(name); - Separator const separator(string(1, os::path_separator()).c_str()); - Tokenizer const tokens(env_var, separator); - Tokenizer::const_iterator it = tokens.begin(); - Tokenizer::const_iterator const end = tokens.end(); + string const separator(1, os::path_separator()); - vector vars; - for (; it != end; ++it) - vars.push_back(os::internal_path(*it)); - - return vars; + return getVectorFromString(env_var, separator); } @@ -104,18 +94,13 @@ void setEnvPath(string const & name, vector const & env) void prependEnvPath(string const & name, string const & prefix) { + string const separator(1, os::path_separator()); + vector reversed_tokens + = getVectorFromString(prefix, separator); vector env_var = getEnvPath(name); - typedef boost::char_separator Separator; - typedef boost::tokenizer Tokenizer; - - Separator const separator(string(1, os::path_separator()).c_str()); - // Prepend each new element to the list, removing identical elements // that occur later in the list. - Tokenizer const tokens(prefix, separator); - vector reversed_tokens(tokens.begin(), tokens.end()); - typedef vector::const_reverse_iterator token_iterator; token_iterator it = reversed_tokens.rbegin(); token_iterator const end = reversed_tokens.rend(); diff --git a/src/support/filetools.cpp b/src/support/filetools.cpp index 310e621e17..a72c93ed61 100644 --- a/src/support/filetools.cpp +++ b/src/support/filetools.cpp @@ -1065,7 +1065,7 @@ cmd_ret const runCommand(string const & cmd) 0, 0, &startup, &process)) { CloseHandle(process.hThread); - int fno = _open_osfhandle((long)in, _O_RDONLY); + int fno = _open_osfhandle((intptr_t)in, _O_RDONLY); CloseHandle(out); inf = _fdopen(fno, "r"); } diff --git a/src/support/lstrings.cpp b/src/support/lstrings.cpp index f4aba23c0a..6d5f86672f 100644 --- a/src/support/lstrings.cpp +++ b/src/support/lstrings.cpp @@ -1437,6 +1437,17 @@ docstring bformat(docstring const & fmt, long arg1) } +#ifdef LYX_USE_LONG_LONG +template<> +docstring bformat(docstring const & fmt, long long arg1) +{ + LATTEST(contains(fmt, from_ascii("%1$d"))); + docstring const str = subst(fmt, from_ascii("%1$d"), convert(arg1)); + return subst(str, from_ascii("%%"), from_ascii("%")); +} +#endif + + template<> docstring bformat(docstring const & fmt, unsigned int arg1) { diff --git a/src/support/lstrings.h b/src/support/lstrings.h index 269b5a6564..ac310c59c4 100644 --- a/src/support/lstrings.h +++ b/src/support/lstrings.h @@ -357,6 +357,9 @@ docstring bformat(docstring const & fmt, Arg1, Arg2, Arg3, Arg4); template<> docstring bformat(docstring const & fmt, int arg1); template<> docstring bformat(docstring const & fmt, long arg1); +#ifdef LYX_USE_LONG_LONG +template<> docstring bformat(docstring const & fmt, long long arg1); +#endif template<> docstring bformat(docstring const & fmt, unsigned int arg1); template<> docstring bformat(docstring const & fmt, docstring arg1); template<> docstring bformat(docstring const & fmt, char * arg1); diff --git a/src/support/lyxtime.cpp b/src/support/lyxtime.cpp index 3150825d75..5415ac4eeb 100644 --- a/src/support/lyxtime.cpp +++ b/src/support/lyxtime.cpp @@ -40,6 +40,18 @@ string const formatted_time(time_t t, string const & fmt) } +docstring formatted_datetime(time_t t, string const & fmt) +{ + QString qres; + if (fmt.empty()) + qres = QLocale().toString(QDateTime::fromTime_t(t), + QLocale::ShortFormat); + else + qres = QLocale().toString(QDateTime::fromTime_t(t), toqstr(fmt)); + return qstring_to_ucs4(qres); +} + + time_t from_asctime_utc(string t) { // Example for the format: "Sun Nov 6 10:39:39 2011\n" diff --git a/src/support/lyxtime.h b/src/support/lyxtime.h index 74586cf7de..8fa58733fb 100644 --- a/src/support/lyxtime.h +++ b/src/support/lyxtime.h @@ -16,6 +16,8 @@ #include #include +#include "strfwd.h" + namespace lyx { namespace support { @@ -25,9 +27,17 @@ time_t current_time(); /** Returns a locale-dependent formatting of the date *  and time encoded in \c time. The \p fmt string * holds the formatting arguments of \c strftime. + * Prefer the function formatted_datetime below. */ std::string const formatted_time(time_t t, std::string const & fmt); +/** Returns a locale-dependent formatting of the date and time encoded in \c t + * The \p fmt string holds the formatting arguments of QDateTime::toString(). + * If fmt is empty then the formatting of the date and time is itself according + * to the locale. + */ +docstring formatted_datetime(time_t t, std::string const & fmt = ""); + /** * Inverse of asctime(gmtime()). */ diff --git a/src/support/metahash.h b/src/support/metahash.h deleted file mode 100644 index 84f6062bc2..0000000000 --- a/src/support/metahash.h +++ /dev/null @@ -1,73 +0,0 @@ -// -*- C++ -*- -/** - * \file methash.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. - * - * Code by Tor Brede Vekterli - * http://arcticinteractive.com/2009/04/18/compile-time-string-hashing-boost-mpl/ - * (Boost 1.0 license.) - * - */ - -#ifndef LYX_META_HASH_H -#define LYX_META_HASH_H - -#include -#include -#include -#include - - - -namespace lyx { -namespace support { - -#ifdef _MSC_VER -#pragma warning(push) -// disable addition overflow warning -#pragma warning(disable:4307) -#endif - - template - struct hash_combine - { - typedef boost::mpl::size_t< - Seed::value ^ (static_cast(Value::value) - + 0x9e3779b9 + (Seed::value << 6) + (Seed::value >> 2)) - > type; - }; - -#ifdef _MSC_VER -#pragma warning(pop) -#endif - - // Hash any sequence of integral wrapper types - template - struct hash_sequence - : boost::mpl::fold< - Sequence - , boost::mpl::size_t<0> - , hash_combine - >::type - {}; - - // For hashing std::strings et al that don't include the zero-terminator - template - struct hash_string : hash_sequence - {}; - - // Hash including terminating zero for char arrays - template - struct hash_cstring - : hash_combine< hash_sequence, boost::mpl::size_t<0> >::type - {}; - -} -} - -#endif diff --git a/src/support/os_win32.cpp b/src/support/os_win32.cpp index 292555d6c7..a6e5da7c5a 100644 --- a/src/support/os_win32.cpp +++ b/src/support/os_win32.cpp @@ -569,7 +569,7 @@ bool autoOpenFile(string const & filename, auto_open_mode const mode, // reference: http://msdn.microsoft.com/en-us/library/bb762153.aspx char const * action = (mode == VIEW) ? "open" : "edit"; - bool success = reinterpret_cast(ShellExecute(NULL, action, + bool success = reinterpret_cast(ShellExecute(NULL, action, to_local8bit(from_utf8(filename)).c_str(), NULL, NULL, 1)) > 32; if (!path.empty() && !lyxrc.texinputs_prefix.empty()) { diff --git a/src/support/os_win32.h b/src/support/os_win32.h index 618c5315ef..42016f7094 100644 --- a/src/support/os_win32.h +++ b/src/support/os_win32.h @@ -35,10 +35,13 @@ * Note: __CYGWIN__ can be defined here if building in _WIN32 mode. */ #if defined(__MINGW32__) || defined(__CYGWIN__) || defined(__CYGWIN32__) -# if defined(WINVER) && WINVER < 0x0500 -# error WINVER must be >= 0x0500 +# if defined(WINVER) +# if WINVER < 0x0500 +# error WINVER must be >= 0x0500 +# endif +# else +# define WINVER 0x0500 # endif -# define WINVER 0x0500 # define _WIN32_IE 0x0500 #endif diff --git a/src/tex2lyx/Makefile.am b/src/tex2lyx/Makefile.am index f0334822cd..bf2d66d67f 100644 --- a/src/tex2lyx/Makefile.am +++ b/src/tex2lyx/Makefile.am @@ -19,7 +19,7 @@ DEFAULT_INCLUDES = AM_CPPFLAGS += -I$(top_srcdir)/src/tex2lyx \ -I$(top_srcdir)/src -I$(top_builddir) -I$(top_builddir)/src \ - $(BOOST_INCLUDES) + $(BOOST_INCLUDES) $(ICONV_INCLUDES) $(ZLIB_INCLUDES) TEST_FILES = \ test/runtests.cmake \ @@ -125,7 +125,7 @@ tex2lyx_LDADD = \ $(top_builddir)/src/support/liblyxsupport.a \ $(LIBICONV) $(BOOST_LIBS) \ $(QT_LIB) $(QT_LDFLAGS) \ - @LIBS@ $(LIBSHLWAPI) $(LIBPSAPI) + @LIBS@ $(ICONV_LIBS) $(ZLIB_LIBS) $(LIBSHLWAPI) $(LIBPSAPI) if INSTALL_MACOSX tex2lyx_LDFLAGS = -framework AppKit \ diff --git a/src/texstream.cpp b/src/texstream.cpp index 3268dca7b2..16f8dfbe68 100644 --- a/src/texstream.cpp +++ b/src/texstream.cpp @@ -215,6 +215,11 @@ template otexrowstream & operator<< (otexrowstream &, template otexrowstream & operator<< (otexrowstream &, unsigned long); +#ifdef LYX_USE_LONG_LONG +template otexrowstream & operator<< (otexrowstream &, + unsigned long long); +#endif + template otexstream & operator<<(otexstream & ots, Type value) @@ -230,5 +235,8 @@ template otexstream & operator<< (otexstream &, double); template otexstream & operator<< (otexstream &, int); template otexstream & operator<< (otexstream &, unsigned int); template otexstream & operator<< (otexstream &, unsigned long); +#ifdef LYX_USE_LONG_LONG +template otexstream & operator<< (otexstream &, unsigned long long); +#endif }