From 11fbf82104d7f33e900094a1a5aba5c2f5635a91 Mon Sep 17 00:00:00 2001 From: subhramit Date: Wed, 18 Dec 2024 01:19:04 +0530 Subject: [PATCH 1/2] 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/2] 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 {