Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
973eb2f6
Kaydet (Commit)
973eb2f6
authored
Eki 15, 2014
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
java: reduce the depth of some deeply nested if blocks
Change-Id: I3c0c7f08d4d8ea594e72fc0d9b93d085d4ab4bf5
üst
fa652cdd
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
69 additions
and
66 deletions
+69
-66
InterfaceContainer.java
...elper/com/sun/star/lib/uno/helper/InterfaceContainer.java
+14
-9
JavaLoader.java
jurt/com/sun/star/comp/loader/JavaLoader.java
+3
-3
NativeLibraryLoader.java
jurt/com/sun/star/lib/util/NativeLibraryLoader.java
+3
-2
InstallationFinder.java
odk/source/com/sun/star/lib/loader/InstallationFinder.java
+11
-6
TestParameters.java
qadevOOo/runner/lib/TestParameters.java
+5
-4
ChartRawReportTarget.java
...ice/report/pentaho/output/chart/ChartRawReportTarget.java
+3
-3
Helper.java
swext/mediawiki/src/com/sun/star/wiki/Helper.java
+4
-4
AccessibilityTree.java
toolkit/test/accessibility/AccessibilityTree.java
+6
-6
AccessibleCellHandler.java
toolkit/test/accessibility/AccessibleCellHandler.java
+3
-4
AccessibleSelectionHandler.java
toolkit/test/accessibility/AccessibleSelectionHandler.java
+7
-8
CommandName.java
wizards/com/sun/star/wizards/db/CommandName.java
+3
-3
Record.java
...rge/java/org/openoffice/xmerge/converter/palm/Record.java
+7
-14
No files found.
javaunohelper/com/sun/star/lib/uno/helper/InterfaceContainer.java
Dosyayı görüntüle @
973eb2f6
...
...
@@ -352,9 +352,12 @@ public class InterfaceContainer implements Cloneable
*/
synchronized
public
int
indexOf
(
Object
elem
)
{
if
(
elementData
==
null
||
elem
==
null
)
{
return
-
1
;
}
int
index
=
-
1
;
if
(
elementData
!=
null
&&
elem
!=
null
)
{
for
(
int
i
=
0
;
i
<
size
;
i
++)
{
if
(
elem
==
elementData
[
i
])
...
...
@@ -375,7 +378,6 @@ public class InterfaceContainer implements Cloneable
}
}
}
}
return
index
;
}
/**
...
...
@@ -408,9 +410,12 @@ public class InterfaceContainer implements Cloneable
*/
synchronized
public
int
lastIndexOf
(
Object
elem
)
{
if
(
elementData
==
null
||
elem
==
null
)
{
return
-
1
;
}
int
index
=
-
1
;
if
(
elementData
!=
null
&&
elem
!=
null
)
{
for
(
int
i
=
size
-
1
;
i
>=
0
;
i
--)
{
if
(
elem
==
elementData
[
i
])
...
...
@@ -430,7 +435,6 @@ public class InterfaceContainer implements Cloneable
}
}
}
}
return
index
;
}
...
...
@@ -535,9 +539,11 @@ public class InterfaceContainer implements Cloneable
synchronized
public
boolean
retainAll
(
Collection
collection
)
{
if
(
elementData
==
null
||
collection
==
null
)
{
return
false
;
}
boolean
retVal
=
false
;
if
(
elementData
!=
null
&&
collection
!=
null
)
{
// iterate over data
Object
[]
arRetained
=
new
Object
[
size
];
int
indexRetained
=
0
;
...
...
@@ -581,7 +587,6 @@ public class InterfaceContainer implements Cloneable
elementData
=
arRetained
;
size
=
indexRetained
;
}
}
return
retVal
;
}
...
...
jurt/com/sun/star/comp/loader/JavaLoader.java
Dosyayı görüntüle @
973eb2f6
...
...
@@ -84,7 +84,9 @@ public class JavaLoader implements XImplementationLoader,
*/
private
String
expand_url
(
String
url
)
throws
RuntimeException
{
if
(
url
!=
null
&&
url
.
startsWith
(
EXPAND_PROTOCOL_PREFIX
))
{
if
(
url
==
null
||
!
url
.
startsWith
(
EXPAND_PROTOCOL_PREFIX
))
{
return
url
;
}
try
{
if
(
m_xMacroExpander
==
null
)
{
XPropertySet
xProps
=
...
...
@@ -126,8 +128,6 @@ public class JavaLoader implements XImplementationLoader,
exc
.
getMessage
(),
this
);
}
}
return
url
;
}
/**
* Default constructor.
...
...
jurt/com/sun/star/lib/util/NativeLibraryLoader.java
Dosyayı görüntüle @
973eb2f6
...
...
@@ -89,7 +89,9 @@ public final class NativeLibraryLoader {
// (scheme://auth/dir1/name). The second step is important in a typical
// OOo installation, where the JAR files are in the program/classes
// directory while the shared libraries are in the program directory.
if
(
loader
instanceof
URLClassLoader
)
{
if
(!(
loader
instanceof
URLClassLoader
))
{
return
null
;
}
URL
[]
urls
=
((
URLClassLoader
)
loader
).
getURLs
();
for
(
int
i
=
0
;
i
<
urls
.
length
;
++
i
)
{
File
path
=
UrlToFileMapper
.
mapUrlToFile
(
urls
[
i
]);
...
...
@@ -120,7 +122,6 @@ public final class NativeLibraryLoader {
}
}
}
}
return
null
;
}
...
...
odk/source/com/sun/star/lib/loader/InstallationFinder.java
Dosyayı görüntüle @
973eb2f6
...
...
@@ -80,11 +80,16 @@ final class InstallationFinder {
// com.sun.star.lib.loader.unopath
// (all platforms)
path
=
getPathFromProperty
(
SYSPROP_NAME
);
if
(
path
==
null
)
{
if
(
path
!=
null
)
{
return
path
;
}
// get the installation path from the UNO_PATH environment variable
// (all platforms, not working for Java 1.3.1 and Java 1.4)
path
=
getPathFromEnvVar
(
ENVVAR_NAME
);
if
(
path
==
null
)
{
if
(
path
!=
null
)
{
return
path
;
}
String
osname
=
null
;
try
{
osname
=
System
.
getProperty
(
"os.name"
);
...
...
@@ -93,7 +98,10 @@ final class InstallationFinder {
// return <code>null</code>
return
null
;
}
if
(
osname
!=
null
)
{
if
(
osname
==
null
)
{
return
null
;
}
if
(
osname
.
startsWith
(
"Windows"
)
)
{
// get the installation path from the Windows Registry
// (Windows platform only)
...
...
@@ -115,9 +123,6 @@ final class InstallationFinder {
}
}
}
}
}
}
return
path
;
}
...
...
qadevOOo/runner/lib/TestParameters.java
Dosyayı görüntüle @
973eb2f6
...
...
@@ -76,8 +76,10 @@ public class TestParameters extends HashMap<String,Object> {
* @return The value of this key, cast to a boolean type.
*/
public
boolean
getBool
(
Object
key
)
{
Object
val
=
super
.
get
(
key
);
if
(
val
!=
null
)
{
final
Object
val
=
super
.
get
(
key
);
if
(
val
==
null
)
{
return
false
;
}
if
(
val
instanceof
String
)
{
String
sVal
=
(
String
)
val
;
if
(
sVal
.
equalsIgnoreCase
(
"true"
)
||
...
...
@@ -89,9 +91,8 @@ public class TestParameters extends HashMap<String,Object> {
return
false
;
}
}
if
(
val
instanceof
Boolean
)
else
if
(
val
instanceof
Boolean
)
return
((
Boolean
)
val
).
booleanValue
();
}
return
false
;
}
...
...
reportbuilder/java/org/libreoffice/report/pentaho/output/chart/ChartRawReportTarget.java
Dosyayı görüntüle @
973eb2f6
...
...
@@ -143,8 +143,9 @@ public class ChartRawReportTarget extends OfficeDocumentReportTarget
return
;
}
final
String
namespace
=
ReportTargetUtil
.
getNamespaceFromAttribute
(
attrs
);
if
(!
isFilteredNamespace
(
namespace
))
{
if
(
isFilteredNamespace
(
namespace
))
return
;
final
String
elementType
=
ReportTargetUtil
.
getElemenTypeFromAttribute
(
attrs
);
// if this is the report namespace, write out a table definition ..
if
(
OfficeNamespaces
.
TABLE_NS
.
equals
(
namespace
))
...
...
@@ -174,7 +175,6 @@ public class ChartRawReportTarget extends OfficeDocumentReportTarget
xmlWriter
.
writeCloseTag
();
--
closeTags
;
}
}
@Override
public
void
processContent
(
final
DataFlags
value
)
...
...
swext/mediawiki/src/com/sun/star/wiki/Helper.java
Dosyayı görüntüle @
973eb2f6
...
...
@@ -331,10 +331,11 @@ public class Helper
//scrape the HTML source and find the EditURL
// TODO/LATER: Use parser in future
String
sResultURL
=
""
;
int
nInd
=
sWebPage
.
indexOf
(
"http-equiv=\"refresh\""
);
if
(
nInd
!=
-
1
)
{
if
(
nInd
==
-
1
)
return
""
;
String
sResultURL
=
""
;
int
nContent
=
sWebPage
.
indexOf
(
"content="
,
nInd
);
if
(
nContent
>
0
)
{
...
...
@@ -363,7 +364,6 @@ public class Helper
{
ex
.
printStackTrace
();
}
}
return
sResultURL
;
...
...
toolkit/test/accessibility/AccessibilityTree.java
Dosyayı görüntüle @
973eb2f6
...
...
@@ -243,11 +243,13 @@ public class AccessibilityTree
public
boolean
popupTrigger
(
MouseEvent
e
)
{
boolean
bIsPopup
=
e
.
isPopupTrigger
();
if
(
bIsPopup
)
{
if
(
!
bIsPopup
)
return
false
;
int
selRow
=
maTree
.
getComponent
().
getRowForLocation
(
e
.
getX
(),
e
.
getY
());
if
(
selRow
!=
-
1
)
{
if
(
selRow
==
-
1
)
return
bIsPopup
;
TreePath
aPath
=
maTree
.
getComponent
().
getPathForLocation
(
e
.
getX
(),
e
.
getY
());
// check for actions
...
...
@@ -288,8 +290,6 @@ public class AccessibilityTree
if
(
aMenu
!=
null
)
aMenu
.
show
(
maTree
.
getComponent
(),
e
.
getX
(),
e
.
getY
());
}
}
return
bIsPopup
;
}
...
...
toolkit/test/accessibility/AccessibleCellHandler.java
Dosyayı görüntüle @
973eb2f6
...
...
@@ -27,9 +27,10 @@ class AccessibleCellHandler extends NodeHandler
@Override
public
NodeHandler
createHandler
(
XAccessibleContext
xContext
)
{
if
(
xContext
==
null
)
return
null
;
AccessibleCellHandler
aCellHandler
=
null
;
if
(
xContext
!=
null
)
{
XAccessible
xParent
=
xContext
.
getAccessibleParent
();
if
(
xParent
!=
null
)
{
...
...
@@ -39,9 +40,7 @@ class AccessibleCellHandler extends NodeHandler
if
(
xTable
!=
null
)
aCellHandler
=
new
AccessibleCellHandler
(
xTable
);
}
}
return
aCellHandler
;
}
public
AccessibleCellHandler
()
...
...
toolkit/test/accessibility/AccessibleSelectionHandler.java
Dosyayı görüntüle @
973eb2f6
...
...
@@ -51,14 +51,15 @@ class AccessibleSelectionHandler
public
AccessibleTreeNode
createChild
(
AccessibleTreeNode
aParent
,
int
nIndex
)
{
if
(
!(
aParent
instanceof
AccTreeNode
)
)
return
null
;
XAccessibleSelection
xSelection
=
((
AccTreeNode
)
aParent
).
getSelection
();
if
(
xSelection
==
null
)
return
null
;
AccessibleTreeNode
aChild
=
null
;
if
(
aParent
instanceof
AccTreeNode
)
{
XAccessibleSelection
xSelection
=
((
AccTreeNode
)
aParent
).
getSelection
();
if
(
xSelection
!=
null
)
{
switch
(
nIndex
)
{
case
0
:
...
...
@@ -115,8 +116,6 @@ class AccessibleSelectionHandler
aChild
=
new
StringNode
(
"ERROR"
,
aParent
);
break
;
}
}
}
return
aChild
;
}
...
...
wizards/com/sun/star/wizards/db/CommandName.java
Dosyayı görüntüle @
973eb2f6
...
...
@@ -82,8 +82,9 @@ public class CommandName
{
try
{
if
(
this
.
setMetaDataAttributes
())
{
if
(!
setMetaDataAttributes
())
return
;
this
.
DisplayName
=
_DisplayName
;
int
iIndex
;
if
(
oCommandMetaData
.
xDBMetaData
.
supportsCatalogsInDataManipulation
())
...
...
@@ -124,7 +125,6 @@ public class CommandName
}
setComposedCommandName
();
}
}
catch
(
Exception
exception
)
{
exception
.
printStackTrace
(
System
.
err
);
...
...
xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/Record.java
Dosyayı görüntüle @
973eb2f6
...
...
@@ -151,28 +151,20 @@ public final class Record {
*/
@Override
public
boolean
equals
(
Object
obj
)
{
boolean
bool
=
false
;
if
(
obj
instanceof
Record
)
{
if
(!(
obj
instanceof
Record
))
{
return
false
;
}
Record
rec
=
(
Record
)
obj
;
checkLabel:
{
if
(
rec
.
getAttributes
()
!=
attributes
)
{
break
checkLabel
;
return
false
;
}
if
(
rec
.
getSize
()
==
data
.
length
)
{
for
(
int
i
=
0
;
i
<
data
.
length
;
i
++)
{
if
(
data
[
i
]
!=
rec
.
data
[
i
])
{
break
checkLabel
;
}
}
bool
=
true
;
return
false
;
}
}
}
return
bool
;
return
false
;
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment