FileName.mangledFilename -> FileName.mangledFileName

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34236 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Pavel Sanda 2010-04-21 01:19:22 +00:00
parent e5fc2cbdc6
commit b6a764eef3
6 changed files with 14 additions and 14 deletions

View File

@ -88,7 +88,7 @@ string const doSubstitution(InsetExternalParams const & params,
masterBuffer->temppath() : masterBuffer->temppath() :
buffer.filePath(); buffer.filePath();
string const filename = external_in_tmpdir ? string const filename = external_in_tmpdir ?
params.filename.mangledFilename() : params.filename.mangledFileName() :
params.filename.outputFilename(parentpath); params.filename.outputFilename(parentpath);
string const basename = changeExtension( string const basename = changeExtension(
onlyFilename(filename), string()); onlyFilename(filename), string());
@ -246,7 +246,7 @@ void updateExternal(InsetExternalParams const & params,
// We copy the source file to the temp dir and do the conversion // We copy the source file to the temp dir and do the conversion
// there if necessary // there if necessary
FileName const temp_file( FileName const temp_file(
makeAbsPath(params.filename.mangledFilename(), makeAbsPath(params.filename.mangledFileName(),
masterBuffer->temppath())); masterBuffer->temppath()));
if (!params.filename.empty() && !params.filename.isDirectory()) { if (!params.filename.empty() && !params.filename.isDirectory()) {
unsigned long const from_checksum = params.filename.checksum(); unsigned long const from_checksum = params.filename.checksum();

View File

@ -267,9 +267,9 @@ int InsetBibtex::latex(odocstream & os, OutputParams const & runparams) const
if (!runparams.inComment && !runparams.dryrun && !runparams.nice && if (!runparams.inComment && !runparams.dryrun && !runparams.nice &&
not_from_texmf) { not_from_texmf) {
// mangledFilename() needs the extension // mangledFileName() needs the extension
DocFileName const in_file = DocFileName(try_in_file); DocFileName const in_file = DocFileName(try_in_file);
database = removeExtension(in_file.mangledFilename()); database = removeExtension(in_file.mangledFileName());
FileName const out_file = makeAbsPath(database + ".bib", FileName const out_file = makeAbsPath(database + ".bib",
buffer().masterBuffer()->temppath()); buffer().masterBuffer()->temppath());
@ -330,7 +330,7 @@ int InsetBibtex::latex(odocstream & os, OutputParams const & runparams) const
not_from_texmf) { not_from_texmf) {
// use new style name // use new style name
DocFileName const in_file = DocFileName(try_in_file); DocFileName const in_file = DocFileName(try_in_file);
base = removeExtension(in_file.mangledFilename()); base = removeExtension(in_file.mangledFileName());
FileName const out_file = makeAbsPath(base + ".bst", FileName const out_file = makeAbsPath(base + ".bst",
buffer().masterBuffer()->temppath()); buffer().masterBuffer()->temppath());
bool const success = in_file.copyTo(out_file); bool const success = in_file.copyTo(out_file);

View File

@ -487,11 +487,11 @@ copyToDirIfNeeded(DocFileName const & file, string const & dir)
if (rtrim(onlyPath(file_in) , "/") == rtrim(dir, "/")) if (rtrim(onlyPath(file_in) , "/") == rtrim(dir, "/"))
return make_pair(IDENTICAL_PATHS, file_in); return make_pair(IDENTICAL_PATHS, file_in);
string mangled = file.mangledFilename(); string mangled = file.mangledFileName();
if (file.isZipped()) { if (file.isZipped()) {
// We need to change _eps.gz to .eps.gz. The mangled name is // We need to change _eps.gz to .eps.gz. The mangled name is
// still unique because of the counter in mangledFilename(). // still unique because of the counter in mangledFileName().
// We can't just call mangledFilename() with the zip // We can't just call mangledFileName() with the zip
// extension removed, because base.eps and base.eps.gz may // extension removed, because base.eps and base.eps.gz may
// have different content but would get the same mangled // have different content but would get the same mangled
// name in this case. // name in this case.

View File

@ -494,11 +494,11 @@ int InsetInclude::latex(odocstream & os, OutputParams const & runparams) const
// bug 5681 // bug 5681
if (type(params()) == LISTINGS) { if (type(params()) == LISTINGS) {
exportfile = incfile; exportfile = incfile;
mangled = DocFileName(included_file).mangledFilename(); mangled = DocFileName(included_file).mangledFileName();
} else { } else {
exportfile = changeExtension(incfile, ".tex"); exportfile = changeExtension(incfile, ".tex");
mangled = DocFileName(changeExtension(included_file.absFileName(), ".tex")). mangled = DocFileName(changeExtension(included_file.absFileName(), ".tex")).
mangledFilename(); mangledFileName();
} }
FileName const writefile(makeAbsPath(mangled, masterBuffer->temppath())); FileName const writefile(makeAbsPath(mangled, masterBuffer->temppath()));
@ -750,7 +750,7 @@ int InsetInclude::docbook(odocstream & os, OutputParams const & runparams) const
if (loadIfNeeded()) { if (loadIfNeeded()) {
Buffer * tmp = theBufferList().getBuffer(FileName(included_file)); Buffer * tmp = theBufferList().getBuffer(FileName(included_file));
string const mangled = writefile.mangledFilename(); string const mangled = writefile.mangledFileName();
writefile = makeAbsPath(mangled, writefile = makeAbsPath(mangled,
buffer().masterBuffer()->temppath()); buffer().masterBuffer()->temppath());
if (!runparams.nice) if (!runparams.nice)
@ -795,7 +795,7 @@ void InsetInclude::validate(LaTeXFeatures & features) const
writefile = included_file; writefile = included_file;
if (!features.runparams().nice && !isVerbatim(params()) && !isListings(params())) { if (!features.runparams().nice && !isVerbatim(params()) && !isListings(params())) {
incfile = DocFileName(writefile).mangledFilename(); incfile = DocFileName(writefile).mangledFileName();
writefile = makeAbsPath(incfile, writefile = makeAbsPath(incfile,
buffer().masterBuffer()->temppath()).absFileName(); buffer().masterBuffer()->temppath()).absFileName();
} }

View File

@ -1085,7 +1085,7 @@ string DocFileName::outputFilename(string const & path) const
} }
string DocFileName::mangledFilename(string const & dir) const string DocFileName::mangledFileName(string const & dir) const
{ {
// We need to make sure that every DocFileName instance for a given // We need to make sure that every DocFileName instance for a given
// filename returns the same mangled name. // filename returns the same mangled name.

View File

@ -288,7 +288,7 @@ public:
* with @c dir. * with @c dir.
*/ */
std::string std::string
mangledFilename(std::string const & dir = empty_string()) const; mangledFileName(std::string const & dir = empty_string()) const;
/// \return true if the file is compressed. /// \return true if the file is compressed.
bool isZipped() const; bool isZipped() const;