summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-04-25 09:59:16 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-04-26 10:55:58 +0000
commite8fd5a07eca70912ddee45aaa34d434809b59fb7 (patch)
treed5dc890d12987cad73f5e64301f823ba23a97f2d /sfx2
parente6adb3e8b4de3c0f78d249b83de19b849ef65b59 (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 'sfx2')
-rw-r--r--sfx2/source/appl/appopen.cxx14
-rw-r--r--sfx2/source/control/bindings.cxx10
-rw-r--r--sfx2/source/control/querystatus.cxx14
-rw-r--r--sfx2/source/control/sfxstatuslistener.cxx16
-rw-r--r--sfx2/source/control/statcach.cxx10
-rw-r--r--sfx2/source/control/unoctitm.cxx10
-rw-r--r--sfx2/source/dialog/dinfdlg.cxx6
-rw-r--r--sfx2/source/doc/guisaveas.cxx6
-rw-r--r--sfx2/source/statbar/stbitem.cxx14
-rw-r--r--sfx2/source/toolbox/tbxitem.cxx32
10 files changed, 66 insertions, 66 deletions
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx
index e2a00eda4538..de80bc8c8058 100644
--- a/sfx2/source/appl/appopen.cxx
+++ b/sfx2/source/appl/appopen.cxx
@@ -592,7 +592,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
if ( !pFileNameItem )
{
// get FileName from dialog
- std::vector<OUString> pURLList;
+ std::vector<OUString> aURLList;
OUString aFilter;
SfxItemSet* pSet = nullptr;
OUString aPath;
@@ -630,12 +630,12 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
sal_uIntPtr nErr = sfx2::FileOpenDialog_Impl(
ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION,
- SFXWB_MULTISELECTION, OUString(), pURLList,
+ SFXWB_MULTISELECTION, OUString(), aURLList,
aFilter, pSet, &aPath, nDialog, sStandardDir, aBlackList );
if ( nErr == ERRCODE_ABORT )
{
- pURLList.clear();
+ aURLList.clear();
return;
}
@@ -646,7 +646,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
rReq.AppendItem( SfxStringItem( SID_REFERER, "private:user" ) );
delete pSet;
- if(!pURLList.empty())
+ if(!aURLList.empty())
{
if ( nSID == SID_OPENTEMPLATE )
rReq.AppendItem( SfxBoolItem( SID_TEMPLATE, false ) );
@@ -683,7 +683,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
rReq.AppendItem(SfxStringItem(SID_DOC_SERVICE, aDocService));
}
- for(std::vector<OUString>::const_iterator i = pURLList.begin(); i != pURLList.end(); ++i)
+ for(std::vector<OUString>::const_iterator i = aURLList.begin(); i != aURLList.end(); ++i)
{
rReq.RemoveItem( SID_FILE_NAME );
rReq.AppendItem( SfxStringItem( SID_FILE_NAME, *i ) );
@@ -715,10 +715,10 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
}
}
- pURLList.clear();
+ aURLList.clear();
return;
}
- pURLList.clear();
+ aURLList.clear();
}
bool bHyperlinkUsed = false;
diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx
index ccf5c2f81048..bf96cf182904 100644
--- a/sfx2/source/control/bindings.cxx
+++ b/sfx2/source/control/bindings.cxx
@@ -1889,27 +1889,27 @@ SfxItemState SfxBindings::QueryState( sal_uInt16 nSlot, std::unique_ptr<SfxPoolI
else
{
css::uno::Any aAny = pBind->GetStatus().State;
- css::uno::Type pType = aAny.getValueType();
+ css::uno::Type aType = aAny.getValueType();
- if ( pType == cppu::UnoType<bool>::get() )
+ if ( aType == cppu::UnoType<bool>::get() )
{
bool bTemp = false;
aAny >>= bTemp ;
rpState.reset(new SfxBoolItem( nSlot, bTemp ));
}
- else if ( pType == ::cppu::UnoType< ::cppu::UnoUnsignedShortType >::get() )
+ else if ( aType == ::cppu::UnoType< ::cppu::UnoUnsignedShortType >::get() )
{
sal_uInt16 nTemp = 0;
aAny >>= nTemp ;
rpState.reset(new SfxUInt16Item( nSlot, nTemp ));
}
- else if ( pType == cppu::UnoType<sal_uInt32>::get() )
+ else if ( aType == cppu::UnoType<sal_uInt32>::get() )
{
sal_uInt32 nTemp = 0;
aAny >>= nTemp ;
rpState.reset(new SfxUInt32Item( nSlot, nTemp ));
}
- else if ( pType == cppu::UnoType<OUString>::get() )
+ else if ( aType == cppu::UnoType<OUString>::get() )
{
OUString sTemp ;
aAny >>= sTemp ;
diff --git a/sfx2/source/control/querystatus.cxx b/sfx2/source/control/querystatus.cxx
index 3e10e9e6cb03..2f939a7ea4ce 100644
--- a/sfx2/source/control/querystatus.cxx
+++ b/sfx2/source/control/querystatus.cxx
@@ -109,40 +109,40 @@ throw( RuntimeException, std::exception )
if ( rEvent.IsEnabled )
{
m_eState = SfxItemState::DEFAULT;
- css::uno::Type pType = rEvent.State.getValueType();
+ css::uno::Type aType = rEvent.State.getValueType();
- if ( pType == cppu::UnoType<bool>::get() )
+ if ( aType == cppu::UnoType<bool>::get() )
{
bool bTemp = false;
rEvent.State >>= bTemp ;
m_pItem = new SfxBoolItem( m_nSlotID, bTemp );
}
- else if ( pType == ::cppu::UnoType< ::cppu::UnoUnsignedShortType >::get() )
+ else if ( aType == ::cppu::UnoType< ::cppu::UnoUnsignedShortType >::get() )
{
sal_uInt16 nTemp = 0;
rEvent.State >>= nTemp ;
m_pItem = new SfxUInt16Item( m_nSlotID, nTemp );
}
- else if ( pType == cppu::UnoType<sal_uInt32>::get() )
+ else if ( aType == cppu::UnoType<sal_uInt32>::get() )
{
sal_uInt32 nTemp = 0;
rEvent.State >>= nTemp ;
m_pItem = new SfxUInt32Item( m_nSlotID, nTemp );
}
- else if ( pType == cppu::UnoType<OUString>::get() )
+ else if ( aType == cppu::UnoType<OUString>::get() )
{
OUString sTemp ;
rEvent.State >>= sTemp ;
m_pItem = new SfxStringItem( m_nSlotID, sTemp );
}
- else if ( pType == cppu::UnoType< css::frame::status::ItemStatus>::get() )
+ else if ( aType == cppu::UnoType< css::frame::status::ItemStatus>::get() )
{
ItemStatus aItemStatus;
rEvent.State >>= aItemStatus;
m_eState = (SfxItemState) aItemStatus.State;
m_pItem = new SfxVoidItem( m_nSlotID );
}
- else if ( pType == cppu::UnoType< css::frame::status::Visibility>::get() )
+ else if ( aType == cppu::UnoType< css::frame::status::Visibility>::get() )
{
Visibility aVisibilityStatus;
rEvent.State >>= aVisibilityStatus;
diff --git a/sfx2/source/control/sfxstatuslistener.cxx b/sfx2/source/control/sfxstatuslistener.cxx
index 4e6567ecb186..dab426adf6b2 100644
--- a/sfx2/source/control/sfxstatuslistener.cxx
+++ b/sfx2/source/control/sfxstatuslistener.cxx
@@ -168,45 +168,45 @@ throw( RuntimeException, std::exception )
if ( rEvent.IsEnabled )
{
eState = SfxItemState::DEFAULT;
- css::uno::Type pType = rEvent.State.getValueType();
+ css::uno::Type aType = rEvent.State.getValueType();
- if ( pType == ::cppu::UnoType<void>::get() )
+ if ( aType == ::cppu::UnoType<void>::get() )
{
pItem = new SfxVoidItem( m_nSlotID );
eState = SfxItemState::UNKNOWN;
}
- else if ( pType == cppu::UnoType< bool >::get() )
+ else if ( aType == cppu::UnoType< bool >::get() )
{
bool bTemp = false;
rEvent.State >>= bTemp ;
pItem = new SfxBoolItem( m_nSlotID, bTemp );
}
- else if ( pType == cppu::UnoType< ::cppu::UnoUnsignedShortType >::get() )
+ else if ( aType == cppu::UnoType< ::cppu::UnoUnsignedShortType >::get() )
{
sal_uInt16 nTemp = 0;
rEvent.State >>= nTemp ;
pItem = new SfxUInt16Item( m_nSlotID, nTemp );
}
- else if ( pType == cppu::UnoType<sal_uInt32>::get() )
+ else if ( aType == cppu::UnoType<sal_uInt32>::get() )
{
sal_uInt32 nTemp = 0;
rEvent.State >>= nTemp ;
pItem = new SfxUInt32Item( m_nSlotID, nTemp );
}
- else if ( pType == cppu::UnoType<OUString>::get() )
+ else if ( aType == cppu::UnoType<OUString>::get() )
{
OUString sTemp ;
rEvent.State >>= sTemp ;
pItem = new SfxStringItem( m_nSlotID, sTemp );
}
- else if ( pType == cppu::UnoType< css::frame::status::ItemStatus >::get() )
+ else if ( aType == cppu::UnoType< css::frame::status::ItemStatus >::get() )
{
ItemStatus aItemStatus;
rEvent.State >>= aItemStatus;
eState = (SfxItemState) aItemStatus.State;
pItem = new SfxVoidItem( m_nSlotID );
}
- else if ( pType == cppu::UnoType< css::frame::status::Visibility >::get() )
+ else if ( aType == cppu::UnoType< css::frame::status::Visibility >::get() )
{
Visibility aVisibilityStatus;
rEvent.State >>= aVisibilityStatus;
diff --git a/sfx2/source/control/statcach.cxx b/sfx2/source/control/statcach.cxx
index 6b1a9e8cb949..d5165c43db6e 100644
--- a/sfx2/source/control/statcach.cxx
+++ b/sfx2/source/control/statcach.cxx
@@ -95,26 +95,26 @@ void SAL_CALL BindDispatch_Impl::statusChanged( const css::frame::FeatureStateE
eState = SfxItemState::DEFAULT;
css::uno::Any aAny = aStatus.State;
- css::uno::Type pType = aAny.getValueType();
- if ( pType == cppu::UnoType< bool >::get() )
+ css::uno::Type aType = aAny.getValueType();
+ if ( aType == cppu::UnoType< bool >::get() )
{
bool bTemp = false;
aAny >>= bTemp ;
pItem = new SfxBoolItem( nId, bTemp );
}
- else if ( pType == ::cppu::UnoType< ::cppu::UnoUnsignedShortType >::get() )
+ else if ( aType == ::cppu::UnoType< ::cppu::UnoUnsignedShortType >::get() )
{
sal_uInt16 nTemp = 0;
aAny >>= nTemp ;
pItem = new SfxUInt16Item( nId, nTemp );
}
- else if ( pType == cppu::UnoType<sal_uInt32>::get() )
+ else if ( aType == cppu::UnoType<sal_uInt32>::get() )
{
sal_uInt32 nTemp = 0;
aAny >>= nTemp ;
pItem = new SfxUInt32Item( nId, nTemp );
}
- else if ( pType == cppu::UnoType<OUString>::get() )
+ else if ( aType == cppu::UnoType<OUString>::get() )
{
OUString sTemp ;
aAny >>= sTemp ;
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index 95503364f612..b22e843075c1 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -156,27 +156,27 @@ void SAL_CALL SfxUnoControllerItem::statusChanged(const css::frame::FeatureState
if ( rEvent.IsEnabled )
{
eState = SfxItemState::DEFAULT;
- css::uno::Type pType = rEvent.State.getValueType();
+ css::uno::Type aType = rEvent.State.getValueType();
- if ( pType == cppu::UnoType< bool >::get() )
+ if ( aType == cppu::UnoType< bool >::get() )
{
bool bTemp = false;
rEvent.State >>= bTemp ;
pItem = new SfxBoolItem( pCtrlItem->GetId(), bTemp );
}
- else if ( pType == cppu::UnoType< ::cppu::UnoUnsignedShortType >::get() )
+ else if ( aType == cppu::UnoType< ::cppu::UnoUnsignedShortType >::get() )
{
sal_uInt16 nTemp = 0;
rEvent.State >>= nTemp ;
pItem = new SfxUInt16Item( pCtrlItem->GetId(), nTemp );
}
- else if ( pType == cppu::UnoType<sal_uInt32>::get() )
+ else if ( aType == cppu::UnoType<sal_uInt32>::get() )
{
sal_uInt32 nTemp = 0;
rEvent.State >>= nTemp ;
pItem = new SfxUInt32Item( pCtrlItem->GetId(), nTemp );
}
- else if ( pType == cppu::UnoType<OUString>::get() )
+ else if ( aType == cppu::UnoType<OUString>::get() )
{
OUString sTemp ;
rEvent.State >>= sTemp ;
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index b6a72e86550e..8bd00e61d4ec 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -162,14 +162,14 @@ OUString ConvertDateTime_Impl( const OUString& rName,
{
Date aD(uDT);
tools::Time aT(uDT);
- const OUString pDelim ( ", " );
+ const OUString aDelim( ", " );
OUString aStr( rWrapper.getDate( aD ) );
- aStr += pDelim;
+ aStr += aDelim;
aStr += rWrapper.getTime( aT );
OUString aAuthor = comphelper::string::stripStart(rName, ' ');
if (!aAuthor.isEmpty())
{
- aStr += pDelim;
+ aStr += aDelim;
aStr += aAuthor;
}
return aStr;
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index 6347ae962613..e7507c619fcf 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -777,10 +777,10 @@ bool ModelData_Impl::CheckFilterOptionsDialogExistence()
while ( xFilterEnum->hasMoreElements() )
{
- uno::Sequence< beans::PropertyValue > pProps;
- if ( xFilterEnum->nextElement() >>= pProps )
+ uno::Sequence< beans::PropertyValue > aProps;
+ if ( xFilterEnum->nextElement() >>= aProps )
{
- ::comphelper::SequenceAsHashMap aPropsHM( pProps );
+ ::comphelper::SequenceAsHashMap aPropsHM( aProps );
OUString aUIServName = aPropsHM.getUnpackedValueOrDefault(
"UIComponent",
OUString() );
diff --git a/sfx2/source/statbar/stbitem.cxx b/sfx2/source/statbar/stbitem.cxx
index 693d164c402f..3c34c6013649 100644
--- a/sfx2/source/statbar/stbitem.cxx
+++ b/sfx2/source/statbar/stbitem.cxx
@@ -252,38 +252,38 @@ throw ( css::uno::RuntimeException, std::exception )
if ( rEvent.IsEnabled )
{
eState = SfxItemState::DEFAULT;
- uno::Type pType = rEvent.State.getValueType();
+ uno::Type aType = rEvent.State.getValueType();
- if ( pType == cppu::UnoType<void>::get() )
+ if ( aType == cppu::UnoType<void>::get() )
{
pItem = new SfxVoidItem( nSlotID );
eState = SfxItemState::UNKNOWN;
}
- else if ( pType == cppu::UnoType<bool>::get() )
+ else if ( aType == cppu::UnoType<bool>::get() )
{
bool bTemp = false;
rEvent.State >>= bTemp ;
pItem = new SfxBoolItem( nSlotID, bTemp );
}
- else if ( pType == ::cppu::UnoType< ::cppu::UnoUnsignedShortType >::get() )
+ else if ( aType == ::cppu::UnoType< ::cppu::UnoUnsignedShortType >::get() )
{
sal_uInt16 nTemp = 0;
rEvent.State >>= nTemp ;
pItem = new SfxUInt16Item( nSlotID, nTemp );
}
- else if ( pType == cppu::UnoType<sal_uInt32>::get() )
+ else if ( aType == cppu::UnoType<sal_uInt32>::get() )
{
sal_uInt32 nTemp = 0;
rEvent.State >>= nTemp ;
pItem = new SfxUInt32Item( nSlotID, nTemp );
}
- else if ( pType == cppu::UnoType<OUString>::get() )
+ else if ( aType == cppu::UnoType<OUString>::get() )
{
OUString sTemp ;
rEvent.State >>= sTemp ;
pItem = new SfxStringItem( nSlotID, sTemp );
}
- else if ( pType == cppu::UnoType< css::frame::status::ItemStatus>::get() )
+ else if ( aType == cppu::UnoType< css::frame::status::ItemStatus>::get() )
{
frame::status::ItemStatus aItemStatus;
rEvent.State >>= aItemStatus;
diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx
index 3e2855b7d94f..d036ad1cdaec 100644
--- a/sfx2/source/toolbox/tbxitem.cxx
+++ b/sfx2/source/toolbox/tbxitem.cxx
@@ -477,38 +477,38 @@ throw ( css::uno::RuntimeException, std::exception )
if ( rEvent.IsEnabled )
{
eState = SfxItemState::DEFAULT;
- css::uno::Type pType = rEvent.State.getValueType();
+ css::uno::Type aType = rEvent.State.getValueType();
- if ( pType == cppu::UnoType<void>::get() )
+ if ( aType == cppu::UnoType<void>::get() )
{
pItem = new SfxVoidItem( nSlotId );
eState = SfxItemState::UNKNOWN;
}
- else if ( pType == cppu::UnoType<bool>::get() )
+ else if ( aType == cppu::UnoType<bool>::get() )
{
bool bTemp = false;
rEvent.State >>= bTemp ;
pItem = new SfxBoolItem( nSlotId, bTemp );
}
- else if ( pType == ::cppu::UnoType< ::cppu::UnoUnsignedShortType >::get())
+ else if ( aType == ::cppu::UnoType< ::cppu::UnoUnsignedShortType >::get())
{
sal_uInt16 nTemp = 0;
rEvent.State >>= nTemp ;
pItem = new SfxUInt16Item( nSlotId, nTemp );
}
- else if ( pType == cppu::UnoType<sal_uInt32>::get() )
+ else if ( aType == cppu::UnoType<sal_uInt32>::get() )
{
sal_uInt32 nTemp = 0;
rEvent.State >>= nTemp ;
pItem = new SfxUInt32Item( nSlotId, nTemp );
}
- else if ( pType == cppu::UnoType<OUString>::get() )
+ else if ( aType == cppu::UnoType<OUString>::get() )
{
OUString sTemp ;
rEvent.State >>= sTemp ;
pItem = new SfxStringItem( nSlotId, sTemp );
}
- else if ( pType == cppu::UnoType< css::frame::status::ItemStatus>::get() )
+ else if ( aType == cppu::UnoType< css::frame::status::ItemStatus>::get() )
{
ItemStatus aItemStatus;
rEvent.State >>= aItemStatus;
@@ -521,7 +521,7 @@ throw ( css::uno::RuntimeException, std::exception )
eState = tmpState;
pItem = new SfxVoidItem( nSlotId );
}
- else if ( pType == cppu::UnoType< css::frame::status::Visibility>::get() )
+ else if ( aType == cppu::UnoType< css::frame::status::Visibility>::get() )
{
Visibility aVisibilityStatus;
rEvent.State >>= aVisibilityStatus;
@@ -811,38 +811,38 @@ throw ( css::uno::RuntimeException, std::exception )
if ( rEvent.IsEnabled )
{
eState = SfxItemState::DEFAULT;
- css::uno::Type pType = rEvent.State.getValueType();
+ css::uno::Type aType = rEvent.State.getValueType();
- if ( pType == cppu::UnoType<void>::get() )
+ if ( aType == cppu::UnoType<void>::get() )
{
pItem = new SfxVoidItem( nSlotId );
eState = SfxItemState::UNKNOWN;
}
- else if ( pType == cppu::UnoType<bool>::get() )
+ else if ( aType == cppu::UnoType<bool>::get() )
{
bool bTemp = false;
rEvent.State >>= bTemp ;
pItem = new SfxBoolItem( nSlotId, bTemp );
}
- else if ( pType == ::cppu::UnoType< ::cppu::UnoUnsignedShortType >::get())
+ else if ( aType == ::cppu::UnoType< ::cppu::UnoUnsignedShortType >::get())
{
sal_uInt16 nTemp = 0;
rEvent.State >>= nTemp ;
pItem = new SfxUInt16Item( nSlotId, nTemp );
}
- else if ( pType == cppu::UnoType<sal_uInt32>::get() )
+ else if ( aType == cppu::UnoType<sal_uInt32>::get() )
{
sal_uInt32 nTemp = 0;
rEvent.State >>= nTemp ;
pItem = new SfxUInt32Item( nSlotId, nTemp );
}
- else if ( pType == cppu::UnoType<OUString>::get() )
+ else if ( aType == cppu::UnoType<OUString>::get() )
{
OUString sTemp ;
rEvent.State >>= sTemp ;
pItem = new SfxStringItem( nSlotId, sTemp );
}
- else if ( pType == cppu::UnoType< css::frame::status::ItemStatus>::get() )
+ else if ( aType == cppu::UnoType< css::frame::status::ItemStatus>::get() )
{
ItemStatus aItemStatus;
rEvent.State >>= aItemStatus;
@@ -855,7 +855,7 @@ throw ( css::uno::RuntimeException, std::exception )
eState = tmpState;
pItem = new SfxVoidItem( nSlotId );
}
- else if ( pType == cppu::UnoType< css::frame::status::Visibility>::get() )
+ else if ( aType == cppu::UnoType< css::frame::status::Visibility>::get() )
{
Visibility aVisibilityStatus;
rEvent.State >>= aVisibilityStatus;