summaryrefslogtreecommitdiff
path: root/cui/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-04-04 14:34:07 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-04-11 09:48:10 +0200
commit49eb02f07a5af44da59008a238e828b4a9532bef (patch)
tree43c4b4eaacd79fe0bff784a4ef71f4c1080c3912 /cui/source
parent5823ecd54b16974ffe8821a5ae061cd0ecc4cf84 (diff)
new loplugin:unusedvariablemore
collection of heuristics to look for local variables that are never read from i.e. do not contribute to the surrounding logic This is an expensive plugin, since it walks up the parent tree, so it is off by default. Change-Id: Ib8ba292241bd16adf299e8bba4502cb473513a06 Reviewed-on: https://gerrit.libreoffice.org/52450 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui/source')
-rw-r--r--cui/source/customize/cfg.cxx2
-rw-r--r--cui/source/dialogs/scriptdlg.cxx5
-rw-r--r--cui/source/options/optsave.cxx3
-rw-r--r--cui/source/tabpages/chardlg.cxx7
-rw-r--r--cui/source/tabpages/textanim.cxx3
-rw-r--r--cui/source/tabpages/transfrm.cxx3
6 files changed, 1 insertions, 22 deletions
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 9378072e4e54..02c4d5c834f0 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -3228,8 +3228,6 @@ void SvxIconSelectorDialog::ImportGraphics(
sal_uInt16 ret = 0;
sal_Int32 aIndex;
OUString aIconName;
- uno::Sequence< beans::PropertyValue > aMediaProps( 1 );
- aMediaProps[0].Name = "URL";
if ( rPaths.getLength() == 1 )
{
diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx
index 1657140def76..4168e1098e64 100644
--- a/cui/source/dialogs/scriptdlg.cxx
+++ b/cui/source/dialogs/scriptdlg.cxx
@@ -700,10 +700,9 @@ IMPL_LINK( SvxScriptOrgDialog, ButtonHdl, Button *, pButton, void )
mspNode->getScript( scriptURL ), UNO_QUERY_THROW );
const Sequence< Any > args(0);
- Any aRet;
Sequence< sal_Int16 > outIndex;
Sequence< Any > outArgs( 0 );
- aRet = xScript->invoke( args, outIndex, outArgs );
+ xScript->invoke( args, outIndex, outArgs );
}
catch ( reflection::InvocationTargetException& ite )
{
@@ -983,10 +982,8 @@ void SvxScriptOrgDialog::renameEntry( SvTreeListEntry* pEntry )
{
OUString aNewName = node->getName();
sal_Int32 extnPos = aNewName.lastIndexOf( '.' );
- OUString extn;
if(extnPos>0)
{
- extn = aNewName.copy(extnPos);
aNewName = aNewName.copy(0,extnPos);
}
CuiInputDialog aNewDlg(GetFrameWeld(), InputDialogMode::RENAME);
diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx
index 08cd5c21d9f9..528262cacfc6 100644
--- a/cui/source/options/optsave.cxx
+++ b/cui/source/options/optsave.cxx
@@ -426,7 +426,6 @@ void SvxSaveTabPage::Reset( const SfxItemSet* )
sCommand = sCommand.replaceFirst("%1", sReplace);
Reference< XEnumeration > xList = xQuery->createSubSetEnumerationByQuery(sCommand);
std::vector< OUString > lList;
- std::vector<bool> lAlienList;
std::vector<bool> lODFList;
while(xList->hasMoreElements())
{
@@ -434,9 +433,7 @@ void SvxSaveTabPage::Reset( const SfxItemSet* )
OUString sFilter = aFilter.getUnpackedValueOrDefault("Name",OUString());
if (!sFilter.isEmpty())
{
- SfxFilterFlags nFlags = static_cast<SfxFilterFlags>(aFilter.getUnpackedValueOrDefault("Flags",sal_Int32()));
lList.push_back(sFilter);
- lAlienList.push_back(bool(nFlags & SfxFilterFlags::ALIEN));
lODFList.push_back( isODFFormat( sFilter ) );
}
}
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 3c6afa8943a5..08bababd9bbf 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -527,13 +527,6 @@ void SvxCharNamePage::UpdatePreview_Impl()
SvxFont& rFont = GetPreviewFont();
SvxFont& rCJKFont = GetPreviewCJKFont();
SvxFont& rCTLFont = GetPreviewCTLFont();
- // Size
- Size aSize = rFont.GetFontSize();
- aSize.setWidth( 0 );
- Size aCJKSize = rCJKFont.GetFontSize();
- aCJKSize.setWidth( 0 );
- Size aCTLSize = rCTLFont.GetFontSize();
- aCTLSize.setWidth( 0 );
// Font
const FontList* pFontList = GetFontList();
diff --git a/cui/source/tabpages/textanim.cxx b/cui/source/tabpages/textanim.cxx
index 35cc702112a1..c74c71aabbc0 100644
--- a/cui/source/tabpages/textanim.cxx
+++ b/cui/source/tabpages/textanim.cxx
@@ -403,7 +403,6 @@ bool SvxTextAnimationPage::FillItemSet( SfxItemSet* rAttrs)
// quantity
eState = m_pTsbEndless->GetState();
- OUString aStr = m_pNumFldCount->GetText();
if( m_pTsbEndless->IsValueChangedFromSaved() ||
m_pNumFldCount->IsValueChangedFromSaved() )
{
@@ -424,7 +423,6 @@ bool SvxTextAnimationPage::FillItemSet( SfxItemSet* rAttrs)
// delay
eState = m_pTsbAuto->GetState();
- aStr = m_pMtrFldDelay->GetText();
if( m_pTsbAuto->IsValueChangedFromSaved() ||
m_pMtrFldDelay->IsValueChangedFromSaved() )
{
@@ -445,7 +443,6 @@ bool SvxTextAnimationPage::FillItemSet( SfxItemSet* rAttrs)
// step size
eState = m_pTsbPixel->GetState();
- aStr = m_pMtrFldAmount->GetText();
if( m_pTsbPixel->IsValueChangedFromSaved() ||
m_pMtrFldAmount->IsValueChangedFromSaved() )
{
diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx
index 4cf42de9b18e..b930cba2804e 100644
--- a/cui/source/tabpages/transfrm.cxx
+++ b/cui/source/tabpages/transfrm.cxx
@@ -488,7 +488,6 @@ void SvxSlantTabPage::Construct()
bool SvxSlantTabPage::FillItemSet(SfxItemSet* rAttrs)
{
bool bModified = false;
- OUString aStr = m_pMtrRadius->GetText();
if( m_pMtrRadius->IsValueChangedFromSaved() )
{
@@ -499,8 +498,6 @@ bool SvxSlantTabPage::FillItemSet(SfxItemSet* rAttrs)
bModified = true;
}
- aStr = m_pMtrAngle->GetText();
-
if( m_pMtrAngle->IsValueChangedFromSaved() )
{
sal_Int32 nValue = static_cast<sal_Int32>(m_pMtrAngle->GetValue());