From 2f69e16c723aab48ad59d17397d8946ec0a48138 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Thu, 8 Jan 2015 23:08:34 +0100 Subject: override the overloading of "overload" to decrease cognitive (over-)load Change-Id: I4d0e1de89d0bbdbea23bc5a46bf75ae0ce4e2796 --- sfx2/source/appl/appdde.cxx | 18 +++++++++--------- sfx2/source/appl/childwin.cxx | 2 +- sfx2/source/control/bindings.cxx | 8 ++++---- sfx2/source/dialog/dockwin.cxx | 8 ++++---- sfx2/source/dialog/styledlg.cxx | 2 +- sfx2/source/dialog/tabdlg.cxx | 2 +- sfx2/source/dialog/templdlg.cxx | 2 +- sfx2/source/doc/new.cxx | 2 +- sfx2/source/doc/objcont.cxx | 11 +++++------ sfx2/source/doc/objxtor.cxx | 6 +++--- sfx2/source/statbar/stbitem.cxx | 2 +- sfx2/source/toolbox/tbxitem.cxx | 2 +- sfx2/source/view/viewsh.cxx | 17 ++++++++--------- 13 files changed, 40 insertions(+), 42 deletions(-) (limited to 'sfx2/source') diff --git a/sfx2/source/appl/appdde.cxx b/sfx2/source/appl/appdde.cxx index e7d43427291e..7c0a5255256e 100644 --- a/sfx2/source/appl/appdde.cxx +++ b/sfx2/source/appl/appdde.cxx @@ -312,7 +312,7 @@ sal_Bool SfxAppEvent_Impl( const OUString& rCmd, const OUString& rEvent, /* Description] - This method can be overloaded by application developers, to receive + This method can be overridden by application developers, to receive DDE-commands directed to their SfxApplication subclass. The base implementation understands the API functionality of the @@ -342,7 +342,7 @@ long SfxApplication::DdeExecute( const OUString& rCmd ) // Expressed in our B /* [Description] - This method can be overloaded by application developers, to receive + This method can be overridden by application developers, to receive DDE-commands directed to the their SfxApplication subclass. The base implementation does nothing and returns 0. @@ -368,7 +368,7 @@ long SfxObjectShell::DdeExecute( const OUString& rCmd ) // Expressed in our B /* [Description] - This method can be overloaded by application developers, to receive + This method can be overridden by application developers, to receive DDE-data-requests directed to their SfxApplication subclass. The base implementation provides no data and returns false. @@ -384,7 +384,7 @@ bool SfxObjectShell::DdeGetData( const OUString&, // the Item to be /* [Description] - This method can be overloaded by application developers, to receive + This method can be overridden by application developers, to receive DDE-data directed to their SfxApplication subclass. The base implementation is not receiving any data and returns false. @@ -398,7 +398,7 @@ bool SfxObjectShell::DdeSetData( const OUString&, // the Item /* [Description] - This method can be overloaded by application developers, to establish + This method can be overridden by application developers, to establish a DDE-hotlink to their SfxApplication subclass. The base implementation is not generate a link and returns 0. @@ -427,7 +427,7 @@ void SfxObjectShell::ReconnectDdeLinks(SfxObjectShell& rServer) /* [Description] - This method can be overloaded by application developers, to receive + This method can be overridden by application developers, to receive DDE-commands directed to the their SfxApplication subclass. The base implementation understands the API functionality of the @@ -445,7 +445,7 @@ long SfxViewFrame::DdeExecute( const OUString& rCmd ) // Expressed in our BASI /* [Description] - This method can be overloaded by application developers, to receive + This method can be overridden by application developers, to receive DDE-data-requests directed to their SfxApplication subclass. The base implementation provides no data and returns false. @@ -459,7 +459,7 @@ bool SfxViewFrame::DdeGetData( const OUString&, // the Item to be add /* [Description] - This method can be overloaded by application developers, to receive + This method can be overridden by application developers, to receive DDE-data directed to their SfxApplication subclass. The base implementation is not receiving any data and returns false. @@ -473,7 +473,7 @@ bool SfxViewFrame::DdeSetData( const OUString&, // the Item to /* [Description] - This method can be overloaded by application developers, to establish + This method can be overridden by application developers, to establish a DDE-hotlink to their SfxApplication subclass. The base implementation is not generate a link and returns 0. diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx index e6ce4e136d2c..ea502805cd58 100644 --- a/sfx2/source/appl/childwin.cxx +++ b/sfx2/source/appl/childwin.cxx @@ -211,7 +211,7 @@ SfxChildWindow* SfxChildWindow::CreateChildWindow( sal_uInt16 nId, SfxChildWinFactory* pFact=0; sal_uInt16 nOldMode = Application::GetSystemWindowMode(); - // First search for ChildWindow in SDT; "Overloading has to be realized + // First search for ChildWindow in SDT; Overlay windows are realized // by using ChildWindowContext SfxApplication *pApp = SfxGetpApp(); { diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx index cb25df7e76aa..fe519483a4aa 100644 --- a/sfx2/source/control/bindings.cxx +++ b/sfx2/source/control/bindings.cxx @@ -772,14 +772,14 @@ void SfxBindings::Invalidate void SfxBindings::InvalidateShell ( - const SfxShell& rSh, /* , which Slot-Ids should be + const SfxShell& rSh, /* whose Slot-Ids should be invalidated */ bool bDeep /* true - also inherited slot IDs of SfxShell are invalidert + also the SfxShell's inherited slot IDs are invalidated false - the inherited and not overloaded Slot-Ids were - invalidiert */ + the inherited and not overridden Slot-Ids are + invalidated */ // for now always bDeep ) { diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx index 6218e0ce8bfc..e0d73638559d 100644 --- a/sfx2/source/dialog/dockwin.cxx +++ b/sfx2/source/dialog/dockwin.cxx @@ -542,8 +542,8 @@ void SfxDockingWindow::ToggleFloatingMode() the SfxDockingWindow and ensures the correct alignment on the parent window. Through PrepareToggleFloatMode and Initialize it is ensured that pImp-> GetLastAlignment() always delivers an allowed alignment. If this - method is overloaded from a derived class, then first the - SfxDockingWindow:: ToggleFloatingMode() must be called. + method is overridden by a derived class, then first the + SfxDockingWindow::ToggleFloatingMode() must be called. */ { if ( !pImp->bConstructed || !pMgr ) @@ -625,7 +625,7 @@ void SfxDockingWindow::StartDocking() /* [Description] This virtual method of the DockingWindow class takes the inner and outer - docking rectangle from the parent window. If this method is overloaded by a + docking rectangle from the parent window. If this method is overridden by a derived class, then SfxDockingWindow:StartDocking() has to be called at the end. */ @@ -759,7 +759,7 @@ void SfxDockingWindow::EndDocking( const Rectangle& rRect, bool bFloatMode ) /* [Description] Virtual method of the DockingWindow class ensures the correct alignment on - the parent window. If this method is overloaded by a derived class, then + the parent window. If this method is overridden by a derived class, then SfxDockingWindow::EndDocking() must be called first. */ { diff --git a/sfx2/source/dialog/styledlg.cxx b/sfx2/source/dialog/styledlg.cxx index 2b08f1f5b483..99e9408e37fb 100644 --- a/sfx2/source/dialog/styledlg.cxx +++ b/sfx2/source/dialog/styledlg.cxx @@ -104,7 +104,7 @@ short SfxStyleDialog::Ok() /* [Description] - Overloaded, so that always RET_OK is returned. + Override so that always RET_OK is returned. */ { diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx index d533f3571a3b..773ae341751d 100644 --- a/sfx2/source/dialog/tabdlg.cxx +++ b/sfx2/source/dialog/tabdlg.cxx @@ -228,7 +228,7 @@ void SfxTabPage::FillUserData() /* [Description] Virtual method is called by the base class in the destructor to save - specific information of the TabPage in the ini-file. When overloading a + specific information of the TabPage in the ini-file. When overriding a string must be compiled, which is then flushed with the . */ diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index ab9f9900cd6b..387069a395ae 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -2370,7 +2370,7 @@ void SfxTemplateDialog_Impl::LoadedFamilies() -// Overloaded Resize-Handler ( StarView ) +// Override Resize-Handler ( StarView ) // The size of the Listboxen is adjusted void SfxTemplateDialog_Impl::Resize() { diff --git a/sfx2/source/doc/new.cxx b/sfx2/source/doc/new.cxx index 6779c407a039..9a97255b6a02 100644 --- a/sfx2/source/doc/new.cxx +++ b/sfx2/source/doc/new.cxx @@ -75,7 +75,7 @@ void SfxPreviewWin_Impl::ImpPaint( Size aTmpSize = pFile ? pFile->GetPrefSize() : Size(1,1 ); DBG_ASSERT( aTmpSize.Height()*aTmpSize.Width(), - "size of first page is 0, overload GetFirstPageSize or set vis-area!" ); + "size of first page is 0, override GetFirstPageSize or set vis-area!" ); #define FRAME 4 long nWidth = pWindow->GetOutputSize().Width() - 2*FRAME; long nHeight = pWindow->GetOutputSize().Height() - 2*FRAME; diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx index 81edef6b545c..00e03330fb44 100644 --- a/sfx2/source/doc/objcont.cxx +++ b/sfx2/source/doc/objcont.cxx @@ -149,7 +149,7 @@ SfxObjectShell::CreatePreviewMetaFile_Impl( bool bFullContent ) const pFile->SetPrefSize( aTmpSize ); DBG_ASSERT( aTmpSize.Height()*aTmpSize.Width(), - "size of first page is 0, overload GetFirstPageSize or set vis-area!" ); + "size of first page is 0, override GetFirstPageSize or set vis-area!" ); pFile->Record( &aDevice ); @@ -324,11 +324,10 @@ void SfxObjectShell::LoadStyles /* [Description] - This method is called by the SFx if template styles are to be loaded. - Existing styles are in this case overwritten. The document has then to be - newly formatted. Therefore, the application of this method is usually - overloaded and its implementation is calling the implementation in - the base class. + This method is called by the SFx if styles are to be loaded from a template. + Existing styles are in this case overwritten. The document must then be + re-formatted. Therefore, applications usually override this method + and call the implementation in the base class. */ { diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx index dd38c8f407f4..8c08addfa2dd 100644 --- a/sfx2/source/doc/objxtor.cxx +++ b/sfx2/source/doc/objxtor.cxx @@ -845,9 +845,9 @@ void SfxObjectShell::InitBasicManager_Impl() [Note] - This method has to be called through the overloading of - (With the PStore from the parameters of load ()) - and from the overloading of (with PStore = 0). + This method has to be called by implementations of + (with its pStor parameter) and by implementations of + (with pStor = 0). */ { diff --git a/sfx2/source/statbar/stbitem.cxx b/sfx2/source/statbar/stbitem.cxx index fdea01e8890c..a69e3c3db5c2 100644 --- a/sfx2/source/statbar/stbitem.cxx +++ b/sfx2/source/statbar/stbitem.cxx @@ -440,7 +440,7 @@ void SfxStatusBarControl::StateChanged The base implementation includes items of type SfxStringItem where the text is entered in the status row field and SfxVoidItem, where the field is emptied. The base implementation - should not be called in overloaded methods. + should not be called in overriding methods. */ { diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx index c596ee72b16a..4c49cb942aa4 100644 --- a/sfx2/source/toolbox/tbxitem.cxx +++ b/sfx2/source/toolbox/tbxitem.cxx @@ -1337,7 +1337,7 @@ SfxPopupWindow* SfxPopupWindow::Clone() const /* [Description] - This method must be overloaded to show this Popup also in the + This method must be overridden to show this Popup also in the Presentation-mode. It is called when a Show() would be meaningless since the parent is no presentation window. When create a new window the bew Top-Window will be used automatically, diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index deed34f7a843..cf0457b88e30 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -905,8 +905,8 @@ ErrCode SfxViewShell::DoVerb(long /*nVerb*/) /* [Description] Virtual Method used to perform a Verb on a selected Object. - Since this Object is just known by the derived classes, DoVerb - must be overloaded. + Since this Object is only known by the derived classes, they must override + DoVerb. */ { @@ -1089,7 +1089,7 @@ void SfxViewShell::OuterResizePixel /* [Description] - This Method has to be overloaded to be able to react to the size-change of + Override this Method to be able to react to the size-change of the View. Thus the View is defined as the Edit window and also the attached Tools are defined (for example the ruler). @@ -1139,7 +1139,7 @@ void SfxViewShell::InnerResizePixel /* [Description] - This Method has to be overloaded to be able to react to the size-change of + Override this Method to be able to react to the size-change of the Edit window. The Edit window must not be changed either in size or position. @@ -1318,7 +1318,7 @@ SfxViewShell::~SfxViewShell() void SfxViewShell::Initialize() { - // overloaded by the application. + // override by the application. } bool SfxViewShell::PrepareClose @@ -1406,7 +1406,7 @@ OUString SfxViewShell::GetSelectionText /* [Description] - This Method can be overloaded by the programmers to return a text that + Override this Method to return a text that is included in the current selection. This is for example used when sending emails. @@ -1694,9 +1694,8 @@ void SfxViewShell::ShowCursor( bool /*bOn*/ ) /* [Description] - This Method has to be overloaded by the subclasses so that SFx from - the Cursor can be switched on and off. This happes for example with - with the running . + Subclasses must override this Method so that SFx can switch the + Cursor on and off, for example while a is running. */ { -- cgit