src/debug.C
src/exporter.C
src/ext_l10n.h
-src/figureForm.C
src/figure_form.C
+src/figureForm.C
src/FontLoader.C
src/frontends/controllers/ButtonController.h
src/frontends/controllers/character.C
src/frontends/qt2/tabularcreatedlgimpl.C
src/frontends/xforms/combox.C
src/frontends/xforms/FileDialog.C
-src/frontends/xforms/FormBibitem.C
src/frontends/xforms/form_bibitem.C
-src/frontends/xforms/FormBibtex.C
+src/frontends/xforms/FormBibitem.C
src/frontends/xforms/form_bibtex.C
+src/frontends/xforms/FormBibtex.C
src/frontends/xforms/form_browser.C
-src/frontends/xforms/FormCharacter.C
src/frontends/xforms/form_character.C
-src/frontends/xforms/FormCitation.C
+src/frontends/xforms/FormCharacter.C
src/frontends/xforms/form_citation.C
-src/frontends/xforms/FormCopyright.C
+src/frontends/xforms/FormCitation.C
src/frontends/xforms/form_copyright.C
-src/frontends/xforms/FormCredits.C
+src/frontends/xforms/FormCopyright.C
src/frontends/xforms/form_credits.C
-src/frontends/xforms/FormDocument.C
+src/frontends/xforms/FormCredits.C
src/frontends/xforms/form_document.C
-src/frontends/xforms/FormError.C
+src/frontends/xforms/FormDocument.C
src/frontends/xforms/form_error.C
-src/frontends/xforms/FormExternal.C
+src/frontends/xforms/FormError.C
src/frontends/xforms/form_external.C
-src/frontends/xforms/FormFiledialog.C
+src/frontends/xforms/FormExternal.C
src/frontends/xforms/form_filedialog.C
-src/frontends/xforms/FormGraphics.C
+src/frontends/xforms/FormFiledialog.C
src/frontends/xforms/form_graphics.C
-src/frontends/xforms/FormInclude.C
+src/frontends/xforms/FormGraphics.C
src/frontends/xforms/form_include.C
-src/frontends/xforms/FormIndex.C
+src/frontends/xforms/FormInclude.C
src/frontends/xforms/form_index.C
+src/frontends/xforms/FormIndex.C
src/frontends/xforms/FormLog.C
src/frontends/xforms/FormMathsBitmap.C
-src/frontends/xforms/FormMathsDeco.C
src/frontends/xforms/form_maths_deco.C
-src/frontends/xforms/FormMathsDelim.C
+src/frontends/xforms/FormMathsDeco.C
src/frontends/xforms/form_maths_delim.C
-src/frontends/xforms/FormMathsMatrix.C
+src/frontends/xforms/FormMathsDelim.C
src/frontends/xforms/form_maths_matrix.C
-src/frontends/xforms/FormMathsPanel.C
+src/frontends/xforms/FormMathsMatrix.C
src/frontends/xforms/form_maths_panel.C
-src/frontends/xforms/FormMathsSpace.C
+src/frontends/xforms/FormMathsPanel.C
src/frontends/xforms/form_maths_space.C
-src/frontends/xforms/FormMinipage.C
+src/frontends/xforms/FormMathsSpace.C
src/frontends/xforms/form_minipage.C
-src/frontends/xforms/FormParagraph.C
+src/frontends/xforms/FormMinipage.C
src/frontends/xforms/form_paragraph.C
-src/frontends/xforms/FormPreamble.C
+src/frontends/xforms/FormParagraph.C
src/frontends/xforms/form_preamble.C
-src/frontends/xforms/FormPreferences.C
+src/frontends/xforms/FormPreamble.C
src/frontends/xforms/form_preferences.C
-src/frontends/xforms/FormPrint.C
+src/frontends/xforms/FormPreferences.C
src/frontends/xforms/form_print.C
-src/frontends/xforms/FormRef.C
+src/frontends/xforms/FormPrint.C
src/frontends/xforms/form_ref.C
-src/frontends/xforms/FormSearch.C
+src/frontends/xforms/FormRef.C
src/frontends/xforms/form_search.C
-src/frontends/xforms/FormTabular.C
+src/frontends/xforms/FormSearch.C
src/frontends/xforms/form_tabular.C
-src/frontends/xforms/FormTabularCreate.C
+src/frontends/xforms/FormTabular.C
src/frontends/xforms/form_tabular_create.C
-src/frontends/xforms/FormToc.C
+src/frontends/xforms/FormTabularCreate.C
src/frontends/xforms/form_toc.C
-src/frontends/xforms/FormUrl.C
+src/frontends/xforms/FormToc.C
src/frontends/xforms/form_url.C
+src/frontends/xforms/FormUrl.C
src/frontends/xforms/FormVCLog.C
src/frontends/xforms/input_validators.C
src/frontends/xforms/Menubar_pimpl.C
bv_->text->cursor.par()->id(),
bv_->text->cursor.pos());
if (i > 0) {
- string const str = _("Saved bookmark") + ' ' + tostr(i);
- owner_->message(str);
+ ostringstream str;
+ str << _("Saved bookmark") << ' ' << i;
+ owner_->message(str.str().c_str());
}
}
update(bv_->text, BufferView::SELECT|BufferView::FITCUR);
if (i > 0) {
- string const str = _("Moved to bookmark") + ' ' + tostr(i);
- owner_->message(str);
+ ostringstream str;
+ str << _("Moved to bookmark") << ' ' << i;
+ owner_->message(str.str().c_str());
}
}
if (!IsLyXFilename(filename))
filename += ".lyx";
+ string const disp_fn(MakeDisplayPath(filename));
+
// Inserts document
- string const s1 = _("Inserting document") + ' '
- + MakeDisplayPath(filename) + " ...";
- owner_->message(s1);
+ ostringstream s1;
+ s1 << _("Inserting document") << ' '
+ << disp_fn << " ...";
+ owner_->message(s1.str().c_str());
bool const res = bv_->insertLyXFile(filename);
if (res) {
- string const str = _("Document") + ' '
- + MakeDisplayPath(filename) + ' ' + _("inserted.");
- owner_->message(str);
+ ostringstream str;
+ str << _("Document") << ' ' << disp_fn
+ << ' ' << _("inserted.");
+ owner_->message(str.str().c_str());
} else {
- string const str = _("Could not insert document") + ' '
- + MakeDisplayPath(filename);
- owner_->message(str);
+ ostringstream str;
+ str << _("Could not insert document") << ' '
+ << disp_fn;
+ owner_->message(str.str().c_str());
}
}
+2001-06-14 Lars Gullik Bjønnes <larsbj@birdstep.com>
+
+ * lyxfunc.C (Dispatch): use stringstream
+ (MenuNew): use stringstream
+ (Open): use stringstream
+
+ * importer.C (Import): use stringstream
+
+ * bufferview_funcs.C (CurrentState): use stringstream
+
+ * LaTeX.C (run): use stringstream
+
+ * BufferView_pimpl.C (savePosition): use stringstream
+ (restorePosition): use stringstream
+ (MenuInsertLyXFile): use stringstream
+
2001-06-14 Angus Leeming <a.leeming@ic.ac.uk>
* BufferView.C:
ifstream ifs(tmp.c_str());
while (getline(ifs, token)) {
- string srcfile, line, pos, warno, warning;
+ string srcfile;
+ string line;
+ string pos;
+ string warno;
+ string warning;
token = split(token, srcfile, ':');
token = split(token, line, ':');
token = split(token, pos, ':');
++count;
lyxerr[Debug::LATEX] << "Run #" << count << endl;
- if (lfun) lfun->Dispatch(LFUN_MESSAGE, _("LaTeX run number") + ' ' + tostr(count));
+ if (lfun) {
+ ostringstream str;
+ str << _("LaTeX run number") << ' ' << count;
+ lfun->Dispatch(LFUN_MESSAGE, str.str().c_str());
+ }
+
//WriteStatus(lfun, string(_("LaTeX run number ")) + tostr(count));
this->operator()();
<< "Dep. file has changed or rerun requested" << endl;
lyxerr[Debug::LATEX]
<< "Run #" << count << endl;
- if (lfun) lfun->Dispatch(LFUN_MESSAGE, _("LaTeX run number") + ' ' + tostr(count));
+ if (lfun) {
+ ostringstream str;
+ str << _("LaTeX run number") << ' ' << count;
+ lfun->Dispatch(LFUN_MESSAGE, str.str().c_str());
+ }
+
// WriteStatus(minib,
// string(_("LaTeX run number ")) + tostr(count));
this->operator()();
rerun = false;
++count;
lyxerr[Debug::LATEX] << "Run #" << count << endl;
- if (lfun) lfun->Dispatch(LFUN_MESSAGE, _("LaTeX run numger") + ' ' + tostr(count));
+ if (lfun) {
+ ostringstream str;
+ str << _("LaTeX run number") << ' ' << count;
+ lfun->Dispatch(LFUN_MESSAGE, str.str().c_str());
+ }
+
// WriteStatus(minib, string(_("LaTeX run number ")) + tostr(count));
this->operator()();
scanres = scanLogFile(terr);
// Returns the current font and depth as a message.
string const CurrentState(BufferView * bv)
{
- string state;
+ ostringstream state;
+
if (bv->available()) {
// I think we should only show changes from the default
// font. (Asger)
.TextClass(buffer->params.textclass)
.defaultfont();
font.reduce(defaultfont);
- state = _("Font: ") + font.stateText(&buffer->params);
+
+ state << _("Font:") << ' '
+ << font.stateText(&buffer->params);
+
// The paragraph depth
int depth = text->GetDepth();
- if (depth > 0)
- state += string(_(", Depth: ")) + tostr(depth);
+ if (depth > 0)
+ state << _(", Depth: ") << depth;
+
// The paragraph spacing, but only if different from
// buffer spacing.
if (!text->cursor.par()->params.spacing().isDefault()) {
Spacing::Space cur_space =
text->cursor.par()->params.spacing().getSpace();
- state += _(", Spacing: ");
+ state << _(", Spacing: ");
+
switch (cur_space) {
case Spacing::Single:
- state += _("Single");
+ state << _("Single");
+
break;
case Spacing::Onehalf:
- state += _("Onehalf");
+ state << _("Onehalf");
break;
case Spacing::Double:
- state += _("Double");
+ state << _("Double");
break;
case Spacing::Other:
- state += _("Other (");
- state += tostr(text->cursor.par()->params.spacing().getValue());
- state += ")";
+ state << _("Other (")
+ << text->cursor.par()->params.spacing().getValue()
+ << ")";
break;
case Spacing::Default:
// should never happen, do nothing
}
}
}
- return state;
+ return state.str().c_str();
}
string const & format)
{
string const displaypath = MakeDisplayPath(filename);
- string const s1 = _("Importing") + ' ' + displaypath + "...";
- lv->message(s1);
+ ostringstream s1;
+ s1 << _("Importing") << ' ' << displaypath << "...";
+ lv->message(s1.str().c_str());
string const lyxfile = ChangeExtension(filename, ".lyx");
<< " in " << lyxrc_path << endl;
if (lyxrc.read(lyxrc_path) < 0) {
WriteAlert(_("LyX Warning!"),
- _("Error while reading ")+lyxrc_path+".",
+ _("Error while reading ") + lyxrc_path + ".",
_("Using built-in defaults."));
return false;
}
case LFUN_MENUWRITE:
if (!owner->buffer()->isUnnamed()) {
- string const s1 = _("Saving document") + ' '
- + MakeDisplayPath(owner->buffer()->fileName()
- + "...");
-
- owner->message(s1);
+ ostringstream s1;
+ s1 << _("Saving document") << ' '
+ << MakeDisplayPath(owner->buffer()->fileName() + "...");
+ owner->message(s1.str().c_str());
MenuWrite(owner->view(), owner->buffer());
} else
WriteAs(owner->view(), owner->buffer());
AllowInput(owner->view());
break;
}
- string const str = _("Opening help file") + ' '
- + MakeDisplayPath(fname) + "...";
-
- owner->message(str);
+ ostringstream str;
+ str << _("Opening help file") << ' '
+ << MakeDisplayPath(fname) << "...";
+ owner->message(str.str().c_str());
owner->view()->buffer(bufferlist.loadLyXFile(fname,false));
AllowInput(owner->view());
break;
MakeDisplayPath(s, 50),
_("Do you want to open the document?"))) {
// loads document
- owner->message(_("Opening document") + ' '
- + MakeDisplayPath(s) + "...");
- XFlush(fl_get_display());
+ string const disp_fn(MakeDisplayPath(s));
+
+ ostringstream str;
+ str << _("Opening document") << ' '
+ << disp_fn << "...";
+
+ owner->message(str.str().c_str());
+ //XFlush(fl_get_display());
owner->view()->buffer(
bufferlist.loadLyXFile(s));
- owner->message(_("Document") + ' '
- + MakeDisplayPath(s) + ' '
- + _("opened."));
+ ostringstream str2;
+ str2 << _("Document") << ' '
+ << disp_fn << ' ' << _("opened.");
+
+ owner->message(str2.str().c_str());
+
return;
}
}
filename += ".lyx";
// loads document
- owner->message(_("Opening document") + ' '
- + MakeDisplayPath(filename) + "...");
+ string const disp_fn(MakeDisplayPath(filename));
+
+ ostringstream str;
+ str << _("Opening document") << ' ' << disp_fn << "...";
+
+ owner->message(str.str().c_str());
+
Buffer * openbuf = bufferlist.loadLyXFile(filename);
if (openbuf) {
owner->view()->buffer(openbuf);
- owner->message(_("Document") + ' '
- + MakeDisplayPath(filename)
- + ' ' + _("opened."));
+ ostringstream str;
+ str << _("Document") << ' ' << disp_fn << ' ' << _("opened.");
+ owner->message(str.str().c_str());
} else {
- owner->message(_("Could not open document") + ' '
- + MakeDisplayPath(filename));
+ ostringstream str;
+ str << _("Could not open docuent") << ' ' << disp_fn;
+ owner->message(str.str().c_str());
}
}