diff options
author | Vadim Dashevskiy <watcherhd@gmail.com> | 2012-06-15 18:52:16 +0000 |
---|---|---|
committer | Vadim Dashevskiy <watcherhd@gmail.com> | 2012-06-15 18:52:16 +0000 |
commit | 58973a21a30bf95427fd43c456e41e35c386218c (patch) | |
tree | 1413fba069ecd351b2c99fa5a53e52c68d8a662c /plugins/mTextControl/src/FormattedTextDraw.cpp | |
parent | 55b5cf8a5506f03350e5c80ac86f5717425e4d10 (diff) |
another portion of "#ifsef Unicode" removal
git-svn-id: http://svn.miranda-ng.org/main/trunk@434 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/mTextControl/src/FormattedTextDraw.cpp')
-rw-r--r-- | plugins/mTextControl/src/FormattedTextDraw.cpp | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/plugins/mTextControl/src/FormattedTextDraw.cpp b/plugins/mTextControl/src/FormattedTextDraw.cpp index be42fade65..f40edb1d00 100644 --- a/plugins/mTextControl/src/FormattedTextDraw.cpp +++ b/plugins/mTextControl/src/FormattedTextDraw.cpp @@ -78,7 +78,7 @@ HRESULT CFormattedTextDraw::putRTFTextA(char *newVal) HRESULT CFormattedTextDraw::putRTFTextW(WCHAR *newVal)
{
-#ifdef UNICODE
+
HRESULT hr;
LRESULT lResult = 0;
EDITSTREAM editStream;
@@ -95,9 +95,7 @@ HRESULT CFormattedTextDraw::putRTFTextW(WCHAR *newVal) editStream.pfnCallback = (EDITSTREAMCALLBACK)EditStreamInCallback;
hr = m_spTextServices->TxSendMessage(EM_STREAMIN, (WPARAM)(SF_RTF|SF_UNICODE), (LPARAM)&editStream, &lResult);
return S_OK;
-#else
- return E_FAIL;
-#endif
+
}
HRESULT CFormattedTextDraw::putTextA(char *newVal)
@@ -130,7 +128,7 @@ HRESULT CFormattedTextDraw::putTextA(char *newVal) HRESULT CFormattedTextDraw::putTextW(WCHAR *newVal)
{
-#ifdef UNICODE
+
HRESULT hr;
LRESULT lResult = 0;
EDITSTREAM editStream;
@@ -155,9 +153,7 @@ HRESULT CFormattedTextDraw::putTextW(WCHAR *newVal) m_spTextServices->TxSendMessage(EM_SETCHARFORMAT, (WPARAM)(SCF_ALL), (LPARAM)&cf, &lResult);
return S_OK;
-#else
- return E_FAIL;
-#endif
+
}
HRESULT CFormattedTextDraw::Draw(void *hdcDraw, RECT *prc)
@@ -510,11 +506,9 @@ HRESULT CFormattedTextDraw::CharFormatFromHFONT(CHARFORMAT2W* pCF, HFONT hFont) pCF->bCharSet = lf.lfCharSet;
pCF->bPitchAndFamily = lf.lfPitchAndFamily;
-#ifdef UNICODE
+
lstrcpyW(pCF->szFaceName, lf.lfFaceName);
-#else
- MultiByteToWideChar(CP_ACP, 0, lf.lfFaceName, LF_FACESIZE, pCF->szFaceName, LF_FACESIZE);
-#endif
+
return S_OK;
}
|