summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBob Jamison <ishmalius@gmail.com>2006-04-13 10:51:38 +0000
committerishmal <ishmal@users.sourceforge.net>2006-04-13 10:51:38 +0000
commit935b0c265496c56cd3dd1a0f2a37caa6aab7379a (patch)
treebd9f60eaa05e0b60351a989a2e3bdba4a39e2273 /src
parentwip (diff)
downloadinkscape-935b0c265496c56cd3dd1a0f2a37caa6aab7379a.tar.gz
inkscape-935b0c265496c56cd3dd1a0f2a37caa6aab7379a.zip
add zipentry methods
(bzr r509)
Diffstat (limited to 'src')
-rw-r--r--src/dom/util/ziptool.cpp19
-rw-r--r--src/dom/util/ziptool.h10
2 files changed, 23 insertions, 6 deletions
diff --git a/src/dom/util/ziptool.cpp b/src/dom/util/ziptool.cpp
index 657d26765..72b7e63b7 100644
--- a/src/dom/util/ziptool.cpp
+++ b/src/dom/util/ziptool.cpp
@@ -1997,7 +1997,6 @@ void ZipEntry::finish()
compressionMethod);
}
}
- printf("### done\n");
}
@@ -2140,16 +2139,28 @@ void ZipFile::trace(char *fmt, ...)
/**
*
*/
-bool ZipFile::addFile(const std::string &fileName,
+ZipEntry *ZipFile::addFile(const std::string &fileName,
const std::string &comment)
{
ZipEntry *ze = new ZipEntry();
if (!ze->readFile(fileName, comment))
{
- return false;
+ return NULL;
}
entries.push_back(ze);
- return true;
+ return ze;
+}
+
+
+/**
+ *
+ */
+ZipEntry *ZipFile::newEntry(const std::string &fileName,
+ const std::string &comment)
+{
+ ZipEntry *ze = new ZipEntry(fileName, comment);
+ entries.push_back(ze);
+ return ze;
}
diff --git a/src/dom/util/ziptool.h b/src/dom/util/ziptool.h
index 723d95aa5..217b13171 100644
--- a/src/dom/util/ziptool.h
+++ b/src/dom/util/ziptool.h
@@ -409,8 +409,14 @@ public:
/**
*
*/
- virtual bool addFile(const std::string &fileNameArg,
- const std::string &commentArg);
+ virtual ZipEntry *addFile(const std::string &fileNameArg,
+ const std::string &commentArg);
+
+ /**
+ *
+ */
+ virtual ZipEntry *newEntry(const std::string &fileNameArg,
+ const std::string &commentArg);
//######################
//# W R I T E