This commit is contained in:
Igor Pavlov
2015-10-05 00:00:00 +00:00
committed by Kornel Lesiński
parent f6444c3256
commit 6543c28020
113 changed files with 3101 additions and 382 deletions

View File

@@ -100,7 +100,7 @@ STDMETHODIMP CExtractCallbackImp::AskOverwrite(
NOverwriteDialog::NResult::EEnum result =
NOverwriteDialog::Execute(oldFileInfo, newFileInfo);
switch(result)
switch (result)
{
case NOverwriteDialog::NResult::kCancel:
// *answer = NOverwriteAnswer::kCancel;

View File

@@ -259,13 +259,13 @@ STDMETHODIMP COpenArchiveCallback::GetProperty(PROPID propID, PROPVARIANT *value
NCOM::CPropVariant prop;
if (_subArchiveMode)
{
switch(propID)
switch (propID)
{
case kpidName: prop = _subArchiveName; break;
}
}
else
switch(propID)
switch (propID)
{
case kpidName: prop = GetUnicodeString(_fileInfo.Name, CP_OEMCP); break;
case kpidIsDir: prop = _fileInfo.IsDir(); break;
@@ -447,30 +447,34 @@ EXTERN_C HANDLE WINAPI OpenFilePluginW(const wchar_t *name,const unsigned char *
EXTERN_C HANDLE WINAPI OpenPlugin(int openFrom, INT_PTR item)
{
MY_TRY_BEGIN;
if(openFrom == OPEN_COMMANDLINE)
if (openFrom == OPEN_COMMANDLINE)
{
AString fileName = (const char *)item;
if(fileName.IsEmpty())
if (fileName.IsEmpty())
return INVALID_HANDLE_VALUE;
if (fileName.Len() >= 2 &&
fileName[0] == '\"' && fileName.Back() == '\"')
if (fileName.Len() >= 2
&& fileName[0] == '\"'
&& fileName.Back() == '\"')
{
fileName.DeleteBack();
fileName.DeleteFrontal(1);
}
return MyOpenFilePlugin(fileName);
}
if(openFrom == OPEN_PLUGINSMENU)
if (openFrom == OPEN_PLUGINSMENU)
{
switch(item)
switch (item)
{
case 0:
{
PluginPanelItem pluginPanelItem;
if(!g_StartupInfo.ControlGetActivePanelCurrentItemInfo(pluginPanelItem))
if (!g_StartupInfo.ControlGetActivePanelCurrentItemInfo(pluginPanelItem))
throw 142134;
return MyOpenFilePlugin(pluginPanelItem.FindData.cFileName);
}
case 1:
{
CObjectVector<PluginPanelItem> pluginPanelItem;
@@ -491,10 +495,12 @@ EXTERN_C HANDLE WINAPI OpenPlugin(int openFrom, INT_PTR item)
}
return INVALID_HANDLE_VALUE;
}
default:
throw 4282215;
}
}
return INVALID_HANDLE_VALUE;
MY_TRY_END2("OpenPlugin", INVALID_HANDLE_VALUE);
}

View File

@@ -166,6 +166,14 @@ SOURCE=..\..\..\Common\StringToInt.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\UTFConvert.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\UTFConvert.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\Wildcard.cpp
# End Source File
# Begin Source File

View File

@@ -40,11 +40,11 @@ CPlugin::CPlugin(const FString &fileName, CAgent *agent, UString archiveTypeName
CPlugin::~CPlugin() {}
static void MyGetFileTime(IFolderFolder *anArchiveFolder, UInt32 itemIndex,
static void MyGetFileTime(IFolderFolder *folder, UInt32 itemIndex,
PROPID propID, FILETIME &fileTime)
{
NCOM::CPropVariant prop;
if (anArchiveFolder->GetProperty(itemIndex, propID, &prop) != S_OK)
if (folder->GetProperty(itemIndex, propID, &prop) != S_OK)
throw 271932;
if (prop.vt == VT_EMPTY)
{

View File

@@ -10,7 +10,7 @@ void CPlugin::AddRealIndexOfFile(const CArchiveFolderItem &aFolder,
{
const CArchiveFolderFileItem &anItem = aFolder.m_FileSubItems[anIndexInVector];
int aHandlerItemIndex = m_ProxyHandler->GetHandlerItemIndex(anItem.m_Properties);
if(aHandlerItemIndex < 0)
if (aHandlerItemIndex < 0)
throw "error";
aRealIndexes.push_back(aHandlerItemIndex);
}
@@ -19,11 +19,11 @@ void CPlugin::AddRealIndexes(const CArchiveFolderItem &anItem,
vector<int> &aRealIndexes)
{
int aHandlerItemIndex = m_ProxyHandler->GetHandlerItemIndex(anItem.m_Properties);
if(aHandlerItemIndex >= 0) // test -1 value
if (aHandlerItemIndex >= 0) // test -1 value
aRealIndexes.push_back(aHandlerItemIndex);
for(int i = 0; i < anItem.m_DirSubItems.Size(); i++)
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++)
for (i = 0; i < anItem.m_FileSubItems.Size(); i++)
AddRealIndexOfFile(anItem, i , aRealIndexes);
}
@@ -32,7 +32,7 @@ void CPlugin::GetRealIndexes(PluginPanelItem *aPanelItems, int anItemsNumber,
vector<int> &aRealIndexes)
{
aRealIndexes.clear();
for(int i = 0; i < anItemsNumber; i++)
for (int i = 0; i < anItemsNumber; i++)
{
int anIndex = aPanelItems[i].UserData;
if (anIndex < m_FolderItem->m_DirSubItems.Size())

View File

@@ -20,6 +20,7 @@ CURRENT_OBJS = \
$O\PluginWrite.obj \
$O\ProgressBox.obj \
$O\UpdateCallbackFar.obj \
$O\UTFConvert.obj \
COMMON_OBJS = \
$O\IntToString.obj \