mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
Fix trailing whitespace in cpp files.
This commit is contained in:
parent
51aebc9327
commit
75bfed5507
@ -31,13 +31,13 @@ struct AppleSpellChecker::Private
|
||||
SpellChecker::Result toResult(SpellCheckResult status);
|
||||
string toString(SpellCheckResult status);
|
||||
int numDictionaries() const;
|
||||
|
||||
|
||||
/// the speller
|
||||
AppleSpeller speller;
|
||||
|
||||
|
||||
/// language map
|
||||
map<string, string> languageMap;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
@ -137,7 +137,7 @@ void AppleSpellChecker::suggest(WordLangTuple const & wl,
|
||||
{
|
||||
suggestions.clear();
|
||||
string const word_str = to_utf8(wl.word());
|
||||
size_t num = AppleSpeller_makeSuggestion(d->speller,
|
||||
size_t num = AppleSpeller_makeSuggestion(d->speller,
|
||||
word_str.c_str(), wl.lang()->code().c_str());
|
||||
for (size_t i = 0; i < num; i++) {
|
||||
char const * next = AppleSpeller_getSuggestion(d->speller, i);
|
||||
@ -181,7 +181,7 @@ int AppleSpellChecker::numDictionaries() const
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int AppleSpellChecker::numMisspelledWords() const
|
||||
{
|
||||
return AppleSpeller_numMisspelledWords(d->speller);
|
||||
|
@ -144,7 +144,7 @@ AspellChecker::Private::~Private()
|
||||
|
||||
LangPersonalWordList::const_iterator pdit = personal_.begin();
|
||||
LangPersonalWordList::const_iterator pdet = personal_.end();
|
||||
|
||||
|
||||
for (; pdit != pdet; ++pdit) {
|
||||
if ( 0 == pdit->second)
|
||||
continue;
|
||||
@ -294,7 +294,7 @@ AspellSpeller * AspellChecker::Private::addSpeller(Language const * lang)
|
||||
personal_[lang->lang()] = pd;
|
||||
initSessionDictionary(m, pd);
|
||||
}
|
||||
|
||||
|
||||
spellers_[lang->lang()] = m;
|
||||
return m.e_speller ? to_aspell_speller(m.e_speller) : 0;
|
||||
}
|
||||
@ -352,7 +352,7 @@ string AspellChecker::Private::toAspellWord(docstring const & word) const
|
||||
|
||||
|
||||
SpellChecker::Result AspellChecker::Private::check(
|
||||
AspellSpeller * m, WordLangTuple const & word)
|
||||
AspellSpeller * m, WordLangTuple const & word)
|
||||
const
|
||||
{
|
||||
SpellChecker::Result result = WORD_OK;
|
||||
@ -396,7 +396,7 @@ void AspellChecker::Private::remove(WordLangTuple const & word)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void AspellChecker::Private::insert(WordLangTuple const & word)
|
||||
{
|
||||
Spellers::iterator it = spellers_.find(word.lang()->lang());
|
||||
@ -431,7 +431,7 @@ AspellChecker::~AspellChecker()
|
||||
|
||||
SpellChecker::Result AspellChecker::check(WordLangTuple const & word)
|
||||
{
|
||||
|
||||
|
||||
AspellSpeller * m = d->speller(word.lang());
|
||||
|
||||
if (!m)
|
||||
@ -529,8 +529,8 @@ int AspellChecker::numDictionaries() const
|
||||
{
|
||||
return d->numDictionaries();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
docstring const AspellChecker::error()
|
||||
{
|
||||
Spellers::iterator it = d->spellers_.begin();
|
||||
|
@ -184,7 +184,7 @@ ostream & operator<<(ostream & os, AuthorList const & a)
|
||||
|
||||
for (; a_it != a_end; ++a_it) {
|
||||
if (a_it->used() && a_it->valid())
|
||||
os << "\\author " << *a_it << "\n";
|
||||
os << "\\author " << *a_it << "\n";
|
||||
}
|
||||
return os;
|
||||
}
|
||||
|
@ -503,8 +503,8 @@ docstring const BibTeXInfo::getAuthorOrEditorList(Buffer const * buf,
|
||||
}
|
||||
|
||||
|
||||
docstring const BibTeXInfo::getAuthorList(Buffer const * buf,
|
||||
docstring const & author, bool const full, bool const forceshort,
|
||||
docstring const BibTeXInfo::getAuthorList(Buffer const * buf,
|
||||
docstring const & author, bool const full, bool const forceshort,
|
||||
bool const allnames, bool const beginning) const
|
||||
{
|
||||
// Maxnames treshold depend on engine
|
||||
@ -760,7 +760,7 @@ docstring parseOptions(docstring const & format, string & optkey,
|
||||
|
||||
/* FIXME
|
||||
Bug #9131 revealed an oddity in how we are generating citation information
|
||||
when more than one key is given. We end up building a longer and longer format
|
||||
when more than one key is given. We end up building a longer and longer format
|
||||
string as we go, which we then have to re-parse, over and over and over again,
|
||||
rather than generating the information for the individual keys and then putting
|
||||
all of that together. We do that to deal with the way separators work, from what
|
||||
|
@ -536,7 +536,7 @@ Buffer::~Buffer()
|
||||
Impl::BufferPositionMap::iterator end = d->children_positions.end();
|
||||
for (; it != end; ++it) {
|
||||
Buffer * child = const_cast<Buffer *>(it->first);
|
||||
if (theBufferList().isLoaded(child)) {
|
||||
if (theBufferList().isLoaded(child)) {
|
||||
if (theBufferList().isOthersChild(this, child))
|
||||
child->setParent(0);
|
||||
else
|
||||
@ -1934,7 +1934,7 @@ void Buffer::writeLaTeXSource(otexstream & os,
|
||||
support::bformat(_("The languages %1$s are only supported by Polyglossia."), langs)
|
||||
: support::bformat(_("The language %1$s is only supported by Polyglossia."), langs);
|
||||
if (!blangs.empty())
|
||||
plangs += "\n";
|
||||
plangs += "\n";
|
||||
}
|
||||
|
||||
frontend::Alert::warning(
|
||||
@ -5023,7 +5023,7 @@ void Buffer::updateBuffer(ParIterator & parit, UpdateType utype) const
|
||||
// set the counter for this paragraph
|
||||
d->setLabel(parit, utype);
|
||||
|
||||
// update change-tracking flag
|
||||
// update change-tracking flag
|
||||
parit->addChangesToBuffer(*this);
|
||||
|
||||
// now the insets
|
||||
|
@ -201,7 +201,7 @@ Buffer * BufferList::next(Buffer const * buf) const
|
||||
|
||||
if (bstore.empty())
|
||||
return 0;
|
||||
BufferStorage::const_iterator it =
|
||||
BufferStorage::const_iterator it =
|
||||
find(bstore.begin(), bstore.end(), buf);
|
||||
LASSERT(it != bstore.end(), return 0);
|
||||
++it;
|
||||
@ -217,7 +217,7 @@ Buffer * BufferList::previous(Buffer const * buf) const
|
||||
|
||||
if (bstore.empty())
|
||||
return 0;
|
||||
BufferStorage::const_iterator it =
|
||||
BufferStorage::const_iterator it =
|
||||
find(bstore.begin(), bstore.end(), buf);
|
||||
LASSERT(it != bstore.end(), return 0);
|
||||
|
||||
@ -284,7 +284,7 @@ bool BufferList::isOthersChild(Buffer * parent, Buffer * child)
|
||||
LASSERT(parent, return false);
|
||||
LASSERT(child, return false);
|
||||
LASSERT(parent->isChild(child), return false);
|
||||
|
||||
|
||||
// Does child document have a different parent?
|
||||
Buffer const * parent_ = child->parent();
|
||||
if (parent_ && parent_ != parent)
|
||||
|
@ -1553,7 +1553,7 @@ void BufferParams::validate(LaTeXFeatures & features) const
|
||||
|
||||
if (useNonTeXFonts && fontsMath() != "auto")
|
||||
features.require("unicode-math");
|
||||
|
||||
|
||||
if (use_microtype)
|
||||
features.require("microtype");
|
||||
|
||||
@ -2578,7 +2578,7 @@ FormatList const & BufferParams::exportableFormats(bool only_viewable) const
|
||||
{
|
||||
FormatList & cached = only_viewable ?
|
||||
pimpl_->viewableFormatList : pimpl_->exportableFormatList;
|
||||
bool & valid = only_viewable ?
|
||||
bool & valid = only_viewable ?
|
||||
pimpl_->isViewCacheValid : pimpl_->isExportCacheValid;
|
||||
if (valid)
|
||||
return cached;
|
||||
@ -2593,7 +2593,7 @@ FormatList const & BufferParams::exportableFormats(bool only_viewable) const
|
||||
theConverters().getReachable(backs[0], only_viewable, true, excludes);
|
||||
for (vector<string>::const_iterator it = backs.begin() + 1;
|
||||
it != backs.end(); ++it) {
|
||||
FormatList r = theConverters().getReachable(*it, only_viewable,
|
||||
FormatList r = theConverters().getReachable(*it, only_viewable,
|
||||
false, excludes);
|
||||
result.insert(result.end(), r.begin(), r.end());
|
||||
}
|
||||
@ -3368,7 +3368,7 @@ string const BufferParams::loadFonts(LaTeXFeatures & features) const
|
||||
Encoding const & BufferParams::encoding() const
|
||||
{
|
||||
// Main encoding for LaTeX output.
|
||||
//
|
||||
//
|
||||
// Exception: XeTeX with 8-bit TeX fonts requires ASCII (see #9740).
|
||||
// As the "flavor" is only known once export started, this
|
||||
// cannot be handled here. Instead, runparams.encoding is set
|
||||
|
@ -1368,7 +1368,7 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
|
||||
// we only need to do this if we have deleted or restored a
|
||||
// BiBTeX inset. but there is no other place to do it. one
|
||||
// obvious idea is to try to do it in a copy constructor for
|
||||
// InsetBibTeX, but when that is invoked, the buffer_ member
|
||||
// InsetBibTeX, but when that is invoked, the buffer_ member
|
||||
// is not yet set. another idea is to look at the InsetLists
|
||||
// of the various paragraphs. but we'd have to recurse through
|
||||
// the contained insets to make that work. it doesn't seem to
|
||||
|
@ -142,7 +142,7 @@ void Changes::set(Change const & change, pos_type const start, pos_type const en
|
||||
{
|
||||
if (change.type != Change::UNCHANGED) {
|
||||
LYXERR(Debug::CHANGES, "setting change (type: " << change.type
|
||||
<< ", author: " << change.author
|
||||
<< ", author: " << change.author
|
||||
<< ", time: " << long(change.changetime)
|
||||
<< ") in range (" << start << ", " << end << ")");
|
||||
}
|
||||
@ -415,11 +415,11 @@ int Changes::latexMarkChange(otexstream & os, BufferParams const & bparams,
|
||||
}
|
||||
else if (change.type == Change::INSERTED)
|
||||
macro_beg = from_ascii("\\lyxadded{");
|
||||
|
||||
|
||||
docstring str = getLaTeXMarkup(macro_beg,
|
||||
bparams.authors().get(change.author).name(),
|
||||
chgTime, runparams);
|
||||
|
||||
|
||||
// signature needed by \lyxsout to correctly strike out display math
|
||||
if (change.type == Change::DELETED && runparams.inDisplayMath
|
||||
&& (!LaTeXFeatures::isAvailable("dvipost")
|
||||
|
@ -151,12 +151,12 @@ void CmdDef::release(string const & name)
|
||||
}
|
||||
|
||||
|
||||
CmdDef::newCmdDefResult CmdDef::newCmdDef(string const & name,
|
||||
CmdDef::newCmdDefResult CmdDef::newCmdDef(string const & name,
|
||||
string const & def)
|
||||
{
|
||||
string const name2 = trim(name);
|
||||
|
||||
if (name2.empty())
|
||||
if (name2.empty())
|
||||
return CmdDefNameEmpty;
|
||||
|
||||
if (cmdDefMap.find(name) != cmdDefMap.end())
|
||||
|
@ -90,7 +90,7 @@ RGBColor rgbFromHexName(string const & x11hexname)
|
||||
string const outputLaTeXColor(RGBColor const & color)
|
||||
{
|
||||
// this routine returns a LaTeX readable color string in the form
|
||||
// "red, green, blue" where the colors are a number in the range 0-1
|
||||
// "red, green, blue" where the colors are a number in the range 0-1
|
||||
int red = color.r;
|
||||
int green = color.g;
|
||||
int blue = color.b;
|
||||
@ -152,7 +152,7 @@ RGBColor const RGBColorFromLaTeX(string const & color)
|
||||
}
|
||||
|
||||
|
||||
Color::Color(ColorCode base_color) : baseColor(base_color),
|
||||
Color::Color(ColorCode base_color) : baseColor(base_color),
|
||||
mergeColor(Color_ignore)
|
||||
{}
|
||||
|
||||
@ -163,7 +163,7 @@ bool Color::operator==(Color const & color) const
|
||||
}
|
||||
|
||||
|
||||
bool Color::operator!=(Color const & color) const
|
||||
bool Color::operator!=(Color const & color) const
|
||||
{
|
||||
return baseColor != color.baseColor;
|
||||
}
|
||||
|
@ -392,7 +392,7 @@ void Compare::run()
|
||||
dest_buffer->params().authors().record(*it);
|
||||
|
||||
// We will need this later
|
||||
DocumentClassConstPtr const olddc =
|
||||
DocumentClassConstPtr const olddc =
|
||||
dest_buffer->params().documentClassPtr();
|
||||
// We do not want to share the DocumentClass with the other Buffer.
|
||||
// See bug #10295.
|
||||
|
@ -785,7 +785,7 @@ FormatList const Converters::intToFormat(vector<int> const & input)
|
||||
}
|
||||
|
||||
|
||||
FormatList const Converters::getReachableTo(string const & target,
|
||||
FormatList const Converters::getReachableTo(string const & target,
|
||||
bool const clear_visited)
|
||||
{
|
||||
vector<int> const & reachablesto =
|
||||
@ -795,8 +795,8 @@ FormatList const Converters::getReachableTo(string const & target,
|
||||
}
|
||||
|
||||
|
||||
FormatList const Converters::getReachable(string const & from,
|
||||
bool const only_viewable, bool const clear_visited,
|
||||
FormatList const Converters::getReachable(string const & from,
|
||||
bool const only_viewable, bool const clear_visited,
|
||||
set<string> const & excludes)
|
||||
{
|
||||
set<int> excluded_numbers;
|
||||
|
@ -254,7 +254,7 @@ void ConverterCache::init()
|
||||
|
||||
void ConverterCache::writeIndex() const
|
||||
{
|
||||
if (!lyxrc.use_converter_cache
|
||||
if (!lyxrc.use_converter_cache
|
||||
|| cache_dir.empty())
|
||||
return;
|
||||
pimpl_->writeIndex();
|
||||
|
@ -65,7 +65,7 @@ pos_type CursorSlice::lastpos() const
|
||||
LBUFERR(inset_);
|
||||
InsetMath const * math = inset_->asInsetMath();
|
||||
bool paramless_macro = math && math->asMacro() && !math->asMacro()->nargs();
|
||||
return math ? (paramless_macro ? 0 : cell().size())
|
||||
return math ? (paramless_macro ? 0 : cell().size())
|
||||
: (text()->empty() ? 0 : paragraph().size());
|
||||
}
|
||||
|
||||
|
@ -243,7 +243,7 @@ pasteSelectionHelper(DocIterator const & cur, ParagraphList const & parlist,
|
||||
|
||||
InsetIterator const i_end = inset_iterator_end(in);
|
||||
for (InsetIterator it = inset_iterator_begin(in); it != i_end; ++it) {
|
||||
// Even though this will also be done later, it has to be done here
|
||||
// Even though this will also be done later, it has to be done here
|
||||
// since some inset might going to try to access
|
||||
// the buffer() member.
|
||||
it->setBuffer(const_cast<Buffer &>(buffer));
|
||||
@ -471,7 +471,7 @@ PitPosPair eraseSelectionHelper(BufferParams const & params,
|
||||
|
||||
// Separate handling of paragraph break:
|
||||
if (merge && pit != endpit &&
|
||||
(pit + 1 != endpit
|
||||
(pit + 1 != endpit
|
||||
|| pars[pit].hasSameLayout(pars[endpit])
|
||||
|| pars[endpit].size() == endpos)) {
|
||||
if (pit + 1 == endpit)
|
||||
@ -536,7 +536,7 @@ Buffer * copyToTempBuffer(ParagraphList const & paragraphs, DocumentClassConstPt
|
||||
}
|
||||
|
||||
|
||||
void putClipboard(ParagraphList const & paragraphs,
|
||||
void putClipboard(ParagraphList const & paragraphs,
|
||||
DocumentClassConstPtr docclass, docstring const & plaintext)
|
||||
{
|
||||
Buffer * buffer = copyToTempBuffer(paragraphs, docclass);
|
||||
@ -636,7 +636,7 @@ void copySelectionHelper(Buffer const & buf, Text const & text,
|
||||
// latex_language. This is invalid for others, so we
|
||||
// need to change it to the buffer language.
|
||||
if (it->isPassThru())
|
||||
it->changeLanguage(buf.params(),
|
||||
it->changeLanguage(buf.params(),
|
||||
latex_language, buf.language());
|
||||
}
|
||||
|
||||
@ -705,11 +705,11 @@ bool reduceSelectionToOneCell(Cursor & cur)
|
||||
// the easy case: do nothing if only one cell is selected
|
||||
if (i1.idx() == i2.idx())
|
||||
return true;
|
||||
|
||||
|
||||
cur.top().pos() = 0;
|
||||
cur.resetAnchor();
|
||||
cur.top().pos() = cur.top().lastpos();
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -718,15 +718,15 @@ bool multipleCellsSelected(Cursor const & cur)
|
||||
{
|
||||
if (!cur.selection() || !cur.inMathed())
|
||||
return false;
|
||||
|
||||
|
||||
CursorSlice i1 = cur.selBegin();
|
||||
CursorSlice i2 = cur.selEnd();
|
||||
if (!i1.inset().asInsetMath())
|
||||
return false;
|
||||
|
||||
|
||||
if (i1.idx() == i2.idx())
|
||||
return false;
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -739,7 +739,7 @@ void switchBetweenClasses(DocumentClassConstPtr oldone,
|
||||
LBUFERR(!in.paragraphs().empty());
|
||||
if (oldone == newone)
|
||||
return;
|
||||
|
||||
|
||||
DocumentClass const & oldtc = *oldone;
|
||||
DocumentClass const & newtc = *newone;
|
||||
|
||||
@ -782,7 +782,7 @@ void switchBetweenClasses(DocumentClassConstPtr oldone,
|
||||
n == DocumentClass::plainInsetLayout().name();
|
||||
if (!is_undefined)
|
||||
continue;
|
||||
|
||||
|
||||
// The flex inset is undefined in newtc
|
||||
docstring const oldname = from_utf8(oldtc.name());
|
||||
docstring const newname = from_utf8(newtc.name());
|
||||
@ -988,7 +988,7 @@ void copySelectionToStack(Cursor const & cur, CutStack & cutstack)
|
||||
// and sel_end cursor
|
||||
copySelectionHelper(*cur.buffer(), *text,
|
||||
cur.selBegin().pit(), cur.selEnd().pit(),
|
||||
cur.selBegin().pos(), cur.selEnd().pos(),
|
||||
cur.selBegin().pos(), cur.selEnd().pos(),
|
||||
cur.buffer()->params().documentClassPtr(),
|
||||
cutstack);
|
||||
// Reset the dirty_tabular_stack_ flag only when something
|
||||
@ -1048,7 +1048,7 @@ void saveSelection(Cursor const & cur)
|
||||
// This function is called, not when a selection is formed, but when
|
||||
// a selection is cleared. Therefore, multiple keyboard selection
|
||||
// will not repeatively trigger this function (bug 3877).
|
||||
if (cur.selection()
|
||||
if (cur.selection()
|
||||
&& cur.selBegin() == cur.bv().cursor().selBegin()
|
||||
&& cur.selEnd() == cur.bv().cursor().selEnd()) {
|
||||
LYXERR(Debug::SELECTION, "saveSelection: '" << cur.selectionAsString(true) << "'");
|
||||
|
@ -60,7 +60,7 @@ DocIterator::DocIterator(Buffer * buf, Inset * inset)
|
||||
|
||||
DocIterator doc_iterator_begin(const Buffer * buf0, const Inset * inset0)
|
||||
{
|
||||
Buffer * buf = const_cast<Buffer *>(buf0);
|
||||
Buffer * buf = const_cast<Buffer *>(buf0);
|
||||
Inset * inset = const_cast<Inset *>(inset0);
|
||||
DocIterator dit(buf, inset ? inset : &buf->inset());
|
||||
dit.forwardPos();
|
||||
@ -70,7 +70,7 @@ DocIterator doc_iterator_begin(const Buffer * buf0, const Inset * inset0)
|
||||
|
||||
DocIterator doc_iterator_end(const Buffer * buf0, const Inset * inset0)
|
||||
{
|
||||
Buffer * buf = const_cast<Buffer *>(buf0);
|
||||
Buffer * buf = const_cast<Buffer *>(buf0);
|
||||
Inset * inset = const_cast<Inset *>(inset0);
|
||||
return DocIterator(buf, inset ? inset : &buf->inset());
|
||||
}
|
||||
@ -96,7 +96,7 @@ DocIterator DocIterator::clone(Buffer * buffer) const
|
||||
bool DocIterator::inRegexped() const
|
||||
{
|
||||
InsetMath * im = inset().asInsetMath();
|
||||
if (!im)
|
||||
if (!im)
|
||||
return false;
|
||||
InsetMathHull * hull = im->asHullInset();
|
||||
return hull && hull->getType() == hullRegexp;
|
||||
@ -554,7 +554,7 @@ bool DocIterator::fixIfBroken()
|
||||
if (empty())
|
||||
return false;
|
||||
|
||||
// Go through the slice stack from the bottom.
|
||||
// Go through the slice stack from the bottom.
|
||||
// Check that all coordinates (idx, pit, pos) are correct and
|
||||
// that the inset is the one which is claimed to be there
|
||||
Inset * inset = &slices_[0].inset();
|
||||
@ -653,7 +653,7 @@ int DocIterator::find(MathData const & cell) const
|
||||
}
|
||||
|
||||
|
||||
int DocIterator::find(Inset const * inset) const
|
||||
int DocIterator::find(Inset const * inset) const
|
||||
{
|
||||
for (size_t l = 0; l != slices_.size(); ++l) {
|
||||
if (&slices_[l].inset() == inset)
|
||||
@ -676,13 +676,13 @@ void DocIterator::cutOff(int above)
|
||||
}
|
||||
|
||||
|
||||
void DocIterator::append(vector<CursorSlice> const & x)
|
||||
void DocIterator::append(vector<CursorSlice> const & x)
|
||||
{
|
||||
slices_.insert(slices_.end(), x.begin(), x.end());
|
||||
}
|
||||
|
||||
|
||||
void DocIterator::append(DocIterator::idx_type idx, pos_type pos)
|
||||
void DocIterator::append(DocIterator::idx_type idx, pos_type pos)
|
||||
{
|
||||
slices_.push_back(CursorSlice());
|
||||
top().idx() = idx;
|
||||
|
@ -35,7 +35,7 @@ struct Speller {
|
||||
};
|
||||
|
||||
typedef map<string, Speller> Spellers;
|
||||
|
||||
|
||||
} // anon namespace
|
||||
|
||||
struct EnchantChecker::Private
|
||||
@ -92,7 +92,7 @@ enchant::Dict * EnchantChecker::Private::speller(string const & lang)
|
||||
Spellers::iterator it = spellers_.find(lang);
|
||||
if (it != spellers_.end())
|
||||
return it->second.speller;
|
||||
|
||||
|
||||
return addSpeller(lang);
|
||||
}
|
||||
|
||||
@ -141,8 +141,8 @@ void EnchantChecker::insert(WordLangTuple const & word)
|
||||
advanceChangeNumber();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void EnchantChecker::remove(WordLangTuple const & word)
|
||||
{
|
||||
enchant::Dict * m = d->speller(word.lang()->code());
|
||||
@ -176,7 +176,7 @@ void EnchantChecker::suggest(WordLangTuple const & wl,
|
||||
|
||||
vector<string> suggs = m->suggest(utf8word);
|
||||
vector<string>::const_iterator it = suggs.begin();
|
||||
|
||||
|
||||
for (; it != suggs.end(); ++it)
|
||||
suggestions.push_back(from_utf8(*it));
|
||||
}
|
||||
@ -195,7 +195,7 @@ int EnchantChecker::numDictionaries() const
|
||||
{
|
||||
return d->spellers_.size();
|
||||
}
|
||||
|
||||
|
||||
|
||||
docstring const EnchantChecker::error()
|
||||
{
|
||||
|
@ -58,7 +58,7 @@ string const & Floating::htmlTag() const
|
||||
|
||||
|
||||
string Floating::defaultCSSClass() const
|
||||
{
|
||||
{
|
||||
if (!defaultcssclass_.empty())
|
||||
return defaultcssclass_;
|
||||
string d;
|
||||
|
@ -354,7 +354,7 @@ int Font::latexWriteStartChanges(odocstream & os, BufferParams const & bparams,
|
||||
if (!runparams.pass_thru && bits_.number() == FONT_ON
|
||||
&& prev.fontInfo().number() != FONT_ON
|
||||
&& (language()->lang() == "hebrew"
|
||||
|| language()->lang() == "farsi"
|
||||
|| language()->lang() == "farsi"
|
||||
|| language()->lang() == "arabic_arabi")) {
|
||||
os << "{\\beginL ";
|
||||
count += 9;
|
||||
|
@ -523,12 +523,12 @@ string getSizeCSS(FontSize const & s)
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
} // namespace anonymous
|
||||
|
||||
|
||||
// FIXME This does not yet handle color
|
||||
docstring FontInfo::asCSS() const
|
||||
docstring FontInfo::asCSS() const
|
||||
{
|
||||
string retval;
|
||||
string tmp = getFamilyCSS(family_);
|
||||
@ -541,7 +541,7 @@ docstring FontInfo::asCSS() const
|
||||
tmp = getSizeCSS(size_);
|
||||
if (!tmp.empty())
|
||||
appendSep(retval, makeCSSTag("font-size", tmp));
|
||||
return from_ascii(retval);
|
||||
return from_ascii(retval);
|
||||
}
|
||||
|
||||
|
||||
|
@ -69,7 +69,7 @@ void FontList::erase(pos_type pos)
|
||||
iterator it = fontIterator(pos);
|
||||
iterator beg = list_.begin();
|
||||
if (it != list_.end() && it->pos() == pos
|
||||
&& (pos == 0
|
||||
&& (pos == 0
|
||||
|| (it != list_.begin() && prev(it, 1)->pos() == pos - 1))) {
|
||||
|
||||
// If it is a multi-character font
|
||||
@ -135,7 +135,7 @@ void FontList::set(pos_type pos, Font const & font)
|
||||
size_t const i = distance(list_.begin(), it);
|
||||
|
||||
// Is position pos a beginning of a font block?
|
||||
bool const begin = pos == 0 || !found
|
||||
bool const begin = pos == 0 || !found
|
||||
|| (i > 0 && list_[i - 1].pos() == pos - 1);
|
||||
|
||||
// Is position pos at the end of a font block?
|
||||
|
@ -28,7 +28,7 @@ bool Graph::bfs_init(int s, bool clear_visited, queue<int> & Q)
|
||||
{
|
||||
if (s < 0)
|
||||
return false;
|
||||
|
||||
|
||||
if (!Q.empty())
|
||||
Q = queue<int>();
|
||||
|
||||
|
@ -86,7 +86,7 @@ struct HunspellChecker::Private
|
||||
const string dictDirectory(void) const { return "dicts"; }
|
||||
int maxLookupSelector(void) const { return 5; }
|
||||
const string HunspellDictionaryName(Language const * lang) {
|
||||
return lang->variety().empty()
|
||||
return lang->variety().empty()
|
||||
? lang->code()
|
||||
: lang->code() + "-" + lang->variety();
|
||||
}
|
||||
|
@ -481,7 +481,7 @@ docstring KeyMap::printBindings(FuncRequest const & func,
|
||||
Bindings bindings = findBindings(func);
|
||||
if (bindings.empty())
|
||||
return docstring();
|
||||
|
||||
|
||||
odocstringstream res;
|
||||
Bindings::const_iterator cit = bindings.begin();
|
||||
Bindings::const_iterator cit_end = bindings.end();
|
||||
@ -544,7 +544,7 @@ KeyMap::BindingList KeyMap::listBindings(bool unbound, KeyMap::ItemType tag) con
|
||||
}
|
||||
if (!has_action)
|
||||
list.push_back(Binding(FuncRequest(action), KeySequence(0, 0), tag));
|
||||
}
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
@ -159,7 +159,7 @@ docstring const KeySequence::print(outputFormat format) const
|
||||
buf += "M-";
|
||||
if (mod & ShiftModifier)
|
||||
buf += "S-";
|
||||
|
||||
|
||||
buf += from_utf8(sequence[i].getSymbolName());
|
||||
break;
|
||||
}
|
||||
|
@ -348,7 +348,7 @@ int LaTeX::run(TeXErrors & terr)
|
||||
} else {
|
||||
LYXERR(Debug::DEPEND, "Dep. file has NOT changed");
|
||||
}
|
||||
|
||||
|
||||
// 3
|
||||
// rerun bibtex?
|
||||
// Complex bibliography packages such as Biblatex require
|
||||
@ -451,7 +451,7 @@ bool LaTeX::runMakeIndex(string const & f, OutputParams const & runparams,
|
||||
{
|
||||
string tmp = runparams.use_japanese ?
|
||||
lyxrc.jindex_command : lyxrc.index_command;
|
||||
|
||||
|
||||
if (!runparams.index_command.empty())
|
||||
tmp = runparams.index_command;
|
||||
|
||||
|
@ -373,7 +373,7 @@ bool LaTeXFont::readFont(Lexer & lex)
|
||||
error = true;
|
||||
continue;
|
||||
|
||||
default:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
switch (static_cast<LaTeXFontTags>(le)) {
|
||||
|
@ -95,7 +95,7 @@ enum LayoutTags {
|
||||
LT_HTMLITEM,
|
||||
LT_HTMLITEMATTR,
|
||||
LT_HTMLLABEL,
|
||||
LT_HTMLLABELATTR,
|
||||
LT_HTMLLABELATTR,
|
||||
LT_HTMLLABELFIRST,
|
||||
LT_HTMLPREAMBLE,
|
||||
LT_HTMLSTYLE,
|
||||
@ -283,7 +283,7 @@ bool Layout::readIgnoreForcelocal(Lexer & lex, TextClass const & tclass)
|
||||
error = true;
|
||||
continue;
|
||||
|
||||
default:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
switch (static_cast<LayoutTags>(le)) {
|
||||
@ -328,7 +328,7 @@ bool Layout::readIgnoreForcelocal(Lexer & lex, TextClass const & tclass)
|
||||
if (obsoleted_by().empty())
|
||||
obsoleted_by_ = style;
|
||||
} else {
|
||||
LYXERR0("Cannot replace with unknown style `"
|
||||
LYXERR0("Cannot replace with unknown style `"
|
||||
<< style << '\'');
|
||||
|
||||
//lex.printError("Cannot replace with"
|
||||
@ -536,7 +536,7 @@ bool Layout::readIgnoreForcelocal(Lexer & lex, TextClass const & tclass)
|
||||
case LT_ALIGN:
|
||||
readAlign(lex);
|
||||
break;
|
||||
|
||||
|
||||
case LT_ALIGNPOSSIBLE:
|
||||
readAlignPossible(lex);
|
||||
break;
|
||||
@ -550,17 +550,17 @@ bool Layout::readIgnoreForcelocal(Lexer & lex, TextClass const & tclass)
|
||||
break;
|
||||
|
||||
case LT_ENDLABELSTRING:
|
||||
lex >> endlabelstring_;
|
||||
lex >> endlabelstring_;
|
||||
endlabelstring_ = trim(endlabelstring_);
|
||||
break;
|
||||
|
||||
case LT_LABELSTRING_APPENDIX:
|
||||
lex >> labelstring_appendix_;
|
||||
lex >> labelstring_appendix_;
|
||||
labelstring_appendix_ = trim(labelstring_appendix_);
|
||||
break;
|
||||
|
||||
case LT_LABELCOUNTER:
|
||||
lex >> counter;
|
||||
lex >> counter;
|
||||
counter = trim(counter);
|
||||
break;
|
||||
|
||||
@ -595,7 +595,7 @@ bool Layout::readIgnoreForcelocal(Lexer & lex, TextClass const & tclass)
|
||||
requires_.insert(req.begin(), req.end());
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case LT_REFPREFIX: {
|
||||
docstring arg;
|
||||
lex >> arg;
|
||||
@ -609,7 +609,7 @@ bool Layout::readIgnoreForcelocal(Lexer & lex, TextClass const & tclass)
|
||||
case LT_HTMLTAG:
|
||||
lex >> htmltag_;
|
||||
break;
|
||||
|
||||
|
||||
case LT_HTMLATTR:
|
||||
lex >> htmlattr_;
|
||||
break;
|
||||
@ -617,23 +617,23 @@ bool Layout::readIgnoreForcelocal(Lexer & lex, TextClass const & tclass)
|
||||
case LT_HTMLITEM:
|
||||
lex >> htmlitemtag_;
|
||||
break;
|
||||
|
||||
|
||||
case LT_HTMLITEMATTR:
|
||||
lex >> htmlitemattr_;
|
||||
break;
|
||||
|
||||
|
||||
case LT_HTMLLABEL:
|
||||
lex >> htmllabeltag_;
|
||||
break;
|
||||
|
||||
case LT_HTMLLABELATTR:
|
||||
case LT_HTMLLABELATTR:
|
||||
lex >> htmllabelattr_;
|
||||
break;
|
||||
|
||||
case LT_HTMLLABELFIRST:
|
||||
lex >> htmllabelfirst_;
|
||||
break;
|
||||
|
||||
|
||||
case LT_HTMLSTYLE:
|
||||
htmlstyle_ = lex.getLongString(from_ascii("EndHTMLStyle"));
|
||||
break;
|
||||
@ -645,7 +645,7 @@ bool Layout::readIgnoreForcelocal(Lexer & lex, TextClass const & tclass)
|
||||
case LT_HTMLPREAMBLE:
|
||||
htmlpreamble_ = lex.getLongString(from_ascii("EndPreamble"));
|
||||
break;
|
||||
|
||||
|
||||
case LT_HTMLTITLE:
|
||||
lex >> htmltitle_;
|
||||
break;
|
||||
@ -1476,40 +1476,40 @@ int Layout::requiredArgs() const
|
||||
}
|
||||
|
||||
|
||||
string const & Layout::htmltag() const
|
||||
{
|
||||
string const & Layout::htmltag() const
|
||||
{
|
||||
if (htmltag_.empty())
|
||||
htmltag_ = "div";
|
||||
return htmltag_;
|
||||
}
|
||||
|
||||
|
||||
string const & Layout::htmlattr() const
|
||||
{
|
||||
string const & Layout::htmlattr() const
|
||||
{
|
||||
if (htmlattr_.empty())
|
||||
htmlattr_ = "class=\"" + defaultCSSClass() + "\"";
|
||||
return htmlattr_;
|
||||
return htmlattr_;
|
||||
}
|
||||
|
||||
|
||||
string const & Layout::htmlitemtag() const
|
||||
{
|
||||
string const & Layout::htmlitemtag() const
|
||||
{
|
||||
if (htmlitemtag_.empty())
|
||||
htmlitemtag_ = "div";
|
||||
return htmlitemtag_;
|
||||
return htmlitemtag_;
|
||||
}
|
||||
|
||||
|
||||
string const & Layout::htmlitemattr() const
|
||||
{
|
||||
string const & Layout::htmlitemattr() const
|
||||
{
|
||||
if (htmlitemattr_.empty())
|
||||
htmlitemattr_ = "class=\"" + defaultCSSItemClass() + "\"";
|
||||
return htmlitemattr_;
|
||||
return htmlitemattr_;
|
||||
}
|
||||
|
||||
|
||||
string const & Layout::htmllabeltag() const
|
||||
{
|
||||
string const & Layout::htmllabeltag() const
|
||||
{
|
||||
if (htmllabeltag_.empty()) {
|
||||
if (labeltype != LABEL_ABOVE &&
|
||||
labeltype != LABEL_CENTERED)
|
||||
@ -1517,15 +1517,15 @@ string const & Layout::htmllabeltag() const
|
||||
else
|
||||
htmllabeltag_ = "div";
|
||||
}
|
||||
return htmllabeltag_;
|
||||
return htmllabeltag_;
|
||||
}
|
||||
|
||||
|
||||
string const & Layout::htmllabelattr() const
|
||||
{
|
||||
string const & Layout::htmllabelattr() const
|
||||
{
|
||||
if (htmllabelattr_.empty())
|
||||
htmllabelattr_ = "class=\"" + defaultCSSLabelClass() + "\"";
|
||||
return htmllabelattr_;
|
||||
return htmllabelattr_;
|
||||
}
|
||||
|
||||
|
||||
@ -1533,7 +1533,7 @@ docstring Layout::htmlstyle() const
|
||||
{
|
||||
if (!htmlstyle_.empty() && !htmlforcecss_)
|
||||
return htmlstyle_;
|
||||
if (htmldefaultstyle_.empty())
|
||||
if (htmldefaultstyle_.empty())
|
||||
makeDefaultCSS();
|
||||
docstring retval = htmldefaultstyle_;
|
||||
if (!htmlstyle_.empty())
|
||||
@ -1543,7 +1543,7 @@ docstring Layout::htmlstyle() const
|
||||
|
||||
|
||||
string Layout::defaultCSSClass() const
|
||||
{
|
||||
{
|
||||
if (!defaultcssclass_.empty())
|
||||
return defaultcssclass_;
|
||||
docstring d;
|
||||
@ -1585,12 +1585,12 @@ void Layout::makeDefaultCSS() const
|
||||
{
|
||||
// this never needs to be redone, since reloading layouts will
|
||||
// wipe out what we did before.
|
||||
if (!htmldefaultstyle_.empty())
|
||||
if (!htmldefaultstyle_.empty())
|
||||
return;
|
||||
|
||||
|
||||
// main font
|
||||
htmldefaultstyle_ = font.asCSS();
|
||||
|
||||
|
||||
// bottom margins
|
||||
string tmp;
|
||||
if (topsep > 0)
|
||||
@ -1598,7 +1598,7 @@ void Layout::makeDefaultCSS() const
|
||||
if (bottomsep > 0)
|
||||
tmp += makeMarginValue("bottom", bottomsep);
|
||||
if (!leftmargin.empty()) {
|
||||
// we can't really do what LyX does with the margin, so
|
||||
// we can't really do what LyX does with the margin, so
|
||||
// we'll just figure out how many characters it is
|
||||
int const len = leftmargin.length();
|
||||
tmp += makeMarginValue("left", len);
|
||||
@ -1607,7 +1607,7 @@ void Layout::makeDefaultCSS() const
|
||||
int const len = rightmargin.length();
|
||||
tmp += makeMarginValue("right", len);
|
||||
}
|
||||
|
||||
|
||||
if (!tmp.empty()) {
|
||||
if (!htmldefaultstyle_.empty())
|
||||
htmldefaultstyle_ += from_ascii("\n");
|
||||
@ -1622,21 +1622,21 @@ void Layout::makeDefaultCSS() const
|
||||
|
||||
// wrap up what we have, if anything
|
||||
if (!htmldefaultstyle_.empty())
|
||||
htmldefaultstyle_ =
|
||||
htmldefaultstyle_ =
|
||||
from_ascii(htmltag() + "." + defaultCSSClass() + " {\n") +
|
||||
htmldefaultstyle_ + from_ascii("\n}\n");
|
||||
|
||||
|
||||
if (labeltype == LABEL_NO_LABEL || htmllabeltag() == "NONE")
|
||||
return;
|
||||
|
||||
|
||||
docstring labelCSS;
|
||||
|
||||
|
||||
// label font
|
||||
if (labelfont != font)
|
||||
labelCSS = labelfont.asCSS() + from_ascii("\n");
|
||||
if (labeltype == LABEL_CENTERED)
|
||||
labelCSS += from_ascii("text-align: center;\n");
|
||||
|
||||
|
||||
if (!labelCSS.empty())
|
||||
htmldefaultstyle_ +=
|
||||
from_ascii(htmllabeltag() + "." + defaultCSSLabelClass() + " {\n") +
|
||||
|
@ -41,7 +41,7 @@ namespace lyx {
|
||||
|
||||
LayoutFile::LayoutFile(string const & fn, string const & cln,
|
||||
string const & desc, string const & prereq,
|
||||
string const & category, bool texclassavail)
|
||||
string const & category, bool texclassavail)
|
||||
{
|
||||
name_ = onlyFileName(fn);
|
||||
path_ = fn.rfind('/') == string::npos ? string() : onlyPath(fn);
|
||||
@ -63,7 +63,7 @@ LayoutFileList::~LayoutFileList()
|
||||
}
|
||||
|
||||
|
||||
LayoutFileList & LayoutFileList::get()
|
||||
LayoutFileList & LayoutFileList::get()
|
||||
{
|
||||
static LayoutFileList baseclasslist;
|
||||
return baseclasslist;
|
||||
@ -129,23 +129,23 @@ bool LayoutFileList::read()
|
||||
default:
|
||||
string const fname = lex.getString();
|
||||
LYXERR(Debug::TCLASS, "Fname: " << fname);
|
||||
if (!lex.next())
|
||||
if (!lex.next())
|
||||
break;
|
||||
string const clname = lex.getString();
|
||||
LYXERR(Debug::TCLASS, "Clname: " << clname);
|
||||
if (!lex.next())
|
||||
if (!lex.next())
|
||||
break;
|
||||
string const desc = lex.getString();
|
||||
LYXERR(Debug::TCLASS, "Desc: " << desc);
|
||||
if (!lex.next())
|
||||
if (!lex.next())
|
||||
break;
|
||||
bool avail = lex.getBool();
|
||||
LYXERR(Debug::TCLASS, "Avail: " << avail);
|
||||
if (!lex.next())
|
||||
if (!lex.next())
|
||||
break;
|
||||
string const prereq = lex.getString();
|
||||
LYXERR(Debug::TCLASS, "Prereq: " << prereq);
|
||||
if (!lex.next())
|
||||
if (!lex.next())
|
||||
break;
|
||||
string const category = lex.getString();
|
||||
LYXERR(Debug::TCLASS, "Category: " << category);
|
||||
@ -190,7 +190,7 @@ void LayoutFileList::reset(LayoutFileIndex const & classname)
|
||||
LATTEST(haveClass(classname));
|
||||
// safe to continue, since we will make an empty LayoutFile
|
||||
LayoutFile * tc = classmap_[classname];
|
||||
LayoutFile * tmpl =
|
||||
LayoutFile * tmpl =
|
||||
new LayoutFile(tc->name(), tc->latexname(), tc->description(),
|
||||
tc->prerequisites(), tc->category(),
|
||||
tc->isTeXClassAvailable());
|
||||
@ -201,7 +201,7 @@ void LayoutFileList::reset(LayoutFileIndex const & classname)
|
||||
|
||||
namespace {
|
||||
|
||||
string layoutpost =
|
||||
string layoutpost =
|
||||
"Columns 1\n"
|
||||
"Sides 1\n"
|
||||
"SecNumDepth 2\n"
|
||||
@ -218,7 +218,7 @@ string layoutpost =
|
||||
" AlignPossible Block, Left, Right, Center\n"
|
||||
" LabelType No_Label\n"
|
||||
"End\n";
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -229,7 +229,7 @@ LayoutFileIndex LayoutFileList::addEmptyClass(string const & textclass)
|
||||
TempFile tempfile("basicXXXXXX.layout");
|
||||
FileName const tempLayout = tempfile.name();
|
||||
ofstream ofs(tempLayout.toFilesystemEncoding().c_str());
|
||||
// This writes a very basic class, but it also attempts to include
|
||||
// This writes a very basic class, but it also attempts to include
|
||||
// stdclass.inc. That would give us something moderately usable.
|
||||
ofs << "# This layout is automatically generated\n"
|
||||
"# \\DeclareLaTeXClass{" << textclass << "}\n\n"
|
||||
@ -241,13 +241,13 @@ LayoutFileIndex LayoutFileList::addEmptyClass(string const & textclass)
|
||||
// We do not know if a LaTeX class is available for this document, but setting
|
||||
// the last parameter to true will suppress a warning message about missing
|
||||
// tex class.
|
||||
LayoutFile * tc = new LayoutFile(textclass, textclass,
|
||||
LayoutFile * tc = new LayoutFile(textclass, textclass,
|
||||
"Unknown text class " + textclass, textclass + ".cls", "", true);
|
||||
|
||||
if (!tc->load(tempLayout.absFileName())) {
|
||||
// The only way this happens is because the hardcoded layout file
|
||||
// above is wrong or stdclass.inc cannot be found. So try again
|
||||
// without stdclass.inc and without stdinsets.inc.
|
||||
// The only way this happens is because the hardcoded layout file
|
||||
// above is wrong or stdclass.inc cannot be found. So try again
|
||||
// without stdclass.inc and without stdinsets.inc.
|
||||
ofstream ofs2(tempLayout.toFilesystemEncoding().c_str());
|
||||
ofs2 << "# This layout is automatically generated\n"
|
||||
"# \\DeclareLaTeXClass{" << textclass << "}\n\n"
|
||||
@ -273,10 +273,10 @@ LayoutFileIndex LayoutFileList::addLocalLayout(
|
||||
// FIXME There is a bug here: 4593
|
||||
//
|
||||
// only check for textclass.layout file, .cls can be anywhere in $TEXINPUTS
|
||||
// NOTE: latex class name is defined in textclass.layout, which can be
|
||||
// NOTE: latex class name is defined in textclass.layout, which can be
|
||||
// different from textclass
|
||||
string fullName = addName(path, textclass + ".layout");
|
||||
|
||||
|
||||
FileName layout_file(fullName);
|
||||
bool moved = false;
|
||||
|
||||
|
@ -29,10 +29,10 @@ namespace lyx {
|
||||
|
||||
// the previous document class may have loaded some modules that the
|
||||
// new one excludes, and the new class may provide, etc, some that
|
||||
// conflict with ones that were already loaded. So we need to go
|
||||
// conflict with ones that were already loaded. So we need to go
|
||||
// through the list and fix everything. I suppose there are various
|
||||
// ways this could be done, but the following seems to work at the
|
||||
// moment. (Thanks to Philippe Charpentier for helping work out all
|
||||
// ways this could be done, but the following seems to work at the
|
||||
// moment. (Thanks to Philippe Charpentier for helping work out all
|
||||
// the bugs---rgh.)
|
||||
bool LayoutModuleList::adaptToBaseClass(LayoutFile const * const lay,
|
||||
std::list<string> const & removedModules)
|
||||
@ -53,14 +53,14 @@ bool LayoutModuleList::adaptToBaseClass(LayoutFile const * const lay,
|
||||
}
|
||||
|
||||
|
||||
bool LayoutModuleList::moduleCanBeAdded(string const & modName,
|
||||
bool LayoutModuleList::moduleCanBeAdded(string const & modName,
|
||||
LayoutFile const * const lay) const
|
||||
{
|
||||
// Is the module already present?
|
||||
const_iterator it = begin();
|
||||
const_iterator const en = end();
|
||||
for (; it != en; ++it)
|
||||
if (*it == modName)
|
||||
if (*it == modName)
|
||||
return false;
|
||||
|
||||
LyXModule const * const lm = theModuleList[modName];
|
||||
@ -88,7 +88,7 @@ bool LayoutModuleList::moduleCanBeAdded(string const & modName,
|
||||
vector<string>::const_iterator ren = reqs.end();
|
||||
bool foundone = false;
|
||||
for (; rit != ren; ++rit) {
|
||||
if (find(mit, men, *rit) != men ||
|
||||
if (find(mit, men, *rit) != men ||
|
||||
find(provmodstart, provmodend, *rit) != provmodend) {
|
||||
foundone = true;
|
||||
break;
|
||||
@ -147,7 +147,7 @@ void LayoutModuleList::addDefaultModules(LayoutFile const * const lay,
|
||||
// make sure the user hasn't removed it
|
||||
if (find(removedModules.begin(), removedModules.end(), modName) !=
|
||||
removedModules.end()) {
|
||||
LYXERR(Debug::TCLASS, "Default module `" << modName <<
|
||||
LYXERR(Debug::TCLASS, "Default module `" << modName <<
|
||||
"' not added because removed by user.");
|
||||
continue;
|
||||
}
|
||||
@ -155,7 +155,7 @@ void LayoutModuleList::addDefaultModules(LayoutFile const * const lay,
|
||||
if (!moduleCanBeAdded(modName, lay)) {
|
||||
// FIXME This could be because it's already present, so we should
|
||||
// probably return something indicating that.
|
||||
LYXERR(Debug::TCLASS, "Default module `" << modName <<
|
||||
LYXERR(Debug::TCLASS, "Default module `" << modName <<
|
||||
"' could not be added.");
|
||||
continue;
|
||||
}
|
||||
@ -202,7 +202,7 @@ bool LayoutModuleList::removeBadModules(LayoutFile const * const lay)
|
||||
bool excluded = false;
|
||||
for (; !excluded && pit != pen; ++pit) {
|
||||
if (!LyXModule::areCompatible(modname, *pit)) {
|
||||
LYXERR0("Module " << modname <<
|
||||
LYXERR0("Module " << modname <<
|
||||
" dropped because it conflicts with provided module `" << *pit << "'.");
|
||||
consistent = false;
|
||||
excluded = true;
|
||||
@ -219,7 +219,7 @@ bool LayoutModuleList::removeBadModules(LayoutFile const * const lay)
|
||||
// Perform a consistency check on the set of modules. We need to make
|
||||
// sure that none of the modules exclude each other and that requires
|
||||
// are satisfied.
|
||||
bool LayoutModuleList::checkModuleConsistency(LayoutFile const * const lay)
|
||||
bool LayoutModuleList::checkModuleConsistency(LayoutFile const * const lay)
|
||||
{
|
||||
bool consistent = true;
|
||||
LayoutModuleList oldModules = *this;
|
||||
@ -236,7 +236,7 @@ bool LayoutModuleList::checkModuleConsistency(LayoutFile const * const lay)
|
||||
for (; !excluded && lit != len; ++lit) {
|
||||
if (!LyXModule::areCompatible(modname, *lit)) {
|
||||
consistent = false;
|
||||
LYXERR0("Module " << modname <<
|
||||
LYXERR0("Module " << modname <<
|
||||
" dropped because it is excluded by prior module " << *lit);
|
||||
excluded = true;
|
||||
}
|
||||
@ -249,11 +249,11 @@ bool LayoutModuleList::checkModuleConsistency(LayoutFile const * const lay)
|
||||
// satisfies our requirements
|
||||
LyXModule const * const oldmod = theModuleList[modname];
|
||||
if (!oldmod) {
|
||||
LYXERR0("Default module " << modname <<
|
||||
LYXERR0("Default module " << modname <<
|
||||
" added although it is unavailable and can't check requirements.");
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
vector<string> const & reqs = oldmod->getRequiredModules();
|
||||
if (!reqs.empty()) {
|
||||
// we now set excluded to true, meaning that we haven't
|
||||
@ -263,7 +263,7 @@ bool LayoutModuleList::checkModuleConsistency(LayoutFile const * const lay)
|
||||
vector<string>::const_iterator const ren = reqs.end();
|
||||
for (; rit != ren; ++rit) {
|
||||
string const reqmod = *rit;
|
||||
if (find(provmods.begin(), provmods.end(), reqmod) !=
|
||||
if (find(provmods.begin(), provmods.end(), reqmod) !=
|
||||
provmods.end()) {
|
||||
excluded = false;
|
||||
break;
|
||||
|
@ -762,7 +762,7 @@ docstring Lexer::getLongString(docstring const & endtoken)
|
||||
|
||||
bool Lexer::getBool() const
|
||||
{
|
||||
string const s = pimpl_->getString();
|
||||
string const s = pimpl_->getString();
|
||||
if (s == "false" || s == "0") {
|
||||
lastReadOk_ = true;
|
||||
return false;
|
||||
@ -917,7 +917,7 @@ docstring Lexer::quoteString(docstring const & arg)
|
||||
{
|
||||
docstring res;
|
||||
res += '"';
|
||||
res += subst(subst(arg, from_ascii("\\"), from_ascii("\\\\")),
|
||||
res += subst(subst(arg, from_ascii("\\"), from_ascii("\\\\")),
|
||||
from_ascii("\""), from_ascii("\\\""));
|
||||
res += '"';
|
||||
return res;
|
||||
@ -929,7 +929,7 @@ Lexer & Lexer::operator>>(char const * required)
|
||||
string token;
|
||||
*this >> token;
|
||||
if (token != required) {
|
||||
LYXERR0("Missing '" << required << "'-tag in " << pimpl_->context
|
||||
LYXERR0("Missing '" << required << "'-tag in " << pimpl_->context
|
||||
<< ". Got " << token << " instead. Line: " << lineNumber());
|
||||
pushToken(token);
|
||||
}
|
||||
|
@ -192,7 +192,7 @@ struct LyX::Impl {
|
||||
Converters converters_;
|
||||
/// The system converters after reading lyxrc.defaults.
|
||||
Converters system_converters_;
|
||||
|
||||
|
||||
/// Global format information
|
||||
Formats formats_;
|
||||
/// The system formats after reading lyxrc.defaults.
|
||||
@ -512,7 +512,7 @@ int LyX::execWithoutGui(int & argc, char * argv[])
|
||||
}
|
||||
|
||||
// Used to keep track of which buffers were explicitly loaded by user request.
|
||||
// This is necessary because master and child document buffers are loaded, even
|
||||
// This is necessary because master and child document buffers are loaded, even
|
||||
// if they were not named on the command line. We do not want to dispatch to
|
||||
// those.
|
||||
vector<Buffer *> command_line_buffers;
|
||||
|
@ -52,7 +52,7 @@ namespace lyx {
|
||||
* The documentation below primarily describes the purpose and syntax
|
||||
* of the various LFUNs.
|
||||
*
|
||||
* The list is alphabetized. Try to keep it that way, and don't forget to add
|
||||
* The list is alphabetized. Try to keep it that way, and don't forget to add
|
||||
* doxygen commentary. This allows the file LFUNs.lyx to be auto-generated.
|
||||
* (If you should want to do that, see the gen_lfuns.py script, which is in
|
||||
* the development/tools/ directory.)
|
||||
@ -3543,7 +3543,7 @@ void LyXAction::init()
|
||||
* \li Action: Inserts various characters into the document.
|
||||
* \li Syntax: specialchar-insert <CHAR>
|
||||
* \li Params: <CHAR>: hyphenation, allowbreak, ligature-break, slash,
|
||||
nobreakdash, dots, end-of-sentence, menu-separator,
|
||||
nobreakdash, dots, end-of-sentence, menu-separator,
|
||||
lyx, tex, latex, latex2e.
|
||||
* \li Origin: JSpitzm, 6 Dec 2007
|
||||
* \endvar
|
||||
|
@ -2574,7 +2574,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c
|
||||
|
||||
case RC_FILEFORMAT:
|
||||
// New/modified formats
|
||||
for (Formats::const_iterator cit = theFormats().begin();
|
||||
for (Formats::const_iterator cit = theFormats().begin();
|
||||
cit != theFormats().end(); ++cit) {
|
||||
Format const * format =
|
||||
theSystemFormats().getFormat(cit->name());
|
||||
@ -2610,7 +2610,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c
|
||||
}
|
||||
|
||||
// Look for deleted formats
|
||||
for (Formats::const_iterator cit = theSystemFormats().begin();
|
||||
for (Formats::const_iterator cit = theSystemFormats().begin();
|
||||
cit != theSystemFormats().end(); ++cit)
|
||||
if (!theFormats().getFormat(cit->name()))
|
||||
os << "\\format \"" << cit->name()
|
||||
|
@ -447,8 +447,8 @@ bool LyXVC::repoUpdateEnabled() const
|
||||
{
|
||||
return vcs && vcs->repoUpdateEnabled();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
bool LyXVC::prepareFileRevision(string const & rev, std::string & f)
|
||||
{
|
||||
return vcs && vcs->prepareFileRevision(rev, f);
|
||||
|
@ -157,7 +157,7 @@ ColorCode PainterInfo::backgroundColor(Inset const * inset, bool sel) const
|
||||
|
||||
Color PainterInfo::textColor(Color const & color) const
|
||||
{
|
||||
if (change_.changed())
|
||||
if (change_.changed())
|
||||
return change_.color();
|
||||
if (selected)
|
||||
return Color_selectiontext;
|
||||
|
@ -60,7 +60,7 @@ void PDFOptions::writeFile(ostream & os) const
|
||||
os << "\\use_hyperref " << convert<string>(use_hyperref) << '\n';
|
||||
if (!use_hyperref && empty())
|
||||
return;
|
||||
|
||||
|
||||
if (!title.empty() )
|
||||
os << "\\pdf_title " << Lexer::quoteString(title) << '\n';
|
||||
if (!author.empty())
|
||||
@ -69,22 +69,22 @@ void PDFOptions::writeFile(ostream & os) const
|
||||
os << "\\pdf_subject " << Lexer::quoteString(subject) << '\n';
|
||||
if (!keywords.empty())
|
||||
os << "\\pdf_keywords " << Lexer::quoteString(keywords) << '\n';
|
||||
|
||||
|
||||
|
||||
|
||||
os << "\\pdf_bookmarks " << convert<string>(bookmarks) << '\n';
|
||||
os << "\\pdf_bookmarksnumbered " << convert<string>(bookmarksnumbered) << '\n';
|
||||
os << "\\pdf_bookmarksopen " << convert<string>(bookmarksopen) << '\n';
|
||||
os << "\\pdf_bookmarksopenlevel " << bookmarksopenlevel << '\n';
|
||||
|
||||
|
||||
os << "\\pdf_breaklinks " << convert<string>(breaklinks) << '\n';
|
||||
os << "\\pdf_pdfborder " << convert<string>(pdfborder) << '\n';
|
||||
os << "\\pdf_colorlinks " << convert<string>(colorlinks) << '\n';
|
||||
os << "\\pdf_backref " << backref << '\n';
|
||||
os << "\\pdf_pdfusetitle " << convert<string>(pdfusetitle) << '\n';
|
||||
|
||||
|
||||
if (!pagemode.empty())
|
||||
os << "\\pdf_pagemode " << pagemode << '\n';
|
||||
|
||||
|
||||
if (!quoted_options.empty())
|
||||
os << "\\pdf_quoted_options " << Lexer::quoteString(quoted_options) << '\n';
|
||||
}
|
||||
@ -96,7 +96,7 @@ void PDFOptions::writeLaTeX(OutputParams & runparams, otexstream & os,
|
||||
// FIXME Unicode
|
||||
string opt;
|
||||
string hyperset;
|
||||
|
||||
|
||||
// since LyX uses unicode, also set the PDF strings to unicode strings with the
|
||||
// hyperref option "unicode"
|
||||
opt += "unicode=true,";
|
||||
@ -133,7 +133,7 @@ void PDFOptions::writeLaTeX(OutputParams & runparams, otexstream & os,
|
||||
// LaTeX-errors when using non-latin characters
|
||||
if (!title.empty())
|
||||
hyperset += "pdftitle={" + title + "},";
|
||||
if (!author.empty())
|
||||
if (!author.empty())
|
||||
hyperset += "\n pdfauthor={" + author + "},";
|
||||
if (!subject.empty())
|
||||
hyperset += "\n pdfsubject={" + subject + "},";
|
||||
|
@ -397,7 +397,7 @@ public:
|
||||
typedef SkipPositions::const_iterator SkipPositionsIterator;
|
||||
|
||||
void appendSkipPosition(SkipPositions & skips, pos_type const pos) const;
|
||||
|
||||
|
||||
Language * getSpellLanguage(pos_type const from) const;
|
||||
|
||||
Language * locateSpellRange(pos_type & from, pos_type & to,
|
||||
@ -412,7 +412,7 @@ public:
|
||||
}
|
||||
|
||||
bool ignoreWord(docstring const & word) const ;
|
||||
|
||||
|
||||
void setMisspelled(pos_type from, pos_type to, SpellChecker::Result state)
|
||||
{
|
||||
pos_type textsize = owner_->size();
|
||||
@ -2967,13 +2967,13 @@ docstring Paragraph::simpleLyXHTMLOnePar(Buffer const & buf,
|
||||
FontShape curr_fs = INHERIT_SHAPE;
|
||||
FontFamily curr_fam = INHERIT_FAMILY;
|
||||
FontSize curr_size = FONT_SIZE_INHERIT;
|
||||
|
||||
string const default_family =
|
||||
buf.masterBuffer()->params().fonts_default_family;
|
||||
|
||||
string const default_family =
|
||||
buf.masterBuffer()->params().fonts_default_family;
|
||||
|
||||
vector<html::FontTag> tagsToOpen;
|
||||
vector<html::EndFontTag> tagsToClose;
|
||||
|
||||
|
||||
// parsing main loop
|
||||
for (pos_type i = initial; i < size(); ++i) {
|
||||
// let's not show deleted material in the output
|
||||
@ -2996,7 +2996,7 @@ docstring Paragraph::simpleLyXHTMLOnePar(Buffer const & buf,
|
||||
curstate = font.fontInfo().underbar();
|
||||
if (font_old.underbar() != curstate)
|
||||
doFontSwitch(tagsToOpen, tagsToClose, ubar_flag, curstate, html::FT_UBAR);
|
||||
|
||||
|
||||
// strikeout
|
||||
curstate = font.fontInfo().strikeout();
|
||||
if (font_old.strikeout() != curstate)
|
||||
@ -3627,7 +3627,7 @@ int Paragraph::fixBiblio(Buffer const & buffer)
|
||||
InsetCommandParams(BIBITEM_CODE));
|
||||
|
||||
Font font(inherit_font, buffer.params().language);
|
||||
insertInset(0, inset, font, Change(track_changes ? Change::INSERTED
|
||||
insertInset(0, inset, font, Change(track_changes ? Change::INSERTED
|
||||
: Change::UNCHANGED));
|
||||
|
||||
return 1;
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
namespace lyx {
|
||||
|
||||
PrinterParams::PrinterParams()
|
||||
PrinterParams::PrinterParams()
|
||||
{
|
||||
target = PRINTER;
|
||||
all_pages = true;
|
||||
|
@ -275,7 +275,7 @@ ostream & operator<<(ostream & os, Row const & row)
|
||||
<< " ascent: " << row.dim_.asc
|
||||
<< " descent: " << row.dim_.des
|
||||
<< " separator: " << row.separator
|
||||
<< " label_hfill: " << row.label_hfill
|
||||
<< " label_hfill: " << row.label_hfill
|
||||
<< " row_boundary: " << row.right_boundary() << "\n";
|
||||
double x = row.left_margin;
|
||||
Row::Elements::const_iterator it = row.elements_.begin();
|
||||
|
@ -205,7 +205,7 @@ void RowPainter::paintMisspelledMark(Row::Element const & e) const
|
||||
if (x1 > x2)
|
||||
swap(x1, x2);
|
||||
|
||||
pi_.pain.line(int(x_ + x1), y, int(x_ + x2), y,
|
||||
pi_.pain.line(int(x_ + x1), y, int(x_ + x2), y,
|
||||
Color_error,
|
||||
Painter::line_onoffdash, thickness);
|
||||
pos = range.last + 1;
|
||||
|
@ -129,7 +129,7 @@ void LastOpenedSection::read(istream & is)
|
||||
lof.file_name = file;
|
||||
lastopened.push_back(lof);
|
||||
} else {
|
||||
LYXERR(Debug::INIT,
|
||||
LYXERR(Debug::INIT,
|
||||
"LyX: Warning: Ignore last opened file: " << tmp);
|
||||
}
|
||||
} catch (...) {
|
||||
@ -337,7 +337,7 @@ LastCommandsSection::LastCommandsSection(unsigned int num) :
|
||||
setNumberOfLastCommands(num);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void LastCommandsSection::read(istream & is)
|
||||
{
|
||||
string tmp;
|
||||
|
@ -90,7 +90,7 @@ void Spacing::writeFile(ostream & os, bool para) const
|
||||
|
||||
namespace {
|
||||
|
||||
string envName(Spacing::Space space, bool useSetSpace)
|
||||
string envName(Spacing::Space space, bool useSetSpace)
|
||||
{
|
||||
static char const * const env_names[]
|
||||
= { "SingleSpace", "OnehalfSpace", "DoubleSpace", "Spacing", ""};
|
||||
@ -104,9 +104,9 @@ string envName(Spacing::Space space, bool useSetSpace)
|
||||
string const Spacing::writeEnvirBegin(bool useSetSpace) const
|
||||
{
|
||||
string const name = envName(space, useSetSpace);
|
||||
if (space == Other)
|
||||
if (space == Other)
|
||||
return "\\begin{" + name + "}{" + getValueAsString() + '}';
|
||||
else
|
||||
else
|
||||
return name.empty() ? string() : "\\begin{" + name + '}';
|
||||
}
|
||||
|
||||
@ -128,11 +128,11 @@ string const Spacing::writePreamble(bool useSetSpace) const
|
||||
//return "\\singlespacing\n";
|
||||
break;
|
||||
case Onehalf:
|
||||
preamble = useSetSpace ? "\\OnehalfSpacing\n"
|
||||
preamble = useSetSpace ? "\\OnehalfSpacing\n"
|
||||
: "\\onehalfspacing\n";
|
||||
break;
|
||||
case Double:
|
||||
preamble = useSetSpace ? "\\DoubleSpacing\n"
|
||||
preamble = useSetSpace ? "\\DoubleSpacing\n"
|
||||
: "\\doublespacing\n";
|
||||
break;
|
||||
case Other:
|
||||
|
@ -295,7 +295,7 @@ void Text::setFont(Cursor & cur, Font const & font, bool toggleall)
|
||||
// Ok, we have a selection.
|
||||
Font newfont = font;
|
||||
|
||||
if (toggleall) {
|
||||
if (toggleall) {
|
||||
// Toggling behaves as follows: We check the first character of the
|
||||
// selection. If it's (say) got EMPH on, then we set to off; if off,
|
||||
// then to on. With families and the like, we set it to INHERIT, if
|
||||
@ -303,30 +303,30 @@ void Text::setFont(Cursor & cur, Font const & font, bool toggleall)
|
||||
CursorSlice const & sl = cur.selBegin();
|
||||
Text const & text = *sl.text();
|
||||
Paragraph const & par = text.getPar(sl.pit());
|
||||
|
||||
|
||||
// get font at the position
|
||||
Font oldfont = par.getFont(cur.bv().buffer().params(), sl.pos(),
|
||||
text.outerFont(sl.pit()));
|
||||
FontInfo const & oldfi = oldfont.fontInfo();
|
||||
|
||||
|
||||
FontInfo & newfi = newfont.fontInfo();
|
||||
|
||||
|
||||
FontFamily newfam = newfi.family();
|
||||
if (newfam != INHERIT_FAMILY && newfam != IGNORE_FAMILY &&
|
||||
newfam == oldfi.family())
|
||||
newfi.setFamily(INHERIT_FAMILY);
|
||||
|
||||
|
||||
FontSeries newser = newfi.series();
|
||||
if (newser == BOLD_SERIES && oldfi.series() == BOLD_SERIES)
|
||||
newfi.setSeries(INHERIT_SERIES);
|
||||
|
||||
|
||||
FontShape newshp = newfi.shape();
|
||||
if (newshp != INHERIT_SHAPE && newshp != IGNORE_SHAPE &&
|
||||
newshp == oldfi.shape())
|
||||
newfi.setShape(INHERIT_SHAPE);
|
||||
|
||||
ColorCode newcol = newfi.color();
|
||||
if (newcol != Color_none && newcol != Color_inherit
|
||||
if (newcol != Color_none && newcol != Color_inherit
|
||||
&& newcol != Color_ignore && newcol == oldfi.color())
|
||||
newfi.setColor(Color_none);
|
||||
|
||||
@ -349,7 +349,7 @@ void Text::setFont(Cursor & cur, Font const & font, bool toggleall)
|
||||
newfi.setNumber(oldfi.number() == FONT_OFF ? FONT_ON : FONT_OFF);
|
||||
}
|
||||
|
||||
setFont(cur.bv(), cur.selectionBegin().top(),
|
||||
setFont(cur.bv(), cur.selectionBegin().top(),
|
||||
cur.selectionEnd().top(), newfont);
|
||||
}
|
||||
|
||||
@ -379,7 +379,7 @@ void Text::setFont(BufferView const & bv, CursorSlice const & begin,
|
||||
Font f = tm.displayFont(pit, pos);
|
||||
f.update(font, language);
|
||||
setCharFont(pit, pos, f, tm.font_);
|
||||
// font change may change language...
|
||||
// font change may change language...
|
||||
// spell checker has to know that
|
||||
pars_[pit].requestSpellCheck(pos);
|
||||
}
|
||||
@ -451,7 +451,7 @@ docstring Text::getStringToIndex(Cursor const & cur)
|
||||
cur.message(_("Cannot index more than one paragraph!"));
|
||||
else
|
||||
return tmpcur.selectionAsString(false);
|
||||
|
||||
|
||||
return docstring();
|
||||
}
|
||||
|
||||
@ -610,7 +610,7 @@ bool Text::checkAndActivateInsetVisual(Cursor & cur, bool movingForward, bool mo
|
||||
return false;
|
||||
if (cur.selection() && cur.realAnchor().find(inset) == -1)
|
||||
return false;
|
||||
inset->edit(cur, movingForward,
|
||||
inset->edit(cur, movingForward,
|
||||
movingLeft ? Inset::ENTRY_DIRECTION_RIGHT : Inset::ENTRY_DIRECTION_LEFT);
|
||||
cur.setCurrentFont();
|
||||
cur.boundary(false);
|
||||
@ -645,11 +645,11 @@ bool Text::cursorBackward(Cursor & cur)
|
||||
!cur.paragraph().isSeparator(cur.pos() - 1)) {
|
||||
return setCursor(cur, cur.pit(), cur.pos(), true, true);
|
||||
}
|
||||
|
||||
|
||||
// go left and try to enter inset
|
||||
if (checkAndActivateInset(cur, false))
|
||||
return false;
|
||||
|
||||
|
||||
// normal character left
|
||||
return setCursor(cur, cur.pit(), cur.pos() - 1, true, false);
|
||||
}
|
||||
@ -675,7 +675,7 @@ bool Text::cursorVisLeft(Cursor & cur, bool skip_inset)
|
||||
cur = temp_cur;
|
||||
return false;
|
||||
}
|
||||
return setCursor(cur, temp_cur.pit(), temp_cur.pos(),
|
||||
return setCursor(cur, temp_cur.pit(), temp_cur.pos(),
|
||||
true, temp_cur.boundary());
|
||||
}
|
||||
|
||||
@ -710,7 +710,7 @@ bool Text::cursorForward(Cursor & cur)
|
||||
if (cur.boundary() && !tm.isRTLBoundary(cur.pit(), cur.pos()))
|
||||
return setCursor(cur, cur.pit(), cur.pos(), true, false);
|
||||
|
||||
// next position is left of boundary,
|
||||
// next position is left of boundary,
|
||||
// but go to next line for special cases like space, newline, linesep
|
||||
#if 0
|
||||
// some effectless debug code to see the values in the debugger
|
||||
@ -740,12 +740,12 @@ bool Text::cursorForward(Cursor & cur)
|
||||
return setCursor(cur, cur.pit(), cur.pos() + 1, true, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// in front of RTL boundary? Stay on this side of the boundary because:
|
||||
// ab|cDDEEFFghi -> abc|DDEEFFghi
|
||||
if (tm.isRTLBoundary(cur.pit(), cur.pos() + 1))
|
||||
return setCursor(cur, cur.pit(), cur.pos() + 1, true, true);
|
||||
|
||||
|
||||
// move right
|
||||
return setCursor(cur, cur.pit(), cur.pos() + 1, true, false);
|
||||
}
|
||||
@ -839,12 +839,12 @@ bool Text::deleteEmptyParagraphMechanism(Cursor & cur,
|
||||
if (&old.inset() == &cur[depth].inset())
|
||||
break;
|
||||
|
||||
// Whether a common inset is found and whether the cursor is still in
|
||||
// Whether a common inset is found and whether the cursor is still in
|
||||
// the same paragraph (possibly nested).
|
||||
bool const same_par = depth < cur.depth() && old.pit() == cur[depth].pit();
|
||||
bool const same_par_pos = depth == cur.depth() - 1 && same_par
|
||||
bool const same_par_pos = depth == cur.depth() - 1 && same_par
|
||||
&& old.pos() == cur[depth].pos();
|
||||
|
||||
|
||||
// If the chars around the old cursor were spaces, delete one of them.
|
||||
if (!same_par_pos) {
|
||||
// Only if the cursor has really moved.
|
||||
@ -891,7 +891,7 @@ bool Text::deleteEmptyParagraphMechanism(Cursor & cur,
|
||||
if (soa && old.pit() < pit_type(plist.size()))
|
||||
plist[old.pit()].params().startOfAppendix(true);
|
||||
|
||||
// see #warning (FIXME?) above
|
||||
// see #warning (FIXME?) above
|
||||
if (cur.depth() >= old.depth()) {
|
||||
CursorSlice & curslice = cur[old.depth() - 1];
|
||||
if (&curslice.inset() == &old.inset()
|
||||
|
@ -452,7 +452,7 @@ static void outline(OutlineOp mode, Cursor & cur)
|
||||
DocumentClass const & tc = buf.params().documentClass();
|
||||
DocumentClass::const_iterator lit = tc.begin();
|
||||
DocumentClass::const_iterator len = tc.end();
|
||||
int const newtoclevel =
|
||||
int const newtoclevel =
|
||||
(mode == OutlineIn ? toclevel + 1 : toclevel - 1);
|
||||
LabelType const oldlabeltype = start->layout().labeltype;
|
||||
|
||||
@ -484,9 +484,9 @@ bool Text::isRTL(Paragraph const & par) const
|
||||
return par.isRTL(buffer.params());
|
||||
}
|
||||
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
|
||||
Language const * getLanguage(Cursor const & cur, string const & lang) {
|
||||
return lang.empty() ? cur.getFont().language() : languages.getLanguage(lang);
|
||||
}
|
||||
@ -518,7 +518,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
|
||||
cur.noScreenUpdate();
|
||||
|
||||
LBUFERR(this == cur.text());
|
||||
|
||||
|
||||
// NOTE: This should NOT be a reference. See commit 94a5481a.
|
||||
CursorSlice const oldTopSlice = cur.top();
|
||||
bool const oldBoundary = cur.boundary();
|
||||
|
@ -517,9 +517,9 @@ TextClass::ReturnValues TextClass::read(Lexer & lexrc, ReadType rt)
|
||||
error = !readStyle(lexrc, lay);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
bool const have_layout = hasLayout(name);
|
||||
|
||||
|
||||
// If the layout already exists, then we want to add it to
|
||||
// the existing layout, as long as we are not in an ProvideStyle
|
||||
// block.
|
||||
@ -1788,7 +1788,7 @@ Layout const & DocumentClass::getTOCLayout() const
|
||||
for (; lit != len; ++lit) {
|
||||
int const level = lit->toclevel;
|
||||
// we don't want Part or unnumbered sections
|
||||
if (level == Layout::NOT_IN_TOC || level < 0
|
||||
if (level == Layout::NOT_IN_TOC || level < 0
|
||||
|| level >= minlevel || lit->counter.empty())
|
||||
continue;
|
||||
lay = &*lit;
|
||||
|
@ -236,7 +236,7 @@ Thesaurus::Meanings Thesaurus::lookup(WordLangTuple const & wl)
|
||||
return meanings;
|
||||
|
||||
string const encoding = mythes->get_th_encoding();
|
||||
|
||||
|
||||
mentry * pmean;
|
||||
string const text = to_iconv_encoding(support::lowercase(t), encoding);
|
||||
int len = strlen(text.c_str());
|
||||
|
@ -162,7 +162,7 @@ bool TocBackend::updateItem(DocIterator const & dit_in)
|
||||
return false;
|
||||
|
||||
if (toc("tableofcontents")->empty()) {
|
||||
// FIXME: should not happen,
|
||||
// FIXME: should not happen,
|
||||
// a call to TocBackend::update() is missing somewhere
|
||||
LYXERR0("TocBackend::updateItem called but the TOC is empty!");
|
||||
return false;
|
||||
|
@ -183,7 +183,7 @@ docstring const VSpace::asGUIName() const
|
||||
}
|
||||
|
||||
|
||||
string VSpace::asHTMLLength() const
|
||||
string VSpace::asHTMLLength() const
|
||||
{
|
||||
string result;
|
||||
switch (kind_) {
|
||||
|
@ -75,7 +75,7 @@ docstring const & WordList::word(size_t idx) const
|
||||
{
|
||||
Impl::Words::const_iterator it = d->words_.find_summed_weight(idx);
|
||||
LASSERT(it != d->words_.end(), { static docstring dummy; return dummy; });
|
||||
|
||||
|
||||
// We use the key() method here, and not something like it->first
|
||||
// because the btree only returns (iterator-) temporary value pairs.
|
||||
// If we returned the first component of those here, we get an
|
||||
|
@ -186,11 +186,11 @@ Buffer * newUnnamedFile(FileName const & path, string const & prefix,
|
||||
FileName filename;
|
||||
|
||||
do {
|
||||
filename.set(path,
|
||||
filename.set(path,
|
||||
prefix + convert<string>(++file_number[prefix]) + ".lyx");
|
||||
}
|
||||
while (theBufferList().exists(filename) || filename.isReadableFile());
|
||||
|
||||
|
||||
return newFile(filename.absFileName(), templatename, false);
|
||||
}
|
||||
|
||||
|
@ -283,30 +283,30 @@ Inset * createInsetHelper(Buffer * buf, FuncRequest const & cmd)
|
||||
case NO_CODE:
|
||||
lyxerr << "No such inset '" << name << "'.";
|
||||
return 0;
|
||||
|
||||
|
||||
case BIBITEM_CODE: {
|
||||
InsetCommandParams icp(code);
|
||||
InsetCommand::string2params(to_utf8(cmd.argument()), icp);
|
||||
return new InsetBibitem(buf, icp);
|
||||
}
|
||||
|
||||
|
||||
case BIBTEX_CODE: {
|
||||
InsetCommandParams icp(code);
|
||||
InsetCommand::string2params(to_utf8(cmd.argument()), icp);
|
||||
return new InsetBibtex(buf, icp);
|
||||
}
|
||||
|
||||
|
||||
case CITE_CODE: {
|
||||
InsetCommandParams icp(code);
|
||||
InsetCommand::string2params(to_utf8(cmd.argument()), icp);
|
||||
return new InsetCitation(buf, icp);
|
||||
}
|
||||
|
||||
|
||||
case ERT_CODE: {
|
||||
return new InsetERT(buf,
|
||||
InsetERT::string2params(to_utf8(cmd.argument())));
|
||||
}
|
||||
|
||||
|
||||
case EXTERNAL_CODE: {
|
||||
InsetExternalParams iep;
|
||||
InsetExternal::string2params(to_utf8(cmd.argument()), *buf, iep);
|
||||
@ -315,7 +315,7 @@ Inset * createInsetHelper(Buffer * buf, FuncRequest const & cmd)
|
||||
inset->setParams(iep);
|
||||
return inset.release();
|
||||
}
|
||||
|
||||
|
||||
case GRAPHICS_CODE: {
|
||||
InsetGraphicsParams igp;
|
||||
InsetGraphics::string2params(to_utf8(cmd.argument()), *buf, igp);
|
||||
@ -323,54 +323,54 @@ Inset * createInsetHelper(Buffer * buf, FuncRequest const & cmd)
|
||||
inset->setParams(igp);
|
||||
return inset.release();
|
||||
}
|
||||
|
||||
|
||||
case HYPERLINK_CODE: {
|
||||
InsetCommandParams icp(code);
|
||||
InsetCommand::string2params(to_utf8(cmd.argument()), icp);
|
||||
return new InsetHyperlink(buf, icp);
|
||||
}
|
||||
|
||||
|
||||
case INCLUDE_CODE: {
|
||||
InsetCommandParams icp(code);
|
||||
InsetCommand::string2params(to_utf8(cmd.argument()), icp);
|
||||
return new InsetInclude(buf, icp);
|
||||
}
|
||||
|
||||
|
||||
case INDEX_CODE: {
|
||||
docstring arg = cmd.argument();
|
||||
return new InsetIndex(buf, InsetIndexParams(arg));
|
||||
}
|
||||
|
||||
|
||||
case INDEX_PRINT_CODE: {
|
||||
InsetCommandParams icp(code);
|
||||
InsetCommand::string2params(to_utf8(cmd.argument()), icp);
|
||||
return new InsetPrintIndex(buf, icp);
|
||||
}
|
||||
|
||||
|
||||
case LABEL_CODE: {
|
||||
InsetCommandParams icp(code);
|
||||
InsetCommand::string2params(to_utf8(cmd.argument()), icp);
|
||||
return new InsetLabel(buf, icp);
|
||||
}
|
||||
|
||||
|
||||
case LINE_CODE: {
|
||||
InsetCommandParams icp(code);
|
||||
InsetCommand::string2params(to_utf8(cmd.argument()), icp);
|
||||
return new InsetLine(buf, icp);
|
||||
}
|
||||
|
||||
|
||||
case LISTINGS_CODE: {
|
||||
InsetListingsParams par;
|
||||
InsetListings::string2params(to_utf8(cmd.argument()), par);
|
||||
return new InsetListings(buf, par);
|
||||
}
|
||||
|
||||
|
||||
case NOMENCL_CODE: {
|
||||
InsetCommandParams icp(code);
|
||||
InsetCommand::string2params(to_utf8(cmd.argument()), icp);
|
||||
return new InsetNomencl(buf, icp);
|
||||
}
|
||||
|
||||
|
||||
case REF_CODE: {
|
||||
InsetCommandParams icp(code);
|
||||
InsetCommand::string2params(to_utf8(cmd.argument()), icp);
|
||||
@ -388,13 +388,13 @@ Inset * createInsetHelper(Buffer * buf, FuncRequest const & cmd)
|
||||
InsetSpace::string2params(to_utf8(cmd.argument()), isp);
|
||||
return new InsetSpace(isp);
|
||||
}
|
||||
|
||||
|
||||
case TOC_CODE: {
|
||||
InsetCommandParams icp(code);
|
||||
InsetCommand::string2params(to_utf8(cmd.argument()), icp);
|
||||
return new InsetTOC(buf, icp);
|
||||
}
|
||||
|
||||
|
||||
case VSPACE_CODE: {
|
||||
VSpace vspace;
|
||||
InsetVSpace::string2params(to_utf8(cmd.argument()), vspace);
|
||||
@ -403,12 +403,12 @@ Inset * createInsetHelper(Buffer * buf, FuncRequest const & cmd)
|
||||
|
||||
case PREVIEW_CODE:
|
||||
return new InsetPreview(buf);
|
||||
|
||||
|
||||
default:
|
||||
lyxerr << "Inset '" << name << "' not permitted with LFUN_INSET_INSERT."
|
||||
<< endl;
|
||||
return 0;
|
||||
|
||||
|
||||
}
|
||||
} //end LFUN_INSET_INSERT
|
||||
|
||||
@ -521,7 +521,7 @@ Inset * readInset(Lexer & lex, Buffer * buf)
|
||||
lex >> tmptok;
|
||||
|
||||
// test the different insets
|
||||
|
||||
|
||||
// FIXME It would be better if we did not have this branch and could
|
||||
// just do one massive switch for all insets. But at present, it's
|
||||
// easier to do it this way, and we can't do the massive switch until
|
||||
@ -533,9 +533,9 @@ Inset * readInset(Lexer & lex, Buffer * buf)
|
||||
lex.next();
|
||||
string const insetType = lex.getString();
|
||||
lex.pushToken(insetType);
|
||||
|
||||
|
||||
InsetCode const code = insetCode(insetType);
|
||||
|
||||
|
||||
//FIXME If we do the one massive switch, we cannot do this here, since
|
||||
//we do not know in advance that we're dealing with a command inset.
|
||||
//Worst case, we could put it in each case below. Better, we could
|
||||
@ -550,7 +550,7 @@ Inset * readInset(Lexer & lex, Buffer * buf)
|
||||
case BIBTEX_CODE:
|
||||
inset.reset(new InsetBibtex(buf, inscmd));
|
||||
break;
|
||||
case CITE_CODE:
|
||||
case CITE_CODE:
|
||||
inset.reset(new InsetCitation(buf, inscmd));
|
||||
break;
|
||||
case HYPERLINK_CODE:
|
||||
|
@ -610,8 +610,8 @@ void ButtonPolicy::Private::initOkApplyCancelAutoReadOnly()
|
||||
state_machine_[AUTOAPPLY_INITIAL][SMI_AUTOAPPLY] = APPLIED;
|
||||
state_machine_[AUTOAPPLY_INITIAL][SMI_READ_ONLY] = RO_AUTOAPPLY;
|
||||
state_machine_[AUTOAPPLY_INITIAL][SMI_VALID] = AUTOAPPLY_CHANGED;
|
||||
state_machine_[AUTOAPPLY_INITIAL][SMI_INVALID] = AUTOAPPLY_CHANGED;
|
||||
state_machine_[AUTOAPPLY_INITIAL][SMI_READ_WRITE] = AUTOAPPLY_INITIAL;
|
||||
state_machine_[AUTOAPPLY_INITIAL][SMI_INVALID] = AUTOAPPLY_CHANGED;
|
||||
state_machine_[AUTOAPPLY_INITIAL][SMI_READ_WRITE] = AUTOAPPLY_INITIAL;
|
||||
// State::AUTOAPPLY_CHANGED
|
||||
state_machine_[AUTOAPPLY_CHANGED][SMI_AUTOAPPLY] = APPLIED;
|
||||
state_machine_[AUTOAPPLY_CHANGED][SMI_READ_ONLY] = RO_AUTOAPPLY;
|
||||
|
@ -55,11 +55,11 @@ public:
|
||||
///
|
||||
QSize sizeHint(QStyleOptionViewItem const & opt,
|
||||
QModelIndex const & index) const;
|
||||
|
||||
|
||||
private:
|
||||
///
|
||||
void drawCategoryHeader(QPainter * painter, QStyleOptionViewItem const & opt,
|
||||
QString const & category) const;
|
||||
QString const & category) const;
|
||||
///
|
||||
QString underlineFilter(QString const & s) const;
|
||||
///
|
||||
@ -106,8 +106,8 @@ struct CategorizedCombo::Private
|
||||
void countCategories();
|
||||
///
|
||||
CategorizedCombo * p;
|
||||
|
||||
/** the layout model:
|
||||
|
||||
/** the layout model:
|
||||
* 1st column: translated GUI name,
|
||||
* 2nd column: raw item name,
|
||||
* 3rd column: category,
|
||||
@ -162,7 +162,7 @@ void CCItemDelegate::paint(QPainter * painter, QStyleOptionViewItem const & opti
|
||||
opt.state = state;
|
||||
|
||||
// draw category header
|
||||
drawCategoryHeader(painter, opt,
|
||||
drawCategoryHeader(painter, opt,
|
||||
categoryCC(*index.model(), index.row()));
|
||||
|
||||
// move rect down below header
|
||||
@ -317,14 +317,14 @@ void CategorizedCombo::Private::setFilter(QString const & s)
|
||||
filter_ = s;
|
||||
filterModel_->setFilterRegExp(charFilterRegExpCC(filter_));
|
||||
countCategories();
|
||||
|
||||
|
||||
// restore old selection
|
||||
if (lastSel_ != -1) {
|
||||
QModelIndex i = filterModel_->mapFromSource(model_->index(lastSel_, 0));
|
||||
if (i.isValid())
|
||||
p->setCurrentIndex(i.row());
|
||||
}
|
||||
|
||||
|
||||
// Workaround to resize to content size
|
||||
// FIXME: There must be a better way. The QComboBox::AdjustToContents)
|
||||
// does not help.
|
||||
@ -339,7 +339,7 @@ void CategorizedCombo::Private::setFilter(QString const & s)
|
||||
p->QComboBox::showPopup();
|
||||
inShowPopup_ = false;
|
||||
}
|
||||
|
||||
|
||||
p->view()->setUpdatesEnabled(enabled);
|
||||
}
|
||||
|
||||
@ -356,7 +356,7 @@ CategorizedCombo::CategorizedCombo(QWidget * parent)
|
||||
// for the filtering we have to intercept characters
|
||||
view()->installEventFilter(this);
|
||||
view()->setItemDelegateForColumn(0, d->CCItemDelegate_);
|
||||
|
||||
|
||||
updateCombo();
|
||||
}
|
||||
|
||||
@ -373,7 +373,7 @@ void CategorizedCombo::Private::countCategories()
|
||||
if (n == 0)
|
||||
return;
|
||||
|
||||
QString prevCat = model_->index(0, 2).data().toString();
|
||||
QString prevCat = model_->index(0, 2).data().toString();
|
||||
|
||||
// count categories
|
||||
for (int i = 1; i < n; ++i) {
|
||||
@ -412,7 +412,7 @@ bool CategorizedCombo::eventFilter(QObject * o, QEvent * e)
|
||||
bool modified = (ke->modifiers() == Qt::ControlModifier)
|
||||
|| (ke->modifiers() == Qt::AltModifier)
|
||||
|| (ke->modifiers() == Qt::MetaModifier);
|
||||
|
||||
|
||||
switch (ke->key()) {
|
||||
case Qt::Key_Escape:
|
||||
if (!modified && !d->filter_.isEmpty()) {
|
||||
@ -520,7 +520,7 @@ void CategorizedCombo::addItemSort(QString const & item, QString const & guiname
|
||||
if (sortedByCat) {
|
||||
// If sortCats == true, sort categories alphabetically, uncategorized at the end.
|
||||
while (i < end && d->model_->item(i, 2)->text() != qcat
|
||||
&& (!sortCats
|
||||
&& (!sortCats
|
||||
|| (!uncategorized && d->model_->item(i, 2)->text().localeAwareCompare(qcat) < 0
|
||||
&& d->model_->item(i, 2)->text() != qt_("Uncategorized"))
|
||||
|| (uncategorized && d->model_->item(i, 2)->text() != qt_("Uncategorized"))))
|
||||
@ -571,7 +571,7 @@ void CategorizedCombo::reset()
|
||||
void CategorizedCombo::updateCombo()
|
||||
{
|
||||
d->countCategories();
|
||||
|
||||
|
||||
// needed to recalculate size hint
|
||||
hide();
|
||||
setMinimumWidth(sizeHint().width());
|
||||
|
@ -93,7 +93,7 @@ FileDialog::Result FileDialog::save(QString const & path,
|
||||
|
||||
#ifdef USE_NATIVE_FILEDIALOG
|
||||
QString const startsWith = makeAbsPath(suggested, path);
|
||||
QString const name =
|
||||
QString const name =
|
||||
QFileDialog::getSaveFileName(qApp->focusWidget(),
|
||||
title_, startsWith, filters.join(";;"),
|
||||
selectedFilter, QFileDialog::DontConfirmOverwrite);
|
||||
|
@ -196,7 +196,7 @@ void doWarning(docstring const & title0, docstring const & message,
|
||||
void warning(docstring const & title0, docstring const & message,
|
||||
bool const & askshowagain)
|
||||
{
|
||||
#ifdef EXPORT_in_THREAD
|
||||
#ifdef EXPORT_in_THREAD
|
||||
InGuiThread<void>().call(&doWarning,
|
||||
#else
|
||||
doWarning(
|
||||
@ -246,7 +246,7 @@ void doError(docstring const & title0, docstring const & message, bool backtrace
|
||||
void error(docstring const & title0, docstring const & message, bool backtrace)
|
||||
{
|
||||
#ifdef EXPORT_in_THREAD
|
||||
InGuiThread<void>().call(&doError,
|
||||
InGuiThread<void>().call(&doError,
|
||||
#else
|
||||
doError(
|
||||
#endif
|
||||
|
@ -598,7 +598,7 @@ QPixmap getPixmap(QString const & path, QString const & name, QString const & ex
|
||||
if (getPixmap(pixmap, fpath)) {
|
||||
return pixmap;
|
||||
}
|
||||
|
||||
|
||||
QStringList exts = ext.split(",");
|
||||
fpath = ":/" + path + name + ".";
|
||||
for (int i = 0; i < exts.size(); ++i) {
|
||||
|
@ -342,7 +342,7 @@ void GuiBox::paramsToDialog(Inset const * inset)
|
||||
&& halignCO->count() < 4)
|
||||
halignCO->addItem(toqstr("Stretch"));
|
||||
else if (inner_type != "makebox" && (type != "Boxed" && inner_type != "none"))
|
||||
halignCO->removeItem(3);
|
||||
halignCO->removeItem(3);
|
||||
// pagebreak is only allowed for Boxed without inner box
|
||||
pagebreakCB->setEnabled(!ibox && type == "Boxed");
|
||||
|
||||
|
@ -80,10 +80,10 @@ GuiBranches::GuiBranches(QWidget * parent)
|
||||
}
|
||||
|
||||
|
||||
bool GuiBranches::eventFilter(QObject * obj, QEvent * event)
|
||||
bool GuiBranches::eventFilter(QObject * obj, QEvent * event)
|
||||
{
|
||||
QEvent::Type etype = event->type();
|
||||
if (etype == QEvent::KeyPress
|
||||
if (etype == QEvent::KeyPress
|
||||
&& obj == newBranchLE
|
||||
&& addBranchPB->isEnabled()) {
|
||||
QKeyEvent * keyEvent = static_cast<QKeyEvent *>(event);
|
||||
@ -224,7 +224,7 @@ void GuiBranches::on_renamePB_pressed()
|
||||
updateView();
|
||||
|
||||
if (!success)
|
||||
Alert::error(_("Renaming failed"),
|
||||
Alert::error(_("Renaming failed"),
|
||||
_("The branch could not be renamed."));
|
||||
else
|
||||
// emit signal
|
||||
@ -352,7 +352,7 @@ void GuiBranches::addUnknown()
|
||||
{
|
||||
QList<QListWidgetItem *> selItems =
|
||||
undef_->branchesLW->selectedItems();
|
||||
|
||||
|
||||
QList<QListWidgetItem *>::const_iterator it = selItems.begin();
|
||||
for (; it != selItems.end() ; ++it) {
|
||||
QListWidgetItem const * new_branch = *it;
|
||||
|
@ -128,11 +128,11 @@ GuiCommandBuffer::GuiCommandBuffer(GuiView * view)
|
||||
top->setMargin(0);
|
||||
setFocusProxy(edit_);
|
||||
|
||||
LastCommandsSection::LastCommands last_commands
|
||||
LastCommandsSection::LastCommands last_commands
|
||||
= theSession().lastCommands().getcommands();
|
||||
LastCommandsSection::LastCommands::const_iterator it
|
||||
LastCommandsSection::LastCommands::const_iterator it
|
||||
= last_commands.begin();
|
||||
LastCommandsSection::LastCommands::const_iterator end
|
||||
LastCommandsSection::LastCommands::const_iterator end
|
||||
= last_commands.end();
|
||||
|
||||
upPB->setEnabled(it != end);
|
||||
@ -252,7 +252,7 @@ void GuiCommandBuffer::down()
|
||||
&& history_pos_ != history_.end() - 1);
|
||||
upPB->setEnabled(history_pos_ != history_.begin());
|
||||
}
|
||||
|
||||
|
||||
|
||||
void GuiCommandBuffer::hideParent()
|
||||
{
|
||||
|
@ -78,7 +78,7 @@ GuiCompare::~GuiCompare()
|
||||
|
||||
void GuiCompare::closeEvent(QCloseEvent *)
|
||||
{
|
||||
slotCancel();
|
||||
slotCancel();
|
||||
}
|
||||
|
||||
|
||||
@ -154,7 +154,7 @@ QString GuiCompare::browse(QString const & in_name) const
|
||||
QString const title = qt_("Select document");
|
||||
|
||||
QStringList const & filters = fileFilters(qt_("LyX Documents (*.lyx)"));
|
||||
|
||||
|
||||
QString filename;
|
||||
if (lyxview().documentBufferView()) {
|
||||
QString path = bufferFilePath();
|
||||
@ -166,7 +166,7 @@ QString GuiCompare::browse(QString const & in_name) const
|
||||
qt_("Documents|#o#O"), toqstr(lyxrc.document_path));
|
||||
filename = makeAbsPath(rel_filename, path);
|
||||
}
|
||||
return filename;
|
||||
return filename;
|
||||
}
|
||||
|
||||
|
||||
@ -207,7 +207,7 @@ void GuiCompare::finished(bool aborted)
|
||||
delete compare_;
|
||||
compare_ = 0;
|
||||
}
|
||||
|
||||
|
||||
if (aborted) {
|
||||
if (dest_buffer_) {
|
||||
dest_buffer_->markClean();
|
||||
|
@ -66,7 +66,7 @@ protected:
|
||||
QStyleOptionViewItem opt = setOptions(index, option);
|
||||
QVariant value = index.data(Qt::DisplayRole);
|
||||
QPixmap pixmap = qvariant_cast<QPixmap>(value);
|
||||
|
||||
|
||||
// draw
|
||||
painter->save();
|
||||
drawBackground(painter, opt, index);
|
||||
@ -128,13 +128,13 @@ public:
|
||||
|
||||
if (role != Qt::DisplayRole && role != Qt::EditRole)
|
||||
return QVariant();
|
||||
|
||||
|
||||
if (index.column() == 0)
|
||||
return toqstr(list_->data(index.row()));
|
||||
|
||||
if (index.column() != 1)
|
||||
return QVariant();
|
||||
|
||||
|
||||
// get icon from cache
|
||||
QPixmap scaled;
|
||||
QString const name = ":" + toqstr(list_->icon(index.row()));
|
||||
@ -145,7 +145,7 @@ public:
|
||||
QPixmap p = QPixmap(name);
|
||||
if (!p.isNull()) {
|
||||
// scale it to 16x16 or smaller
|
||||
scaled = p.scaled(min(16, p.width()), min(16, p.height()),
|
||||
scaled = p.scaled(min(16, p.width()), min(16, p.height()),
|
||||
Qt::KeepAspectRatio, Qt::SmoothTransformation);
|
||||
}
|
||||
QPixmapCache::insert("completion" + name, scaled);
|
||||
@ -170,7 +170,7 @@ GuiCompleter::GuiCompleter(GuiWorkArea * gui, QObject * parent)
|
||||
setCompletionMode(QCompleter::PopupCompletion);
|
||||
setCaseSensitivity(Qt::CaseSensitive);
|
||||
setWidget(gui_);
|
||||
|
||||
|
||||
// create the popup
|
||||
QTreeView *listView = new QTreeView;
|
||||
listView->setEditTriggers(QAbstractItemView::NoEditTriggers);
|
||||
@ -181,10 +181,10 @@ GuiCompleter::GuiCompleter(GuiWorkArea * gui, QObject * parent)
|
||||
listView->setIndentation(0);
|
||||
listView->setUniformRowHeights(true);
|
||||
setPopup(listView);
|
||||
|
||||
|
||||
itemDelegate_ = new CompleterItemDelegate(this);
|
||||
popup()->setItemDelegate(itemDelegate_);
|
||||
|
||||
|
||||
// create timeout timers
|
||||
popup_timer_.setSingleShot(true);
|
||||
inline_timer_.setSingleShot(true);
|
||||
@ -219,7 +219,7 @@ bool GuiCompleter::eventFilter(QObject * watched, QEvent * e)
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return QCompleter::eventFilter(watched, e);
|
||||
}
|
||||
|
||||
@ -247,7 +247,7 @@ bool GuiCompleter::uniqueCompletionAvailable() const
|
||||
if (n > 1 || n == 0)
|
||||
return false;
|
||||
|
||||
// if there is exactly one, we have to check whether it is a
|
||||
// if there is exactly one, we have to check whether it is a
|
||||
// real completion, i.e. longer than the current prefix.
|
||||
if (completionPrefix() == currentCompletion())
|
||||
return false;
|
||||
@ -263,7 +263,7 @@ bool GuiCompleter::completionAvailable() const
|
||||
|
||||
size_t n = popup()->model()->rowCount();
|
||||
|
||||
// if there is exactly one, we have to check whether it is a
|
||||
// if there is exactly one, we have to check whether it is a
|
||||
// real completion, i.e. longer than the current prefix.
|
||||
if (n == 1 && completionPrefix() == currentCompletion())
|
||||
return false;
|
||||
@ -338,9 +338,9 @@ void GuiCompleter::updateVisibility(bool start, bool keep)
|
||||
{
|
||||
Cursor cur = gui_->bufferView().cursor();
|
||||
cur.screenUpdateFlags(Update::None);
|
||||
|
||||
|
||||
updateVisibility(cur, start, keep);
|
||||
|
||||
|
||||
if (cur.result().screenUpdate())
|
||||
gui_->bufferView().processUpdateFlags(cur.result().screenUpdate());
|
||||
}
|
||||
@ -352,12 +352,12 @@ void GuiCompleter::updatePrefix(Cursor const & cur)
|
||||
QString newPrefix = toqstr(cur.inset().completionPrefix(cur));
|
||||
if (newPrefix == completionPrefix())
|
||||
return;
|
||||
|
||||
|
||||
// value which should be kept selected
|
||||
QString old = currentCompletion();
|
||||
if (old.length() == 0)
|
||||
old = last_selection_;
|
||||
|
||||
|
||||
// update completer to new prefix
|
||||
setCompletionPrefix(newPrefix);
|
||||
|
||||
@ -367,7 +367,7 @@ void GuiCompleter::updatePrefix(Cursor const & cur)
|
||||
|
||||
// restore old selection
|
||||
setCurrentCompletion(old);
|
||||
|
||||
|
||||
// if popup is not empty, the new selection will
|
||||
// be our last valid one
|
||||
QString const & s = currentCompletion();
|
||||
@ -389,11 +389,11 @@ void GuiCompleter::updateInline(Cursor const & cur, QString const & completion)
|
||||
{
|
||||
if (!cur.inset().inlineCompletionSupported(cur))
|
||||
return;
|
||||
|
||||
|
||||
// compute postfix
|
||||
docstring prefix = cur.inset().completionPrefix(cur);
|
||||
docstring postfix = qstring_to_ucs4(completion.mid(prefix.length()));
|
||||
|
||||
|
||||
// shorten it if necessary
|
||||
if (lyxrc.completion_inline_dots != -1)
|
||||
support::truncateWithEllipsis(postfix,
|
||||
@ -410,7 +410,7 @@ void GuiCompleter::updatePopup(Cursor const & cur)
|
||||
{
|
||||
if (!cur.inset().completionSupported(cur))
|
||||
return;
|
||||
|
||||
|
||||
popupVisible_ = true;
|
||||
|
||||
if (completionCount() == 0) {
|
||||
@ -436,14 +436,14 @@ void GuiCompleter::asyncUpdatePopup()
|
||||
int x;
|
||||
int y;
|
||||
cur.inset().completionPosAndDim(cur, x, y, dim);
|
||||
|
||||
|
||||
// and calculate the rect of the popup
|
||||
QRect rect;
|
||||
if (popup()->layoutDirection() == Qt::RightToLeft)
|
||||
rect = QRect(x + dim.width() - 200, y - dim.ascent() - 3, 200, dim.height() + 6);
|
||||
else
|
||||
rect = QRect(x, y - dim.ascent() - 3, 200, dim.height() + 6);
|
||||
|
||||
|
||||
// Resize the columns in the popup.
|
||||
// This should really be in the constructor. But somehow the treeview
|
||||
// has a bad memory about it and we have to tell him again and again.
|
||||
@ -452,7 +452,7 @@ void GuiCompleter::asyncUpdatePopup()
|
||||
setSectionResizeMode(listView->header(), 0, QHeaderView::Stretch);
|
||||
setSectionResizeMode(listView->header(), 1, QHeaderView::Fixed);
|
||||
listView->header()->resizeSection(1, 22);
|
||||
|
||||
|
||||
// show/update popup
|
||||
complete(rect);
|
||||
}
|
||||
@ -467,10 +467,10 @@ void GuiCompleter::updateAvailability()
|
||||
Cursor const & cur = gui_->bufferView().cursor();
|
||||
if (!popupPossible(cur) && !inlinePossible(cur))
|
||||
return;
|
||||
|
||||
|
||||
updateModel(cur, false, false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void GuiCompleter::updateModel(Cursor const & cur, bool popupUpdate, bool inlineUpdate)
|
||||
{
|
||||
@ -509,7 +509,7 @@ void GuiCompleter::updateModel(Cursor const & cur, bool popupUpdate, bool inline
|
||||
|
||||
// restore old selection
|
||||
setCurrentCompletion(old);
|
||||
|
||||
|
||||
// if popup is not empty, the new selection will
|
||||
// be our last valid one
|
||||
if (popupVisible() || inlineVisible()) {
|
||||
@ -530,7 +530,7 @@ void GuiCompleter::showPopup(Cursor const & cur)
|
||||
{
|
||||
if (!popupPossible(cur))
|
||||
return;
|
||||
|
||||
|
||||
updateModel(cur, true, inlineVisible());
|
||||
}
|
||||
|
||||
@ -547,7 +547,7 @@ void GuiCompleter::showInline(Cursor const & cur)
|
||||
{
|
||||
if (!inlinePossible(cur))
|
||||
return;
|
||||
|
||||
|
||||
updateModel(cur, popupVisible(), true);
|
||||
}
|
||||
|
||||
@ -556,10 +556,10 @@ void GuiCompleter::hideInline(Cursor const & cur)
|
||||
{
|
||||
gui_->bufferView().setInlineCompletion(cur, DocIterator(cur.buffer()), docstring());
|
||||
inlineVisible_ = false;
|
||||
|
||||
|
||||
if (inline_timer_.isActive())
|
||||
inline_timer_.stop();
|
||||
|
||||
|
||||
// Trigger asynchronous part of hideInline. We might be
|
||||
// in a dispatcher here and the setModel call might
|
||||
// trigger focus events which is are not healthy here.
|
||||
@ -582,7 +582,7 @@ void GuiCompleter::showPopup()
|
||||
{
|
||||
Cursor cur = gui_->bufferView().cursor();
|
||||
cur.screenUpdateFlags(Update::None);
|
||||
|
||||
|
||||
showPopup(cur);
|
||||
|
||||
// redraw if needed
|
||||
@ -595,7 +595,7 @@ void GuiCompleter::showInline()
|
||||
{
|
||||
Cursor cur = gui_->bufferView().cursor();
|
||||
cur.screenUpdateFlags(Update::None);
|
||||
|
||||
|
||||
showInline(cur);
|
||||
|
||||
// redraw if needed
|
||||
@ -617,7 +617,7 @@ void GuiCompleter::hidePopup()
|
||||
// yet up to date such that the coord cache has not all insets yet. The
|
||||
// cursorPos methods would triggers asserts in the coord cache then.
|
||||
QTimer::singleShot(0, this, SLOT(asyncHidePopup()));
|
||||
|
||||
|
||||
// mark that the asynchronous part will reset the model
|
||||
if (!inlineVisible())
|
||||
modelActive_ = false;
|
||||
@ -628,9 +628,9 @@ void GuiCompleter::hideInline()
|
||||
{
|
||||
Cursor cur = gui_->bufferView().cursor();
|
||||
cur.screenUpdateFlags(Update::None);
|
||||
|
||||
|
||||
hideInline(cur);
|
||||
|
||||
|
||||
// redraw if needed
|
||||
if (cur.result().screenUpdate())
|
||||
gui_->bufferView().processUpdateFlags(cur.result().screenUpdate());
|
||||
@ -651,13 +651,13 @@ void GuiCompleter::tab()
|
||||
BufferView * bv = &gui_->bufferView();
|
||||
Cursor cur = bv->cursor();
|
||||
cur.screenUpdateFlags(Update::None);
|
||||
|
||||
|
||||
// check that inline completion is active
|
||||
if (!inlineVisible() && !uniqueCompletionAvailable()) {
|
||||
// try to activate the inline completion
|
||||
if (cur.inset().inlineCompletionSupported(cur)) {
|
||||
showInline();
|
||||
|
||||
|
||||
// show popup without delay because the completion was not unique
|
||||
if (lyxrc.completion_popup_after_complete
|
||||
&& !popupVisible()
|
||||
@ -671,10 +671,10 @@ void GuiCompleter::tab()
|
||||
showPopup();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// Make undo possible
|
||||
cur.beginUndoGroup();
|
||||
cur.recordUndo();
|
||||
@ -685,7 +685,7 @@ void GuiCompleter::tab()
|
||||
if (completion.size() <= prefix.size()) {
|
||||
// finalize completion
|
||||
cur.inset().insertCompletion(cur, docstring(), true);
|
||||
|
||||
|
||||
// hide popup and inline completion
|
||||
hidePopup();
|
||||
hideInline(cur);
|
||||
@ -726,7 +726,7 @@ QString GuiCompleter::currentCompletion() const
|
||||
if (!popup()->selectionModel()->hasSelection())
|
||||
return QString();
|
||||
|
||||
// Not sure if this is bug in Qt: currentIndex() always
|
||||
// Not sure if this is bug in Qt: currentIndex() always
|
||||
// return the first element in the list.
|
||||
QModelIndex idx = popup()->currentIndex();
|
||||
return popup()->model()->data(idx, Qt::EditRole).toString();
|
||||
@ -734,7 +734,7 @@ QString GuiCompleter::currentCompletion() const
|
||||
|
||||
|
||||
void GuiCompleter::setCurrentCompletion(QString const & s)
|
||||
{
|
||||
{
|
||||
QAbstractItemModel const & model = *popup()->model();
|
||||
size_t n = model.rowCount();
|
||||
if (n == 0)
|
||||
@ -848,7 +848,7 @@ docstring GuiCompleter::longestUniqueCompletion() const
|
||||
// get common prefix with the middle string
|
||||
size_t mid = (r + i) / 2;
|
||||
QString const & mids
|
||||
= model.data(model.index(mid, 0),
|
||||
= model.data(model.index(mid, 0),
|
||||
Qt::EditRole).toString();
|
||||
size_t oldLen = s.length();
|
||||
size_t len = commonPrefix(mids, s);
|
||||
@ -883,7 +883,7 @@ void GuiCompleter::popupActivated(const QString & completion)
|
||||
cur.inset().insertCompletion(cur, postfix, true);
|
||||
hidePopup();
|
||||
hideInline(cur);
|
||||
|
||||
|
||||
if (cur.result().screenUpdate())
|
||||
gui_->bufferView().processUpdateFlags(cur.result().screenUpdate());
|
||||
cur.endUndoGroup();
|
||||
@ -897,10 +897,10 @@ void GuiCompleter::popupHighlighted(const QString & completion)
|
||||
|
||||
Cursor cur = gui_->bufferView().cursor();
|
||||
cur.screenUpdateFlags(Update::None);
|
||||
|
||||
|
||||
if (inlineVisible())
|
||||
updateInline(cur, completion);
|
||||
|
||||
|
||||
if (cur.result().screenUpdate())
|
||||
gui_->bufferView().processUpdateFlags(cur.result().screenUpdate());
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
GuiDialog::GuiDialog(GuiView & lv, QString const & name, QString const & title)
|
||||
: QDialog(&lv), Dialog(lv, name, "LyX: " + title), updating_(false),
|
||||
: QDialog(&lv), Dialog(lv, name, "LyX: " + title), updating_(false),
|
||||
is_closing_(false)
|
||||
{
|
||||
connect(&lv, SIGNAL(bufferViewChanged()),
|
||||
|
@ -1280,7 +1280,7 @@ GuiDocument::GuiDocument(GuiView & lv)
|
||||
connect(mathsModule->MathIndentLengthCO, SIGNAL(activated(int)),
|
||||
this, SLOT(change_adaptor()));
|
||||
|
||||
|
||||
|
||||
mathsModule->MathIndentCO->addItem(qt_("Default"));
|
||||
mathsModule->MathIndentCO->addItem(qt_("Custom"));
|
||||
mathsModule->MathIndentLE->setValidator(new LengthValidator(
|
||||
@ -1291,7 +1291,7 @@ GuiDocument::GuiDocument(GuiView & lv)
|
||||
mathsModule->MathNumberingPosCO->addItem(qt_("Default"));
|
||||
mathsModule->MathNumberingPosCO->addItem(qt_("Right"));
|
||||
mathsModule->MathNumberingPosCO->setCurrentIndex(1);
|
||||
|
||||
|
||||
|
||||
// latex class
|
||||
latexModule = new UiWidget<Ui::LaTeXUi>(this);
|
||||
@ -3333,7 +3333,7 @@ void GuiDocument::paramsToDialog()
|
||||
biblioChanged_ = false;
|
||||
|
||||
// indices
|
||||
// We may be called when there is no Buffer, e.g., when
|
||||
// We may be called when there is no Buffer, e.g., when
|
||||
// the last view has just been closed.
|
||||
bool const isReadOnly = isBufferAvailable() ? buffer().isReadonly() : false;
|
||||
indicesModule->update(bp_, isReadOnly);
|
||||
@ -3697,7 +3697,7 @@ void GuiDocument::paramsToDialog()
|
||||
toqstr(bp_.fonts_cjk));
|
||||
else
|
||||
fontModule->cjkFontLE->setText(QString());
|
||||
|
||||
|
||||
fontModule->microtypeCB->setChecked(bp_.use_microtype);
|
||||
fontModule->dashesCB->setChecked(bp_.use_dash_ligatures);
|
||||
|
||||
|
@ -152,7 +152,7 @@ bool GuiErrorList::initialiseParams(string const & data)
|
||||
buf_ = from_master_ ?
|
||||
bufferview()->buffer().masterBuffer()
|
||||
: &bufferview()->buffer();
|
||||
name_ = bformat(_("%1$s Errors (%2$s)"),
|
||||
name_ = bformat(_("%1$s Errors (%2$s)"),
|
||||
_(guiErrorType(error_type)),
|
||||
from_utf8(buf_->absFileName()));
|
||||
paramsToDialog();
|
||||
|
@ -301,7 +301,7 @@ QFont makeQFont(FontInfo const & f)
|
||||
switch (f.family()) {
|
||||
case ROMAN_FAMILY: {
|
||||
QString family = makeFontName(toqstr(lyxrc.roman_font_name),
|
||||
toqstr(lyxrc.roman_font_foundry));
|
||||
toqstr(lyxrc.roman_font_foundry));
|
||||
font.setFamily(family);
|
||||
#ifdef Q_OS_MAC
|
||||
#if QT_VERSION >= 0x040300 //&& QT_VERSION < 0x040800
|
||||
|
@ -113,7 +113,7 @@ GuiGraphics::GuiGraphics(GuiView & lv)
|
||||
: GuiDialog(lv, "graphics", qt_("Graphics")), bbChanged(false)
|
||||
{
|
||||
setupUi(this);
|
||||
|
||||
|
||||
//main buttons
|
||||
connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
|
||||
connect(applyPB, SIGNAL(clicked()), this, SLOT(slotApply()));
|
||||
@ -155,7 +155,7 @@ GuiGraphics::GuiGraphics(GuiView & lv)
|
||||
filename->setValidator(new PathValidator(true, filename));
|
||||
setFocusProxy(filename);
|
||||
|
||||
QDoubleValidator * scaleValidator =
|
||||
QDoubleValidator * scaleValidator =
|
||||
new DoubleAutoValidator(Scale, qt_(autostr));
|
||||
scaleValidator->setBottom(0);
|
||||
scaleValidator->setDecimals(256); //I guess that will do
|
||||
@ -255,12 +255,12 @@ void GuiGraphics::changeGroup(int /* index */)
|
||||
{
|
||||
QString const new_group = groupCO->itemData(
|
||||
groupCO->currentIndex()).toString();
|
||||
|
||||
|
||||
// check if the old group consisted only of this member
|
||||
if (current_group_ != fromqstr(new_group)
|
||||
&& graphics::countGroupMembers(buffer(), current_group_) == 1) {
|
||||
if (!new_group.isEmpty()) {
|
||||
if (Alert::prompt(_("Dissolve previous group?"),
|
||||
if (Alert::prompt(_("Dissolve previous group?"),
|
||||
bformat(_("If you assign this graphic to group '%2$s',\n"
|
||||
"the previously assigned group '%1$s' will be dissolved,\n"
|
||||
"because this graphic was its only member.\n"
|
||||
@ -276,7 +276,7 @@ void GuiGraphics::changeGroup(int /* index */)
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if (Alert::prompt(_("Dissolve previous group?"),
|
||||
if (Alert::prompt(_("Dissolve previous group?"),
|
||||
bformat(_("If you sign off this graphic from group '%1$s',\n"
|
||||
"the group will be dissolved,\n"
|
||||
"because this graphic was its only member.\n"
|
||||
@ -292,7 +292,7 @@ void GuiGraphics::changeGroup(int /* index */)
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (new_group.isEmpty()) {
|
||||
changed();
|
||||
@ -305,7 +305,7 @@ void GuiGraphics::changeGroup(int /* index */)
|
||||
changed();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// filename might have been changed
|
||||
QString current_filename = filename->text();
|
||||
|
||||
@ -314,7 +314,7 @@ void GuiGraphics::changeGroup(int /* index */)
|
||||
InsetGraphics::string2params(grp, buffer(), params_);
|
||||
paramsToDialog(params_);
|
||||
groupCO->blockSignals(false);
|
||||
|
||||
|
||||
// reset filename
|
||||
filename->setText(current_filename);
|
||||
|
||||
@ -330,7 +330,7 @@ void GuiGraphics::on_newGroupPB_clicked()
|
||||
if (newgroup.empty())
|
||||
return;
|
||||
if (groupCO->findData(toqstr(newgroup), Qt::MatchExactly) != -1) {
|
||||
Alert::warning(_("Group already defined!"),
|
||||
Alert::warning(_("Group already defined!"),
|
||||
bformat(_("A graphics group with the name '%1$s' already exists."),
|
||||
newgroup));
|
||||
return;
|
||||
@ -504,7 +504,7 @@ void GuiGraphics::paramsToDialog(InsetGraphicsParams const & igp)
|
||||
lbYunit->clear();
|
||||
rtXunit->clear();
|
||||
rtYunit->clear();
|
||||
|
||||
|
||||
for (size_t i = 0; i < bb_size; i++) {
|
||||
lbXunit->addItem(qt_(bb_units_gui[i]),
|
||||
toqstr(bb_units[i]));
|
||||
@ -515,7 +515,7 @@ void GuiGraphics::paramsToDialog(InsetGraphicsParams const & igp)
|
||||
rtYunit->addItem(qt_(bb_units_gui[i]),
|
||||
toqstr(bb_units[i]));
|
||||
}
|
||||
|
||||
|
||||
// set the right default unit
|
||||
Length::UNIT const defaultUnit = Length::defaultUnit();
|
||||
|
||||
@ -788,7 +788,7 @@ QString GuiGraphics::browse(QString const & in_name) const
|
||||
clipdir = addName(package().system_support().absFileName(), "clipart");
|
||||
|
||||
return browseRelToParent(in_name, bufferFilePath(),
|
||||
title, fileFilters(QString()), false,
|
||||
title, fileFilters(QString()), false,
|
||||
qt_("Clipart|#C#c"), toqstr(clipdir),
|
||||
qt_("Documents|#o#O"), toqstr(lyxrc.document_path));
|
||||
}
|
||||
|
@ -295,7 +295,7 @@ docstring GuiHSpace::dialogToParams() const
|
||||
params.kind = keepCB->isChecked() ?
|
||||
InsetSpaceParams::CUSTOM_PROTECTED : InsetSpaceParams::CUSTOM;
|
||||
params.length = GlueLength(widgetsToLength(valueLE, unitCO));
|
||||
} else if (item == "visible")
|
||||
} else if (item == "visible")
|
||||
params.kind = InsetSpaceParams::VISIBLE;
|
||||
|
||||
return from_ascii(InsetSpace::params2string(params));
|
||||
|
@ -42,7 +42,7 @@ QVariant GuiIdListModel::data(QModelIndex const & index, int role) const
|
||||
}
|
||||
|
||||
|
||||
bool GuiIdListModel::setData (QModelIndex const & index,
|
||||
bool GuiIdListModel::setData (QModelIndex const & index,
|
||||
const QVariant & value, int role)
|
||||
{
|
||||
int const row = index.row();
|
||||
@ -70,7 +70,7 @@ bool GuiIdListModel::setData (QModelIndex const & index,
|
||||
}
|
||||
|
||||
|
||||
bool GuiIdListModel::insertRows(int row, int count,
|
||||
bool GuiIdListModel::insertRows(int row, int count,
|
||||
QModelIndex const & /*parent*/)
|
||||
{
|
||||
if (!rowIsValid(row))
|
||||
@ -83,7 +83,7 @@ bool GuiIdListModel::insertRows(int row, int count,
|
||||
}
|
||||
|
||||
|
||||
bool GuiIdListModel::removeRows(int row, int count,
|
||||
bool GuiIdListModel::removeRows(int row, int count,
|
||||
QModelIndex const & /*parent*/)
|
||||
{
|
||||
if (!rowIsValid(row) || row + count > int(userData_.size()) ||
|
||||
@ -93,20 +93,20 @@ bool GuiIdListModel::removeRows(int row, int count,
|
||||
return true;
|
||||
vector<OurData>::iterator it = userData_.begin() + row;
|
||||
beginRemoveRows(QModelIndex(), row, row + count - 1);
|
||||
userData_.erase(it, it + count);
|
||||
userData_.erase(it, it + count);
|
||||
endRemoveRows();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void GuiIdListModel::insertRow(int const i, QString const & uiString,
|
||||
void GuiIdListModel::insertRow(int const i, QString const & uiString,
|
||||
std::string const & idString)
|
||||
{
|
||||
insertRow(i, uiString, idString, uiString);
|
||||
}
|
||||
|
||||
|
||||
void GuiIdListModel::insertRow(int const i, QString const & uiString,
|
||||
void GuiIdListModel::insertRow(int const i, QString const & uiString,
|
||||
std::string const & idString, QString const & ttString)
|
||||
{
|
||||
insertRows(i, 1);
|
||||
@ -127,7 +127,7 @@ QMap<int, QVariant> GuiIdListModel::itemData(QModelIndex const & index) const
|
||||
}
|
||||
|
||||
|
||||
int GuiIdListModel::findIDString(std::string const & idString)
|
||||
int GuiIdListModel::findIDString(std::string const & idString)
|
||||
{
|
||||
vector<OurData>::const_iterator it = userData_.begin();
|
||||
vector<OurData>::const_iterator end = userData_.end();
|
||||
|
@ -153,7 +153,7 @@ void GuiInclude::typeChanged(int v)
|
||||
listingsGB->setEnabled(false);
|
||||
break;
|
||||
}
|
||||
//see this thread
|
||||
//see this thread
|
||||
// http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg118471.html
|
||||
//for the reason this is here.
|
||||
okPB->setDefault(true);
|
||||
@ -214,7 +214,7 @@ void GuiInclude::paramsToDialog(InsetCommandParams const & params_)
|
||||
if (cap[0] == '{' && cap[cap.size() - 1] == '}') {
|
||||
captionLE->setText(toqstr(cap.substr(1, cap.size() - 2)));
|
||||
*it = "";
|
||||
}
|
||||
}
|
||||
} else if (prefixIs(*it, "label=")) {
|
||||
string lbl = it->substr(6);
|
||||
if (lbl[0] == '{' && lbl[lbl.size()-1] == '}') {
|
||||
|
@ -211,9 +211,9 @@ void GuiIndices::on_removePB_pressed()
|
||||
if (selItem != 0)
|
||||
sel_index = selItem->text(0);
|
||||
if (!sel_index.isEmpty()) {
|
||||
if (indiceslist_.find(qstring_to_ucs4(sel_index)) ==
|
||||
if (indiceslist_.find(qstring_to_ucs4(sel_index)) ==
|
||||
indiceslist_.findShortcut(from_ascii("idx"))) {
|
||||
Alert::error(_("Cannot remove standard index"),
|
||||
Alert::error(_("Cannot remove standard index"),
|
||||
_("The default index cannot be removed."));
|
||||
return;
|
||||
}
|
||||
@ -240,7 +240,7 @@ void GuiIndices::on_renamePB_clicked()
|
||||
newIndexLE->clear();
|
||||
updateView();
|
||||
if (!success)
|
||||
Alert::error(_("Renaming failed"),
|
||||
Alert::error(_("Renaming failed"),
|
||||
_("The index could not be renamed. "
|
||||
"Check if the new name already exists."));
|
||||
}
|
||||
|
@ -623,7 +623,7 @@ void setKeySymbol(KeySymbol * sym, QKeyEvent const * ev)
|
||||
LYXERR(Debug::KEY, "Getting key " << ev->key() << ", with text '"
|
||||
<< ev->text() << "'");
|
||||
// This is unsafe because ev->text() is the unicode representation of the
|
||||
// key, not the name of the key. For example, Ctrl-x and Alt-x produce
|
||||
// key, not the name of the key. For example, Ctrl-x and Alt-x produce
|
||||
// different texts.
|
||||
sym->setText(qstring_to_ucs4(ev->text()));
|
||||
LYXERR(Debug::KEY, "Setting key to " << sym->key() << ", "
|
||||
@ -714,7 +714,7 @@ docstring const KeySymbol::print(KeyModifier mod, bool forgui) const
|
||||
str.replace(QChar(0x2325), qt_("Option-"));
|
||||
str.replace(QChar(0x2318), qt_("Command-"));
|
||||
#else
|
||||
str = seq.toString(QKeySequence::PortableText);
|
||||
str = seq.toString(QKeySequence::PortableText);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -237,9 +237,9 @@ bool GuiLog::initialiseParams(string const & data)
|
||||
|
||||
logTypeCO->setEnabled(logtype == "latex");
|
||||
logTypeCO->clear();
|
||||
|
||||
|
||||
FileName log(logfile);
|
||||
|
||||
|
||||
if (logtype == "latex") {
|
||||
type_ = LatexLog;
|
||||
logTypeCO->addItem(qt_("LaTeX"), toqstr(logtype));
|
||||
|
@ -131,7 +131,7 @@ void GuiMathMatrix::slotOK()
|
||||
// a matrix without a decoration is an array,
|
||||
// otherwise it is an AMS matrix
|
||||
// decorated matrices cannot have a vertical alignment
|
||||
|
||||
|
||||
char const c = v_align_c[valignCO->currentIndex()];
|
||||
QString const sh = halignED->text();
|
||||
string const str = fromqstr(
|
||||
|
@ -134,15 +134,15 @@ QColor GuiPainter::filterColor(QColor const & col)
|
||||
// map into [min,max] interval
|
||||
QColor const & min = monochrome_min_.top();
|
||||
QColor const & max = monochrome_max_.top();
|
||||
|
||||
|
||||
qreal v = col.valueF();
|
||||
v *= v; // make it a bit steeper (i.e. darker)
|
||||
|
||||
|
||||
qreal minr, ming, minb;
|
||||
qreal maxr, maxg, maxb;
|
||||
min.getRgbF(&minr, &ming, &minb);
|
||||
max.getRgbF(&maxr, &maxg, &maxb);
|
||||
|
||||
|
||||
QColor c;
|
||||
c.setRgbF(
|
||||
v * (minr - maxr) + maxr,
|
||||
|
@ -353,7 +353,7 @@ bool GuiParagraph::haveMultiParSelection() const
|
||||
return cur.selection() && cur.selBegin().pit() != cur.selEnd().pit();
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool GuiParagraph::canIndent() const
|
||||
{
|
||||
Layout const lay = bufferview()->cursor().innerParagraph().layout();
|
||||
|
@ -3534,7 +3534,7 @@ void GuiPreferences::dispatchParams()
|
||||
theConverters().update(formats_);
|
||||
theConverters().buildGraph();
|
||||
theBufferList().invalidateConverterCache();
|
||||
|
||||
|
||||
theMovers() = movers_;
|
||||
|
||||
vector<string>::const_iterator it = colors_.begin();
|
||||
|
@ -53,7 +53,7 @@ GuiProgress::GuiProgress()
|
||||
connect(this, SIGNAL(appendMessage(QString const &)), SLOT(doAppendMessage(QString const &)));
|
||||
connect(this, SIGNAL(appendError(QString const &)), SLOT(doAppendError(QString const &)));
|
||||
connect(this, SIGNAL(clearMessages()), SLOT(doClearMessages()));
|
||||
|
||||
|
||||
// Alert interface
|
||||
connect(this, SIGNAL(warning(QString const &, QString const &)),
|
||||
SLOT(doWarning(QString const &, QString const &)));
|
||||
|
@ -61,7 +61,7 @@ bool DebugSorter(DebugMap const & a, DebugMap const & b)
|
||||
}
|
||||
|
||||
|
||||
GuiProgressView::GuiProgressView(GuiView & parent, Qt::DockWidgetArea area,
|
||||
GuiProgressView::GuiProgressView(GuiView & parent, Qt::DockWidgetArea area,
|
||||
Qt::WindowFlags flags)
|
||||
: DockView(parent, "progress", qt_("Progress/Debug Messages"), area, flags)
|
||||
{
|
||||
@ -114,7 +114,7 @@ GuiProgressView::GuiProgressView(GuiView & parent, Qt::DockWidgetArea area,
|
||||
connect(widget_->debugMessagesTW,
|
||||
SIGNAL(itemActivated(QTreeWidgetItem *, int)),
|
||||
this, SLOT(debugMessageActivated(QTreeWidgetItem *, int)));
|
||||
|
||||
|
||||
GuiProgress * progress =
|
||||
dynamic_cast<GuiProgress *>(ProgressInterface::instance());
|
||||
|
||||
|
@ -146,9 +146,9 @@ void GuiRef::enableView(bool enable)
|
||||
|
||||
void GuiRef::enableBoxes()
|
||||
{
|
||||
bool const isFormatted =
|
||||
bool const isFormatted =
|
||||
(InsetRef::getName(typeCO->currentIndex()) == "formatted");
|
||||
bool const isLabelOnly =
|
||||
bool const isLabelOnly =
|
||||
(InsetRef::getName(typeCO->currentIndex()) == "labelonly");
|
||||
bool const usingRefStyle = buffer().params().use_refstyle;
|
||||
pluralCB->setEnabled(isFormatted && usingRefStyle);
|
||||
@ -170,7 +170,7 @@ void GuiRef::gotoClicked()
|
||||
// to which we are going (or from which we are returning) is
|
||||
// restored in the dialog. It's a bit of a hack, but it works,
|
||||
// and no-one seems to have any better idea.
|
||||
bool const toggled =
|
||||
bool const toggled =
|
||||
last_reference_.isEmpty() || last_reference_.isNull();
|
||||
if (toggled)
|
||||
last_reference_ = referenceED->text();
|
||||
@ -353,11 +353,11 @@ void GuiRef::applyView()
|
||||
params_.setCmdName(InsetRef::getName(typeCO->currentIndex()));
|
||||
params_["reference"] = qstring_to_ucs4(last_reference_);
|
||||
params_["name"] = qstring_to_ucs4(nameED->text());
|
||||
params_["plural"] = pluralCB->isChecked() ?
|
||||
params_["plural"] = pluralCB->isChecked() ?
|
||||
from_ascii("true") : from_ascii("false");
|
||||
params_["caps"] = capsCB->isChecked() ?
|
||||
params_["caps"] = capsCB->isChecked() ?
|
||||
from_ascii("true") : from_ascii("false");
|
||||
params_["noprefix"] = noprefixCB->isChecked() ?
|
||||
params_["noprefix"] = noprefixCB->isChecked() ?
|
||||
from_ascii("true") : from_ascii("false");
|
||||
restored_buffer_ = bufferCO->currentIndex();
|
||||
}
|
||||
|
@ -6,7 +6,7 @@
|
||||
* \author Richard Heck
|
||||
* \author Et Alia
|
||||
*
|
||||
* Some of the material in this file previously appeared in
|
||||
* Some of the material in this file previously appeared in
|
||||
* GuiCitationDialog.cpp.
|
||||
*
|
||||
* Full author contact details are available in file CREDITS.
|
||||
@ -108,12 +108,12 @@ QModelIndex GuiSelectionManager::getSelectedIndex(int const c) const
|
||||
bool const have_avl = !avail.isEmpty();
|
||||
bool const have_sel = !sel.isEmpty();
|
||||
|
||||
if (selectedFocused()) {
|
||||
if (selectedFocused()) {
|
||||
if (have_sel)
|
||||
return sel.front();
|
||||
if (have_avl)
|
||||
return avail.front();
|
||||
}
|
||||
}
|
||||
else { // available has focus
|
||||
if (have_avl)
|
||||
return avail.front();
|
||||
@ -127,7 +127,7 @@ QModelIndex GuiSelectionManager::getSelectedIndex(int const c) const
|
||||
void GuiSelectionManager::updateAddPB()
|
||||
{
|
||||
int const arows = availableModel->rowCount();
|
||||
QModelIndexList const availSels =
|
||||
QModelIndexList const availSels =
|
||||
availableLV->selectionModel()->selectedIndexes();
|
||||
addPB->setEnabled(arows > 0 &&
|
||||
!availSels.isEmpty() &&
|
||||
@ -142,7 +142,7 @@ void GuiSelectionManager::updateDelPB()
|
||||
deletePB->setEnabled(false);
|
||||
return;
|
||||
}
|
||||
QModelIndexList const selSels =
|
||||
QModelIndexList const selSels =
|
||||
selectedLV->selectionModel()->selectedIndexes();
|
||||
int const sel_nr = selSels.empty() ? -1 : selSels.first().row();
|
||||
deletePB->setEnabled(sel_nr >= 0);
|
||||
@ -156,7 +156,7 @@ void GuiSelectionManager::updateUpPB()
|
||||
upPB->setEnabled(false);
|
||||
return;
|
||||
}
|
||||
QModelIndexList const selSels =
|
||||
QModelIndexList const selSels =
|
||||
selectedLV->selectionModel()->selectedIndexes();
|
||||
int const sel_nr = selSels.empty() ? -1 : selSels.first().row();
|
||||
upPB->setEnabled(sel_nr > 0);
|
||||
@ -170,7 +170,7 @@ void GuiSelectionManager::updateDownPB()
|
||||
downPB->setEnabled(false);
|
||||
return;
|
||||
}
|
||||
QModelIndexList const selSels =
|
||||
QModelIndexList const selSels =
|
||||
selectedLV->selectionModel()->selectedIndexes();
|
||||
int const sel_nr = selSels.empty() ? -1 : selSels.first().row();
|
||||
downPB->setEnabled(sel_nr >= 0 && sel_nr < srows - 1);
|
||||
@ -182,7 +182,7 @@ bool GuiSelectionManager::isSelected(const QModelIndex & idx)
|
||||
if (selectedModel->rowCount() == 0)
|
||||
return false;
|
||||
QVariant const & str = availableModel->data(idx, Qt::DisplayRole);
|
||||
QModelIndexList qmil =
|
||||
QModelIndexList qmil =
|
||||
selectedModel->match(selectedModel->index(0, main_sel_col_),
|
||||
Qt::DisplayRole, str, 1,
|
||||
Qt::MatchFlags(Qt::MatchExactly | Qt::MatchWrap));
|
||||
@ -193,7 +193,7 @@ bool GuiSelectionManager::isSelected(const QModelIndex & idx)
|
||||
void GuiSelectionManager::availableChanged(QItemSelection const & qis, QItemSelection const &)
|
||||
{
|
||||
QModelIndexList il = qis.indexes();
|
||||
if (il.empty())
|
||||
if (il.empty())
|
||||
return;
|
||||
availableChanged(il.front(), QModelIndex());
|
||||
}
|
||||
@ -212,7 +212,7 @@ void GuiSelectionManager::availableChanged(const QModelIndex & idx, const QModel
|
||||
void GuiSelectionManager::selectedChanged(QItemSelection const & qis, QItemSelection const &)
|
||||
{
|
||||
QModelIndexList il = qis.indexes();
|
||||
if (il.empty())
|
||||
if (il.empty())
|
||||
return;
|
||||
selectedChanged(il.front(), QModelIndex());
|
||||
}
|
||||
@ -234,7 +234,7 @@ void GuiSelectionManager::selectedEdited()
|
||||
}
|
||||
|
||||
|
||||
bool GuiSelectionManager::insertRowToSelected(int i,
|
||||
bool GuiSelectionManager::insertRowToSelected(int i,
|
||||
QMap<int, QVariant> const & itemData)
|
||||
{
|
||||
if (i <= -1)
|
||||
@ -377,7 +377,7 @@ void GuiSelectionManager::availableLV_doubleClicked(const QModelIndex & idx)
|
||||
}
|
||||
|
||||
|
||||
bool GuiSelectionManager::eventFilter(QObject * obj, QEvent * event)
|
||||
bool GuiSelectionManager::eventFilter(QObject * obj, QEvent * event)
|
||||
{
|
||||
QEvent::Type etype = event->type();
|
||||
if (obj == availableLV) {
|
||||
|
@ -72,7 +72,7 @@ void GuiSendTo::changed_adaptor()
|
||||
|
||||
void GuiSendTo::updateContents()
|
||||
{
|
||||
FormatList const & all_formats =
|
||||
FormatList const & all_formats =
|
||||
buffer().params().exportableFormats(false);
|
||||
// Save the current selection if any
|
||||
Format const * current_format = nullptr;
|
||||
@ -102,7 +102,7 @@ void GuiSendTo::applyView()
|
||||
if (line < 0 || line > formatLW->count())
|
||||
return;
|
||||
|
||||
FormatList const & all_formats =
|
||||
FormatList const & all_formats =
|
||||
buffer().params().exportableFormats(false);
|
||||
format_ = all_formats[line];
|
||||
command_ = command;
|
||||
|
@ -113,7 +113,7 @@ struct SpellcheckerWidget::Private
|
||||
SpellcheckerWidget * p;
|
||||
///
|
||||
DockView * dv_;
|
||||
///
|
||||
///
|
||||
GuiView * gv_;
|
||||
/// current word being checked and lang code
|
||||
WordLangTuple word_;
|
||||
@ -321,7 +321,7 @@ void SpellcheckerWidget::Private::hide() const
|
||||
// restore cursor position
|
||||
bvcur.setCursor(start_);
|
||||
bvcur.clearSelection();
|
||||
bv->processUpdateFlags(Update::Force | Update::FitCursor);
|
||||
bv->processUpdateFlags(Update::Force | Update::FitCursor);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -333,7 +333,7 @@ void SpellcheckerWidget::Private::setSelection(
|
||||
DocIterator end = to;
|
||||
|
||||
if (from.pit() != end.pit()) {
|
||||
// there are multiple paragraphs in selection
|
||||
// there are multiple paragraphs in selection
|
||||
Cursor & bvcur = bv->cursor();
|
||||
bvcur.setCursor(from);
|
||||
bvcur.clearSelection();
|
||||
@ -388,7 +388,7 @@ bool SpellcheckerWidget::initialiseParams(std::string const &)
|
||||
BufferView * bv = d->gv_->documentBufferView();
|
||||
if (bv == 0)
|
||||
return false;
|
||||
std::set<Language const *> languages =
|
||||
std::set<Language const *> languages =
|
||||
bv->buffer().masterBuffer()->getLanguages();
|
||||
if (!languages.empty())
|
||||
d->setLanguage(*languages.begin());
|
||||
@ -457,7 +457,7 @@ void SpellcheckerWidget::on_replacePB_clicked()
|
||||
return;
|
||||
docstring const textfield = qstring_to_ucs4(d->ui.wordED->text());
|
||||
docstring const replacement = qstring_to_ucs4(d->ui.replaceCO->currentText());
|
||||
docstring const datastring =
|
||||
docstring const datastring =
|
||||
replace2string(replacement, textfield,
|
||||
true, // case sensitive
|
||||
true, // match word
|
||||
@ -531,7 +531,7 @@ void SpellcheckerWidget::Private::check()
|
||||
return;
|
||||
|
||||
fixPositionsIfBroken();
|
||||
|
||||
|
||||
SpellChecker * speller = theSpellChecker();
|
||||
if (speller && !speller->hasDictionary(bv->buffer().language())) {
|
||||
int dsize = speller->numDictionaries();
|
||||
@ -613,8 +613,8 @@ void GuiSpellchecker::updateView()
|
||||
}
|
||||
|
||||
|
||||
Dialog * createGuiSpellchecker(GuiView & lv)
|
||||
{
|
||||
Dialog * createGuiSpellchecker(GuiView & lv)
|
||||
{
|
||||
GuiSpellchecker * gui = new GuiSpellchecker(lv, Qt::RightDockWidgetArea);
|
||||
#ifdef Q_OS_MAC
|
||||
gui->setFloating(true);
|
||||
|
@ -219,7 +219,7 @@ void GuiTabular::enableWidgets() const
|
||||
else if (!multicolumnCB->isChecked() && !multirowCB->isChecked()
|
||||
&& hAlignCO->findData(toqstr("decimal")) == -1)
|
||||
hAlignCO->addItem(qt_("At Decimal Separator"), toqstr("decimal"));
|
||||
bool const dalign =
|
||||
bool const dalign =
|
||||
hAlignCO->itemData(hAlignCO->currentIndex()).toString() == QString("decimal");
|
||||
decimalPointED->setEnabled(dalign);
|
||||
decimalLA->setEnabled(dalign);
|
||||
|
@ -101,7 +101,7 @@ void GuiThesaurus::checkStatus()
|
||||
}
|
||||
updateView();
|
||||
}
|
||||
|
||||
|
||||
void GuiThesaurus::change_adaptor()
|
||||
{
|
||||
changed();
|
||||
|
@ -71,7 +71,7 @@ GuiToolbar::GuiToolbar(ToolbarInfo const & tbinfo, GuiView & owner)
|
||||
void GuiToolbar::setVisible(bool visible)
|
||||
{
|
||||
// This is a hack to find out which toolbars have been restored by
|
||||
// MainWindow::restoreState and which toolbars should be initialized
|
||||
// MainWindow::restoreState and which toolbars should be initialized
|
||||
// by us (i.e., new toolbars)
|
||||
restored_ = true;
|
||||
QToolBar::setVisible(visible);
|
||||
@ -91,7 +91,7 @@ void GuiToolbar::fill()
|
||||
ToolbarInfo::item_iterator it = tbinfo_.items.begin();
|
||||
ToolbarInfo::item_iterator end = tbinfo_.items.end();
|
||||
for (; it != end; ++it)
|
||||
add(*it);
|
||||
add(*it);
|
||||
filled_ = true;
|
||||
}
|
||||
|
||||
@ -368,7 +368,7 @@ void GuiToolbar::restoreSession()
|
||||
if (visibility == error_val || visibility == 0) {
|
||||
// This should not happen, but in case we use the defaults
|
||||
LYXERR(Debug::GUI, "Session settings could not be found! Defaults are used instead.");
|
||||
visibility =
|
||||
visibility =
|
||||
guiApp->toolbars().defaultVisibility(fromqstr(objectName()));
|
||||
}
|
||||
setVisibility(visibility);
|
||||
|
@ -571,9 +571,9 @@ GuiView::GuiView(int id)
|
||||
busyanim->start();
|
||||
busylabel->hide();
|
||||
|
||||
connect(&d.processing_thread_watcher_, SIGNAL(started()),
|
||||
connect(&d.processing_thread_watcher_, SIGNAL(started()),
|
||||
busylabel, SLOT(show()));
|
||||
connect(&d.processing_thread_watcher_, SIGNAL(finished()),
|
||||
connect(&d.processing_thread_watcher_, SIGNAL(finished()),
|
||||
busylabel, SLOT(hide()));
|
||||
|
||||
QFontMetrics const fm(statusBar()->fontMetrics());
|
||||
@ -691,7 +691,7 @@ void GuiView::processingThreadFinished()
|
||||
|
||||
Buffer::ExportStatus const status = watcher->result();
|
||||
handleExportStatus(this, status, d.processing_format);
|
||||
|
||||
|
||||
updateToolbars();
|
||||
BufferView const * const bv = currentBufferView();
|
||||
if (bv && !bv->buffer().errorList("Export").empty()) {
|
||||
@ -784,7 +784,7 @@ bool GuiView::restoreLayout()
|
||||
|
||||
if (!restoreState(settings.value("layout").toByteArray(), 0))
|
||||
initToolbars();
|
||||
|
||||
|
||||
// init the toolbars that have not been restored
|
||||
Toolbars::Infos::iterator cit = guiApp->toolbars().begin();
|
||||
Toolbars::Infos::iterator end = guiApp->toolbars().end();
|
||||
@ -990,7 +990,7 @@ void GuiView::closeEvent(QCloseEvent * close_event)
|
||||
LYXERR(Debug::DEBUG, "GuiView::closeEvent()");
|
||||
|
||||
if (!GuiViewPrivate::busyBuffers.isEmpty()) {
|
||||
Alert::warning(_("Exit LyX"),
|
||||
Alert::warning(_("Exit LyX"),
|
||||
_("LyX could not be closed because documents are being processed by LyX."));
|
||||
close_event->setAccepted(false);
|
||||
return;
|
||||
@ -1353,7 +1353,7 @@ void GuiView::setBusy(bool busy)
|
||||
return;
|
||||
}
|
||||
QApplication::restoreOverrideCursor();
|
||||
updateLayoutList();
|
||||
updateLayoutList();
|
||||
}
|
||||
|
||||
|
||||
@ -1467,7 +1467,7 @@ void GuiView::setCurrentWorkArea(GuiWorkArea * wa)
|
||||
|
||||
theGuiApp()->setCurrentView(this);
|
||||
d.current_work_area_ = wa;
|
||||
|
||||
|
||||
// We need to reset this now, because it will need to be
|
||||
// right if the tabWorkArea gets reset in the for loop. We
|
||||
// will change it back if we aren't in that case.
|
||||
@ -1476,14 +1476,14 @@ void GuiView::setCurrentWorkArea(GuiWorkArea * wa)
|
||||
|
||||
for (int i = 0; i != d.splitter_->count(); ++i) {
|
||||
if (d.tabWorkArea(i)->setCurrentWorkArea(wa)) {
|
||||
LYXERR(Debug::DEBUG, "Current wa: " << currentWorkArea()
|
||||
LYXERR(Debug::DEBUG, "Current wa: " << currentWorkArea()
|
||||
<< ", Current main wa: " << currentMainWorkArea());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
d.current_main_work_area_ = old_cmwa;
|
||||
|
||||
|
||||
LYXERR(Debug::DEBUG, "This is not a tabbed wa");
|
||||
on_currentWorkAreaChanged(wa);
|
||||
BufferView & bv = wa->bufferView();
|
||||
@ -1591,7 +1591,7 @@ void GuiView::setBuffer(Buffer * newBuffer, bool switch_to)
|
||||
{
|
||||
LYXERR(Debug::DEBUG, "Setting buffer: " << newBuffer << endl);
|
||||
LASSERT(newBuffer, return);
|
||||
|
||||
|
||||
GuiWorkArea * wa = workArea(*newBuffer);
|
||||
if (wa == 0) {
|
||||
setBusy(true);
|
||||
@ -2880,7 +2880,7 @@ bool GuiView::closeWorkArea(GuiWorkArea * wa, bool close_buffer)
|
||||
Buffer & buf = wa->bufferView().buffer();
|
||||
|
||||
if (GuiViewPrivate::busyBuffers.contains(&buf)) {
|
||||
Alert::warning(_("Close document"),
|
||||
Alert::warning(_("Close document"),
|
||||
_("Document could not be closed because it is being processed by LyX."));
|
||||
return false;
|
||||
}
|
||||
@ -3075,7 +3075,7 @@ void GuiView::gotoNextOrPreviousBuffer(NextOrPrevious np, bool const move)
|
||||
{
|
||||
if (!documentBufferView())
|
||||
return;
|
||||
|
||||
|
||||
if (TabWorkArea * twa = d.currentTabWorkArea()) {
|
||||
Buffer * const curbuf = &documentBufferView()->buffer();
|
||||
int nwa = twa->count();
|
||||
@ -3524,12 +3524,12 @@ bool GuiView::GuiViewPrivate::asyncBufferProcessing(
|
||||
if (syncFunc) {
|
||||
status = (used_buffer->*syncFunc)(format, true);
|
||||
} else if (previewFunc) {
|
||||
status = (used_buffer->*previewFunc)(format);
|
||||
status = (used_buffer->*previewFunc)(format);
|
||||
} else
|
||||
return false;
|
||||
handleExportStatus(gv_, status, format);
|
||||
(void) asyncFunc;
|
||||
return (status == Buffer::ExportSuccess
|
||||
return (status == Buffer::ExportSuccess
|
||||
|| status == Buffer::PreviewSuccess);
|
||||
#endif
|
||||
}
|
||||
@ -3766,14 +3766,14 @@ void GuiView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
|
||||
dr.setMessage(_("Absolute filename expected."));
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
FileName filename(fname);
|
||||
if (fname.empty()) {
|
||||
FileDialog dlg(qt_("Select file to insert"));
|
||||
|
||||
FileDialog::Result result = dlg.open(toqstr(bv->buffer().filePath()),
|
||||
QStringList(qt_("All Files (*)")));
|
||||
|
||||
|
||||
if (result.first == FileDialog::Later || result.second.isEmpty()) {
|
||||
dr.setMessage(_("Canceled."));
|
||||
break;
|
||||
@ -4136,7 +4136,7 @@ void GuiView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
|
||||
doc_buffer->absFileName(),
|
||||
"tex")).mangledFileName()
|
||||
: doc_buffer->latexName();
|
||||
string const fulltexname =
|
||||
string const fulltexname =
|
||||
support::makeAbsPath(texname, doc_master->temppath()).absFileName();
|
||||
string const mastername =
|
||||
removeExtension(doc_master->latexName());
|
||||
|
@ -212,7 +212,7 @@ public:
|
||||
int cursorWidth() const { return cursor_width_; }
|
||||
void recomputeWidth() {
|
||||
cursor_width_ = lyxrc.cursor_width
|
||||
? lyxrc.cursor_width
|
||||
? lyxrc.cursor_width
|
||||
: 1 + int((lyxrc.currentZoom + 50) / 200.0);
|
||||
}
|
||||
|
||||
@ -233,7 +233,7 @@ private:
|
||||
QRect rect_;
|
||||
/// x position (were the vertical line is drawn)
|
||||
int x_;
|
||||
|
||||
|
||||
int cursor_width_;
|
||||
};
|
||||
|
||||
@ -257,7 +257,7 @@ GuiWorkArea::Private::Private(GuiWorkArea * parent)
|
||||
|
||||
|
||||
GuiWorkArea::GuiWorkArea(QWidget * /* w */)
|
||||
: d(new Private(this))
|
||||
: d(new Private(this))
|
||||
{
|
||||
}
|
||||
|
||||
@ -370,7 +370,7 @@ void GuiWorkArea::Private::setCursorShape(Qt::CursorShape shape)
|
||||
|
||||
void GuiWorkArea::Private::updateCursorShape()
|
||||
{
|
||||
setCursorShape(buffer_view_->clickableInset()
|
||||
setCursorShape(buffer_view_->clickableInset()
|
||||
? Qt::PointingHandCursor : Qt::IBeamCursor);
|
||||
}
|
||||
|
||||
@ -775,7 +775,7 @@ void GuiWorkArea::contextMenuEvent(QContextMenuEvent * e)
|
||||
}
|
||||
name = d->buffer_view_->contextMenu(pos.x(), pos.y());
|
||||
}
|
||||
|
||||
|
||||
if (name.empty()) {
|
||||
QAbstractScrollArea::contextMenuEvent(e);
|
||||
return;
|
||||
@ -891,7 +891,7 @@ void GuiWorkArea::mouseMoveEvent(QMouseEvent * e)
|
||||
// in the first place.
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
d->synthetic_mouse_event_.restart_timeout = true;
|
||||
d->synthetic_mouse_event_.timeout.start();
|
||||
// Fall through to handle this event...
|
||||
@ -976,7 +976,7 @@ void GuiWorkArea::generateSyntheticMouseEvent()
|
||||
if (up || down) {
|
||||
int dist = up ? -e_y : e_y - wh;
|
||||
time = max(min(200, 250000 / (dist * dist)), 1) ;
|
||||
|
||||
|
||||
if (time < 40) {
|
||||
step = 80000 / (time * time);
|
||||
time = 40;
|
||||
@ -1626,7 +1626,7 @@ void TabWorkArea::paintEvent(QPaintEvent * event)
|
||||
if (tabBar()->isVisible()) {
|
||||
QTabWidget::paintEvent(event);
|
||||
} else {
|
||||
// Prevent the selected tab to influence the
|
||||
// Prevent the selected tab to influence the
|
||||
// painting of the frame of the tab widget.
|
||||
// This is needed for gtk style in Qt.
|
||||
QStylePainter p(this);
|
||||
|
@ -100,7 +100,7 @@ void GuiWrap::applyView()
|
||||
Length::UNIT overhangUnit = overhangUnitLC->currentLengthItem();
|
||||
if (overhangED->text().isEmpty())
|
||||
overhangUnit = Length::UNIT_NONE;
|
||||
|
||||
|
||||
params_.width = Length(width_value, widthUnit);
|
||||
|
||||
if (overhangCB->checkState() == Qt::Checked)
|
||||
|
@ -29,7 +29,7 @@
|
||||
namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
TearOff::TearOff(QWidget * parent)
|
||||
TearOff::TearOff(QWidget * parent)
|
||||
: QWidget(parent)
|
||||
{
|
||||
highlighted_ = false;
|
||||
@ -189,7 +189,7 @@ void IconPalette::showEvent(QShowEvent * /*event*/)
|
||||
|
||||
QRect r = rect();
|
||||
r.moveTo(gpos.x() + hoffset, gpos.y() + voffset);
|
||||
setGeometry(r);
|
||||
setGeometry(r);
|
||||
}
|
||||
|
||||
|
||||
|
@ -36,7 +36,7 @@ void IntoGuiThreadMover::callInGuiThread()
|
||||
synchronousFunctionCall();
|
||||
} else {
|
||||
moveToThread(QApplication::instance()->thread());
|
||||
connect(this, SIGNAL(triggerFunctionCall()),
|
||||
connect(this, SIGNAL(triggerFunctionCall()),
|
||||
this, SLOT(doFunctionCall()), Qt::QueuedConnection);
|
||||
QMutexLocker lock(&sync_mutex_);
|
||||
Q_EMIT triggerFunctionCall();
|
||||
|
@ -105,14 +105,14 @@ void LaTeXHighlighter::highlightBlock(QString const & text)
|
||||
// %comment
|
||||
// Treat a line as a comment starting at a percent sign
|
||||
// * that is the first character in a line
|
||||
// * that is preceded by
|
||||
// * that is preceded by
|
||||
// ** an even number of backslashes
|
||||
// ** any character other than a backslash
|
||||
QRegExp exprComment("(?:^|[^\\\\])(?:\\\\\\\\)*(%).*$");
|
||||
QRegExp exprComment("(?:^|[^\\\\])(?:\\\\\\\\)*(%).*$");
|
||||
exprComment.indexIn(text);
|
||||
index = exprComment.pos(1);
|
||||
while (index >= 0) {
|
||||
int const length = exprComment.matchedLength()
|
||||
int const length = exprComment.matchedLength()
|
||||
- (index - exprComment.pos(0));
|
||||
setFormat(index, length, commentFormat);
|
||||
exprComment.indexIn(text, index + length);
|
||||
|
@ -53,7 +53,7 @@ using namespace lyx::support;
|
||||
namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
|
||||
|
||||
class LayoutItemDelegate : public QItemDelegate {
|
||||
public:
|
||||
///
|
||||
@ -69,11 +69,11 @@ public:
|
||||
///
|
||||
QSize sizeHint(QStyleOptionViewItem const & opt,
|
||||
QModelIndex const & index) const;
|
||||
|
||||
|
||||
private:
|
||||
///
|
||||
void drawCategoryHeader(QPainter * painter, QStyleOptionViewItem const & opt,
|
||||
QString const & category) const;
|
||||
QString const & category) const;
|
||||
///
|
||||
QString underlineFilter(QString const & s) const;
|
||||
///
|
||||
@ -87,7 +87,7 @@ public:
|
||||
GuiLayoutFilterModel(QObject * parent = 0)
|
||||
: QSortFilterProxyModel(parent)
|
||||
{}
|
||||
|
||||
|
||||
///
|
||||
void triggerLayoutChange()
|
||||
{
|
||||
@ -136,7 +136,7 @@ public:
|
||||
DocumentClassConstPtr text_class_;
|
||||
///
|
||||
Inset const * inset_;
|
||||
|
||||
|
||||
/// the layout model: 1st column translated, 2nd column raw layout name
|
||||
QStandardItemModel * model_;
|
||||
/// the proxy model filtering \c model_
|
||||
@ -194,7 +194,7 @@ void LayoutItemDelegate::paint(QPainter * painter, QStyleOptionViewItem const &
|
||||
opt.state = state;
|
||||
|
||||
// draw category header
|
||||
drawCategoryHeader(painter, opt,
|
||||
drawCategoryHeader(painter, opt,
|
||||
category(*index.model(), index.row()));
|
||||
|
||||
// move rect down below header
|
||||
@ -240,7 +240,7 @@ QSize LayoutItemDelegate::sizeHint(QStyleOptionViewItem const & opt,
|
||||
QModelIndex const & index) const
|
||||
{
|
||||
QSortFilterProxyModel const * model =
|
||||
static_cast<QSortFilterProxyModel const *>(index.model());
|
||||
static_cast<QSortFilterProxyModel const *>(index.model());
|
||||
QSize size = QItemDelegate::sizeHint(opt, index);
|
||||
|
||||
/// QComboBox uses the first row height to estimate the
|
||||
@ -258,7 +258,7 @@ QSize LayoutItemDelegate::sizeHint(QStyleOptionViewItem const & opt,
|
||||
unsigned n = layout_->model()->rowCount();
|
||||
|
||||
// so the needed average height (rounded upwards) is:
|
||||
size.setHeight((headerHeight(opt) * cats + itemHeight * n + n - 1) / n);
|
||||
size.setHeight((headerHeight(opt) * cats + itemHeight * n + n - 1) / n);
|
||||
return size;
|
||||
}
|
||||
|
||||
@ -370,14 +370,14 @@ void LayoutBox::Private::setFilter(QString const & s)
|
||||
filter_ = s;
|
||||
filterModel_->setFilterRegExp(charFilterRegExp(filter_));
|
||||
countCategories();
|
||||
|
||||
|
||||
// restore old selection
|
||||
if (lastSel_ != -1) {
|
||||
QModelIndex i = filterModel_->mapFromSource(model_->index(lastSel_, 0));
|
||||
if (i.isValid())
|
||||
p->setCurrentIndex(i.row());
|
||||
}
|
||||
|
||||
|
||||
// Workaround to resize to content size
|
||||
// FIXME: There must be a better way. The QComboBox::AdjustToContents)
|
||||
// does not help.
|
||||
@ -394,7 +394,7 @@ void LayoutBox::Private::setFilter(QString const & s)
|
||||
|
||||
// The item delegate hack is off again. So trigger a relayout of the popup.
|
||||
filterModel_->triggerLayoutChange();
|
||||
|
||||
|
||||
if (!s.isEmpty())
|
||||
owner_.message(bformat(_("Filtering layouts with \"%1$s\". "
|
||||
"Press ESC to remove filter."),
|
||||
@ -402,7 +402,7 @@ void LayoutBox::Private::setFilter(QString const & s)
|
||||
else
|
||||
owner_.message(_("Enter characters to filter the layout list."));
|
||||
}
|
||||
|
||||
|
||||
p->view()->setUpdatesEnabled(enabled);
|
||||
}
|
||||
|
||||
@ -420,7 +420,7 @@ LayoutBox::LayoutBox(GuiView & owner)
|
||||
// for the filtering we have to intercept characters
|
||||
view()->installEventFilter(this);
|
||||
view()->setItemDelegateForColumn(0, d->layoutItemDelegate_);
|
||||
|
||||
|
||||
QObject::connect(this, SIGNAL(activated(int)),
|
||||
this, SLOT(selected(int)));
|
||||
|
||||
@ -441,7 +441,7 @@ void LayoutBox::Private::countCategories()
|
||||
return;
|
||||
|
||||
// skip the "Standard" category
|
||||
QString prevCat = model_->index(0, 2).data().toString();
|
||||
QString prevCat = model_->index(0, 2).data().toString();
|
||||
|
||||
// count categories
|
||||
for (int i = 0; i < n; ++i) {
|
||||
@ -468,10 +468,10 @@ void LayoutBox::showPopup()
|
||||
d->inShowPopup_ = true;
|
||||
QComboBox::showPopup();
|
||||
d->inShowPopup_ = false;
|
||||
|
||||
|
||||
// The item delegate hack is off again. So trigger a relayout of the popup.
|
||||
d->filterModel_->triggerLayoutChange();
|
||||
|
||||
|
||||
view()->setUpdatesEnabled(enabled);
|
||||
}
|
||||
|
||||
@ -485,7 +485,7 @@ bool LayoutBox::eventFilter(QObject * o, QEvent * e)
|
||||
bool modified = (ke->modifiers() == Qt::ControlModifier)
|
||||
|| (ke->modifiers() == Qt::AltModifier)
|
||||
|| (ke->modifiers() == Qt::MetaModifier);
|
||||
|
||||
|
||||
switch (ke->key()) {
|
||||
case Qt::Key_Escape:
|
||||
if (!modified && !d->filter_.isEmpty()) {
|
||||
@ -524,7 +524,7 @@ bool LayoutBox::eventFilter(QObject * o, QEvent * e)
|
||||
return QComboBox::eventFilter(o, e);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void LayoutBox::setIconSize(QSize size)
|
||||
{
|
||||
#ifdef Q_OS_MAC
|
||||
@ -605,7 +605,7 @@ void LayoutBox::addItemSort(docstring const & item, docstring const & category,
|
||||
// skip the Standard layout
|
||||
if (i == 0)
|
||||
++i;
|
||||
|
||||
|
||||
// the simple unsorted case
|
||||
if (!sorted) {
|
||||
if (sortedByCat) {
|
||||
@ -622,7 +622,7 @@ void LayoutBox::addItemSort(docstring const & item, docstring const & category,
|
||||
if (i < end) {
|
||||
// find alphabetic position
|
||||
while (i != end
|
||||
&& d->model_->item(i, 0)->text().localeAwareCompare(titem) < 0
|
||||
&& d->model_->item(i, 0)->text().localeAwareCompare(titem) < 0
|
||||
&& (!sortedByCat || d->model_->item(i, 2)->text() == qcat))
|
||||
++i;
|
||||
}
|
||||
@ -672,7 +672,7 @@ void LayoutBox::updateContents(bool reset)
|
||||
// obsoleted layouts are skipped as well
|
||||
if (!lit->obsoleted_by().empty())
|
||||
continue;
|
||||
addItemSort(name, lit->category(), lyxrc.sort_layouts,
|
||||
addItemSort(name, lit->category(), lyxrc.sort_layouts,
|
||||
lyxrc.group_layouts, lit->isUnknown());
|
||||
}
|
||||
|
||||
|
@ -1829,7 +1829,7 @@ void MenuDefinition::expandQuotes(BufferView const * bv)
|
||||
}
|
||||
if (!main_langdef_qs) {
|
||||
FuncRequest cmd = FuncRequest(LFUN_INSET_MODIFY, subcmd + globalqsc + wildcards);
|
||||
docstring const desc = (main_dynamic_qs || display_static)
|
||||
docstring const desc = (main_dynamic_qs || display_static)
|
||||
? bformat(_("Reset to language default (%1$s, %2$s)|l"),
|
||||
quoteparams.getGuiLabel(langdefqs), _("static[[Quotes]]"))
|
||||
: bformat(_("Reset to language default (%1$s)|l"),
|
||||
|
@ -315,7 +315,7 @@ QStringList texFileList(QString const & filename)
|
||||
return list;
|
||||
|
||||
// FIXME Unicode.
|
||||
vector<docstring> doclist =
|
||||
vector<docstring> doclist =
|
||||
getVectorFromString(file.fileContents("UTF-8"), from_ascii("\n"));
|
||||
|
||||
// Normalise paths like /foo//bar ==> /foo/bar
|
||||
@ -349,7 +349,7 @@ QString const externalLineEnding(docstring const & str)
|
||||
|
||||
docstring const internalLineEnding(QString const & str)
|
||||
{
|
||||
docstring const s = subst(qstring_to_ucs4(str),
|
||||
docstring const s = subst(qstring_to_ucs4(str),
|
||||
from_ascii("\r\n"), from_ascii("\n"));
|
||||
return subst(s, '\r', '\n');
|
||||
}
|
||||
@ -548,7 +548,7 @@ FileFilterList::FileFilterList(docstring const & qt_style_filter)
|
||||
string const filter = to_utf8(qt_style_filter)
|
||||
+ (qt_style_filter.empty() ? string() : ";;")
|
||||
+ to_utf8(_("All Files "))
|
||||
#if defined(_WIN32)
|
||||
#if defined(_WIN32)
|
||||
+ ("(*.*)");
|
||||
#else
|
||||
+ ("(*)");
|
||||
|
@ -76,7 +76,7 @@ vector<string> const & Cache::loadableFormats() const
|
||||
|
||||
// The formats natively loadable.
|
||||
vector<string> nformat = frontend::loadableImageFormats();
|
||||
|
||||
|
||||
vector<string>::const_iterator it = nformat.begin();
|
||||
for (; it != nformat.end(); ++it) {
|
||||
for (Formats::const_iterator fit = begin; fit != end; ++fit) {
|
||||
|
@ -305,7 +305,7 @@ void Loader::startLoading() const
|
||||
}
|
||||
|
||||
|
||||
void Loader::reload() const
|
||||
void Loader::reload() const
|
||||
{
|
||||
pimpl_->cached_item_->startLoading();
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ Template const * getTemplatePtr(InsetExternalParams const & params)
|
||||
|
||||
void editExternal(InsetExternalParams const & params, Buffer const & buffer)
|
||||
{
|
||||
theFormats().edit(buffer, params.filename,
|
||||
theFormats().edit(buffer, params.filename,
|
||||
theFormats().getFormatFromFile(params.filename));
|
||||
}
|
||||
|
||||
|
@ -202,7 +202,7 @@ Buffer & Inset::buffer()
|
||||
<< " name: " << iname);
|
||||
s << "LyX Code: " << lyxCode() << " name: " << from_ascii(iname);
|
||||
LATTEST(false);
|
||||
throw ExceptionMessage(BufferException,
|
||||
throw ExceptionMessage(BufferException,
|
||||
from_ascii("Inset::buffer_ member not initialized!"), s.str());
|
||||
}
|
||||
return *buffer_;
|
||||
@ -223,7 +223,7 @@ bool Inset::isBufferLoaded() const
|
||||
|
||||
bool Inset::isBufferValid() const
|
||||
{
|
||||
return buffer_
|
||||
return buffer_
|
||||
&& (isBufferLoaded() || buffer_->isClone());
|
||||
}
|
||||
|
||||
@ -234,7 +234,7 @@ docstring Inset::layoutName() const
|
||||
}
|
||||
|
||||
|
||||
bool Inset::isFreeSpacing() const
|
||||
bool Inset::isFreeSpacing() const
|
||||
{
|
||||
return getLayout().isFreeSpacing();
|
||||
}
|
||||
@ -298,14 +298,14 @@ InsetCode insetCode(string const & name)
|
||||
}
|
||||
|
||||
|
||||
string insetName(InsetCode c)
|
||||
string insetName(InsetCode c)
|
||||
{
|
||||
build_translator();
|
||||
return insetnames[c].name;
|
||||
}
|
||||
|
||||
|
||||
docstring insetDisplayName(InsetCode c)
|
||||
docstring insetDisplayName(InsetCode c)
|
||||
{
|
||||
build_translator();
|
||||
return insetnames[c].display_name;
|
||||
@ -316,7 +316,7 @@ void Inset::dispatch(Cursor & cur, FuncRequest & cmd)
|
||||
{
|
||||
if (buffer_ == 0) {
|
||||
lyxerr << "Unassigned buffer_ member in Inset::dispatch()" << std::endl;
|
||||
lyxerr << "LyX Code: " << lyxCode() << " name: "
|
||||
lyxerr << "LyX Code: " << lyxCode() << " name: "
|
||||
<< insetName(lyxCode()) << std::endl;
|
||||
} else if (cur.buffer() != buffer_)
|
||||
lyxerr << "cur.buffer() != buffer_ in Inset::dispatch()" << std::endl;
|
||||
@ -644,7 +644,7 @@ bool Inset::resetFontEdit() const
|
||||
}
|
||||
|
||||
|
||||
docstring Inset::completionPrefix(Cursor const &) const
|
||||
docstring Inset::completionPrefix(Cursor const &) const
|
||||
{
|
||||
return docstring();
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user