summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-03-28 15:27:36 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-03-29 06:42:30 +0000
commit5a725d1fde7381ef9c02afcb639235a11e52182c (patch)
treec1dfea787afb28c43be74eb981976e858550ccd1 /sc/source
parent2729994bc519597db205aeeb4b2242a45c57712f (diff)
loplugin:singlevalfields
Change-Id: I7f05903aaab9b0b274358243d680d0c30694ae61 Reviewed-on: https://gerrit.libreoffice.org/35804 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/core/data/funcdesc.cxx42
-rw-r--r--sc/source/core/tool/addincol.cxx1
-rw-r--r--sc/source/ui/dialogs/searchresults.cxx3
-rw-r--r--sc/source/ui/formdlg/dwfunctr.cxx13
-rw-r--r--sc/source/ui/inc/output.hxx1
-rw-r--r--sc/source/ui/unoobj/appluno.cxx13
-rw-r--r--sc/source/ui/view/output.cxx3
7 files changed, 24 insertions, 52 deletions
diff --git a/sc/source/core/data/funcdesc.cxx b/sc/source/core/data/funcdesc.cxx
index d745eaaf63ea..9767265331dd 100644
--- a/sc/source/core/data/funcdesc.cxx
+++ b/sc/source/core/data/funcdesc.cxx
@@ -149,17 +149,12 @@ OUString ScFuncDesc::GetParamList() const
sal_uInt16 nLastAdded = nArgCount;
for ( sal_uInt16 i=0; i<nArgCount; i++ )
{
- if (pDefArgFlags[i].bSuppress)
- nLastSuppressed = i;
- else
+ nLastAdded = i;
+ aSig.append(maDefArgNames[i]);
+ if ( i != nArgCount-1 )
{
- nLastAdded = i;
- aSig.append(maDefArgNames[i]);
- if ( i != nArgCount-1 )
- {
- aSig.append(sep);
- aSig.append( " " );
- }
+ aSig.append(sep);
+ aSig.append( " " );
}
}
// If only suppressed parameters follow the last added parameter,
@@ -172,12 +167,9 @@ OUString ScFuncDesc::GetParamList() const
{
for ( sal_uInt16 nArg = 0; nArg < nVarArgsStart; nArg++ )
{
- if (!pDefArgFlags[nArg].bSuppress)
- {
- aSig.append(maDefArgNames[nArg]);
- aSig.append(sep);
- aSig.append( " " );
- }
+ aSig.append(maDefArgNames[nArg]);
+ aSig.append(sep);
+ aSig.append( " " );
}
/* NOTE: Currently there are no suppressed var args parameters. If
* there were, we'd have to cope with it here and above for the fix
@@ -196,12 +188,9 @@ OUString ScFuncDesc::GetParamList() const
{
for ( sal_uInt16 nArg = 0; nArg < nVarArgsStart; nArg++ )
{
- if (!pDefArgFlags[nArg].bSuppress)
- {
- aSig.append(maDefArgNames[nArg]);
- aSig.append(sep);
- aSig.append( " " );
- }
+ aSig.append(maDefArgNames[nArg]);
+ aSig.append(sep);
+ aSig.append( " " );
}
aSig.append(maDefArgNames[nVarArgsStart]);
@@ -289,11 +278,6 @@ sal_uInt16 ScFuncDesc::GetSuppressedArgCount() const
else if (nArgs >= VAR_ARGS)
nArgs -= VAR_ARGS - 1;
sal_uInt16 nCount = nArgs;
- for (sal_uInt16 i=0; i < nArgs; ++i)
- {
- if (pDefArgFlags[i].bSuppress)
- --nCount;
- }
if (nArgCount >= PAIRED_VAR_ARGS)
nCount += PAIRED_VAR_ARGS - 2;
else if (nArgCount >= VAR_ARGS)
@@ -346,8 +330,7 @@ void ScFuncDesc::fillVisibleArgumentMapping(::std::vector<sal_uInt16>& _rArgumen
nArgs -= VAR_ARGS - 1;
for (sal_uInt16 i=0; i < nArgs; ++i)
{
- if (!pDefArgFlags || !pDefArgFlags[i].bSuppress)
- _rArguments.push_back(i);
+ _rArguments.push_back(i);
}
}
@@ -907,7 +890,6 @@ ScFunctionList::ScFunctionList()
for (sal_uInt16 j = 0; j < nArgs; ++j)
{
pDesc->pDefArgFlags[j].bOptional = false;
- pDesc->pDefArgFlags[j].bSuppress = false;
pLegacyFuncData->getParamDesc( aArgName, aArgDesc, j+1 );
if ( !aArgName.isEmpty() )
pDesc->maDefArgNames[j] = aArgName;
diff --git a/sc/source/core/tool/addincol.cxx b/sc/source/core/tool/addincol.cxx
index 1c84db07678e..6878753deed6 100644
--- a/sc/source/core/tool/addincol.cxx
+++ b/sc/source/core/tool/addincol.cxx
@@ -1266,7 +1266,6 @@ bool ScUnoAddInCollection::FillFunctionDescFromData( const ScUnoAddInFuncData& r
rDesc.maDefArgNames[nArg] = pArgs[nArg].aName;
rDesc.maDefArgDescs[nArg] = pArgs[nArg].aDescription;
rDesc.pDefArgFlags[nArg].bOptional = pArgs[nArg].bOptional;
- rDesc.pDefArgFlags[nArg].bSuppress = false;
// no empty names...
if ( rDesc.maDefArgNames[nArg].isEmpty() )
diff --git a/sc/source/ui/dialogs/searchresults.cxx b/sc/source/ui/dialogs/searchresults.cxx
index 897c8ecae6c5..111e39c98f7e 100644
--- a/sc/source/ui/dialogs/searchresults.cxx
+++ b/sc/source/ui/dialogs/searchresults.cxx
@@ -57,7 +57,7 @@ namespace
{
class ListWrapper {
size_t mnCount;
- const size_t mnMaximum;
+ static const size_t mnMaximum = 1000;
OUStringBuffer maName;
VclPtr<FixedText> mpLabel;
VclPtr<SvSimpleTable> mpList;
@@ -65,7 +65,6 @@ namespace
ListWrapper(const VclPtr<SvSimpleTable> &pList,
const VclPtr<FixedText> &pLabel) :
mnCount(0),
- mnMaximum(1000),
mpLabel(pLabel),
mpList(pList)
{
diff --git a/sc/source/ui/formdlg/dwfunctr.cxx b/sc/source/ui/formdlg/dwfunctr.cxx
index 020fd44ed3f3..63362f29078f 100644
--- a/sc/source/ui/formdlg/dwfunctr.cxx
+++ b/sc/source/ui/formdlg/dwfunctr.cxx
@@ -330,14 +330,11 @@ void ScFunctionWin::DoEnter()
for ( sal_uInt16 nArg = 1;
nArg < nFix && !pDesc->pDefArgFlags[nArg].bOptional; nArg++ )
{
- if (!pDesc->pDefArgFlags[nArg].bSuppress)
- {
- aArgStr += aArgSep;
- OUString sTmp = pDesc->maDefArgNames[nArg];
- sTmp = comphelper::string::strip(sTmp, ' ');
- sTmp = sTmp.replaceAll(" ", "_");
- aArgStr += sTmp;
- }
+ aArgStr += aArgSep;
+ OUString sTmp = pDesc->maDefArgNames[nArg];
+ sTmp = comphelper::string::strip(sTmp, ' ');
+ sTmp = sTmp.replaceAll(" ", "_");
+ aArgStr += sTmp;
}
}
}
diff --git a/sc/source/ui/inc/output.hxx b/sc/source/ui/inc/output.hxx
index a5eaad917660..8012790c2376 100644
--- a/sc/source/ui/inc/output.hxx
+++ b/sc/source/ui/inc/output.hxx
@@ -179,7 +179,6 @@ private:
SCROW nEditRow;
bool bMetaFile; // Output to metafile (not pixels!)
- bool bSingleGrid; // beim Gitter bChanged auswerten
bool bPagebreakMode; // Page break preview
bool bSolidBackground; // white instead of transparant
diff --git a/sc/source/ui/unoobj/appluno.cxx b/sc/source/ui/unoobj/appluno.cxx
index 4904d755e110..1f66a019abc7 100644
--- a/sc/source/ui/unoobj/appluno.cxx
+++ b/sc/source/ui/unoobj/appluno.cxx
@@ -561,14 +561,11 @@ static void lcl_FillSequence( uno::Sequence<beans::PropertyValue>& rSequence, co
sheet::FunctionArgument* pArgAry = aArgSeq.getArray();
for (sal_uInt16 i=0, j=0; i<nCount; i++)
{
- if (!rDesc.pDefArgFlags[i].bSuppress)
- {
- sheet::FunctionArgument aArgument;
- aArgument.Name = rDesc.maDefArgNames[i];
- aArgument.Description = rDesc.maDefArgDescs[i];
- aArgument.IsOptional = rDesc.pDefArgFlags[i].bOptional;
- pArgAry[j++] = aArgument;
- }
+ sheet::FunctionArgument aArgument;
+ aArgument.Name = rDesc.maDefArgNames[i];
+ aArgument.Description = rDesc.maDefArgDescs[i];
+ aArgument.IsOptional = rDesc.pDefArgFlags[i].bOptional;
+ pArgAry[j++] = aArgument;
}
pArray[4].Value <<= aArgSeq;
}
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index 78cd2b7f29b0..c7ffa95b37d8 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -170,7 +170,6 @@ ScOutputData::ScOutputData( OutputDevice* pNewDev, ScOutputType eNewType,
nEditCol( 0 ),
nEditRow( 0 ),
bMetaFile( false ),
- bSingleGrid( false ),
bPagebreakMode( false ),
bSolidBackground( false ),
mbUseStyleColor( false ),
@@ -420,7 +419,7 @@ void ScOutputData::DrawGrid(vcl::RenderContext& rRenderContext, bool bGrid, bool
bool bDraw = bGrid || nBreakOld != ScBreakType::NONE; // simple grid only if set that way
sal_uInt16 nWidthXplus2 = pRowInfo[0].pCellInfo[nXplus2].nWidth;
- bSingle = bSingleGrid; //! get into Fillinfo !!!!!
+ bSingle = false; //! get into Fillinfo !!!!!
if ( nX<MAXCOL && !bSingle )
{
bSingle = ( nWidthXplus2 == 0 );