diff options
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/newhelp.cxx | 38 | ||||
-rw-r--r-- | sfx2/source/appl/newhelp.hxx | 10 | ||||
-rw-r--r-- | sfx2/source/dialog/backingwindow.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/dialog/backingwindow.hxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/basedlgs.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/dialog/dockwin.cxx | 10 | ||||
-rw-r--r-- | sfx2/source/dialog/partwnd.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/templdlg.cxx | 16 | ||||
-rw-r--r-- | sfx2/source/inc/partwnd.hxx | 2 | ||||
-rw-r--r-- | sfx2/source/inc/templdgi.hxx | 2 | ||||
-rw-r--r-- | sfx2/source/sidebar/Deck.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/sidebar/Deck.hxx | 2 | ||||
-rw-r--r-- | sfx2/source/sidebar/SidebarToolBox.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/sidebar/TabBar.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/sidebar/TabBar.hxx | 2 | ||||
-rw-r--r-- | sfx2/source/view/frame2.cxx | 14 | ||||
-rw-r--r-- | sfx2/source/view/printer.cxx | 4 |
17 files changed, 63 insertions, 65 deletions
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx index 77e7362b05ac..f0314e536652 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -387,17 +387,17 @@ void ContentListBox_Impl::RequestingChildren( SvTreeListEntry* pParent ) // ----------------------------------------------------------------------- -long ContentListBox_Impl::Notify( NotifyEvent& rNEvt ) +bool ContentListBox_Impl::Notify( NotifyEvent& rNEvt ) { - sal_Bool bHandled = sal_False; + bool bHandled = false; if ( rNEvt.GetType() == EVENT_KEYINPUT && KEY_RETURN == rNEvt.GetKeyEvent()->GetKeyCode().GetCode() ) { GetDoubleClickHdl().Call( NULL ); - bHandled = sal_True; + bHandled = true; } - return bHandled ? 1 : SvTreeListBox::Notify( rNEvt ); + return bHandled || SvTreeListBox::Notify( rNEvt ); } // ----------------------------------------------------------------------- @@ -494,17 +494,17 @@ void IndexBox_Impl::UserDraw( const UserDrawEvent& rUDEvt ) // ----------------------------------------------------------------------- -long IndexBox_Impl::Notify( NotifyEvent& rNEvt ) +bool IndexBox_Impl::Notify( NotifyEvent& rNEvt ) { - sal_Bool bHandled = sal_False; + bool bHandled = false; if ( rNEvt.GetType() == EVENT_KEYINPUT && KEY_RETURN == rNEvt.GetKeyEvent()->GetKeyCode().GetCode() ) { GetDoubleClickHdl().Call( NULL ); - bHandled = sal_True; + bHandled = true; } - return bHandled ? 1 : ComboBox::Notify( rNEvt ); + return bHandled || ComboBox::Notify( rNEvt ); } // ----------------------------------------------------------------------- @@ -931,17 +931,17 @@ void SearchBox_Impl::Select() // class SearchResultsBox_Impl ------------------------------------------- -long SearchResultsBox_Impl::Notify( NotifyEvent& rNEvt ) +bool SearchResultsBox_Impl::Notify( NotifyEvent& rNEvt ) { - sal_Bool bHandled = sal_False; + bool bHandled = false; if ( rNEvt.GetType() == EVENT_KEYINPUT && KEY_RETURN == rNEvt.GetKeyEvent()->GetKeyCode().GetCode() ) { GetDoubleClickHdl().Call( NULL ); - bHandled = sal_True; + bHandled = true; } - return bHandled ? 1 : ListBox::Notify( rNEvt ); + return bHandled || ListBox::Notify( rNEvt ); } // class SearchTabPage_Impl ---------------------------------------------- @@ -1308,9 +1308,9 @@ void BookmarksBox_Impl::DoAction( sal_uInt16 nAction ) // ----------------------------------------------------------------------- -long BookmarksBox_Impl::Notify( NotifyEvent& rNEvt ) +bool BookmarksBox_Impl::Notify( NotifyEvent& rNEvt ) { - long nRet = 0; + bool nRet = false; sal_uInt16 nType = rNEvt.GetType(); if ( EVENT_KEYINPUT == nType ) { @@ -1318,12 +1318,12 @@ long BookmarksBox_Impl::Notify( NotifyEvent& rNEvt ) if ( KEY_DELETE == nCode && GetEntryCount() > 0 ) { DoAction( MID_DELETE ); - nRet = 1; + nRet = true; } else if ( KEY_RETURN == nCode ) { GetDoubleClickHdl().Call( NULL ); - nRet = 1; + nRet = true; } } else if ( EVENT_COMMAND == nType ) @@ -1335,11 +1335,11 @@ long BookmarksBox_Impl::Notify( NotifyEvent& rNEvt ) sal_uInt16 nId = aMenu.Execute( this, pCEvt->GetMousePosPixel() ); if ( nId != MENU_ITEM_NOTFOUND ) DoAction( nId ); - nRet = 1; + nRet = true; } } - return nRet ? nRet : ListBox::Notify( rNEvt ); + return nRet || ListBox::Notify( rNEvt ); } // class BookmarksTabPage_Impl ------------------------------------------- @@ -1989,7 +1989,7 @@ TextWin_Impl::~TextWin_Impl() { } -long TextWin_Impl::Notify( NotifyEvent& rNEvt ) +bool TextWin_Impl::Notify( NotifyEvent& rNEvt ) { if( ( rNEvt.GetType() == EVENT_KEYINPUT ) && rNEvt.GetKeyEvent()->GetKeyCode().GetCode() == KEY_TAB ) return GetParent()->Notify( rNEvt ); diff --git a/sfx2/source/appl/newhelp.hxx b/sfx2/source/appl/newhelp.hxx index 0ebbcf65d645..3a5226afa041 100644 --- a/sfx2/source/appl/newhelp.hxx +++ b/sfx2/source/appl/newhelp.hxx @@ -85,7 +85,7 @@ public: virtual void RequestingChildren( SvTreeListEntry* pParent ); - virtual long Notify( NotifyEvent& rNEvt ); + virtual bool Notify( NotifyEvent& rNEvt ); inline void SetOpenHdl( const Link& rLink ) { SetDoubleClickHdl( rLink ); } OUString GetSelectEntry() const; @@ -133,7 +133,7 @@ public: IndexBox_Impl( Window* pParent, const ResId& rResId ); virtual void UserDraw( const UserDrawEvent& rUDEvt ); - virtual long Notify( NotifyEvent& rNEvt ); + virtual bool Notify( NotifyEvent& rNEvt ); void SelectExecutableEntry(); }; @@ -207,7 +207,7 @@ class SearchResultsBox_Impl : public ListBox public: SearchResultsBox_Impl( Window* pParent, const ResId& rResId ) : ListBox( pParent, rResId ) {} - virtual long Notify( NotifyEvent& rNEvt ); + virtual bool Notify( NotifyEvent& rNEvt ); }; class SearchTabPage_Impl : public HelpTabPage_Impl @@ -264,7 +264,7 @@ public: BookmarksBox_Impl( Window* pParent, const ResId& rResId ); ~BookmarksBox_Impl(); - virtual long Notify( NotifyEvent& rNEvt ); + virtual bool Notify( NotifyEvent& rNEvt ); }; class BookmarksTabPage_Impl : public HelpTabPage_Impl @@ -419,7 +419,7 @@ public: TextWin_Impl( Window* pParent ); virtual ~TextWin_Impl(); - virtual long Notify( NotifyEvent& rNEvt ); + virtual bool Notify( NotifyEvent& rNEvt ); }; // class SfxHelpTextWindow_Impl ------------------------------------------ diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx index 8744b0789a8a..988a4a349fb9 100644 --- a/sfx2/source/dialog/backingwindow.cxx +++ b/sfx2/source/dialog/backingwindow.cxx @@ -305,7 +305,7 @@ void BackingWindow::Paint( const Rectangle& ) aDev ); } -long BackingWindow::Notify( NotifyEvent& rNEvt ) +bool BackingWindow::Notify( NotifyEvent& rNEvt ) { if( rNEvt.GetType() == EVENT_KEYINPUT ) { @@ -319,7 +319,7 @@ long BackingWindow::Notify( NotifyEvent& rNEvt ) const KeyEvent* pEvt = rNEvt.GetKeyEvent(); const KeyCode& rKeyCode(pEvt->GetKeyCode()); if( pEvt && mpAccExec->execute(rKeyCode) ) - return 1; + return true; } return Window::Notify( rNEvt ); diff --git a/sfx2/source/dialog/backingwindow.hxx b/sfx2/source/dialog/backingwindow.hxx index 948265fa96b6..526a91b5e644 100644 --- a/sfx2/source/dialog/backingwindow.hxx +++ b/sfx2/source/dialog/backingwindow.hxx @@ -107,7 +107,7 @@ public: virtual void Paint( const Rectangle& rRect ); virtual void Resize(); - virtual long Notify( NotifyEvent& rNEvt ); + virtual bool Notify( NotifyEvent& rNEvt ); virtual Size GetOptimalSize() const; diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx index 25998b0cbffd..628086493c2a 100644 --- a/sfx2/source/dialog/basedlgs.cxx +++ b/sfx2/source/dialog/basedlgs.cxx @@ -354,7 +354,7 @@ void SfxModelessDialog::Init(SfxBindings *pBindinx, SfxChildWindow *pCW) // ----------------------------------------------------------------------- -long SfxModelessDialog::Notify( NotifyEvent& rEvt ) +bool SfxModelessDialog::Notify( NotifyEvent& rEvt ) /* [Description] @@ -379,7 +379,7 @@ long SfxModelessDialog::Notify( NotifyEvent& rEvt ) if ( !ModelessDialog::Notify( rEvt ) && SfxViewShell::Current() ) // then also for valid global accelerators. return SfxViewShell::Current()->GlobalKeyInput_Impl( *rEvt.GetKeyEvent() ); - return sal_True; + return true; } return ModelessDialog::Notify( rEvt ); @@ -442,7 +442,7 @@ void SfxModelessDialog::FillInfo(SfxChildWinInfo& rInfo) const // ----------------------------------------------------------------------- -long SfxFloatingWindow::Notify( NotifyEvent& rEvt ) +bool SfxFloatingWindow::Notify( NotifyEvent& rEvt ) /* [Description] @@ -470,7 +470,7 @@ long SfxFloatingWindow::Notify( NotifyEvent& rEvt ) if ( !FloatingWindow::Notify( rEvt ) && SfxViewShell::Current() ) // then also for valid global accelerators. return SfxViewShell::Current()->GlobalKeyInput_Impl( *rEvt.GetKeyEvent() ); - return sal_True; + return true; } return FloatingWindow::Notify( rEvt ); diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx index 2eb6bed0e3d9..72f95bc8d1e9 100644 --- a/sfx2/source/dialog/dockwin.cxx +++ b/sfx2/source/dialog/dockwin.cxx @@ -79,7 +79,7 @@ public: void SetWrappedWindow(Window* const pWindow); virtual void StateChanged( StateChangedType nType ); - virtual long Notify( NotifyEvent& rNEvt ); + virtual bool Notify( NotifyEvent& rNEvt ); virtual void Resize(); virtual void Resizing( Size& rSize ); virtual sal_Bool Close(); @@ -269,7 +269,7 @@ void SfxTitleDockingWindow::SetWrappedWindow( Window* const pWindow ) } } -long SfxTitleDockingWindow::Notify( NotifyEvent& rNEvt ) +bool SfxTitleDockingWindow::Notify( NotifyEvent& rNEvt ) { return SfxDockingWindow::Notify( rNEvt ); } @@ -1770,7 +1770,7 @@ Size SfxDockingWindow::GetMinOutputSizePixel() const //------------------------------------------------------------------------- -long SfxDockingWindow::Notify( NotifyEvent& rEvt ) +bool SfxDockingWindow::Notify( NotifyEvent& rEvt ) { if ( rEvt.GetType() == EVENT_GETFOCUS ) { @@ -1786,7 +1786,7 @@ long SfxDockingWindow::Notify( NotifyEvent& rEvt ) // base class, otherwise the parent learns nothing // if ( rEvt.GetWindow() == this ) PB: #i74693# not necessary any longer DockingWindow::Notify( rEvt ); - return sal_True; + return true; } else if( rEvt.GetType() == EVENT_KEYINPUT ) { @@ -1794,7 +1794,7 @@ long SfxDockingWindow::Notify( NotifyEvent& rEvt ) if ( !DockingWindow::Notify( rEvt ) && SfxViewShell::Current() ) // then also for valid global accelerators. return SfxViewShell::Current()->GlobalKeyInput_Impl( *rEvt.GetKeyEvent() ); - return sal_True; + return true; } else if ( rEvt.GetType() == EVENT_LOSEFOCUS && !HasChildPathFocus() ) { diff --git a/sfx2/source/dialog/partwnd.cxx b/sfx2/source/dialog/partwnd.cxx index fb0058f9cb22..a0de0f568905 100644 --- a/sfx2/source/dialog/partwnd.cxx +++ b/sfx2/source/dialog/partwnd.cxx @@ -178,7 +178,7 @@ sal_Bool SfxPartDockWnd_Impl::QueryClose() //**************************************************************************** -long SfxPartDockWnd_Impl::Notify( NotifyEvent& rEvt ) +bool SfxPartDockWnd_Impl::Notify( NotifyEvent& rEvt ) { if( rEvt.GetType() == EVENT_GETFOCUS ) { diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index 067eae9919e5..2a971592ea2c 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -302,9 +302,9 @@ IMPL_LINK_NOARG(DropListBox_Impl, OnAsyncExecuteDrop) return 0; } -long DropListBox_Impl::Notify( NotifyEvent& rNEvt ) +bool DropListBox_Impl::Notify( NotifyEvent& rNEvt ) { - long nRet = 0; + bool nRet = false; if( rNEvt.GetType() == EVENT_KEYINPUT ) { const KeyCode& rKeyCode = rNEvt.GetKeyEvent()->GetKeyCode(); @@ -313,12 +313,12 @@ long DropListBox_Impl::Notify( NotifyEvent& rNEvt ) if( pDialog->bCanDel && KEY_DELETE == rKeyCode.GetCode()) { pDialog->DeleteHdl( NULL ); - nRet = 1; + nRet = true; } else if( KEY_RETURN == rKeyCode.GetCode()) { GetDoubleClickHdl().Call(this); - nRet = 1; + nRet = true; } } } @@ -524,7 +524,7 @@ private: protected: virtual void Command( const CommandEvent& rMEvt ); - virtual long Notify( NotifyEvent& rNEvt ); + virtual bool Notify( NotifyEvent& rNEvt ); virtual sal_Bool DoubleClickHdl(); virtual bool ExpandingHdl(); virtual void ExpandedHdl(); @@ -592,18 +592,18 @@ void StyleTreeListBox_Impl::Command( const CommandEvent& rCEvt ) //------------------------------------------------------------------------- -long StyleTreeListBox_Impl::Notify( NotifyEvent& rNEvt ) +bool StyleTreeListBox_Impl::Notify( NotifyEvent& rNEvt ) { // handle <RETURN> as double click - long nRet = 0; + bool nRet = false; if ( rNEvt.GetType() == EVENT_KEYINPUT ) { const KeyCode& rKeyCode = rNEvt.GetKeyEvent()->GetKeyCode(); if ( !rKeyCode.GetModifier() && KEY_RETURN == rKeyCode.GetCode() ) { aDoubleClickLink.Call( this ); - nRet = 1; + nRet = true; } } diff --git a/sfx2/source/inc/partwnd.hxx b/sfx2/source/inc/partwnd.hxx index 7dd94611bf55..0ecf7e55557f 100644 --- a/sfx2/source/inc/partwnd.hxx +++ b/sfx2/source/inc/partwnd.hxx @@ -61,7 +61,7 @@ class SfxPartDockWnd_Impl : public SfxDockingWindow { protected: virtual void Resize(); - virtual long Notify( NotifyEvent& rNEvt ); + virtual bool Notify( NotifyEvent& rNEvt ); public: SfxPartDockWnd_Impl( SfxBindings* pBindings, diff --git a/sfx2/source/inc/templdgi.hxx b/sfx2/source/inc/templdgi.hxx index 0011aed2796c..3520a5b4efa4 100644 --- a/sfx2/source/inc/templdgi.hxx +++ b/sfx2/source/inc/templdgi.hxx @@ -73,7 +73,7 @@ public: sal_uInt16 GetModifier() const { return nModifier; } - virtual long Notify( NotifyEvent& rNEvt ); + virtual bool Notify( NotifyEvent& rNEvt ); }; // class SfxActionListBox ------------------------------------------------ diff --git a/sfx2/source/sidebar/Deck.cxx b/sfx2/source/sidebar/Deck.cxx index 3d0f43c0fecf..0df23ae41b98 100644 --- a/sfx2/source/sidebar/Deck.cxx +++ b/sfx2/source/sidebar/Deck.cxx @@ -197,7 +197,7 @@ void Deck::DataChanged (const DataChangedEvent& rEvent) -long Deck::Notify (NotifyEvent& rEvent) +bool Deck::Notify (NotifyEvent& rEvent) { if (rEvent.GetType() == EVENT_COMMAND) { @@ -206,9 +206,7 @@ long Deck::Notify (NotifyEvent& rEvent) switch (pCommandEvent->GetCommand()) { case COMMAND_WHEEL: - return ProcessWheelEvent(pCommandEvent, rEvent) - ? sal_True - : sal_False; + return ProcessWheelEvent(pCommandEvent, rEvent); default: break; diff --git a/sfx2/source/sidebar/Deck.hxx b/sfx2/source/sidebar/Deck.hxx index 33eff61d7454..fb382a5b4ea4 100644 --- a/sfx2/source/sidebar/Deck.hxx +++ b/sfx2/source/sidebar/Deck.hxx @@ -67,7 +67,7 @@ public: virtual void Paint (const Rectangle& rUpdateArea); virtual void DataChanged (const DataChangedEvent& rEvent); - virtual long Notify (NotifyEvent& rEvent); + virtual bool Notify (NotifyEvent& rEvent); void PrintWindowTree (void); void PrintWindowTree (const ::std::vector<Panel*>& rPanels); diff --git a/sfx2/source/sidebar/SidebarToolBox.cxx b/sfx2/source/sidebar/SidebarToolBox.cxx index 95cf7d2246df..70eba9c0bca7 100644 --- a/sfx2/source/sidebar/SidebarToolBox.cxx +++ b/sfx2/source/sidebar/SidebarToolBox.cxx @@ -118,7 +118,7 @@ void SidebarToolBox::Paint (const Rectangle& rRect) -long SidebarToolBox::Notify (NotifyEvent& rEvent) +bool SidebarToolBox::Notify (NotifyEvent& rEvent) { if (rEvent.GetType() == EVENT_KEYINPUT) { diff --git a/sfx2/source/sidebar/TabBar.cxx b/sfx2/source/sidebar/TabBar.cxx index 353a2bb4238c..27f451b867f7 100644 --- a/sfx2/source/sidebar/TabBar.cxx +++ b/sfx2/source/sidebar/TabBar.cxx @@ -277,9 +277,9 @@ void TabBar::DataChanged (const DataChangedEvent& rDataChangedEvent) -long TabBar::Notify (NotifyEvent&) +bool TabBar::Notify (NotifyEvent&) { - return sal_False; + return false; } diff --git a/sfx2/source/sidebar/TabBar.hxx b/sfx2/source/sidebar/TabBar.hxx index 20d4cc9be173..01073ce6c30c 100644 --- a/sfx2/source/sidebar/TabBar.hxx +++ b/sfx2/source/sidebar/TabBar.hxx @@ -74,7 +74,7 @@ public: virtual void Paint (const Rectangle& rUpdateArea); virtual void DataChanged (const DataChangedEvent& rDataChangedEvent); - virtual long Notify (NotifyEvent& rEvent); + virtual bool Notify (NotifyEvent& rEvent); static sal_Int32 GetDefaultWidth (void); diff --git a/sfx2/source/view/frame2.cxx b/sfx2/source/view/frame2.cxx index 4eec35f809b7..bfca6b754a1e 100644 --- a/sfx2/source/view/frame2.cxx +++ b/sfx2/source/view/frame2.cxx @@ -73,7 +73,7 @@ public: virtual void DataChanged( const DataChangedEvent& rDCEvt ); virtual void StateChanged( StateChangedType nStateChange ); virtual long PreNotify( NotifyEvent& rNEvt ); - virtual long Notify( NotifyEvent& rEvt ); + virtual bool Notify( NotifyEvent& rEvt ); virtual void Resize(); virtual void GetFocus(); void DoResize(); @@ -97,10 +97,10 @@ void SfxFrameWindow_Impl::DataChanged( const DataChangedEvent& rDCEvt ) pWorkWin->DataChanged_Impl( rDCEvt ); } -long SfxFrameWindow_Impl::Notify( NotifyEvent& rNEvt ) +bool SfxFrameWindow_Impl::Notify( NotifyEvent& rNEvt ) { if ( pFrame->IsClosing_Impl() || !pFrame->GetFrameInterface().is() ) - return sal_False; + return false; SfxViewFrame* pView = pFrame->GetCurrentViewFrame(); if ( !pView || !pView->GetObjectShell() ) @@ -117,22 +117,22 @@ long SfxFrameWindow_Impl::Notify( NotifyEvent& rNEvt ) // if focus was on an external window, the clipboard content might have been changed pView->GetBindings().Invalidate( SID_PASTE ); pView->GetBindings().Invalidate( SID_PASTE_SPECIAL ); - return sal_True; + return true; } else if( rNEvt.GetType() == EVENT_KEYINPUT ) { if ( pView->GetViewShell()->KeyInput( *rNEvt.GetKeyEvent() ) ) - return sal_True; + return true; } else if ( rNEvt.GetType() == EVENT_EXECUTEDIALOG /*|| rNEvt.GetType() == EVENT_INPUTDISABLE*/ ) { pView->SetModalMode( sal_True ); - return sal_True; + return true; } else if ( rNEvt.GetType() == EVENT_ENDEXECUTEDIALOG /*|| rNEvt.GetType() == EVENT_INPUTENABLE*/ ) { pView->SetModalMode( sal_False ); - return sal_True; + return true; } return Window::Notify( rNEvt ); diff --git a/sfx2/source/view/printer.cxx b/sfx2/source/view/printer.cxx index 9d8c36c4e560..1e8d2bf49f7d 100644 --- a/sfx2/source/view/printer.cxx +++ b/sfx2/source/view/printer.cxx @@ -247,12 +247,12 @@ short SfxPrintOptionsDialog::Execute() //-------------------------------------------------------------------- -long SfxPrintOptionsDialog::Notify( NotifyEvent& rNEvt ) +bool SfxPrintOptionsDialog::Notify( NotifyEvent& rNEvt ) { if ( rNEvt.GetType() == EVENT_KEYINPUT ) { if ( rNEvt.GetKeyEvent()->GetKeyCode().GetCode() == KEY_F1 && pDlgImpl->mbHelpDisabled ) - return 1; // help disabled -> <F1> does nothing + return true; // help disabled -> <F1> does nothing } return ModalDialog::Notify( rNEvt ); |