Skip to content

Commit e9b9239

Browse files
jbamptonPilot-Pirx
authored andcommitted
pre-commit auto whitespace cleanup for cs files (#478) (#480)
Enforced 3 hooks for cs files: - end-of-file-fixer - mixed-line-ending - trailing-whitespace (cherry picked from commit 0197933)
1 parent 196803c commit e9b9239

28 files changed

+308
-320
lines changed

main/cli_ure/qa/climaker/climaker.cs

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
/**************************************************************
2-
*
2+
*
33
* Licensed to the Apache Software Foundation (ASF) under one
44
* or more contributor license agreements. See the NOTICE file
55
* distributed with this work for additional information
66
* regarding copyright ownership. The ASF licenses this file
77
* to you under the Apache License, Version 2.0 (the
88
* "License"); you may not use this file except in compliance
99
* with the License. You may obtain a copy of the License at
10-
*
10+
*
1111
* http://www.apache.org/licenses/LICENSE-2.0
12-
*
12+
*
1313
* Unless required by applicable law or agreed to in writing,
1414
* software distributed under the License is distributed on an
1515
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
1616
* KIND, either express or implied. See the License for the
1717
* specific language governing permissions and limitations
1818
* under the License.
19-
*
19+
*
2020
*************************************************************/
2121

2222

@@ -42,13 +42,13 @@ public enum test_kind {
4242
TEST_EXCEPTION,
4343
CREATION_FAILED
4444
}
45-
45+
4646
public Context(test_kind k, params object[] args)
4747
{
4848
kind = k;
4949
factory = new Factory(k, args);
5050
}
51-
51+
5252
public ucss.lang.XMultiComponentFactory getServiceManager()
5353
{
5454
if (kind == test_kind.NO_FACTORY)
@@ -130,7 +130,7 @@ public class Logger
130130
int m_nErrors;
131131
public Logger() {
132132
}
133-
133+
134134
public String Function
135135
{
136136
set
@@ -142,7 +142,7 @@ public String Function
142142
return m_sFunction;
143143
}
144144
}
145-
145+
146146
public void assure(bool b) {
147147
if (b == false)
148148
{
@@ -154,7 +154,7 @@ public void assure(bool b) {
154154
public void printStatus() {
155155
Console.WriteLine("\n=====================================");
156156

157-
157+
158158
String msg;
159159
if (m_nErrors > 0)
160160
msg = "Test failed! " + m_nErrors.ToString() + " Errors.";
@@ -177,7 +177,7 @@ public sealed class Test
177177
{
178178
public static int Main(String[] args)
179179
{
180-
180+
181181
// System.Diagnostics.Debugger.Launch();
182182
try
183183
{
@@ -327,7 +327,7 @@ public void testEmptyStruct2(Logger l) {
327327
l.assure(s.at17.Length == 0);
328328
l.assure(s.at18.Length == 0);
329329
}
330-
330+
331331
public void testFullStruct2(Logger l) {
332332
//TODO:
333333
Struct2 s = new Struct2(
@@ -463,10 +463,10 @@ public void testS1(Logger l) {
463463
new ucss.uno.DeploymentException("DeploymentException", obj);
464464
ucss.lang.InvalidListenerException excInvalidListener =
465465
new ucss.lang.InvalidListenerException("ListenerException", obj);
466-
466+
467467
/* create1 does not specify exceptions. Therefore RuntimeExceptions
468468
fly through and other exceptions cause a DeploymentException.
469-
*/
469+
*/
470470
try {
471471
S1.create1(new Context(Context.test_kind.TEST_EXCEPTION, excRuntime));
472472
} catch (ucss.uno.RuntimeException e) {
@@ -476,7 +476,7 @@ fly through and other exceptions cause a DeploymentException.
476476
l.assure(false);
477477
}
478478

479-
Context c = new Context(Context.test_kind.TEST_EXCEPTION, excException);
479+
Context c = new Context(Context.test_kind.TEST_EXCEPTION, excException);
480480
try {
481481
S1.create1(c);
482482
} catch (ucss.uno.DeploymentException e) {
@@ -808,7 +808,7 @@ exceptions cause a DeploymentException.
808808
//test
809809
c = new Context(Context.test_kind.NORMAL);
810810
try {
811-
811+
812812
PolyStruct2 arg1 = new PolyStruct2(typeof(PolyStruct2), 1);
813813
PolyStruct2 arg2 = new PolyStruct2(new Any(true), 1);
814814
PolyStruct2 arg3 = new PolyStruct2(true, 1);
@@ -1008,12 +1008,12 @@ exceptions cause a DeploymentException.
10081008
l.assure( sType == "unoidl.test.cliure.climaker.PolyStruct<" +
10091009
"unoidl.test.cliure.climaker.PolyStruct<System.Char,uno.Any>," +
10101010
"unoidl.test.cliure.climaker.PolyStruct2<System.Char>>[][]");
1011-
1012-
1013-
1014-
1015-
}
1016-
catch (Exception)
1011+
1012+
1013+
1014+
1015+
}
1016+
catch (Exception)
10171017
{
10181018
l.assure(false);
10191019
}
@@ -1070,7 +1070,7 @@ void testAttributes(Logger l)
10701070
}
10711071
else
10721072
l.assure(false);
1073-
1073+
10741074
//function test must not have the oneway attribute and Exception attribute
10751075
arAttr = typeXTest.GetMethod("test").GetCustomAttributes(false);
10761076
l.assure(arAttr.Length == 0);
@@ -1169,8 +1169,8 @@ void testPolyStructAttributes(Logger l)
11691169
else
11701170
l.assure(false);
11711171

1172-
1173-
//test instantiated polymorphic struct: return value
1172+
1173+
//test instantiated polymorphic struct: return value
11741174
// Type typeXTest = typeof(XTest);
11751175
// arAttr = typeXTest.GetMethod("testPolyStruct").ReturnTypeCustomAttributes.GetCustomAttributes(false);
11761176
// if (arAttr.Length == 1)
@@ -1201,7 +1201,7 @@ void testPolymorphicType(Logger l)
12011201
l.assure(t1 == t2);
12021202
l.assure(t1.PolymorphicName == name);
12031203
l.assure(t1.OriginalType == typeof(unoidl.test.cliure.climaker.PolyStruct));
1204-
1204+
12051205
}
12061206

12071207
void testInterface(Logger l)
@@ -1229,7 +1229,7 @@ void testInterface(Logger l)
12291229
object aXInterface = new object();
12301230
ucss.lang.XComponent aXComponent = (ucss.lang.XComponent) obj;
12311231
bool[] aSeqBool = {true, false, true};
1232-
1232+
12331233
obj.inParameters(aBool, aByte, aShort, aUShort,
12341234
aInt, aUInt, aLong, aULong,
12351235
aFloat, aDouble, aChar, aString,
@@ -1308,7 +1308,7 @@ void testInterface(Logger l)
13081308
ref inoutFloat, ref inoutDouble, ref inoutChar, ref inoutString,
13091309
ref inoutType, ref inoutAny, ref inoutEnum2, ref inoutStruct1,
13101310
ref inoutXInterface, ref inoutXComponent, ref inoutSeqBool);
1311-
1311+
13121312
l.assure(aBool == inoutBool);
13131313
l.assure(aByte == inoutByte);
13141314
l.assure(aShort == inoutShort);
@@ -1425,7 +1425,7 @@ public void testAny(Logger l)
14251425
{
14261426
l.assure(e.Message.IndexOf("Any") != -1);
14271427
}
1428-
1428+
14291429

14301430
try
14311431
{

main/cli_ure/qa/climaker/testobjects.cs

Lines changed: 25 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
/**************************************************************
2-
*
2+
*
33
* Licensed to the Apache Software Foundation (ASF) under one
44
* or more contributor license agreements. See the NOTICE file
55
* distributed with this work for additional information
66
* regarding copyright ownership. The ASF licenses this file
77
* to you under the Apache License, Version 2.0 (the
88
* "License"); you may not use this file except in compliance
99
* with the License. You may obtain a copy of the License at
10-
*
10+
*
1111
* http://www.apache.org/licenses/LICENSE-2.0
12-
*
12+
*
1313
* Unless required by applicable law or agreed to in writing,
1414
* software distributed under the License is distributed on an
1515
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
1616
* KIND, either express or implied. See the License for the
1717
* specific language governing permissions and limitations
1818
* under the License.
19-
*
19+
*
2020
*************************************************************/
2121

2222

@@ -50,9 +50,9 @@ public Component(ucss.uno.XComponentContext ctx, uno.Any[] args) {
5050
m_args[i+1] = args[i];
5151
}
5252
}
53-
53+
5454
public Any[] Args {
55-
get
55+
get
5656
{
5757
return m_args;
5858
}
@@ -171,7 +171,7 @@ public void outParameters(out bool aBool, out byte aByte,
171171
aXInterface = m_XInterface;
172172
aXComponent = m_XComponent;
173173
seqBool = m_seqBool;
174-
174+
175175
}
176176

177177
//returns the values which have been set in a previous call
@@ -195,7 +195,7 @@ public void inoutParameters(ref bool aBool, ref byte aByte,
195195
byte _byte = aByte;
196196
aByte = m_Byte;
197197
m_Byte = _byte;
198-
198+
199199
short _short = aShort;
200200
aShort = m_Short;
201201
m_Short = _short;
@@ -211,23 +211,23 @@ public void inoutParameters(ref bool aBool, ref byte aByte,
211211
uint _uint = aUInt;
212212
aUInt = m_UInt;
213213
m_UInt = _uint;
214-
214+
215215
long _long = aLong;
216216
aLong = m_Long;
217217
m_Long = _long;
218218

219219
ulong _ulong = aULong;
220220
aULong = m_ULong;
221221
m_ULong = _ulong;
222-
222+
223223
float _f = aFloat;
224224
aFloat = m_Float;
225225
m_Float = _f;
226226

227227
double _d = aDouble;
228228
aDouble = m_Double;
229229
m_Double = _d;
230-
230+
231231
char _char = aChar;
232232
aChar = m_Char;
233233
m_Char = _char;
@@ -251,7 +251,7 @@ public void inoutParameters(ref bool aBool, ref byte aByte,
251251
Struct1 _struct1 = aStruct;
252252
aStruct = m_Struct1;
253253
m_Struct1 = _struct1;
254-
254+
255255
object _obj = aXInterface;
256256
aXInterface = m_XInterface;
257257
m_XInterface = _obj;
@@ -269,7 +269,7 @@ public bool retBoolean()
269269
{
270270
return m_Bool;
271271
}
272-
272+
273273
public byte retByte()
274274
{
275275
return m_Byte;
@@ -279,22 +279,22 @@ public short retShort()
279279
{
280280
return m_Short;
281281
}
282-
282+
283283
public ushort retUShort()
284284
{
285285
return m_UShort;
286286
}
287-
287+
288288
public int retLong()
289289
{
290290
return m_Int;
291291
}
292-
292+
293293
public uint retULong()
294294
{
295295
return m_UInt;
296296
}
297-
297+
298298
public long retHyper()
299299
{
300300
return m_Long;
@@ -309,27 +309,27 @@ public float retFloat()
309309
{
310310
return m_Float;
311311
}
312-
312+
313313
public double retDouble()
314314
{
315315
return m_Double;
316316
}
317-
317+
318318
public char retChar()
319319
{
320320
return m_Char;
321321
}
322-
322+
323323
public string retString()
324324
{
325325
return m_String;
326326
}
327-
327+
328328
public Type retType()
329329
{
330330
return m_Type;
331331
}
332-
332+
333333
public uno.Any retAny()
334334
{
335335
return m_Any;
@@ -343,7 +343,7 @@ public Struct1 retStruct1()
343343
{
344344
return m_Struct1;
345345
}
346-
346+
347347
public object retXInterface()
348348
{
349349
return m_XInterface;
@@ -549,7 +549,7 @@ public bool[] attrSeqBoolean
549549
}
550550
}
551551

552-
552+
553553

554554

555555

@@ -578,7 +578,5 @@ public bool[] attrSeqBoolean
578578
object m_XInterface;
579579
unoidl.com.sun.star.lang.XComponent m_XComponent;
580580
bool[] m_seqBool;
581-
582-
}
583-
584581

582+
}

0 commit comments

Comments
 (0)