diff options
author | Kurt Zenker <kz@openoffice.org> | 2008-04-03 16:11:20 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2008-04-03 16:11:20 +0000 |
commit | 5a9cebf53a758a6ee83fd277e9fa367073f0ec89 (patch) | |
tree | 3dc04741c0f61cc57060b67a4aca0bf620d60c1c | |
parent | 2693d74915ef31d7a421a9ed113107ab727e693f (diff) |
INTEGRATION: CWS vcl87 (1.22.6); FILE MERGED
2008/03/17 15:59:33 pl 1.22.6.2: #i87056# accelerator handling in StartCenter
2008/03/17 13:04:34 pl 1.22.6.1: remove now useless ColorListener
-rw-r--r-- | framework/source/services/backingcomp.cxx | 54 |
1 files changed, 8 insertions, 46 deletions
diff --git a/framework/source/services/backingcomp.cxx b/framework/source/services/backingcomp.cxx index bca0ebcb2b41..72326810c3cf 100644 --- a/framework/source/services/backingcomp.cxx +++ b/framework/source/services/backingcomp.cxx @@ -4,9 +4,9 @@ * * $RCSfile: backingcomp.cxx,v $ * - * $Revision: 1.22 $ + * $Revision: 1.23 $ * - * last change: $Author: kz $ $Date: 2008-03-05 17:23:04 $ + * last change: $Author: kz $ $Date: 2008-04-03 17:11:20 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -51,10 +51,6 @@ #include <threadhelp/writeguard.hxx> #endif -#ifndef __FRAMEWORK_CLASSES_COLORLISTENER_HXX_ -#include <classes/colorlistener.hxx> -#endif - #ifndef __FRAMEWORK_CLASSES_DROPTARGETLISTENER_HXX_ #include <classes/droptargetlistener.hxx> #endif @@ -187,7 +183,6 @@ namespace framework BackingComp::BackingComp( const css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR ) : ThreadHelpBase (&Application::GetSolarMutex() ) , m_xSMGR (xSMGR ) - , m_pAccExec (0 ) { } @@ -195,14 +190,6 @@ BackingComp::BackingComp( const css::uno::Reference< css::lang::XMultiServiceFac BackingComp::~BackingComp() { - // Free this member inside dtor only! Not inside dispose(). - // Otherwhise we cant guarantee right using of it inbetween. - if (m_pAccExec) - { - ::svt::AcceleratorExecute* pAccExec = m_pAccExec; - m_pAccExec = 0; - delete pAccExec; - } } //_______________________________________________ @@ -615,11 +602,6 @@ void SAL_CALL BackingComp::attachFrame( /*IN*/ const css::uno::Reference< css::f pParent->SetMenuBarMode(MENUBAR_MODE_NORMAL); } - // create a listener for automatic updates of the window background color - // It hold itself alive and listen for window disposing() so it can die automaticly - // if we release our component window. - new ColorListener(m_xWindow); - // sett he right title at the title bar of the parent window css::uno::Reference< css::beans::XPropertySet > xPropSet(m_xFrame, css::uno::UNO_QUERY); if (xPropSet.is()) @@ -655,12 +637,14 @@ void SAL_CALL BackingComp::attachFrame( /*IN*/ const css::uno::Reference< css::f xLayoutManager->unlock(); } - // establish listening for key accelerators - m_xWindow->addKeyListener(css::uno::Reference< css::awt::XKeyListener >(static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY)); - // set help ID for our canvas pWindow->SetHelpId(HID_BACKINGWINDOW); + // inform BackingWindow about frame + BackingWindow* pBack = dynamic_cast<BackingWindow*>(pWindow ); + if( pBack ) + pBack->setOwningFrame( m_xFrame ); + aWriteLock.unlock(); /* } SAFE */ } @@ -975,31 +959,9 @@ void SAL_CALL BackingComp::initialize( /*IN*/ const css::uno::Sequence< css::uno /** */ -void SAL_CALL BackingComp::keyPressed( /*IN*/ const css::awt::KeyEvent& aEvent ) +void SAL_CALL BackingComp::keyPressed( /*IN*/ const css::awt::KeyEvent& ) throw(css::uno::RuntimeException) { - // SAFE -> ---------------------------------- - ReadGuard aReadLock(m_aLock); - ::svt::AcceleratorExecute* pAccExec = m_pAccExec; - aReadLock.unlock(); - // <- SAFE ---------------------------------- - - if (!pAccExec) - { - pAccExec = ::svt::AcceleratorExecute::createAcceleratorHelper(); - pAccExec->init(m_xSMGR, m_xFrame); - - // SAFE -> ------------------------------ - WriteGuard aWriteLock(m_aLock); - m_pAccExec = pAccExec; - aWriteLock.unlock(); - // <- SAFE ------------------------------ - } - - // We can call this non ref counted member copy here outside - // the synchronized block. Because it lives till we reach our own dtor. - // And normaly we can't stand inside a method and reach our dtor ... Normaly .-) - pAccExec->execute(aEvent); } //_______________________________________________ |