diff options
-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 ); } |