eVC4 warning fixes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36097 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: wxchar.cpp
|
// Name: src/common/wxchar.cpp
|
||||||
// Purpose: wxChar implementation
|
// Purpose: wxChar implementation
|
||||||
// Author: Ove K<>ven
|
// Author: Ove K<>ven
|
||||||
// Modified by: Ron Lee
|
// Modified by: Ron Lee
|
||||||
@@ -1090,7 +1090,7 @@ WXDLLEXPORT size_t wxMbstowcs (wchar_t * out, const char * in, size_t outlen)
|
|||||||
return in - origin;
|
return in - origin;
|
||||||
}
|
}
|
||||||
|
|
||||||
WXDLLEXPORT size_t wxWcstombs (char * out, const wchar_t * in, size_t outlen)
|
WXDLLEXPORT size_t wxWcstombs (char * out, const wchar_t * in, size_t outlen)
|
||||||
{
|
{
|
||||||
if (!out)
|
if (!out)
|
||||||
{
|
{
|
||||||
@@ -1447,8 +1447,8 @@ double WXDLLEXPORT wxAtof(const wxChar *psz)
|
|||||||
wxString str(psz);
|
wxString str(psz);
|
||||||
if (str.ToDouble(& d))
|
if (str.ToDouble(& d))
|
||||||
return d;
|
return d;
|
||||||
else
|
|
||||||
return 0.0;
|
return 0.0;
|
||||||
#else
|
#else
|
||||||
return atof(wxConvLibc.cWX2MB(psz));
|
return atof(wxConvLibc.cWX2MB(psz));
|
||||||
#endif
|
#endif
|
||||||
|
@@ -1757,7 +1757,7 @@ bool wxDC::DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) con
|
|||||||
static int maxWidth = -1;
|
static int maxWidth = -1;
|
||||||
int fit = 0;
|
int fit = 0;
|
||||||
SIZE sz = {0,0};
|
SIZE sz = {0,0};
|
||||||
int stlen = text.Length();
|
int stlen = text.length();
|
||||||
|
|
||||||
if (maxLenText == -1)
|
if (maxLenText == -1)
|
||||||
{
|
{
|
||||||
@@ -2539,6 +2539,8 @@ static bool AlphaBlt(HDC hdcDst,
|
|||||||
|
|
||||||
wxLogLastError(_T("AlphaBlend"));
|
wxLogLastError(_T("AlphaBlend"));
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
wxUnusedVar(hdcSrc);
|
||||||
#endif // defined(AC_SRC_OVER)
|
#endif // defined(AC_SRC_OVER)
|
||||||
|
|
||||||
// AlphaBlend() unavailable of failed: use our own (probably much slower)
|
// AlphaBlend() unavailable of failed: use our own (probably much slower)
|
||||||
|
@@ -1125,8 +1125,8 @@ bool wxCheckWindowWndProc(WXHWND hWnd,
|
|||||||
str == wxMDIChildFrameClassNameNoRedraw ||
|
str == wxMDIChildFrameClassNameNoRedraw ||
|
||||||
str == _T("wxTLWHiddenParent"))
|
str == _T("wxTLWHiddenParent"))
|
||||||
return true; // Effectively means don't subclass
|
return true; // Effectively means don't subclass
|
||||||
else
|
|
||||||
return false;
|
return false;
|
||||||
#else
|
#else
|
||||||
WNDCLASS cls;
|
WNDCLASS cls;
|
||||||
if ( !::GetClassInfo(wxGetInstance(), wxGetWindowClass(hWnd), &cls) )
|
if ( !::GetClassInfo(wxGetInstance(), wxGetWindowClass(hWnd), &cls) )
|
||||||
|
@@ -222,19 +222,19 @@ void wxRichTextCtrl::OnPaint(wxPaintEvent& WXUNUSED(event))
|
|||||||
{
|
{
|
||||||
wxBufferedPaintDC dc(this, m_bufferBitmap);
|
wxBufferedPaintDC dc(this, m_bufferBitmap);
|
||||||
//wxLogDebug(wxT("OnPaint"));
|
//wxLogDebug(wxT("OnPaint"));
|
||||||
|
|
||||||
PrepareDC(dc);
|
PrepareDC(dc);
|
||||||
|
|
||||||
if (m_freezeCount > 0)
|
if (m_freezeCount > 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
dc.SetFont(GetFont());
|
dc.SetFont(GetFont());
|
||||||
|
|
||||||
// Paint the background
|
// Paint the background
|
||||||
PaintBackground(dc);
|
PaintBackground(dc);
|
||||||
|
|
||||||
wxRegion dirtyRegion = GetUpdateRegion();
|
wxRegion dirtyRegion = GetUpdateRegion();
|
||||||
|
|
||||||
wxRect drawingArea(GetLogicalPoint(wxPoint(0, 0)), GetClientSize());
|
wxRect drawingArea(GetLogicalPoint(wxPoint(0, 0)), GetClientSize());
|
||||||
wxRect availableSpace(GetClientSize());
|
wxRect availableSpace(GetClientSize());
|
||||||
if (GetBuffer().GetDirty())
|
if (GetBuffer().GetDirty())
|
||||||
@@ -243,7 +243,7 @@ void wxRichTextCtrl::OnPaint(wxPaintEvent& WXUNUSED(event))
|
|||||||
GetBuffer().SetDirty(false);
|
GetBuffer().SetDirty(false);
|
||||||
SetupScrollbars();
|
SetupScrollbars();
|
||||||
}
|
}
|
||||||
|
|
||||||
GetBuffer().Draw(dc, GetBuffer().GetRange(), GetSelectionRange(), drawingArea, 0 /* descent */, 0 /* flags */);
|
GetBuffer().Draw(dc, GetBuffer().GetRange(), GetSelectionRange(), drawingArea, 0 /* descent */, 0 /* flags */);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1057,8 +1057,8 @@ bool wxRichTextCtrl::MoveDown(int noLines, int flags)
|
|||||||
Refresh(false);
|
Refresh(false);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Move to the end of the paragraph
|
/// Move to the end of the paragraph
|
||||||
@@ -1618,14 +1618,20 @@ wxRichTextCtrl::HitTest(const wxPoint& pt,
|
|||||||
((wxRichTextCtrl*)this)->PrepareDC(dc);
|
((wxRichTextCtrl*)this)->PrepareDC(dc);
|
||||||
|
|
||||||
int hit = ((wxRichTextCtrl*)this)->GetBuffer().HitTest(dc, pt, *pos);
|
int hit = ((wxRichTextCtrl*)this)->GetBuffer().HitTest(dc, pt, *pos);
|
||||||
if (hit == wxRICHTEXT_HITTEST_BEFORE)
|
|
||||||
return wxTE_HT_BEFORE;
|
switch ( hit )
|
||||||
else if (hit == wxRICHTEXT_HITTEST_AFTER)
|
{
|
||||||
return wxTE_HT_BEYOND;
|
case wxRICHTEXT_HITTEST_BEFORE:
|
||||||
else if (hit == wxRICHTEXT_HITTEST_ON)
|
return wxTE_HT_BEFORE;
|
||||||
return wxTE_HT_ON_TEXT;
|
|
||||||
else
|
case wxRICHTEXT_HITTEST_AFTER:
|
||||||
return wxTE_HT_UNKNOWN;
|
return wxTE_HT_BEYOND;
|
||||||
|
|
||||||
|
case wxRICHTEXT_HITTEST_ON:
|
||||||
|
return wxTE_HT_ON_TEXT;
|
||||||
|
}
|
||||||
|
|
||||||
|
return wxTE_HT_UNKNOWN;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -1695,8 +1701,8 @@ bool wxRichTextCtrl::WriteImage(const wxImage& image, int bitmapType)
|
|||||||
wxImage image2 = image;
|
wxImage image2 = image;
|
||||||
if (imageBlock.MakeImageBlock(image2, bitmapType))
|
if (imageBlock.MakeImageBlock(image2, bitmapType))
|
||||||
return WriteImage(imageBlock);
|
return WriteImage(imageBlock);
|
||||||
else
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxRichTextCtrl::WriteImage(const wxString& filename, int bitmapType)
|
bool wxRichTextCtrl::WriteImage(const wxString& filename, int bitmapType)
|
||||||
@@ -1706,8 +1712,8 @@ bool wxRichTextCtrl::WriteImage(const wxString& filename, int bitmapType)
|
|||||||
wxImage image;
|
wxImage image;
|
||||||
if (imageBlock.MakeImageBlock(filename, bitmapType, image, false))
|
if (imageBlock.MakeImageBlock(filename, bitmapType, image, false))
|
||||||
return WriteImage(imageBlock);
|
return WriteImage(imageBlock);
|
||||||
else
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxRichTextCtrl::WriteImage(const wxRichTextImageBlock& imageBlock)
|
bool wxRichTextCtrl::WriteImage(const wxRichTextImageBlock& imageBlock)
|
||||||
@@ -1724,9 +1730,8 @@ bool wxRichTextCtrl::WriteImage(const wxBitmap& bitmap, int bitmapType)
|
|||||||
wxImage image = bitmap.ConvertToImage();
|
wxImage image = bitmap.ConvertToImage();
|
||||||
if (image.Ok() && imageBlock.MakeImageBlock(image, bitmapType))
|
if (image.Ok() && imageBlock.MakeImageBlock(image, bitmapType))
|
||||||
return WriteImage(imageBlock);
|
return WriteImage(imageBlock);
|
||||||
else
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2254,8 +2259,8 @@ bool wxRichTextCtrl::GetCaretPositionForIndex(long position, wxRect& rect)
|
|||||||
rect = wxRect(pt, wxSize(wxRICHTEXT_DEFAULT_CARET_WIDTH, height));
|
rect = wxRect(pt, wxSize(wxRICHTEXT_DEFAULT_CARET_WIDTH, height));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Gets the line for the visible caret position. If the caret is
|
/// Gets the line for the visible caret position. If the caret is
|
||||||
@@ -2316,17 +2321,17 @@ bool wxRichTextCtrl::LayoutContent(bool onlyVisibleRect)
|
|||||||
flags |= wxRICHTEXT_LAYOUT_SPECIFIED_RECT;
|
flags |= wxRICHTEXT_LAYOUT_SPECIFIED_RECT;
|
||||||
availableSpace.SetPosition(GetLogicalPoint(wxPoint(0, 0)));
|
availableSpace.SetPosition(GetLogicalPoint(wxPoint(0, 0)));
|
||||||
}
|
}
|
||||||
|
|
||||||
wxClientDC dc(this);
|
wxClientDC dc(this);
|
||||||
dc.SetFont(GetFont());
|
dc.SetFont(GetFont());
|
||||||
|
|
||||||
PrepareDC(dc);
|
PrepareDC(dc);
|
||||||
|
|
||||||
GetBuffer().Defragment();
|
GetBuffer().Defragment();
|
||||||
GetBuffer().UpdateRanges(); // If items were deleted, ranges need recalculation
|
GetBuffer().UpdateRanges(); // If items were deleted, ranges need recalculation
|
||||||
GetBuffer().Layout(dc, availableSpace, flags);
|
GetBuffer().Layout(dc, availableSpace, flags);
|
||||||
GetBuffer().SetDirty(false);
|
GetBuffer().SetDirty(false);
|
||||||
|
|
||||||
if (!IsFrozen())
|
if (!IsFrozen())
|
||||||
SetupScrollbars();
|
SetupScrollbars();
|
||||||
}
|
}
|
||||||
@@ -2505,8 +2510,8 @@ bool wxRichTextCtrl::SetDefaultStyleToCursorStyle()
|
|||||||
SetDefaultStyle(attr);
|
SetDefaultStyle(attr);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the first visible position in the current view
|
/// Returns the first visible position in the current view
|
||||||
|
Reference in New Issue
Block a user