assert if a model is used in duplicate widgets
we never do this deliberately Change-Id: I6d6d8ea13fb5f09bcf631c0474e671d4605f4c69 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135427 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
parent
3cca2c6053
commit
264b78cbd7
1 changed files with 4 additions and 0 deletions
|
@ -544,9 +544,13 @@ VclBuilder::VclBuilder(vcl::Window* pParent, const OUString& sUIDir, const OUStr
|
|||
}
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
o3tl::sorted_vector<OUString> models;
|
||||
#endif
|
||||
//Set ComboBox models when everything has been imported
|
||||
for (auto const& elem : m_pParserState->m_aModelMaps)
|
||||
{
|
||||
assert(models.insert(elem.m_sValue).second && "a liststore or treestore is used in duplicate widgets");
|
||||
vcl::Window* pTarget = get(elem.m_sID);
|
||||
ListBox *pListBoxTarget = dynamic_cast<ListBox*>(pTarget);
|
||||
ComboBox *pComboBoxTarget = dynamic_cast<ComboBox*>(pTarget);
|
||||
|
|
Loading…
Reference in a new issue