diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-02-23 23:53:07 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-02-24 20:49:55 +0000 |
commit | 5fb036a638c2436d085b65ae32076c9209a7ffb7 (patch) | |
tree | 194760f2408c6ca8bd386d9463633b73e7a2d91a /sc | |
parent | ff3278cdc8a7a89c734885f57f60d01dbdf020e2 (diff) |
make ScCsvGrid robust against early show before valid column limit set
Change-Id: I36741d9b5826900f88451ffdbe07c44e39f381b4
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/dbgui/csvgrid.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sc/source/ui/dbgui/csvgrid.cxx b/sc/source/ui/dbgui/csvgrid.cxx index 532107db8aff..6da66eb86d05 100644 --- a/sc/source/ui/dbgui/csvgrid.cxx +++ b/sc/source/ui/dbgui/csvgrid.cxx @@ -1216,6 +1216,8 @@ void ScCsvGrid::ImplDrawBackgrDev() Point( GetFirstX() + 1, 0 ), Size( GetWidth() - GetHdrWidth(), GetHeight() ) ) ); sal_uInt32 nLastCol = GetLastVisColumn(); + if (nLastCol == CSV_COLUMN_INVALID) + return; for( sal_uInt32 nColIx = GetFirstVisColumn(); nColIx <= nLastCol; ++nColIx ) ImplDrawColumnBackgr( nColIx ); @@ -1259,6 +1261,8 @@ void ScCsvGrid::ImplDrawGridDev() { maGridDev.DrawOutDev( Point(), maWinSize, Point(), maWinSize, maBackgrDev ); sal_uInt32 nLastCol = GetLastVisColumn(); + if (nLastCol == CSV_COLUMN_INVALID) + return; for( sal_uInt32 nColIx = GetFirstVisColumn(); nColIx <= nLastCol; ++nColIx ) ImplDrawColumnSelection( nColIx ); } |