TRUE/true, FALSE/false, whitespace cleaning.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28812 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -16,9 +16,7 @@
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
#if !wxUSE_ACCESSIBILITY
|
||||
#error "You should #define wxUSE_ACCESSIBILITY to 1 to compile this file!"
|
||||
#endif //wxUSE_ACCESSIBILITY
|
||||
#if wxUSE_ACCESSIBILITY
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// forward declarations
|
||||
@@ -68,5 +66,7 @@ private:
|
||||
DECLARE_NO_COPY_CLASS(wxAccessible)
|
||||
};
|
||||
|
||||
#endif //wxUSE_ACCESSIBILITY
|
||||
|
||||
#endif //_WX_ACCESS_H_
|
||||
|
||||
|
@@ -57,7 +57,7 @@ public:
|
||||
wxString GetId() const;
|
||||
void SetId(const wxChar *format);
|
||||
|
||||
// returns TRUE if the format is one of those defined in wxDataFormatId
|
||||
// returns true if the format is one of those defined in wxDataFormatId
|
||||
bool IsStandard() const { return m_format > 0 && m_format < wxDF_PRIVATE; }
|
||||
|
||||
private:
|
||||
|
@@ -36,7 +36,7 @@ public:
|
||||
// it is deleted, it should delete us as well
|
||||
void SetAutoDelete();
|
||||
|
||||
// return TRUE if we support this format in "Get" direction
|
||||
// return true if we support this format in "Get" direction
|
||||
bool IsSupportedFormat(const wxDataFormat& format) const
|
||||
{ return wxDataObjectBase::IsSupported(format, Get); }
|
||||
|
||||
|
@@ -16,9 +16,7 @@
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
#if !wxUSE_DRAG_AND_DROP
|
||||
#error "You should #define wxUSE_DRAG_AND_DROP to 1 to compile this file!"
|
||||
#endif //WX_DRAG_DROP
|
||||
#if wxUSE_DRAG_AND_DROP
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// forward declarations
|
||||
@@ -80,4 +78,6 @@ private:
|
||||
DECLARE_NO_COPY_CLASS(wxDropSource)
|
||||
};
|
||||
|
||||
#endif //wxUSE_DRAG_AND_DROP
|
||||
|
||||
#endif //_WX_OLEDROPSRC_H
|
||||
|
@@ -16,9 +16,7 @@
|
||||
#pragma interface "droptgt.h"
|
||||
#endif
|
||||
|
||||
#if !wxUSE_DRAG_AND_DROP
|
||||
#error "You should #define wxUSE_DRAG_AND_DROP to 1 to compile this file!"
|
||||
#endif //WX_DRAG_DROP
|
||||
#if wxUSE_DRAG_AND_DROP
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// forward declarations
|
||||
@@ -73,4 +71,6 @@ private:
|
||||
DECLARE_NO_COPY_CLASS(wxDropTarget)
|
||||
};
|
||||
|
||||
#endif //wxUSE_DRAG_AND_DROP
|
||||
|
||||
#endif //_WX_OLEDROPTGT_H
|
||||
|
@@ -39,7 +39,7 @@ inline void ReleaseInterface(IUnknown *pIUnk)
|
||||
// release the interface pointer (if !NULL) and make it NULL
|
||||
#define RELEASE_AND_NULL(p) if ( (p) != NULL ) { p->Release(); p = NULL; };
|
||||
|
||||
// return TRUE if the iid is in the array
|
||||
// return true if the iid is in the array
|
||||
extern bool IsIidFromList(REFIID riid, const IID *aIids[], size_t nCount);
|
||||
|
||||
// ============================================================================
|
||||
|
@@ -101,7 +101,7 @@ bool wxAutomationObject::Invoke(const wxString& member, int action,
|
||||
wxVariant& retValue, int noArgs, wxVariant args[], const wxVariant* ptrArgs[]) const
|
||||
{
|
||||
if (!m_dispatchPtr)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
// nonConstMember is necessary because the wxString class doesn't have enough consts...
|
||||
wxString nonConstMember(member);
|
||||
@@ -114,7 +114,7 @@ bool wxAutomationObject::Invoke(const wxString& member, int action,
|
||||
wxString rest(nonConstMember.Right(nonConstMember.Length() - ch - 1));
|
||||
wxAutomationObject obj;
|
||||
if (!GetObject(obj, member2))
|
||||
return FALSE;
|
||||
return false;
|
||||
return obj.Invoke(rest, action, retValue, noArgs, args, ptrArgs);
|
||||
}
|
||||
|
||||
@@ -166,7 +166,7 @@ bool wxAutomationObject::Invoke(const wxString& member, int action,
|
||||
// ShowException(szMember, hr, NULL, 0);
|
||||
delete[] argNames;
|
||||
delete[] dispIds;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// if doing a property put(ref), we need to adjust the first argument to have a
|
||||
@@ -188,7 +188,7 @@ bool wxAutomationObject::Invoke(const wxString& member, int action,
|
||||
delete[] argNames;
|
||||
delete[] dispIds;
|
||||
delete[] oleArgs;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -225,7 +225,7 @@ bool wxAutomationObject::Invoke(const wxString& member, int action,
|
||||
|
||||
if (vReturnPtr)
|
||||
ReleaseVariant(vReturnPtr);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -241,7 +241,7 @@ bool wxAutomationObject::Invoke(const wxString& member, int action,
|
||||
ReleaseVariant(& vReturn);
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// Invoke a member function
|
||||
@@ -382,9 +382,9 @@ bool wxAutomationObject::PutProperty(const wxString& property, int noArgs, wxVar
|
||||
wxVariant retVariant;
|
||||
if (!Invoke(property, DISPATCH_PROPERTYPUT, retVariant, noArgs, args))
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool wxAutomationObject::PutPropertyArray(const wxString& property, int noArgs, const wxVariant **args)
|
||||
@@ -392,9 +392,9 @@ bool wxAutomationObject::PutPropertyArray(const wxString& property, int noArgs,
|
||||
wxVariant retVariant;
|
||||
if (!Invoke(property, DISPATCH_PROPERTYPUT, retVariant, noArgs, NULL, args))
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool wxAutomationObject::PutProperty(const wxString& property,
|
||||
@@ -485,10 +485,10 @@ bool wxAutomationObject::GetObject(wxAutomationObject& obj, const wxString& prop
|
||||
if (dispatch)
|
||||
{
|
||||
obj.SetDispatchPtr(dispatch);
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// A way of initialising another wxAutomationObject with a dispatch object
|
||||
@@ -498,10 +498,10 @@ bool wxAutomationObject::GetObject(wxAutomationObject& obj, const wxString& prop
|
||||
if (dispatch)
|
||||
{
|
||||
obj.SetDispatchPtr(dispatch);
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Get a dispatch pointer from the current object associated
|
||||
@@ -509,7 +509,7 @@ bool wxAutomationObject::GetObject(wxAutomationObject& obj, const wxString& prop
|
||||
bool wxAutomationObject::GetInstance(const wxString& classId) const
|
||||
{
|
||||
if (m_dispatchPtr)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
CLSID clsId;
|
||||
IUnknown * pUnk = NULL;
|
||||
@@ -519,22 +519,22 @@ bool wxAutomationObject::GetInstance(const wxString& classId) const
|
||||
if (FAILED(CLSIDFromProgID((BSTR) unicodeName, &clsId)))
|
||||
{
|
||||
wxLogWarning(wxT("Cannot obtain CLSID from ProgID"));
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (FAILED(GetActiveObject(clsId, NULL, &pUnk)))
|
||||
{
|
||||
wxLogWarning(wxT("Cannot find an active object"));
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (pUnk->QueryInterface(IID_IDispatch, (LPVOID*) &m_dispatchPtr) != S_OK)
|
||||
{
|
||||
wxLogWarning(wxT("Cannot find IDispatch interface"));
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// Get a dispatch pointer from a new object associated
|
||||
@@ -542,7 +542,7 @@ bool wxAutomationObject::GetInstance(const wxString& classId) const
|
||||
bool wxAutomationObject::CreateInstance(const wxString& classId) const
|
||||
{
|
||||
if (m_dispatchPtr)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
CLSID clsId;
|
||||
|
||||
@@ -551,17 +551,17 @@ bool wxAutomationObject::CreateInstance(const wxString& classId) const
|
||||
if (FAILED(CLSIDFromProgID((BSTR) unicodeName, &clsId)))
|
||||
{
|
||||
wxLogWarning(wxT("Cannot obtain CLSID from ProgID"));
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// start a new copy of Excel, grab the IDispatch interface
|
||||
if (FAILED(CoCreateInstance(clsId, NULL, CLSCTX_LOCAL_SERVER, IID_IDispatch, (void**)&m_dispatchPtr)))
|
||||
{
|
||||
wxLogWarning(wxT("Cannot start an instance of this class."));
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -571,7 +571,7 @@ bool wxConvertVariantToOle(const wxVariant& variant, VARIANTARG& oleVariant)
|
||||
if (variant.IsNull())
|
||||
{
|
||||
oleVariant.vt = VT_NULL;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
wxString type(variant.GetType());
|
||||
@@ -621,7 +621,7 @@ bool wxConvertVariantToOle(const wxVariant& variant, VARIANTARG& oleVariant)
|
||||
|
||||
if (!OleDateFromTm(date.GetYear(), date.GetMonth(), date.GetDay(),
|
||||
0, 0, 0, oleVariant.date))
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
else if (type == wxT("time"))
|
||||
{
|
||||
@@ -630,7 +630,7 @@ bool wxConvertVariantToOle(const wxVariant& variant, VARIANTARG& oleVariant)
|
||||
|
||||
if (!OleDateFromTm(time.GetYear(), time.GetMonth(), time.GetDay(),
|
||||
time.GetHour(), time.GetMinute(), time.GetSecond(), oleVariant.date))
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
#if wxUSE_DATETIME
|
||||
@@ -641,7 +641,7 @@ bool wxConvertVariantToOle(const wxVariant& variant, VARIANTARG& oleVariant)
|
||||
|
||||
if (!OleDateFromTm(date.GetYear(), date.GetMonth(), date.GetDay(),
|
||||
date.GetHour(), date.GetMinute(), date.GetSecond(), oleVariant.date))
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
else if (type == wxT("void*"))
|
||||
@@ -666,7 +666,7 @@ bool wxConvertVariantToOle(const wxVariant& variant, VARIANTARG& oleVariant)
|
||||
|
||||
psa = SafeArrayCreate(VT_VARIANT, 1, &saBound);
|
||||
if (psa == NULL)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
SafeArrayAccessData(psa, (void**)&pvargBase);
|
||||
|
||||
@@ -686,7 +686,7 @@ bool wxConvertVariantToOle(const wxVariant& variant, VARIANTARG& oleVariant)
|
||||
pvarg++;
|
||||
}
|
||||
SafeArrayDestroy(psa);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
pvarg++;
|
||||
}
|
||||
@@ -698,9 +698,9 @@ bool wxConvertVariantToOle(const wxVariant& variant, VARIANTARG& oleVariant)
|
||||
else
|
||||
{
|
||||
oleVariant.vt = VT_NULL;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifndef VT_TYPEMASK
|
||||
@@ -722,7 +722,7 @@ bool wxConvertOleToVariant(const VARIANTARG& oleVariant, wxVariant& variant)
|
||||
#if wxUSE_DATETIME
|
||||
struct tm tmTemp;
|
||||
if (!TmFromOleDate(oleVariant.date, tmTemp))
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
wxDateTime date(tmTemp.tm_yday, (wxDateTime::Month) tmTemp.tm_mon, tmTemp.tm_year, tmTemp.tm_hour, tmTemp.tm_min, tmTemp.tm_sec);
|
||||
|
||||
@@ -779,14 +779,14 @@ bool wxConvertOleToVariant(const VARIANTARG& oleVariant, wxVariant& variant)
|
||||
// Get a pointer to the data
|
||||
HRESULT hr = SafeArrayAccessData(oleVariant.parray, (void HUGEP* FAR*) & pvdata);
|
||||
if (hr != NOERROR)
|
||||
return FALSE;
|
||||
return false;
|
||||
// Iterate the data.
|
||||
for (i = 0; i < cElements; i++)
|
||||
{
|
||||
VARIANTARG& oleElement = pvdata[i];
|
||||
wxVariant vElement;
|
||||
if (!wxConvertOleToVariant(oleElement, vElement))
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
variant.Append(vElement);
|
||||
}
|
||||
@@ -810,10 +810,10 @@ bool wxConvertOleToVariant(const VARIANTARG& oleVariant, wxVariant& variant)
|
||||
default:
|
||||
{
|
||||
wxLogError(wxT("wxAutomationObject::ConvertOleToVariant: Unknown variant value type"));
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
BSTR wxConvertStringToOle(const wxString& str)
|
||||
|
@@ -241,11 +241,11 @@ bool wxDropSource::GiveFeedback(wxDragResult effect)
|
||||
{
|
||||
::SetCursor((HCURSOR)cursor.GetHCURSOR());
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -294,7 +294,7 @@ STDMETHODIMP wxIDropTarget::Drop(IDataObject *pIDataSource,
|
||||
}
|
||||
//else: *pdwEffect is already DROPEFFECT_NONE
|
||||
}
|
||||
//else: OnDrop() returned FALSE, no need to copy data
|
||||
//else: OnDrop() returned false, no need to copy data
|
||||
|
||||
// release the held object
|
||||
RELEASE_AND_NULL(m_pIDataObject);
|
||||
@@ -335,7 +335,7 @@ bool wxDropTarget::Register(WXHWND hwnd)
|
||||
// Or maybe we can dynamically load them from ceshell.dll
|
||||
// or similar.
|
||||
#if defined(__WXWINCE__) && _WIN32_WCE >= 400
|
||||
return FALSE;
|
||||
return false;
|
||||
#else
|
||||
HRESULT hr;
|
||||
|
||||
@@ -344,7 +344,7 @@ bool wxDropTarget::Register(WXHWND hwnd)
|
||||
hr = ::CoLockObjectExternal(m_pIDropTarget, TRUE, FALSE);
|
||||
if ( FAILED(hr) ) {
|
||||
wxLogApiError(wxT("CoLockObjectExternal"), hr);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -355,13 +355,13 @@ bool wxDropTarget::Register(WXHWND hwnd)
|
||||
::CoLockObjectExternal(m_pIDropTarget, FALSE, FALSE);
|
||||
#endif
|
||||
wxLogApiError(wxT("RegisterDragDrop"), hr);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// we will need the window handle for coords transformation later
|
||||
m_pIDropTarget->SetHwnd((HWND)hwnd);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -389,11 +389,11 @@ void wxDropTarget::Revoke(WXHWND hwnd)
|
||||
// base class pure virtuals
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// OnDrop() is called only if we previously returned TRUE from
|
||||
// OnDrop() is called only if we previously returned true from
|
||||
// IsAcceptedData(), so no need to check anything here
|
||||
bool wxDropTarget::OnDrop(wxCoord WXUNUSED(x), wxCoord WXUNUSED(y))
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// copy the data from the data source to the target data object
|
||||
@@ -404,7 +404,7 @@ bool wxDropTarget::GetData()
|
||||
// this is strange because IsAcceptedData() succeeded previously!
|
||||
wxFAIL_MSG(wxT("strange - did supported formats list change?"));
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
STGMEDIUM stm;
|
||||
@@ -415,7 +415,7 @@ bool wxDropTarget::GetData()
|
||||
fmtMemory.lindex = -1;
|
||||
fmtMemory.tymed = TYMED_HGLOBAL; // TODO to add other media
|
||||
|
||||
bool rc = FALSE;
|
||||
bool rc = false;
|
||||
|
||||
HRESULT hr = m_pIDataSource->GetData(&fmtMemory, &stm);
|
||||
if ( SUCCEEDED(hr) ) {
|
||||
@@ -423,7 +423,7 @@ bool wxDropTarget::GetData()
|
||||
|
||||
hr = dataObject->SetData(&fmtMemory, &stm, TRUE);
|
||||
if ( SUCCEEDED(hr) ) {
|
||||
rc = TRUE;
|
||||
rc = true;
|
||||
}
|
||||
else {
|
||||
wxLogApiError(wxT("IDataObject::SetData()"), hr);
|
||||
|
@@ -60,15 +60,15 @@
|
||||
// Implementation
|
||||
// ============================================================================
|
||||
|
||||
// return TRUE if the iid is in the array
|
||||
// return true if the iid is in the array
|
||||
bool IsIidFromList(REFIID riid, const IID *aIids[], size_t nCount)
|
||||
{
|
||||
for ( size_t i = 0; i < nCount; i++ ) {
|
||||
if ( riid == *aIids[i] )
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
#if wxUSE_DATAOBJ
|
||||
|
@@ -143,7 +143,7 @@ bool Uuid::Set(const wxChar *pc)
|
||||
if ( UuidFromString((wxUChar *)pc, &m_uuid) != RPC_S_OK)
|
||||
#endif
|
||||
// failed: probably invalid string
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
// transform it back to string to normalize it
|
||||
#ifdef _UNICODE
|
||||
@@ -155,7 +155,7 @@ bool Uuid::Set(const wxChar *pc)
|
||||
// update m_pszCForm
|
||||
UuidToCForm();
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// stores m_uuid in m_pszCForm in a format required by
|
||||
|
Reference in New Issue
Block a user