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:
Włodzimierz Skiba
2004-08-16 12:45:46 +00:00
parent a29b55cdf6
commit 0a0e6a5baf
14 changed files with 1007 additions and 1007 deletions

View File

@@ -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_

View File

@@ -37,58 +37,58 @@ public:
wxAutomationObject(WXIDISPATCH* dispatchPtr = NULL);
~wxAutomationObject();
// Set/get dispatch pointer
// Set/get dispatch pointer
inline void SetDispatchPtr(WXIDISPATCH* dispatchPtr) { m_dispatchPtr = dispatchPtr; };
inline WXIDISPATCH* GetDispatchPtr() const { return m_dispatchPtr; }
// Get a dispatch pointer from the current object associated
// with a class id, such as "Excel.Application"
bool GetInstance(const wxString& classId) const;
// Get a dispatch pointer from the current object associated
// with a class id, such as "Excel.Application"
bool GetInstance(const wxString& classId) const;
// Get a dispatch pointer from a new instance of the the class
bool CreateInstance(const wxString& classId) const;
// Get a dispatch pointer from a new instance of the the class
bool CreateInstance(const wxString& classId) const;
// Low-level invocation function. Pass either an array of variants,
// or an array of pointers to variants.
// Low-level invocation function. Pass either an array of variants,
// or an array of pointers to variants.
bool Invoke(const wxString& member, int action,
wxVariant& retValue, int noArgs, wxVariant args[], const wxVariant* ptrArgs[] = 0) const;
// Invoke a member function
wxVariant CallMethod(const wxString& method, int noArgs, wxVariant args[]);
wxVariant CallMethodArray(const wxString& method, int noArgs, const wxVariant **args);
// Invoke a member function
wxVariant CallMethod(const wxString& method, int noArgs, wxVariant args[]);
wxVariant CallMethodArray(const wxString& method, int noArgs, const wxVariant **args);
// Convenience function
wxVariant CallMethod(const wxString& method,
const wxVariant& arg1 = wxNullVariant, const wxVariant& arg2 = wxNullVariant,
const wxVariant& arg3 = wxNullVariant, const wxVariant& arg4 = wxNullVariant,
const wxVariant& arg5 = wxNullVariant, const wxVariant& arg6 = wxNullVariant);
// Convenience function
wxVariant CallMethod(const wxString& method,
const wxVariant& arg1 = wxNullVariant, const wxVariant& arg2 = wxNullVariant,
const wxVariant& arg3 = wxNullVariant, const wxVariant& arg4 = wxNullVariant,
const wxVariant& arg5 = wxNullVariant, const wxVariant& arg6 = wxNullVariant);
// Get/Put property
// Get/Put property
wxVariant GetProperty(const wxString& property, int noArgs = 0, wxVariant args[] = (wxVariant*) NULL) const;
wxVariant GetPropertyArray(const wxString& property, int noArgs, const wxVariant **args) const;
wxVariant GetProperty(const wxString& property,
const wxVariant& arg1, const wxVariant& arg2 = wxNullVariant,
const wxVariant& arg3 = wxNullVariant, const wxVariant& arg4 = wxNullVariant,
const wxVariant& arg5 = wxNullVariant, const wxVariant& arg6 = wxNullVariant);
wxVariant GetPropertyArray(const wxString& property, int noArgs, const wxVariant **args) const;
wxVariant GetProperty(const wxString& property,
const wxVariant& arg1, const wxVariant& arg2 = wxNullVariant,
const wxVariant& arg3 = wxNullVariant, const wxVariant& arg4 = wxNullVariant,
const wxVariant& arg5 = wxNullVariant, const wxVariant& arg6 = wxNullVariant);
bool PutPropertyArray(const wxString& property, int noArgs, const wxVariant **args);
bool PutProperty(const wxString& property, int noArgs, wxVariant args[]) ;
bool PutProperty(const wxString& property,
const wxVariant& arg1, const wxVariant& arg2 = wxNullVariant,
const wxVariant& arg3 = wxNullVariant, const wxVariant& arg4 = wxNullVariant,
const wxVariant& arg5 = wxNullVariant, const wxVariant& arg6 = wxNullVariant);
bool PutProperty(const wxString& property,
const wxVariant& arg1, const wxVariant& arg2 = wxNullVariant,
const wxVariant& arg3 = wxNullVariant, const wxVariant& arg4 = wxNullVariant,
const wxVariant& arg5 = wxNullVariant, const wxVariant& arg6 = wxNullVariant);
// Uses DISPATCH_PROPERTYGET
// and returns a dispatch pointer. The calling code should call Release
// on the pointer, though this could be implicit by constructing an wxAutomationObject
// with it and letting the destructor call Release.
// Uses DISPATCH_PROPERTYGET
// and returns a dispatch pointer. The calling code should call Release
// on the pointer, though this could be implicit by constructing an wxAutomationObject
// with it and letting the destructor call Release.
WXIDISPATCH* GetDispatchProperty(const wxString& property, int noArgs, wxVariant args[]) const;
WXIDISPATCH* GetDispatchProperty(const wxString& property, int noArgs, const wxVariant **args) const;
// A way of initialising another wxAutomationObject with a dispatch object,
// without having to deal with nasty IDispatch pointers.
bool GetObject(wxAutomationObject& obj, const wxString& property, int noArgs = 0, wxVariant args[] = (wxVariant*) NULL) const;
bool GetObject(wxAutomationObject& obj, const wxString& property, int noArgs, const wxVariant **args) const;
// A way of initialising another wxAutomationObject with a dispatch object,
// without having to deal with nasty IDispatch pointers.
bool GetObject(wxAutomationObject& obj, const wxString& property, int noArgs = 0, wxVariant args[] = (wxVariant*) NULL) const;
bool GetObject(wxAutomationObject& obj, const wxString& property, int noArgs, const wxVariant **args) const;
public:
WXIDISPATCH* m_dispatchPtr;

