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

#include <tblafmt.hxx>

Collaboration diagram for SwTableAutoFormat:
[legend]

Public Member Functions

 SwTableAutoFormat (OUString aName)
 
 SwTableAutoFormat (const SwTableAutoFormat &rNew)
 
 ~SwTableAutoFormat ()
 
SwTableAutoFormatoperator= (const SwTableAutoFormat &rNew)
 
const SvxFormatKeepItemGetKeepWithNextPara () const
 
const SvxShadowItemGetShadow () const
 
void SetKeepWithNextPara (const SvxFormatKeepItem &rNew)
 
void SetShadow (const SvxShadowItem &rNew)
 
void SetBoxFormat (const SwBoxAutoFormat &rNew, sal_uInt8 nPos)
 
const SwBoxAutoFormatGetBoxFormat (sal_uInt8 nPos) const
 
SwBoxAutoFormatGetBoxFormat (sal_uInt8 nPos)
 
void SetName (const OUString &rNew)
 
const OUString & GetName () const
 
void UpdateFromSet (sal_uInt8 nPos, const SfxItemSet &rSet, SwTableAutoFormatUpdateFlags eFlags, SvNumberFormatter const *)
 
void UpdateToSet (const sal_uInt8 nPos, const bool bSingleRowTable, const bool bSingleColTable, SfxItemSet &rSet, SwTableAutoFormatUpdateFlags eFlags, SvNumberFormatter *) const
 
void RestoreTableProperties (SwTable &table) const
 
void StoreTableProperties (const SwTable &table)
 
bool IsFont () const
 
bool IsJustify () const
 
bool IsFrame () const
 
bool IsBackground () const
 
bool IsValueFormat () const
 
bool IsHidden () const
 Check if style is hidden. More...
 
bool IsUserDefined () const
 Check if style is defined by user. More...
 
void SetFont (const bool bNew)
 
void SetJustify (const bool bNew)
 
void SetFrame (const bool bNew)
 
void SetBackground (const bool bNew)
 
void SetValueFormat (const bool bNew)
 
void SetWidthHeight (const bool bNew)
 
void SetHidden (bool bHidden)
 Set if style is hidden. More...
 
void SetUserDefined (bool bUserDefined)
 Set if style is user defined. More...
 
bool FirstRowEndColumnIsRow ()
 These methods returns what style (row or column) is applied first on given Cell. More...
 
bool FirstRowStartColumnIsRow ()
 
bool LastRowEndColumnIsRow ()
 
bool LastRowStartColumnIsRow ()
 
bool HasHeaderRow () const
 
bool Load (SvStream &rStream, const SwAfVersions &)
 
bool Save (SvStream &rStream, sal_uInt16 fileVersion) const
 
unotools::WeakReference< SwXTextTableStyle > const & GetXObject () const
 
void SetXObject (rtl::Reference< SwXTextTableStyle > const &xObject)
 
OUString GetTableTemplateCellSubName (const SwBoxAutoFormat &rBoxFormat) const
 Returns the cell's name postfix. eg. ".1". More...
 

Static Public Member Functions

static const SwBoxAutoFormatGetDefaultBoxFormat ()
 
static const std::vector< sal_Int32 > & GetTableTemplateMap ()
 Returns a vector of indexes in aBoxAutoFormat array. Returned indexes points to cells which are mapped to a table-template. More...
 
static sal_uInt8 CountPos (sal_uInt32 nCol, sal_uInt32 nCols, sal_uInt32 nRow, sal_uInt32 nRows)
 Calculates the relevant position in the table autoformat for a given cell in a given table. More...
 

Private Attributes

unotools::WeakReference< SwXTextTableStylem_xUnoTextTableStyle
 
OUString m_aName
 
sal_uInt16 m_nStrResId
 
bool m_bInclFont: 1
 
bool m_bInclJustify: 1
 
bool m_bInclFrame: 1
 
bool m_bInclBackground: 1
 
bool m_bInclValueFormat: 1
 
bool m_bInclWidthHeight: 1
 
SwBoxAutoFormatm_aBoxAutoFormat [16] = {}
 
std::shared_ptr< SvxFormatKeepItemm_aKeepWithNextPara
 
sal_uInt16 m_aRepeatHeading
 
bool m_bLayoutSplit
 
bool m_bRowSplit
 
bool m_bCollapsingBorders
 
std::shared_ptr< SvxShadowItemm_aShadow
 
bool m_bHidden
 
