Skip to content

Commit 113d5d7

Browse files
committed
Merge remote-tracking branch 'upstream/master' into reworkPostOpenACtion
* upstream/master: Fix Some Codacy Code Convention Issues (#4904) Bump ridl from 6.2.2 to 6.2.3 (#4903) Bump juh from 6.2.2 to 6.2.3 (#4902) Bump jurt from 6.2.2 to 6.2.3 (#4901) Bump unoil from 6.2.2 to 6.2.3 (#4900) Bump richtextfx from 0.9.3 to 0.10.0 (#4899) Store column widths as integer (#4896)
2 parents 9b7b764 + 1c11575 commit 113d5d7

File tree

6 files changed

+34
-38
lines changed

6 files changed

+34
-38
lines changed

build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,10 @@ dependencies {
101101

102102
compile 'commons-cli:commons-cli:1.4'
103103

104-
compile "org.libreoffice:juh:6.2.2"
105-
compile "org.libreoffice:jurt:6.2.2"
106-
compile "org.libreoffice:ridl:6.2.2"
107-
compile "org.libreoffice:unoil:6.2.2"
104+
compile "org.libreoffice:juh:6.2.3"
105+
compile "org.libreoffice:jurt:6.2.3"
106+
compile "org.libreoffice:ridl:6.2.3"
107+
compile "org.libreoffice:unoil:6.2.3"
108108

109109
compile 'io.github.java-diff-utils:java-diff-utils:4.0'
110110
compile 'info.debatty:java-string-similarity:1.2.1'
@@ -130,7 +130,7 @@ dependencies {
130130
compile 'de.saxsys:mvvmfx:1.8.0'
131131
compile 'org.fxmisc.easybind:easybind:1.0.3'
132132
compile 'org.fxmisc.flowless:flowless:0.6.1'
133-
compile 'org.fxmisc.richtext:richtextfx:0.9.3'
133+
compile 'org.fxmisc.richtext:richtextfx:0.10.0'
134134
compile 'com.sibvisions.external.jvxfx:dndtabpane:0.1'
135135
compile 'javax.inject:javax.inject:1'
136136
compile 'com.jfoenix:jfoenix:8.0.8'

src/main/java/org/jabref/gui/libraryproperties/LibraryPropertiesDialogView.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ private void initialize() {
7272

7373
generalFileDirectory.textProperty().bindBidirectional(viewModel.generalFileDirectoryPropertyProperty());
7474
userSpecificFileDirectory.textProperty().bindBidirectional(viewModel.userSpecificFileDirectoryProperty());
75-
laTexFileDirectory.textProperty().bindBidirectional(viewModel.LaTexFileDirectoryProperty());
75+
laTexFileDirectory.textProperty().bindBidirectional(viewModel.laTexFileDirectoryProperty());
7676

7777
encoding.itemsProperty().bind(viewModel.encodingsProperty());
7878
encoding.valueProperty().bindBidirectional(viewModel.selectedEncodingProperty());
@@ -142,7 +142,7 @@ private void storeSettings() {
142142
metaData.setUserFileDirectory(preferencesService.getUser(), text);
143143
}
144144

145-
text = viewModel.LaTexFileDirectoryProperty().getValue();
145+
text = viewModel.laTexFileDirectoryProperty().getValue();
146146
if (text.isEmpty()) {
147147
metaData.clearLaTexFileDirectory(preferencesService.getUser());
148148
} else {
@@ -180,7 +180,7 @@ private void storeSettings() {
180180

181181
boolean changed = saveOrderConfigChanged || encodingChanged
182182
|| viewModel.generalFileDirChanged() || viewModel.userFileDirChanged()
183-
|| viewModel.protectedValueChanged() || saveActionsChanged || viewModel.LaTexFileDirChanged();
183+
|| viewModel.protectedValueChanged() || saveActionsChanged || viewModel.laTexFileDirChanged();
184184
// ... if so, mark base changed. Prevent the Undo button from removing
185185
// change marking:
186186
if (changed) {

src/main/java/org/jabref/gui/libraryproperties/LibraryPropertiesDialogViewModel.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public StringProperty userSpecificFileDirectoryProperty() {
8080
return this.userSpecificFileDirectoryProperty;
8181
}
8282

83-
public StringProperty LaTexFileDirectoryProperty() {
83+
public StringProperty laTexFileDirectoryProperty() {
8484
return this.laTexFileDirectoryProperty;
8585
}
8686

@@ -116,7 +116,7 @@ public boolean userFileDirChanged() {
116116
return !oldUserSpecificFileDir.equals(userSpecificFileDirectoryProperty.getValue());
117117
}
118118

119-
public boolean LaTexFileDirChanged() {
119+
public boolean laTexFileDirChanged() {
120120
return !oldLaTexFileDir.equals(laTexFileDirectoryProperty.getValue());
121121
}
122122

src/main/java/org/jabref/gui/maintable/PersistenceVisualStateTable.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,12 @@ private void updateColumnPreferences() {
6161
NormalTableColumn normalColumn = (NormalTableColumn) column;
6262

6363
columnNames.add(normalColumn.getColumnName());
64-
columnsWidths.add(String.valueOf(normalColumn.getWidth()));
64+
columnsWidths.add(String.valueOf(Double.valueOf(normalColumn.getWidth()).intValue()));
6565
}
6666
}
6767

68-
if (columnNames.size() == columnsWidths.size() &&
69-
columnNames.size() == preferences.getStringList(JabRefPreferences.COLUMN_NAMES).size()) {
68+
if ((columnNames.size() == columnsWidths.size()) &&
69+
(columnNames.size() == preferences.getStringList(JabRefPreferences.COLUMN_NAMES).size())) {
7070
preferences.putStringList(JabRefPreferences.COLUMN_NAMES, columnNames);
7171
preferences.putStringList(JabRefPreferences.COLUMN_WIDTHS, columnsWidths);
7272
}

src/main/java/org/jabref/gui/preferences/TableColumnsTab.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ public void storeSettings() {
502502

503503
for (TableRow tr : data) {
504504
names.add(tr.getName().toLowerCase(Locale.ROOT));
505-
widths.add(String.valueOf(tr.getLength()));
505+
widths.add(String.valueOf(Double.valueOf(tr.getLength()).intValue()));
506506
}
507507

508508
// Finally, we store the new preferences.
@@ -522,14 +522,14 @@ private void updateOrderAction() {
522522
final HashMap<String, Integer> map = new HashMap<>();
523523

524524
// first element (#) not inside data
525-
/*
526-
for (TableColumn<BibEntry, ?> column : panel.getMainTable().getColumns()) {
527-
String name = column.getText();
528-
if ((name != null) && !name.isEmpty()) {
529-
map.put(name.toLowerCase(Locale.ROOT), i);
530-
}
525+
/*
526+
for (TableColumn<BibEntry, ?> column : panel.getMainTable().getColumns()) {
527+
String name = column.getText();
528+
if ((name != null) && !name.isEmpty()) {
529+
map.put(name.toLowerCase(Locale.ROOT), i);
531530
}
532-
*/
531+
}
532+
*/
533533
data.sort((o1, o2) -> {
534534
Integer n1 = map.get(o1.getName());
535535
Integer n2 = map.get(o2.getName());

src/main/java/org/jabref/logic/auxparser/DefaultAuxParser.java

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,13 @@
2424
/**
2525
* LaTeX Aux to BibTeX Parser
2626
* <p>
27-
* Extracts a subset of BibTeX entries from a BibDatabase that are included in an AUX file.
28-
* Also supports nested AUX files (latex \\include).
27+
* Extracts a subset of BibTeX entries from a BibDatabase that are included in an AUX file. Also supports nested AUX
28+
* files (latex \\include).
2929
*
30-
* There exists no specification of the AUX file.
31-
* Every package, class or document can write to the AUX file.
32-
* The AUX file consists of LaTeX macros and is read at the \begin{document} and again at the \end{document}.
30+
* There exists no specification of the AUX file. Every package, class or document can write to the AUX file. The AUX
31+
* file consists of LaTeX macros and is read at the \begin{document} and again at the \end{document}.
3332
*
34-
* BibTeX citation: \citation{x,y,z}
35-
* Biblatex citation: \abx@aux@cite{x,y,z}
36-
* Nested AUX files: \@input{x}
33+
* BibTeX citation: \citation{x,y,z} Biblatex citation: \abx@aux@cite{x,y,z} Nested AUX files: \@input{x}
3734
*/
3835
public class DefaultAuxParser implements AuxParser {
3936
private static final Logger LOGGER = LoggerFactory.getLogger(DefaultAuxParser.class);
@@ -128,15 +125,14 @@ private void matchCitation(AuxParserResult result, String line) {
128125
*/
129126
private void resolveTags(AuxParserResult result) {
130127
for (String key : result.getUniqueKeys()) {
131-
Optional<BibEntry> entry = masterDatabase.getEntryByKey(key);
132-
133-
if (result.getGeneratedBibDatabase().getEntryByKey(key).isPresent()) {
134-
// do nothing, key has already been processed
135-
} else if (entry.isPresent()) {
136-
insertEntry(entry.get(), result);
137-
resolveCrossReferences(entry.get(), result);
138-
} else {
139-
result.getUnresolvedKeys().add(key);
128+
if (!result.getGeneratedBibDatabase().getEntryByKey(key).isPresent()) {
129+
Optional<BibEntry> entry = masterDatabase.getEntryByKey(key);
130+
if (entry.isPresent()) {
131+
insertEntry(entry.get(), result);
132+
resolveCrossReferences(entry.get(), result);
133+
} else {
134+
result.getUnresolvedKeys().add(key);
135+
}
140136
}
141137
}
142138

0 commit comments

Comments
 (0)