View File

@@ -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:

View File

@@ -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); }

View File

@@ -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

View File

@@ -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

View File

@@ -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);
// ============================================================================

View File

@@ -408,8 +408,8 @@ STDMETHODIMP wxIAccessible::accHitTest(long xLeft, long yLeft, VARIANT* pVarID)
if (!childIA)
return E_NOTIMPL;
if (childIA->QueryInterface(IID_IDispatch, (LPVOID*) & pVarID->pdispVal) != S_OK)
return E_FAIL;
if (childIA->QueryInterface(IID_IDispatch, (LPVOID*) & pVarID->pdispVal) != S_OK)
return E_FAIL;
pVarID->vt = VT_DISPATCH;
return S_OK;
@@ -607,11 +607,11 @@ STDMETHODIMP wxIAccessible::accNavigate ( long navDir, VARIANT varStart, VARIANT
return E_FAIL;
}
HRESULT hResult = objectIA->QueryInterface(IID_IDispatch, (LPVOID*) & pVarEnd->pdispVal);
HRESULT hResult = objectIA->QueryInterface(IID_IDispatch, (LPVOID*) & pVarEnd->pdispVal);
if (hResult != S_OK)
{
wxLogTrace(wxT("access"), wxT("QueryInterface failed"));
return E_FAIL;
return E_FAIL;
}
wxLogTrace(wxT("access"), wxT("Called QueryInterface for Navigate"));
@@ -689,10 +689,10 @@ STDMETHODIMP wxIAccessible::get_accChild ( VARIANT varChildID, IDispatch** ppDis
if (!objectIA)
return E_NOTIMPL;
if (objectIA->QueryInterface(IID_IDispatch, (LPVOID*) ppDispChild) != S_OK)
if (objectIA->QueryInterface(IID_IDispatch, (LPVOID*) ppDispChild) != S_OK)
{
wxLogTrace(wxT("access"), wxT("QueryInterface failed in get_accChild"));
return E_FAIL;
return E_FAIL;
}
return S_OK;
@@ -793,10 +793,10 @@ STDMETHODIMP wxIAccessible::get_accParent ( IDispatch** ppDispParent)
return E_FAIL;
wxLogTrace(wxT("access"), wxT("About to call QueryInterface"));
if (objectIA->QueryInterface(IID_IDispatch, (LPVOID*) ppDispParent) != S_OK)
if (objectIA->QueryInterface(IID_IDispatch, (LPVOID*) ppDispParent) != S_OK)
{
wxLogTrace(wxT("access"), wxT("Failed QueryInterface"));
return E_FAIL;
return E_FAIL;
}
wxLogTrace(wxT("access"), wxT("Returning S_OK for get_accParent"));
@@ -1446,8 +1446,8 @@ STDMETHODIMP wxIAccessible::get_accFocus ( VARIANT* pVarID)
if (!childIA)
return E_NOTIMPL;
if (childIA->QueryInterface(IID_IDispatch, (LPVOID*) & pVarID->pdispVal) != S_OK)
return E_FAIL;
if (childIA->QueryInterface(IID_IDispatch, (LPVOID*) & pVarID->pdispVal) != S_OK)
return E_FAIL;
pVarID->vt = VT_DISPATCH;
return S_OK;
@@ -1514,8 +1514,8 @@ STDMETHODIMP wxIAccessible::get_accSelection ( VARIANT * pVarChildren)
if (!childIA)
return E_NOTIMPL;
if (childIA->QueryInterface(IID_IDispatch, (LPVOID*) & pVarChildren->pdispVal) != S_OK)
return E_FAIL;
if (childIA->QueryInterface(IID_IDispatch, (LPVOID*) & pVarChildren->pdispVal) != S_OK)
return E_FAIL;
pVarChildren->vt = VT_DISPATCH;

File diff suppressed because it is too large Load Diff

View File

@@ -241,11 +241,11 @@ bool wxDropSource::GiveFeedback(wxDragResult effect)
{
::SetCursor((HCURSOR)cursor.GetHCURSOR());
return TRUE;
return true;
}
else
{
return FALSE;
return false;
}
}

View File

@@ -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);

View File

@@ -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

View File

@@ -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