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 --- sw/source/core/access/acccontext.cxx | 12 ++++++------ sw/source/core/attr/cellatr.cxx | 2 +- sw/source/core/attr/format.cxx | 4 ++-- sw/source/core/draw/dcontact.cxx | 4 ++-- sw/source/core/draw/dview.cxx | 2 +- sw/source/core/inc/dflyobj.hxx | 2 +- sw/source/core/inc/dview.hxx | 4 ++-- sw/source/core/inc/swcache.hxx | 3 ++- sw/source/core/layout/atrfrm.cxx | 2 +- 9 files changed, 18 insertions(+), 17 deletions(-) (limited to 'sw/source/core') diff --git a/sw/source/core/access/acccontext.cxx b/sw/source/core/access/acccontext.cxx index 8021c1908a98..414bf5141473 100644 --- a/sw/source/core/access/acccontext.cxx +++ b/sw/source/core/access/acccontext.cxx @@ -680,8 +680,8 @@ sal_Int16 SAL_CALL SwAccessibleContext::getAccessibleRole (void) OUString SAL_CALL SwAccessibleContext::getAccessibleDescription (void) throw (uno::RuntimeException, std::exception) { - OSL_ENSURE( false, "description needs to be overloaded" ); - THROW_RUNTIME_EXCEPTION( XAccessibleContext, "internal error (method must be overloaded)" ); + OSL_ENSURE(false, "description needs to be overriden"); + THROW_RUNTIME_EXCEPTION( XAccessibleContext, "internal error (method must be overridden)" ); } OUString SAL_CALL SwAccessibleContext::getAccessibleName (void) @@ -988,9 +988,9 @@ sal_Int32 SAL_CALL SwAccessibleContext::getBackground() OUString SAL_CALL SwAccessibleContext::getImplementationName() throw( uno::RuntimeException, std::exception ) { - OSL_ENSURE( false, "implementation name needs to be overloaded" ); + OSL_ENSURE( false, "implementation name needs to be overridden" ); - THROW_RUNTIME_EXCEPTION( lang::XServiceInfo, "implementation name needs to be overloaded" ) + THROW_RUNTIME_EXCEPTION( lang::XServiceInfo, "implementation name needs to be overridden" ) } sal_Bool SAL_CALL SwAccessibleContext::supportsService (const OUString& ServiceName) @@ -1002,8 +1002,8 @@ sal_Bool SAL_CALL SwAccessibleContext::supportsService (const OUString& ServiceN uno::Sequence< OUString > SAL_CALL SwAccessibleContext::getSupportedServiceNames() throw( uno::RuntimeException, std::exception ) { - OSL_ENSURE( false, "supported services names needs to be overloaded" ); - THROW_RUNTIME_EXCEPTION( lang::XServiceInfo, "supported services needs to be overloaded" ) + OSL_ENSURE( false, "supported services names needs to be overridden" ); + THROW_RUNTIME_EXCEPTION( lang::XServiceInfo, "supported services needs to be overridden" ) } void SwAccessibleContext::DisposeShape( const SdrObject *pObj, diff --git a/sw/source/core/attr/cellatr.cxx b/sw/source/core/attr/cellatr.cxx index 8586cdf480da..2ef00af60f7e 100644 --- a/sw/source/core/attr/cellatr.cxx +++ b/sw/source/core/attr/cellatr.cxx @@ -75,7 +75,7 @@ SfxPoolItem* SwTblBoxFormula::Clone( SfxItemPool* ) const E.g. TextFeld -> TextNode, or BoxAttribute -> BoxStartNode - Caution: Has to be overloaded when inheriting. + Caution: Must override when inheriting. */ const SwNode* SwTblBoxFormula::GetNodeOfFormula() const { diff --git a/sw/source/core/attr/format.cxx b/sw/source/core/attr/format.cxx index 036f9451ffab..0a2d85d7b3fe 100644 --- a/sw/source/core/attr/format.cxx +++ b/sw/source/core/attr/format.cxx @@ -766,7 +766,7 @@ void SwFmt::DelDiffs( const SfxItemSet& rSet ) /** SwFmt::IsBackgroundTransparent Virtual method to determine, if background of format is transparent. - Default implementation returns false. Thus, subclasses have to overload + Default implementation returns false. Thus, subclasses have to override method, if the specific subclass can have a transparent background. @return false, default implementation @@ -779,7 +779,7 @@ bool SwFmt::IsBackgroundTransparent() const /** SwFmt::IsShadowTransparent Virtual method to determine, if shadow of format is transparent. - Default implementation returns false. Thus, subclasses have to overload + Default implementation returns false. Thus, subclasses have to override method, if the specific subclass can have a transparent shadow. @return false, default implementation diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx index 7d9364287ae5..9d10d293bee7 100644 --- a/sw/source/core/draw/dcontact.cxx +++ b/sw/source/core/draw/dcontact.cxx @@ -753,7 +753,7 @@ SdrObject* SwDrawContact::GetMaster() } /** - * @note Overloading in order to assert, if the + * @note Override in order to assert, if the * 'master' drawing object is replaced. The latter is correctly handled, * if handled by method . Thus, * assert only, if a debug level is given. @@ -2525,7 +2525,7 @@ bool SwDrawVirtObj::HasTextEdit() const return rRefObj.HasTextEdit(); } -// overloaded 'layer' methods for 'virtual' drawing object to assure, +// override 'layer' methods for 'virtual' drawing object to assure // that layer of 'virtual' object is the layer of the referenced object. SdrLayerID SwDrawVirtObj::GetLayer() const { diff --git a/sw/source/core/draw/dview.cxx b/sw/source/core/draw/dview.cxx index 77355c3ec781..b7f28fcb6bd4 100644 --- a/sw/source/core/draw/dview.cxx +++ b/sw/source/core/draw/dview.cxx @@ -192,7 +192,7 @@ SdrObject* SwDrawView::CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTo if(pRetval) { - // overloaded to allow extra handling when picking SwVirtFlyDrawObj's + // override to allow extra handling when picking SwVirtFlyDrawObj's pRetval = impLocalHitCorrection(pRetval, rPnt, nTol, GetMarkedObjectList()); } diff --git a/sw/source/core/inc/dflyobj.hxx b/sw/source/core/inc/dflyobj.hxx index 058e64c13d8e..4afba0e1b51a 100644 --- a/sw/source/core/inc/dflyobj.hxx +++ b/sw/source/core/inc/dflyobj.hxx @@ -83,7 +83,7 @@ public: SwVirtFlyDrawObj(SdrObject& rNew, SwFlyFrm* pFly); virtual ~SwVirtFlyDrawObj(); - // overloaded method of base class SdrVirtObj + // override method of base class SdrVirtObj virtual void TakeObjInfo( SdrObjTransformInfoRec& rInfo ) const SAL_OVERRIDE; // we treat the size calculation completely on ourself here diff --git a/sw/source/core/inc/dview.hxx b/sw/source/core/inc/dview.hxx index f556a8bca5dc..4c5ec084dcb1 100644 --- a/sw/source/core/inc/dview.hxx +++ b/sw/source/core/inc/dview.hxx @@ -71,7 +71,7 @@ protected: // add custom handles (used by other apps, e.g. AnchorPos) virtual void AddCustomHdl() SAL_OVERRIDE; - // overloaded to allow extra handling when picking SwVirtFlyDrawObj's + // override to allow extra handling when picking SwVirtFlyDrawObj's using FmFormView::CheckSingleSdrObjectHit; virtual SdrObject* CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObject* pObj, SdrPageView* pPV, sal_uLong nOptions, const SetOfByte* pMVisLay) const SAL_OVERRIDE; @@ -87,7 +87,7 @@ public: virtual void MarkListHasChanged() SAL_OVERRIDE; // #i7672# - // Overload to resue edit background color in active text edit view (OutlinerView) + // Override to resue edit background color in active text edit view (OutlinerView) virtual void ModelHasChanged() SAL_OVERRIDE; virtual void ObjOrderChanged( SdrObject* pObj, sal_uLong nOldPos, diff --git a/sw/source/core/inc/swcache.hxx b/sw/source/core/inc/swcache.hxx index 0eee0c13f982..6657b1ca85f7 100644 --- a/sw/source/core/inc/swcache.hxx +++ b/sw/source/core/inc/swcache.hxx @@ -215,7 +215,8 @@ public: virtual bool IsAvailable() const; - /// Shorthand for those who know, that they did not overload isAvailable() + /// Shorthand for those who know that they did not override isAvailable() + /// FIXME: wtf? bool IsAvail() const { return pObj != 0; } }; diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx index a0f0bd2eb487..ec3c2945f2ff 100644 --- a/sw/source/core/layout/atrfrm.cxx +++ b/sw/source/core/layout/atrfrm.cxx @@ -3093,7 +3093,7 @@ OUString SwFlyFrmFmt::GetObjDescription() const /** SwFlyFrmFmt::IsBackgroundTransparent - for #99657# - OD 22.08.2002 - overloading virtual method and its default implementation, + OD 22.08.2002 - overriding virtual method and its default implementation, because format of fly frame provides transparent backgrounds. Method determines, if background of fly frame is transparent. -- cgit v1.2.3