]> git.lyx.org Git - features.git/commitdiff
made insetlatex.[Ch] not used, white-space changes, some enum changes becuse of ridan...
authorLars Gullik Bjønnes <larsbj@gullik.org>
Mon, 15 Nov 1999 10:58:38 +0000 (10:58 +0000)
committerLars Gullik Bjønnes <larsbj@gullik.org>
Mon, 15 Nov 1999 10:58:38 +0000 (10:58 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@312 a592a061-630c-0410-9148-cb99ea01b6c8

38 files changed:
src/insets/Makefile.am
src/insets/figinset.C
src/insets/form_url.C
src/insets/inset.C
src/insets/insetbib.C
src/insets/insetbib.h
src/insets/insetcommand.C
src/insets/insetcommand.h
src/insets/inseterror.C
src/insets/inseterror.h
src/insets/insetinclude.C
src/insets/insetinclude.h
src/insets/insetindex.C
src/insets/insetindex.h
src/insets/insetinfo.C
src/insets/insetinfo.h
src/insets/insetlabel.C
src/insets/insetlabel.h
src/insets/insetlatex.C
src/insets/insetlatex.h
src/insets/insetlatexaccent.C
src/insets/insetlatexaccent.h
src/insets/insetloa.C
src/insets/insetloa.h
src/insets/insetlof.h
src/insets/insetlot.h
src/insets/insetparent.C
src/insets/insetparent.h
src/insets/insetquotes.C
src/insets/insetquotes.h
src/insets/insetref.C
src/insets/insetref.h
src/insets/insetspecialchar.C
src/insets/insetspecialchar.h
src/insets/insettoc.h
src/insets/inseturl.C
src/insets/inseturl.h
src/insets/lyxinset.h

index 6bd454fcfddef0ca32a309909a8a01440389b6f5..722214985ed9faf7de9b6b878b4fa2d98e94a8aa 100644 (file)
@@ -27,8 +27,6 @@ insets_o_SOURCES = \
        insetinfo.h \
        insetlabel.C \
        insetlabel.h \
-       insetlatex.C \
-       insetlatex.h \
        insetlatexaccent.C \
        insetlatexaccent.h \
        insetloa.C \
index b58b7dc4fcb0b5183f91dc47f42326626e9ee12d..92d15449387bb00a6e5229a2f74c149b97a7b867 100644 (file)
@@ -743,7 +743,7 @@ static figdata *getfigdata(int wid, int hgh, string const & fname,
 
        while (i < bmpinsref) {
                if (bitmaps[i]->wid == wid && bitmaps[i]->hgh == hgh &&
-                   bitmaps[i]->flags == flags && bitmaps[i]->fname==fname &&
+                   bitmaps[i]->flags == flags && bitmaps[i]->fname == fname &&
                    bitmaps[i]->angle == angle) {
                        bitmaps[i]->ref++;
                        return bitmaps[i];
@@ -1008,10 +1008,10 @@ static char* NextToken(FILE *myfile)
                token = new char[256];
                do {
                        c = fgetc(myfile);
-                       token[i++]=c;
+                       token[i++]= c;
                } while (!feof(myfile) && !isspace(c));
       
-               token[i-1]='\0';         /* just the end of a command  */
+               token[i-1]= '\0';         /* just the end of a command  */
        }
        return token;
 }
@@ -1099,11 +1099,11 @@ void InsetFig::Draw(LyXFont font, LyXScreen &scr, int baseline, float &x)
                font.setFamily (LyXFont::SANS_FAMILY);
                font.setSize (LyXFont::SIZE_FOOTNOTE);
                string justname = OnlyFilename (fname);
-               font.drawString(justname,pm,
+               font.drawString(justname, pm,
                               baseline - font.maxAscent() - 4,
                               (int) x + 8);
                font.setSize (LyXFont::SIZE_TINY);
-               font.drawText (msg, strlen(msg),pm,
+               font.drawText (msg, strlen(msg), pm,
                               baseline - 4,
                               (int) x + 8);
 
@@ -1239,12 +1239,12 @@ int InsetFig::Linuxdoc(string &/*file*/)
 
 int InsetFig::DocBook(string &file)
 {
-       string figurename=fname;
+       string figurename= fname;
 
        if(suffixIs(figurename, ".eps"))
                figurename.erase(fname.length() - 5);
 
-       file += "@<graphic fileref=\"" + figurename + "\"></graphic>";
+       file += "@<graphic fileref= \"" + figurename + "\"></graphic>";
        return 0;
 }
 
@@ -1282,9 +1282,9 @@ void InsetFig::Edit(int, int)
        if (!form) {
                form = create_form_Figure();
                fl_set_form_atclose(form->Figure, CancelCloseBoxCB, 0);
-               fl_set_object_return(form->Angle,FL_RETURN_ALWAYS);
-               fl_set_object_return(form->Width,FL_RETURN_ALWAYS);
-               fl_set_object_return(form->Height,FL_RETURN_ALWAYS);
+               fl_set_object_return(form->Angle, FL_RETURN_ALWAYS);
+               fl_set_object_return(form->Width, FL_RETURN_ALWAYS);
+               fl_set_object_return(form->Height, FL_RETURN_ALWAYS);
        }
        RestoreForm();
        if (form->Figure->visible) {
@@ -1722,7 +1722,7 @@ void InsetFig::GetPSSizes()
        char *p = 0;
        
        /* defaults to associated size
-        * ..just in case the PS-file is not readable (Henner,24-Aug-97) 
+        * ..just in case the PS-file is not readable (Henner, 24-Aug-97) 
         */
        psx = 0;
        psy = 0;
@@ -2154,7 +2154,7 @@ void InsetFig::BrowseFile()
        do {
                ProhibitInput();
                if (once) {
-                       p =fileDlg.Select(_("EPS Figure"), current_figure_path,
+                       p = fileDlg.Select(_("EPS Figure"), current_figure_path,
                                           "*ps", string());
                } else {
                        p = fileDlg.Select(_("EPS Figure"), buf,
index 8dd71897edd76bf4a7e233854fa5a73c6bf28e42..cffbd71d6a2e4e84d8e1693c3b1c79bc61ec4fac 100644 (file)
@@ -6,7 +6,7 @@
 /* Form definition file generated with fdesign. */
 
 #include FORMS_H_LOCATION
-#include <stdlib.h>
+#include <cstdlib>
 #include "form_url.h"
 
 FD_form_url *create_form_form_url(void)
@@ -15,22 +15,22 @@ FD_form_url *create_form_form_url(void)
   FD_form_url *fdui = (FD_form_url *) fl_calloc(1, sizeof(FD_form_url));
 
   fdui->form_url = fl_bgn_form(FL_NO_BOX, 530, 150);
-  obj = fl_add_box(FL_UP_BOX,0,0,530,150,"");
-  fdui->url_name = obj = fl_add_input(FL_NORMAL_INPUT,50,20,460,30,_("Url"));
-    fl_set_input_shortcut(obj,scex(_("Url|#U")),1);
+  obj = fl_add_box(FL_UP_BOX, 0, 0, 530, 150, "");
+  fdui->url_name = obj = fl_add_input(FL_NORMAL_INPUT, 50, 20, 460, 30, _("Url"));
+    fl_set_input_shortcut(obj, scex(_("Url|#U")), 1);
     fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast);
     fl_set_object_resize(obj, FL_RESIZE_X);
-  fdui->name_name = obj = fl_add_input(FL_NORMAL_INPUT,50,60,460,30,_("Name"));
-    fl_set_input_shortcut(obj,scex(_("Name|#N")),1);
+  fdui->name_name = obj = fl_add_input(FL_NORMAL_INPUT, 50, 60, 460, 30, _("Name"));
+    fl_set_input_shortcut(obj, scex(_("Name|#N")), 1);
     fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast);
     fl_set_object_resize(obj, FL_RESIZE_X);
-  fdui->radio_html = obj = fl_add_checkbutton(FL_PUSH_BUTTON,50,110,250,30,_("HTML type"));
-    fl_set_button_shortcut(obj,scex(_("HTML type|#H")),1);
+  fdui->radio_html = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 50, 110, 250, 30, _("HTML type"));
+    fl_set_button_shortcut(obj, scex(_("HTML type|#H")), 1);
     fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast);
     fl_set_object_resize(obj, FL_RESIZE_X);
-  fdui->button_close = obj = fl_add_button(FL_RETURN_BUTTON,410,110,100,30,_("Close"));
+  fdui->button_close = obj = fl_add_button(FL_RETURN_BUTTON, 410, 110, 100, 30, _("Close"));
     fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
-    fl_set_object_callback(obj,C_InsetUrl_CloseUrlCB,0);
+    fl_set_object_callback(obj, C_InsetUrl_CloseUrlCB, 0);
   fl_end_form();
 
   //fdui->form_url->fdui = fdui;
index cad6369463ee645e9cdd3388e77297ded29448ba..7a2293118edb77234a05c505e82c0b30b03ac274 100644 (file)
@@ -1,12 +1,12 @@
 /* This file is part of
- * ======================================================
+ * ====================================================== 
  * 
  *           LyX, The Document Processor
  *      
  *         Copyright 1995 Matthias Ettrich
  *          Copyright 1995-1999 The LyX Team.
  *
- * ======================================================*/
+ * ====================================================== */
 
 #include <config.h>
 
index e91280a4872a046f192b1b056bd2eaa8aa70de50..811941a7a3fa47bfbe6ded956d307bef40f3b889 100644 (file)
@@ -75,24 +75,24 @@ FD_citation_form *create_form_citation_form(void)
        FD_citation_form *fdui = (FD_citation_form *) fl_calloc(1, sizeof(FD_citation_form));
 
        fdui->citation_form = fl_bgn_form(FL_NO_BOX, 220, 130);
-       obj = fl_add_box(FL_UP_BOX,0,0,220,130,"");
-       fdui->key = obj = fl_add_text(FL_NORMAL_TEXT,20,10,60,30,_("Key:"));
-         fl_set_object_lsize(obj,FL_NORMAL_SIZE);
-         fl_set_object_lalign(obj,FL_ALIGN_RIGHT);
+       obj = fl_add_box(FL_UP_BOX, 0, 0, 220, 130, "");
+       fdui->key = obj = fl_add_text(FL_NORMAL_TEXT, 20, 10, 60, 30, _("Key:"));
+         fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+         fl_set_object_lalign(obj, FL_ALIGN_RIGHT);
 
        bibcombox = new Combox(FL_COMBOX_INPUT);
-       bibcombox->add(80,10,130,30, 120);
-
-       obj = fl_add_button(FL_RETURN_BUTTON,20,90,90,30,_("OK"));
-         fl_set_object_lsize(obj,FL_NORMAL_SIZE);
-         fl_set_object_callback(obj,bibitem_cb,1);
-       obj = fl_add_button(FL_NORMAL_BUTTON,120,90,90,30,idex(_("Cancel|^[")));
-         fl_set_button_shortcut(obj,scex(_("Cancel|^[")),1);
-         fl_set_object_lsize(obj,FL_NORMAL_SIZE);
-         fl_set_object_callback(obj,bibitem_cb,0);
-       fdui->label = obj = fl_add_input(FL_NORMAL_INPUT,80,50,130,30,idex(_("Remark:|#R")));
-         fl_set_input_shortcut(obj,scex(_("Remark:|#R")),1);
-         fl_set_object_lsize(obj,FL_NORMAL_SIZE);
+       bibcombox->add(80, 10, 130, 30, 120);
+
+       obj = fl_add_button(FL_RETURN_BUTTON, 20, 90, 90, 30, _("OK"));
+         fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+         fl_set_object_callback(obj, bibitem_cb, 1);
+       obj = fl_add_button(FL_NORMAL_BUTTON, 120, 90, 90, 30, idex(_("Cancel|^[")));
+         fl_set_button_shortcut(obj, scex(_("Cancel|^[")), 1);
+         fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+         fl_set_object_callback(obj, bibitem_cb, 0);
+       fdui->label = obj = fl_add_input(FL_NORMAL_INPUT, 80, 50, 130, 30, idex(_("Remark:|#R")));
+         fl_set_input_shortcut(obj, scex(_("Remark:|#R")), 1);
+         fl_set_object_lsize(obj, FL_NORMAL_SIZE);
        fl_end_form();
 
        //fdui->citation_form->fdui = fdui;
@@ -107,20 +107,20 @@ FD_bibitem_form *create_form_bibitem_form(void)
        FD_bibitem_form *fdui = (FD_bibitem_form *) fl_calloc(1, sizeof(FD_bibitem_form));
 
        fdui->bibitem_form = fl_bgn_form(FL_NO_BOX, 220, 130);
-       obj = fl_add_box(FL_UP_BOX,0,0,220,130,"");
-       fdui->key = obj = fl_add_input(FL_NORMAL_INPUT,80,10,130,30,idex(_("Key:|#K")));
-         fl_set_input_shortcut(obj,scex(_("Key:|#K")),1);
-         fl_set_object_lsize(obj,FL_NORMAL_SIZE);
-       obj = fl_add_button(FL_RETURN_BUTTON,20,90,90,30,_("OK"));
-         fl_set_object_lsize(obj,FL_NORMAL_SIZE);
-         fl_set_object_callback(obj,bibitem_cb,3);
-       obj = fl_add_button(FL_NORMAL_BUTTON,120,90,90,30,idex(_("Cancel|^[")));
-         fl_set_button_shortcut(obj,scex(_("Cancel|^[")),1);
-         fl_set_object_lsize(obj,FL_NORMAL_SIZE);
-         fl_set_object_callback(obj,bibitem_cb,2);
-       fdui->label = obj = fl_add_input(FL_NORMAL_INPUT,80,50,130,30,idex(_("Label:|#L")));
-         fl_set_input_shortcut(obj,scex(_("Label:|#L")),1);
-         fl_set_object_lsize(obj,FL_NORMAL_SIZE);
+       obj = fl_add_box(FL_UP_BOX, 0, 0, 220, 130, "");
+       fdui->key = obj = fl_add_input(FL_NORMAL_INPUT, 80, 10, 130, 30, idex(_("Key:|#K")));
+         fl_set_input_shortcut(obj, scex(_("Key:|#K")), 1);
+         fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+       obj = fl_add_button(FL_RETURN_BUTTON, 20, 90, 90, 30, _("OK"));
+         fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+         fl_set_object_callback(obj, bibitem_cb, 3);
+       obj = fl_add_button(FL_NORMAL_BUTTON, 120, 90, 90, 30, idex(_("Cancel|^[")));
+         fl_set_button_shortcut(obj, scex(_("Cancel|^[")), 1);
+         fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+         fl_set_object_callback(obj, bibitem_cb, 2);
+       fdui->label = obj = fl_add_input(FL_NORMAL_INPUT, 80, 50, 130, 30, idex(_("Label:|#L")));
+         fl_set_input_shortcut(obj, scex(_("Label:|#L")), 1);
+         fl_set_object_lsize(obj, FL_NORMAL_SIZE);
        fl_end_form();
 
        //fdui->bibitem_form->fdui = fdui;
@@ -164,7 +164,7 @@ void InsetCitation::Edit(int, int)
        if (citation_form->citation_form->visible) {
                fl_raise_form(citation_form->citation_form);
        } else {
-               fl_show_form(citation_form->citation_form,FL_PLACE_MOUSE, FL_FULLBORDER,
+               fl_show_form(citation_form->citation_form, FL_PLACE_MOUSE, FL_FULLBORDER,
                             _("Citation"));
        }   
 }
@@ -177,7 +177,7 @@ string InsetCitation::getScreenLabel() const
        temp += contents;
 
        if (!options.empty()) {
-               temp += "," + options;
+               temp += ", " + options;
        }
 
        return temp + ']';
@@ -228,7 +228,7 @@ void InsetBibKey::Write(FILE *file)
        }
        s += '{';
        s += contents + '}';
-       fprintf(file,"\\bibitem %s\n", s.c_str());
+       fprintf(file, "\\bibitem %s\n", s.c_str());
 }
 
 
@@ -259,15 +259,15 @@ void InsetBibKey::Edit(int, int)
        bibitem_form->bibitem_form->u_vdata = this;
        // InsetBibtex uses the same form, with different labels
        fl_set_object_label(bibitem_form->key, idex(_("Key:|#K")));
-       fl_set_button_shortcut(bibitem_form->key,scex(_("Key:|#K")),1);
+       fl_set_button_shortcut(bibitem_form->key, scex(_("Key:|#K")), 1);
        fl_set_object_label(bibitem_form->label, idex(_("Label:|#L")));
-       fl_set_button_shortcut(bibitem_form->label,scex(_("Label:|#L")),1);
+       fl_set_button_shortcut(bibitem_form->label, scex(_("Label:|#L")), 1);
        fl_set_input(bibitem_form->key, getContents().c_str());
        fl_set_input(bibitem_form->label, getOptions().c_str());
        if (bibitem_form->bibitem_form->visible) {
                fl_raise_form(bibitem_form->bibitem_form);
        } else {
-               fl_show_form(bibitem_form->bibitem_form,FL_PLACE_MOUSE,
+               fl_show_form(bibitem_form->bibitem_form, FL_PLACE_MOUSE,
                             FL_FULLBORDER,
                             _("Bibliography item"));
        }   
@@ -317,14 +317,14 @@ int InsetBibtex::Latex(string &file, signed char /*fragile*/)
        // have a comma-separated list of bibliographies
        string db_in, adb, db_out;
        db_in = getContents();
-       db_in=split(db_in, adb, ',');
+       db_in= split(db_in, adb, ',');
        while(!adb.empty()) {
                if (!owner->niceFile &&
-                   IsFileReadable(MakeAbsPath(adb,owner->filepath)+".bib")) 
-                       adb = MakeAbsPath(adb,owner->filepath);
+                   IsFileReadable(MakeAbsPath(adb, owner->filepath)+".bib")) 
+                       adb = MakeAbsPath(adb, owner->filepath);
                db_out += adb;
                db_out += ',';
-               db_in=split(db_in, adb,',');
+               db_in= split(db_in, adb,',');
        }
        db_out = strip(db_out, ',');
        // Idem, but simpler
@@ -360,12 +360,12 @@ string InsetBibtex::getKeys()
        // BIBINPUTS
        string bibfiles, linebuf, tmp, keys;
        bibfiles = getContents();
-       bibfiles=split(bibfiles, tmp, ',');
+       bibfiles= split(bibfiles, tmp, ',');
        while(!tmp.empty()) {
-               if (IsFileReadable(MakeAbsPath(tmp,owner->filepath)+".bib"))
-                       tmp = MakeAbsPath(tmp,owner->filepath)+".bib";
+               if (IsFileReadable(MakeAbsPath(tmp, owner->filepath)+".bib"))
+                       tmp = MakeAbsPath(tmp, owner->filepath)+".bib";
                else {
-                       tmp = FileOpenSearch(GetEnvPath("BIBINPUTS"),tmp,"bib");
+                       tmp = FileOpenSearch(GetEnvPath("BIBINPUTS"), tmp, "bib");
                        if (tmp.empty())
                                tmp = FileOpenSearch(GetEnvPath("BIBINPUT"),
                                                     tmp, "bib");
@@ -377,7 +377,7 @@ string InsetBibtex::getKeys()
                        // All it does is to look for lines starting in @ and not
                        // being @preamble and @string entries.
                        // It does NOT do any syntax checking!
-                       FilePtr file(tmp,FilePtr::read);
+                       FilePtr file(tmp, FilePtr::read);
                        char c;
 
                        // On some systems where feof() is a macro,
@@ -396,7 +396,7 @@ string InsetBibtex::getKeys()
                                                if (!prefixIs(tmp, "@string") && !prefixIs(tmp, "@preamble") ) {
                                                        linebuf = split(linebuf, tmp,',');
                                                        if (!tmp.empty())
-                                                               keys += strip(tmp) + ",";
+                                                               keys += strip(tmp) + ", ";
                                                }
                                        }
                                        linebuf.clear();
@@ -406,7 +406,7 @@ string InsetBibtex::getKeys()
                        }
                }
                // Get next file name
-               bibfiles=split(bibfiles, tmp, ',');
+               bibfiles= split(bibfiles, tmp, ',');
        }
        return keys;
 }
