Jürgen Spitzmüller wrote:
> This is the first step only. My further plans are:
>
> * making the default format customizable on a per-document basis

Here's the patch. It introduces a new "Output" pane in the document settings. 
Currently, "Use xetex" and the default format are there. I plan to add some 
more things that need to be customizable on a per-document basis, IMHO (for me 
at least: bibtex call, makeindex call).

Jürgen
Index: development/scons/scons_manifest.py
===================================================================
--- development/scons/scons_manifest.py	(Revision 29134)
+++ development/scons/scons_manifest.py	(Arbeitskopie)
@@ -913,6 +913,7 @@
     NomenclUi.ui
     NoteUi.ui
     NumberingUi.ui
+    OutputUi.ui
     PageLayoutUi.ui
     ParagraphUi.ui
     PDFSupportUi.ui
Index: development/FORMAT
===================================================================
--- development/FORMAT	(Revision 29133)
+++ development/FORMAT	(Arbeitskopie)
@@ -1,6 +1,9 @@
 LyX file-format changes
 -----------------------
 
+2009-04-06 Jürgen Spitzmüller <sp...@lyx.org>
+	* Format incremented to 350: new param \default_output_format.
+
 2009-04-05 Jürgen Spitzmüller <sp...@lyx.org>
 	* Format incremented to 349: initial support for XeTeX.
 
Index: lib/lyx2lyx/lyx_2_0.py
===================================================================
--- lib/lyx2lyx/lyx_2_0.py	(Revision 29135)
+++ lib/lyx2lyx/lyx_2_0.py	(Arbeitskopie)
@@ -278,6 +278,15 @@
     document.header[i] = "\\font_tt_scale 100"
 
 
+def revert_outputformat(document):
+    " Remove default output format param "
+    i = find_token(document.header, '\\default_output_format', 0)
+    if i == -1:
+        document.warning("Malformed LyX document: Missing \\default_output_format.")
+        return
+    del document.header[i]
+
+
 ##
 # Conversion hub
 #
@@ -286,10 +295,12 @@
 convert = [[346, []],
            [347, []],
            [348, []],
-           [349, []]
+           [349, []],
+           [350, []]
           ]
 
