diff options
-rw-r--r-- | shell/inc/propsheets.hxx | 2 | ||||
-rw-r--r-- | shell/source/win32/shlxthandler/propsheets/propsheets.cxx | 10 |
2 files changed, 5 insertions, 7 deletions
diff --git a/shell/inc/propsheets.hxx b/shell/inc/propsheets.hxx index 68e28192922d..6092e8bdbe31 100644 --- a/shell/inc/propsheets.hxx +++ b/shell/inc/propsheets.hxx @@ -75,7 +75,7 @@ private: private: LONG m_RefCnt; - Filepath_char_t m_szFileName[MAX_PATH]; + std::wstring m_FileName; }; #endif diff --git a/shell/source/win32/shlxthandler/propsheets/propsheets.cxx b/shell/source/win32/shlxthandler/propsheets/propsheets.cxx index 48a125d581fc..d19b3a2c4df6 100644 --- a/shell/source/win32/shlxthandler/propsheets/propsheets.cxx +++ b/shell/source/win32/shlxthandler/propsheets/propsheets.cxx @@ -138,9 +138,7 @@ HRESULT STDMETHODCALLTYPE CPropertySheet::Initialize( 0, buffer.get(), size + 1 ); if ( result_size != 0 ) { - std::wstring fname = getShortPathName( buffer.get() ); - ZeroMemory( m_szFileName, sizeof( m_szFileName ) ); - wcsncpy( m_szFileName, fname.c_str(), ( SAL_N_ELEMENTS( m_szFileName ) - 1 ) ); + m_FileName = getShortPathName(buffer.get()); hr = S_OK; } else @@ -259,7 +257,7 @@ void CPropertySheet::InitPropPageSummary(HWND hwnd, LPPROPSHEETPAGE /*lppsp*/) { try { - CMetaInfoReader metaInfo(m_szFileName); + CMetaInfoReader metaInfo(m_FileName); SetWindowTextW(GetDlgItem(hwnd,IDC_TITLE), metaInfo.getTagData( META_INFO_TITLE ).c_str() ); SetWindowTextW(GetDlgItem(hwnd,IDC_AUTHOR), metaInfo.getTagData( META_INFO_AUTHOR ).c_str() ); @@ -287,9 +285,9 @@ void CPropertySheet::InitPropPageStatistics(HWND hwnd, LPPROPSHEETPAGE /*lppsp*/ { try { - CMetaInfoReader metaInfo(m_szFileName); + CMetaInfoReader metaInfo(m_FileName); - document_statistic_reader_ptr doc_stat_reader = create_document_statistic_reader(m_szFileName, &metaInfo); + document_statistic_reader_ptr doc_stat_reader = create_document_statistic_reader(m_FileName, &metaInfo); statistic_group_list_t sgl; doc_stat_reader->read(&sgl); |