bool m_bUserDefined
 

Static Private Attributes

static SwBoxAutoFormats_pDefaultBoxAutoFormat = nullptr
 

Friends

class SwDocTest
 
void FinitCore ()
 

Detailed Description

Definition at line 154 of file tblafmt.hxx.

Constructor & Destructor Documentation

◆ SwTableAutoFormat() [1/2]

SwTableAutoFormat::SwTableAutoFormat ( OUString  aName)

◆ SwTableAutoFormat() [2/2]

SwTableAutoFormat::SwTableAutoFormat ( const SwTableAutoFormat rNew)

Definition at line 390 of file tblafmt.cxx.

References m_aBoxAutoFormat, and make_shared().

◆ ~SwTableAutoFormat()

SwTableAutoFormat::~SwTableAutoFormat ( )

Definition at line 436 of file tblafmt.cxx.

References m_aBoxAutoFormat, and n.

Member Function Documentation

◆ CountPos()

sal_uInt8 SwTableAutoFormat::CountPos ( sal_uInt32  nCol,
sal_uInt32  nCols,
sal_uInt32  nRow,
sal_uInt32  nRows 
)
static

Calculates the relevant position in the table autoformat for a given cell in a given table.

Definition at line 915 of file tblafmt.cxx.

Referenced by HTMLTable::FixFrameFormat(), and SwDoc::InsertTable().

◆ FirstRowEndColumnIsRow()

bool SwTableAutoFormat::FirstRowEndColumnIsRow ( )

These methods returns what style (row or column) is applied first on given Cell.

Definition at line 724 of file tblafmt.cxx.

References GetBoxFormat().

Referenced by SwXTextTableStyle::getPropertyValue().

◆ FirstRowStartColumnIsRow()

bool SwTableAutoFormat::FirstRowStartColumnIsRow ( )

Definition at line 728 of file tblafmt.cxx.

References GetBoxFormat().

Referenced by SwXTextTableStyle::getPropertyValue().

◆ GetBoxFormat() [1/2]

SwBoxAutoFormat & SwTableAutoFormat::GetBoxFormat ( sal_uInt8  nPos)

Definition at line 471 of file tblafmt.cxx.

References m_aBoxAutoFormat, nPos, s_pDefaultBoxAutoFormat, and SAL_WARN_IF.

◆ GetBoxFormat() [2/2]

const SwBoxAutoFormat & SwTableAutoFormat::GetBoxFormat ( sal_uInt8  nPos) const

◆ GetDefaultBoxFormat()

const SwBoxAutoFormat & SwTableAutoFormat::GetDefaultBoxFormat ( )
static

◆ GetKeepWithNextPara()

const SvxFormatKeepItem & SwTableAutoFormat::GetKeepWithNextPara ( ) const
inline

Definition at line 194 of file tblafmt.hxx.

◆ GetName()

const OUString & SwTableAutoFormat::GetName ( ) const
inline

◆ GetShadow()

const SvxShadowItem & SwTableAutoFormat::GetShadow ( ) const
inline

Definition at line 195 of file tblafmt.hxx.

◆ GetTableTemplateCellSubName()

OUString SwTableAutoFormat::GetTableTemplateCellSubName ( const SwBoxAutoFormat rBoxFormat) const

Returns the cell's name postfix. eg. ".1".

Definition at line 851 of file tblafmt.cxx.

References GetTableTemplateMap(), i, m_aBoxAutoFormat, and nIndex.

Referenced by SwStyleSheetIterator::First(), SwXTextCellStyle::getName(), and lcl_FindCellStyle().

◆ GetTableTemplateMap()

const std::vector< sal_Int32 > & SwTableAutoFormat::GetTableTemplateMap ( )
static

Returns a vector of indexes in aBoxAutoFormat array. Returned indexes points to cells which are mapped to a table-template.

Definition at line 891 of file tblafmt.cxx.

Referenced by SwStyleSheetIterator::First(), SwXTextCellStyle::GetBoxAutoFormat(), GetTableTemplateCellSubName(), lcl_FindCellStyle(), SwXTextTableStyle::replaceByName(), SwXTextTableStyle::SetPhysical(), and SwXTextTableStyle::UpdateCellStylesMapping().

◆ GetXObject()

unotools::WeakReference< SwXTextTableStyle > const & SwTableAutoFormat::GetXObject ( ) const
inline

Definition at line 250 of file tblafmt.hxx.

Referenced by SwXTextTableStyle::CreateXTextTableStyle().

