diff options
Diffstat (limited to 'framework/source')
-rw-r--r-- | framework/source/helper/ocomponentaccess.cxx | 18 | ||||
-rw-r--r-- | framework/source/helper/oframes.cxx | 17 | ||||
-rw-r--r-- | framework/source/services/desktop.cxx | 16 | ||||
-rw-r--r-- | framework/source/uielement/toolbarsmenucontroller.cxx | 2 |
4 files changed, 6 insertions, 47 deletions
diff --git a/framework/source/helper/ocomponentaccess.cxx b/framework/source/helper/ocomponentaccess.cxx index 6b13cecfe032..f120a79380f4 100644 --- a/framework/source/helper/ocomponentaccess.cxx +++ b/framework/source/helper/ocomponentaccess.cxx @@ -39,7 +39,7 @@ OComponentAccess::OComponentAccess( const css::uno::Reference< XDesktop >& xOwne : m_xOwner ( xOwner ) { // Safe impossible cases - SAL_WARN_IF( !impldbg_checkParameter_OComponentAccessCtor( xOwner ), "fwk", "OComponentAccess::OComponentAccess(): Invalid parameter detected!" ); + SAL_WARN_IF( !xOwner.is(), "fwk", "OComponentAccess::OComponentAccess(): Invalid parameter detected!" ); } // destructor @@ -161,22 +161,6 @@ css::uno::Reference< XComponent > OComponentAccess::impl_getFrameComponent( cons return xComponent; } -// debug methods - -/*----------------------------------------------------------------------------------------------------------------- - The follow methods checks the parameter for other functions. If a parameter or his value is non valid, - we return "sal_False". (else sal_True) This mechanism is used to throw an ASSERT! - - ATTENTION - - If you miss a test for one of this parameters, contact the author or add it himself !(?) - But ... look for right testing! See using of this methods! ------------------------------------------------------------------------------------------------------------------*/ - -bool OComponentAccess::impldbg_checkParameter_OComponentAccessCtor( const css::uno::Reference< XDesktop >& xOwner ) -{ - return xOwner.is(); -} } // namespace framework diff --git a/framework/source/helper/oframes.cxx b/framework/source/helper/oframes.cxx index 3759a3adcbe7..4f96df15f476 100644 --- a/framework/source/helper/oframes.cxx +++ b/framework/source/helper/oframes.cxx @@ -62,7 +62,7 @@ void SAL_CALL OFrames::append( const css::uno::Reference< XFrame >& xFrame ) thr // Safe impossible cases // Method is not defined for ALL incoming parameters! - SAL_WARN_IF( !impldbg_checkParameter_append( xFrame ), "fwk", "OFrames::append(): Invalid parameter detected!" ); + SAL_WARN_IF( !xFrame.is(), "fwk", "OFrames::append(): Invalid parameter detected!" ); // Do the follow only, if owner instance valid! // Lock owner for follow operations - make a "hard reference"! @@ -85,7 +85,7 @@ void SAL_CALL OFrames::remove( const css::uno::Reference< XFrame >& xFrame ) thr // Safe impossible cases // Method is not defined for ALL incoming parameters! - SAL_WARN_IF( !impldbg_checkParameter_remove( xFrame ), "fwk", "OFrames::remove(): Invalid parameter detected!" ); + SAL_WARN_IF( !xFrame.is(), "fwk", "OFrames::remove(): Invalid parameter detected!" ); // Do the follow only, if owner instance valid! // Lock owner for follow operations - make a "hard reference"! @@ -354,19 +354,6 @@ bool OFrames::impldbg_checkParameter_OFramesCtor( const css::uno::Reference< return xOwner.is() && pFrameContainer != nullptr; } -// Its only allowed to add valid references to container. -// AND - alle frames must support XFrames-interface! -bool OFrames::impldbg_checkParameter_append( const css::uno::Reference< XFrame >& xFrame ) -{ - return xFrame.is(); -} - -// Its only allowed to add valid references to container... -// ... => You can only delete valid references! -bool OFrames::impldbg_checkParameter_remove( const css::uno::Reference< XFrame >& xFrame ) -{ - return xFrame.is(); -} // A search for frames must initiate with right flags. // Some one are superflous and not supported yet. But here we control only the range of incoming parameter! diff --git a/framework/source/services/desktop.cxx b/framework/source/services/desktop.cxx index e99bec83b99e..c8bf51fe6a8e 100644 --- a/framework/source/services/desktop.cxx +++ b/framework/source/services/desktop.cxx @@ -1117,7 +1117,7 @@ void SAL_CALL Desktop::addEventListener( const css::uno::Reference< css::lang::X /* UNSAFE AREA --------------------------------------------------------------------------------------------- */ // Safe impossible cases // Method not defined for all incoming parameter. - SAL_WARN_IF( implcp_addEventListener( xListener ), "fwk", "Desktop::addEventListener(): Invalid parameter detected!" ); + SAL_WARN_IF( !xListener.is(), "fwk", "Desktop::addEventListener(): Invalid parameter detected!" ); // Register transaction and reject wrong calls. TransactionGuard aTransaction( m_aTransactionManager, E_HARDEXCEPTIONS ); @@ -1129,7 +1129,7 @@ void SAL_CALL Desktop::removeEventListener( const css::uno::Reference< css::lang /* UNSAFE AREA --------------------------------------------------------------------------------------------- */ // Safe impossible cases // Method not defined for all incoming parameter. - SAL_WARN_IF( implcp_removeEventListener( xListener ), "fwk", "Desktop::removeEventListener(): Invalid parameter detected!" ); + SAL_WARN_IF( !xListener.is(), "fwk", "Desktop::removeEventListener(): Invalid parameter detected!" ); // Register transaction and reject wrong calls. TransactionGuard aTransaction( m_aTransactionManager, E_SOFTEXCEPTIONS ); @@ -1738,18 +1738,6 @@ bool Desktop::impl_closeFrames(bool bAllowUI) return (nNonClosedFrames < 1); } -// We work with valid listener only. -bool Desktop::implcp_addEventListener( const css::uno::Reference< css::lang::XEventListener >& xListener ) -{ - return !xListener.is(); -} - -// We work with valid listener only. -bool Desktop::implcp_removeEventListener( const css::uno::Reference< css::lang::XEventListener >& xListener ) -{ - return !xListener.is(); -} - } // namespace framework namespace { diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx index 1b649c8f6326..44ae069fa0a9 100644 --- a/framework/source/uielement/toolbarsmenucontroller.cxx +++ b/framework/source/uielement/toolbarsmenucontroller.cxx @@ -737,7 +737,7 @@ void SAL_CALL ToolbarsMenuController::itemActivated( const css::awt::MenuEvent& // Special code to determine the enable/disable state of this command FeatureStateEvent aFeatureStateEvent; aFeatureStateEvent.FeatureURL.Complete = aCmdVector[i]; - aFeatureStateEvent.IsEnabled = isContextSensitiveToolbarNonVisible(); + aFeatureStateEvent.IsEnabled = m_bResetActive; // is context sensitive toolbar non visible statusChanged( aFeatureStateEvent ); } } |