@@ -454,10 +454,10 @@ bool InsetBibtex::delDatabase(string const & db)
                int n = tokenPos(contents, ',', bd);
                if (n > 0) {
                        // Weird code, would someone care to explain this?(Lgb)
-                       string tmp(",");
+                       string tmp(", ");
                        tmp += bd;
-                       contents = subst(contents, tmp.c_str(), ",");
-               } else if (n==0)
+                       contents = subst(contents, tmp.c_str(), ", ");
+               } else if (n == 0)
                        contents = split(contents, bd, ',');
                else 
                        return false;
index 3c07f55a2927c602535d08441be4b11bb5c0d838..54ec1df173f9626cf6b9b1b003dbb9673f6719cb 100644 (file)
@@ -1,13 +1,13 @@
 // -*- C++ -*-
 /* This file is part of*
- * ======================================================
+ * ====================================================== 
  *
  *           LyX, The Document Processor
  *      
  *         Copyright (C) 1995 Matthias Ettrich
  *          Copyright (C) 1995-1999 The LyX Team.
  * 
- * ======================================================*/
+ * ====================================================== */
 
 #ifndef INSET_BIB_H
 #define INSET_BIB_H
index 1457cad889d2655cf5bf71a6a3bd092d5a28708e..7b2582d579cd5e5313515ecd054e0b0adbe7145b 100644 (file)
@@ -6,7 +6,7 @@
  *         Copyright 1995 Matthias Ettrich
  *          Copyright 1995-1999 The LyX Team.
  *