-revert =  [[348, [revert_xetex]],
+revert =  [[349, [revert_outputformat]],
+           [348, [revert_xetex]],
            [347, [revert_phantom, revert_hphantom, revert_vphantom]],
            [346, [revert_tabularvalign]],
            [345, [revert_swiss]]
Index: src/TextClass.h
===================================================================
--- src/TextClass.h	(Revision 29133)
+++ src/TextClass.h	(Arbeitskopie)
@@ -184,11 +184,13 @@
 	// accessors
 	///////////////////////////////////////////////////////////////////
 	///
-	std::string const & name() const { return name_; };
+	std::string const & name() const { return name_; }
 	///
-	std::string const & description() const {	return description_; };
+	std::string const & description() const { return description_; }
 	///
 	std::string const & latexname() const { return latexname_; }
+	/// Can be LaTeX, DocBook, etc.
+	OutputType outputType() const { return outputType_; }
 protected:
 	/// Protect construction
 	TextClass();
Index: src/BufferParams.h
===================================================================
--- src/BufferParams.h	(Revision 29133)
+++ src/BufferParams.h	(Arbeitskopie)
@@ -181,6 +181,8 @@
 	/* some LaTeX options */
 	/// The graphics driver
 	std::string graphicsDriver;
+	/// The default output format
+	std::string defaultOutputFormat;
 	/// the rm font
 	std::string fontsRoman;
 	/// the sf font
Index: src/frontends/qt4/GuiDocument.h
===================================================================
--- src/frontends/qt4/GuiDocument.h	(Revision 29133)
+++ src/frontends/qt4/GuiDocument.h	(Arbeitskopie)
@@ -33,6 +33,7 @@
 #include "ui_PreambleUi.h"
 #include "ui_PDFSupportUi.h"
 #include "ui_ModulesUi.h"
+#include "ui_OutputUi.h"
 
 #include <list>
 #include <map>
@@ -70,6 +71,7 @@
 	void paramsToDialog();
 	void updateFontsize(std::string const &, std::string const &);
 	void updateFontlist();
+	void updateDefaultFormat();
 	void updatePagestyle(std::string const &, std::string const &);
 
 	void showPreamble();
@@ -114,6 +116,7 @@
 	UiWidget<Ui::LaTeXUi> *latexModule;
 	UiWidget<Ui::PDFSupportUi> *pdfSupportModule;
 	UiWidget<Ui::ModulesUi> *modulesModule;
+	UiWidget<Ui::OutputUi> *outputModule;
 	PreambleModule *preambleModule;
 	
 	GuiBranches *branchesModule;
Index: src/frontends/qt4/GuiDocument.cpp
===================================================================
--- src/frontends/qt4/GuiDocument.cpp	(Revision 29137)
+++ src/frontends/qt4/GuiDocument.cpp	(Arbeitskopie)
@@ -30,6 +30,7 @@
 #include "Color.h"
 #include "Encoding.h"
 #include "FloatPlacement.h"
+#include "Format.h"
 #include "FuncRequest.h"
 #include "Language.h"
 #include "LaTeXFeatures.h"
@@ -583,8 +584,18 @@
 	// initialize the length validator
 	bc().addCheckedLineEdit(textLayoutModule->skipLE);
 
+	// output
+	outputModule = new UiWidget<Ui::OutputUi>;
+
+	connect(outputModule->xetexCB, SIGNAL(clicked()),
+		this, SLOT(change_adaptor()));
+	connect(outputModule->xetexCB, SIGNAL(toggled(bool)),
+		this, SLOT(xetexChanged(bool)));
+	connect(outputModule->defaultFormatCO, SIGNAL(activated(int)),
+		this, SLOT(change_adaptor()));
+
+	// fonts
 	fontModule = new UiWidget<Ui::FontUi>;
-	// fonts
 	connect(fontModule->fontsRomanCO, SIGNAL(activated(int)),
 		this, SLOT(change_adaptor()));
 	connect(fontModule->fontsRomanCO, SIGNAL(activated(int)),
@@ -611,10 +622,6 @@
 		this, SLOT(change_adaptor()));
 	connect(fontModule->fontOsfCB, SIGNAL(clicked()),
 		this, SLOT(change_adaptor()));
-	connect(fontModule->xetexCB, SIGNAL(clicked()),
-		this, SLOT(change_adaptor()));
-	connect(fontModule->xetexCB, SIGNAL(toggled(bool)),
-		this, SLOT(xetexChanged(bool)));
 
 	updateFontlist();
 
@@ -982,6 +989,7 @@
 	docPS->addPanel(floatModule, qt_("Float Placement"));
 	docPS->addPanel(bulletsModule, qt_("Bullets"));
 	docPS->addPanel(branchesModule, qt_("Branches"));
+	docPS->addPanel(outputModule, qt_("Output"));
 	docPS->addPanel(preambleModule, qt_("LaTeX Preamble"));
 	docPS->setCurrentPanel(qt_("Document Class"));
 // FIXME: hack to work around resizing bug in Qt >= 4.2
@@ -1161,6 +1169,7 @@
 void GuiDocument::xetexChanged(bool xetex)
 {
 	updateFontlist();
+	updateDefaultFormat();
 	langModule->encodingCO->setEnabled(!xetex &&
 		!langModule->defaultencodingRB->isChecked());
 	langModule->defaultencodingRB->setEnabled(!xetex);
@@ -1197,7 +1206,7 @@
 	fontModule->fontsTypewriterCO->clear();
 
 	// With XeTeX, we have access to all system fonts, but not the LaTeX fonts
-	if (fontModule->xetexCB->isChecked()) {
+	if (outputModule->xetexCB->isChecked()) {
 		fontModule->fontsRomanCO->addItem(qt_("Default"));
 		fontModule->fontsSansCO->addItem(qt_("Default"));
 		fontModule->fontsTypewriterCO->addItem(qt_("Default"));
@@ -1235,7 +1244,7 @@
 
 void GuiDocument::romanChanged(int item)
 {
-	if (fontModule->xetexCB->isChecked()) {
+	if (outputModule->xetexCB->isChecked()) {
 		fontModule->fontScCB->setEnabled(false);
 		return;
 	}
@@ -1247,7 +1256,7 @@
 
 void GuiDocument::sansChanged(int item)
 {
-	if (fontModule->xetexCB->isChecked()) {
+	if (outputModule->xetexCB->isChecked()) {
 		fontModule->fontScCB->setEnabled(false);
 		return;
 	}
@@ -1260,7 +1269,7 @@
 
 void GuiDocument::ttChanged(int item)
 {
-	if (fontModule->xetexCB->isChecked()) {
+	if (outputModule->xetexCB->isChecked()) {
 		fontModule->fontScCB->setEnabled(false);
 		return;
 	}
@@ -1599,6 +1608,32 @@
 }
 
 
+void GuiDocument::updateDefaultFormat()
+{
+	// make a copy in order to consider unapplied changes
+	Buffer * tmpbuf = const_cast<Buffer *>(&buffer());
+	tmpbuf->params().useXetex = outputModule->xetexCB->isChecked();
+	int idx = latexModule->classCO->currentIndex();
+	if (idx >= 0) {
+		string const classname = classes_model_.getIDString(idx);
+		tmpbuf->params().setBaseClass(classname);
+		tmpbuf->params().makeDocumentClass();
+	}
+	outputModule->defaultFormatCO->blockSignals(true);
+	outputModule->defaultFormatCO->clear();
+	outputModule->defaultFormatCO->addItem(qt_("Default"),
+				QVariant(QString("default")));
+	typedef vector<Format const *> Formats;
+	Formats formats = tmpbuf->exportableFormats(true);
+	Formats::const_iterator cit = formats.begin();
+	Formats::const_iterator end = formats.end();
+	for (; cit != end; ++cit)
+		outputModule->defaultFormatCO->addItem(qt_((*cit)->prettyname()),
+				QVariant(toqstr((*cit)->name())));
+	outputModule->defaultFormatCO->blockSignals(false);
+}
+
+
 void GuiDocument::applyView()
 {
 	// preamble
@@ -1799,10 +1834,14 @@
 
 	bp_.float_placement = floatModule->get();
 
-	// fonts
-	bool const xetex = fontModule->xetexCB->isChecked();
+	// output
+	bp_.defaultOutputFormat = fromqstr(outputModule->defaultFormatCO->itemData(
+		outputModule->defaultFormatCO->currentIndex()).toString());
+
+	bool const xetex = outputModule->xetexCB->isChecked();
 	bp_.useXetex = xetex;
 
+	// fonts
 	if (xetex) {
 		if (fontModule->fontsRomanCO->currentIndex() == 0)
 			bp_.fontsRoman = "default";
@@ -2127,12 +2166,23 @@
 
 	floatModule->set(bp_.float_placement);
 
+	// Output
+	// update combobox with formats
+	updateDefaultFormat();
+	int index = outputModule->defaultFormatCO->findData(toqstr(
+		bp_.defaultOutputFormat));
+	// set to default if format is not found 
+	if (index == -1)
+		index = 0;
+	outputModule->defaultFormatCO->setCurrentIndex(index);
+	outputModule->xetexCB->setEnabled(bp_.baseClass()->outputType() == lyx::LATEX);
+	outputModule->xetexCB->setChecked(
+		bp_.baseClass()->outputType() == lyx::LATEX && bp_.useXetex);
+
 	// Fonts
 	updateFontsize(documentClass().opt_fontsize(),
 			bp_.fontsize);
 
-	fontModule->xetexCB->setChecked(bp_.useXetex);
-
 	if (bp_.useXetex) {
 		for (int i = 0; i < fontModule->fontsRomanCO->count(); ++i) {
 			if (fontModule->fontsRomanCO->itemText(i) == toqstr(bp_.fontsRoman)) {
Index: src/frontends/qt4/Makefile.am
===================================================================
--- src/frontends/qt4/Makefile.am	(Revision 29133)
+++ src/frontends/qt4/Makefile.am	(Arbeitskopie)
@@ -267,6 +267,7 @@
 	NomenclUi.ui \
 	NoteUi.ui \
 	NumberingUi.ui \
+	OutputUi.ui \
 	PageLayoutUi.ui \
 	ParagraphUi.ui \
 	PDFSupportUi.ui \
Index: src/frontends/qt4/ui/FontUi.ui
===================================================================
--- src/frontends/qt4/ui/FontUi.ui	(Revision 29133)
+++ src/frontends/qt4/ui/FontUi.ui	(Arbeitskopie)
@@ -12,246 +12,235 @@
   <property name="windowTitle" >
    <string>FontUi</string>
   </property>
-  <layout class="QGridLayout" name="gridLayout" >
-   <item row="0" column="0" >
-    <widget class="QCheckBox" name="xetexCB" >
-     <property name="toolTip" >
-      <string>Use the XeTeX processor, which allows access to all system fonts</string>
-     </property>
-     <property name="text" >
-      <string>Use &amp;XeTeX</string>
-     </property>
-    </widget>
-   </item>
-   <item row="1" column="0" colspan="4" >
-    <widget class="Line" name="line" >
+  <layout class="QGridLayout" >
+   <property name="margin" >
+    <number>9</number>
+   </property>
+   <property name="spacing" >
+    <number>6</number>
+   </property>
+   <item row="8" column="0" colspan="4" >
+    <spacer>
      <property name="orientation" >
-      <enum>Qt::Horizontal</enum>
+      <enum>Qt::Vertical</enum>
      </property>
-    </widget>
-   </item>
-   <item row="2" column="0" >
-    <widget class="QLabel" name="fontsDefaultLA" >
-     <property name="text" >
-      <string>&amp;Default Family:</string>
+     <property name="sizeType" >
+      <enum>QSizePolicy::Expanding</enum>
      </property>
-     <property name="buddy" >
-      <cstring>fontsDefaultCO</cstring>
+     <property name="sizeHint" >
+      <size>
+       <width>391</width>
+       <height>16</height>
+      </size>
      </property>
-    </widget>
+    </spacer>
    </item>
-   <item row="2" column="1" >
-    <widget class="QComboBox" name="fontsDefaultCO" >
+   <item row="7" column="1" >
+    <widget class="QCheckBox" name="fontOsfCB" >
      <property name="toolTip" >
-      <string>Select the default family for the document</string>
+      <string>Use old style instead of lining figures</string>
      </property>
-    </widget>
-   </item>
-   <item row="2" column="2" >
-    <widget class="QLabel" name="TextLabel2_2" >
      <property name="text" >
-      <string>&amp;Base Size:</string>
+      <string>Use &amp;Old Style Figures</string>
      </property>
-     <property name="buddy" >
-      <cstring>fontsizeCO</cstring>
-     </property>
     </widget>
    </item>
-   <item row="2" column="3" >
-    <widget class="QComboBox" name="fontsizeCO" >
+   <item row="6" column="1" >
+    <widget class="QCheckBox" name="fontScCB" >
      <property name="toolTip" >
-      <string/>
+      <string>Use a real small caps shape, if the font provides one</string>
      </property>
+     <property name="text" >
+      <string>Use true S&amp;mall Caps</string>
+     </property>
     </widget>
    </item>
-   <item row="3" column="1" >
+   <item row="5" column="2" colspan="2" >
     <spacer>
      <property name="orientation" >
       <enum>Qt::Horizontal</enum>
      </property>
-     <property name="sizeHint" stdset="0" >
+     <property name="sizeHint" >
       <size>
-       <width>182</width>
-       <height>16</height>
+       <width>151</width>
+       <height>20</height>
       </size>
      </property>
     </spacer>
    </item>
-   <item row="4" column="0" >
-    <widget class="QLabel" name="fontsRomanLA" >
+   <item row="5" column="1" >
+    <widget class="QLineEdit" name="cjkFontLE" >
+     <property name="toolTip" >
+      <string>Input the font to be used for Chinese, Japanese or Korean (CJK) script</string>
+     </property>
+    </widget>
+   </item>
+   <item row="5" column="0" >
+    <widget class="QLabel" name="cjkFontLA" >
      <property name="text" >
-      <string>&amp;Roman:</string>
+      <string>C&amp;JK:</string>
      </property>
      <property name="buddy" >
-      <cstring>fontsRomanCO</cstring>
+      <cstring>cjkFontLE</cstring>
      </property>
     </widget>
    </item>
-   <item row="4" column="1" >
-    <widget class="QComboBox" name="fontsRomanCO" >
+   <item row="4" column="3" >
+    <widget class="QSpinBox" name="scaleTypewriterSB" >
      <property name="toolTip" >
-      <string>Select the roman (serif) typeface</string>
+      <string>Scale the Typewriter font to match the base font's dimensions</string>
      </property>
-    </widget>
-   </item>
-   <item row="4" column="2" colspan="2" >
-    <spacer>
-     <property name="orientation" >
-      <enum>Qt::Horizontal</enum>
+     <property name="maximum" >
+      <number>200</number>
      </property>
-     <property name="sizeHint" stdset="0" >
-      <size>
-       <width>131</width>
-       <height>20</height>
-      </size>
+     <property name="minimum" >
+      <number>10</number>
      </property>
-    </spacer>
+    </widget>
    </item>
-   <item row="5" column="0" >
-    <widget class="QLabel" name="fontsSansLA" >
+   <item row="4" column="2" >
+    <widget class="QLabel" name="scaleTypewriterLA" >
      <property name="text" >
-      <string>&amp;Sans Serif:</string>
+      <string>Sc&amp;ale (%):</string>
      </property>
      <property name="buddy" >
-      <cstring>fontsSansCO</cstring>
+      <cstring>scaleTypewriterSB</cstring>
      </property>
     </widget>
    </item>
-   <item row="5" column="1" >
-    <widget class="QComboBox" name="fontsSansCO" >
+   <item row="4" column="1" >
+    <widget class="QComboBox" name="fontsTypewriterCO" >
      <property name="toolTip" >
-      <string>Select the Sans Serif (grotesque) typeface</string>
+      <string>Select the typewriter (monospaced) typeface</string>
      </property>
     </widget>
    </item>
-   <item row="5" column="2" >
-    <widget class="QLabel" name="scaleSansLA" >
+   <item row="4" column="0" >
+    <widget class="QLabel" name="fontsTypewriterLA" >
      <property name="text" >
-      <string>S&amp;cale (%):</string>
+      <string>&amp;Typewriter:</string>
      </property>
      <property name="buddy" >
-      <cstring>scaleSansSB</cstring>
+      <cstring>fontsTypewriterCO</cstring>
      </property>
     </widget>
    </item>
-   <item row="5" column="3" >
+   <item row="3" column="3" >
     <widget class="QSpinBox" name="scaleSansSB" >
      <property name="toolTip" >
       <string>Scale the Sans Serif font to match the base font's dimensions</string>
      </property>
-     <property name="minimum" >
-      <number>10</number>
-     </property>
      <property name="maximum" >
       <number>200</number>
      </property>
+     <property name="minimum" >
+      <number>10</number>
+     </property>
     </widget>
    </item>
-   <item row="6" column="0" >
-    <widget class="QLabel" name="fontsTypewriterLA" >
+   <item row="3" column="2" >
+    <widget class="QLabel" name="scaleSansLA" >
      <property name="text" >
-      <string>&amp;Typewriter:</string>
+      <string>S&amp;cale (%):</string>
      </property>
      <property name="buddy" >
-      <cstring>fontsTypewriterCO</cstring>
+      <cstring>scaleSansSB</cstring>
      </property>
     </widget>
    </item>
-   <item row="6" column="1" >
-    <widget class="QComboBox" name="fontsTypewriterCO" >
+   <item row="3" column="1" >
+    <widget class="QComboBox" name="fontsSansCO" >
      <property name="toolTip" >
-      <string>Select the typewriter (monospaced) typeface</string>
+      <string>Select the Sans Serif (grotesque) typeface</string>
      </property>
     </widget>
    </item>
-   <item row="6" column="2" >
-    <widget class="QLabel" name="scaleTypewriterLA" >
+   <item row="3" column="0" >
+    <widget class="QLabel" name="fontsSansLA" >
      <property name="text" >
-      <string>Sc&amp;ale (%):</string>
+      <string>&amp;Sans Serif:</string>
      </property>
      <property name="buddy" >
-      <cstring>scaleTypewriterSB</cstring>
+      <cstring>fontsSansCO</cstring>
      </property>
     </widget>
    </item>
-   <item row="6" column="3" >
-    <widget class="QSpinBox" name="scaleTypewriterSB" >
-     <property name="toolTip" >
-      <string>Scale the Typewriter font to match the base font's dimensions</string>
+   <item row="2" column="2" colspan="2" >
+    <spacer>
+     <property name="orientation" >
+      <enum>Qt::Horizontal</enum>
      </property>
-     <property name="minimum" >
-      <number>10</number>
+     <property name="sizeHint" >
+      <size>
+       <width>131</width>
+       <height>20</height>
+      </size>
      </property>
-     <property name="maximum" >
-      <number>200</number>
+    </spacer>
+   </item>
+   <item row="2" column="1" >
+    <widget class="QComboBox" name="fontsRomanCO" >
+     <property name="toolTip" >
+      <string>Select the roman (serif) typeface</string>
      </property>
     </widget>
    </item>
-   <item row="7" column="0" >
-    <widget class="QLabel" name="cjkFontLA" >
+   <item row="2" column="0" >
+    <widget class="QLabel" name="fontsRomanLA" >
      <property name="text" >
-      <string>C&amp;JK:</string>
+      <string>&amp;Roman:</string>
      </property>
      <property name="buddy" >
-      <cstring>cjkFontLE</cstring>
+      <cstring>fontsRomanCO</cstring>
      </property>
     </widget>
    </item>
-   <item row="7" column="1" >
-    <widget class="QLineEdit" name="cjkFontLE" >
-     <property name="toolTip" >
-      <string>Input the font to be used for Chinese, Japanese or Korean (CJK) script</string>
-     </property>
-    </widget>
-   </item>
-   <item row="7" column="2" colspan="2" >
+   <item row="1" column="1" >
     <spacer>
      <property name="orientation" >
       <enum>Qt::Horizontal</enum>
      </property>
-     <property name="sizeHint" stdset="0" >
+     <property name="sizeHint" >
       <size>
-       <width>151</width>
-       <height>20</height>
+       <width>182</width>
+       <height>16</height>
       </size>
      </property>
     </spacer>
    </item>
-   <item row="8" column="1" >
-    <widget class="QCheckBox" name="fontScCB" >
+   <item row="0" column="3" >
+    <widget class="QComboBox" name="fontsizeCO" >
      <property name="toolTip" >
-      <string>Use a real small caps shape, if the font provides one</string>
+      <string/>
      </property>
+    </widget>
+   </item>
+   <item row="0" column="2" >
+    <widget class="QLabel" name="TextLabel2_2" >
      <property name="text" >
-      <string>Use true S&amp;mall Caps</string>
+      <string>&amp;Base Size:</string>
      </property>
+     <property name="buddy" >
+      <cstring>fontsizeCO</cstring>
+     </property>
     </widget>
    </item>
-   <item row="9" column="1" >
-    <widget class="QCheckBox" name="fontOsfCB" >
+   <item row="0" column="1" >
+    <widget class="QComboBox" name="fontsDefaultCO" >
      <property name="toolTip" >
-      <string>Use old style instead of lining figures</string>
+      <string>Select the default family for the document</string>
      </property>
-     <property name="text" >
-      <string>Use &amp;Old Style Figures</string>
-     </property>
     </widget>
    </item>
-   <item row="10" column="0" colspan="4" >
-    <spacer>
-     <property name="orientation" >
-      <enum>Qt::Vertical</enum>
+   <item row="0" column="0" >
+    <widget class="QLabel" name="fontsDefaultLA" >
+     <property name="text" >
+      <string>&amp;Default Family:</string>
      </property>
-     <property name="sizeType" >
-      <enum>QSizePolicy::Expanding</enum>
+     <property name="buddy" >
+      <cstring>fontsDefaultCO</cstring>
      </property>
-     <property name="sizeHint" stdset="0" >
-      <size>
-       <width>391</width>
-       <height>16</height>
-      </size>
-     </property>
-    </spacer>
+    </widget>
    </item>
   </layout>
  </widget>
Index: src/frontends/qt4/ui/OutputUi.ui
===================================================================
--- src/frontends/qt4/ui/OutputUi.ui	(Revision 0)
+++ src/frontends/qt4/ui/OutputUi.ui	(Revision 0)
@@ -0,0 +1,100 @@
+<ui version="4.0" >
+ <class>OutputUi</class>
+ <widget class="QWidget" name="OutputUi" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>271</width>
+    <height>295</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>Form</string>
+  </property>
+  <layout class="QGridLayout" >
+   <property name="margin" >
+    <number>9</number>
+   </property>
+   <property name="spacing" >
+    <number>6</number>
+   </property>
+   <item row="0" column="0" >
+    <widget class="QGroupBox" name="outputFormatGB" >
+     <property name="title" >
+      <string>Output Format</string>
+     </property>
+     <property name="flat" >
+      <bool>true</bool>
+     </property>
+     <layout class="QGridLayout" >
+      <property name="margin" >
+       <number>9</number>
+      </property>
+      <property name="spacing" >
+       <number>6</number>
+      </property>
+      <item row="1" column="0" >
+       <layout class="QHBoxLayout" >
+        <property name="margin" >
+         <number>0</number>
+        </property>
+        <property name="spacing" >
+         <number>6</number>
+        </property>
+        <item>
+         <widget class="QLabel" name="defaultFormatLA" >
+          <property name="toolTip" >
+           <string>Specify the default output format (for view/update)</string>
+          </property>
+          <property name="text" >
+           <string>De&amp;fault Output Format:</string>
+          </property>
+          <property name="buddy" >
+           <cstring>defaultFormatCO</cstring>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QComboBox" name="defaultFormatCO" >
+          <property name="toolTip" >
+           <string>Specify the default output format (for view/update)</string>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </item>
+      <item row="0" column="0" >
+       <widget class="QCheckBox" name="xetexCB" >
+        <property name="toolTip" >
+         <string>Use the XeTeX processing engine</string>
+        </property>
+        <property name="text" >
+         <string>Use &amp;XeTeX</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="1" column="0" >
+    <spacer>
+     <property name="orientation" >
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" >
+      <size>
+       <width>20</width>
+       <height>20</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+  </layout>
+ </widget>
+ <includes>
+  <include location="local" >qt_i18n.h</include>
+ </includes>
+ <resources/>
+ <connections/>
+</ui>
Index: src/Buffer.cpp
===================================================================
--- src/Buffer.cpp	(Revision 29141)
+++ src/Buffer.cpp	(Arbeitskopie)
@@ -124,7 +124,7 @@
 
 // Do not remove the comment below, so we get merge conflict in
 // independent branches. Instead add your own.
-int const LYX_FORMAT = 349;  // jspitzm: initial XeTeX support
+int const LYX_FORMAT = 350;  // jspitzm: default output format
 
 typedef map<string, bool> DepClean;
 typedef map<docstring, pair<InsetLabel const *, Buffer::References> > RefCache;
@@ -2654,6 +2654,9 @@
 
 string Buffer::getDefaultOutputFormat() const
 {
+	if (!params().defaultOutputFormat.empty()
+	    && params().defaultOutputFormat != "default")
+		return params().defaultOutputFormat;
 	typedef vector<Format const *> Formats;
 	Formats formats = exportableFormats(true);
 	if (isDocBook()
Index: src/BufferParams.cpp
===================================================================
--- src/BufferParams.cpp	(Revision 29133)
+++ src/BufferParams.cpp	(Arbeitskopie)
@@ -351,6 +351,7 @@
 	fontsTypewriterScale = 100;
 	inputenc = "auto";
 	graphicsDriver = "default";
+	defaultOutputFormat = "default";
 	sides = OneSide;
 	columns = 1;
 	listings_params = string();
@@ -509,6 +510,8 @@
 		lex >> inputenc;
 	} else if (token == "\\graphics") {
 		readGraphicsDriver(lex);
+	} else if (token == "\\default_output_format") {
+		lex >> defaultOutputFormat;
 	} else if (token == "\\font_roman") {
 		lex.eatLine();
 		fontsRoman = lex.getString();
@@ -758,6 +761,7 @@
 		os << "\\font_cjk " << fontsCJK << '\n';
 	}
 	os << "\n\\graphics " << graphicsDriver << '\n';
+	os << "\\default_output_format " << defaultOutputFormat << '\n';
 
 	if (!float_placement.empty()) {
 		os << "\\float_placement " << float_placement << '\n';

Reply via email to