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 (const OUString &rName)
 
 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 Load (SvStream &rStream, const SwAfVersions &)
 
bool Save (SvStream &rStream, sal_uInt16 fileVersion) const
 
css::uno::WeakReference< css::uno::XInterface > const & GetXObject () const
 
void SetXObject (css::uno::Reference< css::uno::XInterface > 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

css::uno::WeakReference< css::uno::XInterface > m_wXObject
 
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 152 of file tblafmt.hxx.

Constructor & Destructor Documentation

SwTableAutoFormat::SwTableAutoFormat ( const OUString &  rName)
SwTableAutoFormat::SwTableAutoFormat ( const SwTableAutoFormat rNew)

Definition at line 382 of file tblafmt.cxx.

References m_aBoxAutoFormat, and make_shared().

SwTableAutoFormat::~SwTableAutoFormat ( )

Definition at line 428 of file tblafmt.cxx.

References m_aBoxAutoFormat, and n.

Member Function Documentation

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 901 of file tblafmt.cxx.

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

bool SwTableAutoFormat::FirstRowEndColumnIsRow ( )

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

Definition at line 717 of file tblafmt.cxx.

References GetBoxFormat().

Referenced by SwXTextTableStyle::getPropertyValue().

bool SwTableAutoFormat::FirstRowStartColumnIsRow ( )

Definition at line 721 of file tblafmt.cxx.

References GetBoxFormat().

Referenced by SwXTextTableStyle::getPropertyValue().

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

Definition at line 463 of file tblafmt.cxx.

References m_aBoxAutoFormat, s_pDefaultBoxAutoFormat, and SAL_WARN_IF.

const SwBoxAutoFormat & SwTableAutoFormat::GetDefaultBoxFormat ( )
static
const SvxFormatKeepItem& SwTableAutoFormat::GetKeepWithNextPara ( ) const
inline

Definition at line 192 of file tblafmt.hxx.

const OUString& SwTableAutoFormat::GetName ( ) const
inline
const SvxShadowItem& SwTableAutoFormat::GetShadow ( ) const
inline

Definition at line 193 of file tblafmt.hxx.

OUString SwTableAutoFormat::GetTableTemplateCellSubName ( const SwBoxAutoFormat rBoxFormat) const

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

Definition at line 837 of file tblafmt.cxx.

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

Referenced by SwStyleSheetIterator::First(), SwXTextCellStyle::getName(), lcl_FindCellStyle(), and lcl_GetCountOrName< SfxStyleFamily::Cell >().

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 877 of file tblafmt.cxx.

Referenced by SwStyleSheetIterator::First(), SwXTextCellStyle::GetBoxAutoFormat(), GetTableTemplateCellSubName(), lcl_FindCellStyle(), lcl_GetCountOrName< SfxStyleFamily::Cell >(), SwXTextTableStyle::replaceByName(), SwXTextTableStyle::SetPhysical(), and SwXTextTableStyle::UpdateCellStylesMapping().

css::uno::WeakReference<css::uno::XInterface> const& SwTableAutoFormat::GetXObject ( ) const
inline

Definition at line 247 of file tblafmt.hxx.

Referenced by SwXTextTableStyle::CreateXTextTableStyle().

bool SwTableAutoFormat::IsBackground ( ) const
inline
bool SwTableAutoFormat::IsFont ( ) const
inline
bool SwTableAutoFormat::IsFrame ( ) const
inline
bool SwTableAutoFormat::IsHidden ( ) const
inline

Check if style is hidden.

Definition at line 222 of file tblafmt.hxx.

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

bool SwTableAutoFormat::IsJustify ( ) const
inline
bool SwTableAutoFormat::IsUserDefined ( ) const
inline

Check if style is defined by user.

Definition at line 224 of file tblafmt.hxx.

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

bool SwTableAutoFormat::IsValueFormat ( ) const
inline
bool SwTableAutoFormat::LastRowEndColumnIsRow ( )

Definition at line 725 of file tblafmt.cxx.

References GetBoxFormat().

Referenced by SwXTextTableStyle::getPropertyValue().

bool SwTableAutoFormat::LastRowStartColumnIsRow ( )

Definition at line 729 of file tblafmt.cxx.

References GetBoxFormat().

Referenced by SwXTextTableStyle::getPropertyValue().

bool SwTableAutoFormat::Load ( SvStream rStream,
const SwAfVersions rVersions 
)
SwTableAutoFormat & SwTableAutoFormat::operator= ( const SwTableAutoFormat rNew)
void SwTableAutoFormat::RestoreTableProperties ( SwTable table) const
bool SwTableAutoFormat::Save ( SvStream rStream,
sal_uInt16  fileVersion 
) const
void SwTableAutoFormat::SetBackground ( const bool  bNew)
inline

Definition at line 229 of file tblafmt.hxx.

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

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

Definition at line 436 of file tblafmt.cxx.

References m_aBoxAutoFormat.

Referenced by SwXTextTableStyle::replaceByName().

void SwTableAutoFormat::SetFont ( const bool  bNew)
inline

Definition at line 226 of file tblafmt.hxx.

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

void SwTableAutoFormat::SetFrame ( const bool  bNew)
inline

Definition at line 228 of file tblafmt.hxx.

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

void SwTableAutoFormat::SetHidden ( bool  bHidden)
inline

Set if style is hidden.

Definition at line 234 of file tblafmt.hxx.

Referenced by SwDocStyleSheet::SetHidden().

void SwTableAutoFormat::SetJustify ( const bool  bNew)
inline

Definition at line 227 of file tblafmt.hxx.

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

void SwTableAutoFormat::SetKeepWithNextPara ( const SvxFormatKeepItem rNew)
inline

Definition at line 195 of file tblafmt.hxx.

References SvxFormatKeepItem::Clone().

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

Definition at line 203 of file tblafmt.hxx.

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

void SwTableAutoFormat::SetShadow ( const SvxShadowItem rNew)
inline

Definition at line 196 of file tblafmt.hxx.

References SvxShadowItem::Clone().

void SwTableAutoFormat::SetUserDefined ( bool  bUserDefined)
inline

Set if style is user defined.

Definition at line 236 of file tblafmt.hxx.

void SwTableAutoFormat::SetValueFormat ( const bool  bNew)
inline

Definition at line 230 of file tblafmt.hxx.

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

void SwTableAutoFormat::SetWidthHeight ( const bool  bNew)
inline

Definition at line 231 of file tblafmt.hxx.

Referenced by IMPL_LINK_NOARG(), and lcl_SetProperties().

void SwTableAutoFormat::SetXObject ( css::uno::Reference< css::uno::XInterface > const &  xObject)
inline
void SwTableAutoFormat::StoreTableProperties ( const SwTable table)
void SwTableAutoFormat::UpdateFromSet ( sal_uInt8  nPos,
const SfxItemSet rSet,
SwTableAutoFormatUpdateFlags  eFlags,
SvNumberFormatter const *  pNFormatr 
)

Definition at line 486 of file tblafmt.cxx.

References Box, Char, SfxItemSet::Get(), GetAppLanguage(), SvNumberFormatter::GetEntry(), SvNumberformat::GetFormatstring(), SfxItemSet::GetItemState(), SvNumberformat::GetLanguage(), CntUInt32Item::GetValue(), LANGUAGE_SYSTEM, m_aBoxAutoFormat, 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(), 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().

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

void FinitCore ( )
friend

Definition at line 666 of file init.cxx.

friend class SwDocTest
friend

Definition at line 154 of file tblafmt.hxx.

Member Data Documentation

SwBoxAutoFormat* SwTableAutoFormat::m_aBoxAutoFormat[16] = {}
private
std::shared_ptr<SvxFormatKeepItem> SwTableAutoFormat::m_aKeepWithNextPara
private

Definition at line 176 of file tblafmt.hxx.

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

OUString SwTableAutoFormat::m_aName
private

Definition at line 160 of file tblafmt.hxx.

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

sal_uInt16 SwTableAutoFormat::m_aRepeatHeading
private

Definition at line 177 of file tblafmt.hxx.

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

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

Definition at line 181 of file tblafmt.hxx.

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

bool SwTableAutoFormat::m_bCollapsingBorders
private

Definition at line 180 of file tblafmt.hxx.

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

bool SwTableAutoFormat::m_bHidden
private

Definition at line 183 of file tblafmt.hxx.

Referenced by operator=().

bool SwTableAutoFormat::m_bInclBackground
private

Definition at line 167 of file tblafmt.hxx.

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

bool SwTableAutoFormat::m_bInclFont
private

Definition at line 164 of file tblafmt.hxx.

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

bool SwTableAutoFormat::m_bInclFrame
private

Definition at line 166 of file tblafmt.hxx.

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

bool SwTableAutoFormat::m_bInclJustify
private

Definition at line 165 of file tblafmt.hxx.

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

bool SwTableAutoFormat::m_bInclValueFormat
private

Definition at line 168 of file tblafmt.hxx.

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

bool SwTableAutoFormat::m_bInclWidthHeight
private

Definition at line 171 of file tblafmt.hxx.

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

bool SwTableAutoFormat::m_bLayoutSplit
private

Definition at line 178 of file tblafmt.hxx.

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

bool SwTableAutoFormat::m_bRowSplit
private

Definition at line 179 of file tblafmt.hxx.

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

bool SwTableAutoFormat::m_bUserDefined
private

Definition at line 184 of file tblafmt.hxx.

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

sal_uInt16 SwTableAutoFormat::m_nStrResId
private

Definition at line 161 of file tblafmt.hxx.

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

css::uno::WeakReference<css::uno::XInterface> SwTableAutoFormat::m_wXObject
private

Definition at line 158 of file tblafmt.hxx.

SwBoxAutoFormat * SwTableAutoFormat::s_pDefaultBoxAutoFormat = nullptr
staticprivate

Definition at line 156 of file tblafmt.hxx.

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


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