summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2016-11-24 22:40:33 +0100
committerAshod Nakashian <ashod.nakashian@collabora.co.uk>2017-12-18 01:08:07 -0500
commitd58a29430615a531ece6434033c8dc0fb26539d1 (patch)
treee801a36c928cf658a9f18cd005dedd70d18a0350 /sfx2
parent0c8a76cec8bc5cb72d4140ade378037d2a166476 (diff)
vcl: rename Window::Notify to EventNotify
There is annoying overloading between Window::Notify and SfxListener::Notify, and the Window one has apparently fewer implementations, so rename that and remove lots of disambiguating "using Notify" in multiply inheriting classes. Change-Id: I8b597fd9e70cf2e7103b9dfa7cc666e79e7aff49 (cherry picked from commit 6bb20609a2fd1d591cedc7fa2b9cabb589c346c7) (cherry picked from commit 03bfafb36107d18c0cccf53efdd550c0b7a81b8f)
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/appl/newhelp.cxx22
-rw-r--r--sfx2/source/appl/newhelp.hxx10
-rw-r--r--sfx2/source/dialog/basedlgs.cxx16
-rw-r--r--sfx2/source/dialog/dockwin.cxx14
-rw-r--r--sfx2/source/dialog/partwnd.cxx4
-rw-r--r--sfx2/source/dialog/templdlg.cxx8
-rw-r--r--sfx2/source/inc/partwnd.hxx2
-rw-r--r--sfx2/source/inc/templdgi.hxx4
-rw-r--r--sfx2/source/sidebar/Deck.cxx4
-rw-r--r--sfx2/source/sidebar/SidebarToolBox.cxx6
-rw-r--r--sfx2/source/sidebar/TabBar.cxx2
-rw-r--r--sfx2/source/view/frame2.cxx8
-rw-r--r--sfx2/source/view/printer.cxx4
13 files changed, 55 insertions, 49 deletions
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index 0151f7464d8c..190caba014b0 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -389,7 +389,7 @@ void ContentListBox_Impl::RequestingChildren( SvTreeListEntry* pParent )
}
-bool ContentListBox_Impl::Notify( NotifyEvent& rNEvt )
+bool ContentListBox_Impl::EventNotify( NotifyEvent& rNEvt )
{
bool bHandled = false;
if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT &&
@@ -399,7 +399,7 @@ bool ContentListBox_Impl::Notify( NotifyEvent& rNEvt )
bHandled = true;
}
- return bHandled || SvTreeListBox::Notify( rNEvt );
+ return bHandled || SvTreeListBox::EventNotify( rNEvt );
}
@@ -502,7 +502,7 @@ void IndexBox_Impl::UserDraw( const UserDrawEvent& rUDEvt )
}
-bool IndexBox_Impl::Notify( NotifyEvent& rNEvt )
+bool IndexBox_Impl::EventNotify( NotifyEvent& rNEvt )
{
bool bHandled = false;
if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT &&
@@ -512,7 +512,7 @@ bool IndexBox_Impl::Notify( NotifyEvent& rNEvt )
bHandled = true;
}
- return bHandled || ComboBox::Notify( rNEvt );
+ return bHandled || ComboBox::EventNotify( rNEvt );
}
@@ -893,7 +893,7 @@ VCL_BUILDER_DECL_FACTORY(SearchResultsBox)
rRet = pListBox;
}
-bool SearchResultsBox_Impl::Notify( NotifyEvent& rNEvt )
+bool SearchResultsBox_Impl::EventNotify( NotifyEvent& rNEvt )
{
bool bHandled = false;
if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT &&
@@ -903,7 +903,7 @@ bool SearchResultsBox_Impl::Notify( NotifyEvent& rNEvt )
bHandled = true;
}
- return bHandled || ListBox::Notify( rNEvt );
+ return bHandled || ListBox::EventNotify( rNEvt );
}
// class SearchTabPage_Impl ----------------------------------------------
@@ -1226,7 +1226,7 @@ void BookmarksBox_Impl::DoAction( sal_uInt16 nAction )
}
-bool BookmarksBox_Impl::Notify( NotifyEvent& rNEvt )
+bool BookmarksBox_Impl::EventNotify( NotifyEvent& rNEvt )
{
bool bRet = false;
MouseNotifyEvent nType = rNEvt.GetType();
@@ -1257,7 +1257,7 @@ bool BookmarksBox_Impl::Notify( NotifyEvent& rNEvt )
}
}
- return bRet || ListBox::Notify( rNEvt );
+ return bRet || ListBox::EventNotify( rNEvt );
}
// class BookmarksTabPage_Impl -------------------------------------------
@@ -1831,12 +1831,12 @@ TextWin_Impl::TextWin_Impl( vcl::Window* p ) : DockingWindow( p, 0 )
{
}
-bool TextWin_Impl::Notify( NotifyEvent& rNEvt )
+bool TextWin_Impl::EventNotify( NotifyEvent& rNEvt )
{
if( ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) && rNEvt.GetKeyEvent()->GetKeyCode().GetCode() == KEY_TAB )
- return GetParent()->Notify( rNEvt );
+ return GetParent()->EventNotify( rNEvt );
else
- return DockingWindow::Notify( rNEvt );
+ return DockingWindow::EventNotify( rNEvt );
}
diff --git a/sfx2/source/appl/newhelp.hxx b/sfx2/source/appl/newhelp.hxx
index 4f80ffad97fb..215ce2aeab0f 100644
--- a/sfx2/source/appl/newhelp.hxx
+++ b/sfx2/source/appl/newhelp.hxx
@@ -63,7 +63,7 @@ public:
virtual void dispose() override;
virtual void RequestingChildren( SvTreeListEntry* pParent ) override;
- virtual bool Notify( NotifyEvent& rNEvt ) override;
+ virtual bool EventNotify( NotifyEvent& rNEvt ) override;
inline void SetOpenHdl( const Link<SvTreeListBox*,bool>& rLink ) { SetDoubleClickHdl( rLink ); }
OUString GetSelectEntry() const;
@@ -115,7 +115,7 @@ public:
IndexBox_Impl(vcl::Window* pParent, WinBits nStyle);
virtual void UserDraw( const UserDrawEvent& rUDEvt ) override;
- virtual bool Notify( NotifyEvent& rNEvt ) override;
+ virtual bool EventNotify( NotifyEvent& rNEvt ) override;
void SelectExecutableEntry();
};
@@ -194,7 +194,7 @@ public:
{
}
- virtual bool Notify( NotifyEvent& rNEvt ) override;
+ virtual bool EventNotify( NotifyEvent& rNEvt ) override;
};
class SearchTabPage_Impl : public HelpTabPage_Impl
@@ -251,7 +251,7 @@ public:
virtual ~BookmarksBox_Impl() override;
virtual void dispose() override;
- virtual bool Notify( NotifyEvent& rNEvt ) override;
+ virtual bool EventNotify( NotifyEvent& rNEvt ) override;
};
class BookmarksTabPage_Impl : public HelpTabPage_Impl
@@ -406,7 +406,7 @@ class TextWin_Impl : public DockingWindow
public:
explicit TextWin_Impl( vcl::Window* pParent );
- virtual bool Notify( NotifyEvent& rNEvt ) override;
+ virtual bool EventNotify( NotifyEvent& rNEvt ) override;
};
// class SfxHelpTextWindow_Impl ------------------------------------------
diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx
index 710afd49b565..41db15950eb4 100644
--- a/sfx2/source/dialog/basedlgs.cxx
+++ b/sfx2/source/dialog/basedlgs.cxx
@@ -388,7 +388,7 @@ void SfxModelessDialog::Init(SfxBindings *pBindinx, SfxChildWindow *pCW)
If a ModelessDialog is enabled its ViewFrame wil be activated.
This is necessary by PluginInFrames.
*/
-bool SfxModelessDialog::Notify( NotifyEvent& rEvt )
+bool SfxModelessDialog::EventNotify( NotifyEvent& rEvt )
{
if ( pImpl )
{
@@ -404,14 +404,16 @@ bool SfxModelessDialog::Notify( NotifyEvent& rEvt )
else if( rEvt.GetType() == MouseNotifyEvent::KEYINPUT )
{
// First, allow KeyInput for Dialog functions ( TAB etc. )
- if ( !ModelessDialog::Notify( rEvt ) && SfxViewShell::Current() )
+ if (!ModelessDialog::EventNotify(rEvt) && SfxViewShell::Current())
+ {
// then also for valid global accelerators.
return SfxViewShell::Current()->GlobalKeyInput_Impl( *rEvt.GetKeyEvent() );
+ }
return true;
}
}
- return ModelessDialog::Notify( rEvt );
+ return ModelessDialog::EventNotify( rEvt );
}
SfxModelessDialog::~SfxModelessDialog()
@@ -473,7 +475,7 @@ void SfxModelessDialog::FillInfo(SfxChildWinInfo& rInfo) const
rInfo.nFlags |= SfxChildWindowFlags::ZOOMIN;
}
-bool SfxFloatingWindow::Notify( NotifyEvent& rEvt )
+bool SfxFloatingWindow::EventNotify( NotifyEvent& rEvt )
/* [Description]
@@ -499,14 +501,16 @@ bool SfxFloatingWindow::Notify( NotifyEvent& rEvt )
else if( rEvt.GetType() == MouseNotifyEvent::KEYINPUT )
{
// First, allow KeyInput for Dialog functions
- if ( !FloatingWindow::Notify( rEvt ) && SfxViewShell::Current() )
+ if (!FloatingWindow::EventNotify(rEvt) && SfxViewShell::Current())
+ {
// then also for valid global accelerators.
return SfxViewShell::Current()->GlobalKeyInput_Impl( *rEvt.GetKeyEvent() );
+ }
return true;
}
}
- return FloatingWindow::Notify( rEvt );
+ return FloatingWindow::EventNotify( rEvt );
}
SfxFloatingWindow::SfxFloatingWindow( SfxBindings *pBindinx,
diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx
index 60eb826cf714..6178bd0df75b 100644
--- a/sfx2/source/dialog/dockwin.cxx
+++ b/sfx2/source/dialog/dockwin.cxx
@@ -1627,10 +1627,10 @@ const Size& SfxDockingWindow::GetMinOutputSizePixel() const
return pImpl->aMinSize;
}
-bool SfxDockingWindow::Notify( NotifyEvent& rEvt )
+bool SfxDockingWindow::EventNotify( NotifyEvent& rEvt )
{
if ( !pImpl )
- return DockingWindow::Notify( rEvt );
+ return DockingWindow::EventNotify( rEvt );
if ( rEvt.GetType() == MouseNotifyEvent::GETFOCUS )
{
@@ -1642,18 +1642,20 @@ bool SfxDockingWindow::Notify( NotifyEvent& rEvt )
else if (pMgr != nullptr)
pMgr->Activate_Impl();
- // In VCL Notify goes first to the window itself, also call the
+ // In VCL EventNotify goes first to the window itself, also call the
// base class, otherwise the parent learns nothing
// if ( rEvt.GetWindow() == this ) PB: #i74693# not necessary any longer
- DockingWindow::Notify( rEvt );
+ DockingWindow::EventNotify( rEvt );
return true;
}
else if( rEvt.GetType() == MouseNotifyEvent::KEYINPUT )
{
// First, allow KeyInput for Dialog functions
- if ( !DockingWindow::Notify( rEvt ) && SfxViewShell::Current() )
+ if (!DockingWindow::EventNotify(rEvt) && SfxViewShell::Current())
+ {
// then also for valid global accelerators.
return SfxViewShell::Current()->GlobalKeyInput_Impl( *rEvt.GetKeyEvent() );
+ }
return true;
}
else if ( rEvt.GetType() == MouseNotifyEvent::LOSEFOCUS && !HasChildPathFocus() )
@@ -1661,7 +1663,7 @@ bool SfxDockingWindow::Notify( NotifyEvent& rEvt )
pBindings->SetActiveFrame( nullptr );
}
- return DockingWindow::Notify( rEvt );
+ return DockingWindow::EventNotify( rEvt );
}
diff --git a/sfx2/source/dialog/partwnd.cxx b/sfx2/source/dialog/partwnd.cxx
index 6f2f1fe34d0f..badfed081dd7 100644
--- a/sfx2/source/dialog/partwnd.cxx
+++ b/sfx2/source/dialog/partwnd.cxx
@@ -157,7 +157,7 @@ bool SfxPartDockWnd_Impl::QueryClose()
}
-bool SfxPartDockWnd_Impl::Notify( NotifyEvent& rEvt )
+bool SfxPartDockWnd_Impl::EventNotify( NotifyEvent& rEvt )
{
if( rEvt.GetType() == MouseNotifyEvent::GETFOCUS )
{
@@ -170,7 +170,7 @@ bool SfxPartDockWnd_Impl::Notify( NotifyEvent& rEvt )
}
}
- return SfxDockingWindow::Notify( rEvt );
+ return SfxDockingWindow::EventNotify( rEvt );
}
void SfxPartDockWnd_Impl::FillInfo( SfxChildWinInfo& rInfo ) const
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index 994e3ccb1a3f..3e452c9e2f75 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -288,7 +288,7 @@ IMPL_LINK_NOARG(DropListBox_Impl, OnAsyncExecuteDrop, void*, void)
pDialog->ActionSelect( SID_STYLE_NEW_BY_EXAMPLE );
}
-bool DropListBox_Impl::Notify( NotifyEvent& rNEvt )
+bool DropListBox_Impl::EventNotify( NotifyEvent& rNEvt )
{
bool bRet = false;
if( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT )
@@ -309,7 +309,7 @@ bool DropListBox_Impl::Notify( NotifyEvent& rNEvt )
}
}
if(!bRet)
- bRet = SvTreeListBox::Notify( rNEvt );
+ bRet = SvTreeListBox::EventNotify( rNEvt );
return bRet;
}
@@ -417,7 +417,7 @@ bool StyleTreeListBox_Impl::DoubleClickHdl()
return false;
}
-bool StyleTreeListBox_Impl::Notify( NotifyEvent& rNEvt )
+bool StyleTreeListBox_Impl::EventNotify( NotifyEvent& rNEvt )
{
// handle <RETURN> as double click
@@ -433,7 +433,7 @@ bool StyleTreeListBox_Impl::Notify( NotifyEvent& rNEvt )
}
if ( !bRet )
- bRet = DropListBox_Impl::Notify( rNEvt );
+ bRet = DropListBox_Impl::EventNotify( rNEvt );
return bRet;
}
diff --git a/sfx2/source/inc/partwnd.hxx b/sfx2/source/inc/partwnd.hxx
index 487659efaac1..c8bfad2d5f81 100644
--- a/sfx2/source/inc/partwnd.hxx
+++ b/sfx2/source/inc/partwnd.hxx
@@ -59,7 +59,7 @@ public:
class SfxPartDockWnd_Impl : public SfxDockingWindow
{
protected:
- virtual bool Notify( NotifyEvent& rNEvt ) override;
+ virtual bool EventNotify( NotifyEvent& rNEvt ) override;
public:
SfxPartDockWnd_Impl( SfxBindings* pBindings,
diff --git a/sfx2/source/inc/templdgi.hxx b/sfx2/source/inc/templdgi.hxx
index d24373cbe929..738f8b22b762 100644
--- a/sfx2/source/inc/templdgi.hxx
+++ b/sfx2/source/inc/templdgi.hxx
@@ -80,7 +80,7 @@ public:
return nModifier;
}
- virtual bool Notify( NotifyEvent& rNEvt ) override;
+ virtual bool EventNotify( NotifyEvent& rNEvt ) override;
};
typedef std::vector<OUString> ExpandedEntries_t;
@@ -97,7 +97,7 @@ private:
OUString aStyle;
protected:
- virtual bool Notify(NotifyEvent& rNEvt) override;
+ virtual bool EventNotify(NotifyEvent& rNEvt) override;
virtual bool DoubleClickHdl() override;
virtual bool ExpandingHdl() override;
virtual void ExpandedHdl() override;
diff --git a/sfx2/source/sidebar/Deck.cxx b/sfx2/source/sidebar/Deck.cxx
index 15a9c3a87119..acac122d32d6 100644
--- a/sfx2/source/sidebar/Deck.cxx
+++ b/sfx2/source/sidebar/Deck.cxx
@@ -147,7 +147,7 @@ void Deck::DataChanged (const DataChangedEvent& rEvent)
RequestLayout();
}
-bool Deck::Notify (NotifyEvent& rEvent)
+bool Deck::EventNotify(NotifyEvent& rEvent)
{
if (rEvent.GetType() == MouseNotifyEvent::COMMAND)
{
@@ -163,7 +163,7 @@ bool Deck::Notify (NotifyEvent& rEvent)
}
}
- return Window::Notify(rEvent);
+ return Window::EventNotify(rEvent);
}
bool Deck::ProcessWheelEvent(CommandEvent* pCommandEvent)
diff --git a/sfx2/source/sidebar/SidebarToolBox.cxx b/sfx2/source/sidebar/SidebarToolBox.cxx
index 26a758d447f7..bb948b023099 100644
--- a/sfx2/source/sidebar/SidebarToolBox.cxx
+++ b/sfx2/source/sidebar/SidebarToolBox.cxx
@@ -138,7 +138,7 @@ void SidebarToolBox::InsertItem(const OUString& rCommand,
RegisterHandlers();
}
-bool SidebarToolBox::Notify (NotifyEvent& rEvent)
+bool SidebarToolBox::EventNotify (NotifyEvent& rEvent)
{
if (rEvent.GetType() == MouseNotifyEvent::KEYINPUT)
{
@@ -147,10 +147,10 @@ bool SidebarToolBox::Notify (NotifyEvent& rEvent)
// Special handling for transferring handling of KEY_TAB
// that becomes necessary because of our parent that is
// not the dialog but a background control.
- return DockingWindow::Notify(rEvent);
+ return DockingWindow::EventNotify(rEvent);
}
}
- return ToolBox::Notify(rEvent);
+ return ToolBox::EventNotify(rEvent);
}
void SidebarToolBox::CreateController (
diff --git a/sfx2/source/sidebar/TabBar.cxx b/sfx2/source/sidebar/TabBar.cxx
index 62826f72cbc7..1bf3847d1a91 100644
--- a/sfx2/source/sidebar/TabBar.cxx
+++ b/sfx2/source/sidebar/TabBar.cxx
@@ -240,7 +240,7 @@ void TabBar::DataChanged (const DataChangedEvent& rDataChangedEvent)
Window::DataChanged(rDataChangedEvent);
}
-bool TabBar::Notify (NotifyEvent& rEvent)
+bool TabBar::EventNotify(NotifyEvent& rEvent)
{
if(rEvent.GetType() == MouseNotifyEvent::COMMAND)
{
diff --git a/sfx2/source/view/frame2.cxx b/sfx2/source/view/frame2.cxx
index 4a88eeacb616..91e9e6182028 100644
--- a/sfx2/source/view/frame2.cxx
+++ b/sfx2/source/view/frame2.cxx
@@ -70,7 +70,7 @@ public:
virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
virtual void StateChanged( StateChangedType nStateChange ) override;
virtual bool PreNotify( NotifyEvent& rNEvt ) override;
- virtual bool Notify( NotifyEvent& rEvt ) override;
+ virtual bool EventNotify( NotifyEvent& rEvt ) override;
virtual void Resize() override;
virtual void GetFocus() override;
void DoResize();
@@ -90,14 +90,14 @@ void SfxFrameWindow_Impl::DataChanged( const DataChangedEvent& rDCEvt )
pWorkWin->DataChanged_Impl( rDCEvt );
}
-bool SfxFrameWindow_Impl::Notify( NotifyEvent& rNEvt )
+bool SfxFrameWindow_Impl::EventNotify( NotifyEvent& rNEvt )
{
if ( pFrame->IsClosing_Impl() || !pFrame->GetFrameInterface().is() )
return false;
SfxViewFrame* pView = pFrame->GetCurrentViewFrame();
if ( !pView || !pView->GetObjectShell() )
- return Window::Notify( rNEvt );
+ return Window::EventNotify( rNEvt );
if ( rNEvt.GetType() == MouseNotifyEvent::GETFOCUS )
{
@@ -128,7 +128,7 @@ bool SfxFrameWindow_Impl::Notify( NotifyEvent& rNEvt )
return true;
}
- return Window::Notify( rNEvt );
+ return Window::EventNotify( rNEvt );
}
bool SfxFrameWindow_Impl::PreNotify( NotifyEvent& rNEvt )
diff --git a/sfx2/source/view/printer.cxx b/sfx2/source/view/printer.cxx
index 45f98ad99757..1ff1d910869c 100644
--- a/sfx2/source/view/printer.cxx
+++ b/sfx2/source/view/printer.cxx
@@ -244,7 +244,7 @@ short SfxPrintOptionsDialog::Execute()
}
-bool SfxPrintOptionsDialog::Notify( NotifyEvent& rNEvt )
+bool SfxPrintOptionsDialog::EventNotify( NotifyEvent& rNEvt )
{
if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT )
{
@@ -252,7 +252,7 @@ bool SfxPrintOptionsDialog::Notify( NotifyEvent& rNEvt )
return true; // help disabled -> <F1> does nothing
}
- return ModalDialog::Notify( rNEvt );
+ return ModalDialog::EventNotify( rNEvt );
}