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)
 
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 (sal_uInt8 nPos, 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]
 
SvxFormatBreakItem m_aBreak
 
SwFormatPageDesc m_aPageDesc
 
SvxFormatKeepItem m_aKeepWithNextPara
 
sal_uInt16 m_aRepeatHeading
 
bool m_bLayoutSplit
 
bool m_bRowSplit
 
bool m_bCollapsingBorders
 
SvxShadowItem m_aShadow
 
bool m_bHidden
 
bool m_bUserDefined
 

Static Private Attributes

static SwBoxAutoFormatpDfltBoxAutoFormat = nullptr
 

Friends

class SwDocTest
 
void FinitCore ()
 

Detailed Description

Definition at line 241 of file tblafmt.hxx.

Constructor & Destructor Documentation

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

Definition at line 621 of file tblafmt.cxx.

References m_aBoxAutoFormat.

SwTableAutoFormat::~SwTableAutoFormat ( )

Definition at line 671 of file tblafmt.cxx.

References m_aBoxAutoFormat.

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

References GetBoxFormat().

Referenced by SwXTextTableStyle::getPropertyValue().

bool SwTableAutoFormat::FirstRowStartColumnIsRow ( )

Definition at line 954 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 706 of file tblafmt.cxx.

References m_aBoxAutoFormat, pDfltBoxAutoFormat, and SAL_WARN_IF.

const SwBoxAutoFormat & SwTableAutoFormat::GetDefaultBoxFormat ( )
static
const OUString& SwTableAutoFormat::GetName ( ) const
inline
OUString SwTableAutoFormat::GetTableTemplateCellSubName ( const SwBoxAutoFormat rBoxFormat) const

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

Definition at line 1071 of file tblafmt.cxx.

References GetTableTemplateMap(), i, and m_aBoxAutoFormat.

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 1111 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 331 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 306 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 308 of file tblafmt.hxx.

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

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

Definition at line 958 of file tblafmt.cxx.

References GetBoxFormat().

Referenced by SwXTextTableStyle::getPropertyValue().

bool SwTableAutoFormat::LastRowStartColumnIsRow ( )

Definition at line 962 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 313 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 679 of file tblafmt.cxx.

References m_aBoxAutoFormat.

Referenced by SwXTextTableStyle::replaceByName().

void SwTableAutoFormat::SetFont ( const bool  bNew)
inline

Definition at line 310 of file tblafmt.hxx.

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

void SwTableAutoFormat::SetFrame ( const bool  bNew)
inline

Definition at line 312 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 318 of file tblafmt.hxx.

Referenced by SwDocStyleSheet::SetHidden().

void SwTableAutoFormat::SetJustify ( const bool  bNew)
inline

Definition at line 311 of file tblafmt.hxx.

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

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

Definition at line 288 of file tblafmt.hxx.

References USHRT_MAX.

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

void SwTableAutoFormat::SetUserDefined ( bool  bUserDefined)
inline

Set if style is user defined.

Definition at line 320 of file tblafmt.hxx.

void SwTableAutoFormat::SetValueFormat ( const bool  bNew)
inline

Definition at line 314 of file tblafmt.hxx.

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

void SwTableAutoFormat::SetWidthHeight ( const bool  bNew)
inline

Definition at line 315 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 729 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, SwBoxAutoFormat::SetAdjust(), SwBoxAutoFormat::SetBackground(), SwBoxAutoFormat::SetBox(), SwBoxAutoFormat::SetCJKFont(), SwBoxAutoFormat::SetCJKHeight(), SwBoxAutoFormat::SetCJKPosture(), SwBoxAutoFormat::SetCJKWeight(), SwBoxAutoFormat::SetColor(), SwBoxAutoFormat::SetContour(), SwBoxAutoFormat::SetCrossedOut(), SwBoxAutoFormat::SetCTLFont(), SwBoxAutoFormat::SetCTLHeight(), SwBoxAutoFormat::SetCTLPosture(), SwBoxAutoFormat::SetCTLWeight(), SwBoxAutoFormat::SetFont(), SwBoxAutoFormat::SetHeight(), SwBoxAutoFormat::SetOverline(), SwBoxAutoFormat::SetPosture(), SwBoxAutoFormat::SetShadowed(), SwBoxAutoFormat::SetTextOrientation(), SwBoxAutoFormat::SetUnderline(), SwBoxAutoFormat::SetValueFormat(), SwBoxAutoFormat::SetVerticalAlignment(), and SwBoxAutoFormat::SetWeight().

Referenced by SwDoc::GetTableAutoFormat().

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

Friends And Related Function Documentation

void FinitCore ( )
friend

Definition at line 665 of file init.cxx.

friend class SwDocTest
friend

Definition at line 243 of file tblafmt.hxx.

Member Data Documentation

SwBoxAutoFormat* SwTableAutoFormat::m_aBoxAutoFormat[16]
private
SvxFormatBreakItem SwTableAutoFormat::m_aBreak
private

Definition at line 265 of file tblafmt.hxx.

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

SvxFormatKeepItem SwTableAutoFormat::m_aKeepWithNextPara
private

Definition at line 267 of file tblafmt.hxx.

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

OUString SwTableAutoFormat::m_aName
private

Definition at line 249 of file tblafmt.hxx.

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

SwFormatPageDesc SwTableAutoFormat::m_aPageDesc
private

Definition at line 266 of file tblafmt.hxx.

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

sal_uInt16 SwTableAutoFormat::m_aRepeatHeading
private

Definition at line 268 of file tblafmt.hxx.

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

SvxShadowItem SwTableAutoFormat::m_aShadow
private

Definition at line 272 of file tblafmt.hxx.

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

bool SwTableAutoFormat::m_bCollapsingBorders
private

Definition at line 271 of file tblafmt.hxx.

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

bool SwTableAutoFormat::m_bHidden
private

Definition at line 274 of file tblafmt.hxx.

Referenced by operator=().

bool SwTableAutoFormat::m_bInclBackground
private

Definition at line 256 of file tblafmt.hxx.

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

bool SwTableAutoFormat::m_bInclFont
private

Definition at line 253 of file tblafmt.hxx.

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

bool SwTableAutoFormat::m_bInclFrame
private

Definition at line 255 of file tblafmt.hxx.

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

bool SwTableAutoFormat::m_bInclJustify
private

Definition at line 254 of file tblafmt.hxx.

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

bool SwTableAutoFormat::m_bInclValueFormat
private

Definition at line 257 of file tblafmt.hxx.

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

bool SwTableAutoFormat::m_bInclWidthHeight
private

Definition at line 260 of file tblafmt.hxx.

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

bool SwTableAutoFormat::m_bLayoutSplit
private

Definition at line 269 of file tblafmt.hxx.

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

bool SwTableAutoFormat::m_bRowSplit
private

Definition at line 270 of file tblafmt.hxx.

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

bool SwTableAutoFormat::m_bUserDefined
private

Definition at line 275 of file tblafmt.hxx.

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

sal_uInt16 SwTableAutoFormat::m_nStrResId
private

Definition at line 250 of file tblafmt.hxx.

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

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

Definition at line 247 of file tblafmt.hxx.

SwBoxAutoFormat * SwTableAutoFormat::pDfltBoxAutoFormat = nullptr
staticprivate

Definition at line 245 of file tblafmt.hxx.

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


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