summaryrefslogtreecommitdiff
path: root/svl/source/svdde/ddedata.cxx
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2017-09-20 20:20:44 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2017-09-22 20:53:30 +0200
commiteef4c133e9649ebd690918bd7b83c2d5dc0dfcff (patch)
tree1a8d084c5b16056a15258770a05b9cd2d53a40bc /svl/source/svdde/ddedata.cxx
parentbb406680cebd6fa1e1bdb9e2de430cd9a1f44da0 (diff)
Windows: avoid dependence on UNICODE define; prefer W functions
Change-Id: I95b90128e93f0d88ed73601bcc5a7ca9279d4cf1 Reviewed-on: https://gerrit.libreoffice.org/42560 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'svl/source/svdde/ddedata.cxx')
-rw-r--r--svl/source/svdde/ddedata.cxx10
1 files changed, 4 insertions, 6 deletions
diff --git a/svl/source/svdde/ddedata.cxx b/svl/source/svdde/ddedata.cxx
index 44817c3d03d8..5ee335ee67ec 100644
--- a/svl/source/svdde/ddedata.cxx
+++ b/svl/source/svdde/ddedata.cxx
@@ -22,8 +22,6 @@
// Format numbers to be the same! If that's not the case, we need to
// adapt the code here. The implementation uses the conversions here.
-#define UNICODE
-
#include <string.h>
#include "ddeimp.hxx"
#include <svl/svdde.hxx>
@@ -136,7 +134,7 @@ sal_uLong DdeData::GetExternalFormat(SotClipboardFormatId nFmt)
#if defined(_WIN32)
OUString aName( SotExchange::GetFormatName( nFmt ) );
if( !aName.isEmpty() )
- return RegisterClipboardFormat( reinterpret_cast<LPCWSTR>(aName.getStr()) );
+ return RegisterClipboardFormatW( SAL_W(aName.getStr()) );
#endif
}
}
@@ -157,10 +155,10 @@ SotClipboardFormatId DdeData::GetInternalFormat(sal_uLong nFmt)
#if defined(_WIN32)
if( nFmt >= CF_MAX )
{
- TCHAR szName[ 256 ];
+ WCHAR szName[ 256 ];
- if(GetClipboardFormatName( nFmt, szName, sizeof(szName) ))
- return SotExchange::RegisterFormatName( OUString(reinterpret_cast<const sal_Unicode*>(szName)) );
+ if(GetClipboardFormatNameW( nFmt, szName, SAL_N_ELEMENTS(szName) ))
+ return SotExchange::RegisterFormatName( SAL_U(szName) );
}
#endif
break;