diff --git a/sc/inc/docuno.hxx b/sc/inc/docuno.hxx index f431f2e86cdf..d8728d678e52 100644 --- a/sc/inc/docuno.hxx +++ b/sc/inc/docuno.hxx @@ -2,9 +2,9 @@ * * $RCSfile: docuno.hxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: nn $ $Date: 2001-05-10 20:51:40 $ + * last change: $Author: sab $ $Date: 2001-07-23 14:27:06 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -233,6 +233,9 @@ public: throw(::com::sun::star::uno::RuntimeException); virtual sal_Int16 SAL_CALL resetActionLocks() throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL lockControllers(); + virtual void SAL_CALL unlockControllers(); + // XCalculatable virtual void SAL_CALL calculate() throw(::com::sun::star::uno::RuntimeException); virtual void SAL_CALL calculateAll() throw(::com::sun::star::uno::RuntimeException); diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index ab2307afb976..e2a5fdd3e9ab 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -2,9 +2,9 @@ * * $RCSfile: docuno.cxx,v $ * - * $Revision: 1.16 $ + * $Revision: 1.17 $ * - * last change: $Author: er $ $Date: 2001-05-15 18:14:10 $ + * last change: $Author: sab $ $Date: 2001-07-23 14:28:02 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -493,14 +493,14 @@ void SAL_CALL ScModelObj::addActionLock() throw(uno::RuntimeException) { ScUnoGuard aGuard; if (pDocShell) - pDocShell->LockPaint(); + pDocShell->LockDocument(); } void SAL_CALL ScModelObj::removeActionLock() throw(uno::RuntimeException) { ScUnoGuard aGuard; if (pDocShell) - pDocShell->UnlockPaint(); + pDocShell->UnlockDocument(); } void SAL_CALL ScModelObj::setActionLocks( sal_Int16 nLock ) throw(uno::RuntimeException) @@ -522,6 +522,25 @@ sal_Int16 SAL_CALL ScModelObj::resetActionLocks() throw(uno::RuntimeException) return nRet; } +void SAL_CALL ScModelObj::lockControllers() +{ + ScUnoGuard aGuard; + SfxBaseModel::lockControllers(); + if (pDocShell) + pDocShell->LockPaint(); +} + +void SAL_CALL ScModelObj::unlockControllers() +{ + ScUnoGuard aGuard; + if (hasControllersLocked()) + { + SfxBaseModel::unlockControllers(); + if (pDocShell) + pDocShell->UnlockPaint(); + } +} + // XCalculate void SAL_CALL ScModelObj::calculate() throw(uno::RuntimeException)