mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
patch from Jean-Marc + some
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2158 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
65c6e5bed3
commit
c21c01ce34
@ -1,3 +1,10 @@
|
||||
2001-06-29 Lars Gullik Bjønnes <larsbj@birdstep.com>
|
||||
|
||||
* paragraph.C (Paragraph): dont't clear, and just set layout.
|
||||
(makeSameLayout): use params's copy contructor.
|
||||
|
||||
* ParagraphParameters.[Ch] (makeSame): delete method
|
||||
|
||||
2001-06-29 John Levon <moz@compsoc.man.ac.uk>
|
||||
|
||||
* Variables.[Ch]: fix indentation, rename set to isSet
|
||||
|
@ -71,33 +71,6 @@ bool ParagraphParameters::sameLayout(ParagraphParameters const & pp) const
|
||||
}
|
||||
|
||||
|
||||
void ParagraphParameters::makeSame(ParagraphParameters const & pp)
|
||||
{
|
||||
ParameterStruct tmp(*param);
|
||||
tmp.align = pp.param->align;
|
||||
// tmp.labelwidthstring = pp.params.labelwidthstring;
|
||||
tmp.line_bottom = pp.param->line_bottom;
|
||||
tmp.pagebreak_bottom = pp.param->pagebreak_bottom;
|
||||
tmp.added_space_bottom = pp.param->added_space_bottom;
|
||||
tmp.line_top = pp.param->line_top;
|
||||
tmp.pagebreak_top = pp.param->pagebreak_top;
|
||||
tmp.added_space_top = pp.param->added_space_top;
|
||||
tmp.spacing = pp.param->spacing;
|
||||
#ifndef NO_PEXTRA_REALLY
|
||||
tmp.pextra_type = pp.param->pextra_type;
|
||||
tmp.pextra_width = pp.param->pextra_width;
|
||||
tmp.pextra_widthp = pp.param->pextra_widthp;
|
||||
tmp.pextra_alignment = pp.param->pextra_alignment;
|
||||
tmp.pextra_hfill = pp.param->pextra_hfill;
|
||||
tmp.pextra_start_minipage = pp.param->pextra_start_minipage;
|
||||
#endif
|
||||
tmp.noindent = pp.param->noindent;
|
||||
tmp.depth = pp.param->depth;
|
||||
|
||||
set_from_struct(tmp);
|
||||
}
|
||||
|
||||
|
||||
void ParagraphParameters::set_from_struct(ParameterStruct const & ps)
|
||||
{
|
||||
// get new param from container with tmp as template
|
||||
|
@ -25,8 +25,6 @@ public:
|
||||
///
|
||||
bool sameLayout(ParagraphParameters const &) const;
|
||||
///
|
||||
void makeSame(ParagraphParameters const & pp);
|
||||
///
|
||||
VSpace const & spaceTop() const;
|
||||
///
|
||||
void spaceTop(VSpace const &);
|
||||
|
@ -115,27 +115,26 @@ Paragraph::Paragraph(Paragraph const & lp)
|
||||
itemdepth = 0;
|
||||
next_ = 0;
|
||||
previous_ = 0;
|
||||
clear();
|
||||
|
||||
makeSameLayout(&lp);
|
||||
|
||||
// this is because of the dummy layout of the paragraphs that
|
||||
// follow footnotes
|
||||
layout = lp.layout;
|
||||
|
||||
// ale970302
|
||||
if (lp.bibkey)
|
||||
if (lp.bibkey) {
|
||||
bibkey = static_cast<InsetBibKey *>
|
||||
(lp.bibkey->clone(*current_view->buffer()));
|
||||
else
|
||||
} else {
|
||||
bibkey = 0;
|
||||
}
|
||||
|
||||
// copy everything behind the break-position to the new paragraph
|
||||
|
||||
insetlist = lp.insetlist;
|
||||
for (InsetList::iterator it = insetlist.begin();
|
||||
it != insetlist.end(); ++it)
|
||||
it != insetlist.end(); ++it) {
|
||||
it->inset = it->inset->clone(*current_view->buffer());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -921,10 +920,8 @@ void Paragraph::breakParagraph(BufferParams const & bparams,
|
||||
void Paragraph::makeSameLayout(Paragraph const * par)
|
||||
{
|
||||
layout = par->layout;
|
||||
params().makeSame(par->params());
|
||||
|
||||
// This can be changed after NEW_INSETS is in effect. (Lgb)
|
||||
setLabelWidthString(par->params().labelWidthString());
|
||||
// move to pimpl?
|
||||
params() = par->params();
|
||||
}
|
||||
|
||||
|
||||
|
@ -40,7 +40,7 @@ Paragraph::Pimpl::Pimpl(Paragraph * owner)
|
||||
|
||||
|
||||
Paragraph::Pimpl::Pimpl(Paragraph::Pimpl const & p, Paragraph * owner)
|
||||
: owner_(owner)
|
||||
: params(p.params), owner_(owner)
|
||||
{
|
||||
inset_owner = p.inset_owner;
|
||||
text = p.text;
|
||||
|
Loading…
Reference in New Issue
Block a user