summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/tabledesign
diff options
context:
space:
mode:
Diffstat (limited to 'dbaccess/source/ui/tabledesign')
-rw-r--r--dbaccess/source/ui/tabledesign/TEditControl.cxx23
1 files changed, 12 insertions, 11 deletions
diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx
index 76300c5d21eb..a17cf27bdf76 100644
--- a/dbaccess/source/ui/tabledesign/TEditControl.cxx
+++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx
@@ -209,7 +209,6 @@ void OTableEditorCtrl::InitCellController()
// Cell type
pTypeCell = VclPtr<ListBoxControl>::Create( &GetDataWindow() );
- pTypeCell->SetDropDownLineCount( 15 );
// Cell description
pDescrCell = VclPtr<Edit>::Create( &GetDataWindow(), WB_LEFT );
@@ -241,7 +240,7 @@ void OTableEditorCtrl::ClearModified()
pNameCell->ClearModifyFlag();
pDescrCell->ClearModifyFlag();
pHelpTextCell->ClearModifyFlag();
- pTypeCell->SaveValue();
+ pTypeCell->get_widget().save_value();
}
OTableEditorCtrl::~OTableEditorCtrl()
@@ -367,14 +366,15 @@ void OTableEditorCtrl::InitController(CellControllerRef&, long nRow, sal_uInt16
aInitString = pActFieldDescr->getTypeInfo()->aUIName;
// Set the ComboBox contents
- pTypeCell->Clear();
+ weld::ComboBox& rTypeList = pTypeCell->get_widget();
+ rTypeList.clear();
if( !pActFieldDescr )
break;
const OTypeInfoMap& rTypeInfo = GetView()->getController().getTypeInfo();
for (auto const& elem : rTypeInfo)
- pTypeCell->InsertEntry( elem.second->aUIName );
- pTypeCell->SelectEntry( aInitString );
+ rTypeList.append_text(elem.second->aUIName);
+ rTypeList.set_active_text(aInitString);
}
break;
@@ -681,8 +681,8 @@ void OTableEditorCtrl::CellModified( long nRow, sal_uInt16 nColId )
void OTableEditorCtrl::resetType()
{
- sal_Int32 nPos = pTypeCell->GetSelectedEntryPos();
- if(nPos != LISTBOX_ENTRY_NOTFOUND)
+ sal_Int32 nPos = pTypeCell->get_widget().get_active();
+ if(nPos != -1)
SwitchType( GetView()->getController().getTypeInfo(nPos) );
else
SwitchType(TOTypeInfoSP());
@@ -1564,9 +1564,10 @@ void OTableEditorCtrl::SwitchType( const TOTypeInfoSP& _pType )
pRow->SetFieldType( _pType, true );
if ( _pType.get() )
{
- const sal_Int32 nCurrentlySelected = pTypeCell->GetSelectedEntryPos();
+ weld::ComboBox& rTypeList = pTypeCell->get_widget();
+ const sal_Int32 nCurrentlySelected = rTypeList.get_active();
- if ( ( LISTBOX_ENTRY_NOTFOUND == nCurrentlySelected )
+ if ( ( nCurrentlySelected == -1 )
|| ( GetView()->getController().getTypeInfo( nCurrentlySelected ) != _pType )
)
{
@@ -1578,8 +1579,8 @@ void OTableEditorCtrl::SwitchType( const TOTypeInfoSP& _pType )
break;
++nEntryPos;
}
- if (nEntryPos < pTypeCell->GetEntryCount())
- pTypeCell->SelectEntryPos( nEntryPos );
+ if (nEntryPos < rTypeList.get_count())
+ rTypeList.set_active(nEntryPos);
}
}