LibreOffice Module sw (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
SwFormatCol Class Referencefinal

#include <fmtclds.hxx>

Inheritance diagram for SwFormatCol:
[legend]
Collaboration diagram for SwFormatCol:
[legend]

Public Member Functions

 SwFormatCol ()
 
 SwFormatCol (const SwFormatCol &)
 
virtual ~SwFormatCol () override
 
sal_Int16 GetAdjustValue () const
 
void SetAdjustValue (sal_Int16 n)
 
SwFormatColoperator= (const SwFormatCol &)
 
virtual bool operator== (const SfxPoolItem &) const override
 "pure virtual methods" of SfxPoolItem More...
 
virtual SwFormatColClone (SfxItemPool *pPool=nullptr) const override
 
virtual bool GetPresentation (SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &rIntl) const override
 
virtual bool QueryValue (css::uno::Any &rVal, sal_uInt8 nMemberId=0) const override
 
virtual bool PutValue (const css::uno::Any &rVal, sal_uInt8 nMemberId) override
 
const SwColumnsGetColumns () const
 
SwColumnsGetColumns ()
 
sal_uInt16 GetNumCols () const
 
SvxBorderLineStyle GetLineStyle () const
 
sal_uLong GetLineWidth () const
 
const ColorGetLineColor () const
 
SwColLineAdj GetLineAdj () const
 
bool IsOrtho () const
 
sal_uInt16 GetWishWidth () const
 
sal_uInt8 GetLineHeight () const
 
sal_uInt16 GetGutterWidth (bool bMin=false) const
 
void SetLineStyle (SvxBorderLineStyle eStyle)
 
void SetLineWidth (sal_uLong nLWidth)
 
void SetLineColor (const Color &rCol)
 
void SetLineHeight (sal_uInt8 nNew)
 
void SetLineAdj (SwColLineAdj eNew)
 
void SetWishWidth (sal_uInt16 nNew)
 
void Init (sal_uInt16 nNumCols, sal_uInt16 nGutterWidth, sal_uInt16 nAct)
 This function allows to (repeatedly) initialize the columns. More...
 
void SetGutterWidth (sal_uInt16 nNew, sal_uInt16 nAct)
 Adjusts borders for columns in aColumns. More...
 
void SetOrtho (bool bNew, sal_uInt16 nGutterWidth, sal_uInt16 nAct)
 This too re-arranges columns automatically if flag is set. More...
 
void SetOrtho_ (bool bNew)
 For the reader. More...
 
sal_uInt16 CalcColWidth (sal_uInt16 nCol, sal_uInt16 nAct) const
 Calculates current width of column nCol. More...
 
sal_uInt16 CalcPrtColWidth (sal_uInt16 nCol, sal_uInt16 nAct) const
 As above except that it. More...
 
void dumpAsXml (xmlTextWriterPtr pWriter) const override
 
- Public Member Functions inherited from SfxPoolItem
void AddRef (sal_uInt32 n=1) const
 
virtual ~SfxPoolItem ()
 
void SetWhich (sal_uInt16 nId)
 
sal_uInt16 Which () const
 
T & StaticWhichCast (TypedWhichId< T > nId)
 
const T & StaticWhichCast (TypedWhichId< T > nId) const
 
T * DynamicWhichCast (TypedWhichId< T > nId)
 
const T * DynamicWhichCast (TypedWhichId< T > nId) const
 
virtual bool operator== (const SfxPoolItem &) const=0
 
bool operator!= (const SfxPoolItem &rItem) const
 
virtual bool operator< (const SfxPoolItem &) const
 
virtual bool IsSortable () const
 
virtual bool HasLookup () const
 
virtual lookup_iterator Lookup (lookup_iterator, lookup_iterator end) const
 
virtual bool GetPresentation (SfxItemPresentation ePresentation, MapUnit eCoreMetric, MapUnit ePresentationMetric, OUString &rText, const IntlWrapper &rIntlWrapper) const
 
virtual void ScaleMetrics (tools::Long lMult, tools::Long lDiv)
 
virtual bool HasMetrics () const
 
virtual bool QueryValue (css::uno::Any &rVal, sal_uInt8 nMemberId=0) const
 
virtual bool PutValue (const css::uno::Any &rVal, sal_uInt8 nMemberId)
 
virtual SfxPoolItemClone (SfxItemPool *pPool=nullptr) const=0
 
std::unique_ptr< SfxPoolItemCloneSetWhich (sal_uInt16 nNewWhich) const
 
std::unique_ptr< T > CloneSetWhich (TypedWhichId< T > nId) const
 
sal_uInt32 GetRefCount () const
 
SfxItemKind GetKind () const
 
virtual void dumpAsXml (xmlTextWriterPtr pWriter) const
 
virtual boost::property_tree::ptree dumpAsJSON () const
 
virtual bool IsVoidItem () const
 

Private Member Functions

SAL_DLLPRIVATE void Calc (sal_uInt16 nGutterWidth, sal_uInt16 nAct)
 

Private Attributes

SvxBorderLineStyle m_eLineStyle
 style of the separator line More...
 
sal_uLong m_nLineWidth
 Width of the separator line. More...
 
Color m_aLineColor
 Color of the separator line. More...
 
sal_uInt16 m_nLineHeight
 Percentile height of lines. More...
 
SwColLineAdj m_eAdj
 Line will be adjusted top, centered or bottom. More...
 
SwColumns m_aColumns
 Information concerning the columns. More...
 
sal_uInt16 m_nWidth
 Total desired width of all columns. More...
 
sal_Int16 m_aWidthAdjustValue
 
bool m_bOrtho
 Only if this flag is set, the setting of GutterWidth will be accompanied by a "visual rearrangement". More...
 

Additional Inherited Members

- Public Types inherited from SfxPoolItem
typedef std::vector< SfxPoolItem * >::const_iterator lookup_iterator
 
- Protected Member Functions inherited from SfxPoolItem
 SfxPoolItem (sal_uInt16 nWhich=0)
 
 SfxPoolItem (const SfxPoolItem &rCopy)
 

Detailed Description

Definition at line 67 of file fmtclds.hxx.

Constructor & Destructor Documentation

◆ SwFormatCol() [1/2]

SwFormatCol::SwFormatCol ( )

Definition at line 877 of file atrfrm.cxx.

Referenced by Clone().

◆ SwFormatCol() [2/2]

SwFormatCol::SwFormatCol ( const SwFormatCol rCpy)

Definition at line 835 of file atrfrm.cxx.

References GetColumns(), GetNumCols(), i, and m_aColumns.

◆ ~SwFormatCol()

SwFormatCol::~SwFormatCol ( )
overridevirtual

Definition at line 853 of file atrfrm.cxx.

Member Function Documentation

◆ Calc()

void SwFormatCol::Calc ( sal_uInt16  nGutterWidth,
sal_uInt16  nAct 
)
private

◆ CalcColWidth()

sal_uInt16 SwFormatCol::CalcColWidth ( sal_uInt16  nCol,
sal_uInt16  nAct 
) const

Calculates current width of column nCol.

The ratio of desired width of this column to return value is proportional to ratio of total desired value to nAct.

Definition at line 991 of file atrfrm.cxx.

References m_aColumns, and m_nWidth.

Referenced by SwLayoutFrame::AdjustColumns(), CalcPrtColWidth(), FitToActualSize(), IMPL_LINK_NOARG(), lcl_FillSvxColumn(), and SwView::StateTabWin().

◆ CalcPrtColWidth()

sal_uInt16 SwFormatCol::CalcPrtColWidth ( sal_uInt16  nCol,
sal_uInt16  nAct 
) const

As above except that it.

Returns
the width of PrtArea - that corresponds to what constitutes the column for the user.

Definition at line 1005 of file atrfrm.cxx.

References CalcColWidth(), SwColumn::GetLeft(), SwColumn::GetRight(), and m_aColumns.

Referenced by AttributeOutputBase::FormatColumns(), DocxAttributeOutput::FormatColumns_Impl(), RtfAttributeOutput::FormatColumns_Impl(), SwColMgr::GetColWidth(), and SwView::StateTabWin().

◆ Clone()

SwFormatCol * SwFormatCol::Clone ( SfxItemPool pPool = nullptr) const
overridevirtual

Implements SfxPoolItem.

Definition at line 913 of file atrfrm.cxx.

References SwFormatCol().

◆ dumpAsXml()

void SwFormatCol::dumpAsXml ( xmlTextWriterPtr  pWriter) const
overridevirtual

◆ GetAdjustValue()

sal_Int16 SwFormatCol::GetAdjustValue ( ) const
inline

Definition at line 95 of file fmtclds.hxx.

Referenced by AttributeOutputBase::FormatColumns(), and operator==().

◆ GetColumns() [1/2]

SwColumns & SwFormatCol::GetColumns ( )
inline

Definition at line 113 of file fmtclds.hxx.

◆ GetColumns() [2/2]

const SwColumns & SwFormatCol::GetColumns ( ) const
inline

◆ GetGutterWidth()

sal_uInt16 SwFormatCol::GetGutterWidth ( bool  bMin = false) const

◆ GetLineAdj()

SwColLineAdj SwFormatCol::GetLineAdj ( ) const
inline

◆ GetLineColor()

const Color & SwFormatCol::GetLineColor ( ) const
inline

◆ GetLineHeight()

sal_uInt8 SwFormatCol::GetLineHeight ( ) const
inline

◆ GetLineStyle()

SvxBorderLineStyle SwFormatCol::GetLineStyle ( ) const
inline

◆ GetLineWidth()

sal_uLong SwFormatCol::GetLineWidth ( ) const
inline

◆ GetNumCols()

sal_uInt16 SwFormatCol::GetNumCols ( ) const
inline

◆ GetPresentation()

bool SwFormatCol::GetPresentation ( SfxItemPresentation  ePres,
MapUnit  eCoreMetric,
MapUnit  ePresMetric,
OUString &  rText,
const IntlWrapper rIntl 
) const
overridevirtual

Reimplemented from SfxPoolItem.

Definition at line 474 of file attrdesc.cxx.

References COLADJ_NONE, GetLineAdj(), GetLineWidth(), GetNumCols(), and SwResId().

◆ GetWishWidth()

sal_uInt16 SwFormatCol::GetWishWidth ( ) const
inline

◆ Init()

void SwFormatCol::Init ( sal_uInt16  nNumCols,
sal_uInt16  nGutterWidth,
sal_uInt16  nAct 
)

◆ IsOrtho()

bool SwFormatCol::IsOrtho ( ) const
inline

◆ operator=()

SwFormatCol & SwFormatCol::operator= ( const SwFormatCol rCpy)

◆ operator==()

bool SwFormatCol::operator== ( const SfxPoolItem rAttr) const
overridevirtual

◆ PutValue()

bool SwFormatCol::PutValue ( const css::uno::Any &  rVal,
sal_uInt8  nMemberId 
)
overridevirtual

◆ QueryValue()

bool SwFormatCol::QueryValue ( css::uno::Any &  rVal,
sal_uInt8  nMemberId = 0 
) const
overridevirtual

◆ SetAdjustValue()

void SwFormatCol::SetAdjustValue ( sal_Int16  n)
inline

Definition at line 96 of file fmtclds.hxx.

References n.

Referenced by MSWordExportBase::SectionProperties().

◆ SetGutterWidth()

void SwFormatCol::SetGutterWidth ( sal_uInt16  nNew,
sal_uInt16  nAct 
)

Adjusts borders for columns in aColumns.

If flag m_bOrtho is set, columns are visually re-arranged. If the flag is not set, columns widths are not changed and borders are adjusted.

Definition at line 949 of file atrfrm.cxx.

References Calc(), i, m_aColumns, m_bOrtho, SwColumn::SetLeft(), and SwColumn::SetRight().

Referenced by SwView::ExecTabWin(), SwBaseShell::Execute(), SwColMgr::SetCount(), and SwColMgr::SetGutterWidth().

◆ SetLineAdj()

void SwFormatCol::SetLineAdj ( SwColLineAdj  eNew)
inline

Definition at line 133 of file fmtclds.hxx.

Referenced by SwColMgr::SetAdjust(), and wwSectionManager::SetCols().

◆ SetLineColor()

void SwFormatCol::SetLineColor ( const Color rCol)
inline

Definition at line 131 of file fmtclds.hxx.

Referenced by wwSectionManager::SetCols(), and SwColMgr::SetLineWidthAndColor().

◆ SetLineHeight()

void SwFormatCol::SetLineHeight ( sal_uInt8  nNew)
inline

Definition at line 132 of file fmtclds.hxx.

Referenced by wwSectionManager::SetCols(), and SwColMgr::SetLineHeightPercent().

◆ SetLineStyle()

void SwFormatCol::SetLineStyle ( SvxBorderLineStyle  eStyle)
inline

Definition at line 129 of file fmtclds.hxx.

Referenced by SwColMgr::SetLineWidthAndColor().

◆ SetLineWidth()

void SwFormatCol::SetLineWidth ( sal_uLong  nLWidth)
inline

Definition at line 130 of file fmtclds.hxx.

Referenced by wwSectionManager::SetCols(), and SwColMgr::SetLineWidthAndColor().

◆ SetOrtho()

void SwFormatCol::SetOrtho ( bool  bNew,
sal_uInt16  nGutterWidth,
sal_uInt16  nAct 
)

This too re-arranges columns automatically if flag is set.

Only in this case the second parameter is needed and evaluated.

Definition at line 984 of file atrfrm.cxx.

References Calc(), m_aColumns, and m_bOrtho.

Referenced by SwView::ExecTabWin(), lcl_ConvertToCols(), ResizeFrameCols(), and SwColMgr::SetAutoWidth().

◆ SetOrtho_()

void SwFormatCol::SetOrtho_ ( bool  bNew)
inline

For the reader.

Definition at line 151 of file fmtclds.hxx.

Referenced by wwSectionManager::SetCols().

◆ SetWishWidth()

void SwFormatCol::SetWishWidth ( sal_uInt16  nNew)
inline

Member Data Documentation

◆ m_aColumns

SwColumns SwFormatCol::m_aColumns
private

Information concerning the columns.

Definition at line 78 of file fmtclds.hxx.

Referenced by Calc(), CalcColWidth(), CalcPrtColWidth(), dumpAsXml(), GetGutterWidth(), Init(), operator=(), operator==(), PutValue(), SetGutterWidth(), SetOrtho(), and SwFormatCol().

◆ m_aLineColor

Color SwFormatCol::m_aLineColor
private

Color of the separator line.

Definition at line 71 of file fmtclds.hxx.

Referenced by dumpAsXml(), operator=(), operator==(), and PutValue().

◆ m_aWidthAdjustValue

sal_Int16 SwFormatCol::m_aWidthAdjustValue
private

Definition at line 80 of file fmtclds.hxx.

Referenced by dumpAsXml(), operator=(), and operator==().

◆ m_bOrtho

bool SwFormatCol::m_bOrtho
private

Only if this flag is set, the setting of GutterWidth will be accompanied by a "visual rearrangement".

The flag must be reset if widths of columns or borders are changed. When it is set (again) the visual arrangement is recalculated. The flag is initially set.

Definition at line 82 of file fmtclds.hxx.

Referenced by dumpAsXml(), Init(), operator=(), operator==(), PutValue(), SetGutterWidth(), and SetOrtho().

◆ m_eAdj

SwColLineAdj SwFormatCol::m_eAdj
private

Line will be adjusted top, centered or bottom.

Definition at line 76 of file fmtclds.hxx.

Referenced by dumpAsXml(), operator=(), operator==(), and PutValue().

◆ m_eLineStyle

SvxBorderLineStyle SwFormatCol::m_eLineStyle
private

style of the separator line

Definition at line 69 of file fmtclds.hxx.

Referenced by dumpAsXml(), operator=(), operator==(), and PutValue().

◆ m_nLineHeight

sal_uInt16 SwFormatCol::m_nLineHeight
private

Percentile height of lines.

(Based on height of columns including UL).

Definition at line 73 of file fmtclds.hxx.

Referenced by dumpAsXml(), operator=(), operator==(), and PutValue().

◆ m_nLineWidth

sal_uLong SwFormatCol::m_nLineWidth
private

Width of the separator line.

Definition at line 70 of file fmtclds.hxx.

Referenced by dumpAsXml(), operator=(), operator==(), and PutValue().

◆ m_nWidth

sal_uInt16 SwFormatCol::m_nWidth
private

Total desired width of all columns.

Definition at line 79 of file fmtclds.hxx.

Referenced by CalcColWidth(), dumpAsXml(), Init(), operator=(), operator==(), and PutValue().


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