File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
src/main/java/net/sf/jabref/util Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -983,10 +983,22 @@ public static void writeDocumentInformation(PDDocument document,
983983 if (database != null )
984984 entry = database .resolveForStrings (entry , false );
985985
986+ // Query privacy filter settings
987+ JabRefPreferences prefs = JabRefPreferences .getInstance ();
988+ boolean useXmpPrivacyFilter =
989+ prefs .getBoolean ("useXmpPrivacyFilter" );
990+ // Fields for which not to write XMP data later on:
991+ TreeSet <String > filters = new TreeSet <String >(Arrays .asList (prefs .getStringArray (JabRefPreferences .XMP_PRIVACY_FILTERS )));
992+
986993 // Set all the values including key and entryType
987994 Set <String > fields = entry .getAllFields ();
988995
989996 for (String field : fields ){
997+
998+ if (useXmpPrivacyFilter && filters .contains (field )) {
999+ continue ;
1000+ }
1001+
9901002 if (field .equals ("author" )) {
9911003 di .setAuthor (entry .getField ("author" ));
9921004 } else if (field .equals ("title" )) {
You can’t perform that action at this time.
0 commit comments