diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2024-02-25 19:11:26 +0600 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2024-02-26 02:23:25 +0100 |
commit | 2468fe5d91880719e0addfc6c5ae2bfd1b141bb1 (patch) | |
tree | 6854b7726308154d69f8fb3c0db570538e2292b5 /shell/source | |
parent | c6e2626f7dab0097971d0dceea4326f185fdf1ac (diff) |
Remove an instance of MAX_PATH
... and avoid manual memory management.
Change-Id: I6f056fd5bcc299c2c31aede227b29444ec3c5988
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163906
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'shell/source')
-rw-r--r-- | shell/source/win32/shlxthandler/propsheets/propsheets.cxx | 10 |
1 files changed, 4 insertions, 6 deletions
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); |