X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fbfb8bcc3fa17e079d4219655b173f8ed2ccc65a..9154a136d5e1d79a4be2cf012e4a815fdc6df3ff:/src/generic/gridctrl.cpp diff --git a/src/generic/gridctrl.cpp b/src/generic/gridctrl.cpp index 2fcacdfd84..27c709e3ab 100644 --- a/src/generic/gridctrl.cpp +++ b/src/generic/gridctrl.cpp @@ -17,12 +17,14 @@ #if wxUSE_GRID +#include "wx/generic/gridctrl.h" + #ifndef WX_PRECOMP #include "wx/textctrl.h" #include "wx/dc.h" + #include "wx/combobox.h" #endif // WX_PRECOMP -#include "wx/generic/gridctrl.h" #include "wx/tokenzr.h" // ---------------------------------------------------------------------------- @@ -31,7 +33,7 @@ #if wxUSE_DATETIME -// Enables a grid cell to display a formated date and or time +// Enables a grid cell to display a formatted date and or time wxGridCellDateTimeRenderer::wxGridCellDateTimeRenderer(const wxString& outformat, const wxString& informat) { @@ -390,7 +392,7 @@ wxGridCellAutoWrapStringRenderer::GetBestSize(wxGrid& grid, { width+=10; rect.SetWidth(width); - height = y *( GetTextLines(grid,dc,attr,rect,row,col).GetCount()); + height = y * (wx_truncate_cast(wxCoord, GetTextLines(grid,dc,attr,rect,row,col).GetCount())); count--; // Search for a shape no taller than the golden ratio. } while (count && (width < (height*1.68)) );