diff options
| author | George Hazan <george.hazan@gmail.com> | 2024-06-27 17:20:30 +0300 |
|---|---|---|
| committer | George Hazan <george.hazan@gmail.com> | 2024-06-27 17:20:30 +0300 |
| commit | f358ba9fb8780578db7571dab3765323f8e23115 (patch) | |
| tree | 7502fcdd62b2f1f661b7e307f3f0293d4182f850 /src | |
| parent | ed30792980b4f2e4891a39829951a0661485259e (diff) | |
fixes #4498 (Пропало RTF копирование которое работало нормально)
Diffstat (limited to 'src')
| -rw-r--r-- | src/mir_core/src/Windows/clipboard.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mir_core/src/Windows/clipboard.cpp b/src/mir_core/src/Windows/clipboard.cpp index 61ddef6875..425ed67bdf 100644 --- a/src/mir_core/src/Windows/clipboard.cpp +++ b/src/mir_core/src/Windows/clipboard.cpp @@ -26,13 +26,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. static UINT g_iRtf = 0; -static void sttCopyAnsi(const char *pszString) +static void sttCopyAnsi(const char *pszString, int iFormat) { if (size_t cbLen = mir_strlen(pszString)) if (HGLOBAL hData = ::GlobalAlloc(GMEM_MOVEABLE | GMEM_SHARE, cbLen + 1)) { mir_strcpy((char *)GlobalLock(hData), pszString); GlobalUnlock(hData); - SetClipboardData(CF_TEXT, hData); + SetClipboardData(iFormat, hData); } } @@ -54,7 +54,7 @@ MClipAnsi::MClipAnsi(const char *pszString) : void MClipAnsi::Copy() const { - sttCopyAnsi(m_szString); + sttCopyAnsi(m_szString, CF_TEXT); } ///////////////////////////////////////////////////////////////////////////////////////// @@ -68,7 +68,7 @@ void MClipRtf::Copy() const if (g_iRtf == 0) g_iRtf = RegisterClipboardFormatW(CF_RTF); - sttCopyAnsi(m_szString); + sttCopyAnsi(m_szString, g_iRtf); } ///////////////////////////////////////////////////////////////////////////////////////// |
