summaryrefslogtreecommitdiff
path: root/svx/source/fmcomp/gridctrl.cxx
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2006-07-26 06:42:24 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2006-07-26 06:42:24 +0000
commit4600194d5d49ba7f8e1e56708032e518173afe4b (patch)
treefea7776bfa9ad73e9218f6b3dcab549502051e9b /svx/source/fmcomp/gridctrl.cxx
parent9fcac192023510802bc0e6c1998a9dbbc19ee791 (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/source/fmcomp/gridctrl.cxx')
-rw-r--r--svx/source/fmcomp/gridctrl.cxx17
1 files changed, 12 insertions, 5 deletions
diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index 20a57996a5..141beb2c66 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;