[Libreoffice-commits] core.git: sw/source
Noel Grandin
noel.grandin at collabora.co.uk
Fri Oct 21 06:16:53 UTC 2016
sw/source/ui/config/optload.cxx | 7 +------
sw/source/ui/config/optpage.cxx | 6 +++---
sw/source/ui/misc/glossary.cxx | 2 +-
sw/source/uibase/cctrl/actctrl.cxx | 7 +------
sw/source/uibase/docvw/ShadowOverlayObject.cxx | 12 +++++-------
sw/source/uibase/docvw/ShadowOverlayObject.hxx | 2 --
sw/source/uibase/inc/actctrl.hxx | 1 -
sw/source/uibase/inc/conttree.hxx | 1 -
sw/source/uibase/inc/glossary.hxx | 1 -
sw/source/uibase/inc/optload.hxx | 1 -
sw/source/uibase/inc/optpage.hxx | 9 ---------
sw/source/uibase/inc/pview.hxx | 1 -
sw/source/uibase/inc/srcview.hxx | 1 -
sw/source/uibase/inc/toxmgr.hxx | 2 --
sw/source/uibase/index/toxmgr.cxx | 7 +------
sw/source/uibase/uiview/pview.cxx | 2 +-
sw/source/uibase/uiview/srcview.cxx | 2 +-
sw/source/uibase/utlui/glbltree.cxx | 3 +--
18 files changed, 15 insertions(+), 52 deletions(-)
New commits:
commit 1c4243332213ad72ed63476c99693758d8cbcc40
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Thu Oct 20 13:11:46 2016 +0200
loplugin:expandablemethodds in sw(part4)
Change-Id: Ifedc5be99775d00f09e03261c6bb446135ac796a
Reviewed-on: https://gerrit.libreoffice.org/30096
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx
index 81eebd4..aba9941 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 bd0ab49..c599a6e 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 62e7a91..1eb0027 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 8a2a501..95b97d6 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 15af795..7bf63c5 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 7e8384d..fb796b9 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 a0dd15ac..2c2f7f8 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 3afdd3e..525d11f 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 9cefe61..72075b5 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 ddf8f2a..728c0f0 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 a76a1fc..5f768e2 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 4f62b6c..2ad2cad 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 86030a8..185aab0 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 d7849e0..93a30e1 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 042f228..b82d86d 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 903ef5c..3d4c783 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 4967023..5f6c169 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 90febb4..0408066 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);
More information about the Libreoffice-commits
mailing list