mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Fix bug 5665
http://bugzilla.lyx.org/show_bug.cgi?id=5665 git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28058 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
a50d819a3c
commit
7728b5cbb9
@ -15,6 +15,7 @@
|
||||
#include "Encoding.h"
|
||||
|
||||
#include "Buffer.h"
|
||||
#include "BufferList.h"
|
||||
#include "InsetIterator.h"
|
||||
#include "LaTeXFeatures.h"
|
||||
#include "Lexer.h"
|
||||
@ -527,22 +528,31 @@ docstring Encodings::fromLaTeXCommand(docstring const & cmd, docstring & rem)
|
||||
}
|
||||
|
||||
|
||||
void Encodings::initUnicodeMath(Buffer const & buffer)
|
||||
void Encodings::initUnicodeMath(Buffer const & buffer, bool clear_sets)
|
||||
{
|
||||
#ifdef TEX2LYX
|
||||
// The code below is not needed in tex2lyx and requires additional stuff
|
||||
(void)buffer;
|
||||
#else
|
||||
mathcmd.clear();
|
||||
textcmd.clear();
|
||||
mathsym.clear();
|
||||
if (clear_sets) {
|
||||
mathcmd.clear();
|
||||
textcmd.clear();
|
||||
mathsym.clear();
|
||||
}
|
||||
|
||||
// Check master
|
||||
Inset & inset = buffer.inset();
|
||||
InsetIterator it = inset_iterator_begin(inset);
|
||||
InsetIterator const end = inset_iterator_end(inset);
|
||||
|
||||
for (; it != end; ++it)
|
||||
it->initUnicodeMath();
|
||||
|
||||
// Check children
|
||||
BufferList::iterator bit = theBufferList().begin();
|
||||
BufferList::iterator const bend = theBufferList().end();
|
||||
for (; bit != bend; ++bit)
|
||||
if (buffer.isChild(*bit))
|
||||
initUnicodeMath(**bit, false);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -220,7 +220,7 @@ public:
|
||||
/**
|
||||
* Initialize mathcmd, textcmd, and mathsym sets.
|
||||
*/
|
||||
static void initUnicodeMath(Buffer const & buffer);
|
||||
static void initUnicodeMath(Buffer const & buffer, bool clear_sets = true);
|
||||
/**
|
||||
* If \p c cannot be encoded in the given \p encoding, convert
|
||||
* it to something that LaTeX can understand in mathmode.
|
||||
|
Loading…
Reference in New Issue
Block a user