xref: /aosp_15_r20/external/lzma/CPP/7zip/UI/FileManager/PropertyName.cpp (revision f6dc9357d832569d4d1f5d24eacdb3935a1ae8e6)
1*f6dc9357SAndroid Build Coastguard Worker // PropertyName.cpp
2*f6dc9357SAndroid Build Coastguard Worker 
3*f6dc9357SAndroid Build Coastguard Worker #include "StdAfx.h"
4*f6dc9357SAndroid Build Coastguard Worker 
5*f6dc9357SAndroid Build Coastguard Worker #include "../../../Common/IntToString.h"
6*f6dc9357SAndroid Build Coastguard Worker 
7*f6dc9357SAndroid Build Coastguard Worker #include "LangUtils.h"
8*f6dc9357SAndroid Build Coastguard Worker #include "PropertyName.h"
9*f6dc9357SAndroid Build Coastguard Worker 
GetNameOfProperty(PROPID propID,const wchar_t * name)10*f6dc9357SAndroid Build Coastguard Worker UString GetNameOfProperty(PROPID propID, const wchar_t *name)
11*f6dc9357SAndroid Build Coastguard Worker {
12*f6dc9357SAndroid Build Coastguard Worker   if (propID < 1000)
13*f6dc9357SAndroid Build Coastguard Worker   {
14*f6dc9357SAndroid Build Coastguard Worker     UString s = LangString(1000 + propID);
15*f6dc9357SAndroid Build Coastguard Worker     if (!s.IsEmpty())
16*f6dc9357SAndroid Build Coastguard Worker       return s;
17*f6dc9357SAndroid Build Coastguard Worker   }
18*f6dc9357SAndroid Build Coastguard Worker   if (name)
19*f6dc9357SAndroid Build Coastguard Worker     return name;
20*f6dc9357SAndroid Build Coastguard Worker   wchar_t temp[16];
21*f6dc9357SAndroid Build Coastguard Worker   ConvertUInt32ToString(propID, temp);
22*f6dc9357SAndroid Build Coastguard Worker   return temp;
23*f6dc9357SAndroid Build Coastguard Worker }
24