summaryrefslogtreecommitdiff
path: root/sc/source/ui/formdlg
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-10-03 14:32:14 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-10-03 20:10:07 +0200
commitfad3923c32b58c401aa2497734ba03b6a6d64ec6 (patch)
treebb0d028bce7f0a743ed282855fc5aba0d9d84116 /sc/source/ui/formdlg
parentdfe5ca213443415cbbcbe8968a4a872cc003c5be (diff)
Resolves: tdf#120209 reload names if setting for their language changes
Change-Id: I386a598ae680c90e7d31bf821e7fb58391e5d45c Reviewed-on: https://gerrit.libreoffice.org/80130 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source/ui/formdlg')
-rw-r--r--sc/source/ui/formdlg/dwfunctr.cxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/sc/source/ui/formdlg/dwfunctr.cxx b/sc/source/ui/formdlg/dwfunctr.cxx
index bc99704c9dbc..76edb39ccd0d 100644
--- a/sc/source/ui/formdlg/dwfunctr.cxx
+++ b/sc/source/ui/formdlg/dwfunctr.cxx
@@ -47,6 +47,8 @@
ScFunctionWin::ScFunctionWin(vcl::Window* pParent, const css::uno::Reference<css::frame::XFrame> &rFrame)
: PanelLayout(pParent, "FunctionPanel", "modules/scalc/ui/functionpanel.ui", rFrame)
+ , xConfigListener(new comphelper::ConfigurationListener("/org.openoffice.Office.Calc/Formula/Syntax"))
+ , xConfigChange(std::make_unique<EnglishFunctionNameChange>(xConfigListener, this))
, pFuncDesc(nullptr)
{
get(aCatBox, "category");
@@ -99,6 +101,12 @@ ScFunctionWin::~ScFunctionWin()
void ScFunctionWin::dispose()
{
+ if (xConfigChange)
+ {
+ xConfigChange.reset();
+ xConfigListener->dispose();
+ xConfigListener.clear();
+ }
aCatBox.clear();
aFuncList.clear();
aInsertButton.clear();
@@ -412,9 +420,17 @@ IMPL_LINK_NOARG( ScFunctionWin, SetSelectionClickHdl, Button*, void )
{
DoEnter(); // saves the input
}
+
IMPL_LINK_NOARG( ScFunctionWin, SetSelectionHdl, ListBox&, void )
{
DoEnter(); // saves the input
}
+void EnglishFunctionNameChange::setProperty(const css::uno::Any &rProperty)
+{
+ ConfigurationListenerProperty::setProperty(rProperty);
+ m_xFunctionWin->InitLRUList();
+ m_xFunctionWin->UpdateFunctionList();
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */