diff options
author | Noel Grandin <noel@peralex.com> | 2016-04-25 09:59:16 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-04-26 10:55:58 +0000 |
commit | e8fd5a07eca70912ddee45aaa34d434809b59fb7 (patch) | |
tree | d5dc890d12987cad73f5e64301f823ba23a97f2d /svx | |
parent | e6adb3e8b4de3c0f78d249b83de19b849ef65b59 (diff) |
update loplugin stylepolice to check local pointers vars
are actually pointer vars.
Also convert from regex to normal code, so we can enable this
plugin all the time.
Change-Id: Ie36a25ecba61c18f99c77c77646d6459a443cbd1
Reviewed-on: https://gerrit.libreoffice.org/24391
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/accessibility/AccessibleShape.cxx | 18 | ||||
-rw-r--r-- | svx/source/dialog/dlgctrl.cxx | 4 | ||||
-rw-r--r-- | svx/source/dialog/docrecovery.cxx | 18 | ||||
-rw-r--r-- | svx/source/sidebar/area/AreaPropertyPanelBase.cxx | 18 | ||||
-rw-r--r-- | svx/source/table/accessiblecell.cxx | 6 | ||||
-rw-r--r-- | svx/source/table/tablerow.cxx | 2 | ||||
-rw-r--r-- | svx/source/table/tablerow.hxx | 2 | ||||
-rw-r--r-- | svx/source/tbxctrls/tbcontrl.cxx | 6 | ||||
-rw-r--r-- | svx/source/xml/xmlgrhlp.cxx | 8 |
9 files changed, 41 insertions, 41 deletions
diff --git a/svx/source/accessibility/AccessibleShape.cxx b/svx/source/accessibility/AccessibleShape.cxx index b8a1e0c48fb7..45bcf70c3551 100644 --- a/svx/source/accessibility/AccessibleShape.cxx +++ b/svx/source/accessibility/AccessibleShape.cxx @@ -422,11 +422,11 @@ uno::Reference<XAccessibleStateSet> SAL_CALL css::uno::Reference<XAccessibleStateSet> rState = xTempAccContext->getAccessibleStateSet(); if( rState.is() ) { - css::uno::Sequence<short> pStates = rState->getStates(); - int count = pStates.getLength(); + css::uno::Sequence<short> aStates = rState->getStates(); + int count = aStates.getLength(); for( int iIndex = 0;iIndex < count;iIndex++ ) { - if( pStates[iIndex] == AccessibleStateType::EDITABLE ) + if( aStates[iIndex] == AccessibleStateType::EDITABLE ) { pStateSet->AddState (AccessibleStateType::EDITABLE); pStateSet->AddState (AccessibleStateType::RESIZABLE); @@ -465,11 +465,11 @@ uno::Reference<XAccessibleStateSet> SAL_CALL css::uno::Reference<XAccessibleStateSet> rState = xTempAccContext->getAccessibleStateSet(); if( rState.is() ) { - css::uno::Sequence<short> pStates = rState->getStates(); - int count = pStates.getLength(); + css::uno::Sequence<short> aStates = rState->getStates(); + int count = aStates.getLength(); for( int iIndex = 0;iIndex < count;iIndex++ ) { - if( pStates[iIndex] == AccessibleStateType::EDITABLE ) + if( aStates[iIndex] == AccessibleStateType::EDITABLE ) { pStateSet->AddState (AccessibleStateType::EDITABLE); pStateSet->AddState (AccessibleStateType::RESIZABLE); @@ -847,11 +847,11 @@ throw ( IndexOutOfBoundsException, if( !pRState.is() ) return false; - uno::Sequence<short> pStates = pRState->getStates(); - int nCount = pStates.getLength(); + uno::Sequence<short> aStates = pRState->getStates(); + int nCount = aStates.getLength(); for( int i = 0; i < nCount; i++ ) { - if(pStates[i] == AccessibleStateType::SELECTED) + if(aStates[i] == AccessibleStateType::SELECTED) return true; } return false; diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx index bc0163f89c08..db445e009491 100644 --- a/svx/source/dialog/dlgctrl.cxx +++ b/svx/source/dialog/dlgctrl.cxx @@ -964,11 +964,11 @@ void SvxPixelCtl::KeyInput( const KeyEvent& rKEvt ) if( !bIsMod ) { - Point pRepaintPoint( aRectSize.Width() *( aFocusPosition.getX() - 1)/ nLines - 1, + Point aRepaintPoint( aRectSize.Width() *( aFocusPosition.getX() - 1)/ nLines - 1, aRectSize.Height() *( aFocusPosition.getY() - 1)/ nLines -1 ); Size aRepaintSize( aRectSize.Width() *3/ nLines + 2,aRectSize.Height() *3/ nLines + 2); - Rectangle aRepaintRect( pRepaintPoint, aRepaintSize ); + Rectangle aRepaintRect( aRepaintPoint, aRepaintSize ); bool bFocusPosChanged=false; switch(nCode) { diff --git a/svx/source/dialog/docrecovery.cxx b/svx/source/dialog/docrecovery.cxx index 3866c24b394c..e4c4b874776c 100644 --- a/svx/source/dialog/docrecovery.cxx +++ b/svx/source/dialog/docrecovery.cxx @@ -652,11 +652,11 @@ SaveDialog::SaveDialog(vcl::Window* pParent, RecoveryCore* pCore) // fill listbox with current open documents m_pFileListLB->Clear(); - TURLList& pURLs = m_pCore->getURLListAccess(); + TURLList& rURLs = m_pCore->getURLListAccess(); TURLList::const_iterator pIt; - for ( pIt = pURLs.begin(); - pIt != pURLs.end() ; + for ( pIt = rURLs.begin(); + pIt != rURLs.end() ; ++pIt ) { const TURLInfo& rInfo = *pIt; @@ -898,10 +898,10 @@ RecoveryDialog::RecoveryDialog(vcl::Window* pParent, RecoveryCore* pCore) m_pCancelBtn->SetClickHdl( LINK( this, RecoveryDialog, CancelButtonHdl ) ); // fill list box first time - TURLList& pURLList = m_pCore->getURLListAccess(); + TURLList& rURLList = m_pCore->getURLListAccess(); TURLList::const_iterator pIt; - for ( pIt = pURLList.begin(); - pIt != pURLList.end() ; + for ( pIt = rURLList.begin(); + pIt != rURLList.end() ; ++pIt ) { const TURLInfo& rInfo = *pIt; @@ -1275,10 +1275,10 @@ void BrokenRecoveryDialog::dispose() void BrokenRecoveryDialog::impl_refresh() { m_bExecutionNeeded = false; - TURLList& pURLList = m_pCore->getURLListAccess(); + TURLList& rURLList = m_pCore->getURLListAccess(); TURLList::const_iterator pIt; - for ( pIt = pURLList.begin(); - pIt != pURLList.end() ; + for ( pIt = rURLList.begin(); + pIt != rURLList.end() ; ++pIt ) { const TURLInfo& rInfo = *pIt; diff --git a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx index cbb4f7a75622..5a7374fe7cc2 100644 --- a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx +++ b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx @@ -1025,24 +1025,24 @@ void AreaPropertyPanelBase::Update() { const OUString aString(mpFillGradientItem->GetName()); mpLbFillAttr->SelectEntry(aString); - const XGradient pGradient = mpFillGradientItem->GetGradientValue(); - mpLbFillGradFrom->SelectEntry(pGradient.GetStartColor()); + const XGradient aGradient = mpFillGradientItem->GetGradientValue(); + mpLbFillGradFrom->SelectEntry(aGradient.GetStartColor()); if(mpLbFillGradFrom->GetSelectEntryCount() == 0) { - mpLbFillGradFrom->InsertEntry(pGradient.GetStartColor(), OUString()); - mpLbFillGradFrom->SelectEntry(pGradient.GetStartColor()); + mpLbFillGradFrom->InsertEntry(aGradient.GetStartColor(), OUString()); + mpLbFillGradFrom->SelectEntry(aGradient.GetStartColor()); } - mpLbFillGradTo->SelectEntry(pGradient.GetEndColor()); + mpLbFillGradTo->SelectEntry(aGradient.GetEndColor()); if(mpLbFillGradTo->GetSelectEntryCount() == 0) { - mpLbFillGradTo->InsertEntry(pGradient.GetEndColor(), OUString()); - mpLbFillGradTo->SelectEntry(pGradient.GetEndColor()); + mpLbFillGradTo->InsertEntry(aGradient.GetEndColor(), OUString()); + mpLbFillGradTo->SelectEntry(aGradient.GetEndColor()); } - mpGradientStyle->SelectEntryPos(sal::static_int_cast< sal_Int32 >( pGradient.GetGradientStyle() )); + mpGradientStyle->SelectEntryPos(sal::static_int_cast< sal_Int32 >( aGradient.GetGradientStyle() )); if(mpGradientStyle->GetSelectEntryPos() == GradientStyle_RADIAL) mpMTRAngle->Disable(); else - mpMTRAngle->SetValue( pGradient.GetAngle() /10 ); + mpMTRAngle->SetValue( aGradient.GetAngle() /10 ); } else { diff --git a/svx/source/table/accessiblecell.cxx b/svx/source/table/accessiblecell.cxx index 12c6ddedf408..3c6491caabd1 100644 --- a/svx/source/table/accessiblecell.cxx +++ b/svx/source/table/accessiblecell.cxx @@ -228,11 +228,11 @@ Reference<XAccessibleStateSet> SAL_CALL AccessibleCell::getAccessibleStateSet() css::uno::Reference<XAccessibleStateSet> rState = xTempAccContext->getAccessibleStateSet(); if( rState.is() ) { - css::uno::Sequence<short> pStates = rState->getStates(); - int count = pStates.getLength(); + css::uno::Sequence<short> aStates = rState->getStates(); + int count = aStates.getLength(); for( int iIndex = 0;iIndex < count;iIndex++ ) { - if( pStates[iIndex] == AccessibleStateType::EDITABLE ) + if( aStates[iIndex] == AccessibleStateType::EDITABLE ) { pStateSet->AddState (AccessibleStateType::EDITABLE); pStateSet->AddState (AccessibleStateType::RESIZABLE); diff --git a/svx/source/table/tablerow.cxx b/svx/source/table/tablerow.cxx index 5070e0cf32c6..6984a8047544 100644 --- a/svx/source/table/tablerow.cxx +++ b/svx/source/table/tablerow.cxx @@ -149,7 +149,7 @@ void TableRow::removeColumns( sal_Int32 nIndex, sal_Int32 nCount ) } } -TableModelRef const & TableRow::getModel() const +const TableModelRef& TableRow::getModel() const { return mxTableModel; } diff --git a/svx/source/table/tablerow.hxx b/svx/source/table/tablerow.hxx index 9ecc6ef1cf9d..a6719c8564b1 100644 --- a/svx/source/table/tablerow.hxx +++ b/svx/source/table/tablerow.hxx @@ -48,7 +48,7 @@ public: void insertColumns( sal_Int32 nIndex, sal_Int32 nCount, CellVector::iterator* pIter = nullptr ); void removeColumns( sal_Int32 nIndex, sal_Int32 nCount ); /// Reference to the table model containing this row. - TableModelRef const & getModel() const; + const TableModelRef& getModel() const; // XCellRange virtual css::uno::Reference< css::table::XCell > SAL_CALL getCellByPosition( sal_Int32 nColumn, sal_Int32 nRow ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override; diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 38a2f1f9b96b..46538e29f359 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -1905,9 +1905,9 @@ SvxCurrencyList_Impl::SvxCurrencyList_Impl( bIsSymbol = true; sal_uInt16 nDefaultFormat = aFormatter.GetCurrencyFormatStrings( aStringsDtor, aCurrencyEntry, bIsSymbol ); - OUString& pFormatStr = aStringsDtor[ nDefaultFormat ]; - m_aFormatEntries.push_back( pFormatStr ); - if( pFormatStr == m_rSelectedFormat ) + const OUString& rFormatStr = aStringsDtor[ nDefaultFormat ]; + m_aFormatEntries.push_back( rFormatStr ); + if( rFormatStr == m_rSelectedFormat ) nSelectedPos = nPos; ++nPos; } diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx index 8aa36cd1be9f..0deeae571dc2 100644 --- a/svx/source/xml/xmlgrhlp.cxx +++ b/svx/source/xml/xmlgrhlp.cxx @@ -283,10 +283,10 @@ const GraphicObject& SvXMLGraphicOutputStream::GetGraphicObject() mpOStm->Seek( 0 ); sal_uInt16 nFormat = GRFILTER_FORMAT_DONTKNOW; - sal_uInt16 pDeterminedFormat = GRFILTER_FORMAT_DONTKNOW; - GraphicFilter::GetGraphicFilter().ImportGraphic( aGraphic, "", *mpOStm ,nFormat,&pDeterminedFormat ); + sal_uInt16 nDeterminedFormat = GRFILTER_FORMAT_DONTKNOW; + GraphicFilter::GetGraphicFilter().ImportGraphic( aGraphic, "", *mpOStm ,nFormat,&nDeterminedFormat ); - if (pDeterminedFormat == GRFILTER_FORMAT_DONTKNOW) + if (nDeterminedFormat == GRFILTER_FORMAT_DONTKNOW) { //Read the first two byte to check whether it is a gzipped stream, is so it may be in wmz or emz format //unzip them and try again @@ -327,7 +327,7 @@ const GraphicObject& SvXMLGraphicOutputStream::GetGraphicObject() if (nStreamLen_) { pDest->Seek(0L); - GraphicFilter::GetGraphicFilter().ImportGraphic( aGraphic, "", *pDest ,nFormat,&pDeterminedFormat ); + GraphicFilter::GetGraphicFilter().ImportGraphic( aGraphic, "", *pDest ,nFormat,&nDeterminedFormat ); } } } |