diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-10-20 13:11:46 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-10-21 06:16:29 +0000 |
commit | 1c4243332213ad72ed63476c99693758d8cbcc40 (patch) | |
tree | 17ec2704c16465cca81007f5e93e0d2592566191 /sw/source | |
parent | 81bbede18f825bc5929d4d446144841ee782e679 (diff) |
loplugin:expandablemethodds in sw(part4)
Change-Id: Ifedc5be99775d00f09e03261c6bb446135ac796a
Reviewed-on: https://gerrit.libreoffice.org/30096
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/ui/config/optload.cxx | 7 | ||||
-rw-r--r-- | sw/source/ui/config/optpage.cxx | 6 | ||||
-rw-r--r-- | sw/source/ui/misc/glossary.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/cctrl/actctrl.cxx | 7 | ||||
-rw-r--r-- | sw/source/uibase/docvw/ShadowOverlayObject.cxx | 12 | ||||
-rw-r--r-- | sw/source/uibase/docvw/ShadowOverlayObject.hxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/inc/actctrl.hxx | 1 | ||||
-rw-r--r-- | sw/source/uibase/inc/conttree.hxx | 1 | ||||
-rw-r--r-- | sw/source/uibase/inc/glossary.hxx | 1 | ||||
-rw-r--r-- | sw/source/uibase/inc/optload.hxx | 1 | ||||
-rw-r--r-- | sw/source/uibase/inc/optpage.hxx | 9 | ||||
-rw-r--r-- | sw/source/uibase/inc/pview.hxx | 1 | ||||
-rw-r--r-- | sw/source/uibase/inc/srcview.hxx | 1 | ||||
-rw-r--r-- | sw/source/uibase/inc/toxmgr.hxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/index/toxmgr.cxx | 7 | ||||
-rw-r--r-- | sw/source/uibase/uiview/pview.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/uiview/srcview.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/utlui/glbltree.cxx | 3 |
18 files changed, 15 insertions, 52 deletions
diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx index 81eebd4c1635..aba994138a24 100644 --- a/sw/source/ui/config/optload.cxx +++ b/sw/source/ui/config/optload.cxx @@ -386,7 +386,7 @@ SwCaptionPreview::SwCaptionPreview(vcl::Window* pParent, WinBits nStyle) : Window(pParent, nStyle) , mbFontInitialized(false) { - Init(); + maDrawPos = Point(4, 6); } VCL_BUILDER_DECL_FACTORY(SwCaptionPreview) @@ -398,11 +398,6 @@ VCL_BUILDER_DECL_FACTORY(SwCaptionPreview) rRet = VclPtr<SwCaptionPreview>::Create(pParent, nBits); } -void SwCaptionPreview::Init() -{ - maDrawPos = Point(4, 6); -} - void SwCaptionPreview::ApplySettings(vcl::RenderContext& rRenderContext) { Wallpaper aBack(rRenderContext.GetSettings().GetStyleSettings().GetWindowColor()); diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index bd0ab49f141e..c599a6ed3e0f 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -1085,7 +1085,7 @@ void SwStdFontTabPage::PageCreated( const SfxAllItemSet& aSet) { const SfxUInt16Item* pFlagItem = aSet.GetItem<SfxUInt16Item>(SID_FONTMODE_TYPE, false); if (pFlagItem) - SetFontMode(sal::static_int_cast< sal_uInt8, sal_uInt16>( pFlagItem->GetValue())); + m_nFontGroup = sal::static_int_cast< sal_uInt8, sal_uInt16>( pFlagItem->GetValue() ); } SwTableOptionsTabPage::SwTableOptionsTabPage( vcl::Window* pParent, const SfxItemSet& rSet ) : @@ -1302,7 +1302,7 @@ void SwTableOptionsTabPage::PageCreated( const SfxAllItemSet& aSet) { const SwWrtShellItem* pWrtSh = aSet.GetItem<SwWrtShellItem>(SID_WRT_SHELL, false); if (pWrtSh) - SetWrtShell(pWrtSh->GetValue()); + m_pWrtShell = pWrtSh->GetValue(); } SwShdwCursorOptionsTabPage::SwShdwCursorOptionsTabPage( vcl::Window* pParent, @@ -1407,7 +1407,7 @@ void SwShdwCursorOptionsTabPage::PageCreated( const SfxAllItemSet& aSet ) { const SwWrtShellItem* pWrtSh = aSet.GetItem<SwWrtShellItem>(SID_WRT_SHELL, false); if (pWrtSh) - SetWrtShell(pWrtSh->GetValue()); + m_pWrtShell = pWrtSh->GetValue(); } bool SwShdwCursorOptionsTabPage::FillItemSet( SfxItemSet* rSet ) diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx index 62e7a9125939..1eb0027f8449 100644 --- a/sw/source/ui/misc/glossary.cxx +++ b/sw/source/ui/misc/glossary.cxx @@ -1121,7 +1121,7 @@ void SwGlossaryDlg::ResumeShowAutoText() } } } - ResetResumeData(); + bResume = false; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/cctrl/actctrl.cxx b/sw/source/uibase/cctrl/actctrl.cxx index 8a2a501b5855..95b97d6b186f 100644 --- a/sw/source/uibase/cctrl/actctrl.cxx +++ b/sw/source/uibase/cctrl/actctrl.cxx @@ -21,11 +21,6 @@ #include <vcl/builderfactory.hxx> #include "actctrl.hxx" -void NumEditAction::Action() -{ - aActionLink.Call( *this ); -} - bool NumEditAction::Notify( NotifyEvent& rNEvt ) { bool bHandled = false; @@ -38,7 +33,7 @@ bool NumEditAction::Notify( NotifyEvent& rNEvt ) if( aKeyCode.GetCode() == KEY_RETURN && !nModifier) { - Action(); + aActionLink.Call( *this ); bHandled = true; } diff --git a/sw/source/uibase/docvw/ShadowOverlayObject.cxx b/sw/source/uibase/docvw/ShadowOverlayObject.cxx index 15af795279cc..7bf63c5ca7b0 100644 --- a/sw/source/uibase/docvw/ShadowOverlayObject.cxx +++ b/sw/source/uibase/docvw/ShadowOverlayObject.cxx @@ -59,9 +59,7 @@ public: {} // data access - const basegfx::B2DPoint& getBasePosition() const { return maBasePosition; } const basegfx::B2DPoint& getSecondPosition() const { return maSecondPosition; } - ShadowState getShadowState() const { return maShadowState; } virtual bool operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const override; @@ -73,7 +71,7 @@ drawinglayer::primitive2d::Primitive2DContainer ShadowPrimitive::create2DDecompo { // get logic sizes in object coordinate system drawinglayer::primitive2d::Primitive2DContainer xRetval; - basegfx::B2DRange aRange(getBasePosition()); + basegfx::B2DRange aRange(maBasePosition); switch(maShadowState) { @@ -155,9 +153,9 @@ bool ShadowPrimitive::operator==( const drawinglayer::primitive2d::BasePrimitive { const ShadowPrimitive& rCompare = static_cast< const ShadowPrimitive& >(rPrimitive); - return (getBasePosition() == rCompare.getBasePosition() + return (maBasePosition == rCompare.maBasePosition && getSecondPosition() == rCompare.getSecondPosition() - && getShadowState() == rCompare.getShadowState()); + && maShadowState == rCompare.maShadowState); } return false; @@ -218,7 +216,7 @@ drawinglayer::primitive2d::Primitive2DContainer ShadowOverlayObject::createOverl { const drawinglayer::primitive2d::Primitive2DReference aReference( new ShadowPrimitive( getBasePosition(), - GetSecondPosition(), + maSecondPosition, GetShadowState() ) ); return drawinglayer::primitive2d::Primitive2DContainer { aReference }; } @@ -236,7 +234,7 @@ void ShadowOverlayObject::SetShadowState(ShadowState aState) void ShadowOverlayObject::SetPosition( const basegfx::B2DPoint& rPoint1, const basegfx::B2DPoint& rPoint2) { - if(!rPoint1.equal(getBasePosition()) || !rPoint2.equal(GetSecondPosition())) + if(!rPoint1.equal(getBasePosition()) || !rPoint2.equal(maSecondPosition)) { maBasePosition = rPoint1; maSecondPosition = rPoint2; diff --git a/sw/source/uibase/docvw/ShadowOverlayObject.hxx b/sw/source/uibase/docvw/ShadowOverlayObject.hxx index 7e8384dc392c..fb796b9b9e81 100644 --- a/sw/source/uibase/docvw/ShadowOverlayObject.hxx +++ b/sw/source/uibase/docvw/ShadowOverlayObject.hxx @@ -52,8 +52,6 @@ public: void SetShadowState(ShadowState aState); inline ShadowState GetShadowState() {return mShadowState;} - inline const basegfx::B2DPoint& GetSecondPosition() const { return maSecondPosition; } - void SetPosition( const basegfx::B2DPoint& rPoint1, const basegfx::B2DPoint& rPoint2 ); diff --git a/sw/source/uibase/inc/actctrl.hxx b/sw/source/uibase/inc/actctrl.hxx index a0dd15ac380a..2c2f7f8ca4c9 100644 --- a/sw/source/uibase/inc/actctrl.hxx +++ b/sw/source/uibase/inc/actctrl.hxx @@ -28,7 +28,6 @@ class SW_DLLPUBLIC NumEditAction: public NumericField Link<NumEditAction&,void> aActionLink; protected: - void Action(); virtual bool Notify( NotifyEvent& rNEvt ) override; public: NumEditAction(vcl::Window* pParent, WinBits nBits) diff --git a/sw/source/uibase/inc/conttree.hxx b/sw/source/uibase/inc/conttree.hxx index 3afdd3e135d5..525d11fe4fd2 100644 --- a/sw/source/uibase/inc/conttree.hxx +++ b/sw/source/uibase/inc/conttree.hxx @@ -325,7 +325,6 @@ protected: void GotoContent(const SwGlblDocContent*); sal_uInt16 GetEnableFlags() const; - static const SfxObjectShell* GetShowShell() {return pShowShell;} static void SetShowShell(const SfxObjectShell*pSet) {pShowShell = pSet;} DECL_STATIC_LINK(SwGlobalTree, ShowFrameHdl, void*, void); diff --git a/sw/source/uibase/inc/glossary.hxx b/sw/source/uibase/inc/glossary.hxx index 9cefe618c554..72075b5737a2 100644 --- a/sw/source/uibase/inc/glossary.hxx +++ b/sw/source/uibase/inc/glossary.hxx @@ -147,7 +147,6 @@ class SwGlossaryDlg : public SvxStandardDialog {rGroup = sResumeGroup; rShortName = sResumeShortName; return bResume;} void SetResumeData(const OUString& rGroup, const OUString& rShortName) {sResumeGroup = rGroup; sResumeShortName = rShortName; bResume = true;} - void ResetResumeData() {bResume = false;} public: SwGlossaryDlg(SfxViewFrame* pViewFrame, SwGlossaryHdl* pGlosHdl, SwWrtShell *pWrtShell); virtual ~SwGlossaryDlg() override; diff --git a/sw/source/uibase/inc/optload.hxx b/sw/source/uibase/inc/optload.hxx index ddf8f2a1461f..728c0f0ce4d4 100644 --- a/sw/source/uibase/inc/optload.hxx +++ b/sw/source/uibase/inc/optload.hxx @@ -111,7 +111,6 @@ private: Point maDrawPos; public: SwCaptionPreview(vcl::Window* pParent, WinBits nStyle); - void Init(); virtual void ApplySettings(vcl::RenderContext& rRenderContext) override; void SetPreviewText( const OUString& rText ); virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) override; diff --git a/sw/source/uibase/inc/optpage.hxx b/sw/source/uibase/inc/optpage.hxx index a76a1fc27f93..5f768e2d27a5 100644 --- a/sw/source/uibase/inc/optpage.hxx +++ b/sw/source/uibase/inc/optpage.hxx @@ -187,10 +187,6 @@ public: virtual bool FillItemSet(SfxItemSet* rSet) override; virtual void Reset(const SfxItemSet* rSet) override; - void SetFontMode(sal_uInt8 nGroup) - { - m_nFontGroup = nGroup; - } virtual void PageCreated(const SfxAllItemSet& aSet) override; }; @@ -230,7 +226,6 @@ public: virtual bool FillItemSet(SfxItemSet* rSet) override; virtual void Reset(const SfxItemSet* rSet) override; - void SetWrtShell(SwWrtShell* pSh) { m_pWrtShell = pSh; } virtual void PageCreated( const SfxAllItemSet& aSet) override; }; @@ -275,10 +270,6 @@ public: virtual bool FillItemSet( SfxItemSet* rSet ) override; virtual void Reset( const SfxItemSet* rSet ) override; - void SetWrtShell(SwWrtShell* pSh) - { - m_pWrtShell = pSh; - } virtual void PageCreated( const SfxAllItemSet& aSet ) override; }; diff --git a/sw/source/uibase/inc/pview.hxx b/sw/source/uibase/inc/pview.hxx index 4f62b6c1ca58..2ad2cadaaba9 100644 --- a/sw/source/uibase/inc/pview.hxx +++ b/sw/source/uibase/inc/pview.hxx @@ -258,7 +258,6 @@ public: const OUString& GetNewCursorPos() const { return m_sNewCursorPosition; } sal_uInt16 GetNewPage() const {return m_nNewPage;} - void SetNewPage(sal_uInt16 nSet) {m_nNewPage = nSet;} // Handler void Execute(SfxRequest&); diff --git a/sw/source/uibase/inc/srcview.hxx b/sw/source/uibase/inc/srcview.hxx index 86030a83b055..185aab03de43 100644 --- a/sw/source/uibase/inc/srcview.hxx +++ b/sw/source/uibase/inc/srcview.hxx @@ -80,7 +80,6 @@ public: sal_Int32 PrintSource( OutputDevice *pOutDev, sal_Int32 nPage, bool bCalcNumPagesOnly ); - void SourceSaved() {bSourceSaved = true;} bool HasSourceSaved() const {return bSourceSaved;} }; diff --git a/sw/source/uibase/inc/toxmgr.hxx b/sw/source/uibase/inc/toxmgr.hxx index d7849e0ba648..93a30e1d5135 100644 --- a/sw/source/uibase/inc/toxmgr.hxx +++ b/sw/source/uibase/inc/toxmgr.hxx @@ -284,8 +284,6 @@ public: bool UpdateOrInsertTOX(const SwTOXDescription& rDesc, SwTOXBase** ppBase, const SfxItemSet* pSet); const SwTOXType* GetTOXType(TOXTypes eTyp) const; - const SwTOXBase* GetCurTOX(); - }; // inlines diff --git a/sw/source/uibase/index/toxmgr.cxx b/sw/source/uibase/index/toxmgr.cxx index 042f228c7d36..b82d86da089a 100644 --- a/sw/source/uibase/index/toxmgr.cxx +++ b/sw/source/uibase/index/toxmgr.cxx @@ -255,11 +255,6 @@ void SwTOXMgr::PrevTOXMark(bool bSame) } } -// insert keyword index -const SwTOXBase* SwTOXMgr::GetCurTOX() -{ - return pSh->GetCurTOX(); -} const SwTOXType* SwTOXMgr::GetTOXType(TOXTypes eTyp) const { return pSh->GetTOXType(eTyp, 0); @@ -276,7 +271,7 @@ bool SwTOXMgr::UpdateOrInsertTOX(const SwTOXDescription& rDesc, { SwWait aWait( *pSh->GetView().GetDocShell(), true ); bool bRet = true; - const SwTOXBase* pCurTOX = ppBase && *ppBase ? *ppBase : GetCurTOX(); + const SwTOXBase* pCurTOX = ppBase && *ppBase ? *ppBase : pSh->GetCurTOX(); SwTOXBase* pTOX = const_cast<SwTOXBase*>(pCurTOX); SwTOXBase * pNewTOX = nullptr; diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx index 903ef5cda361..3d4c783e08d8 100644 --- a/sw/source/uibase/uiview/pview.cxx +++ b/sw/source/uibase/uiview/pview.cxx @@ -956,7 +956,7 @@ MOVEPAGE: //the direct neighbor is used if(GetViewShell()->IsDummyPage( nSelPage ) && GetViewShell()->IsDummyPage( --nSelPage )) nSelPage +=2; - SetNewPage( nSelPage ); + m_nNewPage = nSelPage; SfxViewFrame *pTmpFrame = GetViewFrame(); pTmpFrame->GetBindings().Execute( SID_VIEWSHELL0, nullptr, SfxCallMode::ASYNCHRON ); diff --git a/sw/source/uibase/uiview/srcview.cxx b/sw/source/uibase/uiview/srcview.cxx index 4967023159e6..5f6c16982342 100644 --- a/sw/source/uibase/uiview/srcview.cxx +++ b/sw/source/uibase/uiview/srcview.cxx @@ -356,7 +356,7 @@ void SwSrcView::Execute(SfxRequest& rReq) pMed->CloseOutStream(); pMed->Commit(); pDocShell->GetDoc()->getIDocumentState().ResetModified(); - SourceSaved(); + bSourceSaved = true; aEditWin->ClearModifyFlag(); } } diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx index 90febb4d8bbc..04080662b2dc 100644 --- a/sw/source/uibase/utlui/glbltree.cxx +++ b/sw/source/uibase/utlui/glbltree.cxx @@ -1213,8 +1213,7 @@ SwNavigationPI* SwGlobalTree::GetParentWindow() IMPL_STATIC_LINK_NOARG(SwGlobalTree, ShowFrameHdl, void*, void) { - const SfxObjectShell* pShell = SwGlobalTree::GetShowShell(); - SfxViewFrame* pFirst = pShell ? SfxViewFrame::GetFirst(pShell) : nullptr; + SfxViewFrame* pFirst = pShowShell ? SfxViewFrame::GetFirst(pShowShell) : nullptr; if (pFirst) pFirst->ToTop(); SwGlobalTree::SetShowShell(nullptr); |