From 92f0fa9097b39aacad2e73064ab983a64db31324 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Sun, 14 Aug 2011 19:42:01 +0000 Subject: [PATCH] Hack for OpenOffice.org fields with codes --- chrome/content/zotero/xpcom/integration.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/chrome/content/zotero/xpcom/integration.js b/chrome/content/zotero/xpcom/integration.js index fab483eeb..ac88072e9 100644 --- a/chrome/content/zotero/xpcom/integration.js +++ b/chrome/content/zotero/xpcom/integration.js @@ -860,6 +860,13 @@ Zotero.Integration.Document.prototype._updateDocument = function(forceCitations, field.setCode( (this._session.data.prefs.storeReferences ? "ITEM CSL_CITATION" : "ITEM") +" "+fieldCode); + + if(this._session.data.prefs.fieldType === "ReferenceMark" && isRich) { + // For ReferenceMarks with formatting, we need to set the text again, because + // setting the field code removes formatting from the mark. I don't like this. + field.setText(citation.properties.custom ? citation.properties.custom + : citation.properties.formattedCitation, isRich); + } } }