diff options
author | Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> | 2023-09-07 12:49:46 +0200 |
---|---|---|
committer | Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> | 2023-09-08 13:24:21 +0200 |
commit | c7a608a6691c790783c63f504010bc796c36af25 (patch) | |
tree | 2495546cbec51b568d52309a19fa9fc730a0b61c /cui/source | |
parent | 48129cabb9a5636207d3b8f4f9fa4e4abac61b8a (diff) |
tdf#155503 Add title to document title dialog
Otherwise the title was just "Name"
Change-Id: I883d2468c7bd97782b0aef4165a6afe4ff39ce31
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156659
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
Diffstat (limited to 'cui/source')
-rw-r--r-- | cui/source/dialogs/dlgname.cxx | 5 | ||||
-rw-r--r-- | cui/source/factory/dlgfact.cxx | 4 | ||||
-rw-r--r-- | cui/source/factory/dlgfact.hxx | 2 |
3 files changed, 7 insertions, 4 deletions
diff --git a/cui/source/dialogs/dlgname.cxx b/cui/source/dialogs/dlgname.cxx index fa12a158445f..4e6847e0f5cc 100644 --- a/cui/source/dialogs/dlgname.cxx +++ b/cui/source/dialogs/dlgname.cxx @@ -25,7 +25,8 @@ |* \************************************************************************/ -SvxNameDialog::SvxNameDialog(weld::Window* pParent, const OUString& rName, const OUString& rDesc) +SvxNameDialog::SvxNameDialog(weld::Window* pParent, const OUString& rName, const OUString& rDesc, + const OUString& rTitle) : GenericDialogController(pParent, "cui/ui/namedialog.ui", "NameDialog") , m_xEdtName(m_xBuilder->weld_entry("name_entry")) , m_xFtDescription(m_xBuilder->weld_label("description_label")) @@ -36,6 +37,8 @@ SvxNameDialog::SvxNameDialog(weld::Window* pParent, const OUString& rName, const m_xEdtName->select_region(0, -1); ModifyHdl(*m_xEdtName); m_xEdtName->connect_changed(LINK(this, SvxNameDialog, ModifyHdl)); + if (!rTitle.isEmpty()) + set_title(rTitle); } IMPL_LINK_NOARG(SvxNameDialog, ModifyHdl, weld::Entry&, void) diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index d0b0fceed8a3..f558f9e4a37d 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -1092,9 +1092,9 @@ VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateSvxEditDictionaryDia } VclPtr<AbstractSvxNameDialog> AbstractDialogFactory_Impl::CreateSvxNameDialog(weld::Window* pParent, - const OUString& rName, const OUString& rDesc) + const OUString& rName, const OUString& rDesc, const OUString& rTitle) { - return VclPtr<AbstractSvxNameDialog_Impl>::Create(std::make_unique<SvxNameDialog>(pParent, rName, rDesc)); + return VclPtr<AbstractSvxNameDialog_Impl>::Create(std::make_unique<SvxNameDialog>(pParent, rName, rDesc, rTitle)); } VclPtr<AbstractSvxObjectNameDialog> AbstractDialogFactory_Impl::CreateSvxObjectNameDialog(weld::Window* pParent, const OUString& rName) diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx index cd3f638aced5..4adc0d82ee47 100644 --- a/cui/source/factory/dlgfact.hxx +++ b/cui/source/factory/dlgfact.hxx @@ -521,7 +521,7 @@ public: virtual VclPtr<AbstractSvxNewDictionaryDialog> CreateSvxNewDictionaryDialog(weld::Window* pParent) override; virtual VclPtr<VclAbstractDialog> CreateSvxEditDictionaryDialog(weld::Window* pParent, const OUString& rName) override; virtual VclPtr<AbstractSvxNameDialog> CreateSvxNameDialog(weld::Window* pParent, - const OUString& rName, const OUString& rDesc) override; + const OUString& rName, const OUString& rDesc, const OUString& rTitle = "") override; // #i68101# virtual VclPtr<AbstractSvxObjectNameDialog> CreateSvxObjectNameDialog(weld::Window* pParent, const OUString& rName) override; virtual VclPtr<AbstractSvxObjectTitleDescDialog> CreateSvxObjectTitleDescDialog(weld::Window* pParent, const OUString& rTitle, const OUString& rDescription, bool isDecorative) override; |