Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add setting: always add "Cited on pages" text to JStyles. #11732

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/main/java/org/jabref/gui/openoffice/OOBibBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import org.jabref.logic.citationstyle.CitationStyle;
import org.jabref.logic.l10n.Localization;
import org.jabref.logic.openoffice.NoDocumentFoundException;
import org.jabref.logic.openoffice.OpenOfficePreferences;
import org.jabref.logic.openoffice.action.EditInsert;
import org.jabref.logic.openoffice.action.EditMerge;
import org.jabref.logic.openoffice.action.EditSeparate;
Expand Down Expand Up @@ -68,22 +69,21 @@ public class OOBibBase {

private final DialogService dialogService;

// Shall we add "Cited on pages: ..." to resolved bibliography entries?
private final boolean alwaysAddCitedOnPages; // TODO (see comment above)
private final boolean alwaysAddCitedOnPages;

private final OOBibBaseConnect connection;

private CSLCitationOOAdapter cslCitationOOAdapter;

public OOBibBase(Path loPath, DialogService dialogService)
public OOBibBase(Path loPath, DialogService dialogService, OpenOfficePreferences openOfficePreferences)
throws
BootstrapException,
CreationException {

this.dialogService = dialogService;
this.connection = new OOBibBaseConnect(loPath, dialogService);

this.alwaysAddCitedOnPages = false;
this.alwaysAddCitedOnPages = openOfficePreferences.getAlwaysAddCitedOnPages();
subhramit marked this conversation as resolved.
Show resolved Hide resolved
}

private void initializeCitationAdapter(XTextDocument doc) throws WrappedTargetException, NoSuchElementException {
Expand Down Expand Up @@ -583,7 +583,7 @@ public void guiActionInsertEntry(List<BibEntry> entries,
}
}

syncOptions.map(e -> e.setAlwaysAddCitedOnPages(this.alwaysAddCitedOnPages)); // TODO: Provide option to user: this is always false
syncOptions.map(e -> e.setAlwaysAddCitedOnPages(this.alwaysAddCitedOnPages));

try {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ protected OOBibBase call() throws BootstrapException, CreationException {
}

private OOBibBase createBibBase(Path loPath) throws BootstrapException, CreationException {
return new OOBibBase(loPath, dialogService);
return new OOBibBase(loPath, dialogService, openOfficePreferences);
}

/**
Expand Down
Loading