Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 25182 → Rev 25183

/trunk/Scribus/scribus/text/textlayout.cpp
27,17 → 27,10
#include "boxes.h"
#include "itextcontext.h"
 
 
 
TextLayout::TextLayout(StoryText* text, ITextContext* frame)
: m_story(text),
m_frame(frame)
{
m_story = text;
m_frame = frame;
 
m_validLayout = false;
m_magicX = 0.0;
m_lastMagicPos = -1;
 
m_box = new GroupBox(Box::D_Horizontal);
}
 
99,7 → 92,7
// Remove the last line from the list. Used when we need to backtrack on the layouting.
void TextLayout::removeLastLine ()
{
QList<Box*>& boxes = m_box->boxes();
const QList<Box*>& boxes = m_box->boxes();
if (boxes.isEmpty())
return;
 
385,8 → 378,8
Box* column = m_box->boxes().last();
if (column->boxes().count() > 0)
{
Box* line = column->boxes().last();
Box* glyph = line->boxes().empty() ? nullptr : line->boxes().last();
const Box* line = column->boxes().last();
const Box* glyph = line->boxes().empty() ? nullptr : line->boxes().last();
QChar ch = story()->text(line->lastChar());
if (ch == SpecialChars::PARSEP || ch == SpecialChars::LINEBREAK)
{
/trunk/Scribus/scribus/text/textlayout.h
42,8 → 42,6
public:
TextLayout(StoryText* text, ITextContext* frame);
~TextLayout();
 
bool overflows() const;
StoryText* story() { return m_story; }
ITextContext* frame() { return m_frame; }
77,14 → 75,13
protected:
friend class FrameControl;
StoryText* m_story;
ITextContext* m_frame;
GroupBox* m_box;
StoryText* m_story { nullptr };
ITextContext* m_frame { nullptr };
GroupBox* m_box { nullptr };
bool m_validLayout;
mutable qreal m_magicX;
mutable int m_lastMagicPos;
 
bool m_validLayout { false };
mutable qreal m_magicX { 0.0 };
mutable int m_lastMagicPos { -1 };
};
 
#endif