]> git.lyx.org Git - features.git/commitdiff
ws cleanup
authorLars Gullik Bjønnes <larsbj@gullik.org>
Thu, 21 Mar 2002 17:09:55 +0000 (17:09 +0000)
committerLars Gullik Bjønnes <larsbj@gullik.org>
Thu, 21 Mar 2002 17:09:55 +0000 (17:09 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3802 a592a061-630c-0410-9148-cb99ea01b6c8

117 files changed:
src/insets/ChangeLog
src/insets/ExternalTemplate.C
src/insets/ExternalTemplate.h
src/insets/inset.C
src/insets/inset.h
src/insets/insetbib.C
src/insets/insetbib.h
src/insets/insetbutton.C
src/insets/insetbutton.h
src/insets/insetcaption.C
src/insets/insetcaption.h
src/insets/insetcite.C
src/insets/insetcite.h
src/insets/insetcollapsable.C
src/insets/insetcollapsable.h
src/insets/insetcommand.C
src/insets/insetcommand.h
src/insets/inseterror.C
src/insets/inseterror.h
src/insets/insetert.C
src/insets/insetert.h
src/insets/insetexternal.C
src/insets/insetexternal.h
src/insets/insetfloat.C
src/insets/insetfloat.h
src/insets/insetfloatlist.C
src/insets/insetfloatlist.h
src/insets/insetfoot.C
src/insets/insetfoot.h
src/insets/insetfootlike.C
src/insets/insetfootlike.h
src/insets/insetgraphics.C
src/insets/insetgraphics.h
src/insets/insetgraphicsParams.C
src/insets/insetgraphicsParams.h
src/insets/insetinclude.C
src/insets/insetinclude.h
src/insets/insetindex.C
src/insets/insetindex.h
src/insets/insetlabel.C
src/insets/insetlabel.h
src/insets/insetlatexaccent.C
src/insets/insetlatexaccent.h
src/insets/insetlist.C
src/insets/insetlist.h
src/insets/insetmarginal.C
src/insets/insetmarginal.h
src/insets/insetminipage.C
src/insets/insetminipage.h
src/insets/insetnote.C
src/insets/insetnote.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/insetsection.C
src/insets/insetsection.h
src/insets/insetspecialchar.C
src/insets/insetspecialchar.h
src/insets/insettabular.C
src/insets/insettabular.h
src/insets/insettext.C
src/insets/insettext.h
src/insets/insettheorem.C
src/insets/insettheorem.h
src/insets/insettoc.C
src/insets/insettoc.h
src/insets/inseturl.C
src/insets/inseturl.h
src/support/ChangeLog
src/support/DebugStream.C
src/support/DebugStream.h
src/support/FileInfo.C
src/support/FileInfo.h
src/support/LAssert.C
src/support/LIstream.h
src/support/LOstream.h
src/support/LRegex.C
src/support/LSubstring.C
src/support/LSubstring.h
src/support/StrPool.C
src/support/StrPool.h
src/support/filetools.C
src/support/filetools.h
src/support/fmt.C
src/support/forkedcall.C
src/support/forkedcall.h
src/support/forkedcontr.C
src/support/forkedcontr.h
src/support/getcwd.C
src/support/lstrings.C
src/support/lstrings.h
src/support/lxtl.h
src/support/lyxalgo.h
src/support/lyxfunctional.h
src/support/lyxlib.h
src/support/lyxregex.h
src/support/lyxstring.C
src/support/lyxstring.h
src/support/lyxsum.C
src/support/nt_defines.h
src/support/os.h
src/support/os2_defines.h
src/support/os2_errortable.h
src/support/path.C
src/support/path.h
src/support/smart_ptr.h
src/support/snprintf.h
src/support/sstream.h
src/support/systemcall.h
src/support/tempname.C
src/support/textutils.h
src/support/translator.h
src/support/types.h
src/support/utility.h

index 8dc8b9ff88dbcd5d0cbd5610b14ff2332376c549..ead8bef6be9ab80108aed718161dde6160b83a13 100644 (file)
@@ -1,5 +1,7 @@
 2002-03-21  Lars Gullik Bjønnes  <larsbj@birdstep.com>
 
 2002-03-21  Lars Gullik Bjønnes  <larsbj@birdstep.com>
 
+       * all files: ws cleanup
+
        * Makefile.am: remove ld -r stuff
 
 2002-03-21  Juergen Vigna  <jug@sad.it>
        * Makefile.am: remove ld -r stuff
 
 2002-03-21  Juergen Vigna  <jug@sad.it>
index cdf429ea22951b613498d814fb4d6fd60e077803..fffd528392580c84bf857e825052c81f7e147f8f 100644 (file)
@@ -1,8 +1,8 @@
 /* This file is part of
  * ======================================================
 /* This file is part of
  * ======================================================
- * 
+ *
  *           LyX, The Document Processor
  *           LyX, The Document Processor
- *      
+ *
  *         Copyright 1995 Matthias Ettrich
  *          Copyright 1995-2001 The LyX Team.
  *
  *         Copyright 1995 Matthias Ettrich
  *          Copyright 1995-2001 The LyX Team.
  *
@@ -52,11 +52,11 @@ ExternalTemplateManager::ExternalTemplateManager()
 
 class dumpTemplate {
 public:
 
 class dumpTemplate {
 public:
-       dumpTemplate(ostream & o) 
+       dumpTemplate(ostream & o)
                : ost(o) {}
        void operator()(ExternalTemplateManager::Templates::value_type const & vt) {
                ExternalTemplate const & et = vt.second;
                : ost(o) {}
        void operator()(ExternalTemplateManager::Templates::value_type const & vt) {
                ExternalTemplate const & et = vt.second;
-               
+
                ost << "Template " << et.lyxName << "\n"
                    << "\tGuiName " << et.guiName << "\n"
                    << "\tHelpText\n"
                ost << "Template " << et.lyxName << "\n"
                    << "\tGuiName " << et.guiName << "\n"
                    << "\tHelpText\n"
@@ -68,7 +68,7 @@ public:
                    << "\tAutomaticProduction " << et.automaticProduction << "\n";
                et.dumpFormats(ost);
                ost << "TemplateEnd" << endl;
                    << "\tAutomaticProduction " << et.automaticProduction << "\n";
                et.dumpFormats(ost);
                ost << "TemplateEnd" << endl;
-               
+
        }
 
 private:
        }
 
 private:
@@ -77,7 +77,7 @@ private:
 
 class dumpFormat {
 public:
 
 class dumpFormat {
 public:
-       dumpFormat(ostream & o) 
+       dumpFormat(ostream & o)
                : ost(o) {}
        void operator()(ExternalTemplate::Formats::value_type const & vt) const{
                ExternalTemplate::FormatTemplate const & ft = vt.second;
                : ost(o) {}
        void operator()(ExternalTemplate::Formats::value_type const & vt) const{
                ExternalTemplate::FormatTemplate const & ft = vt.second;
@@ -96,13 +96,13 @@ private:
 };
 
 
 };
 
 
-void ExternalTemplate::dumpFormats(ostream & os) const 
+void ExternalTemplate::dumpFormats(ostream & os) const
 {
        for_each(formats.begin(), formats.end(), dumpFormat(os));
 }
 
 
 {
        for_each(formats.begin(), formats.end(), dumpFormat(os));
 }
 
 
-void ExternalTemplateManager::dumpTemplates() const 
+void ExternalTemplateManager::dumpTemplates() const
 {
        for_each(templates.begin(), templates.end(), dumpTemplate(lyxerr));
 }
 {
        for_each(templates.begin(), templates.end(), dumpTemplate(lyxerr));
 }
@@ -134,8 +134,8 @@ ExternalTemplate const & ExternalTemplateManager::getTemplateByName(string const
        return templates[name];
 }
 
        return templates[name];
 }
 
-void ExternalTemplateManager::readTemplates(string const & path) 
+
+void ExternalTemplateManager::readTemplates(string const & path)
 {
        Path p(path);
 
 {
        Path p(path);
 
@@ -143,7 +143,7 @@ void ExternalTemplateManager::readTemplates(string const & path)
                TM_TEMPLATE = 1,
                TM_END
        };
                TM_TEMPLATE = 1,
                TM_END
        };
-       
+
        keyword_item templatetags[] = {
                { "template", TM_TEMPLATE },
                { "templateend", TM_END }
        keyword_item templatetags[] = {
                { "template", TM_TEMPLATE },
                { "templateend", TM_END }
@@ -162,7 +162,7 @@ void ExternalTemplateManager::readTemplates(string const & path)
                        "No template file" << endl;
                return;
        }
                        "No template file" << endl;
                return;
        }
-       
+
        while (lex.isOK()) {
                switch (lex.lex()) {
                case TM_TEMPLATE: {
        while (lex.isOK()) {
                switch (lex.lex()) {
                case TM_TEMPLATE: {
@@ -173,7 +173,7 @@ void ExternalTemplateManager::readTemplates(string const & path)
                        tmp.readTemplate(lex);
                }
                break;
                        tmp.readTemplate(lex);
                }
                break;
-               
+
                case TM_END:
                        lex.printError("Warning: End outside Template.");
                break;
                case TM_END:
                        lex.printError("Warning: End outside Template.");
                break;
@@ -207,46 +207,46 @@ void ExternalTemplate::readTemplate(LyXLex & lex)
        };
 
        pushpophelper pph(lex, templateoptiontags, TO_END);
        };
 
        pushpophelper pph(lex, templateoptiontags, TO_END);
-       
+
        while (lex.isOK()) {
                switch (lex.lex()) {
                case TO_GUINAME:
                        lex.next(true);
                        guiName = lex.getString();
                        break;
        while (lex.isOK()) {
                switch (lex.lex()) {
                case TO_GUINAME:
                        lex.next(true);
                        guiName = lex.getString();
                        break;
-                       
+
                case TO_HELPTEXT:
                        helpText = lex.getLongString("HelpTextEnd");
                        break;
                case TO_HELPTEXT:
                        helpText = lex.getLongString("HelpTextEnd");
                        break;
-                       
+
                case TO_FILTER:
                        lex.next(true);
                        fileRegExp = lex.getString();
                        break;
                case TO_FILTER:
                        lex.next(true);
                        fileRegExp = lex.getString();
                        break;
-                       
+
                case TO_VIEWCMD:
                        lex.next(true);
                        viewCommand = lex.getString();
                        break;
                case TO_VIEWCMD:
                        lex.next(true);
                        viewCommand = lex.getString();
                        break;
-                       
+
                case TO_EDITCMD:
                        lex.next(true);
                        editCommand = lex.getString();
                        break;
                case TO_EDITCMD:
                        lex.next(true);
                        editCommand = lex.getString();
                        break;
-                       
+
                case TO_AUTOMATIC:
                        lex.next();
                        automaticProduction = lex.getBool();
                        break;
                case TO_AUTOMATIC:
                        lex.next();
                        automaticProduction = lex.getBool();
                        break;
-                       
+
                case TO_FORMAT:
                        lex.next(true);
                        formats[lex.getString()].readFormat(lex);
                        break;
                case TO_FORMAT:
                        lex.next(true);
                        formats[lex.getString()].readFormat(lex);
                        break;
-                       
+
                case TO_END:
                        return;
                case TO_END:
                        return;
-                       
+
                default:
                        lex.printError("ExternalTemplate::readTemplate: "
                                       "Wrong tag: $$Token");
                default:
                        lex.printError("ExternalTemplate::readTemplate: "
                                       "Wrong tag: $$Token");
@@ -257,7 +257,7 @@ void ExternalTemplate::readTemplate(LyXLex & lex)
 }
 
 
 }
 
 
-void ExternalTemplate::FormatTemplate::readFormat(LyXLex & lex) 
+void ExternalTemplate::FormatTemplate::readFormat(LyXLex & lex)
 {
        enum FormatTags {
                FO_PRODUCT = 1,
 {
        enum FormatTags {
                FO_PRODUCT = 1,
@@ -267,7 +267,7 @@ void ExternalTemplate::FormatTemplate::readFormat(LyXLex & lex)
                FO_PREAMBLE,
                FO_END
        };
                FO_PREAMBLE,
                FO_END
        };
-       
+
        keyword_item formattags[] = {
                { "formatend", FO_END },
                { "preamble", FO_PREAMBLE },
        keyword_item formattags[] = {
                { "formatend", FO_END },
                { "preamble", FO_PREAMBLE },
@@ -278,14 +278,14 @@ void ExternalTemplate::FormatTemplate::readFormat(LyXLex & lex)
        };
 
        pushpophelper pph(lex, formattags, FO_END);
        };
 
        pushpophelper pph(lex, formattags, FO_END);
-       
+
        while (lex.isOK()) {
                switch (lex.lex()) {
                case FO_PRODUCT:
                        lex.next(true);
                        product = lex.getString();
                        break;
        while (lex.isOK()) {
                switch (lex.lex()) {
                case FO_PRODUCT:
                        lex.next(true);
                        product = lex.getString();
                        break;
-                       
+
                case FO_UPDATECMD:
                        lex.next(true);
                        updateCommand = lex.getString();
                case FO_UPDATECMD:
                        lex.next(true);
                        updateCommand = lex.getString();
@@ -295,16 +295,16 @@ void ExternalTemplate::FormatTemplate::readFormat(LyXLex & lex)
                        lex.next(true);
                        updateResult = lex.getString();
                        break;
                        lex.next(true);
                        updateResult = lex.getString();
                        break;
-                       
+
                case FO_REQUIREMENT:
                        lex.next(true);
                        requirement = lex.getString();
                        break;
                case FO_REQUIREMENT:
                        lex.next(true);
                        requirement = lex.getString();
                        break;
-                       
+
                case FO_PREAMBLE:
                        preamble = lex.getLongString("preambleend");
                        break;
                case FO_PREAMBLE:
                        preamble = lex.getLongString("preambleend");
                        break;
-                       
+
                case FO_END:
                        if (lyxerr.debugging())
                                lex.printError("FormatEnd");
                case FO_END:
                        if (lyxerr.debugging())
                                lex.printError("FormatEnd");
@@ -312,4 +312,3 @@ void ExternalTemplate::FormatTemplate::readFormat(LyXLex & lex)
                }
        }
 }
                }
        }
 }
-
index 1b2831753df76046cd3d2d780ca91174b1f7a95d..91162912f2bc55d05b5d98af4ba12e212bd3fe52 100644 (file)
@@ -1,9 +1,9 @@
 // -*- C++ -*-
 /* This file is part of*
 // -*- C++ -*-
 /* This file is part of*
- * ====================================================== 
+ * ======================================================
  *
  *           LyX, The Document Processor
  *
  *           LyX, The Document Processor
- *      
+ *
  *           Copyright 1995 Matthias Ettrich
  *           Copyright 1995-2001 The LyX Team.
  *
  *           Copyright 1995 Matthias Ettrich
  *           Copyright 1995-2001 The LyX Team.
  *
@@ -64,10 +64,10 @@ struct ExternalTemplate {
        Formats formats;
        ///
        void dumpFormats(std::ostream &) const;
        Formats formats;
        ///
        void dumpFormats(std::ostream &) const;
-       
+
        /// We have to have default commands for safety reasons!
        ExternalTemplate();
        /// We have to have default commands for safety reasons!
        ExternalTemplate();
-               
+
 };
 
 
 };
 
 
@@ -82,7 +82,7 @@ public:
        static ExternalTemplateManager & get();
        Templates & getTemplates();
        Templates const & getTemplates() const;
        static ExternalTemplateManager & get();
        Templates & getTemplates();
        Templates const & getTemplates() const;
-       /// return the template by LyX name 
+       /// return the template by LyX name
        ExternalTemplate const & getTemplateByName(const string & name);
 private:
        ExternalTemplateManager();
        ExternalTemplate const & getTemplateByName(const string & name);
 private:
        ExternalTemplateManager();
index c8eba90eb3bfe80dd10e5e93b8149439b69f5a1c..c6ba6bf51eaf4439e836a44e48a22da90e2fa501 100644 (file)
@@ -1,8 +1,8 @@
 /* This file is part of
 /* This file is part of
- * ====================================================== 
- * 
+ * ======================================================
+ *
  *           LyX, The Document Processor
  *           LyX, The Document Processor
- *      
+ *
  *         Copyright 1995 Matthias Ettrich
  *          Copyright 1995-2001 The LyX Team.
  *
  *         Copyright 1995 Matthias Ettrich
  *          Copyright 1995-2001 The LyX Team.
  *
@@ -99,7 +99,7 @@ LyXFont const Inset::convertFont(LyXFont const & font) const
 #endif
 
 
 #endif
 
 
-string const Inset::editMessage() const 
+string const Inset::editMessage() const
 {
        return _("Opened inset");
 }
 {
        return _("Opened inset");
 }
@@ -251,7 +251,7 @@ void UpdatableInset::draw(BufferView *, LyXFont const &,
 void UpdatableInset::scroll(BufferView * bv, float s) const
 {
        LyXFont font;
 void UpdatableInset::scroll(BufferView * bv, float s) const
 {
        LyXFont font;
-       
+
        if (!s) {
                scx = 0;
                return;
        if (!s) {
                scx = 0;
                return;
@@ -259,8 +259,8 @@ void UpdatableInset::scroll(BufferView * bv, float s) const
 
        int const workW = bv->workWidth();
        int const tmp_top_x = top_x - scx;
 
        int const workW = bv->workWidth();
        int const tmp_top_x = top_x - scx;
-       
-       if (tmp_top_x > 0 && 
+
+       if (tmp_top_x > 0 &&
            (tmp_top_x + width(bv, font)) < workW)
                return;
        if (s > 0 && top_x > 0)
            (tmp_top_x + width(bv, font)) < workW)
                return;
        if (s > 0 && top_x > 0)
@@ -268,7 +268,7 @@ void UpdatableInset::scroll(BufferView * bv, float s) const
 
        // int mx_scx=abs((width(bv,font) - bv->workWidth())/2);
        //int const save_scx = scx;
 
        // int mx_scx=abs((width(bv,font) - bv->workWidth())/2);
        //int const save_scx = scx;
-    
+
        scx = int(s * workW / 2);
        // if (!display())
        // scx += 20;
        scx = int(s * workW / 2);
        // if (!display())
        // scx += 20;
@@ -295,7 +295,7 @@ void UpdatableInset::scroll(BufferView * bv, int offset) const
                if (!scx && (top_x + width(bv, font)) < (bv->workWidth() - 20))
                        return;
                if ((top_x - scx + offset + width(bv, font)) < (bv->workWidth() - 20)) {
                if (!scx && (top_x + width(bv, font)) < (bv->workWidth() - 20))
                        return;
                if ((top_x - scx + offset + width(bv, font)) < (bv->workWidth() - 20)) {
-                       scx = bv->workWidth() - width(bv, font) - top_x + scx - 20; 
+                       scx = bv->workWidth() - width(bv, font) - top_x + scx - 20;
                } else {
                        scx += offset;
                }
                } else {
                        scx += offset;
                }
@@ -306,8 +306,8 @@ void UpdatableInset::scroll(BufferView * bv, int offset) const
 
 ///  An updatable inset could handle lyx editing commands
 UpdatableInset::RESULT
 
 ///  An updatable inset could handle lyx editing commands
 UpdatableInset::RESULT
-UpdatableInset::localDispatch(BufferView * bv, 
-                             kb_action action, string const & arg) 
+UpdatableInset::localDispatch(BufferView * bv,
+                             kb_action action, string const & arg)
 {
        if (!arg.empty() && (action==LFUN_SCROLL_INSET)) {
                if (arg.find('.') != arg.npos) {
 {
        if (!arg.empty() && (action==LFUN_SCROLL_INSET)) {
                if (arg.find('.') != arg.npos) {
@@ -318,10 +318,10 @@ UpdatableInset::localDispatch(BufferView * bv,
                        scroll(bv, xx);
                }
                bv->updateInset(this, false);
                        scroll(bv, xx);
                }
                bv->updateInset(this, false);
-               
+
                return DISPATCHED;
        }
                return DISPATCHED;
        }
-       return UNDISPATCHED; 
+       return UNDISPATCHED;
 }
 
 
 }
 
 
@@ -375,7 +375,7 @@ string const UpdatableInset::selectNextWordToSpellcheck(BufferView *bv,
 
 
 bool UpdatableInset::searchForward(BufferView * bv, string const &,
 
 
 bool UpdatableInset::searchForward(BufferView * bv, string const &,
-                                   bool, bool)
+                                  bool, bool)
 {
        // we have to unlock ourself in this function by default!
        bv->unlockInset(const_cast<UpdatableInset *>(this));
 {
        // we have to unlock ourself in this function by default!
        bv->unlockInset(const_cast<UpdatableInset *>(this));
@@ -384,7 +384,7 @@ bool UpdatableInset::searchForward(BufferView * bv, string const &,
 
 
 bool UpdatableInset::searchBackward(BufferView * bv, string const &,
 
 
 bool UpdatableInset::searchBackward(BufferView * bv, string const &,
-                                    bool, bool)
+                                   bool, bool)
 {
        // we have to unlock ourself in this function by default!
        bv->unlockInset(const_cast<UpdatableInset *>(this));
 {
        // we have to unlock ourself in this function by default!
        bv->unlockInset(const_cast<UpdatableInset *>(this));
index bdbe36f19ff9f3780de9a27897627b6da98b1a56..9b0a4c5149107e14475793919eb618d2eed7a2b8 100644 (file)
@@ -1,9 +1,9 @@
 // -*- C++ -*-
 /* This file is part of
 // -*- C++ -*-
 /* This file is part of
- * ====================================================== 
- * 
+ * ======================================================
+ *
  *           LyX, The Document Processor
  *           LyX, The Document Processor
- *      
+ *
  *           Copyright 1995-2001 the LyX Team.
  *
  * ====================================================== */
  *           Copyright 1995-2001 the LyX Team.
  *
  * ====================================================== */
@@ -129,7 +129,7 @@ public:
                ///
                HIGHLY_EDITABLE
        };
                ///
                HIGHLY_EDITABLE
        };
-       
+
        ///
        Inset();
        ///
        ///
        Inset();
        ///
@@ -190,7 +190,7 @@ public:
                          bool free_spc) const = 0;
        ///
        virtual int ascii(Buffer const *,
                          bool free_spc) const = 0;
        ///
        virtual int ascii(Buffer const *,
-                         std::ostream &, int linelen = 0) const = 0;
+                         std::ostream &, int linelen = 0) const = 0;
        ///
        virtual int linuxdoc(Buffer const *, std::ostream &) const = 0;
        ///
        ///
        virtual int linuxdoc(Buffer const *, std::ostream &) const = 0;
        ///
@@ -199,17 +199,17 @@ public:
        virtual void validate(LaTeXFeatures & features) const;
        ///
        virtual bool deletable() const;
        virtual void validate(LaTeXFeatures & features) const;
        ///
        virtual bool deletable() const;
-       
+
        /// returns LyX code associated with the inset. Used for TOC, ...)
        virtual Inset::Code lyxCode() const { return NO_CODE; }
        /// returns LyX code associated with the inset. Used for TOC, ...)
        virtual Inset::Code lyxCode() const { return NO_CODE; }
-       
+
        virtual std::vector<string> const getLabelList() const {
                return std::vector<string>();
        }
 
        ///
        virtual Inset * clone(Buffer const &, bool same_ids = false) const = 0;
        virtual std::vector<string> const getLabelList() const {
                return std::vector<string>();
        }
 
        ///
        virtual Inset * clone(Buffer const &, bool same_ids = false) const = 0;
-       
+
        /// returns true to override begin and end inset in file
        virtual bool directWrite() const;
 
        /// returns true to override begin and end inset in file
        virtual bool directWrite() const;
 
@@ -298,7 +298,7 @@ public:
        virtual bool checkInsertChar(LyXFont &);
        /// we need this here because collapsed insets are only EDITABLE
        virtual void setFont(BufferView *, LyXFont const &,
        virtual bool checkInsertChar(LyXFont &);
        /// we need this here because collapsed insets are only EDITABLE
        virtual void setFont(BufferView *, LyXFont const &,
-                         bool toggleall = false, bool selectall = false);
+                        bool toggleall = false, bool selectall = false);
        ///
        // needed for spellchecking text
        ///
        ///
        // needed for spellchecking text
        ///
@@ -352,8 +352,8 @@ private:
 
 inline
 bool Inset::insetAllowed(Inset * in) const
 
 inline
 bool Inset::insetAllowed(Inset * in) const
-{ 
-       return insetAllowed(in->lyxCode()); 
+{
+       return insetAllowed(in->lyxCode());
 }
 
 
 }
 
 
@@ -366,26 +366,26 @@ bool Inset::checkInsertChar(LyXFont &)
 //  Updatable Insets. These insets can be locked and receive
 //  directly user interaction. Currently used only for mathed.
 //  Note that all pure methods from Inset class are pure here too.
 //  Updatable Insets. These insets can be locked and receive
 //  directly user interaction. Currently used only for mathed.
 //  Note that all pure methods from Inset class are pure here too.
-//  [Alejandro 080596] 
+//  [Alejandro 080596]
 
 /** Extracted from Matthias notes:
 
 /** Extracted from Matthias notes:
- * 
- * An inset can simple call LockInset in it's edit call and *ONLY* 
+ *
+ * An inset can simple call LockInset in it's edit call and *ONLY*
  * in it's edit call.
  *
  * in it's edit call.
  *
- * Unlocking is either done by LyX or the inset itself with a 
+ * Unlocking is either done by LyX or the inset itself with a
  * UnlockInset-call
  *
  * During the lock, all button and keyboard events will be modified
  * and send to the inset through the following inset-features. Note that
  * Inset::insetUnlock will be called from inside UnlockInset. It is meant
  * to contain the code for restoring the menus and things like this.
  * UnlockInset-call
  *
  * During the lock, all button and keyboard events will be modified
  * and send to the inset through the following inset-features. Note that
  * Inset::insetUnlock will be called from inside UnlockInset. It is meant
  * to contain the code for restoring the menus and things like this.
- * 
+ *
  * If a inset wishes any redraw and/or update it just has to call
  * updateInset(this).
  * If a inset wishes any redraw and/or update it just has to call
  * updateInset(this).
- * 
+ *
  * It's is completly irrelevant, where the inset is. UpdateInset will
  * It's is completly irrelevant, where the inset is. UpdateInset will
- * find it in any paragraph in any buffer. 
+ * find it in any paragraph in any buffer.
  * Of course the_locking_inset and the insets in the current paragraph/buffer
  *  are checked first, so no performance problem should occur.
  */
  * Of course the_locking_inset and the insets in the current paragraph/buffer
  *  are checked first, so no performance problem should occur.
  */
@@ -394,22 +394,22 @@ public:
        /** Dispatch result codes
            Now that nested updatable insets are allowed, the local dispatch
            becomes a bit complex, just two possible results (boolean)
        /** Dispatch result codes
            Now that nested updatable insets are allowed, the local dispatch
            becomes a bit complex, just two possible results (boolean)
-           are not enough. 
-        
+           are not enough.
+
            DISPATCHED          = the inset catched the action
            DISPATCHED_NOUPDATE = the inset catched the action and no update
            DISPATCHED          = the inset catched the action
            DISPATCHED_NOUPDATE = the inset catched the action and no update
-                                 is needed here to redraw the inset
+                                 is needed here to redraw the inset
            FINISHED            = the inset must be unlocked as a result
            FINISHED            = the inset must be unlocked as a result
-                                 of the action
+                                 of the action
            FINISHED_RIGHT      = FINISHED, but put the cursor to the RIGHT of
            FINISHED_RIGHT      = FINISHED, but put the cursor to the RIGHT of
-                                 the inset.
+                                 the inset.
            FINISHED_UP         = FINISHED, but put the cursor UP of
            FINISHED_UP         = FINISHED, but put the cursor UP of
-                                 the inset.
+                                 the inset.
            FINISHED_DOWN       = FINISHED, but put the cursor DOWN of
            FINISHED_DOWN       = FINISHED, but put the cursor DOWN of
-                                 the inset.
+                                 the inset.
            UNDISPATCHED        = the action was not catched, it should be
            UNDISPATCHED        = the action was not catched, it should be
-                                 dispatched by lower level insets
-       */ 
+                                 dispatched by lower level insets
+       */
        enum RESULT {
                UNDISPATCHED = 0,
                DISPATCHED,
        enum RESULT {
                UNDISPATCHED = 0,
                DISPATCHED,
@@ -419,7 +419,7 @@ public:
                FINISHED_UP,
                FINISHED_DOWN
        };
                FINISHED_UP,
                FINISHED_DOWN
        };
-    
+
        /// To convert old binary dispatch results
        RESULT DISPATCH_RESULT(bool b) {
                return b ? DISPATCHED : FINISHED;
        /// To convert old binary dispatch results
        RESULT DISPATCH_RESULT(bool b) {
                return b ? DISPATCHED : FINISHED;
@@ -435,7 +435,7 @@ public:
        virtual bool checkInsertChar(LyXFont &);
        ///
        virtual EDITABLE editable() const;
        virtual bool checkInsertChar(LyXFont &);
        ///
        virtual EDITABLE editable() const;
-       
+
        ///
        virtual void toggleInsetCursor(BufferView *);
        ///
        ///
        virtual void toggleInsetCursor(BufferView *);
        ///
@@ -454,7 +454,7 @@ public:
        // if that one has one!
        ///
        virtual bool insetButtonRelease(BufferView *,
        // if that one has one!
        ///
        virtual bool insetButtonRelease(BufferView *,
-                                       int x, int y, int button);
+                                       int x, int y, int button);
        ///
        virtual void insetKeyPress(XKeyEvent * ev);
        ///
        ///
        virtual void insetKeyPress(XKeyEvent * ev);
        ///
@@ -487,7 +487,7 @@ public:
                { return false; }
        ///
        virtual bool unlockInsetInInset(BufferView *, UpdatableInset *,
                { return false; }
        ///
        virtual bool unlockInsetInInset(BufferView *, UpdatableInset *,
-                                       bool /*lr*/ = false)
+                                       bool /*lr*/ = false)
                { return false; }
        ///  An updatable inset could handle lyx editing commands
        virtual RESULT localDispatch(BufferView *, kb_action, string const &);
                { return false; }
        ///  An updatable inset could handle lyx editing commands
        virtual RESULT localDispatch(BufferView *, kb_action, string const &);
@@ -526,11 +526,11 @@ public:
        // needed for search/replace functionality
        ///
        virtual bool searchForward(BufferView *, string const &,
        // needed for search/replace functionality
        ///
        virtual bool searchForward(BufferView *, string const &,
-                                  bool = true, bool = false);
+                                  bool = true, bool = false);
        ///
        virtual bool searchBackward(BufferView *, string const &,
        ///
        virtual bool searchBackward(BufferView *, string const &,
-                                   bool = true, bool = false);
-       
+                                   bool = true, bool = false);
+
 protected:
        ///
        void toggleCursorVisible() const {
 protected:
        ///
        void toggleCursorVisible() const {
@@ -564,9 +564,9 @@ bool UpdatableInset::checkInsertChar(LyXFont &)
  */
 inline bool isEditableInset(Inset * i)
 {
  */
 inline bool isEditableInset(Inset * i)
 {
-       return i && i->editable(); 
+       return i && i->editable();
 }
 }
+
 /**
  * returns true if pointer argument is valid
  * and points to a highly editable inset
 /**
  * returns true if pointer argument is valid
  * and points to a highly editable inset
index 03f020b745ab229dce07b2501f8aaaf4a0b1124f..481e8dfe545d7e57e246e32ab418043833f21abe 100644 (file)
@@ -12,7 +12,7 @@
 #include "lyxtext.h"
 #include "lyxrc.h"
 #include "font.h"
 #include "lyxtext.h"
 #include "lyxrc.h"
 #include "font.h"
-#include "LyXView.h" 
+#include "LyXView.h"
 #include "lyxtextclasslist.h"
 
 #include "frontends/Dialogs.h"
 #include "lyxtextclasslist.h"
 
 #include "frontends/Dialogs.h"
@@ -58,15 +58,15 @@ Inset * InsetBibKey::clone(Buffer const &, bool) const
 }
 
 
 }
 
 
-void InsetBibKey::setCounter(int c) 
-{ 
-       counter = c; 
+void InsetBibKey::setCounter(int c)
+{
+       counter = c;
 }
 
 
 // I'm sorry but this is still necessary because \bibitem is used also
 // as a LyX 2.x command, and lyxlex is not enough smart to understand
 }
 
 
 // I'm sorry but this is still necessary because \bibitem is used also
 // as a LyX 2.x command, and lyxlex is not enough smart to understand
-// real LaTeX commands. Yes, that could be fixed, but would be a waste 
+// real LaTeX commands. Yes, that could be fixed, but would be a waste
 // of time cause LyX3 won't use lyxlex anyway.  (ale)
 void InsetBibKey::write(Buffer const *, ostream & os) const
 {
 // of time cause LyX3 won't use lyxlex anyway.  (ale)
 void InsetBibKey::write(Buffer const *, ostream & os) const
 {
@@ -111,7 +111,7 @@ string const InsetBibKey::getScreenLabel(Buffer const *) const
 
 
 void InsetBibKey::edit(BufferView * bv, int, int, unsigned int)
 
 
 void InsetBibKey::edit(BufferView * bv, int, int, unsigned int)
-{ 
+{
        bv->owner()->getDialogs()->showBibitem(this);
 }
 
        bv->owner()->getDialogs()->showBibitem(this);
 }
 
@@ -159,7 +159,7 @@ int InsetBibtex::latex(Buffer const * buffer, ostream & os,
                }
        }
 
                }
        }
 
-       if (!buffer->niceFile 
+       if (!buffer->niceFile
            && IsFileReadable(MakeAbsPath(style, buffer->filePath()) + ".bst")) {
                style = MakeAbsPath(style, buffer->filePath());
        }
            && IsFileReadable(MakeAbsPath(style, buffer->filePath()) + ".bst")) {
                style = MakeAbsPath(style, buffer->filePath());
        }
@@ -169,7 +169,7 @@ int InsetBibtex::latex(Buffer const * buffer, ostream & os,
        }
 
        // bibtotoc-Option
        }
 
        // bibtotoc-Option
-        if (!bibtotoc.empty()) {
+       if (!bibtotoc.empty()) {
                // maybe a problem when a textclass has no "art" as
                // part of its name, because it's than book.
                // For the "official" lyx-layouts it's no problem to support
                // maybe a problem when a textclass has no "art" as
                // part of its name, because it's than book.
                // For the "official" lyx-layouts it's no problem to support
@@ -189,7 +189,7 @@ int InsetBibtex::latex(Buffer const * buffer, ostream & os,
 
                } else {
                        // article class
 
                } else {
                        // article class
-                       os << "\\addcontentsline{toc}{section}{\\refname}";     
+                       os << "\\addcontentsline{toc}{section}{\\refname}";
                }
        }
 
                }
        }
 
@@ -200,8 +200,8 @@ int InsetBibtex::latex(Buffer const * buffer, ostream & os,
        string db_out;
        while (!adb.empty()) {
                if (!buffer->niceFile &&
        string db_out;
        while (!adb.empty()) {
                if (!buffer->niceFile &&
-                   IsFileReadable(MakeAbsPath(adb, buffer->filePath())+".bib")) 
-                         adb = os::external_path(MakeAbsPath(adb, buffer->filePath()));
+                   IsFileReadable(MakeAbsPath(adb, buffer->filePath())+".bib"))
+                        adb = os::external_path(MakeAbsPath(adb, buffer->filePath()));
                db_out += adb;
                db_out += ',';
                db_in= split(db_in, adb,',');
                db_out += adb;
                db_out += ',';
                db_in= split(db_in, adb,',');
@@ -229,9 +229,9 @@ vector<string> const InsetBibtex::getFiles(Buffer const & buffer) const
                // If we didn't find a matching file name just fail silently
                if (!file.empty())
                        vec.push_back(file);
                // If we didn't find a matching file name just fail silently
                if (!file.empty())
                        vec.push_back(file);
-               
+
                // Get next file name
                // Get next file name
-               bibfiles = split(bibfiles, tmp, ',');
+               bibfiles = split(bibfiles, tmp, ',');
        }
 
        return vec;
        }
 
        return vec;
@@ -273,7 +273,7 @@ vector<pair<string, string> > const InsetBibtex::getKeys(Buffer const * buffer)
                        }
                }
        }
                        }
                }
        }
-       return keys;
+       return keys;
 }
 
 
 }
 
 
@@ -293,7 +293,7 @@ bool InsetBibtex::addDatabase(string const & db)
 {
        string contents(getContents());
        if (!contains(contents, db)) {
 {
        string contents(getContents());
        if (!contains(contents, db)) {
-               if (!contents.empty()) 
+               if (!contents.empty())
                        contents += ",";
                setContents(contents + db);
                return true;
                        contents += ",";
                setContents(contents + db);
                return true;
@@ -314,7 +314,7 @@ bool InsetBibtex::delDatabase(string const & db)
                        setContents(subst(getContents(), tmp, ", "));
                } else if (n == 0)
                        setContents(split(getContents(), bd, ','));
                        setContents(subst(getContents(), tmp, ", "));
                } else if (n == 0)
                        setContents(split(getContents(), bd, ','));
-               else 
+               else
                        return false;
        }
        return true;
                        return false;
        }
        return true;
@@ -328,7 +328,7 @@ int bibitemMaxWidth(BufferView * bv, LyXFont const & font)
        // Ha, now we are mainly at 1.2.0 and it is still here (Jug)
        // Does look like a hack? It is! (but will change at 0.13)
        Paragraph * par = bv->buffer()->paragraph;
        // Ha, now we are mainly at 1.2.0 and it is still here (Jug)
        // Does look like a hack? It is! (but will change at 0.13)
        Paragraph * par = bv->buffer()->paragraph;
-    
+
        while (par) {
                if (par->bibkey) {
                        int const wx = par->bibkey->width(bv, font);
        while (par) {
                if (par->bibkey) {
                        int const wx = par->bibkey->width(bv, font);
@@ -348,7 +348,7 @@ string const bibitemWidest(Buffer const * buffer)
        Paragraph * par = buffer->paragraph;
        InsetBibKey * bkey = 0;
        LyXFont font;
        Paragraph * par = buffer->paragraph;
        InsetBibKey * bkey = 0;
        LyXFont font;
-      
+
        while (par) {
                if (par->bibkey) {
                        int const wx =
        while (par) {
                if (par->bibkey) {
                        int const wx =
@@ -361,9 +361,9 @@ string const bibitemWidest(Buffer const * buffer)
                }
                par = par->next();
        }
                }
                par = par->next();
        }
-    
+
        if (bkey && !bkey->getBibLabel().empty())
                return bkey->getBibLabel();
        if (bkey && !bkey->getBibLabel().empty())
                return bkey->getBibLabel();
-    
+
        return "99";
 }
        return "99";
 }
index e51b236deaf9dfa610932c7067697f6cad72947f..e1de692e35a98fd826d427cfdabd1e0d47e1fcef 100644 (file)
@@ -1,12 +1,12 @@
 // -*- C++ -*-
 /* This file is part of*
 // -*- C++ -*-
 /* This file is part of*
- * ====================================================== 
+ * ======================================================
  *
  *           LyX, The Document Processor
  *
  *           LyX, The Document Processor
- *      
+ *
  *           Copyright 1995 Matthias Ettrich
  *           Copyright 1995-2001 The LyX Team.
  *           Copyright 1995 Matthias Ettrich
  *           Copyright 1995-2001 The LyX Team.
- * 
+ *
  * ====================================================== */
 
 #ifndef INSET_BIB_H
  * ====================================================== */
 
 #ifndef INSET_BIB_H
@@ -22,9 +22,9 @@
 class Buffer;
 
 /** Used to insert bibitem's information (key and label)
 class Buffer;
 
 /** Used to insert bibitem's information (key and label)
-  
+
   Must be automatically inserted as the first object in a
   Must be automatically inserted as the first object in a
-  bibliography paragraph. 
+  bibliography paragraph.
   */
 class InsetBibKey : public InsetCommand {
 public:
   */
 class InsetBibKey : public InsetCommand {
 public:
@@ -47,7 +47,7 @@ public:
        ///
        void edit(BufferView * bv, bool front = true);
        ///
        ///
        void edit(BufferView * bv, bool front = true);
        ///
-       EDITABLE editable() const { return IS_EDITABLE; } 
+       EDITABLE editable() const { return IS_EDITABLE; }
        /// A user can't neither insert nor delete this inset
        bool deletable() const {
                return false;
        /// A user can't neither insert nor delete this inset
        bool deletable() const {
                return false;
@@ -63,7 +63,7 @@ public:
                InsetBibKey * inset;
                BufferView * view;
        };
                InsetBibKey * inset;
                BufferView * view;
        };
+
 private:
        ///
        int counter;
 private:
        ///
        int counter;
@@ -74,7 +74,7 @@ private:
 };
 
 
 };
 
 
-/** Used to insert BibTeX's information 
+/** Used to insert BibTeX's information
   */
 class InsetBibtex : public InsetCommand {
 public:
   */
 class InsetBibtex : public InsetCommand {
 public:
@@ -96,9 +96,9 @@ public:
        void edit(BufferView *, int x, int y, unsigned int button);
        ///
        void edit(BufferView * bv, bool front = true);
        void edit(BufferView *, int x, int y, unsigned int button);
        ///
        void edit(BufferView * bv, bool front = true);
-       /// 
+       ///
        int latex(Buffer const *, std::ostream &,
        int latex(Buffer const *, std::ostream &,
-                 bool fragile, bool freespace) const;
+                 bool fragile, bool freespace) const;
        ///
        std::vector<std::pair<string,string> > const getKeys(Buffer const *) const;
        ///
        ///
        std::vector<std::pair<string,string> > const getKeys(Buffer const *) const;
        ///
@@ -108,9 +108,9 @@ public:
        ///
        bool delDatabase(string const &);
        ///
        ///
        bool delDatabase(string const &);
        ///
-       bool display() const { return true; } 
+       bool display() const { return true; }
        ///
        ///
-       struct Holder {
+       struct Holder {
                InsetBibtex * inset;
                BufferView * view;
        };
                InsetBibtex * inset;
                BufferView * view;
        };
index b171dc91012285ed9dea6f930bd58abfe237ddad..52cdd300255fa5bd5f7ccb191b1958398337fd13 100644 (file)
@@ -1,8 +1,8 @@
 /* This file is part of
  * ======================================================
 /* This file is part of
  * ======================================================
- * 
+ *
  *           LyX, The Document Processor
  *           LyX, The Document Processor
- *      
+ *
  *         Copyright 1995 Matthias Ettrich
  *          Copyright 2000-2001 The LyX Team.
  *
  *         Copyright 1995 Matthias Ettrich
  *          Copyright 2000-2001 The LyX Team.
  *
@@ -29,16 +29,16 @@ using std::endl;
 int InsetButton::ascent(BufferView * bv, LyXFont const &) const
 {
        lyx::Assert(bv);
 int InsetButton::ascent(BufferView * bv, LyXFont const &) const
 {
        lyx::Assert(bv);
-       
+
        LyXFont font(LyXFont::ALL_SANE);
        font.decSize();
        LyXFont font(LyXFont::ALL_SANE);
        font.decSize();
-       
+
        int width;
        int ascent;
        int descent;
        int width;
        int ascent;
        int descent;
-        string const s = getScreenLabel(bv->buffer());
+       string const s = getScreenLabel(bv->buffer());
 
 
-        if (editable()) {
+       if (editable()) {
                lyxfont::buttonText(s, font, width, ascent, descent);
        } else {
                lyxfont::rectText(s, font, width, ascent, descent);
                lyxfont::buttonText(s, font, width, ascent, descent);
        } else {
                lyxfont::rectText(s, font, width, ascent, descent);
@@ -51,16 +51,16 @@ int InsetButton::ascent(BufferView * bv, LyXFont const &) const
 int InsetButton::descent(BufferView * bv, LyXFont const &) const
 {
        lyx::Assert(bv);
 int InsetButton::descent(BufferView * bv, LyXFont const &) const
 {
        lyx::Assert(bv);
-       
+
        LyXFont font(LyXFont::ALL_SANE);
        font.decSize();
        LyXFont font(LyXFont::ALL_SANE);
        font.decSize();
-       
+
        int width;
        int ascent;
        int descent;
        int width;
        int ascent;
        int descent;
-        string const s = getScreenLabel(bv->buffer());
+       string const s = getScreenLabel(bv->buffer());
 
 
-        if (editable()) {
+       if (editable()) {
                lyxfont::buttonText(s, font, width, ascent, descent);
        } else {
                lyxfont::rectText(s, font, width, ascent, descent);
                lyxfont::buttonText(s, font, width, ascent, descent);
        } else {
                lyxfont::rectText(s, font, width, ascent, descent);
@@ -76,13 +76,13 @@ int InsetButton::width(BufferView * bv, LyXFont const &) const
 
        LyXFont font(LyXFont::ALL_SANE);
        font.decSize();
 
        LyXFont font(LyXFont::ALL_SANE);
        font.decSize();
-       
+
        int width;
        int ascent;
        int descent;
        int width;
        int ascent;
        int descent;
-        string const s = getScreenLabel(bv->buffer());
+       string const s = getScreenLabel(bv->buffer());
 
 
-        if (editable()) {
+       if (editable()) {
                lyxfont::buttonText(s, font, width, ascent, descent);
        } else {
                lyxfont::rectText(s, font, width, ascent, descent);
                lyxfont::buttonText(s, font, width, ascent, descent);
        } else {
                lyxfont::rectText(s, font, width, ascent, descent);
@@ -96,7 +96,7 @@ void InsetButton::draw(BufferView * bv, LyXFont const &,
                        int baseline, float & x, bool) const
 {
        lyx::Assert(bv);
                        int baseline, float & x, bool) const
 {
        lyx::Assert(bv);
-       
+
        Painter & pain = bv->painter();
        // Draw it as a box with the LaTeX text
        LyXFont font(LyXFont::ALL_SANE);
        Painter & pain = bv->painter();
        // Draw it as a box with the LaTeX text
        LyXFont font(LyXFont::ALL_SANE);
index 26e2952e713c7d74d21f9899f526a3b17ce7a9ae..5a9c17e1d8bcf17f02db6a03d88937e66583d4b8 100644 (file)
@@ -1,9 +1,9 @@
 // -*- C++ -*-
 /* This file is part of*
 // -*- C++ -*-
 /* This file is part of*
- * ====================================================== 
+ * ======================================================
  *
  *           LyX, The Document Processor
  *
  *           LyX, The Document Processor
- *      
+ *
  *           Copyright 1995 Matthias Ettrich
  *           Copyright 2000-2001 The LyX Team.
  *
  *           Copyright 1995 Matthias Ettrich
  *           Copyright 2000-2001 The LyX Team.
  *
index 1b9a601ce21577b6b5a2480433891c6a6ecbbba8..1414e2d438de57ba91e6e87124a644a21b5331c3 100644 (file)
@@ -1,8 +1,8 @@
 /* This file is part of
  * ======================================================
 /* This file is part of
  * ======================================================
- * 
+ *
  *           LyX, The Document Processor
  *           LyX, The Document Processor
- *      
+ *
  *          Copyright 2000-2001 The LyX Team.
  *
  * ======================================================
  *          Copyright 2000-2001 The LyX Team.
  *
  * ======================================================
@@ -59,7 +59,7 @@ void InsetCaption::read(Buffer const * buf, LyXLex & lex)
 }
 
 
 }
 
 
-string const InsetCaption::editMessage() const 
+string const InsetCaption::editMessage() const
 {
        return _("Opened Caption Inset");
 }
 {
        return _("Opened Caption Inset");
 }
@@ -87,7 +87,7 @@ void InsetCaption::draw(BufferView * bv, LyXFont const & f,
 
        // Generate the label
        string const label = _(fl) + " " + num + ":";
 
        // Generate the label
        string const label = _(fl) + " " + num + ":";
-       
+
        Painter & pain = bv->painter();
        int const w = lyxfont::width(label, f);
        pain.text(int(x), baseline, label, f);
        Painter & pain = bv->painter();
        int const w = lyxfont::width(label, f);
        pain.text(int(x), baseline, label, f);
index b97789eb52d729c92a0bd800ed9108e963333bc8..35da0d33cd6728cb0b833edb2bd11d3a5283a203 100644 (file)
@@ -1,7 +1,7 @@
 // -*- C++ -*-
 /* This file is part of
  * ======================================================
 // -*- C++ -*-
 /* This file is part of
  * ======================================================
- * 
+ *
  *           LyX, The Document Processor
  *
  *           Copyright 2000-2001 The LyX Team.
  *           LyX, The Document Processor
  *
  *           Copyright 2000-2001 The LyX Team.
@@ -68,14 +68,14 @@ bool InsetCaption::display() const
 
 
 inline
 
 
 inline
-bool InsetCaption::needFullRow() const 
+bool InsetCaption::needFullRow() const
 {
        return true;
 }
 
 
 inline
 {
        return true;
 }
 
 
 inline
-Inset::Code InsetCaption::lyxCode() const 
+Inset::Code InsetCaption::lyxCode() const
 {
        return CAPTION_CODE;
 }
 {
        return CAPTION_CODE;
 }
index 6eedb6df8ccf46d8bf539f5fe5370078359b374f..df1dddd80380ad9b4c8e4cff9d85ef3efcd84758 100644 (file)
@@ -1,10 +1,10 @@
 /* This file is part of*
 /* This file is part of*
- * ====================================================== 
+ * ======================================================
  *
  *           LyX, The Document Processor
  *
  *           LyX, The Document Processor
- *      
+ *
  *           Copyright 2000-2001 The LyX Team.
  *           Copyright 2000-2001 The LyX Team.
- * 
+ *
  * ====================================================== */
 
 #include <config.h>
  * ====================================================== */
 
 #include <config.h>
@@ -76,8 +76,8 @@ void InsetCitation::edit(BufferView * bv, bool)
 
 int InsetCitation::ascii(Buffer const *, ostream & os, int) const
 {
 
 int InsetCitation::ascii(Buffer const *, ostream & os, int) const
 {
-        os << "[" << getContents() << "]";
-        return 0;
+       os << "[" << getContents() << "]";
+       return 0;
 }
 
 // Have to overwrite the default InsetCommand method in order to check that
 }
 
 // Have to overwrite the default InsetCommand method in order to check that
@@ -102,7 +102,7 @@ int InsetCitation::latex(Buffer const * buffer, ostream & os,
             it != getContents().end(); ++it) {
                if (*it != ' ') content += *it;
        }
             it != getContents().end(); ++it) {
                if (*it != ' ') content += *it;
        }
-       
+
        os << "{" << content << "}";
 
        return 0;
        os << "{" << content << "}";
 
        return 0;
index efa21fd17883dfb5f3e2f1af2832cfc058d81b39..d48d88e414f5694f9e5c7d501e9470c561bc00be 100644 (file)
@@ -1,11 +1,11 @@
 // -*- C++ -*-
 /* This file is part of*
 // -*- C++ -*-
 /* This file is part of*
- * ====================================================== 
+ * ======================================================
  *
  *           LyX, The Document Processor
  *
  *           LyX, The Document Processor
- *      
+ *
  *           Copyright 2000-2001 The LyX Team.
  *           Copyright 2000-2001 The LyX Team.
- * 
+ *
  * ====================================================== */
 
 #ifndef INSET_CITE_H
  * ====================================================== */
 
 #ifndef INSET_CITE_H
@@ -17,7 +17,7 @@
 
 #include "insetcommand.h"
 
 
 #include "insetcommand.h"
 
-/** Used to insert citations  
+/** Used to insert citations
  */
 class InsetCitation : public InsetCommand {
 public:
  */
 class InsetCitation : public InsetCommand {
 public:
@@ -39,7 +39,7 @@ public:
        void edit(BufferView * bv, bool front = true);
        ///
        int ascii(Buffer const *, std::ostream &, int linelen) const;
        void edit(BufferView * bv, bool front = true);
        ///
        int ascii(Buffer const *, std::ostream &, int linelen) const;
-        ///
+       ///
        int latex(Buffer const *, std::ostream &, bool, bool) const;
        ///
        void validate(LaTeXFeatures &) const;
        int latex(Buffer const *, std::ostream &, bool, bool) const;
        ///
        void validate(LaTeXFeatures &) const;
index daa76e4db81402705cd7e8f3d83fdb3e4243f88e..53e97c3f4204a38023d39ba4dfed43677d9dc15c 100644 (file)
@@ -1,8 +1,8 @@
 /* This file is part of
  * ======================================================
 /* This file is part of
  * ======================================================
- * 
+ *
  *           LyX, The Document Processor
  *           LyX, The Document Processor
- *      
+ *
  *          Copyright 1998-2001 The LyX Team.
  *
  * ======================================================
  *          Copyright 1998-2001 The LyX Team.
  *
  * ======================================================
@@ -147,7 +147,7 @@ int InsetCollapsable::ascent(BufferView * /*bv*/, LyXFont const &) const
 
 int InsetCollapsable::descent(BufferView * bv, LyXFont const & font) const
 {
 
 int InsetCollapsable::descent(BufferView * bv, LyXFont const & font) const
 {
-       if (collapsed_) 
+       if (collapsed_)
                return descent_collapsed();
 
        return descent_collapsed()
                return descent_collapsed();
 
        return descent_collapsed()
@@ -159,7 +159,7 @@ int InsetCollapsable::descent(BufferView * bv, LyXFont const & font) const
 
 int InsetCollapsable::width(BufferView * bv, LyXFont const & font) const
 {
 
 int InsetCollapsable::width(BufferView * bv, LyXFont const & font) const
 {
-       if (collapsed_) 
+       if (collapsed_)
                return width_collapsed();
 
        int widthCollapsed = width_collapsed();
                return width_collapsed();
 
        int widthCollapsed = width_collapsed();
@@ -178,8 +178,8 @@ void InsetCollapsable::draw_collapsed(Painter & pain,
 }
 
 
 }
 
 
-void InsetCollapsable::draw(BufferView * bv, LyXFont const & f, 
-                            int baseline, float & x, bool cleared) const
+void InsetCollapsable::draw(BufferView * bv, LyXFont const & f,
+                           int baseline, float & x, bool cleared) const
 {
        if (need_update != NONE) {
                const_cast<InsetText *>(&inset)->update(bv, f, true);
 {
        if (need_update != NONE) {
                const_cast<InsetText *>(&inset)->update(bv, f, true);
@@ -208,9 +208,9 @@ void InsetCollapsable::draw(BufferView * bv, LyXFont const & f,
                x += static_cast<float>(scroll());
 
        if (!cleared && (inset.need_update == InsetText::FULL ||
                x += static_cast<float>(scroll());
 
        if (!cleared && (inset.need_update == InsetText::FULL ||
-                        inset.need_update == InsetText::INIT ||
-                        top_x != int(x) ||
-                        top_baseline != baseline))
+                        inset.need_update == InsetText::INIT ||
+                        top_x != int(x) ||
+                        top_baseline != baseline))
        {
                // we don't need anymore to clear here we just have to tell
                // the underlying LyXText that it should do the RowClear!
        {
                // we don't need anymore to clear here we just have to tell
                // the underlying LyXText that it should do the RowClear!
@@ -224,9 +224,9 @@ void InsetCollapsable::draw(BufferView * bv, LyXFont const & f,
        top_baseline = baseline;
 
        int const bl = baseline - ascent(bv, f) + ascent_collapsed();
        top_baseline = baseline;
 
        int const bl = baseline - ascent(bv, f) + ascent_collapsed();
-       
+
        draw_collapsed(pain, bl, old_x);
        draw_collapsed(pain, bl, old_x);
-       inset.draw(bv, f, 
+       inset.draw(bv, f,
                           bl + descent_collapsed() + inset.ascent(bv, f),
                           x, cleared);
        if (x < (top_x + button_length + TEXT_TO_INSET_OFFSET))
                           bl + descent_collapsed() + inset.ascent(bv, f),
                           x, cleared);
        if (x < (top_x + button_length + TEXT_TO_INSET_OFFSET))
@@ -235,7 +235,7 @@ void InsetCollapsable::draw(BufferView * bv, LyXFont const & f,
 
 
 void InsetCollapsable::edit(BufferView * bv, int xp, int yp,
 
 
 void InsetCollapsable::edit(BufferView * bv, int xp, int yp,
-                            unsigned int button)
+                           unsigned int button)
 {
        UpdatableInset::edit(bv, xp, yp, button);
 
 {
        UpdatableInset::edit(bv, xp, yp, button);
 
@@ -313,7 +313,7 @@ void InsetCollapsable::insetUnlock(BufferView * bv)
 
 
 void InsetCollapsable::insetButtonPress(BufferView * bv,
 
 
 void InsetCollapsable::insetButtonPress(BufferView * bv,
-                                        int x, int y, int button)
+                                       int x, int y, int button)
 {
        if (!collapsed_ && (y > button_bottom_y)) {
                LyXFont font(LyXFont::ALL_SANE);
 {
        if (!collapsed_ && (y > button_bottom_y)) {
                LyXFont font(LyXFont::ALL_SANE);
@@ -327,7 +327,7 @@ void InsetCollapsable::insetButtonPress(BufferView * bv,
 
 
 bool InsetCollapsable::insetButtonRelease(BufferView * bv,
 
 
 bool InsetCollapsable::insetButtonRelease(BufferView * bv,
-                                          int x, int y, int button)
+                                         int x, int y, int button)
 {
        bool ret = false;
        if ((button != 3) && (x >= 0)  && (x < button_length) &&
 {
        bool ret = false;
        if ((button != 3) && (x >= 0)  && (x < button_length) &&
@@ -360,7 +360,7 @@ bool InsetCollapsable::insetButtonRelease(BufferView * bv,
 
 
 void InsetCollapsable::insetMotionNotify(BufferView * bv,
 
 
 void InsetCollapsable::insetMotionNotify(BufferView * bv,
-                                         int x, int y, int state)
+                                        int x, int y, int state)
 {
        if (y > button_bottom_y) {
                LyXFont font(LyXFont::ALL_SANE);
 {
        if (y > button_bottom_y) {
                LyXFont font(LyXFont::ALL_SANE);
@@ -380,7 +380,7 @@ void InsetCollapsable::insetKeyPress(XKeyEvent * xke)
 
 
 int InsetCollapsable::latex(Buffer const * buf, ostream & os,
 
 
 int InsetCollapsable::latex(Buffer const * buf, ostream & os,
-                            bool fragile, bool free_spc) const
+                           bool fragile, bool free_spc) const
 {
        return inset.latex(buf, os, fragile, free_spc);
 }
 {
        return inset.latex(buf, os, fragile, free_spc);
 }
@@ -405,7 +405,7 @@ int InsetCollapsable::docbook(Buffer const * buf, ostream & os) const
 
 #if 0
 int InsetCollapsable::getMaxWidth(BufferView * bv,
 
 #if 0
 int InsetCollapsable::getMaxWidth(BufferView * bv,
-                                  UpdatableInset const * in) const
+                                 UpdatableInset const * in) const
 {
 #if 0
        int const w = UpdatableInset::getMaxWidth(bv, in);
 {
 #if 0
        int const w = UpdatableInset::getMaxWidth(bv, in);
@@ -425,7 +425,7 @@ int InsetCollapsable::getMaxWidth(BufferView * bv,
 
 
 void InsetCollapsable::update(BufferView * bv, LyXFont const & font,
 
 
 void InsetCollapsable::update(BufferView * bv, LyXFont const & font,
-                              bool reinit)
+                             bool reinit)
 {
        if (in_update) {
                if (reinit && owner()) {
 {
        if (in_update) {
                if (reinit && owner()) {
@@ -444,7 +444,7 @@ void InsetCollapsable::update(BufferView * bv, LyXFont const & font,
 
 UpdatableInset::RESULT
 InsetCollapsable::localDispatch(BufferView * bv, kb_action action,
 
 UpdatableInset::RESULT
 InsetCollapsable::localDispatch(BufferView * bv, kb_action action,
-                                string const & arg)
+                               string const & arg)
 {
        UpdatableInset::RESULT result = inset.localDispatch(bv, action, arg);
        if (result >= FINISHED)
 {
        UpdatableInset::RESULT result = inset.localDispatch(bv, action, arg);
        if (result >= FINISHED)
@@ -463,7 +463,7 @@ bool InsetCollapsable::lockInsetInInset(BufferView * bv, UpdatableInset * in)
 
 
 bool InsetCollapsable::unlockInsetInInset(BufferView * bv, UpdatableInset * in,
 
 
 bool InsetCollapsable::unlockInsetInInset(BufferView * bv, UpdatableInset * in,
-                                          bool lr)
+                                         bool lr)
 {
        if (&inset == in) {
                bv->unlockInset(this);
 {
        if (&inset == in) {
                bv->unlockInset(this);
@@ -535,7 +535,7 @@ UpdatableInset * InsetCollapsable::getFirstLockingInsetOfType(Inset::Code c)
 
 
 void InsetCollapsable::setFont(BufferView * bv, LyXFont const & font,
 
 
 void InsetCollapsable::setFont(BufferView * bv, LyXFont const & font,
-                               bool toggleall, bool selectall)
+                              bool toggleall, bool selectall)
 {
        inset.setFont(bv, font, toggleall, selectall);
 }
 {
        inset.setFont(bv, font, toggleall, selectall);
 }
@@ -579,7 +579,7 @@ bool InsetCollapsable::nodraw() const
        return inset.nodraw();
 }
 
        return inset.nodraw();
 }
 
+
 int InsetCollapsable::scroll(bool recursive) const
 {
        int sx = UpdatableInset::scroll(false);
 int InsetCollapsable::scroll(bool recursive) const
 {
        int sx = UpdatableInset::scroll(false);
@@ -627,7 +627,7 @@ Inset * InsetCollapsable::getInsetFromID(int id_arg) const
 void InsetCollapsable::open(BufferView * bv)
 {
        if (!collapsed_) return;
 void InsetCollapsable::open(BufferView * bv)
 {
        if (!collapsed_) return;
-       
+
        collapsed_ = false;
        bv->updateInset(this, false);
 }
        collapsed_ = false;
        bv->updateInset(this, false);
 }
@@ -637,7 +637,7 @@ void InsetCollapsable::close(BufferView * bv) const
 {
        if (collapsed_)
                return;
 {
        if (collapsed_)
                return;
-       
+
        collapsed_ = true;
        bv->updateInset(const_cast<InsetCollapsable *>(this), false);
 }
        collapsed_ = true;
        bv->updateInset(const_cast<InsetCollapsable *>(this), false);
 }
@@ -650,7 +650,7 @@ void InsetCollapsable::setLabel(string const & l) const
 
 
 bool InsetCollapsable::searchForward(BufferView * bv, string const & str,
 
 
 bool InsetCollapsable::searchForward(BufferView * bv, string const & str,
-                                     bool cs, bool mw)
+                                    bool cs, bool mw)
 {
        bool found = inset.searchForward(bv, str, cs, mw);
        if (first_after_edit && !found)
 {
        bool found = inset.searchForward(bv, str, cs, mw);
        if (first_after_edit && !found)
@@ -661,7 +661,7 @@ bool InsetCollapsable::searchForward(BufferView * bv, string const & str,
 
 
 bool InsetCollapsable::searchBackward(BufferView * bv, string const & str,
 
 
 bool InsetCollapsable::searchBackward(BufferView * bv, string const & str,
-                                      bool cs, bool mw)
+                                     bool cs, bool mw)
 {
        bool found = inset.searchBackward(bv, str, cs, mw);
        if (first_after_edit && !found)
 {
        bool found = inset.searchBackward(bv, str, cs, mw);
        if (first_after_edit && !found)
index 5af2ce5eda6ae0ebab2a94a195b63f060633321e..d76ff261586695d17ba983d1b4bab1a7e7d1b0a2 100644 (file)
@@ -1,7 +1,7 @@
 // -*- C++ -*-
 /* This file is part of
  * ======================================================
 // -*- C++ -*-
 /* This file is part of
  * ======================================================
- * 
+ *
  *           LyX, The Document Processor
  *
  *           Copyright 2000-2001 The LyX Team.
  *           LyX, The Document Processor
  *
  *           Copyright 2000-2001 The LyX Team.
@@ -28,7 +28,7 @@ class Paragraph;
 class LyXCursor;
 
 /** A collapsable text inset
 class LyXCursor;
 
 /** A collapsable text inset
-  
+
 */
 class InsetCollapsable : public UpdatableInset {
 public:
 */
 class InsetCollapsable : public UpdatableInset {
 public:
@@ -58,7 +58,7 @@ public:
        ///
        void draw(BufferView *, const LyXFont &, int , float &, bool) const;
        ///
        ///
        void draw(BufferView *, const LyXFont &, int , float &, bool) const;
        ///
-       void update(BufferView *, LyXFont const &, bool =false); 
+       void update(BufferView *, LyXFont const &, bool =false);
        ///
        void edit(BufferView *, int, int, unsigned int);
        ///
        ///
        void edit(BufferView *, int, int, unsigned int);
        ///
@@ -83,7 +83,7 @@ public:
        bool lockInsetInInset(BufferView *, UpdatableInset *);
        ///
        bool unlockInsetInInset(BufferView *, UpdatableInset *,
        bool lockInsetInInset(BufferView *, UpdatableInset *);
        ///
        bool unlockInsetInInset(BufferView *, UpdatableInset *,
-                               bool lr = false);
+                               bool lr = false);
        ///
        bool updateInsetInInset(BufferView *, Inset *);
        ///
        ///
        bool updateInsetInInset(BufferView *, Inset *);
        ///
@@ -98,7 +98,7 @@ public:
        void insetKeyPress(XKeyEvent *);
        ///
        UpdatableInset::RESULT localDispatch(BufferView *, kb_action,
        void insetKeyPress(XKeyEvent *);
        ///
        UpdatableInset::RESULT localDispatch(BufferView *, kb_action,
-                                            string const &);
+                                            string const &);
        ///
        int latex(Buffer const *, std::ostream &,
                  bool fragile, bool free_spc) const;
        ///
        int latex(Buffer const *, std::ostream &,
                  bool fragile, bool free_spc) const;
@@ -127,7 +127,7 @@ public:
        UpdatableInset * getFirstLockingInsetOfType(Inset::Code);
        ///
        void setFont(BufferView *, LyXFont const &, bool toggleall = false,
        UpdatableInset * getFirstLockingInsetOfType(Inset::Code);
        ///
        void setFont(BufferView *, LyXFont const &, bool toggleall = false,
-                 bool selectall = false);
+                bool selectall = false);
        ///
        void setLabel(string const & l) const;
        ///
        ///
        void setLabel(string const & l) const;
        ///
@@ -188,9 +188,9 @@ public:
        }
        ///
        bool searchForward(BufferView * bv, string const & str,
        }
        ///
        bool searchForward(BufferView * bv, string const & str,
-                          bool = true, bool = false);
+                          bool = true, bool = false);
        bool searchBackward(BufferView * bv, string const & str,
        bool searchBackward(BufferView * bv, string const & str,
-                           bool = true, bool = false);
+                           bool = true, bool = false);
 
 protected:
        ///
 
 protected:
        ///
@@ -203,7 +203,7 @@ protected:
        void draw_collapsed(Painter & pain, int , float &) const;
        ///
        int getMaxTextWidth(Painter & pain, UpdatableInset const *) const;
        void draw_collapsed(Painter & pain, int , float &) const;
        ///
        int getMaxTextWidth(Painter & pain, UpdatableInset const *) const;
-       
+
        ///
        mutable bool collapsed_;
        ///
        ///
        mutable bool collapsed_;
        ///
index a5d2f391c5d230700939757af3c76fd4282d4bdd..8c64fd76e5dd211c4f859bc9e4bc4506b0147fa4 100644 (file)
@@ -1,8 +1,8 @@
 /* This file is part of
  * ======================================================
 /* This file is part of
  * ======================================================
- * 
+ *
  *           LyX, The Document Processor
  *           LyX, The Document Processor
- *      
+ *
  *         Copyright 1995 Matthias Ettrich
  *          Copyright 1995-2001 The LyX Team.
  *
  *         Copyright 1995 Matthias Ettrich
  *          Copyright 1995-2001 The LyX Team.
  *
@@ -84,7 +84,7 @@ void InsetCommandParams::scanCommand(string const & cmd)
        if (cmd.empty()) return;
 
        enum { WS, CMDNAME, OPTION, CONTENT } state = WS;
        if (cmd.empty()) return;
 
        enum { WS, CMDNAME, OPTION, CONTENT } state = WS;
-       
+
        // Used to handle things like \command[foo[bar]]{foo{bar}}
        int nestdepth = 0;
 
        // Used to handle things like \command[foo[bar]]{foo{bar}}
        int nestdepth = 0;
 
@@ -105,11 +105,11 @@ void InsetCommandParams::scanCommand(string const & cmd)
                }
                if ((state == OPTION  && c == '[') ||
                    (state == CONTENT && c == '{')) {
                }
                if ((state == OPTION  && c == '[') ||
                    (state == CONTENT && c == '{')) {
-                       ++nestdepth;
+                       ++nestdepth;
                }
                switch (state) {
                case CMDNAME:   tcmdname += c; break;
                }
                switch (state) {
                case CMDNAME:   tcmdname += c; break;
-               case OPTION:    toptions += c; break;
+               case OPTION:    toptions += c; break;
                case CONTENT:   tcontents += c; break;
                case WS:
                        if (c == '\\') {
                case CONTENT:   tcontents += c; break;
                case WS:
                        if (c == '\\') {
@@ -128,7 +128,7 @@ void InsetCommandParams::scanCommand(string const & cmd)
        // Don't mess with this.
        if (!tcmdname.empty())  setCmdName(tcmdname);
        if (!toptions.empty())  setOptions(toptions);
        // Don't mess with this.
        if (!tcmdname.empty())  setCmdName(tcmdname);
        if (!toptions.empty())  setOptions(toptions);
-       if (!tcontents.empty()) setContents(tcontents); 
+       if (!tcontents.empty()) setContents(tcontents);
 
        if (lyxerr.debugging(Debug::PARSER))
                lyxerr << "Command <" <<  cmd
 
        if (lyxerr.debugging(Debug::PARSER))
                lyxerr << "Command <" <<  cmd
@@ -141,7 +141,7 @@ void InsetCommandParams::scanCommand(string const & cmd)
 
 // This function will not be necessary when lyx3
 void InsetCommandParams::read(LyXLex & lex)
 
 // This function will not be necessary when lyx3
 void InsetCommandParams::read(LyXLex & lex)
-{    
+{
        string token;
 
        if (lex.eatLine()) {
        string token;
 
        if (lex.eatLine()) {
@@ -150,7 +150,7 @@ void InsetCommandParams::read(LyXLex & lex)
        } else {
                lex.printError("InsetCommand: Parse error: `$$Token'");
        }
        } else {
                lex.printError("InsetCommand: Parse error: `$$Token'");
        }
-       
+
        while (lex.isOK()) {
                lex.nextToken();
                token = lex.getString();
        while (lex.isOK()) {
                lex.nextToken();
                token = lex.getString();
@@ -171,7 +171,7 @@ void InsetCommandParams::write(ostream & os) const
 
 
 string const InsetCommandParams::getCommand() const
 
 
 string const InsetCommandParams::getCommand() const
-{      
+{
        string s;
        if (!getCmdName().empty()) s += "\\"+getCmdName();
        if (!getOptions().empty()) s += "["+getOptions()+']';
        string s;
        if (!getCmdName().empty()) s += "\\"+getCmdName();
        if (!getOptions().empty()) s += "["+getOptions()+']';
index b3a78524d9369ec45e542d9e6019d4bb73d6d65d..9b5ce26375e42288b62b43a3f046c0e767ffb020 100644 (file)
@@ -1,9 +1,9 @@
 // -*- C++ -*-
 /* This file is part of*
 // -*- C++ -*-
 /* This file is part of*
- * ====================================================== 
+ * ======================================================
  *
  *           LyX, The Document Processor
  *
  *           LyX, The Document Processor
- *      
+ *
  *           Copyright 1995 Matthias Ettrich
  *           Copyright 1995-2001 The LyX Team.
  *
  *           Copyright 1995 Matthias Ettrich
  *           Copyright 1995-2001 The LyX Team.
  *
@@ -24,7 +24,7 @@
 /** Used to insert a LaTeX command automatically
  *
  * Similar to InsetLaTeX but having control of the basic structure of a
 /** Used to insert a LaTeX command automatically
  *
  * Similar to InsetLaTeX but having control of the basic structure of a
- *   LaTeX command: \name[options]{contents}. 
+ *   LaTeX command: \name[options]{contents}.
  */
 class InsetCommandParams {
 public:
  */
 class InsetCommandParams {
 public:
@@ -64,11 +64,11 @@ public:
        ///
        void setFromString(string const &);
 private:
        ///
        void setFromString(string const &);
 private:
-       ///    
+       ///
        string cmdname;
        string cmdname;
-       ///    
+       ///
        string contents;
        string contents;
-       ///    
+       ///
        string options;
 };
 
        string options;
 };
 
@@ -89,7 +89,7 @@ public:
                { p_.read(lex); }
        /// Can remove one InsetBibKey is modified
        void scanCommand(string const & c) { p_.scanCommand(c); };
                { p_.read(lex); }
        /// Can remove one InsetBibKey is modified
        void scanCommand(string const & c) { p_.scanCommand(c); };
-       /// 
+       ///
        virtual int latex(Buffer const *, std::ostream &,
                          bool fragile, bool free_spc) const;
        ///
        virtual int latex(Buffer const *, std::ostream &,
                          bool fragile, bool free_spc) const;
        ///
@@ -100,7 +100,7 @@ public:
        virtual int docbook(Buffer const *, std::ostream &) const;
        ///
        Inset::Code lyxCode() const { return Inset::NO_CODE; }
        virtual int docbook(Buffer const *, std::ostream &) const;
        ///
        Inset::Code lyxCode() const { return Inset::NO_CODE; }
-       
+
        ///
        string const getCommand() const { return p_.getCommand(); }
        ///
        ///
        string const getCommand() const { return p_.getCommand(); }
        ///
index cd4b51737c3d6bfcb4c3ceac13f4cad805d1849b..c16d3515861adc08c6c37e68e40f13df450aae16 100644 (file)
@@ -1,8 +1,8 @@
 /* This file is part of
  * ======================================================
 /* This file is part of
  * ======================================================
- * 
+ *
  *           LyX, The Document Processor
  *           LyX, The Document Processor
- *      
+ *
  *         Copyright 1995 Matthias Ettrich
  *          Copyright 1995-2001 The LyX Team.
  *
  *         Copyright 1995 Matthias Ettrich
  *          Copyright 1995-2001 The LyX Team.
  *
@@ -63,7 +63,7 @@ void InsetError::draw(BufferView * bv, LyXFont const & font,
        LyXFont efont;
        efont.setSize(font.size()).decSize();
        efont.setColor(LColor::error);
        LyXFont efont;
        efont.setSize(font.size()).decSize();
        efont.setColor(LColor::error);
-   
+
        // Draw as "Error" in a framed box
        x += 1;
        pain.fillRectangle(int(x), baseline - ascent(bv, font) + 1,
        // Draw as "Error" in a framed box
        x += 1;
        pain.fillRectangle(int(x), baseline - ascent(bv, font) + 1,
@@ -80,7 +80,7 @@ void InsetError::draw(BufferView * bv, LyXFont const & font,
 }
 
 
 }
 
 
-string const InsetError::editMessage() const 
+string const InsetError::editMessage() const
 {
        return _("Opened error");
 }
 {
        return _("Opened error");
 }
index 8619f644a17cd9f3767c7772e259fa6c7c19183f..fb9d00459ea672aa958bdc4dbb22cd3a18253e7a 100644 (file)
@@ -1,11 +1,11 @@
 // -*- C++ -*-
 /* This file is part of*
 // -*- C++ -*-
 /* This file is part of*
- * ====================================================== 
+ * ======================================================
  *
  *           LyX, The Document Processor
  *
  *           LyX, The Document Processor
- *      
+ *
  *           Copyright 1995 Matthias Ettrich
  *           Copyright 1995 Matthias Ettrich
- *           Copyright 1995-2001 The LyX Team. 
+ *           Copyright 1995-2001 The LyX Team.
  *
  * ====================================================== */
 
  *
  * ====================================================== */
 
@@ -21,9 +21,9 @@
 #include <sigc++/signal_system.h>
 
 /** Used for error messages from LaTeX runs.
 #include <sigc++/signal_system.h>
 
 /** Used for error messages from LaTeX runs.
-  
-  The edit-operation opens a 
-  dialog with the text of the error-message. The inset is displayed as 
+
+  The edit-operation opens a
+  dialog with the text of the error-message. The inset is displayed as
   "Error" in a box, and automatically deleted. */
 class InsetError : public Inset {
 public:
   "Error" in a box, and automatically deleted. */
 class InsetError : public Inset {
 public:
index ceb29299043ee75d8922b062d9ac5f69124b10e2..c2317baa35aa9f6146de5aadc0265ba4a7dd4c49 100644 (file)
@@ -1,8 +1,8 @@
 /* This file is part of
  * ======================================================
 /* This file is part of
  * ======================================================
- * 
+ *
  *           LyX, The Document Processor
  *           LyX, The Document Processor
- *      
+ *
  *          Copyright 1998 The LyX Team.
  *
  *======================================================*/
  *          Copyright 1998 The LyX Team.
  *
  *======================================================*/
@@ -89,7 +89,7 @@ InsetERT::InsetERT(BufferParams const & bp,
        font.setFamily(LyXFont::TYPEWRITER_FAMILY);
        font.setColor(LColor::latex);
 #endif
        font.setFamily(LyXFont::TYPEWRITER_FAMILY);
        font.setColor(LColor::latex);
 #endif
-       
+
        string::const_iterator cit = contents.begin();
        string::const_iterator end = contents.end();
        pos_type pos = 0;
        string::const_iterator cit = contents.begin();
        string::const_iterator end = contents.end();
        pos_type pos = 0;
@@ -117,7 +117,7 @@ void InsetERT::read(Buffer const * buf, LyXLex & lex)
                if (token == "status") {
                        lex.next();
                        string const tmp_token = lex.getString();
                if (token == "status") {
                        lex.next();
                        string const tmp_token = lex.getString();
-                       
+
                        if (tmp_token == "Inlined") {
                                status(0, Inlined);
                        } else if (tmp_token == "Collapsed") {
                        if (tmp_token == "Inlined") {
                                status(0, Inlined);
                        } else if (tmp_token == "Collapsed") {
@@ -126,7 +126,7 @@ void InsetERT::read(Buffer const * buf, LyXLex & lex)
                                // leave this as default!
                                status(0, Open);
                        }
                                // leave this as default!
                                status(0, Open);
                        }
-                       
+
                        token_found = true;
                } else {
                        lyxerr << "InsetERT::Read: Missing 'status'-tag!"
                        token_found = true;
                } else {
                        lyxerr << "InsetERT::Read: Missing 'status'-tag!"
@@ -155,7 +155,7 @@ void InsetERT::read(Buffer const * buf, LyXLex & lex)
 #ifdef SET_HARD_FONT
 #ifndef INHERIT_LANG
        LyXFont font(LyXFont::ALL_INHERIT, latex_language);
 #ifdef SET_HARD_FONT
 #ifndef INHERIT_LANG
        LyXFont font(LyXFont::ALL_INHERIT, latex_language);
-#else 
+#else
        LyXFont font(LyXFont::ALL_INHERIT);
 #endif
        font.setFamily(LyXFont::TYPEWRITER_FAMILY);
        LyXFont font(LyXFont::ALL_INHERIT);
 #endif
        font.setFamily(LyXFont::TYPEWRITER_FAMILY);
@@ -169,7 +169,7 @@ void InsetERT::read(Buffer const * buf, LyXLex & lex)
                par = par->next();
        }
 #endif
                par = par->next();
        }
 #endif
-       
+
        if (!token_found) {
                if (collapsed_) {
                        status(0, Collapsed);
        if (!token_found) {
                if (collapsed_) {
                        status(0, Collapsed);
@@ -181,12 +181,12 @@ void InsetERT::read(Buffer const * buf, LyXLex & lex)
 }
 
 
 }
 
 
-void InsetERT::write(Buffer const * buf, ostream & os) const 
+void InsetERT::write(Buffer const * buf, ostream & os) const
 {
        string st;
 
        switch (status_) {
 {
        string st;
 
        switch (status_) {
-       case Open: 
+       case Open:
                st = "Open";
                break;
        case Collapsed:
                st = "Open";
                break;
        case Collapsed:
@@ -229,7 +229,7 @@ void InsetERT::write(Buffer const * buf, ostream & os) const
 }
 
 
 }
 
 
-string const InsetERT::editMessage() const 
+string const InsetERT::editMessage() const
 {
        return _("Opened ERT Inset");
 }
 {
        return _("Opened ERT Inset");
 }
@@ -247,8 +247,8 @@ void InsetERT::setFont(BufferView *, LyXFont const &, bool, bool selectall)
        // fontchange and this messages is not needed
        if (!selectall)
                Alert::alert(_("Impossible Operation!"),
        // fontchange and this messages is not needed
        if (!selectall)
                Alert::alert(_("Impossible Operation!"),
-                          _("Not permitted to change font-types inside ERT-insets!"),
-                          _("Sorry."));
+                          _("Not permitted to change font-types inside ERT-insets!"),
+                          _("Sorry."));
 }
 
 
 }
 
 
@@ -263,7 +263,7 @@ void InsetERT::updateStatus(BufferView * bv, bool swap) const
        }
 }
 
        }
 }
 
+
 void InsetERT::edit(BufferView * bv, int x, int y, unsigned int button)
 {
        if (button == 3)
 void InsetERT::edit(BufferView * bv, int x, int y, unsigned int button)
 {
        if (button == 3)
@@ -300,7 +300,7 @@ void InsetERT::edit(BufferView * bv, bool front)
 
 
 void InsetERT::insetButtonPress(BufferView * bv,
 
 
 void InsetERT::insetButtonPress(BufferView * bv,
-                                        int x, int y, int button)
+                                       int x, int y, int button)
 {
        if (status_ == Inlined) {
                inset.insetButtonPress(bv, x, y, button);
 {
        if (status_ == Inlined) {
                inset.insetButtonPress(bv, x, y, button);
@@ -316,15 +316,15 @@ bool InsetERT::insetButtonRelease(BufferView * bv, int x, int y, int button)
                showInsetDialog(bv);
                return true;
        }
                showInsetDialog(bv);
                return true;
        }
+
        if (status_ != Inlined && (x >= 0)  && (x < button_length) &&
            (y >= button_top_y) &&  (y <= button_bottom_y)) {
                updateStatus(bv, true);
        } else {
                LyXFont font(LyXFont::ALL_SANE);
                int yy = ascent(bv, font) + y - inset.ascent(bv, font);
        if (status_ != Inlined && (x >= 0)  && (x < button_length) &&
            (y >= button_top_y) &&  (y <= button_bottom_y)) {
                updateStatus(bv, true);
        } else {
                LyXFont font(LyXFont::ALL_SANE);
                int yy = ascent(bv, font) + y - inset.ascent(bv, font);
-               // inlined is special - the text appears above 
+
+               // inlined is special - the text appears above
                // button_bottom_y
                if (status_ == Inlined) {
                        inset.insetButtonRelease(bv, x, yy, button);
                // button_bottom_y
                if (status_ == Inlined) {
                        inset.insetButtonRelease(bv, x, yy, button);
@@ -338,7 +338,7 @@ bool InsetERT::insetButtonRelease(BufferView * bv, int x, int y, int button)
 
 
 void InsetERT::insetMotionNotify(BufferView * bv,
 
 
 void InsetERT::insetMotionNotify(BufferView * bv,
-                                         int x, int y, int state)
+                                        int x, int y, int state)
 {
        if (status_ == Inlined) {
                inset.insetMotionNotify(bv, x, y, state);
 {
        if (status_ == Inlined) {
                inset.insetMotionNotify(bv, x, y, state);
@@ -373,13 +373,13 @@ int InsetERT::latex(Buffer const *, ostream & os, bool /*fragile*/,
                        lines += 2;
                }
        }
                        lines += 2;
                }
        }
-       
+
        return lines;
 }
 
 
 int InsetERT::ascii(Buffer const *,
        return lines;
 }
 
 
 int InsetERT::ascii(Buffer const *,
-                   ostream &, int /*linelen*/) const 
+                   ostream &, int /*linelen*/) const
 {
        return 0;
 }
 {
        return 0;
 }
@@ -409,7 +409,7 @@ int InsetERT::linuxdoc(Buffer const *, ostream & os) const
                        lines ++;
                }
        }
                        lines ++;
                }
        }
-       
+
        return lines;
 }
 
        return lines;
 }
 
@@ -438,7 +438,7 @@ int InsetERT::docbook(Buffer const *, ostream & os) const
                        lines ++;
                }
        }
                        lines ++;
                }
        }
-       
+
        return lines;
 }
 
        return lines;
 }
 
@@ -470,7 +470,7 @@ InsetERT::localDispatch(BufferView * bv, kb_action action, string const & arg)
        case LFUN_CUT:
                set_latex_font(bv);
                break;
        case LFUN_CUT:
                set_latex_font(bv);
                break;
-       
+
        default:
                break;
        }
        default:
                break;
        }
@@ -517,7 +517,7 @@ bool InsetERT::checkInsertChar(LyXFont & /* font */)
 #ifdef SET_HARD_FONT
 #ifndef INHERIT_LANG
        LyXFont f(LyXFont::ALL_INHERIT, latex_language);
 #ifdef SET_HARD_FONT
 #ifndef INHERIT_LANG
        LyXFont f(LyXFont::ALL_INHERIT, latex_language);
-#else 
+#else
        LyXFont f(LyXFont::ALL_INHERIT);
 #endif
        font = f;
        LyXFont f(LyXFont::ALL_INHERIT);
 #endif
        font = f;
@@ -555,8 +555,8 @@ int InsetERT::width(BufferView * bv, LyXFont const & font) const
 }
 
 
 }
 
 
-void InsetERT::draw(BufferView * bv, LyXFont const & f, 
-                    int baseline, float & x, bool cleared) const
+void InsetERT::draw(BufferView * bv, LyXFont const & f,
+                   int baseline, float & x, bool cleared) const
 {
        Painter & pain = bv->painter();
 
 {
        Painter & pain = bv->painter();
 
@@ -577,9 +577,9 @@ void InsetERT::draw(BufferView * bv, LyXFont const & f,
                x += static_cast<float>(scroll());
 
        if (!cleared && (inset.need_update == InsetText::FULL ||
                x += static_cast<float>(scroll());
 
        if (!cleared && (inset.need_update == InsetText::FULL ||
-                        inset.need_update == InsetText::INIT ||
-                        top_x != int(x) ||
-                        top_baseline != baseline))
+                        inset.need_update == InsetText::INIT ||
+                        top_x != int(x) ||
+                        top_baseline != baseline))
        {
                // we don't need anymore to clear here we just have to tell
                // the underlying LyXText that it should do the RowClear!
        {
                // we don't need anymore to clear here we just have to tell
                // the underlying LyXText that it should do the RowClear!
@@ -598,7 +598,7 @@ void InsetERT::draw(BufferView * bv, LyXFont const & f,
                inset.draw(bv, f, baseline, x, cleared);
        } else {
                draw_collapsed(pain, bl, old_x);
                inset.draw(bv, f, baseline, x, cleared);
        } else {
                draw_collapsed(pain, bl, old_x);
-               inset.draw(bv, f, 
+               inset.draw(bv, f,
                                   bl + descent_collapsed() + inset.ascent(bv, f),
                                   x, cleared);
        }
                                   bl + descent_collapsed() + inset.ascent(bv, f),
                                   x, cleared);
        }
@@ -611,7 +611,7 @@ void InsetERT::set_latex_font(BufferView * /* bv */)
 #ifdef SET_HARD_FONT
 #ifndef INHERIT_LANG
        LyXFont font(LyXFont::ALL_INHERIT, latex_language);
 #ifdef SET_HARD_FONT
 #ifndef INHERIT_LANG
        LyXFont font(LyXFont::ALL_INHERIT, latex_language);
-#else 
+#else
        LyXFont font(LyXFont::ALL_INHERIT);
 #endif
 
        LyXFont font(LyXFont::ALL_INHERIT);
 #endif
 
@@ -675,7 +675,7 @@ void InsetERT::close(BufferView * bv) const
 
 
 string const InsetERT::selectNextWordToSpellcheck(BufferView * bv,
 
 
 string const InsetERT::selectNextWordToSpellcheck(BufferView * bv,
-                                                  float &) const
+                                                 float &) const
 {
        bv->unlockInset(const_cast<InsetERT *>(this));
        return string();
 {
        bv->unlockInset(const_cast<InsetERT *>(this));
        return string();
@@ -686,7 +686,7 @@ void InsetERT::getDrawFont(LyXFont & font) const
 {
 #ifndef INHERIT_LANG
        LyXFont f(LyXFont::ALL_INHERIT, latex_language);
 {
 #ifndef INHERIT_LANG
        LyXFont f(LyXFont::ALL_INHERIT, latex_language);
-#else 
+#else
        LyXFont f(LyXFont::ALL_INHERIT);
 #endif
        font = f;
        LyXFont f(LyXFont::ALL_INHERIT);
 #endif
        font = f;
index fbd1f4896a93f85ebc68608fdd4040e56e3dfb32..8f8c02d2824cfa3075b2e6d65138cf36ab7b182d 100644 (file)
@@ -1,7 +1,7 @@
 // -*- C++ -*-
 /* This file is part of
  * ======================================================
 // -*- C++ -*-
 /* This file is part of
  * ======================================================
- * 
+ *
  *           LyX, The Document Processor
  *
  *           Copyright 1998 The LyX Team.
  *           LyX, The Document Processor
  *
  *           Copyright 1998 The LyX Team.
 #include <sigc++/signal_system.h>
 
 /** A collapsable text inset for LaTeX insertions.
 #include <sigc++/signal_system.h>
 
 /** A collapsable text inset for LaTeX insertions.
-  
+
   To write full ert (including styles and other insets) in a given
   space.
 
   Note that collapsed_ encompasses both the inline and collapsed button
   To write full ert (including styles and other insets) in a given
   space.
 
   Note that collapsed_ encompasses both the inline and collapsed button
-  versions of this inset. 
+  versions of this inset.
 */
 
 class Language;
 */
 
 class Language;
@@ -65,7 +65,7 @@ public:
        bool insetAllowed(Inset::Code) const { return false; }
        ///
        void setFont(BufferView *, LyXFont const &,
        bool insetAllowed(Inset::Code) const { return false; }
        ///
        void setFont(BufferView *, LyXFont const &,
-                            bool toggleall = false, bool selectall = false);
+                            bool toggleall = false, bool selectall = false);
        ///
        void edit(BufferView *, int, int, unsigned int);
        ///
        ///
        void edit(BufferView *, int, int, unsigned int);
        ///
@@ -85,7 +85,7 @@ public:
                  bool free_spc) const;
        ///
        int ascii(Buffer const *,
                  bool free_spc) const;
        ///
        int ascii(Buffer const *,
-                         std::ostream &, int linelen = 0) const;
+                         std::ostream &, int linelen = 0) const;
        ///
        int linuxdoc(Buffer const *, std::ostream &) const;
        ///
        ///
        int linuxdoc(Buffer const *, std::ostream &) const;
        ///
@@ -94,7 +94,7 @@ public:
        void validate(LaTeXFeatures &) const {}
        ///
        UpdatableInset::RESULT localDispatch(BufferView *, kb_action,
        void validate(LaTeXFeatures &) const {}
        ///
        UpdatableInset::RESULT localDispatch(BufferView *, kb_action,
-                                            string const &);
+                                            string const &);
        ///
        bool checkInsertChar(LyXFont &);
        ///
        ///
        bool checkInsertChar(LyXFont &);
        ///
index 760fa04a21b228ba761ac2354e7bd0d67b254e2f..35b8ace1b9ce5f1aa4b2fb27bebb446276d47b69 100644 (file)
@@ -2,7 +2,7 @@
  * ======================================================
  *
  *           LyX, The Document Processor
  * ======================================================
  *
  *           LyX, The Document Processor
- *     
+ *
  *         Copyright 1995 Matthias Ettrich
  *          Copyright 1995-2001 The LyX Team.
  *
  *         Copyright 1995 Matthias Ettrich
  *          Copyright 1995-2001 The LyX Team.
  *
@@ -40,7 +40,7 @@ using std::ostream;
 using std::endl;
 
 
 using std::endl;
 
 
-InsetExternal::InsetExternal() 
+InsetExternal::InsetExternal()
        : view_(0)
 {
        tempname_ = lyx::tempName(string(), "lyxext");
        : view_(0)
 {
        tempname_ = lyx::tempName(string(), "lyxext");
@@ -60,14 +60,14 @@ InsetExternal::Params InsetExternal::params() const
 {
        return params_;
 }
 {
        return params_;
 }
+
+
 void InsetExternal::setFromParams(Params const & p)
 {
        params_.filename = p.filename;
        params_.parameters = p.parameters;
        params_.templ = p.templ;
 void InsetExternal::setFromParams(Params const & p)
 {
        params_.filename = p.filename;
        params_.parameters = p.parameters;
        params_.templ = p.templ;
-}      
+}
 
 
 string const InsetExternal::editMessage() const
 
 
 string const InsetExternal::editMessage() const
@@ -108,7 +108,7 @@ void InsetExternal::read(Buffer const *, LyXLex & lex)
        } else {
                lex.printError("InsetExternal: Parse error: `$$Token'");
        }
        } else {
                lex.printError("InsetExternal: Parse error: `$$Token'");
        }
-       
+
        while (lex.isOK()) {
                lex.nextToken();
                token = lex.getString();
        while (lex.isOK()) {
                lex.nextToken();
                token = lex.getString();
@@ -145,7 +145,7 @@ int InsetExternal::write(string const & format,
                       << params_.templ.lyxName << endl;
                return 0;
        }
                       << params_.templ.lyxName << endl;
                return 0;
        }
-       
+
        updateExternal(format, buf);
        os << doSubstitution(buf, cit->second.product);
        return 0; // CHECK  (FIXME check what ? - jbl)
        updateExternal(format, buf);
        os << doSubstitution(buf, cit->second.product);
        return 0; // CHECK  (FIXME check what ? - jbl)
@@ -185,7 +185,7 @@ void InsetExternal::validate(LaTeXFeatures & features) const
 
        if (cit == et.formats.end())
                return;
 
        if (cit == et.formats.end())
                return;
-       
+
        if (!cit->second.requirement.empty()) {
                features.require(cit->second.requirement);
        }
        if (!cit->second.requirement.empty()) {
                features.require(cit->second.requirement);
        }
@@ -245,7 +245,7 @@ string const InsetExternal::doSubstitution(Buffer const * buffer,
        result = ReplaceEnvironmentPath(result);
        result = subst(result, "$$Tempname", tempname_);
        result = subst(result, "$$Sysdir", system_lyxdir);
        result = ReplaceEnvironmentPath(result);
        result = subst(result, "$$Tempname", tempname_);
        result = subst(result, "$$Sysdir", system_lyxdir);
-       
+
        // Handle the $$Contents(filename) syntax
        if (contains(result, "$$Contents(\"")) {
 
        // Handle the $$Contents(filename) syntax
        if (contains(result, "$$Contents(\"")) {
 
@@ -271,7 +271,7 @@ string const InsetExternal::doSubstitution(Buffer const * buffer,
 
 void InsetExternal::updateExternal() const
 {
 
 void InsetExternal::updateExternal() const
 {
-       updateExternal("LaTeX", view_->buffer());       
+       updateExternal("LaTeX", view_->buffer());
 }
 
 void InsetExternal::updateExternal(string const & format,
 }
 
 void InsetExternal::updateExternal(string const & format,
@@ -285,7 +285,7 @@ void InsetExternal::updateExternal(string const & format,
            cit->second.updateCommand.empty() ||
            !et.automaticProduction)
                return;
            cit->second.updateCommand.empty() ||
            !et.automaticProduction)
                return;
-       
+
        if (!cit->second.updateResult.empty()) {
                string const resultfile = doSubstitution(buf,
                                                         cit->second.updateResult);
        if (!cit->second.updateResult.empty()) {
                string const resultfile = doSubstitution(buf,
                                                         cit->second.updateResult);
@@ -294,7 +294,7 @@ void InsetExternal::updateExternal(string const & format,
                if (fi2.exist() && fi.exist() &&
                    ::difftime(fi2.getModificationTime(),
                               fi.getModificationTime()) >= 0) {
                if (fi2.exist() && fi.exist() &&
                    ::difftime(fi2.getModificationTime(),
                               fi.getModificationTime()) >= 0) {
-                       lyxerr[Debug::FILES] << resultfile 
+                       lyxerr[Debug::FILES] << resultfile
                                             << " is up to date" << endl;
                        return;
                }
                                             << " is up to date" << endl;
                        return;
                }
@@ -342,6 +342,5 @@ bool operator==(InsetExternal::Params const & left,
 bool operator!=(InsetExternal::Params const & left,
                InsetExternal::Params const & right)
 {
 bool operator!=(InsetExternal::Params const & left,
                InsetExternal::Params const & right)
 {
-       return  !(left == right);
+       return  !(left == right);
 }
 }
-
index e6fb0e946140bc0ea3eedfa3665a462060ea2fd2..7cce4c5d58e0b91bd52d985651b0c18655ac2ca8 100644 (file)
@@ -3,7 +3,7 @@
  * ======================================================
  *
  *           LyX, The Document Processor
  * ======================================================
  *
  *           LyX, The Document Processor
- *     
+ *
  *           Copyright 1995 Matthias Ettrich
  *           Copyright 1995-2001 The LyX Team.
  *
  *           Copyright 1995 Matthias Ettrich
  *           Copyright 1995-2001 The LyX Team.
  *
@@ -26,8 +26,8 @@ class InsetExternal : public InsetButton {
 public:
        /// hold parameters settable from the GUI
        struct Params {
 public:
        /// hold parameters settable from the GUI
        struct Params {
-               Params(string const & f = string(), 
-                                       string const & p = string(), 
+               Params(string const & f = string(),
+                                       string const & p = string(),
                                        ExternalTemplate const & t = ExternalTemplate())
                        : filename(f), parameters(p), templ(t) {}
                /// the filename
                                        ExternalTemplate const & t = ExternalTemplate())
                        : filename(f), parameters(p), templ(t) {}
                /// the filename
@@ -61,7 +61,7 @@ public:
         is in a free-spacing paragraph.
         */
        virtual int latex(Buffer const *, std::ostream &, bool fragile,
         is in a free-spacing paragraph.
         */
        virtual int latex(Buffer const *, std::ostream &, bool fragile,
-                         bool free_spc) const;
+                         bool free_spc) const;
        /// write ASCII output to the ostream
        virtual int ascii(Buffer const *, std::ostream &, int linelen) const;
        /// write LinuxDoc output to the ostream
        /// write ASCII output to the ostream
        virtual int ascii(Buffer const *, std::ostream &, int linelen) const;
        /// write LinuxDoc output to the ostream
@@ -74,7 +74,7 @@ public:
 
        /// returns LyX code associated with the inset. Used for TOC, ...)
        virtual Inset::Code lyxCode() const { return EXTERNAL_CODE; }
 
        /// returns LyX code associated with the inset. Used for TOC, ...)
        virtual Inset::Code lyxCode() const { return EXTERNAL_CODE; }
+
        ///
        virtual Inset * clone(Buffer const &, bool same_id = false) const;
 
        ///
        virtual Inset * clone(Buffer const &, bool same_id = false) const;
 
index 40c4ebe947d374d9ca005ab57cbfacf1ffea76a0..7037a3801bc316441cf784cdeb750b190bc2d6a6 100644 (file)
@@ -1,8 +1,8 @@
 /* This file is part of
  * ======================================================
 /* This file is part of
  * ======================================================
- * 
+ *
  *           LyX, The Document Processor
  *           LyX, The Document Processor
- *      
+ *
  *          Copyright 1998-2001 The LyX Team.
  *
  * ====================================================== */
  *          Copyright 1998-2001 The LyX Team.
  *
  * ====================================================== */
@@ -61,7 +61,7 @@ using std::endl;
 //     within    - This (optional) argument determines whether floats of this
 //                 class will be numbered within some sectional unit of the
 //                 document. For example, if within is equal to chapter, the
 //     within    - This (optional) argument determines whether floats of this
 //                 class will be numbered within some sectional unit of the
 //                 document. For example, if within is equal to chapter, the
-//                 floats will be numbered within chapters. 
+//                 floats will be numbered within chapters.
 //   \floatstyle{style}
 //     style -  plain, boxed, ruled
 //   \floatname{float}{floatname}
 //   \floatstyle{style}
 //     style -  plain, boxed, ruled
 //   \floatname{float}{floatname}
@@ -143,7 +143,7 @@ void InsetFloat::write(Buffer const * buf, ostream & os) const
        } else {
                os << "wide false\n";
        }
        } else {
                os << "wide false\n";
        }
-       
+
        InsetCollapsable::write(buf, os);
 }
 
        InsetCollapsable::write(buf, os);
 }
 
@@ -187,7 +187,7 @@ void InsetFloat::validate(LaTeXFeatures & features) const
        if (contains(placement(), "H")) {
                features.require("float");
        }
        if (contains(placement(), "H")) {
                features.require("float");
        }
-       
+
        features.useFloat(floatType_);
        InsetCollapsable::validate(features);
 }
        features.useFloat(floatType_);
        InsetCollapsable::validate(features);
 }
@@ -224,18 +224,18 @@ int InsetFloat::latex(Buffer const * buf,
                   && buf_placement != def_placement) {
                placement = buf_placement;
        }
                   && buf_placement != def_placement) {
                placement = buf_placement;
        }
-       
+
        os << "\\begin{" << tmptype << "}";
        // We only output placement if different from the def_placement.
        if (!placement.empty()) {
                os << "[" << placement << "]";
        }
        os << "\\begin{" << tmptype << "}";
        // We only output placement if different from the def_placement.
        if (!placement.empty()) {
                os << "[" << placement << "]";
        }
-       
+
        os << "%\n";
        os << "%\n";
-    
+
        int const i = inset.latex(buf, os, fragile, fp);
        os << "\\end{" << tmptype << "}%\n";
        int const i = inset.latex(buf, os, fragile, fp);
        os << "\\end{" << tmptype << "}%\n";
-       
+
        return i + 2;
 }
 
        return i + 2;
 }
 
@@ -265,13 +265,13 @@ bool InsetFloat::insetAllowed(Inset::Code code) const
 bool InsetFloat::showInsetDialog(BufferView * bv) const
 {
        if (!inset.showInsetDialog(bv)) {
 bool InsetFloat::showInsetDialog(BufferView * bv) const
 {
        if (!inset.showInsetDialog(bv)) {
-               bv->owner()->getDialogs()->showFloat(const_cast<InsetFloat *>(this)); 
+               bv->owner()->getDialogs()->showFloat(const_cast<InsetFloat *>(this));
        }
        return true;
 }
 
 
        }
        return true;
 }
 
 
-string const & InsetFloat::type() const 
+string const & InsetFloat::type() const
 {
        return floatType_;
 }
 {
        return floatType_;
 }
index b9709328d90bf5b082700461f1b4e1f89472ace7..523352f8c1f9d533d4f667d37b8f29cb13fc02e6 100644 (file)
@@ -1,7 +1,7 @@
 // -*- C++ -*-
 /* This file is part of
  * ======================================================
 // -*- C++ -*-
 /* This file is part of
  * ======================================================
- * 
+ *
  *           LyX, The Document Processor
  *
  *           Copyright 1998 The LyX Team.
  *           LyX, The Document Processor
  *
  *           Copyright 1998 The LyX Team.
@@ -22,7 +22,7 @@
 class Painter;
 
 /** The float inset
 class Painter;
 
 /** The float inset
-  
+
 */
 class InsetFloat : public InsetCollapsable {
 public:
 */
 class InsetFloat : public InsetCollapsable {
 public:
index 8d2c565f094cfedad4a40994294d6208c7612f2e..b73220a097161f969c3b4bd986a6fb2e225a0003 100644 (file)
@@ -23,7 +23,7 @@ InsetFloatList::InsetFloatList()
 {
 }
 
 {
 }
 
+
 InsetFloatList::InsetFloatList(string const & type)
        : InsetCommand(InsetCommandParams())
 {
 InsetFloatList::InsetFloatList(string const & type)
        : InsetCommand(InsetCommandParams())
 {
@@ -31,7 +31,7 @@ InsetFloatList::InsetFloatList(string const & type)
 }
 
 
 }
 
 
-string const InsetFloatList::getScreenLabel(Buffer const *) const 
+string const InsetFloatList::getScreenLabel(Buffer const *) const
 {
        string const guiName = floatList[getCmdName()]->second.name();
        if (!guiName.empty()) {
 {
        string const guiName = floatList[getCmdName()]->second.name();
        if (!guiName.empty()) {
@@ -54,7 +54,7 @@ void InsetFloatList::write(Buffer const *, ostream & os) const
 }
 
 
 }
 
 
-void InsetFloatList::read(Buffer const *, LyXLex & lex) 
+void InsetFloatList::read(Buffer const *, LyXLex & lex)
 {
        string token;
 
 {
        string token;
 
index 57179951281ea144593f552c89c15824be315061..bde0436c43af5156f610ff24f393b2e3845f44de 100644 (file)
@@ -3,10 +3,10 @@
  * ======================================================
  *
  *           LyX, The Document Word Processor
  * ======================================================
  *
  *           LyX, The Document Word Processor
- *      
+ *
  *           Copyright 1995 Matthias Ettrich
  *           Copyright 1996-2001 The LyX Team.
  *           Copyright 1995 Matthias Ettrich
  *           Copyright 1996-2001 The LyX Team.
- * 
+ *
  * ====================================================== */
 
 #ifndef INSET_FLOATLIST_H
  * ====================================================== */
 
 #ifndef INSET_FLOATLIST_H
index 5e1d870834540cb15e8575aca8849c775eedf8b7..35e441c2793627084387fff3502b78431c52d5d7 100644 (file)
@@ -1,8 +1,8 @@
 /* This file is part of
  * ======================================================
 /* This file is part of
  * ======================================================
- * 
+ *
  *           LyX, The Document Processor
  *           LyX, The Document Processor
- *      
+ *
  *          Copyright 1998 The LyX Team.
  *
  * ======================================================
  *          Copyright 1998 The LyX Team.
  *
  * ======================================================
@@ -59,9 +59,9 @@ int InsetFoot::latex(Buffer const * buf,
                     ostream & os, bool fragile, bool fp) const
 {
        os << "%\n\\footnote{";
                     ostream & os, bool fragile, bool fp) const
 {
        os << "%\n\\footnote{";
-       
+
        int const i = inset.latex(buf, os, fragile, fp);
        os << "%\n}";
        int const i = inset.latex(buf, os, fragile, fp);
        os << "%\n}";
-       
+
        return i + 2;
 }
        return i + 2;
 }
index 092f0e7f8f7c71180c5d532b1d029ba6d803d541..8c8895d62aaafb128c835873e4fd23f1f52203eb 100644 (file)
@@ -1,7 +1,7 @@
 // -*- C++ -*-
 /* This file is part of
  * ======================================================
 // -*- C++ -*-
 /* This file is part of
  * ======================================================
- * 
+ *
  *           LyX, The Document Processor
  *
  *           Copyright 1998 The LyX Team.
  *           LyX, The Document Processor
  *
  *           Copyright 1998 The LyX Team.
@@ -22,7 +22,7 @@
 #include "insetfootlike.h"
 
 /** The footnote inset
 #include "insetfootlike.h"
 
 /** The footnote inset
-  
+
 */
 class InsetFoot : public InsetFootlike {
 public:
 */
 class InsetFoot : public InsetFootlike {
 public:
@@ -41,6 +41,3 @@ public:
 };
 
 #endif
 };
 
 #endif
-
-
-
index f401f78bf2ca1f403dd58e857fb0425e48cb9fe9..2cac4e252215c2523136992f0eefd0294c30ccd8 100644 (file)
@@ -1,8 +1,8 @@
 /* This file is part of
  * ======================================================
 /* This file is part of
  * ======================================================
- * 
+ *
  *           LyX, The Document Processor
  *           LyX, The Document Processor
- *      
+ *
  *          Copyright 2000-2001 The LyX Team.
  *
  * ======================================================
  *          Copyright 2000-2001 The LyX Team.
  *
  * ======================================================
@@ -46,7 +46,7 @@ InsetFootlike::InsetFootlike(InsetFootlike const & in, bool same_id)
 }
 
 
 }
 
 
-void InsetFootlike::write(Buffer const * buf, ostream & os) const 
+void InsetFootlike::write(Buffer const * buf, ostream & os) const
 {
        os << getInsetName() << "\n";
        InsetCollapsable::write(buf, os);
 {
        os << getInsetName() << "\n";
        InsetCollapsable::write(buf, os);
index e721632b2149de2b4578e41e881faf96d512f0bc..3e9f64237588c786a7aab4b0053564dd664eeb64 100644 (file)
@@ -1,7 +1,7 @@
 // -*- C++ -*-
 /* This file is part of
  * ======================================================
 // -*- C++ -*-
 /* This file is part of
  * ======================================================
- * 
+ *
  *           LyX, The Document Processor
  *
  *           Copyright 1998 The LyX Team.
  *           LyX, The Document Processor
  *
  *           Copyright 1998 The LyX Team.
@@ -23,7 +23,7 @@
 // To have this class is probably a bit overkill... (Lgb)
 
 /** The footnote inset
 // To have this class is probably a bit overkill... (Lgb)
 
 /** The footnote inset
-  
+
 */
 class InsetFootlike : public InsetCollapsable {
 public:
 */
 class InsetFootlike : public InsetCollapsable {
 public:
@@ -38,8 +38,3 @@ public:
 };
 
 #endif
 };
 
 #endif
-
-
-
-
-
index ea7cfc0242ae9b6949636b572a037b2ca92f06be..cbcbe2f0fcda1156c499bca7c5b9aeb2a6ae819d 100644 (file)
@@ -1,35 +1,35 @@
 /* This file is part of
 /* This file is part of
- * ====================================================== 
- * 
+ * ======================================================
+ *
  *           LyX, The Document Processor
  *           LyX, The Document Processor
- *      
+ *
  *           Copyright 1995-2002 the LyX Team.
  *           Copyright 1995-2002 the LyX Team.
- *           
+ *
  * \author Baruch Even
  * \author Herbert Voss <voss@lyx.org>
  * ====================================================== */
 
 /*
 Known BUGS:
  * \author Baruch Even
  * \author Herbert Voss <voss@lyx.org>
  * ====================================================== */
 
 /*
 Known BUGS:
-    
+
     * If the image is from the clipart, and the document is moved to another
       directory, the user is screwed. Need a way to handle it.
       This amounts to a problem of when to use relative or absolute file paths
       We should probably use what the user asks to use... but when he chooses
     * If the image is from the clipart, and the document is moved to another
       directory, the user is screwed. Need a way to handle it.
       This amounts to a problem of when to use relative or absolute file paths
       We should probably use what the user asks to use... but when he chooses
-      by the file dialog we normally get an absolute path and this may not be 
+      by the file dialog we normally get an absolute path and this may not be
       what the user meant.
 
       Note that browseRelFile in helper_funcs.* provides a file name
       which is relative if it is at reference path (here puffer path)
       level or below, and an absolute path if the file name is not a
       `natural' relative file name. In any case,
       what the user meant.
 
       Note that browseRelFile in helper_funcs.* provides a file name
       which is relative if it is at reference path (here puffer path)
       level or below, and an absolute path if the file name is not a
       `natural' relative file name. In any case,
-              MakeAbsPath(filename, buf->filePath())
+             MakeAbsPath(filename, buf->filePath())
       is guaranteed to provide the correct absolute path. This is what is
       done know for include insets. Feel free to ask me -- JMarc
       14/01/2002
       is guaranteed to provide the correct absolute path. This is what is
       done know for include insets. Feel free to ask me -- JMarc
       14/01/2002
-       
+
 TODO Before initial production release:
 TODO Before initial production release:
-    
+
     * What advanced features the users want to do?
       Implement them in a non latex dependent way, but a logical way.
       LyX should translate it to latex or any other fitting format.
     * What advanced features the users want to do?
       Implement them in a non latex dependent way, but a logical way.
       LyX should translate it to latex or any other fitting format.
@@ -53,27 +53,27 @@ TODO Before initial production release:
  * and when reading one should change the version check and the error message.
  * The filename is kept in  the lyx file in a relative way, so as to allow
  * moving the document file and its images with no problem.
  * and when reading one should change the version check and the error message.
  * The filename is kept in  the lyx file in a relative way, so as to allow
  * moving the document file and its images with no problem.
- * 
+ *
  *
  * Conversions:
  *   Postscript output means EPS figures.
  *
  *   PDF output is best done with PDF figures if it's a direct conversion
  *   or PNG figures otherwise.
  *
  * Conversions:
  *   Postscript output means EPS figures.
  *
  *   PDF output is best done with PDF figures if it's a direct conversion
  *   or PNG figures otherwise.
- *     Image format
- *     from        to
- *     EPS         epstopdf
- *     PS          ps2pdf
- *     JPG/PNG     direct
- *     PDF         direct
- *     others      PNG
+ *     Image format
+ *     from        to
+ *     EPS         epstopdf
+ *     PS          ps2pdf
+ *     JPG/PNG     direct
+ *     PDF         direct
+ *     others      PNG
  */
 
  */
 
-#include <config.h> 
+#include <config.h>
 
 #ifdef __GNUG__
 #pragma implementation
 
 #ifdef __GNUG__
 #pragma implementation
-#endif 
+#endif
 
 #include "insets/insetgraphics.h"
 #include "insets/insetgraphicsParams.h"
 
 #include "insets/insetgraphics.h"
 #include "insets/insetgraphicsParams.h"
@@ -120,7 +120,7 @@ string const RemoveExtension(string const & filename)
 {
        return ChangeExtension(filename, string());
 }
 {
        return ChangeExtension(filename, string());
 }
+
 } // namespace anon
 
 
 } // namespace anon
 
 
@@ -143,7 +143,7 @@ string const unique_id()
 InsetGraphics::InsetGraphics()
        : graphic_label(unique_id()),
          cached_status_(grfx::ErrorUnknown), cache_filled_(false), old_asc(0)
 InsetGraphics::InsetGraphics()
        : graphic_label(unique_id()),
          cached_status_(grfx::ErrorUnknown), cache_filled_(false), old_asc(0)
-         
+
 {}
 
 
 {}
 
 
@@ -230,7 +230,7 @@ bool InsetGraphics::drawImage() const
        return pixmap != 0;
 }
 
        return pixmap != 0;
 }
 
-       
+
 int InsetGraphics::ascent(BufferView *, LyXFont const &) const
 {
        old_asc = 50;
 int InsetGraphics::ascent(BufferView *, LyXFont const &) const
 {
        old_asc = 50;
@@ -268,18 +268,18 @@ int InsetGraphics::width(BufferView *, LyXFont const & font) const
                        int const msg_width = lyxfont::width(msg, msgFont);
                        font_width = std::max(font_width, msg_width);
                }
                        int const msg_width = lyxfont::width(msg, msgFont);
                        font_width = std::max(font_width, msg_width);
                }
-               
+
                return std::max(50, font_width + 15);
        }
 }
 
 
 void InsetGraphics::draw(BufferView * bv, LyXFont const & font,
                return std::max(50, font_width + 15);
        }
 }
 
 
 void InsetGraphics::draw(BufferView * bv, LyXFont const & font,
-                         int baseline, float & x, bool) const
+                        int baseline, float & x, bool) const
 {
        int oasc = old_asc;
        grfx::ImageStatus old_status_ = cached_status_;
 {
        int oasc = old_asc;
        grfx::ImageStatus old_status_ = cached_status_;
-       
+
        int ldescent = descent(bv, font);
        int lascent  = ascent(bv, font);
        int lwidth   = width(bv, font);
        int ldescent = descent(bv, font);
        int lascent  = ascent(bv, font);
        int lwidth   = width(bv, font);
@@ -307,18 +307,18 @@ void InsetGraphics::draw(BufferView * bv, LyXFont const & font,
        // This will draw the graphics. If the graphics has not been loaded yet,
        // we draw just a rectangle.
        Painter & paint = bv->painter();
        // This will draw the graphics. If the graphics has not been loaded yet,
        // we draw just a rectangle.
        Painter & paint = bv->painter();
-       
+
        if (drawImage()) {
 //             lyxerr << "IG(" << this << "): " << old_x << endl;
                paint.image(old_x + 2, baseline - lascent,
        if (drawImage()) {
 //             lyxerr << "IG(" << this << "): " << old_x << endl;
                paint.image(old_x + 2, baseline - lascent,
-                           lwidth - 4, lascent + ldescent,
+                           lwidth - 4, lascent + ldescent,
                            *cached_image_.get());
 
        } else {
 
                paint.rectangle(old_x + 2, baseline - lascent,
                            *cached_image_.get());
 
        } else {
 
                paint.rectangle(old_x + 2, baseline - lascent,
-                               lwidth - 4,
-                               lascent + ldescent);
+                               lwidth - 4,
+                               lascent + ldescent);
 
                // Print the file name.
                LyXFont msgFont(font);
 
                // Print the file name.
                LyXFont msgFont(font);
@@ -326,7 +326,7 @@ void InsetGraphics::draw(BufferView * bv, LyXFont const & font,
                string const justname = OnlyFilename (params().filename);
                if (!justname.empty()) {
                        msgFont.setSize(LyXFont::SIZE_FOOTNOTE);
                string const justname = OnlyFilename (params().filename);
                if (!justname.empty()) {
                        msgFont.setSize(LyXFont::SIZE_FOOTNOTE);
-                       paint.text(old_x + 8, 
+                       paint.text(old_x + 8,
                                   baseline - lyxfont::maxAscent(msgFont) - 4,
                                   justname, msgFont);
                }
                                   baseline - lyxfont::maxAscent(msgFont) - 4,
                                   justname, msgFont);
                }
@@ -344,7 +344,7 @@ void InsetGraphics::draw(BufferView * bv, LyXFont const & font,
        if (old_status_ != grfx::ErrorUnknown && old_status_ != cached_status_) {
                bv->getLyXText()->status(bv, LyXText::CHANGED_IN_DRAW);
        }
        if (old_status_ != grfx::ErrorUnknown && old_status_ != cached_status_) {
                bv->getLyXText()->status(bv, LyXText::CHANGED_IN_DRAW);
        }
+
        // Reset the cache, ready for the next draw request
        cached_status_ = grfx::ErrorUnknown;
        cached_image_.reset(0);
        // Reset the cache, ready for the next draw request
        cached_status_ = grfx::ErrorUnknown;
        cached_image_.reset(0);
@@ -409,7 +409,7 @@ void InsetGraphics::readInsetGraphics(Buffer const * buf, LyXLex & lex)
                lex.next();
 
                string const token = lex.getString();
                lex.next();
 
                string const token = lex.getString();
-               lyxerr[Debug::GRAPHICS] << "Token: '" << token << '\'' 
+               lyxerr[Debug::GRAPHICS] << "Token: '" << token << '\''
                                    << std::endl;
 
                if (token.empty()) {
                                    << std::endl;
 
                if (token.empty()) {
@@ -429,7 +429,7 @@ void InsetGraphics::readInsetGraphics(Buffer const * buf, LyXLex & lex)
                }
                else {
                        if (! params_.Read(buf, lex, token))
                }
                else {
                        if (! params_.Read(buf, lex, token))
-                               lyxerr << "Unknown token, " << token << ", skipping." 
+                               lyxerr << "Unknown token, " << token << ", skipping."
                                        << std::endl;
                }
        }
                                        << std::endl;
                }
        }
@@ -441,12 +441,12 @@ void InsetGraphics::readFigInset(Buffer const * buf, LyXLex & lex)
        std::vector<string> const oldUnits =
                getVectorFromString("pt,cm,in,p%,c%");
        bool finished = false;
        std::vector<string> const oldUnits =
                getVectorFromString("pt,cm,in,p%,c%");
        bool finished = false;
-       // set the display default      
-       if (lyxrc.display_graphics == "mono") 
+       // set the display default
+       if (lyxrc.display_graphics == "mono")
            params_.display = InsetGraphicsParams::MONOCHROME;
            params_.display = InsetGraphicsParams::MONOCHROME;
-       else if (lyxrc.display_graphics == "gray") 
+       else if (lyxrc.display_graphics == "gray")
            params_.display = InsetGraphicsParams::GRAYSCALE;
            params_.display = InsetGraphicsParams::GRAYSCALE;
-       else if (lyxrc.display_graphics == "color") 
+       else if (lyxrc.display_graphics == "color")
            params_.display = InsetGraphicsParams::COLOR;
        else
            params_.display = InsetGraphicsParams::NONE;
            params_.display = InsetGraphicsParams::COLOR;
        else
            params_.display = InsetGraphicsParams::NONE;
@@ -455,7 +455,7 @@ void InsetGraphics::readFigInset(Buffer const * buf, LyXLex & lex)
 
                string const token = lex.getString();
                lyxerr[Debug::GRAPHICS] << "Token: " << token << endl;
 
                string const token = lex.getString();
                lyxerr[Debug::GRAPHICS] << "Token: " << token << endl;
-               
+
                if (token.empty())
                        continue;
                else if (token == "\\end_inset") {
                if (token.empty())
                        continue;
                else if (token == "\\end_inset") {
@@ -488,11 +488,11 @@ void InsetGraphics::readFigInset(Buffer const * buf, LyXLex & lex)
                } else if (token == "flags") {
                        if (lex.next())
                                switch (lex.getInteger()) {
                } else if (token == "flags") {
                        if (lex.next())
                                switch (lex.getInteger()) {
-                               case 1: params_.display = InsetGraphicsParams::MONOCHROME; 
+                               case 1: params_.display = InsetGraphicsParams::MONOCHROME;
                                    break;
                                    break;
-                               case 2: params_.display = InsetGraphicsParams::GRAYSCALE; 
+                               case 2: params_.display = InsetGraphicsParams::GRAYSCALE;
                                    break;
                                    break;
-                               case 3: params_.display = InsetGraphicsParams::COLOR; 
+                               case 3: params_.display = InsetGraphicsParams::COLOR;
                                    break;
                                }
                } else if (token == "subfigure") {
                                    break;
                                }
                } else if (token == "subfigure") {
@@ -571,7 +571,7 @@ string findTargetFormat(string const & suffix)
 {
        // lyxrc.pdf_mode means:
        // Are we creating a PDF or a PS file?
 {
        // lyxrc.pdf_mode means:
        // Are we creating a PDF or a PS file?
-       // (Should actually mean, are we using latex or pdflatex).      
+       // (Should actually mean, are we using latex or pdflatex).
        lyxerr[Debug::GRAPHICS] << "decideOutput: lyxrc.pdf_mode = "
                            << lyxrc.pdf_mode << std::endl;
        if (lyxrc.pdf_mode) {
        lyxerr[Debug::GRAPHICS] << "decideOutput: lyxrc.pdf_mode = "
                            << lyxrc.pdf_mode << std::endl;
        if (lyxrc.pdf_mode) {
@@ -612,7 +612,7 @@ string const InsetGraphics::prepareFile(Buffer const *buf) const
        bool const zipped = zippedFile(filename_);
 
        if ((zipped && params().noUnzip) || buf->niceFile) {
        bool const zipped = zippedFile(filename_);
 
        if ((zipped && params().noUnzip) || buf->niceFile) {
-               lyxerr[Debug::GRAPHICS] << "don't unzip file or export latex" 
+               lyxerr[Debug::GRAPHICS] << "don't unzip file or export latex"
                                    << filename_ << endl;
                return filename_;
        }
                                    << filename_ << endl;
                return filename_;
        }
@@ -676,9 +676,9 @@ int InsetGraphics::latex(Buffer const *buf, ostream & os,
        // Return how many newlines we issued.
        int const newlines =
                int(lyx::count(latex_str.begin(), latex_str.end(),'\n') + 1);
        // Return how many newlines we issued.
        int const newlines =
                int(lyx::count(latex_str.begin(), latex_str.end(),'\n') + 1);
-               
+
        // lyxerr << "includegraphics: " << newlines << " lines of text"
        // lyxerr << "includegraphics: " << newlines << " lines of text"
-       //        << endl; 
+       //        << endl;
        return newlines;
 }
 
        return newlines;
 }
 
@@ -707,8 +707,8 @@ int InsetGraphics::linuxdoc(Buffer const *, ostream &) const
 // See also the docbook guide at http://www.docbook.org/
 int InsetGraphics::docbook(Buffer const *, ostream & os) const
 {
 // See also the docbook guide at http://www.docbook.org/
 int InsetGraphics::docbook(Buffer const *, ostream & os) const
 {
-       // In DocBook v5.0, the graphic tag will be eliminated from DocBook, will 
-       // need to switch to MediaObject. However, for now this is sufficient and 
+       // In DocBook v5.0, the graphic tag will be eliminated from DocBook, will
+       // need to switch to MediaObject. However, for now this is sufficient and
        // easier to use.
        os << "<graphic fileref=\"&" << graphic_label << ";\">";
        return 0;
        // easier to use.
        os << "<graphic fileref=\"&" << graphic_label << ";\">";
        return 0;
index ac446c7ca5cb45edb8714f0608891e35f6eae1ab..a45c9cbc6afe055661186360b7e68821668cafaa 100644 (file)
@@ -1,9 +1,9 @@
 // -*- C++ -*-
 /* This file is part of
 // -*- C++ -*-
 /* This file is part of
- * ====================================================== 
- * 
+ * ======================================================
+ *
  *           LyX, The Document Processor
  *           LyX, The Document Processor
- *      
+ *
  *           Copyright 1995 Matthias Ettrich
  *           Copyright 1995-2001 the LyX Team.
  *
  *           Copyright 1995 Matthias Ettrich
  *           Copyright 1995-2001 the LyX Team.
  *
@@ -17,7 +17,7 @@
 
 #ifdef __GNUG__
 #pragma interface
 
 #ifdef __GNUG__
 #pragma interface
-#endif 
+#endif
 
 #include "graphics/GraphicsTypes.h"
 #include "insets/inset.h"
 
 #include "graphics/GraphicsTypes.h"
 #include "insets/inset.h"
@@ -61,7 +61,7 @@ public:
         fragile commands by adding a #\protect# before.
         */
        int latex(Buffer const *, std::ostream &,
         fragile commands by adding a #\protect# before.
         */
        int latex(Buffer const *, std::ostream &,
-                 bool fragile, bool free_spc) const;
+                 bool fragile, bool free_spc) const;
        ///
        int ascii(Buffer const *, std::ostream &, int linelen) const;
        ///
        ///
        int ascii(Buffer const *, std::ostream &, int linelen) const;
        ///
@@ -103,7 +103,7 @@ private:
        void readInsetGraphics(Buffer const * buf, LyXLex & lex);
        /// Read the FigInset file format
        void readFigInset(Buffer const * buf, LyXLex & lex);
        void readInsetGraphics(Buffer const * buf, LyXLex & lex);
        /// Read the FigInset file format
        void readFigInset(Buffer const * buf, LyXLex & lex);
-       
+
        /// Update the inset after parameter change.
        void updateInset() const;
        /// Get the status message, depends on the image loading status.
        /// Update the inset after parameter change.
        void updateInset() const;
        /// Get the status message, depends on the image loading status.
@@ -129,4 +129,4 @@ private:
        mutable int old_asc;
 };
 
        mutable int old_asc;
 };
 
-#endif 
+#endif
index 405368d2fff93711a48d207ddd486cf875bf461a..b398fbee8d7cb1fed3a8605a32e0e22f1f2df73a 100644 (file)
@@ -1,6 +1,6 @@
 /* This file is part of
  * =================================================
 /* This file is part of
  * =================================================
- * 
+ *
  *          LyX, The Document Processor
  *          Copyright 1995 Matthias Ettrich.
  *          Copyright 1995-2001 The LyX Team.
  *          LyX, The Document Processor
  *          Copyright 1995 Matthias Ettrich.
  *          Copyright 1995-2001 The LyX Team.
  *
  * ================================================= */
 
  *
  * ================================================= */
 
-#include <config.h> 
+#include <config.h>
 
 #ifdef __GNUG__
 #pragma implementation
 
 #ifdef __GNUG__
 #pragma implementation
-#endif 
+#endif
 
 #include "insetgraphicsParams.h"
 
 
 #include "insetgraphicsParams.h"
 
@@ -43,7 +43,7 @@ displayTranslator(InsetGraphicsParams::DEFAULT, "default");
 // it is obselete until 1.3
 LyXLength convertResizeValue(string const token, LyXLex & lex) {
     lex.next();
 // it is obselete until 1.3
 LyXLength convertResizeValue(string const token, LyXLex & lex) {
     lex.next();
-    string value = lex.getString();    // "width" or "height"  
+    string value = lex.getString();    // "width" or "height"
     lex.next();                                // anyway not interesting
     value = lex.getString();
     if (token == "default")
     lex.next();                                // anyway not interesting
     value = lex.getString();
     if (token == "default")
@@ -114,7 +114,7 @@ void InsetGraphicsParams::init()
        size_type = DEFAULT_SIZE;       // do nothing
        lyxsize_type = DEFAULT_SIZE;    // do nothing
        keepAspectRatio = false;        // only for latex
        size_type = DEFAULT_SIZE;       // do nothing
        lyxsize_type = DEFAULT_SIZE;    // do nothing
        keepAspectRatio = false;        // only for latex
-       rotate = false;                 // Rotating 
+       rotate = false;                 // Rotating
        rotateOrigin = "center";        // Origin
        rotateAngle = 0.0;              // in degrees
        special = string();             // userdefined stuff
        rotateOrigin = "center";        // Origin
        rotateAngle = 0.0;              // in degrees
        special = string();             // userdefined stuff
@@ -146,29 +146,29 @@ void InsetGraphicsParams::copy(InsetGraphicsParams const & igp)
 }
 
 bool operator==(InsetGraphicsParams const & left,
 }
 
 bool operator==(InsetGraphicsParams const & left,
-                InsetGraphicsParams const & right)
+               InsetGraphicsParams const & right)
 {
        if (left.filename == right.filename &&
 {
        if (left.filename == right.filename &&
-               left.bb == right.bb &&
-               left.draft == right.draft &&
-               left.clip == right.clip &&
-               left.display == right.display &&
-               left.subcaption == right.subcaption &&
+               left.bb == right.bb &&
+               left.draft == right.draft &&
+               left.clip == right.clip &&
+               left.display == right.display &&
+               left.subcaption == right.subcaption &&
                left.noUnzip == right.noUnzip &&
                left.noUnzip == right.noUnzip &&
-               left.subcaptionText == right.subcaptionText &&
-               left.keepAspectRatio == right.keepAspectRatio &&
-               left.width == right.width &&
-               left.height == right.height &&
-               left.scale == right.scale &&
-               left.size_type == right.size_type &&
-               left.lyxsize_type == right.lyxsize_type &&
-               left.lyxwidth == right.lyxwidth &&
-               left.lyxheight == right.lyxheight &&
-               left.lyxscale == right.lyxscale &&
-               left.rotate == right.rotate &&
-               left.rotateOrigin == right.rotateOrigin &&
-               lyx::float_equal(left.rotateAngle, right.rotateAngle, 0.001 &&
-               left.special == right.special) 
+               left.subcaptionText == right.subcaptionText &&
+               left.keepAspectRatio == right.keepAspectRatio &&
+               left.width == right.width &&
+               left.height == right.height &&
+               left.scale == right.scale &&
+               left.size_type == right.size_type &&
+               left.lyxsize_type == right.lyxsize_type &&
+               left.lyxwidth == right.lyxwidth &&
+               left.lyxheight == right.lyxheight &&
+               left.lyxscale == right.lyxscale &&
+               left.rotate == right.rotate &&
+               left.rotateOrigin == right.rotateOrigin &&
+               lyx::float_equal(left.rotateAngle, right.rotateAngle, 0.001 &&
+               left.special == right.special)
          )
                return true;
 
          )
                return true;
 
@@ -176,9 +176,9 @@ bool operator==(InsetGraphicsParams const & left,
 }
 
 bool operator!=(InsetGraphicsParams const & left,
 }
 
 bool operator!=(InsetGraphicsParams const & left,
-                InsetGraphicsParams const & right)
+               InsetGraphicsParams const & right)
 {
 {
-       return  !(left == right);
+       return  !(left == right);
 }
 
 
 }
 
 
@@ -238,7 +238,7 @@ void InsetGraphicsParams::Write(Buffer const * buf, ostream & os) const
 
 
 bool InsetGraphicsParams::Read(Buffer const * buf, LyXLex & lex,
 
 
 bool InsetGraphicsParams::Read(Buffer const * buf, LyXLex & lex,
-                               string const& token)
+                              string const& token)
 {
        if (token == "filename") {
                lex.next();
 {
        if (token == "filename") {
                lex.next();
index 130e530646a10d7fe611887922295b4f79752c6b..021ed527e4c4b22b7cce9690e2e24b6f473f927f 100644 (file)
@@ -1,7 +1,7 @@
 // -*- C++ -*-
 /* This file is part of
  * =================================================
 // -*- C++ -*-
 /* This file is part of
  * =================================================
- * 
+ *
  *          LyX, The Document Processor
  *          Copyright 1995 Matthias Ettrich.
  *          Copyright 1995-2002 The LyX Team.
  *          LyX, The Document Processor
  *          Copyright 1995 Matthias Ettrich.
  *          Copyright 1995-2002 The LyX Team.
@@ -15,7 +15,7 @@
 
 #ifdef __GNUG__
 #pragma interface
 
 #ifdef __GNUG__
 #pragma interface
-#endif 
+#endif
 
 #include "LString.h"
 
 
 #include "LString.h"
 
@@ -51,7 +51,7 @@ struct InsetGraphicsParams
        string rotateOrigin;
        /// Rotation angle.
        float rotateAngle;
        string rotateOrigin;
        /// Rotation angle.
        float rotateAngle;
-       /// clip image 
+       /// clip image
        bool clip;
        /// draft mode
        bool draft;
        bool clip;
        /// draft mode
        bool draft;
@@ -59,7 +59,7 @@ struct InsetGraphicsParams
        bool noUnzip;
        /// The bounding box with "xLB yLB yRT yRT ", divided by a space!
        string bb;
        bool noUnzip;
        /// The bounding box with "xLB yLB yRT yRT ", divided by a space!
        string bb;
-       /// Type of rescaling 
+       /// Type of rescaling
        sizeType size_type;
        /// three possible values for rescaling (latex)
        LyXLength width;
        sizeType size_type;
        /// three possible values for rescaling (latex)
        LyXLength width;
@@ -104,4 +104,4 @@ bool operator==(InsetGraphicsParams const &, InsetGraphicsParams const &);
 ///
 bool operator!=(InsetGraphicsParams const &, InsetGraphicsParams const &);
 
 ///
 bool operator!=(InsetGraphicsParams const &, InsetGraphicsParams const &);
 
-#endif 
+#endif
index a95bc6d0ba81f25988f623ec11983468f3e5d43e..8d4370243f484c4a004a2a19b7d97741b39b431e 100644 (file)
@@ -77,7 +77,7 @@ bool InsetInclude::Params::operator==(Params const & o) const
        if (cparams == o.cparams && flag == o.flag &&
            noload == o.noload && masterFilename_ == o.masterFilename_)
                return true;
        if (cparams == o.cparams && flag == o.flag &&
            noload == o.noload && masterFilename_ == o.masterFilename_)
                return true;
-       
+
        return false;
 }
 
        return false;
 }
 
@@ -94,22 +94,22 @@ void InsetInclude::set(Params const & p)
 
        // Just to be safe...
        string command;
 
        // Just to be safe...
        string command;
+
        switch (params_.flag) {
        switch (params_.flag) {
-               case INCLUDE:
-                       command="include";
-                       break;
-               case VERB:
-                       command="verbatiminput";
-                       break;
-               case INPUT:
-                       command="input";
-                       break;
-               case VERBAST:
-                       command="verbatiminput*";
-                       break;
+               case INCLUDE:
+                       command="include";
+                       break;
+               case VERB:
+                       command="verbatiminput";
+                       break;
+               case INPUT:
+                       command="input";
+                       break;
+               case VERBAST:
+                       command="verbatiminput*";
+                       break;
        }
        }
+
        params_.cparams.setCmdName(command);
 }
 
        params_.cparams.setCmdName(command);
 }
 
@@ -144,7 +144,7 @@ void InsetInclude::write(Buffer const *, ostream & os) const
 void InsetInclude::read(Buffer const *, LyXLex & lex)
 {
        params_.cparams.read(lex);
 void InsetInclude::read(Buffer const *, LyXLex & lex)
 {
        params_.cparams.read(lex);
-   
+
        if (params_.cparams.getCmdName() == "include")
                params_.flag = INCLUDE;
        else if (params_.cparams.getCmdName() == "input")
        if (params_.cparams.getCmdName() == "include")
                params_.flag = INCLUDE;
        else if (params_.cparams.getCmdName() == "input")
@@ -176,7 +176,7 @@ string const InsetInclude::getScreenLabel(Buffer const *) const
        }
 
        temp += ": ";
        }
 
        temp += ": ";
-       
+
        if (params_.cparams.getContents().empty())
                temp += "???";
        else
        if (params_.cparams.getContents().empty())
                temp += "???";
        else
@@ -191,7 +191,7 @@ string const InsetInclude::getRelFileBaseName() const
        return OnlyFilename(ChangeExtension(params_.cparams.getContents(), string()));
 }
 
        return OnlyFilename(ChangeExtension(params_.cparams.getContents(), string()));
 }
 
+
 string const InsetInclude::getFileName() const
 {
        return MakeAbsPath(params_.cparams.getContents(),
 string const InsetInclude::getFileName() const
 {
        return MakeAbsPath(params_.cparams.getContents(),
@@ -212,15 +212,15 @@ bool InsetInclude::loadIfNeeded() const
 
        if (!IsLyXFilename(getFileName()))
                return false;
 
        if (!IsLyXFilename(getFileName()))
                return false;
-       
+
        if (bufferlist.exists(getFileName()))
                return true;
        if (bufferlist.exists(getFileName()))
                return true;
-       
+
        // the readonly flag can/will be wrong, not anymore I think.
        FileInfo finfo(getFileName());
        if (!finfo.isOK())
                return false;
        // the readonly flag can/will be wrong, not anymore I think.
        FileInfo finfo(getFileName());
        if (!finfo.isOK())
                return false;
-       
+
        return bufferlist.readFile(getFileName(), !finfo.writable()) != 0;
 }
 
        return bufferlist.readFile(getFileName(), !finfo.writable()) != 0;
 }
 
@@ -229,11 +229,11 @@ int InsetInclude::latex(Buffer const * buffer, ostream & os,
                        bool /*fragile*/, bool /*fs*/) const
 {
        string incfile(params_.cparams.getContents());
                        bool /*fragile*/, bool /*fs*/) const
 {
        string incfile(params_.cparams.getContents());
-       
+
        // Do nothing if no file name has been specified
        if (incfile.empty())
                return 0;
        // Do nothing if no file name has been specified
        if (incfile.empty())
                return 0;
-   
+
        if (loadIfNeeded()) {
                Buffer * tmp = bufferlist.getBuffer(getFileName());
 
        if (loadIfNeeded()) {
                Buffer * tmp = bufferlist.getBuffer(getFileName());
 
@@ -248,7 +248,7 @@ int InsetInclude::latex(Buffer const * buffer, ostream & os,
                               << "'." << endl;
                        //return 0;
                }
                               << "'." << endl;
                        //return 0;
                }
-               
+
                // write it to a file (so far the complete file)
                string writefile = ChangeExtension(getFileName(), ".tex");
 
                // write it to a file (so far the complete file)
                string writefile = ChangeExtension(getFileName(), ".tex");
 
@@ -264,9 +264,9 @@ int InsetInclude::latex(Buffer const * buffer, ostream & os,
                writefile = ChangeExtension(writefile, ".tex");
                lyxerr[Debug::LATEX] << "incfile:" << incfile << endl;
                lyxerr[Debug::LATEX] << "writefile:" << writefile << endl;
                writefile = ChangeExtension(writefile, ".tex");
                lyxerr[Debug::LATEX] << "incfile:" << incfile << endl;
                lyxerr[Debug::LATEX] << "writefile:" << writefile << endl;
-               
+
                tmp->markDepClean(buffer->tmppath);
                tmp->markDepClean(buffer->tmppath);
-               
+
                tmp->makeLaTeXFile(writefile,
                                   OnlyPath(getMasterFilename()),
                                   buffer->niceFile, true);
                tmp->makeLaTeXFile(writefile,
                                   OnlyPath(getMasterFilename()),
                                   buffer->niceFile, true);
@@ -306,11 +306,11 @@ int InsetInclude::ascii(Buffer const *, ostream & os, int) const
 int InsetInclude::linuxdoc(Buffer const * buffer, ostream & os) const
 {
        string incfile(params_.cparams.getContents());
 int InsetInclude::linuxdoc(Buffer const * buffer, ostream & os) const
 {
        string incfile(params_.cparams.getContents());
-       
+
        // Do nothing if no file name has been specified
        if (incfile.empty())
                return 0;
        // Do nothing if no file name has been specified
        if (incfile.empty())
                return 0;
-   
+
        if (loadIfNeeded()) {
                Buffer * tmp = bufferlist.getBuffer(getFileName());
 
        if (loadIfNeeded()) {
                Buffer * tmp = bufferlist.getBuffer(getFileName());
 
@@ -327,7 +327,7 @@ int InsetInclude::linuxdoc(Buffer const * buffer, ostream & os) const
 
                lyxerr[Debug::LATEX] << "incfile:" << incfile << endl;
                lyxerr[Debug::LATEX] << "writefile:" << writefile << endl;
 
                lyxerr[Debug::LATEX] << "incfile:" << incfile << endl;
                lyxerr[Debug::LATEX] << "writefile:" << writefile << endl;
-               
+
                tmp->makeLinuxDocFile(writefile, buffer->niceFile, true);
        }
 
                tmp->makeLinuxDocFile(writefile, buffer->niceFile, true);
        }
 
@@ -337,7 +337,7 @@ int InsetInclude::linuxdoc(Buffer const * buffer, ostream & os) const
                   << "]]>";
        } else
                os << '&' << include_label << ';';
                   << "]]>";
        } else
                os << '&' << include_label << ';';
-       
+
        return 0;
 }
 
        return 0;
 }
 
@@ -349,7 +349,7 @@ int InsetInclude::docbook(Buffer const * buffer, ostream & os) const
        // Do nothing if no file name has been specified
        if (incfile.empty())
                return 0;
        // Do nothing if no file name has been specified
        if (incfile.empty())
                return 0;
-   
+
        if (loadIfNeeded()) {
                Buffer * tmp = bufferlist.getBuffer(getFileName());
 
        if (loadIfNeeded()) {
                Buffer * tmp = bufferlist.getBuffer(getFileName());
 
@@ -365,7 +365,7 @@ int InsetInclude::docbook(Buffer const * buffer, ostream & os) const
 
                lyxerr[Debug::LATEX] << "incfile:" << incfile << endl;
                lyxerr[Debug::LATEX] << "writefile:" << writefile << endl;
 
                lyxerr[Debug::LATEX] << "incfile:" << incfile << endl;
                lyxerr[Debug::LATEX] << "writefile:" << writefile << endl;
-               
+
                tmp->makeDocBookFile(writefile, buffer->niceFile, true);
        }
 
                tmp->makeDocBookFile(writefile, buffer->niceFile, true);
        }
 
@@ -375,7 +375,7 @@ int InsetInclude::docbook(Buffer const * buffer, ostream & os) const
                   << "\" format=\"linespecific\">";
        } else
                os << '&' << include_label << ';';
                   << "\" format=\"linespecific\">";
        } else
                os << '&' << include_label << ';';
-       
+
        return 0;
 }
 
        return 0;
 }
 
@@ -435,13 +435,13 @@ vector<string> const InsetInclude::getLabelList() const
 vector<pair<string,string> > const InsetInclude::getKeys() const
 {
        vector<pair<string,string> > keys;
 vector<pair<string,string> > const InsetInclude::getKeys() const
 {
        vector<pair<string,string> > keys;
-       
+
        if (loadIfNeeded()) {
                Buffer * tmp = bufferlist.getBuffer(getFileName());
                tmp->setParentName("");
                keys = tmp->getBibkeyList();
                tmp->setParentName(getMasterFilename());
        }
        if (loadIfNeeded()) {
                Buffer * tmp = bufferlist.getBuffer(getFileName());
                tmp->setParentName("");
                keys = tmp->getBibkeyList();
                tmp->setParentName(getMasterFilename());
        }
-       
+
        return keys;
 }
        return keys;
 }
index 591965409b086fa5bf2e73a4ab24444e0adc26ce..971e5d50ae3d3f56ecfb045d85b2ea540ae013e2 100644 (file)
@@ -3,7 +3,7 @@
  * ======================================================
  *
  *           LyX, The Document Processor
  * ======================================================
  *
  *           LyX, The Document Processor
- *     
+ *
  *         Copyright 1997 LyX Team (this file was created this year)
  *
  * ====================================================== */
  *         Copyright 1997 LyX Team (this file was created this year)
  *
  * ====================================================== */
@@ -26,8 +26,8 @@ struct LaTeXFeatures;
  */
 class InsetInclude: public InsetButton, boost::noncopyable {
 public:
  */
 class InsetInclude: public InsetButton, boost::noncopyable {
 public:
-        /// the type of inclusion
-        enum Flags {
+       /// the type of inclusion
+       enum Flags {
                ///
                INCLUDE = 0,
                ///
                ///
                INCLUDE = 0,
                ///
@@ -91,7 +91,7 @@ public:
        void read(Buffer const *, LyXLex &);
        ///
        int latex(Buffer const *, std::ostream &,
        void read(Buffer const *, LyXLex &);
        ///
        int latex(Buffer const *, std::ostream &,
-                 bool fragile, bool free_spc) const;
+                 bool fragile, bool free_spc) const;
        ///
        int ascii(Buffer const *, std::ostream &, int linelen) const;
        ///
        ///
        int ascii(Buffer const *, std::ostream &, int linelen) const;
        ///
@@ -100,36 +100,36 @@ public:
        int docbook(Buffer const *, std::ostream &) const;
        ///
        void validate(LaTeXFeatures &) const;
        int docbook(Buffer const *, std::ostream &) const;
        ///
        void validate(LaTeXFeatures &) const;
-       
-        /** Input inserts anything inside a paragraph.
+
+       /** Input inserts anything inside a paragraph.
            Display can give some visual feedback
        */
        bool display() const;
 
            Display can give some visual feedback
        */
        bool display() const;
 
-       /// return the filename stub of the included file 
+       /// return the filename stub of the included file
        string const getRelFileBaseName() const;
        string const getRelFileBaseName() const;
+
        /// return true if the included file is not loaded
        bool isIncludeOnly() const;
 
        /// return true if the file is or got loaded.
        bool loadIfNeeded() const;
        /// return true if the included file is not loaded
        bool isIncludeOnly() const;
 
        /// return true if the file is or got loaded.
        bool loadIfNeeded() const;
-       /// hide a dialog if about 
+
+       /// hide a dialog if about
        SigC::Signal0<void> hideDialog;
 private:
        /// get the text displayed on the button
        string const getScreenLabel(Buffer const *) const;
        /// is this a verbatim include ?
        bool isVerbatim() const;
        SigC::Signal0<void> hideDialog;
 private:
        /// get the text displayed on the button
        string const getScreenLabel(Buffer const *) const;
        /// is this a verbatim include ?
        bool isVerbatim() const;
-        /// get the filename of the master buffer
-        string const getMasterFilename() const;
-        /// get the included file name
-        string const getFileName() const;
+       /// get the filename of the master buffer
+       string const getMasterFilename() const;
+       /// get the included file name
+       string const getFileName() const;
 
        /// the parameters
        Params params_;
 
        /// the parameters
        Params params_;
-       /// holds the entity name that defines the file location (SGML) 
+       /// holds the entity name that defines the file location (SGML)
        string const include_label;
 };
 
        string const include_label;
 };
 
index 486aeb23111eb845002f76c2d95d5f78f60f3c40..7c220fb782ae7d23c407295f7247187ebf396bd4 100644 (file)
@@ -46,7 +46,7 @@ int InsetIndex::docbook(Buffer const *, ostream & os) const
 
 Inset::Code InsetIndex::lyxCode() const
 {
 
 Inset::Code InsetIndex::lyxCode() const
 {
-       return Inset::INDEX_CODE;
+       return Inset::INDEX_CODE;
 }
 
 
 }
 
 
@@ -68,5 +68,5 @@ void InsetPrintIndex::validate(LaTeXFeatures & features) const
 
 Inset::Code InsetPrintIndex::lyxCode() const
 {
 
 Inset::Code InsetPrintIndex::lyxCode() const
 {
-       return Inset::INDEX_PRINT_CODE;
+       return Inset::INDEX_PRINT_CODE;
 }
 }
index 2f4baef458506144adf493181586614d726a7fcc..ec68765ac03b271b0fe11414cd76c3312274cbdd 100644 (file)
@@ -1,12 +1,12 @@
 // -*- C++ -*-
 /* This file is part of*
 // -*- C++ -*-
 /* This file is part of*
- * ====================================================== 
+ * ======================================================
  *
  *           LyX, The Document Processor
  *
  *           LyX, The Document Processor
- *      
+ *
  *         Copyright 1995 Matthias Ettrich
  *          Copyright 1996-2001 the LyX Team.
  *         Copyright 1995 Matthias Ettrich
  *          Copyright 1996-2001 the LyX Team.
- * 
+ *
  * ====================================================== */
 
 #ifndef INSET_INDEX_H
  * ====================================================== */
 
 #ifndef INSET_INDEX_H
@@ -20,7 +20,7 @@
 
 struct LaTeXFeatures;
 
 
 struct LaTeXFeatures;
 
-/** Used to insert index labels  
+/** Used to insert index labels
   */
 class InsetIndex : public InsetCommand {
 public:
   */
 class InsetIndex : public InsetCommand {
 public:
index a50ffe63866ef04382582f797d7efbb1a8fc0150..9c61eb763ff0c30a0d67dbaadee1eddb6929b688 100644 (file)
@@ -1,8 +1,8 @@
 /* This file is part of
  * ======================================================
 /* This file is part of
  * ======================================================
- * 
+ *
  *           LyX, The Document Processor
  *           LyX, The Document Processor
- *      
+ *
  *         Copyright 1995 Matthias Ettrich
  *          Copyright 1995-2001 The LyX Team.
  *
  *         Copyright 1995 Matthias Ettrich
  *          Copyright 1995-2001 The LyX Team.
  *
index 06aaa043b86b5b0011a503148861e288d8e0494d..bdd77f4e9c433f605a7c935bc4e4651b92aa6d44 100644 (file)
@@ -3,7 +3,7 @@
  * ======================================================
  *
  *           LyX, The Document Processor
  * ======================================================
  *
  *           LyX, The Document Processor
- *      
+ *
  *           Copyright 1995 Matthias Ettrich
  *           Copyright 1995-2001 The LyX Team
  *
  *           Copyright 1995 Matthias Ettrich
  *           Copyright 1995-2001 The LyX Team
  *
@@ -40,7 +40,7 @@ public:
        std::vector<string> const getLabelList() const;
        ///
        int latex(Buffer const *, std::ostream &,
        std::vector<string> const getLabelList() const;
        ///
        int latex(Buffer const *, std::ostream &,
-                 bool fragile, bool free_spc) const;
+                 bool fragile, bool free_spc) const;
        ///
        int ascii(Buffer const *, std::ostream &, int linelen) const;
        ///
        ///
        int ascii(Buffer const *, std::ostream &, int linelen) const;
        ///
index a7cc82eb0a2061db79a51636950434e99e42336f..6413256e00f12c5ec94a25c9ae7bfbd9f06ed54f 100644 (file)
@@ -1,8 +1,8 @@
 /* This file is part of
 /* This file is part of
- * ====================================================== 
- * 
+ * ======================================================
+ *
  *           LyX, The Document Processor
  *           LyX, The Document Processor
- *      
+ *
  *         Copyright 1995 Matthias Ettrich
  *          Copyright 1995-2001 The LyX Team.
  *
  *         Copyright 1995 Matthias Ettrich
  *          Copyright 1995-2001 The LyX Team.
  *
@@ -43,9 +43,9 @@ InsetLatexAccent::InsetLatexAccent(string const & str)
 
 
 void InsetLatexAccent::checkContents()
 
 
 void InsetLatexAccent::checkContents()
-        // check, if we know the modifier and can display it ok on screen
+       // check, if we know the modifier and can display it ok on screen
 {
 {
-        candisp = false;
+       candisp = false;
 
        if (contents.empty() || contents.length() < 2) {
                lyxerr[Debug::KEY] << "Cannot decode: " << contents << endl;
 
        if (contents.empty() || contents.length() < 2) {
                lyxerr[Debug::KEY] << "Cannot decode: " << contents << endl;
@@ -90,80 +90,80 @@ void InsetLatexAccent::checkContents()
                        contents = tmp;
                }
        }
                        contents = tmp;
                }
        }
-        if (contents[0] != '\\') { // demand that first char is a '\\'
+       if (contents[0] != '\\') { // demand that first char is a '\\'
                lyxerr[Debug::KEY] << "Cannot decode: " << contents << endl;
                return;
        }
 
        lyxerr[Debug::KEY] << "Decode: " << contents << endl;
 
                lyxerr[Debug::KEY] << "Cannot decode: " << contents << endl;
                return;
        }
 
        lyxerr[Debug::KEY] << "Decode: " << contents << endl;
 
-        remdot = false; plusasc = false; plusdesc = false;
+       remdot = false; plusasc = false; plusdesc = false;
 
 
-        switch (contents[1]) { // second char should be one of these
+       switch (contents[1]) { // second char should be one of these
        case '\'':  // acute
        case '\'':  // acute
-                modtype = ACUTE;    // acute
-                plusasc = true;    // at the top of character
-                break;
+               modtype = ACUTE;    // acute
+               plusasc = true;    // at the top of character
+               break;
        case '`':   // grave
        case '`':   // grave
-                modtype = GRAVE;    // grave
-                plusasc = true;    // at the top
-                break;
+               modtype = GRAVE;    // grave
+               plusasc = true;    // at the top
+               break;
        case '=':   // macron
        case '=':   // macron
-                modtype = MACRON;    // macron
-                plusasc = true;    // at the top
-                break;
+               modtype = MACRON;    // macron
+               plusasc = true;    // at the top
+               break;
        case '~':   // tilde
        case '~':   // tilde
-                modtype = TILDE;    // tilde
-                plusasc = true;    // at the top
-                break;
+               modtype = TILDE;    // tilde
+               plusasc = true;    // at the top
+               break;
        case 'b':   // underbar
        case 'b':   // underbar
-                modtype = UNDERBAR;    // underbar
-                plusdesc = true;   // at the bottom
-                break;
+               modtype = UNDERBAR;    // underbar
+               plusdesc = true;   // at the bottom
+               break;
        case 'c':   // cedilla
        case 'c':   // cedilla
-                modtype = CEDILLA;    // cedilla
-                plusdesc = true;   // at the bottom
-                break;
+               modtype = CEDILLA;    // cedilla
+               plusdesc = true;   // at the bottom
+               break;
        case 'd':   // underdot
        case 'd':   // underdot
-                modtype = UNDERDOT;    // underdot
-                plusdesc = true;   // at the bottom
-                break;
+               modtype = UNDERDOT;    // underdot
+               plusdesc = true;   // at the bottom
+               break;
        case 'r':   // circle
        case 'r':   // circle
-                modtype = CIRCLE;    // circle
-                plusasc = true;    // at the top
-                break;
+               modtype = CIRCLE;    // circle
+               plusasc = true;    // at the top
+               break;
        case 't':   // tie
        case 't':   // tie
-                modtype = TIE;    // tie
-                plusasc = true;    // at the top
-                break;
+               modtype = TIE;    // tie
+               plusasc = true;    // at the top
+               break;
        case 'u':   // breve
        case 'u':   // breve
-                modtype = BREVE;    // breve
-                plusasc = true;    // at the top
-                break;
+               modtype = BREVE;    // breve
+               plusasc = true;    // at the top
+               break;
        case 'v':   // caron
        case 'v':   // caron
-                modtype = CARON;   // caron
-                plusasc = true;    // at the top
-                break;
+               modtype = CARON;   // caron
+               plusasc = true;    // at the top
+               break;
        case 'q':   // special caron
        case 'q':   // special caron
-                modtype = SPECIAL_CARON;   // special caron
-                plusasc = true;    // at the top
-                break;
+               modtype = SPECIAL_CARON;   // special caron
+               plusasc = true;    // at the top
+               break;
        case 'H':   // hungarian umlaut
        case 'H':   // hungarian umlaut
-                modtype = HUNGARIAN_UMLAUT;   // hungarian umlaut
-                plusasc = true;    // at the top
-                break;
+               modtype = HUNGARIAN_UMLAUT;   // hungarian umlaut
+               plusasc = true;    // at the top
+               break;
        case '"':   // umlaut
        case '"':   // umlaut
-                modtype = UMLAUT;   // umlaut
-                plusasc = true;    // at the top
-                break;
+               modtype = UMLAUT;   // umlaut
+               plusasc = true;    // at the top
+               break;
        case '.':   // dot
        case '.':   // dot
-                modtype = DOT;   // dot
-                plusasc = true;    // at the top
-                break;
+               modtype = DOT;   // dot
+               plusasc = true;    // at the top
+               break;
        case '^':   // circumflex
        case '^':   // circumflex
-                modtype = CIRCUMFLEX;   // circumflex
-                plusasc = true;    // at the top
-                break;
+               modtype = CIRCUMFLEX;   // circumflex
+               plusasc = true;    // at the top
+               break;
        case 'k':   // ogonek
                modtype = OGONEK;  // ogonek
                plusdesc = true;
        case 'k':   // ogonek
                modtype = OGONEK;  // ogonek
                plusdesc = true;
@@ -178,19 +178,19 @@ void InsetLatexAccent::checkContents()
                plusasc = true; // at the top (not really needed)
                remdot = true;
                break;
                plusasc = true; // at the top (not really needed)
                remdot = true;
                break;
-       case 'l': // lslash
-               modtype = lSLASH;
-               plusasc = true; // at the top (not really needed)
-               break;
-       case 'L': // lslash
-               modtype = LSLASH;
-               plusasc = true; // at the top (not really needed)
-               break;
+       case 'l': // lslash
+               modtype = lSLASH;
+               plusasc = true; // at the top (not really needed)
+               break;
+       case 'L': // lslash
+               modtype = LSLASH;
+               plusasc = true; // at the top (not really needed)
+               break;
        default:
                lyxerr[Debug::KEY] << "Default" << endl;
                // unknow accent (or something else)
        default:
                lyxerr[Debug::KEY] << "Default" << endl;
                // unknow accent (or something else)
-                return;
-        }
+               return;
+       }
 
        // we demand that third char is a '{' (Lgb)
        if (contents[2] != '{') return;
 
        // we demand that third char is a '{' (Lgb)
        if (contents[2] != '{') return;
@@ -211,17 +211,17 @@ void InsetLatexAccent::checkContents()
                }
                //ic = (modtype == DOT_LESS_J ? 'j' : 'i');
                lyxerr[Debug::KEY] << "Contents: [" << contents << "]"
                }
                //ic = (modtype == DOT_LESS_J ? 'j' : 'i');
                lyxerr[Debug::KEY] << "Contents: [" << contents << "]"
-                                  << ", ic: " << ic 
-                                  << ", top: " << plusasc 
-                                  << ", bot: " << plusdesc 
-                                  << ", dot: " << remdot 
+                                  << ", ic: " << ic
+                                  << ", top: " << plusasc
+                                  << ", bot: " << plusdesc
+                                  << ", dot: " << remdot
                                   << ", mod: " << modtype << endl;
                // Special case for space
        } else if (contents[3] == '}') {
                ic = ' ';
        } else {
                int i = 3;
                                   << ", mod: " << modtype << endl;
                // Special case for space
        } else if (contents[3] == '}') {
                ic = ' ';
        } else {
                int i = 3;
-               
+
                // now get the char
                ic = contents[3]; // i will always be 3 here
 
                // now get the char
                ic = contents[3]; // i will always be 3 here
 
@@ -244,20 +244,20 @@ void InsetLatexAccent::checkContents()
                        contents= temp;
                        ++i;
                        remdot = true;
                        contents= temp;
                        ++i;
                        remdot = true;
-               }    
+               }
 
                // demand a '}' at the end
                if (contents[++i] != '}' && contents[++i]) return;
 
                // demand a '}' at the end
                if (contents[++i] != '}' && contents[++i]) return;
-                                          
+
                // fine, the char is properly decoded now (hopefully)
                lyxerr[Debug::KEY] << "Contents: [" << contents << "]"
                                   << ", ic: " << ic
                // fine, the char is properly decoded now (hopefully)
                lyxerr[Debug::KEY] << "Contents: [" << contents << "]"
                                   << ", ic: " << ic
-                                  << ", top: " << plusasc 
-                                  << ", bot: " << plusdesc 
+                                  << ", top: " << plusasc
+                                  << ", bot: " << plusdesc
                                   << ", dot: " << remdot
                                   << ", mod: " << modtype << endl;
        }
                                   << ", dot: " << remdot
                                   << ", mod: " << modtype << endl;
        }
-        candisp = true;
+       candisp = true;
 }
 
 
 }
 
 
@@ -273,7 +273,7 @@ int InsetLatexAccent::ascent(BufferView *, LyXFont const & font) const
                        max = lyxfont::ascent('a', font);
                else
                        max = lyxfont::ascent(ic, font);
                        max = lyxfont::ascent('a', font);
                else
                        max = lyxfont::ascent(ic, font);
-               if (plusasc) 
+               if (plusasc)
                        max += (lyxfont::maxAscent(font) + 3) / 3;
        } else
                max = lyxfont::maxAscent(font) + 4;
                        max += (lyxfont::maxAscent(font) + 3) / 3;
        } else
                max = lyxfont::maxAscent(font) + 4;
@@ -285,12 +285,12 @@ int InsetLatexAccent::descent(BufferView *, LyXFont const & font) const
 {
        int max;
        if (candisp) {
 {
        int max;
        if (candisp) {
-               if (ic == ' ') 
+               if (ic == ' ')
                        max = lyxfont::descent('a', font);
                        max = lyxfont::descent('a', font);
-                else
-                       max = lyxfont::descent(ic, font);
-                if (plusdesc)
-                       max += 3;
+               else
+               max = lyxfont::descent(ic, font);
+               if (plusdesc)
+               max += 3;
        } else
                max = lyxfont::maxDescent(font) + 4;
        return max;
        } else
                max = lyxfont::maxDescent(font) + 4;
        return max;
@@ -301,8 +301,8 @@ int InsetLatexAccent::width(BufferView *, LyXFont const & font) const
 {
        if (candisp)
                return lyxfont::width(ic, font);
 {
        if (candisp)
                return lyxfont::width(ic, font);
-        else
-                return lyxfont::width(contents, font) + 4;
+       else
+               return lyxfont::width(contents, font) + 4;
 }
 
 
 }
 
 
@@ -319,11 +319,11 @@ int InsetLatexAccent::rbearing(LyXFont const & font) const
 
 
 bool InsetLatexAccent::displayISO8859_9(BufferView * bv, LyXFont const & font,
 
 
 bool InsetLatexAccent::displayISO8859_9(BufferView * bv, LyXFont const & font,
-                                       int baseline, 
+                                       int baseline,
                                        float & x) const
 {
        unsigned char tmpic = ic;
                                        float & x) const
 {
        unsigned char tmpic = ic;
-       
+
        switch (modtype) {
        case CEDILLA:
        {
        switch (modtype) {
        case CEDILLA:
        {
@@ -346,7 +346,7 @@ bool InsetLatexAccent::displayISO8859_9(BufferView * bv, LyXFont const & font,
                if (ic == 'U') tmpic = 0xdc;
                break;
        }
                if (ic == 'U') tmpic = 0xdc;
                break;
        }
-       case DOT:        if (ic == 'I') tmpic = 0xdd; break;
+       case DOT:        if (ic == 'I') tmpic = 0xdd; break;
        case DOT_LESS_I: tmpic = 0xfd; break;
        default:         return false;
        }
        case DOT_LESS_I: tmpic = 0xfd; break;
        default:         return false;
        }
@@ -367,10 +367,10 @@ void InsetLatexAccent::draw(BufferView * bv, LyXFont const & font0,
        Painter & pain = bv->painter();
 
        if (lyxrc.font_norm_type == LyXRC::ISO_8859_9)
        Painter & pain = bv->painter();
 
        if (lyxrc.font_norm_type == LyXRC::ISO_8859_9)
-               if (displayISO8859_9(bv, font0, baseline, x))   
+               if (displayISO8859_9(bv, font0, baseline, x))
                        return;
                        return;
-       
-       /* draw it! */ 
+
+       /* draw it! */
        // All the manually drawn accents in this function could use an
        // overhaul. Different ways of drawing (what metrics to use)
        // should also be considered.
        // All the manually drawn accents in this function could use an
        // overhaul. Different ways of drawing (what metrics to use)
        // should also be considered.
@@ -378,7 +378,7 @@ void InsetLatexAccent::draw(BufferView * bv, LyXFont const & font0,
        LyXFont font(font0);
        if (lyxrc.font_norm_type == LyXRC::ISO_10646_1)
                font.setLanguage(english_language);
        LyXFont font(font0);
        if (lyxrc.font_norm_type == LyXRC::ISO_10646_1)
                font.setLanguage(english_language);
-       
+
        if (candisp) {
                int asc = ascent(bv, font);
                int desc = descent(bv, font);
        if (candisp) {
                int asc = ascent(bv, font);
                int desc = descent(bv, font);
@@ -429,7 +429,7 @@ void InsetLatexAccent::draw(BufferView * bv, LyXFont const & font0,
                // now the rest - draw within (x, y, x+wid, y+hg)
                switch (modtype) {
                case ACUTE:     // acute 0xB4
                // now the rest - draw within (x, y, x+wid, y+hg)
                switch (modtype) {
                case ACUTE:     // acute 0xB4
-               {
+               {
                        pain.text(int(x2 - (lyxfont::rbearing(0xB4, font) - lyxfont::lbearing(0xB4, font)) / 2),
                                  baseline - lyxfont::ascent(ic, font) - lyxfont::descent(0xB4, font) - (lyxfont::ascent(0xB4, font) + lyxfont::descent(0xB4, font)) / 2,
                                  char(0xB4), font);
                        pain.text(int(x2 - (lyxfont::rbearing(0xB4, font) - lyxfont::lbearing(0xB4, font)) / 2),
                                  baseline - lyxfont::ascent(ic, font) - lyxfont::descent(0xB4, font) - (lyxfont::ascent(0xB4, font) + lyxfont::descent(0xB4, font)) / 2,
                                  char(0xB4), font);
@@ -466,7 +466,7 @@ void InsetLatexAccent::draw(BufferView * bv, LyXFont const & font0,
                {
                        pain.text(int(x2 - (lyxfont::rbearing(0xB8, font) - lyxfont::lbearing(0xB8, font)) / 2), baseline,
                                  char(0xB8), font);
                {
                        pain.text(int(x2 - (lyxfont::rbearing(0xB8, font) - lyxfont::lbearing(0xB8, font)) / 2), baseline,
                                  char(0xB8), font);
-                       
+
                        break;
                }
                case UNDERDOT:     // underdot
                        break;
                }
                case UNDERDOT:     // underdot
@@ -509,7 +509,7 @@ void InsetLatexAccent::draw(BufferView * bv, LyXFont const & font0,
                case CARON:    // caron
                {
                        int xp[3], yp[3];
                case CARON:    // caron
                {
                        int xp[3], yp[3];
-                       
+
                        xp[0] = int(x2 - hg35); yp[0] = int(y + hg35);
                        xp[1] = int(x2);        yp[1] = int(y + hg);
                        xp[2] = int(x2 + hg35); yp[2] = int(y + hg35);
                        xp[0] = int(x2 - hg35); yp[0] = int(y + hg35);
                        xp[1] = int(x2);        yp[1] = int(y + hg);
                        xp[2] = int(x2 + hg35); yp[2] = int(y + hg35);
@@ -525,10 +525,10 @@ void InsetLatexAccent::draw(BufferView * bv, LyXFont const & font0,
                        int xp[3], yp[3];
                        xp[0] = int(x + wid);
                        yp[0] = int(y + hg35 + hg);
                        int xp[3], yp[3];
                        xp[0] = int(x + wid);
                        yp[0] = int(y + hg35 + hg);
-                       
+
                        xp[1] = int(x + wid + (hg35 / 2.0));
                        yp[1] = int(y + hg + (hg35 / 2.0));
                        xp[1] = int(x + wid + (hg35 / 2.0));
                        yp[1] = int(y + hg + (hg35 / 2.0));
-                       
+
                        xp[2] = int(x + wid + (hg35 / 2.0));
                        yp[2] = y + int(hg);
 
                        xp[2] = int(x + wid + (hg35 / 2.0));
                        yp[2] = y + int(hg);
 
@@ -566,16 +566,16 @@ void InsetLatexAccent::draw(BufferView * bv, LyXFont const & font0,
                        // this does probably not look like an ogonek, so
                        // it should certainly be refined
                        int xp[4], yp[4];
                        // this does probably not look like an ogonek, so
                        // it should certainly be refined
                        int xp[4], yp[4];
-                       
+
                        xp[0] = int(x2);
                        yp[0] = y;
                        xp[0] = int(x2);
                        yp[0] = y;
-                       
+
                        xp[1] = int(x2);
                        yp[1] = y + int(hg35);
                        xp[1] = int(x2);
                        yp[1] = y + int(hg35);
-                       
+
                        xp[2] = int(x2 - hg35);
                        yp[2] = y + int(hg / 2.0);
                        xp[2] = int(x2 - hg35);
                        yp[2] = y + int(hg / 2.0);
-                       
+
                        xp[3] = int(x2 + hg / 4.0);
                        yp[3] = y + int(hg);
 
                        xp[3] = int(x2 + hg / 4.0);
                        yp[3] = y + int(hg);
 
@@ -586,15 +586,15 @@ void InsetLatexAccent::draw(BufferView * bv, LyXFont const & font0,
                case LSLASH:
                {
                        int xp[2], yp[2];
                case LSLASH:
                {
                        int xp[2], yp[2];
-                       
-                       xp[0] = int(x);
+
+                       xp[0] = int(x);
                        yp[0] = y + int(3.0 * hg);
                        yp[0] = y + int(3.0 * hg);
-                       
-                       xp[1] = int(x + float(wid) * 0.75);
+
+                       xp[1] = int(x + float(wid) * 0.75);
                        yp[1] = y + int(hg);
                        yp[1] = y + int(hg);
-                       
-                       pain.lines(xp, yp, 2);
-                       break;
+
+                       pain.lines(xp, yp, 2);
+                       break;
                }
                case DOT_LESS_I: // dotless-i
                case DOT_LESS_J: // dotless-j
                }
                case DOT_LESS_I: // dotless-i
                case DOT_LESS_J: // dotless-j
index 4d4713b39acbb944d24f1bcb46086dc9316495da..a314e6500b018137910a596b3b42d38bf1cde9db 100644 (file)
@@ -1,9 +1,9 @@
 // -*- C++ -*-
 /* This file is part of*
 // -*- C++ -*-
 /* This file is part of*
- * ====================================================== 
+ * ======================================================
  *
  *           LyX, The Document Processor
  *
  *           LyX, The Document Processor
- *      
+ *
  *         Copyright 1995 Matthias Ettrich
  *
  * ====================================================== */
  *         Copyright 1995 Matthias Ettrich
  *
  * ====================================================== */
@@ -20,7 +20,7 @@
 #include "lyxlex.h"
 
 /** Insertion of accents
 #include "lyxlex.h"
 
 /** Insertion of accents
-  
+
   Proper handling of accented characters.
   This is class is supposed to handle all LaTeX accents, it
   is also possible that the class will change a bit so that
   Proper handling of accented characters.
   This is class is supposed to handle all LaTeX accents, it
   is also possible that the class will change a bit so that
@@ -74,7 +74,7 @@ public:
        inline bool canDisplay();
        // should this inset be handled like a normal charater
        bool isChar() const { return true; }
        inline bool canDisplay();
        // should this inset be handled like a normal charater
        bool isChar() const { return true; }
-       
+
        /// all the accent types
        enum ACCENT_TYPES{
                ///
        /// all the accent types
        enum ACCENT_TYPES{
                ///
@@ -114,11 +114,11 @@ public:
                ///
                DOT_LESS_I,
                ///
                ///
                DOT_LESS_I,
                ///
-               DOT_LESS_J, // 18
+               DOT_LESS_J, // 18
                ///
                ///
-               lSLASH,
+               lSLASH,
                ///
                ///
-               LSLASH
+               LSLASH
        };
 private:
        friend std::ostream & operator<<(std::ostream &, ACCENT_TYPES);
        };
 private:
        friend std::ostream & operator<<(std::ostream &, ACCENT_TYPES);
@@ -130,7 +130,7 @@ private:
        bool  candisp;
        /// modifier type
        ACCENT_TYPES  modtype;
        bool  candisp;
        /// modifier type
        ACCENT_TYPES  modtype;
-       
+
        /// remove dot from 'i' and 'j' or transform l, L into lslash, LSLaSH
        bool  remdot;
        /// add something to ascent - accent at the top
        /// remove dot from 'i' and 'j' or transform l, L into lslash, LSLaSH
        bool  remdot;
        /// add something to ascent - accent at the top
@@ -138,7 +138,7 @@ private:
        /// add something to descent - underlined char
        bool  plusdesc;
        /// international char
        /// add something to descent - underlined char
        bool  plusdesc;
        /// international char
-       mutable char  ic;    
+       mutable char  ic;
 };
 
 
 };
 
 
index a0af06f20226dba2586e2505025e95cfa404054b..646cb86ea03868fa6621fc46800c7b368ebec213 100644 (file)
@@ -1,8 +1,8 @@
 /* This file is part of
  * ======================================================
 /* This file is part of
  * ======================================================
- * 
+ *
  *           LyX, The Document Processor
  *           LyX, The Document Processor
- *      
+ *
  *          Copyright 1998 The LyX Team.
  *
  * ====================================================== */
  *          Copyright 1998 The LyX Team.
  *
  * ====================================================== */
@@ -69,9 +69,9 @@ int InsetList::latex(Buffer const * buf,
                     ostream & os, bool fragile, bool fp) const
 {
        os << "\\footnote{%\n";
                     ostream & os, bool fragile, bool fp) const
 {
        os << "\\footnote{%\n";
-       
+
        int i = inset.latex(buf, os, fragile, fp);
        os << "}%\n";
        int i = inset.latex(buf, os, fragile, fp);
        os << "}%\n";
-       
+
        return i + 2;
 }
        return i + 2;
 }
index ea9b1db588596e90d5ae1d8d0443542eaa4a18b4..9e3df491dbb66f53ffedb8a76e42f2dbcbed449c 100644 (file)
@@ -1,7 +1,7 @@
 // -*- C++ -*-
 /* This file is part of
  * ======================================================
 // -*- C++ -*-
 /* This file is part of
  * ======================================================
- * 
+ *
  *           LyX, The Document Processor
  *
  *           Copyright 1998 The LyX Team.
  *           LyX, The Document Processor
  *
  *           Copyright 1998 The LyX Team.
@@ -19,7 +19,7 @@
 #include "insetcollapsable.h"
 
 /** The list inset
 #include "insetcollapsable.h"
 
 /** The list inset
-  
+
 */
 class InsetList : public InsetCollapsable {
 public:
 */
 class InsetList : public InsetCollapsable {
 public:
index babd19772ff9d1323086415bf8b8a9ed1a54ff7a..a62b85144cca2f21863d2392f79fbd45b339f7e2 100644 (file)
@@ -1,8 +1,8 @@
 /* This file is part of
  * ======================================================
 /* This file is part of
  * ======================================================
- * 
+ *
  *           LyX, The Document Processor
  *           LyX, The Document Processor
- *      
+ *
  *          Copyright 1998 The LyX Team.
  *
  * ======================================================
  *          Copyright 1998 The LyX Team.
  *
  * ======================================================
@@ -59,9 +59,9 @@ int InsetMarginal::latex(Buffer const * buf,
                         ostream & os, bool fragile, bool fp) const
 {
        os << "%\n\\marginpar{";
                         ostream & os, bool fragile, bool fp) const
 {
        os << "%\n\\marginpar{";
-       
+
        int const i = inset.latex(buf, os, fragile, fp);
        os << "%\n}";
        int const i = inset.latex(buf, os, fragile, fp);
        os << "%\n}";
-       
+
        return i + 2;
 }
        return i + 2;
 }
index cb7a6fca2f98c1ed8d2df2ad1a9cbaaf614db03d..6e177327f5f870ab40d56ec63d0188349c5bb64d 100644 (file)
@@ -1,7 +1,7 @@
 // -*- C++ -*-
 /* This file is part of
  * ======================================================
 // -*- C++ -*-
 /* This file is part of
  * ======================================================
- * 
+ *
  *           LyX, The Document Processor
  *
  *           Copyright 1998 The LyX Team.
  *           LyX, The Document Processor
  *
  *           Copyright 1998 The LyX Team.
@@ -19,7 +19,7 @@
 #include "insetfootlike.h"
 
 /** The marginal note inset
 #include "insetfootlike.h"
 
 /** The marginal note inset
-  
+
 */
 class InsetMarginal : public InsetFootlike {
 public:
 */
 class InsetMarginal : public InsetFootlike {
 public:
index 26cb6471433aa01f4de8f50a2c233cf4e41c6bb6..9440b3def18b64e82fb2206cf3a5b100dad58802 100644 (file)
@@ -1,8 +1,8 @@
 /* This file is part of
  * ======================================================
 /* This file is part of
  * ======================================================
- * 
+ *
  *           LyX, The Document Processor
  *           LyX, The Document Processor
- *      
+ *
  *          Copyright 1998 The LyX Team.
  *
  *======================================================*/
  *          Copyright 1998 The LyX Team.
  *
  *======================================================*/
@@ -80,7 +80,7 @@ InsetMinipage::InsetMinipage(BufferParams const & bp)
        // just for experimentation :)
        setBackgroundColor(LColor::green);
 #endif
        // just for experimentation :)
        setBackgroundColor(LColor::green);
 #endif
-       
+
        inset.setFrameColor(0, LColor::blue);
        setInsetName("Minipage");
 }
        inset.setFrameColor(0, LColor::blue);
        setInsetName("Minipage");
 }
@@ -105,7 +105,7 @@ InsetMinipage::~InsetMinipage()
 }
 
 
 }
 
 
-void InsetMinipage::write(Buffer const * buf, ostream & os) const 
+void InsetMinipage::write(Buffer const * buf, ostream & os) const
 {
        os << getInsetName() << "\n"
           << "position " << pos_ << "\n"
 {
        os << getInsetName() << "\n"
           << "position " << pos_ << "\n"
@@ -245,7 +245,7 @@ int InsetMinipage::latex(Buffer const * buf,
        }
        os << "\\begin{minipage}[" << s_pos << "]{"
           << width_.asLatexString() << "}%\n";
        }
        os << "\\begin{minipage}[" << s_pos << "]{"
           << width_.asLatexString() << "}%\n";
-       
+
        int i = inset.latex(buf, os, fragile, fp);
 
        os << "\\end{minipage}%\n";
        int i = inset.latex(buf, os, fragile, fp);
 
        os << "\\end{minipage}%\n";
@@ -262,7 +262,7 @@ bool InsetMinipage::insetAllowed(Inset::Code code) const
 }
 
 
 }
 
 
-InsetMinipage::Position InsetMinipage::pos() const 
+InsetMinipage::Position InsetMinipage::pos() const
 {
        return pos_;
 }
 {
        return pos_;
 }
index b58a7b8cf91764fc21786e53124df93e199eadc1..699c914b0bb8efc208826c172bc2684d41580795 100644 (file)
@@ -1,7 +1,7 @@
 // -*- C++ -*-
 /* This file is part of
  * ======================================================
 // -*- C++ -*-
 /* This file is part of
  * ======================================================
- * 
+ *
  *           LyX, The Document Processor
  *
  *           Copyright 2001 The LyX Team.
  *           LyX, The Document Processor
  *
  *           Copyright 2001 The LyX Team.
@@ -21,7 +21,7 @@
 #include <sigc++/signal_system.h>
 
 /** The minipage inset
 #include <sigc++/signal_system.h>
 
 /** The minipage inset
-  
+
 */
 class InsetMinipage : public InsetCollapsable {
 public:
 */
 class InsetMinipage : public InsetCollapsable {
 public:
index f8b3598c7d75cab15801086e1674d488fd988d98..21c1e9770fb643ad8cba552fbe041a185c7a5f83 100644 (file)
@@ -1,8 +1,8 @@
 /* This file is part of
  * ======================================================
 /* This file is part of
  * ======================================================
- * 
+ *
  *           LyX, The Document Processor
  *           LyX, The Document Processor
- *      
+ *
  *          Copyright 1998 The LyX Team.
  *
  * ======================================================
  *          Copyright 1998 The LyX Team.
  *
  * ======================================================
@@ -62,7 +62,7 @@ Inset * InsetNote::clone(Buffer const &, bool same_id) const
 
 
 // This constructor is used for reading old InsetInfo
 
 
 // This constructor is used for reading old InsetInfo
-InsetNote::InsetNote(Buffer const * buf, string const & contents, 
+InsetNote::InsetNote(Buffer const * buf, string const & contents,
                     bool collapsed)
        : InsetCollapsable(buf->params, collapsed)
 {
                     bool collapsed)
        : InsetCollapsable(buf->params, collapsed)
 {
@@ -81,7 +81,7 @@ InsetNote::InsetNote(Buffer const * buf, string const & contents,
 }
 
 
 }
 
 
-string const InsetNote::editMessage() const 
+string const InsetNote::editMessage() const
 {
        return _("Opened Note Inset");
 }
 {
        return _("Opened Note Inset");
 }
index 3725b5333892ee935539ef7ea419cd563293e487..6688e77a80b2f7163f8aee103b21ff875bc4288a 100644 (file)
@@ -1,7 +1,7 @@
 // -*- C++ -*-
 /* This file is part of
  * ======================================================
 // -*- C++ -*-
 /* This file is part of
  * ======================================================
- * 
+ *
  *           LyX, The Document Processor
  *
  *           Copyright 2001 The LyX Team.
  *           LyX, The Document Processor
  *
  *           Copyright 2001 The LyX Team.
 #include "insetcollapsable.h"
 
 /** The PostIt note inset
 #include "insetcollapsable.h"
 
 /** The PostIt note inset
-  
+
 */
 class InsetNote : public InsetCollapsable {
 public:
 */
 class InsetNote : public InsetCollapsable {
 public:
-       /// 
+       ///
        InsetNote(BufferParams const &);
        ///
        InsetNote(InsetNote const &, bool same_id = false);
        InsetNote(BufferParams const &);
        ///
        InsetNote(InsetNote const &, bool same_id = false);
index 7d79793adaae26389578dc78e9010bbae01220ad..f516755bd15eaf1550640e6ee44e7b1e0ec6203c 100644 (file)
@@ -1,10 +1,10 @@
 /* This file is part of*
 /* This file is part of*
- * ====================================================== 
+ * ======================================================
  *
  *           LyX, The Document Processor
  *
  *           LyX, The Document Processor
- *      
+ *
  *           Copyright 1997-2001 The LyX Team.
  *           Copyright 1997-2001 The LyX Team.
- * 
+ *
  * ====================================================== */
 
 
  * ====================================================== */
 
 
@@ -38,14 +38,14 @@ InsetParent::InsetParent(InsetCommandParams const & p, Buffer const & bf, bool)
 }
 
 
 }
 
 
-string const InsetParent::getScreenLabel(Buffer const *) const 
+string const InsetParent::getScreenLabel(Buffer const *) const
 {
        return string(_("Parent:")) + getContents();
 }
 
 
 void InsetParent::edit(BufferView * bv, int, int, unsigned int)
 {
        return string(_("Parent:")) + getContents();
 }
 
 
 void InsetParent::edit(BufferView * bv, int, int, unsigned int)
-{    
+{
        bv->owner()->getLyXFunc()->
                dispatch(LFUN_CHILDOPEN, getContents());
 }
        bv->owner()->getLyXFunc()->
                dispatch(LFUN_CHILDOPEN, getContents());
 }
index 63e61b2e1edefd4d5ccf40f3b48617b4aa36cedc..62f9224945350b828b316397582ad7f0d36517ba 100644 (file)
@@ -1,11 +1,11 @@
 // -*- C++ -*-
 /* This file is part of*
 // -*- C++ -*-
 /* This file is part of*
- * ====================================================== 
+ * ======================================================
  *
  *           LyX, The Document Processor
  *
  *           LyX, The Document Processor
- *      
+ *
  *           Copyright 1997-2001 LyX Team
  *           Copyright 1997-2001 LyX Team
- * 
+ *
  * ====================================================== */
 
 #ifndef INSET_PARENT_H
  * ====================================================== */
 
 #ifndef INSET_PARENT_H
@@ -22,7 +22,7 @@ class Buffer;
 /** Reference to the parent document.
 
   Useful to load a parent document from a child document and to
 /** Reference to the parent document.
 
   Useful to load a parent document from a child document and to
-  share parent's properties between preambleless children. 
+  share parent's properties between preambleless children.
  */
 class InsetParent : public InsetCommand {
 public:
  */
 class InsetParent : public InsetCommand {
 public:
@@ -42,9 +42,9 @@ public:
        void edit(BufferView *, int, int, unsigned int);
        ///
        void edit(BufferView * bv, bool front = true);
        void edit(BufferView *, int, int, unsigned int);
        ///
        void edit(BufferView * bv, bool front = true);
-       /// 
+       ///
        int latex(Buffer const *, std::ostream &,
        int latex(Buffer const *, std::ostream &,
-                 bool fragile, bool free_spc) const;
+                 bool fragile, bool free_spc) const;
        ///
        void setParent(string fn) { setContents(fn); }
 };
        ///
        void setParent(string fn) { setContents(fn); }
 };
index d4e1541ad8721a8bf7ee7bd98c4189d8c000f664..4b7e678edf9268b8b2df05eaebc6b8f76d918f95 100644 (file)
@@ -1,8 +1,8 @@
 /* This file is part of
  * ======================================================
 /* This file is part of
  * ======================================================
- * 
+ *
  *           LyX, The Document Processor
  *           LyX, The Document Processor
- *      
+ *
  *         Copyright 1995 Matthias Ettrich
  *          Copyright 1995-2001 The LyX Team.
  *
  *         Copyright 1995 Matthias Ettrich
  *          Copyright 1995-2001 The LyX Team.
  *
@@ -47,22 +47,22 @@ char const * const quote_char = ",'`<>";
 
 // Index of chars used for the quote. Index is [side, language]
 int quote_index[2][6] = {
 
 // Index of chars used for the quote. Index is [side, language]
 int quote_index[2][6] = {
-       { 2, 1, 0, 0, 3, 4 },    // "'',,<>" 
+       { 2, 1, 0, 0, 3, 4 },    // "'',,<>"
        { 1, 1, 2, 1, 4, 3 } };  // "`'`'><"
 
 // Corresponding LaTeX code, for double and single quotes.
        { 1, 1, 2, 1, 4, 3 } };  // "`'`'><"
 
 // Corresponding LaTeX code, for double and single quotes.
-char const * const latex_quote_t1[2][5] = 
-{ { "\\quotesinglbase{}",  "'", "`", 
-    "\\guilsinglleft{}", "\\guilsinglright{}" }, 
+char const * const latex_quote_t1[2][5] =
+{ { "\\quotesinglbase{}",  "'", "`",
+    "\\guilsinglleft{}", "\\guilsinglright{}" },
   { ",,", "''", "``", "<<", ">>" } };
 
   { ",,", "''", "``", "<<", ">>" } };
 
-char const * const latex_quote_ot1[2][5] = 
-{ { "\\quotesinglbase{}",  "'", "`", 
-    "\\guilsinglleft{}", "\\guilsinglright{}" }, 
+char const * const latex_quote_ot1[2][5] =
+{ { "\\quotesinglbase{}",  "'", "`",
+    "\\guilsinglleft{}", "\\guilsinglright{}" },
   { "\\quotedblbase{}", "''", "``",
     "\\guillemotleft{}", "\\guillemotright{}" } };
 
   { "\\quotedblbase{}", "''", "``",
     "\\guillemotleft{}", "\\guillemotright{}" } };
 
-char const * const latex_quote_babel[2][5] = 
+char const * const latex_quote_babel[2][5] =
 { { "\\glq{}",  "'", "`", "\\flq{}", "\\frq{}" },
   { "\\glqq{}", "''", "``", "\\flqq{}", "\\frqq{}" } };
 
 { { "\\glq{}",  "'", "`", "\\flq{}", "\\frq{}" },
   { "\\glqq{}", "''", "``", "\\flqq{}", "\\frqq{}" } };
 
@@ -85,12 +85,12 @@ InsetQuotes::InsetQuotes(quote_language l,
 InsetQuotes::InsetQuotes(char c, BufferParams const & params)
        : language_(params.quotes_language), times_(params.quotes_times)
 {
 InsetQuotes::InsetQuotes(char c, BufferParams const & params)
        : language_(params.quotes_language), times_(params.quotes_times)
 {
-       // Decide whether left or right 
+       // Decide whether left or right
        switch (c) {
        switch (c) {
-       case ' ': case '(': 
+       case ' ': case '(':
        case Paragraph::META_HFILL:
        case Paragraph::META_HFILL:
-       case Paragraph::META_NEWLINE: 
-               side_ = LeftQ;   // left quote 
+       case Paragraph::META_NEWLINE:
+               side_ = LeftQ;   // left quote
                break;
        default:
                side_ = RightQ;  // right quote
                break;
        default:
                side_ = RightQ;  // right quote
@@ -108,7 +108,7 @@ void InsetQuotes::parseString(string const & s)
        }
 
        int i;
        }
 
        int i;
-       
+
        for (i = 0; i < 6; ++i) {
                if (str[0] == language_char[i]) {
                        language_ = quote_language(i);
        for (i = 0; i < 6; ++i) {
                if (str[0] == language_char[i]) {
                        language_ = quote_language(i);
@@ -118,7 +118,7 @@ void InsetQuotes::parseString(string const & s)
        if (i >= 6) {
                lyxerr << "ERROR (InsetQuotes::InsetQuotes):"
                        " bad language specification." << endl;
        if (i >= 6) {
                lyxerr << "ERROR (InsetQuotes::InsetQuotes):"
                        " bad language specification." << endl;
-               language_ = EnglishQ; 
+               language_ = EnglishQ;
        }
 
        for (i = 0; i < 2; ++i) {
        }
 
        for (i = 0; i < 2; ++i) {
@@ -130,7 +130,7 @@ void InsetQuotes::parseString(string const & s)
        if (i >= 2) {
                lyxerr << "ERROR (InsetQuotes::InsetQuotes):"
                        " bad side specification." << endl;
        if (i >= 2) {
                lyxerr << "ERROR (InsetQuotes::InsetQuotes):"
                        " bad side specification." << endl;
-               side_ = LeftQ; 
+               side_ = LeftQ;
        }
 
        for (i = 0; i < 2; ++i) {
        }
 
        for (i = 0; i < 2; ++i) {
@@ -142,30 +142,30 @@ void InsetQuotes::parseString(string const & s)
        if (i >= 2) {
                lyxerr << "ERROR (InsetQuotes::InsetQuotes):"
                        " bad times specification." << endl;
        if (i >= 2) {
                lyxerr << "ERROR (InsetQuotes::InsetQuotes):"
                        " bad times specification." << endl;
-               times_ = DoubleQ; 
+               times_ = DoubleQ;
        }
 }
 
 
 string const InsetQuotes::dispString(Language const * loclang) const
 {
        }
 }
 
 
 string const InsetQuotes::dispString(Language const * loclang) const
 {
-       string disp;
+       string disp;
        disp += quote_char[quote_index[side_][language_]];
        if (times_ == DoubleQ)
                disp += disp;
 
        disp += quote_char[quote_index[side_][language_]];
        if (times_ == DoubleQ)
                disp += disp;
 
-       if (lyxrc.font_norm_type == LyXRC::ISO_8859_1
-           || lyxrc.font_norm_type == LyXRC::ISO_8859_3
-           || lyxrc.font_norm_type == LyXRC::ISO_8859_4
-           || lyxrc.font_norm_type == LyXRC::ISO_8859_9) {
+       if (lyxrc.font_norm_type == LyXRC::ISO_8859_1
+           || lyxrc.font_norm_type == LyXRC::ISO_8859_3
+           || lyxrc.font_norm_type == LyXRC::ISO_8859_4
+           || lyxrc.font_norm_type == LyXRC::ISO_8859_9) {
                if (disp == "'")
                        disp = "´";
                else if (disp == "''")
                        disp = "´´";
        }
                if (disp == "'")
                        disp = "´";
                else if (disp == "''")
                        disp = "´´";
        }
-       if (lyxrc.font_norm_type == LyXRC::ISO_8859_1
-           || lyxrc.font_norm_type == LyXRC::ISO_8859_9
-           || lyxrc.font_norm_type == LyXRC::ISO_8859_15) {
+       if (lyxrc.font_norm_type == LyXRC::ISO_8859_1
+           || lyxrc.font_norm_type == LyXRC::ISO_8859_9
+           || lyxrc.font_norm_type == LyXRC::ISO_8859_15) {
                if (disp == "<<")
                        disp = '«';
                else if (disp == ">>")
                if (disp == "<<")
                        disp = '«';
                else if (disp == ">>")
@@ -179,8 +179,8 @@ string const InsetQuotes::dispString(Language const * loclang) const
                else
                        disp = " " + disp;
        }
                else
                        disp = " " + disp;
        }
-       
-       return disp;
+
+       return disp;
 }
 
 
 }
 
 
@@ -242,7 +242,7 @@ void InsetQuotes::write(Buffer const *, ostream & os) const
        string text;
        text += language_char[language_];
        text += side_char[side_];
        string text;
        text += language_char[language_];
        text += side_char[side_];
-       text += times_char[times_]; 
+       text += times_char[times_];
        os << "Quotes " << text;
 }
 
        os << "Quotes " << text;
 }
 
@@ -272,18 +272,18 @@ int InsetQuotes::latex(Buffer const * buf, ostream & os,
 
        const int quoteind = quote_index[side_][language_];
        string qstr;
 
        const int quoteind = quote_index[side_][language_];
        string qstr;
-       
+
        if (language_ == FrenchQ && times_ == DoubleQ
            && curr_lang == "frenchb") {
        if (language_ == FrenchQ && times_ == DoubleQ
            && curr_lang == "frenchb") {
-               if (side_ == LeftQ) 
+               if (side_ == LeftQ)
                        qstr = "\\og "; //the spaces are important here
                        qstr = "\\og "; //the spaces are important here
-               else 
+               else
                        qstr = " \\fg{}"; //and here
        } else if (language_ == FrenchQ && times_ == DoubleQ
                   && curr_lang == "french") {
                        qstr = " \\fg{}"; //and here
        } else if (language_ == FrenchQ && times_ == DoubleQ
                   && curr_lang == "french") {
-               if (side_ == LeftQ) 
+               if (side_ == LeftQ)
                        qstr = "<< "; //the spaces are important here
                        qstr = "<< "; //the spaces are important here
-               else 
+               else
                        qstr = " >>"; //and here
        } else if (lyxrc.fontenc == "T1") {
                qstr = latex_quote_t1[times_][quoteind];
                        qstr = " >>"; //and here
        } else if (lyxrc.fontenc == "T1") {
                qstr = latex_quote_t1[times_][quoteind];
@@ -293,7 +293,7 @@ int InsetQuotes::latex(Buffer const * buf, ostream & os,
        } else if (!use_babel) {
 #endif
                qstr = latex_quote_ot1[times_][quoteind];
        } else if (!use_babel) {
 #endif
                qstr = latex_quote_ot1[times_][quoteind];
-       } else { 
+       } else {
                qstr = latex_quote_babel[times_][quoteind];
        }
 
                qstr = latex_quote_babel[times_][quoteind];
        }
 
@@ -337,24 +337,24 @@ int InsetQuotes::docbook(Buffer const *, ostream & os) const
 }
 
 
 }
 
 
-void InsetQuotes::validate(LaTeXFeatures & features) const 
+void InsetQuotes::validate(LaTeXFeatures & features) const
 {
        char type = quote_char[quote_index[side_][language_]];
 
 #ifdef DO_USE_DEFAULT_LANGUAGE
 {
        char type = quote_char[quote_index[side_][language_]];
 
 #ifdef DO_USE_DEFAULT_LANGUAGE
-       if (features.bufferParams().language->lang() == "default" 
+       if (features.bufferParams().language->lang() == "default"
 #else
        if (!use_babel
 #endif
            && lyxrc.fontenc != "T1") {
 #else
        if (!use_babel
 #endif
            && lyxrc.fontenc != "T1") {
-               if (times_ == SingleQ) 
+               if (times_ == SingleQ)
                        switch (type) {
                        case ',': features.require("quotesinglbase");  break;
                        case '<': features.require("guilsinglleft");  break;
                        case '>': features.require("guilsinglright"); break;
                        default: break;
                        }
                        switch (type) {
                        case ',': features.require("quotesinglbase");  break;
                        case '<': features.require("guilsinglleft");  break;
                        case '>': features.require("guilsinglright"); break;
                        default: break;
                        }
-               else 
+               else
                        switch (type) {
                        case ',': features.require("quotedblbase");   break;
                        case '<': features.require("guillemotleft");  break;
                        switch (type) {
                        case ',': features.require("quotedblbase");   break;
                        case '<': features.require("guillemotleft");  break;
index 60592c8f86ff2e564df9dcfbb0ca948cf685b4f8..7fe44c073000146344ba0fa3e946847b9b62bbbc 100644 (file)
@@ -3,7 +3,7 @@
  * ======================================================
  *
  *           LyX, The Document Processor
  * ======================================================
  *
  *           LyX, The Document Processor
- *      
+ *
  *         Copyright 1995 Matthias Ettrich
  *          Copyright 1995-2001 The LyX Team
  *
  *         Copyright 1995 Matthias Ettrich
  *          Copyright 1995-2001 The LyX Team
  *
@@ -27,7 +27,7 @@ struct LaTeXFeatures;
 /** Quotes.
 
   Used for the various quotes. German, English, French, all either
 /** Quotes.
 
   Used for the various quotes. German, English, French, all either
-  double or single **/ 
+  double or single **/
 class InsetQuotes : public Inset {
 public:
        ///
 class InsetQuotes : public Inset {
 public:
        ///
@@ -50,20 +50,20 @@ public:
                ///
                LeftQ,
                ///
                ///
                LeftQ,
                ///
-               RightQ 
+               RightQ
        };
        ///
        enum quote_times {
                ///
                SingleQ,
                ///
        };
        ///
        enum quote_times {
                ///
                SingleQ,
                ///
-               DoubleQ 
+               DoubleQ
        };
        };
-       
+
        /** The constructor works like this:
          \begin{itemize}
        /** The constructor works like this:
          \begin{itemize}
-           \item fls <- french single quote left 
-           \item grd <- german double quote right 
+           \item fls <- french single quote left
+           \item grd <- german double quote right
            \item etc.
          \end{itemize}
          */
            \item etc.
          \end{itemize}
          */
@@ -105,7 +105,7 @@ public:
        Inset::Code lyxCode() const;
        // should this inset be handled like a normal charater
        bool isChar() const { return true; }
        Inset::Code lyxCode() const;
        // should this inset be handled like a normal charater
        bool isChar() const { return true; }
-       
+
 private:
        ///
        quote_language language_;
 private:
        ///
        quote_language language_;
@@ -124,4 +124,3 @@ private:
        string const dispString(Language const *) const;
 };
 #endif
        string const dispString(Language const *) const;
 };
 #endif
-
index b6fccf4831454812d9da9976dabb845714e76d86..1ad1209070c318325ff017d2155ecb05c9e79853 100644 (file)
@@ -26,7 +26,7 @@ void InsetRef::edit(BufferView * bv, int, int, unsigned int button)
 {
        // Eventually trigger dialog with button 3 not 1
        if (button == 3)
 {
        // Eventually trigger dialog with button 3 not 1
        if (button == 3)
-               bv->owner()->getLyXFunc()->
+               bv->owner()->getLyXFunc()->
                        dispatch(LFUN_REF_GOTO, getContents());
        else if (button == 1)
                bv->owner()->getDialogs()->showRef(this);
                        dispatch(LFUN_REF_GOTO, getContents());
        else if (button == 1)
                bv->owner()->getDialogs()->showRef(this);
index 46a82f206bc239eaf87a37f798a9ff1b122ee944..886c87710462b220ed44a98420e6fa4aad039eb7 100644 (file)
@@ -3,9 +3,9 @@
  * ======================================================
  *
  *           LyX, The Document Processor
  * ======================================================
  *
  *           LyX, The Document Processor
- *      
+ *
  *         Copyright 1997 LyX Team (this file was created this year)
  *         Copyright 1997 LyX Team (this file was created this year)
- * 
+ *
  * ====================================================== */
 
 #ifndef INSET_REF_H
  * ====================================================== */
 
 #ifndef INSET_REF_H
@@ -19,7 +19,7 @@
 
 struct LaTeXFeatures;
 
 
 struct LaTeXFeatures;
 
-/** The reference inset  
+/** The reference inset
  */
 class InsetRef : public InsetCommand {
 public:
  */
 class InsetRef : public InsetCommand {
 public:
@@ -57,7 +57,7 @@ public:
        bool display() const { return false; }
        ///
        int latex(Buffer const *, std::ostream &,
        bool display() const { return false; }
        ///
        int latex(Buffer const *, std::ostream &,
-                 bool fragile, bool free_spc) const;
+                 bool fragile, bool free_spc) const;
        ///
        int ascii(Buffer const *, std::ostream &, int linelen) const;
        ///
        ///
        int ascii(Buffer const *, std::ostream &, int linelen) const;
        ///
index a3c6e6a717e90f187e8659b2a7a9dd0f86a91fd0..b0488891cd16cb1a5faa1c4278de165466b56a87 100644 (file)
@@ -1,8 +1,8 @@
 /* This file is part of
  * ======================================================
 /* This file is part of
  * ======================================================
- * 
+ *
  *           LyX, The Document Processor
  *           LyX, The Document Processor
- *      
+ *
  *          Copyright 2000-2001 The LyX Team.
  *
  * ======================================================
  *          Copyright 2000-2001 The LyX Team.
  *
  * ======================================================
index 84c9f53bd7cfb1d73606fd4d96202e6bb45b5c77..7375680f86cff3975caff8be16e1de1d3856e89a 100644 (file)
@@ -1,7 +1,7 @@
 // -*- C++ -*-
 /* This file is part of
  * ======================================================
 // -*- C++ -*-
 /* This file is part of
  * ======================================================
- * 
+ *
  *           LyX, The Document Processor
  *
  *           Copyright 2000-2001 The LyX Team.
  *           LyX, The Document Processor
  *
  *           Copyright 2000-2001 The LyX Team.
index 0c03dde33cea8adad5b0a3fd02d71bdd545a99de..2b30693a010a0d33019b38d69ba839a861d036d8 100644 (file)
@@ -1,8 +1,8 @@
 /* This file is part of
  * ======================================================
 /* This file is part of
  * ======================================================
- * 
+ *
  *           LyX, The Document Processor
  *           LyX, The Document Processor
- *      
+ *
  *         Copyright 1997 Asger Alstrup
  *
  * ====================================================== */
  *         Copyright 1997 Asger Alstrup
  *
  * ====================================================== */
@@ -53,7 +53,7 @@ int InsetSpecialChar::width(BufferView *, LyXFont const & font) const
        case HYPHENATION:
        {
                int w = lyxfont::width('-', font);
        case HYPHENATION:
        {
                int w = lyxfont::width('-', font);
-               if (w > 5) 
+               if (w > 5)
                        w -= 2; // to make it look shorter
                return w;
        }
                        w -= 2; // to make it look shorter
                return w;
        }
@@ -77,7 +77,7 @@ int InsetSpecialChar::width(BufferView *, LyXFont const & font) const
        {
                return lyxfont::width('x', font);
        }
        {
                return lyxfont::width('x', font);
        }
-       
+
        }
        return 1; // To shut up gcc
 }
        }
        return 1; // To shut up gcc
 }
@@ -125,12 +125,12 @@ void InsetSpecialChar::draw(BufferView * bv, LyXFont const & f,
                int ox = lyxfont::width(' ', font) + int(x);
                int h = lyxfont::ascent('x', font);
                int xp[4], yp[4];
                int ox = lyxfont::width(' ', font) + int(x);
                int h = lyxfont::ascent('x', font);
                int xp[4], yp[4];
-               
+
                xp[0] = ox;     yp[0] = baseline;
                xp[1] = ox;     yp[1] = baseline - h;
                xp[2] = ox + w; yp[2] = baseline - h/2;
                xp[3] = ox;     yp[3] = baseline;
                xp[0] = ox;     yp[0] = baseline;
                xp[1] = ox;     yp[1] = baseline - h;
                xp[2] = ox + w; yp[2] = baseline - h/2;
                xp[3] = ox;     yp[3] = baseline;
-               
+
                pain.lines(xp, yp, 4, LColor::special);
                x += width(bv, font);
                break;
                pain.lines(xp, yp, 4, LColor::special);
                x += width(bv, font);
                break;
@@ -140,7 +140,7 @@ void InsetSpecialChar::draw(BufferView * bv, LyXFont const & f,
                float w = width(bv, font);
                int h = lyxfont::ascent('x', font);
                int xp[4], yp[4];
                float w = width(bv, font);
                int h = lyxfont::ascent('x', font);
                int xp[4], yp[4];
-               
+
                xp[0] = int(x);
                yp[0] = baseline - max(h / 4, 1);
 
                xp[0] = int(x);
                yp[0] = baseline - max(h / 4, 1);
 
@@ -152,7 +152,7 @@ void InsetSpecialChar::draw(BufferView * bv, LyXFont const & f,
 
                xp[3] = int(x + w);
                yp[3] = baseline - max(h / 4, 1);
 
                xp[3] = int(x + w);
                yp[3] = baseline - max(h / 4, 1);
-               
+
                pain.lines(xp, yp, 4, LColor::special);
                x += w;
                break;
                pain.lines(xp, yp, 4, LColor::special);
                x += w;
                break;
@@ -166,20 +166,20 @@ void InsetSpecialChar::write(Buffer const *, ostream & os) const
 {
        string command;
        switch (kind_) {
 {
        string command;
        switch (kind_) {
-       case HYPHENATION:       
-               command = "\\-";        
+       case HYPHENATION:
+               command = "\\-";
                break;
                break;
-       case LIGATURE_BREAK: 
-               command = "\\textcompwordmark{}"; 
+       case LIGATURE_BREAK:
+               command = "\\textcompwordmark{}";
                break;
                break;
-       case END_OF_SENTENCE:   
+       case END_OF_SENTENCE:
                command = "\\@.";
                break;
        case LDOTS:
                command = "\\@.";
                break;
        case LDOTS:
-               command = "\\ldots{}";  
+               command = "\\ldots{}";
                break;
        case MENU_SEPARATOR:
                break;
        case MENU_SEPARATOR:
-               command = "\\menuseparator"; 
+               command = "\\menuseparator";
                break;
        case PROTECTED_SEPARATOR:
                //command = "\\protected_separator";
                break;
        case PROTECTED_SEPARATOR:
                //command = "\\protected_separator";
@@ -192,7 +192,7 @@ void InsetSpecialChar::write(Buffer const *, ostream & os) const
 
 // This function will not be necessary when lyx3
 void InsetSpecialChar::read(Buffer const *, LyXLex & lex)
 
 // This function will not be necessary when lyx3
 void InsetSpecialChar::read(Buffer const *, LyXLex & lex)
-{    
+{
        lex.nextToken();
        string const command = lex.getString();
 
        lex.nextToken();
        string const command = lex.getString();
 
@@ -205,7 +205,7 @@ void InsetSpecialChar::read(Buffer const *, LyXLex & lex)
        else if (command == "\\ldots{}")
                kind_ = LDOTS;
        else if (command == "\\menuseparator")
        else if (command == "\\ldots{}")
                kind_ = LDOTS;
        else if (command == "\\menuseparator")
-               kind_ = MENU_SEPARATOR;
+               kind_ = MENU_SEPARATOR;
        else if (command == "\\protected_separator"
                 || command == "~")
                kind_ = PROTECTED_SEPARATOR;
        else if (command == "\\protected_separator"
                 || command == "~")
                kind_ = PROTECTED_SEPARATOR;
@@ -218,23 +218,23 @@ int InsetSpecialChar::latex(Buffer const *, ostream & os, bool /*fragile*/,
                            bool free_space) const
 {
        switch (kind_) {
                            bool free_space) const
 {
        switch (kind_) {
-       case HYPHENATION:         
-               os << "\\-";    
+       case HYPHENATION:
+               os << "\\-";
                break;
        case LIGATURE_BREAK:
                os << "\\textcompwordmark{}";
                break;
                break;
        case LIGATURE_BREAK:
                os << "\\textcompwordmark{}";
                break;
-       case END_OF_SENTENCE:     
-               os << "\\@.";   
+       case END_OF_SENTENCE:
+               os << "\\@.";
                break;
                break;
-       case LDOTS:               
-               os << "\\ldots{}";      
+       case LDOTS:
+               os << "\\ldots{}";
                break;
                break;
-       case MENU_SEPARATOR:      
-               os << "\\lyxarrow{}"; 
+       case MENU_SEPARATOR:
+               os << "\\lyxarrow{}";
                break;
                break;
-       case PROTECTED_SEPARATOR: 
-               os << (free_space ? " " : "~"); 
+       case PROTECTED_SEPARATOR:
+               os << (free_space ? " " : "~");
                break;
        }
        return 0;
                break;
        }
        return 0;
@@ -247,16 +247,16 @@ int InsetSpecialChar::ascii(Buffer const *, ostream & os, int) const
        case HYPHENATION:
        case LIGATURE_BREAK:
                break;
        case HYPHENATION:
        case LIGATURE_BREAK:
                break;
-       case END_OF_SENTENCE:     
-               os << ".";      
+       case END_OF_SENTENCE:
+               os << ".";
                break;
                break;
-       case LDOTS:               
-               os << "...";    
+       case LDOTS:
+               os << "...";
                break;
                break;
-       case MENU_SEPARATOR:      
-               os << "->";   
+       case MENU_SEPARATOR:
+               os << "->";
                break;
                break;
-       case PROTECTED_SEPARATOR: 
+       case PROTECTED_SEPARATOR:
                os << " ";
                break;
        }
                os << " ";
                break;
        }
@@ -274,10 +274,10 @@ int InsetSpecialChar::linuxdoc(Buffer const *, ostream & os) const
                os << ".";
                break;
        case LDOTS:
                os << ".";
                break;
        case LDOTS:
-               os << "...";    
+               os << "...";
                break;
                break;
-       case MENU_SEPARATOR:      
-               os << "&lyxarrow;"; 
+       case MENU_SEPARATOR:
+               os << "&lyxarrow;";
                break;
        case PROTECTED_SEPARATOR:
                os << "&nbsp;";
                break;
        case PROTECTED_SEPARATOR:
                os << "&nbsp;";
@@ -297,7 +297,7 @@ int InsetSpecialChar::docbook(Buffer const *, ostream & os) const
                os << ".";
                break;
        case LDOTS:
                os << ".";
                break;
        case LDOTS:
-               os << "...";    
+               os << "...";
                break;
        case MENU_SEPARATOR:
                os << "&lyxarrow;";
                break;
        case MENU_SEPARATOR:
                os << "&lyxarrow;";
index 833256b703350837c30a290c838e9ecf773d6a2f..1f0547d44455a4d46adeeb1f508932acd2423b06 100644 (file)
@@ -1,9 +1,9 @@
 // -*- C++ -*-
 /* This file is part of*
 // -*- C++ -*-
 /* This file is part of*
- * ====================================================== 
+ * ======================================================
  *
  *           LyX, The Document Processor
  *
  *           LyX, The Document Processor
- *      
+ *
  *         Copyright 1997 Asger Alstrup
  *
  * ====================================================== */
  *         Copyright 1997 Asger Alstrup
  *
  * ====================================================== */
@@ -59,7 +59,7 @@ public:
        void write(Buffer const *, std::ostream &) const;
        /// Will not be used when lyxf3
        void read(Buffer const *, LyXLex & lex);
        void write(Buffer const *, std::ostream &) const;
        /// Will not be used when lyxf3
        void read(Buffer const *, LyXLex & lex);
-       /// 
+       ///
        int latex(Buffer const *, std::ostream &,
                  bool fragile, bool free_spc) const;
        ///
        int latex(Buffer const *, std::ostream &,
                  bool fragile, bool free_spc) const;
        ///
@@ -70,19 +70,19 @@ public:
        int docbook(Buffer const *, std::ostream &) const;
        ///
        virtual Inset * clone(Buffer const &, bool same_id = false) const;
        int docbook(Buffer const *, std::ostream &) const;
        ///
        virtual Inset * clone(Buffer const &, bool same_id = false) const;
-       ///  
+       ///
        Inset::Code lyxCode() const
        {
                return Inset::SPECIALCHAR_CODE;
        }
        /// We don't need \begin_inset and \end_inset
        Inset::Code lyxCode() const
        {
                return Inset::SPECIALCHAR_CODE;
        }
        /// We don't need \begin_inset and \end_inset
-       bool directWrite() const 
+       bool directWrite() const
        {
                return true;
        };
        ///
        void validate(LaTeXFeatures &) const;
        {
                return true;
        };
        ///
        void validate(LaTeXFeatures &) const;
-       
+
        // should this inset be handled like a normal charater
        bool isChar() const;
        /// is this equivalent to a letter?
        // should this inset be handled like a normal charater
        bool isChar() const;
        /// is this equivalent to a letter?
index 5ed539c7899539b0d97a90b2ed91867c6d8c0813..9baa61cf251c1de553162507a416d6abcadf14e1 100644 (file)
@@ -1,6 +1,6 @@
 /* This file is part of
  * ======================================================
 /* This file is part of
  * ======================================================
- * 
+ *
  *           LyX, The Document Processor
  *
  *           Copyright 2001 The LyX Team.
  *           LyX, The Document Processor
  *
  *           Copyright 2001 The LyX Team.
@@ -261,13 +261,13 @@ void InsetTabular::draw(BufferView * bv, LyXFont const & font, int baseline,
                x += static_cast<float>(scroll());
 #endif
        if (!cleared && ((need_update == INIT) || (need_update == FULL) ||
                x += static_cast<float>(scroll());
 #endif
        if (!cleared && ((need_update == INIT) || (need_update == FULL) ||
-                        (top_x != int(x)) || (top_baseline != baseline)))
+                        (top_x != int(x)) || (top_baseline != baseline)))
        {
                int h = ascent(bv, font) + descent(bv, font);
                int const tx = display() || !owner() ? 0 : top_x;
                int w =  tx ? width(bv, font) : pain.paperWidth();
                int ty = baseline - ascent(bv, font);
        {
                int h = ascent(bv, font) + descent(bv, font);
                int const tx = display() || !owner() ? 0 : top_x;
                int w =  tx ? width(bv, font) : pain.paperWidth();
                int ty = baseline - ascent(bv, font);
-       
+
                if (ty < 0)
                        ty = 0;
                if ((ty + h) > pain.paperHeight())
                if (ty < 0)
                        ty = 0;
                if ((ty + h) > pain.paperHeight())
@@ -308,7 +308,7 @@ void InsetTabular::draw(BufferView * bv, LyXFont const & font, int baseline,
                                if (hasSelection()) {
                                        drawCellSelection(pain, nx, baseline, i, j, cell);
                                }
                                if (hasSelection()) {
                                        drawCellSelection(pain, nx, baseline, i, j, cell);
                                }
-                               
+
                                tabular->GetCellInset(cell)->draw(bv, font, baseline, cx, cleared);
                                drawCellLines(pain, nx, baseline, i, cell);
                                nx += tabular->GetWidthOfColumn(cell);
                                tabular->GetCellInset(cell)->draw(bv, font, baseline, cx, cleared);
                                drawCellLines(pain, nx, baseline, i, cell);
                                nx += tabular->GetWidthOfColumn(cell);
@@ -376,7 +376,7 @@ void InsetTabular::draw(BufferView * bv, LyXFont const & font, int baseline,
                //
                //  +--------------------+
                //  |         C          |   The rectangles are A, B and C
                //
                //  +--------------------+
                //  |         C          |   The rectangles are A, B and C
-               //  | A |------------| B |   below, origin top left (tx, ty), 
+               //  | A |------------| B |   below, origin top left (tx, ty),
                //  |   |  inset box |   |   dimensions w(idth), h(eight).
                //  +---+------------+---+   x grows rightward, y downward
                //  |         D          |
                //  |   |  inset box |   |   dimensions w(idth), h(eight).
                //  +---+------------+---+   x grows rightward, y downward
                //  |         D          |
@@ -388,10 +388,10 @@ void InsetTabular::draw(BufferView * bv, LyXFont const & font, int baseline,
 #endif
                        // clear before the inset
                        int tx, ty, w, h;
 #endif
                        // clear before the inset
                        int tx, ty, w, h;
-                       tx = nx + 1; 
+                       tx = nx + 1;
                        ty = baseline - tabular->GetAscentOfRow(i) + 1;
                        w = int(cx - nx - 1);
                        ty = baseline - tabular->GetAscentOfRow(i) + 1;
                        w = int(cx - nx - 1);
-                       h = tabular->GetAscentOfRow(i) + 
+                       h = tabular->GetAscentOfRow(i) +
                                tabular->GetDescentOfRow(i) - 1;
                        pain.fillRectangle(tx, ty, w, h, backgroundColor());
                        // clear behind the inset
                                tabular->GetDescentOfRow(i) - 1;
                        pain.fillRectangle(tx, ty, w, h, backgroundColor());
                        // clear behind the inset
@@ -437,11 +437,11 @@ void InsetTabular::draw(BufferView * bv, LyXFont const & font, int baseline,
 
 
 void InsetTabular::drawCellLines(Painter & pain, int x, int baseline,
 
 
 void InsetTabular::drawCellLines(Painter & pain, int x, int baseline,
-                                 int row, int cell) const
+                                int row, int cell) const
 {
        int x2 = x + tabular->GetWidthOfColumn(cell);
        bool on_off;
 {
        int x2 = x + tabular->GetWidthOfColumn(cell);
        bool on_off;
-       
+
        if (!tabular->TopAlreadyDrawed(cell)) {
                on_off = !tabular->TopLine(cell);
                pain.line(x, baseline - tabular->GetAscentOfRow(row),
        if (!tabular->TopAlreadyDrawed(cell)) {
                on_off = !tabular->TopLine(cell);
                pain.line(x, baseline - tabular->GetAscentOfRow(row),
@@ -483,12 +483,12 @@ void InsetTabular::drawCellSelection(Painter & pain, int x, int baseline,
        } else {
                ce = tabular->right_column_of_cell(sel_cell_end);
        }
        } else {
                ce = tabular->right_column_of_cell(sel_cell_end);
        }
-       
+
        int rs = tabular->row_of_cell(sel_cell_start);
        int re = tabular->row_of_cell(sel_cell_end);
        if (rs > re)
                swap(rs, re);
        int rs = tabular->row_of_cell(sel_cell_start);
        int re = tabular->row_of_cell(sel_cell_end);
        if (rs > re)
                swap(rs, re);
-       
+
        if ((column >= cs) && (column <= ce) && (row >= rs) && (row <= re)) {
                int w = tabular->GetWidthOfColumn(cell);
                int h = tabular->GetAscentOfRow(row) + tabular->GetDescentOfRow(row);
        if ((column >= cs) && (column <= ce) && (row >= rs) && (row <= re)) {
                int w = tabular->GetWidthOfColumn(cell);
                int h = tabular->GetAscentOfRow(row) + tabular->GetDescentOfRow(row);
@@ -552,7 +552,7 @@ string const InsetTabular::editMessage() const
 void InsetTabular::edit(BufferView * bv, int x, int y, unsigned int button)
 {
        UpdatableInset::edit(bv, x, y, button);
 void InsetTabular::edit(BufferView * bv, int x, int y, unsigned int button)
 {
        UpdatableInset::edit(bv, x, y, button);
-       
+
        if (!bv->lockInset(this)) {
                lyxerr[Debug::INSETTEXT] << "InsetTabular::Cannot lock inset" << endl;
                return;
        if (!bv->lockInset(this)) {
                lyxerr[Debug::INSETTEXT] << "InsetTabular::Cannot lock inset" << endl;
                return;
@@ -573,7 +573,7 @@ void InsetTabular::edit(BufferView * bv, int x, int y, unsigned int button)
 void InsetTabular::edit(BufferView * bv, bool front)
 {
        UpdatableInset::edit(bv, front);
 void InsetTabular::edit(BufferView * bv, bool front)
 {
        UpdatableInset::edit(bv, front);
-       
+
        if (!bv->lockInset(this)) {
                lyxerr[Debug::INSETTEXT] << "InsetTabular::Cannot lock inset" << endl;
                return;
        if (!bv->lockInset(this)) {
                lyxerr[Debug::INSETTEXT] << "InsetTabular::Cannot lock inset" << endl;
                return;
@@ -612,7 +612,7 @@ void InsetTabular::insetUnlock(BufferView * bv)
 
 
 void InsetTabular::updateLocal(BufferView * bv, UpdateCodes what,
 
 
 void InsetTabular::updateLocal(BufferView * bv, UpdateCodes what,
-                               bool mark_dirty) const
+                              bool mark_dirty) const
 {
        if (what == INIT) {
                LyXFont font;
 {
        if (what == INIT) {
                LyXFont font;
@@ -821,7 +821,7 @@ void InsetTabular::insetButtonPress(BufferView * bv, int x, int y, int button)
 
 
 bool InsetTabular::insetButtonRelease(BufferView * bv,
 
 
 bool InsetTabular::insetButtonRelease(BufferView * bv,
-                                      int x, int y, int button)
+                                     int x, int y, int button)
 {
        bool ret = false;
        if (the_locking_inset)
 {
        bool ret = false;
        if (the_locking_inset)
@@ -844,10 +844,10 @@ void InsetTabular::insetMotionNotify(BufferView * bv, int x, int y, int button)
                                                     button);
                return;
        }
                                                     button);
                return;
        }
+
        hideInsetCursor(bv);
 //     int const old_cell = actcell;
        hideInsetCursor(bv);
 //     int const old_cell = actcell;
-       
+
        setPos(bv, x, y);
        if (!hasSelection()) {
                setSelection(actcell, actcell);
        setPos(bv, x, y);
        if (!hasSelection()) {
                setSelection(actcell, actcell);
@@ -870,9 +870,9 @@ void InsetTabular::insetKeyPress(XKeyEvent * xke)
 
 UpdatableInset::RESULT
 InsetTabular::localDispatch(BufferView * bv, kb_action action,
 
 UpdatableInset::RESULT
 InsetTabular::localDispatch(BufferView * bv, kb_action action,
-                            string const & arg)
+                           string const & arg)
 {
 {
-       // We need to save the value of the_locking_inset as the call to 
+       // We need to save the value of the_locking_inset as the call to
        // the_locking_inset->LocalDispatch might unlock it.
        old_locking_inset = the_locking_inset;
        UpdatableInset::RESULT result =
        // the_locking_inset->LocalDispatch might unlock it.
        old_locking_inset = the_locking_inset;
        UpdatableInset::RESULT result =
@@ -949,7 +949,7 @@ InsetTabular::localDispatch(BufferView * bv, kb_action action,
                        setSelection(start, actcell);
                        break;
                }
                        setSelection(start, actcell);
                        break;
                }
-               
+
                int end = actcell;
                // if we are starting a selection, only select
                // the current cell at the beginning
                int end = actcell;
                // if we are starting a selection, only select
                // the current cell at the beginning
@@ -973,11 +973,11 @@ InsetTabular::localDispatch(BufferView * bv, kb_action action,
                        setSelection(start, actcell);
                        break;
                }
                        setSelection(start, actcell);
                        break;
                }
+
                int end = actcell;
                // if we are starting a selection, only select
                // the current cell at the beginning
                int end = actcell;
                // if we are starting a selection, only select
                // the current cell at the beginning
-               if (hasSelection()) { 
+               if (hasSelection()) {
                        moveLeft(bv, false);
                        end = actcell;
                }
                        moveLeft(bv, false);
                        end = actcell;
                }
@@ -1090,7 +1090,7 @@ InsetTabular::localDispatch(BufferView * bv, kb_action action,
        case LFUN_NEXTSEL:
        case LFUN_WORDLEFT:
        case LFUN_WORDLEFTSEL:
        case LFUN_NEXTSEL:
        case LFUN_WORDLEFT:
        case LFUN_WORDLEFTSEL:
-       case LFUN_WORDRIGHT: 
+       case LFUN_WORDRIGHT:
        case LFUN_WORDRIGHTSEL:
        case LFUN_DOWN_PARAGRAPH:
        case LFUN_DOWN_PARAGRAPHSEL:
        case LFUN_WORDRIGHTSEL:
        case LFUN_DOWN_PARAGRAPH:
        case LFUN_DOWN_PARAGRAPHSEL:
@@ -1103,7 +1103,7 @@ InsetTabular::localDispatch(BufferView * bv, kb_action action,
        case LFUN_END:
        case LFUN_ENDSEL:
        case LFUN_BEGINNINGBUF:
        case LFUN_END:
        case LFUN_ENDSEL:
        case LFUN_BEGINNINGBUF:
-       case LFUN_BEGINNINGBUFSEL: 
+       case LFUN_BEGINNINGBUFSEL:
        case LFUN_ENDBUF:
        case LFUN_ENDBUFSEL:
                break;
        case LFUN_ENDBUF:
        case LFUN_ENDBUFSEL:
                break;
@@ -1116,7 +1116,7 @@ InsetTabular::localDispatch(BufferView * bv, kb_action action,
                break;
                // insert file functions
        case LFUN_FILE_INSERT_ASCII_PARA:
                break;
                // insert file functions
        case LFUN_FILE_INSERT_ASCII_PARA:
-       case LFUN_FILE_INSERT_ASCII: 
+       case LFUN_FILE_INSERT_ASCII:
        {
                string tmpstr = getContentsOfAsciiFile(bv, arg, false);
                if (tmpstr.empty())
        {
                string tmpstr = getContentsOfAsciiFile(bv, arg, false);
                if (tmpstr.empty())
@@ -1132,8 +1132,8 @@ InsetTabular::localDispatch(BufferView * bv, kb_action action,
                if (!copySelection(bv))
                        break;
                setUndo(bv, Undo::DELETE,
                if (!copySelection(bv))
                        break;
                setUndo(bv, Undo::DELETE,
-                       bv->text->cursor.par(),
-                       bv->text->cursor.par()->next());
+                       bv->text->cursor.par(),
+                       bv->text->cursor.par()->next());
                cutSelection();
                updateLocal(bv, INIT, true);
                break;
                cutSelection();
                updateLocal(bv, INIT, true);
                break;
@@ -1217,8 +1217,8 @@ InsetTabular::localDispatch(BufferView * bv, kb_action action,
        case LFUN_PASTE:
                if (hasPasteBuffer()) {
                        setUndo(bv, Undo::INSERT,
        case LFUN_PASTE:
                if (hasPasteBuffer()) {
                        setUndo(bv, Undo::INSERT,
-                               bv->text->cursor.par(),
-                               bv->text->cursor.par()->next());
+                               bv->text->cursor.par(),
+                               bv->text->cursor.par()->next());
                        pasteSelection(bv);
                        updateLocal(bv, INIT, true);
                        break;
                        pasteSelection(bv);
                        updateLocal(bv, INIT, true);
                        break;
@@ -1285,7 +1285,7 @@ InsetTabular::localDispatch(BufferView * bv, kb_action action,
 
 
 int InsetTabular::latex(Buffer const * buf, ostream & os,
 
 
 int InsetTabular::latex(Buffer const * buf, ostream & os,
-                        bool fragile, bool fp) const
+                       bool fragile, bool fp) const
 {
        return tabular->latex(buf, os, fragile, fp);
 }
 {
        return tabular->latex(buf, os, fragile, fp);
 }
@@ -1295,7 +1295,7 @@ int InsetTabular::ascii(Buffer const * buf, ostream & os, int ll) const
 {
        if (ll > 0)
                return tabular->ascii(buf, os, (int)parOwner()->params().depth(),
 {
        if (ll > 0)
                return tabular->ascii(buf, os, (int)parOwner()->params().depth(),
-                                     false,0);
+                                     false,0);
        return tabular->ascii(buf, os, 0, false,0);
 }
 
        return tabular->ascii(buf, os, 0, false,0);
 }
 
@@ -1342,15 +1342,15 @@ void InsetTabular::validate(LaTeXFeatures & features) const
 
 
 bool InsetTabular::calculate_dimensions_of_cells(BufferView * bv,
 
 
 bool InsetTabular::calculate_dimensions_of_cells(BufferView * bv,
-                                                 LyXFont const & font,
-                                                 bool reinit) const
+                                                LyXFont const & font,
+                                                bool reinit) const
 {
        int cell = -1;
        int maxAsc = 0;
        int maxDesc = 0;
        InsetText * inset;
        bool changed = false;
 {
        int cell = -1;
        int maxAsc = 0;
        int maxDesc = 0;
        InsetText * inset;
        bool changed = false;
-       
+
        // if we have a locking_inset we should have to check only this cell for
        // change so I'll try this to have a boost, but who knows ;)
        if ((need_update != INIT) &&
        // if we have a locking_inset we should have to check only this cell for
        // change so I'll try this to have a boost, but who knows ;)
        if ((need_update != INIT) &&
@@ -1411,12 +1411,12 @@ void InsetTabular::toggleInsetCursor(BufferView * bv)
                the_locking_inset->toggleInsetCursor(bv);
                return;
        }
                the_locking_inset->toggleInsetCursor(bv);
                return;
        }
-       
+
        LyXFont font; // = the_locking_inset->GetFont(par, cursor.pos);
        LyXFont font; // = the_locking_inset->GetFont(par, cursor.pos);
-       
+
        int const asc = lyxfont::maxAscent(font);
        int const desc = lyxfont::maxDescent(font);
        int const asc = lyxfont::maxAscent(font);
        int const desc = lyxfont::maxDescent(font);
-       
+
        if (isCursorVisible())
                bv->hideLockedInsetCursor();
        else
        if (isCursorVisible())
                bv->hideLockedInsetCursor();
        else
@@ -1431,7 +1431,7 @@ void InsetTabular::showInsetCursor(BufferView * bv, bool show)
                return;
        if (!isCursorVisible()) {
                LyXFont font; // = GetFont(par, cursor.pos);
                return;
        if (!isCursorVisible()) {
                LyXFont font; // = GetFont(par, cursor.pos);
-       
+
                int const asc = lyxfont::maxAscent(font);
                int const desc = lyxfont::maxDescent(font);
                bv->fitLockedInsetCursor(cursor_.x(), cursor_.y(), asc, desc);
                int const asc = lyxfont::maxAscent(font);
                int const desc = lyxfont::maxDescent(font);
                bv->fitLockedInsetCursor(cursor_.x(), cursor_.y(), asc, desc);
@@ -1458,7 +1458,7 @@ void InsetTabular::fitInsetCursor(BufferView * bv) const
                return;
        }
        LyXFont font;
                return;
        }
        LyXFont font;
-       
+
        int const asc = lyxfont::maxAscent(font);
        int const desc = lyxfont::maxDescent(font);
        bv->fitLockedInsetCursor(cursor_.x(), cursor_.y(), asc, desc);
        int const asc = lyxfont::maxAscent(font);
        int const desc = lyxfont::maxDescent(font);
        bv->fitLockedInsetCursor(cursor_.x(), cursor_.y(), asc, desc);
@@ -1468,7 +1468,7 @@ void InsetTabular::fitInsetCursor(BufferView * bv) const
 void InsetTabular::setPos(BufferView * bv, int x, int y) const
 {
        cursor_.y(0);
 void InsetTabular::setPos(BufferView * bv, int x, int y) const
 {
        cursor_.y(0);
-       
+
        actcell = actrow = actcol = 0;
        int ly = tabular->GetDescentOfRow(actrow);
 
        actcell = actrow = actcol = 0;
        int ly = tabular->GetDescentOfRow(actrow);
 
@@ -1497,7 +1497,7 @@ void InsetTabular::setPos(BufferView * bv, int x, int y) const
 int InsetTabular::getCellXPos(int cell) const
 {
        int c = cell;
 int InsetTabular::getCellXPos(int cell) const
 {
        int c = cell;
-       
+
        for (; !tabular->IsFirstCellInRow(c); --c)
                ;
        int lx = tabular->GetWidthOfColumn(cell);
        for (; !tabular->IsFirstCellInRow(c); --c)
                ;
        int lx = tabular->GetWidthOfColumn(cell);
@@ -1729,15 +1729,15 @@ bool InsetTabular::deletable() const
 
 
 void InsetTabular::setFont(BufferView * bv, LyXFont const & font, bool tall,
 
 
 void InsetTabular::setFont(BufferView * bv, LyXFont const & font, bool tall,
-                           bool selectall)
+                          bool selectall)
 {
        if (selectall) {
                setSelection(0, tabular->GetNumberOfCells() - 1);
        }
        if (hasSelection()) {
                setUndo(bv, Undo::EDIT,
 {
        if (selectall) {
                setSelection(0, tabular->GetNumberOfCells() - 1);
        }
        if (hasSelection()) {
                setUndo(bv, Undo::EDIT,
-                       bv->text->cursor.par(),
-                       bv->text->cursor.par()->next());
+                       bv->text->cursor.par(),
+                       bv->text->cursor.par()->next());
                bool frozen = undo_frozen;
                if (!frozen)
                        freezeUndo();
                bool frozen = undo_frozen;
                if (!frozen)
                        freezeUndo();
@@ -1764,11 +1764,11 @@ void InsetTabular::setFont(BufferView * bv, LyXFont const & font, bool tall,
 bool InsetTabular::tabularFeatures(BufferView * bv, string const & what)
 {
        LyXTabular::Feature action = LyXTabular::LAST_ACTION;
 bool InsetTabular::tabularFeatures(BufferView * bv, string const & what)
 {
        LyXTabular::Feature action = LyXTabular::LAST_ACTION;
-       
+
        int i = 0;
        for (; tabularFeature[i].action != LyXTabular::LAST_ACTION; ++i) {
                string const tmp = tabularFeature[i].feature;
        int i = 0;
        for (; tabularFeature[i].action != LyXTabular::LAST_ACTION; ++i) {
                string const tmp = tabularFeature[i].feature;
-               
+
                if (tmp == what.substr(0, tmp.length())) {
                        //if (!compare(tabularFeatures[i].feature.c_str(), what.c_str(),
                        //tabularFeatures[i].feature.length())) {
                if (tmp == what.substr(0, tmp.length())) {
                        //if (!compare(tabularFeatures[i].feature.c_str(), what.c_str(),
                        //tabularFeatures[i].feature.length())) {
@@ -1786,7 +1786,7 @@ bool InsetTabular::tabularFeatures(BufferView * bv, string const & what)
 }
 
 static void checkLongtableSpecial(LyXTabular::ltType & ltt,
 }
 
 static void checkLongtableSpecial(LyXTabular::ltType & ltt,
-                                  string const & special, bool & flag)
+                                 string const & special, bool & flag)
 {
        if (special == "dl_above") {
                ltt.topDL = flag;
 {
        if (special == "dl_above") {
                ltt.topDL = flag;
@@ -1805,8 +1805,8 @@ static void checkLongtableSpecial(LyXTabular::ltType & ltt,
 
 
 void InsetTabular::tabularFeatures(BufferView * bv,
 
 
 void InsetTabular::tabularFeatures(BufferView * bv,
-                                   LyXTabular::Feature feature,
-                                   string const & value)
+                                  LyXTabular::Feature feature,
+                                  string const & value)
 {
        int sel_col_start;
        int sel_col_end;
 {
        int sel_col_start;
        int sel_col_end;
@@ -1851,20 +1851,20 @@ void InsetTabular::tabularFeatures(BufferView * bv,
                sel_row_start = sel_row_end = tabular->row_of_cell(actcell);
        }
        setUndo(bv, Undo::FINISH,
                sel_row_start = sel_row_end = tabular->row_of_cell(actcell);
        }
        setUndo(bv, Undo::FINISH,
-               bv->text->cursor.par(),
-               bv->text->cursor.par()->next());
+               bv->text->cursor.par(),
+               bv->text->cursor.par()->next());
 
        int row =  tabular->row_of_cell(actcell);
        int column = tabular->column_of_cell(actcell);
        bool flag = true;
        LyXTabular::ltType ltt;
 
        int row =  tabular->row_of_cell(actcell);
        int column = tabular->column_of_cell(actcell);
        bool flag = true;
        LyXTabular::ltType ltt;
-       
+
        switch (feature) {
        case LyXTabular::SET_PWIDTH:
        {
                LyXLength const vallen(value);
                LyXLength const & tmplen = tabular->GetColumnPWidth(actcell);
        switch (feature) {
        case LyXTabular::SET_PWIDTH:
        {
                LyXLength const vallen(value);
                LyXLength const & tmplen = tabular->GetColumnPWidth(actcell);
-               
+
                bool const update = (tmplen != vallen);
                tabular->SetColumnPWidth(actcell, vallen);
                if (update) {
                bool const update = (tmplen != vallen);
                tabular->SetColumnPWidth(actcell, vallen);
                if (update) {
@@ -1881,7 +1881,7 @@ void InsetTabular::tabularFeatures(BufferView * bv,
        {
                LyXLength const vallen(value);
                LyXLength const & tmplen = tabular->GetPWidth(actcell);
        {
                LyXLength const vallen(value);
                LyXLength const & tmplen = tabular->GetPWidth(actcell);
-               
+
                bool const update = (tmplen != vallen);
                tabular->SetMColumnPWidth(actcell, vallen);
                if (update) {
                bool const update = (tmplen != vallen);
                tabular->SetMColumnPWidth(actcell, vallen);
                if (update) {
@@ -1946,12 +1946,12 @@ void InsetTabular::tabularFeatures(BufferView * bv,
                updateLocal(bv, INIT, true);
                break;
        }
                updateLocal(bv, INIT, true);
                break;
        }
-       
+
        case LyXTabular::M_TOGGLE_LINE_BOTTOM:
                flag = false;
        case LyXTabular::TOGGLE_LINE_BOTTOM:
        {
        case LyXTabular::M_TOGGLE_LINE_BOTTOM:
                flag = false;
        case LyXTabular::TOGGLE_LINE_BOTTOM:
        {
-               bool lineSet = !tabular->BottomLine(actcell, flag); 
+               bool lineSet = !tabular->BottomLine(actcell, flag);
                for (int i = sel_row_start; i <= sel_row_end; ++i)
                        for (int j = sel_col_start; j <= sel_col_end; ++j)
                                tabular->SetBottomLine(
                for (int i = sel_row_start; i <= sel_row_end; ++i)
                        for (int j = sel_col_start; j <= sel_col_end; ++j)
                                tabular->SetBottomLine(
@@ -1961,7 +1961,7 @@ void InsetTabular::tabularFeatures(BufferView * bv,
                updateLocal(bv, INIT, true);
                break;
        }
                updateLocal(bv, INIT, true);
                break;
        }
-       
+
        case LyXTabular::M_TOGGLE_LINE_LEFT:
                flag = false;
        case LyXTabular::TOGGLE_LINE_LEFT:
        case LyXTabular::M_TOGGLE_LINE_LEFT:
                flag = false;
        case LyXTabular::TOGGLE_LINE_LEFT:
@@ -1976,7 +1976,7 @@ void InsetTabular::tabularFeatures(BufferView * bv,
                updateLocal(bv, INIT, true);
                break;
        }
                updateLocal(bv, INIT, true);
                break;
        }
-       
+
        case LyXTabular::M_TOGGLE_LINE_RIGHT:
                flag = false;
        case LyXTabular::TOGGLE_LINE_RIGHT:
        case LyXTabular::M_TOGGLE_LINE_RIGHT:
                flag = false;
        case LyXTabular::TOGGLE_LINE_RIGHT:
@@ -1991,7 +1991,7 @@ void InsetTabular::tabularFeatures(BufferView * bv,
                updateLocal(bv, INIT, true);
                break;
        }
                updateLocal(bv, INIT, true);
                break;
        }
-       
+
        case LyXTabular::M_ALIGN_LEFT:
        case LyXTabular::M_ALIGN_RIGHT:
        case LyXTabular::M_ALIGN_CENTER:
        case LyXTabular::M_ALIGN_LEFT:
        case LyXTabular::M_ALIGN_RIGHT:
        case LyXTabular::M_ALIGN_CENTER:
@@ -2024,8 +2024,8 @@ void InsetTabular::tabularFeatures(BufferView * bv,
        case LyXTabular::MULTICOLUMN:
        {
                if (sel_row_start != sel_row_end) {
        case LyXTabular::MULTICOLUMN:
        {
                if (sel_row_start != sel_row_end) {
-                       Alert::alert(_("Impossible Operation!"), 
-                                  _("Multicolumns can only be horizontally."), 
+                       Alert::alert(_("Impossible Operation!"),
+                                  _("Multicolumns can only be horizontally."),
                                   _("Sorry."));
                        return;
                }
                                   _("Sorry."));
                        return;
                }
@@ -2189,7 +2189,7 @@ bool InsetTabular::insetHit(BufferView *, int x, int) const
 int InsetTabular::getMaxWidthOfCell(BufferView * bv, int cell) const
 {
        LyXLength const len = tabular->GetPWidth(cell);
 int InsetTabular::getMaxWidthOfCell(BufferView * bv, int cell) const
 {
        LyXLength const len = tabular->GetPWidth(cell);
-       
+
        if (len.zero())
                return -1;
        return len.inPixels(latexTextWidth(bv), bv->text->defaultHeight());
        if (len.zero())
                return -1;
        return len.inPixels(latexTextWidth(bv), bv->text->defaultHeight());
@@ -2197,7 +2197,7 @@ int InsetTabular::getMaxWidthOfCell(BufferView * bv, int cell) const
 
 
 int InsetTabular::getMaxWidth(BufferView * bv,
 
 
 int InsetTabular::getMaxWidth(BufferView * bv,
-                              UpdatableInset const * inset) const
+                             UpdatableInset const * inset) const
 {
        int cell = tabular->GetCellFromInset(inset, actcell);
 
 {
        int cell = tabular->GetCellFromInset(inset, actcell);
 
@@ -2206,13 +2206,13 @@ int InsetTabular::getMaxWidth(BufferView * bv,
                       << endl;
                return -1;
        }
                       << endl;
                return -1;
        }
-       
+
        int w = getMaxWidthOfCell(bv, cell);
        if (w > 0) {
                // because the inset then subtracts it's top_x and owner->x()
                w += (inset->x() - top_x);
        }
        int w = getMaxWidthOfCell(bv, cell);
        if (w > 0) {
                // because the inset then subtracts it's top_x and owner->x()
                w += (inset->x() - top_x);
        }
-       
+
        return w;
 }
 
        return w;
 }
 
@@ -2237,7 +2237,7 @@ void InsetTabular::resizeLyXText(BufferView * bv, bool force) const
 
 
 LyXText * InsetTabular::getLyXText(BufferView const * bv,
 
 
 LyXText * InsetTabular::getLyXText(BufferView const * bv,
-                                   bool const recursive) const
+                                  bool const recursive) const
 {
        if (the_locking_inset)
                return the_locking_inset->getLyXText(bv, recursive);
 {
        if (the_locking_inset)
                return the_locking_inset->getLyXText(bv, recursive);
@@ -2286,11 +2286,11 @@ FuncStatus InsetTabular::getStatus(string const & what) const
 {
        int action = LyXTabular::LAST_ACTION;
        FuncStatus status;
 {
        int action = LyXTabular::LAST_ACTION;
        FuncStatus status;
-       
+
        int i = 0;
        for (; tabularFeature[i].action != LyXTabular::LAST_ACTION; ++i) {
                string const tmp = tabularFeature[i].feature;
        int i = 0;
        for (; tabularFeature[i].action != LyXTabular::LAST_ACTION; ++i) {
                string const tmp = tabularFeature[i].feature;
-               if (tmp == what.substr(0, tmp.length())) {                  
+               if (tmp == what.substr(0, tmp.length())) {
                        //if (!compare(tabularFeatures[i].feature.c_str(), what.c_str(),
                        //   tabularFeatures[i].feature.length())) {
                        action = tabularFeature[i].action;
                        //if (!compare(tabularFeatures[i].feature.c_str(), what.c_str(),
                        //   tabularFeatures[i].feature.length())) {
                        action = tabularFeature[i].action;
@@ -2301,7 +2301,7 @@ FuncStatus InsetTabular::getStatus(string const & what) const
                status.clear();
                return status.unknown(true);
        }
                status.clear();
                return status.unknown(true);
        }
-       
+
        string const argument = frontStrip(what.substr(tabularFeature[i].feature.length()));
 
        int sel_row_start;
        string const argument = frontStrip(what.substr(tabularFeature[i].feature.length()));
 
        int sel_row_start;
@@ -2477,7 +2477,7 @@ bool InsetTabular::copySelection(BufferView * bv)
 
        ostringstream sstr;
        paste_tabular->ascii(bv->buffer(), sstr,
 
        ostringstream sstr;
        paste_tabular->ascii(bv->buffer(), sstr,
-                            (int)parOwner()->params().depth(), true, '\t');
+                            (int)parOwner()->params().depth(), true, '\t');
        bv->stuffClipboard(sstr.str().c_str());
        return true;
 }
        bv->stuffClipboard(sstr.str().c_str());
        return true;
 }
@@ -2582,7 +2582,7 @@ void InsetTabular::getSelection(int & srow, int & erow,
 {
        int const start = hasSelection() ? sel_cell_start : actcell;
        int const end = hasSelection() ? sel_cell_end : actcell;
 {
        int const start = hasSelection() ? sel_cell_start : actcell;
        int const end = hasSelection() ? sel_cell_end : actcell;
+
        srow = tabular->row_of_cell(start);
        erow = tabular->row_of_cell(end);
        if (srow > erow) {
        srow = tabular->row_of_cell(start);
        erow = tabular->row_of_cell(end);
        if (srow > erow) {
@@ -2694,7 +2694,7 @@ string InsetTabular::selectNextWordInt(BufferView * bv, float & value) const
                bv->unlockInset(const_cast<InsetTabular *>(this));
                return string();
        }
                bv->unlockInset(const_cast<InsetTabular *>(this));
                return string();
        }
-       
+
        // otherwise we have to lock the next inset and ask for it's selecttion
        UpdatableInset * inset =
                static_cast<UpdatableInset*>(tabular->GetCellInset(++actcell));
        // otherwise we have to lock the next inset and ask for it's selecttion
        UpdatableInset * inset =
                static_cast<UpdatableInset*>(tabular->GetCellInset(++actcell));
@@ -2722,7 +2722,7 @@ void InsetTabular::toggleSelection(BufferView * bv, bool kill_selection)
 
 
 bool InsetTabular::searchForward(BufferView * bv, string const & str,
 
 
 bool InsetTabular::searchForward(BufferView * bv, string const & str,
-                                 bool cs, bool mw)
+                                bool cs, bool mw)
 {
        nodraw(true);
        if (the_locking_inset) {
 {
        nodraw(true);
        if (the_locking_inset) {
@@ -2750,7 +2750,7 @@ bool InsetTabular::searchForward(BufferView * bv, string const & str,
 
 
 bool InsetTabular::searchBackward(BufferView * bv, string const & str,
 
 
 bool InsetTabular::searchBackward(BufferView * bv, string const & str,
-                               bool cs, bool mw)
+                              bool cs, bool mw)
 {
        nodraw(true);
        if (the_locking_inset) {
 {
        nodraw(true);
        if (the_locking_inset) {
@@ -2800,11 +2800,11 @@ bool InsetTabular::forceDefaultParagraphs(Inset const * in) const
 }
 
 bool InsetTabular::insertAsciiString(BufferView * bv, string const & buf,
 }
 
 bool InsetTabular::insertAsciiString(BufferView * bv, string const & buf,
-                                     bool usePaste)
+                                    bool usePaste)
 {
        if (buf.find('\t') == string::npos)
                return false;
 {
        if (buf.find('\t') == string::npos)
                return false;
-       
+
        int cols = 1;
        int rows = 1;
        int maxCols = 1;
        int cols = 1;
        int rows = 1;
        int maxCols = 1;
@@ -2835,7 +2835,7 @@ bool InsetTabular::insertAsciiString(BufferView * bv, string const & buf,
        if (usePaste) {
                delete paste_tabular;
                paste_tabular = new LyXTabular(bv->buffer()->params,
        if (usePaste) {
                delete paste_tabular;
                paste_tabular = new LyXTabular(bv->buffer()->params,
-                                              this, rows, maxCols);
+                                              this, rows, maxCols);
                loctab = paste_tabular;
                cols = 0;
        } else {
                loctab = paste_tabular;
                cols = 0;
        } else {
@@ -2880,6 +2880,6 @@ bool InsetTabular::insertAsciiString(BufferView * bv, string const & buf,
        // check for the last cell if there is no trailing '\n'
        if ((cell < cells) && (op < len))
                loctab->GetCellInset(cell)->setText(buf.substr(op, len-op));
        // check for the last cell if there is no trailing '\n'
        if ((cell < cells) && (op < len))
                loctab->GetCellInset(cell)->setText(buf.substr(op, len-op));
-       
+
        return true;
 }
        return true;
 }
index 8b0d554847e538e052beb7339eee9c7a0a041ffe..29689b89a947985e379011acae2f24b2222cbfcc 100644 (file)
@@ -1,7 +1,7 @@
 // -*- C++ -*-
 /* This file is part of
  * ======================================================
 // -*- C++ -*-
 /* This file is part of
  * ======================================================
- * 
+ *
  *           LyX, The Document Processor
  *
  *           Copyright 1995-2001 The LyX Team.
  *           LyX, The Document Processor
  *
  *           Copyright 1995-2001 The LyX Team.
@@ -166,7 +166,7 @@ public:
        int getActCell() const { return actcell; }
        ///
        void setFont(BufferView *, LyXFont const &, bool toggleall = false,
        int getActCell() const { return actcell; }
        ///
        void setFont(BufferView *, LyXFont const &, bool toggleall = false,
-                    bool selectall = false);
+                    bool selectall = false);
        ///
        int getMaxWidth(BufferView *, UpdatableInset const *) const;
        ///
        ///
        int getMaxWidth(BufferView *, UpdatableInset const *) const;
        ///
@@ -218,14 +218,14 @@ public:
        void toggleSelection(BufferView *, bool kill_selection);
        ///
        bool searchForward(BufferView *, string const &,
        void toggleSelection(BufferView *, bool kill_selection);
        ///
        bool searchForward(BufferView *, string const &,
-                          bool = true, bool = false);
+                          bool = true, bool = false);
        bool searchBackward(BufferView *, string const &,
        bool searchBackward(BufferView *, string const &,
-                           bool = true, bool = false);
+                           bool = true, bool = false);
 
        // this should return true if we have a "normal" cell, otherwise true.
        // "normal" means without width set!
        bool forceDefaultParagraphs(Inset const * in) const;
 
        // this should return true if we have a "normal" cell, otherwise true.
        // "normal" means without width set!
        bool forceDefaultParagraphs(Inset const * in) const;
-       
+
        //
        // Public structures and variables
        ///
        //
        // Public structures and variables
        ///
@@ -313,7 +313,7 @@ private:
        string selectNextWordInt(BufferView *, float & value) const;
        ///
        bool insertAsciiString(BufferView *, string const & buf, bool usePaste);
        string selectNextWordInt(BufferView *, float & value) const;
        ///
        bool insertAsciiString(BufferView *, string const & buf, bool usePaste);
-       
+
        //
        // Private structures and variables
        ///
        //
        // Private structures and variables
        ///
index 6b28eab05d150d23daad139eb1efb42a79d17274..15fb20da4257521e3ea947f27a6f7ea0e4349c82 100644 (file)
@@ -1,6 +1,6 @@
 /* This file is part of
  * ======================================================
 /* This file is part of
  * ======================================================
- * 
+ *
  *           LyX, The Document Processor
  *
  *           Copyright 1998-2001 The LyX Team.
  *           LyX, The Document Processor
  *
  *           Copyright 1998-2001 The LyX Team.
@@ -82,7 +82,7 @@ void InsetText::saveLyXTextState(LyXText * t) const
                        break;
                p = p->next();
        }
                        break;
                p = p->next();
        }
-       
+
        if (p && t->cursor.pos() <= p->size()) {
                sstate.lpar = t->cursor.par();
                sstate.pos = t->cursor.pos();
        if (p && t->cursor.pos() <= p->size()) {
                sstate.lpar = t->cursor.par();
                sstate.pos = t->cursor.pos();
@@ -110,10 +110,10 @@ void InsetText::restoreLyXTextState(BufferView * bv, LyXText * t) const
                t->selection.mark(sstate.mark_set);
                if (sstate.selection) {
                        t->setCursor(bv, sstate.selstartpar, sstate.selstartpos,
                t->selection.mark(sstate.mark_set);
                if (sstate.selection) {
                        t->setCursor(bv, sstate.selstartpar, sstate.selstartpos,
-                                    true, sstate.selstartboundary);
+                                    true, sstate.selstartboundary);
                        t->selection.cursor = t->cursor;
                        t->setCursor(bv, sstate.selendpar, sstate.selendpos,
                        t->selection.cursor = t->cursor;
                        t->setCursor(bv, sstate.selendpar, sstate.selendpos,
-                                    true, sstate.selendboundary);
+                                    true, sstate.selendboundary);
                        t->setSelection(bv);
                        t->setCursor(bv, sstate.lpar, sstate.pos);
                } else {
                        t->setSelection(bv);
                        t->setCursor(bv, sstate.lpar, sstate.pos);
                } else {
@@ -140,7 +140,7 @@ InsetText::InsetText(BufferParams const & bp)
 {
        par = new Paragraph;
        par->layout(textclasslist[bp.textclass].defaultLayoutName());
 {
        par = new Paragraph;
        par->layout(textclasslist[bp.textclass].defaultLayoutName());
-       
+
        init();
 }
 
        init();
 }
 
@@ -206,7 +206,7 @@ InsetText::~InsetText()
        cached_bview = 0;
 
        // NOTE
        cached_bview = 0;
 
        // NOTE
-       
+
        while (par) {
                Paragraph * tmp = par->next();
                delete par;
        while (par) {
                Paragraph * tmp = par->next();
                delete par;
@@ -219,7 +219,7 @@ void InsetText::clear()
 {
        // This is a gross hack...
        string old_layout = par->layout();
 {
        // This is a gross hack...
        string old_layout = par->layout();
-       
+
        while (par) {
                Paragraph * tmp = par->next();
                delete par;
        while (par) {
                Paragraph * tmp = par->next();
                delete par;
@@ -228,7 +228,7 @@ void InsetText::clear()
        par = new Paragraph;
        par->setInsetOwner(this);
        par->layout(old_layout);
        par = new Paragraph;
        par->setInsetOwner(this);
        par->layout(old_layout);
-       
+
        reinitLyXText();
        need_update = INIT;
 }
        reinitLyXText();
        need_update = INIT;
 }
@@ -258,11 +258,11 @@ void InsetText::read(Buffer const * buf, LyXLex & lex)
        string token;
        int pos = 0;
        Paragraph * return_par = 0;
        string token;
        int pos = 0;
        Paragraph * return_par = 0;
-       Paragraph::depth_type depth = 0; 
+       Paragraph::depth_type depth = 0;
        LyXFont font(LyXFont::ALL_INHERIT);
 
        clear();
        LyXFont font(LyXFont::ALL_INHERIT);
 
        clear();
-       
+
        while (lex.isOK()) {
                lex.nextToken();
                token = lex.getString();
        while (lex.isOK()) {
                lex.nextToken();
                token = lex.getString();
@@ -274,7 +274,7 @@ void InsetText::read(Buffer const * buf, LyXLex & lex)
 #endif
                        break;
                }
 #endif
                        break;
                }
-               
+
                if (const_cast<Buffer*>(buf)->
                        parseSingleLyXformat2Token(lex, par, return_par,
                                                   token, pos, depth, font)) {
                if (const_cast<Buffer*>(buf)->
                        parseSingleLyXformat2Token(lex, par, return_par,
                                                   token, pos, depth, font)) {
@@ -290,7 +290,7 @@ void InsetText::read(Buffer const * buf, LyXLex & lex)
                return_par->setInsetOwner(this);
                return_par = return_par->next();
        }
                return_par->setInsetOwner(this);
                return_par = return_par->next();
        }
-       
+
        if (token != "\\end_inset") {
                lex.printError("Missing \\end_inset at this point. "
                                           "Read: `$$Token'");
        if (token != "\\end_inset") {
                lex.printError("Missing \\end_inset at this point. "
                                           "Read: `$$Token'");
@@ -335,7 +335,7 @@ int InsetText::textWidth(BufferView * bv, bool fordraw) const
        }
        if (fordraw) {
                return max(w - (2 * TEXT_TO_INSET_OFFSET),
        }
        if (fordraw) {
                return max(w - (2 * TEXT_TO_INSET_OFFSET),
-                          (int)getLyXText(bv)->width);
+                          (int)getLyXText(bv)->width);
        } else if (w < 0) {
            return -1;
        }
        } else if (w < 0) {
            return -1;
        }
@@ -344,13 +344,13 @@ int InsetText::textWidth(BufferView * bv, bool fordraw) const
 
 
 void InsetText::draw(BufferView * bv, LyXFont const & f,
 
 
 void InsetText::draw(BufferView * bv, LyXFont const & f,
-                     int baseline, float & x, bool cleared) const
+                    int baseline, float & x, bool cleared) const
 {
        if (nodraw())
                return;
 
        Painter & pain = bv->painter();
 {
        if (nodraw())
                return;
 
        Painter & pain = bv->painter();
-       
+
        // this is the first thing we have to ask because if the x pos
        // changed we have to do a complete rebreak of the text as we
        // may have few space to draw in. Well we should check on this too
        // this is the first thing we have to ask because if the x pos
        // changed we have to do a complete rebreak of the text as we
        // may have few space to draw in. Well we should check on this too
@@ -368,7 +368,7 @@ void InsetText::draw(BufferView * bv, LyXFont const & f,
        }
 
        // call these methods so that insetWidth, insetAscent and
        }
 
        // call these methods so that insetWidth, insetAscent and
-       // insetDescent have the right values. 
+       // insetDescent have the right values.
        width(bv, f);
        ascent(bv, f);
        descent(bv, f);
        width(bv, f);
        ascent(bv, f);
        descent(bv, f);
@@ -415,7 +415,7 @@ void InsetText::draw(BufferView * bv, LyXFont const & f,
        top_y = baseline - insetAscent;
 
        if (last_drawn_width != insetWidth) {
        top_y = baseline - insetAscent;
 
        if (last_drawn_width != insetWidth) {
-               if (!cleared) 
+               if (!cleared)
                        clearInset(bv, baseline, cleared);
                need_update |= FULL;
                last_drawn_width = insetWidth;
                        clearInset(bv, baseline, cleared);
                need_update |= FULL;
                last_drawn_width = insetWidth;
@@ -429,7 +429,7 @@ void InsetText::draw(BufferView * bv, LyXFont const & f,
        if (!cleared && (need_update == CURSOR)
            && !getLyXText(bv)->selection.set()) {
                drawFrame(pain, cleared);
        if (!cleared && (need_update == CURSOR)
            && !getLyXText(bv)->selection.set()) {
                drawFrame(pain, cleared);
-               x += insetWidth; 
+               x += insetWidth;
                need_update = NONE;
                return;
        }
                need_update = NONE;
                return;
        }
@@ -458,7 +458,7 @@ void InsetText::draw(BufferView * bv, LyXFont const & f,
                y = 0;
                while ((row != 0) && (yf < ph)) {
                        lt->getVisibleRow(bv, y+y_offset, int(x), row,
                y = 0;
                while ((row != 0) && (yf < ph)) {
                        lt->getVisibleRow(bv, y+y_offset, int(x), row,
-                                               y+first, cleared);
+                                               y+first, cleared);
                        y += row->height();
                        yf += row->height();
                        row = row->next();
                        y += row->height();
                        yf += row->height();
                        row = row->next();
@@ -493,9 +493,9 @@ void InsetText::draw(BufferView * bv, LyXFont const & f,
        } else if (need_update & CLEAR_FRAME) {
                clearFrame(pain, cleared);
        }
        } else if (need_update & CLEAR_FRAME) {
                clearFrame(pain, cleared);
        }
-       
+
        x += insetWidth - TEXT_TO_INSET_OFFSET;
        x += insetWidth - TEXT_TO_INSET_OFFSET;
-       
+
        if (bv->text->status() == LyXText::CHANGED_IN_DRAW) {
                need_update |= FULL;
        } else if (need_update != INIT) {
        if (bv->text->status() == LyXText::CHANGED_IN_DRAW) {
                need_update |= FULL;
        } else if (need_update != INIT) {
@@ -515,7 +515,7 @@ void InsetText::drawFrame(Painter & pain, bool cleared) const
                frame_w = insetWidth - TEXT_TO_INSET_OFFSET;
                frame_h = insetAscent + insetDescent - TEXT_TO_INSET_OFFSET;
                pain.rectangle(frame_x, frame_y, frame_w, frame_h,
                frame_w = insetWidth - TEXT_TO_INSET_OFFSET;
                frame_h = insetAscent + insetDescent - TEXT_TO_INSET_OFFSET;
                pain.rectangle(frame_x, frame_y, frame_w, frame_h,
-                              frame_color);
+                              frame_color);
                frame_is_visible = true;
        }
 }
                frame_is_visible = true;
        }
 }
@@ -526,7 +526,7 @@ void InsetText::clearFrame(Painter & pain, bool cleared) const
        if (frame_is_visible) {
                if (!cleared) {
                        pain.rectangle(frame_x, frame_y, frame_w, frame_h,
        if (frame_is_visible) {
                if (!cleared) {
                        pain.rectangle(frame_x, frame_y, frame_w, frame_h,
-                                      backgroundColor());
+                                      backgroundColor());
                }
                frame_is_visible = false;
        }
                }
                frame_is_visible = false;
        }
@@ -580,7 +580,7 @@ void InsetText::setUpdateStatus(BufferView * bv, int what) const
 {
        // this does nothing dangerous so use only a localized buffer
        LyXText * llt = getLyXText(bv);
 {
        // this does nothing dangerous so use only a localized buffer
        LyXText * llt = getLyXText(bv);
-       
+
        need_update |= what;
        // we have to redraw us full if our LyXText NEEDS_MORE_REFRES or
        // if we don't break row so that we only have one row to update!
        need_update |= what;
        // we have to redraw us full if our LyXText NEEDS_MORE_REFRES or
        // if we don't break row so that we only have one row to update!
@@ -614,7 +614,7 @@ void InsetText::updateLocal(BufferView * bv, int what, bool mark_dirty) const
        lt->fullRebreak(bv);
        setUpdateStatus(bv, what);
        bool flag = (((need_update != CURSOR) && (need_update != NONE)) ||
        lt->fullRebreak(bv);
        setUpdateStatus(bv, what);
        bool flag = (((need_update != CURSOR) && (need_update != NONE)) ||
-                    (lt->status() != LyXText::UNCHANGED) || lt->selection.set());
+                    (lt->status() != LyXText::UNCHANGED) || lt->selection.set());
        if (!lt->selection.set())
                lt->selection.cursor = lt->cursor;
        if (clear)
        if (!lt->selection.set())
                lt->selection.cursor = lt->cursor;
        if (clear)
@@ -623,7 +623,7 @@ void InsetText::updateLocal(BufferView * bv, int what, bool mark_dirty) const
                bv->updateInset(const_cast<InsetText *>(this), mark_dirty);
        else
                bv->fitCursor();
                bv->updateInset(const_cast<InsetText *>(this), mark_dirty);
        else
                bv->fitCursor();
-       
+
        if (need_update == CURSOR)
                need_update = NONE;
        bv->owner()->showState();
        if (need_update == CURSOR)
                need_update = NONE;
        bv->owner()->showState();
@@ -645,7 +645,7 @@ string const InsetText::editMessage() const
 void InsetText::edit(BufferView * bv, int x, int y, unsigned int button)
 {
        UpdatableInset::edit(bv, x, y, button);
 void InsetText::edit(BufferView * bv, int x, int y, unsigned int button)
 {
        UpdatableInset::edit(bv, x, y, button);
-       
+
        if (!bv->lockInset(this)) {
                lyxerr[Debug::INSETS] << "Cannot lock inset" << endl;
                return;
        if (!bv->lockInset(this)) {
                lyxerr[Debug::INSETS] << "Cannot lock inset" << endl;
                return;
@@ -664,7 +664,7 @@ void InsetText::edit(BufferView * bv, int x, int y, unsigned int button)
        }
        if (!checkAndActivateInset(bv, x, tmp_y, button))
                lt->setCursorFromCoordinates(bv, x - drawTextXOffset,
        }
        if (!checkAndActivateInset(bv, x, tmp_y, button))
                lt->setCursorFromCoordinates(bv, x - drawTextXOffset,
-                                           y + insetAscent);
+                                           y + insetAscent);
        lt->clearSelection();
        finishUndo();
        // If the inset is empty set the language of the current font to the
        lt->clearSelection();
        finishUndo();
        // If the inset is empty set the language of the current font to the
@@ -679,7 +679,7 @@ void InsetText::edit(BufferView * bv, int x, int y, unsigned int button)
 //     showInsetCursor(bv);
        if (clear)
                lt = 0;
 //     showInsetCursor(bv);
        if (clear)
                lt = 0;
-       
+
        int code = CURSOR;
        if (drawFrame_ == LOCKED)
                code = CURSOR|DRAW_FRAME;
        int code = CURSOR;
        if (drawFrame_ == LOCKED)
                code = CURSOR|DRAW_FRAME;
@@ -690,7 +690,7 @@ void InsetText::edit(BufferView * bv, int x, int y, unsigned int button)
 void InsetText::edit(BufferView * bv, bool front)
 {
        UpdatableInset::edit(bv, front);
 void InsetText::edit(BufferView * bv, bool front)
 {
        UpdatableInset::edit(bv, front);
-       
+
        if (!bv->lockInset(this)) {
                lyxerr[Debug::INSETS] << "Cannot lock inset" << endl;
                return;
        if (!bv->lockInset(this)) {
                lyxerr[Debug::INSETS] << "Cannot lock inset" << endl;
                return;
@@ -747,7 +747,7 @@ void InsetText::insetUnlock(BufferView * bv)
        int code;
        if (drawFrame_ == LOCKED)
                code = CURSOR|CLEAR_FRAME;
        int code;
        if (drawFrame_ == LOCKED)
                code = CURSOR|CLEAR_FRAME;
-       else 
+       else
                code = CURSOR;
        bool clear = false;
        if (!lt) {
                code = CURSOR;
        bool clear = false;
        if (!lt) {
@@ -759,7 +759,7 @@ void InsetText::insetUnlock(BufferView * bv)
                code = FULL;
        } else if (owner()) {
                bv->owner()->setLayout(owner()->getLyXText(bv)
                code = FULL;
        } else if (owner()) {
                bv->owner()->setLayout(owner()->getLyXText(bv)
-                                      ->cursor.par()->layout());
+                                      ->cursor.par()->layout());
        } else
                bv->owner()->setLayout(bv->text->cursor.par()->layout());
        // hack for deleteEmptyParMech
        } else
                bv->owner()->setLayout(bv->text->cursor.par()->layout());
        // hack for deleteEmptyParMech
@@ -837,7 +837,7 @@ bool InsetText::lockInsetInInset(BufferView * bv, UpdatableInset * inset)
 
 
 bool InsetText::unlockInsetInInset(BufferView * bv, UpdatableInset * inset,
 
 
 bool InsetText::unlockInsetInInset(BufferView * bv, UpdatableInset * inset,
-                                   bool lr)
+                                  bool lr)
 {
        if (!the_locking_inset)
                return false;
 {
        if (!the_locking_inset)
                return false;
@@ -924,9 +924,9 @@ void InsetText::insetButtonPress(BufferView * bv, int x, int y, int button)
        if (the_locking_inset) {
                if (the_locking_inset == inset) {
                        the_locking_inset->insetButtonPress(bv,
        if (the_locking_inset) {
                if (the_locking_inset == inset) {
                        the_locking_inset->insetButtonPress(bv,
-                                                           x - inset_x,
-                                                           y - inset_y,
-                                                           button);
+                                                           x - inset_x,
+                                                           y - inset_y,
+                                                           button);
                        no_selection = false;
                        return;
                } else if (inset) {
                        no_selection = false;
                        return;
                } else if (inset) {
@@ -936,7 +936,7 @@ void InsetText::insetButtonPress(BufferView * bv, int x, int y, int button)
                        inset_y = cy(bv) + drawTextYOffset;
                        the_locking_inset = 0;
                        inset->insetButtonPress(bv, x - inset_x,
                        inset_y = cy(bv) + drawTextYOffset;
                        the_locking_inset = 0;
                        inset->insetButtonPress(bv, x - inset_x,
-                                               y - inset_y, button);
+                                               y - inset_y, button);
 //                     inset->edit(bv, x - inset_x, y - inset_y, button);
                        if (the_locking_inset)
                                updateLocal(bv, CURSOR, false);
 //                     inset->edit(bv, x - inset_x, y - inset_y, button);
                        if (the_locking_inset)
                                updateLocal(bv, CURSOR, false);
@@ -957,7 +957,7 @@ void InsetText::insetButtonPress(BufferView * bv, int x, int y, int button)
                        inset_boundary = cboundary(bv);
                        the_locking_inset = uinset;
                        uinset->insetButtonPress(bv, x - inset_x, y - inset_y,
                        inset_boundary = cboundary(bv);
                        the_locking_inset = uinset;
                        uinset->insetButtonPress(bv, x - inset_x, y - inset_y,
-                                                button);
+                                                button);
                        uinset->edit(bv, x - inset_x, y - inset_y, 0);
                        if (the_locking_inset)
                                updateLocal(bv, CURSOR, false);
                        uinset->edit(bv, x - inset_x, y - inset_y, 0);
                        if (the_locking_inset)
                                updateLocal(bv, CURSOR, false);
@@ -978,7 +978,7 @@ void InsetText::insetButtonPress(BufferView * bv, int x, int y, int button)
                }
 
                lt->setCursorFromCoordinates(bv, x - drawTextXOffset,
                }
 
                lt->setCursorFromCoordinates(bv, x - drawTextXOffset,
-                                            y + insetAscent);
+                                            y + insetAscent);
                // set the selection cursor!
                lt->selection.cursor = lt->cursor;
                lt->cursor.x_fix(lt->cursor.x());
                // set the selection cursor!
                lt->selection.cursor = lt->cursor;
                lt->cursor.x_fix(lt->cursor.x());
@@ -1004,7 +1004,7 @@ void InsetText::insetButtonPress(BufferView * bv, int x, int y, int button)
                                localDispatch(bv, LFUN_PASTE, "");
                        else
                                localDispatch(bv, LFUN_PASTESELECTION,
                                localDispatch(bv, LFUN_PASTE, "");
                        else
                                localDispatch(bv, LFUN_PASTESELECTION,
-                                             "paragraph");
+                                             "paragraph");
                }
        } else {
                getLyXText(bv)->clearSelection();
                }
        } else {
                getLyXText(bv)->clearSelection();
@@ -1018,8 +1018,8 @@ bool InsetText::insetButtonRelease(BufferView * bv, int x, int y, int button)
 {
        if (the_locking_inset) {
                return the_locking_inset->insetButtonRelease(bv,
 {
        if (the_locking_inset) {
                return the_locking_inset->insetButtonRelease(bv,
-                                                            x - inset_x, y - inset_y,
-                                                            button);
+                                                            x - inset_x, y - inset_y,
+                                                            button);
        }
        int tmp_x = x - drawTextXOffset;
        int tmp_y = y + insetAscent - getLyXText(bv)->first_y;
        }
        int tmp_x = x - drawTextXOffset;
        int tmp_y = y + insetAscent - getLyXText(bv)->first_y;
@@ -1028,14 +1028,14 @@ bool InsetText::insetButtonRelease(BufferView * bv, int x, int y, int button)
        if (inset) {
                if (isHighlyEditableInset(inset)) {
                        ret = inset->insetButtonRelease(bv, x - inset_x,
        if (inset) {
                if (isHighlyEditableInset(inset)) {
                        ret = inset->insetButtonRelease(bv, x - inset_x,
-                                                       y - inset_y, button);
+                                                       y - inset_y, button);
                } else {
                        inset_x = cx(bv) - top_x + drawTextXOffset;
                        inset_y = cy(bv) + drawTextYOffset;
                        ret = inset->insetButtonRelease(bv, x - inset_x,
                } else {
                        inset_x = cx(bv) - top_x + drawTextXOffset;
                        inset_y = cy(bv) + drawTextYOffset;
                        ret = inset->insetButtonRelease(bv, x - inset_x,
-                                                       y - inset_y, button);
+                                                       y - inset_y, button);
                        inset->edit(bv, x - inset_x,
                        inset->edit(bv, x - inset_x,
-                                   y - inset_y, button);
+                                   y - inset_y, button);
                }
                updateLocal(bv, CURSOR_PAR, false);
        }
                }
                updateLocal(bv, CURSOR_PAR, false);
        }
@@ -1049,7 +1049,7 @@ void InsetText::insetMotionNotify(BufferView * bv, int x, int y, int state)
                return;
        if (the_locking_inset) {
                the_locking_inset->insetMotionNotify(bv, x - inset_x,
                return;
        if (the_locking_inset) {
                the_locking_inset->insetMotionNotify(bv, x - inset_x,
-                                                    y - inset_y,state);
+                                                    y - inset_y,state);
                return;
        }
        bool clear = false;
                return;
        }
        bool clear = false;
@@ -1088,7 +1088,7 @@ void InsetText::insetKeyPress(XKeyEvent * xke)
 
 UpdatableInset::RESULT
 InsetText::localDispatch(BufferView * bv,
 
 UpdatableInset::RESULT
 InsetText::localDispatch(BufferView * bv,
-                         kb_action action, string const & arg)
+                        kb_action action, string const & arg)
 {
        bool was_empty = par->size() == 0 && !par->next();
        no_selection = false;
 {
        bool was_empty = par->size() == 0 && !par->next();
        no_selection = false;
@@ -1161,7 +1161,7 @@ InsetText::localDispatch(BufferView * bv,
                         * true (on). */
 
                        setUndo(bv, Undo::INSERT,
                         * true (on). */
 
                        setUndo(bv, Undo::INSERT,
-                               lt->cursor.par(), lt->cursor.par()->next());
+                               lt->cursor.par(), lt->cursor.par()->next());
                        bv->setState();
                        if (lyxrc.auto_region_delete) {
                                if (lt->selection.set()) {
                        bv->setState();
                        if (lyxrc.auto_region_delete) {
                                if (lt->selection.set()) {
@@ -1234,7 +1234,7 @@ InsetText::localDispatch(BufferView * bv,
                break;
        case LFUN_BACKSPACE: {
                setUndo(bv, Undo::DELETE,
                break;
        case LFUN_BACKSPACE: {
                setUndo(bv, Undo::DELETE,
-                       lt->cursor.par(), lt->cursor.par()->next());
+                       lt->cursor.par(), lt->cursor.par()->next());
                if (lt->selection.set())
                        lt->cutSelection(bv);
                else
                if (lt->selection.set())
                        lt->cutSelection(bv);
                else
@@ -1243,10 +1243,10 @@ InsetText::localDispatch(BufferView * bv,
                updflag = true;
        }
        break;
                updflag = true;
        }
        break;
-       
+
        case LFUN_DELETE: {
                setUndo(bv, Undo::DELETE,
        case LFUN_DELETE: {
                setUndo(bv, Undo::DELETE,
-                       lt->cursor.par(), lt->cursor.par()->next());
+                       lt->cursor.par(), lt->cursor.par()->next());
                if (lt->selection.set()) {
                        lt->cutSelection(bv);
                } else {
                if (lt->selection.set()) {
                        lt->cutSelection(bv);
                } else {
@@ -1256,10 +1256,10 @@ InsetText::localDispatch(BufferView * bv,
                updflag = true;
        }
        break;
                updflag = true;
        }
        break;
-       
+
        case LFUN_CUT: {
                setUndo(bv, Undo::DELETE,
        case LFUN_CUT: {
                setUndo(bv, Undo::DELETE,
-                       lt->cursor.par(), lt->cursor.par()->next());
+                       lt->cursor.par(), lt->cursor.par()->next());
                lt->cutSelection(bv);
                updwhat = CURSOR_PAR;
                updflag = true;
                lt->cutSelection(bv);
                updwhat = CURSOR_PAR;
                updflag = true;
@@ -1274,7 +1274,7 @@ InsetText::localDispatch(BufferView * bv,
        case LFUN_PASTESELECTION:
        {
                string const clip(bv->getClipboard());
        case LFUN_PASTESELECTION:
        {
                string const clip(bv->getClipboard());
-       
+
                if (clip.empty())
                        break;
                if (arg == "paragraph") {
                if (clip.empty())
                        break;
                if (arg == "paragraph") {
@@ -1297,7 +1297,7 @@ InsetText::localDispatch(BufferView * bv,
                        }
                }
                setUndo(bv, Undo::INSERT,
                        }
                }
                setUndo(bv, Undo::INSERT,
-                       lt->cursor.par(), lt->cursor.par()->next());
+                       lt->cursor.par(), lt->cursor.par()->next());
                lt->pasteSelection(bv);
                updwhat = CURSOR_PAR;
                updflag = true;
                lt->pasteSelection(bv);
                updwhat = CURSOR_PAR;
                updflag = true;
@@ -1329,7 +1329,7 @@ InsetText::localDispatch(BufferView * bv,
                        break;
                }
                setUndo(bv, Undo::INSERT,
                        break;
                }
                setUndo(bv, Undo::INSERT,
-                       lt->cursor.par(), lt->cursor.par()->next());
+                       lt->cursor.par(), lt->cursor.par()->next());
                lt->insertChar(bv, Paragraph::META_NEWLINE);
                updwhat = CURSOR_PAR;
                updflag = true;
                lt->insertChar(bv, Paragraph::META_NEWLINE);
                updwhat = CURSOR_PAR;
                updflag = true;
@@ -1340,9 +1340,9 @@ InsetText::localDispatch(BufferView * bv,
                // do not set layouts on non breakable textinsets
                if (autoBreakRows) {
                        string cur_layout = cpar(bv)->layout();
                // do not set layouts on non breakable textinsets
                if (autoBreakRows) {
                        string cur_layout = cpar(bv)->layout();
-         
+
                        // Derive layout number from given argument (string)
                        // Derive layout number from given argument (string)
-                       // and current buffer's textclass (number). */    
+                       // and current buffer's textclass (number). */
                        textclass_type tclass = bv->buffer()->params.textclass;
                        string layout = arg;
                        bool hasLayout = textclasslist[tclass].hasLayout(layout);
                        textclass_type tclass = bv->buffer()->params.textclass;
                        string layout = arg;
                        bool hasLayout = textclasslist[tclass].hasLayout(layout);
@@ -1352,7 +1352,7 @@ InsetText::localDispatch(BufferView * bv,
                                string const & obs =
                                        textclasslist[tclass][layout].
                                        obsoleted_by();
                                string const & obs =
                                        textclasslist[tclass][layout].
                                        obsoleted_by();
-                               if (!obs.empty()) 
+                               if (!obs.empty())
                                        layout = obs;
                        }
 
                                        layout = obs;
                        }
 
@@ -1386,7 +1386,7 @@ InsetText::localDispatch(BufferView * bv,
                if (cur_spacing == Spacing::Other) {
                        cur_value = par->params().spacing().getValue();
                }
                if (cur_spacing == Spacing::Other) {
                        cur_value = par->params().spacing().getValue();
                }
-                               
+
                istringstream istr(arg.c_str());
                string tmp;
                istr >> tmp;
                istringstream istr(arg.c_str());
                string tmp;
                istr >> tmp;
@@ -1421,7 +1421,7 @@ InsetText::localDispatch(BufferView * bv,
                }
        }
        break;
                }
        }
        break;
-       
+
        default:
                if (!bv->Dispatch(action, arg))
                        result = UNDISPATCHED;
        default:
                if (!bv->Dispatch(action, arg))
                        result = UNDISPATCHED;
@@ -1458,7 +1458,7 @@ int InsetText::ascii(Buffer const * buf, ostream & os, int linelen) const
 {
        Paragraph * p = par;
        unsigned int lines = 0;
 {
        Paragraph * p = par;
        unsigned int lines = 0;
-       
+
        while (p) {
                string const tmp = buf->asciiParagraph(p, linelen, p->previous()==0);
                lines += lyx::count(tmp.begin(), tmp.end(), '\n');
        while (p) {
                string const tmp = buf->asciiParagraph(p, linelen, p->previous()==0);
                lines += lyx::count(tmp.begin(), tmp.end(), '\n');
@@ -1476,10 +1476,10 @@ int InsetText::docbook(Buffer const * buf, ostream & os) const
 
        vector<string> environment_stack(10);
        vector<string> environment_inner(10);
 
        vector<string> environment_stack(10);
        vector<string> environment_inner(10);
-       
+
        int const command_depth = 0;
        string item_name;
        int const command_depth = 0;
        string item_name;
-       
+
        Paragraph::depth_type depth = 0; // paragraph depth
 
        while (p) {
        Paragraph::depth_type depth = 0; // paragraph depth
 
        while (p) {
@@ -1517,13 +1517,13 @@ int InsetText::docbook(Buffer const * buf, ostream & os) const
                                                          depth + command_depth,
                                                          environment_inner[depth]);
                        }
                                                          depth + command_depth,
                                                          environment_inner[depth]);
                        }
-                       
+
                        buf->sgmlCloseTag(os, depth + command_depth,
                                          environment_stack[depth]);
                        buf->sgmlCloseTag(os, depth + command_depth,
                                          environment_stack[depth]);
-                       
+
                        environment_stack[depth].erase();
                        environment_inner[depth].erase();
                        environment_stack[depth].erase();
                        environment_inner[depth].erase();
-                }
+               }
 
                // Write opening SGML tags.
                switch (style.latextype) {
 
                // Write opening SGML tags.
                switch (style.latextype) {
@@ -1566,7 +1566,7 @@ int InsetText::docbook(Buffer const * buf, ostream & os) const
                                                                  environment_inner[depth]);
                                }
                        }
                                                                  environment_inner[depth]);
                                }
                        }
-                       
+
                        if (style.latextype == LATEX_ENVIRONMENT) {
                                if (!style.latexparam().empty()) {
                                        if (style.latexparam() == "CDATA")
                        if (style.latextype == LATEX_ENVIRONMENT) {
                                if (!style.latexparam().empty()) {
                                        if (style.latexparam() == "CDATA")
@@ -1641,16 +1641,16 @@ int InsetText::docbook(Buffer const * buf, ostream & os) const
                                item_name = "listitem";
                                buf->sgmlCloseTag(os, command_depth + depth,
                                                  item_name);
                                item_name = "listitem";
                                buf->sgmlCloseTag(os, command_depth + depth,
                                                  item_name);
-                               if (environment_inner[depth] == "varlistentry")
+                              if (environment_inner[depth] == "varlistentry")
                                       buf->sgmlCloseTag(os, depth + command_depth,
                                                         environment_inner[depth]);
                        }
                                       buf->sgmlCloseTag(os, depth + command_depth,
                                                         environment_inner[depth]);
                        }
-                       
+
                        buf->sgmlCloseTag(os, depth + command_depth,
                                          environment_stack[depth]);
                }
        }
                        buf->sgmlCloseTag(os, depth + command_depth,
                                          environment_stack[depth]);
                }
        }
-       
+
        return lines;
 }
 
        return lines;
 }
 
@@ -1706,7 +1706,7 @@ void InsetText::toggleInsetCursor(BufferView * bv)
 
        int const asc = lyxfont::maxAscent(font);
        int const desc = lyxfont::maxDescent(font);
 
        int const asc = lyxfont::maxAscent(font);
        int const desc = lyxfont::maxDescent(font);
-  
+
        if (isCursorVisible())
                bv->hideLockedInsetCursor();
        else
        if (isCursorVisible())
                bv->hideLockedInsetCursor();
        else
@@ -1724,7 +1724,7 @@ void InsetText::showInsetCursor(BufferView * bv, bool show)
        if (!isCursorVisible()) {
                LyXFont const font =
                        getLyXText(bv)->getFont(bv->buffer(), cpar(bv), cpos(bv));
        if (!isCursorVisible()) {
                LyXFont const font =
                        getLyXText(bv)->getFont(bv->buffer(), cpar(bv), cpos(bv));
-       
+
                int const asc = lyxfont::maxAscent(font);
                int const desc = lyxfont::maxDescent(font);
 
                int const asc = lyxfont::maxAscent(font);
                int const desc = lyxfont::maxDescent(font);
 
@@ -1755,7 +1755,7 @@ void InsetText::fitInsetCursor(BufferView * bv) const
        }
        LyXFont const font =
                getLyXText(bv)->getFont(bv->buffer(), cpar(bv), cpos(bv));
        }
        LyXFont const font =
                getLyXText(bv)->getFont(bv->buffer(), cpar(bv), cpos(bv));
-       
+
        int const asc = lyxfont::maxAscent(font);
        int const desc = lyxfont::maxDescent(font);
 
        int const asc = lyxfont::maxAscent(font);
        int const desc = lyxfont::maxDescent(font);
 
@@ -1784,8 +1784,8 @@ InsetText::moveLeft(BufferView * bv, bool activate_inset, bool selecting)
 
 
 UpdatableInset::RESULT
 
 
 UpdatableInset::RESULT
-InsetText::moveRightIntern(BufferView * bv, bool behind, 
-                           bool activate_inset, bool selecting)
+InsetText::moveRightIntern(BufferView * bv, bool behind,
+                          bool activate_inset, bool selecting)
 {
        if (!cpar(bv)->next() && (cpos(bv) >= cpar(bv)->size()))
                return FINISHED_RIGHT;
 {
        if (!cpar(bv)->next() && (cpos(bv) >= cpar(bv)->size()))
                return FINISHED_RIGHT;
@@ -1800,7 +1800,7 @@ InsetText::moveRightIntern(BufferView * bv, bool behind,
 
 UpdatableInset::RESULT
 InsetText::moveLeftIntern(BufferView * bv, bool behind,
 
 UpdatableInset::RESULT
 InsetText::moveLeftIntern(BufferView * bv, bool behind,
-                          bool activate_inset, bool selecting)
+                         bool activate_inset, bool selecting)
 {
        if (!cpar(bv)->previous() && (cpos(bv) <= 0))
                return FINISHED;
 {
        if (!cpar(bv)->previous() && (cpos(bv) <= 0))
                return FINISHED;
@@ -1903,7 +1903,7 @@ bool InsetText::showInsetDialog(BufferView * bv) const
 }
 
 
 }
 
 
-vector<string> const InsetText::getLabelList() const 
+vector<string> const InsetText::getLabelList() const
 {
        vector<string> label_list;
 
 {
        vector<string> label_list;
 
@@ -1922,7 +1922,7 @@ vector<string> const InsetText::getLabelList() const
 
 
 void InsetText::setFont(BufferView * bv, LyXFont const & font, bool toggleall,
 
 
 void InsetText::setFont(BufferView * bv, LyXFont const & font, bool toggleall,
-                        bool selectall)
+                       bool selectall)
 {
        if (the_locking_inset) {
                the_locking_inset->setFont(bv, font, toggleall, selectall);
 {
        if (the_locking_inset) {
                the_locking_inset->setFont(bv, font, toggleall, selectall);
@@ -2102,7 +2102,7 @@ int InsetText::cx(BufferView * bv) const
        int x = llt->cursor.x() + top_x + TEXT_TO_INSET_OFFSET;
        if (the_locking_inset) {
                LyXFont font = llt->getFont(bv->buffer(), llt->cursor.par(),
        int x = llt->cursor.x() + top_x + TEXT_TO_INSET_OFFSET;
        if (the_locking_inset) {
                LyXFont font = llt->getFont(bv->buffer(), llt->cursor.par(),
-                                           llt->cursor.pos());
+                                           llt->cursor.pos());
                if (font.isVisibleRightToLeft())
                        x -= the_locking_inset->width(bv, font);
        }
                if (font.isVisibleRightToLeft())
                        x -= the_locking_inset->width(bv, font);
        }
@@ -2142,7 +2142,7 @@ Row * InsetText::crow(BufferView * bv) const
 
 
 LyXText * InsetText::getLyXText(BufferView const * lbv,
 
 
 LyXText * InsetText::getLyXText(BufferView const * lbv,
-                                bool const recursive) const
+                               bool const recursive) const
 {
        if (cached_bview == lbv) {
                if (recursive && the_locking_inset)
 {
        if (cached_bview == lbv) {
                if (recursive && the_locking_inset)
@@ -2153,7 +2153,7 @@ LyXText * InsetText::getLyXText(BufferView const * lbv,
        }
        // Super UGLY! (Lgb)
        BufferView * bv = const_cast<BufferView *>(lbv);
        }
        // Super UGLY! (Lgb)
        BufferView * bv = const_cast<BufferView *>(lbv);
-       
+
        cached_bview = bv;
        Cache::iterator it = cache.find(bv);
 
        cached_bview = bv;
        Cache::iterator it = cache.find(bv);
 
@@ -2198,7 +2198,7 @@ LyXText * InsetText::getLyXText(BufferView const * lbv,
        restoreLyXTextState(bv, cached_text.get());
 
        cache.insert(make_pair(bv, cached_text));
        restoreLyXTextState(bv, cached_text.get());
 
        cache.insert(make_pair(bv, cached_text));
-       
+
        if (the_locking_inset && recursive) {
                return the_locking_inset->getLyXText(bv);
        }
        if (the_locking_inset && recursive) {
                return the_locking_inset->getLyXText(bv);
        }
@@ -2211,7 +2211,7 @@ void InsetText::deleteLyXText(BufferView * bv, bool recursive) const
        cached_bview = 0;
 
        Cache::iterator it = cache.find(bv);
        cached_bview = 0;
 
        Cache::iterator it = cache.find(bv);
-       
+
        if (it == cache.end()) {
                return;
        }
        if (it == cache.end()) {
                return;
        }
@@ -2274,7 +2274,7 @@ void InsetText::resizeLyXText(BufferView * bv, bool force) const
        }
        if (!owner()) {
                updateLocal(bv, FULL, false);
        }
        if (!owner()) {
                updateLocal(bv, FULL, false);
-               // this will scroll the screen such that the cursor becomes visible 
+               // this will scroll the screen such that the cursor becomes visible
                bv->updateScrollbar();
        } else {
                need_update |= FULL;
                bv->updateScrollbar();
        } else {
                need_update |= FULL;
@@ -2314,7 +2314,7 @@ void InsetText::reinitLyXText() const
                }
                if (!owner()) {
                        updateLocal(bv, FULL, false);
                }
                if (!owner()) {
                        updateLocal(bv, FULL, false);
-                       // this will scroll the screen such that the cursor becomes visible 
+                       // this will scroll the screen such that the cursor becomes visible
                        bv->updateScrollbar();
                } else {
                        need_update = FULL;
                        bv->updateScrollbar();
                } else {
                        need_update = FULL;
@@ -2326,7 +2326,7 @@ void InsetText::reinitLyXText() const
 void InsetText::removeNewlines()
 {
        bool changed = false;
 void InsetText::removeNewlines()
 {
        bool changed = false;
-       
+
        for (Paragraph * p = par; p; p = p->next()) {
                for (int i = 0; i < p->size(); ++i) {
                        if (p->getChar(i) == Paragraph::META_NEWLINE) {
        for (Paragraph * p = par; p; p = p->next()) {
                for (int i = 0; i < p->size(); ++i) {
                        if (p->getChar(i) == Paragraph::META_NEWLINE) {
@@ -2386,7 +2386,7 @@ void InsetText::clearInset(BufferView * bv, int baseline, bool & cleared) const
        int w = insetWidth;
        int h = insetAscent + insetDescent;
        int ty = baseline - insetAscent;
        int w = insetWidth;
        int h = insetAscent + insetDescent;
        int ty = baseline - insetAscent;
-       
+
        if (ty < 0) {
                h += ty;
                ty = 0;
        if (ty < 0) {
                h += ty;
                ty = 0;
@@ -2569,7 +2569,7 @@ void InsetText::toggleSelection(BufferView * bv, bool kill_selection)
        }
        if (y_offset < 0)
                y_offset = y;
        }
        if (y_offset < 0)
                y_offset = y;
-       
+
        if (need_update & SELECTION)
                need_update = NONE;
        bv->screen()->toggleSelection(lt, bv, kill_selection, y_offset, x);
        if (need_update & SELECTION)
                need_update = NONE;
        bv->screen()->toggleSelection(lt, bv, kill_selection, y_offset, x);
@@ -2579,7 +2579,7 @@ void InsetText::toggleSelection(BufferView * bv, bool kill_selection)
 
 
 bool InsetText::searchForward(BufferView * bv, string const & str,
 
 
 bool InsetText::searchForward(BufferView * bv, string const & str,
-                              bool cs, bool mw)
+                             bool cs, bool mw)
 {
        if (the_locking_inset) {
                if (the_locking_inset->searchForward(bv, str, cs, mw))
 {
        if (the_locking_inset) {
                if (the_locking_inset->searchForward(bv, str, cs, mw))
@@ -2617,7 +2617,7 @@ bool InsetText::searchForward(BufferView * bv, string const & str,
 }
 
 bool InsetText::searchBackward(BufferView * bv, string const & str,
 }
 
 bool InsetText::searchBackward(BufferView * bv, string const & str,
-                               bool cs, bool mw)
+                              bool cs, bool mw)
 {
        if (the_locking_inset)
                if (the_locking_inset->searchBackward(bv, str, cs, mw))
 {
        if (the_locking_inset)
                if (the_locking_inset->searchBackward(bv, str, cs, mw))
@@ -2659,12 +2659,12 @@ void InsetText::getDrawFont(LyXFont & font) const
 
 
 void InsetText::appendParagraphs(BufferParams const & bparams,
 
 
 void InsetText::appendParagraphs(BufferParams const & bparams,
-                                 Paragraph * newpar)
+                                Paragraph * newpar)
 {
        Paragraph * buf;
        Paragraph * tmpbuf = newpar;
        Paragraph * lastbuffer = buf = new Paragraph(*tmpbuf, false);
 {
        Paragraph * buf;
        Paragraph * tmpbuf = newpar;
        Paragraph * lastbuffer = buf = new Paragraph(*tmpbuf, false);
-       
+
        while (tmpbuf->next()) {
                tmpbuf = tmpbuf->next();
                lastbuffer->next(new Paragraph(*tmpbuf, false));
        while (tmpbuf->next()) {
                tmpbuf = tmpbuf->next();
                lastbuffer->next(new Paragraph(*tmpbuf, false));
@@ -2679,7 +2679,7 @@ void InsetText::appendParagraphs(BufferParams const & bparams,
        {
                lastbuffer->insertChar(lastbuffer->size(), ' ');
        }
        {
                lastbuffer->insertChar(lastbuffer->size(), ' ');
        }
-       
+
        // make the buf exactly the same layout than our last paragraph
        buf->makeSameLayout(lastbuffer);
 
        // make the buf exactly the same layout than our last paragraph
        buf->makeSameLayout(lastbuffer);
 
index 38c15266d8ce5b4f9c091842955e464ed43eaa10..d7d80b0c1b6e547525d2f8e121befd89096f89e7 100644 (file)
@@ -1,7 +1,7 @@
 // -*- C++ -*-
 /* This file is part of
  * ======================================================
 // -*- C++ -*-
 /* This file is part of
  * ======================================================
- * 
+ *
  *           LyX, The Document Processor
  *
  *           Copyright 1998 The LyX Team.
  *           LyX, The Document Processor
  *
  *           Copyright 1998 The LyX Team.
@@ -38,7 +38,7 @@ class Row;
 
 /**
  A text inset is like a TeX box to write full text
 
 /**
  A text inset is like a TeX box to write full text
- (including styles and other insets) in a given space. 
+ (including styles and other insets) in a given space.
  @author: Jürgen Vigna
  */
 class InsetText : public UpdatableInset {
  @author: Jürgen Vigna
  */
 class InsetText : public UpdatableInset {
@@ -170,7 +170,7 @@ public:
        ///
        void setFont(BufferView *, LyXFont const &,
                     bool toggleall = false,
        ///
        void setFont(BufferView *, LyXFont const &,
                     bool toggleall = false,
-                    bool selectall = false);
+                    bool selectall = false);
        ///
        int getMaxWidth(BufferView *, UpdatableInset const *) const;
        ///
        ///
        int getMaxWidth(BufferView *, UpdatableInset const *) const;
        ///
@@ -240,10 +240,10 @@ public:
        void toggleSelection(BufferView *, bool kill_selection);
        ///
        bool searchForward(BufferView *, string const &,
        void toggleSelection(BufferView *, bool kill_selection);
        ///
        bool searchForward(BufferView *, string const &,
-                          bool = true, bool = false);
+                          bool = true, bool = false);
        ///
        bool searchBackward(BufferView *, string const &,
        ///
        bool searchBackward(BufferView *, string const &,
-                           bool = true, bool = false);
+                           bool = true, bool = false);
        ///
        bool checkInsertChar(LyXFont &);
        ///
        ///
        bool checkInsertChar(LyXFont &);
        ///
@@ -301,7 +301,7 @@ private:
                                               bool activate_inset = true,
                                               bool selecting = false);
        ///
                                               bool activate_inset = true,
                                               bool selecting = false);
        ///
-       UpdatableInset::RESULT moveLeftIntern(BufferView *, bool behind, 
+       UpdatableInset::RESULT moveLeftIntern(BufferView *, bool behind,
                                              bool activate_inset = true,
                                              bool selecting = false);
 
                                              bool activate_inset = true,
                                              bool selecting = false);
 
@@ -315,7 +315,7 @@ private:
        bool checkAndActivateInset(BufferView * bv, bool behind);
        ///
        bool checkAndActivateInset(BufferView * bv, int x = 0, int y = 0,
        bool checkAndActivateInset(BufferView * bv, bool behind);
        ///
        bool checkAndActivateInset(BufferView * bv, int x = 0, int y = 0,
-                                  int button = 0);
+                                  int button = 0);
        ///
        void removeNewlines();
        ///
        ///
        void removeNewlines();
        ///
@@ -344,7 +344,7 @@ private:
        void reinitLyXText() const;
        ///
        void collapseParagraphs(BufferParams const & bparams) const;
        void reinitLyXText() const;
        ///
        void collapseParagraphs(BufferParams const & bparams) const;
-       
+
        /* Private structures and variables */
        ///
        Paragraph * par;
        /* Private structures and variables */
        ///
        Paragraph * par;
@@ -405,7 +405,7 @@ private:
        };
        ///
        mutable save_state sstate;
        };
        ///
        mutable save_state sstate;
-       
+
        ///
        // this is needed globally so we know that we're using it actually and
        // so the LyXText-Cache is not erased until used!
        ///
        // this is needed globally so we know that we're using it actually and
        // so the LyXText-Cache is not erased until used!
index b9efc2636e836108b452efdf3119170935b3c8df..e6cf3016aa86fd1e7cc87de7dfdf5263d866ba54 100644 (file)
@@ -1,8 +1,8 @@
 /* This file is part of
  * ======================================================
 /* This file is part of
  * ======================================================
- * 
+ *
  *           LyX, The Document Processor
  *           LyX, The Document Processor
- *      
+ *
  *          Copyright 1998 The LyX Team.
  *
  * ======================================================
  *          Copyright 1998 The LyX Team.
  *
  * ======================================================
@@ -49,7 +49,7 @@ InsetTheorem::InsetTheorem()
 }
 
 
 }
 
 
-void InsetTheorem::write(Buffer const * buf, ostream & os) const 
+void InsetTheorem::write(Buffer const * buf, ostream & os) const
 {
        os << getInsetName() << "\n";
        InsetCollapsable::write(buf, os);
 {
        os << getInsetName() << "\n";
        InsetCollapsable::write(buf, os);
@@ -62,7 +62,7 @@ Inset * InsetTheorem::clone(Buffer const &, bool) const
 #warning Is this inset used? If YES this is WRONG!!! (Jug)
 #endif
        InsetTheorem * result = new InsetTheorem;
 #warning Is this inset used? If YES this is WRONG!!! (Jug)
 #endif
        InsetTheorem * result = new InsetTheorem;
-       
+
        result->collapsed_ = collapsed_;
        return result;
 }
        result->collapsed_ = collapsed_;
        return result;
 }
@@ -78,9 +78,9 @@ int InsetTheorem::latex(Buffer const * buf,
                        ostream & os, bool fragile, bool fp) const
 {
        os << "\\begin{theorem}%\n";
                        ostream & os, bool fragile, bool fp) const
 {
        os << "\\begin{theorem}%\n";
-       
+
        int i = inset.latex(buf, os, fragile, fp);
        os << "\\end{theorem}%\n";
        int i = inset.latex(buf, os, fragile, fp);
        os << "\\end{theorem}%\n";
-       
+
        return i + 2;
 }
        return i + 2;
 }
index 24e9b8a2156d544b35213bc0328602ff37870bdd..41a1aa3eb3f49a72ac08765c422702d44cfe1b6d 100644 (file)
@@ -1,7 +1,7 @@
 // -*- C++ -*-
 /* This file is part of
  * ======================================================
 // -*- C++ -*-
 /* This file is part of
  * ======================================================
- * 
+ *
  *           LyX, The Document Processor
  *
  *           Copyright 1998 The LyX Team.
  *           LyX, The Document Processor
  *
  *           Copyright 1998 The LyX Team.
@@ -19,7 +19,7 @@
 #include "insetcollapsable.h"
 
 /** The theorem inset
 #include "insetcollapsable.h"
 
 /** The theorem inset
-  
+
 */
 class InsetTheorem : public InsetCollapsable {
 public:
 */
 class InsetTheorem : public InsetCollapsable {
 public:
index c93c62e26acb11e63787d4aa6b65eab0022a139d..843dad55e9c63c5a5c780c18a365c565c09e6e79 100644 (file)
@@ -17,10 +17,10 @@ using std::vector;
 using std::ostream;
 
 
 using std::ostream;
 
 
-string const InsetTOC::getScreenLabel(Buffer const *) const 
+string const InsetTOC::getScreenLabel(Buffer const *) const
 {
        string const cmdname(getCmdName());
 {
        string const cmdname(getCmdName());
-       
+
        if (cmdname == "tableofcontents")
                return _("Table of Contents");
        return _("Unknown toc list");
        if (cmdname == "tableofcontents")
                return _("Table of Contents");
        return _("Unknown toc list");
index 413740f4860ebbfe5c9950107a255ba70a108a7d..da097754081752f8a1fe35668b7277e325334736 100644 (file)
@@ -3,10 +3,10 @@
  * ======================================================
  *
  *           LyX, The Document Word Processor
  * ======================================================
  *
  *           LyX, The Document Word Processor
- *      
+ *
  *           Copyright 1995 Matthias Ettrich
  *           Copyright 1996-2001 The LyX Team.
  *           Copyright 1995 Matthias Ettrich
  *           Copyright 1996-2001 The LyX Team.
- * 
+ *
  * ====================================================== */
 
 #ifndef INSET_TOC_H
  * ====================================================== */
 
 #ifndef INSET_TOC_H
index 848584044fbc0508b1678230eac65aaeacd97637..d52b6afaafacc95e1655977a51975d8cdc7f4c18 100644 (file)
@@ -38,7 +38,7 @@ string const InsetUrl::getScreenLabel(Buffer const *) const
        string temp;
        if (getCmdName() == "url")
                temp = _("Url: ");
        string temp;
        if (getCmdName() == "url")
                temp = _("Url: ");
-       else 
+       else
                temp = _("HtmlUrl: ");
 
        if (!getOptions().empty())
                temp = _("HtmlUrl: ");
 
        if (!getOptions().empty())
index d077e33daebfe3ca7833428bf835e62fa48f96dc..4712afd948e8982e5e8ca1b221589a4033144cb8 100644 (file)
@@ -1,11 +1,11 @@
 // -*- C++ -*-
 /* This file is part of*
 // -*- C++ -*-
 /* This file is part of*
- * ====================================================== 
+ * ======================================================
  *
  *           LyX, The Document Processor
  *
  *           LyX, The Document Processor
- *      
+ *
  *         Copyright 1997-2001 The LyX Team.
  *         Copyright 1997-2001 The LyX Team.
- * 
+ *
  * ====================================================== */
 
 #ifndef INSET_URL_H
  * ====================================================== */
 
 #ifndef INSET_URL_H
@@ -19,7 +19,7 @@
 
 struct LaTeXFeatures;
 
 
 struct LaTeXFeatures;
 
-/** The url inset  
+/** The url inset
  */
 class InsetUrl : public InsetCommand {
 public:
  */
 class InsetUrl : public InsetCommand {
 public:
@@ -46,7 +46,7 @@ public:
        bool display() const { return false; }
        ///
        int latex(Buffer const *, std::ostream &,
        bool display() const { return false; }
        ///
        int latex(Buffer const *, std::ostream &,
-                 bool fragile, bool free_spc) const;
+                 bool fragile, bool free_spc) const;
        ///
        int ascii(Buffer const *, std::ostream &, int linelen) const;
        ///
        ///
        int ascii(Buffer const *, std::ostream &, int linelen) const;
        ///
index b293d656b91d9f66932e1f0bb831b68455f007eb..593a98d61f8c05a6b93c7cadba4139f7a8180020 100644 (file)
@@ -1,5 +1,7 @@
 2002-03-21  Lars Gullik Bjønnes  <larsbj@birdstep.com>
 
 2002-03-21  Lars Gullik Bjønnes  <larsbj@birdstep.com>
 
+       * most files: ws cleanup
+
        * Makefile.am: remove ld -r stuff
 
 2002-03-20  Lars Gullik Bjønnes  <larsbj@birdstep.com>
        * Makefile.am: remove ld -r stuff
 
 2002-03-20  Lars Gullik Bjønnes  <larsbj@birdstep.com>
index a4b94004f5b4ae2f5c40dd9f477a6f2a45dfa2f9..1293486b5fcd2e3fcd4deb628fd829d345bde970 100644 (file)
@@ -49,7 +49,7 @@ protected:
        ///
        virtual int sync() { return 0; }
 #endif
        ///
        virtual int sync() { return 0; }
 #endif
-       /// 
+       ///
        virtual streamsize xsputn(char_type const *, streamsize n) {
                // fakes a purge of the buffer by returning n
                return n;
        virtual streamsize xsputn(char_type const *, streamsize n) {
                // fakes a purge of the buffer by returning n
                return n;
@@ -174,7 +174,7 @@ DebugStream::DebugStream(Debug::type t)
        : ostream(new debugbuf(cerr.rdbuf())),
          dt(t), nullstream(new nullbuf), internal(0) {}
 
        : ostream(new debugbuf(cerr.rdbuf())),
          dt(t), nullstream(new nullbuf), internal(0) {}
 
-       
+
 /// Constructor, sets the log file to f, and the debug level to t.
 DebugStream::DebugStream(char const * f, Debug::type t)
        : ostream(new debugbuf(cerr.rdbuf())),
 /// Constructor, sets the log file to f, and the debug level to t.
 DebugStream::DebugStream(char const * f, Debug::type t)
        : ostream(new debugbuf(cerr.rdbuf())),
@@ -218,37 +218,37 @@ int main(int, char **)
 {
        /**
           I have been running some tests on this to see how much overhead
 {
        /**
           I have been running some tests on this to see how much overhead
-          this kind of permanent debug code has. My conclusion is: not 
-          much. In all, but the most time critical code, this will have 
+          this kind of permanent debug code has. My conclusion is: not
+          much. In all, but the most time critical code, this will have
           close to no impact at all.
           close to no impact at all.
-          
+
           In the tests that I have run the use of
           if (debugstream.debugging(DebugStream::INFO))
           debugstream << "some debug\n";
           In the tests that I have run the use of
           if (debugstream.debugging(DebugStream::INFO))
           debugstream << "some debug\n";
-          has close to no overhead when the debug level is not 
+          has close to no overhead when the debug level is not
           DebugStream::INFO.
           DebugStream::INFO.
-          
+
           The overhead for
           debugstream.debug(DebugStream::INFO) << "some debug\n";
           is also very small when the debug level is not
           DebugStream::INFO. However the overhead for this will increase
           if complex debugging information is output.
           The overhead for
           debugstream.debug(DebugStream::INFO) << "some debug\n";
           is also very small when the debug level is not
           DebugStream::INFO. However the overhead for this will increase
           if complex debugging information is output.
-          
+
           The overhead when the debug level is DebugStream::INFO can be
           The overhead when the debug level is DebugStream::INFO can be
-          significant, but since we then are running in debug mode it is 
+          significant, but since we then are running in debug mode it is
           of no concern.
           of no concern.
-          
+
           Why should we use this instead of the class Error that we already
           have? First of all it uses C++ iostream and constructs, secondly
           it will be a lot easier to output the debug info that we need
           Why should we use this instead of the class Error that we already
           have? First of all it uses C++ iostream and constructs, secondly
           it will be a lot easier to output the debug info that we need
-          without a lot of manual conversions, thirdly we can now use 
+          without a lot of manual conversions, thirdly we can now use
           iomanipulators and the complete iostream formatting functions.
           iomanipulators and the complete iostream formatting functions.
-          pluss it will work for all types that have a operator<< 
+          pluss it will work for all types that have a operator<<
           defined, and can be used in functors that take a ostream & as
           parameter. And there should be less need for temporary objects.
           And one nice bonus is that we get a log file almost for
           free.
           defined, and can be used in functors that take a ostream & as
           parameter. And there should be less need for temporary objects.
           And one nice bonus is that we get a log file almost for
           free.
-          
+
           Some of the names are of course open to modifications. I will try
           to use the names we already use in LyX.
        */
           Some of the names are of course open to modifications. I will try
           to use the names we already use in LyX.
        */
@@ -268,7 +268,7 @@ int main(int, char **)
        debugstream.debug(Debug::WARN) << "more debug(WARN)\n";
        debugstream.debug(Debug::INFO) << "even more debug(INFO)\n";
        debugstream.debug(Debug::CRIT) << "even more debug(CRIT)\n";
        debugstream.debug(Debug::WARN) << "more debug(WARN)\n";
        debugstream.debug(Debug::INFO) << "even more debug(INFO)\n";
        debugstream.debug(Debug::CRIT) << "even more debug(CRIT)\n";
-       debugstream.addLevel(Debug::type(Debug::CRIT | 
+       debugstream.addLevel(Debug::type(Debug::CRIT |
                                         Debug::WARN));
        debugstream << "Adding Debug::CRIT and Debug::WARN\n";
        debugstream[Debug::WARN] << "more debug(WARN)\n";
                                         Debug::WARN));
        debugstream << "Adding Debug::CRIT and Debug::WARN\n";
        debugstream[Debug::WARN] << "more debug(WARN)\n";
@@ -287,7 +287,7 @@ int main(int, char **)
        // note: the (void*) is needed on g++ 2.7.x since it does not
        // support partial specialization. In egcs this should not be
        // needed.
        // note: the (void*) is needed on g++ 2.7.x since it does not
        // support partial specialization. In egcs this should not be
        // needed.
-       debugstream << "automatic " << &i 
+       debugstream << "automatic " << &i
                    << ", free store " << p << endl;
        delete p;
        /*
                    << ", free store " << p << endl;
        delete p;
        /*
index d27eda5e1b8223dbba5190dba886503668556696..9ed437600edebddb709db37d12a8e2af6f06a75f 100644 (file)
@@ -53,12 +53,12 @@ struct Debug {
     INFO
     Always
 
     INFO
     Always
 
-    If you want to have debug output from time critical code you should 
+    If you want to have debug output from time critical code you should
     use this construct:
     if (debug.debugging(Debug::INFO)) {
     use this construct:
     if (debug.debugging(Debug::INFO)) {
-         debug << "...debug output...\n";
+        debug << "...debug output...\n";
     }
     }
-    
+
     To give debug info even if no debug (NONE) is requested:
     debug << "... always output ...\n";
 
     To give debug info even if no debug (NONE) is requested:
     debug << "... always output ...\n";
 
@@ -80,7 +80,7 @@ class DebugStream : public std::ostream
 public:
        /// Constructor, sets the debug level to t.
        explicit DebugStream(Debug::type t = Debug::NONE);
 public:
        /// Constructor, sets the debug level to t.
        explicit DebugStream(Debug::type t = Debug::NONE);
-       
+
        /// Constructor, sets the log file to f, and the debug level to t.
        explicit
        DebugStream(char const * f, Debug::type t = Debug::NONE);
        /// Constructor, sets the log file to f, and the debug level to t.
        explicit
        DebugStream(char const * f, Debug::type t = Debug::NONE);
@@ -110,7 +110,7 @@ public:
 
        /// Sets the debugstreams' logfile to f.
        void logFile(char const * f);
 
        /// Sets the debugstreams' logfile to f.
        void logFile(char const * f);
-       
+
        /// Returns true if t is part of the current debug level.
        bool debugging(Debug::type t = Debug::ANY) const
        {
        /// Returns true if t is part of the current debug level.
        bool debugging(Debug::type t = Debug::ANY) const
        {
@@ -118,7 +118,7 @@ public:
                return false;
        }
 
                return false;
        }
 
-       
+
        /** Returns the no-op stream if t is not part of the
            current debug level otherwise the real debug stream
            is used.
        /** Returns the no-op stream if t is not part of the
            current debug level otherwise the real debug stream
            is used.
@@ -128,7 +128,7 @@ public:
                return nullstream;
        }
 
                return nullstream;
        }
 
-       
+
        /** This is an operator to give a more convenient use:
            dbgstream[Debug::INFO] << "Info!\n";
        */
        /** This is an operator to give a more convenient use:
            dbgstream[Debug::INFO] << "Info!\n";
        */
@@ -147,5 +147,3 @@ private:
 };
 
 #endif
 };
 
 #endif
-
-
index 959e86363e76a7efbda1b0c4847a98982ff7d31e..032174aa3a56040d980b4cf0f65af02f7492e4b0 100644 (file)
@@ -1,8 +1,8 @@
 /* This file is part of
  * ======================================================
 /* This file is part of
  * ======================================================
- * 
+ *
  *           LyX, The Document Processor
  *           LyX, The Document Processor
- *        
+ *
  *           Copyright 1995 Matthias Ettrich
  *           Copyright 1995-2001 The LyX Team.
  *
  *           Copyright 1995 Matthias Ettrich
  *           Copyright 1995-2001 The LyX Team.
  *
@@ -56,7 +56,7 @@
 #undef S_ISNWK
 #undef S_ISREG
 #undef S_ISSOCK
 #undef S_ISNWK
 #undef S_ISREG
 #undef S_ISSOCK
-#endif 
+#endif
 
 #if !defined(S_ISBLK) && defined(S_IFBLK)
 #define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
 
 #if !defined(S_ISBLK) && defined(S_IFBLK)
 #define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
@@ -87,7 +87,7 @@
 #define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK)
 #endif
 
 #define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK)
 #endif
 
-// Since major is a function on SVR4, we can't use `ifndef major'. 
+// Since major is a function on SVR4, we can't use `ifndef major'.
 // might want to put MAJOR_IN_MKDEV for SYSV
 #ifdef MAJOR_IN_MKDEV
 #include <sys/mkdev.h>
 // might want to put MAJOR_IN_MKDEV for SYSV
 #ifdef MAJOR_IN_MKDEV
 #include <sys/mkdev.h>
@@ -97,7 +97,7 @@
 #include <sys/sysmacros.h>
 #define HAVE_MAJOR
 #endif
 #include <sys/sysmacros.h>
 #define HAVE_MAJOR
 #endif
-#ifdef major           
+#ifdef major
 #define HAVE_MAJOR
 #endif
 
 #define HAVE_MAJOR
 #endif
 
@@ -152,7 +152,7 @@ void FileInfo::dostat(bool link)
 FileInfo & FileInfo::newFile(string const & path, bool link)
 {
        fname = path;
 FileInfo & FileInfo::newFile(string const & path, bool link)
 {
        fname = path;
-       
+
        status = 0;
        err = NoErr;
 
        status = 0;
        err = NoErr;
 
@@ -176,7 +176,7 @@ FileInfo & FileInfo::newFile(int fildes)
 char const * FileInfo::typeIndicator() const
 {
        lyx::Assert(isOK());
 char const * FileInfo::typeIndicator() const
 {
        lyx::Assert(isOK());
+
        if (S_ISDIR(buf.st_mode)) return ("/");
 #ifdef S_ISLNK
        if (S_ISLNK(buf.st_mode)) return ("@");
        if (S_ISDIR(buf.st_mode)) return ("/");
 #ifdef S_ISLNK
        if (S_ISLNK(buf.st_mode)) return ("@");
@@ -196,7 +196,7 @@ char const * FileInfo::typeIndicator() const
 mode_t FileInfo::getMode() const
 {
        lyx::Assert(isOK());
 mode_t FileInfo::getMode() const
 {
        lyx::Assert(isOK());
+
        return buf.st_mode;
 }
 
        return buf.st_mode;
 }
 
@@ -217,7 +217,7 @@ void FileInfo::modeString(char * szString) const
 char FileInfo::typeLetter() const
 {
        lyx::Assert(isOK());
 char FileInfo::typeLetter() const
 {
        lyx::Assert(isOK());
+
 #ifdef S_ISBLK
        if (S_ISBLK(buf.st_mode)) return 'b';
 #endif
 #ifdef S_ISBLK
        if (S_ISBLK(buf.st_mode)) return 'b';
 #endif
@@ -256,7 +256,7 @@ void FileInfo::flagRWX(mode_t i, char * szString) const
 void FileInfo::setSticky(char * szString) const
 {
        lyx::Assert(isOK());
 void FileInfo::setSticky(char * szString) const
 {
        lyx::Assert(isOK());
+
 #ifdef S_ISUID
        if (buf.st_mode & S_ISUID) {
                if (szString[3] != 'x') szString[3] = 'S';
 #ifdef S_ISUID
        if (buf.st_mode & S_ISUID) {
                if (szString[3] != 'x') szString[3] = 'S';
@@ -400,7 +400,7 @@ bool FileInfo::access(int p) const
 {
        // if we don't have a filename we fail
        if (fname.empty()) return false;
 {
        // if we don't have a filename we fail
        if (fname.empty()) return false;
-       
+
        if (::access(fname.c_str(), p) == 0)
                return true;
        else {
        if (::access(fname.c_str(), p) == 0)
                return true;
        else {
index cf7a5a607400f47a8ea65eb4ae4a746c86572793..1237514e458b67a369597a24ad924d64fc9ecca4 100644 (file)
@@ -1,9 +1,9 @@
 // -*- C++ -*-
 /* This file is part of
  * ======================================================
 // -*- C++ -*-
 /* This file is part of
  * ======================================================
- * 
+ *
  *           LyX, The Document Processor
  *           LyX, The Document Processor
- *        
+ *
  *           Copyright 1995 Matthias Ettrich
  *           Copyright 1995-2001 The LyX Team.
  *
  *           Copyright 1995 Matthias Ettrich
  *           Copyright 1995-2001 The LyX Team.
  *
@@ -33,7 +33,7 @@ class FileInfo : boost::noncopyable {
 public:
        ///
        FileInfo();
 public:
        ///
        FileInfo();
-       
+
        /** Get information about file.
            If link is true, the information is about the link itself, not
            the file that is obtained by tracing the links. */
        /** Get information about file.
            If link is true, the information is about the link itself, not
            the file that is obtained by tracing the links. */
@@ -46,52 +46,52 @@ public:
 
        /// Query a new file
        FileInfo & newFile(string const & path, bool link = false);
 
        /// Query a new file
        FileInfo & newFile(string const & path, bool link = false);
-       
+
        /// Query a new file descriptor
        /// Query a new file descriptor
-        FileInfo & newFile(int fildes);
-       
+       FileInfo & newFile(int fildes);
+
        /// Returns a character describing file type (ls -F)
        char const * typeIndicator() const;
        /// Returns a character describing file type (ls -F)
        char const * typeIndicator() const;
-       
+
        /// File protection mode
        mode_t getMode() const;
 
        /// Constructs standard mode string (ls style)
        void modeString(char * szString) const;
        /// File protection mode
        mode_t getMode() const;
 
        /// Constructs standard mode string (ls style)
        void modeString(char * szString) const;
-       
+
        /// returns a letter describing a file type (ls style)
        char typeLetter() const;
        /// returns a letter describing a file type (ls style)
        char typeLetter() const;
-       
+
        /// builds 'rwx' string describing file access rights
        void flagRWX(mode_t i, char * szString) const;
        /// builds 'rwx' string describing file access rights
        void flagRWX(mode_t i, char * szString) const;
-       
+
        /// updates mode string to match suid/sgid/sticky bits
        void setSticky(char * szString) const;
        /// updates mode string to match suid/sgid/sticky bits
        void setSticky(char * szString) const;
-       
+
        ///
        time_t getModificationTime() const;
        ///
        time_t getModificationTime() const;
-       
+
        ///
        time_t getAccessTime() const;
        ///
        time_t getAccessTime() const;
-       
+
        ///
        time_t getStatusChangeTime() const;
        ///
        time_t getStatusChangeTime() const;
-       
+
        /// Total file size in bytes
        off_t getSize() const;
        /// Total file size in bytes
        off_t getSize() const;
-       
+
        /// Number of hard links
        nlink_t getNumberOfLinks() const;
        /// Number of hard links
        nlink_t getNumberOfLinks() const;
-       
+
        /// User ID of owner
        uid_t getUid() const;
        /// User ID of owner
        uid_t getUid() const;
-       
+
        /// Group ID of owner
        gid_t getGid() const;
        /// Group ID of owner
        gid_t getGid() const;
-       
+
        /// Is the file information correct? Did the query succeed?
        bool isOK() const;
        /// Is the file information correct? Did the query succeed?
        bool isOK() const;
-       
+
        /// Permission flags
        enum perm_test {
                /// test for read permission
        /// Permission flags
        enum perm_test {
                /// test for read permission
index 41d69602e55b01d65363c1ce4c9341e43b0ab6e4..ab0e6da223a0e93d738d47a0ee86841f4005a430 100644 (file)
@@ -1,8 +1,8 @@
 /* This file is part of
  * ======================================================
 /* This file is part of
  * ======================================================
- * 
+ *
  *           LyX, The Document Processor
  *           LyX, The Document Processor
- *      
+ *
  *         Copyright 1995 Matthias Ettrich
  *          Copyright 1995-2001 The LyX Team.
  *
  *         Copyright 1995 Matthias Ettrich
  *          Copyright 1995-2001 The LyX Team.
  *
index b551dca44a7e7cb4d9b441f612fd92320b471e10..60d5bc79aa4eac6eb4c22a2db47fecad40335d22 100644 (file)
@@ -1,9 +1,9 @@
 // -*- C++ -*-
 /* This file is part of
  * ======================================================
 // -*- C++ -*-
 /* This file is part of
  * ======================================================
- * 
+ *
  *           LyX, The Document Processor
  *           LyX, The Document Processor
- *      
+ *
  *         Copyright 1995 Matthias Ettrich
  *          Copyright 1995-2001 The LyX Team.
  *
  *         Copyright 1995 Matthias Ettrich
  *          Copyright 1995-2001 The LyX Team.
  *
 
 
 #ifndef LISTREAM_H
 
 
 #ifndef LISTREAM_H
-#define LISTREAM_H 
+#define LISTREAM_H
 
 #ifdef HAVE_ISTREAM
 #include <istream>
 
 #ifdef HAVE_ISTREAM
 #include <istream>
-#else 
+#else
 #include <iostream>
 #endif
 
 #include <iostream>
 #endif
 
index d1c4948b76285d15fc6799a01b19ab3cf1128813..bd6ec805e62fc65b82d2667a8af07c0051f11520 100644 (file)
@@ -1,9 +1,9 @@
 // -*- C++ -*-
 /* This file is part of
  * ======================================================
 // -*- C++ -*-
 /* This file is part of
  * ======================================================
- * 
+ *
  *           LyX, The Document Processor
  *           LyX, The Document Processor
- *      
+ *
  *         Copyright 1995 Matthias Ettrich
  *          Copyright 1995-2001 The LyX Team.
  *
  *         Copyright 1995 Matthias Ettrich
  *          Copyright 1995-2001 The LyX Team.
  *
 
 
 #ifndef LOSTREAM_H
 
 
 #ifndef LOSTREAM_H
-#define LOSTREAM_H 
+#define LOSTREAM_H
 
 #ifdef HAVE_OSTREAM
 #include <ostream>
 
 #ifdef HAVE_OSTREAM
 #include <ostream>
-#else 
+#else
 #include <iostream>
 #endif
 
 #include <iostream>
 #endif
 
index 1b6064abd78a9027fac64a8728fceb9df0c9908c..a82b6642301e3e666388108a78d20247b5a851d7 100644 (file)
@@ -20,40 +20,40 @@ using std::make_pair;
 struct LRegex::Impl {
        ///
        regex_t * preg;
 struct LRegex::Impl {
        ///
        regex_t * preg;
-       
+
        ///
        int error_code;
        ///
        int error_code;
-       
+
        ///
        mutable LRegex::SubMatches matches;
        ///
        mutable LRegex::SubMatches matches;
-       
+
        ///
        ///
-       Impl(string const & regex) 
+       Impl(string const & regex)
                : preg(new regex_t), error_code(0)
        {
                error_code = regcomp(preg, regex.c_str(), REG_EXTENDED);
        }
                : preg(new regex_t), error_code(0)
        {
                error_code = regcomp(preg, regex.c_str(), REG_EXTENDED);
        }
-       
+
        ///
        ~Impl()
        {
                regfree(preg);
                delete preg;
        }
        ///
        ~Impl()
        {
                regfree(preg);
                delete preg;
        }
-       
+
        ///
        bool exact_match(string const & str) const
        {
                regmatch_t tmp;
                if (!regexec(preg, str.c_str(), 1, &tmp, 0)) {
        ///
        bool exact_match(string const & str) const
        {
                regmatch_t tmp;
                if (!regexec(preg, str.c_str(), 1, &tmp, 0)) {
-                       if (tmp.rm_so == 0 && 
+                       if (tmp.rm_so == 0 &&
                            tmp.rm_eo == static_cast<signed int>(str.length()))
                                return true;
                }
                // no match
                return false;
        }
                            tmp.rm_eo == static_cast<signed int>(str.length()))
                                return true;
                }
                // no match
                return false;
        }
-       
+
        ///
        LRegex::MatchPair const first_match(string const & str) const
        {
        ///
        LRegex::MatchPair const first_match(string const & str) const
        {
@@ -65,7 +65,7 @@ struct LRegex::Impl {
                        tmp.rm_eo : string::npos;
                return make_pair(first, second - first);
        }
                        tmp.rm_eo : string::npos;
                return make_pair(first, second - first);
        }
-       
+
        ///
        string const getError() const
        {
        ///
        string const getError() const
        {
@@ -76,7 +76,7 @@ struct LRegex::Impl {
                delete [] tmp;
                return ret;
        }
                delete [] tmp;
                return ret;
        }
-       
+
        ///
        LRegex::SubMatches const & exec(string const & str) const
        {
        ///
        LRegex::SubMatches const & exec(string const & str) const
        {
index b873c23cf39dad73c58f189b3063c63e33f90436..ef85a2d9317403cf2b48bfaed6ce0888d3588089 100644 (file)
@@ -1,8 +1,8 @@
 /* This file is part of
  * ======================================================
 /* This file is part of
  * ======================================================
- * 
+ *
  *           LyX, The Document Processor
  *           LyX, The Document Processor
- *      
+ *
  *           Copyright 1995 Matthias Ettrich
  *           Copyright 1995-2001 The LyX Team.
  *
  *           Copyright 1995 Matthias Ettrich
  *           Copyright 1995-2001 The LyX Team.
  *
index b1bcf4da998f27a3d7738293148227d623899dad..b066c0d1e9bc8656ffde5404a5e8dcee1099ec04 100644 (file)
@@ -1,9 +1,9 @@
 // -*- C++ -*-
 /* This file is part of
  * ======================================================
 // -*- C++ -*-
 /* This file is part of
  * ======================================================
- * 
+ *
  *           LyX, The Document Processor
  *           LyX, The Document Processor
- *      
+ *
  *         Copyright 1995 Matthias Ettrich
  *          Copyright 1995-2001 The LyX Team.
  *
  *         Copyright 1995 Matthias Ettrich
  *          Copyright 1995-2001 The LyX Team.
  *
@@ -13,7 +13,7 @@
 // Programming Language by Bjarne Stroustrup
 
 #ifndef LSUBSTRING_H
 // Programming Language by Bjarne Stroustrup
 
 #ifndef LSUBSTRING_H
-#define LSUBSTRING_H 
+#define LSUBSTRING_H
 
 #ifdef __GNUG__
 #pragma interface
 
 #ifdef __GNUG__
 #pragma interface
index 5a81c1e6cf3c2aa44b70363337758e54376cc487..782d7426321648cf14eacb79278772d2fd0e2253 100644 (file)
@@ -1,8 +1,8 @@
 /* This file is part of
  * ======================================================
 /* This file is part of
  * ======================================================
- * 
+ *
  *           LyX, The Document Processor
  *           LyX, The Document Processor
- *      
+ *
  *          Copyright 2000-2001 Jean-Marc Lasgouttes
  *
  * ======================================================*/
  *          Copyright 2000-2001 Jean-Marc Lasgouttes
  *
  * ======================================================*/
 
 StrPool::~StrPool()
 {
 
 StrPool::~StrPool()
 {
-        for (Pool::const_iterator cit = pool_.begin(); 
+       for (Pool::const_iterator cit = pool_.begin();
             cit != pool_.end() ; ++cit) {
             cit != pool_.end() ; ++cit) {
-                delete[] (*cit);
-        }
+               delete[] (*cit);
+       }
 }
 
 /* One interesting thing here would be to store the strings in a map,
 }
 
 /* One interesting thing here would be to store the strings in a map,
@@ -31,12 +31,11 @@ StrPool::~StrPool()
 char const * StrPool::add(string const & str)
 {
        string::size_type s = str.length();
 char const * StrPool::add(string const & str)
 {
        string::size_type s = str.length();
-        char * buf = new char [s + 1];
-        str.copy(buf, s);
-        buf[s] = '\0';
-        pool_.push_back(buf);
-        return buf;
+       char * buf = new char [s + 1];
+       str.copy(buf, s);
+       buf[s] = '\0';
+       pool_.push_back(buf);
+       return buf;
 }
 
 //StrPool strPool;
 }
 
 //StrPool strPool;
-
index 62c1814cabbaa10e8d4f3a9346f9c26ec7b42fb8..622db935412c35163ca02746fbed9827c85c658d 100644 (file)
@@ -1,9 +1,9 @@
 // -*- C++ -*-
 /* This file is part of
  * ======================================================
 // -*- C++ -*-
 /* This file is part of
  * ======================================================
- * 
+ *
  *           LyX, The Document Processor
  *           LyX, The Document Processor
- *      
+ *
  *          Copyright 2000-2001 Jean-Marc Lasgouttes
  *
  * ======================================================*/
  *          Copyright 2000-2001 Jean-Marc Lasgouttes
  *
  * ======================================================*/
 ///
 class StrPool {
 public:
 ///
 class StrPool {
 public:
-        /// delete all the strings that have been allocated by add()
-        ~StrPool();
-        /// Make a copy of the string, and remember it in the pool
-        char const * add(string const & str);
-        
+       /// delete all the strings that have been allocated by add()
+       ~StrPool();
+       /// Make a copy of the string, and remember it in the pool
+       char const * add(string const & str);
+
 private:
        ///
        typedef std::vector<char const *> Pool;
        ///
 private:
        ///
        typedef std::vector<char const *> Pool;
        ///
-        Pool pool_;
+       Pool pool_;
 };
 
 //extern StrPool strPool;
 };
 
 //extern StrPool strPool;
index a593833e93ef9ceb942302fba71148f09f984e7f..07cbed04cfc9c97c706ce3421e4ce694a967592a 100644 (file)
@@ -1,11 +1,11 @@
 /*
        filetools.C (former paths.C) - part of LyX project
 /*
        filetools.C (former paths.C) - part of LyX project
-       General path-mangling functions 
+       General path-mangling functions
        Copyright 1996 Ivan Schreter
        Parts Copyright 1996 Dirk Niggemann
        Copyright 1996 Ivan Schreter
        Parts Copyright 1996 Dirk Niggemann
-        Parts Copyright 1985, 1990, 1993 Free Software Foundation, Inc.
+       Parts Copyright 1985, 1990, 1993 Free Software Foundation, Inc.
        Parts Copyright 1996 Asger Alstrup
        Parts Copyright 1996 Asger Alstrup
-       
+
        See also filetools.h.
 
        lyx-filetool.C : tools functions for file/path handling
        See also filetools.h.
 
        lyx-filetool.C : tools functions for file/path handling
@@ -28,7 +28,7 @@
 #endif
 
 #include <cstdlib>
 #endif
 
 #include <cstdlib>
-#include <cstdio> 
+#include <cstdio>
 #include <fcntl.h>
 #include <cerrno>
 #include "debug.h"
 #include <fcntl.h>
 #include <cerrno>
 #include "debug.h"
@@ -92,7 +92,7 @@ string const MakeLatexName(string const & file)
 {
        string name = OnlyFilename(file);
        string const path = OnlyPath(file);
 {
        string name = OnlyFilename(file);
        string const path = OnlyPath(file);
-       
+
        for (string::size_type i = 0; i < name.length(); ++i) {
                name[i] &= 0x7f; // set 8th bit to 0
        };
        for (string::size_type i = 0; i < name.length(); ++i) {
                name[i] &= 0x7f; // set 8th bit to 0
        };
@@ -101,7 +101,7 @@ string const MakeLatexName(string const & file)
        string const keep("abcdefghijklmnopqrstuvwxyz"
                "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
                "@!\"'()*+,-./0123456789:;<=>?[]`|");
        string const keep("abcdefghijklmnopqrstuvwxyz"
                "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
                "@!\"'()*+,-./0123456789:;<=>?[]`|");
-       
+
        string::size_type pos = 0;
        while ((pos = name.find_first_not_of(keep, pos)) != string::npos) {
                name[pos++] = '_';
        string::size_type pos = 0;
        while ((pos = name.find_first_not_of(keep, pos)) != string::npos) {
                name[pos++] = '_';
@@ -133,11 +133,11 @@ bool IsFileReadable (string const & path)
 // Is a file read_only?
 // return 1 read-write
 //       0 read_only
 // Is a file read_only?
 // return 1 read-write
 //       0 read_only
-//      -1 error (doesn't exist, no access, anything else) 
+//      -1 error (doesn't exist, no access, anything else)
 int IsFileWriteable (string const & path)
 {
        FileInfo fi(path);
 int IsFileWriteable (string const & path)
 {
        FileInfo fi(path);
+
        if (fi.access(FileInfo::wperm|FileInfo::rperm)) // read-write
                return 1;
        if (fi.readable()) // read-only
        if (fi.access(FileInfo::wperm|FileInfo::rperm)) // read-write
                return 1;
        if (fi.readable()) // read-only
@@ -151,12 +151,12 @@ int IsFileWriteable (string const & path)
 bool IsDirWriteable (string const & path)
 {
        lyxerr[Debug::FILES] << "IsDirWriteable: " << path << endl;
 bool IsDirWriteable (string const & path)
 {
        lyxerr[Debug::FILES] << "IsDirWriteable: " << path << endl;
+
        string const tmpfl(lyx::tempName(path, "lyxwritetest"));
 
        if (tmpfl.empty())
                return false;
        string const tmpfl(lyx::tempName(path, "lyxwritetest"));
 
        if (tmpfl.empty())
                return false;
+
        lyx::unlink(tmpfl);
        return true;
 }
        lyx::unlink(tmpfl);
        return true;
 }
@@ -167,22 +167,22 @@ bool IsDirWriteable (string const & path)
 // If path entry begins with $$LyX/, use system_lyxdir
 // If path entry begins with $$User/, use user_lyxdir
 // Example: "$$User/doc;$$LyX/doc"
 // If path entry begins with $$LyX/, use system_lyxdir
 // If path entry begins with $$User/, use user_lyxdir
 // Example: "$$User/doc;$$LyX/doc"
-string const FileOpenSearch (string const & path, string const & name, 
+string const FileOpenSearch (string const & path, string const & name,
                             string const & ext)
 {
        string real_file, path_element;
        bool notfound = true;
        string tmppath = split(path, path_element, ';');
                             string const & ext)
 {
        string real_file, path_element;
        bool notfound = true;
        string tmppath = split(path, path_element, ';');
-       
+
        while (notfound && !path_element.empty()) {
                path_element = os::slashify_path(path_element);
                if (!suffixIs(path_element, '/'))
                        path_element+= '/';
                path_element = subst(path_element, "$$LyX", system_lyxdir);
                path_element = subst(path_element, "$$User", user_lyxdir);
        while (notfound && !path_element.empty()) {
                path_element = os::slashify_path(path_element);
                if (!suffixIs(path_element, '/'))
                        path_element+= '/';
                path_element = subst(path_element, "$$LyX", system_lyxdir);
                path_element = subst(path_element, "$$User", user_lyxdir);
-               
+
                real_file = FileSearch(path_element, name, ext);
                real_file = FileSearch(path_element, name, ext);
-               
+
                if (real_file.empty()) {
                        do {
                                tmppath = split(tmppath, path_element, ';');
                if (real_file.empty()) {
                        do {
                                tmppath = split(tmppath, path_element, ';');
@@ -211,12 +211,12 @@ vector<string> const DirList(string const & dir, string const & ext)
        vector<string> dirlist;
        DIR * dirp = ::opendir(dir.c_str());
        if (!dirp) {
        vector<string> dirlist;
        DIR * dirp = ::opendir(dir.c_str());
        if (!dirp) {
-               lyxerr[Debug::FILES] 
+               lyxerr[Debug::FILES]
                        << "Directory \"" << dir
                        << "\" does not exist to DirList." << endl;
                return dirlist;
        }
                        << "Directory \"" << dir
                        << "\" does not exist to DirList." << endl;
                return dirlist;
        }
+
        dirent * dire;
        while ((dire = ::readdir(dirp))) {
                string const fil = dire->d_name;
        dirent * dire;
        while ((dire = ::readdir(dirp))) {
                string const fil = dire->d_name;
@@ -238,9 +238,9 @@ vector<string> const DirList(string const & dir, string const & ext)
           vector<string> dirlist;
           directory_iterator dit("dir");
           while (dit != directory_iterator()) {
           vector<string> dirlist;
           directory_iterator dit("dir");
           while (dit != directory_iterator()) {
-                  string fil = dit->filename;
+                  string fil = dit->filename;
                   if (prefixIs(fil, extension)) {
                   if (prefixIs(fil, extension)) {
-                          dirlist.push_back(fil);
+                          dirlist.push_back(fil);
                   }
                   ++dit;
           }
                   }
                   ++dit;
           }
@@ -251,8 +251,8 @@ vector<string> const DirList(string const & dir, string const & ext)
 
 
 // Returns the real name of file name in directory path, with optional
 
 
 // Returns the real name of file name in directory path, with optional
-// extension ext.  
-string const FileSearch(string const & path, string const & name, 
+// extension ext.
+string const FileSearch(string const & path, string const & name,
                        string const & ext)
 {
        // if `name' is an absolute path, we ignore the setting of `path'
                        string const & ext)
 {
        // if `name' is an absolute path, we ignore the setting of `path'
@@ -262,14 +262,14 @@ string const FileSearch(string const & path, string const & name,
        // search first without extension, then with it.
        if (IsFileReadable(fullname))
                return fullname;
        // search first without extension, then with it.
        if (IsFileReadable(fullname))
                return fullname;
-       else if (ext.empty()) 
+       else if (ext.empty())
                return string();
        else { // Is it not more reasonable to use ChangeExtension()? (SMiyata)
                fullname += '.';
                fullname += ext;
                if (IsFileReadable(fullname))
                        return fullname;
                return string();
        else { // Is it not more reasonable to use ChangeExtension()? (SMiyata)
                fullname += '.';
                fullname += ext;
                if (IsFileReadable(fullname))
                        return fullname;
-               else 
+               else
                        return string();
        }
 }
                        return string();
        }
 }
@@ -279,28 +279,28 @@ string const FileSearch(string const & path, string const & name,
 //   1) user_lyxdir
 //   2) build_lyxdir (if not empty)
 //   3) system_lyxdir
 //   1) user_lyxdir
 //   2) build_lyxdir (if not empty)
 //   3) system_lyxdir
-string const LibFileSearch(string const & dir, string const & name, 
+string const LibFileSearch(string const & dir, string const & name,
                           string const & ext)
 {
                           string const & ext)
 {
-       string fullname = FileSearch(AddPath(user_lyxdir, dir), name, ext); 
+       string fullname = FileSearch(AddPath(user_lyxdir, dir), name, ext);
        if (!fullname.empty())
                return fullname;
        if (!fullname.empty())
                return fullname;
-       
-       if (!build_lyxdir.empty()) 
+
+       if (!build_lyxdir.empty())
                fullname = FileSearch(AddPath(build_lyxdir, dir), name, ext);
        if (!fullname.empty())
                return fullname;
                fullname = FileSearch(AddPath(build_lyxdir, dir), name, ext);
        if (!fullname.empty())
                return fullname;
-       
+
        return FileSearch(AddPath(system_lyxdir, dir), name, ext);
 }
 
 
 string const
        return FileSearch(AddPath(system_lyxdir, dir), name, ext);
 }
 
 
 string const
-i18nLibFileSearch(string const & dir, string const & name, 
+i18nLibFileSearch(string const & dir, string const & name,
                  string const & ext)
 {
        // this comment is from intl/dcigettext.c. We try to mimick this
                  string const & ext)
 {
        // this comment is from intl/dcigettext.c. We try to mimick this
-       // behaviour here.  
+       // behaviour here.
        /* The highest priority value is the `LANGUAGE' environment
           variable. But we don't use the value if the currently
           selected locale is the C locale. This is a GNU extension. */
        /* The highest priority value is the `LANGUAGE' environment
           variable. But we don't use the value if the currently
           selected locale is the C locale. This is a GNU extension. */
@@ -313,9 +313,9 @@ i18nLibFileSearch(string const & dir, string const & name,
                        lang = GetEnv("LANG");
                }
        }
                        lang = GetEnv("LANG");
                }
        }
-       
+
        lang = token(lang, '_', 0);
        lang = token(lang, '_', 0);
-       
+
        if (lang.empty() || lang == "C")
                return LibFileSearch(dir, name, ext);
        else {
        if (lang.empty() || lang == "C")
                return LibFileSearch(dir, name, ext);
        else {
@@ -356,7 +356,7 @@ bool PutEnv(string const & envstr)
 
 #if HAVE_PUTENV
        // this leaks, but what can we do about it?
 
 #if HAVE_PUTENV
        // this leaks, but what can we do about it?
-       //   Is doing a getenv() and a free() of the older value 
+       //   Is doing a getenv() and a free() of the older value
        //   a good idea? (JMarc)
        // Actually we don't have to leak...calling putenv like this
        // should be enough: ... and this is obviously not enough if putenv
        //   a good idea? (JMarc)
        // Actually we don't have to leak...calling putenv like this
        // should be enough: ... and this is obviously not enough if putenv
@@ -377,7 +377,7 @@ bool PutEnv(string const & envstr)
        // I will enable the above.
        //int retval = lyx::putenv(envstr.c_str());
 #else
        // I will enable the above.
        //int retval = lyx::putenv(envstr.c_str());
 #else
-#ifdef HAVE_SETENV 
+#ifdef HAVE_SETENV
        string varname;
        string const str = envstr.split(varname,'=');
        int const retval = ::setenv(varname.c_str(), str.c_str(), true);
        string varname;
        string const str = envstr.split(varname,'=');
        int const retval = ::setenv(varname.c_str(), str.c_str(), true);
@@ -429,11 +429,11 @@ int DeleteAllFilesInDir (string const & path)
        int return_value = 0;
        while ((de = readdir(dir))) {
                string const temp = de->d_name;
        int return_value = 0;
        while ((de = readdir(dir))) {
                string const temp = de->d_name;
-               if (temp == "." || temp == "..") 
+               if (temp == "." || temp == "..")
                        continue;
                string const unlinkpath = AddName (path, temp);
 
                        continue;
                string const unlinkpath = AddName (path, temp);
 
-               lyxerr[Debug::FILES] << "Deleting file: " << unlinkpath 
+               lyxerr[Debug::FILES] << "Deleting file: " << unlinkpath
                                     << endl;
 
                bool deleted = true;
                                     << endl;
 
                bool deleted = true;
@@ -441,12 +441,12 @@ int DeleteAllFilesInDir (string const & path)
                if (fi.isOK() && fi.isDir())
                        deleted = (DeleteAllFilesInDir(unlinkpath) == 0);
                deleted &= (lyx::unlink(unlinkpath) == 0);
                if (fi.isOK() && fi.isDir())
                        deleted = (DeleteAllFilesInDir(unlinkpath) == 0);
                deleted &= (lyx::unlink(unlinkpath) == 0);
-               if (!deleted) {
-                       Alert::err_alert(_("Error! Could not remove file:"), 
+               if (!deleted) {
+                       Alert::err_alert(_("Error! Could not remove file:"),
                                unlinkpath);
                        return_value = -1;
                }
                                unlinkpath);
                        return_value = -1;
                }
-        }
+       }
        closedir(dir);
        return return_value;
 }
        closedir(dir);
        return return_value;
 }
@@ -457,14 +457,14 @@ string const CreateTmpDir(string const & tempdir, string const & mask)
        lyxerr[Debug::FILES]
                << "CreateTmpDir: tempdir=`" << tempdir << "'\n"
                << "CreateTmpDir:    mask=`" << mask << "'" << endl;
        lyxerr[Debug::FILES]
                << "CreateTmpDir: tempdir=`" << tempdir << "'\n"
                << "CreateTmpDir:    mask=`" << mask << "'" << endl;
-       
+
        string const tmpfl(lyx::tempName(tempdir, mask));
        // lyx::tempName actually creates a file to make sure that it
        // stays unique. So we have to delete it before we can create
        // a dir with the same name. Note also that we are not thread
        // safe because of the gap between unlink and mkdir. (Lgb)
        lyx::unlink(tmpfl.c_str());
        string const tmpfl(lyx::tempName(tempdir, mask));
        // lyx::tempName actually creates a file to make sure that it
        // stays unique. So we have to delete it before we can create
        // a dir with the same name. Note also that we are not thread
        // safe because of the gap between unlink and mkdir. (Lgb)
        lyx::unlink(tmpfl.c_str());
-       
+
        if (tmpfl.empty() || lyx::mkdir(tmpfl, 0700)) {
                Alert::err_alert(_("Error! Couldn't create temporary directory:"),
                             tempdir);
        if (tmpfl.empty() || lyx::mkdir(tmpfl, 0700)) {
                Alert::err_alert(_("Error! Couldn't create temporary directory:"),
                             tempdir);
@@ -482,12 +482,12 @@ int DestroyTmpDir(string const & tmpdir, bool Allfiles)
        if (Allfiles && DeleteAllFilesInDir(tmpdir)) {
                return -1;
        }
        if (Allfiles && DeleteAllFilesInDir(tmpdir)) {
                return -1;
        }
-       if (lyx::rmdir(tmpdir)) { 
-               Alert::err_alert(_("Error! Couldn't delete temporary directory:"), 
+       if (lyx::rmdir(tmpdir)) {
+               Alert::err_alert(_("Error! Couldn't delete temporary directory:"),
                             tmpdir);
                return -1;
        }
                             tmpdir);
                return -1;
        }
-       return 0; 
+       return 0;
 }
 
 } // namespace anon
 }
 
 } // namespace anon
@@ -594,7 +594,7 @@ string const MakeAbsPath(string const & RelPath, string const & BasePath)
                TempBase = BasePath;
        else
                TempBase = AddPath(lyx::getcwd(), BasePath);
                TempBase = BasePath;
        else
                TempBase = AddPath(lyx::getcwd(), BasePath);
-       
+
        // Handle /./ at the end of the path
        while (suffixIs(TempBase, "/./"))
                TempBase.erase(TempBase.length() - 2);
        // Handle /./ at the end of the path
        while (suffixIs(TempBase, "/./"))
                TempBase.erase(TempBase.length() - 2);
@@ -606,7 +606,7 @@ string const MakeAbsPath(string const & RelPath, string const & BasePath)
        while (!RTemp.empty()) {
                // Split by next /
                RTemp = split(RTemp, Temp, '/');
        while (!RTemp.empty()) {
                // Split by next /
                RTemp = split(RTemp, Temp, '/');
-               
+
                if (Temp == ".") continue;
                if (Temp == "..") {
                        // Remove one level of TempBase
                if (Temp == ".") continue;
                if (Temp == "..") {
                        // Remove one level of TempBase
@@ -729,7 +729,7 @@ string const NormalizePath(string const & path)
        while (!RTemp.empty()) {
                // Split by next /
                RTemp = split(RTemp, Temp, '/');
        while (!RTemp.empty()) {
                // Split by next /
                RTemp = split(RTemp, Temp, '/');
-               
+
                if (Temp == ".") {
                        TempBase = "./";
                } else if (Temp == "..") {
                if (Temp == ".") {
                        TempBase = "./";
                } else if (Temp == "..") {
@@ -747,7 +747,7 @@ string const NormalizePath(string const & path)
        }
 
        // returns absolute path
        }
 
        // returns absolute path
-       return TempBase;        
+       return TempBase;
 }
 
 
 }
 
 
@@ -771,24 +771,24 @@ string const GetFileContents(string const & fname)
 //
 // Search ${...} as Variable-Name inside the string and replace it with
 // the denoted environmentvariable
 //
 // Search ${...} as Variable-Name inside the string and replace it with
 // the denoted environmentvariable
-// Allow Variables according to 
+// Allow Variables according to
 //  variable :=  '$' '{' [A-Za-z_]{[A-Za-z_0-9]*} '}'
 //
 
 string const ReplaceEnvironmentPath(string const & path)
 {
 //  variable :=  '$' '{' [A-Za-z_]{[A-Za-z_0-9]*} '}'
 //
 
 string const ReplaceEnvironmentPath(string const & path)
 {
-// 
+//
 // CompareChar: Environmentvariables starts with this character
 // PathChar:    Next path component start with this character
 // while CompareChar found do:
 //       Split String with PathChar
 // CompareChar: Environmentvariables starts with this character
 // PathChar:    Next path component start with this character
 // while CompareChar found do:
 //       Split String with PathChar
-//      Search Environmentvariable
+//      Search Environmentvariable
 //      if found: Replace Strings
 //
        char const CompareChar = '$';
 //      if found: Replace Strings
 //
        char const CompareChar = '$';
-       char const FirstChar = '{'; 
-       char const EndChar = '}'; 
-       char const UnderscoreChar = '_'; 
+       char const FirstChar = '{';
+       char const EndChar = '}';
+       char const UnderscoreChar = '_';
        string EndString; EndString += EndChar;
        string FirstString; FirstString += FirstChar;
        string CompareString; CompareString += CompareChar;
        string EndString; EndString += EndChar;
        string FirstString; FirstString += FirstChar;
        string CompareString; CompareString += CompareChar;
@@ -800,9 +800,9 @@ string const ReplaceEnvironmentPath(string const & path)
        string result0 = split(path, result1, CompareChar);
        while (!result0.empty()) {
                string copy1(result0); // contains String after $
        string result0 = split(path, result1, CompareChar);
        while (!result0.empty()) {
                string copy1(result0); // contains String after $
-               
+
                // Check, if there is an EndChar inside original String.
                // Check, if there is an EndChar inside original String.
-               
+
                if (!regexMatch(copy1, RegExp)) {
                        // No EndChar inside. So we are finished
                        result1 += CompareString + result0;
                if (!regexMatch(copy1, RegExp)) {
                        // No EndChar inside. So we are finished
                        result1 += CompareString + result0;
@@ -833,8 +833,8 @@ string const ReplaceEnvironmentPath(string const & path)
                bool result = isalpha(*cp1) || (*cp1 == UnderscoreChar);
                ++cp1;
                while (*cp1 && result) {
                bool result = isalpha(*cp1) || (*cp1 == UnderscoreChar);
                ++cp1;
                while (*cp1 && result) {
-                       result = isalnum(*cp1) || 
-                               (*cp1 == UnderscoreChar); 
+                       result = isalnum(*cp1) ||
+                               (*cp1 == UnderscoreChar);
                        ++cp1;
                }
 
                        ++cp1;
                }
 
@@ -845,7 +845,7 @@ string const ReplaceEnvironmentPath(string const & path)
                        result1 += res1;
                        continue;
                }
                        result1 += res1;
                        continue;
                }
-            
+
                string env(GetEnv(res1_contents + 1));
                if (!env.empty()) {
                        // Congratulations. Environmentvariable found
                string env(GetEnv(res1_contents + 1));
                if (!env.empty()) {
                        // Congratulations. Environmentvariable found
@@ -856,7 +856,7 @@ string const ReplaceEnvironmentPath(string const & path)
                // Next $-Sign?
                result0  = split(res0, res1, CompareChar);
                result1 += res1;
                // Next $-Sign?
                result0  = split(res0, res1, CompareChar);
                result1 += res1;
-       } 
+       }
        return result1;
 }  // ReplaceEnvironmentPath
 
        return result1;
 }  // ReplaceEnvironmentPath
 
@@ -919,7 +919,7 @@ string const AddPath(string const & path, string const & path_2)
        }
 
        if (!path2.empty()) {
        }
 
        if (!path2.empty()) {
-               string::size_type const p2start = path2.find_first_not_of('/');
+               string::size_type const p2start = path2.find_first_not_of('/');
                string::size_type const p2end = path2.find_last_not_of('/');
                string const tmp = path2.substr(p2start, p2end - p2start + 1);
                buf += tmp + '/';
                string::size_type const p2end = path2.find_last_not_of('/');
                string const tmp = path2.substr(p2start, p2end - p2start + 1);
                buf += tmp + '/';
@@ -928,7 +928,7 @@ string const AddPath(string const & path, string const & path_2)
 }
 
 
 }
 
 
-/* 
+/*
  Change extension of oldname to extension.
  Strips path off if no_path == true.
  If no extension on oldname, just appends.
  Change extension of oldname to extension.
  Strips path off if no_path == true.
  If no extension on oldname, just appends.
@@ -939,7 +939,7 @@ string const ChangeExtension(string const & oldname, string const & extension)
        string::size_type last_dot = oldname.rfind('.');
        if (last_dot < last_slash && last_slash != string::npos)
                last_dot = string::npos;
        string::size_type last_dot = oldname.rfind('.');
        if (last_dot < last_slash && last_slash != string::npos)
                last_dot = string::npos;
-       
+
        string ext;
        // Make sure the extension starts with a dot
        if (!extension.empty() && extension[0] != '.')
        string ext;
        // Make sure the extension starts with a dot
        if (!extension.empty() && extension[0] != '.')
@@ -965,7 +965,7 @@ string const GetExtension(string const & name)
 }
 
 // the different filetypes and what they contain in one of the first lines
 }
 
 // the different filetypes and what they contain in one of the first lines
-// (dots are any characters).          (Herbert 20020131)
+// (dots are any characters).          (Herbert 20020131)
 // AGR Grace...
 // BMP BM...
 // EPS %!PS-Adobe-3.0 EPSF...
 // AGR Grace...
 // BMP BM...
 // EPS %!PS-Adobe-3.0 EPSF...
@@ -974,9 +974,9 @@ string const GetExtension(string const & name)
 // JPG JFIF
 // PDF %PDF-...
 // PNG .PNG...
 // JPG JFIF
 // PDF %PDF-...
 // PNG .PNG...
-// PBM P1... or P4     (B/W)
+// PBM P1... or P4     (B/W)
 // PGM P2... or P5     (Grayscale)
 // PGM P2... or P5     (Grayscale)
-// PPM P3... or P6     (color)
+// PPM P3... or P6     (color)
 // PS  %!PS-Adobe-2.0 or 1.0,  no "EPSF"!
 // SGI \001\332...     (decimal 474)
 // TGIF        %TGIF...
 // PS  %!PS-Adobe-2.0 or 1.0,  no "EPSF"!
 // SGI \001\332...     (decimal 474)
 // TGIF        %TGIF...
@@ -996,7 +996,7 @@ string const getExtFromContents(string const & filename) {
        if (filename.empty() || !IsFileReadable(filename))
                // paranoia check
                return string();
        if (filename.empty() || !IsFileReadable(filename))
                // paranoia check
                return string();
-       
+
        ifstream ifs(filename.c_str());
        if (!ifs)
                // Couldn't open file...
        ifstream ifs(filename.c_str());
        if (!ifs)
                // Couldn't open file...
@@ -1068,7 +1068,7 @@ string const getExtFromContents(string const & filename) {
                                        format =  "ppm";
                                }
                                break;
                                        format =  "ppm";
                                }
                                break;
-                       } 
+                       }
                        if (stamp == "\001\332")
                            format =  "sgi";
                        else if ((stamp == "II") || (stamp == "MM"))
                        if (stamp == "\001\332")
                            format =  "sgi";
                        else if ((stamp == "II") || (stamp == "MM"))
@@ -1120,20 +1120,20 @@ string const getExtFromContents(string const & filename) {
                else if (contains(str,"BITPIX"))
                        format = "fits";
        }
                else if (contains(str,"BITPIX"))
                        format = "fits";
        }
-       
+
        if (!format.empty()) {
            lyxerr[Debug::GRAPHICS]
                << "Recognised Fileformat: " << format << endl;
            return format;
        if (!format.empty()) {
            lyxerr[Debug::GRAPHICS]
                << "Recognised Fileformat: " << format << endl;
            return format;
-       } 
-       
+       }
+
        string const ext(GetExtension(filename));
        lyxerr[Debug::GRAPHICS]
                << "filetools(getExtFromContents)\n"
                << "\tCouldn't find a known Type!\n";
        if (!ext.empty()) {
            lyxerr[Debug::GRAPHICS]
        string const ext(GetExtension(filename));
        lyxerr[Debug::GRAPHICS]
                << "filetools(getExtFromContents)\n"
                << "\tCouldn't find a known Type!\n";
        if (!ext.empty()) {
            lyxerr[Debug::GRAPHICS]
-               << "\twill take the file extension -> " 
+               << "\twill take the file extension -> "
                << ext << endl;
                return ext;
        } else {
                << ext << endl;
                return ext;
        } else {
@@ -1196,9 +1196,9 @@ MakeDisplayPath (string const & path, unsigned int threshold)
        if (l2 > threshold) {
                // Yes, shortend it
                prefix += ".../";
        if (l2 > threshold) {
                // Yes, shortend it
                prefix += ".../";
-               
+
                string temp;
                string temp;
-               
+
                while (relhome.length() > threshold)
                        relhome = split(relhome, temp, '/');
 
                while (relhome.length() > threshold)
                        relhome = split(relhome, temp, '/');
 
@@ -1250,7 +1250,7 @@ cmdret const do_popen(string const & cmd)
        // (Claus Hentschel) Check if popen was succesful ;-)
        if (!inf)
                return make_pair(-1, string());
        // (Claus Hentschel) Check if popen was succesful ;-)
        if (!inf)
                return make_pair(-1, string());
-       
+
        string ret;
        int c = fgetc(inf);
        while (c != EOF) {
        string ret;
        int c = fgetc(inf);
        while (c != EOF) {
@@ -1274,13 +1274,13 @@ string const findtexfile(string const & fil, string const & /*format*/)
           going to implement this until I see some demand for it.
           Lgb
        */
           going to implement this until I see some demand for it.
           Lgb
        */
-       
+
        // If the file can be found directly, we just return a
        // If the file can be found directly, we just return a
-       // absolute path version of it. 
-        if (FileInfo(fil).exist())
+       // absolute path version of it.
+       if (FileInfo(fil).exist())
                return MakeAbsPath(fil);
 
                return MakeAbsPath(fil);
 
-        // No we try to find it using kpsewhich.
+       // No we try to find it using kpsewhich.
        // It seems from the kpsewhich manual page that it is safe to use
        // kpsewhich without --format: "When the --format option is not
        // given, the search path used when looking for a file is inferred
        // It seems from the kpsewhich manual page that it is safe to use
        // kpsewhich without --format: "When the --format option is not
        // given, the search path used when looking for a file is inferred
@@ -1305,9 +1305,9 @@ string const findtexfile(string const & fil, string const & /*format*/)
        cmdret const c = do_popen(kpsecmd);
 
        lyxerr[Debug::LATEX] << "kpse status = " << c.first << "\n"
        cmdret const c = do_popen(kpsecmd);
 
        lyxerr[Debug::LATEX] << "kpse status = " << c.first << "\n"
-                << "kpse result = `" << strip(c.second, '\n') 
+                << "kpse result = `" << strip(c.second, '\n')
                 << "'" << endl;
                 << "'" << endl;
-       if (c.first != -1) 
+       if (c.first != -1)
                return os::internal_path(strip(strip(c.second, '\n'), '\r'));
        else
                return string();
                return os::internal_path(strip(strip(c.second, '\n'), '\r'));
        else
                return string();
@@ -1327,5 +1327,3 @@ void removeAutosaveFile(string const & filename)
                }
        }
 }
                }
        }
 }
-
-
index 1c667a1414da7b44d9859c9f00b8deb05c45d47c..68783cd638b79d4064620fb071073d9b048c3ed7 100644 (file)
@@ -37,7 +37,7 @@ int DestroyLyXTmpDir (string const & tmpdir);
     If path entry begins with $$User/, use user_lyxdir.
     Example: "$$User/doc;$$LyX/doc".
 */
     If path entry begins with $$User/, use user_lyxdir.
     Example: "$$User/doc;$$LyX/doc".
 */
-string const FileOpenSearch (string const & path, string const & name, 
+string const FileOpenSearch (string const & path, string const & name,
                       string const & ext = string());
 
 /** Returns the real name of file name in directory path, with optional
                       string const & ext = string());
 
 /** Returns the real name of file name in directory path, with optional
@@ -45,7 +45,7 @@ string const FileOpenSearch (string const & path, string const & name,
   The file is searched in the given path (unless it is an absolute
   file name), first directly, and then with extension .ext (if given).
   */
   The file is searched in the given path (unless it is an absolute
   file name), first directly, and then with extension .ext (if given).
   */
-string const FileSearch(string const & path, string const & name, 
+string const FileSearch(string const & path, string const & name,
                  string const & ext = string());
 
 /// Returns a vector of all files in directory dir having extension ext.
                  string const & ext = string());
 
 /// Returns a vector of all files in directory dir having extension ext.
@@ -53,7 +53,7 @@ std::vector<string> const DirList(string const & dir,
                                  string const & ext = string());
 
 /** Is directory read only?
                                  string const & ext = string());
 
 /** Is directory read only?
-  returns 
+  returns
     true: dir writeable
     false: not writeable
 */
     true: dir writeable
     false: not writeable
 */
@@ -87,15 +87,15 @@ bool IsSGMLFilename(string const & filename);
   \end{enumerate}
     The third parameter `ext' is optional.
 */
   \end{enumerate}
     The third parameter `ext' is optional.
 */
-string const LibFileSearch(string const & dir, string const & name, 
+string const LibFileSearch(string const & dir, string const & name,
                     string const & ext = string());
 
 /** Same as LibFileSearch(), but tries first to find an
   internationalized version of the file by prepending $LANG_ to the
                     string const & ext = string());
 
 /** Same as LibFileSearch(), but tries first to find an
   internationalized version of the file by prepending $LANG_ to the
-  name 
+  name
   */
 string const
   */
 string const
-i18nLibFileSearch(string const & dir, string const & name, 
+i18nLibFileSearch(string const & dir, string const & name,
                  string const & ext = string());
 
 ///
                  string const & ext = string());
 
 ///
@@ -151,7 +151,7 @@ string const ExpandPath(string const & path);
   If relpath is absolute, just use that.
   If basepath doesn't exist use CWD.
   */
   If relpath is absolute, just use that.
   If basepath doesn't exist use CWD.
   */
-string const MakeAbsPath(string const & RelPath = string(), 
+string const MakeAbsPath(string const & RelPath = string(),
                         string const & BasePath = string());
 
 /** Creates a nice compact path for displaying. The parameter
                         string const & BasePath = string());
 
 /** Creates a nice compact path for displaying. The parameter
index cc66835ba234603aa6d2bb62f8f7c9cce026a8be..1e61e3bb324d9cb2dcdaeb556966c81e4ade5642 100644 (file)
@@ -26,7 +26,7 @@ using std::va_list;
    glibc returns the needed size.
    One problem can be that vsnprintf is not implemented on all archs,
    but AFAIK it is part of the new ANSI C standard.
    glibc returns the needed size.
    One problem can be that vsnprintf is not implemented on all archs,
    but AFAIK it is part of the new ANSI C standard.
-   
+
    Lgb
 */
 
    Lgb
 */
 
index 287e627902d8b28807d79a996e50b009520ae056..25947e3898d6149093b222881c981136502c05cb 100644 (file)
@@ -66,7 +66,7 @@ int Forkedcall::startscript(Starttype wait, string const & what)
                } else {
                        retval_ = waitForChild();
                }
                } else {
                        retval_ = waitForChild();
                }
-               
+
                return retval_;
        }
 
                return retval_;
        }
 
@@ -197,13 +197,13 @@ int Forkedcall::waitForChild() {
                        wait = false;
                } else if (WIFSIGNALED(status)) {
                        lyxerr << "LyX: Child didn't catch signal "
                        wait = false;
                } else if (WIFSIGNALED(status)) {
                        lyxerr << "LyX: Child didn't catch signal "
-                              << WTERMSIG(status) 
+                              << WTERMSIG(status)
                               << "and died. Too bad." << endl;
                        wait = false;
                } else if (WIFSTOPPED(status)) {
                        lyxerr << "LyX: Child (pid: " << pid_
                               << ") stopped on signal "
                               << "and died. Too bad." << endl;
                        wait = false;
                } else if (WIFSTOPPED(status)) {
                        lyxerr << "LyX: Child (pid: " << pid_
                               << ") stopped on signal "
-                              << WSTOPSIG(status) 
+                              << WSTOPSIG(status)
                               << ". Waiting for child to finish." << endl;
                } else {
                        lyxerr << "LyX: Something rotten happened while "
                               << ". Waiting for child to finish." << endl;
                } else {
                        lyxerr << "LyX: Something rotten happened while "
@@ -219,7 +219,7 @@ int Forkedcall::waitForChild() {
 pid_t Forkedcall::generateChild()
 {
        const int MAX_ARGV = 255;
 pid_t Forkedcall::generateChild()
 {
        const int MAX_ARGV = 255;
-       char *syscmd = 0; 
+       char *syscmd = 0;
        char *argv[MAX_ARGV];
 
        string childcommand(command_); // copy
        char *argv[MAX_ARGV];
 
        string childcommand(command_); // copy
@@ -243,7 +243,7 @@ pid_t Forkedcall::generateChild()
 
                // reinit
                more = !rest.empty();
 
                // reinit
                more = !rest.empty();
-               if (more) 
+               if (more)
                        rest = split(rest, childcommand, ' ');
        }
        argv[index] = 0;
                        rest = split(rest, childcommand, ' ');
        }
        argv[index] = 0;
index f64a2cd8e5f8ef90d72740fca899070697cf96c4..4c24ae390fb3297d7325d6e9e981952d3244576d 100644 (file)
@@ -43,10 +43,10 @@ public:
                ///
                DontWait
        };
                ///
                DontWait
        };
-       
+
        ///
        Forkedcall();
        ///
        Forkedcall();
-       
+
        /** Start the child process.
         *
         *  The command "what" is passed to fork() for execution.
        /** Start the child process.
         *
         *  The command "what" is passed to fork() for execution.
@@ -94,7 +94,7 @@ public:
         *  Used by the timer.
         */
        pid_t pid() const { return pid_; }
         *  Used by the timer.
         */
        pid_t pid() const { return pid_; }
-       
+
        /** Emit the signal.
         *  Used by the timer.
         */
        /** Emit the signal.
         *  Used by the timer.
         */
index 11cc31b4f1edd6e4d0c19d8f647065fe63d7a4b6..c00db4f5fe4a1bdcc2d880a97053c3943ad59b2a 100644 (file)
@@ -6,7 +6,7 @@
  * \author Asger Alstrup Nielsen
  * \author Angus Leeming
  *
  * \author Asger Alstrup Nielsen
  * \author Angus Leeming
  *
- * A class for the control of child processes launched using 
+ * A class for the control of child processes launched using
  * fork() and execvp().
  */
 
  * fork() and execvp().
  */
 
@@ -46,7 +46,7 @@ ForkedcallsController & ForkedcallsController::get()
 ForkedcallsController::ForkedcallsController()
 {
        timeout_ = new Timeout(100, Timeout::ONETIME);
 ForkedcallsController::ForkedcallsController()
 {
        timeout_ = new Timeout(100, Timeout::ONETIME);
-       
+
        timeout_->timeout
                .connect(SigC::slot(this, &ForkedcallsController::timer));
 }
        timeout_->timeout
                .connect(SigC::slot(this, &ForkedcallsController::timer));
 }
@@ -94,7 +94,7 @@ void ForkedcallsController::timer()
                bool remove_it = false;
 
                if (waitrpid == -1) {
                bool remove_it = false;
 
                if (waitrpid == -1) {
-                       lyxerr << "LyX: Error waiting for child: " 
+                       lyxerr << "LyX: Error waiting for child: "
                               << strerror(errno) << endl;
 
                        // Child died, so pretend it returned 1
                               << strerror(errno) << endl;
 
                        // Child died, so pretend it returned 1
@@ -116,9 +116,9 @@ void ForkedcallsController::timer()
                        remove_it = true;
 
                } else if (WIFSTOPPED(stat_loc)) {
                        remove_it = true;
 
                } else if (WIFSTOPPED(stat_loc)) {
-                       lyxerr << "LyX: Child (pid: " << pid 
+                       lyxerr << "LyX: Child (pid: " << pid
                               << ") stopped on signal "
                               << ") stopped on signal "
-                              << WSTOPSIG(stat_loc) 
+                              << WSTOPSIG(stat_loc)
                               << ". Waiting for child to finish." << endl;
 
                } else {
                               << ". Waiting for child to finish." << endl;
 
                } else {
index 8afd8cf9365dd501ea1b9089c3b27a916f39a43c..3b8c82d2b46bd66b4987e4ac97c1d9a37b1bfdc4 100644 (file)
@@ -37,7 +37,7 @@ public:
        ~ForkedcallsController();
 
        /// Get hold of the only controller that can exist inside the process.
        ~ForkedcallsController();
 
        /// Get hold of the only controller that can exist inside the process.
-        static ForkedcallsController & get();
+       static ForkedcallsController & get();
 
        /// Add a new child process to the list of controlled processes.
        void addCall(Forkedcall const & newcall);
 
        /// Add a new child process to the list of controlled processes.
        void addCall(Forkedcall const & newcall);
@@ -63,7 +63,7 @@ public:
 
        /// Signal emitted when the list of current child processes changes.
        SigC::Signal0<void> childrenChanged;
 
        /// Signal emitted when the list of current child processes changes.
        SigC::Signal0<void> childrenChanged;
-       
+
 private:
        ///
        ForkedcallsController(ForkedcallsController const &);
 private:
        ///
        ForkedcallsController(ForkedcallsController const &);
@@ -76,7 +76,7 @@ private:
        /** The timer. Enables us to check the status of the children
         *  every XX ms and to invoke a callback on completion.
         */
        /** The timer. Enables us to check the status of the children
         *  every XX ms and to invoke a callback on completion.
         */
-        Timeout * timeout_;
+       Timeout * timeout_;
 };
 
 #endif // FORKEDCONTR_H
 };
 
 #endif // FORKEDCONTR_H
index 15c12a1acdc31b1922582ec5a3de6fb1aa7301c3..6b28ef9ca6cb301ad9ae5c89d5cbbf8286aadcaa 100644 (file)
@@ -23,17 +23,17 @@ char * l_getcwd(char * buffer, size_t size)
 // Returns current working directory
 string const lyx::getcwd()
 {
 // Returns current working directory
 string const lyx::getcwd()
 {
-       int n = 256;    // Assume path is less than 256 chars
+       int n = 256;    // Assume path is less than 256 chars
        char * err;
        char * err;
-       char * tbuf = new char[n];
-       
-       // Safe. Hopefully all getcwds behave this way!
-       while (((err = l_getcwd(tbuf, n)) == 0) && (errno == ERANGE)) {
+       char * tbuf = new char[n];
+
+       // Safe. Hopefully all getcwds behave this way!
+       while (((err = l_getcwd(tbuf, n)) == 0) && (errno == ERANGE)) {
                // Buffer too small, double the buffersize and try again
                // Buffer too small, double the buffersize and try again
-               delete[] tbuf;
-               n = 2 * n;
-               tbuf = new char[n];
-       }
+               delete[] tbuf;
+               n = 2 * n;
+               tbuf = new char[n];
+       }
 
        string result;
        if (err) result = tbuf;
 
        string result;
        if (err) result = tbuf;
index ae5537a3b76d8388ac7b71e6297464e725d89f11..57be367bf30d3dd81e203204585e5ab33140cb00 100644 (file)
@@ -1,8 +1,8 @@
 /* This file is part of
 /* This file is part of
- * ====================================================== 
- * 
+ * ======================================================
+ *
  *           LyX, The Document Processor
  *           LyX, The Document Processor
- *        
+ *
  *           Copyright 1995 Matthias Ettrich
  *           Copyright 1995-2001 The LyX Team.
  *
  *           Copyright 1995 Matthias Ettrich
  *           Copyright 1995-2001 The LyX Team.
  *
@@ -114,11 +114,11 @@ int compare_no_case(string const & s, string const & s2, unsigned int len)
 bool isStrInt(string const & str)
 {
        if (str.empty()) return false;
 bool isStrInt(string const & str)
 {
        if (str.empty()) return false;
-       
+
        // Remove leading and trailing white space chars.
        string const tmpstr = frontStrip(strip(str, ' '), ' ');
        if (tmpstr.empty()) return false;
        // Remove leading and trailing white space chars.
        string const tmpstr = frontStrip(strip(str, ' '), ' ');
        if (tmpstr.empty()) return false;
-       
+
        string::const_iterator cit = tmpstr.begin();
        if ((*cit) == '-') ++cit;
        string::const_iterator end = tmpstr.end();
        string::const_iterator cit = tmpstr.begin();
        if ((*cit) == '-') ++cit;
        string::const_iterator end = tmpstr.end();
@@ -132,11 +132,11 @@ bool isStrInt(string const & str)
 bool isStrUnsignedInt(string const & str)
 {
        if (str.empty()) return false;
 bool isStrUnsignedInt(string const & str)
 {
        if (str.empty()) return false;
-       
+
        // Remove leading and trailing white space chars.
        string const tmpstr = frontStrip(strip(str, ' '), ' ');
        if (tmpstr.empty()) return false;
        // Remove leading and trailing white space chars.
        string const tmpstr = frontStrip(strip(str, ' '), ' ');
        if (tmpstr.empty()) return false;
-       
+
        string::const_iterator cit = tmpstr.begin();
        string::const_iterator end = tmpstr.end();
        for (; cit != end; ++cit) {
        string::const_iterator cit = tmpstr.begin();
        string::const_iterator end = tmpstr.end();
        for (; cit != end; ++cit) {
@@ -175,7 +175,7 @@ unsigned int strToUnsignedInt(string const & str)
 bool isStrDbl(string const & str)
 {
        if (str.empty()) return false;
 bool isStrDbl(string const & str)
 {
        if (str.empty()) return false;
-       
+
        // Remove leading and trailing white space chars.
        string const tmpstr = frontStrip(strip(str, ' '), ' ');
        if (tmpstr.empty()) return false;
        // Remove leading and trailing white space chars.
        string const tmpstr = frontStrip(strip(str, ' '), ' ');
        if (tmpstr.empty()) return false;
@@ -215,15 +215,15 @@ double strToDbl(string const & str)
 }
 
 
 }
 
 
-char lowercase(char c) 
-{ 
-       return char(tolower(c)); 
+char lowercase(char c)
+{
+       return char(tolower(c));
 }
 
 
 }
 
 
-char uppercase(char c) 
-{ 
-       return char(toupper(c)); 
+char uppercase(char c)
+{
+       return char(toupper(c));
 }
 
 
 }
 
 
@@ -237,7 +237,7 @@ struct local_lowercase {
                return tolower(c);
        }
 };
                return tolower(c);
        }
 };
-       
+
 struct local_uppercase {
        char operator()(char c) const {
                return toupper(c);
 struct local_uppercase {
        char operator()(char c) const {
                return toupper(c);
@@ -264,10 +264,10 @@ string const uppercase(string const & a)
 bool prefixIs(string const & a, char const * pre)
 {
        lyx::Assert(pre);
 bool prefixIs(string const & a, char const * pre)
 {
        lyx::Assert(pre);
-       
+
        size_t const l = strlen(pre);
        string::size_type const alen = a.length();
        size_t const l = strlen(pre);
        string::size_type const alen = a.length();
-       
+
        if (l > alen || a.empty())
                return false;
        else {
        if (l > alen || a.empty())
                return false;
        else {
@@ -289,7 +289,7 @@ bool prefixIs(string const & a, string const & pre)
 {
        string::size_type const prelen = pre.length();
        string::size_type const alen = a.length();
 {
        string::size_type const prelen = pre.length();
        string::size_type const alen = a.length();
-       
+
        if (prelen > alen || a.empty())
                return false;
        else {
        if (prelen > alen || a.empty())
                return false;
        else {
@@ -312,10 +312,10 @@ bool suffixIs(string const & a, char c)
 bool suffixIs(string const & a, char const * suf)
 {
        lyx::Assert(suf);
 bool suffixIs(string const & a, char const * suf)
 {
        lyx::Assert(suf);
-       
+
        size_t const suflen = strlen(suf);
        string::size_type const alen = a.length();
        size_t const suflen = strlen(suf);
        string::size_type const alen = a.length();
-       
+
        if (suflen > alen)
                return false;
        else {
        if (suflen > alen)
                return false;
        else {
@@ -338,7 +338,7 @@ bool suffixIs(string const & a, string const & suf)
 {
        string::size_type const suflen = suf.length();
        string::size_type const alen = a.length();
 {
        string::size_type const suflen = suf.length();
        string::size_type const alen = a.length();
-       
+
        if (suflen > alen) {
                return false;
        } else {
        if (suflen > alen) {
                return false;
        } else {
@@ -396,7 +396,7 @@ bool contains(char const * a, char const * b)
 bool containsOnly(string const & s, char const * cset)
 {
        lyx::Assert(cset);
 bool containsOnly(string const & s, char const * cset)
 {
        lyx::Assert(cset);
-       
+
        return s.find_first_not_of(cset) == string::npos;
 }
 
        return s.find_first_not_of(cset) == string::npos;
 }
 
@@ -410,7 +410,7 @@ bool containsOnly(string const & s, string const & cset)
 bool containsOnly(char const * s, char const * cset)
 {
        lyx::Assert(s && cset);
 bool containsOnly(char const * s, char const * cset)
 {
        lyx::Assert(s && cset);
-       
+
        return string(s).find_first_not_of(cset) == string::npos;
 }
 
        return string(s).find_first_not_of(cset) == string::npos;
 }
 
@@ -418,7 +418,7 @@ bool containsOnly(char const * s, char const * cset)
 bool containsOnly(char const * s, string const & cset)
 {
        lyx::Assert(s);
 bool containsOnly(char const * s, string const & cset)
 {
        lyx::Assert(s);
-       
+
        return string(s).find_first_not_of(cset) == string::npos;
 }
 
        return string(s).find_first_not_of(cset) == string::npos;
 }
 
@@ -428,7 +428,7 @@ bool containsOnly(char const * s, string const & cset)
 string const token(string const & a, char delim, int n)
 {
        if (a.empty()) return string();
 string const token(string const & a, char delim, int n)
 {
        if (a.empty()) return string();
-       
+
        string::size_type k = 0;
        string::size_type i = 0;
 
        string::size_type k = 0;
        string::size_type i = 0;
 
@@ -496,7 +496,7 @@ string const subst(string const & a,
                   char const * oldstr, string const & newstr)
 {
        lyx::Assert(oldstr);
                   char const * oldstr, string const & newstr)
 {
        lyx::Assert(oldstr);
-       
+
        string lstr(a);
        string::size_type i = 0;
        string::size_type olen = strlen(oldstr);
        string lstr(a);
        string::size_type i = 0;
        string::size_type olen = strlen(oldstr);
@@ -530,7 +530,7 @@ string const strip(string const & a, char c)
        string tmp(a);
        string::size_type i = tmp.find_last_not_of(c);
        if (i == a.length() - 1) return tmp; // no c's at end of a
        string tmp(a);
        string::size_type i = tmp.find_last_not_of(c);
        if (i == a.length() - 1) return tmp; // no c's at end of a
-       if (i != string::npos) 
+       if (i != string::npos)
                tmp.erase(i + 1, string::npos);
 #if !defined(USE_INCLUDED_STRING) && !defined(STD_STRING_IS_GOOD)
        /// Needed for broken string::find_last_not_of
                tmp.erase(i + 1, string::npos);
 #if !defined(USE_INCLUDED_STRING) && !defined(STD_STRING_IS_GOOD)
        /// Needed for broken string::find_last_not_of
@@ -548,7 +548,7 @@ string const strip(string const & a, char c)
 string const frontStrip(string const & a, char const * p)
 {
        lyx::Assert(p);
 string const frontStrip(string const & a, char const * p)
 {
        lyx::Assert(p);
-       
+
        if (a.empty() || !*p) return a;
        string tmp(a);
        string::size_type i = tmp.find_first_not_of(p);
        if (a.empty() || !*p) return a;
        string tmp(a);
        string::size_type i = tmp.find_first_not_of(p);
index 72001459ad8a7af7d14a4f615a4d3ecc428834f7..7f78c374a82834b9f6ef6f328c23540cb3d21110 100644 (file)
@@ -41,7 +41,7 @@ int compare(char const * a, char const * b)
        return std::strcmp(a, b);
 #else
        return strcmp(a, b);
        return std::strcmp(a, b);
 #else
        return strcmp(a, b);
-#endif 
+#endif
 }
 
 ///
 }
 
 ///
@@ -52,7 +52,7 @@ int compare(char const * a, char const * b, unsigned int len)
        return std::strncmp(a, b, len);
 #else
        return strncmp(a, b, len);
        return std::strncmp(a, b, len);
 #else
        return strncmp(a, b, len);
-#endif 
+#endif
 }
 
 ///
 }
 
 ///
@@ -73,10 +73,10 @@ bool isStrDbl(string const & str);
 ///
 double strToDbl(string const & str);
 
 ///
 double strToDbl(string const & str);
 
-/// 
+///
 char lowercase(char c);
 
 char lowercase(char c);
 
-/// 
+///
 char uppercase(char c);
 
 ///
 char uppercase(char c);
 
 ///
@@ -88,7 +88,7 @@ string const uppercase(string const &);
 /// convert \a T to string
 template<typename T>
 inline
 /// convert \a T to string
 template<typename T>
 inline
-string const tostr(T const & t) 
+string const tostr(T const & t)
 {
        ostringstream ostr;
        ostr << t;
 {
        ostringstream ostr;
        ostr << t;
@@ -151,7 +151,7 @@ public:
        typedef string first_argument_type;
        typedef string second_argument_type;
        typedef bool result_type;
        typedef string first_argument_type;
        typedef string second_argument_type;
        typedef bool result_type;
-       
+
        bool operator()(string const & haystack, string const & needle) const {
                return contains(haystack, needle);
        }
        bool operator()(string const & haystack, string const & needle) const {
                return contains(haystack, needle);
        }
@@ -183,7 +183,7 @@ string const token(string const & a, char delim, int n);
 
 /** Search a token in this string using the delim.
     Doesn't modify the original string. Returns -1 in case of
 
 /** Search a token in this string using the delim.
     Doesn't modify the original string. Returns -1 in case of
-    failure. 
+    failure.
     Example:
     \code
     "a;bc;d".tokenPos(';', "bc") == 1;
     Example:
     \code
     "a;bc;d".tokenPos(';', "bc") == 1;
index 6b17b4d6cc0685c7bdcb94b0566970e96c54547a..4581a545dc2cc826fd11d0063494701fa7d6d1d0 100644 (file)
@@ -2,7 +2,7 @@
 /* lxtl.h
  * LyX eXternalization Template Library
  * This file is part of
 /* lxtl.h
  * LyX eXternalization Template Library
  * This file is part of
- * ====================================================== 
+ * ======================================================
  *
  *           LyX, The Document Processor
  *
  *
  *           LyX, The Document Processor
  *
@@ -28,7 +28,7 @@
 typedef GIOP_format<auto_mem_buffer> gui_format;
 
 /*  Simplify the use of the XTL.  The caller is responsible for creating their
 typedef GIOP_format<auto_mem_buffer> gui_format;
 
 /*  Simplify the use of the XTL.  The caller is responsible for creating their
-    own memory buffer.  The buffer type isn't a template parameter because I 
+    own memory buffer.  The buffer type isn't a template parameter because I
     need/want the forward declared buffer class in some other header files
     thereby avoiding an extra file dependency.
     ARRae 20000423
     need/want the forward declared buffer class in some other header files
     thereby avoiding an extra file dependency.
     ARRae 20000423
index e609904689462a429ac3fa8b6d74ab87b4d8f461..323f8e32f16a8b1269f00a817a53a72e52704b7a 100644 (file)
@@ -46,7 +46,7 @@ struct firster {
 
 template <class InputIter, class OutputIter, class Func>
 OutputIter copy_if(InputIter first, InputIter last,
 
 template <class InputIter, class OutputIter, class Func>
 OutputIter copy_if(InputIter first, InputIter last,
-              OutputIter result, Func func) 
+              OutputIter result, Func func)
 {
        for (; first != last; ++first) {
                if (func(*first)) {
 {
        for (; first != last; ++first) {
                if (func(*first)) {
@@ -63,10 +63,10 @@ typename std::iterator_traits<Iterator>::difference_type
 count (Iterator first, Iterator last, T const & value)
 {
 #ifdef HAVE_STD_COUNT
 count (Iterator first, Iterator last, T const & value)
 {
 #ifdef HAVE_STD_COUNT
-        return std::count(first, last, value);
+       return std::count(first, last, value);
 #else
 #else
-        std::iterator_traits<Iterator>::difference_type n = 0;
-       while (first != last) 
+       std::iterator_traits<Iterator>::difference_type n = 0;
+       while (first != last)
                if (*first++ == value) ++n;
        return n;
 #endif
                if (*first++ == value) ++n;
        return n;
 #endif
index fbbbb78076bc701ec382af79636e10cbdb577a39..af2107413dfc217c1183a712097acbbdab48af59 100644 (file)
@@ -5,7 +5,7 @@
 
 /** \file lyxfunctional.h
     \brief Convenient function objects for use with LyX
 
 /** \file lyxfunctional.h
     \brief Convenient function objects for use with LyX
-    
+
     This is currently a small collection of small function objects for use
     together with std::algorithms.
 **/
     This is currently a small collection of small function objects for use
     together with std::algorithms.
 **/
@@ -18,7 +18,7 @@ namespace lyx {
 template<class R, class C, class A>
 class class_fun_t {
 public:
 template<class R, class C, class A>
 class class_fun_t {
 public:
-       class_fun_t(C & ct, R(C::*p)(A)) 
+       class_fun_t(C & ct, R(C::*p)(A))
                : c(ct), cmf(p) {}
        R operator()(A & a) const {
                return (c.*cmf)(a);
                : c(ct), cmf(p) {}
        R operator()(A & a) const {
                return (c.*cmf)(a);
@@ -78,7 +78,7 @@ public:
        typedef void difference_type;
        typedef void pointer;
        typedef void reference;
        typedef void difference_type;
        typedef void pointer;
        typedef void reference;
-       
+
        back_insert_fun_iterator(Cont & x, MemRet(Type::*p)())
                : container(&x), pmf(p) {}
 
        back_insert_fun_iterator(Cont & x, MemRet(Type::*p)())
                : container(&x), pmf(p) {}
 
@@ -118,12 +118,12 @@ public:
        typedef void difference_type;
        typedef void pointer;
        typedef void reference;
        typedef void difference_type;
        typedef void pointer;
        typedef void reference;
-       
+
        const_back_insert_fun_iterator(Cont & x, MemRet(Type::*p)() const)
                : container(&x), pmf(p) {}
        const_back_insert_fun_iterator(Cont & x, MemRet(Type::*p)() const)
                : container(&x), pmf(p) {}
-       
+
        ~const_back_insert_fun_iterator() {}
        ~const_back_insert_fun_iterator() {}
-      
+
        const_back_insert_fun_iterator &
        operator=(Type const * val) {
                container->push_back((val->*pmf)());
        const_back_insert_fun_iterator &
        operator=(Type const * val) {
                container->push_back((val->*pmf)());
@@ -213,7 +213,7 @@ compare_memfun(R(C::*p)() const, A const & a)
        return const_compare_memfun_t<R, C, A>(p, a);
 }
 
        return const_compare_memfun_t<R, C, A>(p, a);
 }
 
-       
+
 // Functors used in the template.
 
 ///
 // Functors used in the template.
 
 ///
index 8554ca0ec8e952b32805c2f99c01be4c15a6d584..9a573fa780dd9700669209a4c368fb82a0e761ca 100644 (file)
@@ -1,9 +1,9 @@
 // -*- C++ -*-
 /* This file is part of
 // -*- C++ -*-
 /* This file is part of
- * ====================================================== 
- * 
+ * ======================================================
+ *
  *           LyX, The Document Processor
  *           LyX, The Document Processor
- *        
+ *
  *           Copyright 1995 Matthias Ettrich
  *           Copyright 1995-2001 The LyX Team.
  *
  *           Copyright 1995 Matthias Ettrich
  *           Copyright 1995-2001 The LyX Team.
  *
@@ -32,7 +32,7 @@ bool copy(string const & from, string const & to);
 /// generates a checksum
 unsigned long sum(string const & file);
 /// returns a date string (not used currently)
 /// generates a checksum
 unsigned long sum(string const & file);
 /// returns a date string (not used currently)
-char * date(); 
+char * date();
 /// returns the name of the user (not used currently)
 string const getUserName();
 ///
 /// returns the name of the user (not used currently)
 string const getUserName();
 ///
@@ -57,13 +57,13 @@ string const tempName(string const & dir = string(),
 /** Returns true if var is approximately equal to number with allowed error
  * of 'error'.
  *
 /** Returns true if var is approximately equal to number with allowed error
  * of 'error'.
  *
- * Reason: A float can be very close to the number, yet still need not be 
+ * Reason: A float can be very close to the number, yet still need not be
  * exactly equal, you can have exp(-10) which is very close to zero but not
  * zero. If you only need an approximate equality (you usually do), use this
  * template.
  *
  * Usage: if (float_equal(var, number, 0.0001)) { }
  * exactly equal, you can have exp(-10) which is very close to zero but not
  * zero. If you only need an approximate equality (you usually do), use this
  * template.
  *
  * Usage: if (float_equal(var, number, 0.0001)) { }
- * 
+ *
  * This will check if 'var' is approx. equal to 'number' with error of 1/1000
  */
 inline bool float_equal(float var, float number, float error)
  * This will check if 'var' is approx. equal to 'number' with error of 1/1000
  */
 inline bool float_equal(float var, float number, float error)
index 6ae1725a7faf3f064bdda3deb9c8a2bd582a338a..4f1f9abfab9e08caf7dba07b5b99149caf0c967f 100644 (file)
@@ -52,7 +52,7 @@ typedef unsigned reg_syntax_t;
 #define RE_BACKSLASH_ESCAPE_IN_LISTS (1)
 
 /* If this bit is not set, then + and ? are operators, and \+ and \? are
 #define RE_BACKSLASH_ESCAPE_IN_LISTS (1)
 
 /* If this bit is not set, then + and ? are operators, and \+ and \? are
-     literals. 
+     literals.
    If set, then \+ and \? are operators and + and ? are literals.  */
 #define RE_BK_PLUS_QM (RE_BACKSLASH_ESCAPE_IN_LISTS << 1)
 
    If set, then \+ and \? are operators and + and ? are literals.  */
 #define RE_BK_PLUS_QM (RE_BACKSLASH_ESCAPE_IN_LISTS << 1)
 
@@ -65,10 +65,10 @@ typedef unsigned reg_syntax_t;
 /* If this bit is set, then ^ and $ are always anchors (outside bracket
      expressions, of course).
    If this bit is not set, then it depends:
 /* If this bit is set, then ^ and $ are always anchors (outside bracket
      expressions, of course).
    If this bit is not set, then it depends:
-        ^  is an anchor if it is at the beginning of a regular
-           expression or after an open-group or an alternation operator;
-        $  is an anchor if it is at the end of a regular expression, or
-           before a close-group or an alternation operator.  
+       ^  is an anchor if it is at the beginning of a regular
+          expression or after an open-group or an alternation operator;
+       $  is an anchor if it is at the end of a regular expression, or
+          before a close-group or an alternation operator.
 
    This bit could be (re)combined with RE_CONTEXT_INDEP_OPS, because
    POSIX draft 11.2 says that * etc. in leading positions is undefined.
 
    This bit could be (re)combined with RE_CONTEXT_INDEP_OPS, because
    POSIX draft 11.2 says that * etc. in leading positions is undefined.
@@ -79,7 +79,7 @@ typedef unsigned reg_syntax_t;
 /* If this bit is set, then special characters are always special
      regardless of where they are in the pattern.
    If this bit is not set, then special characters are special only in
 /* If this bit is set, then special characters are always special
      regardless of where they are in the pattern.
    If this bit is not set, then special characters are special only in
-     some contexts; otherwise they are ordinary.  Specifically, 
+     some contexts; otherwise they are ordinary.  Specifically,
      * + ? and intervals are only special when not after the beginning,
      open-group, or alternation operator.  */
 #define RE_CONTEXT_INDEP_OPS (RE_CONTEXT_INDEP_ANCHORS << 1)
      * + ? and intervals are only special when not after the beginning,
      open-group, or alternation operator.  */
 #define RE_CONTEXT_INDEP_OPS (RE_CONTEXT_INDEP_ANCHORS << 1)
@@ -101,7 +101,7 @@ typedef unsigned reg_syntax_t;
 #define RE_HAT_LISTS_NOT_NEWLINE (RE_DOT_NOT_NULL << 1)
 
 /* If this bit is set, either \{...\} or {...} defines an
 #define RE_HAT_LISTS_NOT_NEWLINE (RE_DOT_NOT_NULL << 1)
 
 /* If this bit is set, either \{...\} or {...} defines an
-     interval, depending on RE_NO_BK_BRACES. 
+     interval, depending on RE_NO_BK_BRACES.
    If not set, \{, \}, {, and } are literals.  */
 #define RE_INTERVALS (RE_HAT_LISTS_NOT_NEWLINE << 1)
 
    If not set, \{, \}, {, and } are literals.  */
 #define RE_INTERVALS (RE_HAT_LISTS_NOT_NEWLINE << 1)
 
@@ -126,7 +126,7 @@ typedef unsigned reg_syntax_t;
    If not set, then \<digit> is a back-reference.  */
 #define RE_NO_BK_REFS (RE_NO_BK_PARENS << 1)
 
    If not set, then \<digit> is a back-reference.  */
 #define RE_NO_BK_REFS (RE_NO_BK_PARENS << 1)
 
-/* If this bit is set, then | is an alternation operator, and \| is literal. 
+/* If this bit is set, then | is an alternation operator, and \| is literal.
    If not set, then \| is an alternation operator, and | is literal.  */
 #define RE_NO_BK_VBAR (RE_NO_BK_REFS << 1)
 
    If not set, then \| is an alternation operator, and | is literal.  */
 #define RE_NO_BK_VBAR (RE_NO_BK_REFS << 1)
 
@@ -148,7 +148,7 @@ extern reg_syntax_t re_syntax_options;
 \f
 /* Define combinations of the above bits for the standard possibilities.
    (The [[[ comments delimit what gets put into the Texinfo file, so
 \f
 /* Define combinations of the above bits for the standard possibilities.
    (The [[[ comments delimit what gets put into the Texinfo file, so
-   don't delete them!)  */ 
+   don't delete them!)  */
 /* [[[begin syntaxes]]] */
 #define RE_SYNTAX_EMACS 0
 
 /* [[[begin syntaxes]]] */
 #define RE_SYNTAX_EMACS 0
 
@@ -158,7 +158,7 @@ extern reg_syntax_t re_syntax_options;
    | RE_NO_BK_VBAR               | RE_NO_EMPTY_RANGES                  \
    | RE_UNMATCHED_RIGHT_PAREN_ORD)
 
    | RE_NO_BK_VBAR               | RE_NO_EMPTY_RANGES                  \
    | RE_UNMATCHED_RIGHT_PAREN_ORD)
 
-#define RE_SYNTAX_POSIX_AWK                                            \
+#define RE_SYNTAX_POSIX_AWK                                            \
   (RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS)
 
 #define RE_SYNTAX_GREP                                                 \
   (RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS)
 
 #define RE_SYNTAX_GREP                                                 \
@@ -215,7 +215,7 @@ extern reg_syntax_t re_syntax_options;
 #ifdef RE_DUP_MAX
 #undef RE_DUP_MAX
 #endif
 #ifdef RE_DUP_MAX
 #undef RE_DUP_MAX
 #endif
-#define RE_DUP_MAX ((1 << 15) - 1) 
+#define RE_DUP_MAX ((1 << 15) - 1)
 
 
 /* POSIX `cflags' bits (i.e., information for `regcomp').  */
 
 
 /* POSIX `cflags' bits (i.e., information for `regcomp').  */
@@ -227,7 +227,7 @@ extern reg_syntax_t re_syntax_options;
 /* If this bit is set, then ignore case when matching.
    If not set, then case is significant.  */
 #define REG_ICASE (REG_EXTENDED << 1)
 /* If this bit is set, then ignore case when matching.
    If not set, then case is significant.  */
 #define REG_ICASE (REG_EXTENDED << 1)
+
 /* If this bit is set, then anchors do not match at newline
      characters in the string.
    If not set, then anchors do match at newlines.  */
 /* If this bit is set, then anchors do not match at newline
      characters in the string.
    If not set, then anchors do match at newlines.  */
@@ -266,7 +266,7 @@ typedef enum
   REG_EESCAPE,         /* Trailing backslash.  */
   REG_ESUBREG,         /* Invalid back reference.  */
   REG_EBRACK,          /* Unmatched left bracket.  */
   REG_EESCAPE,         /* Trailing backslash.  */
   REG_ESUBREG,         /* Invalid back reference.  */
   REG_EBRACK,          /* Unmatched left bracket.  */
-  REG_EPAREN,          /* Parenthesis imbalance.  */ 
+  REG_EPAREN,          /* Parenthesis imbalance.  */
   REG_EBRACE,          /* Unmatched \{.  */
   REG_BADBR,           /* Invalid contents of \{\}.  */
   REG_ERANGE,          /* Invalid range end.  */
   REG_EBRACE,          /* Unmatched \{.  */
   REG_BADBR,           /* Invalid contents of \{\}.  */
   REG_ERANGE,          /* Invalid range end.  */
@@ -289,65 +289,65 @@ struct re_pattern_buffer
 {
 /* [[[begin pattern_buffer]]] */
        /* Space that holds the compiled pattern.  It is declared as
 {
 /* [[[begin pattern_buffer]]] */
        /* Space that holds the compiled pattern.  It is declared as
-          `unsigned char *' because its elements are
-           sometimes used as array indexes.  */
+         `unsigned char *' because its elements are
+          sometimes used as array indexes.  */
   unsigned char *buffer;
 
        /* Number of bytes to which `buffer' points.  */
   unsigned long allocated;
 
        /* Number of bytes actually used in `buffer'.  */
   unsigned char *buffer;
 
        /* Number of bytes to which `buffer' points.  */
   unsigned long allocated;
 
        /* Number of bytes actually used in `buffer'.  */
-  unsigned long used;  
+  unsigned long used;
 
 
-        /* Syntax setting with which the pattern was compiled.  */
+       /* Syntax setting with which the pattern was compiled.  */
   reg_syntax_t syntax;
 
   reg_syntax_t syntax;
 
-        /* Pointer to a fastmap, if any, otherwise zero.  re_search uses
-           the fastmap, if there is one, to skip over impossible
-           starting points for matches.  */
+       /* Pointer to a fastmap, if any, otherwise zero.  re_search uses
+          the fastmap, if there is one, to skip over impossible
+          starting points for matches.  */
   char *fastmap;
 
   char *fastmap;
 
-        /* Either a translate table to apply to all characters before
-           comparing them, or zero for no translation.  The translation
-           is applied to a pattern when it is compiled and to a string
-           when it is matched.  */
+       /* Either a translate table to apply to all characters before
+          comparing them, or zero for no translation.  The translation
+          is applied to a pattern when it is compiled and to a string
+          when it is matched.  */
   char *translate;
 
        /* Number of subexpressions found by the compiler.  */
   size_t re_nsub;
 
   char *translate;
 
        /* Number of subexpressions found by the compiler.  */
   size_t re_nsub;
 
-        /* Zero if this pattern cannot match the empty string, one else.
-           Well, in truth it's used only in `re_search_2', to see
-           whether or not we should use the fastmap, so we don't set
-           this absolutely perfectly; see `re_compile_fastmap' (the
-           `duplicate' case).  */
+       /* Zero if this pattern cannot match the empty string, one else.
+          Well, in truth it's used only in `re_search_2', to see
+          whether or not we should use the fastmap, so we don't set
+          this absolutely perfectly; see `re_compile_fastmap' (the
+          `duplicate' case).  */
   unsigned can_be_null : 1;
 
   unsigned can_be_null : 1;
 
-        /* If REGS_UNALLOCATED, allocate space in the `regs' structure
-             for `max (RE_NREGS, re_nsub + 1)' groups.
-           If REGS_REALLOCATE, reallocate space if necessary.
-           If REGS_FIXED, use what's there.  */
+       /* If REGS_UNALLOCATED, allocate space in the `regs' structure
+            for `max (RE_NREGS, re_nsub + 1)' groups.
+          If REGS_REALLOCATE, reallocate space if necessary.
+          If REGS_FIXED, use what's there.  */
 #define REGS_UNALLOCATED 0
 #define REGS_REALLOCATE 1
 #define REGS_FIXED 2
   unsigned regs_allocated : 2;
 
 #define REGS_UNALLOCATED 0
 #define REGS_REALLOCATE 1
 #define REGS_FIXED 2
   unsigned regs_allocated : 2;
 
-        /* Set to zero when `regex_compile' compiles a pattern; set to one
-           by `re_compile_fastmap' if it updates the fastmap.  */
+       /* Set to zero when `regex_compile' compiles a pattern; set to one
+          by `re_compile_fastmap' if it updates the fastmap.  */
   unsigned fastmap_accurate : 1;
 
   unsigned fastmap_accurate : 1;
 
-        /* If set, `re_match_2' does not return information about
-           subexpressions.  */
+       /* If set, `re_match_2' does not return information about
+          subexpressions.  */
   unsigned no_sub : 1;
 
   unsigned no_sub : 1;
 
-        /* If set, a beginning-of-line anchor doesn't match at the
-           beginning of the string.  */ 
+       /* If set, a beginning-of-line anchor doesn't match at the
+          beginning of the string.  */
   unsigned not_bol : 1;
 
   unsigned not_bol : 1;
 
-        /* Similarly for an end-of-line anchor.  */
+       /* Similarly for an end-of-line anchor.  */
   unsigned not_eol : 1;
 
   unsigned not_eol : 1;
 
-        /* If true, an anchor at a newline matches.  */
+       /* If true, an anchor at a newline matches.  */
   unsigned newline_anchor : 1;
 
 /* [[[end pattern_buffer]]] */
   unsigned newline_anchor : 1;
 
 /* [[[end pattern_buffer]]] */
@@ -418,7 +418,7 @@ extern reg_syntax_t re_set_syntax _RE_ARGS ((reg_syntax_t syntax));
    BUFFER.  Return NULL if successful, and an error string if not.  */
 extern const char *re_compile_pattern
   _RE_ARGS ((const char *pattern, int length,
    BUFFER.  Return NULL if successful, and an error string if not.  */
 extern const char *re_compile_pattern
   _RE_ARGS ((const char *pattern, int length,
-             struct re_pattern_buffer *buffer));
+            struct re_pattern_buffer *buffer));
 
 
 /* Compile a fastmap for the compiled pattern in BUFFER; used to
 
 
 /* Compile a fastmap for the compiled pattern in BUFFER; used to
@@ -434,29 +434,29 @@ extern int re_compile_fastmap _RE_ARGS ((struct re_pattern_buffer *buffer));
    information in REGS (if REGS and BUFFER->no_sub are nonzero).  */
 extern int re_search
   _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string,
    information in REGS (if REGS and BUFFER->no_sub are nonzero).  */
 extern int re_search
   _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string,
-            int length, int start, int range, struct re_registers *regs));
+           int length, int start, int range, struct re_registers *regs));
 
 
 /* Like `re_search', but search in the concatenation of STRING1 and
    STRING2.  Also, stop searching at index START + STOP.  */
 extern int re_search_2
   _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string1,
 
 
 /* Like `re_search', but search in the concatenation of STRING1 and
    STRING2.  Also, stop searching at index START + STOP.  */
 extern int re_search_2
   _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string1,
-             int length1, const char *string2, int length2,
-             int start, int range, struct re_registers *regs, int stop));
+            int length1, const char *string2, int length2,
+            int start, int range, struct re_registers *regs, int stop));
 
 
 /* Like `re_search', but return how many characters in STRING the regexp
    in BUFFER matched, starting at position START.  */
 extern int re_match
   _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string,
 
 
 /* Like `re_search', but return how many characters in STRING the regexp
    in BUFFER matched, starting at position START.  */
 extern int re_match
   _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string,
-             int length, int start, struct re_registers *regs));
+            int length, int start, struct re_registers *regs));
 
 
 /* Relates to `re_match' as `re_search_2' relates to `re_search'.  */
 
 
 /* Relates to `re_match' as `re_search_2' relates to `re_search'.  */
-extern int re_match_2 
+extern int re_match_2
   _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string1,
   _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string1,
-             int length1, const char *string2, int length2,
-             int start, struct re_registers *regs, int stop));
+            int length1, const char *string2, int length2,
+            int start, struct re_registers *regs, int stop));
 
 
 /* Set REGS to hold NUM_REGS registers, storing them in STARTS and
 
 
 /* Set REGS to hold NUM_REGS registers, storing them in STARTS and
@@ -473,7 +473,7 @@ extern int re_match_2
    freeing the old data.  */
 extern void re_set_registers
   _RE_ARGS ((struct re_pattern_buffer *buffer, struct re_registers *regs,
    freeing the old data.  */
 extern void re_set_registers
   _RE_ARGS ((struct re_pattern_buffer *buffer, struct re_registers *regs,
-             unsigned num_regs, regoff_t *starts, regoff_t *ends));
+            unsigned num_regs, regoff_t *starts, regoff_t *ends));
 
 /* 4.2 bsd compatibility.  */
 extern char *re_comp _RE_ARGS ((const char *));
 
 /* 4.2 bsd compatibility.  */
 extern char *re_comp _RE_ARGS ((const char *));
@@ -483,10 +483,10 @@ extern int re_exec _RE_ARGS ((const char *));
 extern int regcomp _RE_ARGS ((regex_t *preg, const char *pattern, int cflags));
 extern int regexec
   _RE_ARGS ((const regex_t *preg, const char *string, size_t nmatch,
 extern int regcomp _RE_ARGS ((regex_t *preg, const char *pattern, int cflags));
 extern int regexec
   _RE_ARGS ((const regex_t *preg, const char *string, size_t nmatch,
-             regmatch_t pmatch[], int eflags));
+            regmatch_t pmatch[], int eflags));
 extern size_t regerror
   _RE_ARGS ((int errcode, const regex_t *preg, char *errbuf,
 extern size_t regerror
   _RE_ARGS ((int errcode, const regex_t *preg, char *errbuf,
-             size_t errbuf_size));
+            size_t errbuf_size));
 extern void regfree _RE_ARGS ((regex_t *preg));
 
 /* LyX added. */
 extern void regfree _RE_ARGS ((regex_t *preg));
 
 /* LyX added. */
index 4088c033c0c90bbff84d9725f0432f134d40e5c8..42a9811cf5ea0926c3bee88ab64aea9c5979efb5 100644 (file)
@@ -1,8 +1,8 @@
 /* This file is part of
 /* This file is part of
- * ====================================================== 
- * 
+ * ======================================================
+ *
  *           LyX, The Document Processor
  *           LyX, The Document Processor
- *      
+ *
  *         Copyright 1995 Matthias Ettrich
  *          Copyright 1995-2000 The LyX Team.
  *
  *         Copyright 1995 Matthias Ettrich
  *          Copyright 1995-2000 The LyX Team.
  *
@@ -77,7 +77,7 @@ struct lyxstring::Srep {
        size_t res;
        /// Data. At least 1 char for trailing null.
        lyxstring::value_type * s;
        size_t res;
        /// Data. At least 1 char for trailing null.
        lyxstring::value_type * s;
-       
+
        ///
        Srep(lyxstring::size_type nsz, const lyxstring::value_type * p);
        ///
        ///
        Srep(lyxstring::size_type nsz, const lyxstring::value_type * p);
        ///
@@ -90,7 +90,7 @@ struct lyxstring::Srep {
                --ref;
                return new Srep(sz, s);
        }
                --ref;
                return new Srep(sz, s);
        }
-       
+
        ///
        void assign(lyxstring::size_type nsz, const lyxstring::value_type * p);
        ///
        ///
        void assign(lyxstring::size_type nsz, const lyxstring::value_type * p);
        ///
@@ -149,7 +149,7 @@ lyxstring::Srep::Srep(lyxstring::size_type nsz, value_type ch)
                sz = 0;
        }
 }
                sz = 0;
        }
 }
-       
+
 
 void lyxstring::Srep::assign(lyxstring::size_type nsz, const value_type * p)
 {
 
 void lyxstring::Srep::assign(lyxstring::size_type nsz, const value_type * p)
 {
@@ -296,7 +296,7 @@ void lyxstring::Srep::replace(lyxstring::size_type i, lyxstring::size_type n,
                memcpy(tmp + i + n2, &s[i + n], sz - i);
                delete[] s;
                s = tmp;
                memcpy(tmp + i + n2, &s[i + n], sz - i);
                delete[] s;
                s = tmp;
-               sz += n2; 
+               sz += n2;
        }
 }
 
        }
 }
 
@@ -304,7 +304,7 @@ void lyxstring::Srep::replace(lyxstring::size_type i, lyxstring::size_type n,
 ///////////////////////////////////////
 // The lyxstring Invariant tester
 ///////////////////////////////////////
 ///////////////////////////////////////
 // The lyxstring Invariant tester
 ///////////////////////////////////////
+
 // There are no know bugs in lyxstring now, and it have been
 // tested for a long time. so we disable the invariant checker. (Lgb)
 #undef ENABLE_ASSERTIONS
 // There are no know bugs in lyxstring now, and it have been
 // tested for a long time. so we disable the invariant checker. (Lgb)
 #undef ENABLE_ASSERTIONS
@@ -313,7 +313,7 @@ void lyxstring::Srep::replace(lyxstring::size_type i, lyxstring::size_type n,
 /** Testing of the lyxstring invariant
  * By creating an object that tests the lyxstring invariant during its
  * construction *and* its deconstruction we greatly simplify our code.
 /** Testing of the lyxstring invariant
  * By creating an object that tests the lyxstring invariant during its
  * construction *and* its deconstruction we greatly simplify our code.
- * Calling TestlyxstringInvariant() upon entry to an lyxstring method 
+ * Calling TestlyxstringInvariant() upon entry to an lyxstring method
  * will test the invariant upon entry to the code.  If the Asserts fail
  * then we know from the stack trace that the corruption occurred *before*
  * entry to this method.  We can also be sure it didn't happen in any of
  * will test the invariant upon entry to the code.  If the Asserts fail
  * then we know from the stack trace that the corruption occurred *before*
  * entry to this method.  We can also be sure it didn't happen in any of
@@ -523,7 +523,7 @@ const_reverse_iterator lyxstring::rend() const
 ///////////////////////
 
 lyxstring::size_type lyxstring::size() const
 ///////////////////////
 
 lyxstring::size_type lyxstring::size() const
-{ 
+{
        return rep->sz;
 }
 
        return rep->sz;
 }
 
@@ -601,7 +601,7 @@ lyxstring & lyxstring::assign(lyxstring const & x)
        rep = x.rep; // share representation
        return *this;
 }
        rep = x.rep; // share representation
        return *this;
 }
-       
+
 
 lyxstring & lyxstring::assign(lyxstring const & x, size_type pos, size_type n)
 {
 
 lyxstring & lyxstring::assign(lyxstring const & x, size_type pos, size_type n)
 {
@@ -610,7 +610,7 @@ lyxstring & lyxstring::assign(lyxstring const & x, size_type pos, size_type n)
 
        return assign(x.substr(pos, n));
 }
 
        return assign(x.substr(pos, n));
 }
-       
+
 
 lyxstring & lyxstring::assign(value_type const * s, size_type n)
 {
 
 lyxstring & lyxstring::assign(value_type const * s, size_type n)
 {
@@ -625,7 +625,7 @@ lyxstring & lyxstring::assign(value_type const * s, size_type n)
        }
        return *this;
 }
        }
        return *this;
 }
-       
+
 
 lyxstring & lyxstring::assign(value_type const * s)
 {
 
 lyxstring & lyxstring::assign(value_type const * s)
 {
@@ -881,21 +881,21 @@ void lyxstring::insert(iterator p, iterator first, iterator last)
 
        insert(p - begin(), first, last - first);
 }
 
        insert(p - begin(), first, last - first);
 }
-       
+
 
 ////////////////
 // Find
 ////////////////
 
 ////////////////
 // Find
 ////////////////
-         // All the below find functions should be verified,
-         // it is very likely that I have mixed up or interpreted
-         // some of the parameters wrong, also some of the funcs can surely
-         // be written more effectively.
+
+        // All the below find functions should be verified,
+        // it is very likely that I have mixed up or interpreted
+        // some of the parameters wrong, also some of the funcs can surely
+        // be written more effectively.
 
 lyxstring::size_type lyxstring::find(lyxstring const & a, size_type i) const
 {
        if (!rep->sz || i >= rep->sz) return npos;
 
 lyxstring::size_type lyxstring::find(lyxstring const & a, size_type i) const
 {
        if (!rep->sz || i >= rep->sz) return npos;
-       
+
        TestlyxstringInvariant(this);
 
        size_type n = a.length();
        TestlyxstringInvariant(this);
 
        size_type n = a.length();
@@ -923,7 +923,7 @@ lyxstring::size_type lyxstring::find(value_type const * ptr, size_type i,
 {
        lyx::Assert(ptr); // OURS!
        if (!rep->sz || !*ptr || i >= rep->sz) return npos;
 {
        lyx::Assert(ptr); // OURS!
        if (!rep->sz || !*ptr || i >= rep->sz) return npos;
-       
+
        TestlyxstringInvariant(this);
 
        // What is "n" here? is it the number of value_types to use in ptr
        TestlyxstringInvariant(this);
 
        // What is "n" here? is it the number of value_types to use in ptr
@@ -954,7 +954,7 @@ lyxstring::size_type lyxstring::find(value_type const * s, size_type i) const
 {
        lyx::Assert(s); // OURS!
        if (!rep->sz || i >= rep->sz) return npos;
 {
        lyx::Assert(s); // OURS!
        if (!rep->sz || i >= rep->sz) return npos;
-       
+
        TestlyxstringInvariant(this);
 
        if (!s || !*s) return npos;
        TestlyxstringInvariant(this);
 
        if (!s || !*s) return npos;
@@ -968,10 +968,10 @@ lyxstring::size_type lyxstring::find(value_type c, size_type i) const
 
        TestlyxstringInvariant(this);
 
 
        TestlyxstringInvariant(this);
 
-        for (size_type t = 0; t + i < rep->sz; ++t) {
-               if (rep->s[t + i] == c) return t + i;
+       for (size_type t = 0; t + i < rep->sz; ++t) {
+               if (rep->s[t + i] == c) return t + i;
        }
        }
-        return npos;
+       return npos;
 }
 
 
 }
 
 
@@ -1347,7 +1347,7 @@ lyxstring & lyxstring::replace(iterator i, iterator i2, const lyxstring & str)
 {
        TestlyxstringInvariant(this);
 
 {
        TestlyxstringInvariant(this);
 
-       return replace(i - begin(), i2 - i, str); 
+       return replace(i - begin(), i2 - i, str);
 }
 
 
 }
 
 
@@ -1377,7 +1377,7 @@ lyxstring & lyxstring::replace(iterator i, iterator i2,
 
        return replace(i - begin(), i2 - i, n, c);
 }
 
        return replace(i - begin(), i2 - i, n, c);
 }
-       
+
 
 lyxstring & lyxstring::replace(iterator i, iterator i2,
                               iterator j, iterator j2)
 
 lyxstring & lyxstring::replace(iterator i, iterator i2,
                               iterator j, iterator j2)
@@ -1478,11 +1478,11 @@ int lyxstring::internal_compare(size_type pos, size_type n,
        if (!*s) return 1;
        // since n > n2, min(n, n2) == 0, c == 0 (stops segfault also)
 
        if (!*s) return 1;
        // since n > n2, min(n, n2) == 0, c == 0 (stops segfault also)
 
-        // remember that n can very well be a lot larger than rep->sz
-        // so we have to ensure that n is no larger than rep->sz
-        n = min(n, rep->sz);
+       // remember that n can very well be a lot larger than rep->sz
+       // so we have to ensure that n is no larger than rep->sz
+       n = min(n, rep->sz);
        n2 = min(n2, slen);
        n2 = min(n2, slen);
-        if (n == n2)
+       if (n == n2)
                return memcmp(&(rep->s[pos]), s, n);
        int c = memcmp(&(rep->s[pos]), s, min(n, n2));
        if (c)
                return memcmp(&(rep->s[pos]), s, n);
        int c = memcmp(&(rep->s[pos]), s, min(n, n2));
        if (c)
index 5520ada245dd8ca9a4bb805d1d72685f214316e0..e6dbcdc8a3ab3b66efcd5c4af5d2b31a1f169971 100644 (file)
@@ -1,9 +1,9 @@
 // -*- C++ -*-
 /* This file is part of
  * ======================================================
 // -*- C++ -*-
 /* This file is part of
  * ======================================================
- * 
+ *
  *           LyX, The Document Processor
  *           LyX, The Document Processor
- *      
+ *
  *         Copyright 1995 Matthias Ettrich
  *          Copyright 1995-2000 The LyX Team.
  *
  *         Copyright 1995 Matthias Ettrich
  *          Copyright 1995-2000 The LyX Team.
  *
@@ -19,7 +19,7 @@
 // right behavior.
 
 #ifndef LYXSTRING_H
 // right behavior.
 
 #ifndef LYXSTRING_H
-#define LYXSTRING_H 
+#define LYXSTRING_H
 
 #ifdef __GNUG__
 #pragma interface
 
 #ifdef __GNUG__
 #pragma interface
@@ -34,7 +34,7 @@
 #include <cstring> // for size_t
 
 /** A string class for LyX
 #include <cstring> // for size_t
 
 /** A string class for LyX
-  
+
   This is a permanent String class. It is modeled closely after the C++ STL
   string class. In comparison with STL string lyxstring lack support for
   reverse iterators and allocators, also char_traits is not used. In most
   This is a permanent String class. It is modeled closely after the C++ STL
   string class. In comparison with STL string lyxstring lack support for
   reverse iterators and allocators, also char_traits is not used. In most
   do things like #lyxstring a= "";#, especially not in constructors.
 
   If you want to use a default empty lyxstring as a parameter, use
   do things like #lyxstring a= "";#, especially not in constructors.
 
   If you want to use a default empty lyxstring as a parameter, use
-  
-       #void foo(lyxstring par = lyxstring()); // Correct#
-  
+
+       #void foo(lyxstring par = lyxstring()); // Correct#
+
   rather than
 
   rather than
 
-       #void foo(lyxstring par = "");  // WRONG!#
-       #void foo(lyxstring par = 0);   // WRONG!#
+       #void foo(lyxstring par = "");  // WRONG!#
+       #void foo(lyxstring par = 0);   // WRONG!#
 
   (The last one is only wrong because some compilers can't handle it.)
 
 
   (The last one is only wrong because some compilers can't handle it.)
 
   Correct: & #foo.substring(0, length()-1);# \\
   Wrong:   & #bar.substring(0, length());#
   \end{tabular}
   Correct: & #foo.substring(0, length()-1);# \\
   Wrong:   & #bar.substring(0, length());#
   \end{tabular}
-  
+
   It is important that you declare lyxstring as const if possible, because
   some methods are much more efficient in const versions.
   It is important that you declare lyxstring as const if possible, because
   some methods are much more efficient in const versions.
-  
+
   If you want to check whether a string is empty, do
 
   If you want to check whether a string is empty, do
 
-       #if (foo.empty()) something right#
+       #if (foo.empty()) something right#
 
   rather than something along the lines of
 
 
   rather than something along the lines of
 
-       #if (!foo) completely wrong#
+       #if (!foo) completely wrong#
 
 When you want to copy an lyxstring, just do
 
 When you want to copy an lyxstring, just do
-  
+
        #lyxstring a, b = "String";#
        #a = b; // That's it!#
 
   not something like
        #lyxstring a, b = "String";#
        #a = b; // That's it!#
 
   not something like
-  
-       #lyxstring a, b = "String";#
-       #a = b.copy(); // This leaks. // and does not work either. #
-  
+
+       #lyxstring a, b = "String";#
+       #a = b.copy(); // This leaks. // and does not work either. #
+
   The class automatically handles deep copying when required.
 */
 class lyxstring {
 public:
        /* Typedefs */
   The class automatically handles deep copying when required.
 */
 class lyxstring {
 public:
        /* Typedefs */
-       
+
        ///
        typedef char value_type;
 
        ///
        typedef char value_type;
 
@@ -146,22 +146,22 @@ public:
          constructors as STL, except the one using iterators, one other
          difference is that lyxstring, do not allow the optional allocator
          parameter. */
          constructors as STL, except the one using iterators, one other
          difference is that lyxstring, do not allow the optional allocator
          parameter. */
-       
+
        /// "all characters" marker
        static const size_type npos;
 
        /// "all characters" marker
        static const size_type npos;
 
-       /// #lyxstring x;# 
+       /// #lyxstring x;#
        lyxstring();
        lyxstring();
-       
-       /// #lyxstring x(lyxstring ...)# 
+
+       /// #lyxstring x(lyxstring ...)#
        lyxstring(lyxstring const &, size_type pos = 0, size_type n = npos);
        lyxstring(lyxstring const &, size_type pos = 0, size_type n = npos);
-       
+
        /// #lyxstring x("abc", 2) -> "ab"#
        lyxstring(value_type const *, size_type n);
        /// #lyxstring x("abc", 2) -> "ab"#
        lyxstring(value_type const *, size_type n);
-       
+
        // #lyxstring x("abc")#
        lyxstring(value_type const *);
        // #lyxstring x("abc")#
        lyxstring(value_type const *);
-       
+
        /// lyxstring(5, 'n') -> "nnnnn"
        lyxstring(size_type n, value_type c);
 
        /// lyxstring(5, 'n') -> "nnnnn"
        lyxstring(size_type n, value_type c);
 
@@ -204,28 +204,28 @@ public:
 
        ///
        void reserve(size_type res_arg = 0);
 
        ///
        void reserve(size_type res_arg = 0);
-       
+
        ///
        lyxstring & operator=(lyxstring const &);
        ///
        lyxstring & operator=(lyxstring const &);
-       
+
        ///
        lyxstring & operator=(value_type const *);
        ///
        lyxstring & operator=(value_type const *);
-       
+
        ///
        lyxstring & operator=(value_type);
 
        ///
        lyxstring & assign(lyxstring const &);
        ///
        lyxstring & operator=(value_type);
 
        ///
        lyxstring & assign(lyxstring const &);
-       
+
        ///
        lyxstring & assign(lyxstring const &, size_type pos, size_type n);
        ///
        lyxstring & assign(lyxstring const &, size_type pos, size_type n);
-       
+
        ///
        lyxstring & assign(value_type const * p, size_type n);
        ///
        lyxstring & assign(value_type const * p, size_type n);
-       
+
        ///
        lyxstring & assign(value_type const * p);
        ///
        lyxstring & assign(value_type const * p);
-       
+
        ///
        lyxstring & assign(size_type n, value_type c);
 
        ///
        lyxstring & assign(size_type n, value_type c);
 
@@ -246,24 +246,24 @@ public:
 
        /// unchecked access
        const_reference operator[](size_type) const;
 
        /// unchecked access
        const_reference operator[](size_type) const;
-       
+
        /// unchecked access
        reference operator[](size_type);
        /// unchecked access
        reference operator[](size_type);
-       
+
        /// checked access
        const_reference at(size_type) const;
        /// checked access
        const_reference at(size_type) const;
-       
+
        /// checked access
        reference at(size_type);
 
        // add characters after (*this)[length()-1]:
        /// checked access
        reference at(size_type);
 
        // add characters after (*this)[length()-1]:
-       
+
        ///
        lyxstring & operator+=(lyxstring const &);
        ///
        lyxstring & operator+=(lyxstring const &);
-       
+
        ///
        lyxstring & operator+=(value_type const *);
        ///
        lyxstring & operator+=(value_type const *);
-       
+
        ///
        lyxstring & operator+=(value_type);
 
        ///
        lyxstring & operator+=(value_type);
 
@@ -303,11 +303,11 @@ public:
 
        ///
        lyxstring & insert(size_type pos, lyxstring const &);
 
        ///
        lyxstring & insert(size_type pos, lyxstring const &);
-       
+
        ///
        lyxstring & insert(size_type pos, lyxstring const &,
                        size_type pos2, size_type n);
        ///
        lyxstring & insert(size_type pos, lyxstring const &,
                        size_type pos2, size_type n);
-       
+
        ///
        lyxstring & insert(size_type pos, value_type const * p,
                         size_type n);
        ///
        lyxstring & insert(size_type pos, value_type const * p,
                         size_type n);
@@ -340,84 +340,84 @@ public:
                }
        }
 #endif
                }
        }
 #endif
-       
+
        ///
        size_type find(lyxstring const &, size_type i = 0) const;
        ///
        size_type find(lyxstring const &, size_type i = 0) const;
-       
+
        ///
        size_type find(value_type const * p,
                         size_type i, size_type n) const;
        ///
        size_type find(value_type const * p,
                         size_type i, size_type n) const;
-       
+
        ///
        size_type find(value_type const * p, size_type i = 0) const;
        ///
        size_type find(value_type const * p, size_type i = 0) const;
-       
+
        ///
        size_type find(value_type c, size_type i = 0) const;
 
        ///
        size_type rfind(lyxstring const &, size_type i = npos) const;
        ///
        size_type find(value_type c, size_type i = 0) const;
 
        ///
        size_type rfind(lyxstring const &, size_type i = npos) const;
-       
+
        ///
        size_type rfind(value_type const * p, size_type i, size_type n) const;
        ///
        size_type rfind(value_type const * p, size_type i, size_type n) const;
-       
+
        ///
        size_type rfind(value_type const * p, size_type i = npos) const;
        ///
        size_type rfind(value_type const * p, size_type i = npos) const;
-       
+
        ///
        size_type rfind(value_type c, size_type i = npos) const;
 
        ///
        size_type find_first_of(lyxstring const &, size_type i = 0) const;
        ///
        size_type rfind(value_type c, size_type i = npos) const;
 
        ///
        size_type find_first_of(lyxstring const &, size_type i = 0) const;
-       
+
        ///
        size_type find_first_of(value_type const * p, size_type i,
                                size_type n) const;
        ///
        size_type find_first_of(value_type const * p, size_type i,
                                size_type n) const;
-       
+
        ///
        size_type find_first_of(value_type const * p, size_type i = 0) const;
        ///
        size_type find_first_of(value_type const * p, size_type i = 0) const;
-       
+
        ///
        size_type find_first_of(value_type c, size_type i = 0) const;
 
        ///
        size_type find_last_of(lyxstring const &, size_type i = npos) const;
        ///
        size_type find_first_of(value_type c, size_type i = 0) const;
 
        ///
        size_type find_last_of(lyxstring const &, size_type i = npos) const;
-       
+
        ///
        size_type find_last_of(value_type const * p, size_type i,
                               size_type n) const;
        ///
        size_type find_last_of(value_type const * p, size_type i,
                               size_type n) const;
-       
+
        ///
        size_type find_last_of(value_type const * p, size_type i = npos) const;
        ///
        size_type find_last_of(value_type const * p, size_type i = npos) const;
-       
+
        ///
        size_type find_last_of(value_type c, size_type i = npos) const;
 
        ///
        size_type find_first_not_of(lyxstring const &, size_type i = 0) const;
        ///
        size_type find_last_of(value_type c, size_type i = npos) const;
 
        ///
        size_type find_first_not_of(lyxstring const &, size_type i = 0) const;
-       
+
        ///
        size_type find_first_not_of(value_type const * p, size_type i,
                                    size_type n) const;
        ///
        size_type find_first_not_of(value_type const * p, size_type i,
                                    size_type n) const;
-       
+
        ///
        size_type find_first_not_of(value_type const * p,
                                    size_type i = 0) const;
        ///
        size_type find_first_not_of(value_type const * p,
                                    size_type i = 0) const;
-       
+
        ///
        size_type find_first_not_of(value_type c, size_type i = 0) const;
 
        ///
        size_type find_last_not_of(lyxstring const &,
                                   size_type i = npos) const;
        ///
        size_type find_first_not_of(value_type c, size_type i = 0) const;
 
        ///
        size_type find_last_not_of(lyxstring const &,
                                   size_type i = npos) const;
-       
+
        ///
        size_type find_last_not_of(value_type const * p, size_type i,
                                   size_type n) const;
        ///
        size_type find_last_not_of(value_type const * p, size_type i,
                                   size_type n) const;
-       
+
        ///
        size_type find_last_not_of(value_type const * p,
                                   size_type i = npos) const;
        ///
        size_type find_last_not_of(value_type const * p,
                                   size_type i = npos) const;
-       
+
        ///
        size_type find_last_not_of(value_type c, size_type i = npos) const;
 
        ///
        size_type find_last_not_of(value_type c, size_type i = npos) const;
 
@@ -464,7 +464,7 @@ public:
 
        ///
        void swap(lyxstring & str);
 
        ///
        void swap(lyxstring & str);
-       
+
        /// Erase n chars from position i.
        lyxstring & erase(size_type i = 0, size_type n = npos);
 
        /// Erase n chars from position i.
        lyxstring & erase(size_type i = 0, size_type n = npos);
 
@@ -479,7 +479,7 @@ public:
        ///
        iterator erase(iterator first, iterator last);
 
        ///
        iterator erase(iterator first, iterator last);
 
-       /// 
+       ///
        value_type const * c_str() const;
 
        /* Note that this is STL compilant, so you can not assume
        value_type const * c_str() const;
 
        /* Note that this is STL compilant, so you can not assume
@@ -492,9 +492,9 @@ public:
        size_type copy(value_type * buf, size_type len,
                       size_type pos = 0) const;
 
        size_type copy(value_type * buf, size_type len,
                       size_type pos = 0) const;
 
-       
+
        ///
        ///
-       int compare(lyxstring const & str) const; 
+       int compare(lyxstring const & str) const;
 
        ///
        int compare(value_type const * p) const;
 
        ///
        int compare(value_type const * p) const;
@@ -509,11 +509,11 @@ public:
        ///
        int compare(size_type pos, size_type n, value_type const * p,
                    size_type n2 = npos) const;
        ///
        int compare(size_type pos, size_type n, value_type const * p,
                    size_type n2 = npos) const;
-       
-       
+
+
        ///
        lyxstring substr(size_type i = 0, size_type n = npos) const;
        ///
        lyxstring substr(size_type i = 0, size_type n = npos) const;
-       
+
 private:
        // These three operators can be used to discover erronous use of
        // ints and strings. However a conforming C++ compiler will flag
 private:
        // These three operators can be used to discover erronous use of
        // ints and strings. However a conforming C++ compiler will flag
@@ -531,7 +531,7 @@ private:
        int internal_compare(size_type pos, size_type n,
                             value_type const * s,
                             size_type slen, size_type n2) const;
        int internal_compare(size_type pos, size_type n,
                             value_type const * s,
                             size_type slen, size_type n2) const;
-               
+
        /// Forward declaration of the string representation
        struct Srep;
        // DEC cxx requires this.
        /// Forward declaration of the string representation
        struct Srep;
        // DEC cxx requires this.
index f74039591ebe0d1825a4577dfb8ad339ba0a0b6c..9884c93d014b02c215f46eeefd6f14045493eb6e 100644 (file)
@@ -1,6 +1,6 @@
 /* This file is part of
  * ======================================================
 /* This file is part of
  * ======================================================
- * 
+ *
  *           LyX, The Document Processor
  *           Copyright 2001 The LyX Team.
  *
  *           LyX, The Document Processor
  *           Copyright 2001 The LyX Team.
  *
@@ -43,14 +43,14 @@ unsigned long lyx::sum(string const & file)
 {
        lyxerr[Debug::FILES] << "lyx::sum() using mmap (lightning fast)"
                             << endl;
 {
        lyxerr[Debug::FILES] << "lyx::sum() using mmap (lightning fast)"
                             << endl;
-       
+
        int fd = open(file.c_str(), O_RDONLY);
        if (!fd)
                return 0;
        int fd = open(file.c_str(), O_RDONLY);
        if (!fd)
                return 0;
-       
+
        struct stat info;
        fstat(fd, &info);
        struct stat info;
        fstat(fd, &info);
-       
+
        void * mm = mmap(0, info.st_size, PROT_READ,
                         MAP_PRIVATE, fd, 0);
        // Some platforms have the wrong type for MAP_FAILED (compaq cxx).
        void * mm = mmap(0, info.st_size, PROT_READ,
                         MAP_PRIVATE, fd, 0);
        // Some platforms have the wrong type for MAP_FAILED (compaq cxx).
@@ -58,17 +58,17 @@ unsigned long lyx::sum(string const & file)
                close(fd);
                return 0;
        }
                close(fd);
                return 0;
        }
-       
+
        char * beg = static_cast<char*>(mm);
        char * end = beg + info.st_size;
        char * beg = static_cast<char*>(mm);
        char * end = beg + info.st_size;
-       
+
        boost::crc_32_type crc;
        crc.process_block(beg, end);
        unsigned long result = crc.checksum();
        boost::crc_32_type crc;
        crc.process_block(beg, end);
        unsigned long result = crc.checksum();
-       
+
        munmap(mm, info.st_size);
        close(fd);
        munmap(mm, info.st_size);
        close(fd);
-       
+
        return result;
 }
 #else // No mmap
        return result;
 }
 #else // No mmap
@@ -100,10 +100,10 @@ unsigned long lyx::sum(string const & file)
 
        ifstream ifs(file.c_str());
        if (!ifs) return 0;
 
        ifstream ifs(file.c_str());
        if (!ifs) return 0;
-       
+
        istreambuf_iterator<char> beg(ifs);
        istreambuf_iterator<char> end;
        istreambuf_iterator<char> beg(ifs);
        istreambuf_iterator<char> end;
-       
+
        return do_crc(beg,end);
 }
 #else
        return do_crc(beg,end);
 }
 #else
@@ -112,14 +112,14 @@ unsigned long lyx::sum(string const & file)
        lyxerr[Debug::FILES]
                << "lyx::sum() using istream_iterator (slow as a snail)"
                << endl;
        lyxerr[Debug::FILES]
                << "lyx::sum() using istream_iterator (slow as a snail)"
                << endl;
-       
+
        ifstream ifs(file.c_str());
        if (!ifs) return 0;
        ifstream ifs(file.c_str());
        if (!ifs) return 0;
-       
+
        ifs.unsetf(ios::skipws);
        istream_iterator<char> beg(ifs);
        istream_iterator<char> end;
        ifs.unsetf(ios::skipws);
        istream_iterator<char> beg(ifs);
        istream_iterator<char> end;
-       
+
        return do_crc(beg,end);
 }
 #endif
        return do_crc(beg,end);
 }
 #endif
index 4a060ab3e533b5cbab35d199fb887eaa9430df0e..9efb2aa46f1596a9e141973445040b5169056a39 100644 (file)
@@ -1,13 +1,13 @@
 /* -*- C++ -*- */
 /* This file is part of
 /* -*- C++ -*- */
 /* This file is part of
- * ====================================================== 
- * 
+ * ======================================================
+ *
  *           LyX, the High Level Word Processor
  *           LyX, the High Level Word Processor
- *        
+ *
  *           Copyright 1995 Matthias Ettrich
  *           Copyright 1995-1998 The LyX Team.
  *
  *           Copyright 1995 Matthias Ettrich
  *           Copyright 1995-1998 The LyX Team.
  *
- * ====================================================== 
+ * ======================================================
  A few prototypes and definitions needed for Windows NT */
 
 /* Hacks to get LyX running under Win-NT w. Cygnus b19 (steven@cs.uu.nl) */
  A few prototypes and definitions needed for Windows NT */
 
 /* Hacks to get LyX running under Win-NT w. Cygnus b19 (steven@cs.uu.nl) */
index a7adba699094e4797dbfa4bb2203a5833bb29d90..9a7e48be7baa4d1925919b7efc8ede728a60f105 100644 (file)
@@ -18,26 +18,26 @@ public:
                CMD_EXE
        };
 
                CMD_EXE
        };
 
-       // 
+       //
        static void init(int * argc, char ** argv[]);
 
        static void init(int * argc, char ** argv[]);
 
-       // 
+       //
        static string binpath() {return binpath_;}
 
        static string binpath() {return binpath_;}
 
-       // 
+       //
        static string binname() {return binname_;}
 
        // system_tempdir actually doesn't belong here.
        // I put it here only to avoid a global variable.
        static void setTmpDir(string p) {tmpdir_ = p;}
 
        static string binname() {return binname_;}
 
        // system_tempdir actually doesn't belong here.
        // I put it here only to avoid a global variable.
        static void setTmpDir(string p) {tmpdir_ = p;}
 
-       // 
+       //
        static string getTmpDir() {return tmpdir_;}
 
        static string getTmpDir() {return tmpdir_;}
 
-       // 
+       //
        static string current_root();
 
        static string current_root();
 
-       // 
+       //
        static os::shell_type shell() {return _shell;}
 
        // DBCS aware!
        static os::shell_type shell() {return _shell;}
 
        // DBCS aware!
@@ -63,7 +63,7 @@ private:
        static string tmpdir_;
        static os::shell_type _shell;
        // Used only on OS/2 to determine file system encoding.
        static string tmpdir_;
        static os::shell_type _shell;
        // Used only on OS/2 to determine file system encoding.
-       static unsigned long cp_;       
+       static unsigned long cp_;
 
        // Never initialize static variables in the header!
        // Anyway I bet this class will never be constructed.
 
        // Never initialize static variables in the header!
        // Anyway I bet this class will never be constructed.
index aa2b0c785500348f334632bc75d9c302cc46a941..58366418dcb7518aee10a21021bc5685ebace3c8 100644 (file)
@@ -1,13 +1,13 @@
 /* -*- C++ -*- */
 /* This file is part of
 /* -*- C++ -*- */
 /* This file is part of
-* ====================================================== 
-* 
+* ======================================================
+*
 *           LyX, The Document Processor
 *           LyX, The Document Processor
-*        
+*
 *           Copyright 1995 Matthias Ettrich
 *           Copyright 1995-2001 The LyX Team.
 *
 *           Copyright 1995 Matthias Ettrich
 *           Copyright 1995-2001 The LyX Team.
 *
-* ====================================================== 
+* ======================================================
  A few prototypes and definitions needed for OS/2 */
 
 #ifndef OS2_DEFINES_H
  A few prototypes and definitions needed for OS/2 */
 
 #ifndef OS2_DEFINES_H
index b2b4c3e8f5f58b32c0e5d9c55c4df7e99cfaaec9..fe75371dc42761fc4ff4d413648a72cf68b01225 100644 (file)
@@ -1,9 +1,9 @@
 /* -*- C++ -*- */
 /* This file is part of
 * ======================================================
 /* -*- C++ -*- */
 /* This file is part of
 * ======================================================
-* 
+*
 *           LyX, The Document Processor
 *           LyX, The Document Processor
-*        
+*
 *           Copyright 1995 Matthias Ettrich
 *           Copyright 1995-2001 The LyX Team.
 *
 *           Copyright 1995 Matthias Ettrich
 *           Copyright 1995-2001 The LyX Team.
 *
index 54e4fcb8d91971c0647bb7209ed45f28a9f42b28..18f5eaa6a87d8a6a1cc5cf9f5eeda9fc37729b0f 100644 (file)
@@ -23,10 +23,9 @@ int Path::pop()
                // The use of Alert::err_alert makes this impossible
                // to inline.
                //Alert::err_alert(
                // The use of Alert::err_alert makes this impossible
                // to inline.
                //Alert::err_alert(
-               //      _("Error: Could not change to directory: "), 
+               //      _("Error: Could not change to directory: "),
                //      pushedDir_);
        }
        popped_ = true;
        return 0;
 }
                //      pushedDir_);
        }
        popped_ = true;
        return 0;
 }
-
index 88dba32bfaa050dae2fb1cc3888569ff87f9a991..7059b1a285d325c9def93a6388612889e6dd3582 100644 (file)
@@ -19,14 +19,14 @@ public:
        Path(string const & path)
                : popped_(false)
        {
        Path(string const & path)
                : popped_(false)
        {
-               if (!path.empty()) { 
+               if (!path.empty()) {
                        pushedDir_ = lyx::getcwd(); // GetCWD();
                        if (pushedDir_.empty() || lyx::chdir(path)) {
                                // should throw an exception
                                // throw DirChangeError();
                                // The use of Alert::err_alert makes this
                                // impossible to inline.
                        pushedDir_ = lyx::getcwd(); // GetCWD();
                        if (pushedDir_.empty() || lyx::chdir(path)) {
                                // should throw an exception
                                // throw DirChangeError();
                                // The use of Alert::err_alert makes this
                                // impossible to inline.
-                               //Alert::err_alert(_("Error: Could not change to directory: "), 
+                               //Alert::err_alert(_("Error: Could not change to directory: "),
                                //           path);
                        }
                } else {
                                //           path);
                        }
                } else {
index 3eb7186fa7d8d8b074ab68b7e854dda070a3a2e3..0d58eba591724a81e9e2ef0fe11030f3e7d24b26 100644 (file)
@@ -22,7 +22,7 @@
 //  21 May 01  operator= fails if operand transitively owned by *this, as in a
 //             linked list (report by Ken Johnson, fix by Beman Dawes)
 //  21 Jan 01  Suppress some useless warnings with MSVC (David Abrahams)
 //  21 May 01  operator= fails if operand transitively owned by *this, as in a
 //             linked list (report by Ken Johnson, fix by Beman Dawes)
 //  21 Jan 01  Suppress some useless warnings with MSVC (David Abrahams)
-//  19 Oct 00  Make shared_ptr ctor from auto_ptr explicit. (Robert Vugts) 
+//  19 Oct 00  Make shared_ptr ctor from auto_ptr explicit. (Robert Vugts)
 //  24 Jul 00  Change throw() to // never throws.  See lib guidelines
 //             Exception-specification rationale. (Beman Dawes)
 //  22 Jun 00  Remove #if continuations to fix GCC 2.95.2 problem (Beman Dawes)
 //  24 Jul 00  Change throw() to // never throws.  See lib guidelines
 //             Exception-specification rationale. (Beman Dawes)
 //  22 Jun 00  Remove #if continuations to fix GCC 2.95.2 problem (Beman Dawes)
@@ -87,7 +87,7 @@ template<typename T> class shared_c_ptr {
    explicit shared_c_ptr(T* p =0) : px(p) {
 #ifndef LYX_NO_EXCEPTIONS
       try { pn = new long(1); }  // fix: prevent leak if new throws
    explicit shared_c_ptr(T* p =0) : px(p) {
 #ifndef LYX_NO_EXCEPTIONS
       try { pn = new long(1); }  // fix: prevent leak if new throws
-      catch (...) { checked_delete(p); throw; } 
+      catch (...) { checked_delete(p); throw; }
 #else
          pn = new long(1);
          assert(pn != 0);
 #else
          pn = new long(1);
          assert(pn != 0);
@@ -105,54 +105,54 @@ template<typename T> class shared_c_ptr {
 
 #if !defined(BOOST_NO_MEMBER_TEMPLATES)
    template<typename Y>
 
 #if !defined(BOOST_NO_MEMBER_TEMPLATES)
    template<typename Y>
-      shared_c_ptr(const shared_c_ptr<Y>& r) : px(r.px) {  // never throws 
-         ++*(pn = r.pn); 
+      shared_c_ptr(const shared_c_ptr<Y>& r) : px(r.px) {  // never throws
+        ++*(pn = r.pn);
       }
 #ifndef BOOST_NO_AUTO_PTR
    template<typename Y>
       }
 #ifndef BOOST_NO_AUTO_PTR
    template<typename Y>
-      explicit shared_c_ptr(std::auto_ptr<Y>& r) { 
-         pn = new long(1); // may throw
-         px = r.release(); // fix: moved here to stop leak if new throws
+      explicit shared_c_ptr(std::auto_ptr<Y>& r) {
+        pn = new long(1); // may throw
+        px = r.release(); // fix: moved here to stop leak if new throws
       }
       }
-#endif 
+#endif
 
    template<typename Y>
 
    template<typename Y>
-      shared_c_ptr& operator=(const shared_c_ptr<Y>& r) { 
-         share(r.px,r.pn);
-         return *this;
+      shared_c_ptr& operator=(const shared_c_ptr<Y>& r) {
+        share(r.px,r.pn);
+        return *this;
       }
 
 #ifndef BOOST_NO_AUTO_PTR
    template<typename Y>
       shared_c_ptr& operator=(std::auto_ptr<Y>& r) {
       }
 
 #ifndef BOOST_NO_AUTO_PTR
    template<typename Y>
       shared_c_ptr& operator=(std::auto_ptr<Y>& r) {
-         // code choice driven by guarantee of "no effect if new throws"
-         if (*pn == 1) { checked_delete(px); }
-         else { // allocate new reference counter
-           long * tmp = new long(1); // may throw
-           --*pn; // only decrement once danger of new throwing is past
-           pn = tmp;
-         } // allocate new reference counter
-         px = r.release(); // fix: moved here so doesn't leak if new throws 
-         return *this;
+        // code choice driven by guarantee of "no effect if new throws"
+        if (*pn == 1) { checked_delete(px); }
+        else { // allocate new reference counter
+          long * tmp = new long(1); // may throw
+          --*pn; // only decrement once danger of new throwing is past
+          pn = tmp;
+        } // allocate new reference counter
+        px = r.release(); // fix: moved here so doesn't leak if new throws
+        return *this;
       }
 #endif
 #else
 #ifndef BOOST_NO_AUTO_PTR
       }
 #endif
 #else
 #ifndef BOOST_NO_AUTO_PTR
-      explicit shared_c_ptr(std::auto_ptr<T>& r) { 
-         pn = new long(1); // may throw
-         px = r.release(); // fix: moved here to stop leak if new throws
-      } 
+      explicit shared_c_ptr(std::auto_ptr<T>& r) {
+        pn = new long(1); // may throw
+        px = r.release(); // fix: moved here to stop leak if new throws
+      }
 
       shared_c_ptr& operator=(std::auto_ptr<T>& r) {
 
       shared_c_ptr& operator=(std::auto_ptr<T>& r) {
-         // code choice driven by guarantee of "no effect if new throws"
-         if (*pn == 1) { checked_delete(px); }
-         else { // allocate new reference counter
-           long * tmp = new long(1); // may throw
-           --*pn; // only decrement once danger of new throwing is past
-           pn = tmp;
-         } // allocate new reference counter
-         px = r.release(); // fix: moved here so doesn't leak if new throws 
-         return *this;
+        // code choice driven by guarantee of "no effect if new throws"
+        if (*pn == 1) { checked_delete(px); }
+        else { // allocate new reference counter
+          long * tmp = new long(1); // may throw
+          --*pn; // only decrement once danger of new throwing is past
+          pn = tmp;
+        } // allocate new reference counter
+        px = r.release(); // fix: moved here so doesn't leak if new throws
+        return *this;
       }
 #endif
 #endif
       }
 #endif
 #endif
@@ -161,13 +161,13 @@ template<typename T> class shared_c_ptr {
       if (px == p) return;  // fix: self-assignment safe
       if (--*pn == 0) { checked_delete(px); }
       else { // allocate new reference counter
       if (px == p) return;  // fix: self-assignment safe
       if (--*pn == 0) { checked_delete(px); }
       else { // allocate new reference counter
-#ifndef LYX_NO_EXCEPTIONS                
-        try { pn = new long; }  // fix: prevent leak if new throws
-        catch (...) {
-          ++*pn;  // undo effect of --*pn above to meet effects guarantee 
-          checked_delete(p);
-          throw;
-        } // catch
+#ifndef LYX_NO_EXCEPTIONS
+       try { pn = new long; }  // fix: prevent leak if new throws
+       catch (...) {
+         ++*pn;  // undo effect of --*pn above to meet effects guarantee
+         checked_delete(p);
+         throw;
+       } // catch
 #else
                pn = new long;
                assert(pn != 0);
 #else
                pn = new long;
                assert(pn != 0);
@@ -206,11 +206,11 @@ template<typename T> class shared_c_ptr {
 
    void share(T* rpx, long* rpn) {
       if (pn != rpn) { // Q: why not px != rpx? A: fails when both == 0
 
    void share(T* rpx, long* rpn) {
       if (pn != rpn) { // Q: why not px != rpx? A: fails when both == 0
-         ++*rpn; // done before dispose() in case rpn transitively
-                 // dependent on *this (bug reported by Ken Johnson)
-         dispose();
-         px = rpx;
-         pn = rpn;
+        ++*rpn; // done before dispose() in case rpn transitively
+                // dependent on *this (bug reported by Ken Johnson)
+        dispose();
+        px = rpx;
+        pn = rpn;
       }
    } // share
 };  // shared_ptr
       }
    } // share
 };  // shared_ptr
@@ -250,7 +250,7 @@ template<typename T>
     : binary_function<lyx::shared_c_ptr<T>, lyx::shared_c_ptr<T>, bool>
   {
     bool operator()(const lyx::shared_c_ptr<T>& a,
     : binary_function<lyx::shared_c_ptr<T>, lyx::shared_c_ptr<T>, bool>
   {
     bool operator()(const lyx::shared_c_ptr<T>& a,
-        const lyx::shared_c_ptr<T>& b) const
+       const lyx::shared_c_ptr<T>& b) const
       { return less<T*>()(a.get(),b.get()); }
   };
 
       { return less<T*>()(a.get(),b.get()); }
   };
 
@@ -259,5 +259,3 @@ template<typename T>
 #endif  // ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
 
 #endif  // LYX_SMART_PTR_H
 #endif  // ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
 
 #endif  // LYX_SMART_PTR_H
-
-
index 03cf914b3d05d9000b4dcf36a0ba9baa55dfe2c6..aaad68ae4dd4ac5a82ca948a971205a07c17494b 100644 (file)
@@ -7,7 +7,7 @@
 #ifdef __cplusplus
 extern "C" {
 #endif
 #ifdef __cplusplus
 extern "C" {
 #endif
-  
+
 #if defined(HAVE_DECL_SNPRINTF) || defined(HAVE_DECL_VSNPRINTF)
 #include <stdio.h>
 #endif
 #if defined(HAVE_DECL_SNPRINTF) || defined(HAVE_DECL_VSNPRINTF)
 #include <stdio.h>
 #endif
@@ -33,5 +33,5 @@ int vasnprintf(char **ptr, size_t str_m, const char *fmt, va_list ap);
 #ifdef __cplusplus
 } /* end of extern "C" */
 #endif
 #ifdef __cplusplus
 } /* end of extern "C" */
 #endif
-  
+
 #endif
 #endif
index 2dc2e0d10c7d14ae28718d37375271584b6f013e..0d7620e1e02c152d0c85856a37cb6b4e62a2019c 100644 (file)
@@ -53,7 +53,7 @@ namespace std
       streambuf(which), buf(), mode(static_cast<ios::open_mode>(which)),
       rpos(0), bufsize(1)
     { }
       streambuf(which), buf(), mode(static_cast<ios::open_mode>(which)),
       rpos(0), bufsize(1)
     { }
-       
+
     explicit stringbuf(const string &s, int which=ios::in|ios::out) :
       streambuf(which), buf(s), mode(static_cast<ios::open_mode>(which)),
       bufsize(1)
     explicit stringbuf(const string &s, int which=ios::in|ios::out) :
       streambuf(which), buf(s), mode(static_cast<ios::open_mode>(which)),
       bufsize(1)
@@ -68,7 +68,7 @@ namespace std
        }
       rpos = (mode & ios::ate ? s.size() : 0);
     }
        }
       rpos = (mode & ios::ate ? s.size() : 0);
     }
-       
+
     string str() const
     {
       const_cast<stringbuf*>(this)->sync();  // Sigh, really ugly hack
     string str() const
     {
       const_cast<stringbuf*>(this)->sync();  // Sigh, really ugly hack
@@ -114,7 +114,7 @@ namespace std
       clear();
       static_cast<stringbuf*>(_strbuf)->str(s);
     }
       clear();
       static_cast<stringbuf*>(_strbuf)->str(s);
     }
-       
+
     stringbuf* rdbuf()
     {
       return &__my_sb;
     stringbuf* rdbuf()
     {
       return &__my_sb;
@@ -125,42 +125,42 @@ namespace std
     {
       init (&__my_sb);
     }
     {
       init (&__my_sb);
     }
-       
+
     stringstreambase(const string& s, int which) :
       __my_sb(s, which)
     {
       init (&__my_sb);
     }
   };
     stringstreambase(const string& s, int which) :
       __my_sb(s, which)
     {
       init (&__my_sb);
     }
   };
-    
+
   class istringstream : public stringstreambase, public istream {
   public:
     istringstream(int which=ios::in) :
       stringstreambase(which)
     { }
   class istringstream : public stringstreambase, public istream {
   public:
     istringstream(int which=ios::in) :
       stringstreambase(which)
     { }
-       
+
     istringstream(const string& s, int which=ios::in) :
       stringstreambase(s, which)
     { }
   };
     istringstream(const string& s, int which=ios::in) :
       stringstreambase(s, which)
     { }
   };
-    
+
   class ostringstream : public stringstreambase, public ostream {
   public:
     ostringstream(int which=ios::out) :
       stringstreambase(which)
     { }
   class ostringstream : public stringstreambase, public ostream {
   public:
     ostringstream(int which=ios::out) :
       stringstreambase(which)
     { }
-       
+
     ostringstream(const string& s, int which=ios::out) :
       stringstreambase(s, which)
     { }
   };
     ostringstream(const string& s, int which=ios::out) :
       stringstreambase(s, which)
     { }
   };
-    
+
   class stringstream : public stringstreambase, public iostream {
   public:
     stringstream(int which=ios::in|ios::out) :
       stringstreambase(which)
     { }
   class stringstream : public stringstreambase, public iostream {
   public:
     stringstream(int which=ios::in|ios::out) :
       stringstreambase(which)
     { }
-    
+
     stringstream(const string &s, int which=ios::in|ios::out) :
       stringstreambase(s, which)
     { }
     stringstream(const string &s, int which=ios::in|ios::out) :
       stringstreambase(s, which)
     { }
@@ -200,7 +200,7 @@ inline int stringbuf::overflow(int ch)
   if(ch != EOF)
     {
       string::size_type oldSize = buf.size();
   if(ch != EOF)
     {
       string::size_type oldSize = buf.size();
-      
+
       buf.replace(rpos, string::npos, 1, ch);
       if(buf.size() - oldSize != 1)
        return EOF;
       buf.replace(rpos, string::npos, 1, ch);
       if(buf.size() - oldSize != 1)
        return EOF;
@@ -220,7 +220,7 @@ inline int stringbuf::underflow()
     {
       return EOF;
     }
     {
       return EOF;
     }
-  
+
   string::size_type n = egptr() - eback();
   string::size_type s;
 
   string::size_type n = egptr() - eback();
   string::size_type s;
 
index 6d44010db8eeecf64b009d1ddbd50ec8eac15d3a..b54190cc4ad8061ade332050d6ed4edc2c83b198 100644 (file)
@@ -37,20 +37,20 @@ public:
                ///
                DontWait
        };
                ///
                DontWait
        };
-       
+
 #if 0
        ///
        Systemcall() {}
 
        /** Generate instance and start child process.
 #if 0
        ///
        Systemcall() {}
 
        /** Generate instance and start child process.
-        *  The string "what" contains a commandline with arguments separated 
+        *  The string "what" contains a commandline with arguments separated
         *  by spaces.
         */
        Systemcall(Starttype how, string const & what);
 #endif
         *  by spaces.
         */
        Systemcall(Starttype how, string const & what);
 #endif
-       
+
        /** Start child process.
        /** Start child process.
-        *  The string "what" contains a commandline with arguments separated 
+        *  The string "what" contains a commandline with arguments separated
         *  by spaces.
         */
        int startscript(Starttype how, string const & what);
         *  by spaces.
         */
        int startscript(Starttype how, string const & what);
index 614146f2c4dc15a6f8d2dda8fb6e7382558c36ff..88f142bac4784465d1e3cb5da4290807d638e04c 100644 (file)
@@ -16,7 +16,7 @@ using std::endl;
 namespace {
 
 inline
 namespace {
 
 inline
-int make_tempfile(char * templ) 
+int make_tempfile(char * templ)
 {
 #ifdef HAVE_MKSTEMP
        return ::mkstemp(templ);
 {
 #ifdef HAVE_MKSTEMP
        return ::mkstemp(templ);
@@ -47,7 +47,7 @@ string const lyx::tempName(string const & dir, string const & mask)
        char * tmpl = new char[tmpfl.length() + 1]; // + 1 for '\0'
        tmpfl.copy(tmpl, string::npos);
        tmpl[tmpfl.length()] = '\0'; // terminator
        char * tmpl = new char[tmpfl.length() + 1]; // + 1 for '\0'
        tmpfl.copy(tmpl, string::npos);
        tmpl[tmpfl.length()] = '\0'; // terminator
-       
+
        int const tmpf = make_tempfile(tmpl);
        if (tmpf != -1) {
                string const t(tmpl);
        int const tmpf = make_tempfile(tmpl);
        if (tmpf != -1) {
                string const t(tmpl);
index d399924c1d08fa5a70125e93d878665adaf7e3e3..d0f9028b5928e4581d174ff65618a2ec18465c3c 100644 (file)
@@ -1,9 +1,9 @@
 // -*- C++ -*-
 /* This file is part of
  * ======================================================
 // -*- C++ -*-
 /* This file is part of
  * ======================================================
- * 
+ *
  *           LyX, The Document Processor
  *           LyX, The Document Processor
- *      
+ *
  *           Copyright 1995 Matthias Ettrich
  *           Copyright 1995-2001 The LyX Team.
  *
  *           Copyright 1995 Matthias Ettrich
  *           Copyright 1995-2001 The LyX Team.
  *
@@ -49,7 +49,7 @@ bool IsLineSeparatorChar(char c) {
 ///
 inline
 bool IsKommaChar(char c) {
 ///
 inline
 bool IsKommaChar(char c) {
-       return (c == ',' 
+       return (c == ','
                || c == '('
                || c == ')'
                || c == '['
                || c == '('
                || c == ')'
                || c == '['
@@ -70,7 +70,7 @@ bool IsKommaChar(char c) {
                || c == '#'
                || c == '%'
                || c == '^'
                || c == '#'
                || c == '%'
                || c == '^'
-               || c == '/' 
+               || c == '/'
                || c == '\\'
                || c == Paragraph::META_NEWLINE
                );
                || c == '\\'
                || c == Paragraph::META_NEWLINE
                );
@@ -100,7 +100,7 @@ bool IsPrintableNonspace(unsigned char c) {
 }
 
 
 }
 
 
-/// Word is not IsSeparator or IsKomma or IsHfill or IsFloat or IsInset. 
+/// Word is not IsSeparator or IsKomma or IsHfill or IsFloat or IsInset.
 inline
 bool IsWordChar(unsigned char c) {
        return !(IsSeparatorChar(c)
 inline
 bool IsWordChar(unsigned char c) {
        return !(IsSeparatorChar(c)
index aff39251d9f1c7bca82c396d83870fe346940c4a..0b400f714de21c34fe37599c481fe09bc4f7ce9f 100644 (file)
@@ -1,7 +1,7 @@
 // -*- C++ -*-
 /* This file is part of
  * =================================================
 // -*- C++ -*-
 /* This file is part of
  * =================================================
- * 
+ *
  *          LyX, The Document Processor
  *          Copyright 1995 Matthias Ettrich.
  *          Copyright 1995-2001 The LyX Team.
  *          LyX, The Document Processor
  *          Copyright 1995 Matthias Ettrich.
  *          Copyright 1995-2001 The LyX Team.
@@ -22,7 +22,7 @@
 /** This class template is used to translate between two elements, specifically
     it was worked out to translate between an enum and strings when reading
     the lyx file.
 /** This class template is used to translate between two elements, specifically
     it was worked out to translate between an enum and strings when reading
     the lyx file.
-    
+
     The two template arguments should be of different types.
 */
 template<typename T1, typename T2>
     The two template arguments should be of different types.
 */
 template<typename T1, typename T2>
@@ -36,42 +36,42 @@ public:
        typedef std::pair<T1, T2> MapPair;
        ///
        typedef std::vector<MapPair> Map;
        typedef std::pair<T1, T2> MapPair;
        ///
        typedef std::vector<MapPair> Map;
-       
+
        ///
        ///
-       Translator(T1 const & t1, T2 const & t2) 
-               : default_t1(t1), default_t2(t2) 
+       Translator(T1 const & t1, T2 const & t2)
+               : default_t1(t1), default_t2(t2)
                {}
                {}
-       
+
        /// Add a mapping to the translator.
        void addPair(T1 const & first, T2 const & second) {
                map.push_back(MapPair(first, second));
        }
        /// Add a mapping to the translator.
        void addPair(T1 const & first, T2 const & second) {
                map.push_back(MapPair(first, second));
        }
-       
+
        /// Find the mapping for the first argument
        T2 const & find(T1 const & first) const {
                lyx::Assert(!map.empty());
        /// Find the mapping for the first argument
        T2 const & find(T1 const & first) const {
                lyx::Assert(!map.empty());
-               
+
                // For explanation see the next find() function.
                Map::const_iterator it =
                        std::find_if(map.begin(), map.end(),
                                     lyx::equal_1st_in_pair<MapPair>(first)
                                );
                // For explanation see the next find() function.
                Map::const_iterator it =
                        std::find_if(map.begin(), map.end(),
                                     lyx::equal_1st_in_pair<MapPair>(first)
                                );
-               
+
                if (it != map.end()) {
                        return it->second;
                } else {
                        return default_t2;
                }
        }
                if (it != map.end()) {
                        return it->second;
                } else {
                        return default_t2;
                }
        }
-       
+
        /// Find the mapping for the second argument
        T1 const & find(T2 const & second) const {
                lyx::Assert(!map.empty());
        /// Find the mapping for the second argument
        T1 const & find(T2 const & second) const {
                lyx::Assert(!map.empty());
-               
+
                // The idea is as follows:
                // find_if() will try to compare the data in the vector with
                // the value. The vector is made of pairs and the value has
                // The idea is as follows:
                // find_if() will try to compare the data in the vector with
                // the value. The vector is made of pairs and the value has
-               // the type of the second part of the pair. 
+               // the type of the second part of the pair.
                // We thus give find_if() an equal_to functor and assign to
                // its second post the value we want to compare. We now
                // compose the equal_to functor with the select2nd functor
                // We thus give find_if() an equal_to functor and assign to
                // its second post the value we want to compare. We now
                // compose the equal_to functor with the select2nd functor
@@ -83,7 +83,7 @@ public:
                        std::find_if(map.begin(), map.end(),
                                     lyx::equal_2nd_in_pair<MapPair>(second)
                                );
                        std::find_if(map.begin(), map.end(),
                                     lyx::equal_2nd_in_pair<MapPair>(second)
                                );
-               
+
                if (it != map.end())
                        return it->first;
                else {
                if (it != map.end())
                        return it->first;
                else {
index ad8fe03b628caa37d862dda905475de13d70872f..bc46ad7dcae87ccf171106ea295b691c070b9bd2 100644 (file)
@@ -56,7 +56,7 @@ namespace lyx
                private:
                base_type data_;
        };
                private:
                base_type data_;
        };
-               
+
 
 #endif
 
 
 #endif
 
index e00ca0cb51b53347f2962ecd51cb04f413c16424..99d94dcc2a45c9c91003a49abe3a9214b91fb1cf 100644 (file)
 //  Revision History
 //  21 May 01  checked_delete() and checked_array_delete() added (Beman Dawes,
 //             suggested by Dave Abrahams, generalizing idea from Vladimir Prus)
 //  Revision History
 //  21 May 01  checked_delete() and checked_array_delete() added (Beman Dawes,
 //             suggested by Dave Abrahams, generalizing idea from Vladimir Prus)
-//  21 May 01  made next() and prior() inline (Beman Dawes)  
+//  21 May 01  made next() and prior() inline (Beman Dawes)
 //  26 Jan 00  protected noncopyable destructor added (Miki Jovanovic)
 //  10 Dec 99  next() and prior() templates added (Dave Abrahams)
 //  30 Aug 99  moved cast templates to cast.hpp (Beman Dawes)
 //   3 Aug 99  cast templates added
 //  26 Jan 00  protected noncopyable destructor added (Miki Jovanovic)
 //  10 Dec 99  next() and prior() templates added (Dave Abrahams)
 //  30 Aug 99  moved cast templates to cast.hpp (Beman Dawes)
 //   3 Aug 99  cast templates added
-//  20 Jul 99  name changed to utility.hpp 
+//  20 Jul 99  name changed to utility.hpp
 //   9 Jun 99  protected noncopyable default ctor
 //   2 Jun 99  Initial Version. Class noncopyable only contents (Dave Abrahams)
 
 #ifndef LYX_UTILITY_H
 #define LYX_UTILITY_H
 
 //   9 Jun 99  protected noncopyable default ctor
 //   2 Jun 99  Initial Version. Class noncopyable only contents (Dave Abrahams)
 
 #ifndef LYX_UTILITY_H
 #define LYX_UTILITY_H
 
-#include <boost/config.hpp>        // broken compiler workarounds 
-#include <boost/static_assert.hpp> 
+#include <boost/config.hpp>        // broken compiler workarounds
+#include <boost/static_assert.hpp>
 //#include <cstddef>                 // for size_t
 //#include <utility>                 // for std::pair
 
 //#include <cstddef>                 // for size_t
 //#include <utility>                 // for std::pair
 
@@ -39,12 +39,11 @@ namespace lyx
     template< typename T >
     inline void checked_delete(T * x)
     {
     template< typename T >
     inline void checked_delete(T * x)
     {
-        BOOST_STATIC_ASSERT( sizeof(T) != 0 ); // assert type complete at point
-                                               // of instantiation
-        free(x);
+       BOOST_STATIC_ASSERT( sizeof(T) != 0 ); // assert type complete at point
+                                              // of instantiation
+       free(x);
     }
 
 } // namespace boost
 
 #endif  // BOOST_UTILITY_HPP
     }
 
 } // namespace boost
 
 #endif  // BOOST_UTILITY_HPP
-