summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2023-07-07 13:32:34 +0200
committerMichael Stahl <michael.stahl@allotropia.de>2023-07-07 16:30:29 +0200
commit89b032b0cafa005729c693d9f2cfab83246697ab (patch)
tree6b3c28d694941e4e244c6ac97f07c36354c9779d /cui
parent1e8ec03543a8404543b9226896d36ab6dc72fa8f (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> (cherry picked from commit 04e90103b9a031af4073967228c6ccfc59438ec0) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154176
Diffstat (limited to 'cui')
-rw-r--r--cui/source/dialogs/dlgname.cxx13
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: */