summaryrefslogtreecommitdiff
path: root/sc/source/ui/miscdlgs
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-04-09 10:40:16 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-04-09 13:15:24 +0100
commit78417f42a4b71729f324ca09e341ee24d9d4baaa (patch)
tree5979fe0998c22e48e78f59169e4967ee96715fc9 /sc/source/ui/miscdlgs
parent2705fc72df2058332773b5cb04a6b4d207f5e39c (diff)
adapt code for select range .ui conversion
Change-Id: Ib53b42a340da04276ce005efb22d19fda617e29a
Diffstat (limited to 'sc/source/ui/miscdlgs')
-rw-r--r--sc/source/ui/miscdlgs/lbseldlg.cxx44
1 files changed, 11 insertions, 33 deletions
diff --git a/sc/source/ui/miscdlgs/lbseldlg.cxx b/sc/source/ui/miscdlgs/lbseldlg.cxx
index 5d22ce9c32cf..1708b2d44db4 100644
--- a/sc/source/ui/miscdlgs/lbseldlg.cxx
+++ b/sc/source/ui/miscdlgs/lbseldlg.cxx
@@ -30,43 +30,29 @@
#include "scresid.hxx"
#include "miscdlgs.hrc"
-
//==================================================================
-ScSelEntryDlg::ScSelEntryDlg( Window* pParent,
- sal_uInt16 nResId,
- const String& aTitle,
- const String& aLbTitle,
- const std::vector<String> &rEntryList ) :
- ModalDialog ( pParent, ScResId( nResId ) ),
- //
- aFlLbTitle ( this, ScResId( FL_ENTRYLIST ) ),
- aLb ( this, ScResId( LB_ENTRYLIST ) ),
- aBtnOk ( this, ScResId( BTN_OK ) ),
- aBtnCancel ( this, ScResId( BTN_CANCEL ) ),
- aBtnHelp ( this, ScResId( BTN_HELP ) )
+ScSelEntryDlg::ScSelEntryDlg(Window* pParent, const std::vector<String> &rEntryList)
+ : ModalDialog(pParent, "SelectRangeDialog", "modules/scalc/ui/selectrange.ui")
{
- SetText( aTitle );
- aFlLbTitle.SetText( aLbTitle );
- aLb.Clear();
- aLb.SetDoubleClickHdl( LINK( this, ScSelEntryDlg, DblClkHdl ) );
+ get(m_pLb, "treeview");
+ m_pLb->SetDropDownLineCount(8);
+ m_pLb->set_width_request(m_pLb->approximate_char_width() * 32);
+ m_pLb->SetDoubleClickHdl( LINK( this, ScSelEntryDlg, DblClkHdl ) );
std::vector<String>::const_iterator pIter;
for ( pIter = rEntryList.begin(); pIter != rEntryList.end(); ++pIter )
- aLb.InsertEntry(*pIter);
-
- if ( aLb.GetEntryCount() > 0 )
- aLb.SelectEntryPos( 0 );
+ m_pLb->InsertEntry(*pIter);
- //-------------
- FreeResource();
+ if ( m_pLb->GetEntryCount() > 0 )
+ m_pLb->SelectEntryPos( 0 );
}
//------------------------------------------------------------------------
-String ScSelEntryDlg::GetSelectEntry() const
+OUString ScSelEntryDlg::GetSelectEntry() const
{
- return aLb.GetSelectEntry();
+ return m_pLb->GetSelectEntry();
}
//------------------------------------------------------------------------
@@ -78,12 +64,4 @@ IMPL_LINK_NOARG_INLINE_START(ScSelEntryDlg, DblClkHdl)
}
IMPL_LINK_NOARG_INLINE_END(ScSelEntryDlg, DblClkHdl)
-//------------------------------------------------------------------------
-
-ScSelEntryDlg::~ScSelEntryDlg()
-{
-}
-
-
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */