sc/source/ui/dbgui/csvgrid.cxx |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit 5fb036a638c2436d085b65ae32076c9209a7ffb7
Author: Caolán McNamara <caol...@redhat.com>
Date:   Sat Feb 23 23:53:07 2013 +0000

    make ScCsvGrid robust against early show before valid column limit set
    
    Change-Id: I36741d9b5826900f88451ffdbe07c44e39f381b4

diff --git a/sc/source/ui/dbgui/csvgrid.cxx b/sc/source/ui/dbgui/csvgrid.cxx
index 532107d..6da66eb 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 );
 }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to