summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-12-10 15:21:04 +0100
committerStephan Bergmann <sbergman@redhat.com>2019-12-10 20:50:41 +0100
commit7e5de5480255c830ec8ce88b6fcd39e3a36672e8 (patch)
tree1ebc7189ad48a39d0cbf34bf5077044b8ea1e586 /shell
parent9a921327ce3f68596fc77e07050ad8a587b2696e (diff)
loplugin:unusedmember (clang-cl)
PROPERTYMAP members pszXPathParent and pszValueNodeName were unused ever since 85e0cc246d4350122b17fbe2bfd15635a190ad77 "dv17: #i70994#: Use property handler instead of column info for Windows Vista" introduced the code. (And removing them allowed to simplify the code further in the obvious way.) Change-Id: Ie1247cbee31a172a15fd57c4b752d74711b1d3a1 Reviewed-on: https://gerrit.libreoffice.org/84860 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'shell')
-rw-r--r--shell/source/win32/shlxthandler/prophdl/propertyhdl.cxx32
1 files changed, 10 insertions, 22 deletions
diff --git a/shell/source/win32/shlxthandler/prophdl/propertyhdl.cxx b/shell/source/win32/shlxthandler/prophdl/propertyhdl.cxx
index ae547afd2973..5b7121bcf333 100644
--- a/shell/source/win32/shlxthandler/prophdl/propertyhdl.cxx
+++ b/shell/source/win32/shlxthandler/prophdl/propertyhdl.cxx
@@ -39,28 +39,16 @@
long g_DllRefCnt = 0;
static HINSTANCE g_hModule = nullptr;
-namespace {
-
-// Map of property keys to the locations of their value(s) in the .??? XML schema
-struct PROPERTYMAP
-{
- PROPERTYKEY key;
- PCWSTR pszXPathParent;
- PCWSTR pszValueNodeName;
-};
-
-}
-
-const PROPERTYMAP g_rgPROPERTYMAP[] =
+const PROPERTYKEY g_rgPROPERTIES[] =
{
- { PKEY_Title, L"LibreOffice", L"Title" },
- { PKEY_Author, L"LibreOffice", L"Author" },
- { PKEY_Subject, L"LibreOffice", L"Subject" },
- { PKEY_Keywords, L"LibreOffice", L"Keyword" },
- { PKEY_Comment, L"LibreOffice", L"Comments" },
+ PKEY_Title,
+ PKEY_Author,
+ PKEY_Subject,
+ PKEY_Keywords,
+ PKEY_Comment
};
-size_t const gPropertyMapTableSize = SAL_N_ELEMENTS(g_rgPROPERTYMAP);
+size_t const gPropertyTableSize = SAL_N_ELEMENTS(g_rgPROPERTIES);
CPropertyHdl::CPropertyHdl( long nRefCnt ) :
@@ -289,18 +277,18 @@ void CPropertyHdl::LoadProperties( CMetaInfoReader *pMetaInfoReader )
OutputDebugStringFormatW( L"CPropertyHdl: LoadProperties\n" );
PROPVARIANT propvarValues;
- for ( UINT i = 0; i < UINT(gPropertyMapTableSize); ++i )
+ for ( UINT i = 0; i < UINT(gPropertyTableSize); ++i )
{
PropVariantClear( &propvarValues );
HRESULT hr = GetItemData( pMetaInfoReader, i, &propvarValues);
if (hr == S_OK)
{
// coerce the value(s) to the appropriate type for the property key
- hr = PSCoerceToCanonicalValue( g_rgPROPERTYMAP[i].key, &propvarValues );
+ hr = PSCoerceToCanonicalValue( g_rgPROPERTIES[i], &propvarValues );
if (SUCCEEDED(hr))
{
// cache the value(s) loaded
- hr = m_pCache->SetValueAndState( g_rgPROPERTYMAP[i].key, &propvarValues, PSC_NORMAL );
+ hr = m_pCache->SetValueAndState( g_rgPROPERTIES[i], &propvarValues, PSC_NORMAL );
}
}
}