◆ HasHeaderRow()

bool SwTableAutoFormat::HasHeaderRow ( ) const

Definition at line 740 of file tblafmt.cxx.

References GetBoxFormat().

◆ IsBackground()

bool SwTableAutoFormat::IsBackground ( ) const
inline

◆ IsFont()

bool SwTableAutoFormat::IsFont ( ) const
inline

◆ IsFrame()

bool SwTableAutoFormat::IsFrame ( ) const
inline

◆ IsHidden()

bool SwTableAutoFormat::IsHidden ( ) const
inline

Check if style is hidden.

Definition at line 224 of file tblafmt.hxx.

Referenced by SwStyleSheetIterator::First(), and SwDocStyleSheet::IsHidden().

◆ IsJustify()

bool SwTableAutoFormat::IsJustify ( ) const
inline

◆ IsUserDefined()

bool SwTableAutoFormat::IsUserDefined ( ) const
inline

Check if style is defined by user.

Definition at line 226 of file tblafmt.hxx.

Referenced by SwDocStyleSheet::FillStyleSheet(), and SwStyleSheetIterator::First().

◆ IsValueFormat()

bool SwTableAutoFormat::IsValueFormat ( ) const
inline

◆ LastRowEndColumnIsRow()

bool SwTableAutoFormat::LastRowEndColumnIsRow ( )

Definition at line 732 of file tblafmt.cxx.

References GetBoxFormat().

Referenced by SwXTextTableStyle::getPropertyValue().

◆ LastRowStartColumnIsRow()

bool SwTableAutoFormat::LastRowStartColumnIsRow ( )

Definition at line 736 of file tblafmt.cxx.

References GetBoxFormat().

Referenced by SwXTextTableStyle::getPropertyValue().

◆ Load()

bool SwTableAutoFormat::Load ( SvStream rStream,
const SwAfVersions rVersions 
)

◆ operator=()

SwTableAutoFormat & SwTableAutoFormat::operator= ( const SwTableAutoFormat rNew)

◆ RestoreTableProperties()

void SwTableAutoFormat::RestoreTableProperties ( SwTable table) const

◆ Save()

bool SwTableAutoFormat::Save ( SvStream rStream,
sal_uInt16  fileVersion 
) const

◆ SetBackground()

void SwTableAutoFormat::SetBackground ( const bool  bNew)
inline

Definition at line 231 of file tblafmt.hxx.

Referenced by IMPL_LINK(), IMPL_LINK_NOARG(), and lcl_SetProperties().

◆ SetBoxFormat()

void SwTableAutoFormat::SetBoxFormat ( const SwBoxAutoFormat rNew,
sal_uInt8  nPos 
)

Definition at line 444 of file tblafmt.cxx.

References m_aBoxAutoFormat, and nPos.

Referenced by SwXTextTableStyle::replaceByName().

◆ SetFont()

void SwTableAutoFormat::SetFont ( const bool  bNew)
inline

Definition at line 228 of file tblafmt.hxx.

Referenced by IMPL_LINK(), IMPL_LINK_NOARG(), and lcl_SetProperties().

◆ SetFrame()

void SwTableAutoFormat::SetFrame ( const bool  bNew)
inline

Definition at line 230 of file tblafmt.hxx.

Referenced by IMPL_LINK(), IMPL_LINK_NOARG(), and lcl_SetProperties().

◆ SetHidden()

void SwTableAutoFormat::SetHidden ( bool  bHidden)
inline

Set if style is hidden.

Definition at line 236 of file tblafmt.hxx.

Referenced by SwDocStyleSheet::SetHidden().

◆ SetJustify()

void SwTableAutoFormat::SetJustify ( const bool  bNew)
inline

Definition at line 229 of file tblafmt.hxx.

Referenced by IMPL_LINK(), IMPL_LINK_NOARG(), and lcl_SetProperties().

◆ SetKeepWithNextPara()

void SwTableAutoFormat::SetKeepWithNextPara ( const SvxFormatKeepItem rNew)
inline

Definition at line 197 of file tblafmt.hxx.

References SvxFormatKeepItem::Clone().

◆ SetName()

void SwTableAutoFormat::SetName ( const OUString &  rNew)
inline

Definition at line 205 of file tblafmt.hxx.

References m_aName.

Referenced by SwDoc::ChgTableStyle(), and SwXTextTableStyle::setName().

◆ SetShadow()

void SwTableAutoFormat::SetShadow ( const SvxShadowItem rNew)
inline

