summaryrefslogtreecommitdiff
path: root/svx/source/form/fmshell.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/form/fmshell.cxx')
-rw-r--r--svx/source/form/fmshell.cxx46
1 files changed, 23 insertions, 23 deletions
diff --git a/svx/source/form/fmshell.cxx b/svx/source/form/fmshell.cxx
index 8d54f4fabf..7ae8d6a811 100644
--- a/svx/source/form/fmshell.cxx
+++ b/svx/source/form/fmshell.cxx
@@ -317,37 +317,37 @@ sal_uInt16 FmFormShell::PrepareClose(sal_Bool bUI, sal_Bool bForBrowsing)
{
const ::svx::ControllerFeatures& rController = GetImpl()->getActiveControllerFeatures();
if ( rController->commitCurrentControl() )
- {
- sal_Bool bModified = rController->isModifiedRow();
-
- if ( bModified && bUI )
{
- QueryBox aQry(NULL, SVX_RES(RID_QRY_SAVEMODIFIED));
- if (bForBrowsing)
- aQry.AddButton(SVX_RES(RID_STR_NEW_TASK), RET_NEWTASK,
- BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_FOCUSBUTTON);
+ sal_Bool bModified = rController->isModifiedRow();
- switch (aQry.Execute())
+ if ( bModified && bUI )
{
- case RET_NO:
- bModified = sal_False;
- GetImpl()->didPrepareClose( sal_True );
- break;
-
- case RET_CANCEL:
- return sal_False;
-
- case RET_NEWTASK:
- return RET_NEWTASK;
+ QueryBox aQry(NULL, SVX_RES(RID_QRY_SAVEMODIFIED));
+ if (bForBrowsing)
+ aQry.AddButton(SVX_RES(RID_STR_NEW_TASK), RET_NEWTASK,
+ BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_FOCUSBUTTON);
+
+ switch (aQry.Execute())
+ {
+ case RET_NO:
+ bModified = sal_False;
+ GetImpl()->didPrepareClose( sal_True );
+ break;
+
+ case RET_CANCEL:
+ return sal_False;
+
+ case RET_NEWTASK:
+ return RET_NEWTASK;
+ }
+
+ if ( bModified )
+ bResult = rController->commitCurrentRecord( );
}
-
- if ( bModified )
- bResult = rController->commitCurrentRecord( );
}
}
}
}
- }
return bResult;
}