diff options
author | Daniel Rentz <dr@openoffice.org> | 2002-05-22 06:23:28 +0000 |
---|---|---|
committer | Daniel Rentz <dr@openoffice.org> | 2002-05-22 06:23:28 +0000 |
commit | 604d08a00095e5cf81515b9a527bb0a29649bbeb (patch) | |
tree | d683cd94ad163a7e20f5f95721f1f06de6114410 /sc/source/ui/miscdlgs/shtabdlg.cxx | |
parent | 7f86daa43d46c658f8cd2f21ea7debbedaea8a81 (diff) |
#99369# New dialog 'Select Sheets'
Diffstat (limited to 'sc/source/ui/miscdlgs/shtabdlg.cxx')
-rw-r--r-- | sc/source/ui/miscdlgs/shtabdlg.cxx | 40 |
1 files changed, 27 insertions, 13 deletions
diff --git a/sc/source/ui/miscdlgs/shtabdlg.cxx b/sc/source/ui/miscdlgs/shtabdlg.cxx index a8687a838e1a..560ae1d35a00 100644 --- a/sc/source/ui/miscdlgs/shtabdlg.cxx +++ b/sc/source/ui/miscdlgs/shtabdlg.cxx @@ -2,9 +2,9 @@ * * $RCSfile: shtabdlg.cxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 16:45:03 $ + * last change: $Author: dr $ $Date: 2002-05-22 07:20:39 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -76,7 +76,7 @@ //================================================================== -ScShowTabDlg::ScShowTabDlg( Window* pParent, List& aEntryList ) : +ScShowTabDlg::ScShowTabDlg( Window* pParent ) : ModalDialog ( pParent, ScResId( RID_SCDLG_SHOW_TAB ) ), aLb ( this, ScResId( LB_ENTRYLIST ) ), aBtnOk ( this, ScResId( BTN_OK ) ), @@ -87,22 +87,31 @@ ScShowTabDlg::ScShowTabDlg( Window* pParent, List& aEntryList ) : aLb.Clear(); aLb.SetDoubleClickHdl( LINK( this, ScShowTabDlg, DblClkHdl ) ); - void* pListEntry = aEntryList.First(); - while ( pListEntry ) - { - aLb.InsertEntry( *((String*)pListEntry ) ); - pListEntry = aEntryList.Next(); - } - - if ( aLb.GetEntryCount() > 0 ) - aLb.SelectEntryPos( 0 ); - //------------- FreeResource(); } //------------------------------------------------------------------------ +void ScShowTabDlg::SetDescription( + const String& rTitle, const String& rFixedText, + ULONG nDlgHelpId, ULONG nLbHelpId ) +{ + SetText( rTitle ); + aFtLbTitle.SetText( rFixedText ); + SetHelpId( nDlgHelpId ); + aLb.SetHelpId( nLbHelpId ); +} + +void ScShowTabDlg::Insert( const String& rString, BOOL bSelected ) +{ + aLb.InsertEntry( rString ); + if( bSelected ) + aLb.SelectEntryPos( aLb.GetEntryCount() - 1 ); +} + +//------------------------------------------------------------------------ + USHORT ScShowTabDlg::GetSelectEntryCount() const { return aLb.GetSelectEntryCount(); @@ -113,6 +122,11 @@ String ScShowTabDlg::GetSelectEntry(USHORT nPos) const return aLb.GetSelectEntry(nPos); } +USHORT ScShowTabDlg::GetSelectEntryPos(USHORT nPos) const +{ + return aLb.GetSelectEntryPos(nPos); +} + //------------------------------------------------------------------------ IMPL_LINK_INLINE_START( ScShowTabDlg, DblClkHdl, void *, EMPTYARG ) |