diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-04-13 21:25:10 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-04-19 13:19:45 +0200 |
commit | 8b663bc830605a0065184b299bea9cd3682d7935 (patch) | |
tree | 9dd047c9b6423ba047a6c7a1371ee9f658b7e26d /sdext | |
parent | 1a5b12aa5da2c718848d3cc5d9bce7bfcdeacf54 (diff) |
loplugin:sequentialassign in sd
Change-Id: I7d592b8929ca46c64a622551b039af0d6a7911db
Reviewed-on: https://gerrit.libreoffice.org/70716
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sdext')
-rw-r--r-- | sdext/source/pdfimport/filterdet.cxx | 11 | ||||
-rw-r--r-- | sdext/source/pdfimport/test/pdfunzip.cxx | 3 | ||||
-rw-r--r-- | sdext/source/pdfimport/tree/drawtreevisiting.cxx | 6 | ||||
-rw-r--r-- | sdext/source/pdfimport/tree/writertreevisiting.cxx | 6 | ||||
-rw-r--r-- | sdext/source/pdfimport/wrapper/wrapper.cxx | 3 | ||||
-rw-r--r-- | sdext/source/presenter/PresenterSlideSorter.cxx | 6 |
6 files changed, 11 insertions, 24 deletions
diff --git a/sdext/source/pdfimport/filterdet.cxx b/sdext/source/pdfimport/filterdet.cxx index b48fc648ea04..a726ef883e3c 100644 --- a/sdext/source/pdfimport/filterdet.cxx +++ b/sdext/source/pdfimport/filterdet.cxx @@ -232,8 +232,7 @@ OUString SAL_CALL PDFDetector::detect( uno::Sequence< beans::PropertyValue >& rF // read the first 1024 byte (see PDF reference implementation note 12) const sal_Int32 nHeaderSize = 1024; uno::Sequence< sal_Int8 > aBuf( nHeaderSize ); - sal_uInt64 nBytes = 0; - nBytes = xInput->readBytes( aBuf, nHeaderSize ); + sal_uInt64 nBytes = xInput->readBytes( aBuf, nHeaderSize ); if( nBytes > 5 ) { const sal_Int8* pBytes = aBuf.getConstArray(); @@ -492,9 +491,7 @@ uno::Reference< io::XStream > getAdditionalStream( const OUString& if( pTrailer && pTrailer->m_pDict ) { // search document checksum entry - std::unordered_map< OString, - pdfparse::PDFEntry* >::iterator chk; - chk = pTrailer->m_pDict->m_aMap.find( "DocChecksum" ); + auto chk = pTrailer->m_pDict->m_aMap.find( "DocChecksum" ); if( chk == pTrailer->m_pDict->m_aMap.end() ) { SAL_INFO( "sdext.pdfimport", "no DocChecksum entry" ); @@ -508,9 +505,7 @@ uno::Reference< io::XStream > getAdditionalStream( const OUString& } // search for AdditionalStreams entry - std::unordered_map< OString, - pdfparse::PDFEntry* >::iterator add_stream; - add_stream = pTrailer->m_pDict->m_aMap.find( "AdditionalStreams" ); + auto add_stream = pTrailer->m_pDict->m_aMap.find( "AdditionalStreams" ); if( add_stream == pTrailer->m_pDict->m_aMap.end() ) { SAL_INFO( "sdext.pdfimport", "no AdditionalStreams entry" ); diff --git a/sdext/source/pdfimport/test/pdfunzip.cxx b/sdext/source/pdfimport/test/pdfunzip.cxx index 7db906bb255e..a014fa4ccae0 100644 --- a/sdext/source/pdfimport/test/pdfunzip.cxx +++ b/sdext/source/pdfimport/test/pdfunzip.cxx @@ -295,8 +295,7 @@ static int write_addStreams( const char* pInFile, const char* pOutFile, PDFFile* if( pTrailer && pTrailer->m_pDict ) { // search for AdditionalStreams entry - std::unordered_map<OString,PDFEntry*>::iterator add_stream; - add_stream = pTrailer->m_pDict->m_aMap.find( "AdditionalStreams" ); + auto add_stream = pTrailer->m_pDict->m_aMap.find( "AdditionalStreams" ); if( add_stream != pTrailer->m_pDict->m_aMap.end() ) { PDFArray* pStreams = dynamic_cast<PDFArray*>(add_stream->second); diff --git a/sdext/source/pdfimport/tree/drawtreevisiting.cxx b/sdext/source/pdfimport/tree/drawtreevisiting.cxx index 30dfefedba20..9a348e76ca9f 100644 --- a/sdext/source/pdfimport/tree/drawtreevisiting.cxx +++ b/sdext/source/pdfimport/tree/drawtreevisiting.cxx @@ -276,8 +276,7 @@ void DrawXmlEmitter::visit( PolyPolyElement& elem, const std::list< std::unique_ */ for (sal_uInt32 i = 0; i< elem.PolyPoly.count(); i++) { - basegfx::B2DPolygon b2dPolygon; - b2dPolygon = elem.PolyPoly.getB2DPolygon( i ); + basegfx::B2DPolygon b2dPolygon = elem.PolyPoly.getB2DPolygon( i ); for ( sal_uInt32 j = 0; j< b2dPolygon.count(); j++ ) { @@ -285,8 +284,7 @@ void DrawXmlEmitter::visit( PolyPolyElement& elem, const std::list< std::unique_ basegfx::B2DPoint nextPoint; point = b2dPolygon.getB2DPoint( j ); - basegfx::B2DPoint prevPoint; - prevPoint = b2dPolygon.getPrevControlPoint( j ) ; + basegfx::B2DPoint prevPoint = b2dPolygon.getPrevControlPoint( j ) ; point.setX( convPx2mmPrec2( point.getX() )*100.0 ); point.setY( convPx2mmPrec2( point.getY() )*100.0 ); diff --git a/sdext/source/pdfimport/tree/writertreevisiting.cxx b/sdext/source/pdfimport/tree/writertreevisiting.cxx index dec4fd7b6f4c..6c0325019c9a 100644 --- a/sdext/source/pdfimport/tree/writertreevisiting.cxx +++ b/sdext/source/pdfimport/tree/writertreevisiting.cxx @@ -241,8 +241,7 @@ void WriterXmlEmitter::visit( PolyPolyElement& elem, const std::list< std::uniqu */ for (sal_uInt32 i = 0; i< elem.PolyPoly.count(); i++) { - basegfx::B2DPolygon b2dPolygon; - b2dPolygon = elem.PolyPoly.getB2DPolygon( i ); + basegfx::B2DPolygon b2dPolygon = elem.PolyPoly.getB2DPolygon( i ); for ( sal_uInt32 j = 0; j< b2dPolygon.count(); j++ ) { @@ -250,8 +249,7 @@ void WriterXmlEmitter::visit( PolyPolyElement& elem, const std::list< std::uniqu basegfx::B2DPoint nextPoint; point = b2dPolygon.getB2DPoint( j ); - basegfx::B2DPoint prevPoint; - prevPoint = b2dPolygon.getPrevControlPoint( j ) ; + basegfx::B2DPoint prevPoint = b2dPolygon.getPrevControlPoint( j ) ; point.setX( convPx2mmPrec2( point.getX() )*100.0 ); point.setY( convPx2mmPrec2( point.getY() )*100.0 ); diff --git a/sdext/source/pdfimport/wrapper/wrapper.cxx b/sdext/source/pdfimport/wrapper/wrapper.cxx index 89f6c83abff3..f91612a5a201 100644 --- a/sdext/source/pdfimport/wrapper/wrapper.cxx +++ b/sdext/source/pdfimport/wrapper/wrapper.cxx @@ -909,8 +909,7 @@ static bool checkEncryption( const OUString& i_rPa ) { bool bSuccess = false; - OString aPDFFile; - aPDFFile = OUStringToOString( i_rPath, osl_getThreadTextEncoding() ); + OString aPDFFile = OUStringToOString( i_rPath, osl_getThreadTextEncoding() ); pdfparse::PDFReader aParser; std::unique_ptr<pdfparse::PDFEntry> pEntry( pdfparse::PDFReader::read( aPDFFile.getStr() )); diff --git a/sdext/source/presenter/PresenterSlideSorter.cxx b/sdext/source/presenter/PresenterSlideSorter.cxx index 8d206f9f890f..1ee15e43e993 100644 --- a/sdext/source/presenter/PresenterSlideSorter.cxx +++ b/sdext/source/presenter/PresenterSlideSorter.cxx @@ -1203,8 +1203,7 @@ void PresenterSlideSorter::Layout::SetupVisibleArea() bool PresenterSlideSorter::Layout::IsScrollBarNeeded (const sal_Int32 nSlideCount) { - geometry::RealPoint2D aBottomRight; - aBottomRight = GetPoint( + geometry::RealPoint2D aBottomRight = GetPoint( mnColumnCount * (GetRow(nSlideCount)+1) - 1, +1, +1); return aBottomRight.X > maBoundingBox.X2-maBoundingBox.X1 || aBottomRight.Y > maBoundingBox.Y2-maBoundingBox.Y1; @@ -1391,8 +1390,7 @@ bool PresenterSlideSorter::Layout::SetVerticalOffset (const double nOffset) void PresenterSlideSorter::Layout::UpdateScrollBars() { - sal_Int32 nTotalRowCount (0); - nTotalRowCount = sal_Int32(ceil(double(mnSlideCount) / double(mnColumnCount))); + sal_Int32 nTotalRowCount = sal_Int32(ceil(double(mnSlideCount) / double(mnColumnCount))); if (mpVerticalScrollBar.get() != nullptr) { |