summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/ddefld.hxx5
-rw-r--r--sw/inc/fesh.hxx4
-rw-r--r--sw/inc/swbaslnk.hxx3
-rw-r--r--sw/source/core/doc/docsort.cxx3
-rw-r--r--sw/source/core/doc/swserv.cxx2
-rw-r--r--sw/source/core/doc/tblrwcl.cxx32
-rw-r--r--sw/source/core/docnode/section.cxx6
-rw-r--r--sw/source/core/docnode/swbaslnk.cxx2
-rw-r--r--sw/source/core/edit/autofmt.cxx25
-rw-r--r--sw/source/core/fields/ddefld.cxx9
-rw-r--r--sw/source/core/frmedt/fews.cxx2
-rw-r--r--sw/source/core/inc/UndoRedline.hxx3
-rw-r--r--sw/source/core/undo/unredln.cxx7
-rw-r--r--sw/source/filter/html/htmltab.cxx12
14 files changed, 42 insertions, 73 deletions
diff --git a/sw/inc/ddefld.hxx b/sw/inc/ddefld.hxx
index 64f904d87f61..b4c306c1d2a8 100644
--- a/sw/inc/ddefld.hxx
+++ b/sw/inc/ddefld.hxx
@@ -40,10 +40,9 @@ namespace sw
struct InRangeSearchHint final : public SfxHint
{
const sal_uLong m_nSttNd, m_nEndNd;
- const sal_Int32 m_nStt, m_nEnd;
bool& m_rIsInRange;
- InRangeSearchHint(const sal_uLong nSttNd, const sal_uLong nEndNd, const sal_Int32 nStt, const sal_Int32 nEnd, bool& rIsInRange)
- : m_nSttNd(nSttNd), m_nEndNd(nEndNd), m_nStt(nStt), m_nEnd(nEnd), m_rIsInRange(rIsInRange) {}
+ InRangeSearchHint(const sal_uLong nSttNd, const sal_uLong nEndNd, bool& rIsInRange)
+ : m_nSttNd(nSttNd), m_nEndNd(nEndNd), m_rIsInRange(rIsInRange) {}
};
}
diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx
index 5d45fa3e6621..edb7be967150 100644
--- a/sw/inc/fesh.hxx
+++ b/sw/inc/fesh.hxx
@@ -149,8 +149,8 @@ enum class CurRectType
struct SwGetCurColNumPara
{
const SwFrameFormat* pFrameFormat;
- const SwRect* pPrtRect, *pFrameRect;
- SwGetCurColNumPara() : pFrameFormat( nullptr ), pPrtRect( nullptr ), pFrameRect( nullptr ) {}
+ const SwRect* pPrtRect;
+ SwGetCurColNumPara() : pFrameFormat( nullptr ), pPrtRect( nullptr ) {}
};
enum class SwPasteSdr
diff --git a/sw/inc/swbaslnk.hxx b/sw/inc/swbaslnk.hxx
index e78b1fd6af81..b450cc1f89de 100644
--- a/sw/inc/swbaslnk.hxx
+++ b/sw/inc/swbaslnk.hxx
@@ -53,8 +53,7 @@ public:
using SvBaseLink::SetObjType;
bool IsRecursion( const SwBaseLink* pChkLnk ) const;
- virtual bool IsInRange( sal_uLong nSttNd, sal_uLong nEndNd, sal_Int32 nStt = 0,
- sal_Int32 nEnd = -1 ) const;
+ virtual bool IsInRange( sal_uLong nSttNd, sal_uLong nEndNd ) const;
void SetNoDataFlag() { m_bNoDataFlag = true; }
bool ChkNoDataFlag() { const bool bRet = m_bNoDataFlag; m_bNoDataFlag = false; return bRet; }
diff --git a/sw/source/core/doc/docsort.cxx b/sw/source/core/doc/docsort.cxx
index 8cf91b73427f..ab4276b95c5b 100644
--- a/sw/source/core/doc/docsort.cxx
+++ b/sw/source/core/doc/docsort.cxx
@@ -459,9 +459,6 @@ bool SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt)
pRedlUndo->SetValues( *pRedlPam );
}
- if( pRedlUndo )
- pRedlUndo->SetOffset( aSttIdx );
-
delete pRedlPam;
pRedlPam = nullptr;
}
diff --git a/sw/source/core/doc/swserv.cxx b/sw/source/core/doc/swserv.cxx
index aaf7b2723026..f1c1338c9d3b 100644
--- a/sw/source/core/doc/swserv.cxx
+++ b/sw/source/core/doc/swserv.cxx
@@ -235,7 +235,7 @@ bool SwServerObject::IsLinkInServer( const SwBaseLink* pChkLnk ) const
if( pLnk && OBJECT_CLIENT_GRF != pLnk->GetObjType() &&
dynamic_cast<const SwBaseLink*>( pLnk) != nullptr &&
!static_cast<const SwBaseLink*>(pLnk)->IsNoDataFlag() &&
- static_cast<const SwBaseLink*>(pLnk)->IsInRange( nSttNd, nEndNd, nStt, nEnd ))
+ static_cast<const SwBaseLink*>(pLnk)->IsInRange( nSttNd, nEndNd ))
{
if( pChkLnk )
{
diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx
index 46c5ebf04501..2e9942d861a7 100644
--- a/sw/source/core/doc/tblrwcl.cxx
+++ b/sw/source/core/doc/tblrwcl.cxx
@@ -95,21 +95,17 @@ struct CpyTabFrame
struct CR_SetBoxWidth
{
- SwSelBoxes m_Boxes;
SwShareBoxFormats aShareFormats;
SwTableNode* pTableNd;
SwUndoTableNdsChg* pUndo;
SwTwips nDiff, nSide, nMaxSize, nLowerDiff;
TableChgMode nMode;
- sal_uInt16 nTableWidth, nRemainWidth, nBoxWidth;
- bool bBigger, bLeft, bSplittBox, bAnyBoxFnd;
+ bool bBigger, bLeft;
- CR_SetBoxWidth( TableChgWidthHeightType eType, SwTwips nDif, SwTwips nSid, SwTwips nTableW,
+ CR_SetBoxWidth( TableChgWidthHeightType eType, SwTwips nDif, SwTwips nSid,
SwTwips nMax, SwTableNode* pTNd )
: pTableNd( pTNd ), pUndo( nullptr ),
- nDiff( nDif ), nSide( nSid ), nMaxSize( nMax ), nLowerDiff( 0 ),
- nTableWidth( static_cast<sal_uInt16>(nTableW) ), nRemainWidth( 0 ), nBoxWidth( 0 ),
- bSplittBox( false ), bAnyBoxFnd( false )
+ nDiff( nDif ), nSide( nSid ), nMaxSize( nMax ), nLowerDiff( 0 )
{
bLeft = TableChgWidthHeightType::ColLeft == extractPosition( eType ) ||
TableChgWidthHeightType::CellLeft == extractPosition( eType );
@@ -121,16 +117,14 @@ struct CR_SetBoxWidth
pUndo( rCpy.pUndo ),
nDiff( rCpy.nDiff ), nSide( rCpy.nSide ),
nMaxSize( rCpy.nMaxSize ), nLowerDiff( 0 ),
- nMode( rCpy.nMode ), nTableWidth( rCpy.nTableWidth ),
- nRemainWidth( rCpy.nRemainWidth ), nBoxWidth( rCpy.nBoxWidth ),
- bBigger( rCpy.bBigger ), bLeft( rCpy.bLeft ),
- bSplittBox( rCpy.bSplittBox ), bAnyBoxFnd( rCpy.bAnyBoxFnd )
+ nMode( rCpy.nMode ),
+ bBigger( rCpy.bBigger ), bLeft( rCpy.bLeft )
{
}
void LoopClear()
{
- nLowerDiff = 0; nRemainWidth = 0;
+ nLowerDiff = 0;
}
};
@@ -176,19 +170,16 @@ typedef bool (*FN_lcl_SetBoxWidth)(SwTableLine*, CR_SetBoxWidth&, SwTwips, bool
struct CR_SetLineHeight
{
- SwSelBoxes m_Boxes;
- SwShareBoxFormats aShareFormats;
SwTableNode* pTableNd;
SwUndoTableNdsChg* pUndo;
SwTwips nMaxSpace, nMaxHeight;
TableChgMode nMode;
- bool bBigger, bTop;
+ bool bBigger;
CR_SetLineHeight( TableChgWidthHeightType eType, SwTableNode* pTNd )
: pTableNd( pTNd ), pUndo( nullptr ),
nMaxSpace( 0 ), nMaxHeight( 0 )
{
- bTop = TableChgWidthHeightType::CellTop == extractPosition( eType );
bBigger = bool(eType & TableChgWidthHeightType::BiggerMode );
nMode = pTableNd->GetTable().GetTableChgMode();
}
@@ -196,7 +187,7 @@ struct CR_SetLineHeight
: pTableNd( rCpy.pTableNd ), pUndo( rCpy.pUndo ),
nMaxSpace( rCpy.nMaxSpace ), nMaxHeight( rCpy.nMaxHeight ),
nMode( rCpy.nMode ),
- bBigger( rCpy.bBigger ), bTop( rCpy.bTop )
+ bBigger( rCpy.bBigger )
{}
};
@@ -2347,7 +2338,6 @@ static bool lcl_SetSelBoxWidth( SwTableLine* pLine, CR_SetBoxWidth& rParam,
|| (!rParam.bBigger
&& (std::abs(nDist + ((rParam.nMode != TableChgMode::FixedWidthChangeAbs && rParam.bLeft) ? 0 : nWidth) - rParam.nSide) < COLFUZZY)))
{
- rParam.bAnyBoxFnd = true;
SwTwips nLowerDiff;
if( bGreaterBox && TableChgMode::FixedWidthChangeProp == rParam.nMode )
{
@@ -2445,7 +2435,6 @@ static bool lcl_SetOtherBoxWidth( SwTableLine* pLine, CR_SetBoxWidth& rParam,
: ( rParam.bLeft ? nDist < rParam.nSide - COLFUZZY
: nDist >= rParam.nSide - COLFUZZY )) )
{
- rParam.bAnyBoxFnd = true;
SwTwips nDiff;
if( TableChgMode::FixedWidthChangeProp == rParam.nMode ) // Table fixed, proportional
{
@@ -2576,7 +2565,7 @@ bool SwTable::SetColWidth( SwTableBox& rCurrentBox, TableChgWidthHeightType eTyp
// Only needed for manipulating the width
const SwTwips nDist = ::lcl_GetDistance( &rCurrentBox, bLeft );
SwTwips nDistStt = 0;
- CR_SetBoxWidth aParam( eType, nRelDiff, nDist, rSz.GetWidth(),
+ CR_SetBoxWidth aParam( eType, nRelDiff, nDist,
bLeft ? nDist : rSz.GetWidth() - nDist,
const_cast<SwTableNode*>(rCurrentBox.GetSttNd()->FindTableNode()) );
bBigger = aParam.bBigger;
@@ -2650,7 +2639,7 @@ bool SwTable::SetColWidth( SwTableBox& rCurrentBox, TableChgWidthHeightType eTyp
{
// Break down to USHRT_MAX / 2
CR_SetBoxWidth aTmpPara( TableChgWidthHeightType::ColLeft, aSz.GetWidth() / 2,
- 0, aSz.GetWidth(), aSz.GetWidth(), aParam.pTableNd );
+ 0, aSz.GetWidth(), aParam.pTableNd );
for( size_t nLn = 0; nLn < m_aLines.size(); ++nLn )
::lcl_AjustLines( m_aLines[ nLn ], aTmpPara );
aSz.SetWidth( aSz.GetWidth() / 2 );
@@ -2709,7 +2698,6 @@ bool SwTable::SetColWidth( SwTableBox& rCurrentBox, TableChgWidthHeightType eTyp
( aSz.GetWidth() + aLR.GetRight() + aLR.GetLeft())));
GetFrameFormat()->SetFormatAttr( aSz );
- aParam.nTableWidth = sal_uInt16( aSz.GetWidth() );
UnlockModify();
diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx
index f7504558e1f8..80ae308c4b85 100644
--- a/sw/source/core/docnode/section.cxx
+++ b/sw/source/core/docnode/section.cxx
@@ -82,8 +82,7 @@ public:
const OUString& rMimeType, const css::uno::Any & rValue ) override;
virtual const SwNode* GetAnchor() const override;
- virtual bool IsInRange( sal_uLong nSttNd, sal_uLong nEndNd, sal_Int32 nStt = 0,
- sal_Int32 nEnd = -1 ) const override;
+ virtual bool IsInRange( sal_uLong nSttNd, sal_uLong nEndNd ) const override;
SwSectionNode* GetSectNode()
{
@@ -1578,8 +1577,7 @@ const SwNode* SwIntrnlSectRefLink::GetAnchor() const
return rSectFormat.GetSectionNode();
}
-bool SwIntrnlSectRefLink::IsInRange( sal_uLong nSttNd, sal_uLong nEndNd,
- sal_Int32 , sal_Int32 ) const
+bool SwIntrnlSectRefLink::IsInRange( sal_uLong nSttNd, sal_uLong nEndNd ) const
{
SwStartNode* pSttNd = rSectFormat.GetSectionNode();
return pSttNd &&
diff --git a/sw/source/core/docnode/swbaslnk.cxx b/sw/source/core/docnode/swbaslnk.cxx
index 27f30ba05d9f..c3ded6711d25 100644
--- a/sw/source/core/docnode/swbaslnk.cxx
+++ b/sw/source/core/docnode/swbaslnk.cxx
@@ -358,7 +358,7 @@ bool SwBaseLink::IsRecursion( const SwBaseLink* pChkLnk ) const
return false;
}
-bool SwBaseLink::IsInRange( sal_uLong, sal_uLong, sal_Int32, sal_Int32 ) const
+bool SwBaseLink::IsInRange( sal_uLong, sal_uLong ) const
{
// Not Graphic or OLE Links
// Fields or Sections have their own derivation!
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index 0b435c3a5f02..a466d3448ab7 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -100,7 +100,6 @@ class SwAutoFormat
mutable std::unique_ptr<CharClass> m_pCharClass; // Character classification
mutable LanguageType m_eCharClassLang;
- sal_uInt16 m_nLastHeadLvl, m_nLastCalcHeadLvl;
sal_uInt16 m_nRedlAutoFormatSeqId;
enum
@@ -2148,8 +2147,8 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFormatFlags const &
// If multiple lines, then do not merge with next paragraph
m_bMoreLines = false;
- m_nLastCalcHeadLvl = 0;
- m_nLastHeadLvl = USHRT_MAX;
+ sal_uInt16 nLastCalcHeadLvl = 0;
+ sal_uInt16 nLastHeadLvl = USHRT_MAX;
sal_uInt16 nLevel = 0;
sal_uInt16 nDigitLvl = 0;
@@ -2367,25 +2366,25 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFormatFlags const &
if( nLevel >= MAXLEVEL )
nLevel = MAXLEVEL-1;
- if( USHRT_MAX == m_nLastHeadLvl )
- m_nLastHeadLvl = 0;
- else if( m_nLastCalcHeadLvl < nLevel )
+ if( USHRT_MAX == nLastHeadLvl )
+ nLastHeadLvl = 0;
+ else if( nLastCalcHeadLvl < nLevel )
{
- if( m_nLastHeadLvl+1 < MAXLEVEL )
- ++m_nLastHeadLvl;
+ if( nLastHeadLvl+1 < MAXLEVEL )
+ ++nLastHeadLvl;
}
// one level above?
- else if( m_nLastCalcHeadLvl > nLevel )
+ else if( nLastCalcHeadLvl > nLevel )
{
- if( m_nLastHeadLvl )
- --m_nLastHeadLvl;
+ if( nLastHeadLvl )
+ --nLastHeadLvl;
}
- m_nLastCalcHeadLvl = nLevel;
+ nLastCalcHeadLvl = nLevel;
if( m_aFlags.bAFormatByInput )
BuildHeadLine( nLevel );
else
- BuildHeadLine( m_nLastHeadLvl );
+ BuildHeadLine( nLastHeadLvl );
eStat = READ_NEXT_PARA;
break;
}
diff --git a/sw/source/core/fields/ddefld.cxx b/sw/source/core/fields/ddefld.cxx
index 4b4544f0ee5a..232b9aa41837 100644
--- a/sw/source/core/fields/ddefld.cxx
+++ b/sw/source/core/fields/ddefld.cxx
@@ -57,8 +57,7 @@ public:
const OUString& rMimeType, const css::uno::Any & rValue ) override;
virtual const SwNode* GetAnchor() const override;
- virtual bool IsInRange( sal_uLong nSttNd, sal_uLong nEndNd, sal_Int32 nStt = 0,
- sal_Int32 nEnd = -1 ) const override;
+ virtual bool IsInRange( sal_uLong nSttNd, sal_uLong nEndNd ) const override;
};
::sfx2::SvBaseLink::UpdateResult SwIntrnlRefLink::DataChanged( const OUString& rMimeType,
@@ -179,13 +178,11 @@ const SwNode* SwIntrnlRefLink::GetAnchor() const
return pNd;
}
-bool SwIntrnlRefLink::IsInRange( sal_uLong nSttNd, sal_uLong nEndNd,
- sal_Int32 nStt, sal_Int32 nEnd ) const
+bool SwIntrnlRefLink::IsInRange( sal_uLong nSttNd, sal_uLong nEndNd ) const
{
bool bInRange = false;
rFieldType.CallSwClientNotify(sw::InRangeSearchHint(
- nSttNd, nEndNd, nStt, nEnd,
- bInRange));
+ nSttNd, nEndNd, bInRange));
return bInRange;
}
diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx
index 8b2dfc35fdd5..30797fb24997 100644
--- a/sw/source/core/frmedt/fews.cxx
+++ b/sw/source/core/frmedt/fews.cxx
@@ -652,7 +652,6 @@ sal_uInt16 SwFEShell::GetCurColNum_( const SwFrame *pFrame,
{
pPara->pFrameFormat = static_cast<const SwLayoutFrame*>(pFrame)->GetFormat();
pPara->pPrtRect = &pFrame->getFramePrintArea();
- pPara->pFrameRect = &pFrame->getFrameArea();
break;
}
pFrame = pFrame->GetUpper();
@@ -661,7 +660,6 @@ sal_uInt16 SwFEShell::GetCurColNum_( const SwFrame *pFrame,
{
pPara->pFrameFormat = nullptr;
pPara->pPrtRect = nullptr;
- pPara->pFrameRect = nullptr;
}
}
break;
diff --git a/sw/source/core/inc/UndoRedline.hxx b/sw/source/core/inc/UndoRedline.hxx
index 1db832095e4e..e2c75db6aa1b 100644
--- a/sw/source/core/inc/UndoRedline.hxx
+++ b/sw/source/core/inc/UndoRedline.hxx
@@ -77,7 +77,7 @@ public:
class SwUndoRedlineSort : public SwUndoRedline
{
std::unique_ptr<SwSortOptions> pOpt;
- sal_uLong nSaveEndNode, nOffset;
+ sal_uLong nSaveEndNode;
sal_Int32 nSaveEndContent;
virtual void UndoRedlineImpl(SwDoc & rDoc, SwPaM & rPam) override;
@@ -91,7 +91,6 @@ public:
virtual void RepeatImpl( ::sw::RepeatContext & ) override;
void SetSaveRange( const SwPaM& rRange );
- void SetOffset( const SwNodeIndex& rIdx );
};
class SwUndoAcceptRedline : public SwUndoRedline
diff --git a/sw/source/core/undo/unredln.cxx b/sw/source/core/undo/unredln.cxx
index b85fa4baa113..7aa18cabc1f4 100644
--- a/sw/source/core/undo/unredln.cxx
+++ b/sw/source/core/undo/unredln.cxx
@@ -247,7 +247,7 @@ SwUndoRedlineSort::SwUndoRedlineSort( const SwPaM& rRange,
const SwSortOptions& rOpt )
: SwUndoRedline( SwUndoId::SORT_TXT, rRange ),
pOpt( new SwSortOptions( rOpt ) ),
- nSaveEndNode( nEndNode ), nOffset( 0 ), nSaveEndContent( nEndContent )
+ nSaveEndNode( nEndNode ), nSaveEndContent( nEndContent )
{
}
@@ -351,11 +351,6 @@ void SwUndoRedlineSort::SetSaveRange( const SwPaM& rRange )
nSaveEndContent = rPos.nContent.GetIndex();
}
-void SwUndoRedlineSort::SetOffset( const SwNodeIndex& rIdx )
-{
- nOffset = rIdx.GetIndex() - nSttNode;
-}
-
SwUndoAcceptRedline::SwUndoAcceptRedline( const SwPaM& rRange )
: SwUndoRedline( SwUndoId::ACCEPT_REDLINE, rRange )
{
diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx
index 15f10c1090fa..0ec5a972e556 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -2820,7 +2820,7 @@ void SectionSaveStruct::Restore( SwHTMLParser& rParser )
class CellSaveStruct : public SectionSaveStruct
{
- OUString m_aStyle, m_aId, m_aClass, m_aLang, m_aDir;
+ OUString m_aStyle, m_aId, m_aClass;
OUString m_aBGImage;
Color m_aBGColor;
std::shared_ptr<SvxBoxItem> m_xBoxItem;
@@ -2886,7 +2886,7 @@ CellSaveStruct::CellSaveStruct( SwHTMLParser& rParser, HTMLTable const *pCurTabl
m_bNoWrap( false ),
m_bNoBreak( false )
{
- OUString aNumFormat, aValue;
+ OUString aNumFormat, aValue, aDir, aLang;
SvxAdjust eAdjust( pCurTable->GetInheritedAdjust() );
if( bReadOpt )
@@ -2952,10 +2952,10 @@ CellSaveStruct::CellSaveStruct( SwHTMLParser& rParser, HTMLTable const *pCurTabl
m_aClass = rOption.GetString();
break;
case HtmlOptionId::LANG:
- m_aLang = rOption.GetString();
+ aLang = rOption.GetString();
break;
case HtmlOptionId::DIR:
- m_aDir = rOption.GetString();
+ aDir = rOption.GetString();
break;
case HtmlOptionId::SDNUM:
aNumFormat = rOption.GetString();
@@ -3003,14 +3003,14 @@ CellSaveStruct::CellSaveStruct( SwHTMLParser& rParser, HTMLTable const *pCurTabl
rParser.InsertAttr(&rParser.m_xAttrTab->pAdjust, SvxAdjustItem(eAdjust, RES_PARATR_ADJUST),
xCntxt.get());
- if( SwHTMLParser::HasStyleOptions( m_aStyle, m_aId, m_aClass, &m_aLang, &m_aDir ) )
+ if( SwHTMLParser::HasStyleOptions( m_aStyle, m_aId, m_aClass, &aLang, &aDir ) )
{
SfxItemSet aItemSet( rParser.m_xDoc->GetAttrPool(),
rParser.m_pCSS1Parser->GetWhichMap() );
SvxCSS1PropertyInfo aPropInfo;
if( rParser.ParseStyleOptions( m_aStyle, m_aId, m_aClass, aItemSet,
- aPropInfo, &m_aLang, &m_aDir ) )
+ aPropInfo, &aLang, &aDir ) )
{
SfxPoolItem const* pItem;
if (SfxItemState::SET == aItemSet.GetItemState(RES_BOX, false, &pItem))