#include "lyxrc.h"
#include "support/lstrings.h"
-extern LyXRC * lyxrc;
+using std::endl;
+using std::pair;
+
extern string DoAccent(string const &, tex_accent);
extern string DoAccent(char, tex_accent);
extern BufferView * current_view;
for (int i = 0; i < l; ++i){
if (str[i] == '\"'
- && text->GetFont(text->cursor.par,
- text->cursor.pos).latex() == LyXFont::OFF)
+ && text->GetFont(current_view->buffer(),text->cursor.par(),
+ text->cursor.pos()).latex() == LyXFont::OFF
+ && text->GetFont(current_view->buffer(),text->cursor.par(),
+ text->cursor.pos()).language()->lang() != "hebrew")
current_view->insertCorrectQuote();
else
- text->InsertChar(str[i]);
+ text->InsertChar(current_view, str[i]);
}
}
-void TransManager::insert(string str, LyXText * text)
+void TransManager::insert(string const & str, LyXText * text)
{
// Go through the character encoding only if the current
// encoding (chset_->name()) matches the current font_norm
// Is false to speak about "only if" the current encoding will
// almost always be equal to font_norm.
pair<bool, int> enc = chset_.encodeString(str);
- if (chset_.getName() != lyxrc->font_norm ||
+ if (chset_.getName() != lyxrc.font_norm ||
!enc.first) {
// Could not find an encoding
InsetLatexAccent ins(str);
if (ins.CanDisplay()) {
- text->InsertInset(new InsetLatexAccent(ins));
+ text->InsertInset(current_view, new InsetLatexAccent(ins));
} else {
insertVerbatim(str, text);
}
KmodInfo i;
i.accent = accent;
i.allowed = lyx_accent_table[accent].native;
- i.data.clear();
+ i.data.erase();
i.exception_list = 0;
string res = trans_fsm_.currentState->deadkey(c, i);