summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-12-12 16:57:30 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-12-13 08:12:45 +0100
commitd59987b164bc32efe8f99ad49c139b4fc7ca3c2f (patch)
tree765652d6e940a5bdf43322ed54aa2f4c14116418 /sw
parentb4641df5de7842d6a8fc2c4f839214bf01160c8c (diff)
loplugin:expandablemethods
Change-Id: I333d91ea5ce78c82e9bb107f934614efc7bfb8f7 Reviewed-on: https://gerrit.libreoffice.org/85078 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/html/htmlftn.cxx5
-rw-r--r--sw/source/filter/html/htmltab.cxx4
-rw-r--r--sw/source/filter/html/swhtml.cxx2
-rw-r--r--sw/source/filter/html/swhtml.hxx1
-rw-r--r--sw/source/filter/ww8/wrtww8.hxx1
-rw-r--r--sw/source/filter/ww8/wrtww8gr.cxx2
-rw-r--r--sw/source/ui/index/multmrk.cxx7
-rw-r--r--sw/source/uibase/docvw/SidebarTxtControlAcc.cxx9
-rw-r--r--sw/source/uibase/inc/multmrk.hxx9
-rw-r--r--sw/source/uibase/inc/unotools.hxx1
-rw-r--r--sw/source/uibase/utlui/unotools.cxx2
11 files changed, 11 insertions, 32 deletions
diff --git a/sw/source/filter/html/htmlftn.cxx b/sw/source/filter/html/htmlftn.cxx
index 4e58dc4a3e27..79c61648ab98 100644
--- a/sw/source/filter/html/htmlftn.cxx
+++ b/sw/source/filter/html/htmlftn.cxx
@@ -212,11 +212,6 @@ void SwHTMLParser::InsertFootEndNoteText()
m_pFootEndNoteImpl->sContent += aToken;
}
-void SwHTMLParser::DeleteFootEndNoteImpl()
-{
- m_pFootEndNoteImpl.reset();
-}
-
SwNodeIndex *SwHTMLParser::GetFootEndNoteSection( const OUString& rName )
{
SwNodeIndex *pStartNodeIdx = nullptr;
diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx
index 56c3457b7fb2..75aaadd620a8 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -608,8 +608,6 @@ public:
void MakeParentContents();
- bool GetIsParentHeader() const { return m_bIsParentHead; }
-
bool HasToFly() const { return m_bHasToFly; }
void SetTable( const SwStartNode *pStNd, std::unique_ptr<HTMLTableContext> pCntxt,
@@ -2508,7 +2506,7 @@ void HTMLTable::MakeParentContents()
if( !GetContext() && !HasParentSection() )
{
SetParentContents(
- m_pParser->InsertTableContents( GetIsParentHeader() ) );
+ m_pParser->InsertTableContents( m_bIsParentHead ) );
SetHasParentSection( true );
}
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index 7cc45bbe1a04..b2e0f520b961 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -486,7 +486,7 @@ SwHTMLParser::~SwHTMLParser()
m_pCSS1Parser.reset();
m_pNumRuleInfo.reset();
DeleteFormImpl();
- DeleteFootEndNoteImpl();
+ m_pFootEndNoteImpl.reset();
OSL_ENSURE(!m_xTable.get(), "It exists still an open table");
m_pImageMaps.reset();
diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx
index 5aab2fe5d43e..dc31880f3ec0 100644
--- a/sw/source/filter/html/swhtml.hxx
+++ b/sw/source/filter/html/swhtml.hxx
@@ -840,7 +840,6 @@ private:
void FinishFootEndNote();
void InsertFootEndNoteText();
SwNodeIndex *GetFootEndNoteSection( const OUString& rName );
- void DeleteFootEndNoteImpl();
sal_Int32 StripTrailingLF();
diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx
index 44bf1870f2c1..248f3c238148 100644
--- a/sw/source/filter/ww8/wrtww8.hxx
+++ b/sw/source/filter/ww8/wrtww8.hxx
@@ -1048,7 +1048,6 @@ public:
bool MiserableFormFieldExportHack(const SwFrameFormat& rFrameFormat);
- SvxMSExportOLEObjects& GetOLEExp() { return *m_pOLEExp; }
SwMSConvertControls& GetOCXExp() { return *m_pOCXExp; }
void ExportDopTypography(WW8DopTypography &rTypo);
diff --git a/sw/source/filter/ww8/wrtww8gr.cxx b/sw/source/filter/ww8/wrtww8gr.cxx
index bb0ff68e4d96..0751ce007087 100644
--- a/sw/source/filter/ww8/wrtww8gr.cxx
+++ b/sw/source/filter/ww8/wrtww8gr.cxx
@@ -250,7 +250,7 @@ void WW8Export::OutputOLENode( const SwOLENode& rOLENode )
{
sal_Int64 nAspect = rOLENode.GetAspect();
svt::EmbeddedObjectRef aObjRef( xObj, nAspect );
- GetOLEExp().ExportOLEObject( aObjRef, *xOleStg );
+ m_pOLEExp->ExportOLEObject( aObjRef, *xOleStg );
if ( nAspect == embed::Aspects::MSOLE_ICON )
{
OUString aObjInfo( "\3ObjInfo" );
diff --git a/sw/source/ui/index/multmrk.cxx b/sw/source/ui/index/multmrk.cxx
index 7cc876e1f004..64e2b5c9f451 100644
--- a/sw/source/ui/index/multmrk.cxx
+++ b/sw/source/ui/index/multmrk.cxx
@@ -52,9 +52,12 @@ IMPL_LINK( SwMultiTOXMarkDlg, SelectHdl, weld::TreeView&, rBox, void )
}
}
-void SwMultiTOXMarkDlg::Apply()
+short SwMultiTOXMarkDlg::run()
{
- m_rMgr.SetCurTOXMark(m_nPos);
+ short nRet = GenericDialogController::run();
+ if (nRet == RET_OK)
+ m_rMgr.SetCurTOXMark(m_nPos);
+ return nRet;
}
SwMultiTOXMarkDlg::~SwMultiTOXMarkDlg()
diff --git a/sw/source/uibase/docvw/SidebarTxtControlAcc.cxx b/sw/source/uibase/docvw/SidebarTxtControlAcc.cxx
index e20fbc4f2a4e..afbd7b16c438 100644
--- a/sw/source/uibase/docvw/SidebarTxtControlAcc.cxx
+++ b/sw/source/uibase/docvw/SidebarTxtControlAcc.cxx
@@ -154,8 +154,6 @@ class SidebarTextControlAccessibleContext : public VCLXAccessibleComponent
std::unique_ptr<::accessibility::AccessibleTextHelper> mpAccessibleTextHelper;
::osl::Mutex maMutex;
-
- void defunc();
};
}
@@ -168,11 +166,6 @@ SidebarTextControlAccessibleContext::SidebarTextControlAccessibleContext( Sideba
mpAccessibleTextHelper->SetEventSource( rSidebarTextControl.GetWindowPeer() );
}
-void SidebarTextControlAccessibleContext::defunc()
-{
- mpAccessibleTextHelper.reset();
-}
-
sal_Int32 SAL_CALL SidebarTextControlAccessibleContext::getAccessibleChildCount()
{
osl::MutexGuard aGuard( maMutex );
@@ -231,7 +224,7 @@ void SidebarTextControlAccessibleContext::ProcessWindowEvent( const VclWindowEve
{
case VclEventId::ObjectDying:
{
- defunc();
+ mpAccessibleTextHelper.reset();
}
break;
case VclEventId::WindowGetFocus:
diff --git a/sw/source/uibase/inc/multmrk.hxx b/sw/source/uibase/inc/multmrk.hxx
index 0549d09b9ecf..6edca05cebc2 100644
--- a/sw/source/uibase/inc/multmrk.hxx
+++ b/sw/source/uibase/inc/multmrk.hxx
@@ -34,17 +34,10 @@ class SwMultiTOXMarkDlg : public weld::GenericDialogController
std::unique_ptr<weld::Label> m_xTextFT;
std::unique_ptr<weld::TreeView> m_xTOXLB;
- void Apply();
public:
SwMultiTOXMarkDlg(weld::Window* pParent, SwTOXMgr &rTOXMgr);
virtual ~SwMultiTOXMarkDlg() override;
- virtual short run() override
- {
- short nRet = GenericDialogController::run();
- if (nRet == RET_OK)
- Apply();
- return nRet;
- }
+ virtual short run() override;
};
#endif // INCLUDED_SW_SOURCE_UIBASE_INC_MULTMRK_HXX
diff --git a/sw/source/uibase/inc/unotools.hxx b/sw/source/uibase/inc/unotools.hxx
index 830e39085a52..76a371740916 100644
--- a/sw/source/uibase/inc/unotools.hxx
+++ b/sw/source/uibase/inc/unotools.hxx
@@ -69,7 +69,6 @@ public:
virtual ~SwOneExampleFrame() override;
css::uno::Reference< css::frame::XModel > & GetModel() {return m_xModel;}
- css::uno::Reference< css::frame::XController > & GetController() {return m_xController;}
css::uno::Reference< css::text::XTextCursor > & GetTextCursor() {return m_xCursor;}
void ClearDocument();
diff --git a/sw/source/uibase/utlui/unotools.cxx b/sw/source/uibase/utlui/unotools.cxx
index 24c7069b95c3..f6ad9b7ce0c9 100644
--- a/sw/source/uibase/utlui/unotools.cxx
+++ b/sw/source/uibase/utlui/unotools.cxx
@@ -134,7 +134,7 @@ bool SwOneExampleFrame::Command(const CommandEvent& rCEvt)
case CommandEventId::ContextMenu:
{
//#125881# quickly clicking crashes because the control is not fully initialized
- if (GetController().is())
+ if (m_xController.is())
return CreatePopup(rCEvt.GetMousePosPixel());
}
break;