From 11fbf82104d7f33e900094a1a5aba5c2f5635a91 Mon Sep 17 00:00:00 2001 From: subhramit Date: Wed, 18 Dec 2024 01:19:04 +0530 Subject: [PATCH 1/4] Rename bibliography text section --- .../logic/openoffice/oocsltext/CSLUpdateBibliography.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/jabref/logic/openoffice/oocsltext/CSLUpdateBibliography.java b/src/main/java/org/jabref/logic/openoffice/oocsltext/CSLUpdateBibliography.java index 732db3899ec..ab54c73e3f8 100644 --- a/src/main/java/org/jabref/logic/openoffice/oocsltext/CSLUpdateBibliography.java +++ b/src/main/java/org/jabref/logic/openoffice/oocsltext/CSLUpdateBibliography.java @@ -22,13 +22,13 @@ public class CSLUpdateBibliography { - private static final String CSL_BIB_SECTION_NAME = "CSL_bibliography"; + private static final String BIBLIOGRAPHY_SECTION_NAME = "JR_bib"; private static final Logger LOGGER = LoggerFactory.getLogger(CSLUpdateBibliography.class); public Optional getBibliographyRange(XTextDocument doc) throws NoDocumentException, WrappedTargetException { LOGGER.debug("Attempting to get bibliography range"); - Optional range = UnoTextSection.getAnchor(doc, CSL_BIB_SECTION_NAME); + Optional range = UnoTextSection.getAnchor(doc, BIBLIOGRAPHY_SECTION_NAME); LOGGER.debug("Bibliography range found: {}", range.isPresent()); return range; } @@ -64,7 +64,7 @@ private void createCSLBibTextSection(XTextDocument doc) LOGGER.debug("Creating new CSL bibliography section"); XTextCursor textCursor = doc.getText().createTextCursor(); textCursor.gotoEnd(false); - DocumentAnnotation annotation = new DocumentAnnotation(doc, CSL_BIB_SECTION_NAME, textCursor, false); + DocumentAnnotation annotation = new DocumentAnnotation(doc, BIBLIOGRAPHY_SECTION_NAME, textCursor, false); UnoTextSection.create(annotation); LOGGER.debug("CSL bibliography section created"); } From eb773307dc9c136e8e649e0cc210132ffdc5d7db Mon Sep 17 00:00:00 2001 From: subhramit Date: Wed, 18 Dec 2024 15:17:18 +0530 Subject: [PATCH 2/4] Remove TODO comment --- src/main/java/org/jabref/gui/openoffice/OOBibBase.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/jabref/gui/openoffice/OOBibBase.java b/src/main/java/org/jabref/gui/openoffice/OOBibBase.java index 637c729a720..a820d7c180c 100644 --- a/src/main/java/org/jabref/gui/openoffice/OOBibBase.java +++ b/src/main/java/org/jabref/gui/openoffice/OOBibBase.java @@ -861,7 +861,7 @@ public void guiActionUpdateDocument(List databases, OOStyle style) Update.SyncOptions syncOptions = new Update.SyncOptions(databases); syncOptions .setUpdateBibliography(true) - .setAlwaysAddCitedOnPages(this.alwaysAddCitedOnPages); // TODO: Provide option to user: this is always false + .setAlwaysAddCitedOnPages(this.alwaysAddCitedOnPages); unresolvedKeys = Update.synchronizeDocument(doc, frontend, jStyle, fcursor.get(), syncOptions); } finally { From e179a10ff69a9cf7cd8bf966cd062824b024c5a3 Mon Sep 17 00:00:00 2001 From: subhramit Date: Sat, 8 Feb 2025 19:16:53 +0530 Subject: [PATCH 3/4] Add changelog entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a61f39170fe..f3286e724c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,7 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv - We fixed an issue where JabRef icon merges with dark background [#7771](https://github.com/JabRef/jabref/issues/7771) - We fixed an issue where an entry's group was no longer highlighted on selection [#12413](https://github.com/JabRef/jabref/issues/12413) - We fixed an issue where BibTeX Strings were not included in the backup file [#12462](https://github.com/JabRef/jabref/issues/12462) +- We fixed an issue where mixing JStyle and CSL style citations in LibreOffice used to cause two separate bibliography sections to be generated. [#12262](https://github.com/JabRef/jabref/issues/12262) ### Removed From 79241dead696e3fc2f2ffd49f49f160d08aa8a52 Mon Sep 17 00:00:00 2001 From: subhramit Date: Sat, 8 Feb 2025 19:17:20 +0530 Subject: [PATCH 4/4] Shorten changelog entry --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f3286e724c9..cdbcb408629 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,7 +29,7 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv - We fixed an issue where JabRef icon merges with dark background [#7771](https://github.com/JabRef/jabref/issues/7771) - We fixed an issue where an entry's group was no longer highlighted on selection [#12413](https://github.com/JabRef/jabref/issues/12413) - We fixed an issue where BibTeX Strings were not included in the backup file [#12462](https://github.com/JabRef/jabref/issues/12462) -- We fixed an issue where mixing JStyle and CSL style citations in LibreOffice used to cause two separate bibliography sections to be generated. [#12262](https://github.com/JabRef/jabref/issues/12262) +- We fixed an issue where mixing JStyle and CSL style citations in LibreOffice caused two separate bibliography sections to be generated. [#12262](https://github.com/JabRef/jabref/issues/12262) ### Removed