diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx index c31f57fce3f8..e4545b497d6e 100644 --- a/cui/source/tabpages/tpcolor.cxx +++ b/cui/source/tabpages/tpcolor.cxx @@ -220,7 +220,10 @@ void SvxColorTabPage::FillPaletteLB() } OUString aPaletteName( officecfg::Office::Common::UserColors::PaletteName::get() ); m_pSelectPalette->SelectEntry(aPaletteName); - SelectPaletteLBHdl( *m_pSelectPalette ); + if (m_pSelectPalette->GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND) + { + SelectPaletteLBHdl( *m_pSelectPalette ); + } } void SvxColorTabPage::Construct() @@ -228,7 +231,6 @@ void SvxColorTabPage::Construct() if (pColorList.is()) { FillPaletteLB(); - SelectPaletteLBHdl( *m_pSelectPalette ); ImpColorCountChanged(); } } diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 48551590a396..d2252e64a3e1 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -1356,7 +1356,10 @@ SvxColorWindow::SvxColorWindow(const OUString& rCommand, } OUString aPaletteName( officecfg::Office::Common::UserColors::PaletteName::get() ); mpPaletteListBox->SelectEntry( aPaletteName ); - SelectPaletteHdl( *mpPaletteListBox ); + if (mpPaletteListBox->GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND) + { + SelectPaletteHdl( *mpPaletteListBox ); + } mpButtonAutoColor->SetClickHdl( LINK( this, SvxColorWindow, AutoColorClickHdl ) ); mpButtonNoneColor->SetClickHdl( LINK( this, SvxColorWindow, AutoColorClickHdl ) );