Definition at line 198 of file tblafmt.hxx.

References SvxShadowItem::Clone().

◆ SetUserDefined()

void SwTableAutoFormat::SetUserDefined ( bool  bUserDefined)
inline

Set if style is user defined.

Definition at line 238 of file tblafmt.hxx.

◆ SetValueFormat()

void SwTableAutoFormat::SetValueFormat ( const bool  bNew)
inline

Definition at line 232 of file tblafmt.hxx.

Referenced by IMPL_LINK(), IMPL_LINK_NOARG(), and lcl_SetProperties().

◆ SetWidthHeight()

void SwTableAutoFormat::SetWidthHeight ( const bool  bNew)
inline

Definition at line 233 of file tblafmt.hxx.

Referenced by IMPL_LINK_NOARG(), and lcl_SetProperties().

◆ SetXObject()

void SwTableAutoFormat::SetXObject ( rtl::Reference< SwXTextTableStyle > const &  xObject)

◆ StoreTableProperties()

void SwTableAutoFormat::StoreTableProperties ( const SwTable table)

◆ UpdateFromSet()

void SwTableAutoFormat::UpdateFromSet ( sal_uInt8  nPos,
const SfxItemSet rSet,
SwTableAutoFormatUpdateFlags  eFlags,
SvNumberFormatter const *  pNFormatr 
)

Definition at line 494 of file tblafmt.cxx.

References Box, Char, SfxItemSet::Get(), GetAppLanguage(), SvNumberFormatter::GetEntry(), SvNumberformat::GetFormatstring(), SfxItemSet::GetItemIfSet(), SvNumberformat::GetLanguage(), CntUInt32Item::GetValue(), LANGUAGE_SYSTEM, m_aBoxAutoFormat, nPos, RES_BACKGROUND(), RES_BOX(), RES_BOXATR_FORMAT(), RES_CHRATR_CJK_FONT(), RES_CHRATR_CJK_FONTSIZE(), RES_CHRATR_CJK_POSTURE(), RES_CHRATR_CJK_WEIGHT(), RES_CHRATR_COLOR(), RES_CHRATR_CONTOUR(), RES_CHRATR_CROSSEDOUT(), RES_CHRATR_CTL_FONT(), RES_CHRATR_CTL_FONTSIZE(), RES_CHRATR_CTL_POSTURE(), RES_CHRATR_CTL_WEIGHT(), RES_CHRATR_FONT(), RES_CHRATR_FONTSIZE(), RES_CHRATR_OVERLINE(), RES_CHRATR_POSTURE(), RES_CHRATR_SHADOWED(), RES_CHRATR_UNDERLINE(), RES_CHRATR_WEIGHT(), RES_FRAMEDIR(), RES_PARATR_ADJUST(), RES_VERT_ORIENT(), rSet, AutoFormatBase::SetAdjust(), AutoFormatBase::SetBackground(), AutoFormatBase::SetBox(), AutoFormatBase::SetCJKFont(), AutoFormatBase::SetCJKHeight(), AutoFormatBase::SetCJKPosture(), AutoFormatBase::SetCJKWeight(), AutoFormatBase::SetColor(), AutoFormatBase::SetContour(), AutoFormatBase::SetCrossedOut(), AutoFormatBase::SetCTLFont(), AutoFormatBase::SetCTLHeight(), AutoFormatBase::SetCTLPosture(), AutoFormatBase::SetCTLWeight(), AutoFormatBase::SetFont(), AutoFormatBase::SetHeight(), AutoFormatBase::SetOverline(), AutoFormatBase::SetPosture(), AutoFormatBase::SetShadowed(), SwBoxAutoFormat::SetTextOrientation(), AutoFormatBase::SetUnderline(), SwBoxAutoFormat::SetValueFormat(), SwBoxAutoFormat::SetVerticalAlignment(), and AutoFormatBase::SetWeight().

Referenced by SwDoc::GetTableAutoFormat().

◆ UpdateToSet()

void SwTableAutoFormat::UpdateToSet ( const sal_uInt8  nPos,
const bool  bSingleRowTable,
const bool  bSingleColTable,
SfxItemSet rSet,
SwTableAutoFormatUpdateFlags  eFlags,
SvNumberFormatter pNFormatr 
) const

Friends And Related Function Documentation

◆ FinitCore

void FinitCore ( )
friend

Definition at line 684 of file init.cxx.

◆ SwDocTest

friend class SwDocTest
friend

