diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2023-07-07 13:32:34 +0200 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2023-07-07 15:45:09 +0200 |
commit | 04e90103b9a031af4073967228c6ccfc59438ec0 (patch) | |
tree | 1d5c11e4963d294d1984b5e5844558d820a9eabb /cui | |
parent | efaa065eb7053954242c83760f897e7dba2e9fe8 (diff) |
tdf#152484 cui,sw: if decorative is enabled, disable title/description
... in sw Frame Properties dialog and cui SvxObjectTitleDescDialog.
Reportedly Word behaves weirdly if decorative is set and a description
exists at the same time.
Change-Id: I9fa149127bacc3567486334a14f42b05871a629f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154165
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/dialogs/dlgname.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/cui/source/dialogs/dlgname.cxx b/cui/source/dialogs/dlgname.cxx index 84f21a86d616..fa12a158445f 100644 --- a/cui/source/dialogs/dlgname.cxx +++ b/cui/source/dialogs/dlgname.cxx @@ -90,7 +90,9 @@ SvxObjectTitleDescDialog::SvxObjectTitleDescDialog(weld::Window* pParent, const const OUString& rDescription, bool const isDecorative) : GenericDialogController(pParent, "cui/ui/objecttitledescdialog.ui", "ObjectTitleDescDialog") + , m_xTitleFT(m_xBuilder->weld_label("object_title_label")) , m_xEdtTitle(m_xBuilder->weld_entry("object_title_entry")) + , m_xDescriptionFT(m_xBuilder->weld_label("desc_label")) , m_xEdtDescription(m_xBuilder->weld_text_view("desc_entry")) , m_xDecorativeCB(m_xBuilder->weld_check_button("decorative")) { @@ -104,6 +106,17 @@ SvxObjectTitleDescDialog::SvxObjectTitleDescDialog(weld::Window* pParent, const m_xEdtTitle->select_region(0, -1); m_xDecorativeCB->set_active(isDecorative); + m_xDecorativeCB->connect_toggled(LINK(this, SvxObjectTitleDescDialog, DecorativeHdl)); + DecorativeHdl(*m_xDecorativeCB); +} + +IMPL_LINK_NOARG(SvxObjectTitleDescDialog, DecorativeHdl, weld::Toggleable&, void) +{ + bool const bEnable(!m_xDecorativeCB->get_active()); + m_xEdtTitle->set_sensitive(bEnable); + m_xTitleFT->set_sensitive(bEnable); + m_xEdtDescription->set_sensitive(bEnable); + m_xDescriptionFT->set_sensitive(bEnable); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |