diff options
author | Rüdiger Timm <rt@openoffice.org> | 2006-07-26 06:42:24 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2006-07-26 06:42:24 +0000 |
commit | 4cbd6ac3ad21b770a3f30f857f0e91f69aec0d9e (patch) | |
tree | 1639c052b6c47a7af967da8b5ff066107b26d2e6 /svx | |
parent | d66e94c16862a67eb068bff32693466c8807ef1a (diff) |
INTEGRATION: CWS dba204b (1.75.36); FILE MERGED
2006/07/17 13:26:59 fs 1.75.36.1: #i67147# SaveModified: when calling Commit, care for a NULL controller afterwards
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/fmcomp/gridctrl.cxx | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx index f57716372d79..92a14f3956a9 100644 --- a/svx/source/fmcomp/gridctrl.cxx +++ b/svx/source/fmcomp/gridctrl.cxx @@ -4,9 +4,9 @@ * * $RCSfile: gridctrl.cxx,v $ * - * $Revision: 1.75 $ + * $Revision: 1.76 $ * - * last change: $Author: hr $ $Date: 2006-06-19 15:50:48 $ + * last change: $Author: rt $ $Date: 2006-07-26 07:42:24 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -3261,6 +3261,15 @@ sal_Bool DbGridControl::SaveModified() DbGridColumn* pColumn = m_aColumns.GetObject(GetModelColumnPos(GetCurColumnId())); sal_Bool bOK = pColumn->Commit(); + DBG_ASSERT( Controller().Is(), "DbGridControl::SaveModified: was modified, by have no controller?!" ); + if ( !Controller().Is() ) + // this might happen if the callbacks implicitly triggered by Commit + // fiddled with the form or the control ... + // (Note that this here is a workaround, at most. We need a general concept how + // to treat this, you can imagine an arbitrary number of scenarios where a callback + // triggers something which leaves us in an expected state.) + // #i67147# / 2006-07-17 / frank.schoenheit@sun.com + return bOK; if (bOK) { @@ -3282,9 +3291,7 @@ sal_Bool DbGridControl::SaveModified() else { // reset the modified flag .... - DBG_ASSERT( Controller().Is(), "DbGridControl::SaveModified: was modified, by have no controller?!" ); - if ( Controller().Is() ) - Controller()->SetModified(); + Controller()->SetModified(); } return bOK; |