cui/source/inc/transfrm.hxx | 8 ++++---- cui/source/tabpages/transfrm.cxx | 8 ++++---- vcl/inc/jsdialog/jsdialogbuilder.hxx | 9 +++++++++ 3 files changed, 17 insertions(+), 8 deletions(-)
New commits: commit e7fb2df1f8ff80753c9f336a9cf81ca56695b1a8 Author: Szymon Kłos <szymon.k...@collabora.com> AuthorDate: Mon May 26 11:11:02 2025 +0000 Commit: Tomaž Vajngerl <qui...@gmail.com> CommitDate: Tue May 27 07:32:08 2025 +0200 jsdialog: support disable/enable per container if we have frame which is dynamically enabled or disabled - we update state of all widgets inside. we need to send update not simple action for jsdialog now as client will only update the witget with mentioned id not full structure below this also uses more detailed type for Position and Size tab in Impress frames to not use generic Widget wrapper and target with this bigger update Change-Id: I973cb959e8f6add40df53ea6e523424ce8bca1ab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185791 Reviewed-by: Tomaž Vajngerl <qui...@gmail.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> diff --git a/cui/source/inc/transfrm.hxx b/cui/source/inc/transfrm.hxx index 25464e9a0bc5..6ea12bb67a82 100644 --- a/cui/source/inc/transfrm.hxx +++ b/cui/source/inc/transfrm.hxx @@ -96,13 +96,13 @@ private: SvxRatioConnector m_aRatioBottom; // position - std::unique_ptr<weld::Widget> m_xFlPosition; + std::unique_ptr<weld::Container> m_xFlPosition; std::unique_ptr<weld::MetricSpinButton> m_xMtrPosX; std::unique_ptr<weld::MetricSpinButton> m_xMtrPosY; std::unique_ptr<weld::CustomWeld> m_xCtlPos; // size - std::unique_ptr<weld::Widget> m_xFlSize; + std::unique_ptr<weld::Container> m_xFlSize; std::unique_ptr<weld::Label> m_xFtWidth; std::unique_ptr<weld::MetricSpinButton> m_xMtrWidth; std::unique_ptr<weld::Label> m_xFtHeight; @@ -114,12 +114,12 @@ private: std::unique_ptr<weld::CustomWeld> m_xCtlSize; // protect - std::unique_ptr<weld::Widget> m_xFlProtect; + std::unique_ptr<weld::Container> m_xFlProtect; std::unique_ptr<weld::CheckButton> m_xTsbPosProtect; std::unique_ptr<weld::CheckButton> m_xTsbSizeProtect; // adjust - std::unique_ptr<weld::Widget> m_xFlAdjust; + std::unique_ptr<weld::Container> m_xFlAdjust; std::unique_ptr<weld::CheckButton> m_xTsbAutoGrowWidth; std::unique_ptr<weld::CheckButton> m_xTsbAutoGrowHeight; diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx index 9cfeff9b1ff8..8e573635aeb5 100644 --- a/cui/source/tabpages/transfrm.cxx +++ b/cui/source/tabpages/transfrm.cxx @@ -735,11 +735,11 @@ SvxPositionSizeTabPage::SvxPositionSizeTabPage(weld::Container* pPage, weld::Dia , m_aCtlSize(this) , m_aRatioTop(ConnectorType::Top) , m_aRatioBottom(ConnectorType::Bottom) - , m_xFlPosition(m_xBuilder->weld_widget(u"FL_POSITION"_ustr)) + , m_xFlPosition(m_xBuilder->weld_container(u"FL_POSITION"_ustr)) , m_xMtrPosX(m_xBuilder->weld_metric_spin_button(u"MTR_FLD_POS_X"_ustr, FieldUnit::CM)) , m_xMtrPosY(m_xBuilder->weld_metric_spin_button(u"MTR_FLD_POS_Y"_ustr, FieldUnit::CM)) , m_xCtlPos(new weld::CustomWeld(*m_xBuilder, u"CTL_POSRECT"_ustr, m_aCtlPos)) - , m_xFlSize(m_xBuilder->weld_widget(u"FL_SIZE"_ustr)) + , m_xFlSize(m_xBuilder->weld_container(u"FL_SIZE"_ustr)) , m_xFtWidth(m_xBuilder->weld_label(u"FT_WIDTH"_ustr)) , m_xMtrWidth(m_xBuilder->weld_metric_spin_button(u"MTR_FLD_WIDTH"_ustr, FieldUnit::CM)) , m_xFtHeight(m_xBuilder->weld_label(u"FT_HEIGHT"_ustr)) @@ -749,10 +749,10 @@ SvxPositionSizeTabPage::SvxPositionSizeTabPage(weld::Container* pPage, weld::Dia , m_xImgRatioTop(new weld::CustomWeld(*m_xBuilder, u"daRatioTop"_ustr, m_aRatioTop)) , m_xImgRatioBottom(new weld::CustomWeld(*m_xBuilder, u"daRatioBottom"_ustr, m_aRatioBottom)) , m_xCtlSize(new weld::CustomWeld(*m_xBuilder, u"CTL_SIZERECT"_ustr, m_aCtlSize)) - , m_xFlProtect(m_xBuilder->weld_widget(u"FL_PROTECT"_ustr)) + , m_xFlProtect(m_xBuilder->weld_container(u"FL_PROTECT"_ustr)) , m_xTsbPosProtect(m_xBuilder->weld_check_button(u"TSB_POSPROTECT"_ustr)) , m_xTsbSizeProtect(m_xBuilder->weld_check_button(u"TSB_SIZEPROTECT"_ustr)) - , m_xFlAdjust(m_xBuilder->weld_widget(u"FL_ADJUST"_ustr)) + , m_xFlAdjust(m_xBuilder->weld_container(u"FL_ADJUST"_ustr)) , m_xTsbAutoGrowWidth(m_xBuilder->weld_check_button(u"TSB_AUTOGROW_WIDTH"_ustr)) , m_xTsbAutoGrowHeight(m_xBuilder->weld_check_button(u"TSB_AUTOGROW_HEIGHT"_ustr)) { diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx b/vcl/inc/jsdialog/jsdialogbuilder.hxx index 8bfaeb86860e..4fbed1fbde23 100644 --- a/vcl/inc/jsdialog/jsdialogbuilder.hxx +++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx @@ -451,6 +451,15 @@ public: bool bTakeOwnership); void move(weld::Widget* pWidget, weld::Container* pNewParent) override; + + // all widgets below has to be updated in this case + virtual void set_sensitive(bool sensitive) override + { + bool bIsSensitive = SalInstanceContainer::get_sensitive(); + SalInstanceContainer::set_sensitive(sensitive); + if (bIsSensitive != sensitive) + sendUpdate(); + } }; class JSScrolledWindow final : public JSWidget<SalInstanceScrolledWindow, ::VclScrolledWindow>