From 9ac98e6e3488e434bf4864ecfb13a121784f640b Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 4 Apr 2017 14:57:45 +0200 Subject: Finally switch MSVC to sal_Unicode = char16_t, too There is lots of (Windows-only) code that relied on sal_Unicode being the same as wchar_t, and the best change may be different in each case (and doing the changes may be somewhat error prone). So for now add SAL_U/SAL_W scaffolding functions to sal/types.h, remove their uses one by one again, and finally drop those functions again. Change-Id: I2cc791bd941d089901abb5f6fc2f05fbc49e65ea Reviewed-on: https://gerrit.libreoffice.org/36077 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- embedserv/source/embed/ed_ioleobject.cxx | 6 +++--- embedserv/source/embed/ed_ipersiststr.cxx | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'embedserv') diff --git a/embedserv/source/embed/ed_ioleobject.cxx b/embedserv/source/embed/ed_ioleobject.cxx index 54afccc3adb4..965337547ecd 100644 --- a/embedserv/source/embed/ed_ioleobject.cxx +++ b/embedserv/source/embed/ed_ioleobject.cxx @@ -47,10 +47,10 @@ STDMETHODIMP EmbedDocument_Impl::SetHostNames( LPCOLESTR szContainerApp, LPCOLES { m_pDocHolder->setTitle( OUString( - szContainerObj)); + SAL_U(szContainerObj))); m_pDocHolder->setContainerName( OUString( - szContainerApp)); + SAL_U(szContainerApp))); } return S_OK; @@ -424,7 +424,7 @@ HRESULT EmbedDocument_Impl::SaveObject() // in case of links the containers does not provide client site sometimes hr = Save( static_cast(nullptr), FALSE ); // triggers saving to the link location - SaveCompleted( aPreservFileName.getStr() ); + SaveCompleted( SAL_W(aPreservFileName.getStr()) ); } notify( false ); diff --git a/embedserv/source/embed/ed_ipersiststr.cxx b/embedserv/source/embed/ed_ipersiststr.cxx index 86a2d93f6a8d..528df24b3bb5 100644 --- a/embedserv/source/embed/ed_ipersiststr.cxx +++ b/embedserv/source/embed/ed_ipersiststr.cxx @@ -425,7 +425,7 @@ STDMETHODIMP EmbedDocument_Impl::InitNew( IStorage *pStg ) CLIPFORMAT cf = (CLIPFORMAT)RegisterClipboardFormatA( "Embedded Object" ); hr = WriteFmtUserTypeStg( pStg, cf, // ??? - const_cast(aCurType.getStr()) ); + SAL_W(const_cast(aCurType.getStr())) ); if ( hr == S_OK ) { @@ -753,7 +753,7 @@ STDMETHODIMP EmbedDocument_Impl::Load( LPCOLESTR pszFileName, DWORD /*dwMode*/ ) CLIPFORMAT cf = (CLIPFORMAT)RegisterClipboardFormatA( "Embedded Object" ); hr = WriteFmtUserTypeStg( m_pMasterStorage, cf, // ??? - const_cast(aCurType.getStr()) ); + SAL_W(const_cast(aCurType.getStr())) ); if ( FAILED( hr ) ) return E_FAIL; hr = m_pMasterStorage->SetClass( m_guid ); @@ -804,7 +804,7 @@ STDMETHODIMP EmbedDocument_Impl::Load( LPCOLESTR pszFileName, DWORD /*dwMode*/ ) cf = (CLIPFORMAT)RegisterClipboardFormatA( "Embedded Object" ); hr = WriteFmtUserTypeStg( m_pMasterStorage, cf, // ??? - const_cast(aCurType.getStr()) ); + SAL_W(const_cast(aCurType.getStr())) ); if ( SUCCEEDED( hr ) ) { -- cgit v1.2.1