summaryrefslogtreecommitdiffstats
path: root/src/libs/7zip/unix/CPP/Windows/PropVariantUtils.cpp
diff options
context:
space:
mode:
authorkh1 <karsten.heimrich@digia.com>2013-04-30 14:04:20 +0200
committerKarsten Heimrich <karsten.heimrich@digia.com>2013-05-02 14:36:21 +0200
commit323c7f177ec76fa64dfe239806d0f5ba365c51c7 (patch)
treecdb69b2c55f39e4d3aa28053de7ac7d650170df3 /src/libs/7zip/unix/CPP/Windows/PropVariantUtils.cpp
parentbf99b6d9d595fd229174645c8c22abc23da81f5a (diff)
Reset to only use the basic LZMA SDK (Unix).
Change-Id: Ic7607229197f74cdf88c46684b1413e00466185d Reviewed-by: Niels Weber <niels.weber@digia.com>
Diffstat (limited to 'src/libs/7zip/unix/CPP/Windows/PropVariantUtils.cpp')
-rw-r--r--src/libs/7zip/unix/CPP/Windows/PropVariantUtils.cpp78
1 files changed, 0 insertions, 78 deletions
diff --git a/src/libs/7zip/unix/CPP/Windows/PropVariantUtils.cpp b/src/libs/7zip/unix/CPP/Windows/PropVariantUtils.cpp
deleted file mode 100644
index 0a9cfab7f..000000000
--- a/src/libs/7zip/unix/CPP/Windows/PropVariantUtils.cpp
+++ /dev/null
@@ -1,78 +0,0 @@
-// PropVariantUtils.cpp
-
-#include "StdAfx.h"
-
-#include "PropVariantUtils.h"
-#include "Common/StringConvert.h"
-#include "Common/IntToString.h"
-
-using namespace NWindows;
-
-static AString GetHex(UInt32 v)
-{
- char sz[32] = { '0', 'x' };
- ConvertUInt64ToString(v, sz + 2, 16);
- return sz;
-}
-
-void StringToProp(const AString &s, NCOM::CPropVariant &prop)
-{
- prop = MultiByteToUnicodeString(s);
-}
-
-void PairToProp(const CUInt32PCharPair *pairs, unsigned num, UInt32 value, NCOM::CPropVariant &prop)
-{
- AString s;
- for (unsigned i = 0; i < num; i++)
- {
- const CUInt32PCharPair &p = pairs[i];
- if (p.Value == value)
- s = p.Name;
- }
- if (s.IsEmpty())
- s = GetHex(value);
- StringToProp(s, prop);
-}
-
-AString TypeToString(const char *table[], unsigned num, UInt32 value)
-{
- if (value < num)
- return table[value];
- return GetHex(value);
-}
-
-void TypeToProp(const char *table[], unsigned num, UInt32 value, NCOM::CPropVariant &prop)
-{
- StringToProp(TypeToString(table, num, value), prop);
-}
-
-
-AString FlagsToString(const CUInt32PCharPair *pairs, unsigned num, UInt32 flags)
-{
- AString s;
- for (unsigned i = 0; i < num; i++)
- {
- const CUInt32PCharPair &p = pairs[i];
- UInt32 flag = (UInt32)1 << (unsigned)p.Value;
- if ((flags & flag) != 0)
- {
- if (!s.IsEmpty())
- s += ' ';
- s += p.Name;
- }
- flags &= ~flag;
- }
- if (flags != 0)
- {
- if (!s.IsEmpty())
- s += ' ';
- s += GetHex(flags);
- }
- return s;
-}
-
-void FlagsToProp(const CUInt32PCharPair *pairs, unsigned num, UInt32 flags, NCOM::CPropVariant &prop)
-{
- StringToProp(FlagsToString(pairs, num, flags), prop);
-}
-