namespace {
-int const LYX_FORMAT = 295; //Uwe: htmlurl, href
+int const LYX_FORMAT = 297; //Uwe: Albanian, lower Sorbian
} // namespace anon
{
if (pimpl_->read_only != flag) {
pimpl_->read_only = flag;
- readonly(flag);
+ setReadOnly(flag);
}
}
// Check if the label 'from' appears more than once
vector<docstring> labels;
+ string paramName;
if (code == CITE_CODE) {
BiblioInfo keys;
keys.fillWithBibKeys(this);
for (; bit != bend; ++bit)
// FIXME UNICODE
labels.push_back(bit->first);
- } else
+ paramName = "key";
+ } else {
getLabelList(labels);
+ paramName = "reference";
+ }
if (std::count(labels.begin(), labels.end(), from) > 1)
return;
for (InsetIterator it = inset_iterator_begin(inset()); it; ++it) {
if (it->lyxCode() == code) {
InsetCommand & inset = static_cast<InsetCommand &>(*it);
- inset.replaceContents(to_utf8(from), to_utf8(to));
+ docstring const oldValue = inset.getParam(paramName);
+ if (oldValue == from)
+ inset.setParam(paramName, to);
}
}
}
void Buffer::setBusy(bool on) const
{
if (gui_)
- gui_->busy(on);
+ gui_->setBusy(on);
}
-void Buffer::readonly(bool on) const
+void Buffer::setReadOnly(bool on) const
{
if (gui_)
- gui_->readonly(on);
+ gui_->setReadOnly(on);
}
if (newname.empty()) { /// No argument? Ask user through dialog
// FIXME UNICODE
- FileDialog fileDlg(_("Choose a filename to save document as"),
- LFUN_BUFFER_WRITE_AS,
- make_pair(_("Documents|#o#O"),
- from_utf8(lyxrc.document_path)),
- make_pair(_("Templates|#T#t"),
- from_utf8(lyxrc.template_path)));
+ FileDialog dlg(_("Choose a filename to save document as"),
+ LFUN_BUFFER_WRITE_AS);
+ dlg.setButton1(_("Documents|#o#O"), from_utf8(lyxrc.document_path));
+ dlg.setButton2(_("Templates|#T#t"), from_utf8(lyxrc.template_path));
if (!support::isLyXFilename(fname))
fname += ".lyx";
support::FileFilterList const filter(_("LyX Documents (*.lyx)"));
FileDialog::Result result =
- fileDlg.save(from_utf8(onlyPath(fname)),
+ dlg.save(from_utf8(onlyPath(fname)),
filter,
from_utf8(onlyFilename(fname)));
for (InsetIterator it = inset_iterator_begin(inset()); it; ++it) {
if (it->lyxCode() != INCLUDE_CODE)
continue;
- InsetInclude const & inset = static_cast<InsetInclude const &>(*it);
+ InsetCommand const & inset = static_cast<InsetCommand const &>(*it);
InsetCommandParams const & ip = inset.params();
Buffer * child = loadIfNeeded(*this, ip);
if (!child)
}
-bool Buffer::doExport(string const & format,
- bool put_in_tempdir, string & result_file)
+bool Buffer::doExport(string const & format, bool put_in_tempdir,
+ string & result_file)
{
string backend_format;
OutputParams runparams(¶ms().encoding());