diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-04-13 21:28:19 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-04-14 08:29:15 +0200 |
commit | 42204a80aa7d4ce778596fa6ccab7d144c04e9b1 (patch) | |
tree | f3e4b15abc5ad6f53781436bc307ac19e6785e12 /svx | |
parent | 8f59317223e0b8e1e5e6e4145b6ee457fe9e15f3 (diff) |
loplugin:sequentialassign in svtools..svx
Change-Id: I465a2479f347303e6d4faa39cb0a0f05aec3bf07
Reviewed-on: https://gerrit.libreoffice.org/70719
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/accessibility/AccessibleShape.cxx | 3 | ||||
-rw-r--r-- | svx/source/accessibility/svxpixelctlaccessiblecontext.cxx | 3 | ||||
-rw-r--r-- | svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx | 4 | ||||
-rw-r--r-- | svx/source/dialog/hdft.cxx | 3 | ||||
-rw-r--r-- | svx/source/fmcomp/dbaexchange.cxx | 3 | ||||
-rw-r--r-- | svx/source/fmcomp/fmgridif.cxx | 15 | ||||
-rw-r--r-- | svx/source/form/fmundo.cxx | 4 | ||||
-rw-r--r-- | svx/source/sidebar/nbdtmg.cxx | 6 | ||||
-rw-r--r-- | svx/source/svdraw/polypolygoneditor.cxx | 3 | ||||
-rw-r--r-- | svx/source/tbxctrls/tbxcolorupdate.cxx | 3 | ||||
-rw-r--r-- | svx/source/xml/xmlxtexp.cxx | 3 | ||||
-rw-r--r-- | svx/source/xml/xmlxtimp.cxx | 3 |
12 files changed, 17 insertions, 36 deletions
diff --git a/svx/source/accessibility/AccessibleShape.cxx b/svx/source/accessibility/AccessibleShape.cxx index 387be5f27d2a..5789e2315076 100644 --- a/svx/source/accessibility/AccessibleShape.cxx +++ b/svx/source/accessibility/AccessibleShape.cxx @@ -1231,10 +1231,9 @@ void AccessibleShape::UpdateNameAndDescription() try { Reference<beans::XPropertySet> xSet (mxShape, uno::UNO_QUERY_THROW); - OUString sString; // Get the accessible name. - sString = GetOptionalProperty(xSet, "Title"); + OUString sString = GetOptionalProperty(xSet, "Title"); if (!sString.isEmpty()) { SetAccessibleName(sString, AccessibleContextBase::FromShape); diff --git a/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx b/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx index eb4d1e95fffe..2b180cf9a8ae 100644 --- a/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx +++ b/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx @@ -292,8 +292,7 @@ uno::Reference<XAccessible> SvxPixelCtlAccessible::CreateChild (long nIndex,Poin { bool bPixelColorOrBG = mpPixelCtl->GetBitmapPixel(sal_uInt16(nIndex)) != 0; Size size(mpPixelCtl->GetWidth() / SvxPixelCtl::GetLineCount(), mpPixelCtl->GetHeight() / SvxPixelCtl::GetLineCount()); - uno::Reference<XAccessible> xChild; - xChild = new SvxPixelCtlAccessibleChild(*mpPixelCtl, + uno::Reference<XAccessible> xChild = new SvxPixelCtlAccessibleChild(*mpPixelCtl, bPixelColorOrBG, tools::Rectangle(mPoint,size), this, diff --git a/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx b/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx index ee38c9d9d16b..363287dabcf9 100644 --- a/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx @@ -1129,11 +1129,9 @@ std::shared_ptr<ExpressionNode> const & FunctionParser::parseFunction( const OUS StringIteratorT aStart( rAsciiFunction.getStr() ); StringIteratorT aEnd( rAsciiFunction.getStr()+rAsciiFunction.getLength() ); - ParserContextSharedPtr pContext; - // static parser context, because the actual // Spirit parser is also a static object - pContext = getParserContext(); + ParserContextSharedPtr pContext = getParserContext(); pContext->mpCustoShape = &rCustoShape; ExpressionGrammar aExpressionGrammer( pContext ); diff --git a/svx/source/dialog/hdft.cxx b/svx/source/dialog/hdft.cxx index 120aa86dbd72..147987127d16 100644 --- a/svx/source/dialog/hdft.cxx +++ b/svx/source/dialog/hdft.cxx @@ -435,8 +435,7 @@ void SvxHFPage::Reset( const SfxItemSet* rSet ) ( nullptr != (pShell = SfxObjectShell::Current()) && nullptr != (pItem = pShell->GetItem(SID_HTML_MODE)))) { - sal_uInt16 nHtmlMode = 0; - nHtmlMode = static_cast<const SfxUInt16Item*>(pItem)->GetValue(); + sal_uInt16 nHtmlMode = static_cast<const SfxUInt16Item*>(pItem)->GetValue(); if (nHtmlMode & HTMLMODE_ON) { m_xCntSharedBox->hide(); diff --git a/svx/source/fmcomp/dbaexchange.cxx b/svx/source/fmcomp/dbaexchange.cxx index 0e52f13f10d0..3f15265b9a79 100644 --- a/svx/source/fmcomp/dbaexchange.cxx +++ b/svx/source/fmcomp/dbaexchange.cxx @@ -520,8 +520,7 @@ namespace svx // extract the single values from the sequence - OUString sObjectName; - sObjectName = _rCommand; + OUString sObjectName = _rCommand; // for compatibility: create a string which can be used for the SotClipboardFormatId::SBA_DATAEXCHANGE format diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx index cf061a1697a8..a764497b189d 100644 --- a/svx/source/fmcomp/fmgridif.cxx +++ b/svx/source/fmcomp/fmgridif.cxx @@ -133,8 +133,7 @@ FmXModifyMultiplexer::FmXModifyMultiplexer( ::cppu::OWeakObject& rSource, ::osl: Any SAL_CALL FmXModifyMultiplexer::queryInterface(const Type& _rType) { - Any aReturn; - aReturn = ::cppu::queryInterface(_rType, + Any aReturn = ::cppu::queryInterface(_rType, static_cast< css::util::XModifyListener*>(this), static_cast< XEventListener*>(this) ); @@ -167,8 +166,7 @@ FmXUpdateMultiplexer::FmXUpdateMultiplexer( ::cppu::OWeakObject& rSource, ::osl: Any SAL_CALL FmXUpdateMultiplexer::queryInterface(const Type& _rType) { - Any aReturn; - aReturn = ::cppu::queryInterface(_rType, + Any aReturn = ::cppu::queryInterface(_rType, static_cast< XUpdateListener*>(this), static_cast< XEventListener*>(this) ); @@ -218,8 +216,7 @@ FmXSelectionMultiplexer::FmXSelectionMultiplexer( ::cppu::OWeakObject& rSource, Any SAL_CALL FmXSelectionMultiplexer::queryInterface(const Type& _rType) { - Any aReturn; - aReturn = ::cppu::queryInterface(_rType, + Any aReturn = ::cppu::queryInterface(_rType, static_cast< XSelectionChangeListener*>(this), static_cast< XEventListener*>(this) ); @@ -252,8 +249,7 @@ FmXContainerMultiplexer::FmXContainerMultiplexer( ::cppu::OWeakObject& rSource, Any SAL_CALL FmXContainerMultiplexer::queryInterface(const Type& _rType) { - Any aReturn; - aReturn = ::cppu::queryInterface(_rType, + Any aReturn = ::cppu::queryInterface(_rType, static_cast< XContainerListener*>(this), static_cast< XEventListener*>(this) ); @@ -301,8 +297,7 @@ FmXGridControlMultiplexer::FmXGridControlMultiplexer( ::cppu::OWeakObject& rSour Any SAL_CALL FmXGridControlMultiplexer::queryInterface(const Type& _rType) { - Any aReturn; - aReturn = ::cppu::queryInterface( _rType, + Any aReturn = ::cppu::queryInterface( _rType, static_cast< XGridControlListener*>(this) ); diff --git a/svx/source/form/fmundo.cxx b/svx/source/form/fmundo.cxx index 8ff98b08fb9b..d89243c6da9e 100644 --- a/svx/source/form/fmundo.cxx +++ b/svx/source/form/fmundo.cxx @@ -1015,9 +1015,7 @@ void FmUndoPropertyAction::Redo() OUString FmUndoPropertyAction::GetComment() const { - OUString aStr(static_STR_UNDO_PROPERTY); - - aStr = aStr.replaceFirst( "#", aPropertyName ); + OUString aStr = static_STR_UNDO_PROPERTY.replaceFirst( "#", aPropertyName ); return aStr; } diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx index e414b91d4b62..2cbc608a9948 100644 --- a/svx/source/sidebar/nbdtmg.cxx +++ b/svx/source/sidebar/nbdtmg.cxx @@ -536,8 +536,7 @@ void NumberingTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uIn OUString NumberingTypeMgr::GetDescription(sal_uInt16 nIndex, bool isDefault) { OUString sRet; - sal_uInt16 nLength = 0; - nLength = maNumberSettingsArr.size(); + sal_uInt16 nLength = maNumberSettingsArr.size(); if ( nIndex >= nLength ) return sRet; @@ -551,8 +550,7 @@ OUString NumberingTypeMgr::GetDescription(sal_uInt16 nIndex, bool isDefault) bool NumberingTypeMgr::IsCustomized(sal_uInt16 nIndex) { bool bRet = false; - sal_uInt16 nLength = 0; - nLength = maNumberSettingsArr.size(); + sal_uInt16 nLength = maNumberSettingsArr.size(); if ( nIndex >= nLength ) bRet = false; diff --git a/svx/source/svdraw/polypolygoneditor.cxx b/svx/source/svdraw/polypolygoneditor.cxx index e9d9ee6d58cb..1f82f0436544 100644 --- a/svx/source/svdraw/polypolygoneditor.cxx +++ b/svx/source/svdraw/polypolygoneditor.cxx @@ -137,8 +137,7 @@ bool PolyPolygonEditor::SetPointsSmooth( basegfx::B2VectorContinuity eFlags, con basegfx::B2DPolygon aCandidate(maPolyPolygon.getB2DPolygon(nPolyNum)); // set continuity in point, make sure there is a curve - bool bPolygonChanged(false); - bPolygonChanged = basegfx::utils::expandToCurveInPoint(aCandidate, nPntNum); + bool bPolygonChanged = basegfx::utils::expandToCurveInPoint(aCandidate, nPntNum); bPolygonChanged |= basegfx::utils::setContinuityInPoint(aCandidate, nPntNum, eFlags); if(bPolygonChanged) diff --git a/svx/source/tbxctrls/tbxcolorupdate.cxx b/svx/source/tbxctrls/tbxcolorupdate.cxx index 7bbeea79c346..2069f61395f8 100644 --- a/svx/source/tbxctrls/tbxcolorupdate.cxx +++ b/svx/source/tbxctrls/tbxcolorupdate.cxx @@ -78,8 +78,7 @@ namespace svx if (!mbWideButton) { // Also show the current color as QuickHelpText - OUString colorSuffix = " (%1)"; - colorSuffix = colorSuffix.replaceFirst("%1", rNamedColor.second); + OUString colorSuffix = OUString(" (%1)").replaceFirst("%1", rNamedColor.second); OUString colorHelpText = maCommandLabel + colorSuffix; mpTbx->SetQuickHelpText(mnBtnId, colorHelpText); diff --git a/svx/source/xml/xmlxtexp.cxx b/svx/source/xml/xmlxtexp.cxx index 23d1305c0b2b..40dfb6cfdd9c 100644 --- a/svx/source/xml/xmlxtexp.cxx +++ b/svx/source/xml/xmlxtexp.cxx @@ -182,8 +182,7 @@ static void createStorageStream( uno::Reference < io::XOutputStream > *xOut, rtl::Reference<SvXMLGraphicHelper>& rxGraphicHelper, const uno::Reference < embed::XStorage >& xSubStorage ) { - uno::Reference < io::XStream > xStream; - xStream = xSubStorage->openStreamElement( + uno::Reference < io::XStream > xStream = xSubStorage->openStreamElement( "Content.xml", embed::ElementModes::WRITE ); rxGraphicHelper = SvXMLGraphicHelper::Create( xSubStorage, SvXMLGraphicHelperMode::Write ); diff --git a/svx/source/xml/xmlxtimp.cxx b/svx/source/xml/xmlxtimp.cxx index bb24ae7d189a..5f2f1dcc4f1a 100644 --- a/svx/source/xml/xmlxtimp.cxx +++ b/svx/source/xml/xmlxtimp.cxx @@ -377,8 +377,7 @@ bool SvxXMLXTableImport::load( const OUString &rPath, const OUString &rReferer, openStorageStream( &aParserInput, xGraphicHelper, xSubStorage ); else { - css::uno::Reference< css::io::XStream > xStream; - xStream = comphelper::OStorageHelper::GetStreamAtPath( + css::uno::Reference< css::io::XStream > xStream = comphelper::OStorageHelper::GetStreamAtPath( xStorage, rPath, embed::ElementModes::READ, aNasty ); if( !xStream.is() ) return false; |