using cap::cutSelection;
using cap::pasteParagraphList;
using cap::cutSelection;
using cap::pasteParagraphList;
+InsetText const & Text::inset() const
+{
+ return *owner_;
+}
+
+
void Text::readParToken(Paragraph & par, Lexer & lex,
string const & token, Font & font, Change & change, ErrorList & errorList)
{
void Text::readParToken(Paragraph & par, Lexer & lex,
string const & token, Font & font, Change & change, ErrorList & errorList)
{
/// \warning a non standard layout on an empty paragraph doesn't
// count as empty.
bool empty() const;
/// \warning a non standard layout on an empty paragraph doesn't
// count as empty.
bool empty() const;
-
- InsetText const * inset() const { return owner_; }
+ /// Access to owner InsetText.
+ InsetText const & inset() const;
///
FontInfo layoutFont(pit_type pit) const;
///
FontInfo layoutFont(pit_type pit) const;
private:
/// The InsetText owner shall have access to everything.
friend class InsetText;
private:
/// The InsetText owner shall have access to everything.
friend class InsetText;
- ///
- ParagraphList pars_;
- ///
- bool autoBreakRows_;
/// return past-the-last paragraph influenced by a layout
/// change on pit
pit_type undoSpan(pit_type pit);
/// return past-the-last paragraph influenced by a layout
/// change on pit
pit_type undoSpan(pit_type pit);
/// Owner Inset.
InsetText * owner_;
/// Owner Inset.
InsetText * owner_;
+ ///
+ ParagraphList pars_;
+ ///
+ bool autoBreakRows_;
/// position of the text in the buffer.
DocIterator macrocontext_position_;
};
/// position of the text in the buffer.
DocIterator macrocontext_position_;
};
#include "TextClass.h"
#include "VSpace.h"
#include "TextClass.h"
#include "VSpace.h"
+#include "insets/InsetText.h"
+
#include "mathed/MacroTable.h"
#include "mathed/MathMacroTemplate.h"
#include "mathed/MacroTable.h"
#include "mathed/MathMacroTemplate.h"
&& align == LYX_ALIGN_BLOCK
&& !par.params().noindent()
// in some insets, paragraphs are never indented
&& align == LYX_ALIGN_BLOCK
&& !par.params().noindent()
// in some insets, paragraphs are never indented
- && !par.inInset().neverIndent()
+ && !text_->inset().neverIndent()
// display style insets are always centered, omit indentation
&& !(!par.empty()
&& par.isInset(pos)
// display style insets are always centered, omit indentation
&& !(!par.empty()
&& par.isInset(pos)
#include "Paragraph.h"
#include "TextClass.h"
#include "Paragraph.h"
#include "TextClass.h"
+#include "insets/InsetText.h"
+
#include "support/debug.h"
#include "support/filetools.h"
#include "support/gettext.h"
#include "support/debug.h"
#include "support/filetools.h"
#include "support/gettext.h"
// or we've moved from one inset to another
DocumentClass const * text_class = &buffer->params().documentClass();
Inset const * inset =
// or we've moved from one inset to another
DocumentClass const * text_class = &buffer->params().documentClass();
Inset const * inset =
- &(owner_.view()->cursor().innerParagraph().inInset());
+ &(owner_.view()->cursor().innerText()->inset());
if (!reset && text_class_ == text_class && inset_ == inset) {
set(owner_.view()->cursor().innerParagraph().layout().name());
return;
if (!reset && text_class_ == text_class && inset_ == inset) {
set(owner_.view()->cursor().innerParagraph().layout().name());
return;
ParagraphList const & paragraphs = text.paragraphs();
ParagraphList const & paragraphs = text.paragraphs();
- bool const force_plain_layout = text.inset()->forcePlainLayout();
+ bool const force_plain_layout = text.inset().forcePlainLayout();
while (par != paragraphs.end() &&
par->params().depth() == pit->params().depth()) {
// FIXME This test should not be necessary.
while (par != paragraphs.end() &&
par->params().depth() == pit->params().depth()) {
// FIXME This test should not be necessary.
// FIXME This test should not be necessary.
// We should perhaps issue an error if it is.
// FIXME This test should not be necessary.
// We should perhaps issue an error if it is.
- Layout const & style = text.inset()->forcePlainLayout() ?
+ Layout const & style = text.inset().forcePlainLayout() ?
bparams.documentClass().plainLayout() : pit->layout();
ParagraphList const & paragraphs = text.paragraphs();
bparams.documentClass().plainLayout() : pit->layout();
ParagraphList const & paragraphs = text.paragraphs();
// FIXME This check should not really be needed.
// Perhaps we should issue an error if it is.
// FIXME This check should not really be needed.
// Perhaps we should issue an error if it is.
- Layout const style = text.inset()->forcePlainLayout() ?
+ Layout const style = text.inset().forcePlainLayout() ?
bparams.documentClass().plainLayout() : pit->layout();
runparams.moving_arg |= style.needprotect;
bparams.documentClass().plainLayout() : pit->layout();
runparams.moving_arg |= style.needprotect;
lastpar = par;
// FIXME This check should not be needed. We should
// perhaps issue an error if it is.
lastpar = par;
// FIXME This check should not be needed. We should
// perhaps issue an error if it is.
- Layout const & layout = text.inset()->forcePlainLayout() ?
+ Layout const & layout = text.inset().forcePlainLayout() ?
tclass.plainLayout() : par->layout();
if (layout.intitle) {
tclass.plainLayout() : par->layout();
if (layout.intitle) {