call wxOle[Un]Initialize() in wxClipboard ctor/dtor to ensure that when wxTheClipboard is destroyed at program shutdown and its Clear() method is called OLE is still initialized
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32755 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
360ae33f43
commit
794fe8cd2f
@ -28,10 +28,6 @@
|
|||||||
#pragma hdrstop
|
#pragma hdrstop
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
|
||||||
#include "wx/setup.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if wxUSE_CLIPBOARD
|
#if wxUSE_CLIPBOARD
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
@ -54,9 +50,10 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "wx/msw/private.h"
|
#include "wx/msw/private.h"
|
||||||
|
#include "wx/msw/ole/oleutils.h"
|
||||||
|
|
||||||
#if wxUSE_WXDIB
|
#if wxUSE_WXDIB
|
||||||
#include "wx/msw/dib.h"
|
#include "wx/msw/dib.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// wxDataObject is tied to OLE/drag and drop implementation, therefore so are
|
// wxDataObject is tied to OLE/drag and drop implementation, therefore so are
|
||||||
@ -534,6 +531,10 @@ IMPLEMENT_DYNAMIC_CLASS(wxClipboard, wxObject)
|
|||||||
|
|
||||||
wxClipboard::wxClipboard()
|
wxClipboard::wxClipboard()
|
||||||
{
|
{
|
||||||
|
#if wxUSE_OLE_CLIPBOARD
|
||||||
|
wxOleInitialize();
|
||||||
|
#endif
|
||||||
|
|
||||||
m_clearOnExit = false;
|
m_clearOnExit = false;
|
||||||
m_isOpened = false;
|
m_isOpened = false;
|
||||||
}
|
}
|
||||||
@ -544,6 +545,10 @@ wxClipboard::~wxClipboard()
|
|||||||
{
|
{
|
||||||
Clear();
|
Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if wxUSE_OLE_CLIPBOARD
|
||||||
|
wxOleUninitialize();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxClipboard::Clear()
|
void wxClipboard::Clear()
|
||||||
|
Loading…
Reference in New Issue
Block a user