projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
no changes, just clarified meaning of various conversion functions in a comment
[wxWidgets.git]
/
src
/
os2
/
dataobj.cpp
diff --git
a/src/os2/dataobj.cpp
b/src/os2/dataobj.cpp
index 683c8a4ed40f14c6e893ac89553e4544a47275fd..81939cf4295c9588cd961e24333e0d2408c258b2 100644
(file)
--- a/
src/os2/dataobj.cpp
+++ b/
src/os2/dataobj.cpp
@@
-1,5
+1,5
@@
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
-// Name: os2/dataobj.cpp
+// Name:
src/
os2/dataobj.cpp
// Purpose: implementation of wx[I]DataObject class
// Author: David Webster
// Modified by:
// Purpose: implementation of wx[I]DataObject class
// Author: David Webster
// Modified by:
@@
-17,27
+17,22
@@
// headers
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
-#ifdef __GNUG__
- #pragma implementation "dataobj.h"
-#endif
-
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
+#if wxUSE_DATAOBJ
+
+#include "wx/dataobj.h"
+
#ifndef WX_PRECOMP
#ifndef WX_PRECOMP
- #include "wx/defs.h"
#include "wx/intl.h"
#include "wx/log.h"
#include "wx/intl.h"
#include "wx/log.h"
+ #include "wx/image.h"
#endif
#endif
-#if wxUSE_DATAOBJ
-
-#include "wx/dataobj.h"
#include "wx/mstream.h"
#include "wx/mstream.h"
-#include "wx/image.h"
-#define INCL_DOS
-#include <os2.h>
+#include "wx/os2/private.h"
// ----------------------------------------------------------------------------
// functions
// ----------------------------------------------------------------------------
// functions
@@
-62,11
+57,11
@@
wxString wxDataFormat::GetId() const
} // end of wxDataFormat::GetId()
void wxDataFormat::SetId (
} // end of wxDataFormat::GetId()
void wxDataFormat::SetId (
- const wx
Char*
zId
+ const wx
String&
zId
)
{
m_uFormat = ::WinAddAtom( ::WinQuerySystemAtomTable()
)
{
m_uFormat = ::WinAddAtom( ::WinQuerySystemAtomTable()
- ,
(PSZ)zId
+ ,
zId.char_str()
);
} // end of wxDataFormat::SetId
);
} // end of wxDataFormat::SetId
@@
-102,7
+97,7
@@
bool CIDataObject::GetData ( const wxDataFormat& rFormat,
{
QueryGetData(rFormat);
if (rFormat.GetType() == wxDF_INVALID)
{
QueryGetData(rFormat);
if (rFormat.GetType() == wxDF_INVALID)
- return
FALSE
;
+ return
false
;
ULONG ulSize = m_pDataObject->GetDataSize(rFormat);
ULONG ulSize = m_pDataObject->GetDataSize(rFormat);
@@
-111,7
+106,7
@@
bool CIDataObject::GetData ( const wxDataFormat& rFormat,
//
// It probably means that the method is just not implemented
//
//
// It probably means that the method is just not implemented
//
- return
FALSE
;
+ return
false
;
}
if (rFormat.GetType() == wxDF_PRIVATE)
{
}
if (rFormat.GetType() == wxDF_PRIVATE)
{
@@
-123,7
+118,7
@@
bool CIDataObject::GetData ( const wxDataFormat& rFormat,
}
if (ulSize > ulLen) // not enough room to copy
}
if (ulSize > ulLen) // not enough room to copy
- return
FALSE
;
+ return
false
;
//
// Copy the data
//
// Copy the data
@@
-235,7
+230,7
@@
bool wxFileDataObject::GetDataHere( void* pBuf ) const
sFilenames += (wxChar)0;
}
sFilenames += (wxChar)0;
}
- memcpy(pBuf, sFilenames.mbc_str(), sFilenames.
Len
() + 1);
+ memcpy(pBuf, sFilenames.mbc_str(), sFilenames.
length
() + 1);
return true;
}
return true;
}
@@
-245,7
+240,7
@@
size_t wxFileDataObject::GetDataSize() const
for (size_t i = 0; i < m_filenames.GetCount(); i++)
{
for (size_t i = 0; i < m_filenames.GetCount(); i++)
{
- nRes += m_filenames[i].
Len
();
+ nRes += m_filenames[i].
length
();
nRes += 1;
}
nRes += 1;
}
@@
-307,16
+302,13
@@
bool wxBitmapDataObject::GetDataHere( void* pBuf ) const
if (!m_pngSize)
{
wxFAIL_MSG(wxT("attempt to copy empty bitmap failed"));
if (!m_pngSize)
{
wxFAIL_MSG(wxT("attempt to copy empty bitmap failed"));
- return
FALSE
;
+ return
false
;
}
memcpy(pBuf, m_pngData, m_pngSize);
return true;
}
}
memcpy(pBuf, m_pngData, m_pngSize);
return true;
}
-bool wxBitmapDataObject::SetData(
- size_t nSize
-, const void* pBuf
-)
+bool wxBitmapDataObject::SetData( size_t nSize, const void* pBuf)
{
Clear();
m_pngSize = nSize;
{
Clear();
m_pngSize = nSize;
@@
-331,7
+323,7
@@
bool wxBitmapDataObject::SetData(
if (!vHandler.LoadFile(&vImage, vMstream))
{
if (!vHandler.LoadFile(&vImage, vMstream))
{
- return
FALSE
;
+ return
false
;
}
m_bitmap = wxBitmap(vImage);
}
m_bitmap = wxBitmap(vImage);