mirror of
https://github.com/frosch95/SmartCSV.fx.git
synced 2026-04-11 13:38:23 +02:00
set "\n" as default end of line
This commit is contained in:
@@ -66,8 +66,6 @@ public class PreferencesController extends FXMLController {
|
|||||||
@FXML
|
@FXML
|
||||||
private ComboBox<String> quoteMode;
|
private ComboBox<String> quoteMode;
|
||||||
|
|
||||||
private String endOfLineSymbols;
|
|
||||||
|
|
||||||
private BooleanProperty valid = new SimpleBooleanProperty(true);
|
private BooleanProperty valid = new SimpleBooleanProperty(true);
|
||||||
|
|
||||||
|
|
||||||
@@ -106,11 +104,10 @@ public class PreferencesController extends FXMLController {
|
|||||||
surroundingSpacesNeedQuotes.setSelected(csvPreference.isSurroundingSpacesNeedQuotes());
|
surroundingSpacesNeedQuotes.setSelected(csvPreference.isSurroundingSpacesNeedQuotes());
|
||||||
ignoreEmptyLines.setSelected(csvPreference.isIgnoreEmptyLines());
|
ignoreEmptyLines.setSelected(csvPreference.isIgnoreEmptyLines());
|
||||||
quoteMode.getSelectionModel().select(getQuoteModeName(csvPreference.getQuoteMode()));
|
quoteMode.getSelectionModel().select(getQuoteModeName(csvPreference.getQuoteMode()));
|
||||||
endOfLineSymbols = csvPreference.getEndOfLineSymbols();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public CsvPreference getCsvPreference() {
|
public CsvPreference getCsvPreference() {
|
||||||
return new CsvPreference.Builder(quoteChar.getText().charAt(0), delimiterChar.getText().charAt(0), endOfLineSymbols)
|
return new CsvPreference.Builder(quoteChar.getText().charAt(0), delimiterChar.getText().charAt(0), "\n")
|
||||||
.useQuoteMode(getQuoteMode(quoteMode.getSelectionModel().getSelectedItem()))
|
.useQuoteMode(getQuoteMode(quoteMode.getSelectionModel().getSelectedItem()))
|
||||||
.surroundingSpacesNeedQuotes(surroundingSpacesNeedQuotes.isSelected())
|
.surroundingSpacesNeedQuotes(surroundingSpacesNeedQuotes.isSelected())
|
||||||
.ignoreEmptyLines(ignoreEmptyLines.isSelected())
|
.ignoreEmptyLines(ignoreEmptyLines.isSelected())
|
||||||
|
|||||||
Reference in New Issue
Block a user