[Libreoffice-commits] .: codemaker/source filter/source sc/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Oct 26 04:41:58 PDT 2012
codemaker/source/cppumaker/cppuoptions.cxx | 51 ++++++++++++++++++-----------
filter/source/t602/t602filter.cxx | 20 +++++------
sc/source/filter/excel/excdoc.cxx | 1
3 files changed, 41 insertions(+), 31 deletions(-)
New commits:
commit fe347327a44f2d8ed201f9fbc2ae4858f34962d8
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Oct 26 12:41:27 2012 +0100
loplugin: unused aName string and whacky indent
Change-Id: I3febbc1618ca86f19c851a8eea313327a9c0a96c
diff --git a/codemaker/source/cppumaker/cppuoptions.cxx b/codemaker/source/cppumaker/cppuoptions.cxx
index bebcb65..10b1d0c 100644
--- a/codemaker/source/cppumaker/cppuoptions.cxx
+++ b/codemaker/source/cppumaker/cppuoptions.cxx
@@ -55,7 +55,8 @@ sal_Bool CppuOptions::initOptions(int ac, char* av[], sal_Bool bCmdFile)
}
i = 1;
- } else
+ }
+ else
{
i = 0;
}
@@ -74,7 +75,8 @@ sal_Bool CppuOptions::initOptions(int ac, char* av[], sal_Bool bCmdFile)
{
i++;
s = av[i];
- } else
+ }
+ else
{
OString tmp("'-O', please check");
if (i <= ac - 1)
@@ -84,7 +86,8 @@ sal_Bool CppuOptions::initOptions(int ac, char* av[], sal_Bool bCmdFile)
throw IllegalArgument(tmp);
}
- } else
+ }
+ else
{
s = av[i] + 2;
}
@@ -98,7 +101,8 @@ sal_Bool CppuOptions::initOptions(int ac, char* av[], sal_Bool bCmdFile)
{
i++;
s = av[i];
- } else
+ }
+ else
{
OString tmp("'-B', please check");
if (i <= ac - 1)
@@ -108,7 +112,8 @@ sal_Bool CppuOptions::initOptions(int ac, char* av[], sal_Bool bCmdFile)
throw IllegalArgument(tmp);
}
- } else
+ }
+ else
{
s = av[i] + 2;
}
@@ -122,7 +127,8 @@ sal_Bool CppuOptions::initOptions(int ac, char* av[], sal_Bool bCmdFile)
{
i++;
s = av[i];
- } else
+ }
+ else
{
OString tmp("'-T', please check");
if (i <= ac - 1)
@@ -132,7 +138,8 @@ sal_Bool CppuOptions::initOptions(int ac, char* av[], sal_Bool bCmdFile)
throw IllegalArgument(tmp);
}
- } else
+ }
+ else
{
s = av[i] + 2;
}
@@ -142,7 +149,8 @@ sal_Bool CppuOptions::initOptions(int ac, char* av[], sal_Bool bCmdFile)
OString tmp(m_options["-T"]);
tmp = tmp + ";" + s;
m_options["-T"] = tmp;
- } else
+ }
+ else
{
m_options["-T"] = OString(s);
}
@@ -187,8 +195,8 @@ sal_Bool CppuOptions::initOptions(int ac, char* av[], sal_Bool bCmdFile)
}
m_options["-CS"] = OString("");
break;
- } else
- if (av[i][2] != '\0')
+ }
+ else if (av[i][2] != '\0')
{
OString tmp("'-C', please check");
if (i <= ac - 1)
@@ -222,8 +230,8 @@ sal_Bool CppuOptions::initOptions(int ac, char* av[], sal_Bool bCmdFile)
m_options["-Gc"] = OString("");
break;
- } else
- if (av[i][2] != '\0')
+ }
+ else if (av[i][2] != '\0')
{
OString tmp("'-G', please check");
if (i <= ac - 1)
@@ -244,7 +252,8 @@ sal_Bool CppuOptions::initOptions(int ac, char* av[], sal_Bool bCmdFile)
{
i++;
s = av[i];
- } else
+ }
+ else
{
OString tmp("'-X', please check");
if (i <= ac - 1)
@@ -254,7 +263,8 @@ sal_Bool CppuOptions::initOptions(int ac, char* av[], sal_Bool bCmdFile)
throw IllegalArgument(tmp);
}
- } else
+ }
+ else
{
s = av[i] + 2;
}
@@ -271,11 +281,12 @@ sal_Bool CppuOptions::initOptions(int ac, char* av[], sal_Bool bCmdFile)
if (av[i][0] == '@')
{
FILE* cmdFile = fopen(av[i]+1, "r");
- if( cmdFile == NULL )
- {
+ if( cmdFile == NULL )
+ {
fprintf(stderr, "%s", prepareHelp().getStr());
ret = sal_False;
- } else
+ }
+ else
{
int rargc=0;
char* rargv[512];
@@ -295,12 +306,14 @@ sal_Bool CppuOptions::initOptions(int ac, char* av[], sal_Bool bCmdFile)
free(rargv[j]);
}
}
- } else
+ }
+ else
{
if (bCmdFile)
{
m_inputFiles.push_back(av[i]);
- } else
+ }
+ else
{
OUString system_filepath;
if (osl_getCommandArg( i-1, &system_filepath.pData )
diff --git a/filter/source/t602/t602filter.cxx b/filter/source/t602/t602filter.cxx
index ed582a0..f60a778 100644
--- a/filter/source/t602/t602filter.cxx
+++ b/filter/source/t602/t602filter.cxx
@@ -535,19 +535,17 @@ void T602ImportFilter::wrtfnt()
void T602ImportFilter::setfnt(fonts fnt,bool mustwrite)
{
- if( fnt == fst.oldfnt &&
- fnt == fst.nowfnt &&
- !mustwrite )
+ if (fnt == fst.oldfnt && fnt == fst.nowfnt && !mustwrite)
fst.nowfnt = standard;
- else
- if (fnt != chngul) fst.nowfnt = fnt;
+ else if (fnt != chngul)
+ fst.nowfnt = fnt;
- if(mustwrite)
- if(fst.oldfnt != fst.nowfnt || fst.olduline != fst.uline) {
- wrtfnt();
- fst.oldfnt = fst.nowfnt;
- fst.olduline = fst.uline;
- }
+ if (mustwrite && (fst.oldfnt != fst.nowfnt || fst.olduline != fst.uline))
+ {
+ wrtfnt();
+ fst.oldfnt = fst.nowfnt;
+ fst.olduline = fst.uline;
+ }
}
unsigned char T602ImportFilter::Readchar602()
diff --git a/sc/source/filter/excel/excdoc.cxx b/sc/source/filter/excel/excdoc.cxx
index b25e4dc..4eae1ad 100644
--- a/sc/source/filter/excel/excdoc.cxx
+++ b/sc/source/filter/excel/excdoc.cxx
@@ -245,7 +245,6 @@ void ExcTable::FillAsHeader( ExcBoundsheetList& rBoundsheetList )
Add( new XclExpUInt16Record( EXC_ID_FNGROUPCOUNT, 14 ) );
// erst Namen- und Tabellen-Eintraege aufbauen
- String aName;
for( nC = 0 ; nC < nScTabCount ; nC++ )
if( rTabInfo.IsExportTab( nC ) )
More information about the Libreoffice-commits
mailing list