mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
get rid of dead code and silly function
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40605 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
4e5f78b843
commit
a6f843aacb
@ -1054,12 +1054,12 @@ DocFileName::DocFileName()
|
||||
|
||||
|
||||
DocFileName::DocFileName(string const & abs_filename, bool save_abs)
|
||||
: FileName(abs_filename), save_abs_path_(save_abs), zipped_valid_(false)
|
||||
: FileName(abs_filename), save_abs_path_(save_abs)
|
||||
{}
|
||||
|
||||
|
||||
DocFileName::DocFileName(FileName const & abs_filename, bool save_abs)
|
||||
: FileName(abs_filename), save_abs_path_(save_abs), zipped_valid_(false)
|
||||
: FileName(abs_filename), save_abs_path_(save_abs)
|
||||
{}
|
||||
|
||||
|
||||
@ -1070,14 +1070,12 @@ void DocFileName::set(string const & name, string const & buffer_path)
|
||||
FileName::set(name);
|
||||
else
|
||||
FileName::set(makeAbsPath(name, buffer_path).absFileName());
|
||||
zipped_valid_ = false;
|
||||
}
|
||||
|
||||
|
||||
void DocFileName::erase()
|
||||
{
|
||||
FileName::erase();
|
||||
zipped_valid_ = false;
|
||||
}
|
||||
|
||||
|
||||
@ -1156,16 +1154,6 @@ string DocFileName::mangledFileName(string const & dir) const
|
||||
}
|
||||
|
||||
|
||||
bool DocFileName::isZipped() const
|
||||
{
|
||||
if (!zipped_valid_) {
|
||||
zipped_ = isZippedFile();
|
||||
zipped_valid_ = true;
|
||||
}
|
||||
return zipped_;
|
||||
}
|
||||
|
||||
|
||||
string DocFileName::unzippedFileName() const
|
||||
{
|
||||
return support::unzippedFileName(absFileName());
|
||||
|
@ -290,8 +290,6 @@ public:
|
||||
std::string
|
||||
mangledFileName(std::string const & dir = empty_string()) const;
|
||||
|
||||
/// \return true if the file is compressed.
|
||||
bool isZipped() const;
|
||||
/// \return the absolute file name without its .gz, .z, .Z extension
|
||||
std::string unzippedFileName() const;
|
||||
|
||||
@ -299,10 +297,6 @@ private:
|
||||
/// Records whether we should save (or export) the filename as a relative
|
||||
/// or absolute path.
|
||||
bool save_abs_path_;
|
||||
/// Cache for isZipped() because zippedFile() is expensive
|
||||
mutable bool zipped_;
|
||||
/// Is zipped_ valid?
|
||||
mutable bool zipped_valid_;
|
||||
};
|
||||
|
||||
|
||||
|
@ -1016,16 +1016,6 @@ FileName const findtexfile(string const & fil, string const & /*format*/)
|
||||
}
|
||||
|
||||
|
||||
void readBB_lyxerrMessage(FileName const & file, bool & zipped,
|
||||
string const & message)
|
||||
{
|
||||
LYXERR(Debug::GRAPHICS, "[readBB_from_PSFile] " << message);
|
||||
// FIXME: Why is this func deleting a file? (Lgb)
|
||||
if (zipped)
|
||||
file.removeFile();
|
||||
}
|
||||
|
||||
|
||||
string const readBB_from_PSFile(FileName const & file)
|
||||
{
|
||||
// in a (e)ps-file it's an entry like %%BoundingBox:23 45 321 345
|
||||
@ -1040,7 +1030,9 @@ string const readBB_from_PSFile(FileName const & file)
|
||||
string const format = file_.guessFormatFromContents();
|
||||
|
||||
if (format != "eps" && format != "ps") {
|
||||
readBB_lyxerrMessage(file_, zipped,"no(e)ps-format");
|
||||
LYXERR(Debug::GRAPHICS, "[readBB_from_PSFile] no(e)ps-format");
|
||||
if (zipped)
|
||||
file_.removeFile();
|
||||
return string();
|
||||
}
|
||||
|
||||
@ -1060,11 +1052,15 @@ string const readBB_from_PSFile(FileName const & file)
|
||||
os << what.str(1) << ' ' << what.str(2) << ' '
|
||||
<< what.str(3) << ' ' << what.str(4);
|
||||
string const bb = os.str();
|
||||
readBB_lyxerrMessage(file_, zipped, bb);
|
||||
LYXERR(Debug::GRAPHICS, "[readBB_from_PSFile] " << bb);
|
||||
if (zipped)
|
||||
file_.removeFile();
|
||||
return bb;
|
||||
}
|
||||
}
|
||||
readBB_lyxerrMessage(file_, zipped, "no bb found");
|
||||
LYXERR(Debug::GRAPHICS, "[readBB_from_PSFile] no bb found");
|
||||
if (zipped)
|
||||
file_.removeFile();
|
||||
return string();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user