- * ======================================================*/
+ * ====================================================== */
 
 #include <config.h>
 
@@ -113,21 +113,21 @@ void InsetCommand::scanCommand(string const & cmd)
 
        for (string::size_type i = 0; i < cmd.length(); ++i) {
                char c = cmd[i];
-               if ((state==Command && c == ' ') ||
-                   (state==Command && c == '[') ||
-                   (state==Command && c == '{')) {
+               if ((state == Command && c == ' ') ||
+                   (state == Command && c == '[') ||
+                   (state == Command && c == '{')) {
                        state = WS;
                }
-               if ((state==Option  && c == ']') ||
-                   (state==Content && c == '}')) {
-                       if (nestdepth==0) {
+               if ((state == Option  && c == ']') ||
+                   (state == Content && c == '}')) {
+                       if (nestdepth == 0) {
                                state = WS;
                        } else {
                                nestdepth--;
                        }
                }
-               if ((state==Option  && c == '[') ||
-                   (state==Content && c == '{')) {
+               if ((state == Option  && c == '[') ||
+                   (state == Content && c == '{')) {
                        nestdepth++;
                }
                switch (state) {
index b1a53e82bf6088273c36d8b996aaf44ad4734aaf..27ceea85dbb6a3e2d3d28df489716bb4b71b40bd 100644 (file)
@@ -1,13 +1,13 @@
 // -*- C++ -*-
 /* This file is part of*
- * ======================================================
+ * ====================================================== 
  *
  *           LyX, The Document Processor
  *      
  *         Copyright (C) 1995 Matthias Ettrich
  *          Copyright (C) 1996-1999 The LyX Team.
  *
- * ======================================================*/
+ * ====================================================== */
 
 #ifndef INSET_LATEXCOMMAND_H
 #define INSET_LATEXCOMMAND_H
index 1d4bd36a1d0d3420390fede4ed4d2e76092828d1..61afb4717ab9fc27cf71cc58446d7d20332468c4 100644 (file)
@@ -6,7 +6,7 @@
  *         Copyright 1995 Matthias Ettrich
  *          Copyright 1995-1999 The LyX Team.
  *
- * ======================================================*/
+ * ====================================================== */
 
 #include <config.h>
 
@@ -14,7 +14,6 @@
 #pragma implementation
 #endif
 
-#include "definitions.h"
 #include "inseterror.h"
 #include "lyxdraw.h"
 #include "gettext.h"
@@ -79,7 +78,7 @@ void InsetError::Draw(LyXFont font, LyXScreen & scr,
        x += 1;
        scr.fillRectangle(gc_lighted,
                          int(x), baseline - Ascent(font)+1,
-                         Width(font)-2,Ascent(font)+ Descent(font)-2);
+                         Width(font)-2, Ascent(font)+ Descent(font)-2);
        scr.drawRectangle(gc_foot,
                          int(x), baseline-Ascent(font)+1,
                          Width(font)-2, Ascent(font)+Descent(font)-2); 
@@ -159,10 +158,11 @@ void InsetError::Edit(int, int)
        if (!form) {
                FL_OBJECT * obj;
                form = fl_bgn_form(FL_UP_BOX, ow, oh);
-               strobj = fl_add_box(FL_FRAME_BOX,10,10,380,180,"");
-               fl_set_object_color(strobj,FL_MCOL,FL_MCOL);
+               strobj = fl_add_box(FL_FRAME_BOX, 10, 10, 380, 180, "");
+               fl_set_object_color(strobj, FL_MCOL, FL_MCOL);
                fl_set_object_gravity(strobj, FL_NorthWest, FL_SouthEast);
-               obj = fl_add_button(FL_RETURN_BUTTON,140,200,120,30,_("Close"));
+               obj = fl_add_button(FL_RETURN_BUTTON, 140, 200, 120, 30,
+                                   _("Close"));
                fl_set_object_callback(obj, C_InsetError_CloseErrorCB, 0);
                obj->u_vdata = this;
                fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
@@ -174,14 +174,14 @@ void InsetError::Edit(int, int)
        if (form->visible) {
                fl_raise_form(form);
        } else {
-               fl_show_form(form,FL_PLACE_MOUSE | FL_FREE_SIZE, FL_FULLBORDER, 
-                            _("LaTeX Error"));
+               fl_show_form(form, FL_PLACE_MOUSE | FL_FREE_SIZE,
+                            FL_FULLBORDER, _("LaTeX Error"));
                fl_set_form_minsize(form, ow, oh);
        }
 }
 
 
-Inset* InsetError::Clone()
+Inset * InsetError::Clone()
 {
        InsetError * result = new InsetError(contents);
        return result;
index 1bde3a4d03a724335597b09baa2f3c8176f76f15..346e11d042d6052cc991b129d7684d49ff30bb89 100644 (file)
@@ -1,12 +1,12 @@
 // -*- C++ -*-
 /* This file is part of*
- * ======================================================
+ * ====================================================== 
  *
  *           LyX, The Document Processor
  *      
  *         Copyright (C) 1995 Matthias Ettrich
  *
- *======================================================*/
+ * ====================================================== */
 
 #ifndef INSET_ERROR_H
 #define INSET_ERROR_H
index 9353fb97dcb552f8c583f699cd0b00c2541b995b..f34bae7b7aeeb147dce54dd7cbe2d276f7c17ec7 100644 (file)
@@ -35,47 +35,47 @@ FD_include * create_form_include(void)
   FD_include * fdui = (FD_include *) fl_calloc(1, sizeof(FD_include));
 
   fdui->include = fl_bgn_form(FL_NO_BOX, 340, 210);
-  obj = fl_add_box(FL_UP_BOX,0,0,340,210,"");
-  obj = fl_add_frame(FL_ENGRAVED_FRAME,10,70,160,90,"");
-  fdui->browsebt = obj = fl_add_button(FL_NORMAL_BUTTON,230,30,100,30,idex(_("Browse|#B")));
-    fl_set_button_shortcut(obj,scex(_("Browse|#B")),1);
-    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
-    fl_set_object_callback(obj,include_cb,0);
-  fdui->flag1 = obj = fl_add_checkbutton(FL_PUSH_BUTTON,180,70,150,30,idex(_("Don't typeset|#D")));
-    fl_set_button_shortcut(obj,scex(_("Don't typeset|#D")),1);
-    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
-  obj = fl_add_button(FL_RETURN_BUTTON,120,170,100,30,_("OK"));
-    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
-    fl_set_object_callback(obj,include_cb,1);
-  obj = fl_add_button(FL_NORMAL_BUTTON,230,170,100,30,idex(_("Cancel|^[")));
-    fl_set_button_shortcut(obj,scex(_("Cancel|^[")),1);
-    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
-    fl_set_object_callback(obj,include_cb,2);
-  obj = fl_add_button(FL_NORMAL_BUTTON,230,130,100,30,idex(_("Load|#L")));
-    fl_set_button_shortcut(obj,scex(_("Load|#L")),1);
-    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
-    fl_set_object_callback(obj,include_cb,5);
-  fdui->input = obj = fl_add_input(FL_NORMAL_INPUT,10,30,210,30,idex(_("File name:|#F")));
-    fl_set_input_shortcut(obj,scex(_("File name:|#F")),1);
-    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
-    fl_set_object_lalign(obj,FL_ALIGN_TOP_LEFT);
-  fdui->flag41 = obj = fl_add_checkbutton(FL_PUSH_BUTTON,180,100,150,30,idex(_("Visible space|#s")));
-    fl_set_button_shortcut(obj,scex(_("Visible space|#s")),1);
-    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
+  obj = fl_add_box(FL_UP_BOX, 0, 0, 340, 210, "");
+  obj = fl_add_frame(FL_ENGRAVED_FRAME, 10, 70, 160, 90, "");
+  fdui->browsebt = obj = fl_add_button(FL_NORMAL_BUTTON, 230, 30, 100, 30, idex(_("Browse|#B")));
+    fl_set_button_shortcut(obj, scex(_("Browse|#B")), 1);
+    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+    fl_set_object_callback(obj, include_cb, 0);
+  fdui->flag1 = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 180, 70, 150, 30, idex(_("Don't typeset|#D")));
+    fl_set_button_shortcut(obj, scex(_("Don't typeset|#D")), 1);
+    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+  obj = fl_add_button(FL_RETURN_BUTTON, 120, 170, 100, 30, _("OK"));
+    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+    fl_set_object_callback(obj, include_cb, 1);
+  obj = fl_add_button(FL_NORMAL_BUTTON, 230, 170, 100, 30, idex(_("Cancel|^[")));
+    fl_set_button_shortcut(obj, scex(_("Cancel|^[")), 1);
+    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+    fl_set_object_callback(obj, include_cb, 2);
+  obj = fl_add_button(FL_NORMAL_BUTTON, 230, 130, 100, 30, idex(_("Load|#L")));
+    fl_set_button_shortcut(obj, scex(_("Load|#L")), 1);
+    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+    fl_set_object_callback(obj, include_cb, 5);
+  fdui->input = obj = fl_add_input(FL_NORMAL_INPUT, 10, 30, 210, 30, idex(_("File name:|#F")));
+    fl_set_input_shortcut(obj, scex(_("File name:|#F")), 1);
+    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+    fl_set_object_lalign(obj, FL_ALIGN_TOP_LEFT);
+  fdui->flag41 = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 180, 100, 150, 30, idex(_("Visible space|#s")));
+    fl_set_button_shortcut(obj, scex(_("Visible space|#s")), 1);
+    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
 
   fdui->include_grp = fl_bgn_group();
-  fdui->flag4 = obj = fl_add_checkbutton(FL_RADIO_BUTTON,10,130,160,30,idex(_("Verbatim|#V")));
-    fl_set_button_shortcut(obj,scex(_("Verbatim|#V")),1);
-    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
-    fl_set_object_callback(obj,include_cb,10);
-  fdui->flag2 = obj = fl_add_checkbutton(FL_RADIO_BUTTON,10,100,160,30,idex(_("Use input|#i")));
-    fl_set_button_shortcut(obj,scex(_("Use input|#i")),1);
-    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
-    fl_set_object_callback(obj,include_cb,11);
-  fdui->flag3 = obj = fl_add_checkbutton(FL_RADIO_BUTTON,10,70,160,30,idex(_("Use include|#U")));
-    fl_set_button_shortcut(obj,scex(_("Use include|#U")),1);
-    fl_set_object_lsize(obj,FL_NORMAL_SIZE);
-    fl_set_object_callback(obj,include_cb,11);
+  fdui->flag4 = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 10, 130, 160, 30, idex(_("Verbatim|#V")));
+    fl_set_button_shortcut(obj, scex(_("Verbatim|#V")), 1);
+    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+    fl_set_object_callback(obj, include_cb, 10);
+  fdui->flag2 = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 10, 100, 160, 30, idex(_("Use input|#i")));
+    fl_set_button_shortcut(obj, scex(_("Use input|#i")), 1);
+    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+    fl_set_object_callback(obj, include_cb, 11);
+  fdui->flag3 = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 10, 70, 160, 30, idex(_("Use include|#U")));
+    fl_set_button_shortcut(obj, scex(_("Use include|#U")), 1);
+    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+    fl_set_object_callback(obj, include_cb, 11);
   fl_end_group();
 
   fl_end_form();
@@ -252,7 +252,7 @@ void InsetInclude::Edit(int, int)
         if (form->include->visible) {
                fl_raise_form(form->include);
        } else {
-               fl_show_form(form->include,FL_PLACE_MOUSE, FL_FULLBORDER,
+               fl_show_form(form->include, FL_PLACE_MOUSE, FL_FULLBORDER,
                             _("Include"));
        }
 }
@@ -268,7 +268,7 @@ void InsetInclude::Read(LyXLex & lex)
 {
        InsetCommand::Read(lex);
     
-       if (getCmdName()=="include")
+       if (getCmdName() == "include")
                setInclude();
        else if (getCmdName() == "input")
                setInput();
@@ -292,9 +292,9 @@ string InsetInclude::getScreenLabel() const
        temp += ": ";
        
        if (contents.empty()) {
-               temp+="???";
+               temp+= "???";
        } else {
-               temp+=contents;
+               temp+= contents;
        }
        return temp;
 }
@@ -360,7 +360,7 @@ int InsetInclude::Latex(string & file, signed char /*fragile*/)
                        writefile = AddName(master->tmppath, incfile);
                } else
                        writefile = getFileName();
-               writefile = ChangeExtension(writefile,".tex",false);
+               writefile = ChangeExtension(writefile, ".tex", false);
                lyxerr[Debug::LATEX] << "incfile:" << incfile << endl;
                lyxerr[Debug::LATEX] << "writefile:" << writefile << endl;
                
@@ -385,7 +385,7 @@ int InsetInclude::Latex(string & file, signed char /*fragile*/)
                } else {
                        file += '\\';
                        file += command + '{';
-                       file += ChangeExtension(incfile, ".tex", false)
+                       file += ChangeExtension(incfile, ".tex", false)
                                + '}';
                }
        } else {
@@ -393,7 +393,7 @@ int InsetInclude::Latex(string & file, signed char /*fragile*/)
                // file really have .tex
                file += '\\';
                file += command + '{';
-               file += ChangeExtension(incfile, string(), false)
+               file +=         ChangeExtension(incfile, string(), false)
                        + '}';
        }
 
