mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
Whitespace, only whitespace.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9044 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
965a772279
commit
e978fa42e3
@ -807,7 +807,7 @@ void BufferView::Pimpl::MenuInsertLyXFile(string const & filenm)
|
||||
bool const res = bv_->buffer()->readFile(fname, bv_->cursor().par());
|
||||
bv_->resize();
|
||||
|
||||
string s = res ? _("Document %1$s inserted.")
|
||||
string s = res ? _("Document %1$s inserted.")
|
||||
: _("Could not insert document %1$s");
|
||||
owner_->message(bformat(s, disp_fn));
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ Bullet const ITEMIZE_DEFAULTS[4] = { Bullet(0, 8),//"\\(\\bullet\\)"
|
||||
|
||||
|
||||
Bullet::Bullet(int f, int c, int s)
|
||||
: font(f), character(c), size(s), user_text(0)
|
||||
: font(f), character(c), size(s), user_text(0)
|
||||
{
|
||||
if (f < MIN || f >= FONTMAX) {
|
||||
font = MIN;
|
||||
|
@ -55,9 +55,9 @@ void copySelection(LCursor & cur);
|
||||
void pasteSelection(LCursor & cur, size_t sel_index = 0);
|
||||
|
||||
/** Needed to switch between different classes. This works
|
||||
for a list of paragraphs beginning with the specified par
|
||||
return value is the number of wrong conversions.
|
||||
*/
|
||||
* for a list of paragraphs beginning with the specified par
|
||||
* return value is the number of wrong conversions.
|
||||
*/
|
||||
int SwitchLayoutsBetweenClasses(lyx::textclass_type c1,
|
||||
lyx::textclass_type c2,
|
||||
ParagraphList & par,
|
||||
|
@ -15,11 +15,11 @@
|
||||
#include <string>
|
||||
|
||||
/** This is a "float layout" object. It contains the parameters for how to
|
||||
handle the different kinds of floats, default ones and user created ones.
|
||||
Objects of this class is stored in a container in FloatList. The different
|
||||
InsetFloat(s) have a pointer/reference through the name of the Floating
|
||||
so that it knows how the different floats should be handled.
|
||||
*/
|
||||
* handle the different kinds of floats, default ones and user created ones.
|
||||
* Objects of this class is stored in a container in FloatList. The different
|
||||
* InsetFloat(s) have a pointer/reference through the name of the Floating
|
||||
* so that it knows how the different floats should be handled.
|
||||
*/
|
||||
class Floating {
|
||||
public:
|
||||
///
|
||||
|
18
src/LColor.h
18
src/LColor.h
@ -23,13 +23,11 @@
|
||||
#include <string>
|
||||
|
||||
/**
|
||||
This is a stateless class.
|
||||
|
||||
It has one basic purposes:
|
||||
To serve as a color-namespace container (the Color enum).
|
||||
|
||||
|
||||
*/
|
||||
* This is a stateless class.
|
||||
*
|
||||
* It has one basic purposes:
|
||||
* To serve as a color-namespace container (the Color enum).
|
||||
*/
|
||||
/**
|
||||
* \class LColor
|
||||
*
|
||||
@ -234,15 +232,15 @@ private:
|
||||
* passed as a function argument without having to expose LColor.h.
|
||||
*/
|
||||
class LColor_color {
|
||||
LColor::color val_;
|
||||
LColor::color val_;
|
||||
public:
|
||||
/** The default constructor is nasty,
|
||||
/** The default constructor is nasty,
|
||||
* but allows us to use LColor_color in STL containers.
|
||||
*/
|
||||
LColor_color() : val_(static_cast<LColor::color>(-1)) {}
|
||||
|
||||
LColor_color(LColor::color val) : val_(val) {}
|
||||
operator LColor::color() const{ return val_; }
|
||||
operator LColor::color() const{ return val_; }
|
||||
};
|
||||
|
||||
|
||||
|
@ -398,7 +398,7 @@ bool LaTeX::runMakeIndex(string const & f)
|
||||
lyxerr[Debug::LATEX] << "idx file has been made,"
|
||||
" running makeindex on file "
|
||||
<< f << endl;
|
||||
string tmp = lyxrc.index_command + " ";
|
||||
string tmp = lyxrc.index_command + " ";
|
||||
tmp += QuoteName(f);
|
||||
Systemcall one;
|
||||
one.startscript(Systemcall::Wait, tmp);
|
||||
|
@ -24,18 +24,18 @@ class BufferParams;
|
||||
struct Language;
|
||||
|
||||
/** The packages and commands that a buffer needs. This class
|
||||
contains a list<string>. Each of the LaTeX packages that a buffer needs
|
||||
should be added with void require(string const & name).
|
||||
|
||||
i.e require("amssymb")
|
||||
|
||||
To add support you should only need to require() the package name as
|
||||
packages which don't have special requirements are handled automatically.
|
||||
If your new package does need special consideration you'll need to alter
|
||||
string const getPackages() const;
|
||||
Remember to update the validate function in buffer.C and paragraph.C
|
||||
when you do so.
|
||||
*/
|
||||
* contains a list<string>. Each of the LaTeX packages that a buffer needs
|
||||
* should be added with void require(string const & name).
|
||||
*
|
||||
* i.e require("amssymb")
|
||||
*
|
||||
* To add support you should only need to require() the package name as
|
||||
* packages which don't have special requirements are handled automatically.
|
||||
* If your new package does need special consideration you'll need to alter
|
||||
* string const getPackages() const;
|
||||
* Remember to update the validate function in buffer.C and paragraph.C
|
||||
* when you do so.
|
||||
*/
|
||||
class LaTeXFeatures {
|
||||
public:
|
||||
///
|
||||
|
@ -399,7 +399,7 @@ void Menu::checkShortcuts() const
|
||||
|
||||
void MenuBackend::specialMenu(string const &name)
|
||||
{
|
||||
if (hasMenu(name))
|
||||
if (hasMenu(name))
|
||||
specialmenu_ = &getMenu(name);
|
||||
}
|
||||
|
||||
@ -801,7 +801,7 @@ void MenuBackend::expand(Menu const & frommenu, Menu & tomenu,
|
||||
break;
|
||||
|
||||
case MenuItem::Command:
|
||||
if (!specialmenu_
|
||||
if (!specialmenu_
|
||||
|| !specialmenu_->hasFunc(cit->func()))
|
||||
tomenu.add(*cit, view);
|
||||
}
|
||||
|
10
src/boost.C
10
src/boost.C
@ -34,13 +34,13 @@ namespace {
|
||||
|
||||
void emergencyCleanup()
|
||||
{
|
||||
static bool didCleanup;
|
||||
if (didCleanup)
|
||||
return;
|
||||
static bool didCleanup;
|
||||
if (didCleanup)
|
||||
return;
|
||||
|
||||
didCleanup = true;
|
||||
didCleanup = true;
|
||||
|
||||
LyX::cref().emergencyCleanup();
|
||||
LyX::cref().emergencyCleanup();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -795,7 +795,7 @@ bool Buffer::do_writeFile(ostream & ofs) const
|
||||
ofs << "\\begin_header\n";
|
||||
params().writeFile(ofs);
|
||||
ofs << "\\end_header\n";
|
||||
|
||||
|
||||
// write the text
|
||||
ofs << "\n\\begin_body\n";
|
||||
text().write(*this, ofs);
|
||||
@ -1002,7 +1002,7 @@ bool Buffer::isSGML() const
|
||||
|
||||
void Buffer::makeLinuxDocFile(string const & fname,
|
||||
OutputParams const & runparams,
|
||||
bool body_only)
|
||||
bool body_only)
|
||||
{
|
||||
ofstream ofs;
|
||||
if (!openFileWrite(ofs, fname))
|
||||
|
@ -48,10 +48,10 @@ enum CiteEngine {
|
||||
};
|
||||
|
||||
class CiteEngine_enum {
|
||||
CiteEngine val_;
|
||||
CiteEngine val_;
|
||||
public:
|
||||
CiteEngine_enum(CiteEngine val) : val_(val) {}
|
||||
operator CiteEngine() const{ return val_; }
|
||||
operator CiteEngine() const{ return val_; }
|
||||
};
|
||||
|
||||
} // namespace biblio
|
||||
|
@ -123,7 +123,7 @@ int connect(string const & name)
|
||||
<< ": " << strerror(errno) << endl;
|
||||
::close(fd);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
if (::fcntl(fd, F_SETFL, O_NONBLOCK) == -1) {
|
||||
cerr << "lyxclient: Could not set O_NONBLOCK for socket: "
|
||||
<< strerror(errno) << endl;
|
||||
@ -256,7 +256,7 @@ bool LyXDataSocket::connected() const
|
||||
bool LyXDataSocket::readln(string & line)
|
||||
{
|
||||
int const charbuf_size = 100;
|
||||
char charbuf[charbuf_size]; // buffer for the ::read() system call
|
||||
char charbuf[charbuf_size]; // buffer for the ::read() system call
|
||||
int count;
|
||||
string::size_type pos;
|
||||
|
||||
|
@ -7,12 +7,12 @@ CoordCache theCoords;
|
||||
// just a helper to be able to set a breakpoint
|
||||
void lyxbreaker(void const * data, const char * hint, int size)
|
||||
{
|
||||
lyxerr << "break on pointer: " << data << " hint: " << hint
|
||||
lyxerr << "break on pointer: " << data << " hint: " << hint
|
||||
<< " size: " << size << std::endl;
|
||||
}
|
||||
|
||||
|
||||
void CoordCache::clear()
|
||||
void CoordCache::clear()
|
||||
{
|
||||
lyxerr << "CoordCache: removing " << arrays_.data_.size()
|
||||
<< " arrays" << std::endl;
|
||||
|
@ -19,7 +19,7 @@ void lyxbreaker(void const * data, const char * hint, int size);
|
||||
struct Point {
|
||||
Point()
|
||||
: x_(0), y_(0)
|
||||
{}
|
||||
{}
|
||||
|
||||
Point(int x, int y) : x_(x), y_(y)
|
||||
{
|
||||
@ -27,7 +27,7 @@ struct Point {
|
||||
BOOST_ASSERT(x < 4000);
|
||||
BOOST_ASSERT(y > -3000);
|
||||
BOOST_ASSERT(y < 4000);
|
||||
}
|
||||
}
|
||||
|
||||
int x_, y_;
|
||||
};
|
||||
@ -70,9 +70,9 @@ public:
|
||||
|
||||
// T * find(int x, int y) const
|
||||
// {
|
||||
// T *
|
||||
// T *
|
||||
// cache_type iter
|
||||
// }
|
||||
// }
|
||||
|
||||
private:
|
||||
friend class CoordCache;
|
||||
|
@ -16,9 +16,9 @@
|
||||
#include "support/debugstream.h"
|
||||
|
||||
/** Ideally this should have been a namespace, but since we try to be
|
||||
compilable on older C++ compilators too, we use a struct instead.
|
||||
This is all the different debug levels that we have.
|
||||
*/
|
||||
* compilable on older C++ compilators too, we use a struct instead.
|
||||
* This is all the different debug levels that we have.
|
||||
*/
|
||||
struct lyx_debug_trait {
|
||||
///
|
||||
enum type {
|
||||
|
@ -86,14 +86,14 @@ enum CopyStatus {
|
||||
|
||||
/** copy file \p sourceFile to \p destFile. If \p force is false, the user
|
||||
* will be asked before existing files are overwritten.
|
||||
* \return
|
||||
* \return
|
||||
* - SUCCESS if this file got copied
|
||||
* - FORCE if subsequent calls should not ask for confirmation before
|
||||
* overwriting files anymore.
|
||||
* - CANCEL if the export should be cancelled
|
||||
*/
|
||||
CopyStatus copyFile(string const & sourceFile, string const & destFile,
|
||||
bool force)
|
||||
bool force)
|
||||
{
|
||||
CopyStatus ret = force ? FORCE : SUCCESS;
|
||||
|
||||
@ -281,8 +281,8 @@ bool operator==(ExportedFile const & f1, ExportedFile const & f2)
|
||||
|
||||
|
||||
void ExportData::addExternalFile(string const & format,
|
||||
string const & sourceName,
|
||||
string const & exportName)
|
||||
string const & sourceName,
|
||||
string const & exportName)
|
||||
{
|
||||
BOOST_ASSERT(lyx::support::AbsolutePath(sourceName));
|
||||
|
||||
@ -296,7 +296,7 @@ void ExportData::addExternalFile(string const & format,
|
||||
|
||||
|
||||
void ExportData::addExternalFile(string const & format,
|
||||
string const & sourceName)
|
||||
string const & sourceName)
|
||||
{
|
||||
addExternalFile(format, sourceName, OnlyFilename(sourceName));
|
||||
}
|
||||
|
@ -130,8 +130,8 @@ void Formats::add(string const & name)
|
||||
|
||||
|
||||
void Formats::add(string const & name, string const & extension,
|
||||
string const & prettyname, string const & shortcut,
|
||||
string const & viewer, string const & editor)
|
||||
string const & prettyname, string const & shortcut,
|
||||
string const & viewer, string const & editor)
|
||||
{
|
||||
FormatList::iterator it =
|
||||
find_if(formatlist.begin(), formatlist.end(),
|
||||
@ -172,7 +172,7 @@ void Formats::setViewer(string const & name, string const & command)
|
||||
|
||||
|
||||
bool Formats::view(Buffer const & buffer, string const & filename,
|
||||
string const & format_name) const
|
||||
string const & format_name) const
|
||||
{
|
||||
if (filename.empty())
|
||||
return false;
|
||||
|
@ -23,8 +23,8 @@ using std::string;
|
||||
|
||||
|
||||
int Alert::prompt(string const & title, string const & question,
|
||||
int default_button, int escape_button,
|
||||
string const & b1, string const & b2, string const & b3)
|
||||
int default_button, int escape_button,
|
||||
string const & b1, string const & b2, string const & b3)
|
||||
{
|
||||
if (!lyx_gui::use_gui || lyxerr.debugging()) {
|
||||
lyxerr << title << '\n'
|
||||
|
@ -16,8 +16,10 @@
|
||||
|
||||
|
||||
int prompt_pimpl(std::string const & title, std::string const & question,
|
||||
int default_button, int escape_button,
|
||||
std::string const & b1, std::string const & b2, std::string const & b3);
|
||||
int default_button, int escape_button,
|
||||
std::string const & b1,
|
||||
std::string const & b2,
|
||||
std::string const & b3);
|
||||
|
||||
void warning_pimpl(std::string const & title, std::string const & warning);
|
||||
void error_pimpl(std::string const & title, std::string const & warning);
|
||||
|
@ -63,10 +63,10 @@ void ControlCharacter::dispatchParams()
|
||||
if (!font_.get())
|
||||
return;
|
||||
|
||||
string data;
|
||||
if (font2string(*font_.get(), toggleall_, data)) {
|
||||
kernel().dispatch(FuncRequest(LFUN_FREEFONT_UPDATE, data));
|
||||
}
|
||||
string data;
|
||||
if (font2string(*font_.get(), toggleall_, data)) {
|
||||
kernel().dispatch(FuncRequest(LFUN_FREEFONT_UPDATE, data));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -41,7 +41,7 @@ bool ControlCitation::initialiseParams(string const & data)
|
||||
kernel().buffer().fillWithBibKeys(blist);
|
||||
|
||||
biblio::CiteEngine const engine = biblio::getEngine(kernel().buffer());
|
||||
|
||||
|
||||
bool use_styles = engine != biblio::ENGINE_BASIC;
|
||||
|
||||
typedef std::map<string, string>::value_type InfoMapValue;
|
||||
|
@ -50,16 +50,16 @@ void Kernel::disconnect(string const & name) const
|
||||
bool Kernel::isBufferAvailable() const
|
||||
{
|
||||
if (!lyxview_.view().get())
|
||||
return false;
|
||||
return lyxview_.view()->available();
|
||||
return false;
|
||||
return lyxview_.view()->available();
|
||||
}
|
||||
|
||||
|
||||
bool Kernel::isBufferReadonly() const
|
||||
{
|
||||
if (!lyxview_.buffer())
|
||||
return true;
|
||||
return lyxview_.buffer()->isReadonly();
|
||||
return true;
|
||||
return lyxview_.buffer()->isReadonly();
|
||||
}
|
||||
|
||||
|
||||
|
@ -141,9 +141,9 @@ string const asValidLatexCommand(string const & input,
|
||||
output = input;
|
||||
|
||||
// Jurabib does not support the 'full' natbib style.
|
||||
string::size_type const n = output.size() - 1;
|
||||
if (output != "cite*" && output[n] == '*')
|
||||
output = output.substr(0, n);
|
||||
string::size_type const n = output.size() - 1;
|
||||
if (output != "cite*" && output[n] == '*')
|
||||
output = output.substr(0, n);
|
||||
|
||||
break;
|
||||
}
|
||||
|
@ -118,10 +118,10 @@ string const browseLibFile(string const & dir,
|
||||
{
|
||||
pair<string,string> const dir1(_("System files|#S#s"),
|
||||
AddName(system_lyxdir(), dir));
|
||||
|
||||
|
||||
pair<string,string> const dir2(_("User files|#U#u"),
|
||||
AddName(user_lyxdir(), dir));
|
||||
|
||||
|
||||
string const result = browseFile(LibFileSearch(dir, name, ext), title,
|
||||
filters, false, dir1, dir2);
|
||||
|
||||
|
@ -27,7 +27,7 @@ namespace Gtk {
|
||||
class GERT : public GnomeCB<ControlERT> {
|
||||
public:
|
||||
///
|
||||
GERT();
|
||||
GERT();
|
||||
///
|
||||
~GERT();
|
||||
|
||||
|
@ -27,7 +27,7 @@ namespace Gtk {
|
||||
class GLog : public GnomeCB<ControlLog> {
|
||||
public:
|
||||
///
|
||||
GLog();
|
||||
GLog();
|
||||
///
|
||||
~GLog();
|
||||
|
||||
|
@ -27,7 +27,7 @@ class TextView;
|
||||
class GPreamble : public GnomeCB<ControlPreamble> {
|
||||
public:
|
||||
///
|
||||
GPreamble();
|
||||
GPreamble();
|
||||
///
|
||||
~GPreamble();
|
||||
|
||||
|
@ -43,7 +43,7 @@ void GView::loadXML()
|
||||
#ifdef WITH_WARNINGS
|
||||
#warning Change this before declaring it production code! (be 20010325)
|
||||
#endif
|
||||
string const path("src/frontends/gnome/dialogs/;frontends/gnome/dialogs/;");
|
||||
string const path("src/frontends/gnome/dialogs/;frontends/gnome/dialogs/;");
|
||||
|
||||
string const file = FileOpenSearch(path, file_, "glade");
|
||||
|
||||
|
@ -32,7 +32,7 @@ namespace Gtk {
|
||||
class GView : public ViewBase, public SigC::Object {
|
||||
public:
|
||||
///
|
||||
GView(string const & name);
|
||||
GView(string const & name);
|
||||
///
|
||||
virtual ~GView();
|
||||
|
||||
|
@ -44,7 +44,7 @@ void GnomeBase::loadXML()
|
||||
#ifdef WITH_WARNINGS
|
||||
#warning Change this before declaring it production code! (be 20010325)
|
||||
#endif
|
||||
string const path("src/frontends/gnome/dialogs/;frontends/gnome/dialogs/;");
|
||||
string const path("src/frontends/gnome/dialogs/;frontends/gnome/dialogs/;");
|
||||
|
||||
string const file = FileOpenSearch(path, file_, "glade");
|
||||
|
||||
|
@ -32,7 +32,7 @@ namespace Gtk {
|
||||
class GnomeBase : public ViewBase, public SigC::Object {
|
||||
public:
|
||||
///
|
||||
GnomeBase(string const & name);
|
||||
GnomeBase(string const & name);
|
||||
///
|
||||
virtual ~GnomeBase();
|
||||
|
||||
|
@ -23,36 +23,36 @@
|
||||
|
||||
namespace Gnome
|
||||
{
|
||||
class PixButton: public Gtk::Button
|
||||
{
|
||||
public:
|
||||
PixButton(string label, string pixname): Button()
|
||||
{
|
||||
Gtk::Box * b = manage( new Gtk::HBox() );
|
||||
l = manage( new Gtk::Label(label) );
|
||||
Gnome::Pixmap * p = Gtk::wrap( GNOME_PIXMAP( gnome_stock_pixmap_widget(0, pixname.c_str()) ) );
|
||||
class PixButton: public Gtk::Button
|
||||
{
|
||||
public:
|
||||
PixButton(string label, string pixname): Button()
|
||||
{
|
||||
Gtk::Box * b = manage( new Gtk::HBox() );
|
||||
l = manage( new Gtk::Label(label) );
|
||||
Gnome::Pixmap * p = Gtk::wrap( GNOME_PIXMAP( gnome_stock_pixmap_widget(0, pixname.c_str()) ) );
|
||||
|
||||
b->set_spacing(3);
|
||||
b->children().push_back(Gtk::Box_Helpers::Element(*p, false, false));
|
||||
b->children().push_back(Gtk::Box_Helpers::Element(*l, false, false));
|
||||
b->set_spacing(3);
|
||||
b->children().push_back(Gtk::Box_Helpers::Element(*p, false, false));
|
||||
b->children().push_back(Gtk::Box_Helpers::Element(*l, false, false));
|
||||
|
||||
add(*b);
|
||||
add(*b);
|
||||
|
||||
accelkey_ = l->parse_uline(label);
|
||||
accelkey_ = l->parse_uline(label);
|
||||
|
||||
l->show();
|
||||
p->show();
|
||||
b->show();
|
||||
}
|
||||
l->show();
|
||||
p->show();
|
||||
b->show();
|
||||
}
|
||||
|
||||
guint get_accelkey() { return accelkey_; }
|
||||
guint get_accelkey() { return accelkey_; }
|
||||
|
||||
void set_text(string const & newlabel) { l->set_text(newlabel); }
|
||||
void set_text(string const & newlabel) { l->set_text(newlabel); }
|
||||
|
||||
protected:
|
||||
guint accelkey_;
|
||||
Gtk::Label * l;
|
||||
};
|
||||
protected:
|
||||
guint accelkey_;
|
||||
Gtk::Label * l;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -45,7 +45,7 @@ public:
|
||||
|
||||
|
||||
void GCharacter::PopulateComboBox(Gtk::ComboBox * combo,
|
||||
vector<string> const & strings)
|
||||
vector<string> const & strings)
|
||||
{
|
||||
stringcolumns * cols = new stringcolumns;
|
||||
Glib::RefPtr<Gtk::ListStore> model = Gtk::ListStore::create(*cols);
|
||||
|
@ -111,7 +111,7 @@ string const GLyXKeySym::print(key_modifier::state mod) const
|
||||
//Uppercase the first letter, for Ctrl+N rather than Ctrl+n,
|
||||
//and for Ctrl+Greater rather than Ctrl+GREATER
|
||||
string symname = getSymbolName();
|
||||
if (!symname.empty()) {
|
||||
if (!symname.empty()) {
|
||||
symname[0] = lyx::support::uppercase(symname[0]);
|
||||
buf += symname;
|
||||
}
|
||||
|
@ -114,7 +114,7 @@ public:
|
||||
char const * str, size_t l,
|
||||
LyXFont const & f);
|
||||
|
||||
virtual void text(int x, int y, wchar_t const * str, int l,
|
||||
virtual void text(int x, int y, wchar_t const * str, int l,
|
||||
LyXFont const & f);
|
||||
|
||||
/// draw a char at position x, y (y is the baseline)
|
||||
|
@ -85,11 +85,11 @@ void GToc::updateType()
|
||||
|
||||
typestore_->clear();
|
||||
vector<string> types = controller().getTypes();
|
||||
|
||||
|
||||
// Because tiny empty ComboBoxes just look silly
|
||||
int const emptycombosize = 130;
|
||||
typecombo_->set_size_request(types.empty() ? emptycombosize : -1, -1);
|
||||
|
||||
|
||||
vector<string>::iterator it = types.begin();
|
||||
vector<string>::iterator end = types.end();
|
||||
for(;it != end; ++it) {
|
||||
@ -137,7 +137,7 @@ void GToc::updateContents()
|
||||
|
||||
toc::Toc::const_iterator cit = contents.begin();
|
||||
toc::Toc::const_iterator end = contents.end();
|
||||
|
||||
|
||||
for (int rowindex = 0; cit != end; ++cit, ++rowindex) {
|
||||
Gtk::ListStore::iterator row = tocstore_->append();
|
||||
(*row)[listCol_] = cit->asString();
|
||||
|
@ -31,7 +31,7 @@ public:
|
||||
/// connect a connection notification from the LyXServerSocket
|
||||
io_callback(int fd, boost::function<void()> func);
|
||||
private:
|
||||
bool data_received(Glib::IOCondition);
|
||||
bool data_received(Glib::IOCondition);
|
||||
/// our notifier
|
||||
sigc::connection conn_;
|
||||
/// The callback function
|
||||
|
@ -39,11 +39,11 @@ public:
|
||||
LyXFont::FONT_SHAPE shape,
|
||||
LyXFont::FONT_SIZE size)
|
||||
{
|
||||
if (fonts_[family][series][shape][size])
|
||||
return fonts_[family][series][shape][size];
|
||||
else
|
||||
if (fonts_[family][series][shape][size])
|
||||
return fonts_[family][series][shape][size];
|
||||
else
|
||||
return doLoad(family, series, shape, size);
|
||||
}
|
||||
}
|
||||
|
||||
bool isSpecial(LyXFont const & f)
|
||||
{
|
||||
@ -72,9 +72,9 @@ private:
|
||||
|
||||
/** Does the actual loading of a font. Updates fontstruct. */
|
||||
XftFont * doLoad(LyXFont::FONT_FAMILY family,
|
||||
LyXFont::FONT_SERIES series,
|
||||
LyXFont::FONT_SHAPE shape,
|
||||
LyXFont::FONT_SIZE size);
|
||||
LyXFont::FONT_SERIES series,
|
||||
LyXFont::FONT_SHAPE shape,
|
||||
LyXFont::FONT_SIZE size);
|
||||
};
|
||||
|
||||
///
|
||||
|
@ -32,8 +32,8 @@ using std::string;
|
||||
|
||||
|
||||
int prompt_pimpl(string const & tit, string const & question,
|
||||
int default_button, int cancel_button,
|
||||
string const & b1, string const & b2, string const & b3)
|
||||
int default_button, int cancel_button,
|
||||
string const & b1, string const & b2, string const & b3)
|
||||
{
|
||||
string const title = bformat(_("LyX: %1$s"), tit);
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
* This file is part of LyX, the document processor.
|
||||
* Licence details can be found in the file COPYING.
|
||||
*
|
||||
* \author Jürgen Spitzmüller
|
||||
* \author Jürgen Spitzmüller
|
||||
*
|
||||
* Full author contact details are available in file CREDITS.
|
||||
*/
|
||||
|
@ -219,7 +219,7 @@ void QCitation::update_contents()
|
||||
|
||||
|
||||
void QCitation::updateBrowser(QListBox * browser,
|
||||
vector<string> const & keys) const
|
||||
vector<string> const & keys) const
|
||||
{
|
||||
browser->clear();
|
||||
|
||||
|
@ -127,7 +127,7 @@ void QDocument::build_dialog()
|
||||
cit != textclasslist.end(); ++cit) {
|
||||
if (cit->isTeXClassAvailable()) {
|
||||
dialog_->latexModule->classCO->insertItem(toqstr(cit->description()));
|
||||
} else {
|
||||
} else {
|
||||
string item =
|
||||
bformat(_("Unavailable: %1$s"), cit->description());
|
||||
dialog_->latexModule->classCO->insertItem(toqstr(item));
|
||||
@ -204,7 +204,7 @@ void QDocument::apply()
|
||||
|
||||
} else if (dialog_->biblioModule->citeJurabibRB->isChecked())
|
||||
params.cite_engine = biblio::ENGINE_JURABIB;
|
||||
|
||||
|
||||
params.use_bibtopic =
|
||||
dialog_->biblioModule->bibtopicCB->isChecked();
|
||||
|
||||
|
@ -194,7 +194,7 @@ void QDocumentDialog::saveDefaultClicked()
|
||||
|
||||
void QDocumentDialog::useDefaultsClicked()
|
||||
{
|
||||
form_->useClassDefaults();
|
||||
form_->useClassDefaults();
|
||||
}
|
||||
|
||||
|
||||
|
@ -126,7 +126,7 @@ void QLPopupMenu::populate(Menu * menu)
|
||||
represented meaningfully and std::string
|
||||
does not work (2) only 1-key bindings can
|
||||
be represented in menus.
|
||||
|
||||
|
||||
This is why the unpleasant hack bellow is
|
||||
needed (JMarc)
|
||||
*/
|
||||
|
@ -103,7 +103,7 @@ void QPrefs::build_dialog()
|
||||
bcview().setRestore(dialog_->restorePB);
|
||||
|
||||
dialog_->uiModule->lastfilesSB->setMaxValue(maxlastfiles);
|
||||
|
||||
|
||||
QPrefLanguageModule * langmod(dialog_->languageModule);
|
||||
|
||||
langmod->defaultLanguageCO->clear();
|
||||
|
@ -157,10 +157,10 @@ void parse_init(int & argc, char * argv[])
|
||||
static LQApplication app(argc, argv);
|
||||
|
||||
#if QT_VERSION >= 0x030200
|
||||
// install translation file for Qt built-in dialogs
|
||||
// install translation file for Qt built-in dialogs
|
||||
// These are only installed since Qt 3.2.x
|
||||
static QTranslator qt_trans(0);
|
||||
if (qt_trans.load(QString("qt_") + QTextCodec::locale(),
|
||||
static QTranslator qt_trans(0);
|
||||
if (qt_trans.load(QString("qt_") + QTextCodec::locale(),
|
||||
qInstallPathTranslations())) {
|
||||
app.installTranslator(&qt_trans);
|
||||
// even if the language calls for RtL, don't do that
|
||||
|
@ -12,7 +12,6 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
|
||||
#include "FormAboutlyx.h"
|
||||
#include "xformsBC.h"
|
||||
#include "ControlAboutlyx.h"
|
||||
|
@ -433,7 +433,7 @@ ButtonPolicy::SMInput FormCitation::input(FL_OBJECT * ob, long)
|
||||
controller().getCiteStrings(currentCitekey));
|
||||
fl_set_choice(dialog_->choice_style, choice);
|
||||
}
|
||||
|
||||
|
||||
// Invalid if no citation has been chosen
|
||||
if (fl_get_browser_maxline(dialog_->browser_cite) < 1)
|
||||
activate = ButtonPolicy::SMI_INVALID;
|
||||
|
@ -1032,7 +1032,7 @@ bool FormDocument::options_apply(BufferParams & params)
|
||||
params.cite_engine = biblio::ENGINE_JURABIB;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
params.use_bibtopic = fl_get_button(options_->check_bibtopic);
|
||||
|
||||
int tmpchar = int(fl_get_counter_value(options_->counter_secnumdepth));
|
||||
|
@ -43,7 +43,7 @@ void FormErrorList::build()
|
||||
|
||||
void FormErrorList::update()
|
||||
{
|
||||
setTitle(controller().name());
|
||||
setTitle(controller().name());
|
||||
updateContents();
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,7 @@ kb_action latex_mathfontcmds[] = {
|
||||
LFUN_BOLD, LFUN_SANS, LFUN_ROMAN, LFUN_ITAL, LFUN_CODE,
|
||||
LFUN_NOUN, LFUN_FRAK, LFUN_EMPH, LFUN_FREEFONT_APPLY, LFUN_DEFAULT
|
||||
};
|
||||
|
||||
|
||||
} // namespace anon
|
||||
|
||||
|
||||
|
@ -143,8 +143,8 @@ void XFormsToolbar::toolbarItem::generateInactivePixmaps()
|
||||
int idummy;
|
||||
Window win;
|
||||
|
||||
XGetGeometry(display, active_pixmap, &win, &idummy, &idummy,
|
||||
&width, &height, &uidummy, &uidummy);
|
||||
XGetGeometry(display, active_pixmap, &win, &idummy, &idummy,
|
||||
&width, &height, &uidummy, &uidummy);
|
||||
|
||||
// Produce a darker shade of the button background as the
|
||||
// inactive color. Note the 'hsv.v - 0.2'.
|
||||
|
@ -66,7 +66,7 @@ public:
|
||||
void add(FuncRequest const & func, std::string const & tooltip);
|
||||
void hide(bool);
|
||||
void show(bool);
|
||||
void update();
|
||||
void update();
|
||||
LayoutBox * layout() const { return layout_.get(); }
|
||||
|
||||
/// an item on the toolbar
|
||||
|
@ -358,9 +358,9 @@ string const hexname(LColor_color col)
|
||||
lyxerr << "X can't find color for \"" << lcolor.getLyXName(col)
|
||||
<< '"' << endl;
|
||||
return string();
|
||||
}
|
||||
}
|
||||
|
||||
ostringstream os;
|
||||
ostringstream os;
|
||||
|
||||
os << setbase(16) << setfill('0')
|
||||
<< setw(2) << r
|
||||
|
@ -239,7 +239,7 @@ void updateExternal(InsetExternalParams const & params,
|
||||
exportdata.addExternalFile(rit->first, file);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Do we need to perform the conversion?
|
||||
// Yes if to_file does not exist or if from_file is newer than to_file
|
||||
if (support::compare_timestamps(abs_from_file, abs_to_file) < 0)
|
||||
|
@ -95,7 +95,7 @@ string const ResizeLatexCommand::front_impl() const
|
||||
if (data.no_resize())
|
||||
return string();
|
||||
|
||||
std::ostringstream os;
|
||||
std::ostringstream os;
|
||||
if (data.usingScale()) {
|
||||
double const scl = data.scale / 100.0;
|
||||
os << "\\scalebox{" << scl << "}{" << scl << "}{";
|
||||
@ -188,14 +188,14 @@ string const RotationLatexCommand::front_impl() const
|
||||
if (data.no_rotation())
|
||||
return string();
|
||||
|
||||
std::ostringstream os;
|
||||
os << "\\rotatebox";
|
||||
std::ostringstream os;
|
||||
os << "\\rotatebox";
|
||||
|
||||
if (data.origin() != RotationData::DEFAULT)
|
||||
os << "[origin=" << data.origin() << ']';
|
||||
|
||||
os << '{' << data.angle() << "}{";
|
||||
return os.str();
|
||||
return os.str();
|
||||
}
|
||||
|
||||
|
||||
@ -227,7 +227,7 @@ string const ResizeLatexOption::option_impl() const
|
||||
if (data.no_resize())
|
||||
return string();
|
||||
|
||||
std::ostringstream os;
|
||||
std::ostringstream os;
|
||||
if (data.usingScale()) {
|
||||
if (!float_equal(data.scale, 100.0, 0.05))
|
||||
os << "scale=" << data.scale / 100.0 << ',';
|
||||
|
@ -150,7 +150,7 @@ void InsetBranch::priv_dispatch(LCursor & cur, FuncRequest & cmd)
|
||||
else if (cmd.argument == "close") {
|
||||
setStatus(Collapsed);
|
||||
leaveInset(cur, *this);
|
||||
} else if (cmd.argument == "toggle") {
|
||||
} else if (cmd.argument == "toggle") {
|
||||
if (isOpen()) {
|
||||
setStatus(Collapsed);
|
||||
leaveInset(cur, *this);
|
||||
|
@ -334,9 +334,9 @@ int InsetCitation::latex(Buffer const & buffer, ostream & os,
|
||||
biblio::CiteEngine const cite_engine = buffer.params().cite_engine;
|
||||
string const cite_str =
|
||||
biblio::asValidLatexCommand(getCmdName(), cite_engine);
|
||||
|
||||
|
||||
os << "\\" << cite_str;
|
||||
|
||||
|
||||
string const before = getSecOptions();
|
||||
string const after = getOptions();
|
||||
if (!before.empty() && cite_engine != biblio::ENGINE_BASIC)
|
||||
|
@ -254,10 +254,10 @@ InsetBase * InsetCollapsable::editXY(LCursor & cur, int x, int y) const
|
||||
void InsetCollapsable::priv_dispatch(LCursor & cur, FuncRequest & cmd)
|
||||
{
|
||||
// lyxerr << "InsetCollapsable::priv_dispatch (begin): cmd: " << cmd
|
||||
// << " button y: " << button_dim.y2
|
||||
// << " button y: " << button_dim.y2
|
||||
// << " coll/inline/open: " << status_ << endl;
|
||||
|
||||
lyxerr << "InsetCollapsable::priv_dispatch (begin): cmd: " << cmd
|
||||
lyxerr << "InsetCollapsable::priv_dispatch (begin): cmd: " << cmd
|
||||
<< " cur: " << cur << " bvcur: " << cur.bv().cursor() << endl;
|
||||
|
||||
switch (cmd.action) {
|
||||
|
@ -184,7 +184,7 @@ InsetGraphics::~InsetGraphics()
|
||||
void InsetGraphics::priv_dispatch(LCursor & cur, FuncRequest & cmd)
|
||||
{
|
||||
switch (cmd.action) {
|
||||
case LFUN_GRAPHICS_EDIT: {
|
||||
case LFUN_GRAPHICS_EDIT: {
|
||||
Buffer const & buffer = *cur.bv().buffer();
|
||||
InsetGraphicsParams p;
|
||||
InsetGraphicsMailer::string2params(cmd.argument, buffer, p);
|
||||
@ -343,10 +343,10 @@ string const InsetGraphics::toDocbookLength(LyXLength const & len) const
|
||||
ostringstream result;
|
||||
switch (len.unit() ) {
|
||||
case LyXLength::SP: //< Scaled point (65536sp = 1pt) TeX's smallest unit.
|
||||
result << len.value() * 65536.0 * 72 / 72.27 << "pt";
|
||||
result << len.value() * 65536.0 * 72 / 72.27 << "pt";
|
||||
break;
|
||||
case LyXLength::PT: //< Point = 1/72.27in = 0.351mm
|
||||
result << len.value() * 72 / 72.27 << "pt";
|
||||
result << len.value() * 72 / 72.27 << "pt";
|
||||
break;
|
||||
case LyXLength::BP: //< Big point (72bp = 1in), also PostScript point
|
||||
result << len.value() << "pt";
|
||||
@ -383,18 +383,18 @@ string const InsetGraphics::toDocbookLength(LyXLength const & len) const
|
||||
case LyXLength::PCW: //< Percent of ColumnWidth
|
||||
case LyXLength::PPW: //< Percent of PageWidth
|
||||
case LyXLength::PLW: //< Percent of LineWidth
|
||||
case LyXLength::PTH: //< Percent of TextHeight
|
||||
case LyXLength::PTH: //< Percent of TextHeight
|
||||
case LyXLength::PPH: //< Percent of Paper
|
||||
// Sigh, this will go wrong.
|
||||
// Sigh, this will go wrong.
|
||||
result << len.value() << "%";
|
||||
break;
|
||||
default:
|
||||
result << len.asString();
|
||||
result << len.asString();
|
||||
break;
|
||||
}
|
||||
return result.str();
|
||||
}
|
||||
|
||||
|
||||
string const InsetGraphics::createDocBookAttributes() const
|
||||
{
|
||||
// Calculate the options part of the command, we must do it to a string
|
||||
@ -420,7 +420,7 @@ string const InsetGraphics::createDocBookAttributes() const
|
||||
options << "scalefit=\"1\" ";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (!params().special.empty())
|
||||
options << params().special << " ";
|
||||
|
@ -632,8 +632,8 @@ void InsetInclude::draw(PainterInfo & pi, int x, int y) const
|
||||
}
|
||||
|
||||
bool InsetInclude::display() const
|
||||
{
|
||||
return type(params_) != INPUT;
|
||||
{
|
||||
return type(params_) != INPUT;
|
||||
}
|
||||
|
||||
|
||||
|
@ -77,7 +77,7 @@ int InsetOptArg::latexOptional(Buffer const & buf, ostream & os,
|
||||
ostringstream ss;
|
||||
InsetText::latex(buf, ss, runparams);
|
||||
string str = ss.str();
|
||||
if (str.find(']') != string::npos)
|
||||
if (str.find(']') != string::npos)
|
||||
str = '{' + str + '}';
|
||||
os << '[' << str << ']';
|
||||
return str.length() + 2;
|
||||
|
@ -270,10 +270,10 @@ void InsetTabular::draw(PainterInfo & pi, int x, int y) const
|
||||
for (int i = 0; i < tabular.rows(); ++i) {
|
||||
int nx = x;
|
||||
idx = tabular.getCellNumber(i, 0);
|
||||
if (y + tabular.getDescentOfRow(i) <= 0
|
||||
if (y + tabular.getDescentOfRow(i) <= 0
|
||||
&& y - tabular.getAscentOfRow(i) < pi.pain.paperHeight()) {
|
||||
y += tabular.getDescentOfRow(i)
|
||||
+ tabular.getAscentOfRow(i + 1)
|
||||
y += tabular.getDescentOfRow(i)
|
||||
+ tabular.getAscentOfRow(i + 1)
|
||||
+ tabular.getAdditionalHeight(i + 1);
|
||||
continue;
|
||||
}
|
||||
@ -1567,7 +1567,7 @@ bool InsetTabular::isRightToLeft(LCursor & cur) const
|
||||
BOOST_ASSERT(cur.size() > 1);
|
||||
Paragraph const & parentpar = cur[cur.size() - 2].paragraph();
|
||||
LCursor::pos_type const parentpos = cur[cur.size() - 2].pos();
|
||||
return parentpar.getFontSettings(cur.bv().buffer()->params(),
|
||||
return parentpar.getFontSettings(cur.bv().buffer()->params(),
|
||||
parentpos).language()->RightToLeft();
|
||||
}
|
||||
|
||||
|
@ -112,7 +112,7 @@ RenderPreview::getPreviewImage(Buffer const & buffer) const
|
||||
|
||||
void RenderPreview::metrics(MetricsInfo & mi, Dimension & dim) const
|
||||
{
|
||||
BOOST_ASSERT(mi.base.bv && mi.base.bv->buffer());
|
||||
BOOST_ASSERT(mi.base.bv && mi.base.bv->buffer());
|
||||
|
||||
graphics::PreviewImage const * const pimage =
|
||||
getPreviewImage(*mi.base.bv->buffer());
|
||||
@ -139,7 +139,7 @@ void RenderPreview::metrics(MetricsInfo & mi, Dimension & dim) const
|
||||
|
||||
void RenderPreview::draw(PainterInfo & pi, int x, int y) const
|
||||
{
|
||||
BOOST_ASSERT(pi.base.bv && pi.base.bv->buffer());
|
||||
BOOST_ASSERT(pi.base.bv && pi.base.bv->buffer());
|
||||
|
||||
graphics::PreviewImage const * const pimage =
|
||||
getPreviewImage(*pi.base.bv->buffer());
|
||||
|
@ -65,7 +65,7 @@ public:
|
||||
/// Given an action, print the keybindings.
|
||||
std::string const printbindings(FuncRequest const & func) const;
|
||||
|
||||
/**
|
||||
/**
|
||||
* Given an action, find the first 1-key binding (if it exists).
|
||||
* The LyXKeySym pointer is 0 is no key is found.
|
||||
* [only used by the Qt/Mac frontend]
|
||||
|
@ -20,11 +20,10 @@
|
||||
const long maxlastfiles = 20;
|
||||
|
||||
/** The latest documents loaded.
|
||||
This class takes care of the last .lyx files used by the LyX user. It
|
||||
both reads and writes this information to a file. The number of files
|
||||
kept are user defined, but defaults to four.
|
||||
@author Lars Gullik Bjønnes
|
||||
*/
|
||||
* This class takes care of the last .lyx files used by the LyX user. It
|
||||
* both reads and writes this information to a file. The number of files
|
||||
* kept are user defined, but defaults to four.
|
||||
*/
|
||||
class LastFiles : boost::noncopyable {
|
||||
public:
|
||||
///
|
||||
|
@ -30,7 +30,7 @@ string const lyxline_def =
|
||||
string const noun_def = "\\newcommand{\\noun}[1]{\\textsc{#1}}";
|
||||
|
||||
string const lyxarrow_def =
|
||||
"\\newcommand{\\lyxarrow}{\\leavevmode\\,$\\triangleright$\\,\\allowbreak}";
|
||||
"\\newcommand{\\lyxarrow}{\\leavevmode\\,$\\triangleright$\\,\\allowbreak}";
|
||||
|
||||
// for quotes without babel. This does not give perfect results, but
|
||||
// anybody serious about non-english quotes should use babel (JMarc).
|
||||
|
@ -218,7 +218,7 @@ bool stringSelected(BufferView * bv, string const & searchstr,
|
||||
|
||||
|
||||
int replace(BufferView * bv, string const & searchstr,
|
||||
string const & replacestr, bool cs, bool mw, bool fw)
|
||||
string const & replacestr, bool cs, bool mw, bool fw)
|
||||
{
|
||||
if (!searchAllowed(bv, searchstr) || bv->buffer()->isReadonly())
|
||||
return 0;
|
||||
|
@ -1334,7 +1334,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd, bool verbose)
|
||||
<< (unknown_tokens == 1 ? "" : "s")
|
||||
<< endl;
|
||||
}
|
||||
|
||||
|
||||
if (defaults.writeFile(defaults.fileName()))
|
||||
setMessage(_("Document defaults saved in ")
|
||||
+ MakeDisplayPath(fname));
|
||||
|
28
src/lyxrc.C
28
src/lyxrc.C
@ -83,7 +83,7 @@ keyword_item lyxrcTags[] = {
|
||||
{ "\\escape_chars", LyXRC::RC_ESC_CHARS },
|
||||
{ "\\font_encoding", LyXRC::RC_FONT_ENCODING },
|
||||
{ "\\format", LyXRC::RC_FORMAT },
|
||||
{ "\\index_command", LyXRC::RC_INDEX_COMMAND },
|
||||
{ "\\index_command", LyXRC::RC_INDEX_COMMAND },
|
||||
{ "\\input", LyXRC::RC_INPUT },
|
||||
{ "\\kbmap", LyXRC::RC_KBMAP },
|
||||
{ "\\kbmap_primary", LyXRC::RC_KBMAP_PRIMARY },
|
||||
@ -207,7 +207,7 @@ void LyXRC::setDefaults() {
|
||||
chktex_command = "chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38";
|
||||
bibtex_command = "bibtex";
|
||||
fontenc = "default";
|
||||
index_command = "makeindex -c -q";
|
||||
index_command = "makeindex -c -q";
|
||||
dpi = 75;
|
||||
// Because a screen typically is wider than a piece of paper:
|
||||
zoom = 150;
|
||||
@ -588,11 +588,11 @@ int LyXRC::read(LyXLex & lexrc)
|
||||
}
|
||||
break;
|
||||
|
||||
case RC_INDEX_COMMAND:
|
||||
if (lexrc.next()) {
|
||||
index_command = lexrc.getString();
|
||||
}
|
||||
break;
|
||||
case RC_INDEX_COMMAND:
|
||||
if (lexrc.next()) {
|
||||
index_command = lexrc.getString();
|
||||
}
|
||||
break;
|
||||
|
||||
case RC_SCREEN_DPI:
|
||||
if (lexrc.next()) {
|
||||
@ -1254,11 +1254,11 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc) const
|
||||
bibtex_command != system_lyxrc.bibtex_command) {
|
||||
os << "\\bibtex_command \"" << bibtex_command << "\"\n";
|
||||
}
|
||||
case RC_INDEX_COMMAND:
|
||||
if (ignore_system_lyxrc ||
|
||||
index_command != system_lyxrc.index_command) {
|
||||
os << "\\index_command \"" << index_command << "\"\n";
|
||||
}
|
||||
case RC_INDEX_COMMAND:
|
||||
if (ignore_system_lyxrc ||
|
||||
index_command != system_lyxrc.index_command) {
|
||||
os << "\\index_command \"" << index_command << "\"\n";
|
||||
}
|
||||
case RC_KBMAP:
|
||||
if (ignore_system_lyxrc ||
|
||||
use_kbmap != system_lyxrc.use_kbmap) {
|
||||
@ -2168,8 +2168,8 @@ string const LyXRC::getDescription(LyXRCTags tag)
|
||||
str = _("Define the options of bibtex (cf. man bibtex) or select an alternative compiler (e.g. mlbibtex or bibulus).");
|
||||
break;
|
||||
|
||||
case RC_INDEX_COMMAND:
|
||||
str = _("Define the options of makeindex (cf. man makeindex) or select an alternative compiler (e.g. xindy).");
|
||||
case RC_INDEX_COMMAND:
|
||||
str = _("Define the options of makeindex (cf. man makeindex) or select an alternative compiler (e.g. xindy).");
|
||||
break;
|
||||
|
||||
case RC_CURSOR_FOLLOWS_SCROLLBAR:
|
||||
|
10
src/lyxrc.h
10
src/lyxrc.h
@ -131,7 +131,7 @@ enum LyXRCTags {
|
||||
RC_USE_SPELL_LIB,
|
||||
RC_USER_NAME,
|
||||
RC_USER_EMAIL,
|
||||
RC_INDEX_COMMAND,
|
||||
RC_INDEX_COMMAND,
|
||||
RC_LAST
|
||||
};
|
||||
|
||||
@ -210,8 +210,8 @@ public:
|
||||
std::string chktex_command;
|
||||
/// command to run bibtex incl. options
|
||||
std::string bibtex_command;
|
||||
/// command to run makeindex incl. options or other index programs
|
||||
std::string index_command;
|
||||
/// command to run makeindex incl. options or other index programs
|
||||
std::string index_command;
|
||||
///
|
||||
std::string document_path;
|
||||
///
|
||||
@ -381,10 +381,10 @@ public:
|
||||
* having to expose lyxrc.h.
|
||||
*/
|
||||
class LyXRC_PreviewStatus {
|
||||
LyXRC::PreviewStatus val_;
|
||||
LyXRC::PreviewStatus val_;
|
||||
public:
|
||||
LyXRC_PreviewStatus(LyXRC::PreviewStatus val) : val_(val) {}
|
||||
operator LyXRC::PreviewStatus() const{ return val_; }
|
||||
operator LyXRC::PreviewStatus() const{ return val_; }
|
||||
};
|
||||
|
||||
|
||||
|
@ -58,8 +58,8 @@ private:
|
||||
std::string address_;
|
||||
/// Maximum number of simultaneous clients
|
||||
enum {
|
||||
MAX_CLIENTS = 10
|
||||
};
|
||||
MAX_CLIENTS = 10
|
||||
};
|
||||
/// All connections
|
||||
std::map<int, boost::shared_ptr<LyXDataSocket> > clients;
|
||||
};
|
||||
|
@ -276,7 +276,7 @@ void MathArray::metrics(MetricsInfo & mi) const
|
||||
void MathArray::draw(PainterInfo & pi, int x, int y) const
|
||||
{
|
||||
//lyxerr << "MathArray::draw: x: " << x << " y: " << y << endl;
|
||||
setXY(x, y);
|
||||
setXY(x, y);
|
||||
|
||||
if (empty()) {
|
||||
pi.pain.rectangle(x, y - ascent(), width(), height(), LColor::mathline);
|
||||
|
@ -1081,19 +1081,19 @@ bool MathHullInset::getStatus(LCursor & cur, FuncRequest const & cmd,
|
||||
string s;
|
||||
is >> s;
|
||||
if ((type_ == "simple" || type_ == "equation")
|
||||
&& (s == "append-column"
|
||||
|| s == "delete-column"
|
||||
|| s == "swap-column"
|
||||
|| s == "copy-column"
|
||||
|| s == "delete-column"
|
||||
|| s == "append-row"
|
||||
|| s == "delete-row"
|
||||
|| s == "swap-row"
|
||||
|| s == "copy-row"))
|
||||
&& (s == "append-column"
|
||||
|| s == "delete-column"
|
||||
|| s == "swap-column"
|
||||
|| s == "copy-column"
|
||||
|| s == "delete-column"
|
||||
|| s == "append-row"
|
||||
|| s == "delete-row"
|
||||
|| s == "swap-row"
|
||||
|| s == "copy-row"))
|
||||
return false;
|
||||
if ((type_ == "eqnarray")
|
||||
&& (s == "appen-column"
|
||||
|| s == "delete-column"))
|
||||
&& (s == "appen-column"
|
||||
|| s == "delete-column"))
|
||||
return false;
|
||||
return MathGridInset::getStatus(cur, cmd, flag);
|
||||
}
|
||||
|
@ -177,7 +177,7 @@ public:
|
||||
virtual void mutate(std::string const &) {}
|
||||
/// usually the latex name
|
||||
virtual std::string name() const;
|
||||
|
||||
|
||||
/// math stuff usually isn't allowed in text mode
|
||||
virtual bool allowedIn(mode_type mode) const { return mode == MATH_MODE; }
|
||||
};
|
||||
|
@ -927,7 +927,7 @@ void MathNestInset::lfunMouseMotion(LCursor & cur, FuncRequest & cmd)
|
||||
if (cmd.button() == mouse_button::button1) {
|
||||
LCursor & bvcur = cur.bv().cursor();
|
||||
if (abs(cmd.x - first_x) + abs(cmd.y - first_y) > 4
|
||||
&& bvcur.anchor_.hasPart(cur)) {
|
||||
&& bvcur.anchor_.hasPart(cur)) {
|
||||
first_x = cmd.x;
|
||||
first_y = cmd.y;
|
||||
|
||||
|
@ -581,7 +581,7 @@ fontinfo fontinfos[] = {
|
||||
{"textnormal", inh_family, inh_series,
|
||||
LyXFont::UP_SHAPE, LColor::foreground},
|
||||
{"textrm", LyXFont::ROMAN_FAMILY,
|
||||
inh_series,LyXFont::UP_SHAPE,LColor::foreground},
|
||||
inh_series, LyXFont::UP_SHAPE,LColor::foreground},
|
||||
{"textsc", inh_family, inh_series,
|
||||
LyXFont::SMALLCAPS_SHAPE, LColor::foreground},
|
||||
{"textsf", LyXFont::SANS_FAMILY, inh_series,
|
||||
@ -607,9 +607,9 @@ fontinfo fontinfos[] = {
|
||||
{"lyxboldsymbol", LyXFont::SYMBOL_FAMILY, LyXFont::BOLD_SERIES,
|
||||
inh_shape, LColor::math},
|
||||
{"lyxblacktext", LyXFont::ROMAN_FAMILY, LyXFont::MEDIUM_SERIES,
|
||||
LyXFont::UP_SHAPE, LColor::foreground},
|
||||
LyXFont::UP_SHAPE, LColor::foreground},
|
||||
{"lyxnochange", inh_family, inh_series,
|
||||
inh_shape, LColor::foreground},
|
||||
inh_shape, LColor::foreground},
|
||||
{"lyxfakebb", LyXFont::TYPEWRITER_FAMILY, LyXFont::BOLD_SERIES,
|
||||
LyXFont::UP_SHAPE, LColor::math},
|
||||
{"lyxfakecal", LyXFont::SANS_FAMILY, LyXFont::MEDIUM_SERIES,
|
||||
|
@ -61,7 +61,7 @@ MathArray const & MathXYArrowInset::targetCell() const
|
||||
<< "target: n: " << n << " out of range" << endl;
|
||||
n = 0;
|
||||
}
|
||||
return p->cell(n);
|
||||
return p->cell(n);
|
||||
#else
|
||||
static MathArray dummy;
|
||||
return dummy;
|
||||
@ -72,7 +72,7 @@ MathArray const & MathXYArrowInset::targetCell() const
|
||||
MathArray const & MathXYArrowInset::sourceCell() const
|
||||
{
|
||||
#if 0
|
||||
return targetMatrix()->cell(mi_.idx);
|
||||
return targetMatrix()->cell(mi_.idx);
|
||||
#else
|
||||
static MathArray dummy;
|
||||
return dummy;
|
||||
|
@ -122,10 +122,10 @@ StyleChanger::StyleChanger(MetricsBase & mb, Styles style)
|
||||
: Changer<MetricsBase>(mb)
|
||||
{
|
||||
static const int diff[4][4] =
|
||||
{ { 0, 0, -3, -5 },
|
||||
{ 0, 0, -3, -5 },
|
||||
{ 3, 3, 0, -2 },
|
||||
{ 5, 5, 2, 0 } };
|
||||
{ { 0, 0, -3, -5 },
|
||||
{ 0, 0, -3, -5 },
|
||||
{ 3, 3, 0, -2 },
|
||||
{ 5, 5, 2, 0 } };
|
||||
save_ = mb;
|
||||
int t = diff[mb.style][style];
|
||||
if (t > 0)
|
||||
|
@ -225,7 +225,7 @@ TeXOnePar(Buffer const & buf,
|
||||
|
||||
// In an an inset with unlimited length (all in one row),
|
||||
// force layout to default
|
||||
if (!pit->forceDefaultParagraphs())
|
||||
if (!pit->forceDefaultParagraphs())
|
||||
style = pit->layout();
|
||||
else
|
||||
style = bparams.getLyXTextClass().defaultLayout();
|
||||
@ -297,7 +297,7 @@ TeXOnePar(Buffer const & buf,
|
||||
os << '\n';
|
||||
texrow.newline();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
switch (style->latextype) {
|
||||
case LATEX_COMMAND:
|
||||
|
@ -1481,14 +1481,14 @@ bool IsInsetChar(char c)
|
||||
|
||||
bool Paragraph::isHfill(pos_type pos) const
|
||||
{
|
||||
return isInset(pos)
|
||||
return isInset(pos)
|
||||
&& getInset(pos)->lyxCode() == InsetBase::HFILL_CODE;
|
||||
}
|
||||
|
||||
|
||||
bool Paragraph::isNewline(pos_type pos) const
|
||||
{
|
||||
return isInset(pos)
|
||||
return isInset(pos)
|
||||
&& getInset(pos)->lyxCode() == InsetBase::NEWLINE_CODE;
|
||||
}
|
||||
|
||||
|
@ -60,9 +60,9 @@ cow_ptr<T>::cow_ptr(cow_ptr const & other)
|
||||
template <typename T>
|
||||
cow_ptr<T> & cow_ptr<T>::operator=(cow_ptr const & other)
|
||||
{
|
||||
if (&other != this)
|
||||
if (&other != this)
|
||||
ptr_ = other.ptr_;
|
||||
return *this;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
@ -114,7 +114,7 @@ T * cow_ptr<T>::get()
|
||||
template <typename T>
|
||||
void cow_ptr<T>::copy()
|
||||
{
|
||||
if (!ptr_.unique())
|
||||
if (!ptr_.unique())
|
||||
ptr_ = boost::shared_ptr<T>(new T(*ptr_.get()));
|
||||
}
|
||||
|
||||
|
@ -71,7 +71,7 @@ string const FileName::mangledFilename() const
|
||||
{
|
||||
// We need to make sure that every FileName instance for a given
|
||||
// filename returns the same mangled name.
|
||||
typedef map<string, string> MangledMap;
|
||||
typedef map<string, string> MangledMap;
|
||||
static MangledMap mangledNames;
|
||||
MangledMap::const_iterator const it = mangledNames.find(name_);
|
||||
if (it != mangledNames.end())
|
||||
|
@ -114,7 +114,7 @@ vector<string> const expand_globs(string const & mask,
|
||||
|
||||
FileFilterList::FileFilterList(string const & qt_style_filter)
|
||||
{
|
||||
string const filter = qt_style_filter
|
||||
string const filter = qt_style_filter
|
||||
+ (qt_style_filter.empty() ? string() : ";;")
|
||||
+ _("All files (*)");
|
||||
|
||||
|
@ -2341,7 +2341,7 @@ int LyXTabular::asciiTopHLine(ostream & os, int row,
|
||||
}
|
||||
int column = column_of_cell(i);
|
||||
int len = clen[column];
|
||||
while (column < columns_ - 1
|
||||
while (column < columns_ - 1
|
||||
&& isPartOfMultiColumn(row, ++column))
|
||||
len += clen[column] + 4;
|
||||
os << string(len, ch);
|
||||
|
@ -205,11 +205,11 @@ public:
|
||||
int getDescentOfRow(int row) const;
|
||||
///
|
||||
int getHeightOfTabular() const;
|
||||
///
|
||||
///
|
||||
void setAscentOfRow(int row, int height);
|
||||
///
|
||||
///
|
||||
void setDescentOfRow(int row, int height);
|
||||
///
|
||||
///
|
||||
void setWidthOfCell(int cell, int new_width);
|
||||
///
|
||||
void setAllLines(int cell, bool line);
|
||||
|
@ -50,7 +50,7 @@ void end_deeper(ostream & os)
|
||||
Context::Context(bool need_layout_,
|
||||
LyXTextClass const & textclass_,
|
||||
LyXLayout_ptr layout_, LyXLayout_ptr parent_layout_,
|
||||
Font font_)
|
||||
Font font_)
|
||||
: need_layout(need_layout_),
|
||||
need_end_layout(false), need_end_deeper(false),
|
||||
has_item(false), deeper_paragraph(false),
|
||||
|
@ -130,7 +130,7 @@ vector<string> split_options(string const & input)
|
||||
} else if (t.cat() != catSpace)
|
||||
option += t.asInput();
|
||||
}
|
||||
|
||||
|
||||
if (!option.empty())
|
||||
options.push_back(option);
|
||||
|
||||
|
@ -310,7 +310,7 @@ void translate_box_len(string const & length, string & value, string & unit, str
|
||||
* in \p extensions.
|
||||
*/
|
||||
string find_file(string const & name, string const & path,
|
||||
char const * const * extensions)
|
||||
char const * const * extensions)
|
||||
{
|
||||
for (char const * const * what = extensions; *what; ++what) {
|
||||
// We don't use ChangeExtension() because it does the wrong
|
||||
@ -500,7 +500,7 @@ void check_space(Parser const & p, ostream & os, Context & context)
|
||||
* \return true if the command was parsed, false otherwise.
|
||||
*/
|
||||
bool parse_command(string const & command, Parser & p, ostream & os,
|
||||
bool outer, Context & context)
|
||||
bool outer, Context & context)
|
||||
{
|
||||
if (known_commands.find(command) != known_commands.end()) {
|
||||
vector<ArgumentType> const & template_arguments = known_commands[command];
|
||||
@ -532,7 +532,7 @@ bool parse_command(string const & command, Parser & p, ostream & os,
|
||||
|
||||
/// Parses a minipage or parbox
|
||||
void parse_box(Parser & p, ostream & os, unsigned flags, bool outer,
|
||||
Context & parent_context, bool use_parbox)
|
||||
Context & parent_context, bool use_parbox)
|
||||
{
|
||||
string position;
|
||||
string inner_pos;
|
||||
@ -811,7 +811,7 @@ void parse_comment(Parser & p, ostream & os, Token const & t, Context & context)
|
||||
* Spaces are skipped, but comments are written to \p os.
|
||||
*/
|
||||
void eat_whitespace(Parser & p, ostream & os, Context & context,
|
||||
bool eatParagraph)
|
||||
bool eatParagraph)
|
||||
{
|
||||
while (p.good()) {
|
||||
Token const & t = p.get_token();
|
||||
@ -834,8 +834,8 @@ void eat_whitespace(Parser & p, ostream & os, Context & context,
|
||||
* \param newvalue New value of the attribute
|
||||
*/
|
||||
void parse_text_attributes(Parser & p, ostream & os, unsigned flags, bool outer,
|
||||
Context & context, string const & attribute,
|
||||
string & currentvalue, string const & newvalue)
|
||||
Context & context, string const & attribute,
|
||||
string & currentvalue, string const & newvalue)
|
||||
{
|
||||
context.check_layout(os);
|
||||
string oldvalue = currentvalue;
|
||||
@ -849,7 +849,7 @@ void parse_text_attributes(Parser & p, ostream & os, unsigned flags, bool outer,
|
||||
|
||||
/// get the arguments of a natbib or jurabib citation command
|
||||
std::pair<string, string> getCiteArguments(Parser & p, ostream & os,
|
||||
Context & context, bool natbibOrder)
|
||||
Context & context, bool natbibOrder)
|
||||
{
|
||||
// We need to distinguish "" and "[]", so we can't use p.getOpt().
|
||||
|
||||
|
@ -2113,9 +2113,9 @@ int LyXText::dist(int x, int y) const
|
||||
else if (y > yo_ + descent())
|
||||
yy = y - yo_ - descent();
|
||||
|
||||
lyxerr << " xo_=" << xo_ << " yo_=" << yo_
|
||||
lyxerr << " xo_=" << xo_ << " yo_=" << yo_
|
||||
<< " width_=" << width_ << " ascent=" << ascent()
|
||||
<< " descent=" << descent()
|
||||
<< " descent=" << descent()
|
||||
<< " dist=" << xx+yy <<endl;
|
||||
return xx + yy;
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ bool LyXText::isMainText() const
|
||||
|
||||
|
||||
// takes absolute x,y coordinates
|
||||
InsetBase * LyXText::checkInsetHit(int x, int y) const
|
||||
InsetBase * LyXText::checkInsetHit(int x, int y) const
|
||||
{
|
||||
par_type pit;
|
||||
par_type end;
|
||||
@ -822,7 +822,7 @@ void LyXText::setCounter(Buffer const & buf, par_type pit)
|
||||
in->lyxCode() == InsetBase::WRAP_CODE) {
|
||||
isOK = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
#ifdef WITH_WARNINGS
|
||||
#warning replace this code by something that works
|
||||
// This code does not work because we have currently no way to move up
|
||||
|
Loading…
Reference in New Issue
Block a user