summaryrefslogtreecommitdiff
path: root/svx
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 /svx
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>
Diffstat (limited to 'svx')
-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
5 files changed, 32 insertions, 19 deletions
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 )