Definition at line 156 of file tblafmt.hxx.

Member Data Documentation

◆ m_aBoxAutoFormat

SwBoxAutoFormat* SwTableAutoFormat::m_aBoxAutoFormat[16] = {}
private

◆ m_aKeepWithNextPara

std::shared_ptr<SvxFormatKeepItem> SwTableAutoFormat::m_aKeepWithNextPara
private

Definition at line 178 of file tblafmt.hxx.

Referenced by Load(), operator=(), RestoreTableProperties(), Save(), and StoreTableProperties().

◆ m_aName

OUString SwTableAutoFormat::m_aName
private

Definition at line 162 of file tblafmt.hxx.

Referenced by Load(), operator=(), and Save().

◆ m_aRepeatHeading

sal_uInt16 SwTableAutoFormat::m_aRepeatHeading
private

Definition at line 179 of file tblafmt.hxx.

Referenced by Load(), operator=(), RestoreTableProperties(), Save(), and StoreTableProperties().

◆ m_aShadow

std::shared_ptr<SvxShadowItem> SwTableAutoFormat::m_aShadow
private

Definition at line 183 of file tblafmt.hxx.

Referenced by Load(), operator=(), RestoreTableProperties(), Save(), and StoreTableProperties().

◆ m_bCollapsingBorders

bool SwTableAutoFormat::m_bCollapsingBorders
private

Definition at line 182 of file tblafmt.hxx.

Referenced by Load(), operator=(), RestoreTableProperties(), Save(), and StoreTableProperties().

◆ m_bHidden

bool SwTableAutoFormat::m_bHidden
private

Definition at line 185 of file tblafmt.hxx.

Referenced by operator=().

◆ m_bInclBackground

bool SwTableAutoFormat::m_bInclBackground
private

Definition at line 169 of file tblafmt.hxx.

Referenced by Load(), operator=(), Save(), and SwTableAutoFormat().

◆ m_bInclFont

bool SwTableAutoFormat::m_bInclFont
private

Definition at line 166 of file tblafmt.hxx.

Referenced by Load(), operator=(), Save(), and SwTableAutoFormat().

◆ m_bInclFrame

bool SwTableAutoFormat::m_bInclFrame
private

Definition at line 168 of file tblafmt.hxx.

Referenced by Load(), operator=(), Save(), and SwTableAutoFormat().

◆ m_bInclJustify

bool SwTableAutoFormat::m_bInclJustify
private

Definition at line 167 of file tblafmt.hxx.

Referenced by Load(), operator=(), Save(), and SwTableAutoFormat().

◆ m_bInclValueFormat

bool SwTableAutoFormat::m_bInclValueFormat
private

Definition at line 170 of file tblafmt.hxx.

Referenced by Load(), operator=(), Save(), and SwTableAutoFormat().

◆ m_bInclWidthHeight

bool SwTableAutoFormat::m_bInclWidthHeight
private

Definition at line 173 of file tblafmt.hxx.

Referenced by Load(), operator=(), Save(), and SwTableAutoFormat().

◆ m_bLayoutSplit

bool SwTableAutoFormat::m_bLayoutSplit
private

Definition at line 180 of file tblafmt.hxx.

Referenced by Load(), operator=(), RestoreTableProperties(), Save(), and StoreTableProperties().

◆ m_bRowSplit

bool SwTableAutoFormat::m_bRowSplit
private

Definition at line 181 of file tblafmt.hxx.

Referenced by Load(), operator=(), RestoreTableProperties(), Save(), and StoreTableProperties().

◆ m_bUserDefined

bool SwTableAutoFormat::m_bUserDefined
private

Definition at line 186 of file tblafmt.hxx.

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

◆ m_nStrResId

sal_uInt16 SwTableAutoFormat::m_nStrResId
private

Definition at line 163 of file tblafmt.hxx.

Referenced by Load(), operator=(), and Save().

◆ m_xUnoTextTableStyle

unotools::WeakReference<SwXTextTableStyle> SwTableAutoFormat::m_xUnoTextTableStyle
private

Definition at line 160 of file tblafmt.hxx.

Referenced by SetXObject().

◆ s_pDefaultBoxAutoFormat

SwBoxAutoFormat * SwTableAutoFormat::s_pDefaultBoxAutoFormat = nullptr
staticprivate

Definition at line 158 of file tblafmt.hxx.

Referenced by GetBoxFormat(), GetDefaultBoxFormat(), and Save().


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