diff options
author | George Hazan <ghazan@miranda.im> | 2020-03-04 16:40:59 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-03-04 16:40:59 +0300 |
commit | 643402d4a23f81d97c9067725fd5840054cc7e74 (patch) | |
tree | 83658d002041a016c6c7c2e348db9067abb4e70e /plugins/Scriver/src/utils.cpp | |
parent | e2eb0f327cf2086013d8534182b86f923ea98a7a (diff) |
fixes #2244 (Scriver: after message log unification the Quote button doesnt use selected text)
Diffstat (limited to 'plugins/Scriver/src/utils.cpp')
-rw-r--r-- | plugins/Scriver/src/utils.cpp | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/plugins/Scriver/src/utils.cpp b/plugins/Scriver/src/utils.cpp index c3bb35d3f2..b0e4869327 100644 --- a/plugins/Scriver/src/utils.cpp +++ b/plugins/Scriver/src/utils.cpp @@ -72,36 +72,6 @@ wchar_t* limitText(wchar_t *text, int limit) return text;
}
-static DWORD CALLBACK StreamOutCallback(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG cb, LONG * pcb)
-{
- MessageSendQueueItem *msi = (MessageSendQueueItem *)dwCookie;
- msi->sendBuffer = (char*)mir_realloc(msi->sendBuffer, msi->sendBufferSize + cb + 2);
- memcpy(msi->sendBuffer + msi->sendBufferSize, pbBuff, cb);
- msi->sendBufferSize += cb;
- *((wchar_t*)(msi->sendBuffer + msi->sendBufferSize)) = '\0';
- *pcb = cb;
- return 0;
-}
-
-wchar_t *GetRichEditSelection(HWND hwnd)
-{
- CHARRANGE sel;
- SendMessage(hwnd, EM_EXGETSEL, 0, (LPARAM)&sel);
- if (sel.cpMin == sel.cpMax)
- return nullptr;
-
- MessageSendQueueItem msi;
- msi.sendBuffer = nullptr;
- msi.sendBufferSize = 0;
-
- EDITSTREAM stream;
- memset(&stream, 0, sizeof(stream));
- stream.pfnCallback = StreamOutCallback;
- stream.dwCookie = (DWORD_PTR)&msi;
- SendMessage(hwnd, EM_STREAMOUT, SF_TEXT | SF_UNICODE | SFF_SELECTION, (LPARAM)&stream);
- return (wchar_t*)msi.sendBuffer;
-}
-
int MeasureMenuItem(WPARAM, LPARAM lParam)
{
LPMEASUREITEMSTRUCT mis = (LPMEASUREITEMSTRUCT)lParam;
|