diff options
Diffstat (limited to 'sw/source/uibase/shells/basesh.cxx')
-rw-r--r-- | sw/source/uibase/shells/basesh.cxx | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx index df4dac954495..4add92e90068 100644 --- a/sw/source/uibase/shells/basesh.cxx +++ b/sw/source/uibase/shells/basesh.cxx @@ -3048,8 +3048,18 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq) if (pTheme) { std::shared_ptr<svx::IThemeColorChanger> pChanger(new sw::ThemeColorChanger(pDocumentShell)); - auto pDialog = std::make_shared<svx::ThemeDialog>(pMDI, pTheme.get(), pChanger); - weld::DialogController::runAsync(pDialog, [](int) {}); + auto pDialog = std::make_shared<svx::ThemeDialog>(pMDI, pTheme.get()); + weld::DialogController::runAsync(pDialog, [pDialog, pChanger](sal_uInt32 nResult) { + if (RET_OK != nResult) + return; + + auto oColorSet = pDialog->getCurrentColorSet(); + if (oColorSet) + { + auto& rColorSet = (*oColorSet).get(); + pChanger->apply(rColorSet); + } + }); } } } |