From c7bdf73b326c09bd4744725843d78c5b3f7805f6 Mon Sep 17 00:00:00 2001 From: Ocke Janssen Date: Tue, 23 Oct 2001 11:30:27 +0000 Subject: #93566# slot fixes --- dbaccess/source/ui/querydesign/JoinController.cxx | 27 +++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) (limited to 'dbaccess/source/ui/querydesign/JoinController.cxx') diff --git a/dbaccess/source/ui/querydesign/JoinController.cxx b/dbaccess/source/ui/querydesign/JoinController.cxx index b7c52f940014..2b4b5bc42639 100644 --- a/dbaccess/source/ui/querydesign/JoinController.cxx +++ b/dbaccess/source/ui/querydesign/JoinController.cxx @@ -2,9 +2,9 @@ * * $RCSfile: JoinController.cxx,v $ * - * $Revision: 1.16 $ + * $Revision: 1.17 $ * - * last change: $Author: oj $ $Date: 2001-08-27 06:57:23 $ + * last change: $Author: oj $ $Date: 2001-10-23 12:30:24 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -338,8 +338,26 @@ void OJoinController::Execute(sal_uInt16 _nId) return; break; case ID_BROWSER_EDITDOC: + if(m_bEditable) + { // the state should be changed to not editable + switch (saveModified()) + { + case RET_CANCEL: + // don't change anything here so return + return; + break; + case RET_NO: + reset(); + setModified(sal_False); // and we are not modified yet + break; + default: + break; + } + } m_bEditable = !m_bEditable; getJoinView()->setReadOnly(!m_bEditable); + InvalidateAll(); + return; break; case ID_BROWSER_UNDO: m_aUndoManager.Undo(); @@ -399,6 +417,11 @@ void OJoinController::AddSupportedFeatures() m_aSupportedFeatures[ ::rtl::OUString::createFromAscii(".uno:DB/Close")] = SID_CLOSEDOC; } // ----------------------------------------------------------------------------- +sal_Bool SAL_CALL OJoinController::suspend(sal_Bool bSuspend) throw( RuntimeException ) +{ + return saveModified() != RET_CANCEL; +} +// ----------------------------------------------------------------------------- -- cgit