diff options
author | Noel Grandin <noel@peralex.com> | 2016-04-20 10:34:01 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-04-21 08:32:47 +0200 |
commit | 5abc669599001bf888b97c4d3c2715e1fb7523b9 (patch) | |
tree | 2407c6fc040a795e6ffc69de02ba940285c04c7f /sfx2 | |
parent | 5bb308a9ad16f6002486a60e4a753693818580b6 (diff) |
new plugin stylepolice
check for local variables which follow our member field naming
convention, which is highly confusing
Change-Id: Idacedf7145d09843e96a584237b385f7662eea10
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/imagemgr.cxx | 20 | ||||
-rw-r--r-- | sfx2/source/control/templateabstractview.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/dialog/dinfdlg.cxx | 28 | ||||
-rw-r--r-- | sfx2/source/dialog/dockwin.cxx | 12 | ||||
-rw-r--r-- | sfx2/source/dialog/mgetempl.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/doc/doctempl.cxx | 24 | ||||
-rw-r--r-- | sfx2/source/doc/templatedlg.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/sidebar/SidebarController.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/sidebar/UnoPanel.cxx | 10 | ||||
-rw-r--r-- | sfx2/source/sidebar/UnoSidebar.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/view/sfxbasecontroller.cxx | 8 |
11 files changed, 59 insertions, 69 deletions
diff --git a/sfx2/source/appl/imagemgr.cxx b/sfx2/source/appl/imagemgr.cxx index d6d3fe8a1112..56862e94e601 100644 --- a/sfx2/source/appl/imagemgr.cxx +++ b/sfx2/source/appl/imagemgr.cxx @@ -138,14 +138,14 @@ Image SAL_CALL GetImage( } } - static WeakReference< XModuleManager2 > m_xModuleManager; + static WeakReference< XModuleManager2 > s_xModuleManager; - Reference< XModuleManager2 > xModuleManager = m_xModuleManager; + Reference< XModuleManager2 > xModuleManager = s_xModuleManager; if ( !xModuleManager.is() ) { xModuleManager = ModuleManager::create(::comphelper::getProcessComponentContext()); - m_xModuleManager = xModuleManager; + s_xModuleManager = xModuleManager; } try @@ -155,28 +155,28 @@ Image SAL_CALL GetImage( Reference< XImageManager > xModuleImageManager; OUString aModuleId = xModuleManager->identify( rFrame ); - static ModuleIdToImagegMgr m_aModuleIdToImageMgrMap; + static ModuleIdToImagegMgr s_aModuleIdToImageMgrMap; - ModuleIdToImagegMgr::iterator pIter = m_aModuleIdToImageMgrMap.find( aModuleId ); - if ( pIter != m_aModuleIdToImageMgrMap.end() ) + ModuleIdToImagegMgr::iterator pIter = s_aModuleIdToImageMgrMap.find( aModuleId ); + if ( pIter != s_aModuleIdToImageMgrMap.end() ) xModuleImageManager = pIter->second; else { - static WeakReference< XModuleUIConfigurationManagerSupplier > m_xModuleCfgMgrSupplier; + static WeakReference< XModuleUIConfigurationManagerSupplier > s_xModuleCfgMgrSupplier; - Reference< XModuleUIConfigurationManagerSupplier > xModuleCfgMgrSupplier = m_xModuleCfgMgrSupplier; + Reference< XModuleUIConfigurationManagerSupplier > xModuleCfgMgrSupplier = s_xModuleCfgMgrSupplier; if ( !xModuleCfgMgrSupplier.is() ) { xModuleCfgMgrSupplier = theModuleUIConfigurationManagerSupplier::get( ::comphelper::getProcessComponentContext() ); - m_xModuleCfgMgrSupplier = xModuleCfgMgrSupplier; + s_xModuleCfgMgrSupplier = xModuleCfgMgrSupplier; } Reference< XUIConfigurationManager > xUICfgMgr = xModuleCfgMgrSupplier->getUIConfigurationManager( aModuleId ); xModuleImageManager.set( xUICfgMgr->getImageManager(), UNO_QUERY ); - m_aModuleIdToImageMgrMap.insert( ModuleIdToImagegMgr::value_type( aModuleId, xModuleImageManager )); + s_aModuleIdToImageMgrMap.insert( ModuleIdToImagegMgr::value_type( aModuleId, xModuleImageManager )); } Sequence< Reference< css::graphic::XGraphic > > aGraphicSeq; diff --git a/sfx2/source/control/templateabstractview.cxx b/sfx2/source/control/templateabstractview.cxx index 25374e44a1e3..b202fb614299 100644 --- a/sfx2/source/control/templateabstractview.cxx +++ b/sfx2/source/control/templateabstractview.cxx @@ -310,10 +310,10 @@ void TemplateAbstractView::Paint(vcl::RenderContext& rRenderContext, const Recta maFillColor.getBColor())); const drawinglayer::geometry::ViewInformation2D aNewViewInfos; - std::unique_ptr<drawinglayer::processor2d::BaseProcessor2D> mpProcessor( + std::unique_ptr<drawinglayer::processor2d::BaseProcessor2D> pProcessor( drawinglayer::processor2d::createBaseProcessor2DFromOutputDevice(rRenderContext, aNewViewInfos)); - mpProcessor->process(aSeq); + pProcessor->process(aSeq); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index ef8b863a8b2b..b6a72e86550e 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -959,10 +959,10 @@ bool SfxDocumentPage::FillItemSet( SfxItemSet* rSet ) if ( pExpSet && SfxItemState::SET == pExpSet->GetItemState( SID_DOCINFO, true, &pItem ) ) { - const SfxDocumentInfoItem* m_pInfoItem = static_cast<const SfxDocumentInfoItem*>(pItem); + const SfxDocumentInfoItem* pInfoItem = static_cast<const SfxDocumentInfoItem*>(pItem); bool bUseData = ( TRISTATE_TRUE == m_pUseUserDataCB->GetState() ); - const_cast<SfxDocumentInfoItem*>(m_pInfoItem)->SetUseUserData( bUseData ); - rSet->Put( SfxDocumentInfoItem( *m_pInfoItem ) ); + const_cast<SfxDocumentInfoItem*>(pInfoItem)->SetUseUserData( bUseData ); + rSet->Put( SfxDocumentInfoItem( *pInfoItem ) ); bRet = true; } } @@ -996,10 +996,10 @@ bool SfxDocumentPage::FillItemSet( SfxItemSet* rSet ) if ( pExpSet && SfxItemState::SET == pExpSet->GetItemState( SID_DOCINFO, true, &pItem ) ) { - const SfxDocumentInfoItem* m_pxInfoItem = static_cast<const SfxDocumentInfoItem*>(pItem); + const SfxDocumentInfoItem* pInfoItem = static_cast<const SfxDocumentInfoItem*>(pItem); bool bUseThumbnail = ( TRISTATE_TRUE == m_pUseThumbnailSaveCB->GetState() ); - const_cast<SfxDocumentInfoItem*>(m_pxInfoItem)->SetUseThumbnailSave( bUseThumbnail ); - rSet->Put( SfxDocumentInfoItem( *m_pxInfoItem ) ); + const_cast<SfxDocumentInfoItem*>(pInfoItem)->SetUseThumbnailSave( bUseThumbnail ); + rSet->Put( SfxDocumentInfoItem( *pInfoItem ) ); bRet = true; } } @@ -1082,7 +1082,7 @@ void SfxDocumentPage::Reset( const SfxItemSet* rSet ) m_pFileValEd->SetText( aURL.GetPartBeforeLastName() ); // handle access data - bool m_bUseUserData = rInfoItem.IsUseUserData(); + bool bUseUserData = rInfoItem.IsUseUserData(); const LocaleDataWrapper& rLocaleWrapper( Application::GetSettings().GetLocaleDataWrapper() ); m_pCreateValFt->SetText( ConvertDateTime_Impl( rInfoItem.getAuthor(), rInfoItem.getCreationDate(), rLocaleWrapper ) ); @@ -1095,7 +1095,7 @@ void SfxDocumentPage::Reset( const SfxItemSet* rSet ) m_pPrintValFt->SetText( ConvertDateTime_Impl( rInfoItem.getPrintedBy(), aTime, rLocaleWrapper ) ); const long nTime = rInfoItem.getEditingDuration(); - if ( m_bUseUserData ) + if ( bUseUserData ) { const tools::Time aT( nTime/3600, (nTime%3600)/60, nTime%60 ); m_pTimeLogValFt->SetText( rLocaleWrapper.getDuration( aT ) ); @@ -1103,7 +1103,7 @@ void SfxDocumentPage::Reset( const SfxItemSet* rSet ) rInfoItem.getEditingCycles() ) ); } - bool m_bUseThumbnailSave = rInfoItem.IsUseThumbnailSave(); + bool bUseThumbnailSave = rInfoItem.IsUseThumbnailSave(); // Check for cmis properties where otherwise unavailable if ( rInfoItem.isCmisDocument( ) ) @@ -1116,13 +1116,13 @@ void SfxDocumentPage::Reset( const SfxItemSet* rSet ) { Sequence< sal_Int64 > seqValue; aCmisProps[i].Value >>= seqValue; - SvNumberFormatter m_aNumberFormatter( ::comphelper::getProcessComponentContext(), + SvNumberFormatter aNumberFormatter( ::comphelper::getProcessComponentContext(), Application::GetSettings().GetLanguageTag().getLanguageType() ); - sal_uInt32 nIndex = m_aNumberFormatter.GetFormatIndex( NF_NUMBER_SYSTEM ); + sal_uInt32 nIndex = aNumberFormatter.GetFormatIndex( NF_NUMBER_SYSTEM ); if ( seqValue.getLength( ) > 0 ) { OUString sValue; - m_aNumberFormatter.GetInputLineString( seqValue[0], nIndex, sValue ); + aNumberFormatter.GetInputLineString( seqValue[0], nIndex, sValue ); m_pShowSizeFT->SetText( CreateSizeText( sValue.toInt64( ) ) ); } } @@ -1154,12 +1154,12 @@ void SfxDocumentPage::Reset( const SfxItemSet* rSet ) } } - m_pUseUserDataCB->SetState( static_cast<TriState>(m_bUseUserData) ); + m_pUseUserDataCB->SetState( static_cast<TriState>(bUseUserData) ); m_pUseUserDataCB->SaveValue(); m_pUseUserDataCB->Enable( bEnableUseUserData ); bHandleDelete = false; m_pDeleteBtn->Enable( bEnableUseUserData ); - m_pUseThumbnailSaveCB->SetState( static_cast<TriState>(m_bUseThumbnailSave) ); + m_pUseThumbnailSaveCB->SetState( static_cast<TriState>(bUseThumbnailSave) ); m_pUseThumbnailSaveCB->SaveValue(); } diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx index a53ff86e36c2..3d431919b342 100644 --- a/sfx2/source/dialog/dockwin.cxx +++ b/sfx2/source/dialog/dockwin.cxx @@ -159,22 +159,22 @@ SfxDockingWrapper::SfxDockingWrapper( vcl::Window* pParentWnd , xFactoryMgr->createInstanceWithArgumentsAndContext( aArgs, xContext ), uno::UNO_QUERY ); - static uno::WeakReference< frame::XModuleManager2 > m_xModuleManager; + static uno::WeakReference< frame::XModuleManager2 > s_xModuleManager; - uno::Reference< frame::XModuleManager2 > xModuleManager( m_xModuleManager ); + uno::Reference< frame::XModuleManager2 > xModuleManager( s_xModuleManager ); if ( !xModuleManager.is() ) { xModuleManager = frame::ModuleManager::create(xContext); - m_xModuleManager = xModuleManager; + s_xModuleManager = xModuleManager; } - static uno::WeakReference< container::XNameAccess > m_xWindowStateConfiguration; + static uno::WeakReference< container::XNameAccess > s_xWindowStateConfiguration; - uno::Reference< container::XNameAccess > xWindowStateConfiguration( m_xWindowStateConfiguration ); + uno::Reference< container::XNameAccess > xWindowStateConfiguration( s_xWindowStateConfiguration ); if ( !xWindowStateConfiguration.is() ) { xWindowStateConfiguration = ui::theWindowStateConfiguration::get( xContext ); - m_xWindowStateConfiguration = xWindowStateConfiguration; + s_xWindowStateConfiguration = xWindowStateConfiguration; } OUString sModuleIdentifier = xModuleManager->identify( xFrame ); diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx index 6765452cb15b..93da4a54c9a8 100644 --- a/sfx2/source/dialog/mgetempl.cxx +++ b/sfx2/source/dialog/mgetempl.cxx @@ -397,11 +397,11 @@ bool SfxManageStyleSheetPage::Execute_Impl( pItems[ nCount++ ] = nullptr; - const SfxPoolItem* mpItem = rDispatcher.Execute( + const SfxPoolItem* pItem = rDispatcher.Execute( nId, SfxCallMode::SYNCHRON | SfxCallMode::RECORD | SfxCallMode::MODAL, pItems ); - if ( !mpItem ) + if ( !pItem ) return false; return true; diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx index 50cdd58003a0..2ca537f04433 100644 --- a/sfx2/source/doc/doctempl.cxx +++ b/sfx2/source/doc/doctempl.cxx @@ -296,7 +296,7 @@ OUString SfxDocumentTemplates::GetFullRegionName } -const OUString& SfxDocumentTemplates::GetRegionName +OUString SfxDocumentTemplates::GetRegionName ( sal_uInt16 nIdx // vcl::Region Index ) const @@ -311,7 +311,7 @@ const OUString& SfxDocumentTemplates::GetRegionName */ { - static OUString maTmpString; + OUString aTmpString; DocTemplLocker_Impl aLocker( *pImp ); @@ -320,14 +320,10 @@ const OUString& SfxDocumentTemplates::GetRegionName RegionData_Impl *pData = pImp->GetRegion( nIdx ); if ( pData ) - maTmpString = pData->GetTitle(); - else - maTmpString.clear(); + aTmpString = pData->GetTitle(); } - else - maTmpString.clear(); - return maTmpString; + return aTmpString; } @@ -383,7 +379,7 @@ sal_uInt16 SfxDocumentTemplates::GetCount } -const OUString& SfxDocumentTemplates::GetName +OUString SfxDocumentTemplates::GetName ( sal_uInt16 nRegion, // vcl::Region Index, in which the entry lies sal_uInt16 nIdx // Index of the entry @@ -401,7 +397,7 @@ const OUString& SfxDocumentTemplates::GetName { DocTemplLocker_Impl aLocker( *pImp ); - static OUString maTmpString; + OUString aTmpString; if ( pImp->Construct() ) { @@ -412,14 +408,10 @@ const OUString& SfxDocumentTemplates::GetName pEntry = pRegion->GetEntry( nIdx ); if ( pEntry ) - maTmpString = pEntry->GetTitle(); - else - maTmpString.clear(); + aTmpString = pEntry->GetTitle(); } - else - maTmpString.clear(); - return maTmpString; + return aTmpString; } diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx index 62c49ed44ee4..e51bcb4de0e7 100644 --- a/sfx2/source/doc/templatedlg.cxx +++ b/sfx2/source/doc/templatedlg.cxx @@ -1624,14 +1624,14 @@ void SfxTemplateManagerDlg::localSearchMoveTo(sal_uInt16 nMenuId) void SfxTemplateManagerDlg::loadRepositories() { - uno::Reference < uno::XComponentContext > m_context(comphelper::getProcessComponentContext()); + uno::Reference< uno::XComponentContext > xContext(comphelper::getProcessComponentContext()); // Load from user settings css::uno::Sequence<OUString> aUrls = - officecfg::Office::Common::Misc::TemplateRepositoryUrls::get(m_context); + officecfg::Office::Common::Misc::TemplateRepositoryUrls::get(xContext); css::uno::Sequence<OUString> aNames = - officecfg::Office::Common::Misc::TemplateRepositoryNames::get(m_context); + officecfg::Office::Common::Misc::TemplateRepositoryNames::get(xContext); for (sal_Int32 i = 0; i < aUrls.getLength() && i < aNames.getLength(); ++i) { diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx index c1801d2e4f68..045fbb1dac48 100644 --- a/sfx2/source/sidebar/SidebarController.cxx +++ b/sfx2/source/sidebar/SidebarController.cxx @@ -1015,9 +1015,9 @@ IMPL_LINK_TYPED(SidebarController, OnMenuItemSelected, Menu*, pMenu, bool) case MID_HIDE_SIDEBAR: { const util::URL aURL (Tools::GetURL(gsHideSidebarCommandName)); - Reference<frame::XDispatch> mxDispatch (Tools::GetDispatch(mxFrame, aURL)); - if (mxDispatch.is()) - mxDispatch->dispatch(aURL, Sequence<beans::PropertyValue>()); + Reference<frame::XDispatch> xDispatch (Tools::GetDispatch(mxFrame, aURL)); + if (xDispatch.is()) + xDispatch->dispatch(aURL, Sequence<beans::PropertyValue>()); break; } default: diff --git a/sfx2/source/sidebar/UnoPanel.cxx b/sfx2/source/sidebar/UnoPanel.cxx index 820515f9b8ef..3fd124b459d5 100644 --- a/sfx2/source/sidebar/UnoPanel.cxx +++ b/sfx2/source/sidebar/UnoPanel.cxx @@ -94,13 +94,11 @@ void SAL_CALL SfxUnoPanel::expand( const sal_Bool bCollapseOther ) if (bCollapseOther) { - Panel* aPanel; - - SharedPanelContainer maPanels = mpDeck->GetPanels(); - for ( SharedPanelContainer::iterator iPanel(maPanels.begin()), iEnd(maPanels.end()); - iPanel!=iEnd; ++iPanel) + SharedPanelContainer aPanels = mpDeck->GetPanels(); + for ( SharedPanelContainer::iterator iPanel(aPanels.begin()), iEnd(aPanels.end()); + iPanel!=iEnd; ++iPanel) { - aPanel = *iPanel; + Panel* aPanel = *iPanel; if (! aPanel->HasIdPredicate(mPanelId)) aPanel->SetExpanded(false); diff --git a/sfx2/source/sidebar/UnoSidebar.cxx b/sfx2/source/sidebar/UnoSidebar.cxx index 28bca9ed407e..6ea75563d16c 100644 --- a/sfx2/source/sidebar/UnoSidebar.cxx +++ b/sfx2/source/sidebar/UnoSidebar.cxx @@ -61,9 +61,9 @@ void SAL_CALL SfxUnoSidebar::setVisible ( const sal_Bool bVisible ) if ( (bVisible && !pSidebarController) || (!bVisible && pSidebarController) ) { const util::URL aURL (Tools::GetURL(".uno:Sidebar")); - uno::Reference<frame::XDispatch> mxDispatch (Tools::GetDispatch(xFrame, aURL)); - if (mxDispatch.is()) - mxDispatch->dispatch(aURL, uno::Sequence<beans::PropertyValue>()); + uno::Reference<frame::XDispatch> xDispatch (Tools::GetDispatch(xFrame, aURL)); + if (xDispatch.is()) + xDispatch->dispatch(aURL, uno::Sequence<beans::PropertyValue>()); } } diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx index 2c8992b53f5c..eca3f8a81810 100644 --- a/sfx2/source/view/sfxbasecontroller.cxx +++ b/sfx2/source/view/sfxbasecontroller.cxx @@ -148,14 +148,14 @@ typedef std::unordered_map< sal_Int16, sal_Int16 > GroupHashMap; sal_Int16 MapGroupIDToCommandGroup( sal_Int16 nGroupID ) { - static GroupHashMap mHashMap; + static GroupHashMap s_aHashMap; if ( !bGroupIDMapInitialized ) { sal_Int32 i = 0; while ( GroupIDCommandGroupMap[i].nGroupID != 0 ) { - mHashMap.insert( GroupHashMap::value_type( + s_aHashMap.insert( GroupHashMap::value_type( GroupIDCommandGroupMap[i].nGroupID, GroupIDCommandGroupMap[i].nCommandGroup )); ++i; @@ -163,8 +163,8 @@ sal_Int16 MapGroupIDToCommandGroup( sal_Int16 nGroupID ) bGroupIDMapInitialized = true; } - GroupHashMap::const_iterator pIter = mHashMap.find( nGroupID ); - if ( pIter != mHashMap.end() ) + GroupHashMap::const_iterator pIter = s_aHashMap.find( nGroupID ); + if ( pIter != s_aHashMap.end() ) return pIter->second; else return frame::CommandGroup::INTERNAL; |