+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.
///
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.
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_;
#include "frontends/FileDialog.h"
#include "support/filetools.h" // OnlyPath, OnlyFilename
+#include "support/lstrings.h"
#include "gettext.h" // _()
#include "lyx_gui_misc.h" // WriteAlert
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;
}
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);