mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-23 02:14:50 +00:00
Fix figinset for the case when the filename doesn't contain a suffix.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1835 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
833bd37843
commit
cdb40c285b
@ -1,3 +1,9 @@
|
|||||||
|
2001-03-27 Dekel Tsur <dekelts@tau.ac.il>
|
||||||
|
|
||||||
|
* figinset.C (GetPSSizes): Fix for the case when filename doesn't
|
||||||
|
contain a suffix.
|
||||||
|
(Clone): ditto
|
||||||
|
|
||||||
2001-03-26 Juergen Vigna <jug@sad.it>
|
2001-03-26 Juergen Vigna <jug@sad.it>
|
||||||
|
|
||||||
* lyxinset.h: added ShowInsetDialog() function in UpdatableInset.
|
* lyxinset.h: added ShowInsetDialog() function in UpdatableInset.
|
||||||
|
@ -1255,12 +1255,15 @@ Inset * InsetFig::Clone(Buffer const & buffer) const
|
|||||||
tmp->pswid = pswid;
|
tmp->pswid = pswid;
|
||||||
tmp->pshgh = pshgh;
|
tmp->pshgh = pshgh;
|
||||||
tmp->fname = fname;
|
tmp->fname = fname;
|
||||||
if (!fname.empty() && IsFileReadable(fname)
|
string lfname = fname;
|
||||||
|
if (!fname.empty() && GetExtension(fname).empty())
|
||||||
|
lfname += ".eps";
|
||||||
|
if (!fname.empty() && IsFileReadable(lfname)
|
||||||
&& (flags & 3) && !lyxrc.ps_command.empty()
|
&& (flags & 3) && !lyxrc.ps_command.empty()
|
||||||
&& lyxrc.use_gui) {
|
&& lyxrc.use_gui) {
|
||||||
// do not display if there is
|
// do not display if there is
|
||||||
// "do not display" chosen (Matthias 260696)
|
// "do not display" chosen (Matthias 260696)
|
||||||
tmp->figure->data = getfigdata(wid, hgh, fname, psx, psy,
|
tmp->figure->data = getfigdata(wid, hgh, lfname, psx, psy,
|
||||||
pswid, pshgh, raw_wid, raw_hgh,
|
pswid, pshgh, raw_wid, raw_hgh,
|
||||||
angle, flags & (3|8));
|
angle, flags & (3|8));
|
||||||
} else tmp->figure->data = 0;
|
} else tmp->figure->data = 0;
|
||||||
@ -1553,7 +1556,10 @@ void InsetFig::GetPSSizes()
|
|||||||
|
|
||||||
if (fname.empty()) return;
|
if (fname.empty()) return;
|
||||||
string p;
|
string p;
|
||||||
ifstream ifs(fname.c_str());
|
string lfname = fname;
|
||||||
|
if (GetExtension(fname).empty())
|
||||||
|
lfname += ".eps";
|
||||||
|
ifstream ifs(lfname.c_str());
|
||||||
|
|
||||||
if (!ifs) return; // file not found !!!!
|
if (!ifs) return; // file not found !!!!
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user