mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-05 13:26:21 +00:00
small fixes...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2400 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
a36dbaf607
commit
352730f20b
@ -1,3 +1,10 @@
|
||||
2001-08-01 Angus Leeming <a.leeming@ic.ac.uk>
|
||||
|
||||
* ControlInset.h: const and non-const forms of params().
|
||||
|
||||
* helper_funcs.C (getStringFromVector,getVectorFromString): remove
|
||||
whitespace from either side of each item.
|
||||
|
||||
2001-07-30 Angus Leeming <a.leeming@ic.ac.uk>
|
||||
|
||||
* ControlFloat.h: add a != operator for FloatParams.
|
||||
|
@ -31,7 +31,9 @@ public:
|
||||
///
|
||||
ControlInset(LyXView &, Dialogs &);
|
||||
/// Allow the View access to the local copy.
|
||||
Params & params() const;
|
||||
Params & params();
|
||||
///
|
||||
Params const & params() const;
|
||||
|
||||
protected:
|
||||
/// Slots connected in the daughter classes c-tor.
|
||||
@ -186,7 +188,15 @@ void ControlInset<Inset, Params>::apply()
|
||||
|
||||
|
||||
template <class Inset, class Params>
|
||||
Params & ControlInset<Inset, Params>::params() const
|
||||
Params & ControlInset<Inset, Params>::params()
|
||||
{
|
||||
lyx::Assert(params_);
|
||||
return *params_;
|
||||
}
|
||||
|
||||
|
||||
template <class Inset, class Params>
|
||||
Params const & ControlInset<Inset, Params>::params() const
|
||||
{
|
||||
lyx::Assert(params_);
|
||||
return *params_;
|
||||
|
@ -23,6 +23,7 @@
|
||||
|
||||
#include "frontends/FileDialog.h"
|
||||
#include "support/filetools.h" // OnlyPath, OnlyFilename
|
||||
#include "support/lstrings.h"
|
||||
#include "gettext.h" // _()
|
||||
#include "lyx_gui_misc.h" // WriteAlert
|
||||
|
||||
@ -38,10 +39,11 @@ string const getStringFromVector(vector<string> const & vec,
|
||||
int i = 0;
|
||||
for (vector<string>::const_iterator it = vec.begin();
|
||||
it != vec.end(); ++it) {
|
||||
if (it->empty()) continue;
|
||||
string item = strip(frontStrip(*it));
|
||||
if (item.empty()) continue;
|
||||
|
||||
if (i++ > 0) str += delim;
|
||||
str += *it;
|
||||
str += item;
|
||||
}
|
||||
return str;
|
||||
}
|
||||
@ -53,16 +55,17 @@ vector<string> const getVectorFromString(string const & str,
|
||||
if (str.empty())
|
||||
return vec;
|
||||
|
||||
string keys(str);
|
||||
string keys(strip(str));
|
||||
|
||||
for(;;) {
|
||||
string::size_type const idx = keys.find(delim);
|
||||
if (idx == string::npos) {
|
||||
string const key = frontStrip(keys);
|
||||
vec.push_back(keys);
|
||||
break;
|
||||
}
|
||||
|
||||
string const key = keys.substr(0, idx);
|
||||
string const key = strip(frontStrip(keys.substr(0, idx)));
|
||||
if (!key.empty())
|
||||
vec.push_back(key);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user