From 419d2a7e1e0f8e9caaf2d3355d040a7d62b4bd60 Mon Sep 17 00:00:00 2001 From: Subhramit Basu Bhowmick Date: Tue, 3 Sep 2024 23:51:33 +0530 Subject: [PATCH] Refactor magic string (#11700) --- .../jabref/logic/openoffice/oocsltext/CSLCitationOOAdapter.java | 2 +- .../org/jabref/logic/openoffice/oocsltext/CSLFormatUtils.java | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/jabref/logic/openoffice/oocsltext/CSLCitationOOAdapter.java b/src/main/java/org/jabref/logic/openoffice/oocsltext/CSLCitationOOAdapter.java index 0ae03cf03e3..9b529754431 100644 --- a/src/main/java/org/jabref/logic/openoffice/oocsltext/CSLCitationOOAdapter.java +++ b/src/main/java/org/jabref/logic/openoffice/oocsltext/CSLCitationOOAdapter.java @@ -148,7 +148,7 @@ public void insertBibliography(XTextCursor cursor, CitationStyle selectedStyle, OOText title = OOFormat.paragraph(OOText.fromString(CSLFormatUtils.DEFAULT_BIBLIOGRAPHY_TITLE), CSLFormatUtils.DEFAULT_BIBLIOGRAPHY_HEADER_PARAGRAPH_FORMAT); OOTextIntoOO.write(document, cursor, OOText.fromString(title.toString())); - OOText ooBreak = OOFormat.paragraph(OOText.fromString(""), "Body Text"); + OOText ooBreak = OOFormat.paragraph(OOText.fromString(""), CSLFormatUtils.DEFAULT_BIBLIOGRAPHY_BODY_PARAGRAPH_FORMAT); OOTextIntoOO.write(document, cursor, ooBreak); String style = selectedStyle.getSource(); diff --git a/src/main/java/org/jabref/logic/openoffice/oocsltext/CSLFormatUtils.java b/src/main/java/org/jabref/logic/openoffice/oocsltext/CSLFormatUtils.java index 0666a411cf7..0ae50cb4716 100644 --- a/src/main/java/org/jabref/logic/openoffice/oocsltext/CSLFormatUtils.java +++ b/src/main/java/org/jabref/logic/openoffice/oocsltext/CSLFormatUtils.java @@ -29,6 +29,8 @@ public class CSLFormatUtils { public static final String DEFAULT_BIBLIOGRAPHY_TITLE = "References"; public static final String DEFAULT_BIBLIOGRAPHY_HEADER_PARAGRAPH_FORMAT = "Heading 2"; + public static final String DEFAULT_BIBLIOGRAPHY_BODY_PARAGRAPH_FORMAT = "Body Text"; + public static final CitationStyleOutputFormat OUTPUT_FORMAT = CitationStyleOutputFormat.HTML; private static final Pattern YEAR_IN_CITATION_PATTERN = Pattern.compile("(.)(.*), (\\d{4}.*)");