mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 18:08:10 +00:00
Add calcInzipName.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24040 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
54a7f725db
commit
c811c3a2ad
@ -368,11 +368,13 @@ const std::string absDirName = "LyX.Embed.Dir.Abs";
|
||||
const std::string driveName = "LyX.Embed.Drive";
|
||||
const std::string spaceName = "LyX.Embed.Space";
|
||||
|
||||
std::string EmbeddedFile::calcInzipName(std::string const & buffer_path)
|
||||
// static
|
||||
std::string EmbeddedFile::calcInzipName(
|
||||
std::string const & file, std::string const & buffer_path)
|
||||
{
|
||||
string inzipName = to_utf8(makeRelPath(from_utf8(absFilename()),
|
||||
string inzipName = to_utf8(makeRelPath(from_utf8(file),
|
||||
from_utf8(buffer_path)));
|
||||
|
||||
|
||||
if (FileName(inzipName).isAbsolute())
|
||||
inzipName = absDirName + '/' + inzipName;
|
||||
|
||||
@ -390,6 +392,12 @@ std::string EmbeddedFile::calcInzipName(std::string const & buffer_path)
|
||||
}
|
||||
|
||||
|
||||
std::string EmbeddedFile::calcInzipName(std::string const & buffer_path)
|
||||
{
|
||||
return calcInzipName(absFilename(), buffer_path);
|
||||
}
|
||||
|
||||
|
||||
void EmbeddedFile::syncInzipFile(std::string const & buffer_path)
|
||||
{
|
||||
BOOST_ASSERT(enabled());
|
||||
|
@ -171,10 +171,13 @@ public:
|
||||
/// Calculate checksum of availableFile
|
||||
unsigned long checksum() const;
|
||||
|
||||
// calculate inzip_name_ from filename
|
||||
/// calculate inzip_name_ from filename
|
||||
static std::string
|
||||
calcInzipName(std::string const & file, std::string const & path);
|
||||
/// calculate inzip_name_ from filename
|
||||
std::string calcInzipName(std::string const & buffer_path);
|
||||
// move an embedded disk file with an existing inzip_name_ to
|
||||
// a calculated inzip_name_, if they differ.
|
||||
/// move an embedded disk file with an existing inzip_name_ to
|
||||
/// a calculated inzip_name_, if they differ.
|
||||
void syncInzipFile(std::string const & buffer_path);
|
||||
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user