2001-04-04 Lars Gullik Bjønnes <larsbj@birdstep.com>
+ * MenuBackend.C (class compare_format): put into anon namespace
+ (expand): constify label, names, action, action2
+ (expand):
+
* text.C (SingleWidth): constify font
(IsBoundary): constify rtl2
(GetVisibleRow): constify ww
}
}
+
+namespace {
+
class compare_format {
public:
bool operator()(Format const * p1, Format const * p2) {
}
};
+} // namespace anon
+
+
void Menu::expand(Menu & tomenu, Buffer * buf) const
{
for (const_iterator cit = begin();
for (LastFiles::const_iterator lfit = lastfiles->begin();
lfit != lastfiles->end() && ii < 10;
++lfit, ++ii) {
- string label = tostr(ii) + ". "
+ string const label = tostr(ii) + ". "
+ MakeDisplayPath((*lfit), 30)
+ '|' + tostr(ii);
- int action = lyxaction.
+ int const action = lyxaction.
getPseudoAction(LFUN_FILE_OPEN,
(*lfit));
tomenu.add(MenuItem(MenuItem::Command,
break;
case MenuItem::Documents: {
- vector<string> names = bufferlist.getFileNames();
+ vector<string> const names = bufferlist.getFileNames();
if (names.empty()) {
tomenu.add(MenuItem(MenuItem::Command,
for (vector<string>::const_iterator docit = names.begin();
docit != names.end() ; ++docit) {
- int action =
+ int const action =
lyxaction.getPseudoAction(LFUN_SWITCHBUFFER, *docit);
- string label = MakeDisplayPath(*docit, 30);
+ string const label =
+ MakeDisplayPath(*docit, 30);
tomenu.add(MenuItem(MenuItem::Command,
label, action));
}
label = _("Ascii text as paragraphs");
if (!(*fit)->shortcut().empty())
label += "|" + (*fit)->shortcut();
- int action2 = lyxaction.
+ int const action2 = lyxaction.
getPseudoAction(action, (*fit)->name());
tomenu.add(MenuItem(MenuItem::Command,
label, action2));
*
* LyX, The Document Processor
*
- * Copyright 1995-2000 The LyX Team
+ * Copyright 1995-2001 The LyX Team
*
* ======================================================*/
#pragma interface
#endif
-#include "config.h"
+#include <config.h>
#include "LString.h"
// This is only included to provide stuff for the non-public sections