diff options
author | Abdul <abdul@miranda-ng.org> | 2012-10-28 13:43:24 +0000 |
---|---|---|
committer | Abdul <abdul@miranda-ng.org> | 2012-10-28 13:43:24 +0000 |
commit | 0cabe46ea8b9b27ed28db69e3d03b0df19c0ad8e (patch) | |
tree | 4f24affb8237ddee1ddcb2086f87cbc18aa71af3 /plugins/BasicHistory/src/ExportManager.cpp | |
parent | 010e4df16c3fc963155cd1e398748d2b15974e3e (diff) |
BasicHistory updated to 1.0.1.9
git-svn-id: http://svn.miranda-ng.org/main/trunk@2099 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/BasicHistory/src/ExportManager.cpp')
-rw-r--r-- | plugins/BasicHistory/src/ExportManager.cpp | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/plugins/BasicHistory/src/ExportManager.cpp b/plugins/BasicHistory/src/ExportManager.cpp index 897561ef26..83c4a2ba7e 100644 --- a/plugins/BasicHistory/src/ExportManager.cpp +++ b/plugins/BasicHistory/src/ExportManager.cpp @@ -249,7 +249,7 @@ int ExportManager::Import(IImport::ImportType type, const std::vector<HANDLE>& c return t;
}
-bool ExportManager::Import(IImport::ImportType type, std::vector<IImport::ExternalMessage>& eventList, std::wstring* err)
+bool ExportManager::Import(IImport::ImportType type, std::vector<IImport::ExternalMessage>& eventList, std::wstring* err, bool* differentContact, std::vector<HANDLE>* contacts)
{
IImport* imp = NULL;
switch(type)
@@ -281,18 +281,33 @@ bool ExportManager::Import(IImport::ImportType type, std::vector<IImport::Extern v.push_back(hContact);
bool ret = true;
int contInFile = imp->IsContactInFile(v);
- if(contInFile != 0 && contInFile != -3)
+ if(contInFile == -1)
{
ret = false;
if(err != NULL)
*err = TranslateT("File do not contain selected contact");
+ if(contacts != NULL && differentContact != NULL)
+ {
+ contInFile = imp->IsContactInFile(*contacts);
+ if(contInFile >= 0)
+ {
+ *differentContact = true;
+ hContact = (*contacts)[contInFile];
+ }
+ }
}
- else
+ else if(contInFile == 0 || contInFile == -3)
{
ret = imp->GetEventList(eventList);
if(!ret && err != NULL)
*err = TranslateT("File is corrupted");
}
+ else
+ {
+ ret = false;
+ if(err != NULL)
+ *err = TranslateT("File is corrupted");
+ }
stream->close();
delete stream;
delete imp;
|