]> git.lyx.org Git - lyx.git/blobdiff - src/LyXRC.cpp
Fix export of xfig external insets (bug #9244).
[lyx.git] / src / LyXRC.cpp
index c95cacd606636dc868a4af52865eee2b57bf0a63..5e1efcf4105aec295e50ae5d05f958445670af61 100644 (file)
@@ -40,6 +40,7 @@
 #include "support/lstrings.h"
 #include "support/os.h"
 #include "support/Package.h"
+#include "support/TempFile.h"
 #include "support/userinfo.h"
 
 #include <fstream>
@@ -57,7 +58,7 @@ namespace {
 
 // The format should also be updated in configure.py, and conversion code
 // should be added to prefs2prefs_prefs.py.
-static unsigned int const LYXRC_FILEFORMAT = 15; // prannoy: statusbar on/off in full screen
+static unsigned int const LYXRC_FILEFORMAT = 17; // lasgouttes: remove \\rtl
 
 // when adding something to this array keep it sorted!
 LexerKeyword lyxrcTags[] = {
@@ -105,7 +106,6 @@ LexerKeyword lyxrcTags[] = {
        { "\\example_path", LyXRC::RC_EXAMPLEPATH },
        { "\\export_overwrite", LyXRC::RC_EXPORT_OVERWRITE },
        { "\\font_encoding", LyXRC::RC_FONT_ENCODING },
-       { "\\force_paint_single_char", LyXRC::RC_FORCE_PAINT_SINGLE_CHAR },
        { "\\format", LyXRC::RC_FILEFORMAT },
        { "\\forward_search_dvi", LyXRC::RC_FORWARD_SEARCH_DVI },
        { "\\forward_search_pdf", LyXRC::RC_FORWARD_SEARCH_PDF },
@@ -170,7 +170,6 @@ LexerKeyword lyxrcTags[] = {
        { "\\print_to_file", LyXRC::RC_PRINTTOFILE },
        { "\\print_to_printer", LyXRC::RC_PRINTTOPRINTER },
        { "\\printer", LyXRC::RC_PRINTER },
-       { "\\rtl", LyXRC::RC_RTL_SUPPORT },
        { "\\save_compressed", LyXRC::RC_SAVE_COMPRESSED },
        { "\\screen_dpi", LyXRC::RC_SCREEN_DPI },
        { "\\screen_font_roman", LyXRC::RC_SCREEN_FONT_ROMAN },
@@ -313,7 +312,6 @@ void LyXRC::setDefaults()
        completion_minlength = 6;
        spellcheck_notes = true;
        use_kbmap = false;
-       rtl_support = true;
        visual_cursor = false;
        auto_number = true;
        mark_foreign_language = true;
@@ -407,7 +405,8 @@ bool LyXRC::read(FileName const & filename, bool check_format)
                return retval == ReadOK;
 
        LYXERR(Debug::FILES, "Converting LyXRC file to " << LYXRC_FILEFORMAT);
-       FileName const tempfile = FileName::tempName("convert_lyxrc");
+       TempFile tmp("convert_lyxrc");
+       FileName const tempfile = tmp.name();
        bool const success = prefs2prefs(filename, tempfile, false);
        if (!success) {
                LYXERR0 ("Unable to convert " << filename.absFileName() <<
@@ -422,7 +421,6 @@ bool LyXRC::read(FileName const & filename, bool check_format)
                LYXERR(Debug::LYXRC, "Reading '" << tempfile << "'...");
                retval = read(lexrc2, check_format);
        }
-       tempfile.removeFile();
        return retval == ReadOK;
 }
 
@@ -446,9 +444,6 @@ LyXRC::ReturnValues LyXRC::read(Lexer & lexrc, bool check_format)
        if (!lexrc.isOK())
                return ReadError;
 
-       // default for current rowpainter capabilities
-       force_paint_single_char = true;
-
        // format prior to 2.0 and introduction of format tag
        unsigned int format = 0;
 
@@ -554,10 +549,6 @@ LyXRC::ReturnValues LyXRC::read(Lexer & lexrc, bool check_format)
                        lexrc >> fontenc;
                        break;
 
-               case RC_FORCE_PAINT_SINGLE_CHAR:
-                       lexrc >> force_paint_single_char;
-                       break;
-
                case RC_PRINTER:
                        lexrc >> printer;
                        break;
@@ -1049,9 +1040,6 @@ LyXRC::ReturnValues LyXRC::read(Lexer & lexrc, bool check_format)
                case RC_LANGUAGE_COMMAND_LOCAL:
                        lexrc >> language_command_local;
                        break;
-               case RC_RTL_SUPPORT:
-                       lexrc >> rtl_support;
-                       break;
                case RC_VISUAL_CURSOR:
                        lexrc >> visual_cursor;
                        break;
@@ -2220,14 +2208,6 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c
                if (tag != RC_LAST)
                        break;
 
-       case RC_FORCE_PAINT_SINGLE_CHAR:
-               if (ignore_system_lyxrc ||
-                   force_paint_single_char != system_lyxrc.force_paint_single_char) {
-                       os << "\\force_paint_single_char \"" << force_paint_single_char << "\"\n";
-               }
-               if (tag != RC_LAST)
-                       break;
-
                os << "\n#\n"
                   << "# FILE SECTION ######################################\n"
                   << "#\n\n";
@@ -2552,13 +2532,6 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c
                if (tag != RC_LAST)
                        break;
 
-       case RC_RTL_SUPPORT:
-               if (ignore_system_lyxrc ||
-                   rtl_support != system_lyxrc.rtl_support) {
-                       os << "\\rtl " << convert<string>(rtl_support) << '\n';
-               }
-               if (tag != RC_LAST)
-                       break;
        case RC_VISUAL_CURSOR:
                if (ignore_system_lyxrc ||
                        visual_cursor != system_lyxrc.visual_cursor) {
@@ -2973,7 +2946,6 @@ void actOnUpdatedPrefs(LyXRC const & lyxrc_orig, LyXRC const & lyxrc_new)
        case LyXRC::RC_ESC_CHARS:
        case LyXRC::RC_EXAMPLEPATH:
        case LyXRC::RC_FONT_ENCODING:
-       case LyXRC::RC_FORCE_PAINT_SINGLE_CHAR:
        case LyXRC::RC_FILEFORMAT:
        case LyXRC::RC_GROUP_LAYOUTS:
        case LyXRC::RC_HUNSPELLDIR_PATH:
@@ -3031,7 +3003,6 @@ void actOnUpdatedPrefs(LyXRC const & lyxrc_orig, LyXRC const & lyxrc_new)
        case LyXRC::RC_PRINTTOPRINTER:
        case LyXRC::RC_PRINT_ADAPTOUTPUT:
        case LyXRC::RC_PRINT_COMMAND:
-       case LyXRC::RC_RTL_SUPPORT:
        case LyXRC::RC_SAVE_COMPRESSED:
        case LyXRC::RC_SCREEN_DPI:
        case LyXRC::RC_SCREEN_FONT_ROMAN:
@@ -3227,10 +3198,6 @@ string const LyXRC::getDescription(LyXRCTags tag)
                str = _("The font encoding used for the LaTeX2e fontenc package. T1 is highly recommended for non-English languages.");
                break;
 
-       case RC_FORCE_PAINT_SINGLE_CHAR:
-               str = _("Disable any kerning and ligatures for text drawing on screen.");
-               break;
-
        case RC_FILEFORMAT:
                break;
 
@@ -3443,10 +3410,6 @@ string const LyXRC::getDescription(LyXRCTags tag)
                str = _("Your favorite print program, e.g. \"dvips\", \"dvilj4\".");
                break;
 
-       case RC_RTL_SUPPORT:
-               str = _("Select to enable support of right-to-left languages (e.g. Hebrew, Arabic).");
-               break;
-
        case RC_VISUAL_CURSOR:
                str = _("Select to have visual bidi cursor movement, unselect for logical movement.");
                break;