diff --git a/ChangeLog b/ChangeLog index c42fbaf6c4..d520d1ee5d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,14 @@ +2003-10-06 Lars Gullik Bjønnes + + * INSTALL: remove a comment about --with-included-string + + * configure.ac: remove the configure are + --with-included-string + 2003-09-21 Lars Gullik Bjønnes * configure.ac (FORNTENDS): use tabs to align message, make gtk - not delete info about other frontends + not delete info about other frontends 2003-09-16 Lars Gullik Bjønnes diff --git a/INSTALL b/INSTALL index d0e6f5dc00..8ecbd562fc 100644 --- a/INSTALL +++ b/INSTALL @@ -366,9 +366,6 @@ notify us. then you need to upgrade the version of the xforms library you have installed. - o On solaris 2.6, you may have to compile with --with-included-string - if compiling with gcc 2.95.2. - o On SUN Sparc Solaris 8, you need gnumake. The LyX makefiles do not work with Solaris make. diff --git a/boost/boost/detail/shared_count.hpp b/boost/boost/detail/shared_count.hpp index 3ade9f91ab..39028b4bdd 100644 --- a/boost/boost/detail/shared_count.hpp +++ b/boost/boost/detail/shared_count.hpp @@ -369,7 +369,7 @@ public: r.release(); } -#endif +#endif ~shared_count() // nothrow { diff --git a/boost/boost/mpl/aux_/template_arity_fwd.hpp b/boost/boost/mpl/aux_/template_arity_fwd.hpp index 6cb409ec4a..2f66dc5a41 100644 --- a/boost/boost/mpl/aux_/template_arity_fwd.hpp +++ b/boost/boost/mpl/aux_/template_arity_fwd.hpp @@ -7,11 +7,11 @@ // Aleksey Gurtovoy // // Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appears in all copies and -// that both the copyright notice and this permission notice appear in -// supporting documentation. No representations are made about the -// suitability of this software for any purpose. It is provided "as is" +// and its documentation for any purpose is hereby granted without fee, +// provided that the above copyright notice appears in all copies and +// that both the copyright notice and this permission notice appear in +// supporting documentation. No representations are made about the +// suitability of this software for any purpose. It is provided "as is" // without express or implied warranty. #ifndef BOOST_MPL_AUX_TEMPLATE_ARITY_FWD_HPP_INCLUDED diff --git a/boost/boost/mpl/bool_fwd.hpp b/boost/boost/mpl/bool_fwd.hpp index 851293715c..f1cf07894f 100644 --- a/boost/boost/mpl/bool_fwd.hpp +++ b/boost/boost/mpl/bool_fwd.hpp @@ -1,4 +1,3 @@ - #ifndef BOOST_MPL_BOOL_FWD_HPP_INCLUDED #define BOOST_MPL_BOOL_FWD_HPP_INCLUDED @@ -9,11 +8,11 @@ // Aleksey Gurtovoy // // Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appears in all copies and -// that both the copyright notice and this permission notice appear in -// supporting documentation. No representations are made about the -// suitability of this software for any purpose. It is provided "as is" +// and its documentation for any purpose is hereby granted without fee, +// provided that the above copyright notice appears in all copies and +// that both the copyright notice and this permission notice appear in +// supporting documentation. No representations are made about the +// suitability of this software for any purpose. It is provided "as is" // without express or implied warranty. // // See http://www.boost.org/libs/mpl for documentation. diff --git a/boost/boost/shared_ptr.hpp b/boost/boost/shared_ptr.hpp index d33eb77e82..37711fb4b9 100644 --- a/boost/boost/shared_ptr.hpp +++ b/boost/boost/shared_ptr.hpp @@ -238,7 +238,7 @@ public: BOOST_ASSERT(px != 0); return px; } - + T * get() const // never throws { return px; @@ -404,7 +404,7 @@ using std::basic_ostream; template basic_ostream & operator<< (basic_ostream & os, shared_ptr const & p) # else template std::basic_ostream & operator<< (std::basic_ostream & os, shared_ptr const & p) -# endif +# endif { os << p.get(); return os; @@ -437,7 +437,7 @@ template D * get_deleter(shared_ptr const & p) #ifdef BOOST_MSVC # pragma warning(pop) -#endif +#endif #endif // #if defined(BOOST_NO_MEMBER_TEMPLATES) && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) diff --git a/boost/boost/test/detail/nullstream.hpp b/boost/boost/test/detail/nullstream.hpp index c02e47b960..84d8db127b 100644 --- a/boost/boost/test/detail/nullstream.hpp +++ b/boost/boost/test/detail/nullstream.hpp @@ -1,5 +1,5 @@ // (C) Copyright Gennadiy Rozental 2002. -// (C) Copyright Daryle Walker 2000-2001. +// (C) Copyright Daryle Walker 2000-2001. // Permission to copy, use, modify, sell and distribute this software // is granted provided this copyright notice appears in all copies. // This software is provided "as is" without express or implied warranty, @@ -9,7 +9,7 @@ // // File : $RCSfile: nullstream.hpp,v $ // -// Version : $Id: nullstream.hpp,v 1.3 2003/02/15 21:57:25 rogeeff Exp $ +// Version : $Id: nullstream.hpp,v 1.1 2003/09/26 14:27:18 larsbj Exp $ // // Description : simulate /dev/null stream // *************************************************************************** diff --git a/boost/boost/tuple/detail/tuple_basic.hpp b/boost/boost/tuple/detail/tuple_basic.hpp index 22478c6af3..a5445f2777 100644 --- a/boost/boost/tuple/detail/tuple_basic.hpp +++ b/boost/boost/tuple/detail/tuple_basic.hpp @@ -3,36 +3,36 @@ // Copyright (C) 1999, 2000 Jaakko Järvi (jaakko.jarvi@cs.utu.fi) // // Permission to copy, use, sell and distribute this software is granted -// provided this copyright notice appears in all copies. +// provided this copyright notice appears in all copies. // Permission to modify the code and to distribute modified code is granted -// provided this copyright notice appears in all copies, and a notice +// provided this copyright notice appears in all copies, and a notice // that the code was modified is included with the copyright notice. // -// This software is provided "as is" without express or implied warranty, +// This software is provided "as is" without express or implied warranty, // and with no claim as to its suitability for any purpose. // For more information, see http://www.boost.org // Outside help: // This and that, Gary Powell. -// Fixed return types for get_head/get_tail +// Fixed return types for get_head/get_tail // ( and other bugs ) per suggestion of Jens Maurer // simplified element type accessors + bug fix (Jeremy Siek) -// Several changes/additions according to suggestions by Doug Gregor, +// Several changes/additions according to suggestions by Doug Gregor, // William Kempf, Vesa Karvonen, John Max Skaller, Ed Brey, Beman Dawes, // David Abrahams. // Revision history: // 2002 05 01 Hugo Duncan: Fix for Borland after Jaakko's previous changes -// 2002 04 18 Jaakko: tuple element types can be void or plain function +// 2002 04 18 Jaakko: tuple element types can be void or plain function // types, as long as no object is created. // Tuple objects can no hold even noncopyable types -// such as arrays. +// such as arrays. // 2001 10 22 John Maddock // Fixes for Borland C++ // 2001 08 30 David Abrahams // Added default constructor for cons<>. -// ----------------------------------------------------------------- +// ----------------------------------------------------------------- #ifndef BOOST_TUPLE_BASIC_HPP #define BOOST_TUPLE_BASIC_HPP @@ -42,7 +42,7 @@ #include "boost/type_traits/cv_traits.hpp" #include "boost/type_traits/function_traits.hpp" - + namespace boost { namespace tuples { @@ -66,16 +66,16 @@ template struct IF { } // end detail // - cons forward declaration ----------------------------------------------- -template struct cons; +template struct cons; // - tuple forward declaration ----------------------------------------------- template < - class T0 = null_type, class T1 = null_type, class T2 = null_type, - class T3 = null_type, class T4 = null_type, class T5 = null_type, - class T6 = null_type, class T7 = null_type, class T8 = null_type, + class T0 = null_type, class T1 = null_type, class T2 = null_type, + class T3 = null_type, class T4 = null_type, class T5 = null_type, + class T6 = null_type, class T7 = null_type, class T8 = null_type, class T9 = null_type> -class tuple; +class tuple; // tuple_length forward declaration template struct length; @@ -95,7 +95,7 @@ namespace detail { # define BOOST_TUPLE_SINGLE_DUMMY_PARM #endif -// -- generate error template, referencing to non-existing members of this +// -- generate error template, referencing to non-existing members of this // template is used to produce compilation errors intentionally template class generate_error; @@ -119,12 +119,12 @@ struct get_class { template<> struct get_class<0> { - template + template inline static RET get(const cons& t) { return t.head; } - template + template inline static RET get(cons& t) { return t.head; @@ -135,7 +135,7 @@ struct get_class<0> { // -cons type accessors ---------------------------------------- -// typename tuples::element::type gets the type of the +// typename tuples::element::type gets the type of the // Nth element ot T, first element is at index 0 // ------------------------------------------------------- @@ -194,8 +194,8 @@ template struct access_traits { typedef T& const_type; typedef T& non_const_type; - - typedef T& parameter_type; + + typedef T& parameter_type; }; // get function for non-const cons-lists, returns a reference to the element @@ -204,13 +204,13 @@ template inline typename access_traits< typename element >::type >::non_const_type -get(cons& c BOOST_TUPLE_DUMMY_PARM) { - return detail::get_class::BOOST_NESTED_TEMPLATE +get(cons& c BOOST_TUPLE_DUMMY_PARM) { + return detail::get_class::BOOST_NESTED_TEMPLATE get< typename access_traits< typename element >::type - >::non_const_type>(c); -} + >::non_const_type>(c); +} // get function for const cons-lists, returns a const reference to // the element. If the element is a reference, returns the reference @@ -219,13 +219,13 @@ template inline typename access_traits< typename element >::type >::const_type -get(const cons& c BOOST_TUPLE_DUMMY_PARM) { - return detail::get_class::BOOST_NESTED_TEMPLATE +get(const cons& c BOOST_TUPLE_DUMMY_PARM) { + return detail::get_class::BOOST_NESTED_TEMPLATE get< typename access_traits< typename element >::type >::const_type>(c); -} +} // -- the cons template -------------------------------------------------- namespace detail { @@ -246,7 +246,7 @@ template struct wrap_non_storeable_type { >::RET type; }; template <> struct wrap_non_storeable_type { - typedef non_storeable_type type; + typedef non_storeable_type type; }; } // detail @@ -257,49 +257,49 @@ struct cons { typedef HT head_type; typedef TT tail_type; - typedef typename + typedef typename detail::wrap_non_storeable_type::type stored_head_type; stored_head_type head; tail_type tail; - typename access_traits::non_const_type + typename access_traits::non_const_type get_head() { return head; } - typename access_traits::non_const_type - get_tail() { return tail; } + typename access_traits::non_const_type + get_tail() { return tail; } - typename access_traits::const_type + typename access_traits::const_type get_head() const { return head; } - - typename access_traits::const_type - get_tail() const { return tail; } + + typename access_traits::const_type + get_tail() const { return tail; } cons() : head(), tail() {} // cons() : head(detail::default_arg::f()), tail() {} - // the argument for head is not strictly needed, but it prevents - // array type elements. This is good, since array type elements - // cannot be supported properly in any case (no assignment, + // the argument for head is not strictly needed, but it prevents + // array type elements. This is good, since array type elements + // cannot be supported properly in any case (no assignment, // copy works only if the tails are exactly the same type, ...) - + cons(typename access_traits::parameter_type h, const tail_type& t) - : head (h), tail(t) {} + : head (h), tail(t) {} - template - cons( T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, - T6& t6, T7& t7, T8& t8, T9& t9, T10& t10 ) - : head (t1), + cons( T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, + T6& t6, T7& t7, T8& t8, T9& t9, T10& t10 ) + : head (t1), tail (t2, t3, t4, t5, t6, t7, t8, t9, t10, detail::cnull()) {} - template - cons( const null_type& t1, T2& t2, T3& t3, T4& t4, T5& t5, - T6& t6, T7& t7, T8& t8, T9& t9, T10& t10 ) - : head (), + cons( const null_type& t1, T2& t2, T3& t3, T4& t4, T5& t5, + T6& t6, T7& t7, T8& t8, T9& t9, T10& t10 ) + : head (), tail (t2, t3, t4, t5, t6, t7, t8, t9, t10, detail::cnull()) {} @@ -308,18 +308,18 @@ struct cons { cons( const cons& u ) : head(u.head), tail(u.tail) {} template - cons& operator=( const cons& u ) { - head=u.head; tail=u.tail; return *this; + cons& operator=( const cons& u ) { + head=u.head; tail=u.tail; return *this; } - // must define assignment operator explicitly, implicit version is + // must define assignment operator explicitly, implicit version is // illformed if HT is a reference (12.8. (12)) - cons& operator=(const cons& u) { - head = u.head; tail = u.tail; return *this; + cons& operator=(const cons& u) { + head = u.head; tail = u.tail; return *this; } template - cons& operator=( const std::pair& u ) { + cons& operator=( const std::pair& u ) { BOOST_STATIC_ASSERT(length::value == 2); // check length = 2 head = u.first; tail.head = u.second; return *this; } @@ -349,47 +349,47 @@ struct cons { typedef null_type tail_type; typedef cons self_type; - typedef typename + typedef typename detail::wrap_non_storeable_type::type stored_head_type; stored_head_type head; - - typename access_traits::non_const_type - get_head() { return head; } - - null_type get_tail() { return null_type(); } - typename access_traits::const_type + typename access_traits::non_const_type + get_head() { return head; } + + null_type get_tail() { return null_type(); } + + typename access_traits::const_type get_head() const { return head; } - - const null_type get_tail() const { return null_type(); } + + const null_type get_tail() const { return null_type(); } // cons() : head(detail::default_arg::f()) {} cons() : head() {} cons(typename access_traits::parameter_type h, const null_type& = null_type()) - : head (h) {} + : head (h) {} template - cons(T1& t1, const null_type&, const null_type&, const null_type&, - const null_type&, const null_type&, const null_type&, + cons(T1& t1, const null_type&, const null_type&, const null_type&, + const null_type&, const null_type&, const null_type&, const null_type&, const null_type&, const null_type&) : head (t1) {} - cons(const null_type&, - const null_type&, const null_type&, const null_type&, - const null_type&, const null_type&, const null_type&, + cons(const null_type&, + const null_type&, const null_type&, const null_type&, + const null_type&, const null_type&, const null_type&, const null_type&, const null_type&, const null_type&) : head () {} template cons( const cons& u ) : head(u.head) {} - + template - cons& operator=(const cons& u ) + cons& operator=(const cons& u ) { head = u.head; return *this; } - // must define assignment operator explicitely, implicit version + // must define assignment operator explicitely, implicit version // is illformed if HT is a reference cons& operator=(const cons& u) { head = u.head; return *this; } @@ -432,12 +432,12 @@ struct length { namespace detail { // Tuple to cons mapper -------------------------------------------------- -template struct map_tuple_to_cons { - typedef cons::type > type; }; @@ -453,46 +453,46 @@ struct map_tuple_to_cons -class tuple : - public detail::map_tuple_to_cons::type +class tuple : + public detail::map_tuple_to_cons::type { public: - typedef typename + typedef typename detail::map_tuple_to_cons::type inherited; typedef typename inherited::head_type head_type; - typedef typename inherited::tail_type tail_type; + typedef typename inherited::tail_type tail_type; -// access_traits::parameter_type takes non-reference types as const T& +// access_traits::parameter_type takes non-reference types as const T& tuple() {} - + tuple(typename access_traits::parameter_type t0) - : inherited(t0, detail::cnull(), detail::cnull(), detail::cnull(), - detail::cnull(), detail::cnull(), detail::cnull(), + : inherited(t0, detail::cnull(), detail::cnull(), detail::cnull(), + detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull()) {} tuple(typename access_traits::parameter_type t0, typename access_traits::parameter_type t1) - : inherited(t0, t1, detail::cnull(), detail::cnull(), - detail::cnull(), detail::cnull(), detail::cnull(), + : inherited(t0, t1, detail::cnull(), detail::cnull(), + detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull()) {} tuple(typename access_traits::parameter_type t0, typename access_traits::parameter_type t1, typename access_traits::parameter_type t2) - : inherited(t0, t1, t2, detail::cnull(), detail::cnull(), - detail::cnull(), detail::cnull(), detail::cnull(), + : inherited(t0, t1, t2, detail::cnull(), detail::cnull(), + detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull()) {} tuple(typename access_traits::parameter_type t0, typename access_traits::parameter_type t1, typename access_traits::parameter_type t2, typename access_traits::parameter_type t3) - : inherited(t0, t1, t2, t3, detail::cnull(), detail::cnull(), - detail::cnull(), detail::cnull(), detail::cnull(), + : inherited(t0, t1, t2, t3, detail::cnull(), detail::cnull(), + detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull()) {} tuple(typename access_traits::parameter_type t0, @@ -500,7 +500,7 @@ public: typename access_traits::parameter_type t2, typename access_traits::parameter_type t3, typename access_traits::parameter_type t4) - : inherited(t0, t1, t2, t3, t4, detail::cnull(), detail::cnull(), + : inherited(t0, t1, t2, t3, t4, detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull()) {} tuple(typename access_traits::parameter_type t0, @@ -509,7 +509,7 @@ public: typename access_traits::parameter_type t3, typename access_traits::parameter_type t4, typename access_traits::parameter_type t5) - : inherited(t0, t1, t2, t3, t4, t5, detail::cnull(), detail::cnull(), + : inherited(t0, t1, t2, t3, t4, t5, detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull()) {} tuple(typename access_traits::parameter_type t0, @@ -519,7 +519,7 @@ public: typename access_traits::parameter_type t4, typename access_traits::parameter_type t5, typename access_traits::parameter_type t6) - : inherited(t0, t1, t2, t3, t4, t5, t6, detail::cnull(), + : inherited(t0, t1, t2, t3, t4, t5, t6, detail::cnull(), detail::cnull(), detail::cnull()) {} tuple(typename access_traits::parameter_type t0, @@ -530,7 +530,7 @@ public: typename access_traits::parameter_type t5, typename access_traits::parameter_type t6, typename access_traits::parameter_type t7) - : inherited(t0, t1, t2, t3, t4, t5, t6, t7, detail::cnull(), + : inherited(t0, t1, t2, t3, t4, t5, t6, t7, detail::cnull(), detail::cnull()) {} tuple(typename access_traits::parameter_type t0, @@ -561,16 +561,16 @@ public: tuple(const cons& p) : inherited(p) {} template - tuple& operator=(const cons& k) { - inherited::operator=(k); + tuple& operator=(const cons& k) { + inherited::operator=(k); return *this; } template - tuple& operator=(const std::pair& k) { + tuple& operator=(const std::pair& k) { BOOST_STATIC_ASSERT(length::value == 2);// check_length = 2 this->head = k.first; - this->tail.head = k.second; + this->tail.head = k.second; return *this; } @@ -578,8 +578,8 @@ public: // The empty tuple template <> -class tuple : - public null_type +class tuple : + public null_type { public: typedef null_type inherited; @@ -590,7 +590,7 @@ public: namespace detail { struct swallow_assign { - + template swallow_assign& operator=(const T&) { return *this; @@ -599,7 +599,7 @@ struct swallow_assign { } // namespace detail -// "ignore" allows tuple positions to be ignored when using "tie". +// "ignore" allows tuple positions to be ignored when using "tie". namespace { detail::swallow_assign ignore; } @@ -614,7 +614,7 @@ namespace { // from template foo(T& t) : make_tuple_traits::type // Conversions: -// T -> T, +// T -> T, // references -> compile_time_error // reference_wrapper -> T& // const reference_wrapper -> T& @@ -623,19 +623,19 @@ namespace { template struct make_tuple_traits { - typedef T type; + typedef T type; // commented away, see below (JJ) - // typedef typename IF< + // typedef typename IF< // boost::is_function::value, // T&, // T>::RET type; }; - -// The is_function test was there originally for plain function types, + +// The is_function test was there originally for plain function types, // which can't be stored as such (we must either store them as references or -// pointers). Such a type could be formed if make_tuple was called with a +// pointers). Such a type could be formed if make_tuple was called with a // reference to a function. // But this would mean that a const qualified function type was formed in // the make_tuple function and hence make_tuple can't take a function @@ -650,17 +650,17 @@ struct make_tuple_traits { typedef typename detail::generate_error:: do_not_use_with_reference_type error; -}; +}; // Arrays can't be stored as plain types; convert them to references. // All arrays are converted to const. This is because make_tuple takes its -// parameters as const T& and thus the knowledge of the potential +// parameters as const T& and thus the knowledge of the potential // non-constness of actual argument is lost. template struct make_tuple_traits { typedef const T (&type)[n]; }; -template +template struct make_tuple_traits { typedef const T (&type)[n]; }; @@ -669,17 +669,17 @@ template struct make_tuple_traits { typedef const volatile T (&type)[n]; }; -template +template struct make_tuple_traits { typedef const volatile T (&type)[n]; }; -template +template struct make_tuple_traits >{ typedef T& type; }; -template +template struct make_tuple_traits >{ typedef T& type; }; @@ -692,20 +692,20 @@ namespace detail { // a helper traits to make the make_tuple functions shorter (Vesa Karvonen's // suggestion) template < - class T0 = null_type, class T1 = null_type, class T2 = null_type, - class T3 = null_type, class T4 = null_type, class T5 = null_type, - class T6 = null_type, class T7 = null_type, class T8 = null_type, + class T0 = null_type, class T1 = null_type, class T2 = null_type, + class T3 = null_type, class T4 = null_type, class T5 = null_type, + class T6 = null_type, class T7 = null_type, class T8 = null_type, class T9 = null_type > struct make_tuple_mapper { typedef - tuple::type, - typename make_tuple_traits::type, - typename make_tuple_traits::type, - typename make_tuple_traits::type, - typename make_tuple_traits::type, - typename make_tuple_traits::type, - typename make_tuple_traits::type, + tuple::type, + typename make_tuple_traits::type, + typename make_tuple_traits::type, + typename make_tuple_traits::type, + typename make_tuple_traits::type, + typename make_tuple_traits::type, + typename make_tuple_traits::type, typename make_tuple_traits::type, typename make_tuple_traits::type, typename make_tuple_traits::type> type; @@ -715,7 +715,7 @@ struct make_tuple_mapper { // -make_tuple function templates ----------------------------------- inline tuple<> make_tuple() { - return tuple<>(); + return tuple<>(); } template @@ -751,7 +751,7 @@ inline typename detail::make_tuple_mapper::type make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3, const T4& t4) { typedef typename detail::make_tuple_mapper::type t; - return t(t0, t1, t2, t3, t4); + return t(t0, t1, t2, t3, t4); } template @@ -759,7 +759,7 @@ inline typename detail::make_tuple_mapper::type make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5) { typedef typename detail::make_tuple_mapper::type t; - return t(t0, t1, t2, t3, t4, t5); + return t(t0, t1, t2, t3, t4, t5); } template @@ -778,7 +778,7 @@ make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7) { typedef typename detail::make_tuple_mapper ::type t; - return t(t0, t1, t2, t3, t4, t5, t6, t7); + return t(t0, t1, t2, t3, t4, t5, t6, t7); } template::type t; - return t(t0, t1, t2, t3, t4, t5, t6, t7, t8); + return t(t0, t1, t2, t3, t4, t5, t6, t7, t8); } template::type t; - return t(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9); + return t(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9); } @@ -829,46 +829,46 @@ inline tuple tie(T1& t1, T2& t2, T3& t3, T4& t4) { } template -inline tuple +inline tuple tie(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5) { return tuple (t1, t2, t3, t4, t5); } template -inline tuple +inline tuple tie(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6) { return tuple (t1, t2, t3, t4, t5, t6); } template -inline tuple +inline tuple tie(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6, T7& t7) { return tuple (t1, t2, t3, t4, t5, t6, t7); } -template -inline tuple +inline tuple tie(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6, T7& t7, T8& t8) { - return tuple + return tuple (t1, t2, t3, t4, t5, t6, t7, t8); } -template -inline tuple -tie(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6, T7& t7, T8& t8, +inline tuple +tie(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6, T7& t7, T8& t8, T9& t9) { - return tuple + return tuple (t1, t2, t3, t4, t5, t6, t7, t8, t9); } -template -inline tuple -tie(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6, T7& t7, T8& t8, +inline tuple +tie(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6, T7& t7, T8& t8, T9& t9, T10& t10) { - return tuple + return tuple (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10); } @@ -879,5 +879,3 @@ tie(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6, T7& t7, T8& t8, #undef BOOST_TUPLE_SINGLE_DUMMY_PARM #endif // BOOST_TUPLE_BASIC_HPP - - diff --git a/boost/boost/type_traits/add_reference.hpp b/boost/boost/type_traits/add_reference.hpp index ae9feaf32f..e6e866d187 100644 --- a/boost/boost/type_traits/add_reference.hpp +++ b/boost/boost/type_traits/add_reference.hpp @@ -1,8 +1,7 @@ - // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. -// Permission to copy, use, modify, sell and distribute this software is -// granted provided this copyright notice appears in all copies. This software -// is provided "as is" without express or implied warranty, and with no claim +// Permission to copy, use, modify, sell and distribute this software is +// granted provided this copyright notice appears in all copies. This software +// is provided "as is" without express or implied warranty, and with no claim // as to its suitability for any purpose. // // See http://www.boost.org for most recent version including documentation. @@ -77,7 +76,7 @@ BOOST_TT_AUX_TYPE_TRAIT_IMPL_SPEC1(add_reference,void const volatile,void const BOOST_TT_AUX_TYPE_TRAIT_DEF1(add_reference,T,typename detail::add_reference_impl::type) -// agurt, 07/mar/03: workaround Borland's ill-formed sensitivity to an additional +// agurt, 07/mar/03: workaround Borland's ill-formed sensitivity to an additional // level of indirection, here #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x561)) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,add_reference,T&,T&) diff --git a/boost/boost/type_traits/is_array.hpp b/boost/boost/type_traits/is_array.hpp index b2fb26111b..fe302b87d0 100644 --- a/boost/boost/type_traits/is_array.hpp +++ b/boost/boost/type_traits/is_array.hpp @@ -1,4 +1,3 @@ - // (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard // Hinnant & John Maddock 2000. Permission to copy, use, modify, // sell and distribute this software is granted provided this @@ -49,8 +48,8 @@ yes_type BOOST_TT_DECL is_array_tester2(...); template< typename T > struct is_array_impl -{ - BOOST_STATIC_CONSTANT(bool, value = +{ + BOOST_STATIC_CONSTANT(bool, value = sizeof(::boost::detail::is_array_tester2( ::boost::detail::is_array_tester1( ::boost::type_traits::wrap() diff --git a/boost/boost/type_traits/is_reference.hpp b/boost/boost/type_traits/is_reference.hpp index 325d430d34..b89e529df2 100644 --- a/boost/boost/type_traits/is_reference.hpp +++ b/boost/boost/type_traits/is_reference.hpp @@ -1,4 +1,3 @@ - // (C) Copyright David Abrahams Steve Cleary, Beman Dawes, Howard // Hinnant & John Maddock 2000-2002. Permission to copy, use, // modify, sell and distribute this software is granted provided this @@ -26,7 +25,7 @@ // should be the last #include #include "boost/type_traits/detail/bool_trait_def.hpp" -namespace boost { +namespace boost { #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION @@ -108,4 +107,3 @@ BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_reference,T,::boost::detail::is_reference_impl + +using std::string; using std::bind2nd; using std::binary_function; diff --git a/src/BranchList.h b/src/BranchList.h index 403b3084ad..aaa5f15ecd 100644 --- a/src/BranchList.h +++ b/src/BranchList.h @@ -30,32 +30,33 @@ #ifndef BRANCHES_H #define BRANCHES_H -#include "support/std_string.h" +#include #include + class Branch { public: /// - string const getBranch() const; + std::string const getBranch() const; /// - void setBranch(string const &); + void setBranch(std::string const &); /// bool getSelected() const; /// void setSelected(bool); /// - string const getColor() const; + std::string const getColor() const; /// - void setColor(string const &); + void setColor(std::string const &); private: /// - string branch_; + std::string branch_; /// bool selected_; /// - string color_; + std::string color_; }; @@ -78,29 +79,29 @@ public: /// List::const_iterator end() const { return list.end(); } /// - string getColor(string const &) const; + std::string getColor(std::string const &) const; /// - void setColor(string const &, string const &); + void setColor(std::string const &, std::string const &); /// Select/deselect multiple branches given in '|'-separated string - void setSelected(string const &, bool); + void setSelected(std::string const &, bool); /// Add multiple branches to list - void add(string const &); + void add(std::string const &); /// remove a branch from list by name - void remove(string const &); + void remove(std::string const &); /// return whether this branch is selected - bool selected(string const &) const; + bool selected(std::string const &) const; /// return, as a '|'-separated string, all branch names - string allBranches() const; + std::string allBranches() const; /// - string allSelected() const; + std::string allSelected() const; /// - string const separator() const; + std::string const separator() const; private: /// List list; /// - string separator_; + std::string separator_; }; #endif diff --git a/src/BufferView.C b/src/BufferView.C index 6eab513d29..a71692b682 100644 --- a/src/BufferView.C +++ b/src/BufferView.C @@ -47,7 +47,7 @@ using lyx::support::bformat; using lyx::support::MakeAbsPath; using std::find; - +using std::string; using std::vector; diff --git a/src/BufferView.h b/src/BufferView.h index df086a8f7e..cb7246f6db 100644 --- a/src/BufferView.h +++ b/src/BufferView.h @@ -17,7 +17,8 @@ #include -#include "support/std_string.h" +#include + class Buffer; class Change; @@ -76,10 +77,10 @@ public: /// reload the contained buffer void reload(); /// create a new buffer based on template - bool newFile(string const & fname, string const & tname, + bool newFile(std::string const & fname, std::string const & tname, bool named = true); /// load a buffer into the view - bool loadLyXFile(string const & name, bool tolastfiles = true); + bool loadLyXFile(std::string const & name, bool tolastfiles = true); /// fit the user cursor within the visible view bool fitCursor(); @@ -137,14 +138,14 @@ public: /// Select the "current" word void selectLastWord(); /// replace the currently selected word - void replaceWord(string const & replacestring); + void replaceWord(std::string const & replacestring); /// Update after spellcheck finishes void endOfSpellCheck(); /// return the next word WordLangTuple const nextWord(float & value); /// move cursor to the named label - void gotoLabel(string const & label); + void gotoLabel(std::string const & label); /// undo last action void undo(); @@ -154,7 +155,7 @@ public: /// get the stored error list ErrorList const & getErrorList() const; /// show the error list to the user - void showErrorList(string const &) const; + void showErrorList(std::string const &) const; /// set the cursor based on the given TeX source row void setCursorFromRow(int row); @@ -162,10 +163,10 @@ public: * Insert an inset into the buffer. * Place it in a layout of lout, */ - bool insertInset(InsetOld * inset, string const & lout = string()); + bool insertInset(InsetOld * inset, std::string const & lout = std::string()); /// Inserts a lyx file at cursor position. return false if it fails - bool insertLyXFile(string const & file); + bool insertLyXFile(std::string const & file); /// FIXME bool fitLockedInsetCursor(int x, int y, int asc, int desc); @@ -189,12 +190,12 @@ public: void switchKeyMap(); /// FIXME - bool ChangeRefsIfUnique(string const & from, string const & to); + bool ChangeRefsIfUnique(std::string const & from, std::string const & to); /// get the contents of the window system clipboard - string const getClipboard() const; + std::string const getClipboard() const; /// fill the window system clipboard - void stuffClipboard(string const &) const; + void stuffClipboard(std::string const &) const; /// tell the window system we have a selection void haveSelection(bool sel); diff --git a/src/BufferView_pimpl.C b/src/BufferView_pimpl.C index 9fd3e06464..fb0b6ba74a 100644 --- a/src/BufferView_pimpl.C +++ b/src/BufferView_pimpl.C @@ -92,6 +92,7 @@ using lyx::support::system_lyxdir; using std::endl; using std::make_pair; using std::min; +using std::string; extern BufferList bufferlist; diff --git a/src/BufferView_pimpl.h b/src/BufferView_pimpl.h index 223a3e58b5..58704e2d70 100644 --- a/src/BufferView_pimpl.h +++ b/src/BufferView_pimpl.h @@ -64,9 +64,9 @@ struct BufferView::Pimpl : public boost::signals::trackable { * change but don't need the full update() logic */ /// - bool newFile(string const &, string const &, bool); + bool newFile(std::string const &, std::string const &, bool); /// - bool loadLyXFile(string const &, bool); + bool loadLyXFile(std::string const &, bool); /// void workAreaResize(); /// @@ -106,7 +106,7 @@ struct BufferView::Pimpl : public boost::signals::trackable { /// void center(); /// - bool insertInset(InsetOld * inset, string const & lout = string()); + bool insertInset(InsetOld * inset, std::string const & lout = std::string()); /// void updateInset(InsetOld const * inset); /// a function should be executed from the workarea @@ -152,8 +152,8 @@ private: * string. May only be used with InsetCommand-derived insets * Returns true if a screen update is needed. */ - bool ChangeInsets(InsetOld::Code code, string const & from, - string const & to); + bool ChangeInsets(InsetOld::Code code, std::string const & from, + std::string const & to); /// friend class BufferView; @@ -171,13 +171,13 @@ private: /// Timeout cursor_timeout; /// - void stuffClipboard(string const &) const; + void stuffClipboard(std::string const &) const; /// bool using_xterm_cursor; /// struct Position { /// Filename - string filename; + std::string filename; /// Cursor paragraph Id int par_id; /// Cursor position @@ -185,7 +185,7 @@ private: /// Position() : par_id(0), par_pos(0) {} /// - Position(string const & f, int id, lyx::pos_type pos) + Position(std::string const & f, int id, lyx::pos_type pos) : filename(f), par_id(id), par_pos(pos) {} }; /// @@ -193,7 +193,7 @@ private: /// Get next inset of this class from current cursor position InsetOld * getInsetByCode(InsetOld::Code code); /// - void MenuInsertLyXFile(string const & filen); + void MenuInsertLyXFile(std::string const & filen); /// our workarea WorkArea & workarea() const; }; diff --git a/src/Bullet.C b/src/Bullet.C index d362d81578..2eef9c5bbd 100644 --- a/src/Bullet.C +++ b/src/Bullet.C @@ -20,6 +20,8 @@ #include +using std::string; + /** The four LaTeX itemize environment default bullets */ diff --git a/src/Bullet.h b/src/Bullet.h index 5e4e72684b..0f16f15ce2 100644 --- a/src/Bullet.h +++ b/src/Bullet.h @@ -13,7 +13,7 @@ #ifndef BULLET_H #define BULLET_H -#include "support/std_string.h" +#include /// class Bullet { @@ -22,7 +22,7 @@ public: Bullet(int f = -1, int c = -1, int s = -1); /// - explicit Bullet(string const &); + explicit Bullet(std::string const &); /// void setCharacter(int); @@ -31,7 +31,7 @@ public: /// void setSize(int); /// - void setText(string const &); + void setText(std::string const &); /// int getCharacter() const; /// @@ -39,7 +39,7 @@ public: /// int getSize() const; /// - string const & getText() const; + std::string const & getText() const; /// Bullet & operator=(Bullet const &); /// @@ -70,9 +70,9 @@ private: /// void generateText() const; /// - static string const bulletSize(int); + static std::string const bulletSize(int); /// - static string const bulletEntry(int, int); + static std::string const bulletEntry(int, int); /// int font; @@ -97,7 +97,7 @@ private: or one generated internally from the font, character and size settings. */ - mutable string text; + mutable std::string text; }; diff --git a/src/ChangeLog b/src/ChangeLog index e33ad74353..7be9bf5877 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2003-10-06 Lars Gullik Bjønnes + + * All most all file in all subdirs: Make be the prefered + way of getting to std::string, add using declarations. 2003-10-06 André Pönitz @@ -24,7 +28,7 @@ 2003-09-26 Lars Gullik Bjønnes - * lyx_main.C: remove the global debug object + * lyx_main.C: remove the global debug object * debug.h: adjust for new debugstream diff --git a/src/Chktex.C b/src/Chktex.C index 9d3b726208..4f2fc6c6ae 100644 --- a/src/Chktex.C +++ b/src/Chktex.C @@ -30,7 +30,7 @@ using lyx::support::split; using lyx::support::Systemcall; using std::getline; - +using std::string; using std::ifstream; diff --git a/src/Chktex.h b/src/Chktex.h index aa8311501d..8af93a465c 100644 --- a/src/Chktex.h +++ b/src/Chktex.h @@ -12,11 +12,12 @@ #ifndef CHKTEX_H #define CHKTEX_H -#include "support/std_string.h" - class LyXLex; class TeXErrors; +#include + + /// class Chktex { public: @@ -25,8 +26,8 @@ public: @param file name of the (temporary) latex file. @param path name of the files original path. */ - Chktex(string const & cmd, string const & file, - string const & path); + Chktex(std::string const & cmd, std::string const & file, + std::string const & path); /** Runs chktex. @return -1 if fail, number of messages otherwise. @@ -37,13 +38,13 @@ private: int scanLogFile(TeXErrors &); /// - string cmd; + std::string cmd; /// - string file; + std::string file; /// - string path; + std::string path; }; #endif diff --git a/src/CutAndPaste.C b/src/CutAndPaste.C index fe04a7e3e1..a1205d72a4 100644 --- a/src/CutAndPaste.C +++ b/src/CutAndPaste.C @@ -37,6 +37,7 @@ using std::for_each; using std::make_pair; using std::pair; using std::vector; +using std::string; typedef limited_stack > CutStack; diff --git a/src/CutAndPaste.h b/src/CutAndPaste.h index ceefdc20d6..25cb10c136 100644 --- a/src/CutAndPaste.h +++ b/src/CutAndPaste.h @@ -17,7 +17,6 @@ #include "ParagraphList_fwd.h" #include "support/types.h" -#include "support/std_string.h" #include class Buffer; @@ -30,7 +29,7 @@ class Paragraph; namespace CutAndPaste { /// -std::vector +std::vector CutAndPaste::availableSelections(Buffer const & buffer); /// diff --git a/src/DepTable.C b/src/DepTable.C index 865c6250b3..a6440486cf 100644 --- a/src/DepTable.C +++ b/src/DepTable.C @@ -38,7 +38,7 @@ using lyx::support::sum; using std::endl; using std::flush; using std::getline; - +using std::string; using std::ofstream; using std::ifstream; diff --git a/src/DepTable.h b/src/DepTable.h index 94cc3abd91..6148f67736 100644 --- a/src/DepTable.h +++ b/src/DepTable.h @@ -13,7 +13,6 @@ #ifndef DEP_TABLE_H #define DEP_TABLE_H -#include "support/std_string.h" #include /// @@ -22,28 +21,28 @@ public: /** This one is a little bit harder since we need the absolute filename. Should we insert files with .sty .cls etc as extension? */ - void insert(string const & f, bool upd = false); + void insert(std::string const & f, bool upd = false); /// void update(); /// - void write(string const & f) const; + void write(std::string const & f) const; /// returns true if dep file was read successfully - bool read(string const & f); + bool read(std::string const & f); /// returns true if any of the files has changed bool sumchange() const; /// return true if fil has changed. - bool haschanged(string const & fil) const; + bool haschanged(std::string const & fil) const; /// return true if a file with extension ext has changed. - bool extchanged(string const & ext) const; + bool extchanged(std::string const & ext) const; /// - bool exist(string const & fil) const; + bool exist(std::string const & fil) const; /// returns true if any files with ext exist - bool ext_exist(string const & ext) const; + bool ext_exist(std::string const & ext) const; /// - void remove_files_with_extension(string const &); + void remove_files_with_extension(std::string const &); /// - void remove_file(string const &); + void remove_file(std::string const &); private: /// struct dep_info { @@ -57,7 +56,7 @@ private: bool changed() const; }; /// - typedef std::map DepList; + typedef std::map DepList; /// DepList deplist; }; diff --git a/src/FloatList.C b/src/FloatList.C index c48c12d388..7b1bf81ccf 100644 --- a/src/FloatList.C +++ b/src/FloatList.C @@ -13,6 +13,8 @@ #include "FloatList.h" #include "Floating.h" +using std::string; + // This class is now mostly finished, except one thing, it is a global // object. This will not do. The user (and layout files) are free to // create floats and modify them to fit into a certain document. So it is diff --git a/src/FloatList.h b/src/FloatList.h index 2b6082d240..212050f4e1 100644 --- a/src/FloatList.h +++ b/src/FloatList.h @@ -14,7 +14,6 @@ #include -#include "support/std_string.h" class Floating; @@ -22,7 +21,7 @@ class Floating; class FloatList { public: /// - typedef std::map List; + typedef std::map List; /// typedef List::const_iterator const_iterator; /// @@ -34,15 +33,15 @@ public: /// void newFloat(Floating const & fl); /// - string const defaultPlacement(string const & t) const; + std::string const defaultPlacement(std::string const & t) const; /// - bool typeExist(string const & t) const; + bool typeExist(std::string const & t) const; /// - Floating const & getType(string const & t) const; + Floating const & getType(std::string const & t) const; /// - void erase(string const & t); + void erase(std::string const & t); /// - const_iterator operator[](string const & t) const; + const_iterator operator[](std::string const & t) const; private: /// List list; diff --git a/src/Floating.C b/src/Floating.C index f4f4156852..824b1b7df1 100644 --- a/src/Floating.C +++ b/src/Floating.C @@ -14,6 +14,8 @@ #include "Floating.h" +using std::string; + Floating::Floating() {} diff --git a/src/Floating.h b/src/Floating.h index e3687e83ac..51c3dfb170 100644 --- a/src/Floating.h +++ b/src/Floating.h @@ -12,7 +12,7 @@ #ifndef FLOATING_H #define FLOATING_H -#include "support/std_string.h" +#include /** This is a "float layout" object. It contains the parameters for how to handle the different kinds of floats, default ones and user created ones. @@ -25,41 +25,41 @@ public: /// Floating(); /// - Floating(string const & type, string const & placement, - string const & ext, string const & within, - string const & style, string const & name, - string const & listName, bool builtin = false); + Floating(std::string const & type, std::string const & placement, + std::string const & ext, std::string const & within, + std::string const & style, std::string const & name, + std::string const & listName, bool builtin = false); /// - string const & type() const; + std::string const & type() const; /// - string const & placement() const; + std::string const & placement() const; /// - string const & ext() const; + std::string const & ext() const; /// - string const & within() const; + std::string const & within() const; /// - string const & style() const; + std::string const & style() const; /// - string const & name() const; + std::string const & name() const; /// - string const & listName() const; + std::string const & listName() const; /// bool builtin() const; private: /// - string type_; + std::string type_; /// - string placement_; + std::string placement_; /// - string ext_; + std::string ext_; /// - string within_; + std::string within_; /// - string style_; + std::string style_; /// - string name_; + std::string name_; /// - string listName_; + std::string listName_; /// bool builtin_; }; diff --git a/src/LColor.C b/src/LColor.C index 48a829eedf..ba42c4b761 100644 --- a/src/LColor.C +++ b/src/LColor.C @@ -26,6 +26,7 @@ using lyx::support::compare_ascii_no_case; using std::endl; +using std::string; namespace { diff --git a/src/LColor.h b/src/LColor.h index d07e899dc8..b62673dd52 100644 --- a/src/LColor.h +++ b/src/LColor.h @@ -19,7 +19,6 @@ #ifndef LCOLOR_H #define LCOLOR_H -#include "support/std_string.h" #include /** @@ -195,42 +194,42 @@ public: /// void LColor::fill(LColor::color c, - string const & lyxname, - string const & x11name = string(), - string const & latexname = string(), - string const & guiname = string()); + std::string const & lyxname, + std::string const & x11name = std::string(), + std::string const & latexname = std::string(), + std::string const & guiname = std::string()); /// set the given LyX color to the color defined by the X11 name given - void setColor(LColor::color col, string const & x11name); + void setColor(LColor::color col, std::string const & x11name); /// set the given LyX color to the color defined by the X11 name given - bool setColor(string const & lyxname, string const & x11name); + bool setColor(std::string const & lyxname, std::string const & x11name); /// Get GUI name of color - string const getGUIName(LColor::color c) const; + std::string const getGUIName(LColor::color c) const; /// - string const getGUIName(string const & s) const; + std::string const getGUIName(std::string const & s) const; /// Get X11 name of color - string const getX11Name(LColor::color c) const; + std::string const getX11Name(LColor::color c) const; /// - string const getX11Name(string const & s) const; + std::string const getX11Name(std::string const & s) const; /// Get LaTeX name of color - string const getLaTeXName(LColor::color c) const; + std::string const getLaTeXName(LColor::color c) const; /// - string const getLaTeXName(string const & s) const; + std::string const getLaTeXName(std::string const & s) const; /// Get LyX name of color - string const getLyXName(LColor::color c) const; + std::string const getLyXName(LColor::color c) const; /// (string-to-string version not needed as it is identity) /// size_t size() const; /// get the color from the GUI name - LColor::color getFromGUIName(string const & guiname) const; + LColor::color getFromGUIName(std::string const & guiname) const; /// get the color from the LyX name - LColor::color getFromLyXName(string const & lyxname) const; + LColor::color getFromLyXName(std::string const & lyxname) const; private: /// struct Pimpl; diff --git a/src/LaTeX.C b/src/LaTeX.C index e0ad719331..1f2a2e5343 100644 --- a/src/LaTeX.C +++ b/src/LaTeX.C @@ -59,7 +59,7 @@ using std::sscanf; using std::endl; using std::getline; - +using std::string; using std::ifstream; using std::set; using std::vector; diff --git a/src/LaTeX.h b/src/LaTeX.h index 148f700088..2c358795a7 100644 --- a/src/LaTeX.h +++ b/src/LaTeX.h @@ -15,13 +15,13 @@ #define LATEX_H #include "latexrunparams.h" -#include "support/std_string.h" -#include -#include #include #include +#include +#include + class DepTable; /// @@ -32,16 +32,16 @@ private: /// Error () : error_in_line(0) {} /// - Error(int line, string const & desc, string const & text) + Error(int line, std::string const & desc, std::string const & text) : error_in_line(line), error_desc(desc), error_text(text) {} /// what line in the TeX file the error occured in int error_in_line; /// The kind of error - string error_desc; + std::string error_desc; /// The line/cmd that caused the error. - string error_text; + std::string error_text; }; public: /// @@ -51,8 +51,8 @@ public: /// Errors::const_iterator end() const { return errors.end(); } /// - void insertError(int line, string const & error_desc, - string const & error_text); + void insertError(int line, std::string const & error_desc, + std::string const & error_text); private: /// Errors errors; @@ -64,13 +64,13 @@ public: /// Aux_Info() {} /// - string aux_file; + std::string aux_file; /// - std::set citations; + std::set citations; /// - std::set databases; + std::set databases; /// - std::set styles; + std::set styles; }; @@ -125,15 +125,15 @@ public: }; /// This signal emits an informative message - boost::signal1 message; + boost::signal1 message; /** cmd = the latex command, file = name of the (temporary) latex file, path = name of the files original path. */ - LaTeX(string const & cmd, LatexRunParams const &, - string const & file, string const & path); + LaTeX(std::string const & cmd, LatexRunParams const &, + std::string const & file, std::string const & path); /// runs LaTeX several times int run(TeXErrors &); @@ -149,22 +149,22 @@ private: int startscript(); /// The dependency file. - string depfile; + std::string depfile; /// void deplog(DepTable & head); /// - bool runMakeIndex(string const &); + bool runMakeIndex(std::string const &); /// - std::vector const scanAuxFiles(string const &); + std::vector const scanAuxFiles(std::string const &); /// - Aux_Info const scanAuxFile(string const &); + Aux_Info const scanAuxFile(std::string const &); /// - void scanAuxFile(string const &, Aux_Info &); + void scanAuxFile(std::string const &, Aux_Info &); /// void updateBibtexDependencies(DepTable &, @@ -177,19 +177,19 @@ private: void deleteFilesOnError() const; /// - string cmd; + std::string cmd; /// - string file; + std::string file; /// - string path; + std::string path; /// used by scanLogFile int num_errors; /// The name of the final output file. - string output_file; + std::string output_file; /// LatexRunParams runparams; diff --git a/src/LaTeXFeatures.C b/src/LaTeXFeatures.C index cf96b66de4..b70b7decc3 100644 --- a/src/LaTeXFeatures.C +++ b/src/LaTeXFeatures.C @@ -35,7 +35,7 @@ using lyx::support::OnlyPath; using std::endl; using std::find; - +using std::string; using std::list; using std::ostream; using std::ostringstream; diff --git a/src/LaTeXFeatures.h b/src/LaTeXFeatures.h index 90b49c2ba5..daa6231c2b 100644 --- a/src/LaTeXFeatures.h +++ b/src/LaTeXFeatures.h @@ -14,8 +14,6 @@ #define LATEXFEATURES_H -#include "support/std_string.h" - #include #include #include @@ -42,41 +40,41 @@ public: /// LaTeXFeatures(Buffer const &, BufferParams const &); /// The packages needed by the document - string const getPackages() const; + std::string const getPackages() const; /// The macros definitions needed by the document - string const getMacros() const; + std::string const getMacros() const; /// - string const getBabelOptions() const; + std::string const getBabelOptions() const; /// The definitions needed by the document's textclass - string const getTClassPreamble() const; + std::string const getTClassPreamble() const; /// The sgml definitions needed by the document (dobook/linuxdoc) - string const getLyXSGMLEntities() const; + std::string const getLyXSGMLEntities() const; /// The SGML Required to include the files added with includeFile(); - string const getIncludedFiles(string const & fname) const; + std::string const getIncludedFiles(std::string const & fname) const; /// Include a file for use with the SGML entities - void includeFile(string const & key, string const & name); + void includeFile(std::string const & key, std::string const & name); /// The float definitions. void getFloatDefinitions(std::ostream & os) const; /// Print requirements to lyxerr void showStruct() const; /// - void addExternalPreamble(string const &); + void addExternalPreamble(std::string const &); /// Provide a string name-space to the requirements - void require(string const & name); + void require(std::string const & name); /// Is the package required? - bool isRequired(string const & name) const; + bool isRequired(std::string const & name) const; /// - void useFloat(string const & name); + void useFloat(std::string const & name); /// void useLanguage(Language const *); /// bool hasLanguages() const; /// - string getLanguages() const; + std::string getLanguages() const; /// - std::set getEncodingSet(string const & doc_encoding) const; + std::set getEncodingSet(std::string const & doc_encoding) const; /// - void useLayout(string const & lyt); + void useLayout(std::string const & lyt); /// Buffer const & buffer() const; /// @@ -85,10 +83,10 @@ public: bool useBabel() const; private: - std::list usedLayouts_; + std::list usedLayouts_; /// Static preamble bits from the external material insets - typedef std::list FeaturesList; + typedef std::list FeaturesList; /// FeaturesList features_; /// @@ -98,11 +96,11 @@ private: /// LanguageList UsedLanguages_; /// - typedef std::set UsedFloats; + typedef std::set UsedFloats; /// UsedFloats usedFloats_; /// - typedef std::map FileMap; + typedef std::map FileMap; /// FileMap IncludedFiles_; /// diff --git a/src/LyXAction.C b/src/LyXAction.C index d7eee1b91e..ff0c40e1f2 100644 --- a/src/LyXAction.C +++ b/src/LyXAction.C @@ -26,7 +26,7 @@ using lyx::support::split; using lyx::support::trim; using std::endl; - +using std::string; using std::ostream; diff --git a/src/LyXAction.h b/src/LyXAction.h index 3e0241acbd..ce2d452764 100644 --- a/src/LyXAction.h +++ b/src/LyXAction.h @@ -15,10 +15,10 @@ #include "lfuns.h" -#include "support/std_string.h" #include -#include +#include +#include class FuncRequest; @@ -34,14 +34,14 @@ private: /// information for an action struct func_info { /// the action name - string name; + std::string name; /// the func_attrib values set unsigned int attrib; }; public: /// type for map between a function name and its action - typedef std::map func_map; + typedef std::map func_map; /// type for map between an action and its info typedef std::map info_map; @@ -60,10 +60,10 @@ public: * If you include arguments in func_name, a new pseudoaction * will be created if needed. */ - FuncRequest lookupFunc(string const & func_name) const; + FuncRequest lookupFunc(std::string const & func_name) const; /// Return the name (and argument) associated with the given (pseudo) action - string const getActionName(kb_action action) const; + std::string const getActionName(kb_action action) const; /// True if the command has `flag' set bool funcHasFlag(kb_action action, func_attrib flag) const; @@ -81,7 +81,7 @@ private: /// populate the action container with our actions void init(); /// add the given action - void newFunc(kb_action, string const & name, unsigned int attrib); + void newFunc(kb_action, std::string const & name, unsigned int attrib); /** * This is a list of all the LyXFunc names with the diff --git a/src/MenuBackend.C b/src/MenuBackend.C index d3b9e8a205..6bf49ce947 100644 --- a/src/MenuBackend.C +++ b/src/MenuBackend.C @@ -55,7 +55,7 @@ using std::endl; using std::find_if; using std::max; using std::sort; - +using std::string; using std::vector; diff --git a/src/MenuBackend.h b/src/MenuBackend.h index 2d9bfa887e..6234d3a874 100644 --- a/src/MenuBackend.h +++ b/src/MenuBackend.h @@ -16,8 +16,6 @@ #include "FuncStatus.h" #include "funcrequest.h" -#include "support/std_string.h" - #include #include @@ -73,23 +71,23 @@ public: explicit MenuItem(Kind kind); MenuItem(Kind kind, - string const & label, - string const & command = string(), + std::string const & label, + std::string const & command = std::string(), bool optional = false); MenuItem(Kind kind, - string const & label, + std::string const & label, FuncRequest const & func, bool optional = false); /// This one is just to please boost::shared_ptr<> ~MenuItem(); /// The label of a given menuitem - string const label() const; + std::string const label() const; /// The keyboard shortcut (usually underlined in the entry) - string const shortcut() const; + std::string const shortcut() const; /// The complete label, with label and shortcut separated by a '|' - string const fulllabel() const { return label_;} + std::string const fulllabel() const { return label_;} /// The kind of entry Kind kind() const { return kind_; } /// the action (if relevant) @@ -103,11 +101,11 @@ public: /// returns the status of the lfun associated with this entry void status(FuncStatus const & status) { status_ = status; } /// returns the binding associated to this action - string const binding() const; + std::string const binding() const; /// the description of the submenu (if relevant) - string const & submenuname() const { return submenuname_; } + std::string const & submenuname() const { return submenuname_; } /// set the description of the submenu - void submenuname(string const & name) { submenuname_ = name; } + void submenuname(std::string const & name) { submenuname_ = name; } /// Menu * submenu() const { return submenu_.get(); } /// @@ -118,11 +116,11 @@ private: /// Kind kind_; /// - string label_; + std::string label_; /// FuncRequest func_; /// - string submenuname_; + std::string submenuname_; /// bool optional_; /// @@ -142,20 +140,20 @@ public: /// typedef ItemList::size_type size_type; /// - explicit Menu(string const & name = string()) + explicit Menu(std::string const & name = std::string()) : name_(name) {} /// Menu & add(MenuItem const &, LyXView const * view = 0); /// Menu & read(LyXLex &); /// - string const & name() const { return name_; } + std::string const & name() const { return name_; } /// bool empty() const { return items_.empty(); } /// ItemList::size_type size() const { return items_.size(); } /// - bool hasSubmenu(string const &) const; + bool hasSubmenu(std::string const &) const; /// const_iterator begin() const { return items_.begin(); @@ -173,7 +171,7 @@ private: /// ItemList items_; /// - string name_; + std::string name_; }; @@ -189,11 +187,11 @@ public: /// void add(Menu const &); /// - bool hasMenu(string const &) const; + bool hasMenu(std::string const &) const; /// - Menu & getMenu(string const &); + Menu & getMenu(std::string const &); /// - Menu const & getMenu(string const &) const; + Menu const & getMenu(std::string const &) const; /// Menu const & getMenubar() const; /// diff --git a/src/ParagraphParameters.C b/src/ParagraphParameters.C index 8758cb6aed..cd9bd49bc0 100644 --- a/src/ParagraphParameters.C +++ b/src/ParagraphParameters.C @@ -37,6 +37,7 @@ using lyx::support::rtrim; using std::istringstream; using std::ostream; using std::ostringstream; +using std::string; // Initialize static member var. diff --git a/src/ParagraphParameters.h b/src/ParagraphParameters.h index 03cd251c89..60aaeba7aa 100644 --- a/src/ParagraphParameters.h +++ b/src/ParagraphParameters.h @@ -19,7 +19,6 @@ #include "support/types.h" -#include "support/std_string.h" #include class BufferView; @@ -90,13 +89,13 @@ public: /// void appendix(bool); /// - string const & labelString() const; + std::string const & labelString() const; /// - void labelString(string const &); + void labelString(std::string const &); /// - string const & labelWidthString() const; + std::string const & labelWidthString() const; /// - void labelWidthString(string const &); + void labelWidthString(std::string const &); /// LyXLength const & leftIndent() const; /// @@ -122,12 +121,12 @@ private: The function also generates some additional info needed by the Paragraph dialog. */ -void params2string(Paragraph const & par, string & data); +void params2string(Paragraph const & par, std::string & data); /** Given \param data, an encoding of the ParagraphParameters generated in the Paragraph dialog, this function sets the current paragraph appropriately. */ -void setParagraphParams(BufferView & bv, string const & data); +void setParagraphParams(BufferView & bv, std::string const & data); #endif diff --git a/src/ParameterStruct.h b/src/ParameterStruct.h index 2e77863104..a45d00fbfc 100644 --- a/src/ParameterStruct.h +++ b/src/ParameterStruct.h @@ -51,9 +51,9 @@ struct ParameterStruct { /// bool appendix; /// - string labelstring; + std::string labelstring; /// - string labelwidthstring; + std::string labelwidthstring; /// LyXLength leftindent; }; diff --git a/src/PrinterParams.C b/src/PrinterParams.C index 0813327dcc..850eedf279 100644 --- a/src/PrinterParams.C +++ b/src/PrinterParams.C @@ -16,6 +16,8 @@ #include +using std::string; + PrinterParams::PrinterParams(Target t, string const & pname, diff --git a/src/PrinterParams.h b/src/PrinterParams.h index 8ce49bf5db..443f29aa4a 100644 --- a/src/PrinterParams.h +++ b/src/PrinterParams.h @@ -33,9 +33,9 @@ struct PrinterParams { /// Target target; /// - string printer_name; + std::string printer_name; /// - string file_name; + std::string file_name; /// bool all_pages; /** Print a page range. Both from_page and to_page used to be strings @@ -76,8 +76,8 @@ struct PrinterParams { void testInvariant() const; /// PrinterParams(Target t = PRINTER, - string const & pname = lyxrc.printer, - string const & fname = string(), + std::string const & pname = lyxrc.printer, + std::string const & fname = std::string(), bool all = true, unsigned int from = 1, unsigned int to = 0, diff --git a/src/Sectioning.h b/src/Sectioning.h index 3e89caa85f..5bdc5b3963 100644 --- a/src/Sectioning.h +++ b/src/Sectioning.h @@ -12,39 +12,39 @@ #ifndef SECTIONING_H #define SECTIONING_H +#include "lyxfont.h" + #include -#include "support/std_string.h" -#include "lyxfont.h" /// class Section { public: /// - string const & name() const; + std::string const & name() const; /// int level() const; /// - string const & indent() const; + std::string const & indent() const; /// - string const & beforeskip() const; + std::string const & beforeskip() const; /// - string const & afterskip() const; + std::string const & afterskip() const; /// LyXFont const & style() const; /// bool display() const; private: /// - string name_; + std::string name_; /// int level_; /// - string indent_; + std::string indent_; /// - string beforeskip_; + std::string beforeskip_; /// - string afterskip_; + std::string afterskip_; /// LyXFont style_; }; @@ -54,7 +54,7 @@ private: class SectioningList { private: /// - typedef std::map List_; + typedef std::map List_; /// List_ list_; }; diff --git a/src/Spacing.C b/src/Spacing.C index e2142caa29..0987e337bd 100644 --- a/src/Spacing.C +++ b/src/Spacing.C @@ -18,6 +18,7 @@ using std::ios; using std::istringstream; using std::ostream; using std::ostringstream; +using std::string; string const Spacing::spacing_string[] diff --git a/src/Spacing.h b/src/Spacing.h index 5c51bb49f4..4d25b3fd96 100644 --- a/src/Spacing.h +++ b/src/Spacing.h @@ -14,7 +14,6 @@ #include -#include "support/std_string.h" /// class Spacing { @@ -38,7 +37,7 @@ public: Spacing(Spacing::Space sp, float val = 1.0) { set(sp, val); } - Spacing(Spacing::Space sp, string const & val) { + Spacing(Spacing::Space sp, std::string const & val) { set(sp, val); } /// @@ -52,13 +51,13 @@ public: /// void set(Spacing::Space sp, float val = 1.0); /// - void set(Spacing::Space sp, string const & val) ; + void set(Spacing::Space sp, std::string const & val) ; /// void writeFile(std::ostream &, bool para = false) const; /// - string const writeEnvirBegin() const; + std::string const writeEnvirBegin() const; /// - string const writeEnvirEnd() const; + std::string const writeEnvirEnd() const; private: /// @@ -66,7 +65,7 @@ private: /// float value; /// names of line spacing - static string const spacing_string[]; + static std::string const spacing_string[]; }; diff --git a/src/SpellBase.h b/src/SpellBase.h index c0b6508f20..dbdf6b7420 100644 --- a/src/SpellBase.h +++ b/src/SpellBase.h @@ -13,7 +13,7 @@ #ifndef SPELL_BASE_H #define SPELL_BASE_H -#include "support/std_string.h" // can't forward declare... +#include class BufferParams; class WordLangTuple; @@ -49,10 +49,10 @@ public: virtual void accept(WordLangTuple const &) = 0; /// return the next near miss after a MISSED result - virtual string const nextMiss() = 0; + virtual std::string const nextMiss() = 0; /// give an error message on messy exit - virtual string const error() = 0; + virtual std::string const error() = 0; }; diff --git a/src/TextCache.C b/src/TextCache.C index 752f53685a..4d8032554a 100644 --- a/src/TextCache.C +++ b/src/TextCache.C @@ -21,7 +21,7 @@ using std::endl; using std::find_if; using std::for_each; using std::make_pair; - +using std::string; using std::ostream; extern BufferList bufferlist; diff --git a/src/TextCache.h b/src/TextCache.h index eea20a7ffa..d8ae4ce383 100644 --- a/src/TextCache.h +++ b/src/TextCache.h @@ -12,8 +12,6 @@ #ifndef TEXT_CACHE_H #define TEXT_CACHE_H -#include "support/std_string.h" - #include #include @@ -117,7 +115,7 @@ public: LyXText * findFit(Buffer * b, int p); /** Lists all the LyXText's currently in the cache. Uses msg as header for the list. */ - void show(std::ostream & o, string const & msg); + void show(std::ostream & o, std::string const & msg); /// Gives info on a single LyXText (buffer and width) static void show(std::ostream & o, value_type const &); /** Adds a LyXText to the cache iff its buffer is diff --git a/src/Thesaurus.C b/src/Thesaurus.C index 37376bc5b0..e8a6385cff 100644 --- a/src/Thesaurus.C +++ b/src/Thesaurus.C @@ -12,9 +12,12 @@ #include "Thesaurus.h" -#ifdef HAVE_LIBAIKSAURUS - #include +#include + +using std::string; + +#ifdef HAVE_LIBAIKSAURUS using std::sort; diff --git a/src/Thesaurus.h b/src/Thesaurus.h index f92f2e2510..a673e04765 100644 --- a/src/Thesaurus.h +++ b/src/Thesaurus.h @@ -15,7 +15,6 @@ #include #include -#include "support/std_string.h" #ifdef HAVE_LIBAIKSAURUS #include AIKSAURUS_H_LOCATION #endif @@ -31,12 +30,12 @@ public: /// ~Thesaurus(); - typedef std::map > Meanings; + typedef std::map > Meanings; /** * look up some text in the thesaurus */ - Meanings lookup(string const & text); + Meanings lookup(std::string const & text); private: #ifdef HAVE_LIBAIKSAURUS diff --git a/src/ToolbarBackend.C b/src/ToolbarBackend.C index 01cad0b86b..cebf1262bd 100644 --- a/src/ToolbarBackend.C +++ b/src/ToolbarBackend.C @@ -30,7 +30,7 @@ using lyx::support::subst; using std::endl; using std::make_pair; - +using std::string; using std::vector; diff --git a/src/ToolbarBackend.h b/src/ToolbarBackend.h index 58a88765be..873da4df31 100644 --- a/src/ToolbarBackend.h +++ b/src/ToolbarBackend.h @@ -17,7 +17,6 @@ #include -#include "support/std_string.h" class LyXLex; @@ -36,7 +35,7 @@ public: }; /// action, tooltip - typedef std::pair Item; + typedef std::pair Item; /// the toolbar items typedef std::vector Items; @@ -56,7 +55,7 @@ public: /// a toolbar struct Toolbar { /// toolbar UI name - string name; + std::string name; /// toolbar contents Items items; /// flags @@ -85,12 +84,12 @@ public: void readToolbars(LyXLex &); /// return a full path of an XPM for the given action - static string const getIcon(FuncRequest const &); + static std::string const getIcon(FuncRequest const &); private: /// add the given lfun with tooltip if relevant void add(Toolbar & tb, FuncRequest const &, - string const & tooltip = string()); + std::string const & tooltip = std::string()); /// all the toolbars Toolbars toolbars; diff --git a/src/Variables.h b/src/Variables.h index b73b63a156..5a06b64347 100644 --- a/src/Variables.h +++ b/src/Variables.h @@ -13,7 +13,6 @@ #ifndef VARIABLES_H #define VARIABLES_H -#include "support/std_string.h" #include @@ -21,16 +20,16 @@ class Variables { public: /// - void set(string const &, string const &); + void set(std::string const &, std::string const &); /// - string const get(string const &) const; + std::string const get(std::string const &) const; /// - bool isSet(string const & var) const; + bool isSet(std::string const & var) const; /// - string const expand(string const &) const; + std::string const expand(std::string const &) const; private: /// - typedef std::map Vars; + typedef std::map Vars; /// Vars vars_; }; diff --git a/src/WordLangTuple.h b/src/WordLangTuple.h index e0a1d8eed4..69d2f742f3 100644 --- a/src/WordLangTuple.h +++ b/src/WordLangTuple.h @@ -12,8 +12,6 @@ #ifndef WORD_LANG_TUPLE_H #define WORD_LANG_TUPLE_H -#include "support/std_string.h" - /** * A word and its given language code ("en_US"). * This is used for spellchecking. @@ -22,25 +20,25 @@ class WordLangTuple { public: WordLangTuple() {} - WordLangTuple(string const & w, string const & c) + WordLangTuple(std::string const & w, std::string const & c) : word_(w), code_(c) {} /// return the word - string const & word() const { + std::string const & word() const { return word_; } /// return its language code - string const & lang_code() const { + std::string const & lang_code() const { return code_; } private: /// the word - string word_; + std::string word_; /// language code of word - string code_; + std::string code_; }; #endif // WORD_LANG_TUPLE_H diff --git a/src/author.C b/src/author.C index fed15aef27..a81b67325c 100644 --- a/src/author.C +++ b/src/author.C @@ -21,6 +21,8 @@ using lyx::support::token; using lyx::support::trim; +using std::string; + bool operator==(Author const & l, Author const & r) { diff --git a/src/author.h b/src/author.h index a928bc8d1a..d3e8964041 100644 --- a/src/author.h +++ b/src/author.h @@ -14,30 +14,30 @@ #include #include +#include -#include "support/std_string.h" class Author { public: Author() {} - Author(string const & name, string const & email) + Author(std::string const & name, std::string const & email) : name_(name), email_(email) {} - string const name() const { + std::string const name() const { return name_; } - string const email() const { + std::string const email() const { return email_; } friend std::istream & operator>>(std::istream & os, Author & a); private: - string name_; + std::string name_; - string email_; + std::string email_; }; diff --git a/src/buffer.C b/src/buffer.C index 3d3fb2c897..6bf7ac231f 100644 --- a/src/buffer.C +++ b/src/buffer.C @@ -123,6 +123,7 @@ using std::ofstream; using std::pair; using std::stack; using std::vector; +using std::string; // all these externs should eventually be removed. diff --git a/src/buffer.h b/src/buffer.h index 3e8ab31b85..ff15795ee4 100644 --- a/src/buffer.h +++ b/src/buffer.h @@ -22,7 +22,6 @@ #include #include -#include "support/std_string.h" #include #include #include @@ -65,7 +64,7 @@ public: \param file \param b optional \c false by default */ - explicit Buffer(string const & file, bool b = false); + explicit Buffer(std::string const & file, bool b = false); /// Destructor ~Buffer(); @@ -73,7 +72,7 @@ public: /** High-level interface to buffer functionality. This function parses a command string and executes it */ - bool dispatch(string const & command, bool * result = 0); + bool dispatch(std::string const & command, bool * result = 0); /// Maybe we know the function already by number... bool dispatch(FuncRequest const & func, bool * result = 0); @@ -82,9 +81,9 @@ public: void loadAutoSaveFile(); /// load a new file - bool readFile(string const & filename); + bool readFile(std::string const & filename); - bool readFile(string const & filename, ParagraphList::iterator pit); + bool readFile(std::string const & filename, ParagraphList::iterator pit); /// read the header, returns number of unknown tokens int readHeader(LyXLex & lex); @@ -96,14 +95,14 @@ public: bool readBody(LyXLex &, ParagraphList::iterator pit); /// This parses a single token - int readParagraph(LyXLex &, string const & token, + int readParagraph(LyXLex &, std::string const & token, ParagraphList & pars, ParagraphList::iterator & pit, lyx::depth_type & depth); /// void insertStringAsLines(ParagraphList::iterator &, lyx::pos_type &, - LyXFont const &, string const &); + LyXFont const &, std::string const &); /// ParIterator getParFromID(int id) const; /// do we have a paragraph with this id? @@ -112,7 +111,7 @@ public: /// This signal is emitted when a parsing error shows up. boost::signal1 error; /// This signal is emitted when some message shows up. - boost::signal1 message; + boost::signal1 message; /// This signal is emitted when the buffer busy status change. boost::signal1 busy; /// This signal is emitted when the buffer readonly status change. @@ -132,24 +131,24 @@ public: bool save() const; /// Write file. Returns \c false if unsuccesful. - bool writeFile(string const &) const; + bool writeFile(std::string const &) const; /// - void writeFileAscii(string const &, int); + void writeFileAscii(std::string const &, int); /// void writeFileAscii(std::ostream &, int); /// - string const asciiParagraph(Paragraph const &, unsigned int linelen, + std::string const asciiParagraph(Paragraph const &, unsigned int linelen, bool noparbreak = false) const; /// Just a wrapper for the method below, first creating the ofstream. - void makeLaTeXFile(string const & filename, - string const & original_path, + void makeLaTeXFile(std::string const & filename, + std::string const & original_path, LatexRunParams const &, bool output_preamble = true, bool output_body = true); /// void makeLaTeXFile(std::ostream & os, - string const & original_path, + std::string const & original_path, LatexRunParams const &, bool output_preamble = true, bool output_body = true); @@ -163,15 +162,15 @@ public: ParagraphList::iterator par, lyx::depth_type depth) const; /// - void makeLinuxDocFile(string const & filename, + void makeLinuxDocFile(std::string const & filename, bool nice, bool only_body = false); /// - void makeDocBookFile(string const & filename, + void makeDocBookFile(std::string const & filename, bool nice, bool only_body = false); /// returns the main language for the buffer (document) Language const * getLanguage() const; /// get l10n translated to the buffers language - string const B_(string const & l10n) const; + std::string const B_(std::string const & l10n) const; /// int runChktex(); @@ -180,7 +179,7 @@ public: /// bool isBakClean() const; /// - bool isDepClean(string const & name) const; + bool isDepClean(std::string const & name) const; /// mark the main lyx file as not needing saving void markClean() const; @@ -189,7 +188,7 @@ public: void markBakClean(); /// - void markDepClean(string const & name); + void markDepClean(std::string const & name); /// void setUnnamed(bool flag = true); @@ -201,25 +200,25 @@ public: void markDirty(); /// Returns the buffer's filename. It is always an absolute path. - string const & fileName() const; + std::string const & fileName() const; /// Returns the the path where the buffer lives. /// It is always an absolute path. - string const & filePath() const; + std::string const & filePath() const; /** A transformed version of the file name, adequate for LaTeX. \param no_path optional if \c true then the path is stripped. */ - string const getLatexName(bool no_path = true) const; + std::string const getLatexName(bool no_path = true) const; /// Get the name and type of the log. - std::pair const getLogName() const; + std::pair const getLogName() const; /// Change name of buffer. Updates "read-only" flag. - void setFileName(string const & newfile); + void setFileName(std::string const & newfile); /// Name of the document's parent - void setParentName(string const &); + void setParentName(std::string const &); /// Is buffer read-only? bool isReadonly() const; @@ -251,9 +250,9 @@ public: void validate(LaTeXFeatures &) const; /// return all bibkeys from buffer and its childs - void fillWithBibKeys(std::vector > & keys) const; + void fillWithBibKeys(std::vector > & keys) const; /// - void getLabelList(std::vector &) const; + void getLabelList(std::vector &) const; /// void changeLanguage(Language const * from, Language const * to); @@ -288,7 +287,7 @@ public: LyXVC const & lyxvc() const; /// Where to put temporary files. - string const & temppath() const; + std::string const & temppath() const; /** If we are writing a nice LaTeX file or not. While writing as LaTeX, tells whether we are @@ -373,7 +372,7 @@ private: \param par if != 0 insert the file. \return \c false if method fails. */ - bool readFile(LyXLex &, string const & filename, + bool readFile(LyXLex &, std::string const & filename, ParagraphList::iterator pit); bool do_writeFile(std::ostream & ofs) const; diff --git a/src/buffer_funcs.C b/src/buffer_funcs.C index 9319a9d22d..425bb3431a 100644 --- a/src/buffer_funcs.C +++ b/src/buffer_funcs.C @@ -40,6 +40,8 @@ using lyx::support::OnlyFilename; using lyx::support::OnlyPath; using lyx::support::unlink; +using std::string; + extern BufferList bufferlist; diff --git a/src/buffer_funcs.h b/src/buffer_funcs.h index 24b5a5d97a..7d741eaf37 100644 --- a/src/buffer_funcs.h +++ b/src/buffer_funcs.h @@ -12,7 +12,8 @@ #ifndef BUFFER_FUNCS_H #define BUFFER_FUNCS_H -#include "support/std_string.h" +#include + class Buffer; class TeXErrors; @@ -22,16 +23,16 @@ class ErrorList; * Loads a LyX file \c filename into \c Buffer * and \return success status. */ -bool loadLyXFile(Buffer *, string const & filename); +bool loadLyXFile(Buffer *, std::string const & filename); /* Make a new file (buffer) with name \c filename based on a template * named \c templatename */ -Buffer * newFile(string const & filename, string const & templatename, +Buffer * newFile(std::string const & filename, std::string const & templatename, bool isNamed = false); ///return the format of the buffer on a string -string const BufferFormat(Buffer const & buffer); +std::string const BufferFormat(Buffer const & buffer); /// void bufferErrors(Buffer const &, TeXErrors const &); /// diff --git a/src/bufferlist.C b/src/bufferlist.C index 45157aabf4..d1b215bf86 100644 --- a/src/bufferlist.C +++ b/src/bufferlist.C @@ -42,7 +42,7 @@ using std::endl; using std::find; using std::find_if; using std::for_each; - +using std::string; using std::vector; diff --git a/src/bufferlist.h b/src/bufferlist.h index b7ca0cf59e..84f9a8047e 100644 --- a/src/bufferlist.h +++ b/src/bufferlist.h @@ -12,8 +12,6 @@ #ifndef BUFFER_LIST_H #define BUFFER_LIST_H -#include "support/std_string.h" - #include #include @@ -33,7 +31,7 @@ public: bool quitWriteAll(); /// create a new buffer - Buffer * newBuffer(string const & s, bool ronly = false); + Buffer * newBuffer(std::string const & s, bool ronly = false); /// delete a buffer void release(Buffer * b); @@ -42,10 +40,10 @@ public: void closeAll(); /// returns a vector with all the buffers filenames - std::vector const getFileNames() const; + std::vector const getFileNames() const; /// FIXME - void updateIncludedTeXfiles(string const &, LatexRunParams const &); + void updateIncludedTeXfiles(std::string const &, LatexRunParams const &); /// emergency save for all buffers void emergencyWriteAll(); @@ -60,18 +58,18 @@ public: Buffer * first(); /// returns true if the buffer exists already - bool exists(string const &) const; + bool exists(std::string const &) const; /// returns true if the buffer is loaded bool isLoaded(Buffer const * b) const; /// returns a pointer to the buffer with the given name. - Buffer * getBuffer(string const &); + Buffer * getBuffer(std::string const &); /// returns a pointer to the buffer with the given number. Buffer * getBuffer(unsigned int); /// reset current author for all buffers - void setCurrentAuthor(string const & name, string const & email); + void setCurrentAuthor(std::string const & name, std::string const & email); private: /// ask to save a buffer on quit, returns false if should cancel diff --git a/src/bufferparams.C b/src/bufferparams.C index 49a69d0716..243fd69b42 100644 --- a/src/bufferparams.C +++ b/src/bufferparams.C @@ -49,7 +49,7 @@ using lyx::support::rtrim; using lyx::support::tokenPos; using std::endl; - +using std::string; using std::istringstream; using std::ostream; using std::ostringstream; diff --git a/src/bufferparams.h b/src/bufferparams.h index 6df7e92ea0..c28025658a 100644 --- a/src/bufferparams.h +++ b/src/bufferparams.h @@ -23,7 +23,6 @@ #include "support/copied_ptr.h" #include "support/types.h" -#include "support/std_string.h" #include @@ -57,7 +56,7 @@ public: ~BufferParams(); /// read a header token, if unrecognised, return it or an unknown class name - string const readToken(LyXLex & lex, string const & token); + std::string const readToken(LyXLex & lex, std::string const & token); /// void writeFile(std::ostream &) const; @@ -92,7 +91,7 @@ public: /// InsetQuotes::quote_times quotes_times; /// - string fontsize; + std::string fontsize; /// lyx::textclass_type textclass; /// @@ -110,29 +109,29 @@ public: /// bool use_geometry; /// - string paperwidth; + std::string paperwidth; /// - string paperheight; + std::string paperheight; /// - string leftmargin; + std::string leftmargin; /// - string topmargin; + std::string topmargin; /// - string rightmargin; + std::string rightmargin; /// - string bottommargin; + std::string bottommargin; /// - string headheight; + std::string headheight; /// - string headsep; + std::string headsep; /// - string footskip; + std::string footskip; /* some LaTeX options */ /// The graphics driver - string graphicsDriver; + std::string graphicsDriver; /// - string fonts; + std::string fonts; /// Spacing & spacing(); Spacing const & spacing() const; @@ -146,19 +145,19 @@ public: BranchList & branchlist(); BranchList const & branchlist() const; /// - string inputenc; + std::string inputenc; /// - string preamble; + std::string preamble; /// - string options; + std::string options; /// - string float_placement; + std::string float_placement; /// unsigned int columns; /// LyXTextClass::PageSides sides; /// - string pagestyle; + std::string pagestyle; /// \param index should lie in the range 0 <= \c index <= 3. Bullet & temp_bullet(lyx::size_type index); Bullet const & temp_bullet(lyx::size_type index) const; @@ -186,7 +185,7 @@ public: /// revision tracking for this buffer ? bool tracking_changes; /// Time ago we agreed that this was a buffer property [ale990407] - string parentname; + std::string parentname; /// bool compressed; @@ -197,9 +196,9 @@ public: /// map of the file's author IDs to buffer author IDs std::vector author_map; /// - string const dvips_options() const; + std::string const dvips_options() const; /// - string const paperSizeName() const; + std::string const paperSizeName() const; private: /** Use the Pimpl idiom to hide those member variables that would otherwise diff --git a/src/bufferview_funcs.C b/src/bufferview_funcs.C index 0d56ad2f6d..cf8b1b3049 100644 --- a/src/bufferview_funcs.C +++ b/src/bufferview_funcs.C @@ -42,6 +42,7 @@ using lyx::support::bformat; using std::istringstream; using std::ostringstream; +using std::string; namespace { @@ -374,7 +375,7 @@ string const currentState(BufferView * bv) state << inset << " id: " << inset->id() << " text: " << inset->getLyXText(bv, true) << " owner: " << inset->owner(); - else + else state << -1; #endif return state.str(); diff --git a/src/bufferview_funcs.h b/src/bufferview_funcs.h index 1bf167bd9b..6ecc07ea7f 100644 --- a/src/bufferview_funcs.h +++ b/src/bufferview_funcs.h @@ -14,30 +14,32 @@ #ifndef BUFFERVIEW_FUNCS_H #define BUFFERVIEW_FUNCS_H -#include "support/std_string.h" +#include + class BufferView; class LyXFont; class LyXText; + namespace bv_funcs { /** Set \param data using \param font and \param toggle. * If successful, returns true. */ -bool font2string(LyXFont const & font, bool toggle, string & data); +bool font2string(LyXFont const & font, bool toggle, std::string & data); /** Set \param font and \param toggle using \param data. * If successful, returns true. */ -bool string2font(string const & data, LyXFont & font, bool & toggle); -/** Returns the current freefont, encoded as a string to be passed to the +bool string2font(std::string const & data, LyXFont & font, bool & toggle); +/** Returns the current freefont, encoded as a std::string to be passed to the * frontends. */ -string const freefont2string(); +std::string const freefont2string(); /** Set the freefont using the contents of \param data dispatched from * the frontends and apply it at the current cursor location. */ -void update_and_apply_freefont(BufferView * bv, string const & data); +void update_and_apply_freefont(BufferView * bv, std::string const & data); /** Apply the contents of freefont at the current cursor location. */ void apply_freefont(BufferView * bv); @@ -62,7 +64,7 @@ extern void bold(BufferView *); /// extern void noun(BufferView *); /// -extern void lang(BufferView *, string const &); +extern void lang(BufferView *, std::string const &); /// extern void number(BufferView *); /// @@ -78,9 +80,9 @@ extern void styleReset(BufferView *); /// extern void underline(BufferView *); /// -extern void fontSize(BufferView *, string const &); +extern void fontSize(BufferView *, std::string const &); /// Returns the current font and depth as a message. -extern string const currentState(BufferView *); +extern std::string const currentState(BufferView *); /// extern void toggleAndShow(BufferView *, LyXFont const &, bool toggleall = true); diff --git a/src/changes.C b/src/changes.C index 68d267850f..8da7e289f2 100644 --- a/src/changes.C +++ b/src/changes.C @@ -17,9 +17,10 @@ #include +using lyx::pos_type; using std::endl; -using lyx::pos_type; +using std::string; bool operator==(Change const & l, Change const & r) diff --git a/src/chset.C b/src/chset.C index bddc529d87..e97330e2ff 100644 --- a/src/chset.C +++ b/src/chset.C @@ -34,7 +34,7 @@ using std::make_pair; using std::ifstream; using std::pair; - +using std::string; bool CharacterSet::loadFile(string const & fname) diff --git a/src/chset.h b/src/chset.h index 550139236e..468ce23995 100644 --- a/src/chset.h +++ b/src/chset.h @@ -15,8 +15,8 @@ #include #include +#include -#include "support/std_string.h" /// a class for mapping char strings such as "\^{A}" to the integer value class CharacterSet { @@ -29,21 +29,21 @@ public: * and parses it. This function is only intended to be * called once. */ - bool loadFile(string const & charset); + bool loadFile(std::string const & charset); /// return the name of the current charset - string const & getName() const; + std::string const & getName() const; /** * Return the encoded charset value of the given string. * * The bool value is false if an encoding could not be found * in this charset, and true otherwise. */ - std::pair const encodeString(string const &) const; + std::pair const encodeString(std::string const &) const; private: /// charset name - string name_; + std::string name_; /// - typedef std::map Cdef; + typedef std::map Cdef; /// mapping from string representation to encoded value Cdef map_; }; diff --git a/src/converter.C b/src/converter.C index 48cad85390..370843056b 100644 --- a/src/converter.C +++ b/src/converter.C @@ -48,7 +48,7 @@ using lyx::support::Systemcall; using std::endl; using std::find_if; - +using std::string; using std::vector; diff --git a/src/converter.h b/src/converter.h index 2286e04608..6c0930a398 100644 --- a/src/converter.h +++ b/src/converter.h @@ -14,8 +14,9 @@ #include "graph.h" -#include "support/std_string.h" #include +#include + class Buffer; class Format; @@ -27,18 +28,18 @@ class LatexRunParams; class Converter { public: /// - Converter(string const & f, string const & t, string const & c, - string const & l); + Converter(std::string const & f, std::string const & t, std::string const & c, + std::string const & l); /// void readFlags(); /// - string from; + std::string from; /// - string to; + std::string to; /// - string command; + std::string command; /// - string flags; + std::string flags; /// Format const * From; /// @@ -52,12 +53,12 @@ public: bool need_aux; /// If the converter put the result in a directory, then result_dir /// is the name of the directory - string result_dir; + std::string result_dir; /// If the converter put the result in a directory, then result_file /// is the name of the main file in that directory - string result_file; + std::string result_file; /// Command to convert the program output to a LaTeX log file format - string parselog; + std::string parselog; }; @@ -75,44 +76,44 @@ public: return converterlist_[i]; } /// - Converter const * getConverter(string const & from, string const & to); + Converter const * getConverter(std::string const & from, std::string const & to); /// - int getNumber(string const & from, string const & to); + int getNumber(std::string const & from, std::string const & to); /// - void add(string const & from, string const & to, - string const & command, string const & flags); + void add(std::string const & from, std::string const & to, + std::string const & command, std::string const & flags); // - void erase(string const & from, string const & to); + void erase(std::string const & from, std::string const & to); /// void sort(); /// std::vector const - getReachableTo(string const & target, bool clear_visited); + getReachableTo(std::string const & target, bool clear_visited); /// std::vector const - getReachable(string const & from, bool only_viewable, + getReachable(std::string const & from, bool only_viewable, bool clear_visited); /// - bool isReachable(string const & from, string const & to); + bool isReachable(std::string const & from, std::string const & to); /// - Graph::EdgePath const getPath(string const & from, string const & to); + Graph::EdgePath const getPath(std::string const & from, std::string const & to); /// bool usePdflatex(Graph::EdgePath const & path); /// bool convert(Buffer const * buffer, - string const & from_file, string const & to_file_base, - string const & from_format, string const & to_format, - string & to_file); + std::string const & from_file, std::string const & to_file_base, + std::string const & from_format, std::string const & to_format, + std::string & to_file); /// bool convert(Buffer const * buffer, - string const & from_file, string const & to_file_base, - string const & from_format, string const & to_format); + std::string const & from_file, std::string const & to_file_base, + std::string const & from_format, std::string const & to_format); /// void update(Formats const & formats); /// void updateLast(Formats const & formats); /// - bool formatIsUsed(string const & format); + bool formatIsUsed(std::string const & format); /// const_iterator begin() const { return converterlist_.begin(); @@ -127,17 +128,17 @@ private: std::vector const Converters::intToFormat(std::vector const & input); /// - bool scanLog(Buffer const & buffer, string const & command, - string const & filename); + bool scanLog(Buffer const & buffer, std::string const & command, + std::string const & filename); /// - bool runLaTeX(Buffer const & buffer, string const & command, + bool runLaTeX(Buffer const & buffer, std::string const & command, LatexRunParams const &); /// ConverterList converterlist_; /// - string latex_command_; + std::string latex_command_; /// - bool move(string const & from, string const & to, bool copy); + bool move(std::string const & from, std::string const & to, bool copy); /// Graph G_; }; diff --git a/src/counters.C b/src/counters.C index 2e3fef17c1..851b87e057 100644 --- a/src/counters.C +++ b/src/counters.C @@ -23,6 +23,7 @@ using std::endl; using std::ostringstream; +using std::string; Counter::Counter() diff --git a/src/counters.h b/src/counters.h index c5390ab321..92da5a3c75 100644 --- a/src/counters.h +++ b/src/counters.h @@ -15,8 +15,8 @@ #ifndef COUNTERS_H #define COUNTERS_H -#include "support/std_string.h" #include +#include /// This represents a single counter. @@ -35,16 +35,16 @@ public: /// void reset(); /// Returns the master counter of this counter - string master() const; + std::string master() const; /// sets the master counter for this counter - void setMaster(string const & m); + void setMaster(std::string const & m); private: /// int value_; /// contains master counter name; master counter is the counter /// that, if stepped (incremented) zeroes this counter. E.g. /// "subparagraph"'s master is "paragraph". - string master_; + std::string master_; }; @@ -53,38 +53,38 @@ private: class Counters { public: /// Add a new counter to array. - void newCounter(string const & newc); + void newCounter(std::string const & newc); /// Add new counter having oldc as its master. - void newCounter(string const & newc, string const & oldc); + void newCounter(std::string const & newc, std::string const & oldc); /// - void set(string const & ctr, int val); + void set(std::string const & ctr, int val); /// - void addto(string const & ctr, int val); + void addto(std::string const & ctr, int val); /// - int value(string const & ctr) const; + int value(std::string const & ctr) const; /// Step (increment by one) counter named by arg, and /// zeroes slave counter(s) for which it is the master. /// NOTE sub-slaves not zeroed! That happens at slave's /// first step 0->1. Seems to be sufficient. - void step(string const & ctr); + void step(std::string const & ctr); /// Reset all counters. void reset(); /// Reset counters matched by match string. - void reset(string const & match); + void reset(std::string const & match); /// Copy counters whose name matches match from the &from to /// the &to array of counters. Empty string matches all. - void copy(Counters & from, Counters & to, string const & match = string()); + void copy(Counters & from, Counters & to, std::string const & match = std::string()); /// A complete expanded label, like 2.1.4 for a subsubsection /// according to the given format - string counterLabel(string const & format); + std::string counterLabel(std::string const & format); /// A complete label, like 1.a for enumerations - string enumLabel(string const & ctr, string const & langtype = "latin"); + std::string enumLabel(std::string const & ctr, std::string const & langtype = "latin"); private: /// A counter label's single item, 1 for subsection number in /// the 2.1.4 subsubsection number label. - string labelItem(string const & ctr, string const & numbertype); + std::string labelItem(std::string const & ctr, std::string const & numbertype); /// Maps counter (layout) names to actual counters. - typedef std::map CounterList; + typedef std::map CounterList; /// Instantiate. CounterList counterList; diff --git a/src/debug.C b/src/debug.C index 6065bec95f..8e4faa8aeb 100644 --- a/src/debug.C +++ b/src/debug.C @@ -25,7 +25,7 @@ using lyx::support::isStrInt; using lyx::support::strToInt; using std::setw; - +using std::string; using std::ostream; namespace { diff --git a/src/debug.h b/src/debug.h index a0e30aaaaa..30fcd2501e 100644 --- a/src/debug.h +++ b/src/debug.h @@ -14,7 +14,6 @@ #define LYXDEBUG_H -#include "support/std_string.h" #include "support/debugstream.h" /** Ideally this should have been a namespace, but since we try to be @@ -85,7 +84,7 @@ struct lyx_debug_trait { /** A function to convert symbolic string names on debug levels to their numerical value. */ - static type value(string const & val); + static type value(std::string const & val); /** Display the tags and descriptions of the current debug level of ds diff --git a/src/encoding.C b/src/encoding.C index 4ef0bd9ead..d4c37d8e43 100644 --- a/src/encoding.C +++ b/src/encoding.C @@ -23,6 +23,8 @@ using std::strtol; #endif using std::endl; +using std::string; + Encodings encodings; diff --git a/src/encoding.h b/src/encoding.h index 832cf46517..830a05c3c4 100644 --- a/src/encoding.h +++ b/src/encoding.h @@ -13,8 +13,9 @@ #ifndef ENCODING_H #define ENCODING_H -#include "support/std_string.h" #include +#include + /// typedef unsigned short int Uchar; @@ -25,17 +26,17 @@ public: /// Encoding() {} /// - Encoding(string const & n, string const & l, Uchar const * e) + Encoding(std::string const & n, std::string const & l, Uchar const * e) : Name_(n), LatexName_(l) { for (int i = 0; i < 256; ++i) encoding_table[i] = e[i]; } /// - string const & Name() const { + std::string const & Name() const { return Name_; } /// - string const & LatexName() const { + std::string const & LatexName() const { return LatexName_; } /// @@ -44,9 +45,9 @@ public: } private: /// - string Name_; + std::string Name_; /// - string LatexName_; + std::string LatexName_; /// Uchar encoding_table[256]; }; @@ -56,13 +57,13 @@ extern Encoding symbol_encoding; class Encodings { public: /// - typedef std::map EncodingList; + typedef std::map EncodingList; /// Encodings(); /// - void read(string const & filename); + void read(std::string const & filename); /// - Encoding const * getEncoding(string const & encoding) const; + Encoding const * getEncoding(std::string const & encoding) const; /// Encoding const * symbol_encoding() { return &symbol_encoding_; diff --git a/src/errorlist.C b/src/errorlist.C index 1b4d7914a5..3052ba49f8 100644 --- a/src/errorlist.C +++ b/src/errorlist.C @@ -12,6 +12,8 @@ #include "errorlist.h" +using std::string; + ErrorItem::ErrorItem(string const & error, string const & description, int par_id, int pos_start, int pos_end) @@ -23,5 +25,3 @@ ErrorItem::ErrorItem(string const & error, string const & description, ErrorItem::ErrorItem() : par_id(-1), pos_start(0), pos_end(0) {} - - diff --git a/src/errorlist.h b/src/errorlist.h index 92e5260cf6..20b386c841 100644 --- a/src/errorlist.h +++ b/src/errorlist.h @@ -12,20 +12,19 @@ #ifndef ERRORLIST_H #define ERRORLIST_H -#include "support/std_string.h" - #include +#include class Buffer; /// A class to hold an error item struct ErrorItem { - string error; - string description; + std::string error; + std::string description; int par_id; int pos_start; int pos_end; - ErrorItem(string const & error, string const & description, + ErrorItem(std::string const & error, std::string const & description, int parid, int posstart, int posend); ErrorItem(); }; diff --git a/src/exporter.C b/src/exporter.C index 375416fa8d..6905871c23 100644 --- a/src/exporter.C +++ b/src/exporter.C @@ -38,7 +38,7 @@ using lyx::support::contains; using lyx::support::MakeDisplayPath; using std::find; - +using std::string; using std::vector; diff --git a/src/exporter.h b/src/exporter.h index 02afbfcfca..985b213dd0 100644 --- a/src/exporter.h +++ b/src/exporter.h @@ -14,7 +14,7 @@ #define EXPORTER_H #include -#include "support/std_string.h" + class Buffer; class Format; @@ -23,18 +23,18 @@ class Exporter { public: /// static - bool Export(Buffer * buffer, string const & format, - bool put_in_tempdir, string & result_file); + bool Export(Buffer * buffer, std::string const & format, + bool put_in_tempdir, std::string & result_file); /// static - bool Export(Buffer * buffer, string const & format, + bool Export(Buffer * buffer, std::string const & format, bool put_in_tempdir); /// static - bool Preview(Buffer * buffer, string const & format); + bool Preview(Buffer * buffer, std::string const & format); /// static - bool IsExportable(Buffer const & buffer, string const & format); + bool IsExportable(Buffer const & buffer, std::string const & format); /// static std::vector const diff --git a/src/factory.C b/src/factory.C index 1eb5e163bd..eca35ef59d 100644 --- a/src/factory.C +++ b/src/factory.C @@ -60,6 +60,7 @@ using lyx::support::compare_ascii_no_case; using std::endl; +using std::string; InsetOld * createInset(FuncRequest const & cmd) diff --git a/src/format.C b/src/format.C index 76fe2ebf4a..970b9fe182 100644 --- a/src/format.C +++ b/src/format.C @@ -34,6 +34,8 @@ using lyx::support::QuoteName; using lyx::support::subst; using lyx::support::Systemcall; +using std::string; + namespace { diff --git a/src/format.h b/src/format.h index e960f602a9..5603367ad1 100644 --- a/src/format.h +++ b/src/format.h @@ -12,58 +12,56 @@ #ifndef FORMAT_H #define FORMAT_H - -#include "support/std_string.h" - #include +#include class Buffer; class Format { public: /// - Format(string const & n, string const & e, string const & p, - string const & s, string const & v); + Format(std::string const & n, std::string const & e, std::string const & p, + std::string const & s, std::string const & v); /// bool dummy() const; /// bool isChildFormat() const; /// - string const parentFormat() const; + std::string const parentFormat() const; /// - string const & name() const { + std::string const & name() const { return name_; } /// - string const & extension() const { + std::string const & extension() const { return extension_; } /// - string const & prettyname() const { + std::string const & prettyname() const { return prettyname_; } /// - string const & shortcut() const { + std::string const & shortcut() const { return shortcut_; } /// - string const & viewer() const { + std::string const & viewer() const { return viewer_; } /// - void setViewer(string const & v) { + void setViewer(std::string const & v) { viewer_ = v; } private: - string name_; + std::string name_; /// - string extension_; + std::string extension_; /// - string prettyname_; + std::string prettyname_; /// - string shortcut_; + std::string shortcut_; /// - string viewer_; + std::string viewer_; }; @@ -81,27 +79,27 @@ public: return formatlist[i]; } /// - Format const * getFormat(string const & name) const; + Format const * getFormat(std::string const & name) const; /// - int getNumber(string const & name) const; + int getNumber(std::string const & name) const; /// - void add(string const & name); + void add(std::string const & name); /// - void add(string const & name, string const & extension, - string const & prettyname, string const & shortcut); + void add(std::string const & name, std::string const & extension, + std::string const & prettyname, std::string const & shortcut); /// - void erase(string const & name); + void erase(std::string const & name); /// void sort(); /// - void setViewer(string const & name, string const & command); + void setViewer(std::string const & name, std::string const & command); /// - bool view(Buffer const & buffer, string const & filename, - string const & format_name) const; + bool view(Buffer const & buffer, std::string const & filename, + std::string const & format_name) const; /// - string const prettyName(string const & name) const; + std::string const prettyName(std::string const & name) const; /// - string const extension(string const & name) const; + std::string const extension(std::string const & name) const; /// const_iterator begin() const { return formatlist.begin(); diff --git a/src/frontends/Alert.C b/src/frontends/Alert.C index 7f246462fc..feb3b65cac 100644 --- a/src/frontends/Alert.C +++ b/src/frontends/Alert.C @@ -19,6 +19,7 @@ using std::endl; using std::make_pair; using std::pair; +using std::string; int Alert::prompt(string const & title, string const & question, diff --git a/src/frontends/Alert.h b/src/frontends/Alert.h index 3711dbdd6a..3b5f3636aa 100644 --- a/src/frontends/Alert.h +++ b/src/frontends/Alert.h @@ -28,21 +28,21 @@ namespace Alert { * "Yes" or "No", I will personally come around to your house and * slap you with fish, and not in an enjoyable way either. */ -int prompt(string const & title, string const & question, +int prompt(std::string const & title, std::string const & question, int default_button, int cancel_button, - string const & b1, string const & b2, string const & b3 = string()); + std::string const & b1, std::string const & b2, std::string const & b3 = std::string()); /** * Display a warning to the user. Title should be a short (general) summary. * Only use this if the user cannot perform some remedial action. */ -void warning(string const & title, string const & message); +void warning(std::string const & title, std::string const & message); /** * Display a warning to the user. Title should be a short (general) summary. * Only use this if the user cannot perform some remedial action. */ -void error(string const & title, string const & message); +void error(std::string const & title, std::string const & message); /** * Informational message. Use very very sparingly. That is, you must @@ -50,12 +50,12 @@ void error(string const & title, string const & message); * and reciting the Nicene Creed, whilst running uphill and also * eating. */ -void information(string const & title, string const & message); +void information(std::string const & title, std::string const & message); /// Asks for a text. DO NOT USE !! -std::pair const -askForText(string const & msg, - string const & dflt = string()); +std::pair const +askForText(std::string const & msg, + std::string const & dflt = std::string()); } diff --git a/src/frontends/Alert_pimpl.h b/src/frontends/Alert_pimpl.h index fa153a23ce..09cbefa95c 100644 --- a/src/frontends/Alert_pimpl.h +++ b/src/frontends/Alert_pimpl.h @@ -11,15 +11,16 @@ // GUI-specific implementations -#include "support/std_string.h" #include +#include -int prompt_pimpl(string const & title, string const & question, + +int prompt_pimpl(std::string const & title, std::string const & question, int default_button, int escape_button, - string const & b1, string const & b2, string const & b3); + std::string const & b1, std::string const & b2, std::string const & b3); -void warning_pimpl(string const & title, string const & warning); -void error_pimpl(string const & title, string const & warning); -void information_pimpl(string const & title, string const & warning); +void warning_pimpl(std::string const & title, std::string const & warning); +void error_pimpl(std::string const & title, std::string const & warning); +void information_pimpl(std::string const & title, std::string const & warning); -std::pair const askForText_pimpl(string const & msg, string const & dflt); +std::pair const askForText_pimpl(std::string const & msg, std::string const & dflt); diff --git a/src/frontends/Dialogs.C b/src/frontends/Dialogs.C index 04d404fe44..9990de1f41 100644 --- a/src/frontends/Dialogs.C +++ b/src/frontends/Dialogs.C @@ -20,6 +20,9 @@ #include +using std::string; + + // Note that static boost signals break some compilers, so this wrapper // initialises the signal dynamically when it is first invoked. template diff --git a/src/frontends/Dialogs.h b/src/frontends/Dialogs.h index 6e5d8ee9f8..a7688055a2 100644 --- a/src/frontends/Dialogs.h +++ b/src/frontends/Dialogs.h @@ -15,9 +15,6 @@ #include #include -#include "support/std_string.h" - - class Dialog; class InsetBase; class LyXView; @@ -92,7 +89,7 @@ public: the dialog. Several of these dialogs do not need any data, so it defaults to string(). */ - void show(string const & name, string const & data = string()); + void show(std::string const & name, std::string const & data = std::string()); /** \param name == "bibtex", "citation" etc; an identifier used to launch a particular dialog. @@ -105,46 +102,46 @@ public: dialog on 'Apply'; should it be used to create a new inset at the current cursor position or modify an existing, 'open' inset? */ - void show(string const & name, string const & data, InsetBase * inset); + void show(std::string const & name, std::string const & data, InsetBase * inset); /** \param name == "citation", "bibtex" etc; an identifier used to update the contents of a particular dialog with \param data . See the comments to 'show', above. */ - void update(string const & name, string const & data); + void update(std::string const & name, std::string const & data); /// is the dialog currently visible? - bool visible(string const & name) const; + bool visible(std::string const & name) const; /** All Dialogs of the given \param name will be closed if they are connected to the given \param inset. */ - static void hide(string const & name, InsetBase * inset); + static void hide(std::string const & name, InsetBase * inset); /// - void disconnect(string const & name); + void disconnect(std::string const & name); /// - InsetBase * getOpenInset(string const & name) const; + InsetBase * getOpenInset(std::string const & name) const; private: /// - void hideSlot(string const & name, InsetBase * inset); + void hideSlot(std::string const & name, InsetBase * inset); /// void redraw() const; /// - bool isValidName(string const & name) const; + bool isValidName(std::string const & name) const; /// - Dialog * find_or_build(string const & name); + Dialog * find_or_build(std::string const & name); /// - Dialog * build(string const & name); + Dialog * build(std::string const & name); /// LyXView & lyxview_; /// - std::map open_insets_; + std::map open_insets_; /// typedef boost::shared_ptr DialogPtr; /// - std::map dialogs_; + std::map dialogs_; /// the stuff below is slated to go... void init_pimpl(); diff --git a/src/frontends/FileDialog.h b/src/frontends/FileDialog.h index bc2ce49d3e..423e8404e1 100644 --- a/src/frontends/FileDialog.h +++ b/src/frontends/FileDialog.h @@ -13,12 +13,11 @@ #ifndef FILEDIALOG_H #define FILEDIALOG_H - -#include - #include "lfuns.h" -#include "support/std_string.h" +#include +#include + /** * \class FileDialog @@ -28,7 +27,7 @@ class FileDialog { public: /// label, directory path button - typedef std::pair Button; + typedef std::pair Button; /// result type enum ResultType { @@ -37,7 +36,7 @@ public: }; /// result return - typedef std::pair Result; + typedef std::pair Result; /** * Constructs a file dialog with title \param title. @@ -50,10 +49,10 @@ public: * additional directories in the navigation (an empty * directory is interpreted as getcwd()) */ - FileDialog(string const & title, + FileDialog(std::string const & title, kb_action a = LFUN_SELECT_FILE_SYNC, - Button b1 = Button(string(), string()), - Button b2 = Button(string(), string())); + Button b1 = Button(std::string(), std::string()), + Button b2 = Button(std::string(), std::string())); ~FileDialog(); @@ -69,16 +68,16 @@ public: * * FIXME: should support multiple lines of these for different file types. */ - Result const open(string const & path = string(), - string const & mask = string(), - string const & suggested = string()); + Result const open(std::string const & path = std::string(), + std::string const & mask = std::string(), + std::string const & suggested = std::string()); /** * Choose a directory, starting in directory \param * path. */ - Result const opendir(string const & path = string(), - string const & suggested = string()); + Result const opendir(std::string const & path = std::string(), + std::string const & suggested = std::string()); /** * Choose a file for saving, starting in directory \param @@ -89,9 +88,9 @@ public: * * for example, "*.ps | PostScript files (*.ps)". */ - Result const save(string const & path = string(), - string const & mask = string(), - string const & suggested = string()); + Result const save(std::string const & path = std::string(), + std::string const & mask = std::string(), + std::string const & suggested = std::string()); /* This *has* to be public because there is no way to specify extern "C" functions @@ -103,7 +102,7 @@ public: private: /// the dialog title - string title_; + std::string title_; /// success action to perform if not synchronous kb_action success_; diff --git a/src/frontends/LyXKeySym.h b/src/frontends/LyXKeySym.h index 79d977383e..b027b07f38 100644 --- a/src/frontends/LyXKeySym.h +++ b/src/frontends/LyXKeySym.h @@ -12,7 +12,7 @@ #ifndef LYXKEYSYM_H #define LYXKEYSYM_H -#include "support/std_string.h" +#include /** * This is a base class for representing a keypress. @@ -27,7 +27,7 @@ public: virtual ~LyXKeySym() {} /// Initialize with the name of a key. F. ex. "space" or "a" - virtual void init(string const & symbolname) = 0; + virtual void init(std::string const & symbolname) = 0; /// Is this a valid key? virtual bool isOK() const = 0; @@ -39,14 +39,14 @@ public: virtual bool isText() const { return false; } /// What is the symbolic name of this key? F.ex. "Return" or "c" - virtual string getSymbolName() const = 0; + virtual std::string getSymbolName() const = 0; /** * Return the value of the keysym into the local ISO encoding. * This converts the LyXKeySym to a 8-bit encoded character. * This relies on user to use the right encoding. */ - virtual char getISOEncoded(string const & encoding) const = 0; + virtual char getISOEncoded(std::string const & encoding) const = 0; }; diff --git a/src/frontends/LyXView.C b/src/frontends/LyXView.C index 73c74bcefc..88259688d4 100644 --- a/src/frontends/LyXView.C +++ b/src/frontends/LyXView.C @@ -47,6 +47,7 @@ using lyx::support::MakeDisplayPath; using lyx::support::OnlyFilename; using std::endl; +using std::string; string current_layout; diff --git a/src/frontends/LyXView.h b/src/frontends/LyXView.h index d42505fd09..08a094539a 100644 --- a/src/frontends/LyXView.h +++ b/src/frontends/LyXView.h @@ -19,8 +19,6 @@ #include #include -#include "support/std_string.h" - class Buffer; class Toolbar; class Intl; @@ -103,7 +101,7 @@ public: //@} /// sets the layout in the toolbar layout selection - void setLayout(string const & layout); + void setLayout(std::string const & layout); /// updates the possible layouts selectable void updateLayoutChoice(); @@ -119,7 +117,7 @@ public: boost::signal0 view_state_changed; /// display a message in the view - virtual void message(string const &) = 0; + virtual void message(std::string const &) = 0; /// clear any temporary message and replace with current status virtual void clearMessage() = 0; @@ -148,7 +146,7 @@ private: * @param t main window title * @param it iconified (short) title */ - virtual void setWindowTitle(string const & t, string const & it) = 0; + virtual void setWindowTitle(std::string const & t, std::string const & it) = 0; /// called on timeout void autoSave(); diff --git a/src/frontends/Menubar.h b/src/frontends/Menubar.h index 996ae1ed8e..b6e3fe4e79 100644 --- a/src/frontends/Menubar.h +++ b/src/frontends/Menubar.h @@ -13,9 +13,6 @@ #ifndef MENUBAR_H #define MENUBAR_H - -#include "support/std_string.h" - /** * The LyX GUI independent menubar class * The GUI interface is implemented in the frontends @@ -25,7 +22,7 @@ public: /// virtual ~Menubar() {} /// Opens a top-level submenu given its name - virtual void openByName(string const &) = 0; + virtual void openByName(std::string const &) = 0; /// update the state of the menuitems virtual void update() = 0; }; diff --git a/src/frontends/Painter.C b/src/frontends/Painter.C index 79f97bf8e8..74fe2b78f0 100644 --- a/src/frontends/Painter.C +++ b/src/frontends/Painter.C @@ -19,6 +19,7 @@ #include "lyxfont.h" using std::max; +using std::string; Painter & Painter::button(int x, int y, int w, int h) diff --git a/src/frontends/Painter.h b/src/frontends/Painter.h index 482f77fa1c..18835ff468 100644 --- a/src/frontends/Painter.h +++ b/src/frontends/Painter.h @@ -13,8 +13,7 @@ #ifndef PAINTER_H #define PAINTER_H - -#include "support/std_string.h" +#include class LColor_color; @@ -140,7 +139,7 @@ public: /// draw a string at position x, y (y is the baseline) virtual Painter & text(int x, int y, - string const & str, LyXFont const & f) = 0; + std::string const & str, LyXFont const & f) = 0; /** * Draw a string at position x, y (y is the baseline) @@ -161,14 +160,14 @@ public: * around the text with the given color. */ Painter & rectText(int x, int baseline, - string const & string, + std::string const & str, LyXFont const & font, LColor_color back, LColor_color frame); /// draw a string and enclose it inside a button frame Painter & buttonText(int x, - int baseline, string const & s, + int baseline, std::string const & s, LyXFont const & font); protected: diff --git a/src/frontends/Toolbar.h b/src/frontends/Toolbar.h index 68ea1d5f75..e6d23cac6d 100644 --- a/src/frontends/Toolbar.h +++ b/src/frontends/Toolbar.h @@ -12,8 +12,6 @@ #ifndef TOOLBAR_H #define TOOLBAR_H - -#include "support/std_string.h" #include "ToolbarBackend.h" class LyXView; @@ -38,7 +36,7 @@ public: void update(bool in_math, bool in_table); /// update the layout combox - virtual void setLayout(string const & layout) = 0; + virtual void setLayout(std::string const & layout) = 0; /** * Populate the layout combox - returns whether we did a full * update or not diff --git a/src/frontends/WorkArea.h b/src/frontends/WorkArea.h index 09c107d1f2..b54e3145a4 100644 --- a/src/frontends/WorkArea.h +++ b/src/frontends/WorkArea.h @@ -20,7 +20,6 @@ #include #include -#include "support/std_string.h" class Painter; class FuncRequest; @@ -61,9 +60,9 @@ public: /// a selection exists virtual void haveSelection(bool) const = 0; /// get the X clipboard contents - virtual string const getClipboard() const = 0; + virtual std::string const getClipboard() const = 0; /// fill the clipboard - virtual void putClipboard(string const &) const = 0; + virtual void putClipboard(std::string const &) const = 0; /// work area dimensions have changed boost::signal0 workAreaResize; diff --git a/src/frontends/controllers/BCView.h b/src/frontends/controllers/BCView.h index 4b63c73392..e456245a08 100644 --- a/src/frontends/controllers/BCView.h +++ b/src/frontends/controllers/BCView.h @@ -14,8 +14,6 @@ #ifndef BCVIEW_H #define BCVIEW_H - -#include "support/std_string.h" #include #include @@ -92,7 +90,7 @@ class GuiBC : public BCView { public: /// GuiBC(ButtonController const & parent, - string const & cancel, string const & close); + std::string const & cancel, std::string const & close); //@{ /** Store pointers to these widgets. The pointers are _not_ @@ -121,10 +119,10 @@ private: /// Enable/Disable a button virtual void setButtonEnabled(Button * obj, bool enable) const = 0; /// Set the Label on the button - virtual void setButtonLabel(Button * obj, string const & label) const = 0; + virtual void setButtonLabel(Button * obj, std::string const & label) const = 0; - string const cancel_label_; - string const close_label_; + std::string const cancel_label_; + std::string const close_label_; Button * okay_; Button * apply_; diff --git a/src/frontends/controllers/BCView.tmpl b/src/frontends/controllers/BCView.tmpl index 4869473a58..85d093319c 100644 --- a/src/frontends/controllers/BCView.tmpl +++ b/src/frontends/controllers/BCView.tmpl @@ -21,7 +21,7 @@ template GuiBC::GuiBC(ButtonController const & parent, - string const & cancel, string const & close) + std::string const & cancel, std::string const & close) : BCView(parent), cancel_label_(cancel), close_label_(close), okay_(0), apply_(0), cancel_(0), restore_(0) diff --git a/src/frontends/controllers/ControlAboutlyx.C b/src/frontends/controllers/ControlAboutlyx.C index 978abaceab..ce247a617f 100644 --- a/src/frontends/controllers/ControlAboutlyx.C +++ b/src/frontends/controllers/ControlAboutlyx.C @@ -28,6 +28,7 @@ using lyx::support::user_lyxdir; using std::ostream; using std::ostringstream; +using std::string; ControlAboutlyx::ControlAboutlyx(Dialog & parent) diff --git a/src/frontends/controllers/ControlAboutlyx.h b/src/frontends/controllers/ControlAboutlyx.h index 889c6a97da..31b90aab70 100644 --- a/src/frontends/controllers/ControlAboutlyx.h +++ b/src/frontends/controllers/ControlAboutlyx.h @@ -24,7 +24,7 @@ public: //@{ /// Instantiate Dialog::Controller methods. - virtual bool initialiseParams(string const &) { return true; } + virtual bool initialiseParams(std::string const &) { return true; } virtual void clearParams() {} virtual void dispatchParams() {} virtual bool isBufferDependent() const { return false; } @@ -33,10 +33,10 @@ public: //@{ /// Provide the View with specific pieces of information. void getCredits(std::ostream &) const; - string const getCopyright() const; - string const getLicense() const; - string const getDisclaimer() const; - string const getVersion() const; + std::string const getCopyright() const; + std::string const getLicense() const; + std::string const getDisclaimer() const; + std::string const getVersion() const; //@} }; diff --git a/src/frontends/controllers/ControlBibtex.C b/src/frontends/controllers/ControlBibtex.C index ffb1d15d0d..db0b95260f 100644 --- a/src/frontends/controllers/ControlBibtex.C +++ b/src/frontends/controllers/ControlBibtex.C @@ -23,6 +23,7 @@ using lyx::support::OnlyFilename; +using std::string; using std::pair; using std::vector; diff --git a/src/frontends/controllers/ControlBibtex.h b/src/frontends/controllers/ControlBibtex.h index dbab5a6e6a..de881baa8e 100644 --- a/src/frontends/controllers/ControlBibtex.h +++ b/src/frontends/controllers/ControlBibtex.h @@ -26,11 +26,11 @@ public: ControlBibtex(Dialog &); /// Browse for a file - string const Browse(string const &, string const &, string const &); + std::string const Browse(std::string const &, std::string const &, std::string const &); /// get the list of bst files - void getBibStyles(std::vector & data) const; + void getBibStyles(std::vector & data) const; /// get the list of bib files - void getBibFiles(std::vector & data) const; + void getBibFiles(std::vector & data) const; /// build filelists of all availabe bib/bst/cls/sty-files. done through /// kpsewhich and an external script, saved in *Files.lst void rescanBibStyles() const; diff --git a/src/frontends/controllers/ControlBranch.C b/src/frontends/controllers/ControlBranch.C index 1d770199bc..68eae58c0f 100644 --- a/src/frontends/controllers/ControlBranch.C +++ b/src/frontends/controllers/ControlBranch.C @@ -15,6 +15,10 @@ #include "funcrequest.h" #include "insets/insetbranch.h" + +using std::string; + + ControlBranch::ControlBranch(Dialog & parent) : Dialog::Controller(parent) {} @@ -40,4 +44,3 @@ void ControlBranch::dispatchParams() string const lfun = InsetBranchMailer::params2string(string("branch"), params()); kernel().dispatch(FuncRequest(LFUN_INSET_APPLY, lfun)); } - diff --git a/src/frontends/controllers/ControlBranch.h b/src/frontends/controllers/ControlBranch.h index 268b5a2bec..b364ef5f67 100644 --- a/src/frontends/controllers/ControlBranch.h +++ b/src/frontends/controllers/ControlBranch.h @@ -23,7 +23,7 @@ public: /// ControlBranch(Dialog &); /// - virtual bool initialiseParams(string const & data); + virtual bool initialiseParams(std::string const & data); /// virtual void clearParams(); /// diff --git a/src/frontends/controllers/ControlChanges.C b/src/frontends/controllers/ControlChanges.C index 280d034c4f..d445ad245c 100644 --- a/src/frontends/controllers/ControlChanges.C +++ b/src/frontends/controllers/ControlChanges.C @@ -23,6 +23,8 @@ using lyx::support::rtrim; +using std::string; + ControlChanges::ControlChanges(Dialog & parent) : Dialog::Controller(parent) diff --git a/src/frontends/controllers/ControlChanges.h b/src/frontends/controllers/ControlChanges.h index e824f1e67e..d0c9180112 100644 --- a/src/frontends/controllers/ControlChanges.h +++ b/src/frontends/controllers/ControlChanges.h @@ -22,7 +22,7 @@ public: /// ControlChanges(Dialog &); /// Nothing to initialise in this case. - virtual bool initialiseParams(string const &) { return true; } + virtual bool initialiseParams(std::string const &) { return true; } /// virtual void clearParams() {} /// @@ -34,10 +34,10 @@ public: bool find(); /// return date of change - string const getChangeDate(); + std::string const getChangeDate(); /// return author of change - string const getChangeAuthor(); + std::string const getChangeAuthor(); /// accept the current merge void accept(); diff --git a/src/frontends/controllers/ControlCharacter.C b/src/frontends/controllers/ControlCharacter.C index 975d740b46..cfb3878a2e 100644 --- a/src/frontends/controllers/ControlCharacter.C +++ b/src/frontends/controllers/ControlCharacter.C @@ -22,6 +22,8 @@ using bv_funcs::font2string; +using std::string; + ControlCharacter::ControlCharacter(Dialog & parent) : Dialog::Controller(parent), diff --git a/src/frontends/controllers/ControlCharacter.h b/src/frontends/controllers/ControlCharacter.h index e6a3b15a89..fe45b6aee5 100644 --- a/src/frontends/controllers/ControlCharacter.h +++ b/src/frontends/controllers/ControlCharacter.h @@ -25,7 +25,7 @@ public: /// ControlCharacter(Dialog &); /// - virtual bool initialiseParams(string const & data); + virtual bool initialiseParams(std::string const & data); /// virtual void clearParams(); /// @@ -46,7 +46,7 @@ public: /// void setColor(LColor_color); /// - void setLanguage(string const &); + void setLanguage(std::string const &); /// void setToggleAll(bool); @@ -63,7 +63,7 @@ public: /// LColor_color getColor() const; /// - string getLanguage() const; + std::string getLanguage() const; /// bool getToggleAll() const; private: diff --git a/src/frontends/controllers/ControlCitation.C b/src/frontends/controllers/ControlCitation.C index 30496e4218..93910d35a4 100644 --- a/src/frontends/controllers/ControlCitation.C +++ b/src/frontends/controllers/ControlCitation.C @@ -15,6 +15,8 @@ #include "buffer.h" #include "bufferparams.h" + +using std::string; using std::vector; using std::pair; @@ -31,7 +33,7 @@ bool ControlCitation::initialiseParams(string const & data) { ControlCommand::initialiseParams(data); - vector > blist; + vector > blist; kernel().buffer().fillWithBibKeys(blist); typedef std::map::value_type InfoMapValue; diff --git a/src/frontends/controllers/ControlCitation.h b/src/frontends/controllers/ControlCitation.h index 36dbe44f71..a01facad25 100644 --- a/src/frontends/controllers/ControlCitation.h +++ b/src/frontends/controllers/ControlCitation.h @@ -24,7 +24,7 @@ public: ControlCitation(Dialog &); /// - virtual bool initialiseParams(string const & data); + virtual bool initialiseParams(std::string const & data); /// clean-up on hide. virtual void clearParams(); @@ -39,7 +39,7 @@ public: /// bool usingNatbib() const; /// Possible citations based on this key - std::vector const getCiteStrings(string const & key) const; + std::vector const getCiteStrings(std::string const & key) const; /// available CiteStyle-s (depends on availability of Natbib static std::vector const & getCiteStyles() { diff --git a/src/frontends/controllers/ControlCommand.C b/src/frontends/controllers/ControlCommand.C index 8647f70a6a..2734b45d53 100644 --- a/src/frontends/controllers/ControlCommand.C +++ b/src/frontends/controllers/ControlCommand.C @@ -16,6 +16,9 @@ #include "insets/insetcommand.h" +using std::string; + + ControlCommand::ControlCommand(Dialog & dialog, string const & lfun_name) : Dialog::Controller(dialog), lfun_name_(lfun_name) diff --git a/src/frontends/controllers/ControlCommand.h b/src/frontends/controllers/ControlCommand.h index afcdc0af0b..0174bf8582 100644 --- a/src/frontends/controllers/ControlCommand.h +++ b/src/frontends/controllers/ControlCommand.h @@ -26,13 +26,13 @@ public: it knows what to do with the rest of the contents. An empty name indicates that no action will occur on 'Apply'. */ - ControlCommand(Dialog &, string const & lfun_name = string()); + ControlCommand(Dialog &, std::string const & lfun_name = std::string()); /// InsetCommandParams & params() { return params_; } /// InsetCommandParams const & params() const { return params_; } /// - virtual bool initialiseParams(string const & data); + virtual bool initialiseParams(std::string const & data); /// clean-up on hide. virtual void clearParams(); /// clean-up on hide. @@ -44,7 +44,7 @@ private: /// InsetCommandParams params_; /// Flags what action is taken by Kernel::dispatch() - string const lfun_name_; + std::string const lfun_name_; }; diff --git a/src/frontends/controllers/ControlCommandBuffer.C b/src/frontends/controllers/ControlCommandBuffer.C index b17308e053..4b8c3576ea 100644 --- a/src/frontends/controllers/ControlCommandBuffer.C +++ b/src/frontends/controllers/ControlCommandBuffer.C @@ -26,7 +26,7 @@ using lyx::support::prefixIs; using std::back_inserter; using std::transform; - +using std::string; using std::vector; diff --git a/src/frontends/controllers/ControlCommandBuffer.h b/src/frontends/controllers/ControlCommandBuffer.h index 65d47539cf..983b7e40a7 100644 --- a/src/frontends/controllers/ControlCommandBuffer.h +++ b/src/frontends/controllers/ControlCommandBuffer.h @@ -14,8 +14,6 @@ #ifndef CONTROLCOMMANDBUFFER_H #define CONTROLCOMMANDBUFFER_H -#include "support/std_string.h" - #include @@ -32,32 +30,32 @@ public: ControlCommandBuffer(LyXView & lv); /// return the previous history entry if any - string const historyUp(); + std::string const historyUp(); /// return the next history entry if any - string const historyDown(); + std::string const historyDown(); /// return the font and depth in the active BufferView as a message. - string const getCurrentState() const; + std::string const getCurrentState() const; /// return the possible completions - std::vector const completions(string const & prefix, - string & new_prefix); + std::vector const completions(std::string const & prefix, + std::string & new_prefix); /// dispatch a command - void dispatch(string const & str); + void dispatch(std::string const & str); private: /// controlling LyXView LyXView & lv_; /// available command names - std::vector commands_; + std::vector commands_; /// command history - std::vector history_; + std::vector history_; /// current position in command history - std::vector::const_iterator history_pos_; + std::vector::const_iterator history_pos_; }; #endif // CONTROLCOMMANDBUFFER_H diff --git a/src/frontends/controllers/ControlDocument.C b/src/frontends/controllers/ControlDocument.C index 98cb2f21a2..e705ca4485 100644 --- a/src/frontends/controllers/ControlDocument.C +++ b/src/frontends/controllers/ControlDocument.C @@ -36,6 +36,8 @@ using lyx::support::AddPath; using lyx::support::bformat; using lyx::support::user_lyxdir; +using std::string; + ControlDocument::ControlDocument(LyXView & lv, Dialogs & d) : ControlDialogBD(lv, d), bp_(0) diff --git a/src/frontends/controllers/ControlERT.C b/src/frontends/controllers/ControlERT.C index f5ff71a762..9f1209b9f5 100644 --- a/src/frontends/controllers/ControlERT.C +++ b/src/frontends/controllers/ControlERT.C @@ -15,6 +15,9 @@ #include "funcrequest.h" +using std::string; + + ControlERT::ControlERT(Dialog & parent) : Dialog::Controller(parent), status_(InsetERT::Collapsed) {} diff --git a/src/frontends/controllers/ControlERT.h b/src/frontends/controllers/ControlERT.h index db45b09d35..6724c0fa1b 100644 --- a/src/frontends/controllers/ControlERT.h +++ b/src/frontends/controllers/ControlERT.h @@ -27,7 +27,7 @@ public: /// void setStatus(InsetERT::ERTStatus status) { status_ = status; } /// - virtual bool initialiseParams(string const & data); + virtual bool initialiseParams(std::string const & data); /// clean-up on hide. virtual void clearParams(); /// clean-up on hide. diff --git a/src/frontends/controllers/ControlErrorList.C b/src/frontends/controllers/ControlErrorList.C index 0217dacf70..52832ffcb1 100644 --- a/src/frontends/controllers/ControlErrorList.C +++ b/src/frontends/controllers/ControlErrorList.C @@ -20,6 +20,7 @@ using std::endl; +using std::string; ControlErrorList::ControlErrorList(Dialog & d) diff --git a/src/frontends/controllers/ControlErrorList.h b/src/frontends/controllers/ControlErrorList.h index deb0c03da2..9dfc615948 100644 --- a/src/frontends/controllers/ControlErrorList.h +++ b/src/frontends/controllers/ControlErrorList.h @@ -28,7 +28,7 @@ public: /// virtual bool isBufferDependent() const { return true; } /// - virtual bool initialiseParams(string const & data); + virtual bool initialiseParams(std::string const & data); /// virtual void clearParams(); /// @@ -37,14 +37,14 @@ public: /// goto this error in the parent bv void goTo(int item); /// return the parent document name - string const & name(); + std::string const & name(); /// ErrorList const & errorList() const; private: /// ErrorList errorlist_; /// - string name_; + std::string name_; }; #endif // CONTROLERRORLIST_H diff --git a/src/frontends/controllers/ControlExternal.C b/src/frontends/controllers/ControlExternal.C index 253bdfc558..a7834b6cf7 100644 --- a/src/frontends/controllers/ControlExternal.C +++ b/src/frontends/controllers/ControlExternal.C @@ -20,9 +20,11 @@ #include "insets/ExternalTemplate.h" + namespace external = lyx::external; using std::vector; +using std::string; ControlExternal::ControlExternal(Dialog & parent) diff --git a/src/frontends/controllers/ControlExternal.h b/src/frontends/controllers/ControlExternal.h index 7d9e924175..2903e43f75 100644 --- a/src/frontends/controllers/ControlExternal.h +++ b/src/frontends/controllers/ControlExternal.h @@ -32,7 +32,7 @@ public: /// ControlExternal(Dialog &); /// - virtual bool initialiseParams(string const & data); + virtual bool initialiseParams(std::string const & data); /// clean-up on hide. virtual void clearParams(); /// clean-up on hide. @@ -48,13 +48,13 @@ public: /// void editExternal(); /// - std::vector const getTemplates() const; + std::vector const getTemplates() const; /// - int getTemplateNumber(string const &) const; + int getTemplateNumber(std::string const &) const; /// lyx::external::Template getTemplate(int) const; /// - string const Browse(string const &) const; + std::string const Browse(std::string const &) const; private: /// boost::scoped_ptr params_; diff --git a/src/frontends/controllers/ControlFloat.C b/src/frontends/controllers/ControlFloat.C index 2f7e5940c3..0d54cc6eef 100644 --- a/src/frontends/controllers/ControlFloat.C +++ b/src/frontends/controllers/ControlFloat.C @@ -15,6 +15,9 @@ #include "insets/insetfloat.h" +using std::string; + + ControlFloat::ControlFloat(Dialog & parent) : Dialog::Controller(parent) {} diff --git a/src/frontends/controllers/ControlFloat.h b/src/frontends/controllers/ControlFloat.h index 00306f614c..f0bb07aaa3 100644 --- a/src/frontends/controllers/ControlFloat.h +++ b/src/frontends/controllers/ControlFloat.h @@ -21,7 +21,7 @@ public: /// ControlFloat(Dialog &); /// - virtual bool initialiseParams(string const & data); + virtual bool initialiseParams(std::string const & data); /// clean-up on hide. virtual void clearParams(); /// clean-up on hide. diff --git a/src/frontends/controllers/ControlForks.C b/src/frontends/controllers/ControlForks.C index 337731cc67..57bdf8be05 100644 --- a/src/frontends/controllers/ControlForks.C +++ b/src/frontends/controllers/ControlForks.C @@ -21,8 +21,10 @@ #include + using lyx::support::ForkedcallsController; +using std::string; using std::vector; diff --git a/src/frontends/controllers/ControlForks.h b/src/frontends/controllers/ControlForks.h index de37d7cbbe..d88b1af791 100644 --- a/src/frontends/controllers/ControlForks.h +++ b/src/frontends/controllers/ControlForks.h @@ -16,7 +16,6 @@ #include -#include "support/std_string.h" #include #include @@ -31,7 +30,7 @@ public: /// std::vector const getPIDs() const; /// - string const getCommand(pid_t) const; + std::string const getCommand(pid_t) const; /// void kill(pid_t); private: diff --git a/src/frontends/controllers/ControlGraphics.C b/src/frontends/controllers/ControlGraphics.C index 632eeb6f7a..2dd18b2b80 100644 --- a/src/frontends/controllers/ControlGraphics.C +++ b/src/frontends/controllers/ControlGraphics.C @@ -40,7 +40,7 @@ using lyx::support::system_lyxdir; using lyx::support::user_lyxdir; using std::make_pair; - +using std::string; using std::pair; using std::vector; diff --git a/src/frontends/controllers/ControlGraphics.h b/src/frontends/controllers/ControlGraphics.h index aba85420f4..4433125221 100644 --- a/src/frontends/controllers/ControlGraphics.h +++ b/src/frontends/controllers/ControlGraphics.h @@ -31,7 +31,7 @@ public: /// ControlGraphics(Dialog &); /// - virtual bool initialiseParams(string const & data); + virtual bool initialiseParams(std::string const & data); /// clean-up on hide. virtual void clearParams(); /// clean-up on hide. @@ -44,13 +44,13 @@ public: InsetGraphicsParams const & params() const { return *params_.get(); } /// Browse for a file - string const Browse(string const &); + std::string const Browse(std::string const &); /// Read the Bounding Box from a eps or ps-file - string const readBB(string const & file); + std::string const readBB(std::string const & file); /// Control the bb bool bbChanged; /// test if file exist - bool isFilenameValid(string const & fname) const; + bool isFilenameValid(std::string const & fname) const; private: /// @@ -60,10 +60,10 @@ private: namespace frnt { /// get the units for the bounding box -std::vector const getBBUnits(); +std::vector const getBBUnits(); -/// The (tranlated) GUI string and it's LaTeX equivalent. -typedef std::pair RotationOriginPair; +/// The (tranlated) GUI std::string and it's LaTeX equivalent. +typedef std::pair RotationOriginPair; /// std::vector getRotationOriginData(); diff --git a/src/frontends/controllers/ControlInclude.C b/src/frontends/controllers/ControlInclude.C index 63709585c9..f8f8061ff9 100644 --- a/src/frontends/controllers/ControlInclude.C +++ b/src/frontends/controllers/ControlInclude.C @@ -32,6 +32,7 @@ using lyx::support::MakeAbsPath; using lyx::support::OnlyPath; using std::pair; +using std::string; ControlInclude::ControlInclude(Dialog & parent) diff --git a/src/frontends/controllers/ControlInclude.h b/src/frontends/controllers/ControlInclude.h index ae71e24b64..6a011ccd5f 100644 --- a/src/frontends/controllers/ControlInclude.h +++ b/src/frontends/controllers/ControlInclude.h @@ -36,7 +36,7 @@ public: ControlInclude(Dialog &); /// - virtual bool initialiseParams(string const & data); + virtual bool initialiseParams(std::string const & data); /// clean-up on hide. virtual void clearParams(); /// clean-up on hide. @@ -50,13 +50,13 @@ public: void setParams(InsetCommandParams const &); /// Browse for a file - string const Browse(string const &, Type); + std::string const Browse(std::string const &, Type); /// load a file - void load(string const & file); + void load(std::string const & file); /// test if file exist - bool fileExists(string const & file); + bool fileExists(std::string const & file); private: /// InsetCommandParams params_; diff --git a/src/frontends/controllers/ControlLog.C b/src/frontends/controllers/ControlLog.C index 1c4a590c9f..5cbbab2d30 100644 --- a/src/frontends/controllers/ControlLog.C +++ b/src/frontends/controllers/ControlLog.C @@ -14,6 +14,9 @@ #include "ControlLog.h" +using std::string; + + ControlLog::ControlLog(Dialog & parent) : Dialog::Controller(parent) {} diff --git a/src/frontends/controllers/ControlLog.h b/src/frontends/controllers/ControlLog.h index 35c1a4ef56..0843d1e6c5 100644 --- a/src/frontends/controllers/ControlLog.h +++ b/src/frontends/controllers/ControlLog.h @@ -25,7 +25,7 @@ public: /// ControlLog(Dialog &); /// - virtual bool initialiseParams(string const & data); + virtual bool initialiseParams(std::string const & data); /// virtual void clearParams(); /// @@ -33,12 +33,12 @@ public: /// virtual bool isBufferDependent() const { return true; } /// - std::pair const & logfile() const { + std::pair const & logfile() const { return logfile_; } private: - std::pair logfile_; + std::pair logfile_; }; #endif // CONTROLLOG_H diff --git a/src/frontends/controllers/ControlMath.C b/src/frontends/controllers/ControlMath.C index 3beedee149..860906bd7c 100644 --- a/src/frontends/controllers/ControlMath.C +++ b/src/frontends/controllers/ControlMath.C @@ -22,6 +22,8 @@ using lyx::support::compare; using lyx::support::LibFileSearch; using lyx::support::subst; +using std::string; + ControlMath::ControlMath(Dialog & dialog) : Dialog::Controller(dialog) diff --git a/src/frontends/controllers/ControlMath.h b/src/frontends/controllers/ControlMath.h index 67f29bb90c..129cf8cd23 100644 --- a/src/frontends/controllers/ControlMath.h +++ b/src/frontends/controllers/ControlMath.h @@ -24,15 +24,15 @@ public: ControlMath(Dialog &); /// Nothing to initialise in this case. - virtual bool initialiseParams(string const &) { return true; } + virtual bool initialiseParams(std::string const &) { return true; } virtual void clearParams() {} virtual void dispatchParams() {} virtual bool isBufferDependent() const { return true; } /// dispatch an LFUN - void dispatchFunc(kb_action action, string const & arg = string()) const; + void dispatchFunc(kb_action action, std::string const & arg = std::string()) const; /// Insert a math symbol into the doc. - void dispatchInsert(string const & name) const; + void dispatchInsert(std::string const & name) const; /// Insert a subscript. void dispatchSubscript() const; /// Insert a superscript. @@ -40,15 +40,15 @@ public: /// Insert a cube root void dispatchCubeRoot() const; /// Insert a matrix - void dispatchMatrix(string const & str) const; + void dispatchMatrix(std::string const & str) const; /// Insert a delimiter - void dispatchDelim(string const & str) const; + void dispatchDelim(std::string const & str) const; /// Wwitch between display and inline void dispatchToggleDisplay() const; /** A request to the kernel to launch a dialog. * \param name the dialog identifier. */ - void showDialog(string const & name) const; + void showDialog(std::string const & name) const; }; @@ -85,6 +85,6 @@ extern int const nr_latex_ams_ops; * Return the mangled XPM filename of the given * math symbol. */ -string const find_xpm(string const & name); +std::string const find_xpm(std::string const & name); #endif // NOT CONTROLMATH diff --git a/src/frontends/controllers/ControlMinipage.C b/src/frontends/controllers/ControlMinipage.C index 7236982df6..ecee9dfd00 100644 --- a/src/frontends/controllers/ControlMinipage.C +++ b/src/frontends/controllers/ControlMinipage.C @@ -15,6 +15,9 @@ #include "funcrequest.h" +using std::string; + + ControlMinipage::ControlMinipage(Dialog & parent) : Dialog::Controller(parent) {} diff --git a/src/frontends/controllers/ControlMinipage.h b/src/frontends/controllers/ControlMinipage.h index 64cc8a96ac..bdb8fbfb6e 100644 --- a/src/frontends/controllers/ControlMinipage.h +++ b/src/frontends/controllers/ControlMinipage.h @@ -21,7 +21,7 @@ public: /// ControlMinipage(Dialog &); /// - virtual bool initialiseParams(string const & data); + virtual bool initialiseParams(std::string const & data); /// clean-up on hide. virtual void clearParams(); /// clean-up on hide. diff --git a/src/frontends/controllers/ControlNote.C b/src/frontends/controllers/ControlNote.C index ed9e8ab3ac..ac49fd1038 100644 --- a/src/frontends/controllers/ControlNote.C +++ b/src/frontends/controllers/ControlNote.C @@ -17,6 +17,7 @@ using std::vector; +using std::string; ControlNote::ControlNote(Dialog & parent) diff --git a/src/frontends/controllers/ControlNote.h b/src/frontends/controllers/ControlNote.h index 09d3901b8e..486a08640b 100644 --- a/src/frontends/controllers/ControlNote.h +++ b/src/frontends/controllers/ControlNote.h @@ -23,7 +23,7 @@ public: /// ControlNote(Dialog &); /// - virtual bool initialiseParams(string const & data); + virtual bool initialiseParams(std::string const & data); /// virtual void clearParams(); /// @@ -41,6 +41,6 @@ private: }; /// -void note_gui_tokens(std::vector &, std::vector &); +void note_gui_tokens(std::vector &, std::vector &); #endif // CONTROLNOTE_H diff --git a/src/frontends/controllers/ControlParagraph.C b/src/frontends/controllers/ControlParagraph.C index 7e37b32abf..0af8e5b9b9 100644 --- a/src/frontends/controllers/ControlParagraph.C +++ b/src/frontends/controllers/ControlParagraph.C @@ -19,8 +19,10 @@ #include "ParagraphParameters.h" #include "support/std_sstream.h" + using std::istringstream; using std::ostringstream; +using std::string; ControlParagraph::ControlParagraph(Dialog & parent) diff --git a/src/frontends/controllers/ControlParagraph.h b/src/frontends/controllers/ControlParagraph.h index ebcb2b5497..5053526bd5 100644 --- a/src/frontends/controllers/ControlParagraph.h +++ b/src/frontends/controllers/ControlParagraph.h @@ -22,7 +22,7 @@ public: /// ControlParagraph(Dialog &); /// - virtual bool initialiseParams(string const & data); + virtual bool initialiseParams(std::string const & data); /// clean-up on hide. virtual void clearParams(); /// clean-up on hide. diff --git a/src/frontends/controllers/ControlPreamble.C b/src/frontends/controllers/ControlPreamble.C index dc6a225f3d..a6eb00dff8 100644 --- a/src/frontends/controllers/ControlPreamble.C +++ b/src/frontends/controllers/ControlPreamble.C @@ -22,6 +22,9 @@ #include "frontends/LyXView.h" +using std::string; + + ControlPreamble::ControlPreamble(LyXView & lv, Dialogs & d) : ControlDialogBD(lv, d) {} diff --git a/src/frontends/controllers/ControlPreamble.h b/src/frontends/controllers/ControlPreamble.h index 97f822a744..f6aaa22d4f 100644 --- a/src/frontends/controllers/ControlPreamble.h +++ b/src/frontends/controllers/ControlPreamble.h @@ -15,7 +15,6 @@ #include "ControlDialog_impl.h" -#include "support/std_string.h" /** A controller for Preamble dialogs. */ @@ -25,9 +24,9 @@ public: ControlPreamble(LyXView &, Dialogs &); /// - string const & params() const; + std::string const & params() const; /// - void params(string const & newparams); + void params(std::string const & newparams); private: /// Get changed parameters and Dispatch them to the kernel. virtual void apply(); @@ -37,7 +36,7 @@ private: virtual void clearParams(); /// - string params_; + std::string params_; }; #endif // CONTROLPREAMBLE_H diff --git a/src/frontends/controllers/ControlPrefs.C b/src/frontends/controllers/ControlPrefs.C index 31696286e3..b5e1f4bb05 100644 --- a/src/frontends/controllers/ControlPrefs.C +++ b/src/frontends/controllers/ControlPrefs.C @@ -36,6 +36,7 @@ using lyx::support::system_lyxdir; using lyx::support::user_lyxdir; using std::pair; +using std::string; extern BufferList bufferlist; diff --git a/src/frontends/controllers/ControlPrefs.h b/src/frontends/controllers/ControlPrefs.h index 8a5f789b58..aa54bb41df 100644 --- a/src/frontends/controllers/ControlPrefs.h +++ b/src/frontends/controllers/ControlPrefs.h @@ -14,7 +14,6 @@ #include "ControlDialog_impl.h" -#include "support/std_string.h" #include "lyxrc.h" @@ -35,22 +34,22 @@ public: LyXRC const & rc() const { return rc_; } /// various file pickers - string const browsebind(string const & file); - string const browseUI(string const & file); - string const browsekbmap(string const & file); - string const browsedict(string const & file); + std::string const browsebind(std::string const & file); + std::string const browseUI(std::string const & file); + std::string const browsekbmap(std::string const & file); + std::string const browsedict(std::string const & file); /// general browse - string const browse(string const & file, string const & title); + std::string const browse(std::string const & file, std::string const & title); /// browse directory - string const browsedir(string const & path, string const & title); + std::string const browsedir(std::string const & path, std::string const & title); /// redraw widgets (for xforms color change) void redrawGUI(); /// set a color - void setColor(LColor_color col, string const & hex); + void setColor(LColor_color col, std::string const & hex); /// update the screen fonts after change void updateScreenFonts(); diff --git a/src/frontends/controllers/ControlPrint.C b/src/frontends/controllers/ControlPrint.C index 6aed2e1a1e..55ea077ade 100644 --- a/src/frontends/controllers/ControlPrint.C +++ b/src/frontends/controllers/ControlPrint.C @@ -41,6 +41,7 @@ using lyx::support::QuoteName; using lyx::support::Systemcall; using std::endl; +using std::string; ControlPrint::ControlPrint(LyXView & lv, Dialogs & d) diff --git a/src/frontends/controllers/ControlPrint.h b/src/frontends/controllers/ControlPrint.h index e6119c68a9..f02df010b1 100644 --- a/src/frontends/controllers/ControlPrint.h +++ b/src/frontends/controllers/ControlPrint.h @@ -16,7 +16,6 @@ #include "ControlDialog_impl.h" -#include "support/std_string.h" class PrinterParams; @@ -28,7 +27,7 @@ public: ControlPrint(LyXView &, Dialogs &); /// Browse for a file - string const Browse(string const &); + std::string const Browse(std::string const &); /// PrinterParams & params() const; private: diff --git a/src/frontends/controllers/ControlRef.C b/src/frontends/controllers/ControlRef.C index f8f8d8bc38..a66dc273f8 100644 --- a/src/frontends/controllers/ControlRef.C +++ b/src/frontends/controllers/ControlRef.C @@ -22,6 +22,8 @@ using lyx::support::MakeAbsPath; using lyx::support::MakeDisplayPath; using std::vector; +using std::string; + extern BufferList bufferlist; diff --git a/src/frontends/controllers/ControlRef.h b/src/frontends/controllers/ControlRef.h index 606c5956ef..d9181bc456 100644 --- a/src/frontends/controllers/ControlRef.h +++ b/src/frontends/controllers/ControlRef.h @@ -24,17 +24,17 @@ public: /// ControlRef(Dialog &); /// - std::vector const getLabelList(string const &) const; + std::vector const getLabelList(std::string const &) const; /// - void gotoRef(string const &); + void gotoRef(std::string const &); /// void gotoBookmark(); /// - std::vector const getBufferList() const; + std::vector const getBufferList() const; /// int getBufferNum() const; /// - string const getBufferName(int num) const; + std::string const getBufferName(int num) const; private: /** disconnect from the inset when the Apply button is pressed. Allows easy insertion of multiple references. */ diff --git a/src/frontends/controllers/ControlSearch.C b/src/frontends/controllers/ControlSearch.C index 6c0bae0b9b..7b3fdbff6a 100644 --- a/src/frontends/controllers/ControlSearch.C +++ b/src/frontends/controllers/ControlSearch.C @@ -20,6 +20,9 @@ #include "support/tostr.h" +using std::string; + + ControlSearch::ControlSearch(LyXView & lv, Dialogs & d) : ControlDialogBD(lv, d) {} diff --git a/src/frontends/controllers/ControlSearch.h b/src/frontends/controllers/ControlSearch.h index 595b8ce359..16855db05f 100644 --- a/src/frontends/controllers/ControlSearch.h +++ b/src/frontends/controllers/ControlSearch.h @@ -14,7 +14,6 @@ #include "ControlDialog_impl.h" -#include "support/std_string.h" /** A controller for Search dialogs. */ @@ -24,11 +23,11 @@ public: ControlSearch(LyXView &, Dialogs &); /// Searches occurence of string - void find(string const & search, + void find(std::string const & search, bool casesensitive, bool matchword, bool forward); /// Replaces occurence of string - void replace(string const & search, string const & replace, + void replace(std::string const & search, std::string const & replace, bool casesensitive, bool matchword, bool all); private: /// not needed. diff --git a/src/frontends/controllers/ControlSendto.C b/src/frontends/controllers/ControlSendto.C index 36f3e69e59..b9ea5f9ee2 100644 --- a/src/frontends/controllers/ControlSendto.C +++ b/src/frontends/controllers/ControlSendto.C @@ -31,6 +31,7 @@ using lyx::support::Systemcall; using lyx::support::trim; using std::vector; +using std::string; ControlSendto::ControlSendto(LyXView & lv, Dialogs & d) diff --git a/src/frontends/controllers/ControlSendto.h b/src/frontends/controllers/ControlSendto.h index 6f4cc60bb0..a86a67615e 100644 --- a/src/frontends/controllers/ControlSendto.h +++ b/src/frontends/controllers/ControlSendto.h @@ -14,7 +14,6 @@ #include "ControlDialog_impl.h" -#include "support/std_string.h" #include @@ -35,15 +34,15 @@ public: void setFormat(Format const *); /// The command to be executed - string const getCommand() const { return command_; }; - void setCommand(string const &); + std::string const getCommand() const { return command_; }; + void setCommand(std::string const &); private: /// virtual void apply(); /// Format const * format_; /// - string command_; + std::string command_; }; #endif // CONTROLSENDTO_H diff --git a/src/frontends/controllers/ControlShowFile.C b/src/frontends/controllers/ControlShowFile.C index fe57c8cb98..8144f1a0c7 100644 --- a/src/frontends/controllers/ControlShowFile.C +++ b/src/frontends/controllers/ControlShowFile.C @@ -13,9 +13,12 @@ #include "ControlShowFile.h" #include "support/filetools.h" + using lyx::support::GetFileContents; using lyx::support::OnlyFilename; +using std::string; + ControlShowFile::ControlShowFile(Dialog & parent) : Dialog::Controller(parent) diff --git a/src/frontends/controllers/ControlShowFile.h b/src/frontends/controllers/ControlShowFile.h index dc0ba57704..6f2f648344 100644 --- a/src/frontends/controllers/ControlShowFile.h +++ b/src/frontends/controllers/ControlShowFile.h @@ -21,7 +21,7 @@ public: /// ControlShowFile(Dialog &); /// - virtual bool initialiseParams(string const & data); + virtual bool initialiseParams(std::string const & data); /// virtual void clearParams(); /// @@ -29,13 +29,13 @@ public: /// virtual bool isBufferDependent() const { return false; } /// - string getFileContents(); + std::string getFileContents(); /// - string getFileName(); + std::string getFileName(); private: /// - string filename_; + std::string filename_; }; #endif // CONTROLSHOWFILE_H diff --git a/src/frontends/controllers/ControlSpellchecker.C b/src/frontends/controllers/ControlSpellchecker.C index afa264cb06..5d9ac92a34 100644 --- a/src/frontends/controllers/ControlSpellchecker.C +++ b/src/frontends/controllers/ControlSpellchecker.C @@ -34,9 +34,11 @@ #include "frontends/Alert.h" + using lyx::support::bformat; using std::endl; +using std::string; ControlSpellchecker::ControlSpellchecker(LyXView & lv, Dialogs & d) diff --git a/src/frontends/controllers/ControlSpellchecker.h b/src/frontends/controllers/ControlSpellchecker.h index 4e87d437b1..f8f68b547b 100644 --- a/src/frontends/controllers/ControlSpellchecker.h +++ b/src/frontends/controllers/ControlSpellchecker.h @@ -15,7 +15,6 @@ #include #include "ControlDialog_impl.h" -#include "support/std_string.h" #include "WordLangTuple.h" class SpellBase; @@ -34,10 +33,10 @@ public: ~ControlSpellchecker(); /// replace word with replacement - void replace(string const &); + void replace(std::string const &); /// replace all occurances of word - void replaceAll(string const &); + void replaceAll(std::string const &); /// insert word in personal dictionary void insert(); @@ -50,10 +49,10 @@ public: void check(); /// get suggestion - string const getSuggestion() const; + std::string const getSuggestion() const; /// get word - string const getWord() const; + std::string const getWord() const; /// returns progress value int getProgress() const { return oldval_; } diff --git a/src/frontends/controllers/ControlTabular.C b/src/frontends/controllers/ControlTabular.C index 9f5b523434..63cbcfac21 100644 --- a/src/frontends/controllers/ControlTabular.C +++ b/src/frontends/controllers/ControlTabular.C @@ -17,6 +17,9 @@ #include "insets/insettabular.h" +using std::string; + + ControlTabular::ControlTabular(Dialog & parent) : Dialog::Controller(parent), active_cell_(-1) {} diff --git a/src/frontends/controllers/ControlTabular.h b/src/frontends/controllers/ControlTabular.h index f7ed3ffe0d..0448ecd392 100644 --- a/src/frontends/controllers/ControlTabular.h +++ b/src/frontends/controllers/ControlTabular.h @@ -25,7 +25,7 @@ public: ControlTabular(Dialog &); /// - virtual bool initialiseParams(string const & data); + virtual bool initialiseParams(std::string const & data); /// clean-up on hide. virtual void clearParams(); /// We use set() instead. @@ -40,7 +40,7 @@ public: /// return true if units should default to metric bool useMetricUnits() const; /// set a parameter - void set(LyXTabular::Feature, string const & arg = string()); + void set(LyXTabular::Feature, std::string const & arg = std::string()); /// borders void toggleTopLine(); @@ -48,9 +48,9 @@ public: void toggleLeftLine(); void toggleRightLine(); - void setSpecial(string const & special); + void setSpecial(std::string const & special); - void setWidth(string const & width); + void setWidth(std::string const & width); void toggleMultiColumn(); diff --git a/src/frontends/controllers/ControlTabularCreate.C b/src/frontends/controllers/ControlTabularCreate.C index e66f636b1b..2361ca8199 100644 --- a/src/frontends/controllers/ControlTabularCreate.C +++ b/src/frontends/controllers/ControlTabularCreate.C @@ -16,6 +16,9 @@ #include "support/tostr.h" +using std::string; + + ControlTabularCreate::ControlTabularCreate(Dialog & parent) : Dialog::Controller(parent) {} diff --git a/src/frontends/controllers/ControlTabularCreate.h b/src/frontends/controllers/ControlTabularCreate.h index 9df649ecee..00e602a763 100644 --- a/src/frontends/controllers/ControlTabularCreate.h +++ b/src/frontends/controllers/ControlTabularCreate.h @@ -22,7 +22,7 @@ public: /// ControlTabularCreate(Dialog &); /// - virtual bool initialiseParams(string const & data); + virtual bool initialiseParams(std::string const & data); /// clean-up on hide. virtual void clearParams(); /// diff --git a/src/frontends/controllers/ControlTexinfo.C b/src/frontends/controllers/ControlTexinfo.C index f23de13768..c9d91c280e 100644 --- a/src/frontends/controllers/ControlTexinfo.C +++ b/src/frontends/controllers/ControlTexinfo.C @@ -14,6 +14,9 @@ #include "funcrequest.h" +using std::string; + + void getTexFileList(ControlTexinfo::texFileSuffix type, std::vector & list) { diff --git a/src/frontends/controllers/ControlTexinfo.h b/src/frontends/controllers/ControlTexinfo.h index 82080f43f3..2cd12e5c41 100644 --- a/src/frontends/controllers/ControlTexinfo.h +++ b/src/frontends/controllers/ControlTexinfo.h @@ -23,7 +23,7 @@ public: /// ControlTexinfo(Dialog &); /// Nothing to initialise in this case. - virtual bool initialiseParams(string const &) { return true; } + virtual bool initialiseParams(std::string const &) { return true; } /// virtual void clearParams() {} /// @@ -35,9 +35,9 @@ public: /// the file extensions enum texFileSuffix {cls, sty, bst}; /// show contents af a file - void viewFile(string const & filename) const; + void viewFile(std::string const & filename) const; /// show all classoptions - string const getClassOptions(string const & filename) const; + std::string const getClassOptions(std::string const & filename) const; private: /// virtual void apply() {} @@ -48,6 +48,6 @@ private: * Each entry in the file list is returned as a pair */ void getTexFileList(ControlTexinfo::texFileSuffix type, - std::vector & contents); + std::vector & contents); #endif // CONTROLTEXINFO_H diff --git a/src/frontends/controllers/ControlThesaurus.C b/src/frontends/controllers/ControlThesaurus.C index 7de4e0d7dc..da3883f0fe 100644 --- a/src/frontends/controllers/ControlThesaurus.C +++ b/src/frontends/controllers/ControlThesaurus.C @@ -18,6 +18,10 @@ #include "frontends/LyXView.h" + +using std::string; + + ControlThesaurus::ControlThesaurus(Dialog & parent) : Dialog::Controller(parent) {} diff --git a/src/frontends/controllers/ControlThesaurus.h b/src/frontends/controllers/ControlThesaurus.h index 3c397940f8..83023bed0b 100644 --- a/src/frontends/controllers/ControlThesaurus.h +++ b/src/frontends/controllers/ControlThesaurus.h @@ -23,7 +23,7 @@ public: /// ControlThesaurus(Dialog &); /// - virtual bool initialiseParams(string const & data); + virtual bool initialiseParams(std::string const & data); /// virtual void clearParams(); /// @@ -32,23 +32,23 @@ public: virtual bool isBufferDependent() const { return true; } /// replace the particular string - void replace(string const & newstr); + void replace(std::string const & newstr); /// get meanings - Thesaurus::Meanings const & getMeanings(string const & str); + Thesaurus::Meanings const & getMeanings(std::string const & str); /// the text - string const & text() const { return oldstr_; } + std::string const & text() const { return oldstr_; } private: /// last string looked up - string laststr_; + std::string laststr_; /// entries for last string Thesaurus::Meanings meanings_; /// original string - string oldstr_; + std::string oldstr_; /// not needed. virtual void apply() {} diff --git a/src/frontends/controllers/ControlToc.C b/src/frontends/controllers/ControlToc.C index 2cc312980d..797000262d 100644 --- a/src/frontends/controllers/ControlToc.C +++ b/src/frontends/controllers/ControlToc.C @@ -13,6 +13,8 @@ #include "ControlToc.h" using std::vector; +using std::string; + class Buffer; diff --git a/src/frontends/controllers/ControlToc.h b/src/frontends/controllers/ControlToc.h index 86d151f8ce..03c39ecb00 100644 --- a/src/frontends/controllers/ControlToc.h +++ b/src/frontends/controllers/ControlToc.h @@ -28,10 +28,10 @@ public: void goTo(lyx::toc::TocItem const &); /// Return the list of types available - std::vector const getTypes() const; + std::vector const getTypes() const; /// Given a type, returns the contents - lyx::toc::Toc const getContents(string const & type) const; + lyx::toc::Toc const getContents(std::string const & type) const; }; #endif // CONTROLTOC_H diff --git a/src/frontends/controllers/ControlVCLog.C b/src/frontends/controllers/ControlVCLog.C index 7770aa23e5..4e445921eb 100644 --- a/src/frontends/controllers/ControlVCLog.C +++ b/src/frontends/controllers/ControlVCLog.C @@ -22,6 +22,7 @@ using lyx::support::unlink; using std::endl; using std::ostream; +using std::string; ControlVCLog::ControlVCLog(Dialog & parent) diff --git a/src/frontends/controllers/ControlVCLog.h b/src/frontends/controllers/ControlVCLog.h index f5eec5ad91..d1a8c437d0 100644 --- a/src/frontends/controllers/ControlVCLog.h +++ b/src/frontends/controllers/ControlVCLog.h @@ -20,7 +20,7 @@ public: /// ControlVCLog(Dialog &); /// Nothing to initialise in this case. - virtual bool initialiseParams(string const &) { return true; } + virtual bool initialiseParams(std::string const &) { return true; } /// virtual void clearParams() {} /// @@ -30,7 +30,7 @@ public: /// put the log file into the ostream void getVCLogFile(std::ostream & ss) const; /// get the filename of the buffer - string const getBufferFileName() const; + std::string const getBufferFileName() const; }; #endif // CONTROLVCLOG_H diff --git a/src/frontends/controllers/ControlWrap.C b/src/frontends/controllers/ControlWrap.C index 8e3e562a8e..d506f71814 100644 --- a/src/frontends/controllers/ControlWrap.C +++ b/src/frontends/controllers/ControlWrap.C @@ -15,6 +15,9 @@ #include "insets/insetwrap.h" +using std::string; + + ControlWrap::ControlWrap(Dialog & parent) : Dialog::Controller(parent) {} diff --git a/src/frontends/controllers/ControlWrap.h b/src/frontends/controllers/ControlWrap.h index 2434fb7f17..63608d4900 100644 --- a/src/frontends/controllers/ControlWrap.h +++ b/src/frontends/controllers/ControlWrap.h @@ -21,7 +21,7 @@ public: /// ControlWrap(Dialog &); /// - virtual bool initialiseParams(string const & data); + virtual bool initialiseParams(std::string const & data); /// clean-up on hide. virtual void clearParams(); /// clean-up on hide. diff --git a/src/frontends/controllers/Dialog.C b/src/frontends/controllers/Dialog.C index 6b7e91ef32..3d5e6d92d7 100644 --- a/src/frontends/controllers/Dialog.C +++ b/src/frontends/controllers/Dialog.C @@ -16,6 +16,9 @@ #include "BCView.h" +using std::string; + + Dialog::Dialog(LyXView & lv, string const & name) : is_closing_(false), kernel_(lv), name_(name), bc_ptr_(new ButtonController) diff --git a/src/frontends/controllers/Dialog.h b/src/frontends/controllers/Dialog.h index 84b40f65ca..e4adb0f972 100644 --- a/src/frontends/controllers/Dialog.h +++ b/src/frontends/controllers/Dialog.h @@ -14,7 +14,7 @@ #include "Kernel.h" -#include "support/std_string.h" + #include #include @@ -31,13 +31,13 @@ public: /// \param lv is the access point for the dialog to the LyX kernel. /// \param name is the identifier given to the dialog by its parent /// container. - Dialog(LyXView & lv, string const & name); + Dialog(LyXView & lv, std::string const & name); ~Dialog(); /** The Dialog's name is the means by which a dialog identifies * itself to the kernel. */ - string const & name() const { return name_; } + std::string const & name() const { return name_; } /** \name Buttons * These methods are publicly accessible because they are invoked @@ -57,8 +57,8 @@ public: //@{ /// \param data is a string encoding of the data to be displayed. /// It is passed to the Controller to be translated into a useable form. - void show(string const & data); - void update(string const & data); + void show(std::string const & data); + void update(std::string const & data); void hide(); bool isVisible() const; @@ -113,7 +113,7 @@ private: bool is_closing_; Kernel kernel_; - string name_; + std::string name_; boost::scoped_ptr bc_ptr_; boost::scoped_ptr controller_ptr_; boost::scoped_ptr view_ptr_; @@ -138,7 +138,7 @@ public: * \param data is a string encoding of the parameters to be displayed. * \return true if the translation was successful. */ - virtual bool initialiseParams(string const & data) = 0; + virtual bool initialiseParams(std::string const & data) = 0; /// Enable the controller to clean up its data structures. virtual void clearParams() = 0; @@ -186,7 +186,7 @@ public: /** \param parent Dialog owning this Controller. * \param title is the dialog title displayed by the WM. */ - View(Dialog & parent, string title); + View(Dialog & parent, std::string title); virtual ~View() {} /** \name Generic View @@ -224,9 +224,9 @@ public: virtual void partialUpdate(int id); /// sets the title of the dialog (window caption) - void setTitle(string const &); + void setTitle(std::string const &); /// gets the title of the dialog (window caption) - string const & getTitle() const; + std::string const & getTitle() const; /** \name View Access * Enable the derived classes to access the other parts of the whole. @@ -248,7 +248,7 @@ protected: private: Dialog & p_; - string title_; + std::string title_; }; diff --git a/src/frontends/controllers/Kernel.C b/src/frontends/controllers/Kernel.C index 2cfd0a23e7..c7371efd5a 100644 --- a/src/frontends/controllers/Kernel.C +++ b/src/frontends/controllers/Kernel.C @@ -20,6 +20,9 @@ #include "frontends/LyXView.h" +using std::string; + + Kernel::Kernel(LyXView & lyxview) : lyxview_(lyxview) {} diff --git a/src/frontends/controllers/Kernel.h b/src/frontends/controllers/Kernel.h index 6022e390bf..2c09befb6d 100644 --- a/src/frontends/controllers/Kernel.h +++ b/src/frontends/controllers/Kernel.h @@ -12,8 +12,7 @@ #ifndef KERNEL_H #define KERNEL_H - -#include "support/std_string.h" +#include class Buffer; @@ -47,7 +46,7 @@ public: * It must, therefore, ask the kernel to provide this information. * \param name is used to identify the dialog to the kernel. */ - void updateDialog(string const & name) const; + void updateDialog(std::string const & name) const; /** A request from the Controller that future changes to the data * stored by the dialog are not applied to the inset currently @@ -55,7 +54,7 @@ public: * a new inset at the cursor position. * \param name is used to identify the dialog to the kernel. */ - void disconnect(string const & name) const; + void disconnect(std::string const & name) const; /** \name Kernel Wrappers * Simple wrapper functions to Buffer methods. @@ -63,7 +62,7 @@ public: //@{ bool isBufferAvailable() const; bool isBufferReadonly() const; - string const bufferFilepath() const; + std::string const bufferFilepath() const; //@} /** \enum DocTypes used to flag the different kinds of buffer diff --git a/src/frontends/controllers/ViewBase.C b/src/frontends/controllers/ViewBase.C index 4c27532024..bca83f8fd1 100644 --- a/src/frontends/controllers/ViewBase.C +++ b/src/frontends/controllers/ViewBase.C @@ -14,6 +14,9 @@ #include "ControlButtons.h" +using std::string; + + ViewBase::ViewBase(string const & t) : controller_ptr_(0), title_(t) {} diff --git a/src/frontends/controllers/ViewBase.h b/src/frontends/controllers/ViewBase.h index 203f88e98c..5c199fbed0 100644 --- a/src/frontends/controllers/ViewBase.h +++ b/src/frontends/controllers/ViewBase.h @@ -15,14 +15,14 @@ class ControlButtons; class ButtonController; -#include "support/std_string.h" - #include +#include + class ViewBase : boost::noncopyable { public: /// - ViewBase(string const &); + ViewBase(std::string const &); /// virtual ~ViewBase() {} @@ -59,16 +59,16 @@ public: /// ButtonController & bc(); /// sets the title of the dialog (window caption) - void setTitle(string const &); + void setTitle(std::string const &); /// gets the title of the dialog - string const & getTitle() const; + std::string const & getTitle() const; protected: /// We don't own this. ControlButtons * controller_ptr_; private: - string title_; + std::string title_; }; diff --git a/src/frontends/controllers/biblio.C b/src/frontends/controllers/biblio.C index 0fa0722c4c..caa9be2d32 100644 --- a/src/frontends/controllers/biblio.C +++ b/src/frontends/controllers/biblio.C @@ -34,6 +34,7 @@ using lyx::support::subst; using lyx::support::token; using lyx::support::trim; +using std::string; using std::ostringstream; using std::vector; diff --git a/src/frontends/controllers/biblio.h b/src/frontends/controllers/biblio.h index 1694ab93a5..adc9610cf9 100644 --- a/src/frontends/controllers/biblio.h +++ b/src/frontends/controllers/biblio.h @@ -12,8 +12,6 @@ #ifndef BIBLIOHELPERS_H #define BIBLIOHELPERS_H - -#include "support/std_string.h" #include #include @@ -49,27 +47,27 @@ enum Direction { }; /// First entry is the bibliography key, second the data -typedef std::map InfoMap; +typedef std::map InfoMap; /// Returns a vector of bibliography keys -std::vector const getKeys(InfoMap const &); +std::vector const getKeys(InfoMap const &); /** Returns the BibTeX data associated with a given key. Empty if no info exists. */ -string const getInfo(InfoMap const &, string const &); +std::string const getInfo(InfoMap const &, std::string const &); // rturn the year from the bibtex data record -string const getYear(InfoMap const & map, string const & key); +std::string const getYear(InfoMap const & map, std::string const & key); /// return the short form of an authorlist -string const getAbbreviatedAuthor(InfoMap const & map, string const & key); +std::string const getAbbreviatedAuthor(InfoMap const & map, std::string const & key); // return only the family name -string const familyName(string const & name); +std::string const familyName(std::string const & name); /** Search a BibTeX info field for the given key and return the associated field. */ -string const parseBibTeX(string data, string const & findkey); +std::string const parseBibTeX(std::string data, std::string const & findkey); /** Returns an iterator to the first key that meets the search criterion, or end() if unsuccessful. @@ -83,11 +81,11 @@ string const parseBibTeX(string data, string const & findkey); an enum defining the search direction. */ -std::vector::const_iterator +std::vector::const_iterator searchKeys(InfoMap const & map, - std::vector const & keys_to_search, - string const & search_expression, - std::vector::const_iterator start, + std::vector const & keys_to_search, + std::string const & search_expression, + std::vector::const_iterator start, Search, Direction, bool caseSensitive=false); @@ -105,7 +103,7 @@ struct CitationStyle { }; /// Given the LaTeX command, return the appropriate CitationStyle -CitationStyle const getCitationStyle(string const & command); +CitationStyle const getCitationStyle(std::string const & command); /** Returns the LaTeX citation command @@ -114,7 +112,7 @@ The CiteStyle enum, a flag forcing the full author list, a flag forcing upper case, e.g. "della Casa" becomes "Della Case" */ -string const getCiteCommand(CiteStyle, bool full, bool forceUCase); +std::string const getCiteCommand(CiteStyle, bool full, bool forceUCase); /// Returns a vector of available Citation styles. std::vector const getCiteStyles(bool usingNatbib); @@ -132,8 +130,8 @@ std::vector const getCiteStyles(bool usingNatbib); the InfoMap of bibkeys info, the available citation styles */ -std::vector const -getNumericalStrings(string const & key, +std::vector const +getNumericalStrings(std::string const & key, InfoMap const & map, std::vector const & styles); @@ -149,8 +147,8 @@ getNumericalStrings(string const & key, the InfoMap of bibkeys info, the available citation styles */ -std::vector const -getAuthorYearStrings(string const & key, +std::vector const +getAuthorYearStrings(std::string const & key, InfoMap const & map, std::vector const & styles); } // namespace biblio diff --git a/src/frontends/controllers/character.h b/src/frontends/controllers/character.h index 26aba08af9..0977b1ddc0 100644 --- a/src/frontends/controllers/character.h +++ b/src/frontends/controllers/character.h @@ -40,17 +40,17 @@ enum FONT_STATE { }; /// -typedef std::pair FamilyPair; +typedef std::pair FamilyPair; /// -typedef std::pair SeriesPair; +typedef std::pair SeriesPair; /// -typedef std::pair ShapePair; +typedef std::pair ShapePair; /// -typedef std::pair SizePair; +typedef std::pair SizePair; /// -typedef std::pair BarPair; +typedef std::pair BarPair; /// -typedef std::pair ColorPair; +typedef std::pair ColorPair; /// std::vector const getFamilyData(); diff --git a/src/frontends/controllers/frnt_lang.C b/src/frontends/controllers/frnt_lang.C index 9011a2d374..f627317494 100644 --- a/src/frontends/controllers/frnt_lang.C +++ b/src/frontends/controllers/frnt_lang.C @@ -17,8 +17,11 @@ #include + +using std::string; using std::vector; + namespace { struct Sorter { diff --git a/src/frontends/controllers/frnt_lang.h b/src/frontends/controllers/frnt_lang.h index ffff790236..6aaa38a0bb 100644 --- a/src/frontends/controllers/frnt_lang.h +++ b/src/frontends/controllers/frnt_lang.h @@ -12,8 +12,6 @@ #ifndef FRNT_LANG_H #define FRNT_LANG_H - -#include "support/std_string.h" #include #include @@ -22,7 +20,7 @@ namespace frnt { /// -typedef std::pair LanguagePair; +typedef std::pair LanguagePair; /** If the caller is the character dialog, add "No change" and "Reset" * to the vector. diff --git a/src/frontends/controllers/helper_funcs.C b/src/frontends/controllers/helper_funcs.C index 53262830d0..9ae3f80ed7 100644 --- a/src/frontends/controllers/helper_funcs.C +++ b/src/frontends/controllers/helper_funcs.C @@ -28,6 +28,7 @@ using lyx::support::prefixIs; using std::pair; using std::vector; +using std::string; string const browseFile(string const & filename, diff --git a/src/frontends/controllers/helper_funcs.h b/src/frontends/controllers/helper_funcs.h index 0530656eb1..6f0d73de31 100644 --- a/src/frontends/controllers/helper_funcs.h +++ b/src/frontends/controllers/helper_funcs.h @@ -12,9 +12,10 @@ #ifndef HELPERFUNCS_H #define HELPERFUNCS_H -#include "support/std_string.h" #include #include +#include + /** Launch a file dialog and return the chosen file. filename: a suggested filename. @@ -22,15 +23,15 @@ pattern: *.ps etc. dir1 = (name, dir), dir2 = (name, dir): extra buttons on the dialog. */ -string const -browseFile(string const & filename, - string const & title, - string const & pattern, +std::string const +browseFile(std::string const & filename, + std::string const & title, + std::string const & pattern, bool save = false, - std::pair const & dir1 = - std::make_pair(string(), string()), - std::pair const & dir2 = - std::make_pair(string(), string())); + std::pair const & dir1 = + std::make_pair(std::string(), std::string()), + std::pair const & dir2 = + std::make_pair(std::string(), std::string())); /* Wrapper around browseFile which tries to provide a filename @@ -39,16 +40,16 @@ browseFile(string const & filename, of the form "../baz/foo.txt", an absolute path is returned. This is intended to be useful for insets which encapsulate files/ */ -string const -browseRelFile(string const & filename, - string const & refpath, - string const & title, - string const & pattern, +std::string const +browseRelFile(std::string const & filename, + std::string const & refpath, + std::string const & title, + std::string const & pattern, bool save = false, - std::pair const & dir1 = - std::make_pair(string(), string()), - std::pair const & dir2 = - std::make_pair(string(), string())); + std::pair const & dir1 = + std::make_pair(std::string(), std::string()), + std::pair const & dir2 = + std::make_pair(std::string(), std::string())); /** Launch a file dialog and return the chosen directory. @@ -56,17 +57,17 @@ browseRelFile(string const & filename, title: the title of the dialog. dir1 = (name, dir), dir2 = (name, dir): extra buttons on the dialog. */ -string const -browseDir(string const & pathname, - string const & title, - std::pair const & dir1 = - std::make_pair(string(), string()), - std::pair const & dir2 = - std::make_pair(string(), string())); +std::string const +browseDir(std::string const & pathname, + std::string const & title, + std::pair const & dir1 = + std::make_pair(std::string(), std::string()), + std::pair const & dir2 = + std::make_pair(std::string(), std::string())); /// Returns a vector of units that can be used to create a valid LaTeX length. -std::vector const getLatexUnits(); +std::vector const getLatexUnits(); /** Functions to extract vectors of the first and second elems from a diff --git a/src/frontends/controllers/tex_helpers.C b/src/frontends/controllers/tex_helpers.C index 59adcbb587..587b7b93d6 100644 --- a/src/frontends/controllers/tex_helpers.C +++ b/src/frontends/controllers/tex_helpers.C @@ -36,6 +36,7 @@ using lyx::support::Systemcall; using lyx::support::token; using lyx::support::user_lyxdir; +using std::string; using std::endl; diff --git a/src/frontends/controllers/tex_helpers.h b/src/frontends/controllers/tex_helpers.h index ff3c6a163a..5300f90ebc 100644 --- a/src/frontends/controllers/tex_helpers.h +++ b/src/frontends/controllers/tex_helpers.h @@ -12,8 +12,6 @@ #ifndef TEX_HELPERS_H #define TEX_HELPERS_H - -#include "support/std_string.h" #include @@ -27,12 +25,12 @@ void texhash(); /** Fill \c contents from one of the three texfiles. * Each entry in the file list is returned as a name_with_path */ -void getTexFileList(string const & filename, std::vector & contents); +void getTexFileList(std::string const & filename, std::vector & contents); /// get the options of stylefile -string const getListOfOptions(string const & classname, string const & type); +std::string const getListOfOptions(std::string const & classname, std::string const & type); /// get a class with full path from the list -string const getTexFileFromList(string const & classname, string const & type); +std::string const getTexFileFromList(std::string const & classname, std::string const & type); #endif // TEX_HELPERS_H diff --git a/src/frontends/font_metrics.h b/src/frontends/font_metrics.h index ffd0c17378..8b3fb4ad9a 100644 --- a/src/frontends/font_metrics.h +++ b/src/frontends/font_metrics.h @@ -13,7 +13,8 @@ #ifndef FONT_METRICS_H #define FONT_METRICS_H -#include "support/std_string.h" +#include + class LyXFont; @@ -60,17 +61,17 @@ namespace font_metrics { return width(&c, 1, f); } /// return the width of the string in the font - inline int width(string const & s, LyXFont const & f) { + inline int width(std::string const & s, LyXFont const & f) { if (s.empty()) return 0; return width(s.data(), s.length(), f); } /// FIXME ?? - int signedWidth(string const & s, LyXFont const & f); + int signedWidth(std::string const & s, LyXFont const & f); /** * fill in width,ascent,descent with the values for the * given string in the font. */ - void rectText(string const & str, LyXFont const & font, + void rectText(std::string const & str, LyXFont const & font, int & width, int & ascent, int & descent); @@ -78,7 +79,7 @@ namespace font_metrics { * fill in width,ascent,descent with the values for the * given string in the font for a button. */ - void buttonText(string const & str, LyXFont const & font, + void buttonText(std::string const & str, LyXFont const & font, int & width, int & ascent, int & descent); diff --git a/src/frontends/gtk/Alert_pimpl.C b/src/frontends/gtk/Alert_pimpl.C index b6fddd96ef..dfec643dd6 100644 --- a/src/frontends/gtk/Alert_pimpl.C +++ b/src/frontends/gtk/Alert_pimpl.C @@ -14,6 +14,8 @@ #include "frontends/Alert.h" #include "frontends/Alert_pimpl.h" +using std::string; + namespace { diff --git a/src/frontends/gtk/Dialogs.C b/src/frontends/gtk/Dialogs.C index 29b8675d0c..e1dd28e6c8 100644 --- a/src/frontends/gtk/Dialogs.C +++ b/src/frontends/gtk/Dialogs.C @@ -101,6 +101,8 @@ #include +using std::string; + namespace { diff --git a/src/frontends/gtk/FileDialog.C b/src/frontends/gtk/FileDialog.C index 53494db6b8..af3cb9e191 100644 --- a/src/frontends/gtk/FileDialog.C +++ b/src/frontends/gtk/FileDialog.C @@ -13,6 +13,8 @@ #include "FileDialogPrivate.h" +using std::string; + FileDialog::FileDialog(string const & title, kb_action action, diff --git a/src/frontends/gtk/FileDialogPrivate.C b/src/frontends/gtk/FileDialogPrivate.C index b473fcf389..01eee228e6 100644 --- a/src/frontends/gtk/FileDialogPrivate.C +++ b/src/frontends/gtk/FileDialogPrivate.C @@ -11,10 +11,10 @@ #include #include -#include "support/std_string.h" - #include "FileDialogPrivate.h" +using std::string; + FileDialog::Private::Private(string const & title, kb_action action, diff --git a/src/frontends/gtk/FileDialogPrivate.h b/src/frontends/gtk/FileDialogPrivate.h index 47ec7ab4a0..f9880638e7 100644 --- a/src/frontends/gtk/FileDialogPrivate.h +++ b/src/frontends/gtk/FileDialogPrivate.h @@ -18,18 +18,18 @@ class FileDialog::Private : public SigC::Object { public: - Private(string const & title, + Private(std::string const & title, kb_action action, FileDialog::Button b1, FileDialog::Button b2); - FileDialog::Result const open(string const & path, - string const & mask, - string const & suggested); - FileDialog::Result const opendir(string const & path, - string const & suggested); + FileDialog::Result const open(std::string const & path, + std::string const & mask, + std::string const & suggested); + FileDialog::Result const opendir(std::string const & path, + std::string const & suggested); - FileDialog::Result const save(string const & path, - string const & mask, - string const & suggested); + FileDialog::Result const save(std::string const & path, + std::string const & mask, + std::string const & suggested); private: void onButton1Clicked(); @@ -37,8 +37,8 @@ private: Gtk::FileSelection fileSelection_; Gtk::Button button1_; Gtk::Button button2_; - string dir1_; - string dir2_; + std::string dir1_; + std::string dir2_; kb_action action_; }; diff --git a/src/frontends/gtk/GAboutlyx.C b/src/frontends/gtk/GAboutlyx.C index be533a2a3b..dafda8d049 100644 --- a/src/frontends/gtk/GAboutlyx.C +++ b/src/frontends/gtk/GAboutlyx.C @@ -20,6 +20,7 @@ #include "version.h" using std::ostringstream; +using std::string; namespace { diff --git a/src/frontends/gtk/GBC.C b/src/frontends/gtk/GBC.C index 1e37b7e684..5680177e76 100644 --- a/src/frontends/gtk/GBC.C +++ b/src/frontends/gtk/GBC.C @@ -13,6 +13,8 @@ #include "GBC.h" +using std::string; + GBC::GBC(ButtonController const & parent, string const & cancel, string const & close) diff --git a/src/frontends/gtk/GBC.h b/src/frontends/gtk/GBC.h index 51a1071f72..cd89ef7231 100644 --- a/src/frontends/gtk/GBC.h +++ b/src/frontends/gtk/GBC.h @@ -16,15 +16,14 @@ #include "ButtonController.h" #include "BCView.h" -#include "support/std_string.h" #include "gettext.h" class GBC : public GuiBC { public: GBC(ButtonController const & parent, - string const & cancel = _("Cancel"), - string const & close = _("Close")); + std::string const & cancel = _("Cancel"), + std::string const & close = _("Close")); private: /// Updates the button sensitivity (enabled/disabled) void setButtonEnabled(Gtk::Button *, bool enabled) const; @@ -33,7 +32,7 @@ private: void setWidgetEnabled(Gtk::Widget *, bool enabled) const; /// Set the label on the button - void setButtonLabel(Gtk::Button *, string const & label) const; + void setButtonLabel(Gtk::Button *, std::string const & label) const; }; #endif diff --git a/src/frontends/gtk/GLyXKeySym.C b/src/frontends/gtk/GLyXKeySym.C index acf2b10821..bf50a7ab6f 100644 --- a/src/frontends/gtk/GLyXKeySym.C +++ b/src/frontends/gtk/GLyXKeySym.C @@ -14,6 +14,8 @@ #include #include "GLyXKeySym.h" +using std::string; + GLyXKeySym::GLyXKeySym() : keyval_(GDK_VoidSymbol) { diff --git a/src/frontends/gtk/GLyXKeySym.h b/src/frontends/gtk/GLyXKeySym.h index 980a40d6d5..3ee53bcff0 100644 --- a/src/frontends/gtk/GLyXKeySym.h +++ b/src/frontends/gtk/GLyXKeySym.h @@ -12,7 +12,6 @@ #ifndef GLYX_KEYSYM_H #define GLYX_KEYSYM_H -#include "support/std_string.h" #include "frontends/LyXKeySym.h" class GLyXKeySym : public LyXKeySym @@ -22,12 +21,12 @@ public: GLyXKeySym(unsigned int keyval); void setKeyval(unsigned int keyval); unsigned int getKeyval() const { return keyval_; } - virtual void init(string const & symbolname); + virtual void init(std::string const & symbolname); virtual ~GLyXKeySym() {} virtual bool isOK() const; virtual bool isModifier() const; - virtual string getSymbolName() const; - virtual char getISOEncoded(string const & encoding) const; + virtual std::string getSymbolName() const; + virtual char getISOEncoded(std::string const & encoding) const; private: unsigned int keyval_; }; diff --git a/src/frontends/gtk/GMenubar.C b/src/frontends/gtk/GMenubar.C index f1677cf736..54c295d683 100644 --- a/src/frontends/gtk/GMenubar.C +++ b/src/frontends/gtk/GMenubar.C @@ -16,6 +16,8 @@ #include "debug.h" #include "lyxfunc.h" +using std::string; + namespace { diff --git a/src/frontends/gtk/GMenubar.h b/src/frontends/gtk/GMenubar.h index 8dafe13320..f6db2ceb47 100644 --- a/src/frontends/gtk/GMenubar.h +++ b/src/frontends/gtk/GMenubar.h @@ -23,7 +23,7 @@ public: GMenubar(LyXView *, MenuBackend const &); ~GMenubar(); void update(); - void openByName(string const &); + void openByName(std::string const &); private: void onCommandActivate(MenuItem const * item, Gtk::MenuItem * gitem); void onSubMenuActivate(MenuItem const * item, Gtk::MenuItem * gitem); diff --git a/src/frontends/gtk/GMiniBuffer.C b/src/frontends/gtk/GMiniBuffer.C index 436b561b17..79a3ca9579 100644 --- a/src/frontends/gtk/GMiniBuffer.C +++ b/src/frontends/gtk/GMiniBuffer.C @@ -15,9 +15,13 @@ #include "GMiniBuffer.h" #include "debug.h" #include "bufferview_funcs.h" + +#include "frontends/controllers/ControlCommandBuffer.h" + #include #include -#include "frontends/controllers/ControlCommandBuffer.h" + +using std::string; GMiniBuffer::GMiniBuffer(GView * view, ControlCommandBuffer & control) : diff --git a/src/frontends/gtk/GMiniBuffer.h b/src/frontends/gtk/GMiniBuffer.h index baf978c1a1..6c97551ea3 100644 --- a/src/frontends/gtk/GMiniBuffer.h +++ b/src/frontends/gtk/GMiniBuffer.h @@ -14,7 +14,7 @@ #define GMINI_BUFFER_H #include "frontends/Timeout.h" -#include "support/std_string.h" + class ControlCommandBuffer; class GMiniBuffer : public SigC::Object @@ -22,7 +22,7 @@ class GMiniBuffer : public SigC::Object public: GMiniBuffer(GView * view, ControlCommandBuffer & control); ~GMiniBuffer(); - void message(string const & str); + void message(std::string const & str); /// go into edit mode void editMode(); private: diff --git a/src/frontends/gtk/GPainter.C b/src/frontends/gtk/GPainter.C index 958e25c1ce..f91c0c35e3 100644 --- a/src/frontends/gtk/GPainter.C +++ b/src/frontends/gtk/GPainter.C @@ -12,7 +12,6 @@ #include #include "GPainter.h" -#include "support/std_string.h" #include "debug.h" #include "GWorkArea.h" #include "lyxrc.h" @@ -32,6 +31,8 @@ #include +using std::string; + GPainter::GPainter(GWorkArea & xwa) : Painter(), owner_(xwa) @@ -189,7 +190,7 @@ Painter & GPainter::image(int x, int y, Painter & GPainter::text(int x, int y, - string const & s, LyXFont const & f) + std::string const & s, LyXFont const & f) { size_t size = s.length() + 1; wchar_t * wcs = (wchar_t *) alloca(size * sizeof(wchar_t)); diff --git a/src/frontends/gtk/GPainter.h b/src/frontends/gtk/GPainter.h index 3c93e2418d..ff0ce5d82f 100644 --- a/src/frontends/gtk/GPainter.h +++ b/src/frontends/gtk/GPainter.h @@ -12,11 +12,11 @@ #ifndef GPAINTER_H #define GPAINTER_H +#include "frontends/Painter.h" + #include #include -#include "frontends/Painter.h" -#include "support/std_string.h" class LyXFont; class GWorkArea; @@ -99,7 +99,7 @@ public: /// draw a string at position x, y (y is the baseline) virtual Painter & text(int x, int y, - string const & str, LyXFont const & f); + std::string const & str, LyXFont const & f); /** Draw a string at position x, y (y is the baseline) * This is just for fast drawing diff --git a/src/frontends/gtk/GPrint.h b/src/frontends/gtk/GPrint.h index de78f03e57..af758a5b61 100644 --- a/src/frontends/gtk/GPrint.h +++ b/src/frontends/gtk/GPrint.h @@ -12,7 +12,6 @@ #ifndef GPRINT_H #define GPRINT_H -#include "support/std_string.h" #include "GViewBase.h" class ControlPrint; @@ -20,7 +19,7 @@ class ControlPrint; class GPrint : public GViewCB { public: - GPrint(Dialog & parent, string title = "Print Document"); + GPrint(Dialog & parent, std::string title = "Print Document"); private: virtual void apply(); virtual void update(); @@ -46,4 +45,3 @@ private: }; #endif - diff --git a/src/frontends/gtk/GText.C b/src/frontends/gtk/GText.C index 1a6aaf1438..7335cca907 100644 --- a/src/frontends/gtk/GText.C +++ b/src/frontends/gtk/GText.C @@ -18,6 +18,9 @@ #include "GText.h" #include "IdSc.h" +using std::string; + + GText::GText(Dialog & parent, string const & title, string const & label) : GViewCB(parent, title), label_(label), entry_(0) diff --git a/src/frontends/gtk/GText.h b/src/frontends/gtk/GText.h index b236bdce0c..bbbc88436e 100644 --- a/src/frontends/gtk/GText.h +++ b/src/frontends/gtk/GText.h @@ -13,20 +13,19 @@ #define GTEXT_H #include "GViewBase.h" -#include "support/std_string.h" class ControlCommand; class GText : public GViewCB { public: - GText(Dialog & parent, string const & title, string const & label); + GText(Dialog & parent, std::string const & title, std::string const & label); private: virtual void apply(); virtual void update(); virtual void doBuild(); void onEntryChanged(); - string const label_; + std::string const label_; Gtk::Entry * entry_; }; diff --git a/src/frontends/gtk/GToolbar.C b/src/frontends/gtk/GToolbar.C index 91a31d23f0..b0c9a080e5 100644 --- a/src/frontends/gtk/GToolbar.C +++ b/src/frontends/gtk/GToolbar.C @@ -25,6 +25,8 @@ #include "support/lstrings.h" #include "debug.h" +using std::string; + namespace { diff --git a/src/frontends/gtk/GToolbar.h b/src/frontends/gtk/GToolbar.h index 3d04909ab2..01b82a44c4 100644 --- a/src/frontends/gtk/GToolbar.h +++ b/src/frontends/gtk/GToolbar.h @@ -15,7 +15,6 @@ #include #include "frontends/Toolbar.h" #include "ToolbarBackend.h" -#include "support/std_string.h" class GToolbar : public Toolbar, public SigC::Object @@ -39,7 +38,7 @@ public: void update(); /// select the right layout in the combox - void setLayout(string const & layout); + void setLayout(std::string const & layout); /// Populate the layout combox; re-do everything if force is true. void updateLayoutList(); diff --git a/src/frontends/gtk/GView.C b/src/frontends/gtk/GView.C index 86509fa957..e71763757c 100644 --- a/src/frontends/gtk/GView.C +++ b/src/frontends/gtk/GView.C @@ -23,6 +23,9 @@ #include "lyxfunc.h" #include +using std::string; + + BufferView * current_view; GView * GView::view_ = 0; diff --git a/src/frontends/gtk/GView.h b/src/frontends/gtk/GView.h index 9185559011..9bfb989045 100644 --- a/src/frontends/gtk/GView.h +++ b/src/frontends/gtk/GView.h @@ -24,7 +24,7 @@ public: virtual void prohibitInput() const; virtual void allowInput() const; - virtual void message(string const &); + virtual void message(std::string const &); Gtk::VBox & getVBox() { return *vbox_.get(); } GView(); bool on_delete_event(GdkEventAny * event); @@ -38,7 +38,7 @@ public: private: void showViewState(); bool onFocusIn(GdkEventFocus * event); - virtual void setWindowTitle(string const & t, string const & it); + virtual void setWindowTitle(std::string const & t, std::string const & it); static GView * view_; std::auto_ptr vbox_; boost::scoped_ptr minibuffer_; diff --git a/src/frontends/gtk/GViewBase.C b/src/frontends/gtk/GViewBase.C index a80c1b4bac..beef2650d1 100644 --- a/src/frontends/gtk/GViewBase.C +++ b/src/frontends/gtk/GViewBase.C @@ -15,6 +15,8 @@ #include "ControlButtons.h" #include "support/filetools.h" +using std::string; + GViewBase::GViewBase(Dialog & parent, string const & t, bool allowResize) : Dialog::View(parent, t), allowResize_(allowResize) diff --git a/src/frontends/gtk/GViewBase.h b/src/frontends/gtk/GViewBase.h index 19cf5d767c..524d9760f6 100644 --- a/src/frontends/gtk/GViewBase.h +++ b/src/frontends/gtk/GViewBase.h @@ -22,7 +22,7 @@ class GViewBase : public Dialog::View, public SigC::Object { public: - GViewBase(Dialog &, string const &, bool allowResize); + GViewBase(Dialog &, std::string const &, bool allowResize); virtual ~GViewBase(); protected: // Build the dialog @@ -50,7 +50,7 @@ template class GViewDB : public GViewBase { protected: - GViewDB(Dialog &, string const &, bool allowResize); + GViewDB(Dialog &, std::string const &, bool allowResize); virtual const Gtk::Window * window() const; virtual Gtk::Window * window(); boost::scoped_ptr dialog_; @@ -58,7 +58,7 @@ protected: template -GViewDB::GViewDB(Dialog & parent, string const & t, bool allowResize) : +GViewDB::GViewDB(Dialog & parent, std::string const & t, bool allowResize) : GViewBase(parent, t, allowResize) { } @@ -81,7 +81,7 @@ const Gtk::Window * GViewDB::window() const class GViewGladeB : public GViewBase { protected: - GViewGladeB(Dialog & parent, string const & t, bool allowResize); + GViewGladeB(Dialog & parent, std::string const & t, bool allowResize); virtual const Gtk::Window * window() const; virtual Gtk::Window * window(); Glib::RefPtr xml_; @@ -95,12 +95,12 @@ public: Controller & controller(); Controller const & controller() const; protected: - GViewCB(Dialog & parent, string const & t, bool allowResize = false); + GViewCB(Dialog & parent, std::string const & t, bool allowResize = false); }; template -GViewCB::GViewCB(Dialog & parent, string const & t, +GViewCB::GViewCB(Dialog & parent, std::string const & t, bool allowResize) : Base(parent, t, allowResize) { diff --git a/src/frontends/gtk/GWorkArea.C b/src/frontends/gtk/GWorkArea.C index d3be415f89..dd5941c6fc 100644 --- a/src/frontends/gtk/GWorkArea.C +++ b/src/frontends/gtk/GWorkArea.C @@ -21,6 +21,9 @@ #include "funcrequest.h" #include "LColor.h" +using std::string; + + ColorCache colorCache; diff --git a/src/frontends/gtk/GWorkArea.h b/src/frontends/gtk/GWorkArea.h index d47c77107f..a2182329d0 100644 --- a/src/frontends/gtk/GWorkArea.h +++ b/src/frontends/gtk/GWorkArea.h @@ -81,9 +81,9 @@ public: /// a selection exists virtual void haveSelection(bool) const; /// - virtual string const getClipboard() const; + virtual std::string const getClipboard() const; /// - virtual void putClipboard(string const &) const; + virtual void putClipboard(std::string const &) const; void inputCommit(gchar * str); private: bool onExpose(GdkEventExpose * event); @@ -106,7 +106,7 @@ private: XftDraw * draw_; ColorHandler colorHandler_; GtkIMContext * imContext_; - string inputCache_; + std::string inputCache_; }; #endif diff --git a/src/frontends/gtk/IdSc.C b/src/frontends/gtk/IdSc.C index b70ae0c15e..f2506c8102 100644 --- a/src/frontends/gtk/IdSc.C +++ b/src/frontends/gtk/IdSc.C @@ -15,6 +15,8 @@ using lyx::support::split; +using std::string; + /// Extract shortcut from "|#" string string const id_sc::shortcut(string const & idsc) diff --git a/src/frontends/gtk/IdSc.h b/src/frontends/gtk/IdSc.h index ebe72cc40a..dc40a534f8 100644 --- a/src/frontends/gtk/IdSc.h +++ b/src/frontends/gtk/IdSc.h @@ -12,16 +12,16 @@ #ifndef ID_SC_H #define ID_SC_H -#include "support/std_string.h" +#include namespace id_sc { /// Extract shortcut from "|" string -string const shortcut(string const &); +std::string const shortcut(std::string const &); /// Extract identifier from "|" string -string const id(string const &); +std::string const id(std::string const &); } diff --git a/src/frontends/gtk/lyx_gui.C b/src/frontends/gtk/lyx_gui.C index d11ce197fe..ce655c1fc0 100644 --- a/src/frontends/gtk/lyx_gui.C +++ b/src/frontends/gtk/lyx_gui.C @@ -53,6 +53,7 @@ #include "xforms_helpers.h" using std::ostringstream; +using std::string; extern BufferList bufferlist; diff --git a/src/frontends/gtk/xftFontLoader.C b/src/frontends/gtk/xftFontLoader.C index 21b7a522b0..c68cc0bf6c 100644 --- a/src/frontends/gtk/xftFontLoader.C +++ b/src/frontends/gtk/xftFontLoader.C @@ -27,6 +27,7 @@ #include "frontends/lyx_gui.h" using std::endl; +using std::string; // The global fontLoader xftFontLoader fontLoader; diff --git a/src/frontends/gtk/xftFontLoader.h b/src/frontends/gtk/xftFontLoader.h index 4ff0dfad73..6bfd7351ab 100644 --- a/src/frontends/gtk/xftFontLoader.h +++ b/src/frontends/gtk/xftFontLoader.h @@ -13,7 +13,7 @@ #define XFT_FONT_LOADER_H #include "lyxfont.h" -#include "support/std_string.h" + #include class GWorkArea; @@ -61,7 +61,7 @@ private: LyXFont::FONT_SERIES series, LyXFont::FONT_SHAPE shape, LyXFont::FONT_SIZE size); - string familyString(LyXFont::FONT_FAMILY family); + std::string familyString(LyXFont::FONT_FAMILY family); /// Reset font handler void reset(); diff --git a/src/frontends/gtk/xftFontMetrics.C b/src/frontends/gtk/xftFontMetrics.C index 97d1af136c..068af20f6c 100644 --- a/src/frontends/gtk/xftFontMetrics.C +++ b/src/frontends/gtk/xftFontMetrics.C @@ -23,6 +23,8 @@ #include +using std::string; + namespace { diff --git a/src/frontends/lyx_gui.h b/src/frontends/lyx_gui.h index 04f889e701..296f830340 100644 --- a/src/frontends/lyx_gui.h +++ b/src/frontends/lyx_gui.h @@ -12,7 +12,7 @@ #ifndef LYX_GUI_H #define LYX_GUI_H -#include "support/std_string.h" + #include "FuncStatus.h" #include @@ -30,13 +30,13 @@ namespace lyx_gui { extern bool use_gui; /// return a suitable serif font name (called from non-gui context too !) -string const roman_font_name(); +std::string const roman_font_name(); /// return a suitable sans serif font name (called from non-gui context too !) -string const sans_font_name(); +std::string const sans_font_name(); /// return a suitable monospaced font name (called from non-gui context too !) -string const typewriter_font_name(); +std::string const typewriter_font_name(); /// parse command line and do basic initialisation void parse_init(int & argc, char * argv[]); @@ -51,7 +51,7 @@ void parse_lyxrc(); * Start the main event loop, after executing the given * batch commands, and loading the given documents */ -void start(string const & batch, std::vector const & files); +void start(std::string const & batch, std::vector const & files); /** * Synchronise all pending events. @@ -72,7 +72,7 @@ FuncStatus getStatus(FuncRequest const & ev); /** Eg, passing LColor::black returns "000000", * passing LColor::white returns "ffffff". */ -string const hexname(LColor_color col); +std::string const hexname(LColor_color col); /** * update an altered GUI color diff --git a/src/frontends/qt2/Alert_pimpl.C b/src/frontends/qt2/Alert_pimpl.C index 615728cebc..41c7570cb8 100644 --- a/src/frontends/qt2/Alert_pimpl.C +++ b/src/frontends/qt2/Alert_pimpl.C @@ -22,9 +22,12 @@ #include +using lyx::support::bformat; + using std::pair; using std::make_pair; -using lyx::support::bformat; +using std::string; + int prompt_pimpl(string const & tit, string const & question, int default_button, int cancel_button, diff --git a/src/frontends/qt2/BulletsModule.C b/src/frontends/qt2/BulletsModule.C index acaf295e2d..37adee70c1 100644 --- a/src/frontends/qt2/BulletsModule.C +++ b/src/frontends/qt2/BulletsModule.C @@ -27,6 +27,8 @@ using lyx::support::LibFileSearch; +using std::string; + BulletsModule::BulletsModule(QWidget * parent, const char * name, WFlags fl) : BulletsModuleBase(parent, name, fl), tmpbulletset(0) diff --git a/src/frontends/qt2/Dialogs.C b/src/frontends/qt2/Dialogs.C index 2f325ce6a6..a93d3f104b 100644 --- a/src/frontends/qt2/Dialogs.C +++ b/src/frontends/qt2/Dialogs.C @@ -77,6 +77,8 @@ #include "qt_helpers.h" +using std::string; + namespace { diff --git a/src/frontends/qt2/FileDialog.C b/src/frontends/qt2/FileDialog.C index fb4c463c95..0938cd8135 100644 --- a/src/frontends/qt2/FileDialog.C +++ b/src/frontends/qt2/FileDialog.C @@ -26,7 +26,7 @@ struct FileDialog::Private { }; -FileDialog::FileDialog(string const & t, +FileDialog::FileDialog(std::string const & t, kb_action s, Button b1, Button b2) : private_(new FileDialog::Private), title_(t), success_(s) { @@ -41,11 +41,11 @@ FileDialog::~FileDialog() } -FileDialog::Result const FileDialog::save(string const & path, - string const & mask, - string const & suggested) +FileDialog::Result const FileDialog::save(std::string const & path, + std::string const & mask, + std::string const & suggested) { - string filter(mask); + std::string filter(mask); if (mask.empty()) filter = _("All files (*)"); @@ -71,11 +71,11 @@ FileDialog::Result const FileDialog::save(string const & path, } -FileDialog::Result const FileDialog::open(string const & path, - string const & mask, - string const & suggested) +FileDialog::Result const FileDialog::open(std::string const & path, + std::string const & mask, + std::string const & suggested) { - string filter(mask); + std::string filter(mask); if (mask.empty()) filter = _("All files (*)"); @@ -99,10 +99,10 @@ FileDialog::Result const FileDialog::open(string const & path, } -FileDialog::Result const FileDialog::opendir(string const & path, - string const & suggested) +FileDialog::Result const FileDialog::opendir(std::string const & path, + std::string const & suggested) { - string filter = _("Directories"); + std::string filter = _("Directories"); LyXFileDialog dlg(path, filter, title_, private_->b1, private_->b2); lyxerr[Debug::GUI] << "Select with path \"" << path diff --git a/src/frontends/qt2/FileDialog_private.C b/src/frontends/qt2/FileDialog_private.C index 4bc65e36f7..785fe5edc9 100644 --- a/src/frontends/qt2/FileDialog_private.C +++ b/src/frontends/qt2/FileDialog_private.C @@ -21,6 +21,8 @@ using lyx::support::split; +using std::string; + namespace { diff --git a/src/frontends/qt2/FileDialog_private.h b/src/frontends/qt2/FileDialog_private.h index 573e42b3fd..2029ad4504 100644 --- a/src/frontends/qt2/FileDialog_private.h +++ b/src/frontends/qt2/FileDialog_private.h @@ -15,7 +15,6 @@ #include "frontends/FileDialog.h" #include -#include "support/std_string.h" class QToolButton; @@ -23,17 +22,17 @@ class LyXFileDialog : public QFileDialog { Q_OBJECT public: - LyXFileDialog(string const & p, string const & m, string const & t, + LyXFileDialog(std::string const & p, std::string const & m, std::string const & t, FileDialog::Button const & b1, FileDialog::Button const & b2); public slots: void buttonClicked(); private: QToolButton * b1_; - string b1_dir_; + std::string b1_dir_; QToolButton * b2_; - string b2_dir_; + std::string b2_dir_; }; #endif // FILEDIALOG_PRIVATE_H diff --git a/src/frontends/qt2/QAbout.C b/src/frontends/qt2/QAbout.C index 4e6534085d..63d9325388 100644 --- a/src/frontends/qt2/QAbout.C +++ b/src/frontends/qt2/QAbout.C @@ -31,6 +31,7 @@ using std::getline; using std::istringstream; using std::ostringstream; +using std::string; typedef QController > base_class; diff --git a/src/frontends/qt2/QBibtex.C b/src/frontends/qt2/QBibtex.C index bd6a45c571..e296f8181f 100644 --- a/src/frontends/qt2/QBibtex.C +++ b/src/frontends/qt2/QBibtex.C @@ -11,7 +11,6 @@ #include - #include "debug.h" #include "support/lstrings.h" @@ -37,6 +36,7 @@ using lyx::support::split; using lyx::support::trim; using std::vector; +using std::string; typedef QController > base_class; diff --git a/src/frontends/qt2/QBibtexDialog.C b/src/frontends/qt2/QBibtexDialog.C index 11df55887c..ea3d26fd99 100644 --- a/src/frontends/qt2/QBibtexDialog.C +++ b/src/frontends/qt2/QBibtexDialog.C @@ -26,6 +26,8 @@ using lyx::support::ChangeExtension; +using std::string; + QBibtexDialog::QBibtexDialog(QBibtex * form) : QBibtexDialogBase(0, 0, false, 0), diff --git a/src/frontends/qt2/QChanges.C b/src/frontends/qt2/QChanges.C index 2bfdd00717..2c6b71470d 100644 --- a/src/frontends/qt2/QChanges.C +++ b/src/frontends/qt2/QChanges.C @@ -21,6 +21,10 @@ #include "QChanges.h" #include "Qt2BC.h" + +using std::string; + + typedef QController > base_class; diff --git a/src/frontends/qt2/QCitation.C b/src/frontends/qt2/QCitation.C index 0fdc416c54..010bbedfaa 100644 --- a/src/frontends/qt2/QCitation.C +++ b/src/frontends/qt2/QCitation.C @@ -34,7 +34,7 @@ using lyx::support::getVectorFromString; using lyx::support::trim; using std::find; - +using std::string; using std::vector; diff --git a/src/frontends/qt2/QCitation.h b/src/frontends/qt2/QCitation.h index 4bc13b8448..742f008c0e 100644 --- a/src/frontends/qt2/QCitation.h +++ b/src/frontends/qt2/QCitation.h @@ -46,12 +46,12 @@ private: /// set the styles combo void updateStyle(); - void updateBrowser(QListBox *, std::vector const &) const; + void updateBrowser(QListBox *, std::vector const &) const; /// selected keys - std::vector citekeys; + std::vector citekeys; /// available bib keys - std::vector bibkeys; + std::vector bibkeys; }; #endif // QCITATION_H diff --git a/src/frontends/qt2/QCitationDialog.C b/src/frontends/qt2/QCitationDialog.C index b55cf0b8b5..42a7bb766c 100644 --- a/src/frontends/qt2/QCitationDialog.C +++ b/src/frontends/qt2/QCitationDialog.C @@ -24,6 +24,7 @@ #include "QCitation.h" using std::vector; +using std::string; QCitationDialog::QCitationDialog(QCitation * form) @@ -216,7 +217,7 @@ void QCitationDialog::find(biblio::Direction dir) biblio::InfoMap const & theMap = form_->controller().bibkeysInfo(); biblio::Search const type = add_->searchTypeCB->isChecked() - ? biblio::REGEX : biblio::SIMPLE; + ? biblio::REGEX : biblio::SIMPLE; vector::const_iterator start = form_->bibkeys.begin(); int const sel = add_->availableLB->currentItem(); diff --git a/src/frontends/qt2/QCommandBuffer.C b/src/frontends/qt2/QCommandBuffer.C index 8691a4e4b2..5a88cde8cf 100644 --- a/src/frontends/qt2/QCommandBuffer.C +++ b/src/frontends/qt2/QCommandBuffer.C @@ -26,6 +26,7 @@ using lyx::support::LibFileSearch; using std::vector; +using std::string; namespace { diff --git a/src/frontends/qt2/QDelimiterDialog.C b/src/frontends/qt2/QDelimiterDialog.C index 3d93d688ef..056f19b3ba 100644 --- a/src/frontends/qt2/QDelimiterDialog.C +++ b/src/frontends/qt2/QDelimiterDialog.C @@ -23,6 +23,8 @@ #include #include +using std::string; + namespace { char const * delim[] = { diff --git a/src/frontends/qt2/QDelimiterDialog.h b/src/frontends/qt2/QDelimiterDialog.h index 7f03f14da3..412e247d74 100644 --- a/src/frontends/qt2/QDelimiterDialog.h +++ b/src/frontends/qt2/QDelimiterDialog.h @@ -12,9 +12,8 @@ #ifndef QDELIMITERDIALOG_H #define QDELIMITERDIALOG_H - #include "ui/QDelimiterDialogBase.h" -#include "support/std_string.h" + class QMathDelimiter; class IconPalette; @@ -25,19 +24,19 @@ class QDelimiterDialog : public QDelimiterDialogBase { public: QDelimiterDialog(QMathDelimiter * form); public slots: - void ldelim_clicked(const string & str); - void rdelim_clicked(const string & str); + void ldelim_clicked(const std::string & str); + void rdelim_clicked(const std::string & str); void insertClicked(); protected: //needed ? virtual void closeEvent(QCloseEvent * e); private: - void set_label(QLabel * label, const string & str); + void set_label(QLabel * label, const std::string & str); /// symbol of left delimiter - string left_; + std::string left_; /// symbol of right delimiter - string right_; + std::string right_; /// owning form QMathDelimiter * form_; diff --git a/src/frontends/qt2/QDialogView.C b/src/frontends/qt2/QDialogView.C index c58814c7de..b6fef5e481 100644 --- a/src/frontends/qt2/QDialogView.C +++ b/src/frontends/qt2/QDialogView.C @@ -18,7 +18,7 @@ #include "QDialogView.h" -QDialogView::QDialogView(Dialog & parent, string const & t) +QDialogView::QDialogView(Dialog & parent, std::string const & t) : Dialog::View(parent,t), updating_(false) {} diff --git a/src/frontends/qt2/QDialogView.h b/src/frontends/qt2/QDialogView.h index 99589d9287..8229f06c40 100644 --- a/src/frontends/qt2/QDialogView.h +++ b/src/frontends/qt2/QDialogView.h @@ -27,7 +27,7 @@ class QDialogView : public QObject, public Dialog::View { Q_OBJECT public: /// - QDialogView(Dialog &, string const &); + QDialogView(Dialog &, std::string const &); /// virtual ~QDialogView() {} /// @@ -81,7 +81,7 @@ private: template class QView: public QDialogView { protected: - QView(Dialog &, string const &); + QView(Dialog &, std::string const &); /// update the dialog virtual void update(); @@ -99,7 +99,7 @@ protected: template -QView::QView(Dialog & p, string const & t) +QView::QView(Dialog & p, std::string const & t) : QDialogView(p, t) {} @@ -147,7 +147,7 @@ class QController: public Base { protected: /// - QController(Dialog &, string const &); + QController(Dialog &, std::string const &); public: /// The parent controller Controller & controller(); @@ -157,7 +157,7 @@ public: template -QController::QController(Dialog & p, string const & t) +QController::QController(Dialog & p, std::string const & t) : Base(p, t) {} diff --git a/src/frontends/qt2/QDocument.C b/src/frontends/qt2/QDocument.C index 414b03835d..e0da617cf1 100644 --- a/src/frontends/qt2/QDocument.C +++ b/src/frontends/qt2/QDocument.C @@ -37,9 +37,11 @@ #include "lengthcombo.h" +using lyx::support::bformat; using std::vector; -using lyx::support::bformat; +using std::string; + typedef Qt2CB > base_class; diff --git a/src/frontends/qt2/QDocument.h b/src/frontends/qt2/QDocument.h index 640aebe69d..4567612e78 100644 --- a/src/frontends/qt2/QDocument.h +++ b/src/frontends/qt2/QDocument.h @@ -48,7 +48,7 @@ private: void useClassDefaults(); /// FIXME - std::vector lang_; + std::vector lang_; }; #endif // QDOCUMENT_H diff --git a/src/frontends/qt2/QDocumentDialog.C b/src/frontends/qt2/QDocumentDialog.C index 700e9741bc..0daec0fcb4 100644 --- a/src/frontends/qt2/QDocumentDialog.C +++ b/src/frontends/qt2/QDocumentDialog.C @@ -24,7 +24,6 @@ #include "bufferparams.h" #include "lyxrc.h" - #include #include #include @@ -37,6 +36,8 @@ using lyx::support::token; +using std::string; + QDocumentDialog::QDocumentDialog(QDocument * form) : QDocumentDialogBase(0, 0, false, 0), form_(form) diff --git a/src/frontends/qt2/QDocumentDialog.h b/src/frontends/qt2/QDocumentDialog.h index 248f5c97a3..7f92c6d5c1 100644 --- a/src/frontends/qt2/QDocumentDialog.h +++ b/src/frontends/qt2/QDocumentDialog.h @@ -27,7 +27,6 @@ #include "ui/MarginsModuleBase.h" #include "ui/PreambleModuleBase.h" -#include "support/std_string.h" class QDocument; class FloatPlacement; @@ -40,8 +39,8 @@ public: QDocumentDialog(QDocument *); ~QDocumentDialog(); - void updateFontsize(string const &, string const &); - void updatePagestyle(string const &, string const &); + void updateFontsize(std::string const &, std::string const &); + void updatePagestyle(std::string const &, std::string const &); void showPreamble(); diff --git a/src/frontends/qt2/QExternal.C b/src/frontends/qt2/QExternal.C index 199a831487..cbbf8db32f 100644 --- a/src/frontends/qt2/QExternal.C +++ b/src/frontends/qt2/QExternal.C @@ -31,6 +31,8 @@ using lyx::support::strToInt; +using std::string; + typedef QController > base_class; diff --git a/src/frontends/qt2/QExternal.h b/src/frontends/qt2/QExternal.h index 4659a5203e..65c7589667 100644 --- a/src/frontends/qt2/QExternal.h +++ b/src/frontends/qt2/QExternal.h @@ -37,7 +37,7 @@ private: virtual void build_dialog(); /// get the right helptext - string const helpText() const; + std::string const helpText() const; }; #endif // QEXTERNAL_H diff --git a/src/frontends/qt2/QGraphics.C b/src/frontends/qt2/QGraphics.C index c3144c7fc0..cd117c3267 100644 --- a/src/frontends/qt2/QGraphics.C +++ b/src/frontends/qt2/QGraphics.C @@ -41,6 +41,7 @@ using lyx::support::strToInt; using lyx::support::token; using std::vector; +using std::string; typedef QController > base_class; diff --git a/src/frontends/qt2/QGraphics.h b/src/frontends/qt2/QGraphics.h index 502399ff1d..be0d1c17e2 100644 --- a/src/frontends/qt2/QGraphics.h +++ b/src/frontends/qt2/QGraphics.h @@ -43,7 +43,7 @@ private: void getBB(); /// Store the LaTeX names for the rotation origins. - std::vector origin_ltx; + std::vector origin_ltx; }; diff --git a/src/frontends/qt2/QGraphicsDialog.C b/src/frontends/qt2/QGraphicsDialog.C index d35c85bf46..9fc6a5b80e 100644 --- a/src/frontends/qt2/QGraphicsDialog.C +++ b/src/frontends/qt2/QGraphicsDialog.C @@ -24,6 +24,7 @@ #include "QGraphicsDialog.h" #include "QGraphics.h" +using std::string; QGraphicsDialog::QGraphicsDialog(QGraphics * form) diff --git a/src/frontends/qt2/QInclude.C b/src/frontends/qt2/QInclude.C index 5c23e724be..bc7f3dc97b 100644 --- a/src/frontends/qt2/QInclude.C +++ b/src/frontends/qt2/QInclude.C @@ -23,6 +23,8 @@ #include #include +using std::string; + typedef QController > base_class; diff --git a/src/frontends/qt2/QIndex.C b/src/frontends/qt2/QIndex.C index 912dc1f37a..60b7627f83 100644 --- a/src/frontends/qt2/QIndex.C +++ b/src/frontends/qt2/QIndex.C @@ -22,6 +22,8 @@ #include #include +using std::string; + typedef QController > base_class; diff --git a/src/frontends/qt2/QIndex.h b/src/frontends/qt2/QIndex.h index 45212715e4..a22020aeb0 100644 --- a/src/frontends/qt2/QIndex.h +++ b/src/frontends/qt2/QIndex.h @@ -26,7 +26,7 @@ class QIndex : public: friend class QIndexDialog; - QIndex(Dialog &, string const & title, QString const & label); + QIndex(Dialog &, std::string const & title, QString const & label); protected: virtual bool isValid(); private: diff --git a/src/frontends/qt2/QLImage.C b/src/frontends/qt2/QLImage.C index 1dfe188a56..2078eb77d5 100644 --- a/src/frontends/qt2/QLImage.C +++ b/src/frontends/qt2/QLImage.C @@ -28,6 +28,7 @@ using lyx::support::lowercase; using std::endl; using std::find_if; +using std::string; namespace lyx { diff --git a/src/frontends/qt2/QLImage.h b/src/frontends/qt2/QLImage.h index b4d1a1684c..581a8bf424 100644 --- a/src/frontends/qt2/QLImage.h +++ b/src/frontends/qt2/QLImage.h @@ -46,7 +46,7 @@ private: * The process is asynchronous, so this method starts the loading. * When finished, the Image::finishedLoading signal is emitted. */ - virtual void load_impl(string const & filename); + virtual void load_impl(std::string const & filename); /** * Generate the pixmap, based on the current state of * image_ (clipped, rotated, scaled etc). diff --git a/src/frontends/qt2/QLMenubar.C b/src/frontends/qt2/QLMenubar.C index e21519e4cc..ec63f09ca2 100644 --- a/src/frontends/qt2/QLMenubar.C +++ b/src/frontends/qt2/QLMenubar.C @@ -21,6 +21,7 @@ using std::pair; +using std::string; QLMenubar::QLMenubar(LyXView * view, MenuBackend const & mbe) diff --git a/src/frontends/qt2/QLMenubar.h b/src/frontends/qt2/QLMenubar.h index 6534d23f87..ae14ae2148 100644 --- a/src/frontends/qt2/QLMenubar.h +++ b/src/frontends/qt2/QLMenubar.h @@ -15,7 +15,7 @@ #define QLMENUBAR_H #include "frontends/Menubar.h" -#include "support/std_string.h" + #include class LyXView; @@ -28,7 +28,7 @@ public: QLMenubar(LyXView *, MenuBackend const &); /// opens a top-level submenu given its name - void openByName(string const &); + void openByName(std::string const &); /// update the state of the menuitems - not needed void update(); @@ -45,7 +45,7 @@ private: /// menu controller MenuBackend const & menubackend_; - typedef std::map NameMap; + typedef std::map NameMap; /// name to menu for openByName NameMap name_map_; diff --git a/src/frontends/qt2/QLPainter.C b/src/frontends/qt2/QLPainter.C index a6dce362db..8ca3000d4b 100644 --- a/src/frontends/qt2/QLPainter.C +++ b/src/frontends/qt2/QLPainter.C @@ -25,6 +25,7 @@ #include using std::endl; +using std::string; QLPainter::QLPainter(QWorkArea & qwa) diff --git a/src/frontends/qt2/QLPainter.h b/src/frontends/qt2/QLPainter.h index e24a56335b..ffc5f20004 100644 --- a/src/frontends/qt2/QLPainter.h +++ b/src/frontends/qt2/QLPainter.h @@ -12,9 +12,7 @@ #ifndef QLPAINTER_H #define QLPAINTER_H - #include "Painter.h" -#include "support/std_string.h" #include @@ -103,7 +101,7 @@ public: /// draw a string at position x, y (y is the baseline) virtual Painter & text(int x, int y, - string const & str, LyXFont const & f); + std::string const & str, LyXFont const & f); /** Draw a string at position x, y (y is the baseline) * This is just for fast drawing diff --git a/src/frontends/qt2/QLPopupMenu.C b/src/frontends/qt2/QLPopupMenu.C index 5f8bb90234..b40a386236 100644 --- a/src/frontends/qt2/QLPopupMenu.C +++ b/src/frontends/qt2/QLPopupMenu.C @@ -23,7 +23,7 @@ using lyx::support::subst; using std::make_pair; - +using std::string; using std::pair; diff --git a/src/frontends/qt2/QLPopupMenu.h b/src/frontends/qt2/QLPopupMenu.h index cf1279cc2c..e86c03113f 100644 --- a/src/frontends/qt2/QLPopupMenu.h +++ b/src/frontends/qt2/QLPopupMenu.h @@ -17,8 +17,6 @@ #include "funcrequest.h" -#include "support/std_string.h" - #include #include @@ -39,7 +37,7 @@ class QLPopupMenu : public QPopupMenu { Q_OBJECT public: QLPopupMenu(QLMenubar * owner, - string const & name, bool toplevel); + std::string const & name, bool toplevel); /// populate the menu void populate(Menu * menu); @@ -53,7 +51,7 @@ private: QLMenubar * owner_; /// the name of this menu - string name_; + std::string name_; /// typedef std::vector Funcs; diff --git a/src/frontends/qt2/QLToolbar.C b/src/frontends/qt2/QLToolbar.C index f88e416d55..a1f7566615 100644 --- a/src/frontends/qt2/QLToolbar.C +++ b/src/frontends/qt2/QLToolbar.C @@ -27,6 +27,7 @@ #include using std::endl; +using std::string; class QLComboBox : public QComboBox { diff --git a/src/frontends/qt2/QLToolbar.h b/src/frontends/qt2/QLToolbar.h index 1701523f27..3f5f667975 100644 --- a/src/frontends/qt2/QLToolbar.h +++ b/src/frontends/qt2/QLToolbar.h @@ -41,7 +41,7 @@ public: void add(ToolbarBackend::Toolbar const & tb); /// add an item to a toolbar - void add(QToolBar * tb, FuncRequest const &, string const & tooltip); + void add(QToolBar * tb, FuncRequest const &, std::string const & tooltip); /// show or hide a toolbar void displayToolbar(ToolbarBackend::Toolbar const & tb, bool show); @@ -50,7 +50,7 @@ public: void update(); /// select the right layout in the combox - void setLayout(string const & layout); + void setLayout(std::string const & layout); /// Populate the layout combox. void updateLayoutList(); /// Drop down the layout list @@ -58,7 +58,7 @@ public: /// Erase the layout list void clearLayoutList(); private: - void changed_layout(string const & sel); + void changed_layout(std::string const & sel); void button_selected(QToolButton * button); @@ -66,7 +66,7 @@ private: boost::scoped_ptr proxy_; - std::map toolbars_; + std::map toolbars_; QLComboBox * combo_; diff --git a/src/frontends/qt2/QLog.C b/src/frontends/qt2/QLog.C index 02988d67d1..843d3aa08d 100644 --- a/src/frontends/qt2/QLog.C +++ b/src/frontends/qt2/QLog.C @@ -26,6 +26,7 @@ using std::ifstream; using std::ostringstream; +using std::string; typedef QController > base_class; diff --git a/src/frontends/qt2/QLyXKeySym.C b/src/frontends/qt2/QLyXKeySym.C index 8fab811c1d..bef0f54c32 100644 --- a/src/frontends/qt2/QLyXKeySym.C +++ b/src/frontends/qt2/QLyXKeySym.C @@ -22,7 +22,7 @@ #include using std::endl; - +using std::string; using std::map; diff --git a/src/frontends/qt2/QLyXKeySym.h b/src/frontends/qt2/QLyXKeySym.h index d22d134418..e27cfff3ad 100644 --- a/src/frontends/qt2/QLyXKeySym.h +++ b/src/frontends/qt2/QLyXKeySym.h @@ -13,8 +13,6 @@ #ifndef QLYXKEYSYM_H #define QLYXKEYSYM_H - -#include "support/std_string.h" #include "frontends/LyXKeySym.h" #include @@ -36,7 +34,7 @@ public: void set(QKeyEvent * ev); /// set from a LyX symbolic name - virtual void init(string const & symbolname); + virtual void init(std::string const & symbolname); /// Is this a valid key? virtual bool isOK() const; @@ -45,7 +43,7 @@ public: virtual bool isModifier() const; /// return the LyX symbolic name - virtual string getSymbolName() const; + virtual std::string getSymbolName() const; /// Is this normal insertable text ? (last ditch attempt only) virtual bool isText() const; @@ -55,7 +53,7 @@ public: * This converts the LyXKeySym to a 8-bit encoded character. * This relies on user to use the right encoding. */ - virtual char getISOEncoded(string const & encoding) const; + virtual char getISOEncoded(std::string const & encoding) const; /// int key() const { return key_; diff --git a/src/frontends/qt2/QMathDialog.C b/src/frontends/qt2/QMathDialog.C index c28c400213..897eec9ae9 100644 --- a/src/frontends/qt2/QMathDialog.C +++ b/src/frontends/qt2/QMathDialog.C @@ -26,6 +26,7 @@ #include #include +using std::string; class QScrollViewSingle : public QScrollView { diff --git a/src/frontends/qt2/QMathDialog.h b/src/frontends/qt2/QMathDialog.h index 47e0b1c476..09585fb111 100644 --- a/src/frontends/qt2/QMathDialog.h +++ b/src/frontends/qt2/QMathDialog.h @@ -12,9 +12,8 @@ #ifndef QMATHDIALOG_H #define QMATHDIALOG_H - #include "ui/QMathDialogBase.h" -#include "support/std_string.h" + class QMath; class IconPalette; @@ -33,7 +32,7 @@ public slots: virtual void subscriptClicked(); virtual void superscriptClicked(); virtual void equationClicked(); - void symbol_clicked(const string &); + void symbol_clicked(const std::string &); void insertSpace(int id); void insertRoot(int id); void insertStyle(int id); diff --git a/src/frontends/qt2/QMathMatrixDialog.C b/src/frontends/qt2/QMathMatrixDialog.C index 5f74284cac..4ede05e30d 100644 --- a/src/frontends/qt2/QMathMatrixDialog.C +++ b/src/frontends/qt2/QMathMatrixDialog.C @@ -25,6 +25,7 @@ #include "emptytable.h" using std::ostringstream; +using std::string; static char h_align_str[80] = "c"; diff --git a/src/frontends/qt2/QMinipage.C b/src/frontends/qt2/QMinipage.C index 972dddfe8d..7a062f4c48 100644 --- a/src/frontends/qt2/QMinipage.C +++ b/src/frontends/qt2/QMinipage.C @@ -26,6 +26,8 @@ using lyx::support::strToDbl; +using std::string; + typedef QController > base_class; diff --git a/src/frontends/qt2/QNote.C b/src/frontends/qt2/QNote.C index 959c61e685..26823d20b4 100644 --- a/src/frontends/qt2/QNote.C +++ b/src/frontends/qt2/QNote.C @@ -21,6 +21,8 @@ #include "QNote.h" #include "Qt2BC.h" +using std::string; + typedef QController > base_class; diff --git a/src/frontends/qt2/QParagraph.C b/src/frontends/qt2/QParagraph.C index e6faf88475..44cb3acc7a 100644 --- a/src/frontends/qt2/QParagraph.C +++ b/src/frontends/qt2/QParagraph.C @@ -40,7 +40,7 @@ using lyx::support::trim; using std::bind2nd; using std::remove_if; - +using std::string; using std::vector; diff --git a/src/frontends/qt2/QParagraph.h b/src/frontends/qt2/QParagraph.h index 4ef7424af2..fb92a5b01b 100644 --- a/src/frontends/qt2/QParagraph.h +++ b/src/frontends/qt2/QParagraph.h @@ -13,9 +13,8 @@ #ifndef QPARAGRAPH_H #define QPARAGRAPH_H - #include "QDialogView.h" -#include "support/std_string.h" + #include class ControlParagraph; @@ -37,7 +36,7 @@ private: /// build the dialog virtual void build_dialog(); - std::vector units_; + std::vector units_; }; #endif // QPARAGRAPH_H diff --git a/src/frontends/qt2/QPrefs.C b/src/frontends/qt2/QPrefs.C index adf0cfc9c9..0c0ad9e51c 100644 --- a/src/frontends/qt2/QPrefs.C +++ b/src/frontends/qt2/QPrefs.C @@ -58,7 +58,7 @@ using lyx::support::strToDbl; using std::endl; using std::setfill; using std::setw; - +using std::string; using std::ostringstream; using std::pair; using std::vector; diff --git a/src/frontends/qt2/QPrefs.h b/src/frontends/qt2/QPrefs.h index 3559ac2e47..faf884df19 100644 --- a/src/frontends/qt2/QPrefs.h +++ b/src/frontends/qt2/QPrefs.h @@ -43,7 +43,7 @@ private: virtual void build_dialog(); /// languages - std::vector lang_; + std::vector lang_; /// converters Converters converters_; diff --git a/src/frontends/qt2/QPrefsDialog.C b/src/frontends/qt2/QPrefsDialog.C index 1d470e704e..f0532564a5 100644 --- a/src/frontends/qt2/QPrefsDialog.C +++ b/src/frontends/qt2/QPrefsDialog.C @@ -47,6 +47,8 @@ #include "qcoloritem.h" #include "qfontexample.h" +using std::string; + QPrefsDialog::QPrefsDialog(QPrefs * form) : QPrefsDialogBase(0, 0, false, 0), form_(form) diff --git a/src/frontends/qt2/QRef.C b/src/frontends/qt2/QRef.C index 4c9bc004c9..8ae515995a 100644 --- a/src/frontends/qt2/QRef.C +++ b/src/frontends/qt2/QRef.C @@ -28,6 +28,7 @@ #include "qt_helpers.h" using std::vector; +using std::string; typedef QController > base_class; diff --git a/src/frontends/qt2/QRef.h b/src/frontends/qt2/QRef.h index d837dff84d..ed53f9d15c 100644 --- a/src/frontends/qt2/QRef.h +++ b/src/frontends/qt2/QRef.h @@ -12,10 +12,10 @@ #ifndef QREF_H #define QREF_H - #include "QDialogView.h" + #include -#include "support/std_string.h" + class ControlRef; class QRefDialog; @@ -64,7 +64,7 @@ private: bool at_ref_; /// the references - std::vector refs_; + std::vector refs_; }; #endif // QREF_H diff --git a/src/frontends/qt2/QSearch.C b/src/frontends/qt2/QSearch.C index 9a1d94bdd8..6a705f4c7c 100644 --- a/src/frontends/qt2/QSearch.C +++ b/src/frontends/qt2/QSearch.C @@ -20,6 +20,8 @@ #include #include +using std::string; + typedef Qt2CB > base_class; diff --git a/src/frontends/qt2/QSearch.h b/src/frontends/qt2/QSearch.h index 05d3851cc1..3da9d557ff 100644 --- a/src/frontends/qt2/QSearch.h +++ b/src/frontends/qt2/QSearch.h @@ -36,10 +36,10 @@ private: /// build the dialog virtual void build_dialog(); - void find(string const & str, bool casesens, + void find(std::string const & str, bool casesens, bool words, bool backwards); - void replace(string const & findstr, string const & replacestr, + void replace(std::string const & findstr, std::string const & replacestr, bool casesens, bool words, bool all); }; diff --git a/src/frontends/qt2/QSearchDialog.C b/src/frontends/qt2/QSearchDialog.C index b9e0715c38..7131e42bd4 100644 --- a/src/frontends/qt2/QSearchDialog.C +++ b/src/frontends/qt2/QSearchDialog.C @@ -21,6 +21,8 @@ #include #include +using std::string; + namespace { void uniqueInsert(QComboBox * box, QString const & text) diff --git a/src/frontends/qt2/QSearchDialog.h b/src/frontends/qt2/QSearchDialog.h index e0fe998f7c..5ae2547714 100644 --- a/src/frontends/qt2/QSearchDialog.h +++ b/src/frontends/qt2/QSearchDialog.h @@ -14,7 +14,6 @@ #include "ui/QSearchDialogBase.h" -#include "support/std_string.h" class QSearch; class QCloseEvent; @@ -36,7 +35,7 @@ protected: private: // add a string to the combo if needed - void remember(string const & find, QComboBox & combo); + void remember(std::string const & find, QComboBox & combo); QSearch * form_; }; diff --git a/src/frontends/qt2/QSendto.C b/src/frontends/qt2/QSendto.C index 6b17aca2b4..8e84fc31ec 100644 --- a/src/frontends/qt2/QSendto.C +++ b/src/frontends/qt2/QSendto.C @@ -24,6 +24,7 @@ #include "format.h" using std::vector; +using std::string; typedef Qt2CB > base_class; diff --git a/src/frontends/qt2/QShowFile.C b/src/frontends/qt2/QShowFile.C index 86cd120963..e96ace94f7 100644 --- a/src/frontends/qt2/QShowFile.C +++ b/src/frontends/qt2/QShowFile.C @@ -21,6 +21,8 @@ #include #include +using std::string; + typedef QController > base_class; diff --git a/src/frontends/qt2/QSpellchecker.C b/src/frontends/qt2/QSpellchecker.C index 2b20d11d90..81d6a80669 100644 --- a/src/frontends/qt2/QSpellchecker.C +++ b/src/frontends/qt2/QSpellchecker.C @@ -23,6 +23,8 @@ #include #include +using std::string; + typedef Qt2CB > base_class; diff --git a/src/frontends/qt2/QTabular.C b/src/frontends/qt2/QTabular.C index 1bf239ca5b..e0af1dff89 100644 --- a/src/frontends/qt2/QTabular.C +++ b/src/frontends/qt2/QTabular.C @@ -28,6 +28,8 @@ #include "lengthcombo.h" #include "qsetborder.h" +using std::string; + typedef QController > base_class; diff --git a/src/frontends/qt2/QTabularDialog.C b/src/frontends/qt2/QTabularDialog.C index 808b237854..8b87feac31 100644 --- a/src/frontends/qt2/QTabularDialog.C +++ b/src/frontends/qt2/QTabularDialog.C @@ -23,6 +23,8 @@ #include #include +using std::string; + QTabularDialog::QTabularDialog(QTabular * form) : QTabularDialogBase(0, 0, false, 0), diff --git a/src/frontends/qt2/QTexinfo.C b/src/frontends/qt2/QTexinfo.C index daea80fc5b..43b2706a37 100644 --- a/src/frontends/qt2/QTexinfo.C +++ b/src/frontends/qt2/QTexinfo.C @@ -24,6 +24,8 @@ using lyx::support::OnlyFilename; +using std::string; + typedef QController > base_class; diff --git a/src/frontends/qt2/QTexinfo.h b/src/frontends/qt2/QTexinfo.h index 7e574b80e7..2b2aff8b70 100644 --- a/src/frontends/qt2/QTexinfo.h +++ b/src/frontends/qt2/QTexinfo.h @@ -45,7 +45,7 @@ private: /// ControlTexinfo::texFileSuffix activeStyle; /// - typedef std::vector ContentsType; + typedef std::vector ContentsType; std::map texdata_; }; diff --git a/src/frontends/qt2/QTexinfoDialog.C b/src/frontends/qt2/QTexinfoDialog.C index 2fabfd854b..d2883b6e90 100644 --- a/src/frontends/qt2/QTexinfoDialog.C +++ b/src/frontends/qt2/QTexinfoDialog.C @@ -20,6 +20,7 @@ #include using std::vector; +using std::string; QTexinfoDialog::QTexinfoDialog(QTexinfo * form) diff --git a/src/frontends/qt2/QThesaurusDialog.C b/src/frontends/qt2/QThesaurusDialog.C index 784b133315..df64d0adcd 100644 --- a/src/frontends/qt2/QThesaurusDialog.C +++ b/src/frontends/qt2/QThesaurusDialog.C @@ -21,6 +21,8 @@ #include #include +using std::string; + QThesaurusDialog::QThesaurusDialog(QThesaurus * form) diff --git a/src/frontends/qt2/QToc.C b/src/frontends/qt2/QToc.C index 71cc8c9588..ea098ee3c5 100644 --- a/src/frontends/qt2/QToc.C +++ b/src/frontends/qt2/QToc.C @@ -29,6 +29,7 @@ using std::endl; using std::pair; using std::stack; using std::vector; +using std::string; typedef QController > base_class; diff --git a/src/frontends/qt2/QToc.h b/src/frontends/qt2/QToc.h index 2c3ab20947..db42391a21 100644 --- a/src/frontends/qt2/QToc.h +++ b/src/frontends/qt2/QToc.h @@ -35,7 +35,7 @@ private: void updateType(); /// select an entry - void select(string const & text); + void select(std::string const & text); /// set the depth void set_depth(int depth); diff --git a/src/frontends/qt2/QURL.C b/src/frontends/qt2/QURL.C index 8ddc24d4af..1beb2f3a00 100644 --- a/src/frontends/qt2/QURL.C +++ b/src/frontends/qt2/QURL.C @@ -23,6 +23,8 @@ #include #include +using std::string; + typedef QController > base_class; QURL::QURL(Dialog & parent) diff --git a/src/frontends/qt2/QWorkArea.C b/src/frontends/qt2/QWorkArea.C index e8e35d20ca..ead7f478bf 100644 --- a/src/frontends/qt2/QWorkArea.C +++ b/src/frontends/qt2/QWorkArea.C @@ -29,6 +29,7 @@ #endif using std::endl; +using std::string; QWorkArea::QWorkArea(int, int, int, int) diff --git a/src/frontends/qt2/QWorkArea.h b/src/frontends/qt2/QWorkArea.h index 6e9c8e728c..b0c2c44664 100644 --- a/src/frontends/qt2/QWorkArea.h +++ b/src/frontends/qt2/QWorkArea.h @@ -49,9 +49,9 @@ public: /// a selection exists virtual void haveSelection(bool) const; /// - virtual string const getClipboard() const; + virtual std::string const getClipboard() const; /// - virtual void putClipboard(string const &) const; + virtual void putClipboard(std::string const &) const; /// virtual void dragEnterEvent(QDragEnterEvent * event); /// diff --git a/src/frontends/qt2/QWrap.C b/src/frontends/qt2/QWrap.C index 1c02f0c1cd..6a92bee025 100644 --- a/src/frontends/qt2/QWrap.C +++ b/src/frontends/qt2/QWrap.C @@ -28,6 +28,8 @@ using lyx::support::strToDbl; +using std::string; + typedef QController > base_class; diff --git a/src/frontends/qt2/Qt2BC.C b/src/frontends/qt2/Qt2BC.C index 8a84a98229..982d5857b1 100644 --- a/src/frontends/qt2/Qt2BC.C +++ b/src/frontends/qt2/Qt2BC.C @@ -17,6 +17,8 @@ #include #include +using std::string; + Qt2BC::Qt2BC(ButtonController const & parent, string const & cancel, string const & close) diff --git a/src/frontends/qt2/Qt2BC.h b/src/frontends/qt2/Qt2BC.h index faef2bb044..6da14301bf 100644 --- a/src/frontends/qt2/Qt2BC.h +++ b/src/frontends/qt2/Qt2BC.h @@ -31,7 +31,7 @@ class Qt2BC : public GuiBC { public: /// Qt2BC(ButtonController const &, - string const & = _("Cancel"), string const & = _("Close")); + std::string const & = _("Cancel"), std::string const & = _("Close")); private: /// Updates the button sensitivity (enabled/disabled) void setButtonEnabled(QButton *, bool enabled) const; @@ -40,7 +40,7 @@ private: void setWidgetEnabled(QWidget *, bool enabled) const; /// Set the label on the button - void setButtonLabel(QButton *, string const & label) const; + void setButtonLabel(QButton *, std::string const & label) const; }; #endif // QT2BC_H diff --git a/src/frontends/qt2/Qt2Base.C b/src/frontends/qt2/Qt2Base.C index 4e7f9b39ac..a867f1eb7f 100644 --- a/src/frontends/qt2/Qt2Base.C +++ b/src/frontends/qt2/Qt2Base.C @@ -17,6 +17,8 @@ #include "ButtonController.h" #include "ControlButtons.h" +using std::string; + Qt2Base::Qt2Base(string const & t) : ViewBase(t), updating_(false) diff --git a/src/frontends/qt2/Qt2Base.h b/src/frontends/qt2/Qt2Base.h index 2884f598c3..9be551ec4a 100644 --- a/src/frontends/qt2/Qt2Base.h +++ b/src/frontends/qt2/Qt2Base.h @@ -28,7 +28,7 @@ class Qt2Base : public QObject, public ViewBase { Q_OBJECT public: /// - Qt2Base(string const &); + Qt2Base(std::string const &); /// virtual ~Qt2Base() {} protected: @@ -78,7 +78,7 @@ private: template class Qt2DB: public Qt2Base { protected: - Qt2DB(string const &); + Qt2DB(std::string const &); /// update the dialog virtual void update(); @@ -96,7 +96,7 @@ protected: template -Qt2DB::Qt2DB(string const & t) +Qt2DB::Qt2DB(std::string const & t) : Qt2Base(t) {} @@ -154,12 +154,12 @@ public: protected: /// - Qt2CB(string const &); + Qt2CB(std::string const &); }; template -Qt2CB::Qt2CB(string const & t) +Qt2CB::Qt2CB(std::string const & t) : Base(t) {} diff --git a/src/frontends/qt2/QtView.C b/src/frontends/qt2/QtView.C index 3d467365da..d4e055e561 100644 --- a/src/frontends/qt2/QtView.C +++ b/src/frontends/qt2/QtView.C @@ -30,6 +30,8 @@ using lyx::support::LibFileSearch; +using std::string; + namespace { diff --git a/src/frontends/qt2/QtView.h b/src/frontends/qt2/QtView.h index 00d291def8..f55a42267f 100644 --- a/src/frontends/qt2/QtView.h +++ b/src/frontends/qt2/QtView.h @@ -44,7 +44,7 @@ public: virtual void busy(bool) const; /// display a status message - virtual void message(string const & str); + virtual void message(std::string const & str); /// clear status message virtual void clearMessage(); @@ -73,7 +73,7 @@ private: * @param t main window title * @param it iconified (short) title */ - virtual void setWindowTitle(string const & t, string const & it); + virtual void setWindowTitle(std::string const & t, std::string const & it); QTimer statusbar_timer_; diff --git a/src/frontends/qt2/floatplacement.C b/src/frontends/qt2/floatplacement.C index 43eff37982..5284b473f2 100644 --- a/src/frontends/qt2/floatplacement.C +++ b/src/frontends/qt2/floatplacement.C @@ -23,6 +23,8 @@ using lyx::support::contains; +using std::string; + // FIXME: set disabled doesn't work properly FloatPlacement::FloatPlacement(QWidget * parent, char * name) diff --git a/src/frontends/qt2/floatplacement.h b/src/frontends/qt2/floatplacement.h index 379433bbe3..6782db52ee 100644 --- a/src/frontends/qt2/floatplacement.h +++ b/src/frontends/qt2/floatplacement.h @@ -10,8 +10,6 @@ * Full author contact details are available in file CREDITS. */ -#include "support/std_string.h" - #include class QCheckBox; @@ -27,10 +25,10 @@ public: void useWide(); void set(InsetFloatParams const & params); - void set(string const & placement); + void set(std::string const & placement); - string const get(bool & wide) const; - string const get() const; + std::string const get(bool & wide) const; + std::string const get() const; public slots: void tbhpClicked(); diff --git a/src/frontends/qt2/iconpalette.C b/src/frontends/qt2/iconpalette.C index 469fa379a2..61297d4318 100644 --- a/src/frontends/qt2/iconpalette.C +++ b/src/frontends/qt2/iconpalette.C @@ -22,7 +22,7 @@ using std::endl; using std::make_pair; using std::max; - +using std::string; using std::vector; diff --git a/src/frontends/qt2/iconpalette.h b/src/frontends/qt2/iconpalette.h index 2b8d572d4f..a313824720 100644 --- a/src/frontends/qt2/iconpalette.h +++ b/src/frontends/qt2/iconpalette.h @@ -14,7 +14,7 @@ #include -#include "support/std_string.h" + #include #include @@ -31,9 +31,9 @@ public: IconPalette(QWidget * parent, char const * name = 0); /// add a button - void add(QPixmap const & pixmap, string name, string tooltip); + void add(QPixmap const & pixmap, std::string name, std::string tooltip); signals: - void button_clicked(const string &); + void button_clicked(const std::string &); protected: virtual void resizeEvent(QResizeEvent * e); protected slots: @@ -43,7 +43,7 @@ private: QGridLayout * layout_; - typedef std::pair Button; + typedef std::pair Button; std::vector