summaryrefslogtreecommitdiff
path: root/framework/source
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2008-03-07 13:32:37 +0000
committerKurt Zenker <kz@openoffice.org>2008-03-07 13:32:37 +0000
commit7d8190fa1ad10b7d36ded139282f0a8542402216 (patch)
tree7c9f8e0656678637595d725e639a93c635ad9603 /framework/source
parent9676fb7dadca448eaf2b5959db897b5deee25ff0 (diff)
INTEGRATION: CWS pages01_DEV300 (1.8.204); FILE MERGED
2007/12/10 08:19:07 fme 1.8.204.1: #i84413# SfxStatusBarControl::mouseButtonDown not called
Diffstat (limited to 'framework/source')
-rw-r--r--framework/source/uielement/statusbar.cxx25
-rw-r--r--framework/source/uielement/statusbarmanager.cxx81
2 files changed, 101 insertions, 5 deletions
diff --git a/framework/source/uielement/statusbar.cxx b/framework/source/uielement/statusbar.cxx
index ba0b306ae776..bb9af63eb458 100644
--- a/framework/source/uielement/statusbar.cxx
+++ b/framework/source/uielement/statusbar.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: statusbar.cxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: obo $ $Date: 2006-09-16 14:24:14 $
+ * last change: $Author: kz $ $Date: 2008-03-07 14:32:23 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -100,4 +100,25 @@ void FrameworkStatusBar::DataChanged( const DataChangedEvent& rDCEvt )
m_pMgr->DataChanged( rDCEvt );
}
+void FrameworkStatusBar::MouseMove( const MouseEvent& rMEvt )
+{
+ StatusBar::MouseMove( rMEvt );
+ if ( m_pMgr )
+ m_pMgr->MouseMove( rMEvt );
+}
+
+void FrameworkStatusBar::MouseButtonDown( const MouseEvent& rMEvt )
+{
+ StatusBar::MouseButtonDown( rMEvt );
+ if ( m_pMgr )
+ m_pMgr->MouseButtonDown( rMEvt );
+}
+
+void FrameworkStatusBar::MouseButtonUp( const MouseEvent& rMEvt )
+{
+ StatusBar::MouseButtonUp( rMEvt );
+ if ( m_pMgr )
+ m_pMgr->MouseButtonUp( rMEvt );
+}
+
}
diff --git a/framework/source/uielement/statusbarmanager.cxx b/framework/source/uielement/statusbarmanager.cxx
index 5acbbbe8d827..1e5532ed2704 100644
--- a/framework/source/uielement/statusbarmanager.cxx
+++ b/framework/source/uielement/statusbarmanager.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: statusbarmanager.cxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: obo $ $Date: 2006-09-16 14:24:28 $
+ * last change: $Author: kz $ $Date: 2008-03-07 14:32:37 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -518,7 +518,7 @@ void StatusBarManager::CreateControllers()
if ( bInit )
{
beans::PropertyValue aPropValue;
- uno::Sequence< uno::Any > aArgs( 4 );
+ uno::Sequence< uno::Any > aArgs( 5 );
aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Frame" ));
aPropValue.Value = uno::makeAny( m_xFrame );
aArgs[0] = uno::makeAny( aPropValue );
@@ -531,6 +531,9 @@ void StatusBarManager::CreateControllers()
aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ParentWindow" ));
aPropValue.Value = uno::makeAny( xStatusbarWindow );
aArgs[3] = uno::makeAny( aPropValue );
+ aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Identifier" ));
+ aPropValue.Value = uno::makeAny( nId );
+ aArgs[4] = uno::makeAny( aPropValue );
xInit->initialize( aArgs );
}
}
@@ -724,6 +727,78 @@ void StatusBarManager::Command( const CommandEvent& rEvt )
}
}
+void StatusBarManager::MouseMove( const MouseEvent& rMEvt )
+{
+ ResetableGuard aGuard( m_aLock );
+
+ if ( m_bDisposed )
+ return;
+
+ USHORT nId = m_pStatusBar->GetItemId( rMEvt.GetPosPixel() );
+ if (( nId > 0 ) && ( nId <= m_aControllerVector.size() ))
+ {
+ uno::Reference< frame::XStatusbarController > xController(
+ m_aControllerVector[nId-1], uno::UNO_QUERY );
+ if ( xController.is() )
+ {
+ ::com::sun::star::awt::MouseEvent aMouseEvent;
+ aMouseEvent.Buttons = rMEvt.GetButtons();
+ aMouseEvent.X = rMEvt.GetPosPixel().X();
+ aMouseEvent.Y = rMEvt.GetPosPixel().Y();
+ aMouseEvent.ClickCount = rMEvt.GetClicks();
+ xController->mouseMove( aMouseEvent );
+ }
+ }
+}
+
+void StatusBarManager::MouseButtonDown( const MouseEvent& rMEvt )
+{
+ ResetableGuard aGuard( m_aLock );
+
+ if ( m_bDisposed )
+ return;
+
+ USHORT nId = m_pStatusBar->GetItemId( rMEvt.GetPosPixel() );
+ if (( nId > 0 ) && ( nId <= m_aControllerVector.size() ))
+ {
+ uno::Reference< frame::XStatusbarController > xController(
+ m_aControllerVector[nId-1], uno::UNO_QUERY );
+ if ( xController.is() )
+ {
+ ::com::sun::star::awt::MouseEvent aMouseEvent;
+ aMouseEvent.Buttons = rMEvt.GetButtons();
+ aMouseEvent.X = rMEvt.GetPosPixel().X();
+ aMouseEvent.Y = rMEvt.GetPosPixel().Y();
+ aMouseEvent.ClickCount = rMEvt.GetClicks();
+ xController->mouseButtonDown( aMouseEvent );
+ }
+ }
+}
+
+void StatusBarManager::MouseButtonUp( const MouseEvent& rMEvt )
+{
+ ResetableGuard aGuard( m_aLock );
+
+ if ( m_bDisposed )
+ return;
+
+ USHORT nId = m_pStatusBar->GetItemId( rMEvt.GetPosPixel() );
+ if (( nId > 0 ) && ( nId <= m_aControllerVector.size() ))
+ {
+ uno::Reference< frame::XStatusbarController > xController(
+ m_aControllerVector[nId-1], uno::UNO_QUERY );
+ if ( xController.is() )
+ {
+ ::com::sun::star::awt::MouseEvent aMouseEvent;
+ aMouseEvent.Buttons = rMEvt.GetButtons();
+ aMouseEvent.X = rMEvt.GetPosPixel().X();
+ aMouseEvent.Y = rMEvt.GetPosPixel().Y();
+ aMouseEvent.ClickCount = rMEvt.GetClicks();
+ xController->mouseButtonUp( aMouseEvent );
+ }
+ }
+}
+
IMPL_LINK( StatusBarManager, Click, StatusBar*, EMPTYARG )
{
ResetableGuard aGuard( m_aLock );