diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-04-01 17:31:58 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-04-01 22:01:03 +0200 |
commit | 304e65f5f8fa139aaf5868db4205a95d0176695c (patch) | |
tree | 321b384088212d0669345847c4fea3d14bbe8d55 /extensions | |
parent | 6e09d59a503e98f97dea406bb3c2c703edf92d8e (diff) |
tdf#141084 don't notify that the control has changed content until focus-out
while also keeping tdf#140239 working too
Change-Id: I42833f6a4d2440781cf3f2297b78c6e313b3d239
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113467
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/source/propctrlr/usercontrol.cxx | 9 | ||||
-rw-r--r-- | extensions/source/propctrlr/usercontrol.hxx | 7 |
2 files changed, 12 insertions, 4 deletions
diff --git a/extensions/source/propctrlr/usercontrol.cxx b/extensions/source/propctrlr/usercontrol.cxx index fbf829b62938..345162ecffa0 100644 --- a/extensions/source/propctrlr/usercontrol.cxx +++ b/extensions/source/propctrlr/usercontrol.cxx @@ -248,9 +248,7 @@ namespace pcr bool bSuccess = rValue >>= sURL; if (bSuccess && GraphicObject::isGraphicObjectUniqueIdURL(sURL)) sURL = pControlWindow->GetPlaceHolder(); - // tdf#140239 leave current cursor valid if the contents won't change - if (sURL != pControlWindow->GetURL()) - pControlWindow->set_entry_text(sURL); + pControlWindow->set_entry_text(sURL); } Any SAL_CALL OFileUrlControl::getValue() @@ -266,6 +264,11 @@ namespace pcr return ::cppu::UnoType<OUString>::get(); } + IMPL_LINK_NOARG(OFileUrlControl, URLModifiedHdl, weld::ComboBox&, void) + { + editChanged(); + } + } // namespace pcr diff --git a/extensions/source/propctrlr/usercontrol.hxx b/extensions/source/propctrlr/usercontrol.hxx index 5e27a3dc61cf..86b53e7f122e 100644 --- a/extensions/source/propctrlr/usercontrol.hxx +++ b/extensions/source/propctrlr/usercontrol.hxx @@ -118,6 +118,8 @@ namespace pcr typedef CommonBehaviourControl<css::inspection::XPropertyControl, SvtURLBox> OFileUrlControl_Base; class OFileUrlControl : public OFileUrlControl_Base { + private: + DECL_LINK(URLModifiedHdl, weld::ComboBox&, void); public: OFileUrlControl(std::unique_ptr<SvtURLBox> xWidget, std::unique_ptr<weld::Builder> xBuilder, bool bReadOnly); @@ -129,7 +131,10 @@ namespace pcr virtual void SetModifyHandler() override { OFileUrlControl_Base::SetModifyHandler(); - getTypedControlWindow()->connect_changed(LINK(this, CommonBehaviourControlHelper, ModifiedHdl)); + SvtURLBox* pControlWindow = getTypedControlWindow(); + // tdf#140239 and tdf#141084 don't notify that the control has changed content until focus-out + pControlWindow->connect_focus_out(LINK(this, CommonBehaviourControlHelper, LoseFocusHdl)); + pControlWindow->connect_changed(LINK(this, OFileUrlControl, URLModifiedHdl)); } virtual weld::Widget* getWidget() override { return getTypedControlWindow()->getWidget(); } |