+2000-12-09 Dekel Tsur <dekelts@tau.ac.il>
+
+ * src/converter.C (Move): New method. Used to move file or files
+ from temp dir to the output dir. (this fixes the bug that
+ exporting linuxdoc/docbook document to html would not move all
+ html file from temp directory).
+
+ * src/support/filetools.C (DirList): Fixed.
+
+ * src/lstrings.C (prefixIs): Fixed (how nobody noticed it before??).
+
+2000-12-08 Dekel Tsur <dekelts@tau.ac.il>
+
+ * src/converter.C (Add): Remove $$i when setting latex_command.
+
+ * src/text.C (IsBoundary): Return false when pos = 0.
+
+2000-12-08 Dekel Tsur <dekelts@tau.ac.il>
+
+ * lib/kbd/hebrew.kmap: Add Hebrew points (nikud).
+
+2000-12-07 Angus Leeming <a.leeming@ic.ac.uk>
+
+ * src/frontends/xforms/FormDocument.C (checkMarginValues): you don't
+ need to empty the fields to turn off use of the geometry package!
+
2000-12-07 Angus Leeming <a.leeming@ic.ac.uk>
* src/lyxparagraph.h, src/paragraph.C (CopyIntoMinibuffer): pass a
#
# Hebrew keyboard definition for LyX
#
-# (C)2000 by Dekel Tsur, dekel@math.tau.ac.il
+# (C)2000 by Dekel Tsur, dekelts@tau.ac.il
#
\kmap ` ;
\kmap q /
\kmap B ð
\kmap N î
\kmap M ö
+
+# Hebrew points (nikud)
+\kmap E È # Shift+Qof = Qamats
+\kmap R Ì # Shift+Resh = Shuruq (= Dagesh)
+\kmap U É # Shift+Vav = Holam
+\kmap P Ç # Shift+Pe = Patah
+
+\kmap A À # Shift+Shin = Sheva
+\kmap S Ì # Shift+Delat = Dagesh (= Shuruq)
+\kmap G Ò # Shin dot
+\kmap H Ñ # Sin dot
+\kmap J Ä # Shift+Het = Hiriq
+
+\kmap X Æ # Shift+Samekh = Segol
+\kmap C Ë # Shift+Bet = Qubuts
+\kmap V Á # Hataf segol
+\kmap B Â # Hataf patah
+\kmap N Ã # Hataf qamats
+\kmap M Å # Shift+Tsadi = Tsere
src/frontends/kde/tocdlg.C
src/frontends/kde/urldlg.C
src/frontends/xforms/FormBase.h
-src/frontends/xforms/FormCitation.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/FormDocument.C
+src/frontends/xforms/FormCopyright.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/FormGraphics.C
+src/frontends/xforms/FormError.C
src/frontends/xforms/form_graphics.C
-src/frontends/xforms/FormIndex.C
+src/frontends/xforms/FormGraphics.C
src/frontends/xforms/form_index.C
+src/frontends/xforms/FormIndex.C
src/frontends/xforms/FormInset.h
-src/frontends/xforms/FormParagraph.C
src/frontends/xforms/form_paragraph.C
-src/frontends/xforms/FormPreferences.C
+src/frontends/xforms/FormParagraph.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/FormTabular.C
+src/frontends/xforms/FormRef.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/input_validators.C
src/frontends/xforms/Menubar_pimpl.C
src/frontends/xforms/xform_helpers.C
converter.ReadFlags();
if (converter.latex && (latex_command.empty() || to == "dvi"))
- latex_command = command;
+ latex_command = subst(command, token_from, "");
// If we have both latex & pdflatex, we set latex_command to latex.
// The latex_command is used to update the .aux file when running
// a converter that uses it.
formats.Extension(to_format));
if (from_format == to_format)
- if (from_file != to_file)
- return lyx::rename(from_file, to_file);
- else
- return true;
+ return Move(from_file, to_file, false);
EdgePath edgepath = GetPath(from_format, to_format);
if (edgepath.empty()) {
return false;
}
}
- } else if (outfile != to_file) {
- bool moved = (conv.latex)
- ? lyx::copy(outfile, to_file)
- : lyx::rename(outfile, to_file);
- if (!moved) {
- WriteAlert(_("Error while trying to move file:"),
- outfile, _("to ") + to_file);
- return false;
- }
- }
-
- return true;
+ return true;
+ } else
+ return Move(outfile, to_file, conv.latex);
}
+// If from = /path/file.ext and to = /path2/file2.ext2 then this method
+// moves each /path/file*.ext file to /path2/file2*.ext2'
+bool Converters::Move(string const & from, string const & to, bool copy)
+{
+ if (from == to)
+ return true;
+
+ bool no_errors = true;
+ string path = OnlyPath(from);
+ string base = OnlyFilename(ChangeExtension(from, ""));
+ string to_base = ChangeExtension(to, "");
+ string to_extension = GetExtension(to);
+
+ vector<string> files = DirList(OnlyPath(from), GetExtension(from));
+ for (vector<string>::const_iterator it = files.begin();
+ it != files.end(); ++it)
+ if (prefixIs(*it, base)) {
+ string from2 = path + *it;
+ string to2 = to_base + (*it).substr(base.length());
+ to2 = ChangeExtension(to2, to_extension);
+ lyxerr << "moving " << from2 << " to " << to2 << endl;
+ bool moved = (copy)
+ ? lyx::copy(from2, to2)
+ : lyx::rename(from2, to2);
+ if (!moved && no_errors) {
+ WriteAlert(_("Error while trying to move file:"),
+ from2, _("to ") + to2);
+ no_errors = false;
+ }
+ }
+ return no_errors;
+}
bool Converters::Convert(Buffer const * buffer,
string const & from_file, string const & to_file_base,
}
+
void Converters::BuildGraph()
{
vertices = vector<Vertex>(formats.size());
for (ConverterList::iterator it = converterlist.begin();
it != converterlist.end(); ++it) {
- int s = formats.GetNumber(it->from);
- int t = formats.GetNumber(it->to);
+ int const s = formats.GetNumber(it->from);
+ int const t = formats.GetNumber(it->to);
vertices[t].in_vertices.push_back(s);
vertices[s].out_vertices.push_back(t);
vertices[s].out_edges.push_back(it - converterlist.begin());
std::queue<int> Q;
///
int BFS_init(string const & start, bool clear_visited = true);
+ ///
+ bool Move(string const & from, string const & to, bool copy);
};
extern Formats formats;
void FormDocument::checkMarginValues()
{
+#if 0
int const allEmpty = (!strlen(fl_get_input(paper_->input_top_margin)) &&
!strlen(fl_get_input(paper_->input_bottom_margin)) &&
!strlen(fl_get_input(paper_->input_left_margin)) &&
!strlen(fl_get_input(paper_->input_custom_height)));
if (!allEmpty)
fl_set_button(paper_->push_use_geometry, 1);
+#endif
}
+
bool FormDocument::CheckDocumentInput(FL_OBJECT * ob, long)
{
string str;
{
// This is a non-error checking C/system implementation
string extension(ext);
- if (extension[0] != '.')
+ if (!extension.empty() && extension[0] != '.')
extension.insert(0, ".");
vector<string> dirlist;
DIR * dirp = ::opendir(dir.c_str());
dirent * dire;
while ((dire = ::readdir(dirp))) {
string const fil = dire->d_name;
- if (prefixIs(fil, extension)) {
+ if (suffixIs(fil, extension)) {
dirlist.push_back(fil);
}
}
string::size_type const prelen = pre.length();
string::size_type const alen = a.length();
- if (prelen < alen || a.empty())
+ if (prelen > alen || a.empty())
return false;
else {
#if !defined(USE_INCLUDED_STRING) && !defined(STD_STRING_IS_GOOD)
bool LyXText::IsBoundary(Buffer const * buf, LyXParagraph * par,
LyXParagraph::size_type pos) const
{
- if (!lyxrc.rtl_support)
- return false; // This is just for speedup
+ if (!lyxrc.rtl_support || pos == 0)
+ return false;
if (!bidi_InRange(pos - 1)) {
- lyxerr << "LyXText::IsBoundary This shouldn't happen\n";
+ lyxerr << "LyXText::IsBoundary This shouldn't happen." << endl;
return false;
}
lyxerr[Debug::LYXVC] << "doVCCommand: " << cmd << endl;
Systemcalls one;
Path p(path);
- int ret = one.startscript(Systemcalls::System, cmd);
+ int const ret = one.startscript(Systemcalls::System, cmd);
return ret;
}
{
// First we look for the CVS/Entries in the same dir
// where we have file.
- string dir = OnlyPath(file);
- string tmpf = "/" + OnlyFilename(file) + "/";
- dir += "/CVS/Entries";
+ string const dir = OnlyPath(file) + "/CVS/Entries";
+ string const tmpf = "/" + OnlyFilename(file) + "/";
lyxerr[Debug::LYXVC] << "LyXVC: checking in `" << dir
<< "' for `" << tmpf << "'" << endl;
- FileInfo f(dir);
+ FileInfo const f(dir);
if (f.readable()) {
// Ok we are at least in a CVS dir. Parse the CVS/Entries
// and see if we can find this file. We do a fast and