diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-06-26 20:57:29 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-07-01 18:04:46 +0200 |
commit | d2f1cd004310b9ea6654d17fddc11cb08e884c90 (patch) | |
tree | 2d2ad2d4afa5e2eb1c62a8e7ee1ac7bd0bf4f791 /svx/source/fmcomp/gridctrl.cxx | |
parent | 96dc14a041ea803f0d194a47a8f3d62f6cfa37be (diff) |
weld EditControl for browsebox
Change-Id: I8f21c12f7ee10e1b9ba883a8ff01bb5252429f09
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97353
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx/source/fmcomp/gridctrl.cxx')
-rw-r--r-- | svx/source/fmcomp/gridctrl.cxx | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx index a37ce469905f..d8e20b7be894 100644 --- a/svx/source/fmcomp/gridctrl.cxx +++ b/svx/source/fmcomp/gridctrl.cxx @@ -3049,7 +3049,7 @@ void DbGridControl::RowModified( long nRow ) if (nRow == m_nCurrentPos && IsEditing()) { CellControllerRef aTmpRef = Controller(); - aTmpRef->ClearModified(); + aTmpRef->SaveValue(); InitController(aTmpRef, m_nCurrentPos, GetCurColumnId()); } EditBrowseBox::RowModified(nRow); @@ -3097,7 +3097,7 @@ bool DbGridControl::SaveModified() if (bOK) { - Controller()->ClearModified(); + Controller()->SaveValue(); if ( IsValid(m_xCurrentRow) ) { @@ -3110,11 +3110,6 @@ bool DbGridControl::SaveModified() SAL_INFO("svx.fmcomp", "no SetState, new state: " << ROWSTATUS(m_xCurrentRow)); } } - else - { - // reset the modified flag... - Controller()->SetModified(); - } return bOK; } @@ -3126,7 +3121,7 @@ bool DbGridControl::SaveRow() if (!IsValid(m_xCurrentRow) || !IsModified()) return true; // value of the controller was not saved, yet - else if (Controller().is() && Controller()->IsModified()) + else if (Controller().is() && Controller()->IsValueChangedFromSaved()) { if (!SaveModified()) return false; |