private static void syncDocumentToDocInfo(OutlinerDocument doc, int mode) {
		DocumentInfo docInfo = doc.getDocumentInfo();
		
		// Update DocumentSettings
		doc.settings.getLineEnd().def = PropertyContainerUtil.getPropertyAsString(docInfo, DocumentInfo.KEY_LINE_ENDING);
		doc.settings.getLineEnd().restoreCurrentToDefault();
		doc.settings.getLineEnd().restoreTemporaryToDefault();
		
		doc.settings.getSaveEncoding().def = PropertyContainerUtil.getPropertyAsString(docInfo, DocumentInfo.KEY_ENCODING_TYPE);
		doc.settings.getSaveEncoding().restoreCurrentToDefault();
		doc.settings.getSaveEncoding().restoreTemporaryToDefault();
		
		if (mode == MODE_IMPORT) {
			// the doc's default save format is the app's default save format
			doc.settings.getSaveFormat().def = Preferences.getPreferenceString(Preferences.SAVE_FORMAT).cur;
		} else {
			// the doc's default save format is its existing format
			doc.settings.getSaveFormat().def = PropertyContainerUtil.getPropertyAsString(docInfo, DocumentInfo.KEY_FILE_FORMAT);
		}
		doc.settings.getSaveFormat().restoreCurrentToDefault();
		doc.settings.getSaveFormat().restoreTemporaryToDefault();
		
		doc.settings.getApplyFontStyleForComments().def = PropertyContainerUtil.getPropertyAsBoolean(docInfo, DocumentInfo.KEY_APPLY_FONT_STYLE_FOR_COMMENTS);
		doc.settings.getApplyFontStyleForComments().restoreCurrentToDefault();
		doc.settings.getApplyFontStyleForComments().restoreTemporaryToDefault();
		
		doc.settings.getApplyFontStyleForEditability().def = PropertyContainerUtil.getPropertyAsBoolean(docInfo, DocumentInfo.KEY_APPLY_FONT_STYLE_FOR_EDITABILITY);
		doc.settings.getApplyFontStyleForEditability().restoreCurrentToDefault();
		doc.settings.getApplyFontStyleForEditability().restoreTemporaryToDefault();
		
		doc.settings.getApplyFontStyleForMoveability().def = PropertyContainerUtil.getPropertyAsBoolean(docInfo, DocumentInfo.KEY_APPLY_FONT_STYLE_FOR_MOVEABILITY);
		doc.settings.getApplyFontStyleForMoveability().restoreCurrentToDefault();
		doc.settings.getApplyFontStyleForMoveability().restoreTemporaryToDefault();
		
		doc.settings.getUseCreateModDates().def = PropertyContainerUtil.getPropertyAsBoolean(docInfo, DocumentInfo.KEY_USE_CREATE_MOD_DATES);
		doc.settings.getUseCreateModDates().restoreCurrentToDefault();
		doc.settings.getUseCreateModDates().restoreTemporaryToDefault();
		
		doc.settings.getCreateModDatesFormat().def = PropertyContainerUtil.getPropertyAsString(docInfo, DocumentInfo.KEY_CREATE_MOD_DATES_FORMAT);
		doc.settings.getCreateModDatesFormat().restoreCurrentToDefault();
		doc.settings.getCreateModDatesFormat().restoreTemporaryToDefault();
		
		doc.settings.getOwnerName().def = PropertyContainerUtil.getPropertyAsString(docInfo, DocumentInfo.KEY_OWNER_NAME);
		doc.settings.getOwnerName().restoreCurrentToDefault();
		doc.settings.getOwnerName().restoreTemporaryToDefault();
		
		doc.settings.getOwnerEmail().def = PropertyContainerUtil.getPropertyAsString(docInfo, DocumentInfo.KEY_OWNER_EMAIL);
		doc.settings.getOwnerEmail().restoreCurrentToDefault();
		doc.settings.getOwnerEmail().restoreTemporaryToDefault();
		
		doc.settings.setDateCreated(PropertyContainerUtil.getPropertyAsString(docInfo, DocumentInfo.KEY_DATE_CREATED));
		doc.settings.setDateModified(PropertyContainerUtil.getPropertyAsString(docInfo, DocumentInfo.KEY_DATE_MODIFIED));
		
		// Update size and location based off of DocumentInfo
		if (mode != MODE_REVERT) {
			int width = docInfo.getWidth();
			int height = docInfo.getHeight();
			int left = PropertyContainerUtil.getPropertyAsInt(docInfo, DocumentInfo.KEY_WINDOW_LEFT);
			int top = PropertyContainerUtil.getPropertyAsInt(docInfo, DocumentInfo.KEY_WINDOW_TOP);
			doc.setSize(width, height);
			doc.setLocation(left, top);
		}
	}