Kaydet (Commit) 270e41ad authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:buriedassign in sd..writerfilter

Change-Id: I954c12d9e1c493be6ac8c7b15076077b5bff5b74
Reviewed-on: https://gerrit.libreoffice.org/62811
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 26caf1bc
......@@ -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 ];
}
}
......
......@@ -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 )
......
......@@ -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);
......
......@@ -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();
......
......@@ -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 )
......
......@@ -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() )
{
......
......@@ -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 )
{
......
......@@ -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:
......
......@@ -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
{
......
......@@ -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
......
......@@ -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)
{
......
......@@ -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 )
......
......@@ -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);
......
......@@ -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'));
}
......
......@@ -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);
......
......@@ -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;
......
......@@ -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)
{
......
......@@ -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() )
......
......@@ -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;
......
......@@ -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 )
......
......@@ -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 );
}
......
......@@ -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 );
......
......@@ -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
......
......@@ -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()];
......
......@@ -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]);
......
......@@ -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();
......
......@@ -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 );
......
......@@ -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 )
{
......
......@@ -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++) {
......
......@@ -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&)
......
......@@ -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 );
......
......@@ -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 );