summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>2022-09-15 10:19:45 +0200
committerSamuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>2022-09-19 11:42:59 +0200
commit467085bfb0f595a094389c2de159589372d36d1e (patch)
tree1124baddedd97a081015513aab0dd8656fe3d683 /sfx2
parentde90c192cb8f1f03a4028493d8bfe9a127a76b2a (diff)
Rename MouseNotifyEvent to NotifyEventType
Also contains keyboard and focus events, not only mouse events Change-Id: Iec1d6c341b01a489ba80fe9634ea3579afb02ea9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139970 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/appl/newhelp.cxx10
-rw-r--r--sfx2/source/dialog/backingwindow.cxx2
-rw-r--r--sfx2/source/dialog/dockwin.cxx6
-rw-r--r--sfx2/source/dialog/partwnd.cxx2
-rw-r--r--sfx2/source/notebookbar/NotebookbarTabControl.cxx2
-rw-r--r--sfx2/source/sidebar/SidebarDockingWindow.cxx8
-rw-r--r--sfx2/source/sidebar/SidebarToolBox.cxx2
-rw-r--r--sfx2/source/sidebar/TabBar.cxx6
-rw-r--r--sfx2/source/view/frame2.cxx12
-rw-r--r--sfx2/source/view/userinputinterception.cxx14
10 files changed, 32 insertions, 32 deletions
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index 2d9821d6cba7..b977b15fe2ad 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -1596,7 +1596,7 @@ TextWin_Impl::TextWin_Impl( vcl::Window* p ) : DockingWindow( p, 0 )
bool TextWin_Impl::EventNotify( NotifyEvent& rNEvt )
{
- if( ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) && rNEvt.GetKeyEvent()->GetKeyCode().GetCode() == KEY_TAB )
+ if( ( rNEvt.GetType() == NotifyEventType::KEYINPUT ) && rNEvt.GetKeyEvent()->GetKeyCode().GetCode() == KEY_TAB )
return GetParent()->EventNotify( rNEvt );
else
return DockingWindow::EventNotify( rNEvt );
@@ -1979,8 +1979,8 @@ void SfxHelpTextWindow_Impl::Resize()
bool SfxHelpTextWindow_Impl::PreNotify( NotifyEvent& rNEvt )
{
bool bDone = false;
- MouseNotifyEvent nType = rNEvt.GetType();
- if ( MouseNotifyEvent::COMMAND == nType && rNEvt.GetCommandEvent() )
+ NotifyEventType nType = rNEvt.GetType();
+ if ( NotifyEventType::COMMAND == nType && rNEvt.GetCommandEvent() )
{
const CommandEvent* pCmdEvt = rNEvt.GetCommandEvent();
vcl::Window* pCmdWin = rNEvt.GetWindow();
@@ -2046,7 +2046,7 @@ bool SfxHelpTextWindow_Impl::PreNotify( NotifyEvent& rNEvt )
bDone = true;
}
}
- else if ( MouseNotifyEvent::KEYINPUT == nType && rNEvt.GetKeyEvent() )
+ else if ( NotifyEventType::KEYINPUT == nType && rNEvt.GetKeyEvent() )
{
const KeyEvent* pKEvt = rNEvt.GetKeyEvent();
const vcl::KeyCode& rKeyCode = pKEvt->GetKeyCode();
@@ -2492,7 +2492,7 @@ void SfxHelpWindow_Impl::dispose()
bool SfxHelpWindow_Impl::PreNotify( NotifyEvent& rNEvt )
{
bool bHandled = false;
- if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT )
+ if ( rNEvt.GetType() == NotifyEventType::KEYINPUT )
{
// Backward == <ALT><LEFT> or <BACKSPACE> Forward == <ALT><RIGHT>
const vcl::KeyCode& rKeyCode = rNEvt.GetKeyEvent()->GetKeyCode();
diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx
index 8f1554659bde..a50253b3243e 100644
--- a/sfx2/source/dialog/backingwindow.cxx
+++ b/sfx2/source/dialog/backingwindow.cxx
@@ -409,7 +409,7 @@ void BackingWindow::checkInstalledModules()
bool BackingWindow::PreNotify(NotifyEvent& rNEvt)
{
- if( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT )
+ if( rNEvt.GetType() == NotifyEventType::KEYINPUT )
{
const KeyEvent* pEvt = rNEvt.GetKeyEvent();
const vcl::KeyCode& rKeyCode(pEvt->GetKeyCode());
diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx
index 4329b2d908a4..83c01c7f8475 100644
--- a/sfx2/source/dialog/dockwin.cxx
+++ b/sfx2/source/dialog/dockwin.cxx
@@ -1442,7 +1442,7 @@ bool SfxDockingWindow::EventNotify( NotifyEvent& rEvt )
if ( !pImpl )
return ResizableDockingWindow::EventNotify( rEvt );
- if ( rEvt.GetType() == MouseNotifyEvent::GETFOCUS )
+ if ( rEvt.GetType() == NotifyEventType::GETFOCUS )
{
if (pMgr != nullptr)
pBindings->SetActiveFrame( pMgr->GetFrame() );
@@ -1458,7 +1458,7 @@ bool SfxDockingWindow::EventNotify( NotifyEvent& rEvt )
ResizableDockingWindow::EventNotify( rEvt );
return true;
}
- else if( rEvt.GetType() == MouseNotifyEvent::KEYINPUT )
+ else if( rEvt.GetType() == NotifyEventType::KEYINPUT )
{
// First, allow KeyInput for Dialog functions
if (!DockingWindow::EventNotify(rEvt) && SfxViewShell::Current())
@@ -1468,7 +1468,7 @@ bool SfxDockingWindow::EventNotify( NotifyEvent& rEvt )
}
return true;
}
- else if ( rEvt.GetType() == MouseNotifyEvent::LOSEFOCUS && !HasChildPathFocus() )
+ else if ( rEvt.GetType() == NotifyEventType::LOSEFOCUS && !HasChildPathFocus() )
{
pBindings->SetActiveFrame( nullptr );
}
diff --git a/sfx2/source/dialog/partwnd.cxx b/sfx2/source/dialog/partwnd.cxx
index e387d2c5ba1c..44403298ae37 100644
--- a/sfx2/source/dialog/partwnd.cxx
+++ b/sfx2/source/dialog/partwnd.cxx
@@ -150,7 +150,7 @@ bool SfxPartDockWnd_Impl::QueryClose()
bool SfxPartDockWnd_Impl::EventNotify( NotifyEvent& rEvt )
{
- if( rEvt.GetType() == MouseNotifyEvent::GETFOCUS )
+ if( rEvt.GetType() == NotifyEventType::GETFOCUS )
{
SfxChildWindow* pChild = GetChildWindow_Impl();
if( pChild )
diff --git a/sfx2/source/notebookbar/NotebookbarTabControl.cxx b/sfx2/source/notebookbar/NotebookbarTabControl.cxx
index 78929e5b1799..b4e7a7560efb 100644
--- a/sfx2/source/notebookbar/NotebookbarTabControl.cxx
+++ b/sfx2/source/notebookbar/NotebookbarTabControl.cxx
@@ -222,7 +222,7 @@ void NotebookbarTabControl::KeyInput( const KeyEvent& rKEvt )
bool NotebookbarTabControl::EventNotify( NotifyEvent& rNEvt )
{
- if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT )
+ if ( rNEvt.GetType() == NotifyEventType::KEYINPUT )
{
const vcl::KeyCode& rKey = rNEvt.GetKeyEvent()->GetKeyCode();
sal_uInt16 nCode = rKey.GetCode();
diff --git a/sfx2/source/sidebar/SidebarDockingWindow.cxx b/sfx2/source/sidebar/SidebarDockingWindow.cxx
index 0a22eb08848c..18000601bfd0 100644
--- a/sfx2/source/sidebar/SidebarDockingWindow.cxx
+++ b/sfx2/source/sidebar/SidebarDockingWindow.cxx
@@ -125,8 +125,8 @@ SfxChildAlignment SidebarDockingWindow::CheckAlignment (
bool SidebarDockingWindow::EventNotify(NotifyEvent& rEvent)
{
- MouseNotifyEvent nType = rEvent.GetType();
- if (MouseNotifyEvent::KEYINPUT == nType)
+ NotifyEventType nType = rEvent.GetType();
+ if (NotifyEventType::KEYINPUT == nType)
{
const vcl::KeyCode& rKeyCode = rEvent.GetKeyEvent()->GetKeyCode();
switch (rKeyCode.GetCode())
@@ -170,7 +170,7 @@ bool SidebarDockingWindow::EventNotify(NotifyEvent& rEvent)
return true;
}
}
- else if (MouseNotifyEvent::MOUSEBUTTONDOWN == nType)
+ else if (NotifyEventType::MOUSEBUTTONDOWN == nType)
{
const MouseEvent *mEvt = rEvent.GetMouseEvent();
if (mEvt->IsLeft())
@@ -180,7 +180,7 @@ bool SidebarDockingWindow::EventNotify(NotifyEvent& rEvent)
mbIsReadyToDrag = true;
}
}
- else if (MouseNotifyEvent::MOUSEMOVE == nType)
+ else if (NotifyEventType::MOUSEMOVE == nType)
{
const MouseEvent *mEvt = rEvent.GetMouseEvent();
tools::Rectangle aGrip = mpSidebarController->GetDeckDragArea();
diff --git a/sfx2/source/sidebar/SidebarToolBox.cxx b/sfx2/source/sidebar/SidebarToolBox.cxx
index 936fdbdd4ddc..cc6bbec39080 100644
--- a/sfx2/source/sidebar/SidebarToolBox.cxx
+++ b/sfx2/source/sidebar/SidebarToolBox.cxx
@@ -138,7 +138,7 @@ void SidebarToolBox::InsertItem(const OUString& rCommand,
bool SidebarToolBox::EventNotify (NotifyEvent& rEvent)
{
- if (rEvent.GetType() == MouseNotifyEvent::KEYINPUT)
+ if (rEvent.GetType() == NotifyEventType::KEYINPUT)
{
if (rEvent.GetKeyEvent()->GetKeyCode().GetCode() == KEY_TAB)
{
diff --git a/sfx2/source/sidebar/TabBar.cxx b/sfx2/source/sidebar/TabBar.cxx
index 3601180e9f3d..bd73322f9496 100644
--- a/sfx2/source/sidebar/TabBar.cxx
+++ b/sfx2/source/sidebar/TabBar.cxx
@@ -178,8 +178,8 @@ void TabBar::DataChanged(const DataChangedEvent& rDataChangedEvent)
bool TabBar::EventNotify(NotifyEvent& rEvent)
{
- MouseNotifyEvent nType = rEvent.GetType();
- if(MouseNotifyEvent::KEYINPUT == nType)
+ NotifyEventType nType = rEvent.GetType();
+ if(NotifyEventType::KEYINPUT == nType)
{
const vcl::KeyCode& rKeyCode = rEvent.GetKeyEvent()->GetKeyCode();
if (!mpAccel)
@@ -193,7 +193,7 @@ bool TabBar::EventNotify(NotifyEvent& rEvent)
return InterimItemWindow::EventNotify(rEvent);
return true;
}
- else if(MouseNotifyEvent::COMMAND == nType)
+ else if(NotifyEventType::COMMAND == nType)
{
const CommandEvent& rCommandEvent = *rEvent.GetCommandEvent();
if(rCommandEvent.GetCommand() == CommandEventId::Wheel)
diff --git a/sfx2/source/view/frame2.cxx b/sfx2/source/view/frame2.cxx
index fa02f8106415..5071dda0056b 100644
--- a/sfx2/source/view/frame2.cxx
+++ b/sfx2/source/view/frame2.cxx
@@ -102,7 +102,7 @@ bool SfxFrameWindow_Impl::EventNotify( NotifyEvent& rNEvt )
if ( !pView || !pView->GetObjectShell() )
return Window::EventNotify( rNEvt );
- if ( rNEvt.GetType() == MouseNotifyEvent::GETFOCUS )
+ if ( rNEvt.GetType() == NotifyEventType::GETFOCUS )
{
if ( pView->GetViewShell() && !pView->GetViewShell()->GetUIActiveIPClient_Impl() && !m_pFrame->IsInPlace() )
{
@@ -115,7 +115,7 @@ bool SfxFrameWindow_Impl::EventNotify( NotifyEvent& rNEvt )
pView->GetBindings().Invalidate( SID_PASTE_SPECIAL );
return true;
}
- else if( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT )
+ else if( rNEvt.GetType() == NotifyEventType::KEYINPUT )
{
if ( pView->GetViewShell()->KeyInput( *rNEvt.GetKeyEvent() ) )
return true;
@@ -134,15 +134,15 @@ IMPL_LINK(SfxFrameWindow_Impl, ModalHierarchyHdl, bool, bSetModal, void)
bool SfxFrameWindow_Impl::PreNotify( NotifyEvent& rNEvt )
{
- MouseNotifyEvent nType = rNEvt.GetType();
- if ( nType == MouseNotifyEvent::KEYINPUT || nType == MouseNotifyEvent::KEYUP )
+ NotifyEventType nType = rNEvt.GetType();
+ if ( nType == NotifyEventType::KEYINPUT || nType == NotifyEventType::KEYUP )
{
SfxViewFrame* pView = m_pFrame->GetCurrentViewFrame();
SfxViewShell* pShell = pView ? pView->GetViewShell() : nullptr;
if ( pShell && pShell->HasKeyListeners_Impl() && pShell->HandleNotifyEvent_Impl( rNEvt ) )
return true;
}
- else if ( nType == MouseNotifyEvent::MOUSEBUTTONUP || nType == MouseNotifyEvent::MOUSEBUTTONDOWN )
+ else if ( nType == NotifyEventType::MOUSEBUTTONUP || nType == NotifyEventType::MOUSEBUTTONDOWN )
{
vcl::Window* pWindow = rNEvt.GetWindow();
SfxViewFrame* pView = m_pFrame->GetCurrentViewFrame();
@@ -153,7 +153,7 @@ bool SfxFrameWindow_Impl::PreNotify( NotifyEvent& rNEvt )
return true;
}
- if ( nType == MouseNotifyEvent::MOUSEBUTTONDOWN )
+ if ( nType == NotifyEventType::MOUSEBUTTONDOWN )
{
vcl::Window* pWindow = rNEvt.GetWindow();
const MouseEvent* pMEvent = rNEvt.GetMouseEvent();
diff --git a/sfx2/source/view/userinputinterception.cxx b/sfx2/source/view/userinputinterception.cxx
index f1f0d365d3c4..72c2496502dd 100644
--- a/sfx2/source/view/userinputinterception.cxx
+++ b/sfx2/source/view/userinputinterception.cxx
@@ -173,13 +173,13 @@ namespace sfx2
{
Reference < XInterface > xHoldAlive( m_pData->m_rControllerImpl );
- MouseNotifyEvent nType = _rEvent.GetType();
+ NotifyEventType nType = _rEvent.GetType();
bool bHandled = false;
switch ( nType )
{
- case MouseNotifyEvent::KEYINPUT:
- case MouseNotifyEvent::KEYUP:
+ case NotifyEventType::KEYINPUT:
+ case NotifyEventType::KEYUP:
{
KeyEvent aEvent;
lcl_initKeyEvent( aEvent, *_rEvent.GetKeyEvent() );
@@ -192,7 +192,7 @@ namespace sfx2
Reference< XKeyHandler > xHandler( aIterator.next() );
try
{
- if ( nType == MouseNotifyEvent::KEYINPUT )
+ if ( nType == NotifyEventType::KEYINPUT )
bHandled = xHandler->keyPressed( aEvent );
else
bHandled = xHandler->keyReleased( aEvent );
@@ -213,8 +213,8 @@ namespace sfx2
}
break;
- case MouseNotifyEvent::MOUSEBUTTONDOWN:
- case MouseNotifyEvent::MOUSEBUTTONUP:
+ case NotifyEventType::MOUSEBUTTONDOWN:
+ case NotifyEventType::MOUSEBUTTONUP:
{
MouseEvent aEvent;
lcl_initMouseEvent( aEvent, *_rEvent.GetMouseEvent() );
@@ -227,7 +227,7 @@ namespace sfx2
Reference< XMouseClickHandler > xHandler( aIterator.next() );
try
{
- if ( nType == MouseNotifyEvent::MOUSEBUTTONDOWN )
+ if ( nType == NotifyEventType::MOUSEBUTTONDOWN )
bHandled = xHandler->mousePressed( aEvent );
else
bHandled = xHandler->mouseReleased( aEvent );