mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-29 05:01:49 +00:00
More cosmetics.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22874 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
3253ee5feb
commit
1c265688d8
@ -330,7 +330,9 @@ docstring const Encoding::latexChar(char_type c) const
|
|||||||
|
|
||||||
if (c < start_encodable_)
|
if (c < start_encodable_)
|
||||||
return docstring(1, c);
|
return docstring(1, c);
|
||||||
if (encodable_.find(c) == encodable_.end()) {
|
if (encodable_.find(c) != encodable_.end())
|
||||||
|
return docstring(1, c);
|
||||||
|
|
||||||
// c cannot be encoded in this encoding
|
// c cannot be encoded in this encoding
|
||||||
CharInfoMap::const_iterator const it = unicodesymbols.find(c);
|
CharInfoMap::const_iterator const it = unicodesymbols.find(c);
|
||||||
if (it == unicodesymbols.end())
|
if (it == unicodesymbols.end())
|
||||||
@ -338,8 +340,6 @@ docstring const Encoding::latexChar(char_type c) const
|
|||||||
else
|
else
|
||||||
return it->second.command;
|
return it->second.command;
|
||||||
}
|
}
|
||||||
return docstring(1, c);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
set<char_type> Encoding::getSymbolsList() const
|
set<char_type> Encoding::getSymbolsList() const
|
||||||
@ -375,8 +375,7 @@ void Encodings::validate(char_type c, LaTeXFeatures & features)
|
|||||||
|
|
||||||
bool Encodings::isComposeChar_hebrew(char_type c)
|
bool Encodings::isComposeChar_hebrew(char_type c)
|
||||||
{
|
{
|
||||||
return c <= 0x05c2 && c >= 0x05b0 &&
|
return c <= 0x05c2 && c >= 0x05b0 && c != 0x05be && c != 0x05c0;
|
||||||
c != 0x05be && c != 0x05c0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -386,11 +385,9 @@ bool Encodings::isComposeChar_hebrew(char_type c)
|
|||||||
|
|
||||||
bool Encodings::is_arabic_special(char_type c)
|
bool Encodings::is_arabic_special(char_type c)
|
||||||
{
|
{
|
||||||
return (c >= 0x0621 && c <= 0x0625) ||
|
return (c >= 0x0621 && c <= 0x0625) || (c >= 0x0630 && c <= 0x0632)
|
||||||
c == 0x0627 || c == 0x0629 ||
|
|| c == 0x0627 || c == 0x0629 || c == 0x062f || c == 0x0648
|
||||||
c == 0x062f || c == 0x0648 ||
|
|| c == 0x0649 || c == 0x0698;
|
||||||
(c >= 0x0630 && c <= 0x0632) ||
|
|
||||||
c == 0x0649 || c == 0x0698;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -402,8 +399,8 @@ bool Encodings::isComposeChar_arabic(char_type c)
|
|||||||
|
|
||||||
bool Encodings::is_arabic(char_type c)
|
bool Encodings::is_arabic(char_type c)
|
||||||
{
|
{
|
||||||
return c >= arabic_start && c <= arabic_end &&
|
return c >= arabic_start && c <= arabic_end
|
||||||
arabic_table[c-arabic_start][0];
|
&& arabic_table[c-arabic_start][0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -433,8 +430,7 @@ bool Encodings::isKnownScriptChar(char_type const c, string & preamble)
|
|||||||
if (it == unicodesymbols.end())
|
if (it == unicodesymbols.end())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (it->second.preamble != "textgreek" &&
|
if (it->second.preamble != "textgreek" && it->second.preamble != "textcyr")
|
||||||
it->second.preamble != "textcyr")
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (preamble.empty()) {
|
if (preamble.empty()) {
|
||||||
@ -447,11 +443,8 @@ bool Encodings::isKnownScriptChar(char_type const c, string & preamble)
|
|||||||
|
|
||||||
Encoding const * Encodings::getFromLyXName(string const & name) const
|
Encoding const * Encodings::getFromLyXName(string const & name) const
|
||||||
{
|
{
|
||||||
EncodingList::const_iterator it = encodinglist.find(name);
|
EncodingList::const_iterator const it = encodinglist.find(name);
|
||||||
if (it != encodinglist.end())
|
return it != encodinglist.end() ? &it->second : 0;
|
||||||
return &it->second;
|
|
||||||
else
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -486,7 +479,9 @@ void Encodings::read(FileName const & encfile, FileName const & symbolsfile)
|
|||||||
CharInfo info;
|
CharInfo info;
|
||||||
string flags;
|
string flags;
|
||||||
|
|
||||||
if (symbolslex.next(true)) {
|
if (!symbolslex.next(true))
|
||||||
|
break;
|
||||||
|
|
||||||
istringstream is(symbolslex.getString());
|
istringstream is(symbolslex.getString());
|
||||||
// reading symbol directly does not work if
|
// reading symbol directly does not work if
|
||||||
// char_type == wchar_t.
|
// char_type == wchar_t.
|
||||||
@ -494,20 +489,16 @@ void Encodings::read(FileName const & encfile, FileName const & symbolsfile)
|
|||||||
if(!(is >> hex >> tmp))
|
if(!(is >> hex >> tmp))
|
||||||
break;
|
break;
|
||||||
symbol = tmp;
|
symbol = tmp;
|
||||||
} else
|
|
||||||
|
if (!symbolslex.next(true))
|
||||||
break;
|
break;
|
||||||
if (symbolslex.next(true))
|
|
||||||
info.command = symbolslex.getDocString();
|
info.command = symbolslex.getDocString();
|
||||||
else
|
if (!symbolslex.next(true))
|
||||||
break;
|
break;
|
||||||
if (symbolslex.next(true))
|
|
||||||
info.preamble = symbolslex.getString();
|
info.preamble = symbolslex.getString();
|
||||||
else
|
if (!symbolslex.next(true))
|
||||||
break;
|
break;
|
||||||
if (symbolslex.next(true))
|
|
||||||
flags = symbolslex.getString();
|
flags = symbolslex.getString();
|
||||||
else
|
|
||||||
break;
|
|
||||||
|
|
||||||
info.combining = false;
|
info.combining = false;
|
||||||
info.feature = false;
|
info.feature = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user