+2004-01-07 Lars Gullik Bjonnes <larsbj@gullik.net>
+
+ * ShareContainer.h: make isEqual and isUnique adaptable
+
+ * CutAndPaste.C: make resetOwnerAndChanges adaptable
+
2004-01-07 Angus Leeming <leeming@lyx.org>
* LyXAction.C:
namespace {
-struct resetOwnerAndChanges {
- void operator()(Paragraph & p) {
+struct resetOwnerAndChanges : public std::unary_function<Paragraph, void> {
+ void operator()(Paragraph & p) const {
p.cleanChanges();
p.setInsetOwner(0);
}
}
private:
/// A functor returning true if the elements are equal.
- struct isEqual {
+ struct isEqual : public std::unary_function<value_type, bool> {
isEqual(Share const & s) : p_(s) {}
bool operator()(value_type const & p1) const {
return *p1.get() == p_;
Share const & p_;
};
/// A functor returning true if the element is unique.
- struct isUnique {
+ struct isUnique : public std::unary_function<value_type, bool> {
bool operator()(value_type const & p) const {
return p.unique();
}
+2004-01-07 Lars Gullik Bjonnes <larsbj@gullik.net>
+
+ * ControlSendto.C (allFormats): use the unique-erase idom and
+ simplify some code a bit.
+
+ * ControlMath.C: make CompareKey adaptable
+
2004-01-07 Angus Leeming <leeming@lyx.org>
* ControlSearch.C:
(readBB): attempt to read the BoundingBox from the graphics file.
If that fails, try the Graphics Cache.
(all_origins, origin_gui_str): helpers for the frontends.
-
+
2003-12-01 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
* ControlVSpace.C: enable the buttons for new insets.
2003-11-04 Alfredo Braunstein <abraunst@libero.it>
- * ControlSpellchecker.[Ch] (nextWord, check): rewrite of the text
+ * ControlSpellchecker.[Ch] (nextWord, check): rewrite of the text
handling parts
2003-10-27 Juergen Spitzmueller <j.spitzmueller@gmx.de>
}
-struct CompareKey {
+struct CompareKey : public std::unary_function<XPMmap, bool> {
CompareKey(string const & name) : name_(name) {}
- bool operator()(XPMmap const & other) {
- return compare(other.key, name_.c_str()) == 0;
+ bool operator()(XPMmap const & other) const {
+ return other.key == name_;
}
private:
string const name_;
// Remove repeated formats.
std::sort(to.begin(), to.end());
-
- vector<Format const *>::iterator to_begin = to.begin();
- vector<Format const *>::iterator to_end = to.end();
- vector<Format const *>::iterator to_it =
- std::unique(to_begin, to_end);
- if (to_it != to_end)
- to.erase(to_it, to_end);
+ to.erase(std::unique(to.begin(), to.end()), to.end());
return to;
}
+2004-01-07 Lars Gullik Bjonnes <larsbj@gullik.net>
+
+ * FormForks.C: make FindPID adaptable and constify operator()
+
+ * FormFiledialog.C: make comp_direntry adaptable
+
2004-01-05 Angus Leeming <leeming@lyx.org>
* FormFiledialog.C (glob2regex, globMatch): removed.
* forms/form_maths_panel.fd (label): replace label "Greek" by
"abg" for alpha beta gamma.
- * forms/form_tabular.fd (label):
+ * forms/form_tabular.fd (label):
* FormDocument.C (build): remove use of latin1 in
some translatable strings. This confuses gettext.
GroupCache lyxGroupCache;
// compares two LyXDirEntry objects content (used for sort)
-class comp_direntry {
+class comp_direntry : public std::binary_function<DirEntry, DirEntry, bool> {
public:
bool operator()(DirEntry const & r1, DirEntry const & r2) const
{
vector<string> const glob_matches =
lyx::support::expand_globs(mask_, directory_);
-
+
time_t curTime = time(0);
rewinddir(dir);
while (dirent * entry = readdir(dir)) {
namespace {
-class FindPID {
+class FindPID : public std::unary_function<string, bool> {
public:
FindPID(string const & pid) : pid_(pid) {}
- bool operator()(string const & line)
+ bool operator()(string const & line) const
{
if (line.empty())
return false;
+2004-01-07 Lars Gullik Bjonnes <larsbj@gullik.net>
+
+ * GraphicsTypes.C: include <string>
+
2003-11-20 Lars Gullik Bjonnes <larsbj@gullik.net>
* Previews.C: include paragraph.h
#include "graphics/GraphicsTypes.h"
+#include <string>
+
using std::string;
} // namespace anon
-Translator<DisplayType, string> const & displayTranslator()
+Translator<DisplayType, string> const & displayTranslator()
{
static Translator<DisplayType, string> const translator =
initTranslator();