lib

#include <KoParagLayout.h>

Public Types

enum  {
  Alignment = 1 , BulletNumber = 2 , Margins = 4 , LineSpacing = 8 ,
  Borders = 16 , Tabulator = 32 , PageBreaking = 64 , BackgroundColor = 128 ,
  All
}
 
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 (TQDomElement &parentElem, int alignment) const
 
void saveOasis (KoGenStyle &gs, KoSavingContext &context, bool savingStyle) const
 

Static Public Member Functions

static void loadParagLayout (KoParagLayout &layout, const TQDomElement &parentElem, int docVersion=2)
 
static void loadOasisParagLayout (KoParagLayout &layout, KoOasisContext &context)
 
static TQt::AlignmentFlags loadOasisAlignment (const TQCString &str)
 
static TQCString saveOasisAlignment (TQt::AlignmentFlags alignment)
 

Public Attributes

enum KoParagLayout:: { ... }  Flags
 
double margins [5]
 
SpacingType lineSpacingType
 
bool joinBorder:1
 
bool unused:7
 
char pageBreaking
 
char direction
 
char alignment
 
KoBorder leftBorder
 
KoBorder rightBorder
 
KoBorder topBorder
 
KoBorder bottomBorder
 
TQColor backgroundColor
 
KoParagCounter * counter
 
KoParagStyle * style
 

Static Public Attributes

static TQString * 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 39 of file KoParagLayout.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

This enum is used to mark parts of a KoParagLayout as changed (i.e.

when changing them in the dialog/stylist)

Definition at line 49 of file KoParagLayout.h.

◆ anonymous enum

anonymous enum

Page breaking flags.

Definition at line 63 of file KoParagLayout.h.

◆ SpacingType

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 86 of file KoParagLayout.h.

Constructor & Destructor Documentation

◆ KoParagLayout() [1/2]

KoParagLayout::KoParagLayout ( )

Definition at line 42 of file KoParagLayout.cpp.

◆ KoParagLayout() [2/2]

KoParagLayout::KoParagLayout ( const KoParagLayout &  layout)
inline

Definition at line 43 of file KoParagLayout.h.

◆ ~KoParagLayout()

KoParagLayout::~KoParagLayout ( )

Definition at line 139 of file KoParagLayout.cpp.

Member Function Documentation

◆ compare()

int KoParagLayout::compare ( const KoParagLayout &  layout) const

Return a set of flags showing the differences between this and 'layout'.

Definition at line 70 of file KoParagLayout.cpp.

◆ hasBorder()

bool KoParagLayout::hasBorder ( ) const
inline

Definition at line 116 of file KoParagLayout.h.

◆ lineSpacingValue()

double KoParagLayout::lineSpacingValue ( ) const
inline

Definition at line 89 of file KoParagLayout.h.

◆ loadOasisAlignment()

TQt::AlignmentFlags KoParagLayout::loadOasisAlignment ( const TQCString &  str)
static

Convert an alignment string into an alignment flag (load)

Definition at line 414 of file KoParagLayout.cpp.

◆ loadOasisParagLayout()

void KoParagLayout::loadOasisParagLayout ( KoParagLayout &  layout,
KoOasisContext &  context 
)
static

Load this parag layout from Oasis XML.

Definition at line 437 of file KoParagLayout.cpp.

◆ loadParagLayout()

void KoParagLayout::loadParagLayout ( KoParagLayout &  layout,
const TQDomElement &  parentElem,
int  docVersion = 2 
)
static

Load this parag layout from XML.

This format is used by KWord for paragraphs, and by KPresenter+KWord for styles.

Definition at line 144 of file KoParagLayout.cpp.

◆ operator=()

void KoParagLayout::operator= ( const KoParagLayout &  layout)

Assignment operator for KoParagLayout.

Copy a paragraph layout.

If you're modifying this, you might also need to modify KoTextParag::setParagLayout

Definition at line 47 of file KoParagLayout.cpp.

◆ saveOasis()

void KoParagLayout::saveOasis ( KoGenStyle &  gs,
KoSavingContext &  context,
bool  savingStyle 
) const

Save this parag layout to Oasis XML.

Parameters
savingStyletrue if this is saved as part of a user style, false when saving a paragraph
gsthe style where all the properties will be saved to
contextthe current context

Definition at line 807 of file KoParagLayout.cpp.

◆ saveOasisAlignment()

TQCString KoParagLayout::saveOasisAlignment ( TQt::AlignmentFlags  alignment)
static

Convert an alignment flag into an alignment string (save)

Definition at line 428 of file KoParagLayout.cpp.

◆ saveParagLayout()

void KoParagLayout::saveParagLayout ( TQDomElement &  parentElem,
int  alignment 
) const

Save this parag layout to XML.

This format is used by KWord for paragraphs, and by KPresenter+KWord for styles.

Definition at line 661 of file KoParagLayout.cpp.

◆ setLineSpacingValue()

void KoParagLayout::setLineSpacingValue ( double  _value)
inline

Definition at line 90 of file KoParagLayout.h.

◆ setTabList()

void KoParagLayout::setTabList ( const KoTabulatorList &  tabList)
inline

Definition at line 121 of file KoParagLayout.h.

◆ tabList()

const KoTabulatorList & KoParagLayout::tabList ( ) const
inline

Definition at line 122 of file KoParagLayout.h.

Member Data Documentation

◆ alignment

char KoParagLayout::alignment

Alignment flag (AlignAuto/AlignLeft/AlignRight/AlignJustify)

Definition at line 99 of file KoParagLayout.h.

◆ backgroundColor

TQColor KoParagLayout::backgroundColor

The background color of the paragraph.

The background color is used for text that has no background color set, and for parts of the paragraph that are not covered by text. In theory anyway: the background colour isn't used in rendering text yet, but it's nice to preserve the value.

Definition at line 109 of file KoParagLayout.h.

◆ bottomBorder

KoBorder KoParagLayout::bottomBorder

Definition at line 100 of file KoParagLayout.h.

◆ counter

KoParagCounter* KoParagLayout::counter

can be 0 if no counter set

Definition at line 112 of file KoParagLayout.h.

◆ direction

char KoParagLayout::direction

Definition at line 97 of file KoParagLayout.h.

◆ []

enum { ... } KoParagLayout::Flags

This enum is used to mark parts of a KoParagLayout as changed (i.e.

when changing them in the dialog/stylist)

◆ joinBorder

bool KoParagLayout::joinBorder

Definition at line 94 of file KoParagLayout.h.

◆ leftBorder

KoBorder KoParagLayout::leftBorder

Definition at line 100 of file KoParagLayout.h.

◆ lineSpacingType

SpacingType KoParagLayout::lineSpacingType

Definition at line 88 of file KoParagLayout.h.

◆ margins

double KoParagLayout::margins[5]

left, right, top, bottom, firstLineSpacing - in pt

Definition at line 74 of file KoParagLayout.h.

◆ pageBreaking

char KoParagLayout::pageBreaking

Definition at line 96 of file KoParagLayout.h.

◆ rightBorder

KoBorder KoParagLayout::rightBorder

Definition at line 100 of file KoParagLayout.h.

◆ shadowCssCompat

TQString * KoParagLayout::shadowCssCompat = 0L
static

Definition at line 92 of file KoParagLayout.h.

◆ style

KoParagStyle* KoParagLayout::style

Definition at line 114 of file KoParagLayout.h.

◆ topBorder

KoBorder KoParagLayout::topBorder

Definition at line 100 of file KoParagLayout.h.

◆ unused

bool KoParagLayout::unused

Definition at line 95 of file KoParagLayout.h.


The documentation for this class was generated from the following files: