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

#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 SfxPoolItemClone (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
 
bool operator!= (const SfxPoolItem &rItem) const
 
virtual sal_uInt16 GetVersion (sal_uInt16 nFileFormatVersion) const
 
virtual void ScaleMetrics (long lMult, long lDiv)
 
virtual bool HasMetrics () const
 
virtual SfxPoolItemCreate (SvStream &, sal_uInt16 nItemVersion) const
 
virtual SvStreamStore (SvStream &, sal_uInt16 nItemVersion) const
 
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 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

- 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::SwFormatCol ( )

Definition at line 855 of file atrfrm.cxx.

Referenced by Clone().

SwFormatCol::SwFormatCol ( const SwFormatCol rCpy)

Definition at line 813 of file atrfrm.cxx.

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

SwFormatCol::~SwFormatCol ( )
overridevirtual

Definition at line 831 of file atrfrm.cxx.

Member Function Documentation

void SwFormatCol::Calc ( sal_uInt16  nGutterWidth,
sal_uInt16  nAct 
)
private
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 969 of file atrfrm.cxx.

References m_aColumns, and m_nWidth.

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

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 983 of file atrfrm.cxx.

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

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

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

Implements SfxPoolItem.

Definition at line 891 of file atrfrm.cxx.

References SwFormatCol().

void SwFormatCol::dumpAsXml ( xmlTextWriterPtr  pWriter) const
overridevirtual
sal_Int16 SwFormatCol::GetAdjustValue ( ) const
inline

Definition at line 95 of file fmtclds.hxx.

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

const SwColumns& SwFormatCol::GetColumns ( ) const
inline
SwColumns& SwFormatCol::GetColumns ( )
inline

Definition at line 113 of file fmtclds.hxx.

sal_uInt16 SwFormatCol::GetGutterWidth ( bool  bMin = false) const
SwColLineAdj SwFormatCol::GetLineAdj ( ) const
inline
const Color& SwFormatCol::GetLineColor ( ) const
inline
sal_uInt8 SwFormatCol::GetLineHeight ( ) const
inline
SvxBorderLineStyle SwFormatCol::GetLineStyle ( ) const
inline
sal_uLong SwFormatCol::GetLineWidth ( ) const
inline
sal_uInt16 SwFormatCol::GetNumCols ( ) const
inline
bool SwFormatCol::GetPresentation ( SfxItemPresentation  ePres,
MapUnit  eCoreMetric,
MapUnit  ePresMetric,
OUString &  rText,
const IntlWrapper rIntl 
) const
overridevirtual

Reimplemented from SfxPoolItem.

Definition at line 480 of file attrdesc.cxx.

References COLADJ_NONE, and SwResId().

sal_uInt16 SwFormatCol::GetWishWidth ( ) const
inline
void SwFormatCol::Init ( sal_uInt16  nNumCols,
sal_uInt16  nGutterWidth,
sal_uInt16  nAct 
)
bool SwFormatCol::IsOrtho ( ) const
inline
SwFormatCol & SwFormatCol::operator= ( const SwFormatCol rCpy)
bool SwFormatCol::operator== ( const SfxPoolItem rAttr) const
overridevirtual
bool SwFormatCol::PutValue ( const css::uno::Any &  rVal,
sal_uInt8  nMemberId 
)
overridevirtual
bool SwFormatCol::QueryValue ( css::uno::Any &  rVal,
sal_uInt8  nMemberId = 0 
) const
overridevirtual

Reimplemented from SfxPoolItem.

Definition at line 1051 of file atrfrm.cxx.

References CONVERT_TWIPS, and MID_COLUMN_SEPARATOR_LINE.

void SwFormatCol::SetAdjustValue ( sal_Int16  n)
inline

Definition at line 96 of file fmtclds.hxx.

Referenced by MSWordExportBase::SectionProperties().

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 927 of file atrfrm.cxx.

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

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

void SwFormatCol::SetLineAdj ( SwColLineAdj  eNew)
inline

Definition at line 133 of file fmtclds.hxx.

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

void SwFormatCol::SetLineColor ( const Color rCol)
inline

Definition at line 131 of file fmtclds.hxx.

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

void SwFormatCol::SetLineHeight ( sal_uInt8  nNew)
inline

Definition at line 132 of file fmtclds.hxx.

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

void SwFormatCol::SetLineStyle ( SvxBorderLineStyle  eStyle)
inline

Definition at line 129 of file fmtclds.hxx.

Referenced by SwColMgr::SetLineWidthAndColor().

void SwFormatCol::SetLineWidth ( sal_uLong  nLWidth)
inline

Definition at line 130 of file fmtclds.hxx.

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

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 962 of file atrfrm.cxx.

References Calc(), m_aColumns, and m_bOrtho.

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

void SwFormatCol::SetOrtho_ ( bool  bNew)
inline

For the reader.

Definition at line 151 of file fmtclds.hxx.

Referenced by wwSectionManager::SetCols().

void SwFormatCol::SetWishWidth ( sal_uInt16  nNew)
inline

Member Data Documentation

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().

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().

sal_Int16 SwFormatCol::m_aWidthAdjustValue
private

Definition at line 80 of file fmtclds.hxx.

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

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().

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().

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().

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().

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().

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: