Resolves: tdf#131522 sync textview from edit when edit changes

Change-Id: I9a127f5066405225d35dd0590e84168b3bd86790
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91049
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
Caolán McNamara 2020-03-25 11:45:43 +00:00
parent eac806e8dc
commit 5bb9086564
4 changed files with 17 additions and 1 deletions

View file

@ -63,11 +63,16 @@ namespace pcr
}
}
IMPL_LINK_NOARG( CommonBehaviourControlHelper, EditModifiedHdl, weld::Entry&, void )
void CommonBehaviourControlHelper::editChanged()
{
setModified();
}
IMPL_LINK_NOARG( CommonBehaviourControlHelper, EditModifiedHdl, weld::Entry&, void )
{
editChanged();
}
IMPL_LINK_NOARG( CommonBehaviourControlHelper, ModifiedHdl, weld::ComboBox&, void )
{
setModified();

View file

@ -69,6 +69,8 @@ namespace pcr
virtual void setModified() { m_bModified = true; }
virtual void editChanged();
// XPropertyControl
/// @throws css::uno::RuntimeException
::sal_Int16 getControlType() const { return m_nControlType; }

View file

@ -735,6 +735,13 @@ namespace pcr
setModified();
}
void OMultilineEditControl::editChanged()
{
m_xTextView->set_text(m_xEntry->get_text());
CheckEntryTextViewMisMatch();
setModified();
}
IMPL_LINK_NOARG(OMultilineEditControl, ButtonHandler, weld::Button&, void)
{
m_xButton->set_active(false);

View file

@ -359,6 +359,8 @@ namespace pcr
virtual css::uno::Type SAL_CALL getValueType() override;
virtual weld::Widget* getWidget() override { return getTypedControlWindow(); }
virtual void editChanged() override;
virtual void SetModifyHandler() override
{
m_xEntry->connect_focus_in( LINK( this, CommonBehaviourControlHelper, GetFocusHdl ) );