]> git.lyx.org Git - features.git/commitdiff
Qt2 compilation + LColor cleanup from John
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 5 Jun 2001 17:05:51 +0000 (17:05 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 5 Jun 2001 17:05:51 +0000 (17:05 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2092 a592a061-630c-0410-9148-cb99ea01b6c8

48 files changed:
boost/boost/config.hpp
src/BufferView_pimpl.C
src/ChangeLog
src/LColor.C
src/LColor.h
src/frontends/qt2/ChangeLog
src/frontends/qt2/Dialogs.C
src/frontends/qt2/FormCharacter.C
src/frontends/qt2/FormCharacter.h
src/frontends/qt2/FormCitation.C
src/frontends/qt2/FormCitation.h
src/frontends/qt2/FormCitationDialogImpl.C
src/frontends/qt2/FormCopyright.C
src/frontends/qt2/FormCopyright.h
src/frontends/qt2/FormCredits.C
src/frontends/qt2/FormDocument.C
src/frontends/qt2/FormDocument.h
src/frontends/qt2/FormParagraph.h
src/frontends/qt2/FormSearch.C
src/frontends/qt2/FormSearch.h
src/frontends/qt2/FormSplash.C
src/frontends/qt2/FormSplash.h
src/frontends/qt2/FormTabularCreate.C
src/frontends/qt2/Qt2Base.C
src/frontends/qt2/Qt2Base.h
src/frontends/qt2/chardlgimpl.C
src/frontends/qt2/chardlgimpl.h
src/frontends/qt2/emptytable.C
src/frontends/qt2/emptytable.h
src/frontends/qt2/paragraphdlgimpl.C
src/frontends/qt2/paragraphdlgimpl.h
src/frontends/qt2/printdlgimpl.C
src/frontends/qt2/printdlgimpl.h
src/frontends/qt2/searchdlgimpl.C
src/frontends/qt2/searchdlgimpl.h
src/frontends/qt2/tabularcreatedlgimpl.C
src/frontends/qt2/tabularcreatedlgimpl.h
src/gettext.C
src/gettext.h
src/insets/ChangeLog
src/insets/insetcaption.C
src/insets/insetcollapsable.C
src/insets/insetert.C
src/insets/insetfloat.C
src/insets/insetfootlike.C
src/insets/insetlist.C
src/insets/insetminipage.C
src/insets/insettheorem.C

index 216c8f493b2a27e14f929f48431cf7a6125a7046..b05746e137c03ffbe169bac83b934084c1390743 100644 (file)
 #elif defined __DECCXX
 #   define BOOST_NO_SLIST
 #   define BOOST_NO_HASH
-#   define BOOST_NO_INCLASS_MEMBER_INITIALIZATION
 
 //  Greenhills C++ -----------------------------------------------------------//
 
index 3b70e8d7046dab59d4eb32a9ac73c7d1cbeb29cc..3936760163770f64855862a644fd7f3dc4daeb67 100644 (file)
@@ -2767,7 +2767,7 @@ bool BufferView::Pimpl::Dispatch(kb_action action, string const & argument)
                        new_inset->setOwner(bv_->theLockingInset());
                        new_inset->SetAutoBreakRows(true);
                        new_inset->SetDrawFrame(0, InsetText::LOCKED);
-                       new_inset->SetFrameColor(0, LColor::footnoteframe);
+                       new_inset->SetFrameColor(0, LColor::captionframe);
                        if (insertInset(new_inset))
                                new_inset->Edit(bv_, 0, 0, 0);
                        else
index 0bb70cf6d3669884323678e11ca7f146f6605636..6c1e53d73d826deead2a95219d66cfb08fceb4e9 100644 (file)
@@ -1,3 +1,14 @@
+2001-06-05  Jean-Marc Lasgouttes  <Jean-Marc.Lasgouttes@inria.fr>
+
+       * gettext.h (gettext_init): 
+       (locale_init): use a real definition instead of a macro
+
+2001-06-02  John Levon  <moz@compsoc.man.ac.uk>
+
+       * Bufferview_pimpl.C:
+       * LColor.h:
+       * LColor.C: further lcolor tidies
+
 2001-06-05  Lars Gullik Bjønnes  <larsbj@birdstep.com>
 
        * BufferView_pimpl.C (updateScrollbar): simplify.
index 189514f4a0e81291be62ec9b61136dc7259fa510..cfb4d9b12e84b042cc627edbd25714e2f90a37b7 100644 (file)
@@ -62,7 +62,7 @@ LColor::LColor()
        { background, N_("background"), "background", "linen", "background" },
        { foreground, N_("text"), "foreground", "black", "foreground" },
        { selection, N_("selection"), "selection", "LightBlue", "selection" },
-       { latex, N_("latex"), "latex", "DarkRed", "latex" },
+       { latex, N_("latex text"), "latex", "DarkRed", "latex" },
        { note, N_("note"), "note", "black", "note" },
        { notebg, N_("note background"), "notebg", "yellow", "notebg" },
        { noteframe, N_("note frame"), "noteframe", "black", "noteframe" },
@@ -77,9 +77,9 @@ LColor::LColor()
        { mathframe, N_("math frame"), "mathframe", "Magenta", "mathframe" },
        { mathcursor, N_("math cursor"), "mathcursor", "black", "mathcursor" },
        { mathline, N_("math line"), "mathline", "Blue", "mathline" },
-       { footnote, N_("footnote"), "footnote", "DarkRed", "footnote" },
-       { footnoteframe, N_("footnote frame"), "footnoteframe", "IndianRed", "footnoteframe" },
-       { ert, N_("latex inset"), "ert", "DarkRed", "ert" },
+       { captionframe, N_("caption frame"), "captionframe", "DarkRed", "captionframe" },
+       { collapsable, N_("collapsable inset text"), "collapsable", "DarkRed", "collapsable" },
+       { collapsableframe, N_("collapsable inset frame"), "collapsableframe", "IndianRed", "collapsableframe" },
        { insetbg, N_("inset background"), "insetbg", "grey60", "insetbg" },
        { insetframe, N_("inset frame"), "insetframe", "IndianRed", "insetframe" },
        { error, N_("LaTeX error"), "error", "Red", "error" },
index 2c33077d7043059ba6a045913cb1831f5fd14c21..6d832857c4edd2d7ec49049b8793b8d83cd8a00b 100644 (file)
@@ -113,16 +113,14 @@ public:
                /// Math line color
                mathline,
 
-               /// Footnote marker text
-               // FIXME: this is seemingly mis-used all over the place
-               footnote,
-               /// Footnote line color
-               footnoteframe,
-
-               /// ERT marker text
-               // FIXME: is there any reason this is different from latex ?
-               ert,
-               
+               /// caption frame color
+               captionframe,
+               /// collapsable insets text
+               collapsable,
+               /// collapsable insets frame
+               collapsableframe,
+
                /// Inset marker background color
                insetbg,
                /// Inset marker frame color
index 90474fb6774c93dcce79802d76aedba217ff69da..0239bd9f8a31a510ef6199c4aee24324545935f5 100644 (file)
@@ -1,3 +1,9 @@
+2001-06-02  John Levon  <moz@compsoc.man.ac.uk>
+
+       * <various>: fix random space pepper to use
+         hard tabs. Also add <config.h> where necessitated
+         by using LString.h
 2001-05-22  Adrien Rebollo <rebollo@iaf.cnrs-gif.fr>
 
        * FormDocument.C (build): add iso8859-15 support.
index f0357d449f63d5d734f714ab169580425273112c..8f5b5eb25c553b157f72b837a2a32a880eed19bd 100644 (file)
@@ -60,40 +60,38 @@ SigC::Signal0<void> Dialogs::redrawGUI;
 
 Dialogs::Dialogs(LyXView * lv)
 {
-    splash_.reset( new FormSplash(lv, this) );
+       splash_.reset( new FormSplash(lv, this) );
 
-    // dialogs that have been converted to new scheme
-    add( new GUICitation<FormCitation, qt2BC>( *lv, *this ) );
-    add( new GUICopyright<FormCopyright, qt2BC>( *lv, *this ) );
-    add( new GUICredits<FormCredits, qt2BC>( *lv, *this ) );
+       // dialogs that have been converted to new scheme
+       add( new GUICitation<FormCitation, qt2BC>( *lv, *this ) );
+       add( new GUICopyright<FormCopyright, qt2BC>( *lv, *this ) );
+       add( new GUICredits<FormCredits, qt2BC>( *lv, *this ) );
 
-    // ------------------------------------------
+       // ------------------------------------------
 
-    // dialogs that are still old-style
-    add( new FormCharacter(lv, this));
+       // dialogs that are still old-style
+       add( new FormCharacter(lv, this));
 
-    // add(new FormDocument(lv, this));
+       //      add(new FormDocument(lv, this));
 
 
-    // REMOVED THIS UNTIL CHANGED TO NEW SCHEME -- Kalle, 2001-03-23
-    // add(new FormError(lv, this));
+       // REMOVED THIS UNTIL CHANGED TO NEW SCHEME -- Kalle, 2001-03-23
+       // add(new FormError(lv, this));
 
-    // REMOVED THIS UNTIL CHANGED TO NEW SCHEME -- Kalle, 2001-03-28
-    //    add(new FormGraphics(lv, this));
-    // add(new FormIndex(lv, this));
-    add(new FormParagraph(lv, this));
-    add(new FormPreferences(lv, this));
-    add(new FormPrint(lv, this));
-    // add(new FormRef(lv, this));
-    add(new FormSearch(lv, this));
-    add(new FormTabular(lv, this));
-    add(new FormTabularCreate(lv, this));
-    // add(new FormToc(lv, this));
-    // add(new FormUrl(lv, this));
+       // REMOVED THIS UNTIL CHANGED TO NEW SCHEME -- Kalle, 2001-03-28
+       //    add(new FormGraphics(lv, this));
+       //      add(new FormIndex(lv, this));
+       add(new FormParagraph(lv, this));
+       add(new FormPreferences(lv, this));
+       add(new FormPrint(lv, this));
+       //      add(new FormRef(lv, this));
+       add(new FormSearch(lv, this));
+       add(new FormTabular(lv, this));
+       add(new FormTabularCreate(lv, this));
+       //      add(new FormToc(lv, this));
+       //      add(new FormUrl(lv, this));
 
-    // reduce the number of connections needed in
-    // dialogs by a simple connection here.
-    hideAll.connect(hideBufferDependent.slot());
+       // reduce the number of connections needed in
+       // dialogs by a simple connection here.
+       hideAll.connect(hideBufferDependent.slot());
 }
-
-
index 56bc42de4a9c615b38267569feb92d9f10a4d11a..c50be783297117b481e157d2ccc34bf186941e3c 100644 (file)
@@ -26,77 +26,76 @@ using Liason::setMinibuffer;
 FormCharacter::FormCharacter(LyXView *v, Dialogs *d)
        : dialog_(0), lv_(v), d_(d), h_(0), u_(0)
 {
-   // let the dialog be shown
-   // This is a permanent connection so we won't bother
-   // storing a copy because we won't be disconnecting.
-   d->showLayoutCharacter.connect(slot(this, &FormCharacter::show));
-   // for LFUN_FREE
-   d->setUserFreeFont.connect(slot(this, &FormCharacter::apply));
+       // let the dialog be shown
+       // This is a permanent connection so we won't bother
+       // storing a copy because we won't be disconnecting.
+       d->showLayoutCharacter.connect(slot(this, &FormCharacter::show));
+       // for LFUN_FREE
+       d->setUserFreeFont.connect(slot(this, &FormCharacter::apply));
 }
 
 
 FormCharacter::~FormCharacter()
 {
-   delete dialog_;
+       delete dialog_;
 }
 
 
 void FormCharacter::apply()
 {
-   if (!lv_->view()->available() || !dialog_)
-     return;
+       if (!lv_->view()->available() || !dialog_)
+               return;
 
-   LyXFont font = dialog_->getChar();
+       LyXFont font = dialog_->getChar();
 
-   if (dialog_->langItem()==1)
-     font.setLanguage(lv_->buffer()->params.language);
+       if (dialog_->langItem()==1)
+               font.setLanguage(lv_->buffer()->params.language);
 
-   ToggleAndShow(lv_->view(), font, dialog_->toggleAll());
-   lv_->view()->setState();
-   lv_->buffer()->markDirty();
-   setMinibuffer(lv_, _("Character set"));
+       ToggleAndShow(lv_->view(), font, dialog_->toggleAll());
+       lv_->view()->setState();
+       lv_->buffer()->markDirty();
+       setMinibuffer(lv_, _("Character set"));
 }
 
 void FormCharacter::show()
 {
-   if (!dialog_) {
-      dialog_ = new CharDlgImpl(this, 0, _("Character Options"), false);
-      // add languages
-      for (Languages::const_iterator cit = languages.begin();
-          cit != languages.end(); ++cit) {
-        const string language = (*cit).second.lang();
-        dialog_->lang->insertItem( tostr(language).c_str(), -1 );
-      }
-   }
-
-   if (!dialog_->isVisible()) {
-      h_ = d_->hideBufferDependent.connect(slot(this, &FormCharacter::hide));
-      u_ = d_->updateBufferDependent.connect(slot(this, &FormCharacter::update));
-   }
-
-   dialog_->raise();
-   dialog_->setActiveWindow();
-   update();
-   dialog_->show();
+       if (!dialog_) {
+               dialog_ = new CharDlgImpl(this, 0, _("Character Options"), false);
+               // add languages
+               for (Languages::const_iterator cit = languages.begin();
+                       cit != languages.end(); ++cit) {
+                       const string language = (*cit).second.lang();
+                       dialog_->lang->insertItem( tostr(language).c_str(), -1 );
+               }
+       }
+
+       if (!dialog_->isVisible()) {
+               h_ = d_->hideBufferDependent.connect(slot(this, &FormCharacter::hide));
+               u_ = d_->updateBufferDependent.connect(slot(this, &FormCharacter::update));
+       }
+
+       dialog_->raise();
+       dialog_->setActiveWindow();
+       update();
+       dialog_->show();
 }
 
 void FormCharacter::close()
 {
-   h_.disconnect();
-   u_.disconnect();
+       h_.disconnect();
+       u_.disconnect();
 }
 
 void FormCharacter::hide()
 {
-   dialog_->hide();
-   close();
+       dialog_->hide();
+       close();
 }
 
 void FormCharacter::update(bool)
 {
+       if (!lv_->view()->available())
+               return;
 
-   if (!lv_->view()->available())
-     return;
-
-   dialog_->setReadOnly(lv_->buffer()->isReadonly());
+       dialog_->setReadOnly(lv_->buffer()->isReadonly());
 }
index 28e49ccd16e78f72f9ac5c0a8a2301f82d113fe9..fffa13c02156698fb7321f3bae6bc4931e000e30 100644 (file)
@@ -18,46 +18,44 @@ class CharDlgImpl;
 
 class FormCharacter : public DialogBase {
 public:
-   ///
-   FormCharacter(LyXView *, Dialogs *);
-   ///
-   ~FormCharacter();
-
-   /// Apply changes.
-   void apply();
-   /// Close connections.
-   void close();
+       ///
+       FormCharacter(LyXView *, Dialogs *);
+       ///
+       ~FormCharacter();
 
+       /// Apply changes.
+       void apply();
+       /// Close connections.
+       void close();
 
 private:
 
-   /// Show the dialog.
-   void show();
-   /// Hide the dialog.
-   void hide();
-   /// Update the dialog.
-   void update(bool switched = false);
-
-   /// Real GUI implementation.
-   CharDlgImpl * dialog_;
+       /// Show the dialog.
+       void show();
+       /// Hide the dialog.
+       void hide();
+       /// Update the dialog.
+       void update(bool switched = false);
 
-   /// the LyXView we belong to.
-   LyXView * lv_;
+       /// Real GUI implementation.
+       CharDlgImpl * dialog_;
 
-   /** Which Dialogs do we belong to?
-    *  Used so we can get at the signals we have to connect to.
-    */
-   Dialogs * d_;
+       /// the LyXView we belong to.
+       LyXView * lv_;
 
-   /// is the buffer readonly?
-   bool readonly;
+       /** Which Dialogs do we belong to?
+        *  Used so we can get at the signals we have to connect to.
+        */
+       Dialogs * d_;
 
-   /// Hide connection.
-   SigC::Connection h_;
+       /// is the buffer readonly?
+       bool readonly;
 
-   /// Update connection.
-   SigC::Connection u_;
+       /// Hide connection.
+       SigC::Connection h_;
 
+       /// Update connection.
+       SigC::Connection u_;
 };
 
 #endif
index 12f146ff121165c556daa9bbdfe51ba939a884f3..c3a6d42fc08cd215151102fd65e9fd01190a2243 100644 (file)
@@ -2,9 +2,9 @@
 /* This file is part of
  * ======================================================
  *
- *           LyX, The Document Processor
+ *                LyX, The Document Processor
  *
- *           Copyright 2000 The LyX Team.
+ *                Copyright 2000 The LyX Team.
  *
  * ======================================================
  *
@@ -45,110 +45,108 @@ using std::vector;
 typedef Qt2CB<ControlCitation, Qt2DB<FormCitationDialogImpl> > base_class;
 
 FormCitation::FormCitation(ControlCitation & c)
-    : base_class(c, _("Citation"))
+       : base_class(c, _("Citation"))
 {}
 
 
 void FormCitation::apply()
 {
-    controller().params().setCmdName("cite");
-    controller().params().setContents(getStringFromVector(citekeys));
-    
-    string const after  = dialog_->textAfterED->text().latin1();
-    controller().params().setOptions(after);
+       controller().params().setCmdName("cite");
+       controller().params().setContents(getStringFromVector(citekeys));
+       
+       string const after  = dialog_->textAfterED->text().latin1();
+       controller().params().setOptions(after);
 }
 
 
 void FormCitation::hide()
 {
-    citekeys.clear();
-    bibkeys.clear();
-    
-    Qt2Base::hide();
+       citekeys.clear();
+       bibkeys.clear();
+       
+       Qt2Base::hide();
 }
 
 
 void FormCitation::build()
 {
-    // PENDING(kalle) Parent?
-    dialog_.reset( new FormCitationDialogImpl( this ));
-
-    dialog_->searchTypeCB->setChecked( false );
-    dialog_->searchCaseCB->setChecked( false );
-    
-    // Manage the ok, apply, restore and cancel/close buttons
-    bc().setOK(dialog_->okPB);
-    bc().setApply(dialog_->applyPB);
-    bc().setCancel(dialog_->cancelPB);
-    bc().setRestore(dialog_->restorePB);
-
-    bc().addReadOnly(dialog_->addPB);
-    bc().addReadOnly(dialog_->delPB);
-    bc().addReadOnly(dialog_->upPB);
-    bc().addReadOnly(dialog_->downPB);
-    bc().addReadOnly(dialog_->citationStyleCO);
-    bc().addReadOnly(dialog_->textBeforeED);
-    bc().addReadOnly(dialog_->textAfterED);
-
-    bc().refresh();
+       // PENDING(kalle) Parent?
+       dialog_.reset( new FormCitationDialogImpl( this ));
+
+       dialog_->searchTypeCB->setChecked( false );
+       dialog_->searchCaseCB->setChecked( false );
+       
+       // Manage the ok, apply, restore and cancel/close buttons
+       bc().setOK(dialog_->okPB);
+       bc().setApply(dialog_->applyPB);
+       bc().setCancel(dialog_->cancelPB);
+       bc().setRestore(dialog_->restorePB);
+
+       bc().addReadOnly(dialog_->addPB);
+       bc().addReadOnly(dialog_->delPB);
+       bc().addReadOnly(dialog_->upPB);
+       bc().addReadOnly(dialog_->downPB);
+       bc().addReadOnly(dialog_->citationStyleCO);
+       bc().addReadOnly(dialog_->textBeforeED);
+       bc().addReadOnly(dialog_->textAfterED);
+
+       bc().refresh();
 }      
 
 
 void FormCitation::update()
 {
-    // Make the list of all available bibliography keys
-    bibkeys = biblio::getKeys(controller().bibkeysInfo());
-    updateBrowser(dialog_->bibLB, bibkeys);
-    
-    // Ditto for the keys cited in this inset
-    citekeys = getVectorFromString(controller().params().getContents());
-    updateBrowser(dialog_->citeLB, citekeys);
+       // Make the list of all available bibliography keys
+       bibkeys = biblio::getKeys(controller().bibkeysInfo());
+       updateBrowser(dialog_->bibLB, bibkeys);
+       
+       // Ditto for the keys cited in this inset
+       citekeys = getVectorFromString(controller().params().getContents());
+       updateBrowser(dialog_->citeLB, citekeys);
 
-    // No keys have been selected yet, so...
-    dialog_->infoML->clear();
-    setBibButtons(OFF);
-    setCiteButtons(OFF);
+       // No keys have been selected yet, so...
+       dialog_->infoML->clear();
+       setBibButtons(OFF);
+       setCiteButtons(OFF);
 
-    int noKeys = int(max(bibkeys.size(), citekeys.size()));
+       int noKeys = int(max(bibkeys.size(), citekeys.size()));
 
-    // Place bounds, so that 4 <= noKeys <= 10
-    noKeys = max(4, min(10, noKeys));
+       // Place bounds, so that 4 <= noKeys <= 10
+       noKeys = max(4, min(10, noKeys));
 
-    dialog_->textAfterED->setText( controller().params().getOptions().c_str());
+       dialog_->textAfterED->setText( controller().params().getOptions().c_str());
 }
 
 
 void FormCitation::updateBrowser( QListBox* browser,
                                  vector<string> const & keys) const
 {
-    browser->clear();
-
-    for (vector<string>::const_iterator it = keys.begin();
-        it < keys.end(); ++it) {
-       string key = frontStrip(strip(*it));
-       if( !key.empty() )
-           browser->insertItem( key.c_str() );
-    }
+       browser->clear();
+
+       for (vector<string>::const_iterator it = keys.begin();
+               it < keys.end(); ++it) {
+               string key = frontStrip(strip(*it));
+               if( !key.empty() )
+                       browser->insertItem( key.c_str() );
+       }
 }
 
 
 void FormCitation::setBibButtons(State status) const
 {
-    dialog_->addPB->setEnabled( (status == ON) );
+       dialog_->addPB->setEnabled( (status == ON) );
 }
 
 
 void FormCitation::setCiteButtons(State status) const
 {
-    int const sel     = dialog_->citeLB->currentItem();
-    int const maxline = dialog_->citeLB->count()-1;
-    bool const activate      = (status == ON);
-    bool const activate_up   = (activate && sel != 0);
-    bool const activate_down = (activate && sel != maxline);
-
-    dialog_->delPB->setEnabled( activate );
-    dialog_->upPB->setEnabled( activate_up );
-    dialog_->downPB->setEnabled( activate_down );
+       int const sel = dialog_->citeLB->currentItem();
+       int const maxline = dialog_->citeLB->count()-1;
+       bool const activate = (status == ON);
+       bool const activate_up = (activate && sel != 0);
+       bool const activate_down = (activate && sel != maxline);
+
+       dialog_->delPB->setEnabled( activate );
+       dialog_->upPB->setEnabled( activate_up );
+       dialog_->downPB->setEnabled( activate_down );
 }
-
-
index 0f66001426bd6604b12e35c195808ed81cbd0616..5d4034350d9bdfe2172b50b75fe132a5eefb1f20 100644 (file)
@@ -31,42 +31,42 @@ class ControlCitation;
 class FormCitationDialogImpl;
 
 class FormCitation : public Qt2CB<ControlCitation, Qt2DB<FormCitationDialogImpl> > {
-    friend class FormCitationDialogImpl;
+       friend class FormCitationDialogImpl;
     
 public:
-    ///
-    FormCitation(ControlCitation &);
+       ///
+       FormCitation(ControlCitation &);
 
 private:
-    ///
-    enum State {
-       ///
-       ON,
        ///
-       OFF
-    };
+       enum State {
+               ///
+               ON,
+               ///
+               OFF
+       };
 
-    /// Set the Params variable for the Controller.
-    virtual void apply();
-    /// Build the dialog.
-    virtual void build();
-    /// Hide the dialog.
-    virtual void hide();
-    /// Update dialog before/whilst showing it.
-    virtual void update();
-    //         /// Filter the inputs on callback from xforms
-    //         virtual ButtonPolicy::SMInput input(FL_OBJECT *, long);
+       /// Set the Params variable for the Controller.
+       virtual void apply();
+       /// Build the dialog.
+       virtual void build();
+       /// Hide the dialog.
+       virtual void hide();
+       /// Update dialog before/whilst showing it.
+       virtual void update();
+       //      /// Filter the inputs on callback from xforms
+       //      virtual ButtonPolicy::SMInput input(FL_OBJECT *, long);
 
-    void updateBrowser(QListBox*, std::vector<string> const &) const;
-    ///
-    void setBibButtons(State) const;
-    ///
-    void setCiteButtons(State) const;
+       void updateBrowser(QListBox*, std::vector<string> const &) const;
+       ///
+       void setBibButtons(State) const;
+       ///
+       void setCiteButtons(State) const;
 
-    ///
-    std::vector<string> citekeys;
-    ///
-    std::vector<string> bibkeys;
+       ///
+       std::vector<string> citekeys;
+       ///
+       std::vector<string> bibkeys;
 };
 
 #endif // FORMCITATION_H
index 0fc1074c3b5fe7edc86af2049c7747792030c0ba..ddc96173b8ac2a078080516a5e4602a57b944646 100644 (file)
@@ -1,7 +1,9 @@
 /**
- * $Id: FormCitationDialogImpl.C,v 1.6 2001/04/02 20:08:43 kalle Exp $
+ * $Id: FormCitationDialogImpl.C,v 1.7 2001/06/05 17:05:51 lasgouttes Exp $
  */
 
+#include <config.h>
 #include "FormCitationDialogImpl.h"
 #include "Dialogs.h"
 #include "FormCitation.h"
index af5624820ce2e0d254453e34c87d05550c3d7e54..91af4a5a6de4255e71c205d7cc290b977db9e0ac 100644 (file)
 typedef Qt2CB<ControlCopyright, Qt2DB<FormCopyrightDialogImpl> > base_class;
 
 FormCopyright::FormCopyright( ControlCopyright& c ) :
-    base_class( c, _( "Copyright and Warranty" ) )
+       base_class( c, _( "Copyright and Warranty" ) )
 {
 }
 
 
 void FormCopyright::build()
 {
-    // PENDING(kalle) Parent???
-    dialog_.reset( new FormCopyrightDialogImpl() );
-    connect( dialog_.get()->closePB, SIGNAL( clicked() ),
-            this, SLOT( slotCancel() ) );
-
-    dialog_->copyrightLA->setText( controller().getCopyright().c_str() );
-    dialog_->licenseLA->setText( controller().getLicence().c_str() );
-    dialog_->disclaimerLA->setText( controller().getDisclaimer().c_str() );
-
-    // Manage the cancel/close button
-    bc().setCancel(dialog_->closePB);
-    bc().refresh();
+       // PENDING(kalle) Parent???
+       dialog_.reset( new FormCopyrightDialogImpl() );
+       connect( dialog_.get()->closePB, SIGNAL( clicked() ),
+               this, SLOT( slotCancel() ) );
+
+       dialog_->copyrightLA->setText( controller().getCopyright().c_str() );
+       dialog_->licenseLA->setText( controller().getLicence().c_str() );
+       dialog_->disclaimerLA->setText( controller().getDisclaimer().c_str() );
+
+       // Manage the cancel/close button
+       bc().setCancel(dialog_->closePB);
+       bc().refresh();
 }
-
-
-
index cf89fafce797ccfe6f7683c18353545621be3f2e..599d87dbe7c58a0a44feed0957c489b8b08a6fb1 100644 (file)
@@ -30,7 +30,7 @@ class ControlCopyright;
   @author Kalle Dalheimer
   */
 class FormCopyright 
-  : public Qt2CB<ControlCopyright, Qt2DB<FormCopyrightDialogImpl> >
+       : public Qt2CB<ControlCopyright, Qt2DB<FormCopyrightDialogImpl> >
 {
 public: 
        FormCopyright( ControlCopyright& );
index f69da0efc0c653a19579a11d586c2ca8f4f17023..103d51efd144be21cdef0de47fcf11f5579675cd 100644 (file)
@@ -36,23 +36,23 @@ FormCredits::FormCredits(ControlCredits & c)
 
 void FormCredits::build()
 {
-    // PENDING(kalle) Parent?
-    dialog_.reset(new FormCreditsDialogImpl( this ));
-
-    // Manage the cancel/close button
-    bc().setCancel(dialog_->okPB);
-    bc().refresh();
-    
-    std::stringstream ss;
-    QString xformscredits = controller().getCredits( ss ).str().c_str();
-    QStringList xformslist = QStringList::split( '\n', controller().getCredits( ss ).str().c_str(), true );
-    for( QStringList::Iterator it = xformslist.begin(); it != xformslist.end(); ++it ) {
-       QString line = *it;
-       if( line.left( 2 ) == "@b" )
-           dialog_->creditsTV->append( "<b>" + line.mid( 2 ) + "</b>" );
-       else if( line.left(  2 ) == "@i" )
-           dialog_->creditsTV->append( "<i>" + line.mid( 2 ) + "</i>" );
-       else
-           dialog_->creditsTV->append( line );
-    }
+       // PENDING(kalle) Parent?
+       dialog_.reset(new FormCreditsDialogImpl( this ));
+
+       // Manage the cancel/close button
+       bc().setCancel(dialog_->okPB);
+       bc().refresh();
+
+       std::stringstream ss;
+       QString xformscredits = controller().getCredits( ss ).str().c_str();
+       QStringList xformslist = QStringList::split( '\n', controller().getCredits( ss ).str().c_str(), true );
+       for( QStringList::Iterator it = xformslist.begin(); it != xformslist.end(); ++it ) {
+               QString line = *it;
+               if( line.left( 2 ) == "@b" )
+                       dialog_->creditsTV->append( "<b>" + line.mid( 2 ) + "</b>" );
+               else if( line.left(  2 ) == "@i" )
+                       dialog_->creditsTV->append( "<i>" + line.mid( 2 ) + "</i>" );
+               else
+                       dialog_->creditsTV->append( line );
+       }
 }
index 98b675e52d71e31eb0f98664ded77811b233a9b3..95e2ece40766f1f6eb3148f4acd7958d32f0222f 100644 (file)
@@ -1,11 +1,11 @@
 /* This file is part of
  * ======================================================
  *
- *           LyX, The Document Processor
+ *                LyX, The Document Processor
  *
- *           Copyright 2000 The LyX Team.
+ *                Copyright 2000 The LyX Team.
  *
- *           @author Kalle Dalheimer
+ *                @author Kalle Dalheimer
  *
  *======================================================*/
 
@@ -47,971 +47,973 @@ using SigC::slot;
 typedef Qt2CB<ControlDocument, Qt2DB<FormDocumentDialogImpl> > base_class;
 
 FormDocument::FormDocument( ControlDocument& c )
-    : base_class( c, _("Document Layout"))
+       : base_class( c, _("Document Layout"))
 {
 }
 
 
 void FormDocument::build()
 {
-    int n;
-
-    // the tabbed folder
-    // PENDING(kalle) Parent???
-    dialog_.reset( new FormDocumentDialogImpl());
-
-    // Manage the restore, ok, apply, restore and cancel/close buttons
-    bc().setOK(dialog_->okPB);
-    bc().setApply(dialog_->applyPB);
-    bc().setCancel(dialog_->cancelPB);
-    bc().setRestore(dialog_->restorePB);
-    bc().refresh();
-
-    // the document paper page
-    FormDocumentDialogImpl* dialog = dialog_.get();
-    dialog->papersize2CO->insertItem( _( "Default" ) );
-    dialog->papersize2CO->insertItem( _( "Custom" ) );
-    dialog->papersize2CO->insertItem( _( "USletter" ) );
-    dialog->papersize2CO->insertItem( _( "USlegal" ) );
-    dialog->papersize2CO->insertItem( _( "USexecutive" ) );
-    dialog->papersize2CO->insertItem( _( "A3" ) );
-    dialog->papersize2CO->insertItem( _( "A4" ) );
-    dialog->papersize2CO->insertItem( _( "A5" ) );
-    dialog->papersize2CO->insertItem( _( "B3" ) );
-    dialog->papersize2CO->insertItem( _( "B4" ) );
-    dialog->papersize2CO->insertItem( _( "B5" ) );
-
-    dialog->paperPackageCO->insertItem( _( "None" ) );
-    dialog->paperPackageCO->insertItem( _( "A4 small Margins (only portrait)" ) );
-    dialog->paperPackageCO->insertItem( _( "A4 very small Margins (only portrait)" ) );
-    dialog->paperPackageCO->insertItem( _( "A4 very wide margins (only portrait)" ) );
-
-    bc().addReadOnly (dialog->paperPackageCO);
-    bc().addReadOnly (dialog->orientationBG);
-    bc().addReadOnly (dialog->portraitRB);
-    bc().addReadOnly (dialog->landscapeRB);
-    bc().addReadOnly (dialog->papersize2CO);
-    bc().addReadOnly (dialog->useGeometryCB);
-    bc().addReadOnly (dialog->customWidthED);
-    bc().addReadOnly (dialog->customHeightED);
-    bc().addReadOnly (dialog->topMarginED);
-    bc().addReadOnly (dialog->bottomMarginED);
-    bc().addReadOnly (dialog->leftMarginED);
-    bc().addReadOnly (dialog->rightMarginED);
-    bc().addReadOnly (dialog->headHeightED);
-    bc().addReadOnly (dialog->headSepED);
-    bc().addReadOnly (dialog->footSkipED);
-
-    // the document page
-    for (LyXTextClassList::const_iterator cit = textclasslist.begin();
-        cit != textclasslist.end(); ++cit)
-       {
-           docClassCO->insertItem( (*cit).description().c_str() );
+       int n;
+
+       // the tabbed folder
+       // PENDING(kalle) Parent???
+       dialog_.reset( new FormDocumentDialogImpl());
+
+       // Manage the restore, ok, apply, restore and cancel/close buttons
+       bc().setOK(dialog_->okPB);
+       bc().setApply(dialog_->applyPB);
+       bc().setCancel(dialog_->cancelPB);
+       bc().setRestore(dialog_->restorePB);
+       bc().refresh();
+
+       // the document paper page
+       FormDocumentDialogImpl* dialog = dialog_.get();
+       dialog->papersize2CO->insertItem( _( "Default" ) );
+       dialog->papersize2CO->insertItem( _( "Custom" ) );
+       dialog->papersize2CO->insertItem( _( "USletter" ) );
+       dialog->papersize2CO->insertItem( _( "USlegal" ) );
+       dialog->papersize2CO->insertItem( _( "USexecutive" ) );
+       dialog->papersize2CO->insertItem( _( "A3" ) );
+       dialog->papersize2CO->insertItem( _( "A4" ) );
+       dialog->papersize2CO->insertItem( _( "A5" ) );
+       dialog->papersize2CO->insertItem( _( "B3" ) );
+       dialog->papersize2CO->insertItem( _( "B4" ) );
+       dialog->papersize2CO->insertItem( _( "B5" ) );
+
+       dialog->paperPackageCO->insertItem( _( "None" ) );
+       dialog->paperPackageCO->insertItem( _( "A4 small Margins (only portrait)" ) );
+       dialog->paperPackageCO->insertItem( _( "A4 very small Margins (only portrait)" ) );
+       dialog->paperPackageCO->insertItem( _( "A4 very wide margins (only portrait)" ) );
+
+       bc().addReadOnly (dialog->paperPackageCO);
+       bc().addReadOnly (dialog->orientationBG);
+       bc().addReadOnly (dialog->portraitRB);
+       bc().addReadOnly (dialog->landscapeRB);
+       bc().addReadOnly (dialog->papersize2CO);
+       bc().addReadOnly (dialog->useGeometryCB);
+       bc().addReadOnly (dialog->customWidthED);
+       bc().addReadOnly (dialog->customHeightED);
+       bc().addReadOnly (dialog->topMarginED);
+       bc().addReadOnly (dialog->bottomMarginED);
+       bc().addReadOnly (dialog->leftMarginED);
+       bc().addReadOnly (dialog->rightMarginED);
+       bc().addReadOnly (dialog->headHeightED);
+       bc().addReadOnly (dialog->headSepED);
+       bc().addReadOnly (dialog->footSkipED);
+
+       // the document page
+       for (LyXTextClassList::const_iterator cit = textclasslist.begin();
+                cit != textclasslist.end(); ++cit) {
+               docClassCO->insertItem( (*cit).description().c_str() );
        }
 
-    dialog->docSpacingCO->insertItem( _( "Single" ) );
-    dialog->docSpacingCO->insertItem( _( "OneHalf" ) );
-    dialog->docSpacingCO->insertItem( _( "Double" ) );
-    dialog->docSpacingCO->insertItem( _( "Other" ) );
-
-    dialog->docFontSizeCO->insertItem( _( "default" ) );
-    dialog->docFontSizeCO->insertItem( _( "10" ) );
-    dialog->docFontSizeCO->insertItem( _( "11" ) );
-    dialog->docFontSizeCO->insertItem( _( "12" ) );
-    for (n=0; tex_fonts[n][0]; ++n) {
-       dialog->docFontsCO->insertItem( tex_fonts[n] );
-    }
-
-    dialog->docPagestyleCO->insertItem( _( "default" ) );
-    dialog->docPagestyleCO->insertItem( _( "empty" ) );
-    dialog->docPagestyleCO->insertItem( _( "plain" ) );
-    dialog->docPagestyleCO->insertItem( _( "headings" ) );
-    dialog->docPagestyleCO->insertItem( _( "fancy" ) );
-
-    dialog->docSkipCO->insertItem( _( "Smallskip" ) );
-    dialog->docSkipCO->insertItem( _( "Medskip" ) );
-    dialog->docSkipCO->insertItem( _( "Bigskip" ) );
-    dialog->docSkipCO->insertItem( _( "Length" ) );
-
-    bc().addReadOnly (dialog->docIndentRB);
-    bc().addReadOnly (dialog->docSkipRB);
-
-    bc().addReadOnly (dialog->docPagestyleCO);
-    bc().addReadOnly (dialog->docFontsCO);
-    bc().addReadOnly (dialog->docFontsizeCO);
-    bc().addReadOnly (dialog->docSidesOneRB);
-    bc().addReadOnly (dialog->docSidesTwoRB);
-    bc().addReadOnly (dialog->docColumnsOneRB);
-    bc().addReadOnly (dialog->docColumnsTwoRB);
-    bc().addReadOnly (dialog->docExtraED);
-    bc().addReadOnly (dialog->docSkipED);
-    bc().addReadOnly (dialog->docSkipCO);
-    bc().addReadOnly (dialog->docSpacingCO);
-    bc().addReadOnly (dialog->docSpacingED);
-
-    // the document language page
-    dialog->inputEncCO->insertItem( _( "default" ) );
-    dialog->inputEncCO->insertItem( _( "auto" ) );
-    dialog->inputEncCO->insertItem( _( "latin1" ) );
-    dialog->inputEncCO->insertItem( _( "latin2" ) );
-    dialog->inputEncCO->insertItem( _( "latin5" ) );
-    dialog->inputEncCO->insertItem( _( "latin9" ) );
-    dialog->inputEncCO->insertItem( _( "koi8-r" ) );
-    dialog->inputEncCO->insertItem( _( "koi8-u" ) );
-    dialog->inputEncCO->insertItem( _( "cp866" ) );
-    dialog->inputEncCO->insertItem( _( "cp1251" ) );
-    dialog->inputEncCO->insertItem( _( "iso88595" ) );
-
-    for (Languages::const_iterator cit = languages.begin();
+       dialog->docSpacingCO->insertItem( _( "Single" ) );
+       dialog->docSpacingCO->insertItem( _( "OneHalf" ) );
+       dialog->docSpacingCO->insertItem( _( "Double" ) );
+       dialog->docSpacingCO->insertItem( _( "Other" ) );
+
+       dialog->docFontSizeCO->insertItem( _( "default" ) );
+       dialog->docFontSizeCO->insertItem( _( "10" ) );
+       dialog->docFontSizeCO->insertItem( _( "11" ) );
+       dialog->docFontSizeCO->insertItem( _( "12" ) );
+       for (n=0; tex_fonts[n][0]; ++n) {
+               dialog->docFontsCO->insertItem( tex_fonts[n] );
+       }
+
+       dialog->docPagestyleCO->insertItem( _( "default" ) );
+       dialog->docPagestyleCO->insertItem( _( "empty" ) );
+       dialog->docPagestyleCO->insertItem( _( "plain" ) );
+       dialog->docPagestyleCO->insertItem( _( "headings" ) );
+       dialog->docPagestyleCO->insertItem( _( "fancy" ) );
+
+       dialog->docSkipCO->insertItem( _( "Smallskip" ) );
+       dialog->docSkipCO->insertItem( _( "Medskip" ) );
+       dialog->docSkipCO->insertItem( _( "Bigskip" ) );
+       dialog->docSkipCO->insertItem( _( "Length" ) );
+
+       bc().addReadOnly (dialog->docIndentRB);
+       bc().addReadOnly (dialog->docSkipRB);
+
+       bc().addReadOnly (dialog->docPagestyleCO);
+       bc().addReadOnly (dialog->docFontsCO);
+       bc().addReadOnly (dialog->docFontsizeCO);
+       bc().addReadOnly (dialog->docSidesOneRB);
+       bc().addReadOnly (dialog->docSidesTwoRB);
+       bc().addReadOnly (dialog->docColumnsOneRB);
+       bc().addReadOnly (dialog->docColumnsTwoRB);
+       bc().addReadOnly (dialog->docExtraED);
+       bc().addReadOnly (dialog->docSkipED);
+       bc().addReadOnly (dialog->docSkipCO);
+       bc().addReadOnly (dialog->docSpacingCO);
+       bc().addReadOnly (dialog->docSpacingED);
+
+       // the document language page
+       dialog->inputEncCO->insertItem( _( "default" ) );
+       dialog->inputEncCO->insertItem( _( "auto" ) );
+       dialog->inputEncCO->insertItem( _( "latin1" ) );
+       dialog->inputEncCO->insertItem( _( "latin2" ) );
+       dialog->inputEncCO->insertItem( _( "latin5" ) );
+       dialog->inputEncCO->insertItem( _( "latin9" ) );
+       dialog->inputEncCO->insertItem( _( "koi8-r" ) );
+       dialog->inputEncCO->insertItem( _( "koi8-u" ) );
+       dialog->inputEncCO->insertItem( _( "cp866" ) );
+       dialog->inputEncCO->insertItem( _( "cp1251" ) );
+       dialog->inputEncCO->insertItem( _( "iso88595" ) );
+
+       for (Languages::const_iterator cit = languages.begin();
         cit != languages.end(); ++cit) {
-       dialog->languageCO->insertItem( (*cit).second.lang() );
-    }
-
-    dialog->quotesLanguageCO->insertItem( _( "``text''" ) );
-    dialog->quotesLanguageCO->insertItem( _( "''text''" ) );
-    dialog->quotesLanguageCO->insertItem( _( ",,text``" ) );
-    dialog->quotesLanguageCO->insertItem( _( ",,text''" ) );
-    dialog->quotesLanguageCO->insertItem( _( "«text»" ) );
-    dialog->quotesLanguageCO->insertItem( _( "»text«" ) );
-
-    bc().addReadOnly (dialog->inputEncCO);
-
-    // the document options page
-    dialog->secNumDepthSB->setRange( -2, 5 );
-    dialog->tocDepthSB->setRange( -1, 5 );
-    dialog->secNumDepthSB->setSteps( 1, 1 );
-    dialog->tocDepthSB->setRange( 1, 1 );
-    for (n=0; tex_graphics[n][0]; ++n) {
-       dialog->postscriptDriverCO->insertItem( tex_graphics[n] );
-    }
-
-    bc().addReadOnly (dialog->secNumDepthSB);
-    bc().addReadOnly (dialog->tocDepthSB);
-    bc().addReadOnly (dialog->useAmsMathCB);
-    bc().addReadOnly (dialog->floatPlacementED);
-    bc().addReadOnly (dialog->postscriptDriverCO);
-
-    // the document bullets page
-    dialog->bulletSizeCO->insertItem( _( "default" ) );
-    dialog->bulletSizeCO->insertItem( _( "tiny" ) );
-    dialog->bulletSizeCO->insertItem( _( "script" ) );
-    dialog->bulletSizeCO->insertItem( _( "footnote" ) );
-    dialog->bulletSizeCO->insertItem( _( "small" ) );
-    dialog->bulletSizeCO->insertItem( _( "normal" ) );
-    dialog->bulletSizeCO->insertItem( _( "large" ) );
-    dialog->bulletSizeCO->insertItem( _( "Large" ) );
-    dialog->bulletSizeCO->insertItem( _( "LARGE" ) );
-    dialog->bulletSizeCO->insertItem( _( "huge" ) );
-    dialog->bulletSizeCO->insertItem( _( "Huge" ) );
-
-    dialog->bulletSizeCO->setCurrentItem( 0 );
-    dialog->bulletLatexED->setMaxLength( 80 );
-
-    bc().addReadOnly (dialog->bulletPanelBG);
-    bc().addReadOnly (dialog->bulletSizeCO);
-    bc().addReadOnly (dialog->bulletLatexED);
+               dialog->languageCO->insertItem( (*cit).second.lang() );
+       }
+
+       dialog->quotesLanguageCO->insertItem( _( "``text''" ) );
+       dialog->quotesLanguageCO->insertItem( _( "''text''" ) );
+       dialog->quotesLanguageCO->insertItem( _( ",,text``" ) );
+       dialog->quotesLanguageCO->insertItem( _( ",,text''" ) );
+       dialog->quotesLanguageCO->insertItem( _( "«text»" ) );
+       dialog->quotesLanguageCO->insertItem( _( "»text«" ) );
+
+       bc().addReadOnly (dialog->inputEncCO);
+
+       // the document options page
+       dialog->secNumDepthSB->setRange( -2, 5 );
+       dialog->tocDepthSB->setRange( -1, 5 );
+       dialog->secNumDepthSB->setSteps( 1, 1 );
+       dialog->tocDepthSB->setRange( 1, 1 );
+       for (n=0; tex_graphics[n][0]; ++n) {
+               dialog->postscriptDriverCO->insertItem( tex_graphics[n] );
+       }
+
+       bc().addReadOnly (dialog->secNumDepthSB);
+       bc().addReadOnly (dialog->tocDepthSB);
+       bc().addReadOnly (dialog->useAmsMathCB);
+       bc().addReadOnly (dialog->floatPlacementED);
+       bc().addReadOnly (dialog->postscriptDriverCO);
+
+       // the document bullets page
+       dialog->bulletSizeCO->insertItem( _( "default" ) );
+       dialog->bulletSizeCO->insertItem( _( "tiny" ) );
+       dialog->bulletSizeCO->insertItem( _( "script" ) );
+       dialog->bulletSizeCO->insertItem( _( "footnote" ) );
+       dialog->bulletSizeCO->insertItem( _( "small" ) );
+       dialog->bulletSizeCO->insertItem( _( "normal" ) );
+       dialog->bulletSizeCO->insertItem( _( "large" ) );
+       dialog->bulletSizeCO->insertItem( _( "Large" ) );
+       dialog->bulletSizeCO->insertItem( _( "LARGE" ) );
+       dialog->bulletSizeCO->insertItem( _( "huge" ) );
+       dialog->bulletSizeCO->insertItem( _( "Huge" ) );
+
+       dialog->bulletSizeCO->setCurrentItem( 0 );
+       dialog->bulletLatexED->setMaxLength( 80 );
+
+       bc().addReadOnly (dialog->bulletPanelBG);
+       bc().addReadOnly (dialog->bulletSizeCO);
+       bc().addReadOnly (dialog->bulletLatexED);
 }
 
 
 void FormDocument::apply()
 {
-    if (!lv_->view()->available() || !dialog_.get())
-       return;
-
-    bool redo = class_apply();
-    paper_apply();
-    redo = language_apply() || redo;
-    redo = options_apply() || redo;
-    bullets_apply();
-
-    if (redo) {
-       lv_->view()->redoCurrentBuffer();
-    }
-    lv_->buffer()->markDirty();
-    setMinibuffer(lv_, _("Document layout set"));
+       if (!lv_->view()->available() || !dialog_.get())
+               return;
+
+       bool redo = class_apply();
+       paper_apply();
+       redo = language_apply() || redo;
+       redo = options_apply() || redo;
+       bullets_apply();
+
+       if (redo) {
+               lv_->view()->redoCurrentBuffer();
+       }
+       lv_->buffer()->markDirty();
+       setMinibuffer(lv_, _("Document layout set"));
 }
 
 
 void FormDocument::cancel()
 {
-    // this avoids confusion when reopening
-    BufferParams & param = lv_->buffer()->params;
-    param.temp_bullets[0] = param.user_defined_bullets[0];
-    param.temp_bullets[1] = param.user_defined_bullets[1];
-    param.temp_bullets[2] = param.user_defined_bullets[2];
-    param.temp_bullets[3] = param.user_defined_bullets[3];
-    hide();
+       // this avoids confusion when reopening
+       BufferParams & param = lv_->buffer()->params;
+       param.temp_bullets[0] = param.user_defined_bullets[0];
+       param.temp_bullets[1] = param.user_defined_bullets[1];
+       param.temp_bullets[2] = param.user_defined_bullets[2];
+       param.temp_bullets[3] = param.user_defined_bullets[3];
+       hide();
 }
 
 
 void FormDocument::update()
 {
-    if (!dialog_.get())
-        return;
+       if (!dialog_.get())
+               return;
 
-    checkReadOnly();
+       checkReadOnly();
 
-    BufferParams const & params = lv_->buffer()->params;
+       BufferParams const & params = lv_->buffer()->params;
 
-    class_update(params);
-    paper_update(params);
-    language_update(params);
-    options_update(params);
-    bullets_update(params);
+       class_update(params);
+       paper_update(params);
+       language_update(params);
+       options_update(params);
+       bullets_update(params);
 }
 
 
 #ifdef K
 bool FormDocument::input( FL_OBJECT * ob, long data )
 {
-    State cb = static_cast<State>( data );
-
-    switch (cb) {
-    case CHECKCHOICECLASS:
-       CheckChoiceClass(ob, 0);
-       break;
-    case CHOICEBULLETSIZE:
-       ChoiceBulletSize(ob, 0);
-       break;
-    case INPUTBULLETLATEX:
-       InputBulletLaTeX(ob, 0);
-       break;
-    case BULLETDEPTH1:
-    case BULLETDEPTH2:
-    case BULLETDEPTH3:
-    case BULLETDEPTH4:
-       BulletDepth(ob, cb);
-       break;
-    case BULLETPANEL1:
-    case BULLETPANEL2:
-    case BULLETPANEL3:
-    case BULLETPANEL4:
-    case BULLETPANEL5:
-    case BULLETPANEL6:
-       BulletPanel(ob, cb);
-       break;
-    case BULLETBMTABLE:
-       BulletBMTable(ob, 0);
-       break;
-    default:
-       break;
-    }
-
-    switch (data) {
-    case INPUT:
-    case CHECKCHOICECLASS:
-    case CHOICEBULLETSIZE:
-    case INPUTBULLETLATEX:
-    case BULLETBMTABLE:
-       return CheckDocumentInput(ob, 0);
-    default:
-       break;
-    }
-
-    return true;
+       State cb = static_cast<State>( data );
+
+       switch (cb) {
+               case CHECKCHOICECLASS:
+                       CheckChoiceClass(ob, 0);
+                       break;
+               case CHOICEBULLETSIZE:
+                       ChoiceBulletSize(ob, 0);
+                       break;
+               case INPUTBULLETLATEX:
+                       InputBulletLaTeX(ob, 0);
+                       break;
+               case BULLETDEPTH1:
+               case BULLETDEPTH2:
+               case BULLETDEPTH3:
+               case BULLETDEPTH4:
+                       BulletDepth(ob, cb);
+                       break;
+               case BULLETPANEL1:
+               case BULLETPANEL2:
+               case BULLETPANEL3:
+               case BULLETPANEL4:
+               case BULLETPANEL5:
+               case BULLETPANEL6:
+                       BulletPanel(ob, cb);
+                       break;
+               case BULLETBMTABLE:
+                       BulletBMTable(ob, 0);
+                       break;
+               default:
+                       break;
+       }
+
+       switch (data) {
+               case INPUT:
+               case CHECKCHOICECLASS:
+               case CHOICEBULLETSIZE:
+               case INPUTBULLETLATEX:
+               case BULLETBMTABLE:
+                       return CheckDocumentInput(ob, 0);
+               default:
+                       break;
+       }
+
+       return true;
 }
 #endif
 
 
+// FIXME: "K" ???
 #ifdef K
 void FormDocument::ComboInputCB(int, void * v, Combox * combox)
 {
-    FormDocument * pre = static_cast<FormDocument*>(v);
-    if (combox == pre->combo_doc_class.get())
-       pre->CheckChoiceClass(0, 0);
-    pre->bc().valid(pre->CheckDocumentInput(0,0));
+       FormDocument * pre = static_cast<FormDocument*>(v);
+       if (combox == pre->combo_doc_class.get())
+               pre->CheckChoiceClass(0, 0);
+       pre->bc().valid(pre->CheckDocumentInput(0,0));
 }
 #endif
 
 bool FormDocument::class_apply()
 {
-    bool redo = false;
-    BufferParams &params = lv_->buffer()->params;
-
-    // If default skip is a "Length" but there's no text in the
-    // input field, reset the kind to "Medskip", which is the default.
-    if( ( dialog_->docSkipCO->currentItem() == 3 ) &&
-       dialog_->docSkipED->text().isEmpty() )
-       dialog_->docSkipCO->setCurrentItem( 1 );
-
-    params.fonts = dialog_->docFontsCO->currentText();
-    params.fontsize = dialog_->docFontSizeCO->currentText();
-    params.pagestyle = dialog->docPagestyleCO->currentText();
-    
-    unsigned int const new_class = dialog_->docClassCO->currentItem();
-    
-    if (params.textclass != new_class) {
-       // try to load new_class
-       if (textclasslist.Load(new_class)) {
-           // successfully loaded
-           redo = true;
-           setMinibuffer(lv_, _("Converting document to new document class..."));
-           CutAndPaste cap;
-           int ret = cap.SwitchLayoutsBetweenClasses(
-                                                     params.textclass, new_class,
-                                                     lv_->buffer()->paragraph);                
-           if (ret) {  
-               string s;
-               if (ret==1) {
-                   s = _("One paragraph couldn't be converted");
+       bool redo = false;
+       BufferParams &params = lv_->buffer()->params;
+
+       // If default skip is a "Length" but there's no text in the
+       // input field, reset the kind to "Medskip", which is the default.
+       if( ( dialog_->docSkipCO->currentItem() == 3 ) &&
+               dialog_->docSkipED->text().isEmpty() )
+               dialog_->docSkipCO->setCurrentItem( 1 );
+
+       params.fonts = dialog_->docFontsCO->currentText();
+       params.fontsize = dialog_->docFontSizeCO->currentText();
+       params.pagestyle = dialog->docPagestyleCO->currentText();
+       
+       unsigned int const new_class = dialog_->docClassCO->currentItem();
+       
+       if (params.textclass != new_class) {
+               // try to load new_class
+               if (textclasslist.Load(new_class)) {
+                       // successfully loaded
+                       redo = true;
+                       setMinibuffer(lv_, _("Converting document to new document class..."));
+                       CutAndPaste cap;
+                       int ret = cap.SwitchLayoutsBetweenClasses(params.textclass, new_class,
+                                                                 lv_->buffer()->paragraph);            
+                       if (ret) {
+                               string s;
+                               if (ret==1) {
+                                       s = _("One paragraph couldn't be converted");
+                               } else {
+                                       s += tostr(ret);
+                                       s += _(" paragraphs couldn't be converted");
+                               }
+                               WriteAlert(_("Conversion Errors!"),s,
+                                          _("into chosen document class"));
+                       }
+
+                       params.textclass = new_class;
                } else {
-                   s += tostr(ret);
-                   s += _(" paragraphs couldn't be converted");
+                       // problem changing class -- warn user and retain old style
+                       WriteAlert(_("Conversion Errors!"),
+                                  _("Errors loading new document class."),
+                                  _("Reverting to original document class."));
+                       dialog_->docClassCO->setCurrentItem( params.textclass );
                }
-               WriteAlert(_("Conversion Errors!"),s,
-                          _("into chosen document class"));
-           }
-
-           params.textclass = new_class;
-       } else {
-           // problem changing class -- warn user and retain old style
-           WriteAlert(_("Conversion Errors!"),
-                      _("Errors loading new document class."),
-                      _("Reverting to original document class."));
-           dialog_->docClassCO->setCurrentItem( params.textclass );
        }
-    }
-    BufferParams::PARSEP tmpsep = params.paragraph_separation;
-    if( dialog_->_docIndentRB->isChecked() )
-       params.paragraph_separation = BufferParams::PARSEP_INDENT;
-    else
-       params.paragraph_separation = BufferParams::PARSEP_SKIP;
-    if (tmpsep != params.paragraph_separation)
-       redo = true;
-
-    VSpace tmpdefskip = params.getDefSkip();
-    switch( dialog_->docSkipCO->currentItem() ) {
-    case 0:
-       params.setDefSkip(VSpace(VSpace::SMALLSKIP));
-       break;
-    case 1:
-       params.setDefSkip(VSpace(VSpace::MEDSKIP));
-       break;
-    case 2:
-       params.setDefSkip(VSpace(VSpace::BIGSKIP));
-       break;
-    case 3:
-       params.setDefSkip
-           (VSpace(LyXGlueLength(dialog_->docSkipED->text())));
-       break;
-       // DocumentDefskipCB assures that this never happens
-    default:
-       params.setDefSkip(VSpace(VSpace::MEDSKIP));
-       break;
-    }
-    if (!(tmpdefskip == params.getDefSkip()))
-       redo = true;
-
-    if( dialog_->docColumnsTwo->isChecked() )
-       params.columns = 2;
-    else
-       params.columns = 1;
-    if( dialog_->docSidesTwo->isChecked() )
-       params.sides = LyXTextClass::TwoSides;
-    else
-       params.sides = LyXTextClass::OneSide;
-
-    Spacing tmpSpacing = params.spacing;
-    switch( dialog_->docSpacingCO->currentItem() ) {
-    case 0:
-       lyxerr[Debug::INFO] << "Spacing: SINGLE\n";
-       params.spacing.set(Spacing::Single);
-       break;
-    case 1:
-       lyxerr[Debug::INFO] << "Spacing: ONEHALF\n";
-       params.spacing.set(Spacing::Onehalf);
-       break;
-    case 2:
-       lyxerr[Debug::INFO] << "Spacing: DOUBLE\n";
-       params.spacing.set(Spacing::Double);
-       break;
-    case 3:
-       lyxerr[Debug::INFO] << "Spacing: OTHER\n";
-       params.spacing.set(Spacing::Other,
-                          dialog_->docSpacingED->text() );
-       break;
-    }
-    if (tmpSpacing != params.spacing)
-       redo = true;
-
-    params.options = docExtraED->text();
-
-    return redo;
+       BufferParams::PARSEP tmpsep = params.paragraph_separation;
+       if( dialog_->_docIndentRB->isChecked() )
+               params.paragraph_separation = BufferParams::PARSEP_INDENT;
+       else
+               params.paragraph_separation = BufferParams::PARSEP_SKIP;
+       if (tmpsep != params.paragraph_separation)
+               redo = true;
+
+       VSpace tmpdefskip = params.getDefSkip();
+       switch( dialog_->docSkipCO->currentItem() ) {
+               case 0:
+                       params.setDefSkip(VSpace(VSpace::SMALLSKIP));
+                       break;
+               case 1:
+                       params.setDefSkip(VSpace(VSpace::MEDSKIP));
+                       break;
+               case 2:
+                       params.setDefSkip(VSpace(VSpace::BIGSKIP));
+                       break;
+               case 3:
+                       params.setDefSkip
+                               (VSpace(LyXGlueLength(dialog_->docSkipED->text())));
+                       break;
+               // DocumentDefskipCB assures that this never happens
+               // ... so why is there code for it ?
+               default:
+                       params.setDefSkip(VSpace(VSpace::MEDSKIP));
+               break;
+       }
+       if (!(tmpdefskip == params.getDefSkip()))
+               redo = true;
+
+       if( dialog_->docColumnsTwo->isChecked() )
+               params.columns = 2;
+       else
+               params.columns = 1;
+       if( dialog_->docSidesTwo->isChecked() )
+               params.sides = LyXTextClass::TwoSides;
+       else
+               params.sides = LyXTextClass::OneSide;
+
+       Spacing tmpSpacing = params.spacing;
+       switch( dialog_->docSpacingCO->currentItem() ) {
+               case 0:
+                       lyxerr[Debug::INFO] << "Spacing: SINGLE\n";
+                       params.spacing.set(Spacing::Single);
+                       break;
+               case 1:
+                       lyxerr[Debug::INFO] << "Spacing: ONEHALF\n";
+                       params.spacing.set(Spacing::Onehalf);
+                       break;
+               case 2:
+                       lyxerr[Debug::INFO] << "Spacing: DOUBLE\n";
+                       params.spacing.set(Spacing::Double);
+                       break;
+               case 3:
+                       lyxerr[Debug::INFO] << "Spacing: OTHER\n";
+                       params.spacing.set(Spacing::Other,
+                                  dialog_->docSpacingED->text() );
+                       break;
+       }
+       if (tmpSpacing != params.spacing)
+               redo = true;
+
+       params.options = docExtraED->text();
+
+       return redo;
 }
 
 
 void FormDocument::paper_apply()
 {
-    BufferParams & params = lv_->buffer()->params;
-
-    params.papersize2 =
-       static_cast<char>(dialog_->papersize2CO->currentItem());
-    params.paperpackage =
-       static_cast<char>(dialog_->paperPackageCO->currentItem() );
-    params.use_geometry = dialog_->useGeometryCB->isChecked();
-    if (dialog_->landscapeRB->isChecked() )
-       params.orientation = BufferParams::ORIENTATION_LANDSCAPE;
-    else
-       params.orientation = BufferParams::ORIENTATION_PORTRAIT;
-    params.paperwidth = dialog_->customWidthED->text();
-    params.paperheight = dialog_->customHeightED->text();
-    params.leftmargin = dialog_->leftMarginED->text();
-    params.topmargin = dialog_->topMarginED->text();
-    params.rightmargin = dialog_->rightMarginED->text();
-    params.bottommargin = dialog_->bottomMarginED->text();
-    params.headheight = dialog_->headHeightED->text();
-    params.headsep = dialog_->headSepED->text();
-    params.footskip = dialog_->footSkipED->text();
-    lv_->buffer()->setPaperStuff();
+       BufferParams & params = lv_->buffer()->params;
+
+       params.papersize2 =
+               static_cast<char>(dialog_->papersize2CO->currentItem());
+       params.paperpackage =
+               static_cast<char>(dialog_->paperPackageCO->currentItem() );
+       params.use_geometry = dialog_->useGeometryCB->isChecked();
+       if (dialog_->landscapeRB->isChecked() )
+               params.orientation = BufferParams::ORIENTATION_LANDSCAPE;
+       else
+               params.orientation = BufferParams::ORIENTATION_PORTRAIT;
+       params.paperwidth = dialog_->customWidthED->text();
+       params.paperheight = dialog_->customHeightED->text();
+       params.leftmargin = dialog_->leftMarginED->text();
+       params.topmargin = dialog_->topMarginED->text();
+       params.rightmargin = dialog_->rightMarginED->text();
+       params.bottommargin = dialog_->bottomMarginED->text();
+       params.headheight = dialog_->headHeightED->text();
+       params.headsep = dialog_->headSepED->text();
+       params.footskip = dialog_->footSkipED->text();
+       lv_->buffer()->setPaperStuff();
 }
 
 
 bool FormDocument::language_apply()
 {
-    BufferParams & params = lv_->buffer()->params;
-    InsetQuotes::quote_language lga = InsetQuotes::EnglishQ;
-    bool redo = false;
-
-    switch (dialog_->quotesLanguageCO->currentItem() ) {
-    case 0:
-       lga = InsetQuotes::EnglishQ;
-       break;
-    case 1:
-       lga = InsetQuotes::SwedishQ;
-       break;
-    case 2:
-       lga = InsetQuotes::GermanQ;
-       break;
-    case 3:
-       lga = InsetQuotes::PolishQ;
-       break;
-    case 4:
-       lga = InsetQuotes::FrenchQ;
-       break;
-    case 5:
-       lga = InsetQuotes::DanishQ;
-       break;
-    }
-    params.quotes_language = lga;
-    if (dialog_->singleRB->isChecked() )
-       params.quotes_times = InsetQuotes::SingleQ;
-    else
-       params.quotes_times = InsetQuotes::DoubleQ;
-
-    Language const * old_language = params.language;
-    Language const * new_language =
+       BufferParams & params = lv_->buffer()->params;
+       InsetQuotes::quote_language lga = InsetQuotes::EnglishQ;
+       bool redo = false;
+
+       switch (dialog_->quotesLanguageCO->currentItem() ) {
+               case 0:
+                       lga = InsetQuotes::EnglishQ;
+                       break;
+               case 1:
+                       lga = InsetQuotes::SwedishQ;
+                       break;
+               case 2:
+                       lga = InsetQuotes::GermanQ;
+                       break;
+               case 3:
+                       lga = InsetQuotes::PolishQ;
+                       break;
+               case 4:
+                       lga = InsetQuotes::FrenchQ;
+                       break;
+               case 5:
+                       lga = InsetQuotes::DanishQ;
+                       break;
+       }
+       params.quotes_language = lga;
+       if (dialog_->singleRB->isChecked() )
+               params.quotes_times = InsetQuotes::SingleQ;
+       else
+               params.quotes_times = InsetQuotes::DoubleQ;
+
+       Language const * old_language = params.language;
+       Language const * new_language =
        languages.getLanguage(dialog_->languageCO->currentItem() );
-    if (!new_language)
-       new_language = default_language;
-
-    if (old_language != new_language
-       && old_language->RightToLeft() == new_language->RightToLeft()
-       && !lv_->buffer()->isMultiLingual())
-       lv_->buffer()->ChangeLanguage(old_language, new_language);
-    if (old_language != new_language) {
-       redo = true;
-    }
-    params.language = new_language;
-    params.inputenc = dialog_->inputEncCO->currentText();
-
-    return redo;
+       if (!new_language)
+               new_language = default_language;
+
+       if (old_language != new_language
+               && old_language->RightToLeft() == new_language->RightToLeft()
+               && !lv_->buffer()->isMultiLingual())
+               lv_->buffer()->ChangeLanguage(old_language, new_language);
+       if (old_language != new_language)
+               redo = true;
+
+       params.language = new_language;
+       params.inputenc = dialog_->inputEncCO->currentText();
+
+       return redo;
 }
 
 
 bool FormDocument::options_apply()
 {
-    BufferParams & params = lv_->buffer()->params;
-    bool redo = false;
+       BufferParams & params = lv_->buffer()->params;
+       bool redo = false;
 
-    params.graphicsDriver =
-       dialog_->postscriptDriverCO->currentText();
-    params.use_amsmath = dialog_->useAmsMathCB->isChecked();
+       params.graphicsDriver =
+               dialog_->postscriptDriverCO->currentText();
+       params.use_amsmath = dialog_->useAmsMathCB->isChecked();
 
-    int tmpchar = int(dialog_->secNumDepth->value() );
-    if (params.secnumdepth != tmpchar)
-       redo = true;
-    params.secnumdepth = tmpchar;
+       int tmpchar = int(dialog_->secNumDepth->value() );
+       if (params.secnumdepth != tmpchar)
+               redo = true;
+       params.secnumdepth = tmpchar;
 
-    params.tocdepth = int(dialog_->tocDepth->value() );
+       params.tocdepth = int(dialog_->tocDepth->value() );
 
-    params.float_placement =
-       dialog_->floatPlacementED->text();
+       params.float_placement =
+               dialog_->floatPlacementED->text();
 
-    return redo;
+       return redo;
 }
 
 
 void FormDocument::bullets_apply()
 {
-    /* update the bullet settings */
-    BufferParams & param = lv_->buffer()->params;
-
-    // a little bit of loop unrolling
-    param.user_defined_bullets[0] = param.temp_bullets[0];
-    param.user_defined_bullets[1] = param.temp_bullets[1];
-    param.user_defined_bullets[2] = param.temp_bullets[2];
-    param.user_defined_bullets[3] = param.temp_bullets[3];
+       /* update the bullet settings */
+       BufferParams & param = lv_->buffer()->params;
+
+       // a little bit of loop unrolling
+       param.user_defined_bullets[0] = param.temp_bullets[0];
+       param.user_defined_bullets[1] = param.temp_bullets[1];
+       param.user_defined_bullets[2] = param.temp_bullets[2];
+       param.user_defined_bullets[3] = param.temp_bullets[3];
 }
 
 
 void FormDocument::class_update(BufferParams const & params)
 {
-    if (!class_.get())
-        return;
+       if (!class_.get())
+               return;
 
-    LyXTextClass const & tclass = textclasslist.TextClass(params.textclass);
+       LyXTextClass const & tclass = textclasslist.TextClass(params.textclass);
 
-    combo_doc_class->select_text(
+       combo_doc_class->select_text(
                                 textclasslist.DescOfClass(params.textclass));
-    Qt2Helper::setCurrentComboItem( dialog_->docFonts, params.fonts.c_str() );
-    dialog_->docFontSizeCO->clear();
-    dialog_->docFontSizeCO->insertItem( _( "default" ) );
-    dialog_->docFontSizeCO->insertItem( tclass.opt_fontsize().c_str());
-    dialog_->docFontSizeCO->setCurrentItem( tokenPos(tclass.opt_fontsize(), '|', params.fontsize)+1);
-    dialog_->docPagestyleCO->clear();
-    dialog_->docPagestyleCO->insertItem( _( "default" ) );
-    dialog_->docPagestyleCO->insertItem( tclass.opt_pagestyle().c_str());
-    dialog_->docPagestyleCO->setCurrentItem( tokenPos(tclass.opt_pagestyle(), '|', params.pagestyle)+1);
-    dialog_->docIndentRB->setChecked( false );
-    dialog_->docSkipRB->setChecked( false );
-    if (params.paragraph_separation == BufferParams::PARSEP_INDENT)
-       dialog_->docIndentRB->setChecked( true );
-    else
-       dialog_->docSkipRB->setChecked( true );
-    switch (params.getDefSkip().kind()) {
-    case VSpace::SMALLSKIP:
-       dialog_->docSkipCO->setCurrentItem( 0 );
-       break;
-    case VSpace::MEDSKIP:
-       dialog_->docSkipCO->setCurrentItem( 1 );
-       break;
-    case VSpace::BIGSKIP:
-       dialog_->docSkipCO->setCurrentItem( 2 );
-       break;
-    case VSpace::LENGTH:
-       dialog_->docSkipCO->setCurrentItem( 3 );
-       dialog_->docSkipED->setText( params.getDefSkip().asLyXCommand().c_str());
-       break;
-    default:
-       dialog_->docSkipCO->setCurrentItem( 1 );
-       break;
-    }
-    dialog_->docSidesOneRB->setChecked( false );
-    dialog_->docSidesTwoRB->setChecked( false );
-    if (params.sides == LyXTextClass::TwoSides)
-       dialog_->docSidesTwo->setChecked( true );
-    else
-       dialog_->docSidesOne->setChecked( true );
-    dialog_->docColumnsOneRB->setChecked( false );
-    dialog_->docColumnsTwoRB->setChecked( false );
-    if (params.columns == 2)
-       dialog_->docColumnsTwoRB->setChecked( true );
-    else
-       dialog_->docColumnsOneRB->setChecked( true );
-    dialog_->docSpacingED->setText( "" );
-    switch (params.spacing.getSpace()) {
-    case Spacing::Default: // nothing bad should happen with this
-    case Spacing::Single:
-       // \singlespacing
-       dialog_->docSpacingCO->setCurrentItem( 0 );
-       break;
-    case Spacing::Onehalf:
-       // \onehalfspacing
-       dialog_->docSpacingCO->setCurrentItem( 1 );
-       break;
-    case Spacing::Double:
-       // \doublespacing
-       dialog_->docSpacingCO->setCurrentItem( 2 );
-       break;
-    case Spacing::Other:
-       {
-           dialog_->docSpacingCO->setCurrentItem( 3 );
-           QString sval;
-           sval.sprintf("%g",params.spacing.getValue());
-           dialog_->docSpacingED->setText( sval );
-           break;
+       Qt2Helper::setCurrentComboItem( dialog_->docFonts, params.fonts.c_str() );
+       dialog_->docFontSizeCO->clear();
+       dialog_->docFontSizeCO->insertItem( _( "default" ) );
+       dialog_->docFontSizeCO->insertItem( tclass.opt_fontsize().c_str());
+       dialog_->docFontSizeCO->setCurrentItem( tokenPos(tclass.opt_fontsize(), '|', params.fontsize)+1);
+       dialog_->docPagestyleCO->clear();
+       dialog_->docPagestyleCO->insertItem( _( "default" ) );
+       dialog_->docPagestyleCO->insertItem( tclass.opt_pagestyle().c_str());
+       dialog_->docPagestyleCO->setCurrentItem( tokenPos(tclass.opt_pagestyle(), '|', params.pagestyle)+1);
+       dialog_->docIndentRB->setChecked( false );
+       dialog_->docSkipRB->setChecked( false );
+       if (params.paragraph_separation == BufferParams::PARSEP_INDENT)
+               dialog_->docIndentRB->setChecked( true );
+       else
+               dialog_->docSkipRB->setChecked( true );
+       switch (params.getDefSkip().kind()) {
+               case VSpace::SMALLSKIP:
+                       dialog_->docSkipCO->setCurrentItem( 0 );
+                       break;
+               case VSpace::MEDSKIP:
+                       dialog_->docSkipCO->setCurrentItem( 1 );
+                       break;
+               case VSpace::BIGSKIP:
+                       dialog_->docSkipCO->setCurrentItem( 2 );
+                       break;
+               case VSpace::LENGTH:
+                       dialog_->docSkipCO->setCurrentItem( 3 );
+                       dialog_->docSkipED->setText( params.getDefSkip().asLyXCommand().c_str());
+                       break;
+               default:
+                       dialog_->docSkipCO->setCurrentItem( 1 );
+                       break;
+       }
+       dialog_->docSidesOneRB->setChecked( false );
+       dialog_->docSidesTwoRB->setChecked( false );
+       if (params.sides == LyXTextClass::TwoSides)
+               dialog_->docSidesTwo->setChecked( true );
+       else
+               dialog_->docSidesOne->setChecked( true );
+       dialog_->docColumnsOneRB->setChecked( false );
+       dialog_->docColumnsTwoRB->setChecked( false );
+       if (params.columns == 2)
+               dialog_->docColumnsTwoRB->setChecked( true );
+       else
+               dialog_->docColumnsOneRB->setChecked( true );
+       dialog_->docSpacingED->setText( "" );
+       switch (params.spacing.getSpace()) {
+               case Spacing::Default: // nothing bad should happen with this
+               case Spacing::Single:
+                       // \singlespacing
+                       dialog_->docSpacingCO->setCurrentItem( 0 );
+                       break;
+               case Spacing::Onehalf:
+                       // \onehalfspacing
+                       dialog_->docSpacingCO->setCurrentItem( 1 );
+                       break;
+               case Spacing::Double:
+                       // \doublespacing
+                       dialog_->docSpacingCO->setCurrentItem( 2 );
+               break;
+               case Spacing::Other:
+               {
+                       dialog_->docSpacingCO->setCurrentItem( 3 );
+                       QString sval;
+                       sval.sprintf("%g",params.spacing.getValue());
+                       dialog_->docSpacingED->setText( sval );
+                       break;
+               }
        }
-    }
-    if (!params.options.empty())
-       dialog_->docExtraED->setText(, params.options.c_str());
-    else
-       dialog_->docExtraED->setText( "" );
+       if (!params.options.empty())
+               dialog_->docExtraED->setText(, params.options.c_str());
+       else
+               dialog_->docExtraED->setText( "" );
 }
 
 
 void FormDocument::language_update(BufferParams const & params)
 {
-    if (!language_.get())
-        return;
-
-    Qt2Helper::setCurrentItemText( dialog_->languageCO, params.language->lang() );
-    Qt2Helper::setCurrentItemText( dialog_->inputEncCO, params.inputenc.c_str() );
-    dialog_->quotesLanguageCO->setCurrentItem( params.quotes_language );
-    dialog_->singleRB->setChecked( false );
-    dialog_->doubleRB->setChecked( false );
-    if (params.quotes_times == InsetQuotes::SingleQ)
-       dialog_->singleRB->setChecked( true );
-    else
-       dialog_->doubleRB->setChecked( true );
+       if (!language_.get())
+               return;
+
+       Qt2Helper::setCurrentItemText( dialog_->languageCO, params.language->lang() );
+       Qt2Helper::setCurrentItemText( dialog_->inputEncCO, params.inputenc.c_str() );
+       dialog_->quotesLanguageCO->setCurrentItem( params.quotes_language );
+       dialog_->singleRB->setChecked( false );
+       dialog_->doubleRB->setChecked( false );
+       if (params.quotes_times == InsetQuotes::SingleQ)
+               dialog_->singleRB->setChecked( true );
+       else
+               dialog_->doubleRB->setChecked( true );
 }
 
 
 void FormDocument::options_update(BufferParams const & params)
 {
-    if (!options_.get())
-        return;
+       if (!options_.get())
+               return;
 
-    Qt2Helper::setCurrentItemText( dialog_->postscriptDriverCO,
+       Qt2Helper::setCurrentItemText( dialog_->postscriptDriverCO,
                                   params.graphicsDriver.c_str());
-    dialog_->useAmsMathCB->setChecked( params.use_amsmath );
-    dialog_->secNumDepthSB->setValue( params.secnumdepth );
-    dialog_->setTocDepthSB->setValue( params.tocdepth );
-    if (!params.float_placement.empty())
-       dialog_->floatPlacementED->setText( params.float_placement.c_str());
-    else
-       dialog_->floatPlacementED->setText( "" );
+       dialog_->useAmsMathCB->setChecked( params.use_amsmath );
+       dialog_->secNumDepthSB->setValue( params.secnumdepth );
+       dialog_->setTocDepthSB->setValue( params.tocdepth );
+       if (!params.float_placement.empty())
+               dialog_->floatPlacementED->setText( params.float_placement.c_str());
+       else
+               dialog_->floatPlacementED->setText( "" );
 }
 
 
 void FormDocument::paper_update(BufferParams const & params)
 {
-    if (!paper_.get())
-        return;
-
-    dialog_->papersize2CO->setCurrentItem( params.papersize2 );
-    dialog_->paperPackageCO->setCurrentItem( params.paperpackage );
-    dialog_->useGeometryCB->setChecked( params.use_geometry );
-    dialog_->portraitRB->setChecked( false );
-    dialog_->landscapeRB->setChecked( false );
-    if (params.orientation == BufferParams::ORIENTATION_LANDSCAPE)
-       dialog_->landscapeRB->setChecked( true );
-    else
-       dialog_->portraitRB->setChecked( true );
-    dialog_->customWidthED->setText( params.paperwidth.c_str());
-    dialog_->customHeightED->setText( params.paperheight.c_str());
-    dialog_->leftMarginED->setText( params.leftmargin.c_str());
-    dialog_->topMarginED->setText( params.topmargin.c_str());
-    dialog_->rightMarginED->setText( params.rightmargin.c_str());
-    dialog_->bottomMarginED->setText( params.bottommargin.c_str());
-    dialog_->headHeightED->setText( params.headheight.c_str());
-    dialog_->headSepED->setText( params.headsep.c_str());
-    dialog_->footSkipED->setText( params.footskip.c_str());
-    dialog_->papersize2CO->setFocus();
+       if (!paper_.get())
+               return;
+
+       dialog_->papersize2CO->setCurrentItem( params.papersize2 );
+       dialog_->paperPackageCO->setCurrentItem( params.paperpackage );
+       dialog_->useGeometryCB->setChecked( params.use_geometry );
+       dialog_->portraitRB->setChecked( false );
+       dialog_->landscapeRB->setChecked( false );
+       if (params.orientation == BufferParams::ORIENTATION_LANDSCAPE)
+               dialog_->landscapeRB->setChecked( true );
+       else
+               dialog_->portraitRB->setChecked( true );
+       dialog_->customWidthED->setText( params.paperwidth.c_str());
+       dialog_->customHeightED->setText( params.paperheight.c_str());
+       dialog_->leftMarginED->setText( params.leftmargin.c_str());
+       dialog_->topMarginED->setText( params.topmargin.c_str());
+       dialog_->rightMarginED->setText( params.rightmargin.c_str());
+       dialog_->bottomMarginED->setText( params.bottommargin.c_str());
+       dialog_->headHeightED->setText( params.headheight.c_str());
+       dialog_->headSepED->setText( params.headsep.c_str());
+       dialog_->footSkipED->setText( params.footskip.c_str());
+       dialog_->papersize2CO->setFocus();
 }
 
 
 void FormDocument::bullets_update(BufferParams const & params)
 {
-    bool const isLinuxDoc = lv_->buffer()->isLinuxDoc();
-    setEnabled(fbullet, !isLinuxDoc);
+       bool const isLinuxDoc = lv_->buffer()->isLinuxDoc();
+       setEnabled(fbullet, !isLinuxDoc);
 
-    if (isLinuxDoc) return;
+       if (isLinuxDoc) return;
 
-    dialog_->bulletDepth1RB->setChecked( true );
-    dialog_->bulletLatexED->setText( params.user_defined_bullets[0].getText().c_str());
-    dialog_->bulletSizeCO->setCurrentItem( params.user_defined_bullets[0].getSize() + 1);
+       dialog_->bulletDepth1RB->setChecked( true );
+       dialog_->bulletLatexED->setText( params.user_defined_bullets[0].getText().c_str());
+       dialog_->bulletSizeCO->setCurrentItem( params.user_defined_bullets[0].getSize() + 1);
 }
 
 
 void FormDocument::checkReadOnly()
 {
-    if (bc().readOnly(lv_->buffer()->isReadonly())) {
-       dialog_->docClassCO->setEnabled( false );
-       dialog_->languageCO->setEnabled( false );
-       dialog_->warningLA->setText( _("Document is read-only."
-                                      " No changes to layout permitted."));
-       dialog_->warningLA->show();
-    } else {
-       dialog_->docClassCO->setEnabled( true );
-       dialog_->languageCO->setEnabled( true );
-       dialog_->warningLA->hide();
-    }
+       if (bc().readOnly(lv_->buffer()->isReadonly())) {
+               dialog_->docClassCO->setEnabled( false );
+               dialog_->languageCO->setEnabled( false );
+               dialog_->warningLA->setText( _("Document is read-only."
+                                                  " No changes to layout permitted."));
+               dialog_->warningLA->show();
+       } else {
+               dialog_->docClassCO->setEnabled( true );
+               dialog_->languageCO->setEnabled( true );
+               dialog_->warningLA->hide();
+       }
 }
 
 
 void FormDocument::checkMarginValues()
 {
-    bool const not_empty =
-       !dialog_->topMarginED->text().isEmpty() ||
-       !dialog_->bottomMarginED->text().isEmpty() ||
-       !dialog_->leftMarginED->text().isEmpty() ||
-       !dialog_->rightMarginED->text().isEmpty() ||
-       !dialog_->headHeightED->text().isEmpty() ||
-       !dialog_->headSepED->text().isEmpty() ||
-       !dialog_->footSkipED->text().isEmpty() ||
-       !dialog_->customWidthED->text().isEmpty() ||
-       !dialog_->customHeightED->text().isEmpty();
-    if (not_empty)
-       dialog_->useGeometryCB->setChecked( true );
+       bool const not_empty =
+               !dialog_->topMarginED->text().isEmpty() ||
+               !dialog_->bottomMarginED->text().isEmpty() ||
+               !dialog_->leftMarginED->text().isEmpty() ||
+               !dialog_->rightMarginED->text().isEmpty() ||
+               !dialog_->headHeightED->text().isEmpty() ||
+               !dialog_->headSepED->text().isEmpty() ||
+               !dialog_->footSkipED->text().isEmpty() ||
+               !dialog_->customWidthED->text().isEmpty() ||
+               !dialog_->customHeightED->text().isEmpty();
+       if (not_empty)
+               dialog_->useGeometryCB->setChecked( true );
 }
 
 #ifdef K
 bool FormDocument::CheckDocumentInput(FL_OBJECT * ob, long)
 {
-    string str;
-    int val;
-    bool ok = true;
-    char const * input;
-
-    checkMarginValues();
-    if (ob == paper_->choice_papersize2) {
-       val = fl_get_choice(paper_->choice_papersize2)-1;
-       if (val == BufferParams::VM_PAPER_DEFAULT) {
-           fl_set_button(paper_->push_use_geometry, 0);
-           checkMarginValues();
-       } else {
-           if ((val != BufferParams::VM_PAPER_USLETTER) &&
-               (val != BufferParams::VM_PAPER_USLEGAL) &&
-               (val != BufferParams::VM_PAPER_USEXECUTIVE) &&
-               (val != BufferParams::VM_PAPER_A4) &&
-               (val != BufferParams::VM_PAPER_A5) &&
-               (val != BufferParams::VM_PAPER_B5)) {
-               fl_set_button(paper_->push_use_geometry, 1);
-           }
-           fl_set_choice(paper_->choice_paperpackage,
-                         BufferParams::PACKAGE_NONE + 1);
-       }
-    } else if (ob == paper_->choice_paperpackage) {
-       val = fl_get_choice(paper_->choice_paperpackage)-1;
-       if (val != BufferParams::PACKAGE_NONE) {
-           fl_set_choice(paper_->choice_papersize2,
-                         BufferParams::VM_PAPER_DEFAULT + 1);
-           fl_set_button(paper_->push_use_geometry, 0);
-       }
-    } else if (ob == class_->input_doc_spacing) {
-       input = fl_get_input(class_->input_doc_spacing);
-       if (!*input) {
-           fl_set_choice (class_->choice_doc_spacing, 1);
-       } else {
-           fl_set_choice(class_->choice_doc_spacing, 4);
+       string str;
+       int val;
+       bool ok = true;
+       char const * input;
+
+       checkMarginValues();
+       if (ob == paper_->choice_papersize2) {
+               val = fl_get_choice(paper_->choice_papersize2)-1;
+               if (val == BufferParams::VM_PAPER_DEFAULT) {
+                       fl_set_button(paper_->push_use_geometry, 0);
+                       checkMarginValues();
+               } else {
+                       if ((val != BufferParams::VM_PAPER_USLETTER) &&
+                               (val != BufferParams::VM_PAPER_USLEGAL) &&
+                               (val != BufferParams::VM_PAPER_USEXECUTIVE) &&
+                               (val != BufferParams::VM_PAPER_A4) &&
+                               (val != BufferParams::VM_PAPER_A5) &&
+                               (val != BufferParams::VM_PAPER_B5)) {
+                                       fl_set_button(paper_->push_use_geometry, 1);
+                               }
+                       fl_set_choice(paper_->choice_paperpackage,
+                                 BufferParams::PACKAGE_NONE + 1);
+               }
+       } else if (ob == paper_->choice_paperpackage) {
+               val = fl_get_choice(paper_->choice_paperpackage)-1;
+               if (val != BufferParams::PACKAGE_NONE) {
+                       fl_set_choice(paper_->choice_papersize2,
+                                 BufferParams::VM_PAPER_DEFAULT + 1);
+                       fl_set_button(paper_->push_use_geometry, 0);
+               }
+       } else if (ob == class_->input_doc_spacing) {
+               input = fl_get_input(class_->input_doc_spacing);
+               if (!*input) {
+                       fl_set_choice (class_->choice_doc_spacing, 1);
+               } else {
+                       fl_set_choice(class_->choice_doc_spacing, 4);
+               }
        }
-    }
-    // this has to be all out of if/elseif because it has to deactivate
-    // the document buttons and so the whole stuff has to be tested again.
-    str = fl_get_input(paper_->input_custom_width);
-    ok = ok && (str.empty() || isValidLength(str));
-    str = fl_get_input(paper_->input_custom_height);
-    ok = ok && (str.empty() || isValidLength(str));
-    str = fl_get_input(paper_->input_left_margin);
-    ok = ok && (str.empty() || isValidLength(str));
-    str = fl_get_input(paper_->input_right_margin);
-    ok = ok && (str.empty() || isValidLength(str));
-    str = fl_get_input(paper_->input_top_margin);
-    ok = ok && (str.empty() || isValidLength(str));
-    str = fl_get_input(paper_->input_bottom_margin);
-    ok = ok && (str.empty() || isValidLength(str));
-    str = fl_get_input(paper_->input_head_height);
-    ok = ok && (str.empty() || isValidLength(str));
-    str = fl_get_input(paper_->input_head_sep);
-    ok = ok && (str.empty() || isValidLength(str));
-    str = fl_get_input(paper_->input_foot_skip);
-    ok = ok && (str.empty() || isValidLength(str));
-    // "Synchronize" the choice and the input field, so that it
-    // is impossible to commit senseless data.
-    input = fl_get_input (class_->input_doc_skip);
-    if (ob == class_->input_doc_skip) {
-       if (!*input) {
-           fl_set_choice (class_->choice_doc_skip, 2);
-       } else if (isValidGlueLength (input)) {
-           fl_set_choice (class_->choice_doc_skip, 4);
+       // this has to be all out of if/elseif because it has to deactivate
+       // the document buttons and so the whole stuff has to be tested again.
+       str = fl_get_input(paper_->input_custom_width);
+       ok = ok && (str.empty() || isValidLength(str));
+       str = fl_get_input(paper_->input_custom_height);
+       ok = ok && (str.empty() || isValidLength(str));
+       str = fl_get_input(paper_->input_left_margin);
+       ok = ok && (str.empty() || isValidLength(str));
+       str = fl_get_input(paper_->input_right_margin);
+       ok = ok && (str.empty() || isValidLength(str));
+       str = fl_get_input(paper_->input_top_margin);
+       ok = ok && (str.empty() || isValidLength(str));
+       str = fl_get_input(paper_->input_bottom_margin);
+       ok = ok && (str.empty() || isValidLength(str));
+       str = fl_get_input(paper_->input_head_height);
+       ok = ok && (str.empty() || isValidLength(str));
+       str = fl_get_input(paper_->input_head_sep);
+       ok = ok && (str.empty() || isValidLength(str));
+       str = fl_get_input(paper_->input_foot_skip);
+       ok = ok && (str.empty() || isValidLength(str));
+       // "Synchronize" the choice and the input field, so that it
+       // is impossible to commit senseless data.
+       input = fl_get_input (class_->input_doc_skip);
+       if (ob == class_->input_doc_skip) {
+               if (!*input) {
+                       fl_set_choice (class_->choice_doc_skip, 2);
+               } else if (isValidGlueLength (input)) {
+                       fl_set_choice (class_->choice_doc_skip, 4);
+               } else {
+                       fl_set_choice(class_->choice_doc_skip, 4);
+                       ok = false;
+               }
        } else {
-           fl_set_choice(class_->choice_doc_skip, 4);
-           ok = false;
+               if (*input && !isValidGlueLength(input))
+                       ok = false;
        }
-    } else {
-       if (*input && !isValidGlueLength(input))
-           ok = false;
-    }
-    if ((fl_get_choice(class_->choice_doc_skip) == 4) && !*input)
-       ok = false;
-    else if (fl_get_choice(class_->choice_doc_skip) != 4)
-       fl_set_input (class_->input_doc_skip, "");
-
-    input = fl_get_input(class_->input_doc_spacing);
-    if ((fl_get_choice(class_->choice_doc_spacing) == 4) && !*input)
-       ok = false;
-    else  if (fl_get_choice(class_->choice_doc_spacing) != 4)
-       fl_set_input (class_->input_doc_spacing, "");
-    return ok;
+       if ((fl_get_choice(class_->choice_doc_skip) == 4) && !*input)
+               ok = false;
+       else if (fl_get_choice(class_->choice_doc_skip) != 4)
+               fl_set_input (class_->input_doc_skip, "");
+
+       input = fl_get_input(class_->input_doc_spacing);
+       if ((fl_get_choice(class_->choice_doc_spacing) == 4) && !*input)
+               ok = false;
+       else if (fl_get_choice(class_->choice_doc_spacing) != 4)
+               fl_set_input (class_->input_doc_spacing, "");
+       return ok;
 }
 
 
 void FormDocument::ChoiceBulletSize(FL_OBJECT * ob, long /*data*/ )
 {
-    BufferParams & param = lv_->buffer()->params;
+       BufferParams & param = lv_->buffer()->params;
 
-    // convert from 1-6 range to -1-4
-    param.temp_bullets[current_bullet_depth].setSize(fl_get_choice(ob) - 2);
-    fl_set_input(bullets_->input_bullet_latex,
+       // convert from 1-6 range to -1-4
+       param.temp_bullets[current_bullet_depth].setSize(fl_get_choice(ob) - 2);
+       fl_set_input(bullets_->input_bullet_latex,
                 param.temp_bullets[current_bullet_depth].getText().c_str());
 }
 
 
 void FormDocument::InputBulletLaTeX(FL_OBJECT *, long)
 {
-    BufferParams & param = lv_->buffer()->params;
+       BufferParams & param = lv_->buffer()->params;
 
-    param.temp_bullets[current_bullet_depth].
+       param.temp_bullets[current_bullet_depth].
        setText(fl_get_input(bullets_->input_bullet_latex));
 }
 
 
 void FormDocument::BulletDepth(FL_OBJECT * ob, State cb)
 {
-    /* Should I do the following:                                 */
-    /*  1. change to the panel that the current bullet belongs in */
-    /*  2. show that bullet as selected                           */
-    /*  3. change the size setting to the size of the bullet in Q.*/
-    /*  4. display the latex equivalent in the latex box          */
-    /*                                                            */
-    /* I'm inclined to just go with 3 and 4 at the moment and     */
-    /* maybe try to support the others later                      */
-    BufferParams & param = lv_->buffer()->params;
-
-    int data = 0;
-    if (cb == BULLETDEPTH1 )
-       data = 0;
-    else if (cb == BULLETDEPTH2 )
-       data = 1;
-    else if (cb == BULLETDEPTH3 )
-       data = 2;
-    else if (cb == BULLETDEPTH4 )
-       data = 3;
-
-    switch (fl_get_button_numb(ob)) {
-    case 3:
-       // right mouse button resets to default
-       param.temp_bullets[data] = ITEMIZE_DEFAULTS[data];
-    default:
-       current_bullet_depth = data;
-       fl_set_input(bullets_->input_bullet_latex,
-                    param.temp_bullets[data].getText().c_str());
-       fl_set_choice(bullets_->choice_bullet_size,
-                     param.temp_bullets[data].getSize() + 2);
-    }
+       /* Should I do the following:
+        *  1. change to the panel that the current bullet belongs in 
+        *  2. show that bullet as selected
+        *  3. change the size setting to the size of the bullet in Q.
+        *  4. display the latex equivalent in the latex box
+        *
+        * I'm inclined to just go with 3 and 4 at the moment and
+        * maybe try to support the others later
+        */ 
+       BufferParams & param = lv_->buffer()->params;
+
+       int data = 0;
+       if (cb == BULLETDEPTH1 )
+               data = 0;
+       else if (cb == BULLETDEPTH2 )
+               data = 1;
+       else if (cb == BULLETDEPTH3 )
+               data = 2;
+       else if (cb == BULLETDEPTH4 )
+               data = 3;
+
+       switch (fl_get_button_numb(ob)) {
+               case 3:
+                       // right mouse button resets to default
+                       param.temp_bullets[data] = ITEMIZE_DEFAULTS[data];
+               default:
+                       current_bullet_depth = data;
+                       fl_set_input(bullets_->input_bullet_latex,
+                                        param.temp_bullets[data].getText().c_str());
+                       fl_set_choice(bullets_->choice_bullet_size,
+                                         param.temp_bullets[data].getSize() + 2);
+       }
 }
 
 
 void FormDocument::BulletPanel(FL_OBJECT * /*ob*/, State cb)
 {
-    /* Here we have to change the background pixmap to that selected */
-    /* by the user. (eg. standard.xpm, psnfss1.xpm etc...)           */
-
-    int data = 0;
-    if (cb == BULLETPANEL1 )
-       data = 0;
-    else if (cb == BULLETPANEL2 )
-       data = 1;
-    else if (cb == BULLETPANEL3 )
-       data = 2;
-    else if (cb == BULLETPANEL4 )
-       data = 3;
-    else if (cb == BULLETPANEL5 )
-       data = 4;
-    else if (cb == BULLETPANEL6 )
-       data = 5;
-
-    if (data != current_bullet_panel) {
-       fl_freeze_form(bullets_->form);
-       current_bullet_panel = data;
-
-       /* free the current pixmap */
-       fl_free_bmtable_pixmap(bullets_->bmtable_bullet_panel);
-       string new_panel;
-       switch (cb) {
-           /* display the new one */
-       case BULLETPANEL1 :
-           new_panel = "standard";
-           break;
-       case BULLETPANEL2 :
-           new_panel = "amssymb";
-           break;
-       case BULLETPANEL3 :
-           new_panel = "psnfss1";
-           break;
-       case BULLETPANEL4 :
-           new_panel = "psnfss2";
-           break;
-       case BULLETPANEL5 :
-           new_panel = "psnfss3";
-           break;
-       case BULLETPANEL6 :
-           new_panel = "psnfss4";
-           break;
-       default :
-           /* something very wrong happened */
-           // play it safe for now but should be an exception
-           current_bullet_panel = 0;  // standard panel
-           new_panel = "standard";
-           break;
+       /* Here we have to change the background pixmap to that selected */
+       /* by the user. (eg. standard.xpm, psnfss1.xpm etc...)             */
+
+       int data = 0;
+       if (cb == BULLETPANEL1 )
+               data = 0;
+       else if (cb == BULLETPANEL2 )
+               data = 1;
+       else if (cb == BULLETPANEL3 )
+               data = 2;
+       else if (cb == BULLETPANEL4 )
+               data = 3;
+       else if (cb == BULLETPANEL5 )
+               data = 4;
+       else if (cb == BULLETPANEL6 )
+               data = 5;
+
+       if (data != current_bullet_panel) {
+               fl_freeze_form(bullets_->form);
+               current_bullet_panel = data;
+
+               /* free the current pixmap */
+               fl_free_bmtable_pixmap(bullets_->bmtable_bullet_panel);
+               string new_panel;
+               switch (cb) {
+                       /* display the new one */
+                       case BULLETPANEL1 :
+                               new_panel = "standard";
+                               break;
+                       case BULLETPANEL2 :
+                               new_panel = "amssymb";
+                               break;
+                       case BULLETPANEL3 :
+                       new_panel = "psnfss1";
+                       break;
+                       case BULLETPANEL4 :
+                               new_panel = "psnfss2";
+                               break;
+                       case BULLETPANEL5 :
+                               new_panel = "psnfss3";
+                               break;
+                       case BULLETPANEL6 :
+                               new_panel = "psnfss4";
+                               break;
+                       default :
+                               /* something very wrong happened */
+                               // play it safe for now but should be an exception
+                               current_bullet_panel = 0;  // standard panel
+                               new_panel = "standard";
+                       break;
+               }
+               new_panel += ".xpm";
+               fl_set_bmtable_pixmap_file(bullets_->bmtable_bullet_panel, 6, 6,
+                                          LibFileSearch("images", new_panel).c_str());
+               fl_redraw_object(bullets_->bmtable_bullet_panel);
+               fl_unfreeze_form(bullets_->form);
        }
-       new_panel += ".xpm";
-       fl_set_bmtable_pixmap_file(bullets_->bmtable_bullet_panel, 6, 6,
-                                  LibFileSearch("images", new_panel).c_str());
-       fl_redraw_object(bullets_->bmtable_bullet_panel);
-       fl_unfreeze_form(bullets_->form);
-    }
 }
 
 
 void FormDocument::BulletBMTable(FL_OBJECT * ob, long /*data*/ )
 {
-    /* handle the user input by setting the current bullet depth's pixmap */
-    /* to that extracted from the current chosen position of the BMTable  */
-    /* Don't forget to free the button's old pixmap first.                */
-
-    BufferParams & param = lv_->buffer()->params;
-    int bmtable_button = fl_get_bmtable(ob);
-
-    /* try to keep the button held down till another is pushed */
-    /*  fl_set_bmtable(ob, 1, bmtable_button); */
-    param.temp_bullets[current_bullet_depth].setFont(current_bullet_panel);
-    param.temp_bullets[current_bullet_depth].setCharacter(bmtable_button);
-    fl_set_input(bullets_->input_bullet_latex,
+       /* handle the user input by setting the current bullet depth's pixmap */
+       /* to that extracted from the current chosen position of the BMTable  */
+       /* Don't forget to free the button's old pixmap first.                          */
+
+       BufferParams & param = lv_->buffer()->params;
+       int bmtable_button = fl_get_bmtable(ob);
+
+       /* try to keep the button held down till another is pushed */
+       /*  fl_set_bmtable(ob, 1, bmtable_button); */
+       param.temp_bullets[current_bullet_depth].setFont(current_bullet_panel);
+       param.temp_bullets[current_bullet_depth].setCharacter(bmtable_button);
+       fl_set_input(bullets_->input_bullet_latex,
                 param.temp_bullets[current_bullet_depth].getText().c_str());
 }
 
 
 void FormDocument::CheckChoiceClass(FL_OBJECT * ob, long)
 {
-    if (!ob)
-       ob = class_->choice_doc_class;
-
-    ProhibitInput(lv_->view());
-
-    unsigned int tc = combo_doc_class->get() - 1;
-    if (textclasslist.Load(tc)) {
-       // we use a copy of the bufferparams because we do not
-       // want to modify them yet.
-       BufferParams params = lv_->buffer()->params;
-
-       if (params.textclass != tc
-           && AskQuestion(_("Should I set some parameters to"),
-                          _("the defaults of this document class?"))) {
-           params.textclass = tc;
-           params.useClassDefaults();
-           UpdateLayoutDocument(params);
+       if (!ob)
+               ob = class_->choice_doc_class;
+
+       ProhibitInput(lv_->view());
+
+       unsigned int tc = combo_doc_class->get() - 1;
+       if (textclasslist.Load(tc)) {
+               // we use a copy of the bufferparams because we do not
+               // want to modify them yet.
+               BufferParams params = lv_->buffer()->params;
+
+               if (params.textclass != tc
+                       && AskQuestion(_("Should I set some parameters to"),
+                                  _("the defaults of this document class?"))) {
+                       params.textclass = tc;
+                       params.useClassDefaults();
+                       UpdateLayoutDocument(params);
+               }
+       } else {
+               // unable to load new style
+               WriteAlert(_("Conversion Errors!"),
+                          _("Unable to switch to new document class."),
+                          _("Reverting to original document class."));
+               combo_doc_class->select(int(lv_->buffer()->params.textclass) + 1);
        }
-    } else {
-       // unable to load new style
-       WriteAlert(_("Conversion Errors!"),
-                  _("Unable to switch to new document class."),
-                  _("Reverting to original document class."));
-       combo_doc_class->select(int(lv_->buffer()->params.textclass) + 1);
-    }
-    AllowInput(lv_->view());
+       AllowInput(lv_->view());
 }
 #endif
 
 void FormDocument::UpdateLayoutDocument(BufferParams const & params)
 {
-    if (!dialog_.get())
-        return;
-
-    checkReadOnly();
-    class_update(params);
-    paper_update(params);
-    language_update(params);
-    options_update(params);
-    bullets_update(params);
+       if (!dialog_.get())
+               return;
+
+       checkReadOnly();
+       class_update(params);
+       paper_update(params);
+       language_update(params);
+       options_update(params);
+       bullets_update(params);
 }
index a251d91c72c7bc42873055138307c1214cf08876..38e5480cced5f105c7d9fe5f49a1e3af91b601a8 100644 (file)
@@ -35,7 +35,7 @@ class Dialogs;
     @author Kalle Dalheimer
  */
 class FormDocument
-  : public Qt2CB<ControlDocument, Qt2DB<FormDocumentDialogImpl> >
+       : public Qt2CB<ControlDocument, Qt2DB<FormDocumentDialogImpl> >
 {
 public:
        FormDocument(LyXView *, Dialogs *);
index fa13d2e879ce48ca1cf965a523eab650602a40b5..a328c92f518d81660d983e6c2af8964f895f2822 100644 (file)
@@ -50,7 +50,7 @@ private:
        Dialogs * d_;
        
        /// Hide connection.
-   SigC::Connection h_;
+       SigC::Connection h_;
        
        /// readonly file or not
        bool readonly; 
index 60d24380d4def89f95991e3985031737603cfa60..1f323549d688bf40fcbba8de7053cd6f04b8b30b 100644 (file)
@@ -25,86 +25,86 @@ using Liason::setMinibuffer;
 FormSearch::FormSearch(LyXView *v, Dialogs *d)
        : dialog_(0), lv_(v), d_(d), h_(0), u_(0)
 {
-   // let the dialog be shown
-   // This is a permanent connection so we won't bother
-   // storing a copy because we won't be disconnecting.
-   d->showSearch.connect(SigC::slot(this, &FormSearch::show));
-   // perhaps in the future we'd like a
-   // "search again" button/keybinding
-//    d->searchAgain.connect(slot(this, &FormSearch::FindNext));
+       // let the dialog be shown
+       // This is a permanent connection so we won't bother
+       // storing a copy because we won't be disconnecting.
+       d->showSearch.connect(SigC::slot(this, &FormSearch::show));
+       // perhaps in the future we'd like a
+       // "search again" button/keybinding
+       // d->searchAgain.connect(slot(this, &FormSearch::FindNext));
 }
 
 
 FormSearch::~FormSearch()
 {
-   delete dialog_;
+       delete dialog_;
 }
 
 void FormSearch::show()
 {
-   if (!dialog_) {
-      dialog_ = new SearchDlgImpl(this, 0, _("Find and Replace"), false);
-   }
+       if (!dialog_) {
+               dialog_ = new SearchDlgImpl(this, 0, _("Find and Replace"), false);
+       }
 
-   if (!dialog_->isVisible()) {
-      h_ = d_->hideBufferDependent.connect(SigC::slot(this, &FormSearch::hide));
-      u_ = d_->updateBufferDependent.connect(SigC::slot(this, &FormSearch::update));
-   }
-   
-   dialog_->raise();
-   dialog_->setActiveWindow();
-   update();
-   dialog_->show();
+       if (!dialog_->isVisible()) {
+               h_ = d_->hideBufferDependent.connect(SigC::slot(this, &FormSearch::hide));
+               u_ = d_->updateBufferDependent.connect(SigC::slot(this, &FormSearch::update));
+       }
+       
+       dialog_->raise();
+       dialog_->setActiveWindow();
+       update();
+       dialog_->show();
 }
 
 void FormSearch::find(string const & searchstr, bool const & casesensitive,
-                     bool const & matchword, bool const & searchback)
+                               bool const & matchword, bool const & searchback)
 {
-   bool found = LyXFind(lv_->view(), searchstr,        casesensitive, matchword,
+       bool found = LyXFind(lv_->view(), searchstr,    casesensitive, matchword,
                        searchback);
-   
-   if (!found)
-     setMinibuffer(lv_, _("String not found!"));
-   
+       
+       if (!found)
+               setMinibuffer(lv_, _("String not found!"));
+       
 }
 void FormSearch::replace(string const & searchstr, string const & replacestr,
                         bool const & casesensitive, bool const & matchword, 
                         bool const & searchback, bool const & replaceall)
 {
-   int replace_count = LyXReplace(lv_->view(), searchstr, replacestr,
+       int replace_count = LyXReplace(lv_->view(), searchstr, replacestr,
                                  casesensitive, matchword, searchback,
                                  replaceall);
                                  
-   if (replace_count == 0) {
-      setMinibuffer(lv_, _("String not found!"));
-   } else {
-      if (replace_count == 1) {
-        setMinibuffer(lv_, _("String has been replaced."));
-      } else {
-        string str = tostr(replace_count);
-        str += _(" strings have been replaced.");
-        setMinibuffer(lv_, str.c_str());
-      }
-   }
+       if (replace_count == 0) {
+               setMinibuffer(lv_, _("String not found!"));
+       } else {
+               if (replace_count == 1) {
+                       setMinibuffer(lv_, _("String has been replaced."));
+               } else {
+                       string str = tostr(replace_count);
+                       str += _(" strings have been replaced.");
+                       setMinibuffer(lv_, str.c_str());
+               }
+       }
 }
 
 
 void FormSearch::close()
 {
-   h_.disconnect();
-   u_.disconnect();
+       h_.disconnect();
+       u_.disconnect();
 }
 
 void FormSearch::hide()
 {
-   dialog_->hide();
-   close();
+       dialog_->hide();
+       close();
 }
 
 void FormSearch::update(bool)
 {
-   if (!lv_->view()->available())
-     return;
+       if (!lv_->view()->available())
+               return;
 
-   dialog_->setReadOnly(lv_->buffer()->isReadonly());
+       dialog_->setReadOnly(lv_->buffer()->isReadonly());
 }
index fdc5c13e01eac0db82ea8400f431aa599718abb3..c9e6a6e5afe41aa7f8d61bab1f0e609ee28c290e 100644 (file)
@@ -19,46 +19,46 @@ class SearchDlgImpl;
 
 class FormSearch : public DialogBase {
 public:
-   ///
-   FormSearch(LyXView *, Dialogs *);
-   ///
-   ~FormSearch();
-   
-   /// Close connections.
-   void close();
-   /// find stuff (we need access to lv_).
-   void find(string const &, bool const &, bool const &, bool const &);
-   /// replace stuff (we need access to lv_).
-   void replace(string const &, string const &, 
+       ///
+       FormSearch(LyXView *, Dialogs *);
+       ///
+       ~FormSearch();
+       
+       /// Close connections.
+       void close();
+       /// find stuff (we need access to lv_).
+       void find(string const &, bool const &, bool const &, bool const &);
+       /// replace stuff (we need access to lv_).
+       void replace(string const &, string const &, 
                bool const &, bool const &, bool const &, bool const &);
-   
-   
+       
+       
 private:
        
-   /// Show the dialog.
-   void show();
-   /// Hide the dialog.
-   void hide();
-   /// Update the dialog.
-   void update(bool switched = false);
+       /// Show the dialog.
+       void show();
+       /// Hide the dialog.
+       void hide();
+       /// Update the dialog.
+       void update(bool switched = false);
        
-   /// Real GUI implementation.
-   SearchDlgImpl * dialog_;
+       /// Real GUI implementation.
+       SearchDlgImpl * dialog_;
        
-   /// the LyXView we belong to.
-   LyXView * lv_;
+       /// the LyXView we belong to.
+       LyXView * lv_;
        
-   /** Which Dialogs do we belong to?
-    *  Used so we can get at the signals we have to connect to.
-    */
-   Dialogs * d_;
+       /** Which Dialogs do we belong to?
+        *  Used so we can get at the signals we have to connect to.
+        */
+       Dialogs * d_;
        
-   /// Hide connection.
-   SigC::Connection h_;
+       /// Hide connection.
+       SigC::Connection h_;
 
-   /// Update connection.
-   SigC::Connection u_;
-   
+       /// Update connection.
+       SigC::Connection u_;
+       
 };
 
 #endif
index 99f4f44fa5fb08584541f1e4acc16e6aff746700..a5f1756977af0a5af7a8eb7a7e5883f4ce2fd02a 100644 (file)
@@ -26,23 +26,23 @@ FormSplash::FormSplash(LyXView *, Dialogs * d)
 
 FormSplash::~FormSplash()
 {
-   c_.disconnect();
-   delete dialog_;
+       c_.disconnect();
+       delete dialog_;
 }
 
 void FormSplash::hide()
 {
-   dialog_->hide();
+       dialog_->hide();
 }
 
 void FormSplash::show()
 {
-   if (!lyxrc.show_banner)
-     return;
+       if (!lyxrc.show_banner)
+               return;
 
-   if (!dialog_)
-     dialog_ = new FormSplashBase( 0, "LyX");
+       if (!dialog_)
+               dialog_ = new FormSplashBase( 0, "LyX");
 
-   // show banner
-   dialog_->show();
+       // show banner
+       dialog_->show();
 }
index 387572e9fa1cbbf5679e8d185483e3a368ea9d84..22e9f0dba1fd23c0ed6e9e2a287241f5ca4c82ae 100644 (file)
@@ -19,7 +19,7 @@ class FormSplashBase;
  */
 class FormSplash : public DialogBase {
 
- public:
+public:
        FormSplash(LyXView *, Dialogs *);
 
        ~FormSplash();
@@ -27,7 +27,7 @@ class FormSplash : public DialogBase {
        /// hide the dialog
        void hide(); 
 
- private:
+private:
        /// show the dialog
        void show(); 
 
index 82693a6d6584280832aaa49619cf1877039a96f6..3974702daf754b59ceb47e569dd8168efc495b01 100644 (file)
@@ -30,41 +30,41 @@ FormTabularCreate::FormTabularCreate(LyXView *v, Dialogs *d)
 
 FormTabularCreate::~FormTabularCreate()
 {
-   delete dialog_;
+       delete dialog_;
 }
 
 void FormTabularCreate::apply(int rows, int cols)
 {
-   if (!lv_->view()->available())
-     return;
+       if (!lv_->view()->available())
+               return;
 
-   string tmp = tostr(rows) + " " + tostr(cols);
-   lv_->getLyXFunc()->Dispatch(LFUN_INSET_TABULAR, tmp);
+       string tmp = tostr(rows) + " " + tostr(cols);
+       lv_->getLyXFunc()->Dispatch(LFUN_INSET_TABULAR, tmp);
 }
 
 void FormTabularCreate::show()
 {
-   if (!dialog_)
-     dialog_ = new TabularCreateDlgImpl(this, 0, _("LyX: Insert Table"));
+       if (!dialog_)
+         dialog_ = new TabularCreateDlgImpl(this, 0, _("LyX: Insert Table"));
 
-   if (!dialog_->isVisible()) {
-      h_ = d_->hideBufferDependent.connect(slot(this, &FormTabularCreate::hide));
-      }
+       if (!dialog_->isVisible()) {
+               h_ = d_->hideBufferDependent.connect(slot(this, &FormTabularCreate::hide));
+       }
 
-   dialog_->raise();
-   dialog_->setActiveWindow();
+       dialog_->raise();
+       dialog_->setActiveWindow();
 
-   update();
-   dialog_->show();
+       update();
+       dialog_->show();
 }
 
 void FormTabularCreate::close()
 {
-   h_.disconnect();
+       h_.disconnect();
 }
 
 void FormTabularCreate::hide()
 {
-   dialog_->hide();
-   close();
+       dialog_->hide();
+       close();
 }
index 6841c940bb57ced3ce8049333440f3def4d8e3e9..1377d2228d7cdb066a00c70de340269251b8fc73 100644 (file)
@@ -2,9 +2,9 @@
 /* This file is part of
  * ======================================================
  *
- *           LyX, The Document Processor
+ *                LyX, The Document Processor
  *
- *           Copyright 2000 The LyX Team.
+ *                Copyright 2000 The LyX Team.
  *
  * ======================================================
  *
@@ -33,28 +33,27 @@ Qt2Base::Qt2Base(ControlButtons & c, QString const & t)
 {}
 
 
-
 void Qt2Base::show()
 {
-    if (!form()) {
-       build();
-    }
-
-    update();  // make sure its up-to-date
-
-    if (form()->isVisible()) {
-       form()->raise();
-    } else {
-       form()->setCaption( title_ );
-       form()->show();
-    }
+       if (!form()) {
+               build();
+       }
+
+       update();  // make sure its up-to-date
+
+       if (form()->isVisible()) {
+               form()->raise();
+       } else {
+               form()->setCaption( title_ );
+               form()->show();
+       }
 }
 
 
 void Qt2Base::hide()
 {
-    if (form() && form()->isVisible() )
-       form()->hide();
+       if (form() && form()->isVisible() )
+               form()->hide();
 }
 
 
@@ -67,39 +66,39 @@ void Qt2Base::hide()
 
 ButtonPolicy::SMInput Qt2Base::input(QWidget*, long)
 {
-    return ButtonPolicy::SMI_VALID;
+       return ButtonPolicy::SMI_VALID;
 }
 
 
 
 void Qt2Base::slotWMHide()
 {
-    CancelButton();
+       CancelButton();
 }
 
 
 
 void Qt2Base::slotApply()
 {
-    ApplyButton();
+       ApplyButton();
 }
 
 
 void Qt2Base::slotOK()
 {
-    OKButton();
+       OKButton();
 }
 
 
 void Qt2Base::slotCancel()
 {
-    CancelButton();
+       CancelButton();
 }
 
 
 void Qt2Base::slotRestore()
 {
-    RestoreButton();
+       RestoreButton();
 }
 
 
index d697dd89331fa63f9e9891c5c8e7bfa39a514799..4d90123f0c85ba9bf4546f3265a91591054ee91c 100644 (file)
@@ -2,9 +2,9 @@
 /* This file is part of
  * ======================================================
  *
- *           LyX, The Document Processor
+ *                LyX, The Document Processor
  *
- *           Copyright 2000 The LyX Team.
+ *                Copyright 2000 The LyX Team.
  *
  * ======================================================
  *
@@ -16,6 +16,8 @@
 
 class QDialog;
 
+#include <config.h> 
 #include <qfont.h>
 #include <qobject.h>
 
@@ -36,7 +38,7 @@ class qt2BC;
  */
 class Qt2Base : public QObject, public ViewBC<qt2BC>
 {
-    Q_OBJECT
+       Q_OBJECT
 public:
        ///
        Qt2Base(ControlButtons &, const QString &);
@@ -52,26 +54,26 @@ protected:
        void show();
 
 protected slots:
-    // dialog closed from WM
-    void slotWMHide();
+       // dialog closed from WM
+       void slotWMHide();
 
-    // Apply button clicked
-    void slotApply();
+       // Apply button clicked
+       void slotApply();
 
-    // OK button clicked
-    void slotOK();
+       // OK button clicked
+       void slotOK();
 
-    // Cancel button clicked
-    void slotCancel();
+       // Cancel button clicked
+       void slotCancel();
 
-    // Restore button clicked
-    void slotRestore();
+       // Restore button clicked
+       void slotRestore();
 
 private:
        /// Pointer to the actual instantiation of xform's form
        virtual QDialog* form() const = 0;
        /** Filter the inputs on callback from xforms
-           Return true if inputs are valid. */
+               Return true if inputs are valid. */
        virtual ButtonPolicy::SMInput input(QWidget*, long);
 
 private:
@@ -102,7 +104,7 @@ Qt2DB<Dialog>::Qt2DB(ControlButtons & c, const QString& t)
 template <class Dialog>
 QDialog* Qt2DB<Dialog>::form() const
 {
-    return dialog_.get();
+       return dialog_.get();
 }
 
 
index a4be01eb5e5e5704a6202b833c45c0686fa87193..f16755ec171edd98a711d412381330975c4dc0f3 100644 (file)
@@ -18,9 +18,9 @@
 #include <qgroupbox.h>
 
 CharDlgImpl::CharDlgImpl(FormCharacter* form, QWidget * parent,  const char* name, bool modal, WFlags fl )
-    : CharDlg( parent, name, modal, fl ), form_(form)
+        : CharDlg( parent, name, modal, fl ), form_(form)
 {
-   setCaption(name);
+       setCaption(name);
 }
 
 CharDlgImpl::~CharDlgImpl()
@@ -29,108 +29,108 @@ CharDlgImpl::~CharDlgImpl()
 
 LyXFont CharDlgImpl::getChar()
 {
-   LyXFont font(LyXFont::ALL_IGNORE);
-   
-   int pos = family->currentItem();
-   switch (pos) {
-      case 0: font.setFamily(LyXFont::IGNORE_FAMILY); break;
-      case 1: font.setFamily(LyXFont::INHERIT_FAMILY); break;
-      case 2: font.setFamily(LyXFont::ROMAN_FAMILY); break;
-      case 3: font.setFamily(LyXFont::SANS_FAMILY); break;
-      case 4: font.setFamily(LyXFont::TYPEWRITER_FAMILY); break;
-   }
-   
-   pos = series->currentItem();
-   switch (pos) {
-      case 0: font.setSeries(LyXFont::IGNORE_SERIES); break;
-      case 1: font.setSeries(LyXFont::INHERIT_SERIES); break;
-      case 2: font.setSeries(LyXFont::MEDIUM_SERIES); break;
-      case 3: font.setSeries(LyXFont::BOLD_SERIES); break;
-   }
-   
-   pos = shape->currentItem();
-   switch (pos) {
-      case 0: font.setShape(LyXFont::IGNORE_SHAPE); break;
-      case 1: font.setShape(LyXFont::INHERIT_SHAPE); break;
-      case 2: font.setShape(LyXFont::UP_SHAPE); break;
-      case 3: font.setShape(LyXFont::ITALIC_SHAPE); break;
-      case 4: font.setShape(LyXFont::SLANTED_SHAPE); break;
-      case 5: font.setShape(LyXFont::SMALLCAPS_SHAPE); break;
-   }
-   
-   pos = size->currentItem();
-   switch (pos) {
-      case 0: font.setSize(LyXFont::IGNORE_SIZE); break;
-      case 1: font.setSize(LyXFont::INHERIT_SIZE); break;
-      case 2: font.setSize(LyXFont::SIZE_TINY); break;
-      case 3: font.setSize(LyXFont::SIZE_SCRIPT); break;
-      case 4: font.setSize(LyXFont::SIZE_FOOTNOTE); break;
-      case 5: font.setSize(LyXFont::SIZE_SMALL); break;
-      case 6: font.setSize(LyXFont::SIZE_NORMAL); break;
-      case 7: font.setSize(LyXFont::SIZE_LARGE); break;
-      case 8: font.setSize(LyXFont::SIZE_LARGER); break;
-      case 9: font.setSize(LyXFont::SIZE_LARGEST); break;
-      case 10: font.setSize(LyXFont::SIZE_HUGE); break;
-      case 11: font.setSize(LyXFont::SIZE_HUGER); break;
-      case 12: font.setSize(LyXFont::INCREASE_SIZE); break;
-      case 13: font.setSize(LyXFont::DECREASE_SIZE); break;
-   }
-   
-   pos = misc->currentItem();
-   switch (pos) {
-      case 0: font.setEmph(LyXFont::IGNORE);
-      font.setUnderbar(LyXFont::IGNORE);
-      font.setNoun(LyXFont::IGNORE);
-      font.setLatex(LyXFont::IGNORE);
-      break;
-      case 1: font.setEmph(LyXFont::INHERIT);
-      font.setUnderbar(LyXFont::INHERIT);
-      font.setNoun(LyXFont::INHERIT);
-      font.setLatex(LyXFont::INHERIT);
-      break;
-      case 2: font.setEmph(LyXFont::TOGGLE); break;
-      case 3: font.setUnderbar(LyXFont::TOGGLE); break;
-      case 4: font.setNoun(LyXFont::TOGGLE); break;
-      case 5: font.setLatex(LyXFont::TOGGLE); break;
-   }
-   
-   pos = color->currentItem();
-   switch (pos) {
-      case 0: font.setColor(LColor::ignore); break;
-      case 1: font.setColor(LColor::inherit); break;
-      case 2: font.setColor(LColor::none); break;
-      case 3: font.setColor(LColor::black); break;
-      case 4: font.setColor(LColor::white); break;
-      case 5: font.setColor(LColor::red); break;
-      case 6: font.setColor(LColor::green); break;
-      case 7: font.setColor(LColor::blue); break;
-      case 8: font.setColor(LColor::cyan); break;
-      case 9: font.setColor(LColor::magenta); break;
-      case 10: font.setColor(LColor::yellow); break;
-   }
-   
-   pos = lang->currentItem();
-   if (pos==0) {
-     font.setLanguage(ignore_language);
-   } else if (pos!=1) {
-     const char * language = lang->currentText();
-     font.setLanguage(languages.getLanguage(language));
-   };
+       LyXFont font(LyXFont::ALL_IGNORE);
+       
+       int pos = family->currentItem();
+       switch (pos) {
+               case 0: font.setFamily(LyXFont::IGNORE_FAMILY); break;
+               case 1: font.setFamily(LyXFont::INHERIT_FAMILY); break;
+               case 2: font.setFamily(LyXFont::ROMAN_FAMILY); break;
+               case 3: font.setFamily(LyXFont::SANS_FAMILY); break;
+               case 4: font.setFamily(LyXFont::TYPEWRITER_FAMILY); break;
+       }
+       
+       pos = series->currentItem();
+       switch (pos) {
+               case 0: font.setSeries(LyXFont::IGNORE_SERIES); break;
+               case 1: font.setSeries(LyXFont::INHERIT_SERIES); break;
+               case 2: font.setSeries(LyXFont::MEDIUM_SERIES); break;
+               case 3: font.setSeries(LyXFont::BOLD_SERIES); break;
+       }
+       
+       pos = shape->currentItem();
+       switch (pos) {
+               case 0: font.setShape(LyXFont::IGNORE_SHAPE); break;
+               case 1: font.setShape(LyXFont::INHERIT_SHAPE); break;
+               case 2: font.setShape(LyXFont::UP_SHAPE); break;
+               case 3: font.setShape(LyXFont::ITALIC_SHAPE); break;
+               case 4: font.setShape(LyXFont::SLANTED_SHAPE); break;
+               case 5: font.setShape(LyXFont::SMALLCAPS_SHAPE); break;
+       }
+       
+       pos = size->currentItem();
+       switch (pos) {
+               case 0: font.setSize(LyXFont::IGNORE_SIZE); break;
+               case 1: font.setSize(LyXFont::INHERIT_SIZE); break;
+               case 2: font.setSize(LyXFont::SIZE_TINY); break;
+               case 3: font.setSize(LyXFont::SIZE_SCRIPT); break;
+               case 4: font.setSize(LyXFont::SIZE_FOOTNOTE); break;
+               case 5: font.setSize(LyXFont::SIZE_SMALL); break;
+               case 6: font.setSize(LyXFont::SIZE_NORMAL); break;
+               case 7: font.setSize(LyXFont::SIZE_LARGE); break;
+               case 8: font.setSize(LyXFont::SIZE_LARGER); break;
+               case 9: font.setSize(LyXFont::SIZE_LARGEST); break;
+               case 10: font.setSize(LyXFont::SIZE_HUGE); break;
+               case 11: font.setSize(LyXFont::SIZE_HUGER); break;
+               case 12: font.setSize(LyXFont::INCREASE_SIZE); break;
+               case 13: font.setSize(LyXFont::DECREASE_SIZE); break;
+       }
+       
+       pos = misc->currentItem();
+       switch (pos) {
+               case 0: font.setEmph(LyXFont::IGNORE);
+                       font.setUnderbar(LyXFont::IGNORE);
+                       font.setNoun(LyXFont::IGNORE);
+                       font.setLatex(LyXFont::IGNORE);
+                       break;
+               case 1: font.setEmph(LyXFont::INHERIT);
+                       font.setUnderbar(LyXFont::INHERIT);
+                       font.setNoun(LyXFont::INHERIT);
+                       font.setLatex(LyXFont::INHERIT);
+                       break;
+               case 2: font.setEmph(LyXFont::TOGGLE); break;
+               case 3: font.setUnderbar(LyXFont::TOGGLE); break;
+               case 4: font.setNoun(LyXFont::TOGGLE); break;
+               case 5: font.setLatex(LyXFont::TOGGLE); break;
+       }
+       
+       pos = color->currentItem();
+       switch (pos) {
+               case 0: font.setColor(LColor::ignore); break;
+               case 1: font.setColor(LColor::inherit); break;
+               case 2: font.setColor(LColor::none); break;
+               case 3: font.setColor(LColor::black); break;
+               case 4: font.setColor(LColor::white); break;
+               case 5: font.setColor(LColor::red); break;
+               case 6: font.setColor(LColor::green); break;
+               case 7: font.setColor(LColor::blue); break;
+               case 8: font.setColor(LColor::cyan); break;
+               case 9: font.setColor(LColor::magenta); break;
+               case 10: font.setColor(LColor::yellow); break;
+       }
+       
+       pos = lang->currentItem();
+       if (pos==0) {
+               font.setLanguage(ignore_language);
+       } else if (pos!=1) {
+               string language(lang->currentText());
+               font.setLanguage(languages.getLanguage(language));
+       };
 
-   return font;
+       return font;
 }
 
 void CharDlgImpl::closeEvent(QCloseEvent * e)
 {
-   form_->close();
-   e->accept();
+       form_->close();
+       e->accept();
 }
 
 void CharDlgImpl::setReadOnly(bool readonly)
 {
-   sizeGB->setEnabled(!readonly);
-   charGB->setEnabled(!readonly);
-   miscGB->setEnabled(!readonly);
-   okPB->setEnabled(!readonly);
-   applyPB->setEnabled(!readonly);
+       sizeGB->setEnabled(!readonly);
+       charGB->setEnabled(!readonly);
+       miscGB->setEnabled(!readonly);
+       okPB->setEnabled(!readonly);
+       applyPB->setEnabled(!readonly);
 }
index 67169f0eb3899861dc2948bb3ed4b45c5a47144c..6e311899c50f1b908ae1f3199aef2dc49e88f4e4 100644 (file)
@@ -9,6 +9,8 @@
 #ifndef CHARDLGIMPL_H
 #define CHARDLGIMPL_H
 
+#include <config.h>
 #include "chardlg.h"
 #include "FormCharacter.h"
 #include <qevent.h>
@@ -20,53 +22,48 @@ class FormCharacter;
 
 class CharDlgImpl : public CharDlg
 { 
-    Q_OBJECT
+       Q_OBJECT
 
+public:
+       CharDlgImpl(FormCharacter * form, QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
+        
+       ~CharDlgImpl();
+       
+       LyXFont getChar();
+       
+       int langItem() { 
+               return lang->currentItem();
+       };
+       
+       bool toggleAll() { 
+               return toggleall->isChecked(); 
+       };
+       
+       void setReadOnly(bool);
+       
+protected:
+       void closeEvent(QCloseEvent * e);
 
- public:
-    
-   CharDlgImpl(FormCharacter * form, QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
-    
-   ~CharDlgImpl();
-   
-   LyXFont getChar();
-   
-   int langItem() { 
-      return lang->currentItem();
-   };
-   
-   bool toggleAll() { 
-      return toggleall->isChecked(); 
-   };
-   
-   void setReadOnly(bool);
-   
- protected:
-   
-   void closeEvent(QCloseEvent * e);
+private:
+       FormCharacter * form_;
+       
 
-
- private:
-   
-   FormCharacter * form_;
-   
-
- protected slots:
-   
-   void apply_adaptor() {
-      form_->apply();
-   }
-    
-   void cancel_adaptor() {
-      form_->close();
-      hide();
-   }
-    
-   void close_adaptor() {
-      form_->apply();
-      form_->close();
-      hide();
-   }
+protected slots:
+       
+       void apply_adaptor() {
+               form_->apply();
+       }
+        
+       void cancel_adaptor() {
+               form_->close();
+               hide();
+       }
+        
+       void close_adaptor() {
+               form_->apply();
+               form_->close();
+               hide();
+       }
 
 };
 
index 53ef5225b89d5cd07ddfd764e0bfc9df325a1118..24ab4f2d71f1a113fa25fa38cec105c428cd87a7 100644 (file)
@@ -1,18 +1,11 @@
-/*
- * emptytable.C
- * (C) 2000 LyX Team
- * John Levon, moz@compsoc.man.ac.uk
+/**
+ * \file emptytable.C
+ * Copyright 2001 the LyX Team
+ * Read the file COPYING
+ *
+ * \author John Levon
  */
 
-/***************************************************************************
- *                                                                         *
- *   This program is free software; you can redistribute it and/or modify  *
- *   it under the terms of the GNU General Public License as published by  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- *                                                                         *
- ***************************************************************************/
-
 #include "emptytable.h"
 
 /**
index 518a705f75971ec3925068a379b37ca12f941fbf..953adfc7cd06a7e975f3ef642093387fa9075d88 100644 (file)
@@ -1,32 +1,23 @@
-/*
- * emptytable.h
- * (C) 2000 LyX Team
- * John Levon, moz@compsoc.man.ac.uk
+/**
+ * \file emptytable.h
+ * Copyright 2001 the LyX Team
+ * Read the file COPYING
+ *
+ * \author John Levon
  */
 
-/***************************************************************************
- *                                                                         *
- *   This program is free software; you can redistribute it and/or modify  *
- *   it under the terms of the GNU General Public License as published by  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- *                                                                         *
- ***************************************************************************/
-
 #ifndef EMPTYTABLE_H
 #define EMPTYTABLE_H
 
 #include <qpainter.h> 
 #include <qtableview.h> 
 
-#include "boost/utility.hpp"
-
 /**
  * A simple widget for a quick "preview" in TabularCreateDialog.
  * The user can drag on the widget to change the table dimensions.
  */
 class EmptyTable : public QTableView {
-   Q_OBJECT
+       Q_OBJECT
 public:
        EmptyTable(QWidget * parent = 0, const char * name = 0);
        
index cb708551dbdc8a100fd80896e408572438de32c5..fc07f737630b8b9d8103b9cc6135ff3d97aea99d 100644 (file)
 using std::endl;
 
 ParagraphDlgImpl::ParagraphDlgImpl(FormParagraph *form, QWidget* parent,  const char* name, bool modal, WFlags fl )
-    : ParagraphDlg( parent, name, modal, fl ), form_(form)
+       : ParagraphDlg( parent, name, modal, fl ), form_(form)
 {
-  setCaption(name);
+       setCaption(name);
 }
 
+
 ParagraphDlgImpl::~ParagraphDlgImpl()
 {
-    // no need to delete child widgets, Qt does it all for us
 }
 
+
 void ParagraphDlgImpl::setReadOnly(bool readonly)
 {
-   TabsParagraph->setEnabled(!readonly);
-   okPB->setEnabled(!readonly);
-   applyPB->setEnabled(!readonly);
-   defaultsPB->setEnabled(!readonly);
-   cancelPB->setText(readonly ? _("&Close") : _("&Cancel"));
+       TabsParagraph->setEnabled(!readonly);
+       okPB->setEnabled(!readonly);
+       applyPB->setEnabled(!readonly);
+       defaultsPB->setEnabled(!readonly);
+       cancelPB->setText(readonly ? _("&Close") : _("&Cancel"));
 }
 
+
 void ParagraphDlgImpl::setLabelWidth(const char *text)
 {
-   // FIXME: should be cleverer here
-   if (!strcmp(_("Senseless with this layout!"),text)) {
-      listOptions->setEnabled(false);
-      labelWidth->setText("");
-   } else {
-      listOptions->setEnabled(true);
-      labelWidth->setText(text);
-   }
+       // FIXME: should be cleverer here
+       if (!strcmp(_("Senseless with this layout!"),text)) {
+               listOptions->setEnabled(false);
+               labelWidth->setText("");
+       } else {
+               listOptions->setEnabled(true);
+               labelWidth->setText(text);
+       }
 }
 
+
 void ParagraphDlgImpl::setAlign(int type)
 {
-   int item=0;
-   switch (type) {
-    case LYX_ALIGN_BLOCK : item=0; break;
-    case LYX_ALIGN_LEFT : item=1; break;
-    case LYX_ALIGN_RIGHT : item=2; break;
-    case LYX_ALIGN_CENTER : item=3; break;
-    default:
-      item=0;
-   }
-   alignment->setCurrentItem(item);
+       int item=0;
+       switch (type) {
+               case LYX_ALIGN_BLOCK : item=0; break;
+               case LYX_ALIGN_LEFT : item=1; break;
+               case LYX_ALIGN_RIGHT : item=2; break;
+               case LYX_ALIGN_CENTER : item=3; break;
+               default:
+                       item=0;
+       }
+       alignment->setCurrentItem(item);
 }
 
+
 void ParagraphDlgImpl::setChecks(bool labove, bool lbelow, bool pabove, bool pbelow, bool noindent)
 {
-   lineAbove->setChecked(labove);
-   lineBelow->setChecked(lbelow);
-   pagebreakAbove->setChecked(pabove);
-   pagebreakBelow->setChecked(pbelow);
-   noIndent->setChecked(noindent);
+       lineAbove->setChecked(labove);
+       lineBelow->setChecked(lbelow);
+       pagebreakAbove->setChecked(pabove);
+       pagebreakBelow->setChecked(pbelow);
+       noIndent->setChecked(noindent);
 }
 
+
 void ParagraphDlgImpl::setSpace(VSpace::vspace_kind kindabove, VSpace::vspace_kind kindbelow, bool keepabove, bool keepbelow)
 {
-   int item=0;
-   
-   switch (kindabove) {
-      case VSpace::NONE: item = 0; break;
-      case VSpace::DEFSKIP: item = 1; break;
-      case VSpace::SMALLSKIP: item = 2; break;
-      case VSpace::MEDSKIP: item = 3; break;
-      case VSpace::BIGSKIP: item = 4; break;
-      case VSpace::VFILL: item = 5; break;
-      case VSpace::LENGTH: item = 6; break;
-   }
-   spacingAbove->setCurrentItem(item);
-   
-   switch (kindbelow) {
-      case VSpace::NONE: item = 0; break;
-      case VSpace::DEFSKIP: item = 1; break;
-      case VSpace::SMALLSKIP: item = 2; break;
-      case VSpace::MEDSKIP: item = 3; break;
-      case VSpace::BIGSKIP: item = 4; break;
-      case VSpace::VFILL: item = 5; break;
-      case VSpace::LENGTH: item = 6; break;
-   }
-   spacingBelow->setCurrentItem(item);
-   
-   spacingAboveValue->setEnabled(kindabove == VSpace::LENGTH);
-   spacingAbovePlus->setEnabled(kindabove == VSpace::LENGTH);
-   spacingAboveMinus->setEnabled(kindabove == VSpace::LENGTH);
-   spacingBelowValue->setEnabled(kindbelow == VSpace::LENGTH);
-   spacingBelowPlus->setEnabled(kindbelow == VSpace::LENGTH);
-   spacingBelowMinus->setEnabled(kindbelow == VSpace::LENGTH);
-   
-   spacingAboveKeep->setChecked(keepabove);
-   spacingBelowKeep->setChecked(keepbelow);
+       int item=0;
+       
+       switch (kindabove) {
+               case VSpace::NONE: item = 0; break;
+               case VSpace::DEFSKIP: item = 1; break;
+               case VSpace::SMALLSKIP: item = 2; break;
+               case VSpace::MEDSKIP: item = 3; break;
+               case VSpace::BIGSKIP: item = 4; break;
+               case VSpace::VFILL: item = 5; break;
+               case VSpace::LENGTH: item = 6; break;
+       }
+       spacingAbove->setCurrentItem(item);
+       
+       switch (kindbelow) {
+               case VSpace::NONE: item = 0; break;
+               case VSpace::DEFSKIP: item = 1; break;
+               case VSpace::SMALLSKIP: item = 2; break;
+               case VSpace::MEDSKIP: item = 3; break;
+               case VSpace::BIGSKIP: item = 4; break;
+               case VSpace::VFILL: item = 5; break;
+               case VSpace::LENGTH: item = 6; break;
+       }
+       spacingBelow->setCurrentItem(item);
+       
+       spacingAboveValue->setEnabled(kindabove == VSpace::LENGTH);
+       spacingAbovePlus->setEnabled(kindabove == VSpace::LENGTH);
+       spacingAboveMinus->setEnabled(kindabove == VSpace::LENGTH);
+       spacingBelowValue->setEnabled(kindbelow == VSpace::LENGTH);
+       spacingBelowPlus->setEnabled(kindbelow == VSpace::LENGTH);
+       spacingBelowMinus->setEnabled(kindbelow == VSpace::LENGTH);
+       
+       spacingAboveKeep->setChecked(keepabove);
+       spacingBelowKeep->setChecked(keepbelow);
 }
 
+
 void ParagraphDlgImpl::setAboveLength(float val, float plus, float minus, 
        LyXLength::UNIT vunit, LyXLength::UNIT punit, LyXLength::UNIT munit)
 {
-   if (vunit==LyXLength::UNIT_NONE) {
-      spacingAboveValue->setText("");
-      spacingAbovePlus->setText("");
-      spacingAboveMinus->setText("");
-   } else {
-      spacingAboveValue->setText(tostr(val).c_str());
-      spacingAbovePlus->setText(tostr(plus).c_str());
-      spacingAboveMinus->setText(tostr(minus).c_str());
-   }
-   
-   spacingAboveValueUnit->setCurrentItem(getItem(vunit));
-   spacingAbovePlusUnit->setCurrentItem(getItem(punit));
-   spacingAboveMinusUnit->setCurrentItem(getItem(munit));
+       if (vunit==LyXLength::UNIT_NONE) {
+               spacingAboveValue->setText("");
+               spacingAbovePlus->setText("");
+               spacingAboveMinus->setText("");
+       } else {
+               spacingAboveValue->setText(tostr(val).c_str());
+               spacingAbovePlus->setText(tostr(plus).c_str());
+               spacingAboveMinus->setText(tostr(minus).c_str());
+       }
+       
+       spacingAboveValueUnit->setCurrentItem(getItem(vunit));
+       spacingAbovePlusUnit->setCurrentItem(getItem(punit));
+       spacingAboveMinusUnit->setCurrentItem(getItem(munit));
 
 }
 
+
 void ParagraphDlgImpl::setBelowLength(float val, float plus, float minus, 
        LyXLength::UNIT vunit, LyXLength::UNIT punit, LyXLength::UNIT munit)
 {
-   if (vunit==LyXLength::UNIT_NONE) {
-      spacingBelowValue->setText("");
-      spacingBelowPlus->setText("");
-      spacingBelowMinus->setText("");
-   } else {
-      spacingBelowValue->setText(tostr(val).c_str());
-      spacingBelowPlus->setText(tostr(plus).c_str());
-      spacingBelowMinus->setText(tostr(minus).c_str());
-   }
-   
-   spacingBelowValueUnit->setCurrentItem(getItem(vunit));
-   spacingBelowPlusUnit->setCurrentItem(getItem(punit));
-   spacingBelowMinusUnit->setCurrentItem(getItem(munit));
+       if (vunit==LyXLength::UNIT_NONE) {
+               spacingBelowValue->setText("");
+               spacingBelowPlus->setText("");
+               spacingBelowMinus->setText("");
+       } else {
+               spacingBelowValue->setText(tostr(val).c_str());
+               spacingBelowPlus->setText(tostr(plus).c_str());
+               spacingBelowMinus->setText(tostr(minus).c_str());
+       }
+       
+       spacingBelowValueUnit->setCurrentItem(getItem(vunit));
+       spacingBelowPlusUnit->setCurrentItem(getItem(punit));
+       spacingBelowMinusUnit->setCurrentItem(getItem(munit));
 }
 
 
 void ParagraphDlgImpl::setExtra(float widthval, LyXLength::UNIT units, const string percent, int align, 
        bool hfill, bool startminipage, LyXParagraph::PEXTRA_TYPE type)
 {
-   if (type!=LyXParagraph::PEXTRA_NONE) {
-      lyxerr[Debug::GUI] << "percent : $" << percent << "$ widthval " << widthval << " unit " << long(units) << endl;
-      if (percent != "") {
-        extraWidth->setText(percent.c_str());
-        extraUnit->setCurrentItem(11);
-      } else {
-        extraWidth->setText(tostr(widthval).c_str());
-        extraUnit->setCurrentItem(getItem(units));
-      }
-   } else
-     extraWidth->setText("");
-   
-   switch (type) {
-      case LyXParagraph::PEXTRA_NONE: 
-      extraType->setCurrentItem(0); 
-      break;
-      case LyXParagraph::PEXTRA_MINIPAGE: 
-      extraType->setCurrentItem(1); 
-      enable_extraOptions(1); 
-      enable_minipageOptions(1); 
-      break;
-      case LyXParagraph::PEXTRA_FLOATFLT: 
-      extraType->setCurrentItem(2); 
-      enable_extraOptions(2); 
-      break;
-      case LyXParagraph::PEXTRA_INDENT: 
-      extraType->setCurrentItem(3); 
-      enable_extraOptions(3); 
-      break;
-   }
-   
-   switch (align) {
-      case LyXParagraph::MINIPAGE_ALIGN_TOP: 
-      minipageValign->setCurrentItem(0); 
-      break;
-      case LyXParagraph::MINIPAGE_ALIGN_MIDDLE:        
-      minipageValign->setCurrentItem(1); 
-      break;
-      case LyXParagraph::MINIPAGE_ALIGN_BOTTOM:        
-      minipageValign->setCurrentItem(2); 
-      break;
-   }
-   
-   minipageHfill->setChecked(hfill);
-   minipageStart->setChecked(startminipage);
-   
+       if (type!=LyXParagraph::PEXTRA_NONE) {
+               lyxerr[Debug::GUI] << "percent : $" << percent << "$ widthval " << widthval << " unit " << long(units) << endl;
+               if (percent != "") {
+                       extraWidth->setText(percent.c_str());
+                       extraUnit->setCurrentItem(11);
+               } else {
+                       extraWidth->setText(tostr(widthval).c_str());
+                       extraUnit->setCurrentItem(getItem(units));
+               }
+       } else
+               extraWidth->setText("");
+       
+       switch (type) {
+               case LyXParagraph::PEXTRA_NONE: 
+                       extraType->setCurrentItem(0); 
+                       break;
+               case LyXParagraph::PEXTRA_MINIPAGE: 
+                       extraType->setCurrentItem(1); 
+                       enable_extraOptions(1); 
+                       enable_minipageOptions(1); 
+                       break;
+               case LyXParagraph::PEXTRA_FLOATFLT: 
+                       extraType->setCurrentItem(2); 
+                       enable_extraOptions(2); 
+                       break;
+               case LyXParagraph::PEXTRA_INDENT: 
+                       extraType->setCurrentItem(3); 
+                       enable_extraOptions(3); 
+                       break;
+       }
+       
+       switch (align) {
+               case LyXParagraph::MINIPAGE_ALIGN_TOP: 
+                       minipageValign->setCurrentItem(0); 
+                       break;
+               case LyXParagraph::MINIPAGE_ALIGN_MIDDLE:       
+                       minipageValign->setCurrentItem(1); 
+                       break;
+               case LyXParagraph::MINIPAGE_ALIGN_BOTTOM:       
+                       minipageValign->setCurrentItem(2); 
+                       break;
+       }
+       
+       minipageHfill->setChecked(hfill);
+       minipageStart->setChecked(startminipage);
 }
 
 
 LyXGlueLength ParagraphDlgImpl::getAboveLength() const
 {
-   LyXGlueLength len(
-                    spacingAboveValue->text().toFloat(),
-                    getLyXLength( spacingAboveValueUnit->currentItem() ),
-                    spacingAbovePlus->text().toFloat(),
-                    getLyXLength( spacingAbovePlusUnit->currentItem() ),
-                    spacingAboveMinus->text().toFloat(),
-                    getLyXLength( spacingAboveMinusUnit->currentItem() )
-                    );
-   return len;
+       LyXGlueLength len(
+               spacingAboveValue->text().toFloat(),
+               getLyXLength( spacingAboveValueUnit->currentItem() ),
+               spacingAbovePlus->text().toFloat(),
+               getLyXLength( spacingAbovePlusUnit->currentItem() ),
+               spacingAboveMinus->text().toFloat(),
+               getLyXLength( spacingAboveMinusUnit->currentItem() )
+               );
+       return len;
 }
 
 LyXGlueLength ParagraphDlgImpl::getBelowLength() const
 {
-   LyXGlueLength len(
-                    spacingBelowValue->text().toFloat(),
-                    getLyXLength( spacingBelowValueUnit->currentItem() ),
-                    spacingBelowPlus->text().toFloat(),
-                    getLyXLength( spacingBelowPlusUnit->currentItem() ),
-                    spacingBelowMinus->text().toFloat(),
-                    getLyXLength( spacingBelowMinusUnit->currentItem() )
+       LyXGlueLength len(
+               spacingBelowValue->text().toFloat(),
+               getLyXLength( spacingBelowValueUnit->currentItem() ),
+               spacingBelowPlus->text().toFloat(),
+               getLyXLength( spacingBelowPlusUnit->currentItem() ),
+               spacingBelowMinus->text().toFloat(),
+               getLyXLength( spacingBelowMinusUnit->currentItem() )
                );
-   return len;
+       return len;
 }
 
+
 LyXLength ParagraphDlgImpl::getExtraWidth() const
 {
-   if (extraUnit->currentItem()!=11) {
-      LyXLength len( 
-                   (extraWidth->text()).toDouble(), 
-                   getLyXLength(extraUnit->currentItem())
-                   );
-      return len;
-   } else {
-      LyXLength len(0.0, LyXLength::UNIT_NONE);
-      return len;
-   }
-}
-
+       if (extraUnit->currentItem()!=11) {
+               LyXLength len( 
+                        (extraWidth->text()).toDouble(), 
+                        getLyXLength(extraUnit->currentItem())
+                        );
+               return len;
+       } else {
+               LyXLength len(0.0, LyXLength::UNIT_NONE);
+               return len;
+       }
+}
+
 string ParagraphDlgImpl::getExtraWidthPercent() const
 {
-   double val = (extraWidth->text()).toDouble();
-   if (val > 100.0)
-     val = 100.0;
-   if (val < 0.0)
-     val = 0.0;
-   return tostr(val);
+       double val = (extraWidth->text()).toDouble();
+       if (val > 100.0)
+               val = 100.0;
+       if (val < 0.0)
+               val = 0.0;
+       return tostr(val);
 }
 
 
-const char* ParagraphDlgImpl::getLabelWidth() const { 
-   return labelWidth->text(); 
+const char * ParagraphDlgImpl::getLabelWidth() const { 
+       return labelWidth->text(); 
 }
-   
+
+
 LyXAlignment ParagraphDlgImpl::getAlign() const {
-   switch (alignment->currentItem()) {
-      case 0: return LYX_ALIGN_BLOCK;
-      case 1: return LYX_ALIGN_LEFT;
-      case 2: return LYX_ALIGN_RIGHT;
-      case 3: return LYX_ALIGN_CENTER;
-      default: return LYX_ALIGN_CENTER;
-   }
-}
-   
-   
+       switch (alignment->currentItem()) {
+               case 0: return LYX_ALIGN_BLOCK;
+               case 1: return LYX_ALIGN_LEFT;
+               case 2: return LYX_ALIGN_RIGHT;
+               case 3: return LYX_ALIGN_CENTER;
+               default: return LYX_ALIGN_CENTER;
+       }
+}
+       
+       
 bool ParagraphDlgImpl::getAboveKeep() const { 
-   return spacingAboveKeep->isChecked(); 
+       return spacingAboveKeep->isChecked(); 
 }
-   
+
+       
 bool ParagraphDlgImpl::getBelowKeep() const { 
-   return spacingBelowKeep->isChecked(); 
+       return spacingBelowKeep->isChecked(); 
 }
-   
+
+       
 bool ParagraphDlgImpl::getLineAbove() const { 
-   return lineAbove->isChecked(); 
+       return lineAbove->isChecked(); 
 }
-   
+
+       
 bool ParagraphDlgImpl::getLineBelow() const { 
-   return lineBelow->isChecked(); 
+       return lineBelow->isChecked(); 
 }
-   
+
+       
 bool ParagraphDlgImpl::getPagebreakAbove() const { 
-   return pagebreakAbove->isChecked(); 
+       return pagebreakAbove->isChecked(); 
 }
-   
+
+       
 bool ParagraphDlgImpl::getPagebreakBelow() const { 
-   return pagebreakBelow->isChecked(); 
+       return pagebreakBelow->isChecked(); 
 }
-   
+
+       
 bool ParagraphDlgImpl::getNoIndent() const { 
-   return noIndent->isChecked(); 
+       return noIndent->isChecked(); 
 }
-   
+
+       
 VSpace::vspace_kind ParagraphDlgImpl::getSpaceAboveKind() const {
-   return getSpaceKind(spacingAbove->currentItem());
+       return getSpaceKind(spacingAbove->currentItem());
 }
-   
+
+       
 VSpace::vspace_kind ParagraphDlgImpl::getSpaceBelowKind() const {
-   return getSpaceKind(spacingBelow->currentItem());
+       return getSpaceKind(spacingBelow->currentItem());
 }
 
 
 LyXParagraph::PEXTRA_TYPE ParagraphDlgImpl::getExtraType() const {
-   switch (extraType->currentItem()) {
-      case 0: return LyXParagraph::PEXTRA_NONE;
-      case 1: return LyXParagraph::PEXTRA_MINIPAGE;
-      case 2: return LyXParagraph::PEXTRA_FLOATFLT;
-      case 3: return LyXParagraph::PEXTRA_INDENT;
-   }
-   return LyXParagraph::PEXTRA_NONE;
-}
-   
+       switch (extraType->currentItem()) {
+               case 0: return LyXParagraph::PEXTRA_NONE;
+               case 1: return LyXParagraph::PEXTRA_MINIPAGE;
+               case 2: return LyXParagraph::PEXTRA_FLOATFLT;
+               case 3: return LyXParagraph::PEXTRA_INDENT;
+       }
+       return LyXParagraph::PEXTRA_NONE;
+}
+
+       
 LyXParagraph::MINIPAGE_ALIGNMENT ParagraphDlgImpl::getExtraAlign() const {
-   switch (minipageValign->currentItem()) {
-      case 0: return LyXParagraph::MINIPAGE_ALIGN_TOP;
-      case 1: return LyXParagraph::MINIPAGE_ALIGN_MIDDLE;
-      case 2: return LyXParagraph::MINIPAGE_ALIGN_BOTTOM;
-      default: return LyXParagraph::MINIPAGE_ALIGN_BOTTOM;
-   }
-}
-   
+       switch (minipageValign->currentItem()) {
+               case 0: return LyXParagraph::MINIPAGE_ALIGN_TOP;
+               case 1: return LyXParagraph::MINIPAGE_ALIGN_MIDDLE;
+               case 2: return LyXParagraph::MINIPAGE_ALIGN_BOTTOM;
+               default: return LyXParagraph::MINIPAGE_ALIGN_BOTTOM;
+       }
+}
+
+       
 bool ParagraphDlgImpl::getHfillBetween() const {
-   return minipageHfill->isChecked();
+       return minipageHfill->isChecked();
 }
 
+
 bool ParagraphDlgImpl::getStartNewMinipage() const {
-   return minipageStart->isChecked();
+       return minipageStart->isChecked();
 }
 
 
 VSpace::vspace_kind ParagraphDlgImpl::getSpaceKind(int val) const {
-   switch (val) {
-      case 0: return VSpace::NONE;
-      case 1: return VSpace::DEFSKIP;
-      case 2: return VSpace::SMALLSKIP;
-      case 3: return VSpace::MEDSKIP;
-      case 4: return VSpace::BIGSKIP;
-      case 5: return VSpace::VFILL;
-      case 6: return VSpace::LENGTH;
-      default:
-      lyxerr[Debug::GUI] << "Unknown kind combo entry " << val << std::endl;
-      }
-   return VSpace::NONE;
+       switch (val) {
+               case 0: return VSpace::NONE;
+               case 1: return VSpace::DEFSKIP;
+               case 2: return VSpace::SMALLSKIP;
+               case 3: return VSpace::MEDSKIP;
+               case 4: return VSpace::BIGSKIP;
+               case 5: return VSpace::VFILL;
+               case 6: return VSpace::LENGTH;
+               default:
+                       lyxerr[Debug::GUI] << "Unknown kind combo entry " << val << std::endl;
+               }
+       return VSpace::NONE;
 }
 
+
 LyXLength::UNIT ParagraphDlgImpl::getLyXLength(int val) const {
-   switch (val) {
-    case 0: return LyXLength::CM;
-    case 1: return LyXLength::IN;
-    case 2: return LyXLength::PT;
-    case 3: return LyXLength::MM;
-    case 4: return LyXLength::PC;
-    case 5: return LyXLength::EX;
-    case 6: return LyXLength::EM;
-    case 7: return LyXLength::SP;
-    case 8: return LyXLength::BP;
-    case 9: return LyXLength::DD;
-    case 10: return LyXLength::CC;
-    default:
-      lyxerr[Debug::GUI] << "Unknown kind combo entry " << val << std::endl;
-   }
-   return LyXLength::UNIT_NONE;
-}
-   
+       switch (val) {
+               case 0: return LyXLength::CM;
+               case 1: return LyXLength::IN;
+               case 2: return LyXLength::PT;
+               case 3: return LyXLength::MM;
+               case 4: return LyXLength::PC;
+               case 5: return LyXLength::EX;
+               case 6: return LyXLength::EM;
+               case 7: return LyXLength::SP;
+               case 8: return LyXLength::BP;
+               case 9: return LyXLength::DD;
+               case 10: return LyXLength::CC;
+               default:
+                       lyxerr[Debug::GUI] << "Unknown kind combo entry " << val << std::endl;
+       }
+       return LyXLength::UNIT_NONE;
+}
+
+       
 int ParagraphDlgImpl::getItem(LyXLength::UNIT unit) const {
-   int item=0;
-   switch (unit) {
-      case LyXLength::CM: item = 0; break;
-      case LyXLength::IN: item = 1; break;
-      case LyXLength::PT: item = 2; break;
-      case LyXLength::MM: item = 3; break;
-      case LyXLength::PC: item = 4; break;
-      case LyXLength::EX: item = 5; break;
-      case LyXLength::EM: item = 6; break;
-      case LyXLength::SP: item = 7; break;
-      case LyXLength::BP: item = 8; break;
-      case LyXLength::DD: item = 9; break;
-      case LyXLength::CC: item = 10; break;
-      case LyXLength::MU: item = 0; break;
-      case LyXLength::UNIT_NONE: item = 0; break;
-      default:
-      lyxerr[Debug::GUI] << "Unknown unit " << long(unit) << endl;
-   }
-   return item;
+       int item=0;
+       switch (unit) {
+               case LyXLength::CM: item = 0; break;
+               case LyXLength::IN: item = 1; break;
+               case LyXLength::PT: item = 2; break;
+               case LyXLength::MM: item = 3; break;
+               case LyXLength::PC: item = 4; break;
+               case LyXLength::EX: item = 5; break;
+               case LyXLength::EM: item = 6; break;
+               case LyXLength::SP: item = 7; break;
+               case LyXLength::BP: item = 8; break;
+               case LyXLength::DD: item = 9; break;
+               case LyXLength::CC: item = 10; break;
+               case LyXLength::MU: item = 0; break;
+               case LyXLength::UNIT_NONE: item = 0; break;
+               default:
+                       lyxerr[Debug::GUI] << "Unknown unit " << long(unit) << endl;
+       }
+       return item;
 }
 
+
 void ParagraphDlgImpl::enable_extraOptions(int item)
 {
-   bool enable = (item!=0);
-   extraWidth->setEnabled(enable);
-   extraWidthL->setEnabled(enable);
-   extraUnit->setEnabled(enable);
-   extraUnitL->setEnabled(enable);
+       bool enable = (item!=0);
+       extraWidth->setEnabled(enable);
+       extraWidthL->setEnabled(enable);
+       extraUnit->setEnabled(enable);
+       extraUnitL->setEnabled(enable);
 }
 
+
 void ParagraphDlgImpl::enable_minipageOptions(int item)
 {
-   minipageOptions->setEnabled( item==1 );
+       minipageOptions->setEnabled( item==1 );
 }
 
+
 void ParagraphDlgImpl::enable_spacingAbove(int item)
 {
-   bool enable = (item==6);
-   spacingAboveValue->setEnabled(enable);
-   spacingAbovePlus->setEnabled(enable);
-   spacingAboveMinus->setEnabled(enable);
-   spacingAboveValueUnit->setEnabled(enable);
-   spacingAbovePlusUnit->setEnabled(enable);
-   spacingAboveMinusUnit->setEnabled(enable);
-   spacingAboveUnitsL->setEnabled(enable);
-   bool enablel = ( (item==6) || (item!=6 && spacingBelow->currentItem()==6) );
-   spacingValueL->setEnabled(enablel);
-   spacingPlusL->setEnabled(enablel);
-   spacingMinusL->setEnabled(enablel);
+       bool enable = (item==6);
+       spacingAboveValue->setEnabled(enable);
+       spacingAbovePlus->setEnabled(enable);
+       spacingAboveMinus->setEnabled(enable);
+       spacingAboveValueUnit->setEnabled(enable);
+       spacingAbovePlusUnit->setEnabled(enable);
+       spacingAboveMinusUnit->setEnabled(enable);
+       spacingAboveUnitsL->setEnabled(enable);
+       bool enablel = ( (item==6) || (item!=6 && spacingBelow->currentItem()==6) );
+       spacingValueL->setEnabled(enablel);
+       spacingPlusL->setEnabled(enablel);
+       spacingMinusL->setEnabled(enablel);
 }
 
+
 void ParagraphDlgImpl::enable_spacingBelow(int item)
 {
-   bool enable = (item==6);
-   spacingBelowValue->setEnabled(enable);
-   spacingBelowPlus->setEnabled(enable);
-   spacingBelowMinus->setEnabled(enable);
-   spacingBelowValueUnit->setEnabled(enable);
-   spacingBelowPlusUnit->setEnabled(enable);
-   spacingBelowMinusUnit->setEnabled(enable);
-   spacingBelowUnitsL->setEnabled(enable);
-   bool enablel = ( (item==6) || (item!=6 && spacingAbove->currentItem()==6) );
-   spacingValueL->setEnabled(enablel);
-   spacingPlusL->setEnabled(enablel);
-   spacingMinusL->setEnabled(enablel);
+       bool enable = (item==6);
+       spacingBelowValue->setEnabled(enable);
+       spacingBelowPlus->setEnabled(enable);
+       spacingBelowMinus->setEnabled(enable);
+       spacingBelowValueUnit->setEnabled(enable);
+       spacingBelowPlusUnit->setEnabled(enable);
+       spacingBelowMinusUnit->setEnabled(enable);
+       spacingBelowUnitsL->setEnabled(enable);
+       bool enablel = ( (item==6) || (item!=6 && spacingAbove->currentItem()==6) );
+       spacingValueL->setEnabled(enablel);
+       spacingPlusL->setEnabled(enablel);
+       spacingMinusL->setEnabled(enablel);
 }
 
+
 void ParagraphDlgImpl::closeEvent(QCloseEvent * e)
 {
-   form_->close();
-   e->accept();
+       form_->close();
+       e->accept();
 }
 
+
 void ParagraphDlgImpl::apply_adaptor()
 {
-   form_->apply();
+       form_->apply();
 }
 
+
 void ParagraphDlgImpl::cancel_adaptor()  
 {
-   form_->close();
-   hide();
+       form_->close();
+       hide();
 }
 
+
 void ParagraphDlgImpl::ok_adaptor()
 {
-   apply_adaptor();
-   form_->close();
-   hide();
+       apply_adaptor();
+       form_->close();
+       hide();
 }
 
+
 void ParagraphDlgImpl::restore_adaptor()
 {
-   form_->update();
+       form_->update();
 }
-
index ab40e68fa9deee21ff0c5cc5f78373420066b936..6066d9a4034e342e5a8196180c9b093270f34031 100644 (file)
@@ -10,6 +10,8 @@
 #ifndef PARAGRAPHDLGIMPL_H
 #define PARAGRAPHDLGIMPL_H
 
+#include <config.h>
 #include "paragraphdlg.h"
 #include "vspace.h"
 #include "lyxparagraph.h"
@@ -19,66 +21,65 @@ class FormParagraph;
 
 class ParagraphDlgImpl : public ParagraphDlg
 {
-   Q_OBJECT
-     
- public:
-   
-    ParagraphDlgImpl(FormParagraph *form, QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
-    ~ParagraphDlgImpl();
-   
-   void setReadOnly(bool);
-   void setLabelWidth(const char *);
-   void setAlign(int);
-   void setChecks(bool, bool, bool, bool, bool);
-   void setSpace(VSpace::vspace_kind, VSpace::vspace_kind, bool, bool);
-   void setAboveLength(float, float, float, LyXGlueLength::UNIT, LyXGlueLength::UNIT, LyXGlueLength::UNIT);
-   void setBelowLength(float, float, float, LyXGlueLength::UNIT, LyXGlueLength::UNIT, LyXGlueLength::UNIT);
-   void setExtra(float, LyXGlueLength::UNIT, const string, int, bool, bool, LyXParagraph::PEXTRA_TYPE);
-   LyXGlueLength getAboveLength() const;
-   LyXGlueLength getBelowLength() const;
-   LyXLength getExtraWidth() const;
-   string getExtraWidthPercent() const;
-   const char * getLabelWidth() const;
-   LyXAlignment getAlign() const;
-   bool getAboveKeep() const;
-   bool getBelowKeep() const;
-   bool getLineAbove() const;
-   bool getLineBelow() const;
-   bool getPagebreakAbove() const;
-   bool getPagebreakBelow() const;
-   bool getNoIndent() const;
-   VSpace::vspace_kind getSpaceAboveKind() const;
-   VSpace::vspace_kind getSpaceBelowKind() const;
-   LyXParagraph::PEXTRA_TYPE getExtraType() const;
-   LyXParagraph::MINIPAGE_ALIGNMENT getExtraAlign() const;
-   bool getHfillBetween() const;
-   bool getStartNewMinipage() const;
-   
-   
- protected:
-   
-   void closeEvent (QCloseEvent * e);
-   
-   
- private:
-   
-   FormParagraph * form_;
-   VSpace::vspace_kind getSpaceKind(int val) const;
-   LyXLength::UNIT getLyXLength(int val) const;
-   int getItem(LyXLength::UNIT unit) const;
-   
-   
- protected slots:
-   
-    void apply_adaptor();
-    void cancel_adaptor();
-    void enable_extraOptions(int);
-    void enable_minipageOptions(int);
-    void enable_spacingAbove(int);
-    void enable_spacingBelow(int);
-    void ok_adaptor();
-    void restore_adaptor();
-
+       Q_OBJECT
+         
+public:
+       
+       ParagraphDlgImpl(FormParagraph *form, QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
+       ~ParagraphDlgImpl();
+       
+       void setReadOnly(bool);
+       void setLabelWidth(const char *);
+       void setAlign(int);
+       void setChecks(bool, bool, bool, bool, bool);
+       void setSpace(VSpace::vspace_kind, VSpace::vspace_kind, bool, bool);
+       void setAboveLength(float, float, float, LyXGlueLength::UNIT, LyXGlueLength::UNIT, LyXGlueLength::UNIT);
+       void setBelowLength(float, float, float, LyXGlueLength::UNIT, LyXGlueLength::UNIT, LyXGlueLength::UNIT);
+       void setExtra(float, LyXGlueLength::UNIT, const string, int, bool, bool, LyXParagraph::PEXTRA_TYPE);
+       LyXGlueLength getAboveLength() const;
+       LyXGlueLength getBelowLength() const;
+       LyXLength getExtraWidth() const;
+       string getExtraWidthPercent() const;
+       // FIXME: return a std::string ! 
+       const char * getLabelWidth() const;
+       LyXAlignment getAlign() const;
+       bool getAboveKeep() const;
+       bool getBelowKeep() const;
+       bool getLineAbove() const;
+       bool getLineBelow() const;
+       bool getPagebreakAbove() const;
+       bool getPagebreakBelow() const;
+       bool getNoIndent() const;
+       VSpace::vspace_kind getSpaceAboveKind() const;
+       VSpace::vspace_kind getSpaceBelowKind() const;
+       LyXParagraph::PEXTRA_TYPE getExtraType() const;
+       LyXParagraph::MINIPAGE_ALIGNMENT getExtraAlign() const;
+       bool getHfillBetween() const;
+       bool getStartNewMinipage() const;
+       
+       
+protected:
+       
+       void closeEvent (QCloseEvent * e);
+       
+private:
+       
+       FormParagraph * form_;
+       VSpace::vspace_kind getSpaceKind(int val) const;
+       LyXLength::UNIT getLyXLength(int val) const;
+       int getItem(LyXLength::UNIT unit) const;
+       
+       
+protected slots:
+       
+       void apply_adaptor();
+       void cancel_adaptor();
+       void enable_extraOptions(int);
+       void enable_minipageOptions(int);
+       void enable_spacingAbove(int);
+       void enable_spacingBelow(int);
+       void ok_adaptor();
+       void restore_adaptor();
 };
 
 #endif // PARAGRAPHDLGIMPL_H
index 7bbf09ab4a589c4b918d659e8693cd7243e38721..6969ae6723be9000e5175740d879595e04326c07 100644 (file)
 
 
 PrintDlgImpl::PrintDlgImpl( FormPrint *f, QWidget* parent,  const char* name, bool modal, WFlags fl )
-    : PrintDlg( parent, name, modal, fl ), form_(f)
+       : PrintDlg( parent, name, modal, fl ), form_(f)
 {
-   setCaption(name);
+       setCaption(name);
 }
 
 PrintDlgImpl::~PrintDlgImpl()
 {
-    // no need to delete child widgets, Qt does it all for us
+        // no need to delete child widgets, Qt does it all for us
 }
 
+
 const char * PrintDlgImpl::getFrom() {
-   return fromPage->text();
+       return fromPage->text();
 }
 
+
 const char * PrintDlgImpl::getTo() {
-   return toPage->text();
+       return toPage->text();
 }
+
        
 PrinterParams::Target PrintDlgImpl::getTarget() {
-   if (toPrinter->isChecked())
-     return PrinterParams::PRINTER;
-   else
-     return PrinterParams::FILE;
+       if (toPrinter->isChecked())
+               return PrinterParams::PRINTER;
+       else
+               return PrinterParams::FILE;
 }
 
        
 const char * PrintDlgImpl::getPrinter() {
-   return printerName->text();
+       return printerName->text();
 }
 
 const char * PrintDlgImpl::getFile() {
-   return fileName->text();
+       return fileName->text();
 }
 
 PrinterParams::WhichPages PrintDlgImpl::getWhichPages() {
-   if (oddPages->isChecked())
-     return PrinterParams::ODD;
-   else if (evenPages->isChecked())
-     return PrinterParams::EVEN;
-   else
-     return PrinterParams::ALL;
+       if (oddPages->isChecked())
+               return PrinterParams::ODD;
+       else if (evenPages->isChecked())
+               return PrinterParams::EVEN;
+       else
+               return PrinterParams::ALL;
 }
 
 bool PrintDlgImpl::getReverse() {
-   return reverse->isChecked();
+       return reverse->isChecked();
 }
 
 bool PrintDlgImpl::getSort() {
-   return collate->isChecked();
+       return collate->isChecked();
 }
 
 const char * PrintDlgImpl::getCount() {
-   return copies->text();
+       return copies->text();
 }
 
 void PrintDlgImpl::setTarget(PrinterParams::Target t) {
-   toPrinter->setChecked(t==PrinterParams::PRINTER);
-   toFile->setChecked(t!=PrinterParams::PRINTER);
+       toPrinter->setChecked(t==PrinterParams::PRINTER);
+       toFile->setChecked(t!=PrinterParams::PRINTER);
 }
 
 void PrintDlgImpl::setPrinter(const char * name) {
-   printerName->setText(name);
+       printerName->setText(name);
 }
 
 void PrintDlgImpl::setFile(const char * name) {
-   fileName->setText(name);
+       fileName->setText(name);
 }       
 
 void PrintDlgImpl::setWhichPages(PrinterParams::WhichPages wp) {
-   switch (wp) {
-      case PrinterParams::ALL:
-        allPages->setChecked(true);
-        break;
-      case PrinterParams::EVEN:
-        evenPages->setChecked(true);
-        break;
-      case PrinterParams::ODD:
-        oddPages->setChecked(true);
-        break;
-   }
+       switch (wp) {
+               case PrinterParams::ALL:
+                       allPages->setChecked(true);
+                       break;
+               case PrinterParams::EVEN:
+                       evenPages->setChecked(true);
+                       break;
+               case PrinterParams::ODD:
+                       oddPages->setChecked(true);
+                       break;
+       }
 }
 
+
 void PrintDlgImpl::setReverse(bool on) {
-   reverse->setChecked(on);
+       reverse->setChecked(on);
 }
 
+
 void PrintDlgImpl::setSort(bool on) {
-   collate->setChecked(on);
+       collate->setChecked(on);
 }
 
+
 void PrintDlgImpl::setCount(int num) {
-   copies->setValue(num);
-   collate->setEnabled(num > 1);
+       copies->setValue(num);
+       collate->setEnabled(num > 1);
 }
 
+
 void PrintDlgImpl::setFrom(const char * text) {
-   fromPage->setText(text);
+       fromPage->setText(text);
 }
 
+
 void PrintDlgImpl::setTo(const char * text) {
-   toPage->setText(text);
+       toPage->setText(text);
 }
 
 void PrintDlgImpl::browse_file()
 {
-   QString d( OnlyPath(tostr(fileName->text())).c_str() );
-   QString s( QFileDialog::getOpenFileName( d, "PostScript Files (*.ps)", this ) );
-   if (!s.isNull()) 
-     fileName->setText(s);
+       QString d( OnlyPath(tostr(fileName->text())).c_str() );
+       QString s( QFileDialog::getOpenFileName( d, "PostScript Files (*.ps)", this ) );
+       if (!s.isNull()) 
+               fileName->setText(s);
 }
 
 void PrintDlgImpl::print()
 {
-   form_->print();
-   form_->close();
-   hide();
+       form_->print();
+       form_->close();
+       hide();
 }
 
 void PrintDlgImpl::cancel_adaptor()
 {
-   form_->close();
-   hide();
+       form_->close();
+       hide();
 }
 
 void PrintDlgImpl::set_collate(int copies)
 {
        collate->setEnabled(copies > 1);
 }
-
index 1ab016d1a73d9645ba4f51a55fce023e6e1d7be7..55d1903c18c704ae5f00fc5319dfe91daeb0c83b 100644 (file)
@@ -9,6 +9,9 @@
 
 #ifndef PRINTDLGIMPL_H
 #define PRINTDLGIMPL_H
+
+#include <config.h>
 #include "printdlg.h"
 #include "lyxrc.h" 
 #include "PrinterParams.h"
@@ -17,40 +20,41 @@ class FormPrint;
 
 class PrintDlgImpl : public PrintDlg
 { 
-    Q_OBJECT
-
- public:
-    PrintDlgImpl( FormPrint *f, QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
-    ~PrintDlgImpl();
-   
-   const char *getFrom();
-   const char *getTo();
-   const char *getPrinter();
-   const char *getFile();
-   const char *getCount();
-   PrinterParams::Target getTarget();
-   PrinterParams::WhichPages getWhichPages();
-   bool getReverse();
-   bool getSort();
-   void setFrom(const char *);
-   void setTo(const char *);
-   void setPrinter(const char *);
-   void setFile(const char *);
-   void setCount(int);
-   void setTarget(PrinterParams::Target);
-   void setWhichPages(PrinterParams::WhichPages);
-   void setReverse(bool);
-   void setSort(bool);
-      
-
- protected slots:
-    void cancel_adaptor();
-    void browse_file();
-    void print();
-    void set_collate(int);
-
- private:
-       FormPrint * form_;
+       Q_OBJECT
+
+public:
+       PrintDlgImpl( FormPrint *f, QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
+       ~PrintDlgImpl();
+       
+       // FIXME: these should return std::string !
+       const char * getFrom();
+       const char * getTo();
+       const char * getPrinter();
+       const char * getFile();
+       const char * getCount();
+       PrinterParams::Target getTarget();
+       PrinterParams::WhichPages getWhichPages();
+       bool getReverse();
+       bool getSort();
+       void setFrom(const char *);
+       void setTo(const char *);
+       void setPrinter(const char *);
+       void setFile(const char *);
+       void setCount(int);
+       void setTarget(PrinterParams::Target);
+       void setWhichPages(PrinterParams::WhichPages);
+       void setReverse(bool);
+       void setSort(bool);
+         
+
+protected slots:
+       void cancel_adaptor();
+       void browse_file();
+       void print();
+       void set_collate(int);
+
+private:
+       FormPrint * form_;
 
 };
 
index 5e48e2fda6a225b3164ece4b6c3d5dca9453a4b8..2a62f84e878482083a8cdb543139c0a0c5c6c128 100644 (file)
 
 
 SearchDlgImpl::SearchDlgImpl(FormSearch* form, QWidget* parent,  const char* name, bool modal, WFlags fl )
-    : SearchDlg( parent, name, modal, fl ), form_(form)
+        : SearchDlg( parent, name, modal, fl ), form_(form)
 {
-   setCaption(name);
+       setCaption(name);
 }
 
 SearchDlgImpl::~SearchDlgImpl()
 {
 }
 
+
 void SearchDlgImpl::closeEvent(QCloseEvent * e)
 {
-   form_->close();
-   e->accept();
+       form_->close();
+       e->accept();
 }
 
+
 void SearchDlgImpl::setReadOnly(bool readonly)
 {
-   replace->setEnabled(!readonly);
-   replaceLabel->setEnabled(!readonly);
-   replacePB->setEnabled(!readonly);
-   replaceAllPB->setEnabled(!readonly);
+       replace->setEnabled(!readonly);
+       replaceLabel->setEnabled(!readonly);
+       replacePB->setEnabled(!readonly);
+       replaceAllPB->setEnabled(!readonly);
 }
 
+
 void SearchDlgImpl::Find()
 {
-   form_->find(tostr(find->currentText()).c_str(),
-              caseSensitive->isChecked(),
-              matchWord->isChecked(),
-              !searchBack->isChecked());
+       form_->find(tostr(find->currentText()).c_str(),
+                        caseSensitive->isChecked(),
+                        matchWord->isChecked(),
+                        !searchBack->isChecked());
 }
 
-void SearchDlgImpl::Replace(bool replaceall = false)
+
+void SearchDlgImpl::Replace(bool replaceall)
 {
-   form_->replace(tostr(find->currentText()).c_str(),
+       form_->replace(tostr(find->currentText()).c_str(),
                  tostr(replace->currentText()).c_str(),
                  caseSensitive->isChecked(),
                  matchWord->isChecked(),
                  !searchBack->isChecked(),
                  replaceall);
 }
-
-
index f99ffacc1c5c2e3bdf2e20b9cdf88a32178d597a..4351f72b4527707282277a6782e0176b84a8b59b 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef SEARCHDLGIMPL_H
 #define SEARCHDLGIMPL_H
 
+#include <config.h>
 #include "searchdlg.h"
 #include "FormSearch.h"
 
@@ -8,43 +10,41 @@ class QCloseEvent;
 
 class SearchDlgImpl : public SearchDlg
 { 
-    Q_OBJECT
-
-
- public:
-    
-   SearchDlgImpl(FormSearch * form, QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
-    
-   ~SearchDlgImpl();
-   
-   void setReadOnly(bool);
-   
-   void Replace(bool);
+       Q_OBJECT
+
+public:
+       SearchDlgImpl(FormSearch * form, QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
+        
+       ~SearchDlgImpl();
+       
+       void setReadOnly(bool);
+       
+       void Replace(bool replaceall = false);
  
- protected:
-   
-   void closeEvent(QCloseEvent * e);
-
- private:
-   
-   FormSearch * form_;
-
- protected slots:
-    
-   void Find();
-    
-   void Replace() {
-      Replace(false);
-   };
-    
-   void ReplaceAll() {
-      Replace(true);
-   };
-   
-   void cancel_adaptor() {
-      form_->close();
-      hide();
-   }
+protected:
+       
+       void closeEvent(QCloseEvent * e);
+
+private:
+       
+       FormSearch * form_;
+
+protected slots:
+        
+       void Find();
+        
+       void Replace() {
+               Replace(false);
+       };
+        
+       void ReplaceAll() {
+               Replace(true);
+       };
+       
+       void cancel_adaptor() {
+               form_->close();
+               hide();
+       }
 
 };
 
index b3b9ec63fe9efc9d81fa85c7c07993277a7a9677..893e62a6c3b946ec5d1e2e36298cbea65c84b144 100644 (file)
 #include "qtooltip.h"
 
 TabularCreateDlgImpl::TabularCreateDlgImpl(FormTabularCreate* form, QWidget* parent,  const char* name, bool modal, WFlags fl )
-    : InsertTabularDlg( parent, name, modal, fl ), form_(form)
+        : InsertTabularDlg( parent, name, modal, fl ), form_(form)
 {
-   setCaption(name);
-   table->setMinimumSize(100,100);
-   rows->setValue(5);
-   columns->setValue(5);
-   QToolTip::add(table, _("Drag with left mouse button to resize"));
+       setCaption(name);
+       table->setMinimumSize(100,100);
+       rows->setValue(5);
+       columns->setValue(5);
+       QToolTip::add(table, _("Drag with left mouse button to resize"));
 }
 
 TabularCreateDlgImpl::~TabularCreateDlgImpl()
 {
-    // no need to delete child widgets, Qt does it all for us
+        // no need to delete child widgets, Qt does it all for us
 }
 
 void TabularCreateDlgImpl::insert_tabular()
 {
-   form_->apply((rows->text()).toInt(), (columns->text()).toInt());
-   form_->close();
-   hide();
+       form_->apply((rows->text()).toInt(), (columns->text()).toInt());
+       form_->close();
+       hide();
 }
 
 void TabularCreateDlgImpl::cancel_adaptor()
 {
-   form_->close();
-   hide();
+       form_->close();
+       hide();
 }
 
 void TabularCreateDlgImpl::colsChanged(int nr_cols)
 {
-   if (nr_cols != (columns->text()).toInt())
-     columns->setValue(nr_cols);
+       if (nr_cols != (columns->text()).toInt())
+               columns->setValue(nr_cols);
 }
 
 void TabularCreateDlgImpl::rowsChanged(int nr_rows)
 {
-   if (nr_rows != (rows->text()).toInt()) 
-     rows->setValue(nr_rows);
+       if (nr_rows != (rows->text()).toInt()) 
+               rows->setValue(nr_rows);
 }
-
index 3287622350f027547b471da10ac10f909c1654d4..73526db1ed2fa78fa76bd7b199da05e71ff406b5 100644 (file)
@@ -15,20 +15,20 @@ class FormTabularCreate;
 
 class TabularCreateDlgImpl : public InsertTabularDlg
 { 
-    Q_OBJECT
+       Q_OBJECT
 
 public:
-    TabularCreateDlgImpl(FormTabularCreate *form, QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
-    ~TabularCreateDlgImpl();
+       TabularCreateDlgImpl(FormTabularCreate *form, QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
+       ~TabularCreateDlgImpl();
 
 protected slots:
-   void insert_tabular();
-   void cancel_adaptor();
-   virtual void colsChanged(int);
-   virtual void rowsChanged(int);
+       void insert_tabular();
+       void cancel_adaptor();
+       virtual void colsChanged(int);
+       virtual void rowsChanged(int);
    
 private:
-   FormTabularCreate * form_;
+       FormTabularCreate * form_;
 };
 
 #endif // TABULARCREATEDLGIMPL_H
index 08a948e8f40d07dc416317f21ea084b9e41d1093..22a135152b6ef812f96d5752db6878aa8463b801 100644 (file)
@@ -67,4 +67,13 @@ void gettext_init(string const & localedir)
 }
 
 
+#else // ENABLE_NLS
+
+void locale_init()
+{
+}
+
+void gettext_init(string const &)
+{
+}
 #endif
index b7bab8d2a150bc933cff26af8869fd5fbc5a1181..08342634ece6b3b96a0c8608e7cc107743a45307 100644 (file)
 char const * _(char const *);
 ///
 string const _(string const &);
-///
-void locale_init();
-///
-void gettext_init(string const & localedir);
 
-#else
+#else // ENABLE_NLS
+
 ///
 #  define _(str) (str)
 ///
 #  define S_(str) (str)
-///
-#  define locale_init()
-///
-#  define gettext_init(localedir)
 
 #endif
 
 #  define N_(str) (str)              // for detecting static strings
 
+///
+void locale_init();
+///
+void gettext_init(string const & localedir);
+
 #endif
index ada65f1787d0547acc7a3fd3c1f95266800bc8a2..945d21e9375e23e085127b01d002422ae5942af7 100644 (file)
@@ -1,3 +1,14 @@
+2001-06-02  John Levon  <moz@compsoc.man.ac.uk>
+
+       * insettheorem.C:
+       * insetminipage.C:
+       * insetlist.C:
+       * insetfootlike.C:
+       * insetfloat.C:
+       * insetert.C:
+       * insetcollapsable.C:
+       * insetcaption.C: LColor tidy
+        
 2001-06-01  Lars Gullik Bjønnes  <larsbj@birdstep.com>
 
        * figinset.C: fix typo
@@ -63,7 +74,7 @@
 
 2001-05-16  Ruurd Reitsma  <r.a.reitsma@wbmt.tudelft.nl>
 
-       * figinset.C
+       * figinset.C:
        * insetbib.C: fix path for OS/2 & Win32
 
 2001-05-10  Lars Gullik Bjønnes  <larsbj@birdstep.com>
index bc8ee48a57055895e405b61aff70b6e346a64e86..02af2b6714643087b8407902e8d9a336862c389f 100644 (file)
@@ -31,7 +31,7 @@ InsetCaption::InsetCaption()
 {
        SetAutoBreakRows(true);
        SetDrawFrame(0, InsetText::LOCKED);
-       SetFrameColor(0, LColor::footnoteframe);
+       SetFrameColor(0, LColor::captionframe);
 }
 
 
index 50f123c7b813d6227bc626d6748e072f9ba5b32e..2e9aff3ceffbcd9066eaf398de3d3542fd3a3d97 100644 (file)
@@ -41,7 +41,7 @@ InsetCollapsable::InsetCollapsable()
        autocollapse = true;
        inset.SetAutoBreakRows(true);
        inset.SetDrawFrame(0, InsetText::ALWAYS);
-       inset.SetFrameColor(0, LColor::footnoteframe);
+       inset.SetFrameColor(0, LColor::collapsableframe);
        button_length = button_top_y = button_bottom_y = 0;
        setInsetName("Collapsable");
        widthCollapsed = oldWidth = 0;
@@ -481,11 +481,13 @@ std::vector<string> const InsetCollapsable::getLabelList() const
        return inset.getLabelList();
 }
 
+
 bool InsetCollapsable::nodraw() const
 {
        return inset.nodraw();
 }
 
 int InsetCollapsable::scroll(bool recursive) const
 {
        int sx = UpdatableInset::scroll(false);
index 4f7558aea2ced1be4a707a3477d525516cf263ff..a1e0e4c46e812ab4cd8d8828422895ef005c78be 100644 (file)
@@ -31,7 +31,7 @@ InsetERT::InsetERT() : InsetCollapsable()
        labelfont = LyXFont(LyXFont::ALL_SANE);
        labelfont.decSize();
        labelfont.decSize();
-       labelfont.setColor(LColor::ert);
+       labelfont.setColor(LColor::latex);
        setAutoCollapse(false);
        setInsetName("ERT");
 }
index 3a46e8b5820adb44cb11a418783970e8f24e4905..04e8dba12941e84525681beda29c0cb0b1127592 100644 (file)
@@ -104,7 +104,7 @@ InsetFloat::InsetFloat(string const & type)
        LyXFont font(LyXFont::ALL_SANE);
        font.decSize();
        font.decSize();
-       font.setColor(LColor::footnote);
+       font.setColor(LColor::collapsable);
        setLabelFont(font);
        setAutoCollapse(false);
        floatType_ = type;
index f5024b17895aceb9f07ee65c0f7605f3e6bd16a0..0e5c7f6b0ac77bf45afaa6996d2c701ad2fff9fa 100644 (file)
@@ -27,7 +27,7 @@ InsetFootlike::InsetFootlike()
        LyXFont font(LyXFont::ALL_SANE);
        font.decSize();
        font.decSize();
-       font.setColor(LColor::footnote);
+       font.setColor(LColor::collapsable);
        setLabelFont(font);
        setAutoCollapse(false);
 }
index d9199c3567e6fd245f190d3381a3134938c7c09b..4610b5557733c11850291e25d349ff49d9a4828b 100644 (file)
@@ -43,7 +43,7 @@ InsetList::InsetList()
        LyXFont font(LyXFont::ALL_SANE);
        font.decSize();
        font.decSize();
-       font.setColor(LColor::footnote);
+       font.setColor(LColor::collapsable);
        setLabelFont(font);
        setAutoCollapse(false);
        setInsetName("List");
index d781a3daf9cbf92f930030513e9b6d058deefe8d..c856d06881ff00a41228fa37036b72cae8d796d7 100644 (file)
@@ -66,7 +66,7 @@ InsetMinipage::InsetMinipage()
        LyXFont font(LyXFont::ALL_SANE);
        font.decSize();
        font.decSize();
-       font.setColor(LColor::footnote);
+       font.setColor(LColor::collapsable);
        setLabelFont(font);
        setAutoCollapse(false);
        setInsetName("Minipage");
index 637e4933c7ba011ef69175275d33bf3bf7f39330..2cc42f8ccd658b2bf5e794c3f44529664d9a8dc6 100644 (file)
@@ -40,7 +40,7 @@ InsetTheorem::InsetTheorem()
        LyXFont font(LyXFont::ALL_SANE);
        font.decSize();
        font.decSize();
-       font.setColor(LColor::footnote);
+       font.setColor(LColor::collapsable);
        setLabelFont(font);
        setAutoCollapse(false);
        setInsetName("Theorem");