filter/source/config/cache/filtercache.cxx | 9 +++------ filter/source/graphicfilter/idxf/dxf2mtf.cxx | 3 +-- filter/source/msfilter/msdffimp.cxx | 3 +-- filter/source/msfilter/svdfppt.cxx | 3 +-- filter/source/svg/svgexport.cxx | 3 +-- filter/source/t602/t602filter.cxx | 4 +--- filter/source/xsltdialog/xmlfiltertabpagexslt.cxx | 3 +-- forms/source/component/EventThread.cxx | 4 +--- forms/source/component/Filter.cxx | 3 +-- forms/source/xforms/resourcehelper.cxx | 3 +-- fpicker/source/office/iodlg.cxx | 6 ++---- framework/inc/macros/registration.hxx | 3 +-- framework/source/accelerators/presethandler.cxx | 4 +--- framework/source/dispatch/oxt_handler.cxx | 4 +--- framework/source/dispatch/popupmenudispatcher.cxx | 3 +-- framework/source/fwe/classes/addonsoptions.cxx | 12 ++++-------- framework/source/fwe/helper/titlehelper.cxx | 3 +-- framework/source/fwe/xml/xmlnamespaces.cxx | 3 +-- framework/source/loadenv/loadenv.cxx | 4 +--- framework/source/recording/dispatchrecorder.cxx | 3 +-- framework/source/services/substitutepathvars.cxx | 3 +-- framework/source/uiconfiguration/globalsettings.cxx | 3 +-- framework/source/uielement/addonstoolbarmanager.cxx | 4 +--- framework/source/uielement/menubarmerger.cxx | 4 +--- framework/source/uielement/menubarwrapper.cxx | 3 +-- framework/source/uielement/statusbarmanager.cxx | 4 +--- framework/source/uielement/subtoolbarcontroller.cxx | 4 +--- 27 files changed, 33 insertions(+), 75 deletions(-)
New commits: commit bf9f0b2973138652946f2480ede72c54602b854a Author: Noel Grandin <[email protected]> AuthorDate: Sat Apr 13 08:23:00 2019 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Sat Apr 13 14:47:12 2019 +0200 loplugin:sequentialassign in framework Change-Id: I98da731a0f6b72ea0cb890dae2f25992c75a0984 Reviewed-on: https://gerrit.libreoffice.org/70701 Tested-by: Jenkins Reviewed-by: Noel Grandin <[email protected]> diff --git a/framework/inc/macros/registration.hxx b/framework/inc/macros/registration.hxx index a413e8a2964e..4d41818a9321 100644 --- a/framework/inc/macros/registration.hxx +++ b/framework/inc/macros/registration.hxx @@ -65,8 +65,7 @@ ________________________________________________________________________________ { \ /* Define variables which are used in following macros. */ \ css::uno::Reference< css::uno::XInterface > xFactory; \ - css::uno::Reference< css::lang::XMultiServiceFactory > xServiceManager; \ - xServiceManager = static_cast< css::lang::XMultiServiceFactory* >( pServiceManager ); \ + css::uno::Reference< css::lang::XMultiServiceFactory > xServiceManager = static_cast< css::lang::XMultiServiceFactory* >( pServiceManager ); \ /* These parameter will expand to */ \ /* "IF_NAME_CREATECOMPONENTFACTORY(a) */ \ /* else */ \ diff --git a/framework/source/accelerators/presethandler.cxx b/framework/source/accelerators/presethandler.cxx index fc5f0a19ca30..156f1d0b91b7 100644 --- a/framework/source/accelerators/presethandler.cxx +++ b/framework/source/accelerators/presethandler.cxx @@ -743,9 +743,7 @@ css::uno::Reference< css::embed::XStorage > PresetHandler::impl_openLocalizedPat // it doesn't matter, if there is a locale fallback or not // If creation of storages is allowed, we do it anyway. // Otherwise we have no acc config at all, which can make other trouble. - OUString sLocalizedPath; - sLocalizedPath = sPath; - sLocalizedPath += "/"; + OUString sLocalizedPath = sPath + "/"; if (pLocaleFolder != lSubFolders.end()) sLocalizedPath += *pLocaleFolder; else diff --git a/framework/source/dispatch/oxt_handler.cxx b/framework/source/dispatch/oxt_handler.cxx index 10c7da5049dc..6795671d6927 100644 --- a/framework/source/dispatch/oxt_handler.cxx +++ b/framework/source/dispatch/oxt_handler.cxx @@ -102,9 +102,7 @@ void SAL_CALL Oxt_Handler::dispatchWithNotification( const css::util::URL& aURL, css::uno::Sequence< css::uno::Any > lParams(1); lParams[0] <<= aURL.Main; - css::uno::Reference< css::uno::XInterface > xService; - - xService = m_xFactory->createInstanceWithArguments( sServiceName, lParams ); + css::uno::Reference< css::uno::XInterface > xService = m_xFactory->createInstanceWithArguments( sServiceName, lParams ); css::uno::Reference< css::task::XJobExecutor > xExecuteable( xService, css::uno::UNO_QUERY ); if ( xExecuteable.is() ) xExecuteable->trigger( OUString() ); diff --git a/framework/source/dispatch/popupmenudispatcher.cxx b/framework/source/dispatch/popupmenudispatcher.cxx index 2463890e16b1..3222745966c3 100644 --- a/framework/source/dispatch/popupmenudispatcher.cxx +++ b/framework/source/dispatch/popupmenudispatcher.cxx @@ -307,8 +307,7 @@ void PopupMenuDispatcher::impl_RetrievePopupControllerQuery() if ( xLayoutManager.is() ) { - css::uno::Reference< css::ui::XUIElement > xMenuBar; - xMenuBar = xLayoutManager->getElement( "private:resource/menubar/menubar" ); + css::uno::Reference< css::ui::XUIElement > xMenuBar = xLayoutManager->getElement( "private:resource/menubar/menubar" ); m_xPopupCtrlQuery.set( xMenuBar, css::uno::UNO_QUERY ); } diff --git a/framework/source/fwe/classes/addonsoptions.cxx b/framework/source/fwe/classes/addonsoptions.cxx index a9822bc3f110..b9463e47e69f 100644 --- a/framework/source/fwe/classes/addonsoptions.cxx +++ b/framework/source/fwe/classes/addonsoptions.cxx @@ -1032,9 +1032,8 @@ bool AddonsOptions_Impl::ReadStatusBarItem( bool bResult( false ); OUString aURL; OUString aAddonStatusbarItemTreeNode( aStatusarItemNodeName + m_aPathDelimiter ); - Sequence< Any > aStatusbarItemNodePropValues; - aStatusbarItemNodePropValues = GetProperties( GetPropertyNamesStatusbarItem( aAddonStatusbarItemTreeNode ) ); + Sequence< Any > aStatusbarItemNodePropValues = GetProperties( GetPropertyNamesStatusbarItem( aAddonStatusbarItemTreeNode ) ); // Command URL is required if (( aStatusbarItemNodePropValues[ OFFSET_STATUSBARITEM_URL ] >>= aURL ) && aURL.getLength() > 0 ) @@ -1063,9 +1062,8 @@ bool AddonsOptions_Impl::ReadMenuItem( const OUString& aMenuNodeName, Sequence< bool bResult = false; OUString aStrValue; OUString aAddonMenuItemTreeNode( aMenuNodeName + m_aPathDelimiter ); - Sequence< Any > aMenuItemNodePropValues; - aMenuItemNodePropValues = GetProperties( GetPropertyNamesMenuItem( aAddonMenuItemTreeNode ) ); + Sequence< Any > aMenuItemNodePropValues = GetProperties( GetPropertyNamesMenuItem( aAddonMenuItemTreeNode ) ); if (( aMenuItemNodePropValues[ OFFSET_MENUITEM_TITLE ] >>= aStrValue ) && !aStrValue.isEmpty() ) { aMenuItem[ OFFSET_MENUITEM_TITLE ].Value <<= aStrValue; @@ -1134,9 +1132,8 @@ bool AddonsOptions_Impl::ReadPopupMenu( const OUString& aPopupMenuNodeName, Sequ bool bResult = false; OUString aStrValue; OUString aAddonPopupMenuTreeNode( aPopupMenuNodeName + m_aPathDelimiter ); - Sequence< Any > aPopupMenuNodePropValues; - aPopupMenuNodePropValues = GetProperties( GetPropertyNamesPopupMenu( aAddonPopupMenuTreeNode ) ); + Sequence< Any > aPopupMenuNodePropValues = GetProperties( GetPropertyNamesPopupMenu( aAddonPopupMenuTreeNode ) ); if (( aPopupMenuNodePropValues[ OFFSET_POPUPMENU_TITLE ] >>= aStrValue ) && !aStrValue.isEmpty() ) { @@ -1189,9 +1186,8 @@ bool AddonsOptions_Impl::ReadToolBarItem( const OUString& aToolBarItemNodeName, OUString aTitle; OUString aURL; OUString aAddonToolBarItemTreeNode( aToolBarItemNodeName + m_aPathDelimiter ); - Sequence< Any > aToolBarItemNodePropValues; - aToolBarItemNodePropValues = GetProperties( GetPropertyNamesToolBarItem( aAddonToolBarItemTreeNode ) ); + Sequence< Any > aToolBarItemNodePropValues = GetProperties( GetPropertyNamesToolBarItem( aAddonToolBarItemTreeNode ) ); // A toolbar item must have a command URL if (( aToolBarItemNodePropValues[ OFFSET_TOOLBARITEM_URL ] >>= aURL ) && !aURL.isEmpty() ) diff --git a/framework/source/fwe/helper/titlehelper.cxx b/framework/source/fwe/helper/titlehelper.cxx index c15098ed8901..35fb1a4f6b92 100644 --- a/framework/source/fwe/helper/titlehelper.cxx +++ b/framework/source/fwe/helper/titlehelper.cxx @@ -505,8 +505,7 @@ void TitleHelper::impl_updateTitleForFrame (const css::uno::Reference< css::fram } // <- SYNCHRONIZED - css::uno::Reference< css::uno::XInterface > xComponent; - xComponent = xFrame->getController (); + css::uno::Reference< css::uno::XInterface > xComponent = xFrame->getController (); if ( ! xComponent.is ()) xComponent = xFrame->getComponentWindow (); diff --git a/framework/source/fwe/xml/xmlnamespaces.cxx b/framework/source/fwe/xml/xmlnamespaces.cxx index d56f92d4ca6a..07f5d22fa9be 100644 --- a/framework/source/fwe/xml/xmlnamespaces.cxx +++ b/framework/source/fwe/xml/xmlnamespaces.cxx @@ -135,8 +135,7 @@ OUString const & XMLNamespaces::getNamespaceValue( const OUString& aNamespace ) return m_aDefaultNamespace; else { - NamespaceMap::const_iterator p; - p = m_aNamespaceMap.find( aNamespace ); + NamespaceMap::const_iterator p = m_aNamespaceMap.find( aNamespace ); if ( p == m_aNamespaceMap.end() ) { // namespace not defined => throw exception! diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx index a5b2f36f38e2..7855a5cd2072 100644 --- a/framework/source/loadenv/loadenv.cxx +++ b/framework/source/loadenv/loadenv.cxx @@ -1211,9 +1211,7 @@ css::uno::Reference< css::uno::XInterface > LoadEnv::impl_searchLoader() // Ignore any loader, which makes trouble :-) ::comphelper::SequenceAsHashMap lLoaderProps(xSet->nextElement()); OUString sLoader = lLoaderProps.getUnpackedValueOrDefault(PROP_NAME, OUString()); - css::uno::Reference< css::uno::XInterface > xLoader; - - xLoader = xLoaderFactory->createInstance(sLoader); + css::uno::Reference< css::uno::XInterface > xLoader = xLoaderFactory->createInstance(sLoader); if (xLoader.is()) return xLoader; } diff --git a/framework/source/recording/dispatchrecorder.cxx b/framework/source/recording/dispatchrecorder.cxx index a395cef82978..7f67daae3315 100644 --- a/framework/source/recording/dispatchrecorder.cxx +++ b/framework/source/recording/dispatchrecorder.cxx @@ -288,9 +288,8 @@ void DispatchRecorder::implts_recordMacro( const OUString& aURL, bool bAsComment, OUStringBuffer& aScriptBuffer ) { OUStringBuffer aArgumentBuffer(1000); - OUString sArrayName; // this value is used to name the arrays of aArgumentBuffer - sArrayName = "args" + OUString::number(m_nRecordingID); + OUString sArrayName = "args" + OUString::number(m_nRecordingID); aScriptBuffer.append("rem ----------------------------------------------------------------------\n"); diff --git a/framework/source/services/substitutepathvars.cxx b/framework/source/services/substitutepathvars.cxx index 13dc84760517..87885f64072e 100644 --- a/framework/source/services/substitutepathvars.cxx +++ b/framework/source/services/substitutepathvars.cxx @@ -353,10 +353,9 @@ OUString SubstitutePathVariables::impl_substituteVariable( const OUString& rText sal_Int32 nReplaceLength = 0; OUString aReplacement; OUString aSubString = aWorkText.copy( nPosition, nLength ); - OUString aSubVarString; // Path variables are not case sensitive! - aSubVarString = aSubString.toAsciiLowerCase(); + OUString aSubVarString = aSubString.toAsciiLowerCase(); VarNameToIndexMap::const_iterator pNTOIIter = m_aPreDefVarMap.find( aSubVarString ); if ( pNTOIIter != m_aPreDefVarMap.end() ) { diff --git a/framework/source/uiconfiguration/globalsettings.cxx b/framework/source/uiconfiguration/globalsettings.cxx index 0663339f3dac..73bc3effb7e7 100644 --- a/framework/source/uiconfiguration/globalsettings.cxx +++ b/framework/source/uiconfiguration/globalsettings.cxx @@ -164,8 +164,7 @@ bool GlobalSettings_Access::GetToolbarStateInfo( GlobalSettings::StateInfo eStat { try { - css::uno::Any a; - a = m_xConfigAccess->getByName( m_aNodeRefStates ); + css::uno::Any a = m_xConfigAccess->getByName( m_aNodeRefStates ); css::uno::Reference< css::container::XNameAccess > xNameAccess; if ( a >>= xNameAccess ) { diff --git a/framework/source/uielement/addonstoolbarmanager.cxx b/framework/source/uielement/addonstoolbarmanager.cxx index eb3381ce6a04..9cdcfeb838db 100644 --- a/framework/source/uielement/addonstoolbarmanager.cxx +++ b/framework/source/uielement/addonstoolbarmanager.cxx @@ -296,9 +296,7 @@ void AddonsToolBarManager::FillToolbar( const Sequence< Sequence< PropertyValue } else { - ::cppu::OWeakObject* pController = nullptr; - - pController = ToolBarMerger::CreateController( m_xContext, m_xFrame, m_pToolBar, aURL, nId, nWidth, aControlType ); + ::cppu::OWeakObject* pController = ToolBarMerger::CreateController( m_xContext, m_xFrame, m_pToolBar, aURL, nId, nWidth, aControlType ); xController.set( pController, UNO_QUERY ); } diff --git a/framework/source/uielement/menubarmerger.cxx b/framework/source/uielement/menubarmerger.cxx index a28e8aa53415..6d702488ac5b 100644 --- a/framework/source/uielement/menubarmerger.cxx +++ b/framework/source/uielement/menubarmerger.cxx @@ -258,9 +258,7 @@ bool MenuBarMerger::RemoveMenuItems( const OUString& rMergeCommandParameter ) { const sal_uInt16 nParam( sal_uInt16( rMergeCommandParameter.toInt32() )); - sal_uInt16 nCount( 1 ); - - nCount = std::max( nParam, nCount ); + sal_uInt16 nCount = std::max( nParam, sal_uInt16(1) ); sal_uInt16 i = 0; while (( nPos < pMenu->GetItemCount() ) && ( i < nCount )) diff --git a/framework/source/uielement/menubarwrapper.cxx b/framework/source/uielement/menubarwrapper.cxx index fe49c42d8acf..36abce496d54 100644 --- a/framework/source/uielement/menubarwrapper.cxx +++ b/framework/source/uielement/menubarwrapper.cxx @@ -279,8 +279,7 @@ Any SAL_CALL MenuBarWrapper::getByName( if ( pIter == m_aPopupControllerCache.end() ) throw container::NoSuchElementException(); - uno::Reference< frame::XDispatchProvider > xDispatchProvider; - xDispatchProvider = pIter->second.m_xDispatchProvider; + uno::Reference< frame::XDispatchProvider > xDispatchProvider = pIter->second.m_xDispatchProvider; return uno::makeAny( xDispatchProvider ); } diff --git a/framework/source/uielement/statusbarmanager.cxx b/framework/source/uielement/statusbarmanager.cxx index 82394d2748a9..9c4a6c7b8496 100644 --- a/framework/source/uielement/statusbarmanager.cxx +++ b/framework/source/uielement/statusbarmanager.cxx @@ -354,10 +354,8 @@ void StatusBarManager::CreateControllers() if ( !xController.is() ) { - svt::StatusbarController* pController( nullptr ); - // 2) Old SFX2 Statusbar controllers - pController = CreateStatusBarController( m_xFrame, m_pStatusBar, nId, aCommandURL ); + svt::StatusbarController* pController = CreateStatusBarController( m_xFrame, m_pStatusBar, nId, aCommandURL ); if ( !pController ) { // 3) Is Add-on? Generic statusbar controller diff --git a/framework/source/uielement/subtoolbarcontroller.cxx b/framework/source/uielement/subtoolbarcontroller.cxx index 610b2685897b..2eb1897b8069 100644 --- a/framework/source/uielement/subtoolbarcontroller.cxx +++ b/framework/source/uielement/subtoolbarcontroller.cxx @@ -200,9 +200,7 @@ css::uno::Reference< css::awt::XWindow > SubToolBarController::createPopupWindow // create element with factory static css::uno::WeakReference< css::ui::XUIElementFactoryManager > xWeakUIElementFactory; css::uno::Reference< css::ui::XUIElement > xUIElement; - css::uno::Reference< css::ui::XUIElementFactoryManager > xUIElementFactory; - - xUIElementFactory = xWeakUIElementFactory; + css::uno::Reference< css::ui::XUIElementFactoryManager > xUIElementFactory = xWeakUIElementFactory; if ( !xUIElementFactory.is() ) { xUIElementFactory = css::ui::theUIElementFactoryManager::get( m_xContext ); commit 04112bce506c60254cb1cb8536f942c8adb5c7d6 Author: Noel Grandin <[email protected]> AuthorDate: Sat Apr 13 08:22:37 2019 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Sat Apr 13 14:46:53 2019 +0200 loplugin:sequentialassign in filter..fpicker Change-Id: I4ba0e1e982897bd570612f6cda8ba1e6a9fa5dbd Reviewed-on: https://gerrit.libreoffice.org/70700 Tested-by: Jenkins Reviewed-by: Noel Grandin <[email protected]> diff --git a/filter/source/config/cache/filtercache.cxx b/filter/source/config/cache/filtercache.cxx index f717f109a26f..29c717491588 100644 --- a/filter/source/config/cache/filtercache.cxx +++ b/filter/source/config/cache/filtercache.cxx @@ -549,8 +549,7 @@ void FilterCache::addStatePropsToItem( EItemType eType, void FilterCache::removeStatePropsFromItem(CacheItem& rItem) { - CacheItem::iterator pIt; - pIt = rItem.find(PROPNAME_FINALIZED); + CacheItem::iterator pIt = rItem.find(PROPNAME_FINALIZED); if (pIt != rItem.end()) rItem.erase(pIt); pIt = rItem.find(PROPNAME_MANDATORY); @@ -1575,8 +1574,7 @@ CacheItem FilterCache::impl_loadItem(const css::uno::Reference< css::container:: { css::uno::Reference< css::beans::XMultiPropertySet > xPropSet( xItem, css::uno::UNO_QUERY_THROW); - css::uno::Sequence< css::uno::Any > aValues; - aValues = xPropSet->getPropertyValues(rNames); + css::uno::Sequence< css::uno::Any > aValues = xPropSet->getPropertyValues(rNames); for (sal_Int32 i = 0; i < aValues.getLength(); i++) aItem[rNames[i]] = aValues[i]; @@ -1600,8 +1598,7 @@ CacheItem FilterCache::impl_loadItem(const css::uno::Reference< css::container:: { css::uno::Reference< css::beans::XMultiPropertySet > xPropSet( xItem, css::uno::UNO_QUERY_THROW); - css::uno::Sequence< css::uno::Any > aValues; - aValues = xPropSet->getPropertyValues(rNames); + css::uno::Sequence< css::uno::Any > aValues = xPropSet->getPropertyValues(rNames); for (sal_Int32 i = 0; i < rNames.getLength(); i++) { diff --git a/filter/source/graphicfilter/idxf/dxf2mtf.cxx b/filter/source/graphicfilter/idxf/dxf2mtf.cxx index d7e6b61fd7a8..74895eb4251f 100644 --- a/filter/source/graphicfilter/idxf/dxf2mtf.cxx +++ b/filter/source/graphicfilter/idxf/dxf2mtf.cxx @@ -224,8 +224,7 @@ void DXF2GDIMetaFile::DrawLineEntity(const DXFLineEntity & rE, const DXFTransfor rTransform.Transform(rE.aP0,aP0); rTransform.Transform(rE.aP1,aP1); - DXFLineInfo aDXFLineInfo; - aDXFLineInfo=GetEntityDXFLineInfo(rE); + DXFLineInfo aDXFLineInfo=GetEntityDXFLineInfo(rE); LineInfo aLineInfo; aLineInfo = rTransform.Transform(aDXFLineInfo); diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index 7ee80504a317..971655d18b5e 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -198,8 +198,7 @@ void Impl_OlePres::Write( SvStream & rStm ) if( MapUnit::Map100thMM != nMU ) { Size aPrefS( pMtf->GetPrefSize() ); - Size aS( aPrefS ); - aS = OutputDevice::LogicToLogic(aS, MapMode(nMU), MapMode(MapUnit::Map100thMM)); + Size aS = OutputDevice::LogicToLogic(aPrefS, MapMode(nMU), MapMode(MapUnit::Map100thMM)); pMtf->Scale( Fraction( aS.Width(), aPrefS.Width() ), Fraction( aS.Height(), aPrefS.Height() ) ); diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index 7b4e365cfd69..770138117f05 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -2441,8 +2441,7 @@ bool SdrPowerPointImport::SeekToCurrentPage( DffRecordHeader* pRecHd ) const sal_uLong nPersist = (*pList)[ nCurrentPageNum ].aPersistAtom.nPsrReference; if ( nPersist > 0 && nPersist < nPersistPtrCnt ) { - sal_uLong nFPos = 0; - nFPos = pPersistPtr[ nPersist ]; + sal_uLong nFPos = pPersistPtr[ nPersist ]; if ( nFPos < nStreamLen ) { rStCtrl.Seek( nFPos ); diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx index d5cb95f732ef..46e8ce4cd1d4 100644 --- a/filter/source/svg/svgexport.cxx +++ b/filter/source/svg/svgexport.cxx @@ -1296,8 +1296,7 @@ void SVGFilter::implExportAnimations() mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "class", "Animations" ); SvXMLElementExport aDefsElem( *mpSVGExport, XML_NAMESPACE_NONE, "defs", true, true ); - rtl::Reference< xmloff::AnimationsExporter > xAnimationsExporter; - xAnimationsExporter = new xmloff::AnimationsExporter( *mpSVGExport, xProps ); + rtl::Reference< xmloff::AnimationsExporter > xAnimationsExporter = new xmloff::AnimationsExporter( *mpSVGExport, xProps ); xAnimationsExporter->prepare( xRootNode ); xAnimationsExporter->exportAnimations( xRootNode ); } diff --git a/filter/source/t602/t602filter.cxx b/filter/source/t602/t602filter.cxx index b6aeebe59ba0..0534361dd9ad 100644 --- a/filter/source/t602/t602filter.cxx +++ b/filter/source/t602/t602filter.cxx @@ -169,9 +169,7 @@ OUString T602ImportFilter::detect( Sequence<PropertyValue>& Descriptor) css::uno::Sequence< sal_Int8 > aData; const size_t numBytes = 4; - size_t numBytesRead = 0; - - numBytesRead = mxInputStream->readSomeBytes (aData, numBytes); + size_t numBytesRead = mxInputStream->readSomeBytes (aData, numBytes); if ((numBytesRead != numBytes) || (aData[0] != '@') || (aData[1] != 'C') || (aData[2] != 'T') || (aData[3] != ' ')) diff --git a/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx b/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx index 8bd97ca2823b..ca879c93a4fa 100644 --- a/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx +++ b/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx @@ -102,8 +102,7 @@ void XMLFilterTabPageXSLT::SetURL( URLBox& rURLBox, const OUString& rURL ) } else if( !rURL.isEmpty() ) { - OUString aURL( rURL ); - aURL = URIHelper::SmartRel2Abs( INetURLObject(sInstPath), aURL, Link<OUString *, bool>(), false ); + OUString aURL = URIHelper::SmartRel2Abs( INetURLObject(sInstPath), rURL, Link<OUString *, bool>(), false ); osl::FileBase::getSystemPathFromFileURL( aURL, aPath ); rURLBox.SetBaseURL( aURL ); diff --git a/forms/source/component/EventThread.cxx b/forms/source/component/EventThread.cxx index 84b9b4798b83..357888111991 100644 --- a/forms/source/component/EventThread.cxx +++ b/forms/source/component/EventThread.cxx @@ -57,9 +57,7 @@ OComponentEventThread::~OComponentEventThread() Any SAL_CALL OComponentEventThread::queryInterface(const Type& _rType) { - Any aReturn; - - aReturn = OWeakObject::queryInterface(_rType); + Any aReturn = OWeakObject::queryInterface(_rType); if (!aReturn.hasValue()) aReturn = ::cppu::queryInterface(_rType, diff --git a/forms/source/component/Filter.cxx b/forms/source/component/Filter.cxx index fb56cbdd3c8a..ccaa7f209687 100644 --- a/forms/source/component/Filter.cxx +++ b/forms/source/component/Filter.cxx @@ -519,8 +519,7 @@ namespace frm if ( m_aText != aText ) { // check the text with the SQL-Parser - OUString aNewText(aText); - aNewText = aNewText.trim(); + OUString aNewText = aText.trim(); if ( !aNewText.isEmpty() ) { ::dbtools::OPredicateInputController aPredicateInput( m_xContext, m_xConnection, getParseContext() ); diff --git a/forms/source/xforms/resourcehelper.cxx b/forms/source/xforms/resourcehelper.cxx index 0e3cbdf00b66..371b707f8c85 100644 --- a/forms/source/xforms/resourcehelper.cxx +++ b/forms/source/xforms/resourcehelper.cxx @@ -54,8 +54,7 @@ OUString getResource(const char* pResourceId, OUString sResource = frm::ResourceManager::loadString(pResourceId); OSL_ENSURE( !sResource.isEmpty(), "resource not found?" ); - OUString sString( sResource ); - sString = sString.replaceAll( "$1", rInfo1 ); + OUString sString = sResource.replaceAll( "$1", rInfo1 ); sString = sString.replaceAll( "$2", rInfo2 ); sString = sString.replaceAll( "$3", rInfo3 ); return sString; diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx index 7f561b56059f..8382977e9a37 100644 --- a/fpicker/source/office/iodlg.cxx +++ b/fpicker/source/office/iodlg.cxx @@ -2235,13 +2235,11 @@ bool SvtFileDialog::IsolateFilterFromPath_Impl( OUString& rPath, OUString& rFilt } // cut off filter - rFilter = aReversePath; - rFilter = rFilter.copy( 0, nPathTokenPos ); + rFilter = aReversePath.copy( 0, nPathTokenPos ); rFilter = comphelper::string::reverseString(rFilter); // determine folder - rPath = aReversePath; - rPath = rPath.copy( nPathTokenPos ); + rPath = aReversePath.copy( nPathTokenPos ); rPath = comphelper::string::reverseString(rPath); } else _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
