mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-26 06:15:16 +00:00
Strip trailing whitespace.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6249 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
9ace9f41c5
commit
1fcedd4b63
@ -33,7 +33,7 @@ BulletsModule::BulletsModule(QWidget * parent, char const * name, WFlags fl)
|
||||
for (int iter = 0; iter < 4; ++iter) {
|
||||
bullets_[iter] = ITEMIZE_DEFAULTS[iter];
|
||||
}
|
||||
|
||||
|
||||
QPopupMenu * pm = new QPopupMenu(this);
|
||||
|
||||
QPopupMenu * pm1 = new QPopupMenu(pm);
|
||||
@ -170,7 +170,7 @@ void BulletsModule::setBullet(int font, int character)
|
||||
{
|
||||
activeitem_->setText(0,"");
|
||||
activeitem_->setPixmap(0,getPixmap(font,character));
|
||||
|
||||
|
||||
activebullet_->setFont(font);
|
||||
activebullet_->setCharacter(character);
|
||||
}
|
||||
@ -180,7 +180,7 @@ void BulletsModule::setBullet(string text)
|
||||
{
|
||||
activeitem_->setPixmap(0, QPixmap());
|
||||
activeitem_->setText(0, toqstr(text));
|
||||
|
||||
|
||||
activebullet_->setText(text);
|
||||
}
|
||||
|
||||
@ -240,7 +240,7 @@ void BulletsModule::ding2(int row, int col)
|
||||
void BulletsModule::ding3(int row, int col)
|
||||
{
|
||||
setBullet(4,6*row + col);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void BulletsModule::ding4(int row, int col)
|
||||
|
@ -34,7 +34,7 @@ public:
|
||||
void setBullet(int level, const Bullet & bullet);
|
||||
///
|
||||
Bullet getBullet(int level);
|
||||
|
||||
|
||||
protected slots:
|
||||
///
|
||||
void standard(int row, int col);
|
||||
@ -54,7 +54,7 @@ protected slots:
|
||||
void setActive(QListViewItem*);
|
||||
/// set size
|
||||
void setSize(int size);
|
||||
|
||||
|
||||
private:
|
||||
/// get the pixmap that matches font/character
|
||||
QPixmap getPixmap(int font, int character);
|
||||
@ -72,7 +72,7 @@ private:
|
||||
QListViewItem * activeitem_;
|
||||
/// store results
|
||||
boost::array<Bullet,4> bullets_;
|
||||
|
||||
|
||||
QBrowseBox * standard_;
|
||||
QBrowseBox * maths_;
|
||||
QBrowseBox * ding1_;
|
||||
|
@ -71,7 +71,7 @@ void QBibtex::update_contents()
|
||||
if (!bib.empty())
|
||||
dialog_->databaseLB->insertItem(toqstr(bib));
|
||||
}
|
||||
|
||||
|
||||
dialog_->addBibCB->clear();
|
||||
|
||||
vector<string> const bib_str = getVectorFromString(
|
||||
|
@ -69,9 +69,9 @@ void QBibtexDialog::browsePressed()
|
||||
}
|
||||
}
|
||||
|
||||
if (!present)
|
||||
if (!present)
|
||||
styleCB->insertItem(toqstr(filen),0);
|
||||
|
||||
|
||||
styleCB->setCurrentItem(pres);
|
||||
form_->changed();
|
||||
}
|
||||
|
@ -144,7 +144,7 @@ void QDocument::build_dialog()
|
||||
dialog_->layoutModule->pagestyleCO->insertItem(qt_("plain"));
|
||||
dialog_->layoutModule->pagestyleCO->insertItem(qt_("headings"));
|
||||
dialog_->layoutModule->pagestyleCO->insertItem(qt_("fancy"));
|
||||
|
||||
|
||||
dialog_->layoutModule->lspacingCO->insertItem(
|
||||
qt_("Single"), Spacing::Single);
|
||||
dialog_->layoutModule->lspacingCO->insertItem(
|
||||
@ -244,7 +244,7 @@ void QDocument::apply()
|
||||
// layout
|
||||
params.textclass =
|
||||
dialog_->layoutModule->classCO->currentItem();
|
||||
|
||||
|
||||
params.fonts =
|
||||
fromqstr(dialog_->layoutModule->fontsCO->currentText());
|
||||
|
||||
@ -253,7 +253,7 @@ void QDocument::apply()
|
||||
|
||||
params.pagestyle =
|
||||
fromqstr(dialog_->layoutModule->pagestyleCO->currentText());
|
||||
|
||||
|
||||
switch (dialog_->layoutModule->lspacingCO->currentItem()) {
|
||||
case 0:
|
||||
params.spacing.set(Spacing::Single);
|
||||
@ -345,8 +345,8 @@ void QDocument::apply()
|
||||
margin = margin - 1;
|
||||
}
|
||||
params.paperpackage = char(margin);
|
||||
|
||||
// set params.papersize from params.papersize2
|
||||
|
||||
// set params.papersize from params.papersize2
|
||||
// and params.paperpackage
|
||||
params.setPaperStuff();
|
||||
|
||||
@ -436,7 +436,7 @@ void QDocument::update_contents()
|
||||
|
||||
dialog_->langModule->quoteStyleCO->setCurrentItem(
|
||||
params.quotes_language);
|
||||
|
||||
|
||||
dialog_->langModule->defaultencodingCB->setChecked(true);
|
||||
|
||||
if (params.inputenc != "auto") {
|
||||
|
@ -239,7 +239,7 @@ QDocumentDialog::QDocumentDialog(QDocument * form)
|
||||
connect(paperModule->facingPagesCB, SIGNAL(toggled(bool)),
|
||||
this, SLOT(change_adaptor()));
|
||||
|
||||
// bullets
|
||||
// bullets
|
||||
connect(bulletsModule->bulletsizeCO, SIGNAL(activated(int)),
|
||||
this, SLOT(change_adaptor()));
|
||||
connect(bulletsModule->bulletsLV, SIGNAL(selectionChanged()),
|
||||
|
@ -72,7 +72,7 @@ void QIncludeDialog::typeChanged(int v)
|
||||
previewCB->setEnabled(false);
|
||||
previewCB->setChecked(false);
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
visiblespaceCB->setEnabled(true);
|
||||
previewCB->setEnabled(false);
|
||||
|
@ -97,7 +97,7 @@ void QLPopupMenu::populate(Menu * menu)
|
||||
res.second->populate(m->submenu());
|
||||
} else {
|
||||
FuncStatus const status = m->status();
|
||||
|
||||
|
||||
insertItem(toqstr(getLabel(*m)), m->action());
|
||||
setItemEnabled(m->action(), !status.disabled());
|
||||
setItemChecked(m->action(), status.onoff(true));
|
||||
|
@ -125,7 +125,7 @@ bool QLyXKeySym::isOK() const
|
||||
return ok;
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool QLyXKeySym::isModifier() const
|
||||
{
|
||||
bool const mod(q_is_modifier(key_));
|
||||
@ -163,12 +163,12 @@ bool QLyXKeySym::isText() const
|
||||
}
|
||||
|
||||
QChar const c(text_[0]);
|
||||
lyxerr[Debug::KEY] << "isText for key " << key_
|
||||
lyxerr[Debug::KEY] << "isText for key " << key_
|
||||
<< " isPrint is " << c.isPrint() << endl;
|
||||
return c.isPrint();
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool operator==(LyXKeySym const & k1, LyXKeySym const & k2)
|
||||
{
|
||||
QLyXKeySym const & q1(static_cast<QLyXKeySym const &>(k1));
|
||||
|
@ -49,7 +49,7 @@ public:
|
||||
|
||||
/// Is this normal insertable text ? (last ditch attempt only)
|
||||
virtual bool isText() const;
|
||||
|
||||
|
||||
/**
|
||||
* Return the value of the keysym into the local ISO encoding.
|
||||
* This converts the LyXKeySym to a 8-bit encoded character.
|
||||
|
@ -382,7 +382,7 @@ void QPrefs::update_contents()
|
||||
QPrefIdentityModule * idmod(dialog_->identityModule);
|
||||
idmod->nameED->setText(toqstr(rc.user_name));
|
||||
idmod->emailED->setText(toqstr(rc.user_email));
|
||||
|
||||
|
||||
|
||||
QPrefKeyboardModule * keymod(dialog_->keyboardModule);
|
||||
|
||||
|
@ -34,9 +34,9 @@ void uniqueInsert(QComboBox * box, QString const & text)
|
||||
|
||||
box->insertItem(text);
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
QSearchDialog::QSearchDialog(QSearch * form)
|
||||
: QSearchDialogBase(0, 0, false, 0),
|
||||
|
@ -69,7 +69,7 @@ void QSpellchecker::replace()
|
||||
|
||||
void QSpellchecker::partialUpdate(int s)
|
||||
{
|
||||
ControlSpellchecker::State const state =
|
||||
ControlSpellchecker::State const state =
|
||||
static_cast<ControlSpellchecker::State>(s);
|
||||
|
||||
switch (state) {
|
||||
|
@ -23,7 +23,7 @@ public:
|
||||
QSpellcheckerDialog(QSpellchecker * form);
|
||||
public slots:
|
||||
virtual void suggestionChanged(const QString &);
|
||||
|
||||
|
||||
protected slots:
|
||||
virtual void acceptClicked();
|
||||
virtual void addClicked();
|
||||
|
@ -51,7 +51,7 @@ void QURL::update_contents()
|
||||
dialog_->urlED->setText(toqstr(params.getContents()));
|
||||
dialog_->nameED->setText(toqstr(params.getOptions()));
|
||||
dialog_->hyperlinkCB->setChecked(params.getCmdName() != "url");
|
||||
|
||||
|
||||
bc().valid(isValid());
|
||||
}
|
||||
|
||||
|
@ -183,7 +183,7 @@ void lyx_gui::exit()
|
||||
// into a static dialog return in the lyx code (for example,
|
||||
// load autosave file QMessageBox. We have to just get the hell
|
||||
// out.
|
||||
|
||||
|
||||
::exit(0);
|
||||
}
|
||||
|
||||
|
@ -351,7 +351,7 @@ qfont_loader::font_info * qfont_loader::getfontinfo(LyXFont const & f)
|
||||
font_info * fi = fontinfo_[f.family()][f.series()][f.realShape()][f.size()];
|
||||
if (fi)
|
||||
return fi;
|
||||
|
||||
|
||||
font_info * fi2 = new font_info(f);
|
||||
fontinfo_[f.family()][f.series()][f.realShape()][f.size()] = fi2;
|
||||
return fi2;
|
||||
@ -371,7 +371,7 @@ int qfont_loader::charwidth(LyXFont const & f, Uchar val)
|
||||
return w;
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool qfont_loader::available(LyXFont const & f)
|
||||
{
|
||||
if (!lyxrc.use_gui)
|
||||
|
@ -14,13 +14,13 @@
|
||||
|
||||
|
||||
#include <map>
|
||||
|
||||
|
||||
#include "encoding.h"
|
||||
#include "lyxfont.h"
|
||||
|
||||
#include <qfont.h>
|
||||
#include <qfontmetrics.h>
|
||||
|
||||
|
||||
/**
|
||||
* Qt font loader for LyX. Matches LyXFonts against
|
||||
* actual QFont instances, and also caches metrics.
|
||||
@ -59,7 +59,7 @@ private:
|
||||
QFontMetrics metrics;
|
||||
|
||||
typedef std::map<Uchar, int> WidthCache;
|
||||
/// cache of char widths
|
||||
/// cache of char widths
|
||||
WidthCache widthcache;
|
||||
};
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
#include <qfontmetrics.h>
|
||||
#include <qfont.h>
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
QFontMetrics const & metrics(LyXFont const & f)
|
||||
@ -29,12 +29,12 @@ QFontMetrics const & metrics(LyXFont const & f)
|
||||
return fontloader.metrics(f);
|
||||
}
|
||||
|
||||
|
||||
|
||||
int charwidth(Uchar val, LyXFont const & f)
|
||||
{
|
||||
if (!lyxrc.use_gui)
|
||||
return 1;
|
||||
return fontloader.charwidth(f, val);
|
||||
return fontloader.charwidth(f, val);
|
||||
}
|
||||
|
||||
} // namespace anon
|
||||
@ -104,7 +104,7 @@ Encoding const * fontencoding(LyXFont const & f)
|
||||
encoding = encodings.symbol_encoding();
|
||||
return encoding;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int smallcapswidth(char const * s, size_t ls, LyXFont const & f)
|
||||
{
|
||||
@ -119,7 +119,7 @@ int smallcapswidth(char const * s, size_t ls, LyXFont const & f)
|
||||
QFontMetrics const & qsmallm = fontloader.metrics(smallfont);
|
||||
|
||||
Encoding const * encoding(fontencoding(f));
|
||||
|
||||
|
||||
int w = 0;
|
||||
|
||||
for (size_t i = 0; i < ls; ++i) {
|
||||
@ -132,7 +132,7 @@ int smallcapswidth(char const * s, size_t ls, LyXFont const & f)
|
||||
}
|
||||
return w;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int width(char const * s, size_t ls, LyXFont const & f)
|
||||
{
|
||||
@ -142,7 +142,7 @@ int width(char const * s, size_t ls, LyXFont const & f)
|
||||
if (f.realShape() == LyXFont::SMALLCAPS_SHAPE) {
|
||||
return smallcapswidth(s, ls, f);
|
||||
}
|
||||
|
||||
|
||||
Encoding const * encoding(fontencoding(f));
|
||||
|
||||
if (ls == 1) {
|
||||
@ -150,11 +150,11 @@ int width(char const * s, size_t ls, LyXFont const & f)
|
||||
}
|
||||
|
||||
int w = 0;
|
||||
|
||||
|
||||
for (size_t i = 0; i < ls; ++i) {
|
||||
w += charwidth(encoding->ucs(s[i]), f);
|
||||
}
|
||||
|
||||
|
||||
return w;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
** $Id: qgridview.C,v 1.1 2003/01/13 10:39:18 larsbj Exp $
|
||||
** $Id: qgridview.C,v 1.2 2003/02/25 13:35:26 leeming Exp $
|
||||
**
|
||||
** Implementation of QGridView class
|
||||
**
|
||||
@ -146,7 +146,7 @@ void QGridView::setCellWidth( int cellWidth )
|
||||
cellw = cellWidth;
|
||||
updateGrid();
|
||||
updateContents( contentsX(), contentsY(), visibleWidth(), visibleHeight() );
|
||||
|
||||
|
||||
}
|
||||
|
||||
/*! \property QGridView::cellHeight
|
||||
@ -161,7 +161,7 @@ void QGridView::setCellHeight( int cellHeight )
|
||||
cellh = cellHeight;
|
||||
updateGrid();
|
||||
updateContents( contentsX(), contentsY(), visibleWidth(), visibleHeight() );
|
||||
|
||||
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -13,7 +13,7 @@
|
||||
#define QTTIMEOUT_H
|
||||
|
||||
#include "frontends/Timeout.h"
|
||||
#include <qobject.h>
|
||||
#include <qobject.h>
|
||||
|
||||
// stupid Qt
|
||||
#undef emit
|
||||
|
@ -14,9 +14,9 @@
|
||||
#include "support/lstrings.h"
|
||||
#include "gettext.h"
|
||||
#include "qt_helpers.h"
|
||||
|
||||
|
||||
#include "lengthcombo.h"
|
||||
|
||||
|
||||
#include <qglobal.h>
|
||||
#include <qlineedit.h>
|
||||
#include <qtextcodec.h>
|
||||
@ -53,7 +53,7 @@ pair<string,string> parseFontName(string const & name)
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
string widgetsToLength(QLineEdit const * input, LengthCombo const * combo)
|
||||
{
|
||||
QString length = input->text();
|
||||
|
@ -18,22 +18,22 @@
|
||||
#include <utility>
|
||||
|
||||
#include "lyxlength.h"
|
||||
|
||||
|
||||
class LengthCombo;
|
||||
class QLineEdit;
|
||||
class QString;
|
||||
|
||||
|
||||
string makeFontName(string const & family, string const & foundry);
|
||||
|
||||
|
||||
std::pair<string,string> parseFontName(string const & name);
|
||||
|
||||
/// method to get a LyXLength from widgets
|
||||
string widgetsToLength(QLineEdit const * input, LengthCombo const * combo);
|
||||
|
||||
|
||||
/// method to set widgets from a LyXLength
|
||||
void lengthToWidgets(QLineEdit * input, LengthCombo * combo,
|
||||
string const & len, LyXLength::UNIT default_unit);
|
||||
|
||||
|
||||
/**
|
||||
* toqstr - convert char * into unicode
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user