diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-04-14 16:41:42 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-04-15 11:02:53 +0200 |
commit | 4c4d9a482b93440fd3388ffa1715e66d1f391fea (patch) | |
tree | dc599ac00d6ca5c3288e4e7053c02c0d62902346 /vcl/unx | |
parent | 256480b8b80769149652bb62f401672ee8fafe1f (diff) |
loplugin:sequentialassign in vcl
Change-Id: I530b81b3258a6e1c1456da53bfe1285f14aee712
Reviewed-on: https://gerrit.libreoffice.org/70734
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/generic/dtrans/X11_selection.cxx | 6 | ||||
-rw-r--r-- | vcl/unx/generic/gdi/gdiimpl.cxx | 4 | ||||
-rw-r--r-- | vcl/unx/generic/print/common_gfx.cxx | 4 | ||||
-rw-r--r-- | vcl/unx/generic/print/printerjob.cxx | 4 | ||||
-rw-r--r-- | vcl/unx/generic/printer/ppdparser.cxx | 3 | ||||
-rw-r--r-- | vcl/unx/gtk/a11y/atkcomponent.cxx | 3 | ||||
-rw-r--r-- | vcl/unx/gtk/a11y/atklistener.cxx | 7 | ||||
-rw-r--r-- | vcl/unx/gtk/salnativewidgets-gtk.cxx | 13 |
8 files changed, 13 insertions, 31 deletions
diff --git a/vcl/unx/generic/dtrans/X11_selection.cxx b/vcl/unx/generic/dtrans/X11_selection.cxx index 9954988e7af5..0efa066ebd97 100644 --- a/vcl/unx/generic/dtrans/X11_selection.cxx +++ b/vcl/unx/generic/dtrans/X11_selection.cxx @@ -344,8 +344,7 @@ void SelectionManager::initialize( const Sequence< Any >& arguments ) OUString aUDisplay; if( m_xDisplayConnection.is() ) { - Any aIdentifier; - aIdentifier = m_xDisplayConnection->getIdentifier(); + Any aIdentifier = m_xDisplayConnection->getIdentifier(); aIdentifier >>= aUDisplay; } @@ -1888,8 +1887,7 @@ bool SelectionManager::handleSendPropertyNotify( XPropertyEvent const & rNotify // feed incrementals if( rNotify.state == PropertyDelete ) { - std::unordered_map< ::Window, std::unordered_map< Atom, IncrementalTransfer > >::iterator it; - it = m_aIncrementals.find( rNotify.window ); + auto it = m_aIncrementals.find( rNotify.window ); if( it != m_aIncrementals.end() ) { bHandled = true; diff --git a/vcl/unx/generic/gdi/gdiimpl.cxx b/vcl/unx/generic/gdi/gdiimpl.cxx index 48a6a767e86b..e99551e00426 100644 --- a/vcl/unx/generic/gdi/gdiimpl.cxx +++ b/vcl/unx/generic/gdi/gdiimpl.cxx @@ -1586,9 +1586,7 @@ bool X11SalGraphicsImpl::drawFilledTriangles( } // prepare transformation for ObjectToDevice coordinate system - basegfx::B2DHomMatrix aObjectToDevice(rObjectToDevice); - - aObjectToDevice = basegfx::utils::createTranslateB2DHomMatrix(0.5, 0.5) * aObjectToDevice; + basegfx::B2DHomMatrix aObjectToDevice = basegfx::utils::createTranslateB2DHomMatrix(0.5, 0.5) * rObjectToDevice; // convert the Triangles into XRender-Triangles std::vector<XTriangle> aTriVector(rTriangles.size()); diff --git a/vcl/unx/generic/print/common_gfx.cxx b/vcl/unx/generic/print/common_gfx.cxx index a92d366ccd1d..b2bde146b3bc 100644 --- a/vcl/unx/generic/print/common_gfx.cxx +++ b/vcl/unx/generic/print/common_gfx.cxx @@ -984,9 +984,7 @@ void PrinterGfx::PSHexString (const unsigned char* pString, sal_Int16 nLen) { OStringBuffer pHexString; - sal_Int32 nChar = 0; - - nChar = psp::appendStr ("<", pHexString); + sal_Int32 nChar = psp::appendStr ("<", pHexString); for (int i = 0; i < nLen; i++) { if (nChar >= (nMaxTextColumn - 1)) diff --git a/vcl/unx/generic/print/printerjob.cxx b/vcl/unx/generic/print/printerjob.cxx index 7cf15556476e..f79e174225bf 100644 --- a/vcl/unx/generic/print/printerjob.cxx +++ b/vcl/unx/generic/print/printerjob.cxx @@ -312,10 +312,8 @@ PrinterJob::StartJob ( "%!PS-Adobe-3.0\n" "%%BoundingBox: (atend)\n" ); - OUString aFilterWS; - // Creator (this application) - aFilterWS = WhitespaceToSpace( rAppName, false ); + OUString aFilterWS = WhitespaceToSpace( rAppName, false ); WritePS (mpJobHeader.get(), "%%Creator: ("); WritePS (mpJobHeader.get(), aFilterWS); WritePS (mpJobHeader.get(), ")\n"); diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx index d5b9e7152ffe..d05455e47d14 100644 --- a/vcl/unx/generic/printer/ppdparser.cxx +++ b/vcl/unx/generic/printer/ppdparser.cxx @@ -1668,8 +1668,7 @@ const PPDValue* PPDContext::getValue( const PPDKey* pKey ) const if( ! m_pParser ) return nullptr; - hash_type::const_iterator it; - it = m_aCurrentValues.find( pKey ); + hash_type::const_iterator it = m_aCurrentValues.find( pKey ); if( it != m_aCurrentValues.end() ) return it->second; diff --git a/vcl/unx/gtk/a11y/atkcomponent.cxx b/vcl/unx/gtk/a11y/atkcomponent.cxx index f79d1749dc2b..e904b12ac610 100644 --- a/vcl/unx/gtk/a11y/atkcomponent.cxx +++ b/vcl/unx/gtk/a11y/atkcomponent.cxx @@ -141,8 +141,7 @@ component_wrapper_ref_accessible_at_point (AtkComponent *component, if( pComponent.is() ) { - uno::Reference< accessibility::XAccessible > xAccessible; - xAccessible = pComponent->getAccessibleAtPoint( + uno::Reference< accessibility::XAccessible > xAccessible = pComponent->getAccessibleAtPoint( translatePoint( pComponent, x, y, coord_type ) ); return atk_object_wrapper_ref( xAccessible ); } diff --git a/vcl/unx/gtk/a11y/atklistener.cxx b/vcl/unx/gtk/a11y/atklistener.cxx index 737a24b2312e..c30bc638bced 100644 --- a/vcl/unx/gtk/a11y/atklistener.cxx +++ b/vcl/unx/gtk/a11y/atklistener.cxx @@ -435,9 +435,7 @@ void AtkListener::notifyEvent( const accessibility::AccessibleEventObject& aEven case accessibility::AccessibleEventId::INVALIDATE_ALL_CHILDREN: { - uno::Reference< accessibility::XAccessibleContext > xParent; - - xParent = getAccessibleContextFromSource(aEvent.Source); + uno::Reference< accessibility::XAccessibleContext > xParent = getAccessibleContextFromSource(aEvent.Source); g_return_if_fail( xParent.is() ); handleInvalidateChildren(xParent); @@ -716,8 +714,7 @@ void AtkListener::notifyEvent( const accessibility::AccessibleEventObject& aEven case accessibility::AccessibleEventId::ROLE_CHANGED: { - uno::Reference< accessibility::XAccessibleContext > xContext; - xContext = getAccessibleContextFromSource( aEvent.Source ); + uno::Reference< accessibility::XAccessibleContext > xContext = getAccessibleContextFromSource( aEvent.Source ); atk_object_wrapper_set_role( mpWrapper, xContext->getAccessibleRole() ); break; } diff --git a/vcl/unx/gtk/salnativewidgets-gtk.cxx b/vcl/unx/gtk/salnativewidgets-gtk.cxx index 0ce990426813..759fd14a2a3b 100644 --- a/vcl/unx/gtk/salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk/salnativewidgets-gtk.cxx @@ -438,8 +438,7 @@ void NWPixmapCacheList::AddCache( NWPixmapCache* pCache ) } void NWPixmapCacheList::RemoveCache( NWPixmapCache* pCache ) { - ::std::vector< NWPixmapCache* >::iterator p; - p = ::std::find( mCaches.begin(), mCaches.end(), pCache ); + auto p = ::std::find( mCaches.begin(), mCaches.end(), pCache ); if( p != mCaches.end() ) mCaches.erase( p ); } @@ -840,11 +839,9 @@ bool GtkSalGraphics::drawNativeControl(ControlType nType, ControlPart nPart, if( aClipRegion.IsNull() ) aClipRegion = aCtrlRect; - tools::Rectangle aPixmapRect; - // make pixmap a little larger since some themes draw decoration // outside the rectangle, see e.g. checkbox - aPixmapRect = tools::Rectangle(Point( aCtrlRect.Left()-1, aCtrlRect.Top()-1 ), + tools::Rectangle aPixmapRect(Point( aCtrlRect.Left()-1, aCtrlRect.Top()-1 ), Size( aCtrlRect.GetWidth()+2, aCtrlRect.GetHeight()+2) ); ControlCacheKey aControlCacheKey(nType, nPart, nState, aPixmapRect.GetSize()); @@ -1131,10 +1128,8 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType, NWEnsureGTKMenubar( m_nXScreen ); GtkRequisition aReq; gtk_widget_size_request( gWidgetData[m_nXScreen].gMenubarWidget, &aReq ); - tools::Rectangle aMenuBarRect = rControlRegion; - aMenuBarRect = tools::Rectangle( aMenuBarRect.TopLeft(), - Size( aMenuBarRect.GetWidth(), aReq.height+1 ) ); - rNativeBoundingRegion = aMenuBarRect; + rNativeBoundingRegion = tools::Rectangle( rControlRegion.TopLeft(), + Size( rControlRegion.GetWidth(), aReq.height+1 ) ); rNativeContentRegion = rNativeBoundingRegion; returnVal = true; } |