mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-21 23:09:40 +00:00
* Change several freestanding and class methods with first letter
capitalized to have first letter lowercased. * Adjust all affected files. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13605 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
3e19d07e7c
commit
cf4293824f
@ -869,10 +869,10 @@ void BufferView::Pimpl::switchKeyMap()
|
||||
Intl & intl = owner_->getIntl();
|
||||
if (bv_->getLyXText()->real_current_font.isRightToLeft()) {
|
||||
if (intl.keymap == Intl::PRIMARY)
|
||||
intl.KeyMapSec();
|
||||
intl.keyMapSec();
|
||||
} else {
|
||||
if (intl.keymap == Intl::SECONDARY)
|
||||
intl.KeyMapPrim();
|
||||
intl.keyMapPrim();
|
||||
}
|
||||
}
|
||||
|
||||
@ -895,7 +895,7 @@ void BufferView::Pimpl::stuffClipboard(string const & content) const
|
||||
}
|
||||
|
||||
|
||||
void BufferView::Pimpl::MenuInsertLyXFile(string const & filenm)
|
||||
void BufferView::Pimpl::menuInsertLyXFile(string const & filenm)
|
||||
{
|
||||
BOOST_ASSERT(cursor_.inTexted());
|
||||
string filename = filenm;
|
||||
@ -1188,15 +1188,15 @@ bool BufferView::Pimpl::dispatch(FuncRequest const & cmd)
|
||||
break;
|
||||
|
||||
case LFUN_FILE_INSERT:
|
||||
MenuInsertLyXFile(cmd.argument);
|
||||
menuInsertLyXFile(cmd.argument);
|
||||
break;
|
||||
|
||||
case LFUN_FILE_INSERT_ASCII_PARA:
|
||||
InsertAsciiFile(bv_, cmd.argument, true);
|
||||
insertAsciiFile(bv_, cmd.argument, true);
|
||||
break;
|
||||
|
||||
case LFUN_FILE_INSERT_ASCII:
|
||||
InsertAsciiFile(bv_, cmd.argument, false);
|
||||
insertAsciiFile(bv_, cmd.argument, false);
|
||||
break;
|
||||
|
||||
case LFUN_FONT_STATE:
|
||||
@ -1251,7 +1251,7 @@ bool BufferView::Pimpl::dispatch(FuncRequest const & cmd)
|
||||
case LFUN_OUTLINE: {
|
||||
lyx::toc::OutlineOp const op =
|
||||
static_cast<lyx::toc::OutlineOp>(convert<int>(cmd.argument));
|
||||
lyx::toc::Outline(op, buffer_, cursor_.pit());
|
||||
lyx::toc::outline(op, buffer_, cursor_.pit());
|
||||
bv_->text()->setCursor(cursor_, cursor_.pit(), 0);
|
||||
buffer_->markDirty();
|
||||
updateCounters(*buffer_);
|
||||
|
@ -179,7 +179,7 @@ private:
|
||||
///
|
||||
std::vector<Position> saved_positions;
|
||||
///
|
||||
void MenuInsertLyXFile(std::string const & filen);
|
||||
void menuInsertLyXFile(std::string const & filen);
|
||||
/// our workarea
|
||||
WorkArea & workarea() const;
|
||||
/// this is used to handle XSelection events in the right manner
|
||||
|
@ -139,7 +139,7 @@ pasteSelectionHelper(Buffer const & buffer,
|
||||
}
|
||||
|
||||
// Make sure there is no class difference.
|
||||
lyx::cap::SwitchBetweenClasses(textclass, tc, insertion, errorlist);
|
||||
lyx::cap::switchBetweenClasses(textclass, tc, insertion, errorlist);
|
||||
|
||||
ParagraphList::iterator tmpbuf = insertion.begin();
|
||||
int depth_delta = pars[pit].params().depth() - tmpbuf->params().depth();
|
||||
@ -350,7 +350,7 @@ string grabAndEraseSelection(LCursor & cur)
|
||||
}
|
||||
|
||||
|
||||
void SwitchBetweenClasses(textclass_type c1, textclass_type c2,
|
||||
void switchBetweenClasses(textclass_type c1, textclass_type c2,
|
||||
ParagraphList & pars, ErrorList & errorlist)
|
||||
{
|
||||
BOOST_ASSERT(!pars.empty());
|
||||
|
@ -66,7 +66,7 @@ void pasteParagraphList(LCursor & cur, ParagraphList const & parlist,
|
||||
* for a list of paragraphs beginning with the specified par.
|
||||
* It changes layouts and character styles.
|
||||
*/
|
||||
void SwitchBetweenClasses(lyx::textclass_type c1,
|
||||
void switchBetweenClasses(lyx::textclass_type c1,
|
||||
lyx::textclass_type c2,
|
||||
ParagraphList & par,
|
||||
ErrorList &);
|
||||
|
@ -220,8 +220,8 @@ set<string> LaTeXFeatures::getEncodingSet(string const & doc_encoding) const
|
||||
LanguageList::const_iterator it = UsedLanguages_.begin();
|
||||
LanguageList::const_iterator end = UsedLanguages_.end();
|
||||
for (; it != end; ++it)
|
||||
if ((*it)->encoding()->LatexName() != doc_encoding)
|
||||
encodings.insert((*it)->encoding()->LatexName());
|
||||
if ((*it)->encoding()->latexName() != doc_encoding)
|
||||
encodings.insert((*it)->encoding()->latexName());
|
||||
return encodings;
|
||||
}
|
||||
|
||||
|
@ -485,15 +485,15 @@ void expandFormats(MenuItem::Kind kind, Menu & tomenu, LyXView const * view)
|
||||
action = LFUN_IMPORT;
|
||||
break;
|
||||
case MenuItem::ViewFormats:
|
||||
formats = Exporter::GetExportableFormats(*view->buffer(), true);
|
||||
formats = Exporter::getExportableFormats(*view->buffer(), true);
|
||||
action = LFUN_PREVIEW;
|
||||
break;
|
||||
case MenuItem::UpdateFormats:
|
||||
formats = Exporter::GetExportableFormats(*view->buffer(), true);
|
||||
formats = Exporter::getExportableFormats(*view->buffer(), true);
|
||||
action = LFUN_UPDATE;
|
||||
break;
|
||||
default:
|
||||
formats = Exporter::GetExportableFormats(*view->buffer(), false);
|
||||
formats = Exporter::getExportableFormats(*view->buffer(), false);
|
||||
action = LFUN_EXPORT;
|
||||
}
|
||||
sort(formats.begin(), formats.end(), compare_format());
|
||||
|
@ -1055,7 +1055,7 @@ void Buffer::makeDocBookFile(string const & fname,
|
||||
if (!only_body) {
|
||||
if (runparams.flavor == OutputParams::XML)
|
||||
ofs << "<?xml version=\"1.0\" encoding=\""
|
||||
<< params().language->encoding()->Name() << "\"?>\n";
|
||||
<< params().language->encoding()->name() << "\"?>\n";
|
||||
|
||||
ofs << "<!DOCTYPE " << top_element << " ";
|
||||
|
||||
|
@ -237,7 +237,7 @@ void bufferErrors(Buffer const & buf, ErrorList const & el)
|
||||
}
|
||||
|
||||
|
||||
string const BufferFormat(Buffer const & buffer)
|
||||
string const bufferFormat(Buffer const & buffer)
|
||||
{
|
||||
if (buffer.isLinuxDoc())
|
||||
return "linuxdoc";
|
||||
|
@ -36,7 +36,7 @@ Buffer * newFile(std::string const & filename, std::string const & templatename,
|
||||
bool isNamed = false);
|
||||
|
||||
///return the format of the buffer on a string
|
||||
std::string const BufferFormat(Buffer const & buffer);
|
||||
std::string const bufferFormat(Buffer const & buffer);
|
||||
///
|
||||
void bufferErrors(Buffer const &, TeXErrors const &);
|
||||
///
|
||||
|
@ -90,9 +90,9 @@ bool BufferList::quitWriteBuffer(Buffer * buf)
|
||||
bool succeeded;
|
||||
|
||||
if (buf->isUnnamed())
|
||||
succeeded = WriteAs(buf);
|
||||
succeeded = writeAs(buf);
|
||||
else
|
||||
succeeded = MenuWrite(buf);
|
||||
succeeded = menuWrite(buf);
|
||||
|
||||
if (!succeeded)
|
||||
return false;
|
||||
@ -184,7 +184,7 @@ bool BufferList::close(Buffer * buf, bool const ask)
|
||||
|
||||
if (ret == 0) {
|
||||
if (buf->isUnnamed()) {
|
||||
if (!WriteAs(buf))
|
||||
if (!writeAs(buf))
|
||||
return false;
|
||||
} else if (buf->save()) {
|
||||
LyX::ref().session().addLastFile(buf->fileName());
|
||||
|
@ -283,7 +283,7 @@ BufferParams::BufferParams()
|
||||
// true in the returned pair, then `second' is the textclass
|
||||
// number; if it is false, second is 0. In both cases, second
|
||||
// is what we want.
|
||||
textclass(textclasslist.NumberOfClass("article").second),
|
||||
textclass(textclasslist.numberOfClass("article").second),
|
||||
pimpl_(new Impl)
|
||||
{
|
||||
paragraph_separation = PARSEP_INDENT;
|
||||
@ -402,7 +402,7 @@ string const BufferParams::readToken(LyXLex & lex, string const & token)
|
||||
lex.next();
|
||||
string const classname = lex.getString();
|
||||
pair<bool, lyx::textclass_type> pp =
|
||||
textclasslist.NumberOfClass(classname);
|
||||
textclasslist.numberOfClass(classname);
|
||||
if (pp.first) {
|
||||
textclass = pp.second;
|
||||
} else {
|
||||
@ -796,7 +796,7 @@ bool BufferParams::writeLaTeX(ostream & os, LaTeXFeatures & features,
|
||||
|
||||
if (inputenc == "auto") {
|
||||
string const doc_encoding =
|
||||
language->encoding()->LatexName();
|
||||
language->encoding()->latexName();
|
||||
|
||||
// Create a list with all the input encodings used
|
||||
// in the document
|
||||
|
@ -23,7 +23,6 @@ class Paragraph;
|
||||
class Row;
|
||||
|
||||
|
||||
|
||||
// only needed for gcc 2.95, remove when support terminated
|
||||
template <typename A, typename B>
|
||||
bool ptr_cmp(A const * a, B const * b)
|
||||
|
@ -248,7 +248,7 @@ unsigned char const arabic_start = 0xc1;
|
||||
} // namespace anon
|
||||
|
||||
|
||||
bool Encodings::IsComposeChar_hebrew(unsigned char c)
|
||||
bool Encodings::isComposeChar_hebrew(unsigned char c)
|
||||
{
|
||||
return c <= 0xd2 && c >= 0xc0 &&
|
||||
c != 0xce && c != 0xd0;
|
||||
@ -268,7 +268,7 @@ bool Encodings::is_arabic_special(unsigned char c)
|
||||
c == 0xe9;
|
||||
}
|
||||
|
||||
bool Encodings::IsComposeChar_arabic(unsigned char c)
|
||||
bool Encodings::isComposeChar_arabic(unsigned char c)
|
||||
{
|
||||
return c >= 0xeb && c <= 0xf2;
|
||||
}
|
||||
@ -280,7 +280,7 @@ bool Encodings::is_arabic(unsigned char c)
|
||||
}
|
||||
|
||||
|
||||
unsigned char Encodings::TransformChar(unsigned char c,
|
||||
unsigned char Encodings::transformChar(unsigned char c,
|
||||
Encodings::Letter_Form form)
|
||||
{
|
||||
if (!is_arabic(c))
|
||||
|
@ -32,11 +32,11 @@ public:
|
||||
encoding_table[i] = e[i];
|
||||
}
|
||||
///
|
||||
std::string const & Name() const {
|
||||
std::string const & name() const {
|
||||
return Name_;
|
||||
}
|
||||
///
|
||||
std::string const & LatexName() const {
|
||||
std::string const & latexName() const {
|
||||
return LatexName_;
|
||||
}
|
||||
///
|
||||
@ -82,10 +82,10 @@ public:
|
||||
};
|
||||
///
|
||||
static
|
||||
bool IsComposeChar_hebrew(unsigned char c);
|
||||
bool isComposeChar_hebrew(unsigned char c);
|
||||
///
|
||||
static
|
||||
bool IsComposeChar_arabic(unsigned char c);
|
||||
bool isComposeChar_arabic(unsigned char c);
|
||||
///
|
||||
static
|
||||
bool is_arabic_special(unsigned char c);
|
||||
@ -94,7 +94,7 @@ public:
|
||||
bool is_arabic(unsigned char c);
|
||||
///
|
||||
static
|
||||
unsigned char TransformChar(unsigned char c, Letter_Form form);
|
||||
unsigned char transformChar(unsigned char c, Letter_Form form);
|
||||
|
||||
private:
|
||||
///
|
||||
|
@ -59,7 +59,7 @@ vector<string> const Backends(Buffer const & buffer)
|
||||
{
|
||||
vector<string> v;
|
||||
if (buffer.params().getLyXTextClass().isTeXClassAvailable()) {
|
||||
v.push_back(BufferFormat(buffer));
|
||||
v.push_back(bufferFormat(buffer));
|
||||
// FIXME: Don't hardcode format names here, but use a flag
|
||||
if (v.back() == "latex")
|
||||
v.push_back("pdflatex");
|
||||
@ -267,7 +267,7 @@ bool Exporter::Export(Buffer * buffer, string const & format,
|
||||
}
|
||||
|
||||
|
||||
bool Exporter::Preview(Buffer * buffer, string const & format)
|
||||
bool Exporter::preview(Buffer * buffer, string const & format)
|
||||
{
|
||||
string result_file;
|
||||
if (!Export(buffer, format, true, result_file))
|
||||
@ -276,7 +276,7 @@ bool Exporter::Preview(Buffer * buffer, string const & format)
|
||||
}
|
||||
|
||||
|
||||
bool Exporter::IsExportable(Buffer const & buffer, string const & format)
|
||||
bool Exporter::isExportable(Buffer const & buffer, string const & format)
|
||||
{
|
||||
vector<string> backends = Backends(buffer);
|
||||
for (vector<string>::const_iterator it = backends.begin();
|
||||
@ -288,7 +288,7 @@ bool Exporter::IsExportable(Buffer const & buffer, string const & format)
|
||||
|
||||
|
||||
vector<Format const *> const
|
||||
Exporter::GetExportableFormats(Buffer const & buffer, bool only_viewable)
|
||||
Exporter::getExportableFormats(Buffer const & buffer, bool only_viewable)
|
||||
{
|
||||
vector<string> backends = Backends(buffer);
|
||||
vector<Format const *> result =
|
||||
|
@ -33,14 +33,14 @@ public:
|
||||
bool put_in_tempdir);
|
||||
///
|
||||
static
|
||||
bool Preview(Buffer * buffer, std::string const & format);
|
||||
bool preview(Buffer * buffer, std::string const & format);
|
||||
///
|
||||
static
|
||||
bool IsExportable(Buffer const & buffer, std::string const & format);
|
||||
bool isExportable(Buffer const & buffer, std::string const & format);
|
||||
///
|
||||
static
|
||||
std::vector<Format const *> const
|
||||
GetExportableFormats(Buffer const & buffer, bool only_viewable);
|
||||
getExportableFormats(Buffer const & buffer, bool only_viewable);
|
||||
///
|
||||
};
|
||||
|
||||
|
@ -86,7 +86,7 @@ void LyXView::init()
|
||||
autosave_timeout_->start();
|
||||
}
|
||||
|
||||
intl_->InitKeyMapper(lyxrc.use_kbmap);
|
||||
intl_->initKeyMapper(lyxrc.use_kbmap);
|
||||
}
|
||||
|
||||
|
||||
@ -132,7 +132,7 @@ void LyXView::autoSave()
|
||||
lyxerr[Debug::INFO] << "Running autoSave()" << endl;
|
||||
|
||||
if (view()->available()) {
|
||||
::AutoSave(view().get());
|
||||
::autoSave(view().get());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -203,7 +203,7 @@ void GPainter::image(int x, int y, int w, int h,
|
||||
|
||||
Glib::RefPtr<Gdk::GC> gc = gc_;
|
||||
pixmap->draw_pixbuf (gc, pixbuf, 0, 0, x, y, w, h,
|
||||
Gdk::RGB_DITHER_NONE, 0, 0);
|
||||
Gdk::RGB_DITHER_NONE, 0, 0);
|
||||
}
|
||||
|
||||
|
||||
@ -215,7 +215,7 @@ inline XftFont * getXftFont(LyXFont const & f)
|
||||
|
||||
|
||||
// ENCODING: we assume we've got 8-bit string in whatever format Xft
|
||||
// wants. We should be finding out what the backend's giving us and
|
||||
// wants. We should be finding out what the backend's giving us and
|
||||
// then converting it before feeding it to Xft using XftDrawStringUtf8
|
||||
void GPainter::text(int x, int y, char const * s, size_t ls, LyXFont const & f)
|
||||
{
|
||||
|
@ -90,7 +90,7 @@ void GTabular::doBuild()
|
||||
sigc::mem_fun(*this, >abular::updateSpecialRowsSensitivity));
|
||||
|
||||
xml_->get_widget("PageBreak", pagebreakcheck_);
|
||||
|
||||
|
||||
xml_->get_widget("SpecialRows", specialrowstable_);
|
||||
|
||||
xml_->get_widget("HeaderOn",headeroncheck_);
|
||||
@ -188,7 +188,7 @@ void GTabular::update()
|
||||
}
|
||||
|
||||
updateHorzAlignCombo(!multicol && !pwidth.zero());
|
||||
|
||||
|
||||
int halign = tabular.getAlignment(cell);
|
||||
if (halign == LYX_ALIGN_RIGHT)
|
||||
horzaligncombo_->set_active(2);
|
||||
@ -299,9 +299,9 @@ void GTabular::update()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
updating_ = false;
|
||||
|
||||
|
||||
updateSensitivity();
|
||||
updateSpecialRowsSensitivity();
|
||||
}
|
||||
@ -335,7 +335,7 @@ void GTabular::updateSensitivity()
|
||||
bool const multicol = multicolcheck_->get_active();
|
||||
|
||||
widthlength_->set_sensitive(specifywidth);
|
||||
vertaligncombo_->set_sensitive(specifywidth);
|
||||
vertaligncombo_->set_sensitive(specifywidth);
|
||||
|
||||
updateHorzAlignCombo(!multicol && specifywidth);
|
||||
}
|
||||
@ -379,7 +379,7 @@ void GTabular::updateSpecialRowsSensitivity()
|
||||
headerlowerborderdoublecheck_->set_sensitive(header);
|
||||
footerupperborderdoublecheck_->set_sensitive(footer);
|
||||
footerlowerborderdoublecheck_->set_sensitive(footer);
|
||||
|
||||
|
||||
firstheaderoncheck_->set_sensitive(!firstheaderempty);
|
||||
firstheaderupperborderdoublecheck_->set_sensitive(firstheaderempty || firstheader);
|
||||
firstheaderlowerborderdoublecheck_->set_sensitive(firstheaderempty || firstheader);
|
||||
|
@ -159,7 +159,7 @@ void LyXScreen::showCursor(BufferView & bv)
|
||||
bool const samelang = realfont.language() == bp.language;
|
||||
bool const isrtl = realfont.isVisibleRightToLeft();
|
||||
|
||||
if (!samelang || isrtl != bp.language->RightToLeft()) {
|
||||
if (!samelang || isrtl != bp.language->rightToLeft()) {
|
||||
shape = L_SHAPE;
|
||||
if (isrtl)
|
||||
shape = REVERSED_L_SHAPE;
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include "format.h"
|
||||
#include "frontends/LyXView.h"
|
||||
#include "funcrequest.h"
|
||||
#include "lyx_cb.h"
|
||||
|
||||
#include "bufferlist.h"
|
||||
#include "support/filetools.h"
|
||||
@ -34,7 +35,6 @@ using std::vector;
|
||||
|
||||
|
||||
extern BufferList bufferlist;
|
||||
extern void InsertAsciiFile(BufferView *, string const &, bool);
|
||||
|
||||
|
||||
bool Importer::Import(LyXView * lv, string const & filename,
|
||||
@ -76,7 +76,7 @@ bool Importer::Import(LyXView * lv, string const & filename,
|
||||
string filename2 = (loader_format == format) ? filename
|
||||
: changeExtension(filename,
|
||||
formats.extension(loader_format));
|
||||
InsertAsciiFile(lv->view().get(), filename2, as_paragraphs);
|
||||
insertAsciiFile(lv->view().get(), filename2, as_paragraphs);
|
||||
lv->dispatch(FuncRequest(LFUN_MARK_OFF));
|
||||
}
|
||||
|
||||
|
@ -1811,7 +1811,7 @@ bool InsetTabular::isRightToLeft(LCursor & cur) const
|
||||
Paragraph const & parentpar = cur[cur.depth() - 2].paragraph();
|
||||
LCursor::pos_type const parentpos = cur[cur.depth() - 2].pos();
|
||||
return parentpar.getFontSettings(cur.bv().buffer()->params(),
|
||||
parentpos).language()->RightToLeft();
|
||||
parentpos).language()->rightToLeft();
|
||||
}
|
||||
|
||||
|
||||
|
38
src/intl.C
38
src/intl.C
@ -28,52 +28,52 @@ Intl::Intl()
|
||||
}
|
||||
|
||||
|
||||
void Intl::KeyMapOn(bool on)
|
||||
void Intl::keyMapOn(bool on)
|
||||
{
|
||||
keymapon = on;
|
||||
|
||||
if (on) {
|
||||
if (keymap == PRIMARY)
|
||||
KeyMapPrim();
|
||||
keyMapPrim();
|
||||
else
|
||||
KeyMapSec();
|
||||
keyMapSec();
|
||||
} else
|
||||
trans.DisableKeymap();
|
||||
trans.disableKeymap();
|
||||
}
|
||||
|
||||
|
||||
void Intl::ToggleKeyMap()
|
||||
void Intl::toggleKeyMap()
|
||||
{
|
||||
if (keymapon && (keymap == PRIMARY)) {
|
||||
KeyMapSec();
|
||||
keyMapSec();
|
||||
} else if (keymapon) {
|
||||
KeyMapOn(false);
|
||||
keyMapOn(false);
|
||||
} else
|
||||
KeyMapPrim();
|
||||
keyMapPrim();
|
||||
}
|
||||
|
||||
|
||||
void Intl::KeyMapPrim()
|
||||
void Intl::keyMapPrim()
|
||||
{
|
||||
if (!trans.SetPrimary(prim_lang))
|
||||
trans.EnablePrimary();
|
||||
if (!trans.setPrimary(prim_lang))
|
||||
trans.enablePrimary();
|
||||
|
||||
keymapon = true;
|
||||
keymap = PRIMARY;
|
||||
}
|
||||
|
||||
|
||||
void Intl::KeyMapSec()
|
||||
void Intl::keyMapSec()
|
||||
{
|
||||
if (!trans.SetSecondary(sec_lang))
|
||||
trans.EnableSecondary();
|
||||
if (!trans.setSecondary(sec_lang))
|
||||
trans.enableSecondary();
|
||||
|
||||
keymapon = true;
|
||||
keymap = SECONDARY;
|
||||
}
|
||||
|
||||
|
||||
void Intl::InitKeyMapper(bool on)
|
||||
void Intl::initKeyMapper(bool on)
|
||||
{
|
||||
lyxerr[Debug::INIT] << "Initializing key mappings..." << endl;
|
||||
|
||||
@ -82,12 +82,12 @@ void Intl::InitKeyMapper(bool on)
|
||||
else
|
||||
keymapon = on;
|
||||
|
||||
KeyMapOn(keymapon);
|
||||
keyMapOn(keymapon);
|
||||
|
||||
if (keymapon)
|
||||
KeyMapPrim();
|
||||
keyMapPrim();
|
||||
|
||||
trans.SetPrimary(prim_lang);
|
||||
trans.SetSecondary(sec_lang);
|
||||
trans.setPrimary(prim_lang);
|
||||
trans.setSecondary(sec_lang);
|
||||
trans.setCharset(lyxrc.font_norm);
|
||||
}
|
||||
|
10
src/intl.h
10
src/intl.h
@ -33,19 +33,19 @@ public:
|
||||
Intl();
|
||||
|
||||
/// {en/dis}able the keymap
|
||||
void KeyMapOn(bool on);
|
||||
void keyMapOn(bool on);
|
||||
|
||||
/// set the primary language keymap
|
||||
void KeyMapPrim();
|
||||
void keyMapPrim();
|
||||
|
||||
/// set the secondary language keymap
|
||||
void KeyMapSec();
|
||||
void keyMapSec();
|
||||
|
||||
/// turn on/off key mappings, status in keymapon
|
||||
void ToggleKeyMap();
|
||||
void toggleKeyMap();
|
||||
|
||||
/// initialize key mapper
|
||||
void InitKeyMapper(bool on);
|
||||
void initKeyMapper(bool on);
|
||||
|
||||
// Get the Translation Manager
|
||||
TransManager & getTransManager();
|
||||
|
@ -158,7 +158,7 @@ int LaunchIspell::generateChild()
|
||||
if (lyxrc.isp_use_input_encoding &&
|
||||
params.inputenc != "default") {
|
||||
string enc = (params.inputenc == "auto")
|
||||
? params.language->encoding()->LatexName()
|
||||
? params.language->encoding()->latexName()
|
||||
: params.inputenc;
|
||||
string::size_type n = enc.length();
|
||||
tmp = new char[3];
|
||||
|
@ -40,7 +40,7 @@ public:
|
||||
///
|
||||
std::string const & display() const { return display_; }
|
||||
///
|
||||
bool RightToLeft() const { return rightToLeft_; }
|
||||
bool rightToLeft() const { return rightToLeft_; }
|
||||
///
|
||||
Encoding const * encoding() const { return encoding_; }
|
||||
///
|
||||
|
18
src/lyx_cb.C
18
src/lyx_cb.C
@ -98,7 +98,7 @@ bool quitting; // flag, that we are quitting the program
|
||||
// Menu callbacks
|
||||
//
|
||||
|
||||
bool MenuWrite(Buffer * buffer)
|
||||
bool menuWrite(Buffer * buffer)
|
||||
{
|
||||
if (buffer->save()) {
|
||||
LyX::ref().session().addLastFile(buffer->fileName());
|
||||
@ -115,13 +115,13 @@ bool MenuWrite(Buffer * buffer)
|
||||
text, 0, 1, _("&Rename"), _("&Cancel"));
|
||||
|
||||
if (ret == 0)
|
||||
return WriteAs(buffer);
|
||||
return writeAs(buffer);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool WriteAs(Buffer * buffer, string const & filename)
|
||||
bool writeAs(Buffer * buffer, string const & filename)
|
||||
{
|
||||
string fname = buffer->fileName();
|
||||
string const oldname = fname;
|
||||
@ -177,7 +177,7 @@ bool WriteAs(Buffer * buffer, string const & filename)
|
||||
bool unnamed = buffer->isUnnamed();
|
||||
buffer->setUnnamed(false);
|
||||
|
||||
if (!MenuWrite(buffer)) {
|
||||
if (!menuWrite(buffer)) {
|
||||
buffer->setFileName(oldname);
|
||||
buffer->setUnnamed(unnamed);
|
||||
return false;
|
||||
@ -188,7 +188,7 @@ bool WriteAs(Buffer * buffer, string const & filename)
|
||||
}
|
||||
|
||||
|
||||
void QuitLyX(bool noask)
|
||||
void quitLyX(bool noask)
|
||||
{
|
||||
lyxerr[Debug::INFO] << "Running QuitLyX." << endl;
|
||||
|
||||
@ -297,7 +297,7 @@ int AutoSaveBuffer::generateChild()
|
||||
} // namespace anon
|
||||
|
||||
|
||||
void AutoSave(BufferView * bv)
|
||||
void autoSave(BufferView * bv)
|
||||
// should probably be moved into BufferList (Lgb)
|
||||
// Perfect target for a thread...
|
||||
{
|
||||
@ -333,7 +333,7 @@ void AutoSave(BufferView * bv)
|
||||
// create new file with template
|
||||
// SERVERCMD !
|
||||
//
|
||||
void NewFile(BufferView * bv, string const & filename)
|
||||
void newFile(BufferView * bv, string const & filename)
|
||||
{
|
||||
// Split argument by :
|
||||
string name;
|
||||
@ -356,7 +356,7 @@ void NewFile(BufferView * bv, string const & filename)
|
||||
|
||||
|
||||
// Insert ascii file (if filename is empty, prompt for one)
|
||||
void InsertAsciiFile(BufferView * bv, string const & f, bool asParagraph)
|
||||
void insertAsciiFile(BufferView * bv, string const & f, bool asParagraph)
|
||||
{
|
||||
if (!bv->available())
|
||||
return;
|
||||
@ -440,7 +440,7 @@ string getContentsOfAsciiFile(BufferView * bv, string const & f, bool asParagrap
|
||||
|
||||
// This function runs "configure" and then rereads lyx.defaults to
|
||||
// reconfigure the automatic settings.
|
||||
void Reconfigure(BufferView * bv)
|
||||
void reconfigure(BufferView * bv)
|
||||
{
|
||||
bv->owner()->message(_("Running configure..."));
|
||||
|
||||
|
14
src/lyx_cb.h
14
src/lyx_cb.h
@ -21,19 +21,19 @@ class BufferView;
|
||||
extern bool quitting;
|
||||
|
||||
///
|
||||
bool MenuWrite(Buffer * buffer);
|
||||
bool menuWrite(Buffer * buffer);
|
||||
/// write the given file, or ask if no name given
|
||||
bool WriteAs(Buffer * buffer, std::string const & filename = std::string());
|
||||
bool writeAs(Buffer * buffer, std::string const & filename = std::string());
|
||||
///
|
||||
void QuitLyX(bool noask);
|
||||
void quitLyX(bool noask);
|
||||
///
|
||||
void AutoSave(BufferView * bv);
|
||||
void autoSave(BufferView * bv);
|
||||
///
|
||||
void NewFile(BufferView * bv, std::string const & filename);
|
||||
void newFile(BufferView * bv, std::string const & filename);
|
||||
///
|
||||
void InsertAsciiFile(BufferView * bv, std::string const & f, bool asParagraph);
|
||||
void insertAsciiFile(BufferView * bv, std::string const & f, bool asParagraph);
|
||||
///
|
||||
std::string getContentsOfAsciiFile(BufferView * bv, std::string const & f, bool asParagraph);
|
||||
///
|
||||
void Reconfigure(BufferView * bv);
|
||||
void reconfigure(BufferView * bv);
|
||||
#endif
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include "language.h"
|
||||
#include "session.h"
|
||||
#include "LColor.h"
|
||||
#include "lyx_cb.h"
|
||||
#include "lyxfunc.h"
|
||||
#include "lyxlex.h"
|
||||
#include "lyxrc.h"
|
||||
@ -87,8 +88,6 @@ using std::system;
|
||||
#endif
|
||||
|
||||
|
||||
extern void QuitLyX(bool);
|
||||
|
||||
extern LyXServer * lyxserver;
|
||||
|
||||
// This is the global bufferlist object
|
||||
@ -277,7 +276,7 @@ void LyX::priv_exec(int & argc, char * argv[])
|
||||
if (last_loaded) {
|
||||
bool success = false;
|
||||
if (last_loaded->dispatch(batch_command, &success)) {
|
||||
QuitLyX(false);
|
||||
quitLyX(false);
|
||||
exit(!success);
|
||||
}
|
||||
}
|
||||
@ -288,7 +287,7 @@ void LyX::priv_exec(int & argc, char * argv[])
|
||||
lyx_gui::start(batch_command, files);
|
||||
else {
|
||||
// Something went wrong above
|
||||
QuitLyX(false);
|
||||
quitLyX(false);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
@ -206,13 +206,13 @@ LColor_color LyXFont::color() const
|
||||
|
||||
bool LyXFont::isRightToLeft() const
|
||||
{
|
||||
return lang->RightToLeft();
|
||||
return lang->rightToLeft();
|
||||
}
|
||||
|
||||
|
||||
bool LyXFont::isVisibleRightToLeft() const
|
||||
{
|
||||
return (lang->RightToLeft() &&
|
||||
return (lang->rightToLeft() &&
|
||||
number() != ON);
|
||||
}
|
||||
|
||||
|
@ -247,7 +247,7 @@ void LyXFunc::processKeySym(LyXKeySymPtr keysym, key_modifier::state state)
|
||||
|
||||
Encoding const * encoding = view()->cursor().getEncoding();
|
||||
|
||||
encoded_last_key = keysym->getISOEncoded(encoding ? encoding->Name() : "");
|
||||
encoded_last_key = keysym->getISOEncoded(encoding ? encoding->name() : "");
|
||||
|
||||
// Do a one-deep top-level lookup for
|
||||
// cancel and meta-fake keys. RVDK_PATCH_5
|
||||
@ -413,7 +413,7 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const
|
||||
|
||||
case LFUN_EXPORT:
|
||||
enable = cmd.argument == "custom"
|
||||
|| Exporter::IsExportable(*buf, cmd.argument);
|
||||
|| Exporter::isExportable(*buf, cmd.argument);
|
||||
break;
|
||||
|
||||
case LFUN_RUNCHKTEX:
|
||||
@ -421,7 +421,7 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const
|
||||
break;
|
||||
|
||||
case LFUN_BUILDPROG:
|
||||
enable = Exporter::IsExportable(*buf, "program");
|
||||
enable = Exporter::isExportable(*buf, "program");
|
||||
break;
|
||||
|
||||
case LFUN_LAYOUT_TABULAR:
|
||||
@ -510,7 +510,7 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const
|
||||
|| name == "prefs"
|
||||
|| name == "texinfo";
|
||||
else if (name == "print")
|
||||
enable = Exporter::IsExportable(*buf, "dvi")
|
||||
enable = Exporter::isExportable(*buf, "dvi")
|
||||
&& lyxrc.print_command != "none";
|
||||
else if (name == "character" || name == "mathpanel")
|
||||
enable = cur.inset().lyxCode() != InsetBase::ERT_CODE;
|
||||
@ -682,7 +682,7 @@ void showPrintError(string const & name)
|
||||
void loadTextclass(string const & name)
|
||||
{
|
||||
std::pair<bool, lyx::textclass_type> const tc_pair =
|
||||
textclasslist.NumberOfClass(name);
|
||||
textclasslist.numberOfClass(name);
|
||||
|
||||
if (!tc_pair.first) {
|
||||
lyxerr << "Document class \"" << name
|
||||
@ -808,14 +808,14 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
|
||||
string const str = bformat(_("Saving document %1$s..."),
|
||||
makeDisplayPath(owner->buffer()->fileName()));
|
||||
owner->message(str);
|
||||
MenuWrite(owner->buffer());
|
||||
menuWrite(owner->buffer());
|
||||
owner->message(str + _(" done."));
|
||||
} else
|
||||
WriteAs(owner->buffer());
|
||||
writeAs(owner->buffer());
|
||||
break;
|
||||
|
||||
case LFUN_WRITEAS:
|
||||
WriteAs(owner->buffer(), argument);
|
||||
writeAs(owner->buffer(), argument);
|
||||
break;
|
||||
|
||||
case LFUN_MENURELOAD: {
|
||||
@ -832,12 +832,12 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
|
||||
|
||||
case LFUN_UPDATE:
|
||||
Exporter::Export(owner->buffer(), argument, true);
|
||||
view()->showErrorList(BufferFormat(*owner->buffer()));
|
||||
view()->showErrorList(bufferFormat(*owner->buffer()));
|
||||
break;
|
||||
|
||||
case LFUN_PREVIEW:
|
||||
Exporter::Preview(owner->buffer(), argument);
|
||||
view()->showErrorList(BufferFormat(*owner->buffer()));
|
||||
Exporter::preview(owner->buffer(), argument);
|
||||
view()->showErrorList(bufferFormat(*owner->buffer()));
|
||||
break;
|
||||
|
||||
case LFUN_BUILDPROG:
|
||||
@ -855,7 +855,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
|
||||
owner->getDialogs().show("sendto");
|
||||
else {
|
||||
Exporter::Export(owner->buffer(), argument, false);
|
||||
view()->showErrorList(BufferFormat(*owner->buffer()));
|
||||
view()->showErrorList(bufferFormat(*owner->buffer()));
|
||||
}
|
||||
break;
|
||||
|
||||
@ -1007,7 +1007,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
|
||||
// save bookmarks to .lyx/session
|
||||
view()->saveSavedPositions();
|
||||
}
|
||||
QuitLyX(argument == "force");
|
||||
quitLyX(argument == "force");
|
||||
break;
|
||||
|
||||
case LFUN_TOCVIEW: {
|
||||
@ -1018,11 +1018,11 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
|
||||
}
|
||||
|
||||
case LFUN_AUTOSAVE:
|
||||
AutoSave(view());
|
||||
autoSave(view());
|
||||
break;
|
||||
|
||||
case LFUN_RECONFIGURE:
|
||||
Reconfigure(view());
|
||||
reconfigure(view());
|
||||
break;
|
||||
|
||||
case LFUN_HELP_OPEN: {
|
||||
@ -1097,7 +1097,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
|
||||
break;
|
||||
|
||||
case LFUN_FILE_NEW:
|
||||
NewFile(view(), argument);
|
||||
newFile(view(), argument);
|
||||
break;
|
||||
|
||||
case LFUN_FILE_OPEN:
|
||||
@ -1313,19 +1313,19 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
|
||||
break;
|
||||
|
||||
case LFUN_KMAP_OFF:
|
||||
owner->getIntl().KeyMapOn(false);
|
||||
owner->getIntl().keyMapOn(false);
|
||||
break;
|
||||
|
||||
case LFUN_KMAP_PRIM:
|
||||
owner->getIntl().KeyMapPrim();
|
||||
owner->getIntl().keyMapPrim();
|
||||
break;
|
||||
|
||||
case LFUN_KMAP_SEC:
|
||||
owner->getIntl().KeyMapSec();
|
||||
owner->getIntl().keyMapSec();
|
||||
break;
|
||||
|
||||
case LFUN_KMAP_TOGGLE:
|
||||
owner->getIntl().ToggleKeyMap();
|
||||
owner->getIntl().toggleKeyMap();
|
||||
break;
|
||||
|
||||
case LFUN_REPEAT: {
|
||||
@ -1469,7 +1469,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
|
||||
if (!newL || oldL == newL)
|
||||
break;
|
||||
|
||||
if (oldL->RightToLeft() == newL->RightToLeft()
|
||||
if (oldL->rightToLeft() == newL->rightToLeft()
|
||||
&& !buffer.isMultiLingual())
|
||||
buffer.changeLanguage(oldL, newL);
|
||||
else
|
||||
@ -1543,7 +1543,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
|
||||
loadTextclass(argument);
|
||||
|
||||
std::pair<bool, lyx::textclass_type> const tc_pair =
|
||||
textclasslist.NumberOfClass(argument);
|
||||
textclasslist.numberOfClass(argument);
|
||||
|
||||
if (!tc_pair.first)
|
||||
break;
|
||||
@ -1558,7 +1558,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
|
||||
buffer->params().textclass = new_class;
|
||||
StableDocIterator backcur(view()->cursor());
|
||||
ErrorList el;
|
||||
lyx::cap::SwitchBetweenClasses(
|
||||
lyx::cap::switchBetweenClasses(
|
||||
old_class, new_class,
|
||||
buffer->paragraphs(), el);
|
||||
|
||||
|
@ -129,7 +129,7 @@ LyXLayout::LyXLayout ()
|
||||
|
||||
|
||||
// Reads a layout definition from file
|
||||
bool LyXLayout::Read(LyXLex & lexrc, LyXTextClass const & tclass)
|
||||
bool LyXLayout::read(LyXLex & lexrc, LyXTextClass const & tclass)
|
||||
{
|
||||
// This table is sorted alphabetically [asierra 30March96]
|
||||
keyword_item layoutTags[] = {
|
||||
|
@ -29,7 +29,7 @@ public:
|
||||
///
|
||||
LyXLayout();
|
||||
///
|
||||
bool Read(LyXLex &, LyXTextClass const &);
|
||||
bool read(LyXLex &, LyXTextClass const &);
|
||||
///
|
||||
void readAlign(LyXLex &);
|
||||
///
|
||||
|
@ -192,7 +192,7 @@ int LyXComm::startPipe(string const & filename, bool write)
|
||||
}
|
||||
|
||||
if (rc != NO_ERROR) {
|
||||
errnum = TranslateOS2Error(rc);
|
||||
errnum = translateOS2Error(rc);
|
||||
lyxerr <<"LyXComm: Could not create pipe " << filename
|
||||
<< strerror(errnum) << endl;
|
||||
return -1;
|
||||
@ -200,7 +200,7 @@ int LyXComm::startPipe(string const & filename, bool write)
|
||||
// Listen to it.
|
||||
rc = DosConnectNPipe(os2fd);
|
||||
if (rc != NO_ERROR && rc != ERROR_PIPE_NOT_CONNECTED) {
|
||||
errnum = TranslateOS2Error(rc);
|
||||
errnum = translateOS2Error(rc);
|
||||
lyxerr <<"LyXComm: Could not create pipe " << filename
|
||||
<< strerror(errnum) << endl;
|
||||
return -1;
|
||||
@ -256,7 +256,7 @@ void LyXComm::endPipe(int & fd, string const & filename, bool write)
|
||||
|
||||
rc = DosDisConnectNPipe(fd);
|
||||
if (rc != NO_ERROR) {
|
||||
errnum = TranslateOS2Error(rc);
|
||||
errnum = translateOS2Error(rc);
|
||||
lyxerr << "LyXComm: Could not disconnect pipe " << filename
|
||||
<< '\n' << strerror(errnum) << endl;
|
||||
return;
|
||||
@ -374,7 +374,7 @@ void LyXComm::send(string const & msg)
|
||||
int errnum;
|
||||
rc = DosResetBuffer(outfd); // To avoid synchronization problems.
|
||||
if (rc != NO_ERROR) {
|
||||
errnum = TranslateOS2Error(rc);
|
||||
errnum = translateOS2Error(rc);
|
||||
lyxerr << "LyXComm: Message could not be flushed: " << msg
|
||||
<< '\n' << strerror(errnum) << endl;
|
||||
}
|
||||
|
@ -220,8 +220,8 @@ public:
|
||||
bool cursorTop(LCursor & cur);
|
||||
///
|
||||
bool cursorBottom(LCursor & cur);
|
||||
/// Delete character at cursor. Honour change tracking
|
||||
bool Delete(LCursor & cur);
|
||||
/// Erase character at cursor. Honour change tracking
|
||||
bool erase(LCursor & cur);
|
||||
/** At cursor position 0, merge paragraph with the one before it.
|
||||
* Ignore CT (this is used in \c acceptChange, \c rejectChange for
|
||||
* physical deletion of paragraph break)
|
||||
|
@ -120,7 +120,7 @@ bool LyXTextClass::isTeXClassAvailable() const
|
||||
bool LyXTextClass::do_readStyle(LyXLex & lexrc, LyXLayout & lay)
|
||||
{
|
||||
lyxerr[Debug::TCLASS] << "Reading style " << lay.name() << endl;
|
||||
if (!lay.Read(lexrc, *this)) {
|
||||
if (!lay.read(lexrc, *this)) {
|
||||
// Resolve fonts
|
||||
lay.resfont = lay.font;
|
||||
lay.resfont.realize(defaultfont());
|
||||
@ -165,7 +165,7 @@ enum TextClassTags {
|
||||
|
||||
|
||||
// Reads a textclass structure from file.
|
||||
bool LyXTextClass::Read(string const & filename, bool merge)
|
||||
bool LyXTextClass::read(string const & filename, bool merge)
|
||||
{
|
||||
if (!lyx::support::isFileReadable(filename)) {
|
||||
lyxerr << "Cannot read layout file `" << filename << "'."
|
||||
@ -255,7 +255,7 @@ bool LyXTextClass::Read(string const & filename, bool merge)
|
||||
lexrc.getString(),
|
||||
"layout");
|
||||
|
||||
if (Read(tmp, true)) {
|
||||
if (read(tmp, true)) {
|
||||
lexrc.printError("Error reading input"
|
||||
"file: "+tmp);
|
||||
error = true;
|
||||
@ -435,7 +435,7 @@ bool LyXTextClass::Read(string const & filename, bool merge)
|
||||
string const tempfile = lyx::support::tempName();
|
||||
error = !layout2layout(filename, tempfile);
|
||||
if (!error)
|
||||
error = Read(tempfile, merge);
|
||||
error = read(tempfile, merge);
|
||||
lyx::support::unlink(tempfile);
|
||||
return error;
|
||||
}
|
||||
@ -917,7 +917,7 @@ bool LyXTextClass::load() const
|
||||
|
||||
// Read style-file
|
||||
string const real_file = libFileSearch("layouts", name_, "layout");
|
||||
loaded_ = const_cast<LyXTextClass*>(this)->Read(real_file) == 0;
|
||||
loaded_ = const_cast<LyXTextClass*>(this)->read(real_file) == 0;
|
||||
|
||||
if (!loaded_) {
|
||||
lyxerr << "Error reading `"
|
||||
|
@ -62,7 +62,7 @@ public:
|
||||
const_iterator end() const { return layoutlist_.end(); }
|
||||
|
||||
/// Performs the read of the layout file.
|
||||
bool Read(std::string const & filename, bool merge = false);
|
||||
bool read(std::string const & filename, bool merge = false);
|
||||
///
|
||||
void readOutputType(LyXLex &);
|
||||
///
|
||||
|
@ -42,7 +42,7 @@ using std::pair;
|
||||
|
||||
// Gets textclass number from name
|
||||
pair<bool, textclass_type> const
|
||||
LyXTextClassList::NumberOfClass(string const & textclass) const
|
||||
LyXTextClassList::numberOfClass(string const & textclass) const
|
||||
{
|
||||
ClassList::const_iterator cit =
|
||||
find_if(classlist_.begin(), classlist_.end(),
|
||||
@ -88,7 +88,7 @@ public:
|
||||
|
||||
|
||||
// Reads LyX textclass definitions according to textclass config file
|
||||
bool LyXTextClassList::Read()
|
||||
bool LyXTextClassList::read()
|
||||
{
|
||||
LyXLex lex(0, 0);
|
||||
string real_file = libFileSearch("", "textclass.lst");
|
||||
@ -176,7 +176,7 @@ void LyXSetStyle()
|
||||
{
|
||||
lyxerr[Debug::TCLASS] << "LyXSetStyle: parsing configuration..." << endl;
|
||||
|
||||
if (!textclasslist.Read()) {
|
||||
if (!textclasslist.read()) {
|
||||
lyxerr[Debug::TCLASS] << "LyXSetStyle: an error occured "
|
||||
"during parsing.\n Exiting." << endl;
|
||||
exit(1);
|
||||
|
@ -40,13 +40,13 @@ public:
|
||||
|
||||
/// Gets textclass number from name, -1 if textclass name does not exist
|
||||
std::pair<bool, lyx::textclass_type> const
|
||||
NumberOfClass(std::string const & textclass) const;
|
||||
numberOfClass(std::string const & textclass) const;
|
||||
|
||||
///
|
||||
LyXTextClass const & operator[](lyx::textclass_type textclass) const;
|
||||
|
||||
/// Read textclass list. Returns false if this fails.
|
||||
bool Read();
|
||||
bool read();
|
||||
private:
|
||||
///
|
||||
mutable ClassList classlist_;
|
||||
|
@ -272,7 +272,7 @@ TeXOnePar(Buffer const & buf,
|
||||
if (bparams.inputenc == "auto" &&
|
||||
language->encoding() != previous_language->encoding()) {
|
||||
os << "\\inputencoding{"
|
||||
<< language->encoding()->LatexName()
|
||||
<< language->encoding()->latexName()
|
||||
<< "}\n";
|
||||
texrow.newline();
|
||||
}
|
||||
|
@ -1494,7 +1494,7 @@ Paragraph::getParLanguage(BufferParams const & bparams) const
|
||||
bool Paragraph::isRightToLeftPar(BufferParams const & bparams) const
|
||||
{
|
||||
return lyxrc.rtl_support
|
||||
&& getParLanguage(bparams)->RightToLeft()
|
||||
&& getParLanguage(bparams)->rightToLeft()
|
||||
&& ownerCode() != InsetBase::ERT_CODE;
|
||||
}
|
||||
|
||||
@ -1821,7 +1821,7 @@ unsigned char Paragraph::transformChar(unsigned char c, pos_type pos) const
|
||||
|
||||
for (pos_type i = pos + 1, end = size(); i < end; ++i) {
|
||||
unsigned char const par_char = getChar(i);
|
||||
if (!Encodings::IsComposeChar_arabic(par_char)) {
|
||||
if (!Encodings::isComposeChar_arabic(par_char)) {
|
||||
next_char = par_char;
|
||||
break;
|
||||
}
|
||||
@ -1830,15 +1830,15 @@ unsigned char Paragraph::transformChar(unsigned char c, pos_type pos) const
|
||||
if (Encodings::is_arabic(next_char)) {
|
||||
if (Encodings::is_arabic(prev_char) &&
|
||||
!Encodings::is_arabic_special(prev_char))
|
||||
return Encodings::TransformChar(c, Encodings::FORM_MEDIAL);
|
||||
return Encodings::transformChar(c, Encodings::FORM_MEDIAL);
|
||||
else
|
||||
return Encodings::TransformChar(c, Encodings::FORM_INITIAL);
|
||||
return Encodings::transformChar(c, Encodings::FORM_INITIAL);
|
||||
} else {
|
||||
if (Encodings::is_arabic(prev_char) &&
|
||||
!Encodings::is_arabic_special(prev_char))
|
||||
return Encodings::TransformChar(c, Encodings::FORM_FINAL);
|
||||
return Encodings::transformChar(c, Encodings::FORM_FINAL);
|
||||
else
|
||||
return Encodings::TransformChar(c, Encodings::FORM_ISOLATED);
|
||||
return Encodings::transformChar(c, Encodings::FORM_ISOLATED);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -602,9 +602,9 @@ void Paragraph::Pimpl::simpleTeXSpecialChars(Buffer const & buf,
|
||||
if ((bparams.inputenc == "latin1" ||
|
||||
bparams.inputenc == "latin9") ||
|
||||
(bparams.inputenc == "auto" &&
|
||||
(font.language()->encoding()->LatexName()
|
||||
(font.language()->encoding()->latexName()
|
||||
== "latin1" ||
|
||||
font.language()->encoding()->LatexName()
|
||||
font.language()->encoding()->latexName()
|
||||
== "latin9"))) {
|
||||
os << "\\ensuremath{"
|
||||
<< c
|
||||
|
@ -195,7 +195,7 @@ void RowPainter::paintHebrewComposeChar(pos_type & vpos, LyXFont const & font)
|
||||
|
||||
for (pos_type i = pos - 1; i >= 0; --i) {
|
||||
c = par_.getChar(i);
|
||||
if (!Encodings::IsComposeChar_hebrew(c)) {
|
||||
if (!Encodings::isComposeChar_hebrew(c)) {
|
||||
if (isPrintableNonspace(c)) {
|
||||
int const width2 =
|
||||
text_.singleWidth(par_, i, c, text_.getFont(par_, i));
|
||||
@ -229,7 +229,7 @@ void RowPainter::paintArabicComposeChar(pos_type & vpos, LyXFont const & font)
|
||||
|
||||
for (pos_type i = pos - 1; i >= 0; --i) {
|
||||
c = par_.getChar(i);
|
||||
if (!Encodings::IsComposeChar_arabic(c)) {
|
||||
if (!Encodings::isComposeChar_arabic(c)) {
|
||||
if (isPrintableNonspace(c)) {
|
||||
int const width2 =
|
||||
text_.singleWidth(par_, i, c, text_.getFont(par_, i));
|
||||
@ -273,10 +273,10 @@ void RowPainter::paintChars(pos_type & vpos, LyXFont font,
|
||||
if (!isPrintableNonspace(c))
|
||||
break;
|
||||
|
||||
if (arabic && Encodings::IsComposeChar_arabic(c))
|
||||
if (arabic && Encodings::isComposeChar_arabic(c))
|
||||
break;
|
||||
|
||||
if (hebrew && Encodings::IsComposeChar_hebrew(c))
|
||||
if (hebrew && Encodings::isComposeChar_hebrew(c))
|
||||
break;
|
||||
|
||||
if (arabic)
|
||||
@ -338,8 +338,8 @@ void RowPainter::paintFromPos(pos_type & vpos)
|
||||
|
||||
// draw as many chars as we can
|
||||
if ((!hebrew && !arabic)
|
||||
|| (hebrew && !Encodings::IsComposeChar_hebrew(c))
|
||||
|| (arabic && !Encodings::IsComposeChar_arabic(c))) {
|
||||
|| (hebrew && !Encodings::isComposeChar_hebrew(c))
|
||||
|| (arabic && !Encodings::isComposeChar_arabic(c))) {
|
||||
paintChars(vpos, orig_font, hebrew, arabic);
|
||||
} else if (hebrew) {
|
||||
paintHebrewComposeChar(vpos, orig_font);
|
||||
|
@ -91,7 +91,7 @@ unsigned char const errno_tab[] =
|
||||
|
||||
|
||||
inline
|
||||
int TranslateOS2Error(unsigned long rc)
|
||||
int translateOS2Error(unsigned long rc)
|
||||
{
|
||||
if (rc >= sizeof (errno_tab))
|
||||
return EINVAL;
|
||||
|
@ -491,7 +491,7 @@ LyXTextClass const parse_preamble(Parser & p, ostream & os, string const & force
|
||||
exit(1);
|
||||
}
|
||||
LyXTextClass textclass;
|
||||
textclass.Read(layoutfilename);
|
||||
textclass.read(layoutfilename);
|
||||
if (h_papersides.empty()) {
|
||||
ostringstream ss;
|
||||
ss << textclass.sides();
|
||||
|
@ -429,15 +429,15 @@ int LyXText::singleWidth(Paragraph const & par,
|
||||
// The most common case is handled first (Asger)
|
||||
if (isPrintable(c)) {
|
||||
Language const * language = font.language();
|
||||
if (language->RightToLeft()) {
|
||||
if (language->rightToLeft()) {
|
||||
if ((lyxrc.font_norm_type == LyXRC::ISO_8859_6_8 ||
|
||||
lyxrc.font_norm_type == LyXRC::ISO_10646_1)
|
||||
&& language->lang() == "arabic") {
|
||||
if (Encodings::IsComposeChar_arabic(c))
|
||||
if (Encodings::isComposeChar_arabic(c))
|
||||
return 0;
|
||||
c = par.transformChar(c, pos);
|
||||
} else if (language->lang() == "hebrew" &&
|
||||
Encodings::IsComposeChar_hebrew(c))
|
||||
Encodings::isComposeChar_hebrew(c))
|
||||
return 0;
|
||||
}
|
||||
return font_metrics::width(c, font);
|
||||
@ -1576,7 +1576,7 @@ void LyXText::changeCase(LCursor & cur, LyXText::TextCase action)
|
||||
}
|
||||
|
||||
|
||||
bool LyXText::Delete(LCursor & cur)
|
||||
bool LyXText::erase(LCursor & cur)
|
||||
{
|
||||
BOOST_ASSERT(this == cur.text());
|
||||
bool needsUpdate = false;
|
||||
|
@ -631,7 +631,7 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
|
||||
if (cur.pos() == cur.paragraph().size())
|
||||
// Par boundary, force full-screen update
|
||||
singleParUpdate = false;
|
||||
needsUpdate = Delete(cur);
|
||||
needsUpdate = erase(cur);
|
||||
cur.resetAnchor();
|
||||
// It is possible to make it a lot faster still
|
||||
// just comment out the line below...
|
||||
@ -649,7 +649,7 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
|
||||
cursorRight(cur);
|
||||
cursorLeft(cur);
|
||||
}
|
||||
Delete(cur);
|
||||
erase(cur);
|
||||
cur.resetAnchor();
|
||||
} else {
|
||||
cutSelection(cur, true, false);
|
||||
@ -1133,7 +1133,7 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
|
||||
string::const_iterator end = cmd.argument.end();
|
||||
for (; cit != end; ++cit)
|
||||
bv->owner()->getIntl().getTransManager().
|
||||
TranslateAndInsert(*cit, this);
|
||||
translateAndInsert(*cit, this);
|
||||
|
||||
cur.resetAnchor();
|
||||
moveCursor(cur, false);
|
||||
@ -1441,7 +1441,7 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
|
||||
bv->owner()->getLyXFunc().handleKeyFunc(cmd.action);
|
||||
if (!cmd.argument.empty())
|
||||
bv->owner()->getIntl().getTransManager()
|
||||
.TranslateAndInsert(cmd.argument[0], this);
|
||||
.translateAndInsert(cmd.argument[0], this);
|
||||
break;
|
||||
|
||||
case LFUN_FLOAT_LIST: {
|
||||
|
@ -166,7 +166,7 @@ void asciiTocList(string const & type, Buffer const & buffer, ostream & os)
|
||||
}
|
||||
|
||||
|
||||
void Outline(OutlineOp mode, Buffer * buf, pit_type & pit)
|
||||
void outline(OutlineOp mode, Buffer * buf, pit_type & pit)
|
||||
{
|
||||
ParagraphList & pars = buf->text().paragraphs();
|
||||
ParagraphList::iterator bgn = pars.begin();
|
||||
|
@ -95,7 +95,7 @@ enum OutlineOp {
|
||||
};
|
||||
|
||||
|
||||
void Outline(OutlineOp, Buffer *, pit_type &);
|
||||
void outline(OutlineOp, Buffer *, pit_type &);
|
||||
|
||||
|
||||
} // namespace toc
|
||||
|
32
src/trans.C
32
src/trans.C
@ -41,11 +41,11 @@ Trans::Trans()
|
||||
|
||||
Trans::~Trans()
|
||||
{
|
||||
FreeKeymap();
|
||||
freeKeymap();
|
||||
}
|
||||
|
||||
|
||||
void Trans::InsertException(KmodException & exclist, char c,
|
||||
void Trans::insertException(KmodException & exclist, char c,
|
||||
string const & data, bool flag, tex_accent accent)
|
||||
{
|
||||
Keyexc p;
|
||||
@ -59,26 +59,26 @@ void Trans::InsertException(KmodException & exclist, char c,
|
||||
}
|
||||
|
||||
|
||||
void Trans::FreeException(KmodException & exclist)
|
||||
void Trans::freeException(KmodException & exclist)
|
||||
{
|
||||
exclist.clear();
|
||||
}
|
||||
|
||||
|
||||
void Trans::FreeKeymap()
|
||||
void Trans::freeKeymap()
|
||||
{
|
||||
kmod_list_.clear();
|
||||
keymap_.clear();
|
||||
}
|
||||
|
||||
|
||||
bool Trans::IsDefined() const
|
||||
bool Trans::isDefined() const
|
||||
{
|
||||
return !name_.empty();
|
||||
}
|
||||
|
||||
|
||||
string const & Trans::GetName() const
|
||||
string const & Trans::getName() const
|
||||
{
|
||||
return name_;
|
||||
}
|
||||
@ -104,7 +104,7 @@ struct keyword_item kmapTags[K_LAST - 1] = {
|
||||
tex_accent getkeymod(string const &);
|
||||
|
||||
|
||||
void Trans::AddDeadkey(tex_accent accent, string const & keys)
|
||||
void Trans::addDeadkey(tex_accent accent, string const & keys)
|
||||
{
|
||||
KmodInfo tmp;
|
||||
tmp.data = keys;
|
||||
@ -120,7 +120,7 @@ void Trans::AddDeadkey(tex_accent accent, string const & keys)
|
||||
}
|
||||
|
||||
|
||||
int Trans::Load(LyXLex & lex)
|
||||
int Trans::load(LyXLex & lex)
|
||||
{
|
||||
bool error = false;
|
||||
|
||||
@ -163,9 +163,9 @@ int Trans::Load(LyXLex & lex)
|
||||
return -1;
|
||||
|
||||
/* string const allowed = lex.getString(); */
|
||||
AddDeadkey(accent, keys /*, allowed*/);
|
||||
addDeadkey(accent, keys /*, allowed*/);
|
||||
#else
|
||||
AddDeadkey(accent, keys);
|
||||
addDeadkey(accent, keys);
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
@ -219,7 +219,7 @@ int Trans::Load(LyXLex & lex)
|
||||
return -1;
|
||||
}
|
||||
|
||||
InsertException(kmod_list_[accent_1].exception_list,
|
||||
insertException(kmod_list_[accent_1].exception_list,
|
||||
static_cast<char>(it->first), allowed,
|
||||
true, accent_2);
|
||||
}
|
||||
@ -279,7 +279,7 @@ int Trans::Load(LyXLex & lex)
|
||||
} else
|
||||
return -1;
|
||||
|
||||
InsertException(kmod_list_[accent].exception_list,
|
||||
insertException(kmod_list_[accent].exception_list,
|
||||
key, str);
|
||||
break;
|
||||
}
|
||||
@ -309,7 +309,7 @@ bool Trans::isAccentDefined(tex_accent accent, KmodInfo & i) const
|
||||
|
||||
string const Trans::process(char c, TransManager & k)
|
||||
{
|
||||
string const t = Match(static_cast<unsigned char>(c));
|
||||
string const t = match(static_cast<unsigned char>(c));
|
||||
|
||||
if (t.empty() && c != 0) {
|
||||
return k.normalkey(c);
|
||||
@ -323,17 +323,17 @@ string const Trans::process(char c, TransManager & k)
|
||||
}
|
||||
|
||||
|
||||
int Trans::Load(string const & language)
|
||||
int Trans::load(string const & language)
|
||||
{
|
||||
string const filename = libFileSearch("kbd", language, "kmap");
|
||||
if (filename.empty())
|
||||
return -1;
|
||||
|
||||
FreeKeymap();
|
||||
freeKeymap();
|
||||
LyXLex lex(kmapTags, K_LAST - 1);
|
||||
lex.setFile(filename);
|
||||
|
||||
int const res = Load(lex);
|
||||
int const res = load(lex);
|
||||
|
||||
if (res == 0) {
|
||||
name_ = language;
|
||||
|
20
src/trans.h
20
src/trans.h
@ -34,11 +34,11 @@ public:
|
||||
~Trans();
|
||||
|
||||
///
|
||||
int Load(std::string const & language);
|
||||
int load(std::string const & language);
|
||||
///
|
||||
bool IsDefined() const;
|
||||
bool isDefined() const;
|
||||
///
|
||||
std::string const & GetName() const;
|
||||
std::string const & getName() const;
|
||||
///
|
||||
std::string const process(char, TransManager &);
|
||||
///
|
||||
@ -46,19 +46,19 @@ public:
|
||||
|
||||
private:
|
||||
///
|
||||
void AddDeadkey(tex_accent, std::string const &);
|
||||
void addDeadkey(tex_accent, std::string const &);
|
||||
///
|
||||
void FreeKeymap();
|
||||
void freeKeymap();
|
||||
///
|
||||
int Load(LyXLex &);
|
||||
int load(LyXLex &);
|
||||
///
|
||||
std::string const & Match(unsigned char c);
|
||||
std::string const & match(unsigned char c);
|
||||
///
|
||||
void InsertException(KmodException & exclist, char c,
|
||||
void insertException(KmodException & exclist, char c,
|
||||
std::string const & data, bool = false,
|
||||
tex_accent = TEX_NOACCENT);
|
||||
///
|
||||
void FreeException(KmodException & exclist);
|
||||
void freeException(KmodException & exclist);
|
||||
|
||||
///
|
||||
std::string name_;
|
||||
@ -71,7 +71,7 @@ private:
|
||||
|
||||
///
|
||||
inline
|
||||
std::string const & Trans::Match(unsigned char c)
|
||||
std::string const & Trans::match(unsigned char c)
|
||||
{
|
||||
std::map<int, std::string>::iterator it = keymap_.find(c);
|
||||
if (it != keymap_.end()) {
|
||||
|
@ -202,21 +202,21 @@ TransManager::~TransManager()
|
||||
{}
|
||||
|
||||
|
||||
int TransManager::SetPrimary(string const & language)
|
||||
int TransManager::setPrimary(string const & language)
|
||||
{
|
||||
if (t1_->GetName() == language)
|
||||
if (t1_->getName() == language)
|
||||
return 0;
|
||||
|
||||
return t1_->Load(language);
|
||||
return t1_->load(language);
|
||||
}
|
||||
|
||||
|
||||
int TransManager::SetSecondary(string const & language)
|
||||
int TransManager::setSecondary(string const & language)
|
||||
{
|
||||
if (t2_->GetName() == language)
|
||||
if (t2_->getName() == language)
|
||||
return 0;
|
||||
|
||||
return t2_->Load(language);
|
||||
return t2_->load(language);
|
||||
}
|
||||
|
||||
|
||||
@ -226,31 +226,31 @@ bool TransManager::setCharset(string const & str)
|
||||
}
|
||||
|
||||
|
||||
void TransManager::EnablePrimary()
|
||||
void TransManager::enablePrimary()
|
||||
{
|
||||
if (t1_->IsDefined())
|
||||
if (t1_->isDefined())
|
||||
active_ = t1_.get();
|
||||
|
||||
lyxerr[Debug::KBMAP] << "Enabling primary keymap" << endl;
|
||||
}
|
||||
|
||||
|
||||
void TransManager::EnableSecondary()
|
||||
void TransManager::enableSecondary()
|
||||
{
|
||||
if (t2_->IsDefined())
|
||||
if (t2_->isDefined())
|
||||
active_ = t2_.get();
|
||||
lyxerr[Debug::KBMAP] << "Enabling secondary keymap" << endl;
|
||||
}
|
||||
|
||||
|
||||
void TransManager::DisableKeymap()
|
||||
void TransManager::disableKeymap()
|
||||
{
|
||||
active_ = &default_;
|
||||
lyxerr[Debug::KBMAP] << "Disabling keymap" << endl;
|
||||
}
|
||||
|
||||
|
||||
void TransManager::TranslateAndInsert(char c, LyXText * text)
|
||||
void TransManager::translateAndInsert(char c, LyXText * text)
|
||||
{
|
||||
string res = active_->process(c, *this);
|
||||
|
||||
@ -321,6 +321,6 @@ void TransManager::deadkey(char c, tex_accent accent, LyXText * t)
|
||||
insert(res, t);
|
||||
} else {
|
||||
// Go through the translation
|
||||
TranslateAndInsert(c, t);
|
||||
translateAndInsert(c, t);
|
||||
}
|
||||
}
|
||||
|
@ -156,15 +156,15 @@ public:
|
||||
///
|
||||
~TransManager();
|
||||
///
|
||||
int SetPrimary(std::string const &);
|
||||
int setPrimary(std::string const &);
|
||||
///
|
||||
int SetSecondary(std::string const &);
|
||||
int setSecondary(std::string const &);
|
||||
///
|
||||
void EnablePrimary();
|
||||
void enablePrimary();
|
||||
///
|
||||
void EnableSecondary();
|
||||
void enableSecondary();
|
||||
///
|
||||
void DisableKeymap();
|
||||
void disableKeymap();
|
||||
///
|
||||
bool setCharset(std::string const &);
|
||||
///
|
||||
@ -172,7 +172,7 @@ public:
|
||||
return trans_fsm_.currentState->backspace();
|
||||
}
|
||||
///
|
||||
void TranslateAndInsert(char, LyXText *);
|
||||
void translateAndInsert(char, LyXText *);
|
||||
///
|
||||
std::string const deadkey(char, KmodInfo);
|
||||
///
|
||||
|
Loading…
x
Reference in New Issue
Block a user