summaryrefslogtreecommitdiff
path: root/fpicker/source/win32/filepicker/FileOpenDlg.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'fpicker/source/win32/filepicker/FileOpenDlg.cxx')
-rw-r--r--fpicker/source/win32/filepicker/FileOpenDlg.cxx29
1 files changed, 14 insertions, 15 deletions
diff --git a/fpicker/source/win32/filepicker/FileOpenDlg.cxx b/fpicker/source/win32/filepicker/FileOpenDlg.cxx
index cb57f276b0b5..5f5e4a839028 100644
--- a/fpicker/source/win32/filepicker/FileOpenDlg.cxx
+++ b/fpicker/source/win32/filepicker/FileOpenDlg.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <tchar.h>
#include <osl/diagnose.h>
#include "../misc/WinImplHelper.hxx"
#include "FileOpenDlg.hxx"
@@ -42,7 +41,7 @@ namespace /* private */
const sal_Int32 MAX_FILETITLE_BUFF_SIZE = 32000;
const sal_Int32 MAX_FILTER_BUFF_SIZE = 4096;
- const LPCTSTR CURRENT_INSTANCE = TEXT("CurrInst");
+ const PCWSTR CURRENT_INSTANCE = L"CurrInst";
// find an appropriate parent window
@@ -100,10 +99,10 @@ CFileOpenDialog::CFileOpenDialog(
// we get a parent window (using a vcl window?)
m_ofn.hwndOwner = choose_parent_window();
- m_ofn.lpstrFile = reinterpret_cast<LPTSTR>(const_cast<sal_Unicode*>(m_fileNameBuffer.getStr()));
+ m_ofn.lpstrFile = reinterpret_cast<PWSTR>(const_cast<sal_Unicode*>(m_fileNameBuffer.getStr()));
m_ofn.nMaxFile = m_fileNameBuffer.getCapacity();
- m_ofn.lpstrFileTitle = reinterpret_cast<LPTSTR>(const_cast<sal_Unicode*>(m_fileTitleBuffer.getStr()));
+ m_ofn.lpstrFileTitle = reinterpret_cast<PWSTR>(const_cast<sal_Unicode*>(m_fileTitleBuffer.getStr()));
m_ofn.nMaxFileTitle = m_fileTitleBuffer.getCapacity();
m_ofn.lpfnHook = CFileOpenDialog::ofnHookProc;
@@ -132,7 +131,7 @@ CFileOpenDialog::~CFileOpenDialog()
void SAL_CALL CFileOpenDialog::setTitle(const OUString& aTitle)
{
m_dialogTitle = aTitle;
- m_ofn.lpstrTitle = reinterpret_cast<LPCTSTR>(m_dialogTitle.getStr());
+ m_ofn.lpstrTitle = reinterpret_cast<PCWSTR>(m_dialogTitle.getStr());
}
@@ -144,7 +143,7 @@ void CFileOpenDialog::setFilter(const OUString& aFilter)
m_filterBuffer.ensureCapacity(aFilter.getLength());
m_filterBuffer.setLength(0);
m_filterBuffer.append(aFilter);
- m_ofn.lpstrFilter = reinterpret_cast<LPCTSTR>(m_filterBuffer.getStr());
+ m_ofn.lpstrFilter = reinterpret_cast<PCWSTR>(m_filterBuffer.getStr());
}
@@ -166,14 +165,14 @@ void SAL_CALL CFileOpenDialog::setDefaultName(const OUString& aName)
{
m_fileNameBuffer.setLength(0);
m_fileNameBuffer.append(aName);
- m_ofn.lpstrFile = reinterpret_cast<LPTSTR>(const_cast<sal_Unicode*>(m_fileNameBuffer.getStr()));
+ m_ofn.lpstrFile = reinterpret_cast<PWSTR>(const_cast<sal_Unicode*>(m_fileNameBuffer.getStr()));
}
void SAL_CALL CFileOpenDialog::setDisplayDirectory(const OUString& aDirectory)
{
m_displayDirectory = aDirectory;
- m_ofn.lpstrInitialDir = reinterpret_cast<LPCTSTR>(m_displayDirectory.getStr());
+ m_ofn.lpstrInitialDir = reinterpret_cast<PCWSTR>(m_displayDirectory.getStr());
}
@@ -209,7 +208,7 @@ OUString CFileOpenDialog::getFileExtension()
void CFileOpenDialog::setDefaultFileExtension(const OUString& aExtension)
{
m_defaultExtension = aExtension;
- m_ofn.lpstrDefExt = reinterpret_cast<LPCTSTR>(m_defaultExtension.getStr());
+ m_ofn.lpstrDefExt = reinterpret_cast<PCWSTR>(m_defaultExtension.getStr());
}
@@ -287,7 +286,7 @@ OUString SAL_CALL CFileOpenDialog::getCurrentFilePath() const
{
OSL_ASSERT(IsWindow(m_hwndFileOpenDlg));
- LPARAM nLen = SendMessage(
+ LPARAM nLen = SendMessageW(
m_hwndFileOpenDlg,
CDM_GETFILEPATH,
m_helperBuffer.getCapacity(),
@@ -306,7 +305,7 @@ OUString SAL_CALL CFileOpenDialog::getCurrentFolderPath() const
{
OSL_ASSERT(IsWindow(m_hwndFileOpenDlg));
- LPARAM nLen = SendMessage(
+ LPARAM nLen = SendMessageW(
m_hwndFileOpenDlg,
CDM_GETFOLDERPATH,
m_helperBuffer.getCapacity(),
@@ -325,7 +324,7 @@ OUString SAL_CALL CFileOpenDialog::getCurrentFileName() const
{
OSL_ASSERT(IsWindow(m_hwndFileOpenDlg));
- LPARAM nLen = SendMessage(
+ LPARAM nLen = SendMessageW(
m_hwndFileOpenDlg,
CDM_GETSPEC,
m_helperBuffer.getCapacity(),
@@ -454,7 +453,7 @@ UINT_PTR CALLBACK CFileOpenDialog::ofnHookProc(
GWLP_WNDPROC,
reinterpret_cast<LONG_PTR>(CFileOpenDialog::BaseDlgProc)));
// connect the instance handle to the window
- SetProp(hwndDlg, CURRENT_INSTANCE, pImpl);
+ SetPropW(hwndDlg, CURRENT_INSTANCE, pImpl);
pImpl->handleInitDialog(hwndDlg, hChildDlg);
}
return 0;
@@ -488,7 +487,7 @@ LRESULT CALLBACK CFileOpenDialog::BaseDlgProc(
if (WM_NCDESTROY == wMessage)
{
pImpl = reinterpret_cast<CFileOpenDialog*>(
- RemoveProp(hWnd,CURRENT_INSTANCE));
+ RemovePropW(hWnd,CURRENT_INSTANCE));
SetWindowLongPtr(hWnd, GWLP_WNDPROC,
reinterpret_cast<LONG_PTR>(pImpl->m_pfnBaseDlgProc));
@@ -510,7 +509,7 @@ CFileOpenDialog* SAL_CALL CFileOpenDialog::getCurrentInstance(HWND hwnd)
{
OSL_ASSERT(IsWindow( hwnd));
return reinterpret_cast<CFileOpenDialog*>(
- GetProp(hwnd, CURRENT_INSTANCE));
+ GetPropW(hwnd, CURRENT_INSTANCE));
}