summaryrefslogtreecommitdiff
path: root/formula/source/ui/dlg/funcpage.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'formula/source/ui/dlg/funcpage.cxx')
-rw-r--r--formula/source/ui/dlg/funcpage.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/formula/source/ui/dlg/funcpage.cxx b/formula/source/ui/dlg/funcpage.cxx
index 42a2b351a81d..7b83298fd658 100644
--- a/formula/source/ui/dlg/funcpage.cxx
+++ b/formula/source/ui/dlg/funcpage.cxx
@@ -155,7 +155,9 @@ void FuncPage::UpdateFunctionList()
m_pLbFunction->SetUpdateMode( true );
- m_pLbFunction->SelectEntryPos(0);
+ // Ensure no function is selected so the Next button doesn't overwrite a
+ // function that is not in the list with an arbitrary selected one.
+ m_pLbFunction->SetNoSelection();
if(IsVisible()) SelHdl(*m_pLbFunction);
}
@@ -198,7 +200,10 @@ sal_Int32 FuncPage::GetFuncPos(const IFunctionDescription* _pDesc)
void FuncPage::SetFunction(sal_Int32 nFunc)
{
- m_pLbFunction->SelectEntryPos(nFunc);
+ if (nFunc == LISTBOX_ENTRY_NOTFOUND)
+ m_pLbFunction->SetNoSelection();
+ else
+ m_pLbFunction->SelectEntryPos(nFunc);
}
void FuncPage::SetFocus()