diff options
author | George Hazan <ghazan@miranda.im> | 2017-04-07 14:36:22 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-04-07 14:36:22 +0300 |
commit | c46f4344f007d814131d25fa5aec6fdb4c7a049d (patch) | |
tree | 2728e27c52e2e12bcadcf2f5606196229607c7af /src/core | |
parent | 77f05f77b497b1d69e8107caefd6d19fa9c609ab (diff) |
Windows-specific code moved to mir_core
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/stdmsg/src/chat_window.cpp | 1 | ||||
-rw-r--r-- | src/core/stdmsg/src/globals.h | 25 | ||||
-rw-r--r-- | src/core/stdmsg/src/msgdialog.cpp | 1 | ||||
-rw-r--r-- | src/core/stdmsg/src/msgs.cpp | 90 | ||||
-rw-r--r-- | src/core/stdmsg/src/stdafx.h | 1 |
5 files changed, 0 insertions, 118 deletions
diff --git a/src/core/stdmsg/src/chat_window.cpp b/src/core/stdmsg/src/chat_window.cpp index ce6928a20d..d405be1514 100644 --- a/src/core/stdmsg/src/chat_window.cpp +++ b/src/core/stdmsg/src/chat_window.cpp @@ -69,7 +69,6 @@ void CChatRoomDlg::OnInitDialog() int mask = (int)m_log.SendMsg(EM_GETEVENTMASK, 0, 0); m_log.SendMsg(EM_SETEVENTMASK, 0, mask | ENM_LINK | ENM_MOUSEEVENTS); m_log.SendMsg(EM_LIMITTEXT, sizeof(wchar_t) * 0x7FFFFFFF, 0); - m_log.SendMsg(EM_SETOLECALLBACK, 0, (LPARAM)&reOleCallback); m_log.SendMsg(EM_HIDESELECTION, TRUE, 0); UpdateOptions(); diff --git a/src/core/stdmsg/src/globals.h b/src/core/stdmsg/src/globals.h index fb92e0beb7..3f25e9ee63 100644 --- a/src/core/stdmsg/src/globals.h +++ b/src/core/stdmsg/src/globals.h @@ -61,29 +61,4 @@ void ReloadGlobals(); extern GlobalMessageData g_dat;
-/////////////////////////////////////////////////////////////////////////////////////////
-
-struct CREOleCallback : public IRichEditOleCallback
-{
- CREOleCallback() : refCount(0), nextStgId(0), pictStg(nullptr) {}
- unsigned refCount;
- IStorage *pictStg;
- int nextStgId;
-
- STDMETHOD(QueryInterface)(REFIID riid, LPVOID FAR * lplpObj);
- STDMETHOD_(ULONG, AddRef)(THIS);
- STDMETHOD_(ULONG, Release)(THIS);
-
- STDMETHOD(ContextSensitiveHelp)(BOOL fEnterMode);
- STDMETHOD(GetNewStorage)(LPSTORAGE FAR * lplpstg);
- STDMETHOD(GetInPlaceContext)(LPOLEINPLACEFRAME FAR * lplpFrame, LPOLEINPLACEUIWINDOW FAR * lplpDoc, LPOLEINPLACEFRAMEINFO lpFrameInfo);
- STDMETHOD(ShowContainerUI)(BOOL fShow);
- STDMETHOD(QueryInsertObject)(LPCLSID lpclsid, LPSTORAGE lpstg, LONG cp);
- STDMETHOD(DeleteObject)(LPOLEOBJECT lpoleobj);
- STDMETHOD(QueryAcceptData)(LPDATAOBJECT lpdataobj, CLIPFORMAT FAR * lpcfFormat, DWORD reco, BOOL fReally, HGLOBAL hMetaPict);
- STDMETHOD(GetClipboardData)(CHARRANGE FAR *lpchrg, DWORD reco, LPDATAOBJECT FAR * lplpdataobj);
- STDMETHOD(GetDragDropEffect)(BOOL fDrag, DWORD grfKeyState, LPDWORD pdwEffect);
- STDMETHOD(GetContextMenu)(WORD seltype, LPOLEOBJECT lpoleobj, CHARRANGE FAR * lpchrg, HMENU FAR * lphmenu);
-};
-
#endif
diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp index f855ec9c6b..ac2b92bf73 100644 --- a/src/core/stdmsg/src/msgdialog.cpp +++ b/src/core/stdmsg/src/msgdialog.cpp @@ -162,7 +162,6 @@ void CSrmmWindow::OnInitDialog() m_avatar.Enable(false);
- m_log.SendMsg(EM_SETOLECALLBACK, 0, (LPARAM)&reOleCallback);
m_log.SendMsg(EM_SETEVENTMASK, 0, ENM_MOUSEEVENTS | ENM_LINK | ENM_SCROLL);
m_log.SendMsg(EM_AUTOURLDETECT, TRUE, 0);
diff --git a/src/core/stdmsg/src/msgs.cpp b/src/core/stdmsg/src/msgs.cpp index f050209d20..bd0301088b 100644 --- a/src/core/stdmsg/src/msgs.cpp +++ b/src/core/stdmsg/src/msgs.cpp @@ -546,93 +546,3 @@ void SplitmsgShutdown(void) FreeLibrary(hMsftEdit);
msgQueue_destroy();
}
-
-///////////////////////////////////////////////////////////////////////////////////////////////////////
-
-CREOleCallback reOleCallback;
-
-STDMETHODIMP CREOleCallback::QueryInterface(REFIID riid, LPVOID * ppvObj)
-{
- if (IsEqualIID(riid, IID_IRichEditOleCallback)) {
- *ppvObj = this;
- AddRef();
- return S_OK;
- }
- *ppvObj = nullptr;
- return E_NOINTERFACE;
-}
-
-STDMETHODIMP_(ULONG) CREOleCallback::AddRef()
-{
- if (refCount == 0)
- StgCreateDocfile(nullptr, STGM_READWRITE | STGM_SHARE_EXCLUSIVE | STGM_CREATE | STGM_DELETEONRELEASE, 0, &pictStg);
-
- return ++refCount;
-}
-
-STDMETHODIMP_(ULONG) CREOleCallback::Release()
-{
- if (--refCount == 0) {
- if (pictStg) {
- pictStg->Release();
- pictStg = nullptr;
- }
- }
- return refCount;
-}
-
-STDMETHODIMP CREOleCallback::ContextSensitiveHelp(BOOL)
-{
- return S_OK;
-}
-
-STDMETHODIMP CREOleCallback::DeleteObject(LPOLEOBJECT)
-{
- return S_OK;
-}
-
-STDMETHODIMP CREOleCallback::GetClipboardData(CHARRANGE*, DWORD, LPDATAOBJECT*)
-{
- return E_NOTIMPL;
-}
-
-STDMETHODIMP CREOleCallback::GetContextMenu(WORD, LPOLEOBJECT, CHARRANGE*, HMENU*)
-{
- return E_INVALIDARG;
-}
-
-STDMETHODIMP CREOleCallback::GetDragDropEffect(BOOL, DWORD, LPDWORD)
-{
- return S_OK;
-}
-
-STDMETHODIMP CREOleCallback::GetInPlaceContext(LPOLEINPLACEFRAME*, LPOLEINPLACEUIWINDOW*, LPOLEINPLACEFRAMEINFO)
-{
- return E_INVALIDARG;
-}
-
-STDMETHODIMP CREOleCallback::GetNewStorage(LPSTORAGE * lplpstg)
-{
- WCHAR szwName[64];
- char szName[64];
- mir_snprintf(szName, "s%u", nextStgId++);
- MultiByteToWideChar(CP_ACP, 0, szName, -1, szwName, _countof(szwName));
- if (pictStg == nullptr)
- return STG_E_MEDIUMFULL;
- return pictStg->CreateStorage(szwName, STGM_READWRITE | STGM_SHARE_EXCLUSIVE | STGM_CREATE, 0, 0, lplpstg);
-}
-
-STDMETHODIMP CREOleCallback::QueryAcceptData(LPDATAOBJECT, CLIPFORMAT*, DWORD, BOOL, HGLOBAL)
-{
- return S_OK;
-}
-
-STDMETHODIMP CREOleCallback::QueryInsertObject(LPCLSID, LPSTORAGE, LONG)
-{
- return S_OK;
-}
-
-STDMETHODIMP CREOleCallback::ShowContainerUI(BOOL)
-{
- return S_OK;
-}
diff --git a/src/core/stdmsg/src/stdafx.h b/src/core/stdmsg/src/stdafx.h index d199fd10d3..dc0b0dbe05 100644 --- a/src/core/stdmsg/src/stdafx.h +++ b/src/core/stdmsg/src/stdafx.h @@ -82,7 +82,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. extern HINSTANCE g_hInst;
extern HANDLE hHookWinPopup, hHookWinWrite;
-extern CREOleCallback reOleCallback;
/////////////////////////////////////////////////////////////////////////////////////////
|