index a37d9a2b795da8320eb9c0d4e302431f36261c35..0373eeb6317bdde87e62bd03145954fab8c45c36 100644 (file)
@@ -6,7 +6,7 @@
  *      
  *         Copyright (C) 1997 LyX Team (this file was created this year)
  * 
- * ======================================================*/
+ * ====================================================== */
 
 #ifndef INSET_INCLUDE_H
 #define INSET_INCLUDE_H
@@ -93,7 +93,7 @@ public:
         */ 
        bool isVerb() const;
        ///
-       bool isVerbVisibleSpace() const { return flag==InsetInclude::VERBAST;}
+       bool isVerbVisibleSpace() const { return flag == InsetInclude::VERBAST;}
         ///  
        bool isInclude() const { return flag == InsetInclude::INCLUDE;}
         ///  
@@ -112,7 +112,7 @@ private:
         ///
         enum Include_Flags {
                ///
-               INCLUDE=0,
+               INCLUDE= 0,
                ///
                VERB = 1,
                ///
@@ -135,7 +135,7 @@ private:
 inline 
 bool InsetInclude::isVerb() const
 {
-    return (bool)(flag==InsetInclude::VERB || flag==InsetInclude::VERBAST); 
+    return (bool)(flag == InsetInclude::VERB || flag == InsetInclude::VERBAST); 
 }
 
 
@@ -179,10 +179,10 @@ void InsetInclude::setVerb()
 inline
 void InsetInclude::setVisibleSpace(bool b)
 {
-        if (b && flag==InsetInclude::VERB) {
+        if (b && flag == InsetInclude::VERB) {
            setCmdName("verbatiminput*");
            flag = InsetInclude::VERBAST;
-       } else if (!b && flag==InsetInclude::VERBAST) {
+       } else if (!b && flag == InsetInclude::VERBAST) {
            setCmdName("verbatiminput");
            flag = InsetInclude::VERB;
        }
index a4868a40692b0a6bc8487d4d3556dfed8da449bd..1156066e6d14f0a6f99f3d008db96508f828f56a 100644 (file)
@@ -48,19 +48,19 @@ FD_index_form * create_form_index_form()
        FD_index_form *fdui = (FD_index_form *) fl_calloc(1, sizeof(FD_index_form));
 
        fdui->index_form = fl_bgn_form(FL_NO_BOX, 258, 196);
-       obj = fl_add_box(FL_UP_BOX,0,0,258,196,"");
-       fdui->key = obj = fl_add_input(FL_NORMAL_INPUT,93,26,130,30,
+       obj = fl_add_box(FL_UP_BOX, 0, 0, 258, 196, "");
+       fdui->key = obj = fl_add_input(FL_NORMAL_INPUT, 93, 26, 130, 30,
                                       idex(_("Keyword:|#K")));
-         fl_set_object_shortcut(obj,scex(_("Keyword:|#K")),1);
-         fl_set_object_lsize(obj,FL_NORMAL_SIZE);
-       obj = fl_add_button(FL_RETURN_BUTTON,50,140,80,30,_("OK"));
+         fl_set_object_shortcut(obj, scex(_("Keyword:|#K")), 1);
+         fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+       obj = fl_add_button(FL_RETURN_BUTTON, 50, 140, 80, 30, _("OK"));
          obj->u_vdata = index_form;
-         fl_set_object_callback(obj,index_cb,1);
-       obj = fl_add_button(FL_NORMAL_BUTTON,150,140,80,30,
+         fl_set_object_callback(obj, index_cb, 1);
+       obj = fl_add_button(FL_NORMAL_BUTTON, 150, 140, 80, 30,
                            idex(_("Cancel|^[")));
-         fl_set_object_shortcut(obj,scex(_("Cancel|^[")),1);
+         fl_set_object_shortcut(obj, scex(_("Cancel|^[")), 1);
          obj->u_vdata = index_form;
-         fl_set_object_callback(obj,index_cb,0);
+         fl_set_object_callback(obj, index_cb, 0);
        fl_end_form();
 
        return fdui;
index 6470404e28bf5c8303930a9c8155953aa7678043..bdad6b47c12342cb4ece4d3598196503eed48834 100644 (file)
@@ -1,13 +1,13 @@
 // -*- C++ -*-
 /* This file is part of*
- * ======================================================
+ * ====================================================== 
  *
  *           LyX, The Document Processor
  *      
  *         Copyright 1995 Matthias Ettrich
  *          Copyright 1996-1999 the LyX Team.
  * 
- * ======================================================*/
+ * ====================================================== */
 
 #ifndef INSET_INDEX_H
 #define INSET_INDEX_H
index 21a7f066803817ef61afc9e691463c218fc3fcd3..189730b742bdcc63bc07b61dc59cbb107d52c078 100644 (file)
@@ -6,7 +6,7 @@
  *         Copyright 1995 Matthias Ettrich
  *          Copyright 1995-1999 The LyX Team.
  *
- * ======================================================*/
+ * ====================================================== */
 
 #include <config.h>
 
@@ -186,12 +186,12 @@ void InsetInfo::Edit(int, int)
        
        if (!form) {
                FL_OBJECT *obj;
-               form = fl_bgn_form(FL_UP_BOX,400,180);
-               strobj = obj = fl_add_input(FL_MULTILINE_INPUT,10,10,380,120,"");
-               fl_set_object_color(obj,FL_MCOL,FL_MCOL);
+               form = fl_bgn_form(FL_UP_BOX, 400, 180);
+               strobj = obj = fl_add_input(FL_MULTILINE_INPUT, 10, 10, 380, 120, "");
+               fl_set_object_color(obj, FL_MCOL, FL_MCOL);
                fl_set_object_resize(obj, FL_RESIZE_ALL);
                fl_set_object_gravity(obj, NorthWestGravity, SouthEastGravity);
-               obj = fl_add_button(FL_NORMAL_BUTTON,130,140,120,30,idex(_("Close|#C^[")));
+               obj = fl_add_button(FL_NORMAL_BUTTON, 130, 140, 120, 30, idex(_("Close|#C^[")));
                fl_set_object_resize(obj, FL_RESIZE_NONE);
                fl_set_object_gravity(obj, SouthEastGravity, SouthEastGravity);
                fl_set_object_callback(obj, C_InsetInfo_CloseInfoCB, 0);
@@ -204,7 +204,7 @@ void InsetInfo::Edit(int, int)
        if (form->visible) {
                fl_raise_form(form);
        } else {
-               fl_show_form(form,FL_PLACE_MOUSE | FL_FREE_SIZE,FL_FULLBORDER, 
+               fl_show_form(form, FL_PLACE_MOUSE | FL_FREE_SIZE, FL_FULLBORDER, 
                             _("Note"));
                if (ow < 0) {
                        ow = form->w;
index 5023a069fdc93e611f395663bcf60764544e6fac..b2f3f5b57b5f9fce10fb6bfa5992c56c7669124c 100644 (file)
@@ -1,13 +1,13 @@
 // -*- C++ -*-
 /* This file is part of*
- * ======================================================
+ * ====================================================== 
  *
  *           LyX, The Document Processor
  *      
  *           Copyright 1995 Matthias Ettrich
  *           Copyright 1995-1999 the LyX Team.
  *
- * ======================================================*/
+ * ====================================================== */
 
 #ifndef INSET_INFO_H
 #define INSET_INFO_H
index 6ef9e342a8b22222210db400d1023adba3ea1e5a..665485d3eef20a4e2ca9b5f93a471227bfc01ad0 100644 (file)
@@ -6,7 +6,7 @@
  *         Copyright 1995 Matthias Ettrich
  *          Copyright 1995-1999 The LyX Team.
  *
- * ======================================================*/
+ * ====================================================== */
 
 #include <config.h>
 
@@ -82,7 +82,7 @@ string InsetLabel::escape(string const & lab) const {
        char hexdigit[16] = { '0', '1', '2', '3', '4', '5', '6', '7',
                              '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
        string enc;
-       for (string::size_type i=0; i < lab.length(); ++i) {
+       for (string::size_type i= 0; i < lab.length(); ++i) {
                unsigned char c = lab[i];
                if (c >= 128 || c == '=' || c == '%') {
                        enc += '=';
index bebe75df8729469ac20c31ff230b95309658eec6..bf7245493c2b1a47d9b814cce0e16d5f13ae5b89 100644 (file)
@@ -7,7 +7,7 @@
  *           Copyright 1995 Matthias Ettrich
  *           Copyright 1995-1999 The LyX Team
  *
- *======================================================*/
+ * ====================================================== */
 
 #ifndef INSET_LABEL_H
 #define INSET_LABEL_H
index dbc6fd826212dbcc8e3a846956b1c5fc6d264149..590086a8dcab69604d1c7da959d7dedaed738106 100644 (file)
@@ -1,12 +1,12 @@
 /* This file is part of
- * ======================================================
+ * ====================================================== 
  * 
  *           LyX, The Document Processor
  *      
  *         Copyright 1995 Matthias Ettrich
  *          Copyright 1995-1999 The LyX Team.
  *
- * ======================================================*/
+ * ====================================================== */
 
 #include <config.h>
 
@@ -14,7 +14,6 @@
 #pragma implementation
 #endif
 
-#include "definitions.h"
 #include "insetlatex.h"
 #include "lyxdraw.h"
 
@@ -67,7 +66,7 @@ void InsetLatex::Draw(LyXFont font, LyXScreen & scr,
        scr.fillRectangle(gc_lighted, int(x), baseline - Ascent(font) +1 ,
                          Width(font) - 2, Ascent(font) + Descent(font) -2);
        
-       scr.drawRectangle(gc_foot,int(x), baseline - Ascent(font) + 1,
+       scr.drawRectangle(gc_foot, int(x), baseline - Ascent(font) + 1,
                          Width(font)-2, Ascent(font)+Descent(font)-2);
        
        scr.drawString(font, contents, baseline, int(x+2));
index 8c163183eee42f2dc5607e169ed3eaaf6a84bca9..ae2a493c07b119e188817269a9a757076840b783 100644 (file)
@@ -6,7 +6,7 @@
  *      
  *         Copyright (C) 1995 Matthias Ettrich
  *
- * ======================================================*/
+ * ====================================================== */
 
 #ifndef INSET_LATEX_H
 #define INSET_LATEX_H
index 169c02a2b0fb0674fec20b6e3c091f77d2f451b2..489ce5da83b7a8a3ce6671ac9bff2f927b88ef62 100644 (file)
@@ -1,12 +1,12 @@
 /* This file is part of
- * ======================================================
+ * ====================================================== 
  * 
  *           LyX, The Document Processor
  *      
  *         Copyright 1995 Matthias Ettrich
  *          Copyright 1995-1999 The LyX Team.
  *
- * ======================================================*/
+ * ====================================================== */
 
 #include <config.h>
 
@@ -80,7 +80,7 @@ void InsetLatexAccent::checkContents()
                        tmp += contents[2];
                        tmp += '}';
                        contents = tmp;
-               } else if (contents.length()==4 && contents[2] == ' ') {
+               } else if (contents.length() == 4 && contents[2] == ' ') {
                        string tmp;
                        tmp += contents[0];
                        tmp += contents[1];
@@ -88,8 +88,8 @@ void InsetLatexAccent::checkContents()
                        tmp += contents[3];
                        tmp += '}';
                        contents = tmp;
-               } else if  (contents.length()==4 && contents[2] == '\\'
-                           && (contents[3]== 'i' || contents[3]== 'j')) {
+               } else if  (contents.length() == 4 && contents[2] == '\\'
+                           && (contents[3] == 'i' || contents[3] == 'j')) {
                        string tmp;
                        tmp += contents[0];
                        tmp += contents[1];
@@ -246,8 +246,8 @@ void InsetLatexAccent::checkContents()
                    temp += '\\';
                    temp += char(ic);
                    for(string::size_type j = 4; j < contents.length(); ++j)
-                               temp+=contents[j];
-                   contents=temp;
+                               temp+= contents[j];
+                   contents= temp;
                    i++;
                        remdot = true;
                }    
@@ -287,7 +287,7 @@ int InsetLatexAccent::Descent(LyXFont const & font) const
 {
        int max;
        if (candisp) {
-               if (ic==' ') 
+               if (ic == ' ') 
                        max = font.descent('a');
                 else 
                        max = font.descent(ic);
@@ -357,7 +357,7 @@ void InsetLatexAccent::Draw(LyXFont font,
                            int baseline, 
                            float & x)
 {
-       if (lyxrc->font_norm=="iso8859-9")
+       if (lyxrc->font_norm == "iso8859-9")
                if (DisplayISO8859_9 (font, scr, baseline, x))  
                        return;
        
@@ -402,7 +402,7 @@ void InsetLatexAccent::Draw(LyXFont font,
                                          font.ascent('x')-1);
                        
                }
-               // now the rest - draw within (x,y, x+wid, y+hg)
+               // now the rest - draw within (x, y, x+wid, y+hg)
                switch (modtype) {
                case ACUTE:     // acute
                {
@@ -412,7 +412,7 @@ void InsetLatexAccent::Draw(LyXFont font,
                }
                case GRAVE:     // grave
                {
-                       scr.drawLine(pgc,int(x2), int(y+hg35),
+                       scr.drawLine(pgc, int(x2), int(y+hg35),
                                     int(x2-hg35), y); 
                        break;
                }
@@ -455,7 +455,7 @@ void InsetLatexAccent::Draw(LyXFont font,
                case UNDERDOT:     // underdot
                case DOT:    // dot
                {
-                       scr.drawArc(pgc,int(x2), y+(hg/2),
+                       scr.drawArc(pgc, int(x2), y+(hg/2),
                                    1, 1, 0, 360*64); 
                        break;
                }
index acf1afbfd6319ccd686afe7c891bbe6c7ff35052..0548009af5ed25a3aae682ed64bedcda07403a02 100644 (file)
@@ -1,12 +1,12 @@
 // -*- C++ -*-
 /* This file is part of*
- * ======================================================
+ * ====================================================== 
  *
  *           LyX, The Document Processor
  *      
  *         Copyright (C) 1995 Matthias Ettrich
  *
- *======================================================*/
+ * ====================================================== */
 
 #ifndef INSET_LATEX_ACCENT_H
 #define INSET_LATEX_ACCENT_H
@@ -129,7 +129,7 @@ private:
        /// modifier type
        ACCENT_TYPES  modtype;
        
-       /// remove dot from 'i' and 'j' or transform l,L into lslash,LSLaSH
+       /// remove dot from 'i' and 'j' or transform l, L into lslash, LSLaSH
        bool  remdot;
        /// add something to ascent - accent at the top
        bool  plusasc;
index 8578b959ed3077221c48cd8ecef9ff763ca6feef..33d14a39cedfe8509d0cf939108dfd3f610e8c8c 100644 (file)
@@ -7,7 +7,7 @@
  *          Copyright (C) 1995 Matthias Ettrich
  *          Copyright (C) 1996-1999 The LyX Team.
  * 
- * ======================================================*/
+ * ====================================================== */
 
 // Created by Bernhard 970908
 
index 91434c520a1199cc0c682f7e5cebfe823ed5448f..3655d3ac1cb5bef1847b53b408d5af29d7f4e565 100644 (file)
@@ -7,7 +7,7 @@
  *           Copyright 1995 Matthias Ettrich
  *           Copyright 1996-1999 the LyX Team.
  * 
- *======================================================*/
+ * ====================================================== */
 
 #ifndef INSET_LOA_H
 #define INSET_LOA_H
@@ -28,7 +28,7 @@ public:
        ///
        InsetLOA(): InsetCommand("listofalgorithms") {}
        ///
-       InsetLOA(Buffer * b): InsetCommand("listofalgorithms"),owner(b) {}
+       InsetLOA(Buffer * b): InsetCommand("listofalgorithms"), owner(b) {}
         ///
        void Validate(LaTeXFeatures & features) const;
         ///
index 0de6628d36666c004e94a935702f18b986ec9a1b..f091565bc5fd6ca9297d0775b25233be7b6ea9dd 100644 (file)
@@ -7,7 +7,7 @@
  *           Copyright 1995 Matthias Ettrich
  *           Copyright 1996-1999 the LyX Team.
  * 
- *======================================================*/
+ * ====================================================== */
 
 #ifndef INSET_LOF_H
 #define INSET_LOF_H
@@ -28,7 +28,7 @@ public:
        ///
        InsetLOF(): InsetCommand("listoffigures") {}
        ///
-       InsetLOF(Buffer * b): InsetCommand("listoffigures"),owner(b) {}
+       InsetLOF(Buffer * b): InsetCommand("listoffigures"), owner(b) {}
         ///
         Inset * Clone() { return new InsetLOF(owner); }
        ///
index edc7bd78fa26ad1c5af931dc7fc37fbb6517c227..e3fae9308ea5b86cfe506d407c950d0080b991c9 100644 (file)
@@ -7,7 +7,7 @@
  *           Copyright 1995 Matthias Ettrich
  *           Copyright 1996-1999 LyX Team
  * 
- *======================================================*/
+ * ====================================================== */
 
 #ifndef INSET_LOT_H
 #define INSET_LOT_H
index 525709accd47d464c40cce408ab606b1acd1c9d5..bd788a4a269c43030f348ec85dd1db8842037f80 100644 (file)
@@ -1,11 +1,11 @@
 /* This file is part of*
- * ======================================================
+ * ====================================================== 
  *
  *           LyX, The Document Processor
  *      
  *           Copyright (C) 1997-1999 LyX Team
  * 
- * ======================================================*/
+ * ====================================================== */
 
 
 // Created by asierra 970813
index 3c50159b9a8764998d3be7d3f990869d6b6ad6bf..cfc8e3e53aa026c44b2544d0cc24b72414e87122 100644 (file)
@@ -1,12 +1,12 @@
 // -*- C++ -*-
 /* This file is part of*
- * ======================================================
+ * ====================================================== 
  *
  *           LyX, The Document Processor
  *      
  *           Copyright (C) 1997-1999 LyX Team
  * 
- * ======================================================*/
+ * ====================================================== */
 
 #ifndef INSET_PARENT_H
 #define INSET_PARENT_H
@@ -29,7 +29,7 @@ public:
        /// Non-standard LyX macro
        InsetParent(): InsetCommand("lyxparent") { }
        ///
-        InsetParent(string fn, Buffer * owner=0);
+        InsetParent(string fn, Buffer * owner= 0);
        ///
         ~InsetParent() {}
        /// 
index 889c2fe295cb370e5e62392c8122812f2496284a..4ec6d5805cd4a785cb32a3ee31faf8b910ff0449 100644 (file)
@@ -6,7 +6,7 @@
  *         Copyright 1995 Matthias Ettrich
  *          Copyright 1995-1999 The LyX Team.
  *
- * ======================================================*/
+ * ====================================================== */
 
 #include <config.h>
 
@@ -32,29 +32,29 @@ extern BufferView * current_view;
 // codes used to read/write quotes to LyX files
 static char const * const language_char = "esgpfa";
 static char const * const side_char = "lr" ;
-static char const * const times_char ="sd";
+static char const * const times_char = "sd";
 
 // List of known quote chars
 static char const * const quote_char = ",'`<>";
 
-// Index of chars used for the quote. Index is [side,language]
+// Index of chars used for the quote. Index is [side, language]
 int quote_index[2][6] = 
 { { 2, 1, 0, 0, 3, 4 },    // "'',,<>" 
   { 1, 1, 2, 1, 4, 3 } };  // "`'`'><"
 
 // Corresponding LaTeX code, for double and single quotes.
-static char const * const latex_quote_t1[2][5] =
+static char const * const latex_quote_t1[2][5] = 
 { { "\\quotesinglbase{}",  "'", "`", 
     "\\guilsinglleft{}", "\\guilsinglright{}" }, 
   { ",,", "''", "``", "<<", ">>" } };
 
-static char const * const latex_quote_ot1[2][5] =
+static char const * const latex_quote_ot1[2][5] = 
 { { "\\quotesinglbase{}",  "'", "`", 
     "\\guilsinglleft{}", "\\guilsinglright{}" }, 
   { "\\quotedblbase{}", "''", "``",
     "\\guillemotleft{}", "\\guillemotright{}" } };
 
-static char const * const latex_quote_babel[2][5] =
+static char const * const latex_quote_babel[2][5] = 
 { { "\\glq{}",  "'", "`", "\\flq{}", "\\frq{}" },
   { "\\glqq{}", "''", "``", "\\flqq{}", "\\frqq{}" } };
 
@@ -78,8 +78,9 @@ InsetQuotes::InsetQuotes(char c, BufferParams const & params)
        // Decide whether left or right 
        switch(c) {
        case ' ': case '(': case '{': case '[': case '-': case ':':
-       case LYX_META_HFILL: case LYX_META_PROTECTED_SEPARATOR:
-       case LYX_META_NEWLINE: 
+       case LyXParagraph::META_HFILL:
+       case LyXParagraph::META_PROTECTED_SEPARATOR:
+       case LyXParagraph::META_NEWLINE: 
                side = InsetQuotes::LeftQ;   // left quote 
                break;
        default:
@@ -98,37 +99,37 @@ void InsetQuotes::ParseString(string const & s)
                str = "eld";
        }
 
-       for (i=0;i<6;i++) {
+       for (i= 0;i<6;i++) {
                if (str[0] == language_char[i]) {
                        language = (InsetQuotes::quote_language)i;
                        break;
                }
        }
-       if (i>=6) {
+       if (i>= 6) {
                lyxerr << "ERROR (InsetQuotes::InsetQuotes):"
                        " bad language specification." << endl;
                language = InsetQuotes::EnglishQ; 
        }
 
-       for (i=0;i<2;i++) {
+       for (i= 0;i<2;i++) {
                if (str[1] == side_char[i]) {
                        side = (InsetQuotes::quote_side)i;
                        break;
                }
        }
-       if (i>=2) {
+       if (i>= 2) {
                lyxerr << "ERROR (InsetQuotes::InsetQuotes):"
                        " bad side specification." << endl;
                side = InsetQuotes::LeftQ; 
        }
 
-       for (i=0;i<2;i++) {
+       for (i= 0;i<2;i++) {
                if (str[2] == times_char[i]) {
                        times = (InsetQuotes::quote_times)i;
                        break;
                }
        }
-       if (i>=2) {
+       if (i>= 2) {
                lyxerr << "ERROR (InsetQuotes::InsetQuotes):"
                        " bad times specification." << endl;
                times = InsetQuotes::DoubleQ; 
@@ -227,7 +228,7 @@ int InsetQuotes::Latex(FILE * file, signed char /*fragile*/)
 
 int InsetQuotes::Latex(string & file, signed char /*fragile*/)
 {
-       string doclang =
+       string doclang = 
                current_view->buffer()->GetLanguage();
        int quoteind = quote_index[side][language];
        string qstr;
index 91c105e3589ef927459a82d7244a0a33e0f89bfb..49dae58aeb1cca6447beed87a124fc9f7f7b0c3b 100644 (file)
@@ -7,7 +7,7 @@
  *         Copyright 1995 Matthias Ettrich
  *          Copyright 1995-1999 The LyX Team
  *
- * ======================================================*/
+ * ====================================================== */
 
 #ifndef INSET_QUOTES_H
 #define INSET_QUOTES_H
index 8ef66fdc9ea68f3dfd90b80bf3ce4e652ba575f7..b10dcd2c03f2d5b6ac2bfcec7349a7ce5b0b439d 100644 (file)
@@ -78,7 +78,7 @@ int InsetRef::Latex(FILE * file, signed char /*fragile*/)
                fprintf(file, "%s", escape(getCommand()).c_str());
        else {
                string ns;
-               InsetCommand clone= InsetCommand(getCmdName(),getContents(),ns);
+               InsetCommand clone= InsetCommand(getCmdName(), getContents(), ns);
                fprintf(file, "%s", escape(clone.getCommand()).c_str());
        }
        return 0;
@@ -91,7 +91,7 @@ int InsetRef::Latex(string & file, signed char /*fragile*/)
                file += escape(getCommand());
        else {
                string ns;
-               InsetCommand clone= InsetCommand(getCmdName(),getContents(),ns);
+               InsetCommand clone= InsetCommand(getCmdName(), getContents(), ns);
                file += escape(clone.getCommand());
        }
        return 0;
@@ -123,8 +123,8 @@ string InsetRef::escape(string const & lab) const {
                              '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
        string enc;
        for (string::size_type i = 0; i < lab.length(); ++i) {
-               unsigned char c=lab[i];
-               if (c >= 128 || c=='=' || c=='%') {
+               unsigned char c= lab[i];
+               if (c >= 128 || c == '=' || c == '%') {
                        enc += '=';
                        enc += hexdigit[c>>4];
                        enc += hexdigit[c & 15];
index 857e651402239dca803e7c966d9645a222724034..af85500a30867572a6541be306dad139ecf1949f 100644 (file)
@@ -6,7 +6,7 @@
  *      
  *         Copyright (C) 1997 LyX Team (this file was created this year)
  * 
- *======================================================*/
+ * ====================================================== */
 
 #ifndef INSET_REF_H
 #define INSET_REF_H
index 019e238195f5b20a758bd3662f4e579f6ba7cb13..111b55218a7d00ca3b96c6c010e041ccb60201e6 100644 (file)
@@ -5,7 +5,7 @@
  *      
  *         Copyright 1997 Asger Alstrup
  *
- * ======================================================*/
+ * ====================================================== */
 
 #include <config.h>
 
@@ -136,13 +136,13 @@ void InsetSpecialChar::Read(LyXLex & lex)
        lex.nextToken();
        string command = lex.GetString();
 
-       if (command=="\\-")
+       if (command == "\\-")
                kind = HYPHENATION;
-       else if (command=="\\@.")
+       else if (command == "\\@.")
                kind = END_OF_SENTENCE;
-       else if (command=="\\ldots{}")
+       else if (command == "\\ldots{}")
                kind = LDOTS;
-       else if (command=="\\menuseparator")
+       else if (command == "\\menuseparator")
                kind = MENU_SEPARATOR;
        else
                lex.printError("InsetSpecialChar: Unknown kind: `$$Token'");
index e01b32e6d44cd06fa7243f94f0cd64fa6a8b24f8..354b5a24418bdb974a25244393d69a74b7ecc913 100644 (file)
@@ -1,12 +1,12 @@
 // -*- C++ -*-
 /* This file is part of*
- * ======================================================
+ * ====================================================== 
  *
  *           LyX, The Document Processor
  *      
  *         Copyright (C) 1997 Asger Alstrup
  *
- * ======================================================*/
+ * ====================================================== */
 
 #ifndef INSET_SPECIALCHAR_H
 #define INSET_SPECIALCHAR_H
index 8be5c8bebce345bc35e4b3936eea31e9e4c61663..34e1dbc0ed60d0b65f3cff6ca6f24f555991941a 100644 (file)
@@ -7,7 +7,7 @@
  *           Copyright 1995 Matthias Ettrich
  *           Copyright 1996-1999 The LyX Team.
  * 
- *======================================================*/
+ * ====================================================== */
 
 #ifndef INSET_TOC_H
 #define INSET_TOC_H
@@ -28,7 +28,7 @@ public:
        ///
        InsetTOC(): InsetCommand("tableofcontents") {}
        ///
-       InsetTOC(Buffer * b): InsetCommand("tableofcontents"),owner(b) {}
+       InsetTOC(Buffer * b): InsetCommand("tableofcontents"), owner(b) {}
         ///
         Inset * Clone() { return new InsetTOC(owner); }
        ///
index 436d68bb67d08db7fe5d32c93497997974c64bcb..76a231a3697a9df0e7b6c04663af352f4983875d 100644 (file)
@@ -117,7 +117,7 @@ void InsetUrl::Edit(int, int)
        if (!fd_form_url) {
                fd_form_url = create_form_form_url();
                fd_form_url->button_close->u_vdata = this;
-               fl_set_form_atclose(fd_form_url->form_url,CancelCloseBoxCB, 0);
+               fl_set_form_atclose(fd_form_url->form_url, CancelCloseBoxCB, 0);
        }
        fl_set_input(fd_form_url->url_name, getContents().c_str());
        fl_set_input(fd_form_url->name_name, getOptions().c_str());
index 9d5552f929c98ad4d527ee481cc39dbcf305e9c6..b73c96930ae6a5c3008c574dad542ad9a295bc22 100644 (file)
@@ -1,12 +1,12 @@
 // -*- C++ -*-
 /* This file is part of*
- * ======================================================
+ * ====================================================== 
  *
  *           LyX, The Document Processor
  *      
  *         Copyright (C) 1997 LyX Team (this file was created this year)
  * 
- * ======================================================*/
+ * ====================================================== */
 
 #ifndef INSET_URL_H
 #define INSET_URL_H
index 0e7cfce93daccda5835f96a7d660f3b999625a8a..7a1b9ed3b48a68e1c241ca54a45b0482d7169a89 100644 (file)
@@ -1,13 +1,13 @@
 // -*- C++ -*-
 /* This file is part of
- * ======================================================
+ * ====================================================== 
  * 
  *           LyX, The Document Processor
  *      
  *           Copyright 1995 Matthias Ettrich
  *           Copyright 1995-1999 the LyX Team.
  *
- * ======================================================*/
+ * ====================================================== */
 
 #ifndef LYXINSET_H
 #define LYXINSET_H
@@ -16,7 +16,6 @@
 #pragma interface
 #endif
 
-#include "definitions.h"
 #include "gettext.h"
 #include "lyxfont.h"
 #include "lyxlex.h"
@@ -28,11 +27,11 @@ struct LaTeXFeatures;
 /// Insets
 class Inset {
 public:
-       /** This is not quite the correct place for this enum, but it is
-         better than definitions.h. I think the correct would be to let
-         each subclass of Inset declare its own enum code. Actually the
-         notion of an Inset::Code should be avoided, but I am not sure how
-         this could be done in a cleaner way. */
+       /** This is not quite the correct place for this enum. I think
+           the correct would be to let each subclass of Inset declare
+           its own enum code. Actually the notion of an Inset::Code
+           should be avoided, but I am not sure how this could be done
+           in a cleaner way. */
        enum Code {
                ///
                NO_CODE,
@@ -91,8 +90,6 @@ public:
        ///
        virtual void Draw(LyXFont font, LyXScreen & scr,
                          int baseline, float & x) = 0;
-       ///
-       //virtual void setBuffer(Buffer const&) {;}
        /// what appears in the minibuffer when opening
        virtual char const * EditMessage() {return _("Opened inset");}
        ///
@@ -102,9 +99,9 @@ public:
        ///
        virtual bool AutoDelete() const;
        ///
-       virtual void Write(FILE * file)=0;
+       virtual void Write(FILE * file)= 0;
        ///
-       virtual void Read(LyXLex & lex)=0;
+       virtual void Read(LyXLex & lex)= 0;
        /** returns the number of rows (\n's) of generated tex code.
         fragile != 0 means, that the inset should take care about
         fragile commands by adding a \protect before.
@@ -112,9 +109,9 @@ public:
        virtual int Latex(FILE * file, signed char fragile) = 0;
        virtual int Latex(string & file, signed char fragile) = 0;
        ///
-       virtual int Linuxdoc(string &/*file*/) = 0;
+       virtual int Linuxdoc(string & /*file*/) = 0;
        ///
-       virtual int DocBook(string &/*file*/) = 0;
+       virtual int DocBook(string & /*file*/) = 0;
        /// Updates needed features for this inset.
        virtual void Validate(LaTeXFeatures & features) const;
        ///