summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-11-03 16:31:41 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-11-16 18:42:57 +0100
commit270e41adb0c7a5f3e25e0ea25933de0d5c32ef9c (patch)
treed56df4efd8e9345cf7f213e6149b9a71a49da458
parent26caf1bc59c81704f11225e3e431e412deb8c475 (diff)
loplugin:buriedassign in sd..writerfilter
Change-Id: I954c12d9e1c493be6ac8c7b15076077b5bff5b74 Reviewed-on: https://gerrit.libreoffice.org/62811 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--chart2/source/view/charttypes/Splines.cxx2
-rw-r--r--reportdesign/source/ui/misc/statusbarcontroller.cxx6
-rw-r--r--sal/rtl/digest.cxx8
-rw-r--r--sd/source/core/drawdoc.cxx3
-rw-r--r--sd/source/filter/eppt/epptso.cxx66
-rw-r--r--sd/source/ui/app/sdxfer.cxx3
-rw-r--r--sfx2/source/appl/linkmgr2.cxx3
-rw-r--r--sfx2/source/appl/newhelp.cxx3
-rw-r--r--soltools/mkdepend/parse.c6
-rw-r--r--stoc/source/corereflection/lrucache.hxx3
-rw-r--r--svl/source/crypto/cryptosign.cxx8
-rw-r--r--svl/source/numbers/zforfind.cxx14
-rw-r--r--svtools/source/brwbox/brwbox1.cxx5
-rw-r--r--svtools/source/config/printoptions.cxx6
-rw-r--r--svtools/source/misc/templatefoldercache.cxx10
-rw-r--r--svtools/source/svrtf/parrtf.cxx15
-rw-r--r--svx/source/dialog/svxruler.cxx8
-rw-r--r--svx/source/svdraw/svdmrkv.cxx10
-rw-r--r--svx/source/unodraw/unoshap4.cxx3
-rw-r--r--svx/source/xml/xmlgrhlp.cxx15
-rw-r--r--svx/source/xoutdev/_xoutbmp.cxx15
-rw-r--r--toolkit/source/controls/unocontrolcontainer.cxx5
-rw-r--r--tools/source/generic/poly.cxx14
-rw-r--r--tools/source/stream/vcompat.cxx3
-rw-r--r--vcl/source/bitmap/BitmapConvolutionMatrixFilter.cxx30
-rw-r--r--vcl/source/bitmap/BitmapGaussianSeparableBlurFilter.cxx3
-rw-r--r--vcl/source/bitmap/BitmapMedianFilter.cxx9
-rw-r--r--vcl/source/bitmap/BitmapScaleSuperFilter.cxx6
-rw-r--r--vcl/source/filter/graphicfilter2.cxx3
-rw-r--r--vcl/source/fontsubset/sft.cxx3
-rw-r--r--vcl/source/gdi/bmpacc2.cxx36
-rw-r--r--vcl/source/gdi/impanmvw.cxx8
-rw-r--r--vcl/source/gdi/impvect.cxx26
-rw-r--r--vcl/source/gdi/pngwrite.cxx6
-rw-r--r--vcl/source/gdi/salmisc.cxx3
-rw-r--r--vcl/source/outdev/gradient.cxx33
-rw-r--r--vcl/source/treelist/transfer.cxx18
-rw-r--r--writerfilter/source/rtftok/rtftokenizer.cxx8
38 files changed, 289 insertions, 137 deletions
diff --git a/chart2/source/view/charttypes/Splines.cxx b/chart2/source/view/charttypes/Splines.cxx
index 248954a387f5..01545cc9409e 100644
--- a/chart2/source/view/charttypes/Splines.cxx
+++ b/chart2/source/view/charttypes/Splines.cxx
@@ -206,7 +206,7 @@ void lcl_SplineCalculation::Calculate()
// is always true.
for( lcl_tSizeType k = n; k > 0; --k )
{
- ( m_aSecDerivY[ k - 1 ] *= m_aSecDerivY[ k ] ) += u[ k - 1 ];
+ m_aSecDerivY[ k - 1 ] = (m_aSecDerivY[ k - 1 ] * m_aSecDerivY[ k ] ) + u[ k - 1 ];
}
}
diff --git a/reportdesign/source/ui/misc/statusbarcontroller.cxx b/reportdesign/source/ui/misc/statusbarcontroller.cxx
index 08461d90b51d..e7408806e2fc 100644
--- a/reportdesign/source/ui/misc/statusbarcontroller.cxx
+++ b/reportdesign/source/ui/misc/statusbarcontroller.cxx
@@ -103,11 +103,13 @@ void SAL_CALL OStatusbarController::initialize( const Sequence< Any >& _rArgumen
SfxStatusBarControl *pController = nullptr;
if ( m_aCommandURL == ".uno:ZoomSlider" )
{
- pController = new SvxZoomSliderControl(m_nSlotId = SID_ATTR_ZOOMSLIDER,m_nId,*pStatusBar);
+ m_nSlotId = SID_ATTR_ZOOMSLIDER;
+ pController = new SvxZoomSliderControl(m_nSlotId,m_nId,*pStatusBar);
}
else if ( m_aCommandURL == ".uno:Zoom" )
{
- pController = new SvxZoomStatusBarControl(m_nSlotId = SID_ATTR_ZOOM,m_nId,*pStatusBar);
+ m_nSlotId = SID_ATTR_ZOOM;
+ pController = new SvxZoomStatusBarControl(m_nSlotId,m_nId,*pStatusBar);
}
if ( pController )
diff --git a/sal/rtl/digest.cxx b/sal/rtl/digest.cxx
index c9d1f3918bb2..3ec357a2cb34 100644
--- a/sal/rtl/digest.cxx
+++ b/sal/rtl/digest.cxx
@@ -36,10 +36,10 @@
*((c)++) = static_cast<sal_uInt8>(((l) ) & 0xff))
#define RTL_DIGEST_LTOC(l,c) \
- (*((c)++) = static_cast<sal_uInt8>(((l) ) & 0xff), \
- *((c)++) = static_cast<sal_uInt8>(((l) >> 8) & 0xff), \
- *((c)++) = static_cast<sal_uInt8>(((l) >> 16) & 0xff), \
- *((c)++) = static_cast<sal_uInt8>(((l) >> 24) & 0xff))
+ *((c)++) = static_cast<sal_uInt8>(((l) ) & 0xff); \
+ *((c)++) = static_cast<sal_uInt8>(((l) >> 8) & 0xff); \
+ *((c)++) = static_cast<sal_uInt8>(((l) >> 16) & 0xff); \
+ *((c)++) = static_cast<sal_uInt8>(((l) >> 24) & 0xff);
typedef rtlDigestError (Digest_init_t) (
void *ctx, const sal_uInt8 *Data, sal_uInt32 DatLen);
diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx
index 8580d9982b4b..ec92d4ae0a36 100644
--- a/sd/source/core/drawdoc.cxx
+++ b/sd/source/core/drawdoc.cxx
@@ -612,7 +612,8 @@ SdDrawDocument* SdDrawDocument::AllocSdDrawDocument() const
mpCreatingTransferable->SetDocShell( new ::sd::GraphicDocShell(
SfxObjectCreateMode::EMBEDDED ) );
- pNewDocSh = static_cast< ::sd::DrawDocShell*>( pObj = mpCreatingTransferable->GetDocShell().get() );
+ pObj = mpCreatingTransferable->GetDocShell().get();
+ pNewDocSh = static_cast< ::sd::DrawDocShell*>( pObj );
pNewDocSh->DoInitNew();
pNewModel = pNewDocSh->GetDoc();
diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx
index f000253a7e2a..5d0c51c6ccec 100644
--- a/sd/source/filter/eppt/epptso.cxx
+++ b/sd/source/filter/eppt/epptso.cxx
@@ -1584,7 +1584,8 @@ bool PPTWriter::ImplCreatePresentationPlaceholder( const bool bMasterPage,
ShapeFlag::HaveAnchor | ShapeFlag::HaveShapeProperty, nPresShapeID );
EscherPropertyContainer aPropOpt;
aPropOpt.AddOpt( ESCHER_Prop_LockAgainstGrouping, 0x50001 );
- aPropOpt.AddOpt( ESCHER_Prop_lTxid, mnTxId += 0x60 );
+ mnTxId += 0x60;
+ aPropOpt.AddOpt( ESCHER_Prop_lTxid, mnTxId );
aPropOpt.AddOpt( ESCHER_Prop_AnchorText, ESCHER_AnchorMiddle );
aPropOpt.AddOpt( ESCHER_Prop_fNoFillHitTest, 0x110001 );
aPropOpt.AddOpt( ESCHER_Prop_lineColor, 0x8000001 );
@@ -1599,7 +1600,8 @@ bool PPTWriter::ImplCreatePresentationPlaceholder( const bool bMasterPage,
SvMemoryStream aClientTextBox( 0x200, 0x200 );
ImplWriteTextStyleAtom( aClientTextBox, nStyleInstance, 0, nullptr, aExtBu, &aPropOpt );
- aPropOpt.CreateTextProperties( mXPropSet, mnTxId += 0x60 );
+ mnTxId += 0x60;
+ aPropOpt.CreateTextProperties( mXPropSet, mnTxId );
aPropOpt.CreateShapeProperties( mXShape );
aPropOpt.Commit( *mpStrm );
mpPptEscherEx->AddAtom( 8, ESCHER_ClientAnchor );
@@ -1641,7 +1643,10 @@ void PPTWriter::ImplCreateTextShape( EscherPropertyContainer& rPropOpt, EscherSo
if ( bFill )
rPropOpt.CreateFillProperties( mXPropSet, true, mXShape );
if ( ImplGetText() )
- rPropOpt.CreateTextProperties( mXPropSet, mnTxId += 0x60 );
+ {
+ mnTxId += 0x60;
+ rPropOpt.CreateTextProperties( mXPropSet, mnTxId );
+ }
}
void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& aSolverContainer, PageType ePageType, bool bMasterPage, int nPageNumber )
@@ -1652,7 +1657,8 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
sal_uInt32 nGroups, nShapes, nShapeCount, nPer, nLastPer, nIndices, nOlePictureId;
css::awt::Point aTextRefPoint;
- ResetGroupTable( nShapes = mXShapes->getCount() );
+ nShapes = mXShapes->getCount();
+ ResetGroupTable( nShapes );
nIndices = nLastPer = nShapeCount = 0;
@@ -1795,7 +1801,10 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
if ( ImplGetText() )
{
if ( !aPropOpt.IsFontWork() )
- aPropOpt.CreateTextProperties( mXPropSet, mnTxId += 0x60, true );
+ {
+ mnTxId += 0x60;
+ aPropOpt.CreateTextProperties( mXPropSet, mnTxId, true );
+ }
}
}
}
@@ -1831,7 +1840,10 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
}
aPropOpt.CreateFillProperties( mXPropSet, true, mXShape );
if ( ImplGetText() )
- aPropOpt.CreateTextProperties( mXPropSet, mnTxId += 0x60, false, false );
+ {
+ mnTxId += 0x60;
+ aPropOpt.CreateTextProperties( mXPropSet, mnTxId, false, false );
+ }
}
else if ( mType == "drawing.Ellipse" )
{
@@ -1871,7 +1883,10 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
aSolverContainer );
aPropOpt.CreateFillProperties( mXPropSet, true, mXShape );
if ( ImplGetText() )
- aPropOpt.CreateTextProperties( mXPropSet, mnTxId += 0x60, false, false );
+ {
+ mnTxId += 0x60;
+ aPropOpt.CreateTextProperties( mXPropSet, mnTxId, false, false );
+ }
}
else
{
@@ -1938,7 +1953,10 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
maPosition = css::awt::Point( maRect.Left(), maRect.Top() );
maSize = css::awt::Size( maRect.GetWidth(), maRect.GetHeight() );
if ( bNeedText && ImplGetText() )
- aPropOpt.CreateTextProperties( mXPropSet, mnTxId += 0x60, false, false );
+ {
+ mnTxId += 0x60;
+ aPropOpt.CreateTextProperties( mXPropSet, mnTxId, false, false );
+ }
}
}
else if ( mType == "drawing.Control" )
@@ -2200,7 +2218,8 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
{
nPlaceHolderAtom = rLayout.nUsedObjectPlaceHolder;
ImplCreateShape( ESCHER_ShpInst_Rectangle, ShapeFlag::HaveAnchor | ShapeFlag::HaveMaster, aSolverContainer );
- aPropOpt.AddOpt( ESCHER_Prop_lTxid, mnTxId += 0x60 );
+ mnTxId += 0x60;
+ aPropOpt.AddOpt( ESCHER_Prop_lTxid, mnTxId );
aPropOpt.AddOpt( ESCHER_Prop_fNoFillHitTest, 0x10001 );
aPropOpt.AddOpt( ESCHER_Prop_fNoLineDrawDash, 0x10001 );
aPropOpt.AddOpt( ESCHER_Prop_hspMaster, mnShapeMasterBody );
@@ -2228,7 +2247,10 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
aPropOpt.AddOpt( ESCHER_Prop_fillBackColor, 0x8000000 );
aPropOpt.AddOpt( ESCHER_Prop_fNoLineDrawDash, 0x80000 );
if ( ImplGetText() )
- aPropOpt.CreateTextProperties( mXPropSet, mnTxId += 0x60, false, false );
+ {
+ mnTxId += 0x60;
+ aPropOpt.CreateTextProperties( mXPropSet, mnTxId, false, false );
+ }
}
}
else
@@ -2287,7 +2309,8 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
mnShapeMasterTitle );
EscherPropertyContainer aPropertyOptions;
aPropertyOptions.AddOpt( ESCHER_Prop_LockAgainstGrouping, 0x50001 );
- aPropertyOptions.AddOpt( ESCHER_Prop_lTxid, mnTxId += 0x60 );
+ mnTxId += 0x60;
+ aPropertyOptions.AddOpt( ESCHER_Prop_lTxid, mnTxId );
aPropertyOptions.AddOpt( ESCHER_Prop_AnchorText, ESCHER_AnchorMiddle );
aPropertyOptions.AddOpt( ESCHER_Prop_fNoFillHitTest, 0x110001 );
aPropertyOptions.AddOpt( ESCHER_Prop_lineColor, 0x8000001 );
@@ -2297,7 +2320,8 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
if ( aPropertyOptions.GetOpt( ESCHER_Prop_fNoLineDrawDash, nLineFlags ) )
nLineFlags |= 0x10001; // draw dashed line if no line
aPropertyOptions.AddOpt( ESCHER_Prop_fNoLineDrawDash, nLineFlags );
- aPropertyOptions.CreateTextProperties( mXPropSet, mnTxId += 0x60 );
+ mnTxId += 0x60;
+ aPropertyOptions.CreateTextProperties( mXPropSet, mnTxId );
ImplAdjustFirstLineLineSpacing( aTextObj, aPropOpt );
aPropertyOptions.Commit( *mpStrm );
mpPptEscherEx->AddAtom( 8, ESCHER_ClientAnchor );
@@ -2340,7 +2364,8 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
aSolverContainer );
aPropOpt.AddOpt( ESCHER_Prop_hspMaster, mnShapeMasterTitle );
aPropOpt.CreateFillProperties( mXPropSet, true, mXShape );
- aPropOpt.CreateTextProperties( mXPropSet, mnTxId += 0x60 );
+ mnTxId += 0x60;
+ aPropOpt.CreateTextProperties( mXPropSet, mnTxId );
ImplAdjustFirstLineLineSpacing( aTextObj, aPropOpt );
if ( mbEmptyPresObj )
{
@@ -2383,7 +2408,8 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
mnShapeMasterBody );
EscherPropertyContainer aPropOpt2;
aPropOpt2.AddOpt( ESCHER_Prop_LockAgainstGrouping, 0x50001 );
- aPropOpt2.AddOpt( ESCHER_Prop_lTxid, mnTxId += 0x60 );
+ mnTxId += 0x60;
+ aPropOpt2.AddOpt( ESCHER_Prop_lTxid, mnTxId );
aPropOpt2.AddOpt( ESCHER_Prop_fNoFillHitTest, 0x110001 );
aPropOpt2.AddOpt( ESCHER_Prop_lineColor, 0x8000001 );
aPropOpt2.AddOpt( ESCHER_Prop_fNoLineDrawDash, 0x90001 );
@@ -2393,7 +2419,8 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
if ( aPropOpt2.GetOpt( ESCHER_Prop_fNoLineDrawDash, nLineFlags ) )
nLineFlags |= 0x10001; // draw dashed line if no line
aPropOpt2.AddOpt( ESCHER_Prop_fNoLineDrawDash, nLineFlags );
- aPropOpt2.CreateTextProperties( mXPropSet, mnTxId += 0x60 );
+ mnTxId += 0x60;
+ aPropOpt2.CreateTextProperties( mXPropSet, mnTxId );
ImplAdjustFirstLineLineSpacing( aTextObj, aPropOpt2 );
aPropOpt2.Commit( *mpStrm );
mpPptEscherEx->AddAtom( 8, ESCHER_ClientAnchor );
@@ -2445,7 +2472,8 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
aSolverContainer );
aPropOpt.AddOpt( ESCHER_Prop_hspMaster, mnShapeMasterBody );
aPropOpt.CreateFillProperties( mXPropSet, true, mXShape );
- aPropOpt.CreateTextProperties( mXPropSet, mnTxId += 0x60 );
+ mnTxId += 0x60;
+ aPropOpt.CreateTextProperties( mXPropSet, mnTxId );
ImplAdjustFirstLineLineSpacing( aTextObj, aPropOpt );
if ( mbEmptyPresObj )
{
@@ -2498,7 +2526,8 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
ImplCreateShape( ESCHER_ShpInst_Rectangle,
ShapeFlag::HaveAnchor | ShapeFlag::HaveMaster,
aSolverContainer );
- aPropOpt.AddOpt( ESCHER_Prop_lTxid, mnTxId += 0x60 );
+ mnTxId += 0x60;
+ aPropOpt.AddOpt( ESCHER_Prop_lTxid, mnTxId );
aPropOpt.AddOpt( ESCHER_Prop_fNoFillHitTest, 0x10001 );
aPropOpt.AddOpt( ESCHER_Prop_fNoLineDrawDash, 0x10001 );
aPropOpt.AddOpt( ESCHER_Prop_hspMaster, mnShapeMasterBody );
@@ -3171,7 +3200,8 @@ void PPTWriter::ImplCreateTable( uno::Reference< drawing::XShape > const & rXSha
aSolverContainer );
aPropOptSp.CreateFillProperties( mXPropSet, true );
aPropOptSp.AddOpt( ESCHER_Prop_fNoLineDrawDash, 0x90000 );
- aPropOptSp.CreateTextProperties( mXPropSet, mnTxId += 0x60 );
+ mnTxId += 0x60;
+ aPropOptSp.CreateTextProperties( mXPropSet, mnTxId );
aPropOptSp.AddOpt( ESCHER_Prop_WrapText, ESCHER_WrapSquare );
SvMemoryStream aClientTextBox( 0x200, 0x200 );
diff --git a/sd/source/ui/app/sdxfer.cxx b/sd/source/ui/app/sdxfer.cxx
index 1758f5d9fcba..14543f4f1a76 100644
--- a/sd/source/ui/app/sdxfer.cxx
+++ b/sd/source/ui/app/sdxfer.cxx
@@ -312,7 +312,8 @@ void SdTransferable::CreateData()
{
// #112978# need to use GetAllMarkedBoundRect instead of GetAllMarkedRect to get
// fat lines correctly
- Point aOrigin( ( maVisArea = mpSdViewIntern->GetAllMarkedBoundRect() ).TopLeft() );
+ maVisArea = mpSdViewIntern->GetAllMarkedBoundRect();
+ Point aOrigin( maVisArea.TopLeft() );
Size aVector( -aOrigin.X(), -aOrigin.Y() );
for( size_t nObj = 0, nObjCount = pPage->GetObjCount(); nObj < nObjCount; ++nObj )
diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx
index e9665e6c5e74..05c817ab7855 100644
--- a/sfx2/source/appl/linkmgr2.cxx
+++ b/sfx2/source/appl/linkmgr2.cxx
@@ -651,7 +651,8 @@ bool SvxInternalLink::Connect( sfx2::SvBaseLink* pLink )
// then try to download the file:
INetURLObject aURL( sTopic );
INetProtocol eOld = aURL.GetProtocol();
- aURL.SetURL( sTopic = lcl_DDE_RelToAbs( sTopic, sReferer ) );
+ sTopic = lcl_DDE_RelToAbs( sTopic, sReferer );
+ aURL.SetURL( sTopic );
if( INetProtocol::NotValid != eOld ||
INetProtocol::Http != aURL.GetProtocol() )
{
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index 8f0ac0a735b8..519bb3dc5e96 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -626,7 +626,8 @@ void IndexTabPage_Impl::InitializeIndex()
DBG_ASSERT( aRefList.getLength() == aAnchorList.getLength(),"reference list and title list of different length" );
- const bool insert = ( ndx = aKeywordPair.indexOf( ';' ) ) != -1;
+ ndx = aKeywordPair.indexOf( ';' );
+ const bool insert = ndx != -1;
if ( insert )
{
diff --git a/soltools/mkdepend/parse.c b/soltools/mkdepend/parse.c
index 94533a49f6ce..7d73aae9b068 100644
--- a/soltools/mkdepend/parse.c
+++ b/soltools/mkdepend/parse.c
@@ -47,7 +47,8 @@ int find_includes(struct filepointer *filep, struct inclist *file, struct inclis
boolean recfailOK;
while ((line = get_line(filep))) {
- switch(type = deftype(line, filep, file, TRUE, symbols)) {
+ type = deftype(line, filep, file, TRUE, symbols);
+ switch(type) {
case IF:
doif:
type = find_includes(filep, file,
@@ -171,7 +172,8 @@ int gobble(struct filepointer *filep,
int type;
while ((line = get_line(filep))) {
- switch(type = deftype(line, filep, file, FALSE, symbols)) {
+ type = deftype(line, filep, file, FALSE, symbols);
+ switch(type) {
case IF:
case IFFALSE:
case IFGUESSFALSE:
diff --git a/stoc/source/corereflection/lrucache.hxx b/stoc/source/corereflection/lrucache.hxx
index b52a05fe1213..f69874c62149 100644
--- a/stoc/source/corereflection/lrucache.hxx
+++ b/stoc/source/corereflection/lrucache.hxx
@@ -163,7 +163,8 @@ inline void LRU_Cache< t_Key, t_Val, t_KeyHash >::setValue(
}
#endif
_aKey2Element.erase( pEntry->aKey );
- _aKey2Element[ pEntry->aKey = rKey ] = pEntry;
+ pEntry->aKey = rKey;
+ _aKey2Element[ rKey ] = pEntry;
}
else
{
diff --git a/svl/source/crypto/cryptosign.cxx b/svl/source/crypto/cryptosign.cxx
index ea2813be4202..9f18e53a3eca 100644
--- a/svl/source/crypto/cryptosign.cxx
+++ b/svl/source/crypto/cryptosign.cxx
@@ -474,8 +474,9 @@ bad_data:
} while (len > 0);
/* now result contains result_bytes of data */
if (to->data && to->len >= result_bytes) {
- PORT_Memcpy(to->data, result, to->len = result_bytes);
- rv = SECSuccess;
+ to->len = result_bytes;
+ PORT_Memcpy(to->data, result, to->len);
+ rv = SECSuccess;
} else {
SECItem result_item = {siBuffer, nullptr, 0 };
result_item.data = result;
@@ -1855,7 +1856,8 @@ bad_data:
/* now result contains result_bytes of data */
if (to->data && to->len >= result_bytes)
{
- PORT_Memcpy(to->data, result, to->len = result_bytes);
+ to->len = result_bytes;
+ PORT_Memcpy(to->data, result, to->len);
rv = SECSuccess;
}
else
diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx
index 63ae92c13608..0ec1cd812418 100644
--- a/svl/source/numbers/zforfind.cxx
+++ b/svl/source/numbers/zforfind.cxx
@@ -1170,8 +1170,18 @@ bool ImpSvNumberInputScan::MayBeMonthDate()
bool bYear1 = (sStrArray[nNums[0]].getLength() >= 3);
bool bYear2 = (sStrArray[nNums[1]].getLength() >= 3);
sal_Int32 n;
- bool bDay1 = (!bYear1 && (n = sStrArray[nNums[0]].toInt32()) >= 1 && n <= 31);
- bool bDay2 = (!bYear2 && (n = sStrArray[nNums[1]].toInt32()) >= 1 && n <= 31);
+ bool bDay1 = !bYear1;
+ if (bDay1)
+ {
+ n = sStrArray[nNums[0]].toInt32();
+ bDay1 = n >= 1 && n <= 31;
+ }
+ bool bDay2 = !bYear2;
+ if (bDay2)
+ {
+ n = sStrArray[nNums[1]].toInt32();
+ bDay2 = n >= 1 && n <= 31;
+ }
if (bDay1 && !bDay2)
{
diff --git a/svtools/source/brwbox/brwbox1.cxx b/svtools/source/brwbox/brwbox1.cxx
index 41d72eafa72b..561d1dbe1a30 100644
--- a/svtools/source/brwbox/brwbox1.cxx
+++ b/svtools/source/brwbox/brwbox1.cxx
@@ -1157,7 +1157,10 @@ void BrowseBox::RowInserted( long nRow, long nNumRows, bool bDoPaint, bool bKeep
if ( nCurRow == BROWSER_ENDOFSELECTION )
GoToRow( 0, false, bKeepSelection );
else if ( nRow <= nCurRow )
- GoToRow( nCurRow += nNumRows, false, bKeepSelection );
+ {
+ nCurRow += nNumRows;
+ GoToRow( nCurRow, false, bKeepSelection );
+ }
// adjust the vertical scrollbar
if ( bDoPaint )
diff --git a/svtools/source/config/printoptions.cxx b/svtools/source/config/printoptions.cxx
index af1101acd8cd..a0beda999bb0 100644
--- a/svtools/source/config/printoptions.cxx
+++ b/svtools/source/config/printoptions.cxx
@@ -701,7 +701,8 @@ SvtPrinterOptions::SvtPrinterOptions()
if( m_pStaticDataContainer == nullptr )
{
OUString aRootPath( ROOTNODE_START );
- m_pStaticDataContainer = new SvtPrintOptions_Impl( aRootPath += "/Printer" );
+ aRootPath += "/Printer";
+ m_pStaticDataContainer = new SvtPrintOptions_Impl( aRootPath );
pPrinterOptionsDataContainer = m_pStaticDataContainer;
svtools::ItemHolder2::holdConfigItem(EItem::PrintOptions);
}
@@ -735,7 +736,8 @@ SvtPrintFileOptions::SvtPrintFileOptions()
if( m_pStaticDataContainer == nullptr )
{
OUString aRootPath( ROOTNODE_START );
- m_pStaticDataContainer = new SvtPrintOptions_Impl( aRootPath += "/File" );
+ aRootPath += "/File";
+ m_pStaticDataContainer = new SvtPrintOptions_Impl( aRootPath );
pPrintFileOptionsDataContainer = m_pStaticDataContainer;
svtools::ItemHolder2::holdConfigItem(EItem::PrintFileOptions);
diff --git a/svtools/source/misc/templatefoldercache.cxx b/svtools/source/misc/templatefoldercache.cxx
index a2b0b09acbc9..586e85bacf9e 100644
--- a/svtools/source/misc/templatefoldercache.cxx
+++ b/svtools/source/misc/templatefoldercache.cxx
@@ -437,12 +437,10 @@ namespace svt
sal_Int32 TemplateFolderCacheImpl::getMagicNumber()
{
- sal_Int32 nMagic = 0;
- ( nMagic += sal_Int8('T') ) <<= 4;
- ( nMagic += sal_Int8('D') ) <<= 4;
- ( nMagic += sal_Int8('S') ) <<= 4;
- ( nMagic += sal_Int8('C') ) <<= 0;
- return nMagic;
+ return (sal_Int8('T') << 12)
+ | (sal_Int8('D') << 8)
+ | (sal_Int8('S') << 4)
+ | (sal_Int8('C'));
}
diff --git a/svtools/source/svrtf/parrtf.cxx b/svtools/source/svrtf/parrtf.cxx
index 7360c77ede37..bd8568b1194c 100644
--- a/svtools/source/svrtf/parrtf.cxx
+++ b/svtools/source/svrtf/parrtf.cxx
@@ -583,7 +583,8 @@ SvParserState SvRTFParser::CallParser()
rInput.ReadChar( cFirstCh ); nNextCh = cFirstCh;
eState = SvParserState::Working;
nOpenBrakets = 0;
- SetSrcEncoding( eCodeSet = RTL_TEXTENCODING_MS_1252 );
+ eCodeSet = RTL_TEXTENCODING_MS_1252;
+ SetSrcEncoding( eCodeSet );
// the first two tokens should be '{' and \\rtf !!
if( '{' == GetNextToken() && RTF_RTF == GetNextToken() )
@@ -646,16 +647,20 @@ void SvRTFParser::Continue( int nToken )
break; // skip unknown token
case RTF_NEXTTYPE:
case RTF_ANSITYPE:
- SetSrcEncoding( eCodeSet = RTL_TEXTENCODING_MS_1252 );
+ eCodeSet = RTL_TEXTENCODING_MS_1252;
+ SetSrcEncoding( eCodeSet );
break;
case RTF_MACTYPE:
- SetSrcEncoding( eCodeSet = RTL_TEXTENCODING_APPLE_ROMAN );
+ eCodeSet = RTL_TEXTENCODING_APPLE_ROMAN;
+ SetSrcEncoding( eCodeSet );
break;
case RTF_PCTYPE:
- SetSrcEncoding( eCodeSet = RTL_TEXTENCODING_IBM_437 );
+ eCodeSet = RTL_TEXTENCODING_IBM_437;
+ SetSrcEncoding( eCodeSet );
break;
case RTF_PCATYPE:
- SetSrcEncoding( eCodeSet = RTL_TEXTENCODING_IBM_850 );
+ eCodeSet = RTL_TEXTENCODING_IBM_850;
+ SetSrcEncoding( eCodeSet );
break;
case RTF_ANSICPG:
eCodeSet = rtl_getTextEncodingFromWindowsCodePage(nTokenValue);
diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx
index 6af32ecfcdae..8fa6a67df992 100644
--- a/svx/source/dialog/svxruler.cxx
+++ b/svx/source/dialog/svxruler.cxx
@@ -2018,11 +2018,11 @@ void SvxRuler::ApplyMargins()
else
{
const long lOldNull = lLogicNullOffset;
- mxULSpaceItem->SetUpper(
- PixelVAdjust(
- lLogicNullOffset =
+ lLogicNullOffset =
ConvertVPosLogic(GetFrameLeft()) -
- lAppNullOffset, mxULSpaceItem->GetUpper()));
+ lAppNullOffset;
+ mxULSpaceItem->SetUpper(
+ PixelVAdjust(lLogicNullOffset, mxULSpaceItem->GetUpper()));
if(bAppSetNullOffset)
{
lAppNullOffset += lLogicNullOffset - lOldNull;
diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index d70cc8293c53..6123ce0e8a98 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -1527,9 +1527,13 @@ bool SdrMarkView::MarkNextObj(const Point& rPnt, short nTol, bool bPrev)
size_t nSearchBeg(0);
E3dScene* pScene(nullptr);
SdrObject* pObjHit(bPrev ? pBtmObjHit : pTopObjHit);
- const bool bRemap(
- nullptr != dynamic_cast< const E3dCompoundObject* >(pObjHit)
- && nullptr != (pScene = dynamic_cast< E3dScene* >(pObjHit->getParentSdrObjectFromSdrObject())));
+ bool bRemap =
+ nullptr != dynamic_cast< const E3dCompoundObject* >(pObjHit);
+ if (bRemap)
+ {
+ pScene = dynamic_cast< E3dScene* >(pObjHit->getParentSdrObjectFromSdrObject());
+ bRemap = nullptr != pScene;
+ }
if(bPrev)
{
diff --git a/svx/source/unodraw/unoshap4.cxx b/svx/source/unodraw/unoshap4.cxx
index 459cd45101c6..c05baca128cc 100644
--- a/svx/source/unodraw/unoshap4.cxx
+++ b/svx/source/unodraw/unoshap4.cxx
@@ -426,7 +426,8 @@ bool SvxOle2Shape::createObject( const SvGlobalName &aClassName )
}
// connect the object after the visual area is set
- SvxShape::setPropertyValue( UNO_NAME_OLE2_PERSISTNAME, Any( aTmpStr = aPersistName ) );
+ aTmpStr = aPersistName;
+ SvxShape::setPropertyValue( UNO_NAME_OLE2_PERSISTNAME, Any( aTmpStr ) );
// the object is inserted during setting of PersistName property usually
if( pOle2Obj->IsEmpty() )
diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx
index 05f8df8d72c3..3a4dc4a4493f 100644
--- a/svx/source/xml/xmlgrhlp.cxx
+++ b/svx/source/xml/xmlgrhlp.cxx
@@ -416,8 +416,9 @@ uno::Reference < embed::XStorage > SvXMLGraphicHelper::ImplGetGraphicStorage( co
{
try
{
+ maCurStorageName = rStorageName;
xRetStorage = mxRootStorage->openStorageElement(
- maCurStorageName = rStorageName,
+ maCurStorageName,
( SvXMLGraphicHelperMode::Write == meCreateMode )
? embed::ElementModes::READWRITE
: embed::ElementModes::READ );
@@ -430,7 +431,8 @@ uno::Reference < embed::XStorage > SvXMLGraphicHelper::ImplGetGraphicStorage( co
{
try
{
- xRetStorage = mxRootStorage->openStorageElement( maCurStorageName = rStorageName, embed::ElementModes::READ );
+ maCurStorageName = rStorageName;
+ xRetStorage = mxRootStorage->openStorageElement( maCurStorageName, embed::ElementModes::READ );
}
catch ( uno::Exception& )
{
@@ -889,12 +891,13 @@ Reference< XOutputStream > SAL_CALL SvXMLGraphicHelper::createOutputStream()
if( SvXMLGraphicHelperMode::Read == meCreateMode )
{
- SvXMLGraphicOutputStream* pOutputStream = new SvXMLGraphicOutputStream;
+ std::unique_ptr<SvXMLGraphicOutputStream> pOutputStream(new SvXMLGraphicOutputStream);
if( pOutputStream->Exists() )
- maGrfStms.push_back( xRet = pOutputStream );
- else
- delete pOutputStream;
+ {
+ xRet = pOutputStream.release();
+ maGrfStms.push_back( xRet );
+ }
}
return xRet;
diff --git a/svx/source/xoutdev/_xoutbmp.cxx b/svx/source/xoutdev/_xoutbmp.cxx
index 116ad8f8e614..9b9f28944771 100644
--- a/svx/source/xoutdev/_xoutbmp.cxx
+++ b/svx/source/xoutdev/_xoutbmp.cxx
@@ -465,18 +465,23 @@ Bitmap XOutBitmap::DetectEdges( const Bitmap& rBmp, const sal_uInt8 cThreshold )
{
nXTmp = nX;
- nSum1 = -( nSum2 = lGray = pReadAcc->GetIndexFromData( pScanlineRead, nXTmp++ ) );
+ nSum2 = lGray = pReadAcc->GetIndexFromData( pScanlineRead, nXTmp++ );
+ nSum1 = -nSum2;
nSum2 += static_cast<long>(pReadAcc->GetIndexFromData( pScanlineRead, nXTmp++ )) << 1;
- nSum1 += ( lGray = pReadAcc->GetIndexFromData( pScanlineRead, nXTmp ) );
+ lGray = pReadAcc->GetIndexFromData( pScanlineRead, nXTmp );
+ nSum1 += lGray;
nSum2 += lGray;
nSum1 += static_cast<long>(pReadAcc->GetIndexFromData( pScanlineRead1, nXTmp )) << 1;
- nSum1 -= static_cast<long>(pReadAcc->GetIndexFromData( pScanlineRead1, nXTmp -= 2 )) << 1;
+ nXTmp -= 2;
+ nSum1 -= static_cast<long>(pReadAcc->GetIndexFromData( pScanlineRead1, nXTmp )) << 1;
- nSum1 += ( lGray = -static_cast<long>(pReadAcc->GetIndexFromData( pScanlineRead2, nXTmp++ )) );
+ lGray = -static_cast<long>(pReadAcc->GetIndexFromData( pScanlineRead2, nXTmp++ ));
+ nSum1 += lGray;
nSum2 += lGray;
nSum2 -= static_cast<long>(pReadAcc->GetIndexFromData( pScanlineRead2, nXTmp++ )) << 1;
- nSum1 += ( lGray = static_cast<long>(pReadAcc->GetIndexFromData( pScanlineRead2, nXTmp )) );
+ lGray = static_cast<long>(pReadAcc->GetIndexFromData( pScanlineRead2, nXTmp ));
+ nSum1 += lGray;
nSum2 -= lGray;
if( ( nSum1 * nSum1 + nSum2 * nSum2 ) < lThres2 )
diff --git a/toolkit/source/controls/unocontrolcontainer.cxx b/toolkit/source/controls/unocontrolcontainer.cxx
index 86ad983ff8e1..193608416850 100644
--- a/toolkit/source/controls/unocontrolcontainer.cxx
+++ b/toolkit/source/controls/unocontrolcontainer.cxx
@@ -617,7 +617,10 @@ sal_Int32 UnoControlContainer::impl_addControl( const uno::Reference< awt::XCont
{
container::ContainerEvent aEvent;
aEvent.Source = *this;
- _pName ? ( aEvent.Accessor <<= *_pName ) : ( aEvent.Accessor <<= static_cast<sal_Int32>(id) );
+ if (_pName)
+ aEvent.Accessor <<= *_pName;
+ else
+ aEvent.Accessor <<= static_cast<sal_Int32>(id);
aEvent.Element <<= _rxControl;
maCListeners.elementInserted( aEvent );
}
diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx
index 4f4bdf5dffe8..4217531800b5 100644
--- a/tools/source/generic/poly.cxx
+++ b/tools/source/generic/poly.cxx
@@ -149,16 +149,16 @@ ImplPolygon::ImplPolygon( const tools::Rectangle& rRect, sal_uInt32 nHorzRound,
Point* pDstAry = mxPointAry.get();
for( i = 0, nEnd = nSize4; i < nEnd; i++ )
- ( pDstAry[ i ] = pSrcAry[ i ] ) += aTR;
+ pDstAry[ i ] = pSrcAry[ i ] + aTR;
for( nEnd = nEnd + nSize4; i < nEnd; i++ )
- ( pDstAry[ i ] = pSrcAry[ i ] ) += aTL;
+ pDstAry[ i ] = pSrcAry[ i ] + aTL;
for( nEnd = nEnd + nSize4; i < nEnd; i++ )
- ( pDstAry[ i ] = pSrcAry[ i ] ) += aBL;
+ pDstAry[ i ] = pSrcAry[ i ] + aBL;
for( nEnd = nEnd + nSize4; i < nEnd; i++ )
- ( pDstAry[ i ] = pSrcAry[ i ] ) += aBR;
+ pDstAry[ i ] = pSrcAry[ i ] + aBR;
pDstAry[ nEnd ] = pDstAry[ 0 ];
}
@@ -1054,7 +1054,8 @@ void Polygon::Optimize( PolyOptimizeFlags nOptimizeFlags )
if( ( mpImplPolygon->mxPointAry[ i ] != mpImplPolygon->mxPointAry[ nLast ] ) &&
( !nReduce || ( nReduce < FRound( CalcDistance( nLast, i ) ) ) ) )
{
- aNewPoly[ nNewCount++ ] = mpImplPolygon->mxPointAry[ nLast = i ];
+ nLast = i;
+ aNewPoly[ nNewCount++ ] = mpImplPolygon->mxPointAry[ i ];
}
}
@@ -1292,7 +1293,8 @@ void Polygon::ImplReduceEdges( tools::Polygon& rPoly, const double& rArea, sal_u
else
{
Vector2D aVecB( rPoly[ nIndNext ] );
- double fDistB = ( aVecB -= Vector2D(rPoly[ nIndPrev ] )).GetLength();
+ aVecB -= Vector2D(rPoly[ nIndPrev ] );
+ double fDistB = aVecB.GetLength();
double fLenWithB = fDist2 + fDist3;
double fLenFact = ( fDistB != 0.0 ) ? fLenWithB / fDistB : 1.0;
double fTurnPrev = aVec1.Normalize().Scalar( aVec2 );
diff --git a/tools/source/stream/vcompat.cxx b/tools/source/stream/vcompat.cxx
index 7e03ef43a0c8..d77f866e06af 100644
--- a/tools/source/stream/vcompat.cxx
+++ b/tools/source/stream/vcompat.cxx
@@ -32,7 +32,8 @@ VersionCompat::VersionCompat( SvStream& rStm, StreamMode nStreamMode, sal_uInt16
if( StreamMode::WRITE == mnStmMode )
{
mpRWStm->WriteUInt16( mnVersion );
- mnTotalSize = ( mnCompatPos = mpRWStm->Tell() ) + 4;
+ mnCompatPos = mpRWStm->Tell();
+ mnTotalSize = mnCompatPos + 4;
mpRWStm->SeekRel( 4 );
}
else
diff --git a/vcl/source/bitmap/BitmapConvolutionMatrixFilter.cxx b/vcl/source/bitmap/BitmapConvolutionMatrixFilter.cxx
index c2f2750f69a0..5d2d6728e9f8 100644
--- a/vcl/source/bitmap/BitmapConvolutionMatrixFilter.cxx
+++ b/vcl/source/bitmap/BitmapConvolutionMatrixFilter.cxx
@@ -91,41 +91,53 @@ BitmapEx BitmapConvolutionMatrixFilter::execute(BitmapEx const& rBitmapEx) const
for (nX = 0; nX < nWidth; nX++)
{
// first row
- nSumR = (pTmp = pKoeff[0])[(pColor = pRowTmp1 + nX)->GetRed()];
+ pTmp = pKoeff[0];
+ pColor = pRowTmp1 + nX;
+ nSumR = pTmp[pColor->GetRed()];
nSumG = pTmp[pColor->GetGreen()];
nSumB = pTmp[pColor->GetBlue()];
- nSumR += (pTmp = pKoeff[1])[(++pColor)->GetRed()];
+ pTmp = pKoeff[1];
+ nSumR += pTmp[(++pColor)->GetRed()];
nSumG += pTmp[pColor->GetGreen()];
nSumB += pTmp[pColor->GetBlue()];
- nSumR += (pTmp = pKoeff[2])[(++pColor)->GetRed()];
+ pTmp = pKoeff[2];
+ nSumR += pTmp[(++pColor)->GetRed()];
nSumG += pTmp[pColor->GetGreen()];
nSumB += pTmp[pColor->GetBlue()];
// second row
- nSumR += (pTmp = pKoeff[3])[(pColor = pRowTmp2 + nX)->GetRed()];
+ pTmp = pKoeff[3];
+ pColor = pRowTmp2 + nX;
+ nSumR += pTmp[pColor->GetRed()];
nSumG += pTmp[pColor->GetGreen()];
nSumB += pTmp[pColor->GetBlue()];
- nSumR += (pTmp = pKoeff[4])[(++pColor)->GetRed()];
+ pTmp = pKoeff[4];
+ nSumR += pTmp[(++pColor)->GetRed()];
nSumG += pTmp[pColor->GetGreen()];
nSumB += pTmp[pColor->GetBlue()];
- nSumR += (pTmp = pKoeff[5])[(++pColor)->GetRed()];
+ pTmp = pKoeff[5];
+ nSumR += pTmp[(++pColor)->GetRed()];
nSumG += pTmp[pColor->GetGreen()];
nSumB += pTmp[pColor->GetBlue()];
// third row
- nSumR += (pTmp = pKoeff[6])[(pColor = pRowTmp3 + nX)->GetRed()];
+ pTmp = pKoeff[6];
+ pColor = pRowTmp3 + nX;
+ nSumR += pTmp[pColor->GetRed()];
nSumG += pTmp[pColor->GetGreen()];
nSumB += pTmp[pColor->GetBlue()];
- nSumR += (pTmp = pKoeff[7])[(++pColor)->GetRed()];
+ pTmp = pKoeff[7];
+ nSumR += pTmp[(++pColor)->GetRed()];
nSumG += pTmp[pColor->GetGreen()];
nSumB += pTmp[pColor->GetBlue()];
- nSumR += (pTmp = pKoeff[8])[(++pColor)->GetRed()];
+ pTmp = pKoeff[8];
+ nSumR += pTmp[(++pColor)->GetRed()];
nSumG += pTmp[pColor->GetGreen()];
nSumB += pTmp[pColor->GetBlue()];
diff --git a/vcl/source/bitmap/BitmapGaussianSeparableBlurFilter.cxx b/vcl/source/bitmap/BitmapGaussianSeparableBlurFilter.cxx
index 1826d19f12db..d12f086786ba 100644
--- a/vcl/source/bitmap/BitmapGaussianSeparableBlurFilter.cxx
+++ b/vcl/source/bitmap/BitmapGaussianSeparableBlurFilter.cxx
@@ -115,7 +115,8 @@ bool BitmapGaussianSeparableBlurFilter::convolutionPass(Bitmap& rBitmap, Bitmap&
for (int j = 0; j < pCount[nSourceX]; ++j)
{
aIndex = aBaseIndex + j;
- aSum += aWeight = pWeights[aIndex];
+ aWeight = pWeights[aIndex];
+ aSum += aWeight;
aColor = pReadAcc->GetColor(nSourceY, pPixels[aIndex]);
diff --git a/vcl/source/bitmap/BitmapMedianFilter.cxx b/vcl/source/bitmap/BitmapMedianFilter.cxx
index 81b935ac5212..47a298dd6039 100644
--- a/vcl/source/bitmap/BitmapMedianFilter.cxx
+++ b/vcl/source/bitmap/BitmapMedianFilter.cxx
@@ -114,7 +114,8 @@ BitmapEx BitmapMedianFilter::execute(BitmapEx const& rBitmapEx) const
Scanline pScanline = pWriteAcc->GetScanline(nY);
for (nX = 0; nX < nWidth; nX++)
{
- nR1 = (pColor = pRowTmp1 + nX)->GetRed();
+ pColor = pRowTmp1 + nX;
+ nR1 = pColor->GetRed();
nG1 = pColor->GetGreen();
nB1 = pColor->GetBlue();
nR2 = (++pColor)->GetRed();
@@ -124,7 +125,8 @@ BitmapEx BitmapMedianFilter::execute(BitmapEx const& rBitmapEx) const
nG3 = pColor->GetGreen();
nB3 = pColor->GetBlue();
- nR4 = (pColor = pRowTmp2 + nX)->GetRed();
+ pColor = pRowTmp2 + nX;
+ nR4 = pColor->GetRed();
nG4 = pColor->GetGreen();
nB4 = pColor->GetBlue();
nR5 = (++pColor)->GetRed();
@@ -134,7 +136,8 @@ BitmapEx BitmapMedianFilter::execute(BitmapEx const& rBitmapEx) const
nG6 = pColor->GetGreen();
nB6 = pColor->GetBlue();
- nR7 = (pColor = pRowTmp3 + nX)->GetRed();
+ pColor = pRowTmp3 + nX;
+ nR7 = pColor->GetRed();
nG7 = pColor->GetGreen();
nB7 = pColor->GetBlue();
nR8 = (++pColor)->GetRed();
diff --git a/vcl/source/bitmap/BitmapScaleSuperFilter.cxx b/vcl/source/bitmap/BitmapScaleSuperFilter.cxx
index 71eacdb5a087..eb081281b56d 100644
--- a/vcl/source/bitmap/BitmapScaleSuperFilter.cxx
+++ b/vcl/source/bitmap/BitmapScaleSuperFilter.cxx
@@ -201,7 +201,8 @@ void scale24bitBGR(ScaleContext &rCtx, long nStartY, long nEndY)
pTmp0++; pTmp1++;
sal_uInt8 cR0 = MAP( *pTmp0, *pTmp1, nTempFX );
- pTmp1 = ( pTmp0 = pLine1 + nOff ) + 3;
+ pTmp0 = pLine1 + nOff;
+ pTmp1 = pTmp0 + 3;
sal_uInt8 cB1 = MAP( *pTmp0, *pTmp1, nTempFX );
pTmp0++; pTmp1++;
sal_uInt8 cG1 = MAP( *pTmp0, *pTmp1, nTempFX );
@@ -241,7 +242,8 @@ void scale24bitRGB(ScaleContext &rCtx, long nStartY, long nEndY)
pTmp0++; pTmp1++;
sal_uInt8 cB0 = MAP( *pTmp0, *pTmp1, nTempFX );
- pTmp1 = ( pTmp0 = pLine1 + nOff ) + 3;
+ pTmp0 = pLine1 + nOff;
+ pTmp1 = pTmp0 + 3;
sal_uInt8 cR1 = MAP( *pTmp0, *pTmp1, nTempFX );
pTmp0++; pTmp1++;
sal_uInt8 cG1 = MAP( *pTmp0, *pTmp1, nTempFX );
diff --git a/vcl/source/filter/graphicfilter2.cxx b/vcl/source/filter/graphicfilter2.cxx
index 9c7491ea5e4a..b3fce62c75f0 100644
--- a/vcl/source/filter/graphicfilter2.cxx
+++ b/vcl/source/filter/graphicfilter2.cxx
@@ -643,7 +643,8 @@ bool GraphicDescriptor::ImpDetectTIF( SvStream& rStm, bool bExtendedInfo )
// Offset of the first IFD
rStm.ReadUInt32( nTemp32 );
- rStm.SeekRel( ( nCount = ( nTemp32 + 2 ) ) - 0x08 );
+ nCount = nTemp32 + 2;
+ rStm.SeekRel( nCount - 0x08 );
if ( nCount < nMax )
{
diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx
index 11d9bedae11c..9262c2bca365 100644
--- a/vcl/source/fontsubset/sft.cxx
+++ b/vcl/source/fontsubset/sft.cxx
@@ -427,7 +427,8 @@ static int GetSimpleTTOutline(TrueTypeFont const *ttf, sal_uInt32 glyphID, Contr
i = 0;
while (i <= lastPoint) {
- pa[i++].flags = static_cast<sal_uInt32>(flag = *p++);
+ flag = *p++;
+ pa[i++].flags = static_cast<sal_uInt32>(flag);
if (flag & 8) { /*- repeat flag */
n = *p++;
for (j=0; j<n; j++) {
diff --git a/vcl/source/gdi/bmpacc2.cxx b/vcl/source/gdi/bmpacc2.cxx
index 25606c09509e..83865113234c 100644
--- a/vcl/source/gdi/bmpacc2.cxx
+++ b/vcl/source/gdi/bmpacc2.cxx
@@ -29,8 +29,10 @@ void BitmapReadAccess::SetPixelForN1BitMsbPal(const Scanline pScanline, long nX,
{
sal_uInt8& rByte = pScanline[ nX >> 3 ];
- ( rBitmapColor.GetIndex() & 1 ) ? ( rByte |= 1 << ( 7 - ( nX & 7 ) ) ) :
- ( rByte &= ~( 1 << ( 7 - ( nX & 7 ) ) ) );
+ if ( rBitmapColor.GetIndex() & 1 )
+ rByte |= 1 << ( 7 - ( nX & 7 ) );
+ else
+ rByte &= ~( 1 << ( 7 - ( nX & 7 ) ) );
}
BitmapColor BitmapReadAccess::GetPixelForN1BitLsbPal(ConstScanline pScanline, long nX, const ColorMask&)
@@ -42,8 +44,10 @@ void BitmapReadAccess::SetPixelForN1BitLsbPal(const Scanline pScanline, long nX,
{
sal_uInt8& rByte = pScanline[ nX >> 3 ];
- ( rBitmapColor.GetIndex() & 1 ) ? ( rByte |= 1 << ( nX & 7 ) ) :
- ( rByte &= ~( 1 << ( nX & 7 ) ) );
+ if ( rBitmapColor.GetIndex() & 1 )
+ rByte |= 1 << ( nX & 7 );
+ else
+ rByte &= ~( 1 << ( nX & 7 ) );
}
BitmapColor BitmapReadAccess::GetPixelForN4BitMsnPal(ConstScanline pScanline, long nX, const ColorMask&)
@@ -55,8 +59,16 @@ void BitmapReadAccess::SetPixelForN4BitMsnPal(const Scanline pScanline, long nX,
{
sal_uInt8& rByte = pScanline[ nX >> 1 ];
- ( nX & 1 ) ? ( rByte &= 0xf0, rByte |= ( rBitmapColor.GetIndex() & 0x0f ) ) :
- ( rByte &= 0x0f, rByte |= ( rBitmapColor.GetIndex() << 4 ) );
+ if ( nX & 1 )
+ {
+ rByte &= 0xf0;
+ rByte |= ( rBitmapColor.GetIndex() & 0x0f );
+ }
+ else
+ {
+ rByte &= 0x0f;
+ rByte |= ( rBitmapColor.GetIndex() << 4 );
+ }
}
BitmapColor BitmapReadAccess::GetPixelForN4BitLsnPal(ConstScanline pScanline, long nX, const ColorMask&)
@@ -68,8 +80,16 @@ void BitmapReadAccess::SetPixelForN4BitLsnPal(const Scanline pScanline, long nX,
{
sal_uInt8& rByte = pScanline[ nX >> 1 ];
- ( nX & 1 ) ? ( rByte &= 0x0f, rByte |= ( rBitmapColor.GetIndex() << 4 ) ) :
- ( rByte &= 0xf0, rByte |= ( rBitmapColor.GetIndex() & 0x0f ) );
+ if ( nX & 1 )
+ {
+ rByte &= 0x0f;
+ rByte |= ( rBitmapColor.GetIndex() << 4 );
+ }
+ else
+ {
+ rByte &= 0xf0;
+ rByte |= ( rBitmapColor.GetIndex() & 0x0f );
+ }
}
BitmapColor BitmapReadAccess::GetPixelForN8BitPal(ConstScanline pScanline, long nX, const ColorMask&)
diff --git a/vcl/source/gdi/impanmvw.cxx b/vcl/source/gdi/impanmvw.cxx
index 958ce0803444..0c13f5fd6f9d 100644
--- a/vcl/source/gdi/impanmvw.cxx
+++ b/vcl/source/gdi/impanmvw.cxx
@@ -92,7 +92,10 @@ ImplAnimView::ImplAnimView( Animation* pParent, OutputDevice* pOut,
// If first frame OutputDevice is set, update variables now for real OutputDevice
if( pFirstFrameOutDev )
- maClip = ( mpOut = pOut )->GetClipRegion();
+ {
+ mpOut = pOut;
+ maClip = mpOut->GetClipRegion();
+ }
}
ImplAnimView::~ImplAnimView()
@@ -212,7 +215,8 @@ void ImplAnimView::draw( sal_uLong nPos, VirtualDevice* pVDev )
Size aSizePix;
Size aBmpSizePix;
const sal_uLong nLastPos = mpParent->Count() - 1;
- const AnimationBitmap& rAnm = mpParent->Get( static_cast<sal_uInt16>( mnActPos = std::min( nPos, nLastPos ) ) );
+ mnActPos = std::min( nPos, nLastPos );
+ const AnimationBitmap& rAnm = mpParent->Get( static_cast<sal_uInt16>( mnActPos ) );
getPosSize( rAnm, aPosPix, aSizePix );
diff --git a/vcl/source/gdi/impvect.cxx b/vcl/source/gdi/impvect.cxx
index c9b51f575918..fc69daf1b082 100644
--- a/vcl/source/gdi/impvect.cxx
+++ b/vcl/source/gdi/impvect.cxx
@@ -239,7 +239,8 @@ ImplVectMap::~ImplVectMap()
inline void ImplVectMap::Set( long nY, long nX, sal_uInt8 cVal )
{
const sal_uInt8 cShift = sal::static_int_cast<sal_uInt8>(6 - ( ( nX & 3 ) << 1 ));
- ( ( mpScan[ nY ][ nX >> 2 ] ) &= ~( 3 << cShift ) ) |= ( cVal << cShift );
+ auto & rPixel = mpScan[ nY ][ nX >> 2 ];
+ rPixel = (rPixel & ~( 3 << cShift ) ) | ( cVal << cShift );
}
inline sal_uInt8 ImplVectMap::Get( long nY, long nX ) const
@@ -598,7 +599,8 @@ void ImplChain::ImplPostProcess( const ImplPointArray& rArr )
}
}
- aNewArr1.ImplSetRealSize( nCount = nNewPos );
+ nCount = nNewPos;
+ aNewArr1.ImplSetRealSize( nCount );
// pass 2
aNewArr2.ImplSetSize( nCount );
@@ -620,7 +622,8 @@ void ImplChain::ImplPostProcess( const ImplPointArray& rArr )
pLeast = &( aNewArr1[ n++ ] );
}
- aNewArr2[ nNewPos++ ] = *( pLast = pLeast );
+ pLast = pLeast;
+ aNewArr2[ nNewPos++ ] = *pLast;
}
aNewArr2.ImplSetRealSize( nNewPos );
@@ -675,7 +678,8 @@ bool ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf,
if( n )
fPercentStep_2 = 45.0 / n;
- VECT_PROGRESS( pProgress, FRound( fPercent += 10.0 ) );
+ fPercent += 10.0;
+ VECT_PROGRESS( pProgress, FRound( fPercent ) );
for( sal_uInt16 i = 0; i < n; i++ )
{
@@ -683,7 +687,8 @@ bool ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf,
const Color aFindColor( aBmpCol.GetRed(), aBmpCol.GetGreen(), aBmpCol.GetBlue() );
std::unique_ptr<ImplVectMap> xMap(ImplExpand( pRAcc.get(), aFindColor ));
- VECT_PROGRESS( pProgress, FRound( fPercent += fPercentStep_2 ) );
+ fPercent += fPercentStep_2;
+ VECT_PROGRESS( pProgress, FRound( fPercent ) );
if( xMap )
{
@@ -706,7 +711,8 @@ bool ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf,
}
}
- VECT_PROGRESS( pProgress, FRound( fPercent += fPercentStep_2 ) );
+ fPercent += fPercentStep_2;
+ VECT_PROGRESS( pProgress, FRound( fPercent ) );
}
delete[] pColorSet;
@@ -935,7 +941,9 @@ bool ImplGetChain( ImplVectMap* pMap, const Point& rStartPt, ImplChain& rChain
if( pMap->IsCont( nTryY, nTryX ) )
{
rChain.ImplAdd( static_cast<sal_uInt8>(nLastDir) );
- pMap->Set( nActY = nTryY, nActX = nTryX, VECT_DONE_INDEX );
+ nActY = nTryY;
+ nActX = nTryX;
+ pMap->Set( nActY, nActX, VECT_DONE_INDEX );
nFound = 1;
}
else
@@ -952,7 +960,9 @@ bool ImplGetChain( ImplVectMap* pMap, const Point& rStartPt, ImplChain& rChain
if( pMap->IsCont( nTryY, nTryX ) )
{
rChain.ImplAdd( static_cast<sal_uInt8>(nDir) );
- pMap->Set( nActY = nTryY, nActX = nTryX, VECT_DONE_INDEX );
+ nActY = nTryY;
+ nActX = nTryX;
+ pMap->Set( nActY, nActX, VECT_DONE_INDEX );
nFound = 1;
nLastDir = nDir;
break;
diff --git a/vcl/source/gdi/pngwrite.cxx b/vcl/source/gdi/pngwrite.cxx
index c62e2d177b0b..7189791ae315 100644
--- a/vcl/source/gdi/pngwrite.cxx
+++ b/vcl/source/gdi/pngwrite.cxx
@@ -279,8 +279,10 @@ bool PNGWriterImpl::Write(SvStream& rOStm)
bool PNGWriterImpl::ImplWriteHeader()
{
ImplOpenChunk(PNGCHUNK_IHDR);
- ImplWriteChunk(sal_uInt32(mnWidth = mpAccess->Width()));
- ImplWriteChunk(sal_uInt32(mnHeight = mpAccess->Height()));
+ mnWidth = mpAccess->Width();
+ ImplWriteChunk(sal_uInt32(mnWidth));
+ mnHeight = mpAccess->Height();
+ ImplWriteChunk(sal_uInt32(mnHeight));
if (mnWidth && mnHeight && mnBitsPerPixel && mbStatus)
{
diff --git a/vcl/source/gdi/salmisc.cxx b/vcl/source/gdi/salmisc.cxx
index 6af3de0fd755..1e4a4870c1a9 100644
--- a/vcl/source/gdi/salmisc.cxx
+++ b/vcl/source/gdi/salmisc.cxx
@@ -196,7 +196,8 @@ static void ImplTCToTC( const BitmapBuffer& rSrcBuffer, BitmapBuffer const & rDs
for (long nX = 0; nX < rDstBuffer.mnWidth; ++nX)
{
- aCol.SetBlue( *( pPixel = ( pSrcScan + pMapX[ nX ] * 3 ) )++ );
+ pPixel = pSrcScan + pMapX[ nX ] * 3;
+ aCol.SetBlue( *pPixel++ );
aCol.SetGreen( *pPixel++ );
aCol.SetRed( *pPixel );
pFncSetPixel( pDstScan, nX, aCol, rDstMask );
diff --git a/vcl/source/outdev/gradient.cxx b/vcl/source/outdev/gradient.cxx
index bb2cd50f4fe3..aeace07e4710 100644
--- a/vcl/source/outdev/gradient.cxx
+++ b/vcl/source/outdev/gradient.cxx
@@ -521,7 +521,8 @@ void OutputDevice::DrawComplexGradient( const tools::Rectangle& rRect,
if( xPolyPoly )
{
- xPolyPoly->Insert( aPoly = rRect );
+ aPoly = rRect;
+ xPolyPoly->Insert( aPoly );
xPolyPoly->Insert( aPoly );
}
else
@@ -534,17 +535,22 @@ void OutputDevice::DrawComplexGradient( const tools::Rectangle& rRect,
aExtRect.AdjustRight(1 );
aExtRect.AdjustBottom(1 );
- ImplDrawPolygon( aPoly = aExtRect, pClixPolyPoly );
+ aPoly = aExtRect;
+ ImplDrawPolygon( aPoly, pClixPolyPoly );
}
// loop to output Polygon/PolyPolygon sequentially
for( long i = 1; i < nSteps; i++ )
{
// calculate new Polygon
- aRect.SetLeft( static_cast<long>( fScanLeft += fScanIncX ) );
- aRect.SetTop( static_cast<long>( fScanTop += fScanIncY ) );
- aRect.SetRight( static_cast<long>( fScanRight -= fScanIncX ) );
- aRect.SetBottom( static_cast<long>( fScanBottom -= fScanIncY ) );
+ fScanLeft += fScanIncX;
+ aRect.SetLeft( static_cast<long>( fScanLeft ) );
+ fScanTop += fScanIncY;
+ aRect.SetTop( static_cast<long>( fScanTop ) );
+ fScanRight -= fScanIncX;
+ aRect.SetRight( static_cast<long>( fScanRight ) );
+ fScanBottom -= fScanIncY;
+ aRect.SetBottom( static_cast<long>( fScanBottom ) );
if( ( aRect.GetWidth() < 2 ) || ( aRect.GetHeight() < 2 ) )
break;
@@ -863,17 +869,22 @@ void OutputDevice::DrawComplexGradientToMetafile( const tools::Rectangle& rRect,
mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), true ) );
- xPolyPoly->Insert( aPoly = rRect );
+ aPoly = rRect;
+ xPolyPoly->Insert( aPoly );
xPolyPoly->Insert( aPoly );
// loop to output Polygon/PolyPolygon sequentially
for( long i = 1; i < nSteps; i++ )
{
// calculate new Polygon
- aRect.SetLeft( static_cast<long>( fScanLeft += fScanIncX ) );
- aRect.SetTop( static_cast<long>( fScanTop += fScanIncY ) );
- aRect.SetRight( static_cast<long>( fScanRight -= fScanIncX ) );
- aRect.SetBottom( static_cast<long>( fScanBottom -= fScanIncY ) );
+ fScanLeft += fScanIncX;
+ aRect.SetLeft( static_cast<long>( fScanLeft ) );
+ fScanTop += fScanIncY;
+ aRect.SetTop( static_cast<long>( fScanTop ) );
+ fScanRight -= fScanIncX;
+ aRect.SetRight( static_cast<long>( fScanRight ) );
+ fScanBottom -= fScanIncY;
+ aRect.SetBottom( static_cast<long>( fScanBottom ) );
if( ( aRect.GetWidth() < 2 ) || ( aRect.GetHeight() < 2 ) )
break;
diff --git a/vcl/source/treelist/transfer.cxx b/vcl/source/treelist/transfer.cxx
index cc1a79c6068c..28fe43fda5f3 100644
--- a/vcl/source/treelist/transfer.cxx
+++ b/vcl/source/treelist/transfer.cxx
@@ -331,8 +331,8 @@ Any SAL_CALL TransferableHelper::getTransferData2( const DataFlavor& rFlavor, co
if( GraphicConverter::Export( aDstStm, aGraphic, ConvertDataFormat::EMF ) == ERRCODE_NONE )
{
- maAny <<= ( aSeq = Sequence< sal_Int8 >( static_cast< const sal_Int8* >( aDstStm.GetData() ),
- aDstStm.TellEnd() ) );
+ maAny <<= Sequence< sal_Int8 >( static_cast< const sal_Int8* >( aDstStm.GetData() ),
+ aDstStm.TellEnd() );
bDone = true;
}
}
@@ -361,8 +361,8 @@ Any SAL_CALL TransferableHelper::getTransferData2( const DataFlavor& rFlavor, co
// taking wmf without file header
if ( ConvertGDIMetaFileToWMF( aMtf, aDstStm, nullptr, false ) )
{
- maAny <<= ( aSeq = Sequence< sal_Int8 >( static_cast< const sal_Int8* >( aDstStm.GetData() ),
- aDstStm.TellEnd() ) );
+ maAny <<= Sequence< sal_Int8 >( static_cast< const sal_Int8* >( aDstStm.GetData() ),
+ aDstStm.TellEnd() );
bDone = true;
}
}
@@ -913,9 +913,10 @@ void TransferableHelper::CopyToClipboard( vcl::Window *pWindow ) const
try
{
- TransferableHelper* pThis = const_cast< TransferableHelper* >( this );
+ TransferableHelper* pThis = const_cast< TransferableHelper* >( this );
+ pThis->mxTerminateListener = new TerminateListener( *pThis );
Reference< XDesktop2 > xDesktop = Desktop::create( ::comphelper::getProcessComponentContext() );
- xDesktop->addTerminateListener( pThis->mxTerminateListener = new TerminateListener( *pThis ) );
+ xDesktop->addTerminateListener( pThis->mxTerminateListener );
mxClipboard->setContents( pThis, pThis );
}
@@ -938,9 +939,10 @@ void TransferableHelper::CopyToSelection( vcl::Window *pWindow ) const
try
{
- TransferableHelper* pThis = const_cast< TransferableHelper* >( this );
+ TransferableHelper* pThis = const_cast< TransferableHelper* >( this );
+ pThis->mxTerminateListener = new TerminateListener( *pThis );
Reference< XDesktop2 > xDesktop = Desktop::create( ::comphelper::getProcessComponentContext() );
- xDesktop->addTerminateListener( pThis->mxTerminateListener = new TerminateListener( *pThis ) );
+ xDesktop->addTerminateListener( pThis->mxTerminateListener );
xSelection->setContents( pThis, pThis );
}
diff --git a/writerfilter/source/rtftok/rtftokenizer.cxx b/writerfilter/source/rtftok/rtftokenizer.cxx
index 5410b652fbe3..310adc82db23 100644
--- a/writerfilter/source/rtftok/rtftokenizer.cxx
+++ b/writerfilter/source/rtftok/rtftokenizer.cxx
@@ -79,7 +79,8 @@ RTFError RTFTokenizer::resolveParse()
m_xStatusIndicator->start(sDocLoad, nEndPos);
nPercentSize = nEndPos / 100;
- m_xStatusIndicator->setValue(nLastPos = nCurrentPos);
+ nLastPos = nCurrentPos;
+ m_xStatusIndicator->setValue(nLastPos);
}
while (Strm().ReadChar(ch), !Strm().eof())
@@ -88,7 +89,10 @@ RTFError RTFTokenizer::resolveParse()
sal_uInt64 const nCurrentPos = Strm().Tell();
if (m_xStatusIndicator.is() && nCurrentPos > (nLastPos + nPercentSize))
- m_xStatusIndicator->setValue(nLastPos = nCurrentPos);
+ {
+ nLastPos = nCurrentPos;
+ m_xStatusIndicator->setValue(nLastPos);
+ }
if (m_nGroup < 0)
return RTFError::GROUP_UNDER;