summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-10-20 11:42:50 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-10-20 17:55:01 +0000
commite8260df1d67baf807771cd5c740164a227856515 (patch)
treefbf45c4cdede1d4fcb880342e544fa58cb23e3a6 /sw/source
parent52350c15b37573e160f25d39565f577fc7189955 (diff)
loplugin:expandablemethodds in sw(part2)
Change-Id: Idc2118899a8063099b66c0f5db40d8402db063d1 Reviewed-on: https://gerrit.libreoffice.org/30083 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/doc/htmltbl.cxx4
-rw-r--r--sw/source/core/doc/notxtfrm.cxx6
-rw-r--r--sw/source/core/inc/frame.hxx3
-rw-r--r--sw/source/core/inc/layact.hxx2
-rw-r--r--sw/source/core/inc/notxtfrm.hxx2
-rw-r--r--sw/source/core/inc/pagefrm.hxx2
-rw-r--r--sw/source/core/inc/unoport.hxx3
-rw-r--r--sw/source/core/layout/layact.cxx4
-rw-r--r--sw/source/core/layout/pagechg.cxx4
-rw-r--r--sw/source/core/layout/ssfrm.cxx6
-rw-r--r--sw/source/core/text/pordrop.hxx1
-rw-r--r--sw/source/core/text/porfld.cxx6
-rw-r--r--sw/source/core/text/porfld.hxx4
-rw-r--r--sw/source/core/text/portab.hxx1
-rw-r--r--sw/source/core/text/txtdrop.cxx2
-rw-r--r--sw/source/core/text/txttab.cxx4
-rw-r--r--sw/source/core/text/widorp.cxx2
-rw-r--r--sw/source/core/text/widorp.hxx2
-rw-r--r--sw/source/core/unocore/unoportenum.cxx2
-rw-r--r--sw/source/filter/html/parcss1.cxx6
-rw-r--r--sw/source/filter/html/parcss1.hxx9
-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.cxx5
25 files changed, 22 insertions, 62 deletions
diff --git a/sw/source/core/doc/htmltbl.cxx b/sw/source/core/doc/htmltbl.cxx
index d3fe02c2c226..ace49e99aedf 100644
--- a/sw/source/core/doc/htmltbl.cxx
+++ b/sw/source/core/doc/htmltbl.cxx
@@ -71,8 +71,6 @@ public:
SwHTMLTableLayoutConstraints *InsertNext( SwHTMLTableLayoutConstraints *pNxt );
SwHTMLTableLayoutConstraints* GetNext() const { return pNext; }
- sal_uInt16 GetRow() const { return nRow; }
-
sal_uInt16 GetColSpan() const { return nColSpan; }
sal_uInt16 GetColumn() const { return nCol; }
};
@@ -143,7 +141,7 @@ SwHTMLTableLayoutConstraints *SwHTMLTableLayoutConstraints::InsertNext(
SwHTMLTableLayoutConstraints *pConstr = this;
while( pConstr )
{
- if( pConstr->GetRow() > pNxt->GetRow() ||
+ if( pConstr->nRow > pNxt->nRow ||
pConstr->GetColumn() > pNxt->GetColumn() )
break;
pPrev = pConstr;
diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx
index 6eb7bb4398b6..27beaa0dfb60 100644
--- a/sw/source/core/doc/notxtfrm.cxx
+++ b/sw/source/core/doc/notxtfrm.cxx
@@ -145,12 +145,6 @@ static void lcl_PaintReplacement( const SwRect &rRect, const OUString &rText,
SwNoTextFrame::SwNoTextFrame(SwNoTextNode * const pNode, SwFrame* pSib )
: SwContentFrame( pNode, pSib )
{
- InitCtor();
-}
-
-/// Initialization: Currently add the Frame to the Cache
-void SwNoTextFrame::InitCtor()
-{
mnFrameType = SwFrameType::NoTxt;
}
diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx
index a3451ee44adc..fb9dfec03965 100644
--- a/sw/source/core/inc/frame.hxx
+++ b/sw/source/core/inc/frame.hxx
@@ -438,14 +438,11 @@ public:
inline bool IsVertical() const;
inline bool IsVertLR() const;
- inline bool GetVerticalFlag() const { return mbVertical; }
inline void SetDerivedVert( bool bNew ){ mbDerivedVert = bNew; }
inline void SetInvalidVert( bool bNew) { mbInvalidVert = bNew; }
inline bool IsRightToLeft() const;
- inline bool GetRightToLeftFlag() const { return mbRightToLeft; }
inline void SetDerivedR2L( bool bNew ) { mbDerivedR2L = bNew; }
- inline void SetInvalidR2L( bool bNew ) { mbInvalidR2L = bNew; }
void CheckDirChange();
// returns upper left frame position for LTR and
diff --git a/sw/source/core/inc/layact.hxx b/sw/source/core/inc/layact.hxx
index 247260d72597..0541a20d6eae 100644
--- a/sw/source/core/inc/layact.hxx
+++ b/sw/source/core/inc/layact.hxx
@@ -116,7 +116,6 @@ class SwLayAction
bool RemoveEmptyBrowserPages();
inline void CheckIdleEnd();
- inline std::clock_t GetStartTicks() { return m_nStartTicks; }
public:
SwLayAction( SwRootFrame *pRt, SwViewShellImp *pImp );
@@ -130,7 +129,6 @@ public:
bool IsWaitAllowed() const { return m_bWaitAllowed; }
bool IsNextCycle() const { return m_bNextCycle; }
bool IsInput() const { return m_bInput; }
- bool IsWait() const { return nullptr != m_pWait; }
bool IsPaint() const { return m_bPaint; }
bool IsIdle() const { return m_bIdle; }
bool IsReschedule() const { return m_bReschedule; }
diff --git a/sw/source/core/inc/notxtfrm.hxx b/sw/source/core/inc/notxtfrm.hxx
index 3a4861697fd7..ce44b31b90d0 100644
--- a/sw/source/core/inc/notxtfrm.hxx
+++ b/sw/source/core/inc/notxtfrm.hxx
@@ -32,8 +32,6 @@ class SwNoTextFrame: public SwContentFrame
const Size& GetSize() const;
- void InitCtor();
-
void Format ( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = nullptr ) override;
void PaintPicture( vcl::RenderContext*, const SwRect& ) const;
diff --git a/sw/source/core/inc/pagefrm.hxx b/sw/source/core/inc/pagefrm.hxx
index 54fed6384519..f1505fa63ba7 100644
--- a/sw/source/core/inc/pagefrm.hxx
+++ b/sw/source/core/inc/pagefrm.hxx
@@ -190,8 +190,6 @@ public:
inline sal_uInt16 GetPhyPageNum() const { return m_nPhyPageNum;}
inline void SetPhyPageNum( sal_uInt16 nNum ) { m_nPhyPageNum = nNum;}
- inline void DecrPhyPageNum() { --m_nPhyPageNum; }
- inline void IncrPhyPageNum() { ++m_nPhyPageNum; }
/// Validate, invalidate and query the Page status
/// Layout/Content and Fly/non-Fly respectively are inspected separately
diff --git a/sw/source/core/inc/unoport.hxx b/sw/source/core/inc/unoport.hxx
index 6c9e24a4c672..fa82c830c06c 100644
--- a/sw/source/core/inc/unoport.hxx
+++ b/sw/source/core/inc/unoport.hxx
@@ -236,9 +236,6 @@ class SwXTextPortionEnumeration
TextRangeList_t m_Portions; // contains all portions, filled by ctor
sw::UnoCursorPointer m_pUnoCursor;
- SwUnoCursor& GetCursor() const
- {return *m_pUnoCursor;}
-
protected:
virtual ~SwXTextPortionEnumeration() override;
diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx
index 54ce00bb4d52..152410bed34f 100644
--- a/sw/source/core/layout/layact.cxx
+++ b/sw/source/core/layout/layact.cxx
@@ -85,8 +85,8 @@
void SwLayAction::CheckWaitCursor()
{
RESCHEDULE
- if ( !IsWait() && IsWaitAllowed() && IsPaint() &&
- ((std::clock() - GetStartTicks()) * 1000 / CLOCKS_PER_SEC >= CLOCKS_PER_SEC/2) )
+ if ( !m_pWait && IsWaitAllowed() && IsPaint() &&
+ ((std::clock() - m_nStartTicks) * 1000 / CLOCKS_PER_SEC >= CLOCKS_PER_SEC/2) )
{
m_pWait = new SwWait( *m_pRoot->GetFormat()->GetDoc()->GetDocShell(), true );
}
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx
index 0257f12721e5..8405280e5169 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -828,7 +828,7 @@ void SwPageFrame::Cut()
{
while ( pPg )
{
- pPg->DecrPhyPageNum(); //inline --nPhyPageNum
+ --pPg->m_nPhyPageNum;
pPg = static_cast<SwPageFrame*>(pPg->GetNext());
}
}
@@ -867,7 +867,7 @@ void SwPageFrame::Paste( SwFrame* pParent, SwFrame* pSibling )
{
while ( pPg )
{
- pPg->IncrPhyPageNum(); //inline ++nPhyPageNum
+ ++pPg->m_nPhyPageNum;
pPg->InvalidatePos_();
pPg->InvalidateLayout();
pPg = static_cast<SwPageFrame*>(pPg->GetNext());
diff --git a/sw/source/core/layout/ssfrm.cxx b/sw/source/core/layout/ssfrm.cxx
index ecab038e80da..1898c05a2d29 100644
--- a/sw/source/core/layout/ssfrm.cxx
+++ b/sw/source/core/layout/ssfrm.cxx
@@ -191,11 +191,11 @@ void SwFrame::SetRightLeftMargins( long nRight, long nLeft)
/// checks the layout direction and invalidates the lower frames recursively, if necessary.
void SwFrame::CheckDirChange()
{
- bool bOldVert = GetVerticalFlag();
+ bool bOldVert = mbVertical;
bool bOldRev = IsReverse();
- bool bOldR2L = GetRightToLeftFlag();
+ bool bOldR2L = mbRightToLeft;
SetInvalidVert( true );
- SetInvalidR2L( true );
+ mbInvalidR2L = true;
bool bChg = bOldR2L != IsRightToLeft();
bool bOldVertL2R = IsVertLR();
if( ( IsVertical() != bOldVert ) || bChg || IsReverse() != bOldRev || bOldVertL2R != IsVertLR() )
diff --git a/sw/source/core/text/pordrop.hxx b/sw/source/core/text/pordrop.hxx
index 4839a8f06224..05ff5a6bb084 100644
--- a/sw/source/core/text/pordrop.hxx
+++ b/sw/source/core/text/pordrop.hxx
@@ -72,7 +72,6 @@ class SwDropPortion : public SwTextPortion
bool FormatText( SwTextFormatInfo &rInf );
void PaintText( const SwTextPaintInfo &rInf ) const;
- inline void Fix( const sal_uInt16 nNew ) { nFix = nNew; }
public:
SwDropPortion( const sal_uInt16 nLineCnt,
const sal_uInt16 nDropHeight,
diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx
index b06affbf068e..4f24e63b33f0 100644
--- a/sw/source/core/text/porfld.cxx
+++ b/sw/source/core/text/porfld.cxx
@@ -87,7 +87,7 @@ SwFieldPortion::SwFieldPortion( const SwFieldPortion& rField )
: SwExpandPortion( rField )
, aExpand( rField.GetExp() )
, nNextOffset( rField.GetNextOffset() )
- , nNextScriptChg( rField.GetNextScriptChg() )
+ , nNextScriptChg( rField.nNextScriptChg )
, nViewWidth( rField.nViewWidth )
, bFollow( rField.IsFollow() )
, bLeft( rField.IsLeft() )
@@ -839,7 +839,7 @@ bool SwGrfNumPortion::Format( SwTextFormatInfo &rInf )
if( bFly )
{
SetLen( 0 );
- SetNoPaint( true );
+ bNoPaint = true;
rInf.SetNumDone( false );
return true;
}
@@ -881,7 +881,7 @@ bool SwGrfNumPortion::Format( SwTextFormatInfo &rInf )
*/
void SwGrfNumPortion::Paint( const SwTextPaintInfo &rInf ) const
{
- if( DontPaint() )
+ if( bNoPaint )
return;
if ( IsHide() && rInf.GetParaPortion() && rInf.GetParaPortion()->GetNext() )
{
diff --git a/sw/source/core/text/porfld.hxx b/sw/source/core/text/porfld.hxx
index 6fb6d2701011..740c2d93769a 100644
--- a/sw/source/core/text/porfld.hxx
+++ b/sw/source/core/text/porfld.hxx
@@ -92,8 +92,6 @@ public:
inline sal_Int32 GetNextOffset() const { return nNextOffset; }
inline void SetNextOffset( sal_Int32 nNew ) { nNextOffset = nNew; }
- inline sal_Int32 GetNextScriptChg() const { return nNextScriptChg; }
-
// Field cloner for SplitGlue
virtual SwFieldPortion *Clone( const OUString &rExpand ) const;
@@ -189,8 +187,6 @@ public:
inline bool IsAnimated() const { return bAnimated; }
inline void SetAnimated( bool bNew ) { bAnimated = bNew; }
- inline bool DontPaint() const { return bNoPaint; }
- inline void SetNoPaint( bool bNew ) { bNoPaint = bNew; }
inline void SetRelPos( SwTwips nNew ) { nYPos = nNew; }
inline void SetId( long nNew ) const
{ const_cast<SwGrfNumPortion*>(this)->nId = nNew; }
diff --git a/sw/source/core/text/portab.hxx b/sw/source/core/text/portab.hxx
index de1af65346d6..55f00ae83f7d 100644
--- a/sw/source/core/text/portab.hxx
+++ b/sw/source/core/text/portab.hxx
@@ -37,7 +37,6 @@ public:
bool PostFormat( SwTextFormatInfo &rInf );
inline bool IsFilled() const { return 0 != cFill; }
inline sal_uInt16 GetTabPos() const { return nTabPos; }
- inline bool IsAutoTabStop() const { return bAutoTabStop; }
// Accessibility: pass information about this portion to the PortionHandler
virtual void HandlePortion( SwPortionHandler& rPH ) const override;
diff --git a/sw/source/core/text/txtdrop.cxx b/sw/source/core/text/txtdrop.cxx
index f831297ec784..7f3621304b58 100644
--- a/sw/source/core/text/txtdrop.cxx
+++ b/sw/source/core/text/txtdrop.cxx
@@ -934,7 +934,7 @@ void SwDropCapCache::CalcFontSize( SwDropPortion* pDrop, SwTextFormatInfo &rInf
bool SwDropPortion::Format( SwTextFormatInfo &rInf )
{
bool bFull = false;
- Fix( (sal_uInt16)rInf.X() );
+ nFix = (sal_uInt16)rInf.X();
SwLayoutModeModifier aLayoutModeModifier( *rInf.GetOut() );
aLayoutModeModifier.SetAuto();
diff --git a/sw/source/core/text/txttab.cxx b/sw/source/core/text/txttab.cxx
index 553376d18a0b..a188b3a11f56 100644
--- a/sw/source/core/text/txttab.cxx
+++ b/sw/source/core/text/txttab.cxx
@@ -384,11 +384,11 @@ bool SwTabPortion::PreFormat( SwTextFormatInfo &rInf )
// tab stop position is outside the frame:
bool bAtParaEnd = rInf.GetIdx() + GetLen() == rInf.GetText().getLength();
if ( bFull && bTabCompat &&
- ( ( bTabOverflow && ( rInf.IsTabOverflow() || !IsAutoTabStop() ) ) || bAtParaEnd ) &&
+ ( ( bTabOverflow && ( rInf.IsTabOverflow() || !bAutoTabStop ) ) || bAtParaEnd ) &&
GetTabPos() >= rInf.GetTextFrame()->Frame().Width() )
{
bFull = false;
- if ( bTabOverflow && !IsAutoTabStop() )
+ if ( bTabOverflow && !bAutoTabStop )
rInf.SetTabOverflow( true );
}
diff --git a/sw/source/core/text/widorp.cxx b/sw/source/core/text/widorp.cxx
index 02dea259920c..6d8c4f569bf2 100644
--- a/sw/source/core/text/widorp.cxx
+++ b/sw/source/core/text/widorp.cxx
@@ -522,7 +522,7 @@ bool WidowsAndOrphans::WouldFit( SwTextMargin &rLine, SwTwips &rMaxHeight, bool
// Widow lines would have wrong width.
// 2. Test formatting is only done up to the given space.
// we do not have any lines for widows at all.
- if( bTst || nLineCnt - nMinLines >= GetWidowsLines() )
+ if( bTst || nLineCnt - nMinLines >= nWidLines )
{
if( rMaxHeight >= nLineSum )
{
diff --git a/sw/source/core/text/widorp.hxx b/sw/source/core/text/widorp.hxx
index 0e655985a6d2..1063f6313272 100644
--- a/sw/source/core/text/widorp.hxx
+++ b/sw/source/core/text/widorp.hxx
@@ -58,8 +58,6 @@ public:
WidowsAndOrphans( SwTextFrame *pFrame, const SwTwips nRst = 0,
bool bCheckKeep = true );
bool FindWidows( SwTextFrame *pFrame, SwTextMargin &rLine );
- sal_uInt16 GetWidowsLines() const
- { return nWidLines; }
sal_uInt16 GetOrphansLines() const
{ return nOrphLines; }
void ClrOrphLines(){ nOrphLines = 0; }
diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx
index eac6691435be..ff156d2fbd34 100644
--- a/sw/source/core/unocore/unoportenum.cxx
+++ b/sw/source/core/unocore/unoportenum.cxx
@@ -367,7 +367,7 @@ SwXTextPortionEnumeration::SwXTextPortionEnumeration(
// find all frames, graphics and OLEs that are bound AT character in para
FrameClientSortList_t frames;
::CollectFrameAtNode(m_pUnoCursor->GetPoint()->nNode, frames, true);
- lcl_CreatePortions(m_Portions, xParentText, &GetCursor(), frames, nStart, nEnd);
+ lcl_CreatePortions(m_Portions, xParentText, &*m_pUnoCursor, frames, nStart, nEnd);
}
SwXTextPortionEnumeration::SwXTextPortionEnumeration(
diff --git a/sw/source/filter/html/parcss1.cxx b/sw/source/filter/html/parcss1.cxx
index 4ba013d8848d..b3d76b369a4b 100644
--- a/sw/source/filter/html/parcss1.cxx
+++ b/sw/source/filter/html/parcss1.cxx
@@ -84,11 +84,11 @@ sal_Unicode CSS1Parser::GetNextChar()
if( c == '\n' )
{
- IncLineNr();
- SetLinePos( 1L );
+ ++nlLineNr;
+ nlLinePos = 1;
}
else
- IncLinePos();
+ ++nlLinePos;
return c;
}
diff --git a/sw/source/filter/html/parcss1.hxx b/sw/source/filter/html/parcss1.hxx
index 51be36105fca..30b24ddbeb00 100644
--- a/sw/source/filter/html/parcss1.hxx
+++ b/sw/source/filter/html/parcss1.hxx
@@ -205,10 +205,6 @@ class CSS1Parser
bool IsEOF() const { return bEOF; }
- void IncLineNr() { ++nlLineNr; }
- sal_uInt32 IncLinePos() { return ++nlLinePos; }
- inline void SetLinePos( sal_uInt32 nlPos ); // inline declaration below
-
// parse parts of the grammar
void ParseRule();
CSS1Selector *ParseSelector();
@@ -259,11 +255,6 @@ public:
virtual ~CSS1Parser();
};
-inline void CSS1Parser::SetLinePos( sal_uInt32 nlPos )
-{
- nlLinePos = nlPos;
-}
-
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index 81b6417e6db4..c790123b3b24 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -1055,7 +1055,7 @@ void SwHTMLParser::NextToken( int nToken )
if( HTML_IFRAME_OFF == nToken )
{
m_bCallNextToken = false;
- EndFloatingFrame();
+ m_bInFloatingFrame = false;
}
return;
diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx
index 386f11fb6988..6ef39ce7dd88 100644
--- a/sw/source/filter/html/swhtml.hxx
+++ b/sw/source/filter/html/swhtml.hxx
@@ -715,7 +715,6 @@ private:
void InsertParam(); // htmlplug.cxx
void InsertFloatingFrame();
- void EndFloatingFrame() { m_bInFloatingFrame = false; }
// <BODY>-Tag auswerten: Hintergrund-Grafiken und -Farben setzen (htmlgrin.cxx)
void InsertBodyOptions();
diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx
index c1dc4de3791b..9fdf61a63028 100644
--- a/sw/source/filter/ww8/wrtww8.hxx
+++ b/sw/source/filter/ww8/wrtww8.hxx
@@ -1008,7 +1008,6 @@ public:
SvxMSExportOLEObjects& GetOLEExp() { return *m_pOLEExp; }
SwMSConvertControls& GetOCXExp() { return *m_pOCXExp; }
- WW8OleMap& GetOLEMap() { return m_aOleMap; }
void ExportDopTypography(WW8DopTypography &rTypo);
sal_uInt16 AddRedlineAuthor( sal_uInt16 nId );
diff --git a/sw/source/filter/ww8/wrtww8gr.cxx b/sw/source/filter/ww8/wrtww8gr.cxx
index 6f00814e47b5..8834934c115c 100644
--- a/sw/source/filter/ww8/wrtww8gr.cxx
+++ b/sw/source/filter/ww8/wrtww8gr.cxx
@@ -218,14 +218,13 @@ void WW8Export::OutputOLENode( const SwOLENode& rOLENode )
if( xObj.is() )
{
const embed::XEmbeddedObject *pObj = xObj.get();
- WW8OleMap& rPointerToObjId = GetOLEMap();
//Don't want to use pointer ids, as is traditional, because we need
//to put this into a 32bit value, and on 64bit the bottom bits
//might collide and two unrelated ole objects end up considered the
//same. Don't want to simply start at 0 which is a special value
- sal_Int32 nPictureId = SAL_MAX_INT32 - rPointerToObjId.size();
+ sal_Int32 nPictureId = SAL_MAX_INT32 - m_aOleMap.size();
WW8OleMap::value_type entry = std::make_pair(pObj, nPictureId);
- std::pair<WW8OleMap::iterator, bool> aRes = rPointerToObjId.insert(entry);
+ std::pair<WW8OleMap::iterator, bool> aRes = m_aOleMap.insert(entry);
bool bIsNotDuplicate = aRes.second; //.second is false when element already existed
nPictureId = aRes.first->second;
Set_UInt32(pDataAdr, nPictureId);