diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-06-13 21:50:18 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-06-14 09:56:44 +0100 |
commit | 94cc09fbd030c03eba8b41314cb5bf0356faaad7 (patch) | |
tree | 52caa4d86e2b14f4caf857a2cea62dd876c49f3f /svtools | |
parent | 0f1969d04b9ba24235d577e42a9ab86c44ecfd12 (diff) |
fix assert, title column added twice
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/contnr/fileview.cxx | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx index 09401d9e5387..6a511bdb4e4b 100644 --- a/svtools/source/contnr/fileview.cxx +++ b/svtools/source/contnr/fileview.cxx @@ -732,17 +732,19 @@ ViewTabListBox_Impl::ViewTabListBox_Impl( Window* pParentWin, mpHeaderBar->SetPosSizePixel( Point( 0, 0 ), mpHeaderBar->CalcWindowSizePixel() ); HeaderBarItemBits nBits = ( HIB_LEFT | HIB_VCENTER | HIB_CLICKABLE ); - if ( ( nFlags & FILEVIEW_SHOW_ALL ) == FILEVIEW_SHOW_ALL ) - { - mpHeaderBar->InsertItem( COLUMN_TITLE, String( SvtResId( STR_SVT_FILEVIEW_COLUMN_TITLE ) ), 180, nBits | HIB_UPARROW ); - mpHeaderBar->InsertItem( COLUMN_TYPE, String( SvtResId( STR_SVT_FILEVIEW_COLUMN_TYPE ) ), 140, nBits ); - mpHeaderBar->InsertItem( COLUMN_SIZE, String( SvtResId( STR_SVT_FILEVIEW_COLUMN_SIZE ) ), 80, nBits ); - mpHeaderBar->InsertItem( COLUMN_DATE, String( SvtResId( STR_SVT_FILEVIEW_COLUMN_DATE ) ), 500, nBits ); - } - if( ( nFlags & FILEVIEW_SHOW_NONE ) == FILEVIEW_SHOW_NONE ) + if ((nFlags & FILEVIEW_SHOW_NONE) == FILEVIEW_SHOW_NONE) bViewHeader = false; else - mpHeaderBar->InsertItem( COLUMN_TITLE, String( SvtResId( STR_SVT_FILEVIEW_COLUMN_TITLE ) ), 600, nBits ); + { + if (nFlags & FILEVIEW_SHOW_TITLE) + mpHeaderBar->InsertItem(COLUMN_TITLE, String(SvtResId(STR_SVT_FILEVIEW_COLUMN_TITLE)), 600, nBits | HIB_UPARROW); + if (nFlags & FILEVIEW_SHOW_ALL) + mpHeaderBar->InsertItem(COLUMN_TYPE, String(SvtResId(STR_SVT_FILEVIEW_COLUMN_TYPE)), 140, nBits); + if (nFlags & FILEVIEW_SHOW_SIZE) + mpHeaderBar->InsertItem(COLUMN_SIZE, String(SvtResId(STR_SVT_FILEVIEW_COLUMN_SIZE)), 80, nBits); + if (nFlags & FILEVIEW_SHOW_DATE) + mpHeaderBar->InsertItem(COLUMN_DATE, String(SvtResId(STR_SVT_FILEVIEW_COLUMN_DATE)), 500, nBits); + } Size aHeadSize = mpHeaderBar->GetSizePixel(); SetPosSizePixel( Point( 0, aHeadSize.Height() ), |