+2003-10-06 Lars Gullik Bjønnes <larsbj@gullik.net>
+
+ * INSTALL: remove a comment about --with-included-string
+
+ * configure.ac: remove the configure are
+ --with-included-string
+
2003-09-21 Lars Gullik Bjønnes <larsbj@gullik.net>
* 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 <larsbj@gullik.net>
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.
r.release();
}
-#endif
+#endif
~shared_count() // nothrow
{
// 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
-
#ifndef BOOST_MPL_BOOL_FWD_HPP_INCLUDED
#define BOOST_MPL_BOOL_FWD_HPP_INCLUDED
// 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.
BOOST_ASSERT(px != 0);
return px;
}
-
+
T * get() const // never throws
{
return px;
template<class E, class T, class Y> basic_ostream<E, T> & operator<< (basic_ostream<E, T> & os, shared_ptr<Y> const & p)
# else
template<class E, class T, class Y> std::basic_ostream<E, T> & operator<< (std::basic_ostream<E, T> & os, shared_ptr<Y> const & p)
-# endif
+# endif
{
os << p.get();
return os;
#ifdef BOOST_MSVC
# pragma warning(pop)
-#endif
+#endif
#endif // #if defined(BOOST_NO_MEMBER_TEMPLATES) && !defined(BOOST_MSVC6_MEMBER_TEMPLATES)
// (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,
//
// 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
// ***************************************************************************
// 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
#include "boost/type_traits/cv_traits.hpp"
#include "boost/type_traits/function_traits.hpp"
-
+
namespace boost {
namespace tuples {
} // end detail
// - cons forward declaration -----------------------------------------------
-template <class HT, class TT> struct cons;
+template <class HT, class TT> 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<class T> struct length;
# 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 T>
class generate_error;
template<>
struct get_class<0> {
- template<class RET, class HT, class TT>
+ template<class RET, class HT, class TT>
inline static RET get(const cons<HT, TT>& t)
{
return t.head;
}
- template<class RET, class HT, class TT>
+ template<class RET, class HT, class TT>
inline static RET get(cons<HT, TT>& t)
{
return t.head;
// -cons type accessors ----------------------------------------
-// typename tuples::element<N,T>::type gets the type of the
+// typename tuples::element<N,T>::type gets the type of the
// Nth element ot T, first element is at index 0
// -------------------------------------------------------
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
inline typename access_traits<
typename element<N, cons<HT, TT> >::type
>::non_const_type
-get(cons<HT, TT>& c BOOST_TUPLE_DUMMY_PARM) {
- return detail::get_class<N>::BOOST_NESTED_TEMPLATE
+get(cons<HT, TT>& c BOOST_TUPLE_DUMMY_PARM) {
+ return detail::get_class<N>::BOOST_NESTED_TEMPLATE
get<
typename access_traits<
typename element<N, cons<HT, TT> >::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
inline typename access_traits<
typename element<N, cons<HT, TT> >::type
>::const_type
-get(const cons<HT, TT>& c BOOST_TUPLE_DUMMY_PARM) {
- return detail::get_class<N>::BOOST_NESTED_TEMPLATE
+get(const cons<HT, TT>& c BOOST_TUPLE_DUMMY_PARM) {
+ return detail::get_class<N>::BOOST_NESTED_TEMPLATE
get<
typename access_traits<
typename element<N, cons<HT, TT> >::type
>::const_type>(c);
-}
+}
// -- the cons template --------------------------------------------------
namespace detail {
>::RET type;
};
template <> struct wrap_non_storeable_type<void> {
- typedef non_storeable_type<void> type;
+ typedef non_storeable_type<void> type;
};
} // detail
typedef HT head_type;
typedef TT tail_type;
- typedef typename
+ typedef typename
detail::wrap_non_storeable_type<head_type>::type stored_head_type;
stored_head_type head;
tail_type tail;
- typename access_traits<stored_head_type>::non_const_type
+ typename access_traits<stored_head_type>::non_const_type
get_head() { return head; }
- typename access_traits<tail_type>::non_const_type
- get_tail() { return tail; }
+ typename access_traits<tail_type>::non_const_type
+ get_tail() { return tail; }
- typename access_traits<stored_head_type>::const_type
+ typename access_traits<stored_head_type>::const_type
get_head() const { return head; }
-
- typename access_traits<tail_type>::const_type
- get_tail() const { return tail; }
+
+ typename access_traits<tail_type>::const_type
+ get_tail() const { return tail; }
cons() : head(), tail() {}
// cons() : head(detail::default_arg<HT>::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<stored_head_type>::parameter_type h,
const tail_type& t)
- : head (h), tail(t) {}
+ : head (h), tail(t) {}
- template <class T1, class T2, class T3, class T4, class T5,
+ template <class T1, class T2, class T3, class T4, class T5,
class T6, class T7, class T8, class T9, class T10>
- 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 <class T2, class T3, class T4, class T5,
+ template <class T2, class T3, class T4, class T5,
class T6, class T7, class T8, class T9, class T10>
- 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())
{}
cons( const cons<HT2, TT2>& u ) : head(u.head), tail(u.tail) {}
template <class HT2, class TT2>
- cons& operator=( const cons<HT2, TT2>& u ) {
- head=u.head; tail=u.tail; return *this;
+ cons& operator=( const cons<HT2, TT2>& 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 <class T1, class T2>
- cons& operator=( const std::pair<T1, T2>& u ) {
+ cons& operator=( const std::pair<T1, T2>& u ) {
BOOST_STATIC_ASSERT(length<cons>::value == 2); // check length = 2
head = u.first; tail.head = u.second; return *this;
}
typedef null_type tail_type;
typedef cons<HT, null_type> self_type;
- typedef typename
+ typedef typename
detail::wrap_non_storeable_type<head_type>::type stored_head_type;
stored_head_type head;
-
- typename access_traits<stored_head_type>::non_const_type
+
+ typename access_traits<stored_head_type>::non_const_type
get_head() { return head; }
-
- null_type get_tail() { return null_type(); }
- typename access_traits<stored_head_type>::const_type
+ null_type get_tail() { return null_type(); }
+
+ typename access_traits<stored_head_type>::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<HT>::f()) {}
cons() : head() {}
cons(typename access_traits<stored_head_type>::parameter_type h,
const null_type& = null_type())
- : head (h) {}
+ : head (h) {}
template<class T1>
- 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 <class HT2>
cons( const cons<HT2, null_type>& u ) : head(u.head) {}
-
+
template <class HT2>
- cons& operator=(const cons<HT2, null_type>& u )
+ cons& operator=(const cons<HT2, null_type>& 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; }
namespace detail {
// Tuple to cons mapper --------------------------------------------------
-template <class T0, class T1, class T2, class T3, class T4,
+template <class T0, class T1, class T2, class T3, class T4,
class T5, class T6, class T7, class T8, class T9>
struct map_tuple_to_cons
{
- typedef cons<T0,
- typename map_tuple_to_cons<T1, T2, T3, T4, T5,
+ typedef cons<T0,
+ typename map_tuple_to_cons<T1, T2, T3, T4, T5,
T6, T7, T8, T9, null_type>::type
> type;
};
// -------------------------------------------------------------------
// -- tuple ------------------------------------------------------
-template <class T0, class T1, class T2, class T3, class T4,
+template <class T0, class T1, class T2, class T3, class T4,
class T5, class T6, class T7, class T8, class T9>
-class tuple :
- public detail::map_tuple_to_cons<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>::type
+class tuple :
+ public detail::map_tuple_to_cons<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>::type
{
public:
- typedef typename
+ typedef typename
detail::map_tuple_to_cons<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>::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<T>::parameter_type takes non-reference types as const T&
+// access_traits<T>::parameter_type takes non-reference types as const T&
tuple() {}
-
+
tuple(typename access_traits<T0>::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<T0>::parameter_type t0,
typename access_traits<T1>::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<T0>::parameter_type t0,
typename access_traits<T1>::parameter_type t1,
typename access_traits<T2>::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<T0>::parameter_type t0,
typename access_traits<T1>::parameter_type t1,
typename access_traits<T2>::parameter_type t2,
typename access_traits<T3>::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<T0>::parameter_type t0,
typename access_traits<T2>::parameter_type t2,
typename access_traits<T3>::parameter_type t3,
typename access_traits<T4>::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<T0>::parameter_type t0,
typename access_traits<T3>::parameter_type t3,
typename access_traits<T4>::parameter_type t4,
typename access_traits<T5>::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<T0>::parameter_type t0,
typename access_traits<T4>::parameter_type t4,
typename access_traits<T5>::parameter_type t5,
typename access_traits<T6>::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<T0>::parameter_type t0,
typename access_traits<T5>::parameter_type t5,
typename access_traits<T6>::parameter_type t6,
typename access_traits<T7>::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<T0>::parameter_type t0,
tuple(const cons<U1, U2>& p) : inherited(p) {}
template <class U1, class U2>
- tuple& operator=(const cons<U1, U2>& k) {
- inherited::operator=(k);
+ tuple& operator=(const cons<U1, U2>& k) {
+ inherited::operator=(k);
return *this;
}
template <class U1, class U2>
- tuple& operator=(const std::pair<U1, U2>& k) {
+ tuple& operator=(const std::pair<U1, U2>& k) {
BOOST_STATIC_ASSERT(length<tuple>::value == 2);// check_length = 2
this->head = k.first;
- this->tail.head = k.second;
+ this->tail.head = k.second;
return *this;
}
// The empty tuple
template <>
-class tuple<null_type, null_type, null_type, null_type, null_type, null_type, null_type, null_type, null_type, null_type> :
- public null_type
+class tuple<null_type, null_type, null_type, null_type, null_type, null_type, null_type, null_type, null_type, null_type> :
+ public null_type
{
public:
typedef null_type inherited;
namespace detail {
struct swallow_assign {
-
+
template<typename T>
swallow_assign& operator=(const T&) {
return *this;
} // 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;
}
// from template<class T> foo(T& t) : make_tuple_traits<T>::type
// Conversions:
-// T -> T,
+// T -> T,
// references -> compile_time_error
// reference_wrapper<T> -> T&
// const reference_wrapper<T> -> T&
template<class T>
struct make_tuple_traits {
- typedef T type;
+ typedef T type;
// commented away, see below (JJ)
- // typedef typename IF<
+ // typedef typename IF<
// boost::is_function<T>::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
typedef typename
detail::generate_error<T&>::
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<class T, int n> struct make_tuple_traits <T[n]> {
typedef const T (&type)[n];
};
-template<class T, int n>
+template<class T, int n>
struct make_tuple_traits<const T[n]> {
typedef const T (&type)[n];
};
typedef const volatile T (&type)[n];
};
-template<class T, int n>
+template<class T, int n>
struct make_tuple_traits<const volatile T[n]> {
typedef const volatile T (&type)[n];
};
-template<class T>
+template<class T>
struct make_tuple_traits<reference_wrapper<T> >{
typedef T& type;
};
-template<class T>
+template<class T>
struct make_tuple_traits<const reference_wrapper<T> >{
typedef T& type;
};
// 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<typename make_tuple_traits<T0>::type,
- typename make_tuple_traits<T1>::type,
- typename make_tuple_traits<T2>::type,
- typename make_tuple_traits<T3>::type,
- typename make_tuple_traits<T4>::type,
- typename make_tuple_traits<T5>::type,
- typename make_tuple_traits<T6>::type,
+ tuple<typename make_tuple_traits<T0>::type,
+ typename make_tuple_traits<T1>::type,
+ typename make_tuple_traits<T2>::type,
+ typename make_tuple_traits<T3>::type,
+ typename make_tuple_traits<T4>::type,
+ typename make_tuple_traits<T5>::type,
+ typename make_tuple_traits<T6>::type,
typename make_tuple_traits<T7>::type,
typename make_tuple_traits<T8>::type,
typename make_tuple_traits<T9>::type> type;
// -make_tuple function templates -----------------------------------
inline tuple<> make_tuple() {
- return tuple<>();
+ return tuple<>();
}
template<class T0>
make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3,
const T4& t4) {
typedef typename detail::make_tuple_mapper<T0, T1, T2, T3, T4>::type t;
- return t(t0, t1, t2, t3, t4);
+ return t(t0, t1, t2, t3, t4);
}
template<class T0, class T1, class T2, class T3, class T4, class T5>
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<T0, T1, T2, T3, T4, T5>::type t;
- return t(t0, t1, t2, t3, t4, t5);
+ return t(t0, t1, t2, t3, t4, t5);
}
template<class T0, class T1, class T2, class T3, class T4, class T5, class T6>
const T4& t4, const T5& t5, const T6& t6, const T7& t7) {
typedef typename detail::make_tuple_mapper
<T0, T1, T2, T3, T4, T5, T6, T7>::type t;
- return t(t0, t1, t2, t3, t4, t5, t6, t7);
+ return t(t0, t1, t2, t3, t4, t5, t6, t7);
}
template<class T0, class T1, class T2, class T3, class T4, class T5, class T6,
const T8& t8) {
typedef typename detail::make_tuple_mapper
<T0, T1, T2, T3, T4, T5, T6, T7, T8>::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<class T0, class T1, class T2, class T3, class T4, class T5, class T6,
const T8& t8, const T9& t9) {
typedef typename detail::make_tuple_mapper
<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>::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);
}
}
template<class T1, class T2, class T3, class T4, class T5>
-inline tuple<T1&, T2&, T3&, T4&, T5&>
+inline tuple<T1&, T2&, T3&, T4&, T5&>
tie(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5) {
return tuple<T1&, T2&, T3&, T4&, T5&> (t1, t2, t3, t4, t5);
}
template<class T1, class T2, class T3, class T4, class T5, class T6>
-inline tuple<T1&, T2&, T3&, T4&, T5&, T6&>
+inline tuple<T1&, T2&, T3&, T4&, T5&, T6&>
tie(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6) {
return tuple<T1&, T2&, T3&, T4&, T5&, T6&> (t1, t2, t3, t4, t5, t6);
}
template<class T1, class T2, class T3, class T4, class T5, class T6, class T7>
-inline tuple<T1&, T2&, T3&, T4&, T5&, T6&, T7&>
+inline tuple<T1&, T2&, T3&, T4&, T5&, T6&, T7&>
tie(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6, T7& t7) {
return tuple<T1&, T2&, T3&, T4&, T5&, T6&, T7&> (t1, t2, t3, t4, t5, t6, t7);
}
-template<class T1, class T2, class T3, class T4, class T5, class T6, class T7,
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7,
class T8>
-inline tuple<T1&, T2&, T3&, T4&, T5&, T6&, T7&, T8&>
+inline tuple<T1&, T2&, T3&, T4&, T5&, T6&, T7&, T8&>
tie(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6, T7& t7, T8& t8) {
- return tuple<T1&, T2&, T3&, T4&, T5&, T6&, T7&, T8&>
+ return tuple<T1&, T2&, T3&, T4&, T5&, T6&, T7&, T8&>
(t1, t2, t3, t4, t5, t6, t7, t8);
}
-template<class T1, class T2, class T3, class T4, class T5, class T6, class T7,
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7,
class T8, class T9>
-inline tuple<T1&, T2&, T3&, T4&, T5&, T6&, T7&, T8&, T9&>
-tie(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6, T7& t7, T8& t8,
+inline tuple<T1&, T2&, T3&, T4&, T5&, T6&, T7&, T8&, T9&>
+tie(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6, T7& t7, T8& t8,
T9& t9) {
- return tuple<T1&, T2&, T3&, T4&, T5&, T6&, T7&, T8&, T9&>
+ return tuple<T1&, T2&, T3&, T4&, T5&, T6&, T7&, T8&, T9&>
(t1, t2, t3, t4, t5, t6, t7, t8, t9);
}
-template<class T1, class T2, class T3, class T4, class T5, class T6, class T7,
+template<class T1, class T2, class T3, class T4, class T5, class T6, class T7,
class T8, class T9, class T10>
-inline tuple<T1&, T2&, T3&, T4&, T5&, T6&, T7&, T8&, T9&, T10&>
-tie(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6, T7& t7, T8& t8,
+inline tuple<T1&, T2&, T3&, T4&, T5&, T6&, T7&, T8&, T9&, T10&>
+tie(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6, T7& t7, T8& t8,
T9& t9, T10& t10) {
- return tuple<T1&, T2&, T3&, T4&, T5&, T6&, T7&, T8&, T9&, T10&>
+ return tuple<T1&, T2&, T3&, T4&, T5&, T6&, T7&, T8&, T9&, T10&>
(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10);
}
#undef BOOST_TUPLE_SINGLE_DUMMY_PARM
#endif // BOOST_TUPLE_BASIC_HPP
-
-
-
// (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.
BOOST_TT_AUX_TYPE_TRAIT_DEF1(add_reference,T,typename detail::add_reference_impl<T>::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&)
-
// (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
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<T>()
-
// (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
// should be the last #include
#include "boost/type_traits/detail/bool_trait_def.hpp"
-namespace boost {
+namespace boost {
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
#include "boost/type_traits/detail/bool_trait_undef.hpp"
#endif // BOOST_TT_IS_REFERENCE_HPP_INCLUDED
-
AC_CHECK_HEADERS(ostream istream sstream locale limits ios)
LYX_CXX_STL_MODERN_STREAMS
-###
-AC_ARG_WITH(included-string,
- AC_HELP_STRING([--with-included-string],[use std::string through namespace lyx]),
- [lyx_cv_with_included_string=$withval
- AC_MSG_RESULT([$with_included_string])],
- [AC_CACHE_CHECK([],lyx_cv_with_included_string,[lyx_cv_with_included_string=no])])
-if test x$lyx_cv_with_included_string = xyes ; then
- AC_DEFINE(USE_INCLUDED_STRING, 1,
- [Define to use std::string through namespace lyx.])
- lyx_flags="$lyx_flags included-string"
-fi
-
-
### and now some special lyx flags.
AC_ARG_ENABLE(assertions,
AC_HELP_STRING([--enable-assertions],[add runtime sanity checks in the program]),,
src/paragraph.C
src/paragraph_funcs.C
src/rowpainter.C
-src/support/path_defines.C
src/text.C
src/text2.C
src/text3.C
#include <functional>
+
+using std::string;
using std::bind2nd;
using std::binary_function;
#ifndef BRANCHES_H
#define BRANCHES_H
-#include "support/std_string.h"
+#include <string>
#include <list>
+
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_;
};
///
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
using lyx::support::MakeAbsPath;
using std::find;
-
+using std::string;
using std::vector;
#include <boost/utility.hpp>
-#include "support/std_string.h"
+#include <string>
+
class Buffer;
class Change;
/// 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();
/// 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();
/// 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);
* 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);
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);
using std::endl;
using std::make_pair;
using std::min;
+using std::string;
extern BufferList bufferlist;
* 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();
///
///
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
* 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;
///
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
///
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) {}
};
///
/// 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;
};
#include <boost/assert.hpp>
+using std::string;
+
/** The four LaTeX itemize environment default bullets
*/
#ifndef BULLET_H
#define BULLET_H
-#include "support/std_string.h"
+#include <string>
///
class Bullet {
Bullet(int f = -1, int c = -1, int s = -1);
///
- explicit Bullet(string const &);
+ explicit Bullet(std::string const &);
///
void setCharacter(int);
///
void setSize(int);
///
- void setText(string const &);
+ void setText(std::string const &);
///
int getCharacter() const;
///
///
int getSize() const;
///
- string const & getText() const;
+ std::string const & getText() const;
///
Bullet & operator=(Bullet const &);
///
///
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;
or one generated internally from the font, character
and size settings.
*/
- mutable string text;
+ mutable std::string text;
};
+2003-10-06 Lars Gullik Bjønnes <larsbj@gullik.net>
+
+ * All most all file in all subdirs: Make <string> be the prefered
+ way of getting to std::string, add using declarations.
2003-10-06 André Pönitz <poenitz@gmx.net>
2003-09-26 Lars Gullik Bjønnes <larsbj@gullik.net>
- * lyx_main.C: remove the global debug object
+ * lyx_main.C: remove the global debug object
* debug.h: adjust for new debugstream
using lyx::support::Systemcall;
using std::getline;
-
+using std::string;
using std::ifstream;
#ifndef CHKTEX_H
#define CHKTEX_H
-#include "support/std_string.h"
-
class LyXLex;
class TeXErrors;
+#include <string>
+
+
///
class Chktex {
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.
int scanLogFile(TeXErrors &);
///
- string cmd;
+ std::string cmd;
///
- string file;
+ std::string file;
///
- string path;
+ std::string path;
};
#endif
using std::make_pair;
using std::pair;
using std::vector;
+using std::string;
typedef limited_stack<pair<ParagraphList, textclass_type> > CutStack;
#include "ParagraphList_fwd.h"
#include "support/types.h"
-#include "support/std_string.h"
#include <vector>
class Buffer;
namespace CutAndPaste {
///
-std::vector<string>
+std::vector<std::string>
CutAndPaste::availableSelections(Buffer const & buffer);
///
using std::endl;
using std::flush;
using std::getline;
-
+using std::string;
using std::ofstream;
using std::ifstream;
#ifndef DEP_TABLE_H
#define DEP_TABLE_H
-#include "support/std_string.h"
#include <map>
///
/** 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 {
bool changed() const;
};
///
- typedef std::map<string, dep_info> DepList;
+ typedef std::map<std::string, dep_info> DepList;
///
DepList deplist;
};
#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
#include <map>
-#include "support/std_string.h"
class Floating;
class FloatList {
public:
///
- typedef std::map<string, Floating> List;
+ typedef std::map<std::string, Floating> List;
///
typedef List::const_iterator const_iterator;
///
///
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;
#include "Floating.h"
+using std::string;
+
Floating::Floating()
{}
#ifndef FLOATING_H
#define FLOATING_H
-#include "support/std_string.h"
+#include <string>
/** 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.
///
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_;
};
using lyx::support::compare_ascii_no_case;
using std::endl;
+using std::string;
namespace {
#ifndef LCOLOR_H
#define LCOLOR_H
-#include "support/std_string.h"
#include <boost/scoped_ptr.hpp>
/**
///
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;
using std::endl;
using std::getline;
-
+using std::string;
using std::ifstream;
using std::set;
using std::vector;
#define LATEX_H
#include "latexrunparams.h"
-#include "support/std_string.h"
-#include <vector>
-#include <set>
#include <boost/utility.hpp>
#include <boost/signals/signal1.hpp>
+#include <vector>
+#include <set>
+
class DepTable;
///
///
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:
///
///
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;
///
Aux_Info() {}
///
- string aux_file;
+ std::string aux_file;
///
- std::set<string> citations;
+ std::set<std::string> citations;
///
- std::set<string> databases;
+ std::set<std::string> databases;
///
- std::set<string> styles;
+ std::set<std::string> styles;
};
};
/// This signal emits an informative message
- boost::signal1<void, string> message;
+ boost::signal1<void, std::string> 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 &);
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<Aux_Info> const scanAuxFiles(string const &);
+ std::vector<Aux_Info> 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 &,
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;
using std::endl;
using std::find;
-
+using std::string;
using std::list;
using std::ostream;
using std::ostringstream;
#define LATEXFEATURES_H
-#include "support/std_string.h"
-
#include <set>
#include <list>
#include <map>
///
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<string> getEncodingSet(string const & doc_encoding) const;
+ std::set<std::string> getEncodingSet(std::string const & doc_encoding) const;
///
- void useLayout(string const & lyt);
+ void useLayout(std::string const & lyt);
///
Buffer const & buffer() const;
///
bool useBabel() const;
private:
- std::list<string> usedLayouts_;
+ std::list<std::string> usedLayouts_;
/// Static preamble bits from the external material insets
- typedef std::list<string> FeaturesList;
+ typedef std::list<std::string> FeaturesList;
///
FeaturesList features_;
///
///
LanguageList UsedLanguages_;
///
- typedef std::set<string> UsedFloats;
+ typedef std::set<std::string> UsedFloats;
///
UsedFloats usedFloats_;
///
- typedef std::map<string , string> FileMap;
+ typedef std::map<std::string , std::string> FileMap;
///
FileMap IncludedFiles_;
///
using lyx::support::trim;
using std::endl;
-
+using std::string;
using std::ostream;
#include "lfuns.h"
-#include "support/std_string.h"
#include <boost/utility.hpp>
-#include <map>
+#include <map>
+#include <string>
class FuncRequest;
/// 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<string, kb_action> func_map;
+ typedef std::map<std::string, kb_action> func_map;
/// type for map between an action and its info
typedef std::map<kb_action, func_info> info_map;
* 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;
/// 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
using std::find_if;
using std::max;
using std::sort;
-
+using std::string;
using std::vector;
#include "FuncStatus.h"
#include "funcrequest.h"
-#include "support/std_string.h"
-
#include <boost/shared_ptr.hpp>
#include <vector>
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)
/// 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(); }
///
///
Kind kind_;
///
- string label_;
+ std::string label_;
///
FuncRequest func_;
///
- string submenuname_;
+ std::string submenuname_;
///
bool optional_;
///
///
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();
///
ItemList items_;
///
- string name_;
+ std::string name_;
};
///
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;
///
using std::istringstream;
using std::ostream;
using std::ostringstream;
+using std::string;
// Initialize static member var.
#include "support/types.h"
-#include "support/std_string.h"
#include <iosfwd>
class BufferView;
///
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;
///
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
///
bool appendix;
///
- string labelstring;
+ std::string labelstring;
///
- string labelwidthstring;
+ std::string labelwidthstring;
///
LyXLength leftindent;
};
#include <boost/assert.hpp>
+using std::string;
+
PrinterParams::PrinterParams(Target t,
string const & pname,
///
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
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,
#ifndef SECTIONING_H
#define SECTIONING_H
+#include "lyxfont.h"
+
#include <map>
-#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_;
};
class SectioningList {
private:
///
- typedef std::map<string, Section> List_;
+ typedef std::map<std::string, Section> List_;
///
List_ list_;
};
using std::istringstream;
using std::ostream;
using std::ostringstream;
+using std::string;
string const Spacing::spacing_string[]
#include <iosfwd>
-#include "support/std_string.h"
///
class Spacing {
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);
}
///
///
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:
///
///
float value;
/// names of line spacing
- static string const spacing_string[];
+ static std::string const spacing_string[];
};
#ifndef SPELL_BASE_H
#define SPELL_BASE_H
-#include "support/std_string.h" // can't forward declare...
+#include <string>
class BufferParams;
class WordLangTuple;
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;
};
using std::find_if;
using std::for_each;
using std::make_pair;
-
+using std::string;
using std::ostream;
extern BufferList bufferlist;
#ifndef TEXT_CACHE_H
#define TEXT_CACHE_H
-#include "support/std_string.h"
-
#include <iosfwd>
#include <map>
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
#include "Thesaurus.h"
-#ifdef HAVE_LIBAIKSAURUS
-
#include <algorithm>
+#include <string>
+
+using std::string;
+
+#ifdef HAVE_LIBAIKSAURUS
using std::sort;
#include <vector>
#include <map>
-#include "support/std_string.h"
#ifdef HAVE_LIBAIKSAURUS
#include AIKSAURUS_H_LOCATION
#endif
///
~Thesaurus();
- typedef std::map<string, std::vector<string> > Meanings;
+ typedef std::map<std::string, std::vector<std::string> > Meanings;
/**
* look up some text in the thesaurus
*/
- Meanings lookup(string const & text);
+ Meanings lookup(std::string const & text);
private:
#ifdef HAVE_LIBAIKSAURUS
using std::endl;
using std::make_pair;
-
+using std::string;
using std::vector;
#include <vector>
-#include "support/std_string.h"
class LyXLex;
};
/// action, tooltip
- typedef std::pair<FuncRequest, string> Item;
+ typedef std::pair<FuncRequest, std::string> Item;
/// the toolbar items
typedef std::vector<Item> Items;
/// a toolbar
struct Toolbar {
/// toolbar UI name
- string name;
+ std::string name;
/// toolbar contents
Items items;
/// flags
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;
#ifndef VARIABLES_H
#define VARIABLES_H
-#include "support/std_string.h"
#include <map>
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<string, string> Vars;
+ typedef std::map<std::string, std::string> Vars;
///
Vars vars_;
};
#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.
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
using lyx::support::token;
using lyx::support::trim;
+using std::string;
+
bool operator==(Author const & l, Author const & r)
{
#include <map>
#include <iosfwd>
+#include <string>
-#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_;
};
using std::pair;
using std::stack;
using std::vector;
+using std::string;
// all these externs should eventually be removed.
#include <boost/signals/signal0.hpp>
#include <boost/signals/signal1.hpp>
-#include "support/std_string.h"
#include <iosfwd>
#include <map>
#include <utility>
\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();
/** 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);
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);
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?
/// This signal is emitted when a parsing error shows up.
boost::signal1<void, ErrorItem> error;
/// This signal is emitted when some message shows up.
- boost::signal1<void, string> message;
+ boost::signal1<void, std::string> message;
/// This signal is emitted when the buffer busy status change.
boost::signal1<void, bool> busy;
/// This signal is emitted when the buffer readonly status change.
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);
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();
///
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;
void markBakClean();
///
- void markDepClean(string const & name);
+ void markDepClean(std::string const & name);
///
void setUnnamed(bool flag = true);
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<LogType, string> const getLogName() const;
+ std::pair<LogType, std::string> 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;
void validate(LaTeXFeatures &) const;
/// return all bibkeys from buffer and its childs
- void fillWithBibKeys(std::vector<std::pair<string, string> > & keys) const;
+ void fillWithBibKeys(std::vector<std::pair<std::string, std::string> > & keys) const;
///
- void getLabelList(std::vector<string> &) const;
+ void getLabelList(std::vector<std::string> &) const;
///
void changeLanguage(Language const * from, Language const * to);
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
\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;
using lyx::support::OnlyPath;
using lyx::support::unlink;
+using std::string;
+
extern BufferList bufferlist;
#ifndef BUFFER_FUNCS_H
#define BUFFER_FUNCS_H
-#include "support/std_string.h"
+#include <string>
+
class Buffer;
class TeXErrors;
* 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 &);
///
using std::find;
using std::find_if;
using std::for_each;
-
+using std::string;
using std::vector;
#ifndef BUFFER_LIST_H
#define BUFFER_LIST_H
-#include "support/std_string.h"
-
#include <boost/utility.hpp>
#include <vector>
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);
void closeAll();
/// returns a vector with all the buffers filenames
- std::vector<string> const getFileNames() const;
+ std::vector<std::string> const getFileNames() const;
/// FIXME
- void updateIncludedTeXfiles(string const &, LatexRunParams const &);
+ void updateIncludedTeXfiles(std::string const &, LatexRunParams const &);
/// emergency save for all buffers
void emergencyWriteAll();
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
using lyx::support::tokenPos;
using std::endl;
-
+using std::string;
using std::istringstream;
using std::ostream;
using std::ostringstream;
#include "support/copied_ptr.h"
#include "support/types.h"
-#include "support/std_string.h"
#include <vector>
~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;
///
InsetQuotes::quote_times quotes_times;
///
- string fontsize;
+ std::string fontsize;
///
lyx::textclass_type textclass;
///
///
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;
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;
/// 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;
/// map of the file's author IDs to buffer author IDs
std::vector<int> 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
using std::istringstream;
using std::ostringstream;
+using std::string;
namespace {
state << inset << " id: " << inset->id()
<< " text: " << inset->getLyXText(bv, true)
<< " owner: " << inset->owner();
- else
+ else
state << -1;
#endif
return state.str();
#ifndef BUFFERVIEW_FUNCS_H
#define BUFFERVIEW_FUNCS_H
-#include "support/std_string.h"
+#include <string>
+
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);
///
extern void noun(BufferView *);
///
-extern void lang(BufferView *, string const &);
+extern void lang(BufferView *, std::string const &);
///
extern void number(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);
#include <boost/assert.hpp>
+using lyx::pos_type;
using std::endl;
-using lyx::pos_type;
+using std::string;
bool operator==(Change const & l, Change const & r)
using std::ifstream;
using std::pair;
-
+using std::string;
bool CharacterSet::loadFile(string const & fname)
#include <map>
#include <utility>
+#include <string>
-#include "support/std_string.h"
/// a class for mapping char strings such as "\^{A}" to the integer value
class CharacterSet {
* 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<bool, int> const encodeString(string const &) const;
+ std::pair<bool, int> const encodeString(std::string const &) const;
private:
/// charset name
- string name_;
+ std::string name_;
///
- typedef std::map<string, unsigned char> Cdef;
+ typedef std::map<std::string, unsigned char> Cdef;
/// mapping from string representation to encoded value
Cdef map_;
};
using std::endl;
using std::find_if;
-
+using std::string;
using std::vector;
#include "graph.h"
-#include "support/std_string.h"
#include <vector>
+#include <string>
+
class Buffer;
class Format;
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;
///
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;
};
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<Format const *> const
- getReachableTo(string const & target, bool clear_visited);
+ getReachableTo(std::string const & target, bool clear_visited);
///
std::vector<Format const *> 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();
std::vector<Format const *> const
Converters::intToFormat(std::vector<int> 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_;
};
using std::endl;
using std::ostringstream;
+using std::string;
Counter::Counter()
#ifndef COUNTERS_H
#define COUNTERS_H
-#include "support/std_string.h"
#include <map>
+#include <string>
/// This represents a single counter.
///
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_;
};
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<string, Counter> CounterList;
+ typedef std::map<std::string, Counter> CounterList;
/// Instantiate.
CounterList counterList;
using lyx::support::strToInt;
using std::setw;
-
+using std::string;
using std::ostream;
namespace {
#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
/** 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
#endif
using std::endl;
+using std::string;
+
Encodings encodings;
#ifndef ENCODING_H
#define ENCODING_H
-#include "support/std_string.h"
#include <map>
+#include <string>
+
///
typedef unsigned short int Uchar;
///
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_;
}
///
}
private:
///
- string Name_;
+ std::string Name_;
///
- string LatexName_;
+ std::string LatexName_;
///
Uchar encoding_table[256];
};
class Encodings {
public:
///
- typedef std::map<string, Encoding> EncodingList;
+ typedef std::map<std::string, Encoding> 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_;
#include "errorlist.h"
+using std::string;
+
ErrorItem::ErrorItem(string const & error, string const & description,
int par_id, int pos_start, int pos_end)
ErrorItem::ErrorItem()
: par_id(-1), pos_start(0), pos_end(0)
{}
-
-
#ifndef ERRORLIST_H
#define ERRORLIST_H
-#include "support/std_string.h"
-
#include <vector>
+#include <string>
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();
};
using lyx::support::MakeDisplayPath;
using std::find;
-
+using std::string;
using std::vector;
#define EXPORTER_H
#include <vector>
-#include "support/std_string.h"
+
class Buffer;
class Format;
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<Format const *> const
using lyx::support::compare_ascii_no_case;
using std::endl;
+using std::string;
InsetOld * createInset(FuncRequest const & cmd)
using lyx::support::subst;
using lyx::support::Systemcall;
+using std::string;
+
namespace {
#ifndef FORMAT_H
#define FORMAT_H
-
-#include "support/std_string.h"
-
#include <vector>
+#include <string>
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_;
};
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();
using std::endl;
using std::make_pair;
using std::pair;
+using std::string;
int Alert::prompt(string const & title, string const & question,
* "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
* 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<bool, string> const
-askForText(string const & msg,
- string const & dflt = string());
+std::pair<bool, std::string> const
+askForText(std::string const & msg,
+ std::string const & dflt = std::string());
}
// GUI-specific implementations
-#include "support/std_string.h"
#include <utility>
+#include <string>
-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<bool, string> const askForText_pimpl(string const & msg, string const & dflt);
+std::pair<bool, std::string> const askForText_pimpl(std::string const & msg, std::string const & dflt);
#include <boost/bind.hpp>
+using std::string;
+
+
// Note that static boost signals break some compilers, so this wrapper
// initialises the signal dynamically when it is first invoked.
template<typename Signal>
#include <boost/signals/signal0.hpp>
#include <boost/signals/signal1.hpp>
-#include "support/std_string.h"
-
-
class Dialog;
class InsetBase;
class LyXView;
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.
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<string, InsetBase *> open_insets_;
+ std::map<std::string, InsetBase *> open_insets_;
///
typedef boost::shared_ptr<Dialog> DialogPtr;
///
- std::map<string, DialogPtr> dialogs_;
+ std::map<std::string, DialogPtr> dialogs_;
/// the stuff below is slated to go...
void init_pimpl();
#ifndef FILEDIALOG_H
#define FILEDIALOG_H
+#include "lfuns.h"
#include <utility>
+#include <string>
-#include "lfuns.h"
-
-#include "support/std_string.h"
/**
* \class FileDialog
{
public:
/// label, directory path button
- typedef std::pair<string, string> Button;
+ typedef std::pair<std::string, std::string> Button;
/// result type
enum ResultType {
};
/// result return
- typedef std::pair<FileDialog::ResultType, string> Result;
+ typedef std::pair<FileDialog::ResultType, std::string> Result;
/**
* Constructs a file dialog with title \param title.
* 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();
*
* 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
*
* 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
private:
/// the dialog title
- string title_;
+ std::string title_;
/// success action to perform if not synchronous
kb_action success_;
#ifndef LYXKEYSYM_H
#define LYXKEYSYM_H
-#include "support/std_string.h"
+#include <string>
/**
* This is a base class for representing a keypress.
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;
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;
};
using lyx::support::OnlyFilename;
using std::endl;
+using std::string;
string current_layout;
#include <boost/signals/trackable.hpp>
#include <boost/signals/signal0.hpp>
-#include "support/std_string.h"
-
class Buffer;
class Toolbar;
class Intl;
//@}
/// 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();
boost::signal0<void> 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;
* @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();
#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
///
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;
};
#include "lyxfont.h"
using std::max;
+using std::string;
Painter & Painter::button(int x, int y, int w, int h)
#ifndef PAINTER_H
#define PAINTER_H
-
-#include "support/std_string.h"
+#include <string>
class LColor_color;
/// 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)
* 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:
#ifndef TOOLBAR_H
#define TOOLBAR_H
-
-#include "support/std_string.h"
#include "ToolbarBackend.h"
class LyXView;
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
#include <boost/signals/signal1.hpp>
#include <boost/signals/signal2.hpp>
-#include "support/std_string.h"
class Painter;
class FuncRequest;
/// 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<void> workAreaResize;
#ifndef BCVIEW_H
#define BCVIEW_H
-
-#include "support/std_string.h"
#include <boost/shared_ptr.hpp>
#include <list>
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_
/// 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_;
template <class Button, class Widget>
GuiBC<Button, Widget>::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)
using std::ostream;
using std::ostringstream;
+using std::string;
ControlAboutlyx::ControlAboutlyx(Dialog & parent)
//@{
/// 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; }
//@{
/// 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;
//@}
};
using lyx::support::OnlyFilename;
+using std::string;
using std::pair;
using std::vector;
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<string> & data) const;
+ void getBibStyles(std::vector<std::string> & data) const;
/// get the list of bib files
- void getBibFiles(std::vector<string> & data) const;
+ void getBibFiles(std::vector<std::string> & 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;
#include "funcrequest.h"
#include "insets/insetbranch.h"
+
+using std::string;
+
+
ControlBranch::ControlBranch(Dialog & parent)
: Dialog::Controller(parent)
{}
string const lfun = InsetBranchMailer::params2string(string("branch"), params());
kernel().dispatch(FuncRequest(LFUN_INSET_APPLY, lfun));
}
-
///
ControlBranch(Dialog &);
///
- virtual bool initialiseParams(string const & data);
+ virtual bool initialiseParams(std::string const & data);
///
virtual void clearParams();
///
using lyx::support::rtrim;
+using std::string;
+
ControlChanges::ControlChanges(Dialog & parent)
: Dialog::Controller(parent)
///
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() {}
///
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();
using bv_funcs::font2string;
+using std::string;
+
ControlCharacter::ControlCharacter(Dialog & parent)
: Dialog::Controller(parent),
///
ControlCharacter(Dialog &);
///
- virtual bool initialiseParams(string const & data);
+ virtual bool initialiseParams(std::string const & data);
///
virtual void clearParams();
///
///
void setColor(LColor_color);
///
- void setLanguage(string const &);
+ void setLanguage(std::string const &);
///
void setToggleAll(bool);
///
LColor_color getColor() const;
///
- string getLanguage() const;
+ std::string getLanguage() const;
///
bool getToggleAll() const;
private:
#include "buffer.h"
#include "bufferparams.h"
+
+using std::string;
using std::vector;
using std::pair;
{
ControlCommand::initialiseParams(data);
- vector<pair<string,string> > blist;
+ vector<pair<string, string> > blist;
kernel().buffer().fillWithBibKeys(blist);
typedef std::map<string, string>::value_type InfoMapValue;
ControlCitation(Dialog &);
///
- virtual bool initialiseParams(string const & data);
+ virtual bool initialiseParams(std::string const & data);
/// clean-up on hide.
virtual void clearParams();
///
bool usingNatbib() const;
/// Possible citations based on this key
- std::vector<string> const getCiteStrings(string const & key) const;
+ std::vector<std::string> const getCiteStrings(std::string const & key) const;
/// available CiteStyle-s (depends on availability of Natbib
static std::vector<biblio::CiteStyle> const & getCiteStyles() {
#include "insets/insetcommand.h"
+using std::string;
+
+
ControlCommand::ControlCommand(Dialog & dialog, string const & lfun_name)
: Dialog::Controller(dialog),
lfun_name_(lfun_name)
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.
///
InsetCommandParams params_;
/// Flags what action is taken by Kernel::dispatch()
- string const lfun_name_;
+ std::string const lfun_name_;
};
using std::back_inserter;
using std::transform;
-
+using std::string;
using std::vector;
#ifndef CONTROLCOMMANDBUFFER_H
#define CONTROLCOMMANDBUFFER_H
-#include "support/std_string.h"
-
#include <vector>
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<string> const completions(string const & prefix,
- string & new_prefix);
+ std::vector<std::string> 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<string> commands_;
+ std::vector<std::string> commands_;
/// command history
- std::vector<string> history_;
+ std::vector<std::string> history_;
/// current position in command history
- std::vector<string>::const_iterator history_pos_;
+ std::vector<std::string>::const_iterator history_pos_;
};
#endif // CONTROLCOMMANDBUFFER_H
using lyx::support::bformat;
using lyx::support::user_lyxdir;
+using std::string;
+
ControlDocument::ControlDocument(LyXView & lv, Dialogs & d)
: ControlDialogBD(lv, d), bp_(0)
#include "funcrequest.h"
+using std::string;
+
+
ControlERT::ControlERT(Dialog & parent)
: Dialog::Controller(parent), status_(InsetERT::Collapsed)
{}
///
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.
using std::endl;
+using std::string;
ControlErrorList::ControlErrorList(Dialog & d)
///
virtual bool isBufferDependent() const { return true; }
///
- virtual bool initialiseParams(string const & data);
+ virtual bool initialiseParams(std::string const & data);
///
virtual void clearParams();
///
/// 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
#include "insets/ExternalTemplate.h"
+
namespace external = lyx::external;
using std::vector;
+using std::string;
ControlExternal::ControlExternal(Dialog & parent)
///
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.
///
void editExternal();
///
- std::vector<string> const getTemplates() const;
+ std::vector<std::string> 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<InsetExternal::Params> params_;
#include "insets/insetfloat.h"
+using std::string;
+
+
ControlFloat::ControlFloat(Dialog & parent)
: Dialog::Controller(parent)
{}
///
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.
#include <boost/bind.hpp>
+
using lyx::support::ForkedcallsController;
+using std::string;
using std::vector;
#include <boost/signals/connection.hpp>
-#include "support/std_string.h"
#include <vector>
#include <sys/types.h>
///
std::vector<pid_t> const getPIDs() const;
///
- string const getCommand(pid_t) const;
+ std::string const getCommand(pid_t) const;
///
void kill(pid_t);
private:
using lyx::support::user_lyxdir;
using std::make_pair;
-
+using std::string;
using std::pair;
using std::vector;
///
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.
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:
///
namespace frnt {
/// get the units for the bounding box
-std::vector<string> const getBBUnits();
+std::vector<std::string> const getBBUnits();
-/// The (tranlated) GUI string and it's LaTeX equivalent.
-typedef std::pair<string, string> RotationOriginPair;
+/// The (tranlated) GUI std::string and it's LaTeX equivalent.
+typedef std::pair<std::string, std::string> RotationOriginPair;
///
std::vector<RotationOriginPair> getRotationOriginData();
using lyx::support::OnlyPath;
using std::pair;
+using std::string;
ControlInclude::ControlInclude(Dialog & parent)
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.
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_;
#include "ControlLog.h"
+using std::string;
+
+
ControlLog::ControlLog(Dialog & parent)
: Dialog::Controller(parent)
{}
///
ControlLog(Dialog &);
///
- virtual bool initialiseParams(string const & data);
+ virtual bool initialiseParams(std::string const & data);
///
virtual void clearParams();
///
///
virtual bool isBufferDependent() const { return true; }
///
- std::pair<Buffer::LogType, string> const & logfile() const {
+ std::pair<Buffer::LogType, std::string> const & logfile() const {
return logfile_;
}
private:
- std::pair<Buffer::LogType, string> logfile_;
+ std::pair<Buffer::LogType, std::string> logfile_;
};
#endif // CONTROLLOG_H
using lyx::support::LibFileSearch;
using lyx::support::subst;
+using std::string;
+
ControlMath::ControlMath(Dialog & dialog)
: Dialog::Controller(dialog)
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.
/// 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;
};
* 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
#include "funcrequest.h"
+using std::string;
+
+
ControlMinipage::ControlMinipage(Dialog & parent)
: Dialog::Controller(parent)
{}
///
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.
using std::vector;
+using std::string;
ControlNote::ControlNote(Dialog & parent)
///
ControlNote(Dialog &);
///
- virtual bool initialiseParams(string const & data);
+ virtual bool initialiseParams(std::string const & data);
///
virtual void clearParams();
///
};
///
-void note_gui_tokens(std::vector<string> &, std::vector<string> &);
+void note_gui_tokens(std::vector<std::string> &, std::vector<std::string> &);
#endif // CONTROLNOTE_H
#include "ParagraphParameters.h"
#include "support/std_sstream.h"
+
using std::istringstream;
using std::ostringstream;
+using std::string;
ControlParagraph::ControlParagraph(Dialog & parent)
///
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.
#include "frontends/LyXView.h"
+using std::string;
+
+
ControlPreamble::ControlPreamble(LyXView & lv, Dialogs & d)
: ControlDialogBD(lv, d)
{}
#include "ControlDialog_impl.h"
-#include "support/std_string.h"
/** A controller for Preamble dialogs.
*/
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();
virtual void clearParams();
///
- string params_;
+ std::string params_;
};
#endif // CONTROLPREAMBLE_H
using lyx::support::user_lyxdir;
using std::pair;
+using std::string;
extern BufferList bufferlist;
#include "ControlDialog_impl.h"
-#include "support/std_string.h"
#include "lyxrc.h"
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();
using lyx::support::Systemcall;
using std::endl;
+using std::string;
ControlPrint::ControlPrint(LyXView & lv, Dialogs & d)
#include "ControlDialog_impl.h"
-#include "support/std_string.h"
class PrinterParams;
ControlPrint(LyXView &, Dialogs &);
/// Browse for a file
- string const Browse(string const &);
+ std::string const Browse(std::string const &);
///
PrinterParams & params() const;
private:
using lyx::support::MakeDisplayPath;
using std::vector;
+using std::string;
+
extern BufferList bufferlist;
///
ControlRef(Dialog &);
///
- std::vector<string> const getLabelList(string const &) const;
+ std::vector<std::string> const getLabelList(std::string const &) const;
///
- void gotoRef(string const &);
+ void gotoRef(std::string const &);
///
void gotoBookmark();
///
- std::vector<string> const getBufferList() const;
+ std::vector<std::string> 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. */
#include "support/tostr.h"
+using std::string;
+
+
ControlSearch::ControlSearch(LyXView & lv, Dialogs & d)
: ControlDialogBD(lv, d)
{}
#include "ControlDialog_impl.h"
-#include "support/std_string.h"
/** A controller for Search dialogs.
*/
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.
using lyx::support::trim;
using std::vector;
+using std::string;
ControlSendto::ControlSendto(LyXView & lv, Dialogs & d)
#include "ControlDialog_impl.h"
-#include "support/std_string.h"
#include <vector>
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
#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)
///
ControlShowFile(Dialog &);
///
- virtual bool initialiseParams(string const & data);
+ virtual bool initialiseParams(std::string const & data);
///
virtual void clearParams();
///
///
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
#include "frontends/Alert.h"
+
using lyx::support::bformat;
using std::endl;
+using std::string;
ControlSpellchecker::ControlSpellchecker(LyXView & lv, Dialogs & d)
#include <boost/scoped_ptr.hpp>
#include "ControlDialog_impl.h"
-#include "support/std_string.h"
#include "WordLangTuple.h"
class SpellBase;
~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();
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_; }
#include "insets/insettabular.h"
+using std::string;
+
+
ControlTabular::ControlTabular(Dialog & parent)
: Dialog::Controller(parent), active_cell_(-1)
{}
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.
/// 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();
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();
#include "support/tostr.h"
+using std::string;
+
+
ControlTabularCreate::ControlTabularCreate(Dialog & parent)
: Dialog::Controller(parent)
{}
///
ControlTabularCreate(Dialog &);
///
- virtual bool initialiseParams(string const & data);
+ virtual bool initialiseParams(std::string const & data);
/// clean-up on hide.
virtual void clearParams();
///
#include "funcrequest.h"
+using std::string;
+
+
void getTexFileList(ControlTexinfo::texFileSuffix type,
std::vector<string> & list)
{
///
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() {}
///
/// 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() {}
* Each entry in the file list is returned as a pair<name_with_path, name_only>
*/
void getTexFileList(ControlTexinfo::texFileSuffix type,
- std::vector<string> & contents);
+ std::vector<std::string> & contents);
#endif // CONTROLTEXINFO_H
#include "frontends/LyXView.h"
+
+using std::string;
+
+
ControlThesaurus::ControlThesaurus(Dialog & parent)
: Dialog::Controller(parent)
{}
///
ControlThesaurus(Dialog &);
///
- virtual bool initialiseParams(string const & data);
+ virtual bool initialiseParams(std::string const & data);
///
virtual void clearParams();
///
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() {}
#include "ControlToc.h"
using std::vector;
+using std::string;
+
class Buffer;
void goTo(lyx::toc::TocItem const &);
/// Return the list of types available
- std::vector<string> const getTypes() const;
+ std::vector<std::string> 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
using std::endl;
using std::ostream;
+using std::string;
ControlVCLog::ControlVCLog(Dialog & parent)
///
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() {}
///
/// 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
#include "insets/insetwrap.h"
+using std::string;
+
+
ControlWrap::ControlWrap(Dialog & parent)
: Dialog::Controller(parent)
{}
///
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.
#include "BCView.h"
+using std::string;
+
+
Dialog::Dialog(LyXView & lv, string const & name)
: is_closing_(false), kernel_(lv), name_(name),
bc_ptr_(new ButtonController)
#include "Kernel.h"
-#include "support/std_string.h"
+
#include <boost/utility.hpp>
#include <boost/scoped_ptr.hpp>
/// \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
//@{
/// \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;
bool is_closing_;
Kernel kernel_;
- string name_;
+ std::string name_;
boost::scoped_ptr<ButtonController> bc_ptr_;
boost::scoped_ptr<Controller> controller_ptr_;
boost::scoped_ptr<View> view_ptr_;
* \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;
/** \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
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.
private:
Dialog & p_;
- string title_;
+ std::string title_;
};
#include "frontends/LyXView.h"
+using std::string;
+
+
Kernel::Kernel(LyXView & lyxview)
: lyxview_(lyxview)
{}
#ifndef KERNEL_H
#define KERNEL_H
-
-#include "support/std_string.h"
+#include <string>
class Buffer;
* 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
* 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.
//@{
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
#include "ControlButtons.h"
+using std::string;
+
+
ViewBase::ViewBase(string const & t)
: controller_ptr_(0), title_(t)
{}
class ControlButtons;
class ButtonController;
-#include "support/std_string.h"
-
#include <boost/utility.hpp>
+#include <string>
+
class ViewBase : boost::noncopyable {
public:
///
- ViewBase(string const &);
+ ViewBase(std::string const &);
///
virtual ~ViewBase() {}
///
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_;
};
using lyx::support::token;
using lyx::support::trim;
+using std::string;
using std::ostringstream;
using std::vector;
#ifndef BIBLIOHELPERS_H
#define BIBLIOHELPERS_H
-
-#include "support/std_string.h"
#include <map>
#include <vector>
};
/// First entry is the bibliography key, second the data
-typedef std::map<string, string> InfoMap;
+typedef std::map<std::string, std::string> InfoMap;
/// Returns a vector of bibliography keys
-std::vector<string> const getKeys(InfoMap const &);
+std::vector<std::string> 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.
an enum defining the search direction.
*/
-std::vector<string>::const_iterator
+std::vector<std::string>::const_iterator
searchKeys(InfoMap const & map,
- std::vector<string> const & keys_to_search,
- string const & search_expression,
- std::vector<string>::const_iterator start,
+ std::vector<std::string> const & keys_to_search,
+ std::string const & search_expression,
+ std::vector<std::string>::const_iterator start,
Search,
Direction,
bool caseSensitive=false);
};
/// 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
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<CiteStyle> const getCiteStyles(bool usingNatbib);
the InfoMap of bibkeys info,
the available citation styles
*/
-std::vector<string> const
-getNumericalStrings(string const & key,
+std::vector<std::string> const
+getNumericalStrings(std::string const & key,
InfoMap const & map,
std::vector<CiteStyle> const & styles);
the InfoMap of bibkeys info,
the available citation styles
*/
-std::vector<string> const
-getAuthorYearStrings(string const & key,
+std::vector<std::string> const
+getAuthorYearStrings(std::string const & key,
InfoMap const & map,
std::vector<CiteStyle> const & styles);
} // namespace biblio
};
///
-typedef std::pair<string, LyXFont::FONT_FAMILY> FamilyPair;
+typedef std::pair<std::string, LyXFont::FONT_FAMILY> FamilyPair;
///
-typedef std::pair<string, LyXFont::FONT_SERIES> SeriesPair;
+typedef std::pair<std::string, LyXFont::FONT_SERIES> SeriesPair;
///
-typedef std::pair<string, LyXFont::FONT_SHAPE> ShapePair;
+typedef std::pair<std::string, LyXFont::FONT_SHAPE> ShapePair;
///
-typedef std::pair<string, LyXFont::FONT_SIZE> SizePair;
+typedef std::pair<std::string, LyXFont::FONT_SIZE> SizePair;
///
-typedef std::pair<string, FONT_STATE> BarPair;
+typedef std::pair<std::string, FONT_STATE> BarPair;
///
-typedef std::pair<string, LColor_color> ColorPair;
+typedef std::pair<std::string, LColor_color> ColorPair;
///
std::vector<FamilyPair> const getFamilyData();
#include <algorithm>
+
+using std::string;
using std::vector;
+
namespace {
struct Sorter {
#ifndef FRNT_LANG_H
#define FRNT_LANG_H
-
-#include "support/std_string.h"
#include <utility>
#include <vector>
namespace frnt {
///
-typedef std::pair<string, string> LanguagePair;
+typedef std::pair<std::string, std::string> LanguagePair;
/** If the caller is the character dialog, add "No change" and "Reset"
* to the vector.
using std::pair;
using std::vector;
+using std::string;
string const browseFile(string const & filename,
#ifndef HELPERFUNCS_H
#define HELPERFUNCS_H
-#include "support/std_string.h"
#include <utility>
#include <vector>
+#include <string>
+
/** Launch a file dialog and return the chosen file.
filename: a suggested filename.
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<string,string> const & dir1 =
- std::make_pair(string(), string()),
- std::pair<string,string> const & dir2 =
- std::make_pair(string(), string()));
+ std::pair<std::string,std::string> const & dir1 =
+ std::make_pair(std::string(), std::string()),
+ std::pair<std::string,std::string> const & dir2 =
+ std::make_pair(std::string(), std::string()));
/* Wrapper around browseFile which tries to provide a 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<string,string> const & dir1 =
- std::make_pair(string(), string()),
- std::pair<string,string> const & dir2 =
- std::make_pair(string(), string()));
+ std::pair<std::string,std::string> const & dir1 =
+ std::make_pair(std::string(), std::string()),
+ std::pair<std::string,std::string> const & dir2 =
+ std::make_pair(std::string(), std::string()));
/** Launch a file dialog and return the chosen directory.
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<string,string> const & dir1 =
- std::make_pair(string(), string()),
- std::pair<string,string> const & dir2 =
- std::make_pair(string(), string()));
+std::string const
+browseDir(std::string const & pathname,
+ std::string const & title,
+ std::pair<std::string,std::string> const & dir1 =
+ std::make_pair(std::string(), std::string()),
+ std::pair<std::string,std::string> 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<string> const getLatexUnits();
+std::vector<std::string> const getLatexUnits();
/** Functions to extract vectors of the first and second elems from a
using lyx::support::token;
using lyx::support::user_lyxdir;
+using std::string;
using std::endl;
#ifndef TEX_HELPERS_H
#define TEX_HELPERS_H
-
-#include "support/std_string.h"
#include <vector>
/** 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<string> & contents);
+void getTexFileList(std::string const & filename, std::vector<std::string> & 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
#ifndef FONT_METRICS_H
#define FONT_METRICS_H
-#include "support/std_string.h"
+#include <string>
+
class LyXFont;
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);
* 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);
#include "frontends/Alert.h"
#include "frontends/Alert_pimpl.h"
+using std::string;
+
namespace {
#include <vector>
+using std::string;
+
namespace {
#include "FileDialogPrivate.h"
+using std::string;
+
FileDialog::FileDialog(string const & title,
kb_action action,
#include <config.h>
#include <gtkmm.h>
-#include "support/std_string.h"
-
#include "FileDialogPrivate.h"
+using std::string;
+
FileDialog::Private::Private(string const & title,
kb_action action,
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();
Gtk::FileSelection fileSelection_;
Gtk::Button button1_;
Gtk::Button button2_;
- string dir1_;
- string dir2_;
+ std::string dir1_;
+ std::string dir2_;
kb_action action_;
};
#include "version.h"
using std::ostringstream;
+using std::string;
namespace {
#include "GBC.h"
+using std::string;
+
GBC::GBC(ButtonController const & parent,
string const & cancel, string const & close)
#include "ButtonController.h"
#include "BCView.h"
-#include "support/std_string.h"
#include "gettext.h"
class GBC : public GuiBC<Gtk::Button, Gtk::Widget>
{
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;
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
#include <gdk/gdkkeysyms.h>
#include "GLyXKeySym.h"
+using std::string;
+
GLyXKeySym::GLyXKeySym() : keyval_(GDK_VoidSymbol)
{
#ifndef GLYX_KEYSYM_H
#define GLYX_KEYSYM_H
-#include "support/std_string.h"
#include "frontends/LyXKeySym.h"
class GLyXKeySym : public LyXKeySym
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_;
};
#include "debug.h"
#include "lyxfunc.h"
+using std::string;
+
namespace
{
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);
#include "GMiniBuffer.h"
#include "debug.h"
#include "bufferview_funcs.h"
+
+#include "frontends/controllers/ControlCommandBuffer.h"
+
#include <boost/bind.hpp>
#include <vector>
-#include "frontends/controllers/ControlCommandBuffer.h"
+
+using std::string;
GMiniBuffer::GMiniBuffer(GView * view, ControlCommandBuffer & control) :
#define GMINI_BUFFER_H
#include "frontends/Timeout.h"
-#include "support/std_string.h"
+
class ControlCommandBuffer;
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:
#include <gtkmm.h>
#include "GPainter.h"
-#include "support/std_string.h"
#include "debug.h"
#include "GWorkArea.h"
#include "lyxrc.h"
#include <cmath>
+using std::string;
+
GPainter::GPainter(GWorkArea & xwa)
: Painter(), owner_(xwa)
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));
#ifndef GPAINTER_H
#define GPAINTER_H
+#include "frontends/Painter.h"
+
#include <X11/Xft/Xft.h>
#include <map>
-#include "frontends/Painter.h"
-#include "support/std_string.h"
class LyXFont;
class GWorkArea;
/// 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
#ifndef GPRINT_H
#define GPRINT_H
-#include "support/std_string.h"
#include "GViewBase.h"
class ControlPrint;
class GPrint : public GViewCB<ControlPrint, GViewGladeB>
{
public:
- GPrint(Dialog & parent, string title = "Print Document");
+ GPrint(Dialog & parent, std::string title = "Print Document");
private:
virtual void apply();
virtual void update();
};
#endif
-
#include "GText.h"
#include "IdSc.h"
+using std::string;
+
+
GText::GText(Dialog & parent, string const & title, string const & label)
: GViewCB<ControlCommand, GViewGladeB>(parent, title),
label_(label), entry_(0)
#define GTEXT_H
#include "GViewBase.h"
-#include "support/std_string.h"
class ControlCommand;
class GText : public GViewCB<ControlCommand, GViewGladeB>
{
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_;
};
#include "support/lstrings.h"
#include "debug.h"
+using std::string;
+
namespace
{
#include <gtkmm.h>
#include "frontends/Toolbar.h"
#include "ToolbarBackend.h"
-#include "support/std_string.h"
class GToolbar : public Toolbar, public SigC::Object
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();
#include "lyxfunc.h"
#include <boost/bind.hpp>
+using std::string;
+
+
BufferView * current_view;
GView * GView::view_ = 0;
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);
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<Gtk::VBox> vbox_;
boost::scoped_ptr<GMiniBuffer> minibuffer_;
#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)
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
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> dialog_;
template <class Dialog>
-GViewDB<Dialog>::GViewDB(Dialog & parent, string const & t, bool allowResize) :
+GViewDB<Dialog>::GViewDB(Dialog & parent, std::string const & t, bool allowResize) :
GViewBase(parent, t, allowResize)
{
}
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<Gnome::Glade::Xml> xml_;
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 <class Controller, class Base>
-GViewCB<Controller, Base>::GViewCB(Dialog & parent, string const & t,
+GViewCB<Controller, Base>::GViewCB(Dialog & parent, std::string const & t,
bool allowResize) :
Base(parent, t, allowResize)
{
#include "funcrequest.h"
#include "LColor.h"
+using std::string;
+
+
ColorCache colorCache;
/// 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);
XftDraw * draw_;
ColorHandler colorHandler_;
GtkIMContext * imContext_;
- string inputCache_;
+ std::string inputCache_;
};
#endif
using lyx::support::split;
+using std::string;
+
/// Extract shortcut from "<identifer>|#<shortcut>" string
string const id_sc::shortcut(string const & idsc)
#ifndef ID_SC_H
#define ID_SC_H
-#include "support/std_string.h"
+#include <string>
namespace id_sc
{
/// Extract shortcut from "<identifer>|<shortcut>" string
-string const shortcut(string const &);
+std::string const shortcut(std::string const &);
/// Extract identifier from "<identifer>|<shortcut>" string
-string const id(string const &);
+std::string const id(std::string const &);
}
#include "xforms_helpers.h"
using std::ostringstream;
+using std::string;
extern BufferList bufferlist;
#include "frontends/lyx_gui.h"
using std::endl;
+using std::string;
// The global fontLoader
xftFontLoader fontLoader;
#define XFT_FONT_LOADER_H
#include "lyxfont.h"
-#include "support/std_string.h"
+
#include <X11/Xft/Xft.h>
class GWorkArea;
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();
#include <boost/scoped_array.hpp>
+using std::string;
+
namespace {
#ifndef LYX_GUI_H
#define LYX_GUI_H
-#include "support/std_string.h"
+
#include "FuncStatus.h"
#include <vector>
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[]);
* Start the main event loop, after executing the given
* batch commands, and loading the given documents
*/
-void start(string const & batch, std::vector<string> const & files);
+void start(std::string const & batch, std::vector<std::string> const & files);
/**
* Synchronise all pending events.
/** 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
#include <algorithm>
+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,
using lyx::support::LibFileSearch;
+using std::string;
+
BulletsModule::BulletsModule(QWidget * parent, const char * name, WFlags fl)
: BulletsModuleBase(parent, name, fl), tmpbulletset(0)
#include "qt_helpers.h"
+using std::string;
+
namespace {
};
-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)
{
}
-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 (*)");
}
-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 (*)");
}
-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
using lyx::support::split;
+using std::string;
+
namespace {
#include "frontends/FileDialog.h"
#include <qfiledialog.h>
-#include "support/std_string.h"
class QToolButton;
{
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
using std::istringstream;
using std::ostringstream;
+using std::string;
typedef QController<ControlAboutlyx, QView<QAboutDialog> > base_class;
#include <config.h>
-
#include "debug.h"
#include "support/lstrings.h"
using lyx::support::trim;
using std::vector;
+using std::string;
typedef QController<ControlBibtex, QView<QBibtexDialog> > base_class;
using lyx::support::ChangeExtension;
+using std::string;
+
QBibtexDialog::QBibtexDialog(QBibtex * form)
: QBibtexDialogBase(0, 0, false, 0),
#include "QChanges.h"
#include "Qt2BC.h"
+
+using std::string;
+
+
typedef QController<ControlChanges, QView<QChangesDialog> > base_class;
using lyx::support::trim;
using std::find;
-
+using std::string;
using std::vector;
/// set the styles combo
void updateStyle();
- void updateBrowser(QListBox *, std::vector<string> const &) const;
+ void updateBrowser(QListBox *, std::vector<std::string> const &) const;
/// selected keys
- std::vector<string> citekeys;
+ std::vector<std::string> citekeys;
/// available bib keys
- std::vector<string> bibkeys;
+ std::vector<std::string> bibkeys;
};
#endif // QCITATION_H
#include "QCitation.h"
using std::vector;
+using std::string;
QCitationDialog::QCitationDialog(QCitation * form)
biblio::InfoMap const & theMap = form_->controller().bibkeysInfo();
biblio::Search const type = add_->searchTypeCB->isChecked()
- ? biblio::REGEX : biblio::SIMPLE;
+ ? biblio::REGEX : biblio::SIMPLE;
vector<string>::const_iterator start = form_->bibkeys.begin();
int const sel = add_->availableLB->currentItem();
using lyx::support::LibFileSearch;
using std::vector;
+using std::string;
namespace {
#include <qpixmap.h>
#include <qcheckbox.h>
+using std::string;
+
namespace {
char const * delim[] = {
#ifndef QDELIMITERDIALOG_H
#define QDELIMITERDIALOG_H
-
#include "ui/QDelimiterDialogBase.h"
-#include "support/std_string.h"
+
class QMathDelimiter;
class IconPalette;
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_;
#include "QDialogView.h"
-QDialogView::QDialogView(Dialog & parent, string const & t)
+QDialogView::QDialogView(Dialog & parent, std::string const & t)
: Dialog::View(parent,t), updating_(false)
{}
Q_OBJECT
public:
///
- QDialogView(Dialog &, string const &);
+ QDialogView(Dialog &, std::string const &);
///
virtual ~QDialogView() {}
///
template <class GUIDialog>
class QView: public QDialogView {
protected:
- QView(Dialog &, string const &);
+ QView(Dialog &, std::string const &);
/// update the dialog
virtual void update();
template <class GUIDialog>
-QView<GUIDialog>::QView(Dialog & p, string const & t)
+QView<GUIDialog>::QView(Dialog & p, std::string const & t)
: QDialogView(p, t)
{}
{
protected:
///
- QController(Dialog &, string const &);
+ QController(Dialog &, std::string const &);
public:
/// The parent controller
Controller & controller();
template <class Controller, class Base>
-QController<Controller, Base>::QController(Dialog & p, string const & t)
+QController<Controller, Base>::QController(Dialog & p, std::string const & t)
: Base(p, t)
{}
#include "lengthcombo.h"
+using lyx::support::bformat;
using std::vector;
-using lyx::support::bformat;
+using std::string;
+
typedef Qt2CB<ControlDocument, Qt2DB<QDocumentDialog> > base_class;
void useClassDefaults();
/// FIXME
- std::vector<string> lang_;
+ std::vector<std::string> lang_;
};
#endif // QDOCUMENT_H
#include "bufferparams.h"
#include "lyxrc.h"
-
#include <qlabel.h>
#include <qmultilineedit.h>
#include <qlineedit.h>
using lyx::support::token;
+using std::string;
+
QDocumentDialog::QDocumentDialog(QDocument * form)
: QDocumentDialogBase(0, 0, false, 0), form_(form)
#include "ui/MarginsModuleBase.h"
#include "ui/PreambleModuleBase.h"
-#include "support/std_string.h"
class QDocument;
class FloatPlacement;
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();
using lyx::support::strToInt;
+using std::string;
+
typedef QController<ControlExternal, QView<QExternalDialog> > base_class;
virtual void build_dialog();
/// get the right helptext
- string const helpText() const;
+ std::string const helpText() const;
};
#endif // QEXTERNAL_H
using lyx::support::token;
using std::vector;
+using std::string;
typedef QController<ControlGraphics, QView<QGraphicsDialog> > base_class;
void getBB();
/// Store the LaTeX names for the rotation origins.
- std::vector<string> origin_ltx;
+ std::vector<std::string> origin_ltx;
};
#include "QGraphicsDialog.h"
#include "QGraphics.h"
+using std::string;
QGraphicsDialog::QGraphicsDialog(QGraphics * form)
#include <qcheckbox.h>
#include <qcombobox.h>
+using std::string;
+
typedef QController<ControlInclude, QView<QIncludeDialog> > base_class;
#include <qlineedit.h>
#include <qpushbutton.h>
+using std::string;
+
typedef QController<ControlCommand, QView<QIndexDialog> > base_class;
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:
using std::endl;
using std::find_if;
+using std::string;
namespace lyx {
* 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).
using std::pair;
+using std::string;
QLMenubar::QLMenubar(LyXView * view, MenuBackend const & mbe)
#define QLMENUBAR_H
#include "frontends/Menubar.h"
-#include "support/std_string.h"
+
#include <map>
class LyXView;
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();
/// menu controller
MenuBackend const & menubackend_;
- typedef std::map<string, QLPopupMenu *> NameMap;
+ typedef std::map<std::string, QLPopupMenu *> NameMap;
/// name to menu for openByName
NameMap name_map_;
#include <qpainter.h>
using std::endl;
+using std::string;
QLPainter::QLPainter(QWorkArea & qwa)
#ifndef QLPAINTER_H
#define QLPAINTER_H
-
#include "Painter.h"
-#include "support/std_string.h"
#include <boost/scoped_ptr.hpp>
/// 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
using lyx::support::subst;
using std::make_pair;
-
+using std::string;
using std::pair;
#include "funcrequest.h"
-#include "support/std_string.h"
-
#include <vector>
#include <utility>
Q_OBJECT
public:
QLPopupMenu(QLMenubar * owner,
- string const & name, bool toplevel);
+ std::string const & name, bool toplevel);
/// populate the menu
void populate(Menu * menu);
QLMenubar * owner_;
/// the name of this menu
- string name_;
+ std::string name_;
///
typedef std::vector<FuncRequest> Funcs;
#include <qtoolbar.h>
using std::endl;
+using std::string;
class QLComboBox : public QComboBox {
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);
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
/// 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);
boost::scoped_ptr<ToolbarProxy> proxy_;
- std::map<string, QToolBar *> toolbars_;
+ std::map<std::string, QToolBar *> toolbars_;
QLComboBox * combo_;
using std::ifstream;
using std::ostringstream;
+using std::string;
typedef QController<ControlLog, QView<QLogDialog> > base_class;
#include <map>
using std::endl;
-
+using std::string;
using std::map;
#ifndef QLYXKEYSYM_H
#define QLYXKEYSYM_H
-
-#include "support/std_string.h"
#include "frontends/LyXKeySym.h"
#include <qstring.h>
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;
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;
* 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_;
#include <qlistbox.h>
#include <qpopupmenu.h>
+using std::string;
class QScrollViewSingle : public QScrollView {
#ifndef QMATHDIALOG_H
#define QMATHDIALOG_H
-
#include "ui/QMathDialogBase.h"
-#include "support/std_string.h"
+
class QMath;
class IconPalette;
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);
#include "emptytable.h"
using std::ostringstream;
+using std::string;
static char h_align_str[80] = "c";
using lyx::support::strToDbl;
+using std::string;
+
typedef QController<ControlMinipage, QView<QMinipageDialog> > base_class;
#include "QNote.h"
#include "Qt2BC.h"
+using std::string;
+
typedef QController<ControlNote, QView<QNoteDialog> > base_class;
using std::bind2nd;
using std::remove_if;
-
+using std::string;
using std::vector;
#ifndef QPARAGRAPH_H
#define QPARAGRAPH_H
-
#include "QDialogView.h"
-#include "support/std_string.h"
+
#include <vector>
class ControlParagraph;
/// build the dialog
virtual void build_dialog();
- std::vector<string> units_;
+ std::vector<std::string> units_;
};
#endif // QPARAGRAPH_H
using std::endl;
using std::setfill;
using std::setw;
-
+using std::string;
using std::ostringstream;
using std::pair;
using std::vector;
virtual void build_dialog();
/// languages
- std::vector<string> lang_;
+ std::vector<std::string> lang_;
/// converters
Converters converters_;
#include "qcoloritem.h"
#include "qfontexample.h"
+using std::string;
+
QPrefsDialog::QPrefsDialog(QPrefs * form)
: QPrefsDialogBase(0, 0, false, 0), form_(form)
#include "qt_helpers.h"
using std::vector;
+using std::string;
typedef QController<ControlRef, QView<QRefDialog> > base_class;
#ifndef QREF_H
#define QREF_H
-
#include "QDialogView.h"
+
#include <vector>
-#include "support/std_string.h"
+
class ControlRef;
class QRefDialog;
bool at_ref_;
/// the references
- std::vector<string> refs_;
+ std::vector<std::string> refs_;
};
#endif // QREF_H
#include <qpushbutton.h>
#include <qcombobox.h>
+using std::string;
+
typedef Qt2CB<ControlSearch, Qt2DB<QSearchDialog> > base_class;
/// 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);
};
#include <qcheckbox.h>
#include <qlineedit.h>
+using std::string;
+
namespace {
void uniqueInsert(QComboBox * box, QString const & text)
#include "ui/QSearchDialogBase.h"
-#include "support/std_string.h"
class QSearch;
class QCloseEvent;
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_;
};
#include "format.h"
using std::vector;
+using std::string;
typedef Qt2CB<ControlSendto, Qt2DB<QSendtoDialog> > base_class;
#include <qtextview.h>
#include <qpushbutton.h>
+using std::string;
+
typedef QController<ControlShowFile, QView<QShowFileDialog> > base_class;
#include <qlistbox.h>
#include <qcombobox.h>
+using std::string;
+
typedef Qt2CB<ControlSpellchecker, Qt2DB<QSpellcheckerDialog> > base_class;
#include "lengthcombo.h"
#include "qsetborder.h"
+using std::string;
+
typedef QController<ControlTabular, QView<QTabularDialog> > base_class;
#include <qpushbutton.h>
#include <qlineedit.h>
+using std::string;
+
QTabularDialog::QTabularDialog(QTabular * form)
: QTabularDialogBase(0, 0, false, 0),
using lyx::support::OnlyFilename;
+using std::string;
+
typedef QController<ControlTexinfo, QView<QTexinfoDialog> > base_class;
///
ControlTexinfo::texFileSuffix activeStyle;
///
- typedef std::vector<string> ContentsType;
+ typedef std::vector<std::string> ContentsType;
std::map<ControlTexinfo::texFileSuffix, ContentsType> texdata_;
};
#include <qcombobox.h>
using std::vector;
+using std::string;
QTexinfoDialog::QTexinfoDialog(QTexinfo * form)
#include <qlistview.h>
#include <qlineedit.h>
+using std::string;
+
QThesaurusDialog::QThesaurusDialog(QThesaurus * form)
using std::pair;
using std::stack;
using std::vector;
+using std::string;
typedef QController<ControlToc, QView<QTocDialog> > base_class;
void updateType();
/// select an entry
- void select(string const & text);
+ void select(std::string const & text);
/// set the depth
void set_depth(int depth);
#include <qpushbutton.h>
#include <qlineedit.h>
+using std::string;
+
typedef QController<ControlCommand, QView<QURLDialog> > base_class;
QURL::QURL(Dialog & parent)
#endif
using std::endl;
+using std::string;
QWorkArea::QWorkArea(int, int, int, int)
/// 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);
///
using lyx::support::strToDbl;
+using std::string;
+
typedef QController<ControlWrap, QView<QWrapDialog> > base_class;
#include <qbutton.h>
#include <qlineedit.h>
+using std::string;
+
Qt2BC::Qt2BC(ButtonController const & parent,
string const & cancel, string const & close)
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;
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
#include "ButtonController.h"
#include "ControlButtons.h"
+using std::string;
+
Qt2Base::Qt2Base(string const & t)
: ViewBase(t), updating_(false)
Q_OBJECT
public:
///
- Qt2Base(string const &);
+ Qt2Base(std::string const &);
///
virtual ~Qt2Base() {}
protected:
template <class Dialog>
class Qt2DB: public Qt2Base {
protected:
- Qt2DB(string const &);
+ Qt2DB(std::string const &);
/// update the dialog
virtual void update();
template <class Dialog>
-Qt2DB<Dialog>::Qt2DB(string const & t)
+Qt2DB<Dialog>::Qt2DB(std::string const & t)
: Qt2Base(t)
{}
protected:
///
- Qt2CB(string const &);
+ Qt2CB(std::string const &);
};
template <class Controller, class Base>
-Qt2CB<Controller, Base>::Qt2CB(string const & t)
+Qt2CB<Controller, Base>::Qt2CB(std::string const & t)
: Base(t)
{}
using lyx::support::LibFileSearch;
+using std::string;
+
namespace {
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();
* @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_;
using lyx::support::contains;
+using std::string;
+
// FIXME: set disabled doesn't work properly
FloatPlacement::FloatPlacement(QWidget * parent, char * name)
* Full author contact details are available in file CREDITS.
*/
-#include "support/std_string.h"
-
#include <qwidget.h>
class QCheckBox;
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();
using std::endl;
using std::make_pair;
using std::max;
-
+using std::string;
using std::vector;
#include <qwidget.h>
-#include "support/std_string.h"
+
#include <utility>
#include <vector>
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:
QGridLayout * layout_;
- typedef std::pair<QPushButton *, string> Button;
+ typedef std::pair<QPushButton *, std::string> Button;
std::vector<Button> buttons_;
};
using std::map;
using std::vector;
+using std::string;
extern BufferList bufferlist;
#include <boost/assert.hpp>
+using std::string;
+
PanelStack::PanelStack(QWidget * parent, const char * name)
: QWidget(parent, name)
#ifndef PANELSTACK_H
#define PANELSTACK_H
-#include "support/std_string.h"
-
#include <qwidget.h>
#include <map>
PanelStack(QWidget * parent = 0, const char * name = "panelstack");
/// add a category with no associated panel
- void addCategory(string const & name, string const & parent = string());
+ void addCategory(std::string const & name, std::string const & parent = std::string());
/// add a widget panel with a given name, under the given parent
- void addPanel(QWidget * panel, string const & name, string const & parent = string());
+ void addPanel(QWidget * panel, std::string const & name, std::string const & parent = std::string());
/// set current panel by logical name
- void setCurrentPanel(string const &);
+ void setCurrentPanel(std::string const &);
public slots:
/// set current panel from an item
void switchPanel(QListViewItem * i);
private:
- typedef std::map<string, QListViewItem *> PanelMap;
+ typedef std::map<std::string, QListViewItem *> PanelMap;
PanelMap panel_map_;
using std::pair;
using std::vector;
+using std::string;
namespace {
#include "qfont_loader.h"
#include "language.h"
+using std::string;
+
namespace {
#ifndef QLKEY_H
#define QLKEY_H
-
#include <qnamespace.h>
-#include "support/std_string.h"
+
/**
* Return true if the key event is a modifier.
* Return the numeric Qt Key corresponding to the
* given symbol name.
*/
-int string_to_qkey(string const & str)
+int string_to_qkey(std::string const & str)
{
// FIX! (Lgb)
* Convert the Qt keypress into a string understandable
* by the LyX core (same as XKeysymToString).
*/
-string const qkey_to_string(int lkey)
+std::string const qkey_to_string(int lkey)
{
switch (lkey) {
case Qt::Key_Escape: return "Escape";
#include <algorithm>
using std::make_pair;
-
+using std::string;
using std::pair;
#ifndef QTHELPERS_H
#define QTHELPERS_H
-
-#include "support/std_string.h"
-
#include <utility>
#include "lyxlength.h"
class QLineEdit;
class QString;
-string makeFontName(string const & family, string const & foundry);
+std::string makeFontName(std::string const & family, std::string const & foundry);
-std::pair<string,string> parseFontName(string const & name);
+std::pair<std::string,std::string> parseFontName(std::string const & name);
/// method to get a LyXLength from widgets
-string widgetsToLength(QLineEdit const * input, LengthCombo const * combo);
+std::string widgetsToLength(QLineEdit const * input, LengthCombo const * combo);
/// method to set widgets from a LyXLength
void lengthToWidgets(QLineEdit * input, LengthCombo * combo,
- string const & len, LyXLength::UNIT default_unit);
+ std::string const & len, LyXLength::UNIT default_unit);
/// format a string to the given width
-string const formatted(string const & text, int w = 80);
+std::string const formatted(std::string const & text, int w = 80);
/**
* toqstr - convert char * into unicode
* Use this whenever there's a user-visible string that is encoded
* for the locale (menus, dialogs etc.)
*/
-QString const toqstr(string const & str);
+QString const toqstr(std::string const & str);
/**
*
* Use this in qt2/ instead of qt_()
*/
-QString const qt_(string const & str);
+QString const qt_(std::string const & str);
/**
*
* Return the QString encoded in the locale
*/
-string const fromqstr(QString const & str);
+std::string const fromqstr(QString const & str);
#endif // QTHELPERS_H
using std::min;
using std::max;
+using std::string;
namespace {
#include "lyx_forms.h"
+
using std::make_pair;
using std::pair;
+using std::string;
void warning_pimpl(string const &, string const & message)
using std::istringstream;
using std::ostringstream;
+using std::string;
namespace {
#ifndef COLOR_H
#define COLOR_H
-
-#include "support/std_string.h"
+#include <string>
class LColor_color;
struct RGBColor;
/// returns a string of form #rrggbb, given an RGBColor struct
-string const X11hexname(RGBColor const & col);
+std::string const X11hexname(RGBColor const & col);
struct HSVColor {
double h;
: r(red), g(green), b(blue) {}
RGBColor(HSVColor const &);
/// \param x11hexname is of the form "#ffa071"
- RGBColor(string const & x11hexname);
+ RGBColor(std::string const & x11hexname);
};
struct NamedColor : public RGBColor {
- string name;
+ std::string name;
NamedColor() : RGBColor() {}
- NamedColor(string const & n, RGBColor const & c)
+ NamedColor(std::string const & n, RGBColor const & c)
: RGBColor(c), name(n) {}
RGBColor const & color() const { return *this; }
- string const & getname() const { return name; }
+ std::string const & getname() const { return name; }
};
inline
#endif
using std::endl;
+using std::string;
namespace {
///
std::vector<GC> colorGCcache;
///
- GC getGCForeground(string const & s);
+ GC getGCForeground(std::string const & s);
///
typedef std::map<int, GC> LineGCCache;
///
#include "ams_ops.xbm"
+using std::string;
+
namespace {
using lyx::support::rsplit;
using std::endl;
+using std::string;
FileDialog::FileDialog(string const &t, kb_action s, Button b1, Button b2)
using std::abs;
using std::endl;
+using std::string;
/// Load font close to this size
#ifndef FONTINFO_H
#define FONTINFO_H
-
-#include "support/std_string.h"
-
#include <boost/scoped_array.hpp>
+#include <string>
+
/** This class manages a font.
The idea is to create a FontInfo object with a font name pattern with a
wildcard at the size field. Then this object can host request for font-
FontInfo() { init(); }
///
- explicit FontInfo(string const & pat)
+ explicit FontInfo(std::string const & pat)
: pattern(pat) { init(); }
/// Does any font match our pattern?
}
/// Get existing pattern
- string const & getPattern() const { return pattern; }
+ std::string const & getPattern() const { return pattern; }
/// Set new pattern
- void setPattern(string const & pat);
+ void setPattern(std::string const & pat);
/** Return full name of font close to this size.
If impossible, result is the empty string */
- string const getFontname(int size);
+ std::string const getFontname(int size);
private:
/// Font pattern (with wildcard for size)
- string pattern;
+ std::string pattern;
/// Available size list
boost::scoped_array<int> sizes;
/// Corresponding name list
- boost::scoped_array<string> strings;
+ boost::scoped_array<std::string> strings;
/// Number of matches
int matches;
void query();
/// Build newly sized font string
- string const resize(string const &, int size) const;
+ std::string const resize(std::string const &, int size) const;
};
#endif // FONTINFO_H
using lyx::support::bformat;
using lyx::support::LibFileSearch;
+using std::string;
+
extern "C" {
{
public:
///
- FormBase(string const &, bool allowResize);
+ FormBase(std::string const &, bool allowResize);
///
virtual ~FormBase();
/** Send the warning message from the daughter class to the
message_widget direct. The message will persist till the mouse
movesto a new object. */
- void postWarning(string const & warning);
+ void postWarning(std::string const & warning);
/// Reset the message_widget_
void clearMessage();
/** Get the feedback message for ob.
Called if warning_posted_ == false. */
- virtual string const getFeedback(FL_OBJECT * /* ob */)
- { return string(); }
+ virtual std::string const getFeedback(FL_OBJECT * /* ob */)
+ { return std::string(); }
/// Post the feedback message for ob to message_widget_
- void postMessage(string const & message);
+ void postMessage(std::string const & message);
/** Variable used to decide whether to remove the existing feedback
message or not (if it is in fact a warning) */
{
protected:
///
- FormDB(string const &, bool allowResize=true);
+ FormDB(std::string const &, bool allowResize=true);
/// Pointer to the actual instantiation of xform's form
virtual FL_FORM * form() const;
/// Real GUI implementation.
template <class Dialog>
-FormDB<Dialog>::FormDB(string const & t, bool allowResize)
+FormDB<Dialog>::FormDB(std::string const & t, bool allowResize)
: FormBase(t, allowResize)
{}
protected:
///
- FormCB(string const &, bool allowResize = true);
+ FormCB(std::string const &, bool allowResize = true);
};
template <class Controller, class Base>
-FormCB<Controller, Base>::FormCB(string const & t, bool allowResize)
+FormCB<Controller, Base>::FormCB(std::string const & t, bool allowResize)
: Base(t, allowResize)
{}
using lyx::support::compare;
+using std::string;
+
typedef FormController<ControlCommand, FormView<FD_bibitem> > base_class;
using lyx::support::split;
using std::vector;
+using std::string;
typedef FormController<ControlBibtex, FormView<FD_bibtex> > base_class;
#include "lyx_forms.h"
+using std::string;
+
+
typedef FormController<ControlBranch, FormView<FD_branch> > base_class;
FormBranch::FormBranch(Dialog & parent)
controller().params().branch = type;
}
-
#include "xformsBC.h"
+using std::string;
+
+
FormBrowser::FormBrowser(Dialog & parent,
string const & title, bool allowResize)
: FormView<FD_browser>(parent, title, allowResize)
class FormBrowser : public FormView<FD_browser> {
public:
///
- FormBrowser(Dialog &, string const &, bool allowResize = true);
+ FormBrowser(Dialog &, std::string const &, bool allowResize = true);
private:
/// Build the dialog.
virtual void build();
#include "lyx_forms.h"
+using std::string;
+
+
typedef FormController<ControlChanges, FormView<FD_changes> > base_class;
FormChanges::FormChanges(Dialog & parent)
using lyx::support::getStringFromVector;
using std::vector;
+using std::string;
typedef FormController<ControlCharacter, FormView<FD_character> > base_class;
///
std::vector<LColor_color> color_;
///
- std::vector<string> lang_;
+ std::vector<std::string> lang_;
};
#endif
using std::max;
using std::vector;
+using std::string;
namespace {
void findBiblio(biblio::Direction const dir);
///
- void updateBrowser(FL_OBJECT *, std::vector<string> const &) const;
+ void updateBrowser(FL_OBJECT *, std::vector<std::string> const &) const;
///
void setBibButtons(State) const;
///
void setCiteButtons(State) const;
/// used keys (left panel)
- std::vector<string> citekeys;
+ std::vector<std::string> citekeys;
/// available keys (right panel)
- std::vector<string> bibkeys;
+ std::vector<std::string> bibkeys;
};
#endif // FORMCITATION_H
#include "lyx_forms.h"
+using std::string;
+
+
namespace {
enum GuiColors {
#include "Color.h"
#include "forms_fwd.h"
-#include "support/std_string.h"
#include <boost/scoped_ptr.hpp>
#include <X11/Xlib.h> // for Pixmap
int minh_;
/// The title displayed by the Window Manager.
- string title_;
+ std::string title_;
RGBColor input_color_;
RGBColor color_;
using lyx::support::bformat;
using lyx::support::LibFileSearch;
+using std::string;
+
extern "C" {
class FormDialogView : public Dialog::View {
public:
///
- FormDialogView(Dialog &, string const &, bool allowResize);
+ FormDialogView(Dialog &, std::string const &, bool allowResize);
///
virtual ~FormDialogView();
/** Send the warning message from the daughter class to the
message_widget direct. The message will persist till the mouse
movesto a new object. */
- void postWarning(string const & warning);
+ void postWarning(std::string const & warning);
/// Reset the message_widget_
void clearMessage();
/** Get the feedback message for ob.
Called if warning_posted_ == false. */
- virtual string const getFeedback(FL_OBJECT * /* ob */)
- { return string(); }
+ virtual std::string const getFeedback(FL_OBJECT * /* ob */)
+ { return std::string(); }
/// Post the feedback message for ob to message_widget_
- void postMessage(string const & message);
+ void postMessage(std::string const & message);
/** Variable used to decide whether to remove the existing feedback
message or not (if it is in fact a warning) */
class FormView: public FormDialogView {
protected:
///
- FormView(Dialog &, string const &, bool allowResize=true);
+ FormView(Dialog &, std::string const &, bool allowResize=true);
/// Pointer to the actual instantiation of xform's form
virtual FL_FORM * form() const;
/// Real GUI implementation.
template <class FL_dialog>
-FormView<FL_dialog>::FormView(Dialog & parent, string const & t,
+FormView<FL_dialog>::FormView(Dialog & parent, std::string const & t,
bool allowResize)
: FormDialogView(parent, t, allowResize)
{}
protected:
///
- FormController(Dialog &, string const &, bool allowResize = true);
+ FormController(Dialog &, std::string const &, bool allowResize = true);
};
template <class Controller, class Base>
FormController<Controller, Base>::FormController(Dialog & p,
- string const & t, bool resize)
+ std::string const & t, bool resize)
: Base(p, t, resize)
{}
using std::bind2nd;
using std::endl;
-
+using std::string;
using std::vector;
///
FL_OBJECT * fbullet;
///
- std::vector<string> lang_;
+ std::vector<std::string> lang_;
/// Contains all legal branches for this doc
BranchList branchlist_;
};
using lyx::support::getStringFromVector;
using lyx::support::strToInt;
+using std::string;
+
typedef FormController<ControlExternal, FormView<FD_external> > base_class;
using std::max;
using std::sort;
-
+using std::string;
using std::map;
#ifndef FORMFILEDIALOG_H
#define FORMFILEDIALOG_H
-
-
-#include "support/std_string.h"
-
#include "forms_fwd.h"
#include "frontends/FileDialog.h"
class DirEntry {
public:
///
- string name_;
+ std::string name_;
///
- string displayed_;
+ std::string displayed_;
///
- string ls_entry_;
+ std::string ls_entry_;
};
~Private();
/// sets file selector user button action
- void SetButton(int iIndex, string const & pszName = string(),
- string const & pszPath = string());
+ void SetButton(int iIndex, std::string const & pszName = std::string(),
+ std::string const & pszPath = std::string());
/// gets last dialog directory
- string const GetDirectory() const;
+ std::string const GetDirectory() const;
/// launches dialog and returns selected file
- string const Select(string const & pszTitle = string(),
- string const & pszPath = string(),
- string const & pszMask = string(),
- string const & pszSuggested = string());
+ std::string const Select(std::string const & pszTitle = std::string(),
+ std::string const & pszPath = std::string(),
+ std::string const & pszMask = std::string(),
+ std::string const & pszSuggested = std::string());
/// launches dialog and returns selected directory
- string const SelectDir(string const & pszTitle = string(),
- string const & pszPath = string(),
- string const & pszSuggested = string());
+ std::string const SelectDir(std::string const & pszTitle = std::string(),
+ std::string const & pszPath = std::string(),
+ std::string const & pszSuggested = std::string());
/// XForms objects callback (static)
static void FileDlgCB(FL_OBJECT *, long);
/// Callback for double click in list
///
static int minh_;
///
- string user_path1_;
+ std::string user_path1_;
///
- string user_path2_;
+ std::string user_path2_;
///
- string directory_;
+ std::string directory_;
///
- string mask_;
+ std::string mask_;
///
- string file_name_;
+ std::string file_name_;
///
int depth_;
///
///
long last_time_;
///
- string info_line_;
+ std::string info_line_;
///
typedef std::vector<DirEntry> DirEntries;
///
/// updates dialog list to match class directory
void Reread();
/// sets dialog current directory
- void SetDirectory(string const & pszPath);
+ void SetDirectory(std::string const & pszPath);
/// sets dialog file mask
- void SetMask(string const & pszNewMask);
+ void SetMask(std::string const & pszNewMask);
/// sets dialog information line
- void SetInfoLine(string const & pszLine);
+ void SetInfoLine(std::string const & pszLine);
/// handle dialog during file selection
bool RunDialog();
/// Handle callback from list
using lyx::support::contains;
+using std::string;
+
namespace {
using std::find;
using std::find_if;
-
+using std::string;
using std::vector;
using std::endl;
using std::vector;
+using std::string;
namespace {
/// Update dialog before/whilst showing it.
virtual void update();
/// Update the BoundingBox info.
- void updateBB(string const & filename, string const & bb_inset);
+ void updateBB(std::string const & filename, std::string const & bb_inset);
/// Filter the inputs on callback from xforms
virtual ButtonPolicy::SMInput input(FL_OBJECT *, long);
boost::scoped_ptr<FD_graphics_extra> extra_;
/// Store the LaTeX names for the rotation origins.
- std::vector<string> origins_;
+ std::vector<std::string> origins_;
};
#endif // FORMGRAPHICS_H
using lyx::support::rtrim;
+using std::string;
+
typedef FormController<ControlInclude, FormView<FD_include> > base_class;
#include "lyx_forms.h"
+using std::string;
+
+
FormLog::FormLog(Dialog & parent)
: FormController<ControlLog, FormBrowser>(parent, _("LaTeX Log"))
{}
using std::max;
using std::vector;
+using std::string;
extern "C" void C_FormDialogView_CancelCB(FL_OBJECT *, long);
: public FormController<ControlMath, FormView<FD_maths_bitmap> > {
public:
///
- FormMathsBitmap(Dialog &, string const &, std::vector<string> const &);
+ FormMathsBitmap(Dialog &, std::string const &, std::vector<std::string> const &);
///
void addBitmap(BitmapStore const &);
FL_OBJECT * buildBitmap(BitmapStore const & bmstore);
/// The latex names associated with each symbol
- std::vector<string> latex_;
+ std::vector<std::string> latex_;
/// The latex name chosen
- string latex_chosen_;
+ std::string latex_chosen_;
/** Temporary store for bitmap data passed to addBitmap()
* but before the FL_OBJECT is created in build().
using lyx::support::isStrDbl;
using lyx::support::subst;
+using std::string;
+
typedef FormController<ControlMinipage, FormView<FD_minipage> > base_class;
#include "lyx_forms.h"
+using std::string;
+
+
typedef FormController<ControlNote, FormView<FD_note> > base_class;
FormNote::FormNote(Dialog & parent)
int i = fl_get_choice(dialog_->choice_type);
controller().params().type = ids_[i - 1];
}
-
/// Update dialog before showing it
virtual void update();
///
- std::vector<string> ids_;
+ std::vector<std::string> ids_;
///
- std::vector<string> gui_names_;
+ std::vector<std::string> gui_names_;
};
#endif // FORMNOTE_H
using std::remove_if;
using std::vector;
+using std::string;
namespace
using std::pair;
using std::vector;
+using std::string;
namespace {
/// Build the dialog
virtual void build();
/// control which feedback message is output
- string const getFeedback(FL_OBJECT *);
+ std::string const getFeedback(FL_OBJECT *);
/// Converters tabfolder
boost::scoped_ptr<FD_preferences_inner_tab> converters_tab_;
///
void build();
///
- string const feedback(FL_OBJECT const * const) const;
+ std::string const feedback(FL_OBJECT const * const) const;
///
void input(FL_OBJECT const * const);
///
///
void build();
///
- string const feedback(FL_OBJECT const * const) const;
+ std::string const feedback(FL_OBJECT const * const) const;
///
bool input(FL_OBJECT const * const);
///
///
bool Input();
///
- string const GetFrom() const;
+ std::string const GetFrom() const;
///
- string const GetTo() const;
+ std::string const GetTo() const;
///
FormPreferences & parent_;
///
void build();
///
- string const feedback(FL_OBJECT const * const) const;
+ std::string const feedback(FL_OBJECT const * const) const;
///
bool input(FL_OBJECT const * const);
///
///
void build();
///
- string const feedback(FL_OBJECT const * const) const;
+ std::string const feedback(FL_OBJECT const * const) const;
///
void update(LyXRC const & rc);
///
void build();
///
- string const feedback(FL_OBJECT const * const) const;
+ std::string const feedback(FL_OBJECT const * const) const;
///
bool input(FL_OBJECT const * const);
///
///
void build();
///
- string const feedback(FL_OBJECT const * const) const;
+ std::string const feedback(FL_OBJECT const * const) const;
///
bool input(FL_OBJECT const * const);
///
///
boost::scoped_ptr<FD_preferences_language> dialog_;
///
- std::vector<string> lang_;
+ std::vector<std::string> lang_;
};
///
friend class Language;
///
void build();
///
- string const feedback(FL_OBJECT const * const) const;
+ std::string const feedback(FL_OBJECT const * const) const;
///
void update(LyXRC const & rc);
///
void build();
///
- string const feedback(FL_OBJECT const * const) const;
+ std::string const feedback(FL_OBJECT const * const) const;
///
void update(LyXRC const & rc);
///
void build();
///
- string const feedback(FL_OBJECT const * const) const;
+ std::string const feedback(FL_OBJECT const * const) const;
///
void update(LyXRC const & rc);
///
void build();
///
- string const feedback(FL_OBJECT const * const) const;
+ std::string const feedback(FL_OBJECT const * const) const;
///
bool input(FL_OBJECT const * const);
///
///
void build();
///
- string const feedback(FL_OBJECT const * const) const;
+ std::string const feedback(FL_OBJECT const * const) const;
///
void update(LyXRC const & rc);
///
void build();
///
- string const feedback(FL_OBJECT const * const) const;
+ std::string const feedback(FL_OBJECT const * const) const;
///
bool input();
///
///
void build();
///
- string const feedback(FL_OBJECT const * const) const;
+ std::string const feedback(FL_OBJECT const * const) const;
///
bool input(FL_OBJECT const * const);
///
using lyx::support::strToInt;
+using std::string;
+
typedef FormCB<ControlPrint, FormDB<FD_print> > base_class;
using std::find;
using std::max;
using std::sort;
-
+using std::string;
using std::vector;
virtual void update();
///
- void updateBrowser(std::vector<string> const &) const;
+ void updateBrowser(std::vector<std::string> const &) const;
///
void switch_go_button();
///
bool at_ref_;
///
- std::vector<string> refs_;
+ std::vector<std::string> refs_;
};
#endif // FORMREF_H
#include "lyx_forms.h"
+using std::string;
+
+
typedef FormCB<ControlSearch, FormDB<FD_search> > base_class;
FormSearch::FormSearch()
using lyx::support::trim;
using std::vector;
+using std::string;
typedef FormCB<ControlSendto, FormDB<FD_sendto> > base_class;
#include "lyx_forms.h"
+using std::string;
+
+
FormShowFile::FormShowFile(Dialog & parent)
: FormController<ControlShowFile, FormBrowser>(parent, _("Show File"))
{}
#include "lyx_forms.h"
+using std::string;
+
+
typedef FormCB<ControlSpellchecker, FormDB<FD_spellchecker> > base_class;
FormSpellchecker::FormSpellchecker()
using lyx::support::isStrDbl;
using std::bind2nd;
-
+using std::string;
using std::vector;
virtual ButtonPolicy::SMInput input(FL_OBJECT *, long);
///
- virtual int checkLongtableOptions(FL_OBJECT *, string &);
+ virtual int checkLongtableOptions(FL_OBJECT *, std::string &);
///
boost::scoped_ptr<FD_tabular_options> tabular_options_;
#include "lyx_forms.h"
using std::make_pair;
+using std::string;
typedef FormController<ControlTabularCreate, FormView<FD_tabular_create> > base_class;
using lyx::support::OnlyFilename;
+using std::string;
+
typedef FormController<ControlTexinfo, FormView<FD_texinfo> > base_class;
ControlTexinfo::texFileSuffix activeStyle;
///
- typedef std::vector<string> ContentsType;
+ typedef std::vector<std::string> ContentsType;
std::map<ControlTexinfo::texFileSuffix, ContentsType> texdata_;
};
using lyx::support::trim;
+using std::string;
+
typedef FormController<ControlCommand, FormView<FD_text> > base_class;
class FormText : public FormController<ControlCommand, FormView<FD_text> > {
public:
///
- FormText(Dialog &, string const & title, string const & label);
+ FormText(Dialog &, std::string const & title, std::string const & label);
private:
/// Set the Params variable for the Controller.
virtual void apply();
virtual void update();
///
- string const label_;
+ std::string const label_;
};
#endif // FORMTEXT_H
#endif
using std::vector;
+using std::string;
typedef FormController<ControlThesaurus, FormView<FD_thesaurus> > base_class;
#ifndef FORMTHESAURUS_H
#define FORMTHESAURUS_H
-
#include "FormDialogView.h"
-
class ControlThesaurus;
struct FD_thesaurus;
virtual void update();
/// set the replace word properly
- void setReplace(string const & templ, string const & nstr);
+ void setReplace(std::string const & templ, std::string const & nstr);
/// update browser entries
- void updateMeanings(string const & str);
+ void updateMeanings(std::string const & str);
/// Filter the inputs
virtual ButtonPolicy::SMInput input(FL_OBJECT *, long);
int clickline_;
/// current string
- string str_;
+ std::string str_;
};
#endif // FORMTHESAURUS_H
using lyx::support::getStringFromVector;
using std::vector;
+using std::string;
typedef FormController<ControlToc, FormView<FD_toc> > base_class;
using lyx::support::getStringFromVector;
using lyx::support::subst;
+using std::string;
+
typedef FormController<ControlWrap, FormView<FD_wrap> > base_class;
using lyx::support::trim;
+using std::string;
+
bool Tooltips::enabled_ = true;
#ifndef TOOLTIPS_H
#define TOOLTIPS_H
-#include "support/std_string.h"
-
#include <boost/signals/signal0.hpp>
#include <boost/signals/trackable.hpp>
Tooltips();
/// Initialise a tooltip for this ob.
- void init(FL_OBJECT * ob, string const & tip);
+ void init(FL_OBJECT * ob, std::string const & tip);
/// Are the tooltips on or off?
static bool enabled() { return enabled_; }
static boost::signal0<void> toggled;
/// The tooltips are stored so that they can be turned on and off.
- typedef std::map<FL_OBJECT *, string> TooltipsMap;
+ typedef std::map<FL_OBJECT *, std::string> TooltipsMap;
TooltipsMap tooltipsMap;
};
using std::endl;
using std::for_each;
-
+using std::string;
using std::vector;
#include "forms_fwd.h"
#include <X11/X.h> // Window
-#include "support/std_string.h"
#include <vector>
void update();
/// Opens a top-level submenu given its name
- void openByName(string const &);
+ void openByName(std::string const &);
///
static void MenuCallback(FL_OBJECT *, long);
private:
///
- void add_toc(int menu, string const & extra_label,
+ void add_toc(int menu, std::string const & extra_label,
std::vector<int> & smn, Window win);
///
- void add_references(int menu, string const & extra_label,
+ void add_references(int menu, std::string const & extra_label,
std::vector<int> & smn, Window win);
///
int create_submenu(Window win, XFormsView * view,
#include "combox.h"
using std::endl;
+using std::string;
// some constants
void add(ToolbarBackend::Toolbar const & tb);
/// add an item to a toolbar
- void add(FuncRequest const &, string const & tooltip);
+ void add(FuncRequest const &, std::string const & tooltip);
/// display toolbar, not implemented
void displayToolbar(ToolbarBackend::Toolbar const & tb, bool show);
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
using std::abs;
using std::endl;
+using std::string;
//extern void AutoSave(BufferView *);
* @param xpos requested y position (or 0)
* @param title window title
*/
- void show(int xpos, int ypos, string const & t = string("LyX"));
+ void show(int xpos, int ypos, std::string const & t = std::string("LyX"));
/// get the xforms main form
FL_FORM * getForm() const;
static int atCloseMainFormCB(FL_FORM *, void *);
/// display a status message
- virtual void message(string const & str);
+ virtual void message(std::string const & str);
/// clear back to normal status message
virtual void clearMessage();
* @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);
/// update the minibuffer state message
void show_view_state();
#include <X11/keysym.h>
using std::endl;
+using std::string;
XLyXKeySym::XLyXKeySym()
#ifndef XLYXKEYSYM_H
#define XLYXKEYSYM_H
-
-#include "support/std_string.h"
#include <X11/Xlib.h>
#include "frontends/LyXKeySym.h"
/// X11 specific initialization with an X11 KeySym
void initFromKeySym(KeySym);
- virtual void init(string const & symbolname);
+ virtual void init(std::string const & symbolname);
virtual ~XLyXKeySym() {}
/// Is this a modifier key only?
virtual bool isModifier() const;
- virtual string getSymbolName() const;
+ virtual std::string getSymbolName() const;
/**
* 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;
+ virtual char getISOEncoded(std::string const & encoding) const;
///
unsigned int keysym() const {
#include <boost/bind.hpp>
+
using std::vector;
+using std::string;
namespace {
#include "lyx_forms.h"
-#include "support/std_string.h"
#include <boost/scoped_ptr.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/signals/connection.hpp>
int peek_event(FL_OBJECT *, int, int, XEvent * xev);
/// show a message
- void message(string const & str);
+ void message(std::string const & str);
/// focus the buffer for editing mode
void focus() { messageMode(false); }
void idle_timeout();
/// set the minibuffer content in editing mode
- void set_input(string const &);
+ void set_input(std::string const &);
/// go into message mode
void messageMode(bool on = true);
/// show a temporary message whilst in edit mode
- void show_info(string const & info, string const & input, bool append = true);
+ void show_info(std::string const & info, std::string const & input, bool append = true);
/// the dropdown menu
boost::shared_ptr<FL_FREEBROWSER> freebrowser_;
ControlCommandBuffer & controller_;
/// stored input when showing info
- string stored_input_;
+ std::string stored_input_;
/// are we showing an informational temporary message ?
bool info_shown_;
using lyx::support::uppercase;
+using std::string;
+
XPainter::XPainter(XWorkArea & xwa)
: Painter(), owner_(xwa)
#define XPAINTER_H
#include "frontends/Painter.h"
-#include "support/std_string.h"
#include <X11/Xlib.h>
/// 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
using std::dec;
using std::endl;
using std::hex;
+using std::string;
namespace {
#ifndef XWORKAREA_H
#define XWORKAREA_H
-
#include "frontends/WorkArea.h"
#include "XPainter.h"
#include "lyx_forms.h"
+
///
class XWorkArea : public WorkArea {
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;
/// handles SelectionRequest X Event, to fill the clipboard
int event_cb(XEvent * xev);
using lyx::support::isStrDbl;
+using std::string;
+
void addCheckedLyXLength(BCView & bcview,
FL_OBJECT * input, FL_OBJECT * label)
echo "#include \"forms_gettext.h\"" >> ${TMP}
echo "#include \"gettext.h\"" >> ${TMP}
echo "#include \"../lyx_forms.h\"" >> ${TMP}
-
grep bmtable ${CIN} > /dev/null &&
echo "#include \"bmtable.h\"" >> ${TMP}
grep combox ${CIN} > /dev/null &&
echo "#include \"combox.h\"" >> ${TMP}
+echo "using std::string;" >> ${TMP}
sed -f ${FDFIXC} < ${CIN} >> ${TMP}
namespace support = lyx::support;
+using std::string;
+
// Extract shortcut from "<identifier>|<shortcut>" string
string const scex(string const & str)
#ifndef FORMS_GETTEXT_H
#define FORMS_GETTEXT_H
-
-#include "support/std_string.h"
+#include <string>
/// Extract shortcut from "<identifer>|<shortcut>" string
-string const scex(string const &);
+std::string const scex(std::string const &);
/// Extract identifier from "<identifer>|<shortcut>" string
-string const idex(string const &);
+std::string const idex(std::string const &);
#endif // FORMS_GETTEXT_H
using std::setw;
using std::ostringstream;
using std::vector;
+using std::string;
extern BufferList bufferlist;
using lyx::support::Systemcall;
using std::endl;
+using std::string;
// The global fontloader
using lyx::support::uppercase;
+using std::string;
+
namespace {
#include "lyx_forms.h"
+using std::string;
+
+
xformsBC::xformsBC(ButtonController const & parent,
string const & cancel, string const & close)
: GuiBC<FL_OBJECT, FL_OBJECT>(parent, cancel, close)
public:
///
xformsBC(ButtonController const &,
- string const & = _("Cancel"), string const & = _("Close"));
+ std::string const & = _("Cancel"), std::string const & = _("Close"));
private:
/// Updates the button sensitivity (enabled/disabled)
void setWidgetEnabled(FL_OBJECT *, bool enabled) const;
/// Set the label on the button
- void setButtonLabel(FL_OBJECT *, string const & label) const;
+ void setButtonLabel(FL_OBJECT *, std::string const & label) const;
};
#endif // XFORMSBC_H
#include <boost/tuple/tuple.hpp>
+
using lyx::support::float_equal;
using lyx::support::prefixIs;
using lyx::support::rtrim;
using std::find_if;
+using std::string;
namespace {
Pixmap getPixmap() const;
/// Internal callbacks.
- void statusCB(string const &);
- void errorCB(string const &);
+ void statusCB(std::string const &);
+ void errorCB(std::string const &);
private:
/// Create a copy
* 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).
* Uses the params to decide on color, grayscale etc.
using std::ofstream;
using std::vector;
+using std::string;
bool isActive(FL_OBJECT * ob)
#include "forms_fwd.h"
#include "Color.h"
-#include "support/std_string.h"
#include <algorithm>
#include <vector>
class LyXLength;
/// parse "&Save" etc. to <"Save", "#S">. Does not handle &&
-std::pair<string, string> parse_shortcut(string const & str);
+std::pair<std::string, std::string> parse_shortcut(std::string const & str);
// A wrapper for the xforms routine, but this one accepts uint args
unsigned long fl_getmcolor(int i, unsigned int * r, unsigned int * g,
unsigned int * b);
// what we always need for lengths
-string const choice_Length_All =
+std::string const choice_Length_All =
"cm|mm|in|text%%|col%%|page%%|line%%|ex|em|pt|sp|bp|dd|pc|cc|mu";
-string const choice_Length_WithUnit =
+std::string const choice_Length_WithUnit =
"cm|mm|in|ex|em|pt|sp|bp|dd|pc|cc|mu"; // all with a Unit
/// return the (in)active state of the object
/// Set an FL_OBJECT to activated or deactivated
void setEnabled(FL_OBJECT *, bool enable);
-/// Take a string and add breaks so that it fits into a desired label width, w
-string formatted(string const &label, int w,
+/// Take a std::string and add breaks so that it fits into a desired label width, w
+std::string formatted(std::string const &label, int w,
int = 12 /*FL_NORMAL_SIZE*/, int = 0 /*FL_NORMAL_STYLE*/);
/// Given an fl_choice or an fl_browser, create a vector of its entries
-std::vector<string> const getVector(FL_OBJECT *);
+std::vector<std::string> const getVector(FL_OBJECT *);
/** Given an fl_input, an fl_choice or an fl_browser, return an entry
\c num is the position for the string, where 0 means "current item"
*/
-string const getString(FL_OBJECT * ob, int num = 0);
+std::string const getString(FL_OBJECT * ob, int num = 0);
-/// Given input and choice widgets, create a string such as "1cm"
-string getLengthFromWidgets(FL_OBJECT * input, FL_OBJECT * choice);
+/// Given input and choice widgets, create a std::string such as "1cm"
+std::string getLengthFromWidgets(FL_OBJECT * input, FL_OBJECT * choice);
/** Given a string such as "1cm", set the input and choice widgets.
If the string is empty, the choice will be set to default_unit.
*/
void updateWidgetsFromLengthString(FL_OBJECT * input, FL_OBJECT * choice,
- string const & str,
- string const & default_unit);
+ std::string const & str,
+ std::string const & default_unit);
/** Given a LyXLength, set the input and choice widgets.
If the length is null, the choice will be set to default_unit.
*/
void updateWidgetsFromLength(FL_OBJECT * input, FL_OBJECT * choice,
LyXLength const & len,
- string const & default_unit);
+ std::string const & default_unit);
/** Return the position of val in the vector if found.
struct XformsColor : public NamedColor {
int colorID;
XformsColor() : NamedColor(), colorID(0) {}
- static bool read(string const &);
- static bool write(string const &);
+ static bool read(std::string const &);
+ static bool write(std::string const &);
};
class RWInfo {
public:
///
- static bool WriteableDir(string const & dir);
+ static bool WriteableDir(std::string const & dir);
///
- static bool ReadableDir(string const & dir);
+ static bool ReadableDir(std::string const & dir);
///
- static bool WriteableFile(string const & file);
+ static bool WriteableFile(std::string const & file);
///
- static bool ReadableFile(string const & file);
+ static bool ReadableFile(std::string const & file);
///
- static string const & ErrorMessage() { return error_message; }
+ static std::string const & ErrorMessage() { return error_message; }
private:
///
- static string error_message;
+ static std::string error_message;
};
#endif // XFORMSHELPERS_H
using std::istringstream;
using std::vector;
+using std::string;
FuncRequest::FuncRequest()
#include "lfuns.h"
#include "frontends/mouse_state.h"
-#include "support/std_string.h"
+
+#include <string>
class BufferView;
/// actions without extra argument
FuncRequest(kb_action act, int x, int y, mouse_button::state button);
/// actions with extra argument
- FuncRequest(kb_action act, string const & arg);
+ FuncRequest(kb_action act, std::string const & arg);
/// actions without extra argument
FuncRequest(BufferView * bv, kb_action act);
/// actions with extra argument
- FuncRequest(BufferView * bv, kb_action act, string const & arg);
+ FuncRequest(BufferView * bv, kb_action act, std::string const & arg);
/// for mouse events
FuncRequest(BufferView * bv, kb_action act,
int x, int y, mouse_button::state button);
/// for changing requests a bit
- FuncRequest(FuncRequest const & cmd, string const & arg);
+ FuncRequest(FuncRequest const & cmd, std::string const & arg);
/// for changing requests a bit
FuncRequest(FuncRequest const & cmd, BufferView * bv);
mouse_button::state button() const;
/// output a message
- void message(string const & msg) const;
+ void message(std::string const & msg) const;
/// output an error message
- void errorMessage(string const & msg) const;
+ void errorMessage(std::string const & msg) const;
- /// argument parsing, extract argument i as string
- string getArg(unsigned int i) const;
+ /// argument parsing, extract argument i as std::string
+ std::string getArg(unsigned int i) const;
private:
/// the BufferView we are talking to
public: // should be private, too...
/// the action
kb_action action;
- /// the action's string argument
- string argument;
+ /// the action's std::string argument
+ std::string argument;
/// the x coordinate of a mouse press
int x;
/// the y coordinate of a mouse press
# include <locale.h>
#endif
+using std::string;
+
+
namespace {
Messages & getLyXMessages()
#ifndef GETTEXT_H
#define GETTEXT_H
+#include <string>
+
/*
* Native Language Support
*
* Panic/fatal (that should not happen) messages need not be translated
*/
-#include "support/std_string.h"
//#ifdef ENABLE_NLS
///
-string const _(string const &);
+std::string const _(std::string const &);
//#else // ENABLE_NLS
namespace support = lyx::support;
+using std::string;
+
namespace lyx {
namespace graphics {
#ifndef GRAPHICSCACHE_H
#define GRAPHICSCACHE_H
-#include "support/std_string.h"
-#include <vector>
#include <boost/utility.hpp>
#include <boost/scoped_ptr.hpp>
#include <boost/shared_ptr.hpp>
+#include <vector>
+
namespace lyx {
namespace graphics {
* Other formats can be loaded if a converter to a loadable format
* can be defined.
*/
- std::vector<string> loadableFormats() const;
+ std::vector<std::string> loadableFormats() const;
/// Add a graphics file to the cache.
- void add(string const & file) const;
+ void add(std::string const & file) const;
/// Remove a file from the cache.
- void remove(string const & file) const;
+ void remove(std::string const & file) const;
/// Returns \c true if the file is in the cache.
- bool inCache(string const & file) const;
+ bool inCache(std::string const & file) const;
/** Get the cache item associated with file.
* Returns an empty container if there is no such item.
*/
typedef boost::shared_ptr<CacheItem> ItemPtr;
///
- ItemPtr const item(string const & file) const;
+ ItemPtr const item(std::string const & file) const;
private:
/** Make the c-tor, d-tor private so we can control how many objects
#include <boost/bind.hpp>
+
namespace support = lyx::support;
using support::ChangeExtension;
using support::zippedFile;
using std::endl;
+using std::string;
+
namespace lyx {
namespace graphics {
#include <boost/scoped_ptr.hpp>
#include <boost/signals/signal0.hpp>
-#include "support/std_string.h"
class InsetGraphics;
class CacheItem : boost::noncopyable {
public:
///
- CacheItem(string const & file);
+ CacheItem(std::string const & file);
/// Define an empty d-tor out-of-line to keep boost::scoped_ptr happy.
~CacheItem();
///
- string const & filename() const;
+ std::string const & filename() const;
/// It's in the cache. Now start the loading process.
void startLoading() const;
using std::endl;
using std::ostream;
using std::ostringstream;
+using std::string;
namespace lyx {
#ifndef GRAPHICSCONVERTER_H
#define GRAPHICSCONVERTER_H
-#include "support/std_string.h"
#include <boost/signals/signal1.hpp>
#include <boost/scoped_ptr.hpp>
#include <boost/utility.hpp>
class Converter : boost::noncopyable {
public:
/// Can the conversion be performed?
- static bool isReachable(string const & from_format_name,
- string const & to_format_name);
+ static bool isReachable(std::string const & from_format_name,
+ std::string const & to_format_name);
/** One Converter per conversion ensures that the (hidden) signal
* is always connected to the expected slot.
*/
- Converter(string const & from_file, string const & to_file_base,
- string const & from_format, string const & to_format);
+ Converter(std::string const & from_file, std::string const & to_file_base,
+ std::string const & from_format, std::string const & to_format);
/// Define an empty d-tor out-of-line to keep boost::scoped_ptr happy.
~Converter();
* If conversion fails or has not been completed, however, it
* returns an empty string.
*/
- string const & convertedFile() const;
+ std::string const & convertedFile() const;
private:
/// Use the Pimpl idiom to hide the internals.
#ifndef GRAPHICSIMAGE_H
#define GRAPHICSIMAGE_H
-#include "support/std_string.h"
-
#include <boost/shared_ptr.hpp>
#include <boost/function/function0.hpp>
#include <boost/signals/signal1.hpp>
static boost::function0<ImagePtr> newImage;
/// Return the list of loadable formats.
- typedef std::vector<string> FormatList;
+ typedef std::vector<std::string> FormatList;
///
static boost::function0<FormatList> loadableFormats;
* The caller should expect this process to be asynchronous and
* so should connect to the "finished" signal above.
*/
- void load(string const & filename);
+ void load(std::string const & filename);
/** Generate the pixmap.
* Uses the params to decide on color, grayscale etc.
* The caller should expect this process to be asynchronous and
* so should connect to the "finished" signal above.
*/
- virtual void load_impl(string const & filename) = 0;
+ virtual void load_impl(std::string const & filename) = 0;
/** Generate the pixmap.
* Uses the params to decide on color, grayscale etc.
inline
-void Image::load(string const & filename)
+void Image::load(std::string const & filename)
{
return load_impl(filename);
}
#include <boost/bind.hpp>
+using std::string;
+
+
namespace lyx {
namespace graphics {
#define GRAPHICSLOADER_H
#include "GraphicsTypes.h"
-#include "support/std_string.h"
#include <boost/signals/signal0.hpp>
#include <boost/scoped_ptr.hpp>
/// Must use the reset methods to make this instance usable.
Loader();
/// The image is not transformed, just displayed as-is.
- Loader(string const & file_with_path, DisplayType = ColorDisplay);
+ Loader(std::string const & file_with_path, DisplayType = ColorDisplay);
/// The image is transformed before display.
- Loader(string const & file_with_path, Params const &);
+ Loader(std::string const & file_with_path, Params const &);
///
Loader(Loader const &);
Loader & operator=(Loader const &);
/// The file can be changed, or the display params, or both.
- void reset(string const & file_with_path,
+ void reset(std::string const & file_with_path,
DisplayType = ColorDisplay) const;
///
- void reset(string const & file_with_path, Params const &) const;
+ void reset(std::string const & file_with_path, Params const &) const;
///
void reset(Params const &) const;
/// Returns the absolute path of the loaded (loading?) file.
- string const & filename() const;
+ std::string const & filename() const;
///
bool empty() const { return filename().empty(); }
#include "support/std_sstream.h"
+
+using std::string;
using std::abs;
#define GRAPHICSPARAMS_H
#include "GraphicsTypes.h"
-#include "support/std_string.h"
+
+#include <string>
#include <iosfwd>
///
BoundingBox();
///
- BoundingBox(string const &);
+ BoundingBox(std::string const &);
/// 0 0 0 0 is empty!
bool empty() const;
unsigned int scale;
/// The image filename.
- string filename;
+ std::string filename;
/** Note that the BoundingBox is always relative to the BoundingBox
* as stored in the EPS file.
#include "graphics/GraphicsTypes.h"
#include "support/translator.h"
-#include "support/std_string.h"
+
+using std::string;
+
namespace lyx {
namespace graphics {
namespace support = lyx::support;
+using std::string;
+
namespace lyx {
namespace graphics {
#ifndef PREVIEWIMAGE_H
#define PREVIEWIMAGE_H
-#include "support/std_string.h"
#include <boost/scoped_ptr.hpp>
class InsetOld;
* descent = height * (1 - ascent_frac)
*/
PreviewImage(PreviewLoader & parent,
- string const & latex_snippet,
- string const & bitmap_file,
+ std::string const & latex_snippet,
+ std::string const & bitmap_file,
double ascent_frac);
///
~PreviewImage();
///
- string const & snippet() const;
+ std::string const & snippet() const;
///
int ascent() const;
///
using std::ostringstream;
using std::pair;
using std::vector;
+using std::string;
namespace {
#ifndef PREVIEWLOADER_H
#define PREVIEWLOADER_H
-#include "support/std_string.h"
#include <boost/utility.hpp>
#include <boost/scoped_ptr.hpp>
#include <boost/signals/signal1.hpp>
/** Is there an image already associated with this snippet of LaTeX?
* If so, returns a pointer to it, else returns 0.
*/
- PreviewImage const * preview(string const & latex_snippet) const;
+ PreviewImage const * preview(std::string const & latex_snippet) const;
///
enum Status {
};
/// How far have we got in loading the image?
- Status status(string const & latex_snippet) const;
+ Status status(std::string const & latex_snippet) const;
/// Add a snippet of LaTeX to the queue for processing.
- void add(string const & latex_snippet) const;
+ void add(std::string const & latex_snippet) const;
/// Remove this snippet of LaTeX from the PreviewLoader.
- void remove(string const & latex_snippet) const;
+ void remove(std::string const & latex_snippet) const;
/** We have accumulated several latex snippets with status "InQueue".
* Initiate their transformation into bitmap images.
#ifndef PREVIEWEDINSET_H
#define PREVIEWEDINSET_H
-#include "support/std_string.h"
#include <boost/signals/trackable.hpp>
#include <boost/signals/connection.hpp>
/// Does the owning inset want a preview?
virtual bool previewWanted(Buffer const &) const = 0;
/// a wrapper to Inset::latex
- virtual string const latexString(Buffer const &) const = 0;
+ virtual std::string const latexString(Buffer const &) const = 0;
///
InsetOld & inset_;
///
- string snippet_;
+ std::string snippet_;
/// We don't own this. Cached for efficiency reasons.
mutable PreviewImage const * pimage_;
using lyx::support::MakeDisplayPath;
using std::find;
-
+using std::string;
using std::vector;
#define IMPORTER_H
#include <vector>
-#include "support/std_string.h"
+
class LyXView;
class Format;
public:
///
static
- bool Import(LyXView * lv, string const & filename,
- string const & format);
+ bool Import(LyXView * lv, std::string const & filename,
+ std::string const & format);
///
static
private:
///
static
- std::vector<string> const Loaders();
+ std::vector<std::string> const Loaders();
};
#endif
using std::endl;
using std::for_each;
+using std::string;
using std::ostream;
using std::vector;
#include <boost/function.hpp>
#include <boost/utility.hpp>
-#include "support/std_string.h"
+
#include <iosfwd>
#include <map>
#include <vector>
void dumpFormats(std::ostream &) const;
/// What is the name of this template in the LyX format?
- string lyxName;
+ std::string lyxName;
/// What will the button in the GUI say?
- string guiName;
+ std::string guiName;
/// A short help text
- string helpText;
+ std::string helpText;
/** The format of the input file. Can be "*", in which case we try and
* ascertain the format from the contents of the file.
*/
- string inputFormat;
+ std::string inputFormat;
/// A file extension regular expression for the file browser
- string fileRegExp;
+ std::string fileRegExp;
/// What command should be executed to edit the file?
- string editCommand;
+ std::string editCommand;
/// Should we do automatic production of the output?
bool automaticProduction;
void readFormat(LyXLex &);
/// The text that should be inserted into the exported file
- string product;
+ std::string product;
/// The filename of the resulting file
- string updateResult;
+ std::string updateResult;
/// The format of this file.
- string updateFormat;
+ std::string updateFormat;
/// What features does this external inset require?
- string requirement;
+ std::string requirement;
/// A collection of preamble snippets identified by name.
- std::vector<string> preambleNames;
+ std::vector<std::string> preambleNames;
};
///
- typedef std::map<string, Format> Formats;
+ typedef std::map<std::string, Format> Formats;
///
Formats formats;
};
class TemplateManager : boost::noncopyable {
public:
/// Map from the LyX name of the template to the template structure
- typedef std::map<string, Template> Templates;
+ typedef std::map<std::string, Template> Templates;
/** Map from the LyX name of the preamble definition to the preamble
* definition itself.
*/
- typedef std::map<string, string> PreambleDefs;
+ typedef std::map<std::string, std::string> PreambleDefs;
static TemplateManager & get();
Templates & getTemplates();
/** return the template by LyX name.
* If it isn't found, return 0.
*/
- Template const * getTemplateByName(string const & name) const;
+ Template const * getTemplateByName(std::string const & name) const;
/** return the preamble definition by LyX name.
- * If it isn't found, return an empty string.
+ * If it isn't found, return an empty std::string.
*/
- string const getPreambleDefByName(string const & name) const;
+ std::string const getPreambleDefByName(std::string const & name) const;
private:
TemplateManager();
- void readTemplates(string const & path);
+ void readTemplates(std::string const & path);
void dumpTemplates(std::ostream &) const;
void dumpPreambleDefs(std::ostream &) const;
#include "LColor.h"
+using std::string;
+
+
// Initialization of the counter for the inset id's,
unsigned int InsetOld::inset_id = 0;
{
return i && i->editable() == InsetOld::HIGHLY_EDITABLE;
}
-
#include "dimension.h"
#include "ParagraphList_fwd.h"
+
class Buffer;
class LColor_color;
class FuncRequest;
///
int width() const;
/// what appears in the minibuffer when opening
- virtual string const editMessage() const;
+ virtual std::string const editMessage() const;
///
virtual EDITABLE editable() const;
///
virtual bool directWrite() const;
///
- void setInsetName(string const & s) { name_ = s; }
+ void setInsetName(std::string const & s) { name_ = s; }
///
- string const & getInsetName() const { return name_; }
+ std::string const & getInsetName() const { return name_; }
///
void setOwner(UpdatableInset * inset) { owner_ = inset; }
///
///
UpdatableInset * owner_;
///
- string name_;
+ std::string name_;
/** We store the LColor::color value as an int to get LColor.h out
* of the header file.
*/
#ifndef INSETBASE_H
#define INSETBASE_H
-#include "support/std_string.h"
-
+#include <string>
#include <vector>
#include <memory>
virtual void validate(LaTeXFeatures &) const {}
/// Appends \c list with all labels found within this inset.
virtual void getLabelList(Buffer const &,
- std::vector<string> & /* list */) const {}
+ std::vector<std::string> & /* list */) const {}
};
#endif
using lyx::support::strToInt;
using std::max;
-
+using std::string;
using std::auto_ptr;
///
void read(Buffer const &, LyXLex & lex);
///
- virtual string const getScreenLabel(Buffer const &) const;
+ virtual std::string const getScreenLabel(Buffer const &) const;
///
EDITABLE editable() const { return IS_EDITABLE; }
///
///
int getCounter() const { return counter; }
///
- string const getBibLabel() const;
+ std::string const getBibLabel() const;
private:
///
using std::endl;
using std::getline;
-
+using std::string;
using std::ifstream;
using std::ostream;
using std::pair;
/// small wrapper for the time being
virtual dispatch_result localDispatch(FuncRequest const & cmd);
///
- string const getScreenLabel(Buffer const &) const;
+ std::string const getScreenLabel(Buffer const &) const;
///
EDITABLE editable() const { return IS_EDITABLE; }
///
LatexRunParams const &) const;
///
void fillWithBibKeys(Buffer const & buffer,
- std::vector<std::pair<string,string> > & keys) const;
+ std::vector<std::pair<std::string,std::string> > & keys) const;
///
- std::vector<string> const getFiles(Buffer const &) const;
+ std::vector<std::string> const getFiles(Buffer const &) const;
///
- bool addDatabase(string const &);
+ bool addDatabase(std::string const &);
///
- bool delDatabase(string const &);
+ bool delDatabase(std::string const &);
};
#endif // INSET_BIBTEX_H
#include "support/std_sstream.h"
+
+using std::string;
using std::auto_ptr;
using std::istringstream;
using std::ostream;
string const branch_sel = buf.params().branchlist().allSelected();
if (branch_sel.find(params_.branch, 0) != string::npos)
return inset.linuxdoc(buf, os);
- return 0;
+ return 0;
}
///
void read(LyXLex & lex);
///
- string branch;
+ std::string branch;
/// Hack -- MV
BranchList branchlist;
};
///
- InsetBranch(BufferParams const &, string const &);
+ InsetBranch(BufferParams const &, std::string const &);
/// Copy constructor
InsetBranch(InsetBranch const &);
///
///
virtual std::auto_ptr<InsetBase> clone() const;
///
- string const editMessage() const;
+ std::string const editMessage() const;
///
InsetOld::Code lyxCode() const { return InsetOld::BRANCH_CODE; }
///
class InsetBranchMailer : public MailInset {
public:
///
- InsetBranchMailer(string const & name, InsetBranch & inset);
+ InsetBranchMailer(std::string const & name, InsetBranch & inset);
///
virtual InsetBase & inset() const { return inset_; }
///
- virtual string const & name() const { return name_; }
+ virtual std::string const & name() const { return name_; }
///
- virtual string const inset2string(Buffer const &) const;
+ virtual std::string const inset2string(Buffer const &) const;
///
- static string const params2string(string const &, InsetBranchParams const &);
+ static std::string const params2string(std::string const &, InsetBranchParams const &);
///
- static void string2params(string const &, InsetBranchParams &);
+ static void string2params(std::string const &, InsetBranchParams &);
private:
///
- string const name_;
+ std::string const name_;
///
InsetBranch & inset_;
};
#include "support/std_sstream.h"
+
using lyx::support::bformat;
using std::endl;
-
+using std::string;
using std::ostream;
using std::ostringstream;
///
virtual InsetOld::Code lyxCode() const;
///
- virtual string const editMessage() const;
+ virtual std::string const editMessage() const;
///
virtual void draw(PainterInfo & pi, int x, int y) const;
///
using lyx::support::rtrim;
using lyx::support::split;
+using std::string;
using std::ostream;
using std::vector;
using std::map;
return std::auto_ptr<InsetBase>(new InsetCitation(params()));
}
///
- string const getScreenLabel(Buffer const &) const;
+ std::string const getScreenLabel(Buffer const &) const;
///
EDITABLE editable() const { return IS_EDITABLE; }
///
///
InsetCommandParams params;
///
- string generated_label;
+ std::string generated_label;
///
- string screen_label;
+ std::string screen_label;
};
/// This function does the donkey work of creating the pretty label
- string const generateLabel(Buffer const &) const;
+ std::string const generateLabel(Buffer const &) const;
///
Cache::Style getStyle(Buffer const & buffer) const;
#include "frontends/Painter.h"
#include "frontends/LyXView.h"
+
using lyx::graphics::PreviewLoader;
using std::endl;
-
+using std::string;
using std::max;
using std::ostream;
void setFont(BufferView *, LyXFont const &, bool toggleall = false,
bool selectall = false);
///
- void setLabel(string const & l) const;
+ void setLabel(std::string const & l) const;
///
void setLabelFont(LyXFont & f);
#if 0
///
void deleteLyXText(BufferView *, bool recursive=true) const;
/// Appends \c list with all labels found within this inset.
- void getLabelList(Buffer const &, std::vector<string> & list) const;
+ void getLabelList(Buffer const &, std::vector<std::string> & list) const;
///
int scroll(bool recursive=true) const;
///
bool nextChange(BufferView * bv, lyx::pos_type & length);
///
- bool searchForward(BufferView * bv, string const & str,
+ bool searchForward(BufferView * bv, std::string const & str,
bool = true, bool = false);
- bool searchBackward(BufferView * bv, string const & str,
+ bool searchBackward(BufferView * bv, std::string const & str,
bool = true, bool = false);
///
mutable int topbaseline;
///
- mutable string label;
+ mutable std::string label;
#if 0
///
bool autocollapse;
#include "support/std_sstream.h"
+
+using std::string;
using std::istringstream;
using std::ostream;
using std::ostringstream;
virtual void read(Buffer const &, LyXLex & lex)
{ p_.read(lex); }
/// Can remove one InsetBibKey is modified
- void scanCommand(string const & c) { p_.scanCommand(c); };
+ void scanCommand(std::string const & c) { p_.scanCommand(c); };
///
virtual int latex(Buffer const &, std::ostream &,
LatexRunParams const &) const;
///
virtual dispatch_result localDispatch(FuncRequest const & cmd);
///
- string const & getContents() const { return p_.getContents(); }
+ std::string const & getContents() const { return p_.getContents(); }
///
- void setContents(string const & c) { p_.setContents(c); }
+ void setContents(std::string const & c) { p_.setContents(c); }
///
- string const & getOptions() const { return p_.getOptions(); }
+ std::string const & getOptions() const { return p_.getOptions(); }
///
ButtonRenderer & button() const { return button_; }
protected:
///
- string const getCommand() const { return p_.getCommand(); }
+ std::string const getCommand() const { return p_.getCommand(); }
///
- string const & getCmdName() const { return p_.getCmdName(); }
+ std::string const & getCmdName() const { return p_.getCmdName(); }
///
- void setCmdName(string const & n) { p_.setCmdName(n); }
+ void setCmdName(std::string const & n) { p_.setCmdName(n); }
///
- void setOptions(string const & o) { p_.setOptions(o); }
+ void setOptions(std::string const & o) { p_.setOptions(o); }
///
void setParams(InsetCommandParams const &);
///
virtual BufferView * view() const;
/// This should provide the text for the button
- virtual string const getScreenLabel(Buffer const &) const = 0;
+ virtual std::string const getScreenLabel(Buffer const &) const = 0;
private:
///
class InsetCommandMailer : public MailInset {
public:
///
- InsetCommandMailer(string const & name, InsetCommand & inset);
+ InsetCommandMailer(std::string const & name, InsetCommand & inset);
///
virtual InsetBase & inset() const { return inset_; }
///
- virtual string const & name() const { return name_; }
+ virtual std::string const & name() const { return name_; }
///
- virtual string const inset2string(Buffer const &) const;
+ virtual std::string const inset2string(Buffer const &) const;
///
- static void string2params(string const &, InsetCommandParams &);
+ static void string2params(std::string const &, InsetCommandParams &);
///
- static string const params2string(string const & name,
+ static std::string const params2string(std::string const & name,
InsetCommandParams const &);
private:
///
- string const name_;
+ std::string const name_;
///
InsetCommand & inset_;
};
#include "debug.h"
#include "lyxlex.h"
+
+using std::string;
using std::endl;
using std::ostream;
#ifndef INSETCOMMANDPARAMS_H
#define INSETCOMMANDPARAMS_H
-
-#include "support/std_string.h"
-
+#include <string>
#include <iosfwd>
+
class LyXLex;
+
class InsetCommandParams {
public:
///
InsetCommandParams();
///
explicit
- InsetCommandParams(string const & n,
- string const & c = string(),
- string const & o = string());
+ InsetCommandParams(std::string const & n,
+ std::string const & c = std::string(),
+ std::string const & o = std::string());
///
void read(LyXLex &);
/// Parse the command
- void scanCommand(string const &);
+ void scanCommand(std::string const &);
///
void write(std::ostream &) const;
/// Build the complete LaTeX command
- string const getCommand() const;
+ std::string const getCommand() const;
///
- string const & getCmdName() const { return cmdname; }
+ std::string const & getCmdName() const { return cmdname; }
///
- string const & getOptions() const { return options; }
+ std::string const & getOptions() const { return options; }
///
- string const & getContents() const { return contents; }
+ std::string const & getContents() const { return contents; }
///
- void setCmdName(string const & n) { cmdname = n; }
+ void setCmdName(std::string const & n) { cmdname = n; }
///
- void setOptions(string const & o) { options = o; }
+ void setOptions(std::string const & o) { options = o; }
///
- void setContents(string const & c) { contents = c; }
+ void setContents(std::string const & c) { contents = c; }
///
bool preview() const { return preview_; }
///
private:
///
- string cmdname;
+ std::string cmdname;
///
- string contents;
+ std::string contents;
///
- string options;
+ std::string options;
///
bool preview_;
};
#include "support/std_ostream.h"
+
+using std::string;
using std::auto_ptr;
using std::ostream;
class InsetEnvironment : public InsetText {
public:
///
- InsetEnvironment(BufferParams const &, string const & name);
+ InsetEnvironment(BufferParams const &, std::string const & name);
///
InsetEnvironment(InsetEnvironment const &);
///
int latex(Buffer const &, std::ostream &,
LatexRunParams const &) const;
///
- string const editMessage() const;
+ std::string const editMessage() const;
///
InsetOld::EDITABLE editable() const { return HIGHLY_EDITABLE; }
///
using std::endl;
using std::min;
-
+using std::string;
using std::auto_ptr;
using std::ostream;
virtual std::auto_ptr<InsetBase> clone() const;
///
InsetERT(BufferParams const &,
- Language const *, string const & contents, bool collapsed);
+ Language const *, std::string const & contents, bool collapsed);
///
~InsetERT();
///
///
void write(Buffer const & buf, std::ostream & os) const;
///
- string const editMessage() const;
+ std::string const editMessage() const;
///
bool insertInset(BufferView *, InsetOld *);
///
///
void init();
///
- string const get_new_label() const;
+ std::string const get_new_label() const;
///
void setButtonLabel() const;
///
///
virtual InsetBase & inset() const { return inset_; }
///
- virtual string const & name() const { return name_; }
+ virtual std::string const & name() const { return name_; }
///
- virtual string const inset2string(Buffer const &) const;
+ virtual std::string const inset2string(Buffer const &) const;
///
- static void string2params(string const &, InsetERT::ERTStatus &);
+ static void string2params(std::string const &, InsetERT::ERTStatus &);
///
- static string const params2string(InsetERT::ERTStatus);
+ static std::string const params2string(InsetERT::ERTStatus);
private:
///
- static string const name_;
+ static std::string const name_;
///
InsetERT & inset_;
};
namespace external = lyx::external;
using std::endl;
-
+using std::string;
using std::auto_ptr;
using std::istringstream;
using std::ostream;
#include <boost/scoped_ptr.hpp>
#include <boost/signals/trackable.hpp>
-#include "support/std_string.h"
class RenderInset;
TempName(TempName const &);
~TempName();
TempName & operator=(TempName const &);
- string const & operator()() const { return tempname_; }
+ std::string const & operator()() const { return tempname_; }
private:
- string tempname_;
+ std::string tempname_;
};
public:
bool read(Buffer const &, LyXLex &);
/// The name of the tempfile used for manipulations.
- string const & tempname() const { return tempname_(); }
+ std::string const & tempname() const { return tempname_(); }
/// the current template used
- void settemplate(string const &);
- string const & templatename() const { return templatename_; }
+ void settemplate(std::string const &);
+ std::string const & templatename() const { return templatename_; }
/// the filename
lyx::support::FileName filename;
private:
TempName tempname_;
- string templatename_;
+ std::string templatename_;
};
InsetExternal();
If \param external_in_tmpdir == true, then the generated file is
place in the buffer's temporary directory.
*/
- void updateExternal(string const &, Buffer const &,
+ void updateExternal(std::string const &, Buffer const &,
bool external_in_tmpdir) const;
private:
If \param external_in_tmpdir == true, then the generated file is
place in the buffer's temporary directory.
*/
- int write(string const & format, Buffer const &, std::ostream &,
+ int write(std::string const & format, Buffer const &, std::ostream &,
bool external_in_tmpdir = false) const;
/// the current params
///
virtual InsetBase & inset() const { return inset_; }
///
- virtual string const & name() const { return name_; }
+ virtual std::string const & name() const { return name_; }
///
- virtual string const inset2string(Buffer const &) const;
+ virtual std::string const inset2string(Buffer const &) const;
///
- static void string2params(string const &, Buffer const &,
+ static void string2params(std::string const &, Buffer const &,
InsetExternal::Params &);
///
- static string const params2string(InsetExternal::Params const &,
+ static std::string const params2string(InsetExternal::Params const &,
Buffer const &);
private:
///
- static string const name_;
+ static std::string const name_;
///
InsetExternal & inset_;
};
using lyx::support::contains;
using std::endl;
-
+using std::string;
using std::auto_ptr;
using std::istringstream;
using std::ostream;
///
void read(LyXLex & lex);
///
- string type;
+ std::string type;
///
- string placement;
+ std::string placement;
///
bool wide;
};
class InsetFloat : public InsetCollapsable {
public:
///
- InsetFloat(BufferParams const &, string const &);
+ InsetFloat(BufferParams const &, std::string const &);
///
InsetFloat(InsetFloat const &);
///
///
int docbook(Buffer const &, std::ostream &, bool mixcont) const;
///
- string const editMessage() const;
+ std::string const editMessage() const;
///
bool insetAllowed(InsetOld::Code) const;
/** returns true if, when outputing LaTeX, font changes should
///
virtual InsetBase & inset() const { return inset_; }
///
- virtual string const & name() const { return name_; }
+ virtual std::string const & name() const { return name_; }
///
- virtual string const inset2string(Buffer const &) const;
+ virtual std::string const inset2string(Buffer const &) const;
///
- static void string2params(string const &, InsetFloatParams &);
+ static void string2params(std::string const &, InsetFloatParams &);
///
- static string const params2string(InsetFloatParams const &);
+ static std::string const params2string(InsetFloatParams const &);
private:
///
- static string const name_;
+ static std::string const name_;
///
InsetFloat & inset_;
};
using lyx::support::bformat;
using std::endl;
-
+using std::string;
using std::ostream;
///
InsetFloatList();
///
- InsetFloatList(string const & type);
+ InsetFloatList(std::string const & type);
///
~InsetFloatList();
///
///
dispatch_result localDispatch(FuncRequest const & cmd);
///
- string const getScreenLabel(Buffer const &) const;
+ std::string const getScreenLabel(Buffer const &) const;
///
EDITABLE editable() const { return IS_EDITABLE; }
///
#include "support/std_ostream.h"
+
+using std::string;
using std::auto_ptr;
using std::ostream;
///
int docbook(Buffer const &, std::ostream &, bool mixcont) const;
///
- string const editMessage() const;
+ std::string const editMessage() const;
};
#endif
namespace os = lyx::support::os;
using std::endl;
-
+using std::string;
using std::auto_ptr;
using std::istringstream;
using std::ostream;
void statusChanged();
/// Read the inset native format
- void readInsetGraphics(LyXLex & lex, string const & bufpath);
+ void readInsetGraphics(LyXLex & lex, std::string const & bufpath);
/// Get the status message, depends on the image loading status.
- string const statusMessage() const;
+ std::string const statusMessage() const;
/// Create the options for the latex command.
- string const createLatexOptions() const;
+ std::string const createLatexOptions() const;
/// Convert the file if needed, and return the location of the file.
- string const prepareFile(Buffer const & buf, LatexRunParams const &) const;
+ std::string const prepareFile(Buffer const & buf, LatexRunParams const &) const;
///
InsetGraphicsParams params_;
/// holds the entity name that defines the graphics location (SGML).
- string const graphic_label;
+ std::string const graphic_label;
/// The thing that actually draws the image on LyX's screen.
boost::scoped_ptr<GraphicRenderer> const graphic_;
///
virtual InsetBase & inset() const { return inset_; }
///
- virtual string const & name() const { return name_; }
+ virtual std::string const & name() const { return name_; }
///
- virtual string const inset2string(Buffer const &) const;
+ virtual std::string const inset2string(Buffer const &) const;
///
- static void string2params(string const & data,
+ static void string2params(std::string const & data,
Buffer const & buffer,
InsetGraphicsParams &);
///
- static string const params2string(InsetGraphicsParams const &,
+ static std::string const params2string(InsetGraphicsParams const &,
Buffer const &);
private:
///
- static string const name_;
+ static std::string const name_;
///
InsetGraphics & inset_;
};
using lyx::support::strToInt;
using lyx::support::token;
+using std::string;
using std::ostream;
#include "graphics/GraphicsTypes.h"
-#include "support/std_string.h"
#include "lyxlength.h"
#include "support/filename.h"
bool noUnzip;
/// The bounding box with "xLB yLB yRT yRT ", divided by a space!
- string bb;
+ std::string bb;
/// clip image
bool clip;
/// Rotation angle.
float rotateAngle;
/// Origin point of rotation
- string rotateOrigin;
+ std::string rotateOrigin;
/// Do we have a subcaption?
bool subcaption;
/// The text of the subcaption.
- string subcaptionText;
+ std::string subcaptionText;
/// any userdefined special command
- string special;
+ std::string special;
///
InsetGraphicsParams();
///
InsetGraphicsParams & operator=(InsetGraphicsParams const &);
/// Save the parameters in the LyX format stream.
- void Write(std::ostream & os, string const & bufpath) const;
+ void Write(std::ostream & os, std::string const & bufpath) const;
/// If the token belongs to our parameters, read it.
- bool Read(LyXLex & lex, string const & token, string const & bufpath);
+ bool Read(LyXLex & lex, std::string const & token, std::string const & bufpath);
/// convert
// Only a subset of InsetGraphicsParams is needed for display purposes.
// This function also interrogates lyxrc to ascertain whether
return std::auto_ptr<InsetBase>(new InsetHFill);
}
///
- string const getScreenLabel(Buffer const &) const { return getContents(); }
+ std::string const getScreenLabel(Buffer const &) const { return getContents(); }
///
InsetOld::Code lyxCode() const { return InsetOld::HFILL_CODE; }
///
using lyx::support::subst;
using std::endl;
-
+using std::string;
using std::auto_ptr;
using std::istringstream;
using std::ostream;
return VERBAST;
return INCLUDE;
}
-
+
bool isVerbatim(InsetCommandParams const & params)
{
* \param list the list of labels in the child buffer.
*/
void getLabelList(Buffer const & buffer,
- std::vector<string> & list) const;
+ std::vector<std::string> & list) const;
/** Fills \c keys
* \param buffer the Buffer containing this inset.
* \param keys the list of bibkeys in the child buffer.
*/
///
void fillWithBibKeys(Buffer const & buffer,
- std::vector<std::pair<string,string> > & keys) const;
+ std::vector<std::pair<std::string,std::string> > & keys) const;
///
EDITABLE editable() const { return IS_EDITABLE; }
///
/// set the parameters
void set(InsetCommandParams const & params, Buffer const &);
/// get the text displayed on the button
- string const getScreenLabel(Buffer const &) const;
+ std::string const getScreenLabel(Buffer const &) const;
///
void write(std::ostream &) const;
///
/// the parameters
InsetCommandParams params_;
/// holds the entity name that defines the file location (SGML)
- string const include_label;
+ std::string const include_label;
/// Use the Pimpl idiom to hide the internals of the previewer.
class PreviewImpl;
///
virtual InsetBase & inset() const { return inset_; }
///
- virtual string const & name() const { return name_; }
+ virtual std::string const & name() const { return name_; }
///
- virtual string const inset2string(Buffer const &) const;
+ virtual std::string const inset2string(Buffer const &) const;
///
- static void string2params(string const &, InsetCommandParams &);
+ static void string2params(std::string const &, InsetCommandParams &);
///
- static string const params2string(InsetCommandParams const &);
+ static std::string const params2string(InsetCommandParams const &);
private:
///
- static string const name_;
+ static std::string const name_;
///
InsetInclude & inset_;
};
#include "LaTeXFeatures.h"
#include "metricsinfo.h"
+
+using std::string;
using std::ostream;
///
dispatch_result localDispatch(FuncRequest const & cmd);
///
- string const getScreenLabel(Buffer const &) const;
+ std::string const getScreenLabel(Buffer const &) const;
///
EDITABLE editable() const { return IS_EDITABLE; }
///
///
InsetOld::Code lyxCode() const;
///
- string const getScreenLabel(Buffer const &) const;
+ std::string const getScreenLabel(Buffer const &) const;
///
void metrics(MetricsInfo &, Dimension &) const;
///
using lyx::support::escape;
+using std::string;
using std::ostream;
///
virtual dispatch_result localDispatch(FuncRequest const & cmd);
///
- string const getScreenLabel(Buffer const &) const { return getContents(); }
+ std::string const getScreenLabel(Buffer const &) const { return getContents(); }
///
EDITABLE editable() const { return IS_EDITABLE; }
///
InsetOld::Code lyxCode() const { return InsetOld::LABEL_CODE; }
/// Appends \c list with this label
- void getLabelList(Buffer const &, std::vector<string> & list) const;
+ void getLabelList(Buffer const &, std::vector<std::string> & list) const;
///
int latex(Buffer const &, std::ostream &,
LatexRunParams const &) const;
using lyx::support::trim;
using std::endl;
-
+using std::string;
using std::auto_ptr;
using std::ostream;
#define INSET_LATEX_ACCENT_H
#include "inset.h"
-#include "support/std_string.h"
class Dimension;
InsetLatexAccent();
///
explicit
- InsetLatexAccent(string const & string);
+ InsetLatexAccent(std::string const & str);
///
void metrics(MetricsInfo &, Dimension &) const;
///
/// Check if we know the modifier and can display it ok on screen.
void checkContents();
///
- string contents;
+ std::string contents;
/// can display as proper char
bool candisp;
/// modifier type
#include "support/std_ostream.h"
+
+using std::string;
using std::auto_ptr;
using std::ostream;
int latex(Buffer const &, std::ostream &,
LatexRunParams const &) const;
///
- string const editMessage() const;
+ std::string const editMessage() const;
};
#endif
#include "support/std_sstream.h"
+
+using std::string;
using std::endl;
using std::auto_ptr;
using std::istringstream;
int latex(Buffer const &, std::ostream &,
LatexRunParams const &) const;
///
- string const editMessage() const;
+ std::string const editMessage() const;
///
bool insetAllowed(InsetOld::Code) const;
/** returns true if, when outputing LaTeX, font changes should
///
virtual InsetBase & inset() const { return inset_; }
///
- virtual string const & name() const { return name_; }
+ virtual std::string const & name() const { return name_; }
///
- virtual string const inset2string(Buffer const &) const;
+ virtual std::string const inset2string(Buffer const &) const;
///
- static void string2params(string const &, InsetMinipage::Params &);
+ static void string2params(std::string const &, InsetMinipage::Params &);
///
- static string const params2string(InsetMinipage::Params const &);
+ static std::string const params2string(InsetMinipage::Params const &);
private:
///
- static string const name_;
+ static std::string const name_;
///
InsetMinipage & inset_;
};
#include "support/std_sstream.h"
+
+using std::string;
using std::auto_ptr;
using std::istringstream;
using std::ostream;
///
void read(LyXLex & lex);
///
- string type;
+ std::string type;
};
///
- InsetNote(BufferParams const &, string const &);
+ InsetNote(BufferParams const &, std::string const &);
/// Copy constructor
InsetNote(InsetNote const &);
///
///
virtual std::auto_ptr<InsetBase> clone() const;
///
- string const editMessage() const;
+ std::string const editMessage() const;
///
InsetOld::Code lyxCode() const { return InsetOld::NOTE_CODE; }
///
class InsetNoteMailer : public MailInset {
public:
///
- InsetNoteMailer(string const & name, InsetNote & inset);
+ InsetNoteMailer(std::string const & name, InsetNote & inset);
///
virtual InsetBase & inset() const { return inset_; }
///
- virtual string const & name() const { return name_; }
+ virtual std::string const & name() const { return name_; }
///
- virtual string const inset2string(Buffer const &) const;
+ virtual std::string const inset2string(Buffer const &) const;
///
- static string const params2string(string const &, InsetNoteParams const &);
+ static std::string const params2string(std::string const &, InsetNoteParams const &);
///
- static void string2params(string const &, InsetNoteParams &);
+ static void string2params(std::string const &, InsetNoteParams &);
private:
///
- string const name_;
+ std::string const name_;
///
InsetNote & inset_;
};
#include "LColor.h"
#include "paragraph.h"
+
+using std::string;
using std::auto_ptr;
using std::ostream;
/// code of the inset
InsetOld::Code lyxCode() const { return InsetOld::OPTARG_CODE; }
/// return an message upon editing
- string const editMessage() const;
+ std::string const editMessage() const;
/// Standard LaTeX output -- short-circuited
int latex(Buffer const &, std::ostream &,
#include "support/lstrings.h"
+
using lyx::support::prefixIs;
using std::endl;
-
+using std::string;
using std::auto_ptr;
using std::ostream;
\end{itemize}
*/
explicit
- InsetQuotes(string const & str = "eld");
+ InsetQuotes(std::string const & str = "eld");
/// Create the right quote inset after character c
InsetQuotes(char c, BufferParams const & params);
///
*/
InsetQuotes(quote_language l, quote_side s, quote_times t);
///
- void parseString(string const &);
+ void parseString(std::string const &);
///
- string const dispString(Language const *) const;
+ std::string const dispString(Language const *) const;
};
#endif
#include "support/lstrings.h"
+
using lyx::support::escape;
+using std::string;
using std::ostream;
public:
struct type_info {
///
- string latex_name;
+ std::string latex_name;
///
- string gui_name;
+ std::string gui_name;
///
- string short_gui_name;
+ std::string short_gui_name;
};
static type_info types[];
///
- static int getType(string const & name);
+ static int getType(std::string const & name);
///
- static string const & getName(int type);
+ static std::string const & getName(int type);
InsetRef(InsetCommandParams const &, Buffer const &);
///
dispatch_result localDispatch(FuncRequest const & cmd);
///
- string const getScreenLabel(Buffer const &) const;
+ std::string const getScreenLabel(Buffer const &) const;
///
EDITABLE editable() const { return IS_EDITABLE; }
///
#include "frontends/font_metrics.h"
#include "frontends/Painter.h"
+
+using std::string;
using std::max;
using std::auto_ptr;
using std::ostream;
#include "frontends/font_metrics.h"
#include "frontends/Painter.h"
+
+using std::string;
using std::auto_ptr;
using std::ostream;
using std::endl;
using std::max;
using std::swap;
-
+using std::string;
using std::auto_ptr;
using std::istringstream;
using std::ostream;
#include "inset.h"
#include "tabular.h"
-#include "support/std_string.h"
#include "frontends/mouse_state.h"
class FuncStatus;
///
void draw(PainterInfo & pi, int x, int y) const;
///
- string const editMessage() const;
+ std::string const editMessage() const;
//
void insetUnlock(BufferView *);
///
/// Get the absolute document x,y of the cursor
virtual void getCursor(BufferView &, int &, int &) const;
///
- bool tabularFeatures(BufferView * bv, string const & what);
+ bool tabularFeatures(BufferView * bv, std::string const & what);
///
void tabularFeatures(BufferView * bv, LyXTabular::Feature feature,
- string const & val = string());
+ std::string const & val = std::string());
///
int getActCell() const { return actcell; }
///
///
bool showInsetDialog(BufferView *) const;
///
- FuncStatus getStatus(string const & argument) const;
+ FuncStatus getStatus(std::string const & argument) const;
/// Appends \c list with all labels found within this inset.
- void getLabelList(Buffer const &, std::vector<string> & list) const;
+ void getLabelList(Buffer const &, std::vector<std::string> & list) const;
///
int scroll(bool recursive=true) const;
///
/// find next change
bool nextChange(BufferView *, lyx::pos_type & length);
///
- bool searchForward(BufferView *, string const &,
+ bool searchForward(BufferView *, std::string const &,
bool = true, bool = false);
- bool searchBackward(BufferView *, string const &,
+ bool searchBackward(BufferView *, std::string const &,
bool = true, bool = false);
// this should return true if we have a "normal" cell, otherwise true.
///
WordLangTuple selectNextWordInt(BufferView *, float & value) const;
///
- bool insertAsciiString(BufferView *, string const & buf, bool usePaste);
+ bool insertAsciiString(BufferView *, std::string const & buf, bool usePaste);
//
// Private structures and variables
///
virtual InsetBase & inset() const { return inset_; }
///
- virtual string const & name() const { return name_; }
+ virtual std::string const & name() const { return name_; }
///
- virtual string const inset2string(Buffer const &) const;
+ virtual std::string const inset2string(Buffer const &) const;
/// Returns the active cell if successful, else -1.
- static int string2params(string const &, InsetTabular &);
+ static int string2params(std::string const &, InsetTabular &);
///
- static string const params2string(InsetTabular const &);
+ static std::string const params2string(InsetTabular const &);
private:
///
- static string const name_;
+ static std::string const name_;
///
InsetTabular & inset_;
};
-string const featureAsString(LyXTabular::Feature feature);
+std::string const featureAsString(LyXTabular::Feature feature);
#endif
using std::endl;
using std::for_each;
using std::max;
-
+using std::string;
using std::auto_ptr;
using std::ostream;
using std::vector;
#include "frontends/mouse_state.h"
-#include "support/std_string.h"
class Buffer;
class BufferParams;
///
void draw(PainterInfo & pi, int x, int y) const;
///
- string const editMessage() const;
+ std::string const editMessage() const;
///
bool isTextInset() const { return true; }
///
///
void writeParagraphData(Buffer const &, std::ostream &) const;
///
- void setText(string const &, LyXFont const &);
+ void setText(std::string const &, LyXFont const &);
///
void setAutoBreakRows(bool);
///
///
bool showInsetDialog(BufferView *) const;
/// Appends \c list with all labels found within this inset.
- void getLabelList(Buffer const &, std::vector<string> & list) const;
+ void getLabelList(Buffer const &, std::vector<std::string> & list) const;
///
int scroll(bool recursive = true) const;
///
bool nextChange(BufferView *, lyx::pos_type & length);
///
- bool searchForward(BufferView *, string const &,
+ bool searchForward(BufferView *, std::string const &,
bool = true, bool = false);
///
- bool searchBackward(BufferView *, string const &,
+ bool searchBackward(BufferView *, std::string const &,
bool = true, bool = false);
///
bool checkInsertChar(LyXFont &);
#include "metricsinfo.h"
#include "toc.h"
+
+using std::string;
using std::ostream;
///
dispatch_result localDispatch(FuncRequest const & cmd);
///
- string const getScreenLabel(Buffer const &) const;
+ std::string const getScreenLabel(Buffer const &) const;
///
EDITABLE editable() const { return IS_EDITABLE; }
///
#include "support/lstrings.h"
+
using lyx::support::subst;
+using std::string;
using std::ostream;
///
void validate(LaTeXFeatures &) const;
///
- string const getScreenLabel(Buffer const &) const;
+ std::string const getScreenLabel(Buffer const &) const;
///
EDITABLE editable() const { return IS_EDITABLE; }
///
#include "support/std_sstream.h"
+
+using std::string;
using std::endl;
using std::auto_ptr;
using std::istringstream;
void read(LyXLex &);
///
- string type;
+ std::string type;
///
- string placement;
+ std::string placement;
///
LyXLength width;
};
class InsetWrap : public InsetCollapsable {
public:
///
- InsetWrap(BufferParams const &, string const &);
+ InsetWrap(BufferParams const &, std::string const &);
///
~InsetWrap();
///
///
int docbook(Buffer const &, std::ostream &, bool mixcont) const;
///
- string const editMessage() const;
+ std::string const editMessage() const;
///
bool insetAllowed(InsetOld::Code) const;
///
///
virtual InsetBase & inset() const { return inset_; }
///
- virtual string const & name() const { return name_; }
+ virtual std::string const & name() const { return name_; }
///
- virtual string const inset2string(Buffer const &) const;
+ virtual std::string const inset2string(Buffer const &) const;
///
- static void string2params(string const &, InsetWrapParams &);
+ static void string2params(std::string const &, InsetWrapParams &);
///
- static string const params2string(InsetWrapParams const &);
+ static std::string const params2string(InsetWrapParams const &);
private:
///
- static string const name_;
+ static std::string const name_;
///
InsetWrap & inset_;
};
#ifndef MAILINSET_H
#define MAILINSET_H
-
-#include "support/std_string.h"
+#include <string>
class InsetBase;
///
void hideDialog() const;
///
- virtual string const inset2string(Buffer const &) const = 0;
+ virtual std::string const inset2string(Buffer const &) const = 0;
protected:
///
virtual InsetBase & inset() const = 0;
///
- virtual string const & name() const = 0;
+ virtual std::string const & name() const = 0;
};
#include "support/filetools.h"
+
using lyx::support::AbsolutePath;
using lyx::support::OnlyFilename;
+using std::string;
+
RenderInset::RenderInset()
{}
virtual RenderInset * clone() const;
/// This should provide the text for the button
- void update(string const &, bool editable);
+ void update(std::string const &, bool editable);
/// compute the size of the object returned in dim
virtual void metrics(MetricsInfo & mi, Dimension & dim) const;
private:
/// The stored data.
- string text_;
+ std::string text_;
bool editable_;
Box button_box_;
};
GraphicRenderer & operator=(GraphicRenderer const &);
/// The message to display instead of the graphic itself.
- string const statusMessage() const;
+ std::string const statusMessage() const;
/// Is the image ready to draw, or should we display a message instead?
bool readyToDisplay() const;
#include "support/lstrings.h"
+
using lyx::support::strToDbl;
using lyx::support::strToInt;
+using std::string;
+
// some stuff for inset locking
///
// needed for search/replace functionality
///
- virtual bool searchForward(BufferView *, string const &,
+ virtual bool searchForward(BufferView *, std::string const &,
bool = true, bool = false);
///
- virtual bool searchBackward(BufferView *, string const &,
+ virtual bool searchBackward(BufferView *, std::string const &,
bool = true, bool = false);
protected:
#include "trans_mgr.h"
-#include "support/std_string.h"
-
/**
* This class is used for managing keymaps
/// is key mapping enabled ?
bool keymapon;
/// the primary language keymap
- string & prim_lang;
+ std::string & prim_lang;
/// the secondary language keymap
- string & sec_lang;
+ std::string & sec_lang;
/// the translation manager
TransManager trans;
};
using std::endl;
using std::max;
+using std::string;
namespace {
/// i/a spell process-based spellchecker
class ISpell : public SpellBase {
public:
- ISpell(BufferParams const & params, string const & lang);
+ ISpell(BufferParams const & params, std::string const & lang);
~ISpell();
virtual void accept(WordLangTuple const & word);
/// return the next near miss after a MISSED result
- virtual string const nextMiss();
+ virtual std::string const nextMiss();
/// give an error message on messy exit
- virtual string const error();
+ virtual std::string const error();
private:
/// read some data. Returns true on an error. Sets err_read
char buf[BUFSIZ];
/// spell error
- string error_;
+ std::string error_;
boost::scoped_ptr<lyx::support::ForkedProcess> child_;
#include "support/filetools.h"
-using std::endl;
using lyx::support::i18nLibFileSearch;
+using std::endl;
+using std::string;
+
string const kb_keymap::printKeysym(LyXKeySymPtr key,
key_modifier::state mod)
#include <boost/shared_ptr.hpp>
-#include "support/std_string.h"
#include <vector>
class kb_sequence;
* occurs.
* See kb_sequence::parse for the syntax of the seq string
*/
- string::size_type bind(string const & seq, FuncRequest const & func);
+ std::string::size_type bind(std::string const & seq, FuncRequest const & func);
// Parse a bind file
- bool read(string const & bind_file);
+ bool read(std::string const & bind_file);
/// print all available keysyms
- string const print() const;
+ std::string const print() const;
///
typedef boost::shared_ptr<LyXKeySym> LyXKeySymPtr;
key_modifier::state mod, kb_sequence * seq) const;
/// Given an action, find all keybindings.
- string const findbinding(FuncRequest const & func,
- string const & prefix = string()) const;
+ std::string const findbinding(FuncRequest const & func,
+ std::string const & prefix = std::string()) const;
/**
* Returns a string of the given keysym, with modifiers.
* @param key the key as a keysym
* @param mod the modifiers
*/
- static string const printKeysym(LyXKeySymPtr key,
+ static std::string const printKeysym(LyXKeySymPtr key,
key_modifier::state mod);
typedef std::pair<key_modifier::state, key_modifier::state> modifier_pair;
unsigned int r = 0);
/// Returns a string of the given key
- string const printKey(kb_key const & key) const;
+ std::string const printKey(kb_key const & key) const;
/// is the table empty ?
bool empty() const {
#include "frontends/LyXKeySymFactory.h"
using std::make_pair;
+using std::string;
FuncRequest const &
#include <boost/shared_ptr.hpp>
-#include "support/std_string.h"
+#include <string>
#include <vector>
class kb_keymap;
* Prefixes can also be ignored by using the Tilde "~"
* f.ex.: "~S-Space".
*/
- string::size_type parse(string const & s);
+ std::string::size_type parse(std::string const & s);
/**
* Return the current sequence as a string.
* @see parse()
*/
- string const print() const;
+ std::string const print() const;
/**
* Return the current sequence and available options as
* a string. No options are added if no curmap kb map exists.
*/
- string const printOptions() const;
+ std::string const printOptions() const;
/// Mark the sequence as deleted.
void mark_deleted();
#include "lyxrc.h"
using std::endl;
+using std::string;
+
Languages languages;
Language const * english_language;
#define LANGUAGE_H
#include <map>
-#include "support/std_string.h"
+#include <string>
+
class Encoding;
///
Language() : RightToLeft_(false) {}
///
- Language(string const & l, string const & b, string const & d,
- bool rtl, Encoding const * e, string const & c,
- string const & o)
+ Language(std::string const & l, std::string const & b, std::string const & d,
+ bool rtl, Encoding const * e, std::string const & c,
+ std::string const & o)
: lang_(l), babel_(b), display_(d), RightToLeft_(rtl),
encoding_(e), code_(c), latex_options_(o)
{}
///
- string const & lang() const {
+ std::string const & lang() const {
return lang_;
}
///
- string const & babel() const {
+ std::string const & babel() const {
return babel_;
}
///
- string const & display() const {
+ std::string const & display() const {
return display_;
}
///
return encoding_;
}
///
- string const & code() const {
+ std::string const & code() const {
return code_;
}
///
- string const & latex_options() const {
+ std::string const & latex_options() const {
return latex_options_;
}
private:
///
- string lang_;
+ std::string lang_;
///
- string babel_;
+ std::string babel_;
///
- string display_;
+ std::string display_;
///
bool RightToLeft_;
///
Encoding const * encoding_;
///
- string code_;
+ std::string code_;
///
- string latex_options_;
+ std::string latex_options_;
};
class Languages
{
public:
///
- typedef std::map<string, Language> LanguageList;
+ typedef std::map<std::string, Language> LanguageList;
///
typedef LanguageList::const_iterator const_iterator;
///
typedef LanguageList::size_type size_type;
///
- void read(string const & filename);
+ void read(std::string const & filename);
///
- Language const * getLanguage(string const & language) const;
+ Language const * getLanguage(std::string const & language) const;
///
size_type size() const {
return languagelist.size();
using std::endl;
using std::find;
using std::getline;
-
+using std::string;
using std::ifstream;
using std::ofstream;
using std::ostream_iterator;
#ifndef LASTFILES_H
#define LASTFILES_H
+#include <boost/utility.hpp>
+
#include <deque>
-#include "support/std_string.h"
-#include <boost/utility.hpp>
/** The latest documents loaded.
This class takes care of the last .lyx files used by the LyX user. It
class LastFiles : boost::noncopyable {
public:
///
- typedef std::deque<string> Files;
+ typedef std::deque<std::string> Files;
///
typedef Files::const_iterator const_iterator;
@param num number of files to remember.
*/
explicit
- LastFiles(string const & file,
+ LastFiles(std::string const & file,
bool dostat = true, unsigned int num = 4);
/** Insert #file# into the list.
file in the list is popped from the end.
@param file the file to insert in the list.
*/
- void newFile(string const & file);
+ void newFile(std::string const & file);
/** Writes the lastfiles table to disk.
Writes one file on each line, this way we can at least have
some special chars (e.g. space), but newline in filenames
are thus not allowed.
@param file the file we write the lastfiles list to.
*/
- void writeFile(string const & file) const;
+ void writeFile(std::string const & file) const;
/** Return file #n# in the lastfiles list.
@param n number in the list to get
*/
- string const operator[](unsigned int n) const;
+ std::string const operator[](unsigned int n) const;
/// Iterator to the beginning of the list.
Files::const_iterator begin() const { return files.begin(); }
/// Iterator to the end of the list.
LastFiles has been initialized with #dostat = false#.
@param file the file containing the lastfiles.
*/
- void readFile(string const & file);
+ void readFile(std::string const & file);
/** Used by the constructor to set the number of stored last files.
@param num the number of lastfiles to set.
*/
#include "gettext.h"
+using std::string;
+
int const num_units = LyXLength::UNIT_NONE;
#define LENGTH_COMMON_H
#include "lyxlength.h"
-#include "support/std_string.h"
+
/// the number of units possible
extern int const num_units;
extern char const * unit_name_ltx[];
/// return the unit given a string representation such as "cm"
-LyXLength::UNIT unitFromString(string const & data);
+LyXLength::UNIT unitFromString(std::string const & data);
#endif // LENGTH_COMMON_H
using std::copy;
using std::endl;
using std::make_pair;
-
+using std::string;
using std::ifstream;
using std::ios;
using std::istream_iterator;
#ifndef LYX_CB_H
#define LYX_CB_H
-#include "support/std_string.h"
+#include <string>
class Buffer;
class BufferView;
///
bool MenuWrite(Buffer * buffer);
/// write the given file, or ask if no name given
-bool WriteAs(Buffer * buffer, string const & filename = string());
+bool WriteAs(Buffer * buffer, std::string const & filename = std::string());
///
void QuitLyX();
///
void AutoSave(BufferView * bv);
///
-void NewFile(BufferView * bv, string const & filename);
+void NewFile(BufferView * bv, std::string const & filename);
///
-void InsertAsciiFile(BufferView * bv, string const & f, bool asParagraph);
+void InsertAsciiFile(BufferView * bv, std::string const & f, bool asParagraph);
///
-string getContentsOfAsciiFile(BufferView * bv, string const & f, bool asParagraph);
+std::string getContentsOfAsciiFile(BufferView * bv, std::string const & f, bool asParagraph);
///
-string const getPossibleLabel(BufferView const & bv);
+std::string const getPossibleLabel(BufferView const & bv);
///
void Reconfigure(BufferView * bv);
#endif
namespace os = lyx::support::os;
using std::endl;
-
+using std::string;
using std::vector;
#ifndef CXX_GLOBAL_CSTD
#include <boost/scoped_ptr.hpp>
#include <boost/utility.hpp>
-#include "support/std_string.h"
+#include <string>
class ErrorItem;
/// check, set up and configure the user dir if necessary
void queryUserLyXDir(bool explicit_userdir);
/// read lyxrc/preferences
- void readRcFile(string const & name);
+ void readRcFile(std::string const & name);
/// read the given ui (menu/toolbar) file
- void readUIFile(string const & name);
+ void readUIFile(std::string const & name);
/// read the given languages file
- void readLanguagesFile(string const & name);
+ void readLanguagesFile(std::string const & name);
/// read the given encodings file
- void readEncodingsFile(string const & name);
+ void readEncodingsFile(std::string const & name);
/// parsing of non-gui LyX options. Returns true if gui
bool easyParse(int & argc, char * argv[]);
/// shows up a parsing error on screen
/// has this user started lyx for the first time?
bool first_start;
/// the parsed command line batch command if any
- string batch_command;
+ std::string batch_command;
};
#endif // LYX_MAIN_H
#include "lyx_sty.h"
+using std::string;
+
+
//\NeedsTeXFormat{LaTeX2e}
//\ProvidesPackage{lyx}[1996/01/11 LLE v0.2 (LyX LaTeX Extensions)]
//\message{LyX LaTeX Extensions (LLE v0.2) of 11-Jan-1996.}
#ifndef LYX_STY_H
#define LYX_STY_H
-#include "support/std_string.h"
+#include <string>
///
-extern string const lyx_def;
+extern std::string const lyx_def;
///
-extern string const lyxline_def;
+extern std::string const lyxline_def;
///
-extern string const noun_def;
+extern std::string const noun_def;
///
-extern string const lyxarrow_def;
+extern std::string const lyxarrow_def;
///
-extern string const quotedblbase_def;
+extern std::string const quotedblbase_def;
///
-extern string const quotesinglbase_def;
+extern std::string const quotesinglbase_def;
///
-extern string const guillemotleft_def;
+extern std::string const guillemotleft_def;
///
-extern string const guillemotright_def;
+extern std::string const guillemotright_def;
///
-extern string const guilsinglleft_def;
+extern std::string const guilsinglleft_def;
///
-extern string const guilsinglright_def;
+extern std::string const guilsinglright_def;
///
-extern string const paragraphleftindent_def;
+extern std::string const paragraphleftindent_def;
///
-extern string const floatingfootnote_def;
+extern std::string const floatingfootnote_def;
///
-extern string const minipageindent_def;
+extern std::string const minipageindent_def;
///
-extern string const boldsymbol_def;
+extern std::string const boldsymbol_def;
///
-extern string const binom_def;
+extern std::string const binom_def;
///
-extern string const mathcircumflex_def;
+extern std::string const mathcircumflex_def;
///
-extern string const tabularnewline_def;
+extern std::string const tabularnewline_def;
///
-extern string const lyxgreyedout_def;
+extern std::string const lyxgreyedout_def;
#endif // LYX_STY_H
using lyx::support::lowercase;
using lyx::support::uppercase;
+using std::string;
+
namespace lyx {
namespace find {
#ifndef LYXFIND_H
#define LYXFIND_H
-#include "support/std_string.h"
#include "support/types.h"
class BufferView;
int replace(BufferView * bv,
- string const &, string const &,
+ std::string const &, std::string const &,
bool, bool = true, bool = false,
bool = false, bool = false);
* we want to go. This does also update the screen.
*/
bool find(BufferView *,
- string const & searchstr, bool forward,
+ std::string const & searchstr, bool forward,
bool casesens = true, bool matchwrd = false);
/**
*/
SearchResult find(BufferView *, LyXText * text,
- string const & searchstr, bool forward,
+ std::string const & searchstr, bool forward,
bool casesens = true, bool matchwrd = false);
/// find the next change in the buffer
using lyx::support::subst;
using std::endl;
-
+using std::string;
using std::ostream;
using std::ostringstream;
#ifndef LYXFONT_H
#define LYXFONT_H
-#include "support/std_string.h"
#include <iosfwd>
class LColor_color;
void setLanguage(Language const * l);
/// Set family after LyX text format
- LyXFont & setLyXFamily(string const &);
+ LyXFont & setLyXFamily(std::string const &);
/// Set series after LyX text format
- LyXFont & setLyXSeries(string const &);
+ LyXFont & setLyXSeries(std::string const &);
/// Set shape after LyX text format
- LyXFont & setLyXShape(string const &);
+ LyXFont & setLyXShape(std::string const &);
/// Set size after LyX text format
- LyXFont & setLyXSize(string const &);
+ LyXFont & setLyXSize(std::string const &);
/// Returns misc flag after LyX text format
- LyXFont::FONT_MISC_STATE setLyXMisc(string const &);
+ LyXFont::FONT_MISC_STATE setLyXMisc(std::string const &);
/// Sets color after LyX text format
- LyXFont & setLyXColor(string const &);
+ LyXFont & setLyXColor(std::string const &);
/// Returns size of font in LaTeX text notation
- string const latexSize() const;
+ std::string const latexSize() const;
/** Updates font settings according to request.
If an attribute is IGNORE, the attribute is left as it is.
LyXFont const & next) const;
/// Build GUI description of font state
- string const stateText(BufferParams * params) const;
+ std::string const stateText(BufferParams * params) const;
///
LColor_color realColor() const;
using std::endl;
using std::make_pair;
-
+using std::string;
using std::istringstream;
#include <boost/shared_ptr.hpp>
#include <boost/signals/trackable.hpp>
-#include "support/std_string.h"
class BufferView;
class FuncRequest;
void dispatch(FuncRequest const &, bool verbose = false);
/// Dispatch via a string argument
- void dispatch(string const & s, bool verbose = false);
+ void dispatch(std::string const & s, bool verbose = false);
/// return the status bar state string
- string const view_status_message();
+ std::string const view_status_message();
///
typedef boost::shared_ptr<LyXKeySym> LyXKeySymPtr;
/// True if lyxfunc reports an error
bool errorStat() const { return errorstat; }
/// Buffer to store result messages
- void setMessage(string const & m) const;
+ void setMessage(std::string const & m) const;
/// Buffer to store result messages
- void setErrorMessage(string const &) const;
+ void setErrorMessage(std::string const &) const;
/// Buffer to store result messages from getStatus
- void setStatusMessage(string const &) const;
+ void setStatusMessage(std::string const &) const;
/// Buffer to store result messages
- string const getMessage() const { return dispatch_buffer; }
+ std::string const getMessage() const { return dispatch_buffer; }
/// Buffer to store result messages
- string const getStatusMessage() const { return status_buffer; }
+ std::string const getStatusMessage() const { return status_buffer; }
/// Handle a accented char key sequence
void handleKeyFunc(kb_action action);
/** Buffer to store messages and result data. Is there a
good reason to have this one as static in Dispatch? (Ale)
*/
- mutable string dispatch_buffer;
+ mutable std::string dispatch_buffer;
/** Buffer to store messages and result data from getStatus
*/
- mutable string status_buffer;
+ mutable std::string status_buffer;
/// send a post-dispatch status message
- void sendDispatchMessage(string const & msg, FuncRequest const & ev, bool verbose);
+ void sendDispatchMessage(std::string const & msg, FuncRequest const & ev, bool verbose);
// I think the following should be moved to BufferView. (Asger)
///
- void menuNew(string const & argument, bool fromTemplate);
+ void menuNew(std::string const & argument, bool fromTemplate);
///
- void open(string const &);
+ void open(std::string const &);
///
- void doImport(string const &);
+ void doImport(std::string const &);
///
void closeBuffer();
#include "support/std_sstream.h"
using std::ostringstream;
+using std::string;
LyXGlueLength::LyXGlueLength(LyXLength const & len)
#include "lyxlength.h"
-#include "support/std_string.h"
-
class LyXGlueLength {
public:
1.2 cm // 4mm +2pt // 2cm -4mm +2mm // 4+0.1-0.2cm
The traditional Latex format is also accepted, like
4cm plus 10pt minus 10pt */
- explicit LyXGlueLength(string const & data);
+ explicit LyXGlueLength(std::string const & data);
///
LyXLength const & len() const;
/// conversion
- string const asString() const;
+ std::string const asString() const;
///
- string const asLatexString() const;
+ std::string const asLatexString() const;
- friend bool isValidGlueLength(string const & data,
+ friend bool isValidGlueLength(std::string const & data,
LyXGlueLength* result);
private:
bool operator!=(LyXGlueLength const & l1, LyXGlueLength const & l2);
/** If "data" is valid, the length represented by it is
stored into "result", if that is not 0. */
-bool isValidGlueLength(string const & data, LyXGlueLength * result = 0);
+bool isValidGlueLength(std::string const & data, LyXGlueLength * result = 0);
#endif // LYXGLUELENGTH_H
using lyx::support::trim;
using std::endl;
+using std::string;
// The order of the LayoutTags enum is no more important. [asierra300396]
}
lexrc.popTable();
- if (labelstring_appendix_.empty())
+ if (labelstring_appendix_.empty())
labelstring_appendix_ = labelstring_;
return error;
}
#include "lyxfont.h"
#include "layout.h"
#include "Spacing.h"
-#include "support/std_string.h"
+
+#include <string>
class LyXLex;
class LyXTextClass;
///
void readSpacing(LyXLex &);
///
- string const & name() const;
+ std::string const & name() const;
///
- void setName(string const & n);
+ void setName(std::string const & n);
///
- string const & obsoleted_by() const;
+ std::string const & obsoleted_by() const;
///
- string const & depends_on() const;
+ std::string const & depends_on() const;
///
- string const & latexname() const { return latexname_; }
+ std::string const & latexname() const { return latexname_; }
///
- string const & labelstring() const { return labelstring_; }
+ std::string const & labelstring() const { return labelstring_; }
///
- string const & endlabelstring() const { return endlabelstring_; }
+ std::string const & endlabelstring() const { return endlabelstring_; }
///
- string const & preamble() const { return preamble_; }
+ std::string const & preamble() const { return preamble_; }
///
- string const & latexparam() const { return latexparam_; }
+ std::string const & latexparam() const { return latexparam_; }
///
- string const & labelstring_appendix() const {
+ std::string const & labelstring_appendix() const {
return labelstring_appendix_;
}
/** Default font for this layout/environment.
LyXFont reslabelfont;
/// Text that dictates how wide the left margin is on the screen
- string leftmargin;
+ std::string leftmargin;
/// Text that dictates how wide the right margin is on the screen
- string rightmargin;
+ std::string rightmargin;
/// Text that dictates how much space to leave after a potential label
- string labelsep;
+ std::string labelsep;
/// Text that dictates how much space to leave before a potential label
- string labelindent;
+ std::string labelindent;
/// Text that dictates the width of the indentation of indented pars
- string parindent;
+ std::string parindent;
///
float parskip;
///
/// show this in toc
int toclevel;
/// for new environment insets
- string latexheader;
+ std::string latexheader;
/// for new environment insets
- string latexfooter;
+ std::string latexfooter;
/// for new environment insets
- string latexparagraph;
+ std::string latexparagraph;
/** true when the fragile commands in the paragraph need to be
\protect'ed. */
/// Does this layout allow for an optional parameter?
int optionalargs;
/// Which counter to step
- string counter;
+ std::string counter;
private:
/// Name of the layout/paragraph environment
- string name_;
+ std::string name_;
/** Name of an layout that has replaced this layout.
This is used to rename a layout, while keeping backward
compatibility
*/
- string obsoleted_by_;
+ std::string obsoleted_by_;
/** Name of an layout which preamble must come before this one
This is used when the preamble snippet uses macros defined in
another preamble
*/
- string depends_on_;
+ std::string depends_on_;
/// LaTeX name for environment
- string latexname_;
+ std::string latexname_;
/// Label string. "Abstract", "Reference", "Caption"...
- string labelstring_;
+ std::string labelstring_;
///
- string endlabelstring_;
+ std::string endlabelstring_;
/// Label string inside appendix. "Appendix", ...
- string labelstring_appendix_;
+ std::string labelstring_appendix_;
/// LaTeX parameter for environment
- string latexparam_;
+ std::string latexparam_;
/// Macro definitions needed for this layout
- string preamble_;
+ std::string preamble_;
};
#endif
using std::abs;
using std::ostringstream;
+using std::string;
LyXLength::LyXLength()
#ifndef LYX_LENGTH_H
#define LYX_LENGTH_H
-#include "support/std_string.h"
+#include <string>
/**
* LyXLength - Represents latex length measurement
LyXLength(double v, LyXLength::UNIT u);
/// "data" must be a decimal number, followed by a unit
- explicit LyXLength(string const & data);
+ explicit LyXLength(std::string const & data);
///
double value() const;
///
bool empty() const;
/// return string representation
- string const asString() const;
+ std::string const asString() const;
/// return string representation for LaTeX
- string const asLatexString() const;
+ std::string const asLatexString() const;
/// return the on-screen size of this length
int inPixels(int text_width, int em_width = 0) const;
/// return the on-screen size of this length of an image
int inBP() const;
- friend bool isValidLength(string const & data, LyXLength * result);
+ friend bool isValidLength(std::string const & data, LyXLength * result);
private:
///
bool operator!=(LyXLength const & l1, LyXLength const & l2);
/** If "data" is valid, the length represented by it is
stored into "result", if that is not 0. */
-bool isValidLength(string const & data, LyXLength * result = 0);
+bool isValidLength(std::string const & data, LyXLength * result = 0);
/// return the name of the given unit number
char const * stringFromUnit(int unit);
using lyx::support::trim;
using std::endl;
-
+using std::string;
using std::istream;
using std::ostream;
#ifndef LYXLEX_H
#define LYXLEX_H
+#include <boost/utility.hpp>
+
#include <iosfwd>
-#include "support/std_string.h"
-#include <boost/utility.hpp>
///
struct keyword_item {
/// file is open and end of file is not reached
bool isOK() const;
/// return true if able to open file, else false
- bool setFile(string const & filename);
+ bool setFile(std::string const & filename);
///
void setStream(std::istream & is);
///
*/
bool nextToken();
/// Push a token, that next token got from lyxlex.
- void pushToken(string const &);
+ void pushToken(std::string const &);
///
int getLineNo() const;
///
float getFloat() const;
///
- string const getString() const;
+ std::string const getString() const;
/** Get a long string, ended by the tag `endtag'.
This string can span several lines. The first line
each following line. This mechanism does not work
perfectly if you use tabs.
*/
- string const getLongString(string const & endtag);
+ std::string const getLongString(std::string const & endtag);
///
bool eatLine();
and file name. If message contains the substring `$$Token',
it is replaced with the value of GetString()
*/
- void printError(string const & message) const;
+ void printError(std::string const & message) const;
/**
Prints the current token table on the supplied ostream.
using std::getline;
using std::lower_bound;
using std::sort;
-
+using std::string;
using std::ios;
using std::istream;
using std::ostream;
///
Pimpl(keyword_item * tab, int num);
///
- string const getString() const;
+ std::string const getString() const;
///
- void printError(string const & message) const;
+ void printError(std::string const & message) const;
///
void printTable(std::ostream & os);
///
///
void popTable();
///
- bool setFile(string const & filename);
+ bool setFile(std::string const & filename);
///
void setStream(std::istream & i);
///
///
bool nextToken();
///
- void pushToken(string const &);
+ void pushToken(std::string const &);
/// fb__ is only used to open files, the stream is accessed through is.
std::filebuf fb__;
/// gz__ is only used to open files, the stream is accessed through is.
/// the stream that we use.
std::istream is;
///
- string name;
+ std::string name;
///
keyword_item * table;
///
///
int lineno;
///
- string pushTok;
+ std::string pushTok;
///
char commentChar;
private:
using std::ios;
using std::ofstream;
using std::ostream;
+using std::string;
namespace lyx {
#include "paper.h"
#include "graphics/GraphicsTypes.h"
-#include "support/std_string.h"
+#include <string>
+
/// This contains the runtime configuration of LyX
class LyXRC //: public noncopyable {
///
void setDefaults();
///
- int read(string const & filename);
+ int read(std::string const & filename);
///
- void write(string const & filename) const;
+ void write(std::string const & filename) const;
///
void print() const;
///
void output(std::ostream & os) const;
///
- static string const getDescription(LyXRCTags);
+ static std::string const getDescription(LyXRCTags);
///
- string bind_file;
+ std::string bind_file;
///
- string ui_file;
+ std::string ui_file;
///
- string printer;
+ std::string printer;
///
- string print_command;
+ std::string print_command;
///
- string print_evenpage_flag;
+ std::string print_evenpage_flag;
///
- string print_oddpage_flag;
+ std::string print_oddpage_flag;
///
- string print_pagerange_flag;
+ std::string print_pagerange_flag;
///
- string print_copies_flag;
+ std::string print_copies_flag;
///
- string print_collcopies_flag;
+ std::string print_collcopies_flag;
///
- string print_reverse_flag;
+ std::string print_reverse_flag;
///
- string print_landscape_flag;
+ std::string print_landscape_flag;
///
- string print_to_printer;
+ std::string print_to_printer;
///
bool print_adapt_output;
///
- string print_to_file;
+ std::string print_to_file;
///
- string print_file_extension;
+ std::string print_file_extension;
///
- string print_extra_options;
+ std::string print_extra_options;
///
- string print_spool_command;
+ std::string print_spool_command;
///
- string print_spool_printerprefix;
+ std::string print_spool_printerprefix;
///
- string print_paper_flag;
+ std::string print_paper_flag;
///
- string print_paper_dimension_flag;
+ std::string print_paper_dimension_flag;
///
- string custom_export_command;
+ std::string custom_export_command;
///
- string custom_export_format;
+ std::string custom_export_format;
/// postscript interpreter (in general "gs", if it is installed)
- string ps_command;
+ std::string ps_command;
/// option for telling the dvi viewer about the paper size
- string view_dvi_paper_option;
+ std::string view_dvi_paper_option;
/// default paper size for local xdvi/dvips/ghostview/whatever
PAPER_SIZE default_papersize;
/// command to run chktex incl. options
- string chktex_command;
+ std::string chktex_command;
///
- string document_path;
+ std::string document_path;
///
- string template_path;
+ std::string template_path;
///
- string tempdir_path;
+ std::string tempdir_path;
///
bool use_tempdir;
///
///
bool check_lastfiles;
/// filename for lastfiles file
- string lastfiles;
+ std::string lastfiles;
/// maximal number of lastfiles
unsigned int num_lastfiles;
/// shall a backup file be created
bool make_backup;
/// A directory for storing backup files
- string backupdir_path;
+ std::string backupdir_path;
/// Zoom factor for screen fonts
unsigned int zoom;
/// parameter for button_4 and button_5 (scrollwheel)
/// DPI of monitor
float dpi;
///
- string fontenc;
+ std::string fontenc;
///
- string roman_font_name;
+ std::string roman_font_name;
///
- string sans_font_name;
+ std::string sans_font_name;
///
- string typewriter_font_name;
+ std::string typewriter_font_name;
///
- string roman_font_foundry;
+ std::string roman_font_foundry;
///
- string sans_font_foundry;
+ std::string sans_font_foundry;
///
- string typewriter_font_foundry;
+ std::string typewriter_font_foundry;
///
- string popup_bold_font;
+ std::string popup_bold_font;
///
- string popup_normal_font;
+ std::string popup_normal_font;
///
- string font_norm;
+ std::string font_norm;
///
enum FontEncoding {
///
///
void set_font_norm_type();
///
- string popup_font_encoding;
+ std::string popup_font_encoding;
///
unsigned int autosave;
///
- string ascii_roff_command;
+ std::string ascii_roff_command;
///
unsigned int ascii_linelen;
/// use library instead of process
bool use_spell_lib;
/// Ispell command
- string isp_command;
+ std::string isp_command;
/// Accept compound words in spellchecker?
bool isp_accept_compound;
/// Pass input encoding switch to ispell?
/// Use escape chars?
bool isp_use_esc_chars;
/// Alternate language for ispell
- string isp_alt_lang;
+ std::string isp_alt_lang;
/// Alternate personal dictionary file for ispell
- string isp_pers_dict;
+ std::string isp_pers_dict;
/// Escape characters
- string isp_esc_chars;
+ std::string isp_esc_chars;
///
bool use_kbmap;
///
- string primary_kbmap;
+ std::string primary_kbmap;
///
- string secondary_kbmap;
+ std::string secondary_kbmap;
///
- string lyxpipes;
+ std::string lyxpipes;
///
- string date_insert_format;
+ std::string date_insert_format;
///
- string language_package;
+ std::string language_package;
///
bool language_auto_begin;
///
bool language_auto_end;
///
- string language_command_begin;
+ std::string language_command_begin;
///
- string language_command_end;
+ std::string language_command_end;
///
- string language_command_local;
+ std::string language_command_local;
///
bool language_global_options;
///
///
bool mark_foreign_language;
///
- string default_language;
+ std::string default_language;
///
bool cursor_follows_scrollbar;
///
///
float preview_scale_factor;
/// user name
- string user_name;
+ std::string user_name;
/// user email
- string user_email;
+ std::string user_email;
};
///
using lyx::support::unlink;
using std::endl;
+using std::string;
// provide an empty mkfifo() if we do not have one. This disables the
ready = false;
}
+
int LyXComm::startPipe(string const & filename, bool write)
{
int fd;
#ifndef LYXSERVER_H
#define LYXSERVER_H
-#include "support/std_string.h"
-
#include <boost/signals/trackable.hpp>
class LyXFunc;
This is one of the small things that would have been a lot
cleaner with a Signal/Slot thing.
*/
- typedef void (*ClientCallbackfct)(LyXServer *, string const &);
+ typedef void (*ClientCallbackfct)(LyXServer *, std::string const &);
/// Construct with pipe-basename and callback to receive messages
- LyXComm(string const & pip, LyXServer * cli, ClientCallbackfct ccb = 0)
+ LyXComm(std::string const & pip, LyXServer * cli, ClientCallbackfct ccb = 0)
: pipename(pip), client(cli), clientcb(ccb) {
ready = false;
openConnection();
void emergencyCleanup();
/// Send message
- void send(string const &);
+ void send(std::string const &);
/// asynch ready-to-be-read notification
void read_ready();
private:
/// the filename of the in pipe
- string const inPipeName() {
+ std::string const inPipeName() {
return pipename + ".in";
}
/// the filename of the out pipe
- string const outPipeName() {
+ std::string const outPipeName() {
return pipename + ".out";
}
void closeConnection();
/// start a pipe
- int startPipe(string const &, bool);
+ int startPipe(std::string const &, bool);
/// finish a pipe
- void endPipe(int &, string const &, bool);
+ void endPipe(int &, std::string const &, bool);
/// This is -1 if not open
int infd;
bool ready;
/// Base of pipename including path
- string pipename;
+ std::string pipename;
/// The client
LyXServer * client;
// lyxserver is using a buffer that is being edited with a bufferview.
// With a common buffer list this is not a problem, maybe. (Alejandro)
///
- LyXServer(LyXFunc * f, string const & pip)
+ LyXServer(LyXFunc * f, std::string const & pip)
: numclients(0), func(f), pipes(pip, (this), callback) {}
///
~LyXServer();
///
- void notifyClient(string const &);
+ void notifyClient(std::string const &);
/// whilst crashing etc.
void emergencyCleanup() {
private:
///
- static void callback(LyXServer *, string const & msg);
+ static void callback(LyXServer *, std::string const & msg);
/// Names and number of current clients
enum {
///
MAX_CLIENTS = 10
};
///
- string clients[MAX_CLIENTS];
+ std::string clients[MAX_CLIENTS];
///
int numclients;
///
setLayout(LyXCursor & actual_cursor,
LyXCursor & selection_start,
LyXCursor & selection_end,
- string const & layout);
+ std::string const & layout);
///
- void setLayout(string const & layout);
+ void setLayout(std::string const & layout);
/**
* Increase or decrease the nesting depth of the selected paragraph(s)
void toggleFree(LyXFont const &, bool toggleall = false);
///
- string getStringToIndex();
+ std::string getStringToIndex();
/** insert a character, moves all the following breaks in the
same Paragraph one to the right and make a little rebreak
VSpace const & space_bottom,
Spacing const & spacing,
LyXAlignment align,
- string const & labelwidthstring,
+ std::string const & labelwidthstring,
bool noindent);
/* these things are for search and replace */
/** simple replacing. The font of the first selected character
is used
*/
- void replaceSelectionWithString(string const & str);
+ void replaceSelectionWithString(std::string const & str);
/// needed to insert the selection
- void insertStringAsLines(string const & str);
+ void insertStringAsLines(std::string const & str);
/// needed to insert the selection
- void insertStringAsParagraphs(string const & str);
+ void insertStringAsParagraphs(std::string const & str);
/// Find next inset of some specified type.
bool gotoNextInset(std::vector<InsetOld::Code> const & codes,
- string const & contents = string());
+ std::string const & contents = std::string());
///
void gotoInset(std::vector<InsetOld::Code> const & codes,
bool same_content);
using std::endl;
using std::find_if;
using std::remove_if;
-
+using std::string;
using std::ostream;
#include "lyxlayout.h"
#include "lyxlayout_ptr_fwd.h"
-#include "support/std_string.h"
-
#include <boost/shared_ptr.hpp>
#include <vector>
typedef LayoutList::const_iterator const_iterator;
/// Construct a layout with default values. Actual values loaded later.
explicit
- LyXTextClass(string const & = string(),
- string const & = string(),
- string const & = string(),
+ LyXTextClass(std::string const & = std::string(),
+ std::string const & = std::string(),
+ std::string const & = std::string(),
bool = false);
/// check whether the TeX class is available
const_iterator end() const { return layoutlist_.end(); }
/// Performs the read of the layout file.
- bool Read(string const & filename, bool merge = false);
+ bool Read(std::string const & filename, bool merge = false);
///
void readOutputType(LyXLex &);
///
///
void readCounter(LyXLex &);
///
- bool hasLayout(string const & name) const;
+ bool hasLayout(std::string const & name) const;
///
- LyXLayout_ptr const & operator[](string const & vname) const;
+ LyXLayout_ptr const & operator[](std::string const & vname) const;
/// Sees to that the textclass structure has been loaded
bool load() const;
/// The Counters present in this document class.
Counters & counters() const;
///
- string const & defaultLayoutName() const;
+ std::string const & defaultLayoutName() const;
///
LyXLayout_ptr const & defaultLayout() const;
///
- string const & name() const;
+ std::string const & name() const;
///
- string const & latexname() const;
+ std::string const & latexname() const;
///
- string const & description() const;
+ std::string const & description() const;
///
- string const & opt_fontsize() const;
+ std::string const & opt_fontsize() const;
///
- string const & opt_pagestyle() const;
+ std::string const & opt_pagestyle() const;
///
- string const & options() const;
+ std::string const & options() const;
///
- string const & pagestyle() const;
+ std::string const & pagestyle() const;
///
- string const & preamble() const;
+ std::string const & preamble() const;
/// Packages that are already loaded by the class
enum Provides {
LyXFont const & defaultfont() const;
/// Text that dictates how wide the left margin is on the screen
- string const & leftmargin() const;
+ std::string const & leftmargin() const;
/// Text that dictates how wide the right margin is on the screen
- string const & rightmargin() const;
+ std::string const & rightmargin() const;
/// The type of command used to produce a title
LYX_TITLE_LATEX_TYPES titletype() const;
/// The name of the title command
- string const & titlename() const;
+ std::string const & titlename() const;
///
int size() const;
private:
///
- bool delete_layout(string const &);
+ bool delete_layout(std::string const &);
///
bool do_readStyle(LyXLex &, LyXLayout &);
/// Layout file name
- string name_;
+ std::string name_;
/// document class name
- string latexname_;
+ std::string latexname_;
/// document class description
- string description_;
+ std::string description_;
/// Specific class options
- string opt_fontsize_;
+ std::string opt_fontsize_;
///
- string opt_pagestyle_;
+ std::string opt_pagestyle_;
///
- string options_;
+ std::string options_;
///
- string pagestyle_;
+ std::string pagestyle_;
///
- string defaultlayout_;
+ std::string defaultlayout_;
/// preamble text to support layout styles
- string preamble_;
+ std::string preamble_;
/// latex packages loaded by document class.
Provides provides_;
///
*/
LyXFont defaultfont_;
/// Text that dictates how wide the left margin is on the screen
- string leftmargin_;
+ std::string leftmargin_;
/// Text that dictates how wide the right margin is on the screen
- string rightmargin_;
+ std::string rightmargin_;
/// The type of command used to produce a title
LYX_TITLE_LATEX_TYPES titletype_;
/// The name of the title command
- string titlename_;
+ std::string titlename_;
/// Paragraph styles used in this layout
LayoutList layoutlist_;
using std::find_if;
using std::make_pair;
using std::sort;
-
+using std::string;
using std::pair;
#include <boost/utility.hpp>
-#include "support/std_string.h"
-
#include <vector>
class LyXTextClass;
/// Gets textclass number from name, -1 if textclass name does not exist
std::pair<bool, lyx::textclass_type> const
- NumberOfClass(string const & textclass) const;
+ NumberOfClass(std::string const & textclass) const;
///
LyXTextClass const & operator[](lyx::textclass_type textclass) const;
using lyx::support::tempName;
using std::endl;
-
+using std::string;
using std::pair;
#ifndef LYX_VC_H
#define LYX_VC_H
-#include "support/std_string.h"
+#include <string>
+
class VCS;
class Buffer;
the appropiate actions is taken. Returns true if the file is under
control by a VCS.
*/
- bool file_found_hook(string const & fn);
+ bool file_found_hook(std::string const & fn);
/** This function should be run when a file is requested for loading,
but it does not exist. This function will then check for a VC master
viewing/editing. Returns true if the file is under control by a VCS
and the user wants to view/edit it.
*/
- static bool file_not_found_hook(string const & fn);
+ static bool file_not_found_hook(std::string const & fn);
///
void buffer(Buffer *);
* It is the caller's responsibility to unlink the
* file after use.
*/
- const string getLogFile() const;
+ const std::string getLogFile() const;
///
void toggleReadOnly();
bool inUse();
/// Returns the version number.
- //string const & version() const;
+ //std::string const & version() const;
/// Returns the version number.
- string const versionString() const;
+ std::string const versionString() const;
/// Returns the userid of the person who has locked the doc.
- string const & locker() const;
+ std::string const & locker() const;
private:
///
#include "funcrequest.h"
#include "support/std_sstream.h"
+
+using std::string;
using std::auto_ptr;
using std::ostringstream;
class CommandInset : public MathNestInset {
public:
///
- explicit CommandInset(string const & name);
+ explicit CommandInset(std::string const & name);
///
virtual std::auto_ptr<InsetBase> clone() const;
///
///
dispatch_result dispatch(FuncRequest const & cmd, idx_type & idx, pos_type & pos);
///
- virtual string const screenLabel() const;
+ virtual std::string const screenLabel() const;
/// generate something that will be understood by the Dialogs.
- string const createDialogStr(string const & name) const;
+ std::string const createDialogStr(std::string const & name) const;
- string const & commandname() const { return name_; }
+ std::string const & commandname() const { return name_; }
private:
- string name_;
+ std::string name_;
mutable bool set_label_;
mutable ButtonRenderer button_;
};
#include "support/std_sstream.h"
+using std::string;
using std::ostream;
using std::ostringstream;
using std::vector;
///
explicit InsetFormula(BufferView *);
///
- explicit InsetFormula(string const & data);
+ explicit InsetFormula(std::string const & data);
///
InsetFormula(InsetFormula const &);
///
bool insetAllowed(InsetOld::Code code) const;
/// Appends \c list with all labels found within this inset.
void getLabelList(Buffer const &,
- std::vector<string> & list) const;
+ std::vector<std::string> & list) const;
///
MathAtom const & par() const { return par_; }
///
///
void addPreview(lyx::graphics::PreviewLoader &) const;
///
- void mutate(string const & type);
+ void mutate(std::string const & type);
private:
/// available in AMS only?
using lyx::support::split;
using lyx::support::token;
+using std::string;
using std::abs;
using std::endl;
using std::max;
bool b;
bv_funcs::string2font(arg, font, b);
if (font.color() != LColor::inherit) {
- MathAtom at = createMathInset("color");
+ MathAtom at = createMathInset("color");
asArray(lcolor.getGUIName(font.color()), at.nucleus()->cell(0));
mathcursor->handleNest(at, 1);
}
///
virtual InsetOld::Code lyxCode() const;
/// what appears in the minibuffer when opening
- virtual string const editMessage() const;
+ virtual std::string const editMessage() const;
///
virtual void fitInsetCursor(BufferView *) const;
/// FIXME
BufferView * view() const;
///
- virtual bool searchForward(BufferView *, string const &,
+ virtual bool searchForward(BufferView *, std::string const &,
bool = true, bool = false);
///
- virtual bool searchBackward(BufferView *, string const &,
+ virtual bool searchBackward(BufferView *, std::string const &,
bool = true, bool = false);
///
virtual bool isTextInset() const { return true; }
virtual EDITABLE editable() const { return HIGHLY_EDITABLE; }
///
bool display() const;
- // return the selection as string
- string selectionAsString() const;
+ // return the selection as std::string
+ std::string selectionAsString() const;
private:
/// unimplemented
void operator=(const InsetFormulaBase &);
/// common base for handling accents
- void handleAccent(BufferView * bv, string const & arg, string const & name);
+ void handleAccent(BufferView * bv, std::string const & arg, std::string const & name);
/// lfun handler
dispatch_result lfunMousePress(FuncRequest const &);
///
protected:
///
- void handleFont(BufferView * bv, string const & arg, string const & font);
+ void handleFont(BufferView * bv, std::string const & arg, std::string const & font);
///
- void handleFont2(BufferView * bv, string const & arg);
+ void handleFont2(BufferView * bv, std::string const & arg);
///
mutable int xo_;
using lyx::support::bformat;
+using std::string;
using std::auto_ptr;
using std::ostream;
///
InsetFormulaMacro();
/// construct a macro hull from its name and the number of arguments
- explicit InsetFormulaMacro(string const & name, int nargs, string const & t);
+ explicit InsetFormulaMacro(std::string const & name, int nargs, std::string const & t);
/// constructs a mocro from its LaTeX definition
- explicit InsetFormulaMacro(string const & s);
+ explicit InsetFormulaMacro(std::string const & s);
///
void metrics(MetricsInfo & mi, Dimension & dim) const;
///
///
void read(std::istream & is);
/// prefix in inset
- string prefix() const;
+ std::string prefix() const;
};
#endif
#include "math_streamstr.h"
#include "math_support.h"
+using std::string;
using std::auto_ptr;
class MathAMSArrayInset : public MathGridInset {
public:
///
- MathAMSArrayInset(string const & name, int m, int n);
+ MathAMSArrayInset(std::string const & name, int m, int n);
///
- MathAMSArrayInset(string const & name);
+ MathAMSArrayInset(std::string const & name);
///
virtual std::auto_ptr<InsetBase> clone() const;
///
char const * name_right() const;
///
- string name_;
+ std::string name_;
};
#endif
using std::getline;
+using std::string;
using std::auto_ptr;
using std::istringstream;
using std::istream_iterator;
class MathArrayInset : public MathGridInset {
public:
///
- MathArrayInset(string const &, int m, int n);
+ MathArrayInset(std::string const &, int m, int n);
///
- MathArrayInset(string const &, int m, int n,
- char valign, string const & halign);
+ MathArrayInset(std::string const &, int m, int n,
+ char valign, std::string const & halign);
///
- MathArrayInset(string const &, char valign, string const & halign);
+ MathArrayInset(std::string const &, char valign, std::string const & halign);
/// convienience constructor from whitespace/newline seperated data
- MathArrayInset(string const &, string const & str);
+ MathArrayInset(std::string const &, std::string const & str);
///
virtual std::auto_ptr<InsetBase> clone() const;
///
private:
///
- string name_;
+ std::string name_;
};
#endif
using lyx::support::LibFileSearch;
+using std::string;
using std::ifstream;
using std::istream;
using std::istringstream;
#include "math_mathmlstream.h"
#include "math_streamstr.h"
+
+using std::string;
using std::auto_ptr;
#define MATH_BIGINSET_H
#include "math_diminset.h"
-#include "support/std_string.h"
+#include <string>
/// Inset for \bigl & Co.
class MathBigInset : public MathDimInset {
public:
///
- MathBigInset(string const & name, string const & delim);
+ MathBigInset(std::string const & name, std::string const & delim);
///
virtual std::auto_ptr<InsetBase> clone() const;
///
double increase() const;
/// \bigl or what?
- string const name_;
+ std::string const name_;
/// ( or [ or Vert...
- string const delim_;
+ std::string const delim_;
};
#endif
#include "math_streamstr.h"
#include "support/std_ostream.h"
+using std::string;
using std::auto_ptr;
#define MATH_BOXINSET_H
#include "math_nestinset.h"
-#include "support/std_string.h"
+
+#include <string>
class LyXFont;
class MathBoxInset : public MathNestInset {
public:
///
- explicit MathBoxInset(string const & name);
+ explicit MathBoxInset(std::string const & name);
///
virtual std::auto_ptr<InsetBase> clone() const;
///
private:
///
- string name_;
+ std::string name_;
};
#include "math_support.h"
#include "support/std_ostream.h"
+using std::string;
using std::auto_ptr;
///
MathCommentInset();
///
- explicit MathCommentInset(string const &);
+ explicit MathCommentInset(std::string const &);
///
virtual std::auto_ptr<InsetBase> clone() const;
///
//#define FILEDEBUG 1
+using std::string;
using std::endl;
#ifndef CXX_GLOBAL_CSTD
using std::isalpha;
#include "math_inset.h"
#include "math_iterator.h"
-#include "support/std_string.h"
+
+#include <string>
+
class InsetFormulaBase;
class BufferView;
///
void insert(MathArray const &);
///
- void insert2(string const &);
+ void insert2(std::string const &);
///
- void paste(string const & data);
+ void paste(std::string const & data);
/// return false for empty math insets
bool erase();
/// return false for empty math insets
///
void niceInsert(MathAtom const &);
///
- void niceInsert(string const &);
+ void niceInsert(std::string const &);
/// in pixels from top of screen
void setPos(int x, int y);
void selClearOrDel();
/// draws light-blue selection background
void drawSelection(PainterInfo & pi) const;
- /// replace selected stuff with at, placing the former
+ /// replace selected stuff with at, placing the former
// selection in given cell of atom
void handleNest(MathAtom const & at, int cell = 0);
/// remove this as soon as LyXFunc::getStatus is "localized"
- string getLastCode() const { return "mathnormal"; }
+ std::string getLastCode() const { return "mathnormal"; }
///
bool isInside(MathInset const *) const;
///
/// local dispatcher
dispatch_result dispatch(FuncRequest const & cmd);
/// describe the situation
- string info() const;
+ std::string info() const;
/// dump selection information for debugging
void seldump(char const * str) const;
/// dump selection information for debugging
/// moves on
void setSelection(MathIterator const & where, size_type n);
/// grab selection marked by anchor and current cursor
- string grabSelection() const;
+ std::string grabSelection() const;
/// guess what
- string grabAndEraseSelection();
+ std::string grabAndEraseSelection();
///
void insert(char c);
///
- void insert(string const & str);
+ void insert(std::string const & str);
/// lock/unlock inset
void insetToggle();
/// injects content of a cell into parent
void pullArg();
/// split font inset etc
- void handleFont(string const & font);
+ void handleFont(std::string const & font);
private:
/// moves cursor index one cell to the left
void eraseSelection();
/// the name of the macro we are currently inputting
- string macroName() const;
+ std::string macroName() const;
/// where in the curent cell does the macro name start?
difference_type macroNamePos() const;
/// can we enter the inset?
#include "math_support.h"
+using std::string;
using std::max;
using std::auto_ptr;
#define MATH_DELIMINSET_H
#include "math_nestinset.h"
-#include "support/std_string.h"
+
+#include <string>
/// A delimiter
class MathDelimInset : public MathNestInset {
public:
///
- MathDelimInset(string const & left, string const & right);
+ MathDelimInset(std::string const & left, std::string const & right);
///
- MathDelimInset(string const & left, string const & right, MathArray const &);
+ MathDelimInset(std::string const & left, std::string const & right, MathArray const &);
///
virtual std::auto_ptr<InsetBase> clone() const;
///
///
void octave(OctaveStream &) const;
///
- string left_;
+ std::string left_;
///
- string right_;
+ std::string right_;
private:
///
mutable int dw_;
#include "math_support.h"
#include "math_parser.h"
+
+using std::string;
using std::auto_ptr;
///
void draw(PainterInfo & pi, int x, int y) const;
///
- string name() const;
+ std::string name() const;
protected:
/// cache for the thing's height
mutable int dh_;
#include "math_streamstr.h"
#include "support/std_ostream.h"
+
+using std::string;
using std::auto_ptr;
#include "math_nestinset.h"
+#include <string>
+
/// Environtments á la \begin{something}...\end{something}
class MathEnvInset : public MathNestInset {
public:
///
- MathEnvInset(string const & name_);
+ MathEnvInset(std::string const & name_);
///
virtual std::auto_ptr<InsetBase> clone() const;
///
private:
/// name of that environment
- string name_;
+ std::string name_;
};
#endif
#include "math_streamstr.h"
#include "math_support.h"
+
+using std::string;
using std::auto_ptr;
#include "math_nestinset.h"
+#include <string>
+
+
// f(x) in one block (as opposed to 'f','(','x',')' or 'f','x')
// for interfacing external programs
class MathExFuncInset : public MathNestInset {
public:
///
- explicit MathExFuncInset(string const & name);
+ explicit MathExFuncInset(std::string const & name);
///
- MathExFuncInset(string const & name, MathArray const & ar);
+ MathExFuncInset(std::string const & name, MathArray const & ar);
///
virtual std::auto_ptr<InsetBase> clone() const;
///
///
void draw(PainterInfo & pi, int x, int y) const;
///
- string name() const;
+ std::string name() const;
///
void maple(MapleStream &) const;
private:
///
- string const name_;
+ std::string const name_;
};
#endif
#include "math_streamstr.h"
#include "math_symbolinset.h"
#include "debug.h"
+
#include <boost/scoped_ptr.hpp>
+using std::string;
using std::auto_ptr;
using std::endl;
#include "math_nestinset.h"
+#include <string>
+
+
// cell(0) is stuff before the 'd', cell(1) the stuff after
class MathExIntInset : public MathNestInset {
public:
///
- explicit MathExIntInset(string const & name_);
+ explicit MathExIntInset(std::string const & name_);
///
virtual std::auto_ptr<InsetBase> clone() const;
///
- void symbol(string const &);
+ void symbol(std::string const &);
///
void metrics(MetricsInfo & mi, Dimension & dim) const;
///
bool hasScripts() const;
///
- string symbol_;
+ std::string symbol_;
};
#endif
using lyx::support::RunCommand;
using lyx::support::subst;
+using std::string;
using std::endl;
using std::find_if;
#ifndef MATH_EXTERN_H
#define MATH_EXTERN_H
+#include <string>
-#include "support/std_string.h"
class NormalStream;
class MapleStream;
bool extractNumber(MathArray const & ar, int & i);
bool extractNumber(MathArray const & ar, double & i);
-MathArray pipeThroughExtern(string const & lang, string const & extra,
+MathArray pipeThroughExtern(std::string const & lang, std::string const & extra,
MathArray const & ar);
#endif
using lyx::support::LibFileSearch;
using lyx::support::split;
+using std::string;
using std::endl;
using std::istringstream;
#define MATH_FACTORY_H
-#include "support/std_string.h"
+#include <string>
+
class MathAtom;
class MathArray;
-MathAtom createMathInset(string const &);
+MathAtom createMathInset(std::string const &);
/** Fills ar with the contents of str.
* str is created by the frontend dialog's and returned to the LyX core.
* The function returns true if successful.
*/
-bool createMathInset_fromDialogStr(string const &, MathArray &);
+bool createMathInset_fromDialogStr(std::string const &, MathArray &);
#endif
#include "LaTeXFeatures.h"
#include "support/std_ostream.h"
+using std::string;
using std::auto_ptr;
/// are we in math mode, text mode, or unsure?
mode_type currentMode() const;
///
- string name() const;
+ std::string name() const;
///
void metrics(MetricsInfo & mi, Dimension & dim) const;
///
#include "frontends/Painter.h"
+using std::string;
using std::max;
using std::auto_ptr;
/// identifies FracInsets
MathFracInset const * asFracInset() const;
///
- string name() const;
+ std::string name() const;
///
void write(WriteStream & os) const;
#ifndef MATH_GRIDINFO_H
#define MATH_GRIDINFO_H
-#include "support/std_string.h"
struct ColInfo
{
using std::min;
using std::swap;
+using std::string;
using std::auto_ptr;
using std::istream;
using std::istringstream;
#include "math_nestinset.h"
#include "lyxlength.h"
-#include "support/std_string.h"
/** Gridded math inset base class.
/// a dummy cell before a multicolumn cell
int dummy_;
/// special multi colums alignment
- string align_;
+ std::string align_;
/// these should be a per-cell property, but ok to have it here
/// for single-column grids like paragraphs
mutable int glue_;
/// sets nrows and ncols to 1
MathGridInset();
/// constructor from columns description, creates one row
- MathGridInset(char valign, string const & halign);
+ MathGridInset(char valign, std::string const & halign);
/// Note: columns first!
MathGridInset(col_type m, row_type n);
///
- MathGridInset(col_type m, row_type n, char valign, string const & halign);
+ MathGridInset(col_type m, row_type n, char valign, std::string const & halign);
/// Ensures that the dialog is closed.
~MathGridInset();
///
///
void drawT(TextPainter & pi, int x, int y) const;
///
- void halign(string const & align);
+ void halign(std::string const & align);
///
void halign(char c, col_type col);
///
char halign(col_type col) const;
///
- string halign() const;
+ std::string halign() const;
///
void valign(char c);
///
/// returns y offset of cell compared to inset
int cellYOffset(idx_type idx) const;
/// returns proper 'end of line' code for LaTeX
- virtual string eolString(row_type row, bool fragile = false) const;
+ virtual std::string eolString(row_type row, bool fragile = false) const;
/// returns proper 'end of column' code for LaTeX
- virtual string eocString(col_type col, col_type lastcol) const;
+ virtual std::string eocString(col_type col, col_type lastcol) const;
/// extract number of columns from alignment string
- col_type guessColumns(string const & halign) const;
+ col_type guessColumns(std::string const & halign) const;
/// splits cells and shifts right part to the next cell
void splitCell(idx_type &, pos_type & pos);
using std::endl;
using std::max;
+using std::string;
using std::auto_ptr;
using std::istringstream;
using std::ostringstream;
///
MathHullInset();
///
- explicit MathHullInset(string const & type);
+ explicit MathHullInset(std::string const & type);
///
virtual std::auto_ptr<InsetBase> clone() const;
///
///
void drawT(TextPainter &, int x, int y) const;
///
- string label(row_type row) const;
+ std::string label(row_type row) const;
///
- void label(row_type row, string const & label);
+ void label(row_type row, std::string const & label);
///
void numbered(row_type row, bool num);
///
dispatch_result dispatch(FuncRequest const & cmd, idx_type & idx, pos_type & pos);
/// Appends \c list with all labels found within this inset.
void getLabelList(Buffer const &,
- std::vector<string> & list) const;
+ std::vector<std::string> & list) const;
///
void validate(LaTeXFeatures & features) const;
/// identifies MatrixInsets
void delCol(col_type col);
/// get type
- string const & getType() const;
+ std::string const & getType() const;
/// change type
- void mutate(string const &);
+ void mutate(std::string const &);
///
int defaultColSpace(col_type col);
bool idxLast(idx_type &, pos_type &) const;
///
- string fileInsetLabel() const;
+ std::string fileInsetLabel() const;
///
void write(WriteStream & os) const;
///
protected:
///
- string eolString(row_type row, bool fragile) const;
+ std::string eolString(row_type row, bool fragile) const;
private:
///
- void setType(string const & type);
+ void setType(std::string const & type);
///
void validate1(LaTeXFeatures & features);
///
///
void footer_write(WriteStream &) const;
///
- string nicelabel(row_type row) const;
+ std::string nicelabel(row_type row) const;
///
void doExtern(FuncRequest const & func, idx_type & idx, pos_type & pos);
///
bool colChangeOK() const;
/// "none", "simple", "display", "eqnarray",...
- string type_;
+ std::string type_;
///
std::vector<int> nonum_;
///
- std::vector<string> label_;
+ std::vector<std::string> label_;
};
#endif
#include "formulabase.h"
+
+using std::string;
using std::ostream;
using std::endl;
#ifndef MATH_INSET_H
#define MATH_INSET_H
-#include "support/std_string.h"
#include "insets/insetbase.h"
+#include <string>
+
/**
Abstract base class for all math objects. A math insets is for use of the
virtual bool takesLimits() const { return false; }
/// char char code if possible
- virtual void handleFont(string const &) {}
+ virtual void handleFont(std::string const &) {}
/// is this inset equal to a given other inset?
virtual bool match(MathAtom const &) const { return false; }
/// replace things by other things
/// LyXInset stuff
virtual bool numberedType() const { return false; }
/// hull type
- virtual string const & getType() const;
+ virtual std::string const & getType() const;
/// change type
- virtual void mutate(string const &) {}
+ virtual void mutate(std::string const &) {}
/// how is the inset called in the .lyx file?
- virtual string fileInsetLabel() const;
+ virtual std::string fileInsetLabel() const;
/// usually the latex name
- virtual string name() const;
+ virtual std::string name() const;
protected:
/// a dirty hack
#include "math_support.h"
#include "dimension.h"
+
+using std::string;
using std::auto_ptr;
#include "math_inset.h"
#include "lyxlength.h"
-#include "support/std_string.h"
/// The \kern primitive
///
explicit MathKernInset(LyXLength const & wid);
///
- explicit MathKernInset(string const & wid);
+ explicit MathKernInset(std::string const & wid);
///
virtual std::auto_ptr<InsetBase> clone() const;
///
#include "math_data.h"
#include "support/std_ostream.h"
+
+using std::string;
using std::auto_ptr;
///
virtual std::auto_ptr<InsetBase> clone() const;
///
- string name() const;
+ std::string name() const;
///
void metrics(MetricsInfo & mi, Dimension & dim) const;
///
#include "LaTeXFeatures.h"
+using std::string;
using std::max;
using std::auto_ptr;
using std::endl;
#include "math_data.h"
#include "math_nestinset.h"
#include "metricsinfo.h"
-#include "support/std_string.h"
+
class MathMacroTemplate;
class MathMacro : public MathNestInset {
public:
/// A macro can be built from an existing template
- explicit MathMacro(string const &);
+ explicit MathMacro(std::string const &);
///
MathMacro(MathMacro const &);
///
///
void operator=(MathMacro const &);
///
- string name() const;
+ std::string name() const;
///
bool defining() const;
///
#include "debug.h"
+using std::string;
using std::endl;
#ifndef MATH_MACROTABLE_H
#define MATH_MACROTABLE_H
-#include <map>
-#include "support/std_string.h"
#include "math_atom.h"
+#include <map>
+
class MathMacroTable {
public:
///
static void create(MathAtom const &);
///
- static MathAtom & provide(string const & name);
+ static MathAtom & provide(std::string const & name);
///
- static bool has(string const & name);
+ static bool has(std::string const & name);
///
static void dump();
private:
///
- typedef std::map<string, MathAtom> table_type;
+ typedef std::map<std::string, MathAtom> table_type;
//
static table_type macro_table;
};
#include "debug.h"
#include "LColor.h"
+
+using std::string;
using std::auto_ptr;
using std::endl;
#include "math_data.h"
#include "math_nestinset.h"
-#include "support/std_string.h"
+
+#include <string>
class MathMacro;
+
//class MathMacroTemplate : public MathInset, boost::noncopyable
/// This class contains the macro definition.
///
MathMacroTemplate();
///
- MathMacroTemplate(string const & name, int nargs, string const & type,
+ MathMacroTemplate(std::string const & name, int nargs, std::string const & type,
MathArray const & = MathArray(), MathArray const & = MathArray());
///
explicit MathMacroTemplate(std::istream & is);
///
void numargs(int);
///
- string name() const;
+ std::string name() const;
///
void draw(PainterInfo &, int x, int y) const;
///
///
int numargs_;
///
- string name_;
+ std::string name_;
/// newcommand or renewcommand or def
- string type_;
+ std::string type_;
};
#endif
///
MathMatrixInset(MathGridInset const &);
///
- MathMatrixInset(string const & str);
+ MathMatrixInset(std::string const & str);
///
virtual std::auto_ptr<InsetBase> clone() const;
/// identifies MatrixInsets
#include "math_streamstr.h"
#include "math_support.h"
+
+using std::string;
using std::auto_ptr;
class MathNumberInset : public MathInset {
public:
///
- explicit MathNumberInset(string const & s);
+ explicit MathNumberInset(std::string const & s);
///
virtual std::auto_ptr<InsetBase> clone() const;
///
///
void draw(PainterInfo &, int x, int y) const;
///
- string str() const { return str_; }
+ std::string str() const { return str_; }
///
MathNumberInset * asNumberInset() { return this; }
private:
/// the number as string
- string str_;
+ std::string str_;
};
#endif
#include "math_streamstr.h"
#include "debug.h"
+
+using std::string;
using std::auto_ptr;
using std::endl;
///
void write(WriteStream & os) const;
///
- void setWidth(string const & width);
+ void setWidth(std::string const & width);
///
- void setPosition(string const & pos);
+ void setPosition(std::string const & pos);
private:
/// width on screen
int lyx_width_;
/// width for TeX
- string tex_width_;
+ std::string tex_width_;
/// one of htb
char position_;
};
using std::endl;
using std::fill;
+using std::string;
using std::ios;
using std::istream;
using std::istringstream;
#ifndef MATH_PARSER_H
#define MATH_PARSER_H
+#include <string>
-#include "support/std_string.h"
class MathAtom;
class MathArray;
///
struct latexkeys {
/// name of the macro or primitive
- string name;
+ std::string name;
/// name of a inset that handles that macro
- string inset;
+ std::string inset;
/// position of the ting in a font
- string draw;
+ std::string draw;
/// operator/..., fontname e
- string extra;
+ std::string extra;
/// how is this called as XML entity?
- string xmlname;
+ std::string xmlname;
};
/// check whether this is a well-known (La)TeX macro or primitive
-latexkeys const * in_word_set(string const & str);
+latexkeys const * in_word_set(std::string const & str);
/// parse formula from a string
-bool mathed_parse_normal(MathAtom &, string const &);
+bool mathed_parse_normal(MathAtom &, std::string const &);
/// ... a stream
bool mathed_parse_normal(MathAtom &, std::istream &);
/// ... the LyX lexxer
bool mathed_parse_normal(MathAtom &, LyXLex &);
/// ... the LyX lexxer
-void mathed_parse_normal(MathGridInset &, string const &);
+void mathed_parse_normal(MathGridInset &, std::string const &);
/// parse a single cell from a string
-void mathed_parse_cell(MathArray & ar, string const &);
+void mathed_parse_cell(MathArray & ar, std::string const &);
/// ... a stream
void mathed_parse_cell(MathArray & ar, std::istream &);
#include "math_symbolinset.h"
#include "debug.h"
#include "funcrequest.h"
+
#include <boost/assert.hpp>
+
+using std::string;
using std::max;
using std::auto_ptr;
using std::endl;
#include "LaTeXFeatures.h"
#include "LColor.h"
+
+using std::string;
using std::auto_ptr;
///
explicit MathSpaceInset(int sp);
///
- explicit MathSpaceInset(string const & name);
+ explicit MathSpaceInset(std::string const & name);
///
virtual std::auto_ptr<InsetBase> clone() const;
///
#include "math_mathmlstream.h"
#include "math_streamstr.h"
+
+using std::string;
using std::auto_ptr;
#define MATH_SPLITINSET_H
#include "math_gridinset.h"
-#include "support/std_string.h"
class MathSplitInset : public MathGridInset {
public:
///
- explicit MathSplitInset(string const & name);
+ explicit MathSplitInset(std::string const & name);
///
virtual std::auto_ptr<InsetBase> clone() const;
///
char defaultColAlign(col_type);
private:
///
- string name_;
+ std::string name_;
};
#endif
#include "math_mathmlstream.h"
#include "support/std_ostream.h"
+using std::string;
+
+
WriteStream & operator<<(WriteStream & ws, string const & s)
{
ws << s.c_str();
#ifndef MATH_STREAMSTR_H
#define MATH_STREAMSTR_H
-
-#include "support/std_string.h"
+#include <string>
class WriteStream;
class NormalStream;
// writing strings directly
//
-WriteStream & operator<<(WriteStream & ws, string const & s);
-NormalStream & operator<<(NormalStream & ns, string const & s);
-MapleStream & operator<<(MapleStream & ms, string const & s);
-MaximaStream & operator<<(MaximaStream & ms, string const & s);
-MathematicaStream & operator<<(MathematicaStream & ms, string const & s);
-MathMLStream & operator<<(MathMLStream & ms, string const & s);
-OctaveStream & operator<<(OctaveStream & os, string const & s);
+WriteStream & operator<<(WriteStream & ws, std::string const & s);
+NormalStream & operator<<(NormalStream & ns, std::string const & s);
+MapleStream & operator<<(MapleStream & ms, std::string const & s);
+MaximaStream & operator<<(MaximaStream & ms, std::string const & s);
+MathematicaStream & operator<<(MathematicaStream & ms, std::string const & s);
+MathMLStream & operator<<(MathMLStream & ms, std::string const & s);
+OctaveStream & operator<<(OctaveStream & os, std::string const & s);
#endif
#include "math_streamstr.h"
#include "math_support.h"
+
+using std::string;
using std::auto_ptr;
class MathStringInset : public MathInset {
public:
///
- explicit MathStringInset(string const & s);
+ explicit MathStringInset(std::string const & s);
///
virtual std::auto_ptr<InsetBase> clone() const;
///
///
void draw(PainterInfo & pi, int x, int y) const;
///
- string str() const { return str_; }
+ std::string str() const { return str_; }
///
MathStringInset * asStringInset() { return this; }
private:
/// the string
- string str_;
+ std::string str_;
};
#endif
#include <map>
+
+using std::string;
using std::max;
using std::endl;
#ifndef MATH_SUPPORT_H
#define MATH_SUPPORT_H
-#include "support/std_string.h"
+#include <string>
+
class PainterInfo;
class LyXFont;
int mathed_char_descent(LyXFont const &, unsigned char c);
void mathed_draw_deco(PainterInfo & pi, int x, int y, int w, int h,
- string const & name);
+ std::string const & name);
-void mathed_string_dim(LyXFont const & font, string const & s, Dimension & dim);
-int mathed_string_width(LyXFont const &, string const & s);
+void mathed_string_dim(LyXFont const & font, std::string const & s, Dimension & dim);
+int mathed_string_width(LyXFont const &, std::string const & s);
void drawStr(PainterInfo & pi,
- LyXFont const &, int x, int y, string const & s);
-void drawStrRed(PainterInfo & pi, int x, int y, string const & s);
-void drawStrBlack(PainterInfo & pi, int x, int y, string const & s);
+ LyXFont const &, int x, int y, std::string const & s);
+void drawStrRed(PainterInfo & pi, int x, int y, std::string const & s);
+void drawStrBlack(PainterInfo & pi, int x, int y, std::string const & s);
void drawChar(PainterInfo & pi, LyXFont const & font, int x, int y, char c);
void math_font_max_dim(LyXFont const &, int & asc, int & desc);
-void augmentFont(LyXFont & f, string const & cmd);
+void augmentFont(LyXFont & f, std::string const & cmd);
-bool isFontName(string const & name);
+bool isFontName(std::string const & name);
// converts single cell to string
-string asString(MathArray const & ar);
+std::string asString(MathArray const & ar);
// converts string to single cell
-void asArray(string const & str, MathArray & ar);
+void asArray(std::string const & str, MathArray & ar);
#endif
#include "debug.h"
+using std::string;
using std::auto_ptr;
///
explicit MathSymbolInset(char const * name);
///
- explicit MathSymbolInset(string const & name);
+ explicit MathSymbolInset(std::string const & name);
///
virtual std::auto_ptr<InsetBase> clone() const;
///
/// identifies SymbolInset as such
MathSymbolInset const * asSymbolInset() const { return this; }
/// the LaTeX name of the symbol (without the backslash)
- string name() const;
+ std::string name() const;
///
bool match(MathAtom const &) const;
/// request "external features"
#include <iterator>
+
+using std::string;
using std::auto_ptr;
class MathTabularInset : public MathGridInset {
public:
///
- MathTabularInset(string const &, int m, int n);
+ MathTabularInset(std::string const &, int m, int n);
///
- MathTabularInset(string const &, int m, int n,
- char valign, string const & halign);
+ MathTabularInset(std::string const &, int m, int n,
+ char valign, std::string const & halign);
///
- MathTabularInset(string const &, char valign, string const & halign);
+ MathTabularInset(std::string const &, char valign, std::string const & halign);
///
virtual std::auto_ptr<InsetBase> clone() const;
///
private:
///
- string name_;
+ std::string name_;
};
#endif
#include "math_mathmlstream.h"
#include "math_streamstr.h"
+
+using std::string;
using std::auto_ptr;
class MathUnknownInset : public MathDimInset {
public:
///
- explicit MathUnknownInset(string const & name,
+ explicit MathUnknownInset(std::string const & name,
bool final = true, bool black = false);
///
virtual std::auto_ptr<InsetBase> clone() const;
///
void draw(PainterInfo & pi, int x, int y) const;
///
- void setName(string const & name);
+ void setName(std::string const & name);
///
- string name() const;
+ std::string name() const;
/// identifies UnknownInsets
MathUnknownInset const * asUnknownInset() const { return this; }
/// identifies UnknownInsets
bool final() const;
private:
///
- string name_;
+ std::string name_;
/// are we finished creating the name?
bool final_;
///
#include "math_streamstr.h"
#include "math_support.h"
+
+using std::string;
using std::auto_ptr;
#define MATH_XARROWINSET_H
#include "math_fracbase.h"
-#include "support/std_string.h"
/// Wide arrows like \xrightarrow
class MathXArrowInset : public MathFracbaseInset {
public:
///
- explicit MathXArrowInset(string const & name);
+ explicit MathXArrowInset(std::string const & name);
///
virtual std::auto_ptr<InsetBase> clone() const;
///
///
bool upper() const;
///
- string const name_;
+ std::string const name_;
};
#endif
#include "frontends/Dialogs.h"
+using std::string;
using std::auto_ptr;
using std::endl;
///
RefInset();
///
- explicit RefInset(string const & data);
+ explicit RefInset(std::string const & data);
///
virtual std::auto_ptr<InsetBase> clone() const;
///
///
dispatch_result dispatch(FuncRequest const & cmd, idx_type & idx, pos_type & pos);
///
- string const screenLabel() const;
+ std::string const screenLabel() const;
///
void validate(LaTeXFeatures & features) const;
///
struct ref_type_info {
///
- string latex_name;
+ std::string latex_name;
///
- string gui_name;
+ std::string gui_name;
///
- string short_gui_name;
+ std::string short_gui_name;
};
static ref_type_info types[];
///
- static int getType(string const & name);
+ static int getType(std::string const & name);
///
- static string const & getName(int type);
+ static std::string const & getName(int type);
};
#endif
using lyx::support::GetEnvPath;
using lyx::support::lyx_localedir;
+using std::string;
+
#ifdef ENABLE_NLS
#ifndef MESSAGES_H
#define MESSAGES_H
-#include "support/std_string.h"
-
#include <boost/scoped_ptr.hpp>
///
///
Messages();
///
- Messages(string const & l);
+ Messages(std::string const & l);
///
~Messages();
///
- string const get(string const & msg) const;
+ std::string const get(std::string const & msg) const;
private:
class Pimpl;
boost::scoped_ptr<Pimpl> pimpl_;
#include "BufferView.h"
#include "LColor.h"
+using std::string;
MetricsBase::MetricsBase()
{
orig_.setColor(lcolor.getFromGUIName(save_));
}
-
-
#define METRICSINFO_H
#include "lyxfont.h"
-#include "support/std_string.h"
+
+#include <string>
class Painter;
class BufferView;
/// current math style (display/text/script/..)
Styles style;
/// name of current font - mathed specific
- string fontname;
+ std::string fontname;
/// This is the width available in pixels
int textwidth;
};
// temporarily change the used color
-struct ColorChanger : public Changer<LyXFont, string> {
+struct ColorChanger : public Changer<LyXFont, std::string> {
///
- ColorChanger(LyXFont & font, string const & color);
+ ColorChanger(LyXFont & font, std::string const & color);
///
~ColorChanger();
};
using lyx::support::subst;
using std::endl;
-
+using std::string;
using std::ostream;
using std::ostringstream;
#include "support/types.h"
-#include "support/std_string.h"
class Buffer;
class BufferParams;
bool isMultiLingual(BufferParams const &);
///
- string const asString(Buffer const &, bool label) const;
+ std::string const asString(Buffer const &, bool label) const;
///
- string const asString(Buffer const &, lyx::pos_type beg, lyx::pos_type end,
+ std::string const asString(Buffer const &, lyx::pos_type beg, lyx::pos_type end,
bool label) const;
///
int beginningOfBody() const;
///
- string const & getLabelstring() const;
+ std::string const & getLabelstring() const;
/// the next two functions are for the manual labels
- string const getLabelWidthString() const;
+ std::string const getLabelWidthString() const;
///
- void setLabelWidthString(string const & s);
+ void setLabelWidthString(std::string const & s);
///
char getAlign() const;
/// The nesting depth of a paragraph
using lyx::support::subst;
using std::endl;
-
+using std::string;
using std::istringstream;
using std::ostream;
#include "ParagraphList_fwd.h"
#include "support/types.h"
-#include "support/std_string.h"
+#include <string>
+
class Buffer;
class BufferParams;
std::ostream & ofs,
TexRow & texrow,
LatexRunParams const &,
- string const & everypar = string());
+ std::string const & everypar = std::string());
/// read a paragraph from a .lyx file. Returns number of unrecognised tokens
int readParagraph(Buffer & buf, Paragraph & par, LyXLex & lex);
using std::endl;
using std::upper_bound;
-using std::lower_bound;
-
+using std::string;
using std::ostream;
///
lyx::pos_type size() const { return owner_->size(); }
/// match a string against a particular point in the paragraph
- bool isTextAt(string const & str, lyx::pos_type pos) const;
+ bool isTextAt(std::string const & str, lyx::pos_type pos) const;
/// for recording and looking up changes in revision tracking mode
boost::scoped_ptr<Changes> changes_;
#include <boost/assert.hpp>
using std::endl;
+using std::string;
PSpell::PSpell(BufferParams const &, string const & lang)
/**
* Initialise the spellchecker with the given buffer params and language.
*/
- PSpell(BufferParams const & params, string const & lang);
+ PSpell(BufferParams const & params, std::string const & lang);
virtual ~PSpell();
virtual void accept(WordLangTuple const &);
/// return the next near miss after a MISSED result
- virtual string const nextMiss();
+ virtual std::string const nextMiss();
/// give an error message on messy exit
- virtual string const error();
+ virtual std::string const error();
private:
/// add a manager of the given language
- void addManager(string const & lang);
+ void addManager(std::string const & lang);
struct Manager {
PspellManager * manager;
PspellConfig * config;
};
- typedef std::map<string, struct Manager> Managers;
+ typedef std::map<std::string, struct Manager> Managers;
/// the managers
Managers managers_;
#include "support/textutils.h"
-using std::max;
using lyx::pos_type;
+using std::max;
+using std::string;
extern int PAPER_MARGIN;
extern int CHANGEBAR_MARGIN;
using std::ostream;
using std::pair;
+using std::string;
namespace sgml {
#include "support/types.h"
-#include "support/std_string.h"
#include <iosfwd>
#include <utility>
* to an SGML entity. Returns true
* if it was a whitespace character.
*/
-std::pair<bool, string> escapeChar(char c);
+std::pair<bool, std::string> escapeChar(char c);
/// FIXME
int openTag(std::ostream & os, lyx::depth_type depth,
- bool mixcont, string const & latexname);
+ bool mixcont, std::string const & latexname);
/// FIXME
int closeTag(std::ostream & os, lyx::depth_type depth,
- bool mixcont, string const & latexname);
+ bool mixcont, std::string const & latexname);
}
#endif // SGML_H
+2003-10-06 Lars Gullik Bjønnes <larsbj@gullik.net>
+
+ * std_string.h: delete file
+
2003-10-06 Martin Vermeer <martin.vermeer@hut.fi>
* lstrings.C: Small fixes to build using STLport
#include <cerrno>
+
+using std::string;
+
+
#if !S_IRUSR
# if S_IREAD
# define S_IRUSR S_IREAD
#ifndef FILE_INFO_H
#define FILE_INFO_H
-#include <ctime>
+#include <boost/utility.hpp>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
-#include <boost/utility.hpp>
-#include "support/std_string.h"
+
+#include <ctime>
+#include <string>
+
namespace lyx {
namespace support {
/** Get information about file.
If link is true, the information is about the link itself, not
the file that is obtained by tracing the links. */
- explicit FileInfo(string const & path, bool link = false);
+ explicit FileInfo(std::string const & path, bool link = false);
/// File descriptor
explicit FileInfo(int fildes);
/// Query a new file
- FileInfo & newFile(string const & path, bool link = false);
+ FileInfo & newFile(std::string const & path, bool link = false);
/// Query a new file descriptor
FileInfo & newFile(int fildes);
mode_t getMode() const;
/// Constructs standard mode string (ls style)
- string modeString() const;
+ std::string modeString() const;
///
time_t getModificationTime() const;
///
int err_;
///
- string fname_;
+ std::string fname_;
};
} // namespace support
#include <boost/bind.hpp>
#include <boost/signals/trackable.hpp>
+
+using std::string;
+
+
namespace lyx {
namespace support {
#ifndef FILEMONITOR_H
#define FILEMONITOR_H
-#include "support/std_string.h"
-
#include <boost/utility.hpp>
#include <boost/scoped_ptr.hpp>
#include <boost/signals/signal0.hpp>
/** Once monitoring begins, the file will be monitored every
* interval ms.
*/
- FileMonitor(string const & file_with_path, int interval);
+ FileMonitor(std::string const & file_with_path, int interval);
/// Define an empty d-tor out-of-line to keep boost::scoped_ptr happy.
~FileMonitor();
///
- void reset(string const & file_with_path) const;
+ void reset(std::string const & file_with_path) const;
///
- string const & filename() const;
+ std::string const & filename() const;
/// Begin monitoring the file
void start() const;
std_istream.h \
std_ostream.h \
std_sstream.h \
- std_string.h \
systemcall.C \
systemcall.h \
tempname.C \
using std::atoi;
#endif
-int lyx::support::atoi(string const & nstr)
+int lyx::support::atoi(std::string const & nstr)
{
return ::atoi(nstr.c_str());
}
#include "support/lyxlib.h"
-int lyx::support::chdir(string const & name)
+int lyx::support::chdir(std::string const & name)
{
#ifndef __EMX__
return ::chdir(name.c_str());
#include <fstream>
#include "support/lyxlib.h"
-#include "support/std_string.h"
+
using std::ifstream;
using std::ofstream;
using std::ios;
+using std::string;
+
bool lyx::support::copy(string const & from, string const & to)
{
#include <boost/assert.hpp>
+using std::string;
+
+
namespace lyx {
namespace support {
#ifndef FILENAME_H
#define FILENAME_H
-#include "support/std_string.h"
+#include <string>
namespace lyx {
/** \param filename the file in question. Must have an absolute path.
* \param save_abs_path how is the file to be output to file?
*/
- FileName(string const & abs_filename, bool save_abs_path = true);
+ FileName(std::string const & abs_filename, bool save_abs_path = true);
/** \param filename the file in question. May have either a relative
* or an absolute path.
* \param buffer_path if \c filename has a relative path, generate
* the absolute path using this.
*/
- void set(string const & filename, string const & buffer_path);
+ void set(std::string const & filename, std::string const & buffer_path);
void erase();
bool empty() const { return name_.empty(); }
bool saveAbsPath() const { return save_abs_path_; }
- string const absFilename() const { return name_; }
+ std::string const absFilename() const { return name_; }
/// \param buffer_path if empty, uses `pwd`
- string const relFilename(string const & buffer_path = string()) const;
+ std::string const relFilename(std::string const & buffer_path = std::string()) const;
/// \param buf_path if empty, uses `pwd`
- string const outputFilename(string const & buf_path = string()) const;
+ std::string const outputFilename(std::string const & buf_path = std::string()) const;
/** \return a mangled version of the absolute file name,
* suitable for use in the temp dir when, for example, converting
* an image file to another format.
*/
- string const mangledFilename() const;
+ std::string const mangledFilename() const;
/// \return true if the file is compressed.
bool isZipped() const;
/// \return the absolute file name without its .gz, .z, .Z extension
- string const unzippedFilename() const;
+ std::string const unzippedFilename() const;
private:
- string name_;
+ std::string name_;
bool save_abs_path_;
};
using std::endl;
using std::getline;
using std::make_pair;
-
+using std::string;
using std::ifstream;
using std::ostringstream;
using std::vector;
#include <vector>
#include <utility>
-#include "support/std_string.h"
-
+#include <string>
namespace lyx {
namespace support {
/// remove directory and all contents, returns 0 on success
-int destroyDir(string const & tmpdir);
+int destroyDir(std::string const & tmpdir);
///
-string const CreateBufferTmpDir(string const & pathfor = string());
+std::string const CreateBufferTmpDir(std::string const & pathfor = std::string());
/// Creates directory. Returns true on success
-bool createDirectory(string const & name, int permissions);
+bool createDirectory(std::string const & name, int permissions);
///
-string const CreateLyXTmpDir(string const & deflt);
+std::string const CreateLyXTmpDir(std::string const & deflt);
/** Find file by searching several directories.
Uses a string of paths separated by ";"s to find a file to open.
If path entry begins with $$User/, use user_lyxdir.
Example: "$$User/doc;$$LyX/doc".
*/
-string const FileOpenSearch(string const & path, string const & name,
- string const & ext = string());
+std::string const FileOpenSearch(std::string const & path, std::string const & name,
+ std::string const & ext = std::string());
/** Returns the real name of file name in directory path, with optional
extension ext.
The file is searched in the given path (unless it is an absolute
file name), first directly, and then with extension .ext (if given).
*/
-string const FileSearch(string const & path, string const & name,
- string const & ext = string());
+std::string const FileSearch(std::string const & path, std::string const & name,
+ std::string const & ext = std::string());
/// Returns a vector of all files in directory dir having extension ext.
-std::vector<string> const DirList(string const & dir,
- string const & ext = string());
+std::vector<std::string> const DirList(std::string const & dir,
+ std::string const & ext = std::string());
/** Is directory read only?
returns
true: dir writeable
false: not writeable
*/
-bool IsDirWriteable (string const & path);
+bool IsDirWriteable (std::string const & path);
/** Is a file readable ?
Returns true if the file `path' is readable.
*/
-bool IsFileReadable (string const & path);
+bool IsFileReadable (std::string const & path);
/** Is file read only?
returns
0: read_only
-1: error (doesn't exist, no access, anything else)
*/
-int IsFileWriteable (string const & path);
+int IsFileWriteable (std::string const & path);
///
-bool IsLyXFilename(string const & filename);
+bool IsLyXFilename(std::string const & filename);
///
-bool IsSGMLFilename(string const & filename);
+bool IsSGMLFilename(std::string const & filename);
/** Returns the path of a library data file.
Search the file name.ext in the subdirectory dir of
\end{enumerate}
The third parameter `ext' is optional.
*/
-string const LibFileSearch(string const & dir, string const & name,
- string const & ext = string());
+std::string const LibFileSearch(std::string const & dir, std::string const & name,
+ std::string const & ext = std::string());
/** Same as LibFileSearch(), but tries first to find an
internationalized version of the file by prepending $LANG_ to the
name
*/
-string const
-i18nLibFileSearch(string const & dir, string const & name,
- string const & ext = string());
+std::string const
+i18nLibFileSearch(std::string const & dir, std::string const & name,
+ std::string const & ext = std::string());
/** Takes a command such as "sh $$s/convertDefault.sh file.in file.out"
* and replaces "$$s/" with the path to the "most important" of LyX's
* "$$s/" is removed. Executing the command will still fail, but the
* error message will make some sort of sense ;-)
*/
-string const LibScriptSearch(string const & command);
+std::string const LibScriptSearch(std::string const & command);
///
-string const GetEnv(string const & envname);
+std::string const GetEnv(std::string const & envname);
/// A helper function.
-string const GetEnvPath(string const & name);
+std::string const GetEnvPath(std::string const & name);
/// Substitutes active latex characters with underscores in filename
-string const MakeLatexName(string const & file);
+std::string const MakeLatexName(std::string const & file);
/// Put the name in quotes suitable for the current shell
-string const QuoteName(string const & file);
+std::string const QuoteName(std::string const & file);
/// Add a filename to a path. Any path from filename is stripped first.
-string const AddName(string const & path, string const & fname);
+std::string const AddName(std::string const & path, std::string const & fname);
/// Append sub-directory(ies) to path in an intelligent way
-string const AddPath(string const & path, string const & path2);
+std::string const AddPath(std::string const & path, std::string const & path2);
/** Change extension of oldname to extension.
If oldname does not have an extension, it is appended.
If the extension is empty, any extension is removed from the name.
*/
-string const
-ChangeExtension(string const & oldname, string const & extension);
+std::string const
+ChangeExtension(std::string const & oldname, std::string const & extension);
/// Return the extension of the file (not including the .)
-string const GetExtension(string const & name);
+std::string const GetExtension(std::string const & name);
/// Return the type of the file as an extension from contents
-string const getExtFromContents(string const & name);
+std::string const getExtFromContents(std::string const & name);
/// check for zipped file
-bool zippedFile(string const & name);
+bool zippedFile(std::string const & name);
/// \return the name that LyX will give to the unzipped file.
-string const unzippedFileName(string const & zipped_file);
+std::string const unzippedFileName(std::string const & zipped_file);
/// unzip a file
-string const unzipFile(string const & zipped_file);
+std::string const unzipFile(std::string const & zipped_file);
/// Returns true is path is absolute
-bool AbsolutePath(string const & path);
+bool AbsolutePath(std::string const & path);
/// Create absolute path. If impossible, don't do anything
-string const ExpandPath(string const & path);
+std::string const ExpandPath(std::string const & path);
/** Convert relative path into absolute path based on a basepath.
If relpath is absolute, just use that.
If basepath doesn't exist use CWD.
*/
-string const MakeAbsPath(string const & RelPath = string(),
- string const & BasePath = string());
+std::string const MakeAbsPath(std::string const & RelPath = std::string(),
+ std::string const & BasePath = std::string());
/** Creates a nice compact path for displaying. The parameter
threshold, if given, specifies the maximal length of the path.
*/
-string const
-MakeDisplayPath(string const & path, unsigned int threshold = 1000);
+std::string const
+MakeDisplayPath(std::string const & path, unsigned int threshold = 1000);
/** Makes relative path out of absolute path.
If it is deeper than basepath,
different, then the absolute path will be used as relative path
WARNING: the absolute path and base path must really be absolute paths!!!
*/
-string const
-MakeRelPath(string const & abspath, string const & basepath);
+std::string const
+MakeRelPath(std::string const & abspath, std::string const & basepath);
/// Strip filename from path name
-string const OnlyPath(string const & fname);
+std::string const OnlyPath(std::string const & fname);
/** Normalize a path. Constracts path/../path
* Also converts paths like /foo//bar ==> /foo/bar
*/
-string const NormalizePath(string const & path);
+std::string const NormalizePath(std::string const & path);
/// Strips path from filename
-string const OnlyFilename(string const & fname);
+std::string const OnlyFilename(std::string const & fname);
-/// Get the contents of a file as a huge string
-string const GetFileContents(string const & fname);
+/// Get the contents of a file as a huge std::string
+std::string const GetFileContents(std::string const & fname);
/** Check and Replace Environmentvariables ${NAME} in Path.
Replaces all occurences of these, if they are found in the
environment.
Variables are defined by Var := '${' [a-zA-Z_][a-zA-Z_0-9]* '}'
*/
-string const ReplaceEnvironmentPath(string const & path);
+std::string const ReplaceEnvironmentPath(std::string const & path);
/* Set \c link to the path \c file points to as a symbolic link.
If \c resolve is true, then \c link is an absolute path
Returns true if successful */
-bool LyXReadLink(string const & file, string & link, bool resolve = false);
+bool LyXReadLink(std::string const & file, std::string & link, bool resolve = false);
/// Uses kpsewhich to find tex files
-string const findtexfile(string const & fil, string const & format);
+std::string const findtexfile(std::string const & fil, std::string const & format);
/// remove the autosave-file and give a Message if it can't be done
-void removeAutosaveFile(string const & filename);
+void removeAutosaveFile(std::string const & filename);
/// read the BoundingBox entry from a ps/eps/pdf-file
-string const readBB_from_PSFile(string const & file);
+std::string const readBB_from_PSFile(std::string const & file);
/** \param file1, file2 the two files to be compared. Must have absolute paths.
* \returns 1 if \c file1 has a more recent timestamp than \c file2,
* If one of the files does not exist, the return value indicates the file
* which does exist. Eg, if \c file1 exists but \c file2 does not, return 1.
*/
-int compare_timestamps(string const & file1, string const & file2);
+int compare_timestamps(std::string const & file1, std::string const & file2);
-typedef std::pair<int, string> cmd_ret;
+typedef std::pair<int, std::string> cmd_ret;
-cmd_ret const RunCommand(string const & cmd);
+cmd_ret const RunCommand(std::string const & cmd);
} // namespace support
} // namespace lyx
#include <cstdlib>
#include <unistd.h>
+
+using std::string;
using std::endl;
#ifndef CXX_GLOBAL_CSTD
#ifndef FORKEDCALL_H
#define FORKEDCALL_H
-#include "support/std_string.h"
-
#include <boost/shared_ptr.hpp>
#include <boost/signals/signal2.hpp>
#include <boost/function/function0.hpp>
void setRetValue(int r) { retval_ = r; }
/// Returns the identifying command (for display in the GUI perhaps).
- string const & command() const { return command_; }
+ std::string const & command() const { return command_; }
/// is the process running ?
bool running() const;
SignalTypePtr signal_;
/// identifying command (for display in the GUI perhaps).
- string command_;
+ std::string command_;
/// Process ID of child
pid_t pid_;
* The other startscript command can be executed either blocking
* or non-blocking, but no signal will be emitted on finishing.
*/
- int startscript(Starttype, string const & what);
+ int startscript(Starttype, std::string const & what);
///
- int startscript(string const & what, SignalTypePtr);
+ int startscript(std::string const & what, SignalTypePtr);
private:
///
#include <boost/bind.hpp>
#include <boost/signals/signal2.hpp>
+
+using std::string;
using std::endl;
#include <queue>
#include <utility>
-#include "support/std_string.h"
+
namespace lyx {
namespace support {
class ForkedCallQueue {
public:
/// A process in the queue
- typedef std::pair<string, Forkedcall::SignalTypePtr> Process;
+ typedef std::pair<std::string, Forkedcall::SignalTypePtr> Process;
/** Add a process to the queue. Processes are forked sequentially
* only one is running at a time.
* Connect to the returned signal and you'll be informed when
* the process has ended.
*/
- Forkedcall::SignalTypePtr add(string const & process);
+ Forkedcall::SignalTypePtr add(std::string const & process);
/// Query whether the queue is running a forked process now.
bool running() const;
/// Get the and only instance of the class
#include <unistd.h>
#include <sys/wait.h>
+
using std::endl;
using std::find_if;
-
+using std::string;
using std::vector;
#ifndef CXX_GLOBAL_CSTD
#ifndef FORKEDCONTR_H
#define FORKEDCONTR_H
-#include "support/std_string.h"
-
#include <boost/signals/signal0.hpp>
#include <boost/signals/trackable.hpp>
std::vector<pid_t> const getPIDs() const;
/// Get the command string of the process.
- string const getCommand(pid_t) const;
+ std::string const getCommand(pid_t) const;
/** Kill this process prematurely and remove it from the list.
* The process is killed within tolerance secs.
#include "support/lyxlib.h"
+
+using std::string;
+
+
namespace {
inline
#include <config.h>
-#include "support/std_string.h"
#include "lstrings.h"
#include "support/std_sstream.h"
#include "debug.h"
#include <cstdlib>
using std::transform;
-
+using std::string;
using std::vector;
#ifndef CXX_GLOBAL_CSTD
#define LSTRINGS_H
#include <vector>
+#include <string>
-#include "support/std_string.h"
namespace lyx {
namespace support {
///
-int compare_no_case(string const & s, string const & s2);
+int compare_no_case(std::string const & s, std::string const & s2);
///
-int compare_ascii_no_case(string const & s, string const & s2);
+int compare_ascii_no_case(std::string const & s, std::string const & s2);
///
-int compare_no_case(string const & s, string const & s2, unsigned int len);
+int compare_no_case(std::string const & s, std::string const & s2, unsigned int len);
///
inline
}
///
-bool isStrInt(string const & str);
+bool isStrInt(std::string const & str);
-/// does the string represent an unsigned integer value ?
-bool isStrUnsignedInt(string const & str);
+/// does the std::string represent an unsigned integer value ?
+bool isStrUnsignedInt(std::string const & str);
///
-int strToInt(string const & str);
+int strToInt(std::string const & str);
/// convert string to an unsigned integer
-unsigned int strToUnsignedInt(string const & str);
+unsigned int strToUnsignedInt(std::string const & str);
///
-bool isStrDbl(string const & str);
+bool isStrDbl(std::string const & str);
///
-double strToDbl(string const & str);
+double strToDbl(std::string const & str);
///
char lowercase(char c);
char uppercase(char c);
/// same as lowercase(), but ignores locale
-string const ascii_lowercase(string const &);
+std::string const ascii_lowercase(std::string const &);
///
-string const lowercase(string const &);
+std::string const lowercase(std::string const &);
///
-string const uppercase(string const &);
+std::string const uppercase(std::string const &);
-/// Does the string start with this prefix?
-bool prefixIs(string const &, string const &);
+/// Does the std::string start with this prefix?
+bool prefixIs(std::string const &, std::string const &);
/// Does the string end with this char?
-bool suffixIs(string const &, char);
+bool suffixIs(std::string const &, char);
-/// Does the string end with this suffix?
-bool suffixIs(string const &, string const &);
+/// Does the std::string end with this suffix?
+bool suffixIs(std::string const &, std::string const &);
///
-bool contains(string const & a, string const & b);
+bool contains(std::string const & a, std::string const & b);
///
-bool contains(string const & a, char b);
+bool contains(std::string const & a, char b);
/// This should probably we rewritten to be more general.
class contains_functor {
public:
- typedef string first_argument_type;
- typedef string second_argument_type;
+ typedef std::string first_argument_type;
+ typedef std::string second_argument_type;
typedef bool result_type;
- bool operator()(string const & haystack, string const & needle) const {
+ bool operator()(std::string const & haystack, std::string const & needle) const {
return contains(haystack, needle);
}
};
///
-bool containsOnly(string const &, string const &);
+bool containsOnly(std::string const &, std::string const &);
/** Extracts a token from this string at the nth delim.
Doesn't modify the original string. Similar to strtok.
token("a;bc;d", ';', 2) == "d";
\endcode
*/
-string const token(string const & a, char delim, int n);
+std::string const token(std::string const & a, char delim, int n);
/** Search a token in this string using the delim.
tokenPos("a;bc;d", ';', "d") == 2;
\endcode
*/
-int tokenPos(string const & a, char delim, string const & tok);
+int tokenPos(std::string const & a, char delim, std::string const & tok);
/// Substitute all \a oldchar with \a newchar
-string const subst(string const & a, char oldchar, char newchar);
+std::string const subst(std::string const & a, char oldchar, char newchar);
/// substitutes all instances of \a oldstr with \a newstr
-string const subst(string const & a,
- string const & oldstr, string const & newstr);
+std::string const subst(std::string const & a,
+ std::string const & oldstr, std::string const & newstr);
/** Trims characters off the end and beginning of a string.
\code
trim("ccabccc", "c") == "ab".
\endcode
*/
-string const trim(string const & a, char const * p = " ");
+std::string const trim(std::string const & a, char const * p = " ");
/** Trims characters off the end of a string.
\code
rtrim("abccc", "c") == "ab".
\endcode
*/
-string const rtrim(string const & a, char const * p = " ");
+std::string const rtrim(std::string const & a, char const * p = " ");
/** Trims characters off the beginning of a string.
\code
ltrim("ababcdef", "ab") = "cdef"
\endcode
*/
-string const ltrim(string const & a, char const * p = " ");
+std::string const ltrim(std::string const & a, char const * p = " ");
/** Splits the string by the first delim.
Splits the string by the first appearance of delim.
s1= ""; s2= "a;bc".split(s1, ';') -> s1 == "a"; s2 == "bc";
\endcode
*/
-string const split(string const & a, string & piece, char delim);
+std::string const split(std::string const & a, std::string & piece, char delim);
/// Same as split but does not return a piece
-string const split(string const & a, char delim);
+std::string const split(std::string const & a, char delim);
/// Same as split but uses the last delim.
-string const rsplit(string const & a, string & piece, char delim);
+std::string const rsplit(std::string const & a, std::string & piece, char delim);
/// Escapes non ASCII chars
-string const escape(string const & lab);
+std::string const escape(std::string const & lab);
/// gives a vector of stringparts which have the delimiter delim
-std::vector<string> const getVectorFromString(string const & str,
- string const & delim = ",");
+std::vector<std::string> const getVectorFromString(std::string const & str,
+ std::string const & delim = std::string(","));
// the same vice versa
-string const getStringFromVector(std::vector<string> const & vec,
- string const & delim = ",");
+std::string const getStringFromVector(std::vector<std::string> const & vec,
+ std::string const & delim = std::string(","));
// wrapper around boost::format using one argument %1$s
-string bformat(string const & fmt, string const & arg1);
+std::string bformat(std::string const & fmt, std::string const & arg1);
// arguments %1$s and %2$s
-string bformat(string const & fmt, string const & arg1, string const & arg2);
+std::string bformat(std::string const & fmt, std::string const & arg1, std::string const & arg2);
// arguments %1$d and %2$d
-string bformat(string const & fmt, int arg1, int arg2);
+std::string bformat(std::string const & fmt, int arg1, int arg2);
// arguments %1$s and %2$s and %3$s
-string bformat(string const & fmt, string const & arg1, string const & arg2,
- string const & arg3);
+std::string bformat(std::string const & fmt, std::string const & arg1, std::string const & arg2,
+ std::string const & arg3);
// arguments %1$s and %2$s and %3$s and %4$s
-string bformat(string const & fmt, string const & arg1, string const & arg2,
- string const & arg3, string const & arg4);
+std::string bformat(std::string const & fmt, std::string const & arg1, std::string const & arg2,
+ std::string const & arg3, std::string const & arg4);
} // namespace support
} // namespace lyx
#ifndef LYX_LIB_H
#define LYX_LIB_H
-#include "support/std_string.h"
+#include <string>
+
namespace lyx {
namespace support {
/// get the current working directory
-string const getcwd();
+std::string const getcwd();
/// change to a directory, 0 is returned on success.
-int chdir(string const & name);
+int chdir(std::string const & name);
/**
* rename a file, returns false if it fails.
* It can handle renames across partitions.
*/
-bool rename(string const & from, string const & to);
+bool rename(std::string const & from, std::string const & to);
/// copy a file, returns false it it fails
-bool copy(string const & from, string const & to);
+bool copy(std::string const & from, std::string const & to);
/// generates a checksum of a file
-unsigned long sum(string const & file);
+unsigned long sum(std::string const & file);
/// FIXME: some point to this hmm ?
int kill(int pid, int sig);
/// FIXME: same here
void abort();
/// create the given directory with the given mode
-int mkdir(string const & pathname, unsigned long int mode);
-/// put a C string into the environment
+int mkdir(std::string const & pathname, unsigned long int mode);
+/// put a C std::string into the environment
int putenv(char const * str);
/// unlink the given file
-int unlink(string const & file);
+int unlink(std::string const & file);
/// remove the given directory
-int rmdir(string const & file);
+int rmdir(std::string const & file);
/// convert the given string to an integer
-int atoi(string const & nstr);
+int atoi(std::string const & nstr);
/// (securely) create a temporary file in the given dir with the given prefix
-string const tempName(string const & dir = string(),
- string const & mask = string());
+std::string const tempName(std::string const & dir = std::string(),
+ std::string const & mask = std::string());
/**
#ifndef LYX_MANIP_H
#define LYX_MANIP_H
-#include "support/std_string.h"
#include "support/std_ostream.h"
///
inline
std::ostream & operator<<(std::ostream & os, NewLineAndDepth_ const & nlad_)
{
- os << string(nlad_.depth_, ' ');
+ os << std::string(nlad_.depth_, ' ');
return os;
}
#include <sys/mman.h>
+using std::string;
+
+
unsigned long lyx::support::sum(string const & file)
{
lyxerr[Debug::FILES] << "lyx::sum() using mmap (lightning fast)"
#include <fcntl.h>
#include <unistd.h>
-#include "support/std_string.h"
-
#include "lyxlib.h"
-int lyx::support::mkdir(string const & pathname, unsigned long int mode)
+int lyx::support::mkdir(std::string const & pathname, unsigned long int mode)
{
// FIXME: why don't we have mode_t in lyx::mkdir prototype ??
return ::mkdir(pathname.c_str(), mode_t(mode));
#ifndef OS_H
#define OS_H
-#include "support/std_string.h"
+#include <string>
+
/// wrap OS specific stuff
namespace lyx {
// do some work just once
void init(int * argc, char ** argv[]);
// returns path of LyX binary
-string binpath();
+std::string binpath();
// returns name of LyX binary
-string binname();
+std::string binname();
//
-void setTmpDir(string const & p);
+void setTmpDir(std::string const & p);
//
-string getTmpDir();
+std::string getTmpDir();
//
-string current_root();
+std::string current_root();
//
shell_type shell();
// DBCS aware!
-string::size_type common_path(string const & p1, string const & p2);
+std::string::size_type common_path(std::string const & p1, std::string const & p2);
// no-op on UNIX, '\\'->'/' on OS/2 and Win32, ':'->'/' on MacOS, etc.
-string slashify_path(string const & p);
+std::string slashify_path(std::string const & p);
// converts a host OS path to unix style
-string external_path(string const & p);
+std::string external_path(std::string const & p);
// converts a unix path to host OS style
-string internal_path(string const & p);
+std::string internal_path(std::string const & p);
// is path absolute?
-bool is_absolute_path(string const & p);
+bool is_absolute_path(std::string const & p);
// returns a string suitable to be passed to popen when
// same for popen().
char const * popen_read_mode();
//
-void warn(string const & mesg);
+void warn(std::string const & mesg);
} // namespace os
} // namespace support
#include "support/filetools.h"
#include "support/lstrings.h"
+
+using std::string;
+
+
namespace {
string binpath_;
#include "path.h"
#include "lyxlib.h"
+
+using std::string;
+
+
namespace lyx {
namespace support {
#ifndef PATH_H
#define PATH_H
-#include "support/std_string.h"
#include <boost/utility.hpp>
+#include <string>
+
namespace lyx {
namespace support {
class Path : boost::noncopyable {
public:
/// change to the given directory
- explicit Path(string const & path);
+ explicit Path(std::string const & path);
/// set cwd to the previous value if needed
~Path();
/// whether we are in the new cwd or not
bool popped_;
/// the previous cwd
- string pushedDir_;
+ std::string pushedDir_;
};
// To avoid the wrong usage:
#include "lstrings.h"
#include "os.h"
+using std::string;
using std::endl;
#ifndef PATH_DEFINES_H
#define PATH_DEFINES_H
-#include "support/std_string.h"
+#include <string>
+
namespace lyx {
namespace support {
-string const & lyx_localedir();
+std::string const & lyx_localedir();
/// The absolute path to the lyx support files we're actually going to use.
-string const & system_lyxdir();
+std::string const & system_lyxdir();
/// Set the absolute path to the lyx support files (from the command line).
-void system_lyxdir(string const &);
+void system_lyxdir(std::string const &);
/// The absolute path to the lyx support files in the build directory
-string const & build_lyxdir();
+std::string const & build_lyxdir();
/// The absolute path to the user-level lyx support files.
-string const & user_lyxdir();
+std::string const & user_lyxdir();
/// Set the absolute path to the user-level lyx support files.
-void user_lyxdir(string const &);
+void user_lyxdir(std::string const &);
/** \returns true if the user lyx dir existed already and did not need
* to be created afresh.
#include "support/lyxlib.h"
+
+using std::string;
+
+
bool lyx::support::rename(string const & from, string const & to)
{
#ifdef __EMX__
#include "lyxlib.h"
-int lyx::support::rmdir(string const & dir)
+int lyx::support::rmdir(std::string const & dir)
{
return ::rmdir(dir.c_str());
}
#ifndef SSTREAM_H
#define SSTREAM_H
-#include "support/std_string.h"
+#include <string>
#include <iostream>
#include <streambuf.h>
rpos(0), bufsize(1)
{ }
- explicit stringbuf(const string &s, int which=ios::in|ios::out) :
+ explicit stringbuf(const std::string &s, int which=ios::in|ios::out) :
streambuf(which), buf(s), mode(static_cast<ios::open_mode>(which)),
bufsize(1)
{
rpos = (mode & ios::ate ? s.size() : 0);
}
- string str() const
+ std::string str() const
{
const_cast<stringbuf*>(this)->sync(); // Sigh, really ugly hack
return buf;
};
- void str(const string& s)
+ void str(const std::string& s)
{
buf = s;
if(mode & ios::in)
inline virtual int overflow(int = EOF);
inline virtual int underflow();
private:
- string buf;
+ std::string buf;
ios::open_mode mode;
- string::size_type rpos;
+ std::string::size_type rpos;
streamsize bufsize;
char defbuf;
};
protected:
stringbuf __my_sb;
public:
- string str() const
+ std::string str() const
{
return static_cast<stringbuf*>(_strbuf)->str();
}
- void str(const string& s)
+ void str(const std::string& s)
{
clear();
static_cast<stringbuf*>(_strbuf)->str(s);
init (&__my_sb);
}
- stringstreambase(const string& s, int which) :
+ stringstreambase(const std::string& s, int which) :
__my_sb(s, which)
{
init (&__my_sb);
stringstreambase(which)
{ }
- istringstream(const string& s, int which=ios::in) :
+ istringstream(const std::string& s, int which=ios::in) :
stringstreambase(s, which)
{ }
};
stringstreambase(which)
{ }
- ostringstream(const string& s, int which=ios::out) :
+ ostringstream(const std::string& s, int which=ios::out) :
stringstreambase(s, which)
{ }
};
stringstreambase(which)
{ }
- stringstream(const string &s, int which=ios::in|ios::out) :
+ stringstream(const std::string &s, int which=ios::in|ios::out) :
stringstreambase(s, which)
{ }
};
streamsize n = pptr() - pbase();
if(n)
{
- buf.replace(rpos, string::npos, pbase(), n);
+ buf.replace(rpos, std::string::npos, pbase(), n);
//if(buf.size() - rpos != n)
if (buf.size() != n + rpos)
return EOF;
if(ch != EOF)
{
- string::size_type oldSize = buf.size();
+ std::string::size_type oldSize = buf.size();
- buf.replace(rpos, string::npos, 1, ch);
+ buf.replace(rpos, std::string::npos, 1, ch);
if(buf.size() - oldSize != 1)
return EOF;
++rpos;
return EOF;
}
- string::size_type n = egptr() - eback();
- string::size_type s;
+ std::string::size_type n = egptr() - eback();
+ std::string::size_type s;
s = buf.copy(eback(), n, rpos);
pbump(pbase() - pptr());
#ifndef STD_SSTREAM_H
#define STD_SSTREAM_H
-// Since we will include a string header anyway, we'd better do it
-// right now so that <string> is not loaded before lyxstring.h. (JMarc)
-#include "support/std_string.h"
-
#ifdef HAVE_SSTREAM
#include <sstream>
#else
+++ /dev/null
-// -*- C++ -*-
-/**
- * \file std_string.h
- * This file is part of LyX, the document processor.
- * Licence details can be found in the file COPYING.
- *
- * \author Lars Gullik Bjønnes
- * \author Jean-Marc Lasgouttes
- *
- * Full author contact details are available in file CREDITS.
- */
-
-#ifndef STD_STRING_H
-#define STD_STRING_H
-
-
-#include <string>
-
-#ifdef USE_INCLUDED_STRING
-
-using std::string;
-
-#else
-
-namespace lyx {
-
-using std::string;
-
-}
-
-using lyx::string;
-
-#endif
-
-#endif // NOT STD_STRING_H
#include <cstdlib>
+using std::string;
+
#ifndef CXX_GLOBAL_CSTD
using std::system;
#endif
#ifndef SYSTEMCALL_H
#define SYSTEMCALL_H
-#include "support/std_string.h"
+#include <string>
namespace lyx {
namespace support {
* The string "what" contains a commandline with arguments separated
* by spaces.
*/
- int startscript(Starttype how, string const & what);
+ int startscript(Starttype how, std::string const & what);
};
} // namespace support
#include <cstdlib>
#include <unistd.h>
-#include "support/std_string.h"
#include "support/lyxlib.h"
#include "support/filetools.h"
#include "support/tostr.h"
#include "debug.h"
#include "os.h"
+using std::string;
using std::endl;
namespace {
#include <config.h>
#include "support/std_sstream.h"
-#include "support/std_string.h"
+using std::string;
using std::ostringstream;
#ifndef TOSTR_H
#define TOSTR_H
-#include "support/std_string.h"
-
-// When trying to convert this to a template using std::stringstream,
-// note that this will pull in the whole of <string> in more than 150
-// files, even when configuring --with-included-strings !
+#include <string>
/// convert things to strings
-string const tostr(bool b);
+std::string const tostr(bool b);
///
-string const tostr(int);
+std::string const tostr(int);
///
-string const tostr(unsigned int);
+std::string const tostr(unsigned int);
///
-string const tostr(long int);
+std::string const tostr(long int);
///
-string const tostr(double);
+std::string const tostr(double);
///
-string const tostr(string const & s);
+std::string const tostr(std::string const & s);
#endif
#include "lyxlib.h"
-int lyx::support::unlink(string const & pathname)
+int lyx::support::unlink(std::string const & pathname)
{
return ::unlink(pathname.c_str());
}
#include <unistd.h>
#include <sys/types.h>
+using std::string;
+
namespace lyx {
namespace support {
#ifndef USERINFO_H
#define USERINFO_H
-#include "support/std_string.h"
+#include <string>
+
namespace lyx {
namespace support {
/// return the current user's real name
-string const user_name();
+std::string const user_name();
/// return the current user's e-mail address
-string const user_email();
+std::string const user_email();
} // namespace support
} // namespace lyx
using std::ostream;
using std::ostringstream;
using std::vector;
+using std::string;
#ifndef CXX_GLOBAL_CSTD
using std::strlen;
///
bool setMColumnPWidth(int cell, LyXLength const & width);
///
- void setAlignSpecial(int cell, string const & special, Feature what);
+ void setAlignSpecial(int cell, std::string const & special, Feature what);
///
LyXAlignment getAlignment(int cell, bool onlycolumn = false) const;
///
///
LyXLength const getMColumnPWidth(int cell) const;
///
- string const getAlignSpecial(int cell, int what) const;
+ std::string const getAlignSpecial(int cell, int what) const;
///
int getWidthOfCell(int cell) const;
///
///
void validate(LaTeXFeatures &) const;
/// Appends \c list with all labels found within this inset.
- void getLabelList(Buffer const &, std::vector<string> & list) const;
+ void getLabelList(Buffer const &, std::vector<std::string> & list) const;
///
//private:
///
///
bool rotate;
///
- string align_special;
+ std::string align_special;
///
LyXLength p_width; // this is only set for multicolumn!!!
///
///
LyXLength p_width;
///
- string align_special;
+ std::string align_special;
};
///
typedef std::vector<columnstruct> column_vector;
#include "tex-accent.h"
#include "support/tostr.h"
+using std::string;
+
/* the names used by TeX and XWindows for deadkeys/accents are not the same
so here follows a table to clearify the differences. Please correct this
if I got it wrong
using std::ostream;
using std::endl;
+using std::string;
+
namespace {
#include "gettext.h"
+using std::string;
+
+
string const _(string const & str)
{
return str;
#ifndef GETTEXT_H
#define GETTEXT_H
-#include "support/std_string.h"
+#include <string>
+
///
-string const _(string const &);
+std::string const _(std::string const &);
/// for detecting static strings
#define N_(str) (str)
using lyx::support::ascii_lowercase;
+using std::string;
+
LyXFont & LyXFont::lyxRead(LyXLex & lex)
{
using std::max;
using std::endl;
+using std::string;
/// top, right, bottom pixel margin
using std::endl;
using std::ostringstream;
+using std::string;
LyXText::LyXText(BufferView * bv, InsetText * inset, bool ininset,
using std::endl;
using std::find;
-
+using std::string;
using std::istringstream;
using std::vector;
#include "textcursor.h"
#include "paragraph.h"
+#include <string>
+
+using std::string;
+
void TextCursor::setSelection()
{
#define TEXTCURSOR_H
#include "lyxcursor.h"
-#include "support/std_string.h"
class Buffer;
///
void clearSelection();
///
- string const selectionAsString(Buffer const & buffer, bool label) const;
+ std::string const selectionAsString(Buffer const & buffer, bool label) const;
// actual cursor position
LyXCursor cursor;
using std::vector;
using std::max;
using std::ostream;
+using std::string;
namespace lyx {
namespace toc {
#ifndef TOC_H
#define TOC_H
-#include "support/std_string.h"
-
#include <map>
#include <iosfwd>
#include <vector>
+#include <string>
class Buffer;
class LyXView;
///
struct TocItem {
- TocItem(int par_id, int d, string const & s)
+ TocItem(int par_id, int d, std::string const & s)
: id_(par_id), depth(d), str(s) {}
///
- string const asString() const;
+ std::string const asString() const;
/// set cursor in LyXView to this TocItem
void goTo(LyXView & lv_) const;
/// the action corresponding to the goTo above
/// nesting depth
int depth;
///
- string str;
+ std::string str;
};
///
typedef std::vector<TocItem> Toc;
///
-typedef std::map<string, Toc> TocList;
+typedef std::map<std::string, Toc> TocList;
///
TocList const getTocList(Buffer const &);
///
-std::vector<string> const getTypes(Buffer const &);
+std::vector<std::string> const getTypes(Buffer const &);
///
-void asciiTocList(string const &, Buffer const &, std::ostream &);
+void asciiTocList(std::string const &, Buffer const &, std::ostream &);
/** Given the cmdName of the TOC param, returns the type used
by ControlToc::getContents() */
-string const getType(string const & cmdName);
+std::string const getType(std::string const & cmdName);
inline
bool operator==(TocItem const & a, TocItem const & b)
using lyx::support::LibFileSearch;
using std::endl;
-
+using std::string;
using std::map;
#include "trans_decl.h"
-#include "support/std_string.h"
#include <map>
~Trans();
///
- int Load(string const & language);
+ int Load(std::string const & language);
///
bool IsDefined() const;
///
- string const & GetName() const;
+ std::string const & GetName() const;
///
- string const process(char, TransManager &);
+ std::string const process(char, TransManager &);
///
bool isAccentDefined(tex_accent, KmodInfo &) const;
private:
///
- void AddDeadkey(tex_accent, string const &);
+ void AddDeadkey(tex_accent, std::string const &);
///
void FreeKeymap();
///
int Load(LyXLex &);
///
- string const & Match(unsigned char c);
+ std::string const & Match(unsigned char c);
///
void InsertException(KmodException & exclist, char c,
- string const & data, bool = false,
+ std::string const & data, bool = false,
tex_accent = TEX_NOACCENT);
///
void FreeException(KmodException & exclist);
///
- string name_;
+ std::string name_;
///
- std::map<int, string> keymap_;
+ std::map<int, std::string> keymap_;
///
std::map<int, KmodInfo> kmod_list_;
};
///
inline
-string const & Trans::Match(unsigned char c)
+std::string const & Trans::Match(unsigned char c)
{
- std::map<int, string>::iterator it = keymap_.find(c);
+ std::map<int, std::string>::iterator it = keymap_.find(c);
if (it != keymap_.end()) {
return it->second;
}
- static string dummy;
+ static std::string dummy;
return dummy;
}
#include "tex-accent.h"
-#include "support/std_string.h"
#include <list>
+#include <string>
///
/// character to make exception
char c;
/// exception data
- string data;
+ std::string data;
/// Combination with another deadkey
bool combined;
/// The accent comined with
///
struct KmodInfo {
///
- string data;
+ std::string data;
///
tex_accent accent;
///
using lyx::support::split;
using std::endl;
-
+using std::string;
using std::pair;
#include "chset.h"
#include "trans_decl.h"
-#include "support/std_string.h"
class LyXText;
class Trans;
///
virtual ~TransState() {}
///
- virtual string const normalkey(char) = 0;
+ virtual std::string const normalkey(char) = 0;
///
virtual bool backspace() = 0;
///
- virtual string const deadkey(char, KmodInfo) = 0;
+ virtual std::string const deadkey(char, KmodInfo) = 0;
///
static char const TOKEN_SEP;
};
///
TransInitState();
///
- virtual string const normalkey(char);
+ virtual std::string const normalkey(char);
///
virtual bool backspace() { return true; }
///
- virtual string const deadkey(char, KmodInfo);
+ virtual std::string const deadkey(char, KmodInfo);
};
///
TransDeadkeyState();
///
- virtual string const normalkey(char);
+ virtual std::string const normalkey(char);
///
virtual bool backspace() {
currentState = init_state_;
return false;
}
///
- virtual string const deadkey(char, KmodInfo);
+ virtual std::string const deadkey(char, KmodInfo);
};
///
TransCombinedState();
///
- virtual string const normalkey(char);
+ virtual std::string const normalkey(char);
///
virtual bool backspace() {
// cancel the second deadkey
return false;
}
///
- virtual string const deadkey(char, KmodInfo);
+ virtual std::string const deadkey(char, KmodInfo);
};
///
CharacterSet chset_;
///
- void insert(string const &, LyXText *);
+ void insert(std::string const &, LyXText *);
///
- void insertVerbatim(string const &, LyXText *);
+ void insertVerbatim(std::string const &, LyXText *);
public:
///
TransManager();
///
virtual ~TransManager();
///
- int SetPrimary(string const &);
+ int SetPrimary(std::string const &);
///
- int SetSecondary(string const &);
+ int SetSecondary(std::string const &);
///
void EnablePrimary();
///
///
void DisableKeymap();
///
- bool setCharset(string const &);
+ bool setCharset(std::string const &);
///
bool backspace() {
return trans_fsm_.currentState->backspace();
///
void TranslateAndInsert(char, LyXText *);
///
- string const deadkey(char, KmodInfo);
+ std::string const deadkey(char, KmodInfo);
///
- string const normalkey(char);
+ std::string const normalkey(char);
///
void deadkey(char, tex_accent, LyXText *);
};
inline
-string const TransManager::normalkey(char c)
+std::string const TransManager::normalkey(char c)
{
return trans_fsm_.currentState->normalkey(c);
}
inline
-string const TransManager::deadkey(char c, KmodInfo t)
+std::string const TransManager::deadkey(char c, KmodInfo t)
{
return trans_fsm_.currentState->deadkey(c, t);
}
using std::endl;
using std::getline;
-
+using std::string;
using std::ifstream;
#ifndef VC_BACKEND_H
#define VC_BACKEND_H
-#include "support/std_string.h"
+#include <string>
class Buffer;
virtual ~VCS() {}
/// register a file for version control
- virtual void registrer(string const & msg) = 0;
+ virtual void registrer(std::string const & msg) = 0;
/// check in the current revision
- virtual void checkIn(string const & msg) = 0;
+ virtual void checkIn(std::string const & msg) = 0;
/// check out for editing
virtual void checkOut() = 0;
/// revert current edits
* getLog - read the revision log into the given file
* @param fname file name to read into
*/
- virtual void getLog(string const &) = 0;
+ virtual void getLog(std::string const &) = 0;
/// return the current version description
- virtual string const versionString() const = 0;
+ virtual std::string const versionString() const = 0;
/// return the current version
- string const & version() const {
+ std::string const & version() const {
return version_;
}
/// return the user who has locked the file
- string const & locker() const { return locker_; }
+ std::string const & locker() const { return locker_; }
/// set the owning buffer
void owner(Buffer * b) { owner_ = b; }
/// return the owning buffer
* @param path the path from which to execute
* @return exit status
*/
- static int doVCCommand(string const & cmd, string const & path);
+ static int doVCCommand(std::string const & cmd, std::string const & path);
/**
* The master VC file. For RCS this is *,v or RCS/ *,v. master should
* have full path.
*/
- string master_;
+ std::string master_;
/// The status of the VC controlled file.
VCStatus vcstatus;
* The version of the VC file. I am not sure if this can be a
* string or if it must be a float/int.
*/
- string version_;
+ std::string version_;
/// The user currently keeping the lock on the VC file.
- string locker_;
+ std::string locker_;
/// The buffer using this VC
Buffer * owner_;
};
public:
explicit
- RCS(string const & m);
+ RCS(std::string const & m);
/// return the revision file for the given file, if found
- static string const find_file(string const & file);
+ static std::string const find_file(std::string const & file);
- static void retrieve(string const & file);
+ static void retrieve(std::string const & file);
- virtual void registrer(string const & msg);
+ virtual void registrer(std::string const & msg);
- virtual void checkIn(string const & msg);
+ virtual void checkIn(std::string const & msg);
virtual void checkOut();
virtual void undoLast();
- virtual void getLog(string const &);
+ virtual void getLog(std::string const &);
- virtual string const versionString() const {
+ virtual std::string const versionString() const {
return "RCS: " + version_;
}
public:
///
explicit
- CVS(string const & m, string const & f);
+ CVS(std::string const & m, std::string const & f);
/// return the revision file for the given file, if found
- static string const find_file(string const & file);
+ static std::string const find_file(std::string const & file);
- virtual void registrer(string const & msg);
+ virtual void registrer(std::string const & msg);
- virtual void checkIn(string const & msg);
+ virtual void checkIn(std::string const & msg);
virtual void checkOut();
virtual void undoLast();
- virtual void getLog(string const &);
+ virtual void getLog(std::string const &);
- virtual string const versionString() const {
+ virtual std::string const versionString() const {
return "CVS: " + version_;
}
virtual void scanMaster();
private:
- string file_;
+ std::string file_;
};
#endif // VCBACKEND_H
using lyx::support::rtrim;
using lyx::support::strToDbl;
+using std::string;
+
namespace {
#include "lyxgluelength.h"
-#include "support/std_string.h"
class BufferParams;
class BufferView;
explicit VSpace(LyXGlueLength const & l);
/// Constructor for reading from a .lyx file
- explicit VSpace(string const & data);
+ explicit VSpace(std::string const & data);
/// return the type of vertical space
vspace_kind kind() const;
// conversion
/// how it goes into the LyX file
- string const asLyXCommand() const;
+ std::string const asLyXCommand() const;
/// the latex representation
- string const asLatexCommand(BufferParams const & params) const;
+ std::string const asLatexCommand(BufferParams const & params) const;
/// the size of the space on-screen
int inPixels(BufferView const & bv) const;