[1231183] 'cleanup: mismatched indentation' and other cleanings.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34914 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -612,11 +612,14 @@ wxChar *wxExpandPath(wxChar *buf, const wxChar *name)
|
|||||||
nnm = *s ? s + 1 : s;
|
nnm = *s ? s + 1 : s;
|
||||||
*s = 0;
|
*s = 0;
|
||||||
// FIXME: wxGetUserHome could return temporary storage in Unicode mode
|
// FIXME: wxGetUserHome could return temporary storage in Unicode mode
|
||||||
if ((home = WXSTRINGCAST wxGetUserHome(wxString(nm + 1))) == NULL) {
|
if ((home = WXSTRINGCAST wxGetUserHome(wxString(nm + 1))) == NULL)
|
||||||
|
{
|
||||||
if (was_sep) /* replace only if it was there: */
|
if (was_sep) /* replace only if it was there: */
|
||||||
*s = SEP;
|
*s = SEP;
|
||||||
s = NULL;
|
s = NULL;
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
nm = nnm;
|
nm = nnm;
|
||||||
s = home;
|
s = home;
|
||||||
}
|
}
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
// Author: John Labenski
|
// Author: John Labenski
|
||||||
// Modified by:
|
// Modified by:
|
||||||
// Created: 14.06.03 (extracted from src/*/filedlg.cpp)
|
// Created: 14.06.03 (extracted from src/*/filedlg.cpp)
|
||||||
// RCS-ID:
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) Robert Roebling
|
// Copyright: (c) Robert Roebling
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
@@ -802,7 +802,8 @@ const wxChar *wxSysErrorMsg(unsigned long nErrCode)
|
|||||||
// copy it to our buffer and free memory
|
// copy it to our buffer and free memory
|
||||||
// Crashes on SmartPhone (FIXME)
|
// Crashes on SmartPhone (FIXME)
|
||||||
#if !defined(__SMARTPHONE__) /* of WinCE */
|
#if !defined(__SMARTPHONE__) /* of WinCE */
|
||||||
if( lpMsgBuf != 0 ) {
|
if( lpMsgBuf != 0 )
|
||||||
|
{
|
||||||
wxStrncpy(s_szBuf, (const wxChar *)lpMsgBuf, WXSIZEOF(s_szBuf) - 1);
|
wxStrncpy(s_szBuf, (const wxChar *)lpMsgBuf, WXSIZEOF(s_szBuf) - 1);
|
||||||
s_szBuf[WXSIZEOF(s_szBuf) - 1] = wxT('\0');
|
s_szBuf[WXSIZEOF(s_szBuf) - 1] = wxT('\0');
|
||||||
|
|
||||||
|
@@ -293,10 +293,10 @@ wxAcceleratorEntry *wxGetAccelFromString(const wxString& label)
|
|||||||
keyCode = WXK_WINDOWS_MENU;
|
keyCode = WXK_WINDOWS_MENU;
|
||||||
else if ( current == wxT("COMMAND") )
|
else if ( current == wxT("COMMAND") )
|
||||||
keyCode = WXK_COMMAND;
|
keyCode = WXK_COMMAND;
|
||||||
else if ( current.Left(3) == wxT("KP_") && wxIsdigit(current[3U]) ) {
|
else if ( current.Left(3) == wxT("KP_") && wxIsdigit(current[3U]) )
|
||||||
keyCode = WXK_NUMPAD0 + wxAtoi(current.c_str() + 3); }
|
keyCode = WXK_NUMPAD0 + wxAtoi(current.c_str() + 3);
|
||||||
else if ( current.Left(7) == wxT("SPECIAL") && wxIsdigit(current[7U]) ) {
|
else if ( current.Left(7) == wxT("SPECIAL") && wxIsdigit(current[7U]) )
|
||||||
keyCode = WXK_SPECIAL1 + wxAtoi(current.c_str() + 7) - 1; }
|
keyCode = WXK_SPECIAL1 + wxAtoi(current.c_str() + 7) - 1;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wxLogDebug(wxT("Unrecognized accel key '%s', accel string ignored."),
|
wxLogDebug(wxT("Unrecognized accel key '%s', accel string ignored."),
|
||||||
|
@@ -132,7 +132,7 @@ wxUint32 wxTextInputStream::Read32(int base)
|
|||||||
if(!m_input) return 0;
|
if(!m_input) return 0;
|
||||||
|
|
||||||
wxString word = ReadWord();
|
wxString word = ReadWord();
|
||||||
if(word.IsEmpty())
|
if(word.empty())
|
||||||
return 0;
|
return 0;
|
||||||
return wxStrtoul(word.c_str(), 0, base);
|
return wxStrtoul(word.c_str(), 0, base);
|
||||||
}
|
}
|
||||||
@@ -153,7 +153,7 @@ wxInt32 wxTextInputStream::Read32S(int base)
|
|||||||
if(!m_input) return 0;
|
if(!m_input) return 0;
|
||||||
|
|
||||||
wxString word = ReadWord();
|
wxString word = ReadWord();
|
||||||
if(word.IsEmpty())
|
if(word.empty())
|
||||||
return 0;
|
return 0;
|
||||||
return wxStrtol(word.c_str(), 0, base);
|
return wxStrtol(word.c_str(), 0, base);
|
||||||
}
|
}
|
||||||
@@ -172,7 +172,7 @@ double wxTextInputStream::ReadDouble()
|
|||||||
{
|
{
|
||||||
if(!m_input) return 0;
|
if(!m_input) return 0;
|
||||||
wxString word = ReadWord();
|
wxString word = ReadWord();
|
||||||
if(word.IsEmpty())
|
if(word.empty())
|
||||||
return 0;
|
return 0;
|
||||||
return wxStrtod(word.c_str(), 0);
|
return wxStrtod(word.c_str(), 0);
|
||||||
}
|
}
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
// Author: Kevin Smith
|
// Author: Kevin Smith
|
||||||
// Modified by:
|
// Modified by:
|
||||||
// Created: Jan 22 1999
|
// Created: Jan 22 1999
|
||||||
// RCS-ID:
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) 1999 Kevin Smith
|
// Copyright: (c) 1999 Kevin Smith
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
@@ -339,7 +339,7 @@ bool wxGenericValidator::TransferFromWindow(void)
|
|||||||
if ( !m_validatorWindow )
|
if ( !m_validatorWindow )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// bool controls
|
// BOOL CONTROLS **************************************
|
||||||
#if wxUSE_CHECKBOX
|
#if wxUSE_CHECKBOX
|
||||||
if (m_validatorWindow->IsKindOf(CLASSINFO(wxCheckBox)) )
|
if (m_validatorWindow->IsKindOf(CLASSINFO(wxCheckBox)) )
|
||||||
{
|
{
|
||||||
@@ -362,7 +362,8 @@ bool wxGenericValidator::TransferFromWindow(void)
|
|||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
// int controls
|
|
||||||
|
// INT CONTROLS ***************************************
|
||||||
#if wxUSE_GAUGE
|
#if wxUSE_GAUGE
|
||||||
if (m_validatorWindow->IsKindOf(CLASSINFO(wxGauge)) )
|
if (m_validatorWindow->IsKindOf(CLASSINFO(wxGauge)) )
|
||||||
{
|
{
|
||||||
@@ -429,7 +430,8 @@ bool wxGenericValidator::TransferFromWindow(void)
|
|||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
// string controls
|
|
||||||
|
// STRING CONTROLS ************************************
|
||||||
#if wxUSE_BUTTON
|
#if wxUSE_BUTTON
|
||||||
if (m_validatorWindow->IsKindOf(CLASSINFO(wxButton)) )
|
if (m_validatorWindow->IsKindOf(CLASSINFO(wxButton)) )
|
||||||
{
|
{
|
||||||
@@ -503,7 +505,8 @@ bool wxGenericValidator::TransferFromWindow(void)
|
|||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
// array controls
|
|
||||||
|
// ARRAY CONTROLS *************************************
|
||||||
#if wxUSE_CHECKLISTBOX
|
#if wxUSE_CHECKLISTBOX
|
||||||
// NOTE: wxCheckListBox isa wxListBox, so wxCheckListBox MUST come first:
|
// NOTE: wxCheckListBox isa wxListBox, so wxCheckListBox MUST come first:
|
||||||
if (m_validatorWindow->IsKindOf(CLASSINFO(wxCheckListBox)) )
|
if (m_validatorWindow->IsKindOf(CLASSINFO(wxCheckListBox)) )
|
||||||
@@ -554,6 +557,7 @@ bool wxGenericValidator::TransferFromWindow(void)
|
|||||||
|
|
||||||
// unrecognized control, or bad pointer
|
// unrecognized control, or bad pointer
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1972,7 +1972,6 @@ void wxGridCellFloatRenderer::SetParameters(const wxString& params)
|
|||||||
{
|
{
|
||||||
wxLogDebug(_T("Invalid wxGridCellFloatRenderer width parameter string '%s ignored"), params.c_str());
|
wxLogDebug(_T("Invalid wxGridCellFloatRenderer width parameter string '%s ignored"), params.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
tmp = params.AfterFirst(_T(','));
|
tmp = params.AfterFirst(_T(','));
|
||||||
if ( !tmp.empty() )
|
if ( !tmp.empty() )
|
||||||
@@ -1986,7 +1985,6 @@ void wxGridCellFloatRenderer::SetParameters(const wxString& params)
|
|||||||
{
|
{
|
||||||
wxLogDebug(_T("Invalid wxGridCellFloatRenderer precision parameter string '%s ignored"), params.c_str());
|
wxLogDebug(_T("Invalid wxGridCellFloatRenderer precision parameter string '%s ignored"), params.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -118,8 +118,9 @@ wxSize wxGridCellDateTimeRenderer::GetBestSize(wxGrid& grid,
|
|||||||
return DoGetBestSize(attr, dc, GetString(grid, row, col));
|
return DoGetBestSize(attr, dc, GetString(grid, row, col));
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxGridCellDateTimeRenderer::SetParameters(const wxString& params){
|
void wxGridCellDateTimeRenderer::SetParameters(const wxString& params)
|
||||||
if (!params.IsEmpty())
|
{
|
||||||
|
if (!params.empty())
|
||||||
m_oformat=params;
|
m_oformat=params;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -134,7 +135,7 @@ void wxGridCellDateTimeRenderer::SetParameters(const wxString& params){
|
|||||||
|
|
||||||
wxGridCellEnumRenderer::wxGridCellEnumRenderer(const wxString& choices)
|
wxGridCellEnumRenderer::wxGridCellEnumRenderer(const wxString& choices)
|
||||||
{
|
{
|
||||||
if (!choices.IsEmpty())
|
if (!choices.empty())
|
||||||
SetParameters(choices);
|
SetParameters(choices);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -226,7 +227,7 @@ wxGridCellEnumEditor::wxGridCellEnumEditor(const wxString& choices)
|
|||||||
{
|
{
|
||||||
m_startint = -1;
|
m_startint = -1;
|
||||||
|
|
||||||
if (!choices.IsEmpty())
|
if (!choices.empty())
|
||||||
SetParameters(choices);
|
SetParameters(choices);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -251,7 +252,7 @@ void wxGridCellEnumEditor::BeginEdit(int row, int col, wxGrid* grid)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
wxString startValue = table->GetValue(row, col);
|
wxString startValue = table->GetValue(row, col);
|
||||||
if (startValue.IsNumber() && !startValue.IsEmpty())
|
if (startValue.IsNumber() && !startValue.empty())
|
||||||
{
|
{
|
||||||
startValue.ToLong(&m_startint);
|
startValue.ToLong(&m_startint);
|
||||||
}
|
}
|
||||||
@@ -356,15 +357,17 @@ wxGridCellAutoWrapStringRenderer::GetTextLines(wxGrid& grid,
|
|||||||
tok += _T(" ");
|
tok += _T(" ");
|
||||||
|
|
||||||
dc.GetTextExtent(tok, &x, &y);
|
dc.GetTextExtent(tok, &x, &y);
|
||||||
if ( curr_x + x > max_x) {
|
if ( curr_x + x > max_x)
|
||||||
|
{
|
||||||
lines.Add( wxString(thisline) );
|
lines.Add( wxString(thisline) );
|
||||||
thisline = tok;
|
thisline = tok;
|
||||||
curr_x=x;
|
curr_x=x;
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
thisline+= tok;
|
thisline+= tok;
|
||||||
curr_x += x;
|
curr_x += x;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
//Add last line
|
//Add last line
|
||||||
lines.Add( wxString(thisline) );
|
lines.Add( wxString(thisline) );
|
||||||
|
Reference in New Issue
Block a user