Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pavlov <ipavlov@users.sourceforge.net>2007-01-20 03:00:00 +0300
committerKornel LesiƄski <kornel@geekhood.net>2016-05-28 02:15:49 +0300
commitd9666cf046a8453b33b3e2fbf4d82295a9f87df3 (patch)
treec722ed19b844b53042aec0c1d7d2f8381140a5ed /CPP/7zip/UI/Far/PluginCommon.cpp
parent804edc5756fede54dbb1aefda6d39d306111938d (diff)
4.44 beta
Diffstat (limited to 'CPP/7zip/UI/Far/PluginCommon.cpp')
-rwxr-xr-xCPP/7zip/UI/Far/PluginCommon.cpp50
1 files changed, 50 insertions, 0 deletions
diff --git a/CPP/7zip/UI/Far/PluginCommon.cpp b/CPP/7zip/UI/Far/PluginCommon.cpp
new file mode 100755
index 00000000..3e8e3cee
--- /dev/null
+++ b/CPP/7zip/UI/Far/PluginCommon.cpp
@@ -0,0 +1,50 @@
+// SevenZip/Plugin.cpp
+
+#include "StdAfx.h"
+
+#include "Plugin.h"
+
+/*
+void CPlugin::AddRealIndexOfFile(const CArchiveFolderItem &aFolder,
+ int anIndexInVector, vector<int> &aRealIndexes)
+{
+ const CArchiveFolderFileItem &anItem = aFolder.m_FileSubItems[anIndexInVector];
+ int aHandlerItemIndex = m_ProxyHandler->GetHandlerItemIndex(anItem.m_Properties);
+ if(aHandlerItemIndex < 0)
+ throw "error";
+ aRealIndexes.push_back(aHandlerItemIndex);
+}
+
+void CPlugin::AddRealIndexes(const CArchiveFolderItem &anItem,
+ vector<int> &aRealIndexes)
+{
+ int aHandlerItemIndex = m_ProxyHandler->GetHandlerItemIndex(anItem.m_Properties);
+ if(aHandlerItemIndex >= 0) // test -1 value
+ aRealIndexes.push_back(aHandlerItemIndex);
+ for(int i = 0; i < anItem.m_DirSubItems.Size(); i++)
+ AddRealIndexes(anItem.m_DirSubItems[i], aRealIndexes);
+ for(i = 0; i < anItem.m_FileSubItems.Size(); i++)
+ AddRealIndexOfFile(anItem, i , aRealIndexes);
+}
+
+
+void CPlugin::GetRealIndexes(PluginPanelItem *aPanelItems, int anItemsNumber,
+ vector<int> &aRealIndexes)
+{
+ aRealIndexes.clear();
+ for(int i = 0; i < anItemsNumber; i++)
+ {
+ int anIndex = aPanelItems[i].UserData;
+ if (anIndex < m_FolderItem->m_DirSubItems.Size())
+ {
+ const CArchiveFolderItem &anItem = m_FolderItem->m_DirSubItems[anIndex];
+ AddRealIndexes(anItem, aRealIndexes);
+ }
+ else
+ AddRealIndexOfFile(*m_FolderItem, anIndex - m_FolderItem->m_DirSubItems.Size(),
+ aRealIndexes);
+ }
+ sort(aRealIndexes.begin(), aRealIndexes.end());
+}
+
+*/