From 4cc5ccef4bccc779f6286ac369b00dfd42ca9cdb Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 24 Oct 2012 14:10:20 +0100 Subject: convert index dialog to .ui Change-Id: I4b16cb517dca25f862b9dd612785dae4d0f21793 --- vcl/source/control/combobox.cxx | 2 +- vcl/source/control/ilstbox.cxx | 3 ++- vcl/source/control/lstbox.cxx | 2 +- vcl/source/window/builder.cxx | 4 ++-- 4 files changed, 6 insertions(+), 5 deletions(-) (limited to 'vcl/source') diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx index 9d04b7a2e30f..6dae2238da12 100644 --- a/vcl/source/control/combobox.cxx +++ b/vcl/source/control/combobox.cxx @@ -544,7 +544,7 @@ void ComboBox::EnableAutoSize( sal_Bool bAuto ) if ( mpFloatWin ) { if ( bAuto && !mpFloatWin->GetDropDownLineCount() ) - mpFloatWin->SetDropDownLineCount( 5 ); + mpFloatWin->SetDropDownLineCount( 16 ); else if ( !bAuto ) mpFloatWin->SetDropDownLineCount( 0 ); } diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx index 714f0db66e7b..23199fa39b2a 100644 --- a/vcl/source/control/ilstbox.cxx +++ b/vcl/source/control/ilstbox.cxx @@ -3229,7 +3229,7 @@ Size ImplListBoxFloatingWindow::CalcFloatSize() // Minimale Hoehe, falls Hoehe nicht auf Float-Hoehe eingestellt wurde. // Der Parent vom FloatWin muss die DropDown-Combo/Listbox sein. Size aParentSz = GetParent()->GetSizePixel(); - if( !mnDDLineCount && ( aFloatSz.Height() < aParentSz.Height() ) ) + if( (!mnDDLineCount || !nLines) && ( aFloatSz.Height() < aParentSz.Height() ) ) aFloatSz.Height() = aParentSz.Height(); // Nicht schmaler als der Parent werden... @@ -3254,6 +3254,7 @@ Size ImplListBoxFloatingWindow::CalcFloatSize() long nSBWidth = GetSettings().GetStyleSettings().GetScrollBarSize(); aFloatSz.Height() += nSBWidth; } + return aFloatSz; } diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx index 5dbef4aeefce..e7ed3cf0c0f8 100644 --- a/vcl/source/control/lstbox.cxx +++ b/vcl/source/control/lstbox.cxx @@ -618,7 +618,7 @@ void ListBox::EnableAutoSize( sal_Bool bAuto ) if ( mpFloatWin ) { if ( bAuto && !mpFloatWin->GetDropDownLineCount() ) - mpFloatWin->SetDropDownLineCount( 5 ); + mpFloatWin->SetDropDownLineCount( 16 ); else if ( !bAuto ) mpFloatWin->SetDropDownLineCount( 0 ); } diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index efd1d1631731..51e6fcb74fe7 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -701,7 +701,7 @@ Window *VclBuilder::makeObject(Window *pParent, const OString &name, const OStri { extractModel(id, rMap); ListBox *pListBox = new ListBox(pParent, WB_LEFT|WB_DROPDOWN|WB_VCENTER|WB_3DLOOK); - pListBox->SetBestDropDownLineCount(); + pListBox->EnableAutoSize(true); pWindow = pListBox; } else if (name == "GtkComboBoxText") @@ -710,7 +710,7 @@ Window *VclBuilder::makeObject(Window *pParent, const OString &name, const OStri if (extractEntry(rMap)) { ComboBox* pComboBox = new ComboBox(pParent, WB_LEFT|WB_DROPDOWN|WB_VCENTER|WB_3DLOOK); - pComboBox->SetBestDropDownLineCount(); + pComboBox->EnableAutoSize(true); pWindow = pComboBox; } else -- cgit