KoParagLayout Class Reference
This class holds the paragraph-specific formatting information It's separated from KoTextParag so that it can be copied in the undo/redo history, and in KoParagStyle. More...
#include <koparaglayout.h>
Collaboration diagram for KoParagLayout:

Public Types | |
enum | { Alignment = 1, BulletNumber = 2, Margins = 4, LineSpacing = 8, Borders = 16, Tabulator = 32, PageBreaking = 64, All = Alignment | BulletNumber | Margins | LineSpacing | Borders | Tabulator | PageBreaking } |
enum | { BreakBetweenLines = 0, KeepLinesTogether = 1, HardFrameBreakBefore = 2, HardFrameBreakAfter = 4, KeepWithPrevious = 8, KeepWithNext = 16 } |
enum | SpacingType { LS_SINGLE = 0, LS_ONEANDHALF = -1, LS_DOUBLE = -2, LS_CUSTOM = -3, LS_AT_LEAST = -4, LS_MULTIPLE = -5, LS_FIXED = -6 } |
Public Member Functions | |
KoParagLayout (const KoParagLayout &layout) | |
double | lineSpacingValue () const |
void | setLineSpacingValue (double _value) |
bool | hasBorder () const |
void | setTabList (const KoTabulatorList &tabList) |
const KoTabulatorList & | tabList () const |
void | operator= (const KoParagLayout &) |
int | compare (const KoParagLayout &layout) const |
void | saveParagLayout (QDomElement &parentElem, int alignment) const |
void | saveOasis (KoGenStyle &gs, KoSavingContext &context, bool savingStyle) const |
Static Public Member Functions | |
static void | loadParagLayout (KoParagLayout &layout, const QDomElement &parentElem, int docVersion=2) |
static void | loadOasisParagLayout (KoParagLayout &layout, KoOasisContext &context) |
static Qt::AlignmentFlags | loadOasisAlignment (const QCString &str) |
static QCString | saveOasisAlignment (Qt::AlignmentFlags alignment) |
Public Attributes | |
enum KoParagLayout:: { ... } | Flags |
double | margins [5] |
SpacingType | lineSpacingType |
char | unused |
char | pageBreaking |
char | direction |
char | alignment |
KoBorder | leftBorder |
KoBorder | rightBorder |
KoBorder | topBorder |
KoBorder | bottomBorder |
KoParagCounter * | counter |
KoParagStyle * | style |
Static Public Attributes | |
static QString * | shadowCssCompat = 0L |
Detailed Description
This class holds the paragraph-specific formatting information It's separated from KoTextParag so that it can be copied in the undo/redo history, and in KoParagStyle.
Definition at line 38 of file koparaglayout.h.
Member Enumeration Documentation
|
This enum is used to mark parts of a KoParagLayout as changed (i.e. when changing them in the dialog/stylist) Definition at line 48 of file koparaglayout.h. |
|
Page breaking flags.
Definition at line 60 of file koparaglayout.h. |
|
Line spacing values Assuming h is the height of the biggest char in the line, and v is the linespacing value, the total line height is:. Single: h 1.5/2/multiple: v*h Custom (aka "line distance"): h + v At least: >= v Fixed: v Definition at line 83 of file koparaglayout.h. |
Member Function Documentation
|
Return a set of flags showing the differences between this and 'layout'.
Definition at line 67 of file koparaglayout.cc. References alignment, bottomBorder, counter, leftBorder, lineSpacing, lineSpacingType, m_tabList, margins, KoParagCounter::numbering(), pageBreaking, rightBorder, and topBorder. |
|
Save this parag layout to XML. This format is used by KWord for paragraphs, and by KPresenter+KWord for styles. Definition at line 637 of file koparaglayout.cc. References bottomBorder, counter, direction, KoCharStyle::displayName(), leftBorder, lineSpacing, lineSpacingType, margins, KoParagCounter::numbering(), pageBreaking, KoBorder::penWidth(), rightBorder, KoParagCounter::save(), KoBorder::save(), style, tabList(), and topBorder. Referenced by KoParagStyle::saveStyle(). |
|
Load this parag layout from XML. This format is used by KWord for paragraphs, and by KPresenter+KWord for styles. Definition at line 136 of file koparaglayout.cc. References KoTabulator::alignChar, alignment, bottomBorder, counter, direction, KoTabulator::filling, leftBorder, lineSpacing, lineSpacingType, KoParagCounter::load(), margins, pageBreaking, KoTabulator::ptPos, KoTabulator::ptWidth, rightBorder, KoBorder::setPenWidth(), setTabList(), KoTextFormat::shadowAsCss(), topBorder, and KoTabulator::type. Referenced by KoParagStyle::loadStyle(). |
|
Load this parag layout from Oasis XML.
Definition at line 425 of file koparaglayout.cc. References KoTabulator::alignChar, alignment, bottomBorder, direction, KoTabulator::filling, leftBorder, lineSpacing, lineSpacingType, KoBorder::loadFoBorder(), loadOasisAlignment(), margins, pageBreaking, KoUnit::parseValue(), KoTabulator::ptPos, KoTabulator::ptWidth, rightBorder, KoBorder::setPenWidth(), setTabList(), KoOasisContext::styleStack(), topBorder, and KoTabulator::type. Referenced by KoParagStyle::loadStyle(). |
|
Save this parag layout to Oasis XML.
Definition at line 783 of file koparaglayout.cc. References KoXmlWriter::addAttribute(), KoXmlWriter::addAttributePt(), KoGenStyle::addChildElement(), KoGenStyle::addProperty(), KoGenStyle::addPropertyPt(), alignment, KoXmlWriter::endElement(), KoSavingContext::hasColumns(), margins, KoBorder::penWidth(), KoBorder::saveFoBorder(), saveOasisAlignment(), and KoXmlWriter::startElement(). Referenced by KoParagStyle::saveStyle(). |
|
Convert an alignment string into an alignment flag (load).
Definition at line 402 of file koparaglayout.cc. Referenced by loadOasisParagLayout(). |
|
Convert an alignment flag into an alignment string (save).
Definition at line 416 of file koparaglayout.cc. Referenced by saveOasis(), and KoParagCounter::saveOasisListLevel(). |
Member Data Documentation
|
This enum is used to mark parts of a KoParagLayout as changed (i.e. when changing them in the dialog/stylist) |
|
left, right, top, bottom, firstLineSpacing - in pt
Definition at line 71 of file koparaglayout.h. Referenced by compare(), loadOasisParagLayout(), loadParagLayout(), saveOasis(), and saveParagLayout(). |
|
Alignment flag (AlignAuto/AlignLeft/AlignRight/AlignJustify).
Definition at line 95 of file koparaglayout.h. Referenced by compare(), loadOasisParagLayout(), loadParagLayout(), saveOasis(), and KoParagStyle::saveStyle(). |
|
can be 0 if no counter set
Definition at line 98 of file koparaglayout.h. Referenced by compare(), loadParagLayout(), saveParagLayout(), and KoParagStyle::saveStyle(). |
The documentation for this class was generated from the following files: