+2002-02-18 Herbert Voss <voss@lyx.org>
+
+ * ControlGraphics.[C]: remove help-file call
+
2002-02-18 Angus Leeming <a.leeming@ic.ac.uk>
* helper_funcs.h: wrap the structs firster and seconder up in a
return string();
}
-void ControlGraphics::help() const
-{
- lv_.getDialogs()->showFile(i18nLibFileSearch("help","Graphics.hlp"));
-}
string const readBB(string const & file);
/// Control the bb
bool bbChanged;
- /// Show Help file
- void help() const;
private:
/// Dispatch the changed parameters to the kernel.
* xforms_helpers.h: remove incorrect comment.
+2002-02-18 Herbert Voss <voss@lyx.org>
+
+ * FormGraphics.C: same units for LyX and Latex view, cosmetics
+
2002-02-18 Angus Leeming <a.leeming@ic.ac.uk>
* Timeout_pimpl.[Ch] (running): new method.
fl_set_input_return (lyxview_->input_lyxheight, FL_RETURN_CHANGED);
fl_set_input_return (lyxview_->input_lyxscale, FL_RETURN_CHANGED);
- fl_addto_choice(lyxview_->choice_width_lyxwidth, choice_Length_WithUnit.c_str());
- fl_addto_choice(lyxview_->choice_width_lyxheight, choice_Length_WithUnit.c_str());
+ fl_addto_choice(lyxview_->choice_width_lyxwidth, choice_Length_All.c_str());
+ fl_addto_choice(lyxview_->choice_width_lyxheight, choice_Length_All.c_str());
bc().addReadOnly(lyxview_->radio_pref);
bc().addReadOnly(lyxview_->radio_mono);
// path, because the controller knows nothing about the doc-dir
controller().bbChanged = false;
if (igp.bb.empty()) {
- string const fileWithAbsPath =
+ lyxerr[Debug::GRAPHICS] << "update:: no BoundingBox" << endl;
+ string const fileWithAbsPath =
MakeAbsPath(igp.filename, OnlyPath(igp.filename));
- string const bb = controller().readBB(fileWithAbsPath);
+ string const bb = controller().readBB(fileWithAbsPath);
if (!bb.empty()) {
// get the values from the file
// in this case we always have the point-unit
fl_set_input(bbox_->input_bb_x1, bb.c_str());
fl_set_input(bbox_->input_bb_y1, bb.c_str());
}
- string const unit("pt");
- fl_set_choice_text(bbox_->choice_bb_units, unit.c_str());
+ fl_set_choice(bbox_->choice_bb_units, 1); // "pt"
} else { // get the values from the inset
+ lyxerr[Debug::GRAPHICS] << "update:: igp has BoundingBox" << endl;
controller().bbChanged = true;
LyXLength anyLength;
anyLength = LyXLength(token(igp.bb,' ',0));
(docbook):
(validate): the file locatation is given by an entity reference.
+2002-02-18 Herbert Voss <voss@lyx.org>
+
+ * insetgraphics.C: use [Debug::GRAPHICS] for lyxerr
+
2002-02-18 Angus Leeming <a.leeming@ic.ac.uk>
* insetexternal.C Changes due to the renaming of support/syscall.[Ch]
else if (token == "Figure") // Compatibility reading of FigInset figures.
readFigInset(buf, lex);
else
- lyxerr[Debug::INFO] << "Not a Graphics or Figure inset!\n";
+ lyxerr[Debug::GRAPHICS] << "Not a Graphics or Figure inset!\n";
updateInset();
}
lex.next();
string const token = lex.getString();
- lyxerr[Debug::INFO] << "Token: '" << token << '\''
+ lyxerr[Debug::GRAPHICS] << "Token: '" << token << '\''
<< endl;
if (token.empty()) {
lex.next();
string const token = lex.getString();
- lyxerr[Debug::INFO] << "Token: " << token << endl;
+ lyxerr[Debug::GRAPHICS] << "Token: " << token << endl;
if (token.empty())
continue;
// lyxrc.pdf_mode means:
// Are we creating a PDF or a PS file?
// (Should actually mean, are we using latex or pdflatex).
- lyxerr[Debug::INFO] << "decideOutput::lyxrc.pdf_mode = " << lyxrc.pdf_mode << "\n";
+ lyxerr[Debug::GRAPHICS] << "decideOutput::lyxrc.pdf_mode = " << lyxrc.pdf_mode << "\n";
if (lyxrc.pdf_mode) {
if (contains(suffix,"ps") || suffix == "pdf")
return "pdf";
return "png";
}
// If it's postscript, we always do eps.
- lyxerr[Debug::INFO] << "decideOutput: we have PostScript mode\n";
+ lyxerr[Debug::GRAPHICS] << "decideOutput: we have PostScript mode\n";
if (suffix != "ps")
return "eps";
else
//
// if it's a zipped one, than let LaTeX do the rest!!!
if ((zippedFile(params.filename) && params.noUnzip) || buf->niceFile) {
- lyxerr[Debug::INFO] << "don't unzip file or export latex"
+ lyxerr[Debug::GRAPHICS] << "don't unzip file or export latex"
<< params.filename << endl;
return params.filename;
}
string outfile;
string const temp = AddName(buf->tmppath, filename_);
outfile = RemoveExtension(temp);
- lyxerr[Debug::INFO] << "tempname = " << temp << "\n";
- lyxerr[Debug::INFO] << "buf::tmppath = " << buf->tmppath << "\n";
- lyxerr[Debug::INFO] << "filename_ = " << filename_ << "\n";
- lyxerr[Debug::INFO] << "outfile = " << outfile << endl;
+ lyxerr[Debug::GRAPHICS] << "tempname = " << temp << "\n";
+ lyxerr[Debug::GRAPHICS] << "buf::tmppath = " << buf->tmppath << "\n";
+ lyxerr[Debug::GRAPHICS] << "filename_ = " << filename_ << "\n";
+ lyxerr[Debug::GRAPHICS] << "outfile = " << outfile << endl;
converters.convert(buf, filename_, outfile, extension, image_target);
return outfile;
}
+2002-02-18 Herbert Voss <voss@perce.de>
+
+ * filetools.C: (getExtFromContents) return the fileextension
+ if no format is detected.
+
2002-02-18 Angus Leeming <a.leeming@ic.ac.uk>
* syscall.[Ch]: renamed as systemcall.[Ch]. class Systemcalls renamed
// GZIP \037\213\010\010... http://www.ietf.org/rfc/rfc1952.txt
// ZIP PK... http://www.halyava.ru/document/ind_arch.htm
// Z \037\177 UNIX compress
+
/// return the "extension" which belongs to the contents
+/// for no knowing contents return the extension. Without
+/// an extension and unknown contents we return "user"
string const getExtFromContents(string const & filename) {
if (filename.empty() || !IsFileReadable(filename))
return string(); // paranoia check
bool zipChecked = false;
for (; count < max_count; ++count) {
if (ifs.eof()) {
- lyxerr[Debug::INFO] << "filetools(getExtFromContents)"
+ lyxerr[Debug::GRAPHICS] << "filetools(getExtFromContents)"
" End of file reached and it wasn't found to be a known Type!" << endl;
break;
}
else if (contains(str,"PNG"))
return "png";
else if (contains(str,"%!PS-Adobe")) { // eps or ps
- // test if it's ps or eps
ifs >> str;
if (contains(str,"EPSF"))
return "eps";
else if (contains(str,"XPM"))
return "xpm";
}
- lyxerr[Debug::INFO] << "filetools(getExtFromContents)\n"
+ lyxerr[Debug::GRAPHICS] << "filetools(getExtFromContents)\n"
"\tCouldn't find a known Type!"
- "\twill use a \"user\" defined format (based on file extension)" << endl;
+ "\twill use ext or a \"user\" defined format" << endl;
+ string const ext(GetExtension(filename));
+ if (!ext.empty())
+ return ext;
return "user";
}