summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/crsr/pam.cxx2
-rw-r--r--sw/source/core/doc/doccorr.cxx8
-rw-r--r--sw/source/core/draw/dcontact.cxx2
-rw-r--r--sw/source/core/layout/anchoreddrawobject.cxx2
-rw-r--r--sw/source/core/layout/atrfrm.cxx2
-rw-r--r--sw/source/core/layout/calcmove.cxx2
-rw-r--r--sw/source/core/layout/flycnt.cxx2
-rw-r--r--sw/source/core/layout/frmtool.cxx4
-rw-r--r--sw/source/core/layout/movedfwdfrmsbyobjpos.cxx2
-rw-r--r--sw/source/core/layout/objectformatter.cxx4
-rw-r--r--sw/source/core/layout/objstmpconsiderwrapinfl.cxx2
-rw-r--r--sw/source/core/layout/paintfrm.cxx14
-rw-r--r--sw/source/core/layout/tabfrm.cxx2
-rw-r--r--sw/source/core/text/pormulti.cxx9
-rw-r--r--sw/source/core/tox/txmsrt.cxx2
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx2
-rw-r--r--sw/source/core/txtnode/thints.cxx6
-rw-r--r--sw/source/core/unocore/unoobj.cxx2
-rw-r--r--sw/source/core/unocore/unoobj2.cxx2
-rw-r--r--sw/source/core/unocore/unoport.cxx2
-rw-r--r--sw/source/core/view/pagepreviewlayout.cxx6
-rw-r--r--sw/source/filter/ww8/docxsdrexport.cxx4
-rw-r--r--sw/source/filter/ww8/wrtw8nds.cxx4
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx2
-rw-r--r--sw/source/filter/ww8/ww8graf.cxx2
-rw-r--r--sw/source/ui/envelp/envprt.cxx2
-rw-r--r--sw/source/ui/envelp/labfmt.cxx4
-rw-r--r--sw/source/ui/vba/vbaparagraphformat.cxx2
-rw-r--r--sw/source/ui/vba/vbarows.cxx2
-rw-r--r--sw/source/ui/vba/vbaselection.cxx4
-rw-r--r--sw/source/uibase/shells/drwtxtsh.cxx2
-rw-r--r--sw/source/uibase/shells/tabsh.cxx2
-rw-r--r--sw/source/uibase/uiview/formatclipboard.cxx2
-rw-r--r--sw/source/uibase/uiview/viewtab.cxx2
-rw-r--r--sw/source/uibase/wrtsh/delete.cxx2
35 files changed, 57 insertions, 58 deletions
diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx
index bdcc3101066a..18fc17769dfc 100644
--- a/sw/source/core/crsr/pam.cxx
+++ b/sw/source/core/crsr/pam.cxx
@@ -702,7 +702,7 @@ bool SwPaM::HasReadonlySel( bool bFormView ) const
if( !bRet && pDoc->GetDocumentSettingManager().get( DocumentSettingId::PROTECT_FORM ) )
{
// Form protection case
- bRet = ( pA == nullptr ) || ( pB == nullptr ) || ( bAtStartA ) || ( bAtStartB );
+ bRet = ( pA == nullptr ) || ( pB == nullptr ) || bAtStartA || bAtStartB;
}
}
}
diff --git a/sw/source/core/doc/doccorr.cxx b/sw/source/core/doc/doccorr.cxx
index 3401152edf51..2012dfc06faf 100644
--- a/sw/source/core/doc/doccorr.cxx
+++ b/sw/source/core/doc/doccorr.cxx
@@ -78,12 +78,12 @@ namespace
const sal_Int32 nCntIdx)
{
for(int nb = 0; nb < 2; ++nb)
- if(&((pPam)->GetBound(bool(nb)).nNode.GetNode()) == pOldNode)
+ if(&(pPam->GetBound(bool(nb)).nNode.GetNode()) == pOldNode)
{
- (pPam)->GetBound(bool(nb)).nNode = rNewPos.nNode;
- (pPam)->GetBound(bool(nb)).nContent.Assign(
+ pPam->GetBound(bool(nb)).nNode = rNewPos.nNode;
+ pPam->GetBound(bool(nb)).nContent.Assign(
const_cast<SwIndexReg*>(rNewPos.nContent.GetIdxReg()),
- nCntIdx + (pPam)->GetBound(bool(nb)).nContent.GetIndex());
+ nCntIdx + pPam->GetBound(bool(nb)).nContent.GetIndex());
}
}
}
diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx
index 23fe86495c98..c98d06ead6bd 100644
--- a/sw/source/core/draw/dcontact.cxx
+++ b/sw/source/core/draw/dcontact.cxx
@@ -1193,7 +1193,7 @@ void SwDrawContact::Changed_( const SdrObject& rObj,
// provided by the anchored object, use parameter <pOldBoundRect>.
const tools::Rectangle& aOldObjRect = pAnchoredDrawObj->GetLastObjRect()
? *(pAnchoredDrawObj->GetLastObjRect())
- : *(pOldBoundRect);
+ : *pOldBoundRect;
// #i79400#
// always invalidate object rectangle inclusive spaces
pAnchoredDrawObj->InvalidateObjRectWithSpaces();
diff --git a/sw/source/core/layout/anchoreddrawobject.cxx b/sw/source/core/layout/anchoreddrawobject.cxx
index 9d450f9a26f7..fded8b5e3335 100644
--- a/sw/source/core/layout/anchoreddrawobject.cxx
+++ b/sw/source/core/layout/anchoreddrawobject.cxx
@@ -177,7 +177,7 @@ bool SwObjPosOscillationControl::OscillationDetected()
aObjPosIter != maObjPositions.end();
++aObjPosIter )
{
- if ( *(pNewObjPos) == *(*aObjPosIter) )
+ if ( *pNewObjPos == *(*aObjPosIter) )
{
// position already occurred -> oscillation
bOscillationDetected = true;
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index c4e7897ad1f3..acfa8f78dede 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -3174,7 +3174,7 @@ bool SwFlyFrameFormat::IsBackgroundTransparent() const
else
{
const GraphicObject *pTmpGrf = aBackground.GetGraphicObject();
- if ( (pTmpGrf) &&
+ if ( pTmpGrf &&
(pTmpGrf->GetAttr().GetTransparency() != 0)
)
{
diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx
index 9e65bfa046c3..a1b14d9b5277 100644
--- a/sw/source/core/layout/calcmove.cxx
+++ b/sw/source/core/layout/calcmove.cxx
@@ -1945,7 +1945,7 @@ bool SwContentFrame::WouldFit_( SwTwips nSpace,
0;
nUpper += bCommonBorder ?
- rAttrs.GetBottomLine( *(pFrame) ) :
+ rAttrs.GetBottomLine( *pFrame ) :
rAttrs.CalcBottomLine();
}
diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx
index 9819e411f1cc..2543ea147380 100644
--- a/sw/source/core/layout/flycnt.cxx
+++ b/sw/source/core/layout/flycnt.cxx
@@ -283,7 +283,7 @@ bool SwOszControl::ChkOsz()
aObjPosIter != maObjPositions.end();
++aObjPosIter )
{
- if ( *(pNewObjPos) == *(*aObjPosIter) )
+ if ( *pNewObjPos == *(*aObjPosIter) )
{
// position already occurred -> oscillation
bOscillationDetected = true;
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index 13ff43808217..f058859f0401 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -2016,7 +2016,7 @@ void SwBorderAttrs::CalcJoinedWithPrev( const SwFrame& _rFrame,
pPrevFrame->GetAttrSet()->GetParaConnectBorder().GetValue()
)
{
- m_bJoinedWithPrev = JoinWithCmp( _rFrame, *(pPrevFrame) );
+ m_bJoinedWithPrev = JoinWithCmp( _rFrame, *pPrevFrame );
}
}
@@ -2048,7 +2048,7 @@ void SwBorderAttrs::CalcJoinedWithNext( const SwFrame& _rFrame )
_rFrame.GetAttrSet()->GetParaConnectBorder().GetValue()
)
{
- m_bJoinedWithNext = JoinWithCmp( _rFrame, *(pNextFrame) );
+ m_bJoinedWithNext = JoinWithCmp( _rFrame, *pNextFrame );
}
}
diff --git a/sw/source/core/layout/movedfwdfrmsbyobjpos.cxx b/sw/source/core/layout/movedfwdfrmsbyobjpos.cxx
index f238de1d8fb7..56c8780c2352 100644
--- a/sw/source/core/layout/movedfwdfrmsbyobjpos.cxx
+++ b/sw/source/core/layout/movedfwdfrmsbyobjpos.cxx
@@ -71,7 +71,7 @@ bool SwMovedFwdFramesByObjPos::DoesRowContainMovedFwdFrame( const SwRowFrame& _r
NodeMapIter aIter = maMovedFwdFrames.begin();
for ( ; aIter != maMovedFwdFrames.end(); ++aIter )
{
- const NodeMapEntry& rEntry = *(aIter);
+ const NodeMapEntry& rEntry = *aIter;
if ( rEntry.second >= nPageNumOfRow )
{
SwIterator<SwTextFrame,SwTextNode> aFrameIter( *rEntry.first );
diff --git a/sw/source/core/layout/objectformatter.cxx b/sw/source/core/layout/objectformatter.cxx
index 99455bbe8b0f..3ec0d996600e 100644
--- a/sw/source/core/layout/objectformatter.cxx
+++ b/sw/source/core/layout/objectformatter.cxx
@@ -206,11 +206,11 @@ bool SwObjectFormatter::FormatObj( SwAnchoredObject& _rAnchoredObj,
OSL_ENSURE( _pAnchorFrame || _rAnchoredObj.GetAnchorFrame(),
"<SwObjectFormatter::FormatObj(..)> - missing anchor frame" );
- SwFrame& rAnchorFrame = _pAnchorFrame ? *(_pAnchorFrame) : *(_rAnchoredObj.AnchorFrame());
+ SwFrame& rAnchorFrame = _pAnchorFrame ? *_pAnchorFrame : *(_rAnchoredObj.AnchorFrame());
OSL_ENSURE( _pPageFrame || rAnchorFrame.FindPageFrame(),
"<SwObjectFormatter::FormatObj(..)> - missing page frame" );
- const SwPageFrame& rPageFrame = _pPageFrame ? *(_pPageFrame) : *(rAnchorFrame.FindPageFrame());
+ const SwPageFrame& rPageFrame = _pPageFrame ? *_pPageFrame : *(rAnchorFrame.FindPageFrame());
// create corresponding object formatter
SwObjectFormatter* pObjFormatter =
diff --git a/sw/source/core/layout/objstmpconsiderwrapinfl.cxx b/sw/source/core/layout/objstmpconsiderwrapinfl.cxx
index 214fe5693e3b..a3396e6f5671 100644
--- a/sw/source/core/layout/objstmpconsiderwrapinfl.cxx
+++ b/sw/source/core/layout/objstmpconsiderwrapinfl.cxx
@@ -36,7 +36,7 @@ void SwObjsMarkedAsTmpConsiderWrapInfluence::Insert( SwAnchoredObject& _rAnchore
std::vector< SwAnchoredObject* >::const_iterator aIter = maObjsTmpConsiderWrapInfl.begin();
for ( ; aIter != maObjsTmpConsiderWrapInfl.end(); ++aIter )
{
- const SwAnchoredObject* pAnchoredObj = *(aIter);
+ const SwAnchoredObject* pAnchoredObj = *aIter;
if ( pAnchoredObj == &_rAnchoredObj )
{
bAlreadyInserted = true;
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 515e0d523bd9..7d9e1d4c8df8 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -3992,7 +3992,7 @@ bool SwFlyFrame::IsBackgroundTransparent() const
{
const GraphicObject *pTmpGrf =
pBackgrdBrush->GetGraphicObject();
- if ( (pTmpGrf) &&
+ if ( pTmpGrf &&
(pTmpGrf->GetAttr().GetTransparency() != 0)
)
{
@@ -5510,8 +5510,8 @@ void SwFrame::PaintBorder( const SwRect& rRect, const SwPageFrame *pPage,
{
const SwFrame* pDirRefFrame = IsCellFrame() ? FindTabFrame() : this;
SwRectFnSet aRectFnSet(pDirRefFrame);
- ::lcl_PaintLeftRightLine ( true, *(this), *(pPage), aRect, rRect, rAttrs, aRectFnSet.FnRect(), gProp);
- ::lcl_PaintLeftRightLine ( false, *(this), *(pPage), aRect, rRect, rAttrs, aRectFnSet.FnRect(), gProp);
+ ::lcl_PaintLeftRightLine ( true, *(this), *pPage, aRect, rRect, rAttrs, aRectFnSet.FnRect(), gProp);
+ ::lcl_PaintLeftRightLine ( false, *(this), *pPage, aRect, rRect, rAttrs, aRectFnSet.FnRect(), gProp);
if ( !IsContentFrame() || rAttrs.GetTopLine( *(this) ) )
{
// -
@@ -5522,11 +5522,11 @@ void SwFrame::PaintBorder( const SwRect& rRect, const SwPageFrame *pPage,
SwBorderAttrAccess aAccess( SwFrame::GetCache(),
pCellFrameForTopBorderAttrs );
const SwBorderAttrs &rTopAttrs = *aAccess.Get();
- ::lcl_PaintTopBottomLine( true, *(this), *(pPage), aRect, rRect, rTopAttrs, aRectFnSet.FnRect(), gProp);
+ ::lcl_PaintTopBottomLine( true, *(this), *pPage, aRect, rRect, rTopAttrs, aRectFnSet.FnRect(), gProp);
}
else
{
- ::lcl_PaintTopBottomLine( true, *(this), *(pPage), aRect, rRect, rAttrs, aRectFnSet.FnRect(), gProp );
+ ::lcl_PaintTopBottomLine( true, *(this), *pPage, aRect, rRect, rAttrs, aRectFnSet.FnRect(), gProp );
}
}
if ( !IsContentFrame() || rAttrs.GetBottomLine( *(this) ) )
@@ -5539,11 +5539,11 @@ void SwFrame::PaintBorder( const SwRect& rRect, const SwPageFrame *pPage,
SwBorderAttrAccess aAccess( SwFrame::GetCache(),
pCellFrameForBottomBorderAttrs );
const SwBorderAttrs &rBottomAttrs = *aAccess.Get();
- ::lcl_PaintTopBottomLine(false, *(this), *(pPage), aRect, rRect, rBottomAttrs, aRectFnSet.FnRect(), gProp);
+ ::lcl_PaintTopBottomLine(false, *(this), *pPage, aRect, rRect, rBottomAttrs, aRectFnSet.FnRect(), gProp);
}
else
{
- ::lcl_PaintTopBottomLine(false, *(this), *(pPage), aRect, rRect, rAttrs, aRectFnSet.FnRect(), gProp);
+ ::lcl_PaintTopBottomLine(false, *(this), *pPage, aRect, rRect, rAttrs, aRectFnSet.FnRect(), gProp);
}
}
}
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index 63a85fa3555a..d7215c74fd96 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -3383,7 +3383,7 @@ bool SwTabFrame::ShouldBwdMoved( SwLayoutFrame *pNewUpper, bool, bool &rReformat
if ( pFirstRow && pFirstRow->IsInFollowFlowRow() &&
SwLayouter::DoesRowContainMovedFwdFrame(
*(pFirstRow->GetFormat()->GetDoc()),
- *(pFirstRow) ) )
+ *pFirstRow ) )
{
return false;
}
diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx
index 39cfecd1217c..df11d817c2c3 100644
--- a/sw/source/core/text/pormulti.cxx
+++ b/sw/source/core/text/pormulti.cxx
@@ -377,7 +377,7 @@ void SwDoubleLinePortion::SetBrackets( const SwDoubleLinePortion& rDouble )
void SwDoubleLinePortion::FormatBrackets( SwTextFormatInfo &rInf, SwTwips& nMaxWidth )
{
nMaxWidth -= rInf.X();
- SwFont* pTmpFnt = new SwFont( *rInf.GetFont() );
+ std::unique_ptr<SwFont> pTmpFnt( new SwFont( *rInf.GetFont() ) );
pTmpFnt->SetProportion( 100 );
pBracket->nAscent = 0;
pBracket->nHeight = 0;
@@ -387,7 +387,7 @@ void SwDoubleLinePortion::FormatBrackets( SwTextFormatInfo &rInf, SwTwips& nMaxW
SwFontScript nActualScr = pTmpFnt->GetActual();
if( SW_SCRIPTS > pBracket->nPreScript )
pTmpFnt->SetActual( pBracket->nPreScript );
- SwFontSave aSave( rInf, pTmpFnt );
+ SwFontSave aSave( rInf, pTmpFnt.get() );
SwPosSize aSize = rInf.GetTextSize( aStr );
pBracket->nAscent = rInf.GetAscent();
pBracket->nHeight = aSize.Height();
@@ -411,7 +411,7 @@ void SwDoubleLinePortion::FormatBrackets( SwTextFormatInfo &rInf, SwTwips& nMaxW
OUString aStr( pBracket->cPost );
if( SW_SCRIPTS > pBracket->nPostScript )
pTmpFnt->SetActual( pBracket->nPostScript );
- SwFontSave aSave( rInf, pTmpFnt );
+ SwFontSave aSave( rInf, pTmpFnt.get() );
SwPosSize aSize = rInf.GetTextSize( aStr );
const sal_uInt16 nTmpAsc = rInf.GetAscent();
if( nTmpAsc > pBracket->nAscent )
@@ -435,7 +435,6 @@ void SwDoubleLinePortion::FormatBrackets( SwTextFormatInfo &rInf, SwTwips& nMaxW
else
pBracket->nPostWidth = 0;
nMaxWidth += rInf.X();
- delete(pTmpFnt);
}
// calculates the number of blanks in each line and
@@ -2232,7 +2231,7 @@ SwLinePortion* SwTextFormatter::MakeRestPortion( const SwLineLayout* pLine,
}
return pTmp;
}
- delete (pCreate);
+ delete pCreate;
return pRest;
}
diff --git a/sw/source/core/tox/txmsrt.cxx b/sw/source/core/tox/txmsrt.cxx
index 32bb6b256f99..e304e1092b49 100644
--- a/sw/source/core/tox/txmsrt.cxx
+++ b/sw/source/core/tox/txmsrt.cxx
@@ -572,7 +572,7 @@ OUString SwTOXPara::GetURL() const
SwDoc* pDoc = const_cast<SwDoc*>( pTextNd->GetDoc() );
::sw::mark::IMark const * const pMark = pDoc->getIDocumentMarkAccess()->getMarkForTextNode(
- *(pTextNd),
+ *pTextNd,
IDocumentMarkAccess::MarkType::CROSSREF_HEADING_BOOKMARK);
aText = "#" + pMark->GetName();
}
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index ce5c84fddf61..ade444d30f54 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -1822,7 +1822,7 @@ void SwTextNode::CopyText( SwTextNode *const pDest,
"<SwTextNode::CopyText(..)> - RES_TXTATR_INPUTFIELD without EndIndex!" );
if ( nAttrStartIdx < nTextStartIdx
|| ( pEndIdx != nullptr
- && *(pEndIdx) > nEnd ) )
+ && *pEndIdx > nEnd ) )
{
continue;
}
diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx
index fe3e05037dec..fb7f05fd6bed 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -374,7 +374,7 @@ SwpHints::TryInsertNesting( SwTextNode & rNode, SwTextAttrNesting & rNewHint )
{
const sal_uInt16 nOtherWhich( pOther->Which() );
const sal_Int32 nOtherStart( pOther->GetStart() );
- const sal_Int32 nOtherEnd ( *(pOther)->GetEnd() );
+ const sal_Int32 nOtherEnd ( *pOther->GetEnd() );
if (isOverlap(nNewStart, nNewEnd, nOtherStart, nOtherEnd ))
{
switch (splitPolicy(nNewWhich, nOtherWhich))
@@ -1517,9 +1517,9 @@ bool SwTextNode::InsertHint( SwTextAttr * const pAttr, const SetAttrMode nMode )
sal_Int32* const pEnd(pAttr->GetEnd());
assert(pEnd != nullptr);
- if (m_Text[ *(pEnd) - 1 ] != CH_TXT_ATR_INPUTFIELDEND)
+ if (m_Text[ *pEnd - 1 ] != CH_TXT_ATR_INPUTFIELDEND)
{
- SwIndex aIdx( this, *(pEnd) );
+ SwIndex aIdx( this, *pEnd );
InsertText( OUString(CH_TXT_ATR_INPUTFIELDEND), aIdx, nInsertFlags );
bInputFieldEndCharInserted = true;
*pEnd = *pEnd + 1;
diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx
index 81939304cd7c..5c048c46d21a 100644
--- a/sw/source/core/unocore/unoobj.cxx
+++ b/sw/source/core/unocore/unoobj.cxx
@@ -1948,7 +1948,7 @@ SwUnoCursorHelper::GetPropertyStates(
rPaM, *pSetParent, true, false );
}
- pStates[i] = ( (pSetParent)->Count() )
+ pStates[i] = ( pSetParent->Count() )
? rPropSet.getPropertyState( *pEntry, *pSetParent )
: beans::PropertyState_DEFAULT_VALUE;
}
diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx
index 5df85d2fe7c9..ce721dc05659 100644
--- a/sw/source/core/unocore/unoobj2.cxx
+++ b/sw/source/core/unocore/unoobj2.cxx
@@ -341,7 +341,7 @@ void SwUnoCursorHelper::SetCursorAttr(SwPaM & rPam,
for(SwPaM& rCurrent : rPam.GetRingContainer())
{
if (rCurrent.HasMark() &&
- ( (bTableMode) ||
+ ( bTableMode ||
(*rCurrent.GetPoint() != *rCurrent.GetMark()) ))
{
pDoc->getIDocumentContentOperations().InsertItemSet(rCurrent, rSet, nFlags);
diff --git a/sw/source/core/unocore/unoport.cxx b/sw/source/core/unocore/unoport.cxx
index b2d767943640..cff01e15c9a6 100644
--- a/sw/source/core/unocore/unoport.cxx
+++ b/sw/source/core/unocore/unoport.cxx
@@ -355,7 +355,7 @@ void SwXTextPortion::GetPropertyValue(
default:
beans::PropertyState eTemp;
bool bDone = SwUnoCursorHelper::getCursorPropertyValue(
- rEntry, *pUnoCursor, &(rVal), eTemp );
+ rEntry, *pUnoCursor, &rVal, eTemp );
if(!bDone)
{
if(!pSet)
diff --git a/sw/source/core/view/pagepreviewlayout.cxx b/sw/source/core/view/pagepreviewlayout.cxx
index cc56970350ec..0cc1ac469443 100644
--- a/sw/source/core/view/pagepreviewlayout.cxx
+++ b/sw/source/core/view/pagepreviewlayout.cxx
@@ -587,7 +587,7 @@ void SwPagePreviewLayout::CalcPreviewPages()
PreviewPage* pPreviewPage = new PreviewPage;
Point aCurrAccOffset = aCurrPaintOffset -
Point( (mnPaintStartCol-nCurrCol) * mnColWidth, 0 );
- CalcPreviewDataForPage( *(pPage), aCurrAccOffset, pPreviewPage );
+ CalcPreviewDataForPage( *pPage, aCurrAccOffset, pPreviewPage );
pPreviewPage->bVisible = false;
maPreviewPages.push_back( pPreviewPage );
// continue with next page and next column
@@ -614,7 +614,7 @@ void SwPagePreviewLayout::CalcPreviewPages()
// calculate data of visible page
PreviewPage* pPreviewPage = new PreviewPage;
- CalcPreviewDataForPage( *(pPage), aCurrPaintOffset, pPreviewPage );
+ CalcPreviewDataForPage( *pPage, aCurrPaintOffset, pPreviewPage );
pPreviewPage->bVisible = true;
maPreviewPages.push_back( pPreviewPage );
}
@@ -622,7 +622,7 @@ void SwPagePreviewLayout::CalcPreviewPages()
{
// calculate data of unvisible page needed for accessibility
PreviewPage* pPreviewPage = new PreviewPage;
- CalcPreviewDataForPage( *(pPage), aCurrPaintOffset, pPreviewPage );
+ CalcPreviewDataForPage( *pPage, aCurrPaintOffset, pPreviewPage );
pPreviewPage->bVisible = false;
maPreviewPages.push_back( pPreviewPage );
}
diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx
index d79278d929f8..ee5e4af200b5 100644
--- a/sw/source/filter/ww8/docxsdrexport.cxx
+++ b/sw/source/filter/ww8/docxsdrexport.cxx
@@ -757,7 +757,7 @@ void DocxSdrExport::endDMLAnchorInline(const SwFrameFormat* pFrameFormat)
void DocxSdrExport::writeVMLDrawing(const SdrObject* sdrObj, const SwFrameFormat& rFrameFormat,const Point& rNdTopLeft)
{
bool bSwapInPage = false;
- if (!(sdrObj)->GetPage())
+ if (!sdrObj->GetPage())
{
if (SdrModel* pModel = m_pImpl->m_rExport.m_pDoc->getIDocumentDrawModelAccess().GetDrawModel())
{
@@ -775,7 +775,7 @@ void DocxSdrExport::writeVMLDrawing(const SdrObject* sdrObj, const SwFrameFormat
const SwFormatHoriOrient& rHoriOri = rFrameFormat.GetHoriOrient();
const SwFormatVertOrient& rVertOri = rFrameFormat.GetVertOrient();
- m_pImpl->m_rExport.VMLExporter().AddSdrObject(*(sdrObj),
+ m_pImpl->m_rExport.VMLExporter().AddSdrObject(*sdrObj,
rHoriOri.GetHoriOrient(), rVertOri.GetVertOrient(),
rHoriOri.GetRelationOrient(),
rVertOri.GetRelationOrient(), (&rNdTopLeft), true);
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index 248f354a8f82..5218eaacc26c 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -1816,7 +1816,7 @@ bool MSWordExportBase::GetBookmarks( const SwTextNode& rNd, sal_Int32 nStt,
{
IMark* pMark = ( pMarkAccess->getAllMarksBegin() + i )->get();
- if ( IDocumentMarkAccess::GetType( *(pMark) ) == IDocumentMarkAccess::MarkType::ANNOTATIONMARK )
+ if ( IDocumentMarkAccess::GetType( *pMark ) == IDocumentMarkAccess::MarkType::ANNOTATIONMARK )
{
continue;
}
@@ -2792,7 +2792,7 @@ void MSWordExportBase::OutputTextNode( const SwTextNode& rNode )
// Check if these attributes are for the last character in the paragraph
// - which means the paragraph marker. If a paragraph has 7 characters,
// then properties on character 8 are for the paragraph marker
- if( (endPos) && (startPos == *endPos ) && (*endPos == rNode.GetText().getLength()) )
+ if( endPos && (startPos == *endPos ) && (*endPos == rNode.GetText().getLength()) )
{
SAL_INFO( "sw.ww8", startPos << "startPos == endPos" << *endPos);
sal_uInt16 nWhich = pHt->GetAttr().Which();
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index ab83079eebf5..311ba44f28e4 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -1596,7 +1596,7 @@ static void InsertSpecialChar( WW8Export& rWrt, sal_uInt8 c,
// write reference string including length+1
sal_uInt32 nStrLen( pLinkStr->getLength() + 1 );
SwWW8Writer::WriteLong( rStrm, nStrLen );
- SwWW8Writer::WriteString16( rStrm, *(pLinkStr), false );
+ SwWW8Writer::WriteString16( rStrm, *pLinkStr, false );
// write additional two NULL Bytes
SwWW8Writer::WriteLong( rStrm, 0 );
// write length of hyperlink data
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index 9565b70465ab..ed17ef710e36 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -2759,7 +2759,7 @@ SwFrameFormat *SwWW8ImplReader::AddAutoAnchor(SwFrameFormat *pFormat)
*
* Leave to later and set the correct location then.
*/
- if ((pFormat) && (pFormat->GetAnchor().GetAnchorId() != RndStdIds::FLY_AS_CHAR))
+ if (pFormat && (pFormat->GetAnchor().GetAnchorId() != RndStdIds::FLY_AS_CHAR))
{
m_xAnchorStck->AddAnchor(*m_pPaM->GetPoint(), pFormat);
}
diff --git a/sw/source/ui/envelp/envprt.cxx b/sw/source/ui/envelp/envprt.cxx
index bc2a99a79d80..fcaa98116faf 100644
--- a/sw/source/ui/envelp/envprt.cxx
+++ b/sw/source/ui/envelp/envprt.cxx
@@ -171,7 +171,7 @@ void SwEnvPrtPage::FillItem(SwEnvItem& rItem)
}
}
- rItem.eAlign = (SwEnvAlign) (nOrient);
+ rItem.eAlign = (SwEnvAlign)nOrient;
rItem.bPrintFromAbove = m_pTopButton->IsChecked();
rItem.lShiftRight = static_cast< sal_Int32 >(GetFieldVal(*m_pRightField));
rItem.lShiftDown = static_cast< sal_Int32 >(GetFieldVal(*m_pDownField ));
diff --git a/sw/source/ui/envelp/labfmt.cxx b/sw/source/ui/envelp/labfmt.cxx
index aac47888dacd..b9ff4bb54257 100644
--- a/sw/source/ui/envelp/labfmt.cxx
+++ b/sw/source/ui/envelp/labfmt.cxx
@@ -428,8 +428,8 @@ void SwLabFormatPage::ChangeMinMax()
m_pWidthField->SetMin(nMinSize, FUNIT_CM);
m_pHeightField->SetMin(nMinSize, FUNIT_CM);
- m_pWidthField->SetMax((long) 100 * (lHDist), FUNIT_TWIP);
- m_pHeightField->SetMax((long) 100 * (lVDist), FUNIT_TWIP);
+ m_pWidthField->SetMax((long) 100 * lHDist, FUNIT_TWIP);
+ m_pHeightField->SetMax((long) 100 * lVDist, FUNIT_TWIP);
m_pLeftField->SetMax((long) 100 * (lMax - nCols * lHDist), FUNIT_TWIP);
m_pUpperField->SetMax((long) 100 * (lMax - nRows * lVDist), FUNIT_TWIP);
diff --git a/sw/source/ui/vba/vbaparagraphformat.cxx b/sw/source/ui/vba/vbaparagraphformat.cxx
index bba5a31bfe96..a6184d4358bf 100644
--- a/sw/source/ui/vba/vbaparagraphformat.cxx
+++ b/sw/source/ui/vba/vbaparagraphformat.cxx
@@ -346,7 +346,7 @@ style::LineSpacing SwVbaParagraphFormat::getOOoLineSpacing( float _lineSpace, sa
aLineSpacing.Mode = style::LineSpacingMode::PROP;
aLineSpacing.Height = PERCENT150;
}
- else if( _lineSpace == ( sal_Int16 )( ( CHARACTER_INDENT_FACTOR ) * 2 ) )
+ else if( _lineSpace == ( sal_Int16 )( CHARACTER_INDENT_FACTOR * 2 ) )
{
aLineSpacing.Mode = style::LineSpacingMode::PROP;
aLineSpacing.Height = PERCENT200;
diff --git a/sw/source/ui/vba/vbarows.cxx b/sw/source/ui/vba/vbarows.cxx
index cfe3b862d3aa..f40255cb29af 100644
--- a/sw/source/ui/vba/vbarows.cxx
+++ b/sw/source/ui/vba/vbarows.cxx
@@ -197,7 +197,7 @@ void SAL_CALL SwVbaRows::Delete( )
void SAL_CALL SwVbaRows::SetLeftIndent( float LeftIndent, ::sal_Int32 RulerStyle )
{
uno::Reference< word::XColumns > xColumns( new SwVbaColumns( getParent(), mxContext, mxTextTable, mxTextTable->getColumns() ) );
- sal_Int32 nIndent = (sal_Int32)( LeftIndent );
+ sal_Int32 nIndent = (sal_Int32) LeftIndent;
switch( RulerStyle )
{
case word::WdRulerStyle::wdAdjustFirstColumn:
diff --git a/sw/source/ui/vba/vbaselection.cxx b/sw/source/ui/vba/vbaselection.cxx
index 22c38459060d..df4c34706726 100644
--- a/sw/source/ui/vba/vbaselection.cxx
+++ b/sw/source/ui/vba/vbaselection.cxx
@@ -619,7 +619,7 @@ uno::Reference< word::XRange > SAL_CALL SwVbaSelection::GoTo( const uno::Any& _w
nPage = 1;
if( nPage > nLastPage )
nPage = nLastPage;
- xPageCursor->jumpToPage( ( sal_Int16 )( nPage ) );
+ xPageCursor->jumpToPage( ( sal_Int16 )nPage );
break;
}
case word::WdGoToItem::wdGoToSection:
@@ -647,7 +647,7 @@ uno::Reference< word::XRange > SAL_CALL SwVbaSelection::GoTo( const uno::Any& _w
}
}
if( nPage != 0 )
- xPageCursor->jumpToPage( ( sal_Int16 )( nPage ) );
+ xPageCursor->jumpToPage( ( sal_Int16 )nPage );
else
throw uno::RuntimeException("Not implemented" );
break;
diff --git a/sw/source/uibase/shells/drwtxtsh.cxx b/sw/source/uibase/shells/drwtxtsh.cxx
index 6186323e73b4..9117bb622cf8 100644
--- a/sw/source/uibase/shells/drwtxtsh.cxx
+++ b/sw/source/uibase/shells/drwtxtsh.cxx
@@ -114,7 +114,7 @@ void SwDrawTextShell::Init()
nCtrl |= EEControlBits::ONLINESPELLING|EEControlBits::ALLOWBIGOBJS;
}
else
- nCtrl &= ~(EEControlBits::ONLINESPELLING);
+ nCtrl &= ~EEControlBits::ONLINESPELLING;
pOutliner->SetControlWord(nCtrl);
pOLV->ShowCursor();
diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx
index 3347c1af6d44..b39292ede61c 100644
--- a/sw/source/uibase/shells/tabsh.cxx
+++ b/sw/source/uibase/shells/tabsh.cxx
@@ -406,7 +406,7 @@ void ItemSetToTableParam( const SfxItemSet& rSet,
rSh.SetRowsToRepeat( static_cast<const SfxUInt16Item*>(pItem)->GetValue() );
if( SfxItemState::SET == rSet.GetItemState( FN_TABLE_SET_VERT_ALIGN, false, &pItem))
- rSh.SetBoxAlign(static_cast<const SfxUInt16Item*>((pItem))->GetValue());
+ rSh.SetBoxAlign(static_cast<const SfxUInt16Item*>(pItem)->GetValue());
if( SfxItemState::SET == rSet.GetItemState( FN_PARAM_TABLE_NAME, false, &pItem ))
rSh.SetTableName( *pFormat, static_cast<const SfxStringItem*>(pItem)->GetValue() );
diff --git a/sw/source/uibase/uiview/formatclipboard.cxx b/sw/source/uibase/uiview/formatclipboard.cxx
index d6323a87b26d..4ede6d755fe7 100644
--- a/sw/source/uibase/uiview/formatclipboard.cxx
+++ b/sw/source/uibase/uiview/formatclipboard.cxx
@@ -225,7 +225,7 @@ void lcl_setTableAttributes( const SfxItemSet& rSet, SwWrtShell &rSh )
}
if( SfxItemState::SET == rSet.GetItemState( FN_TABLE_SET_VERT_ALIGN, false, &pItem))
- rSh.SetBoxAlign(static_cast<const SfxUInt16Item*>((pItem))->GetValue());
+ rSh.SetBoxAlign(static_cast<const SfxUInt16Item*>(pItem)->GetValue());
if( SfxItemState::SET == rSet.GetItemState( RES_ROW_SPLIT, false, &pItem) )
rSh.SetRowSplit(*static_cast<const SwFormatRowSplit*>(pItem));
diff --git a/sw/source/uibase/uiview/viewtab.cxx b/sw/source/uibase/uiview/viewtab.cxx
index 138069464a09..56575bd251f1 100644
--- a/sw/source/uibase/uiview/viewtab.cxx
+++ b/sw/source/uibase/uiview/viewtab.cxx
@@ -212,7 +212,7 @@ void ResizeFrameCols(SwFormatCol& rCol,
lcl_Scale(nNewWishWidth, nScale);
lcl_Scale(nWishDiff, nScale);
}
- rCol.SetWishWidth( (sal_uInt16) (nNewWishWidth) );
+ rCol.SetWishWidth( (sal_uInt16)nNewWishWidth );
if( nLeftDelta >= 2 || nLeftDelta <= -2)
rArr.front().SetWishWidth(rArr.front().GetWishWidth() + (sal_uInt16)nWishDiff);
diff --git a/sw/source/uibase/wrtsh/delete.cxx b/sw/source/uibase/wrtsh/delete.cxx
index 2f5969599c7c..41163c58de00 100644
--- a/sw/source/uibase/wrtsh/delete.cxx
+++ b/sw/source/uibase/wrtsh/delete.cxx
@@ -243,7 +243,7 @@ long SwWrtShell::DelRight()
const SwTableNode * pWasInTableNd = nullptr;
- switch( nSelection & ~(SelectionType::Ornament) )
+ switch( nSelection & ~SelectionType::Ornament )
{
case SelectionType::PostIt:
case SelectionType::Text: