cleanup - reformat

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36869 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Surovell
2006-01-14 07:56:26 +00:00
parent a571434502
commit 876b960ac2

View File

@@ -59,7 +59,7 @@ wxDragResult wxDropTarget::OnDragOver( wxCoord WXUNUSED(x),
bool wxDropTarget::OnDrop( wxCoord WXUNUSED(x), wxCoord WXUNUSED(y) )
{
if (!m_dataObject)
if (m_dataObject == NULL)
return false;
return CurrentDragHasSupportedFormat() ;
@@ -68,7 +68,7 @@ bool wxDropTarget::OnDrop( wxCoord WXUNUSED(x), wxCoord WXUNUSED(y) )
wxDragResult wxDropTarget::OnData( wxCoord WXUNUSED(x), wxCoord WXUNUSED(y),
wxDragResult def )
{
if (!m_dataObject)
if (m_dataObject == NULL)
return wxDragNone;
if (!CurrentDragHasSupportedFormat())
@@ -80,6 +80,7 @@ wxDragResult wxDropTarget::OnData( wxCoord WXUNUSED(x), wxCoord WXUNUSED(y),
bool wxDropTarget::CurrentDragHasSupportedFormat()
{
bool supported = false ;
if ( gTrackingGlobals.m_currentSource != NULL )
{
wxDataObject* data = gTrackingGlobals.m_currentSource->GetDataObject() ;
@@ -211,7 +212,8 @@ bool wxDropTarget::GetData()
{
result = GetFlavorType((DragReference)m_currentDrag, theItem, flavor , &theType);
wxDataFormat format(theType) ;
if ( (hasPreferredFormat && format == preferredFormat) || (!hasPreferredFormat && m_dataObject->IsSupportedFormat( format )))
if ( (hasPreferredFormat && format == preferredFormat)
|| (!hasPreferredFormat && m_dataObject->IsSupportedFormat( format )))
{
result = GetFlavorFlags( (DragReference)m_currentDrag, theItem, theType, &theFlags );
if (result == noErr)
@@ -235,6 +237,7 @@ bool wxDropTarget::GetData()
}
theData = new char[dataSize];
GetFlavorData( (DragReference)m_currentDrag, theItem, theType, (void*) theData, &dataSize, 0L );
if ( theType == kScrapFlavorTypeText )
{
@@ -244,7 +247,7 @@ bool wxDropTarget::GetData()
#if wxUSE_UNICODE
else if ( theType == kScrapFlavorTypeUnicode )
{
theData[dataSize] = 0 ;
theData[dataSize + 0] =
theData[dataSize + 1] = 0 ;
m_dataObject->SetData( wxDataFormat(wxDF_UNICODETEXT), dataSize , theData );
}