mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
small stuff
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2374 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
bdba99dcf9
commit
bf6257967e
@ -1,3 +1,10 @@
|
||||
2001-07-27 Lars Gullik Bjønnes <larsbj@birdstep.com>
|
||||
|
||||
* ParameterStruct.h (endif): add a default constructor to make
|
||||
sure that all variables is initialized.
|
||||
|
||||
* ParagraphParameters.C (ParagraphParameters): adjust
|
||||
|
||||
2001-07-27 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
||||
|
||||
* BufferView_pimpl.C (Dispatch): use WHOLE_WORD selection for
|
||||
|
@ -1,6 +1,11 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation
|
||||
#pragma implementation "ParameterStruct.h"
|
||||
#endif
|
||||
|
||||
#include "ParagraphParameters.h"
|
||||
#include "ParameterStruct.h"
|
||||
|
||||
@ -10,9 +15,10 @@ ShareContainer<ParameterStruct> ParagraphParameters::container;
|
||||
ParagraphParameters::ParagraphParameters()
|
||||
{
|
||||
ParameterStruct tmp;
|
||||
#if 0
|
||||
tmp.appendix = false;
|
||||
tmp.align = LYX_ALIGN_BLOCK;
|
||||
|
||||
#endif
|
||||
set_from_struct(tmp);
|
||||
}
|
||||
|
||||
@ -57,8 +63,8 @@ bool ParagraphParameters::sameLayout(ParagraphParameters const & pp) const
|
||||
param->line_top == pp.param->line_top &&
|
||||
param->pagebreak_top == pp.param->pagebreak_top &&
|
||||
param->added_space_top == pp.param->added_space_top &&
|
||||
#ifndef NO_PEXTRA_REALLY
|
||||
param->spacing == pp.param->spacing &&
|
||||
#ifndef NO_PEXTRA_REALLY
|
||||
param->pextra_type == pp.param->pextra_type &&
|
||||
param->pextra_width == pp.param->pextra_width &&
|
||||
param->pextra_widthp == pp.param->pextra_widthp &&
|
||||
|
@ -3,6 +3,10 @@
|
||||
#ifndef PARAGRAPHPARAMETERS_H
|
||||
#define PARAGRAPHPARAMETERS_H
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
#include "ShareContainer.h"
|
||||
#include "LString.h"
|
||||
#include "layout.h"
|
||||
|
@ -7,8 +7,14 @@
|
||||
#include "Spacing.h"
|
||||
#include "layout.h"
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
///
|
||||
struct ParameterStruct {
|
||||
///
|
||||
ParameterStruct();
|
||||
///
|
||||
typedef unsigned int depth_type;
|
||||
///
|
||||
@ -56,6 +62,19 @@ struct ParameterStruct {
|
||||
};
|
||||
|
||||
|
||||
inline
|
||||
ParameterStruct::ParameterStruct()
|
||||
: noindent(false), line_top(false), line_bottom(false),
|
||||
pagebreak_top(false), pagebreak_bottom(false),
|
||||
align(LYX_ALIGN_BLOCK), depth(0), start_of_appendix(false),
|
||||
appendix(false)
|
||||
#ifndef NO_PEXTRA_REALLY
|
||||
, pextra_type(0), pextra_alignment(0), pextra_hfill(false),
|
||||
pextra_start_minipage(false)
|
||||
#endif
|
||||
{}
|
||||
|
||||
|
||||
inline
|
||||
bool operator==(ParameterStruct const & ps1,
|
||||
ParameterStruct const & ps2)
|
||||
|
@ -589,7 +589,9 @@ Buffer::parseSingleLyXformat2Token(LyXLex & lex, Paragraph *& par,
|
||||
}
|
||||
|
||||
if (!inset) {
|
||||
#ifndef NO_PEXTRA_REALLY
|
||||
--call_depth;
|
||||
#endif
|
||||
return false; // no end read yet
|
||||
}
|
||||
|
||||
@ -1146,7 +1148,9 @@ Buffer::parseSingleLyXformat2Token(LyXLex & lex, Paragraph *& par,
|
||||
insertErtContents(par, pos, font);
|
||||
#endif
|
||||
the_end_read = true;
|
||||
#ifndef NO_PEXTRA_REALLY
|
||||
minipar = parBeforeMinipage = 0;
|
||||
#endif
|
||||
} else {
|
||||
#ifdef NO_LATEX
|
||||
if (ert_comp.active) {
|
||||
@ -1318,8 +1322,8 @@ Buffer::parseSingleLyXformat2Token(LyXLex & lex, Paragraph *& par,
|
||||
}
|
||||
}
|
||||
// End of pextra_minipage compability
|
||||
#endif
|
||||
--call_depth;
|
||||
#endif
|
||||
return the_end_read;
|
||||
}
|
||||
|
||||
|
@ -261,7 +261,7 @@ void InsetGraphics::draw(BufferView * bv, LyXFont const & font,
|
||||
int lwidth = width(bv, font);
|
||||
|
||||
// Make sure x is updated upon exit from this routine
|
||||
int old_x = x;
|
||||
int old_x = int(x);
|
||||
x += lwidth;
|
||||
|
||||
// This will draw the graphics. If the graphics has not been loaded yet,
|
||||
|
@ -33,7 +33,7 @@ void InsetRef::edit(BufferView * bv, int, int, unsigned int button)
|
||||
}
|
||||
|
||||
|
||||
void InsetRef::edit(BufferView * bv, bool)
|
||||
void InsetRef::edit(BufferView *, bool)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -1792,25 +1792,24 @@ LyXText * InsetText::getLyXText(BufferView const * lbv,
|
||||
|
||||
cached_bview = bv;
|
||||
Cache::iterator it = cache.find(bv);
|
||||
|
||||
if (it != cache.end() && (lt || !it->second.remove)) {
|
||||
lyx::Assert(it->second.text.get());
|
||||
|
||||
cached_text = it->second.text;
|
||||
if (recursive && the_locking_inset) {
|
||||
return the_locking_inset->getLyXText(bv);
|
||||
}
|
||||
return cached_text.get();
|
||||
} else if (it != cache.end() && it->second.remove) {
|
||||
if (locked) {
|
||||
saveLyXTextState(it->second.text.get());
|
||||
} else {
|
||||
sstate.lpar = 0;
|
||||
}
|
||||
cache.erase(bv);
|
||||
// raise(SIGSTOP);
|
||||
}
|
||||
|
||||
if (it != cache.end()) {
|
||||
if (lt || !it->second.remove) {
|
||||
lyx::Assert(it->second.text.get());
|
||||
cached_text = it->second.text;
|
||||
if (recursive && the_locking_inset) {
|
||||
return the_locking_inset->getLyXText(bv);
|
||||
}
|
||||
return cached_text.get();
|
||||
} else if (it->second.remove) {
|
||||
if (locked) {
|
||||
saveLyXTextState(it->second.text.get());
|
||||
} else {
|
||||
sstate.lpar = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cached_text.reset(new LyXText(const_cast<InsetText *>(this)));
|
||||
cached_text->init(bv);
|
||||
restoreLyXTextState(bv, cached_text.get());
|
||||
|
@ -304,6 +304,10 @@ void lyxstring::Srep::replace(lyxstring::size_type i, lyxstring::size_type n,
|
||||
///////////////////////////////////////
|
||||
// The lyxstring Invariant tester
|
||||
///////////////////////////////////////
|
||||
|
||||
// There are no know bugs in lyxstring now, and it have been
|
||||
// tested for a long time. so we disable the invariant checker. (Lgb)
|
||||
#undef ENABLE_ASSERTIONS
|
||||
#ifdef ENABLE_ASSERTIONS
|
||||
|
||||
/** Testing of the lyxstring invariant
|
||||
|
Loading…
Reference in New Issue
Block a user