]> git.lyx.org Git - lyx.git/blobdiff - src/Font.cpp
SCons: msvc does not need this /TP option any more after we rename .C => .cpp. Also...
[lyx.git] / src / Font.cpp
index ea1b8c17a37ca14c4ad873c7dfc2ca15f69842ac..b0073ebeb8e109883e94008664b42dc74f8a70c8 100644 (file)
 
 #include "support/lstrings.h"
 
-
-namespace lyx {
-
-using support::ascii_lowercase;
-using support::bformat;
-using support::rtrim;
-using support::subst;
-
 using std::endl;
 using std::string;
 using std::ostream;
@@ -46,6 +38,14 @@ using std::pair;
 using std::strlen;
 #endif
 
+
+namespace lyx {
+
+using support::ascii_lowercase;
+using support::bformat;
+using support::rtrim;
+using support::subst;
+
 //
 // Names for the GUI
 //
@@ -802,7 +802,8 @@ int Font::latexWriteStartChanges(odocstream & os, BufferParams const & bparams,
        // for Hebrew and Farsi (Arabi) do not.
        if (number() == ON && prev.number() != ON
                && (language()->lang() == "hebrew"
-                       || language()->lang() == "farsi")) {
+                       || language()->lang() == "farsi" 
+                       || language()->lang() == "arabic_arabi")) {
                os << "{\\beginL ";
                count += 9;
        }
@@ -875,7 +876,8 @@ int Font::latexWriteStartChanges(odocstream & os, BufferParams const & bparams,
 int Font::latexWriteEndChanges(odocstream & os, BufferParams const & bparams,
                                  OutputParams const & runparams,
                                  Font const & base,
-                                 Font const & next) const
+                                 Font const & next,
+                                 bool const & closeLanguage) const
 {
        int count = 0;
        bool env = false;
@@ -935,7 +937,8 @@ int Font::latexWriteEndChanges(odocstream & os, BufferParams const & bparams,
        // for Hebrew and Farsi (Arabi) do not.
        if (number() == ON && next.number() != ON
                && (language()->lang() == "hebrew"
-                       || language()->lang() == "farsi")) {
+                       || language()->lang() == "farsi"
+                       || language()->lang() == "arabic_arabi")) {
                os << "\\endL}";
                count += 6;
        }
@@ -953,7 +956,8 @@ int Font::latexWriteEndChanges(odocstream & os, BufferParams const & bparams,
                open_encoding_ = false;
        }
 
-       if (language() != base.language() && language() != next.language()) {
+       if (closeLanguage &&
+                       language() != base.language() && language() != next.language()) {
                os << '}';
                ++count;
        }