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

A text table style is a UNO API wrapper for a SwTableAutoFormat. More...

#include <unostyle.hxx>

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

Public Member Functions

 SwXTextTableStyle (SwDocShell *pDocShell, SwTableAutoFormat *pTableAutoFormat)
 
 SwXTextTableStyle (SwDocShell *pDocShell, const OUString &rTableAutoFormatName)
 Create non physical style. More...
 
SwTableAutoFormatGetTableFormat ()
 Returns box format assigned to this style. More...
 
void SetPhysical ()
 
virtual sal_Bool SAL_CALL isUserDefined () override
 
virtual sal_Bool SAL_CALL isInUse () override
 
virtual OUString SAL_CALL getParentStyle () override
 
virtual void SAL_CALL setParentStyle (const OUString &aParentStyle) override
 
virtual OUString SAL_CALL getName () override
 
virtual void SAL_CALL setName (const OUString &rName) override
 
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo () override
 
virtual void SAL_CALL setPropertyValue (const OUString &aPropertyName, const css::uno::Any &aValue) override
 
virtual css::uno::Any SAL_CALL getPropertyValue (const OUString &PropertyName) override
 
virtual void SAL_CALL addPropertyChangeListener (const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
 
virtual void SAL_CALL removePropertyChangeListener (const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) override
 
virtual void SAL_CALL addVetoableChangeListener (const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
 
virtual void SAL_CALL removeVetoableChangeListener (const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
 
virtual css::uno::Any SAL_CALL getByName (const OUString &rName) override
 
virtual css::uno::Sequence< OUString > SAL_CALL getElementNames () override
 
virtual sal_Bool SAL_CALL hasByName (const OUString &rName) override
 
virtual void SAL_CALL insertByName (const OUString &rName, const css::uno::Any &aElement) override
 
virtual void SAL_CALL replaceByName (const OUString &rName, const css::uno::Any &aElement) override
 
virtual void SAL_CALL removeByName (const OUString &rName) override
 
virtual css::uno::Type SAL_CALL getElementType () override
 
virtual sal_Bool SAL_CALL hasElements () override
 
virtual OUString SAL_CALL getImplementationName () override
 
virtual sal_Bool SAL_CALL supportsService (const OUString &rServiceName) override
 
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames () override
 

Static Public Member Functions

static SwTableAutoFormatGetTableAutoFormat (SwDocShell *pDocShell, std::u16string_view sName)
 This function looks for a SwTableAutoFormat with given name. Returns nullptr if could not be found. More...
 
static css::uno::Reference< css::style::XStyle > CreateXTextTableStyle (SwDocShell *pDocShell, const OUString &rTableAutoFormatName)
 

Private Types

enum  {
  FIRST_ROW_STYLE = 0 ,
  LAST_ROW_STYLE ,
  FIRST_COLUMN_STYLE ,
  LAST_COLUMN_STYLE ,
  EVEN_ROWS_STYLE ,
  ODD_ROWS_STYLE ,
  EVEN_COLUMNS_STYLE ,
  ODD_COLUMNS_STYLE ,
  BODY_STYLE ,
  BACKGROUND_STYLE ,
  FIRST_ROW_START_COLUMN_STYLE ,
  FIRST_ROW_END_COLUMN_STYLE ,
  LAST_ROW_START_COLUMN_STYLE ,
  LAST_ROW_END_COLUMN_STYLE ,
  FIRST_ROW_EVEN_COLUMN_STYLE ,
  LAST_ROW_EVEN_COLUMN_STYLE ,
  STYLE_COUNT
}
 

Private Member Functions

void UpdateCellStylesMapping ()
 Fills m_aCellStyles with SwXTextCellStyles pointing to children of this style. More...
 

Static Private Member Functions

static const CellStyleNameMapGetCellStyleNameMap ()
 

Private Attributes

SwDocShellm_pDocShell
 
SwTableAutoFormatm_pTableAutoFormat
 
std::unique_ptr< SwTableAutoFormatm_pTableAutoFormat_Impl
 Stores SwTableAutoFormat when this is not a physical style. More...
 
bool m_bPhysical
 If true, then it points to a core object, if false, then this is a created, but not-yet-inserted format. More...
 
css::uno::Reference< css::style::XStyle > m_aCellStyles [STYLE_COUNT]
 

Detailed Description

A text table style is a UNO API wrapper for a SwTableAutoFormat.

Definition at line 231 of file unostyle.hxx.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
FIRST_ROW_STYLE 
LAST_ROW_STYLE 
FIRST_COLUMN_STYLE 
LAST_COLUMN_STYLE 
EVEN_ROWS_STYLE 
ODD_ROWS_STYLE 
EVEN_COLUMNS_STYLE 
ODD_COLUMNS_STYLE 
BODY_STYLE 
BACKGROUND_STYLE 
FIRST_ROW_START_COLUMN_STYLE 
FIRST_ROW_END_COLUMN_STYLE 
LAST_ROW_START_COLUMN_STYLE 
LAST_ROW_END_COLUMN_STYLE 
FIRST_ROW_EVEN_COLUMN_STYLE 
LAST_ROW_EVEN_COLUMN_STYLE 
STYLE_COUNT 

Definition at line 246 of file unostyle.hxx.

Constructor & Destructor Documentation

◆ SwXTextTableStyle() [1/2]

SwXTextTableStyle::SwXTextTableStyle ( SwDocShell pDocShell,
SwTableAutoFormat pTableAutoFormat 
)

Definition at line 4273 of file unostyle.cxx.

References UpdateCellStylesMapping().

Referenced by CreateXTextTableStyle().

◆ SwXTextTableStyle() [2/2]

SwXTextTableStyle::SwXTextTableStyle ( SwDocShell pDocShell,
const OUString &  rTableAutoFormatName 
)

Create non physical style.

Definition at line 4279 of file unostyle.cxx.

References m_pTableAutoFormat, m_pTableAutoFormat_Impl, and UpdateCellStylesMapping().

Member Function Documentation

◆ addPropertyChangeListener()

void SAL_CALL SwXTextTableStyle::addPropertyChangeListener ( const OUString &  aPropertyName,
const css::uno::Reference< css::beans::XPropertyChangeListener > &  xListener 
)
overridevirtual

Definition at line 4494 of file unostyle.cxx.

References SAL_WARN.

◆ addVetoableChangeListener()

void SAL_CALL SwXTextTableStyle::addVetoableChangeListener ( const OUString &  PropertyName,
const css::uno::Reference< css::beans::XVetoableChangeListener > &  aListener 
)
overridevirtual

Definition at line 4504 of file unostyle.cxx.

References SAL_WARN.

◆ CreateXTextTableStyle()

uno::Reference< style::XStyle > SwXTextTableStyle::CreateXTextTableStyle ( SwDocShell pDocShell,
const OUString &  rTableAutoFormatName 
)
static

◆ getByName()

uno::Any SAL_CALL SwXTextTableStyle::getByName ( const OUString &  rName)
overridevirtual

Definition at line 4515 of file unostyle.cxx.

References GetCellStyleNameMap(), and m_aCellStyles.

◆ GetCellStyleNameMap()

const CellStyleNameMap & SwXTextTableStyle::GetCellStyleNameMap ( )
staticprivate

◆ getElementNames()

css::uno::Sequence< OUString > SAL_CALL SwXTextTableStyle::getElementNames ( )
overridevirtual

Definition at line 4526 of file unostyle.cxx.

References GetCellStyleNameMap(), and comphelper::mapKeysToSequence().

◆ getElementType()

uno::Type SAL_CALL SAL_CALL SwXTextTableStyle::getElementType ( )
overridevirtual

Definition at line 4585 of file unostyle.cxx.

References cppu::UnoType< typename T >::get().

◆ getImplementationName()

OUString SAL_CALL SwXTextTableStyle::getImplementationName ( )
overridevirtual

Definition at line 4596 of file unostyle.cxx.

◆ getName()

OUString SAL_CALL SwXTextTableStyle::getName ( )
overridevirtual

◆ getParentStyle()

OUString SAL_CALL SwXTextTableStyle::getParentStyle ( )
overridevirtual

Definition at line 4438 of file unostyle.cxx.

◆ getPropertySetInfo()

css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL SwXTextTableStyle::getPropertySetInfo ( )
overridevirtual

◆ getPropertyValue()

css::uno::Any SAL_CALL SwXTextTableStyle::getPropertyValue ( const OUString &  PropertyName)
overridevirtual

◆ getSupportedServiceNames()

css::uno::Sequence< OUString > SAL_CALL SwXTextTableStyle::getSupportedServiceNames ( )
overridevirtual

Definition at line 4606 of file unostyle.cxx.

◆ GetTableAutoFormat()

SwTableAutoFormat * SwXTextTableStyle::GetTableAutoFormat ( SwDocShell pDocShell,
std::u16string_view  sName 
)
static

This function looks for a SwTableAutoFormat with given name. Returns nullptr if could not be found.

Definition at line 4358 of file unostyle.cxx.

References SwDocShell::GetDoc(), SwTableAutoFormat::GetName(), SwDoc::GetTableStyles(), i, SwTableAutoFormatTable::size(), and sName.

Referenced by CreateXTextTableStyle(), and SetPhysical().

◆ GetTableFormat()

SwTableAutoFormat * SwXTextTableStyle::GetTableFormat ( )

Returns box format assigned to this style.

Definition at line 4353 of file unostyle.cxx.

References m_pTableAutoFormat.

◆ hasByName()

sal_Bool SAL_CALL SwXTextTableStyle::hasByName ( const OUString &  rName)
overridevirtual

Definition at line 4531 of file unostyle.cxx.

References GetCellStyleNameMap().

◆ hasElements()

sal_Bool SAL_CALL SAL_CALL SwXTextTableStyle::hasElements ( )
overridevirtual

Definition at line 4590 of file unostyle.cxx.

◆ insertByName()

void SAL_CALL SwXTextTableStyle::insertByName ( const OUString &  rName,
const css::uno::Any &  aElement 
)
overridevirtual

Definition at line 4539 of file unostyle.cxx.

References SAL_WARN.

◆ isInUse()

sal_Bool SAL_CALL SwXTextTableStyle::isInUse ( )
overridevirtual

◆ isUserDefined()

sal_Bool SAL_CALL SwXTextTableStyle::isUserDefined ( )
overridevirtual

◆ removeByName()

void SAL_CALL SwXTextTableStyle::removeByName ( const OUString &  rName)
overridevirtual

Definition at line 4579 of file unostyle.cxx.

References SAL_WARN.

◆ removePropertyChangeListener()

void SAL_CALL SwXTextTableStyle::removePropertyChangeListener ( const OUString &  aPropertyName,
const css::uno::Reference< css::beans::XPropertyChangeListener > &  aListener 
)
overridevirtual

Definition at line 4499 of file unostyle.cxx.

References SAL_WARN.

◆ removeVetoableChangeListener()

void SAL_CALL SwXTextTableStyle::removeVetoableChangeListener ( const OUString &  PropertyName,
const css::uno::Reference< css::beans::XVetoableChangeListener > &  aListener 
)
overridevirtual

Definition at line 4509 of file unostyle.cxx.

References SAL_WARN.

◆ replaceByName()

void SAL_CALL SwXTextTableStyle::replaceByName ( const OUString &  rName,
const css::uno::Any &  aElement 
)
overridevirtual

◆ setName()

void SAL_CALL SwXTextTableStyle::setName ( const OUString &  rName)
overridevirtual

Definition at line 4455 of file unostyle.cxx.

References m_pTableAutoFormat, and SwTableAutoFormat::SetName().

◆ setParentStyle()

void SAL_CALL SwXTextTableStyle::setParentStyle ( const OUString &  aParentStyle)
overridevirtual

Definition at line 4443 of file unostyle.cxx.

◆ SetPhysical()

void SwXTextTableStyle::SetPhysical ( )

◆ setPropertyValue()

void SAL_CALL SwXTextTableStyle::setPropertyValue ( const OUString &  aPropertyName,
const css::uno::Any &  aValue 
)
overridevirtual

Definition at line 4468 of file unostyle.cxx.

References SAL_WARN.

◆ supportsService()

sal_Bool SAL_CALL SwXTextTableStyle::supportsService ( const OUString &  rServiceName)
overridevirtual

Definition at line 4601 of file unostyle.cxx.

References cppu::supportsService().

◆ UpdateCellStylesMapping()

void SwXTextTableStyle::UpdateCellStylesMapping ( )
private

Member Data Documentation

◆ m_aCellStyles

css::uno::Reference<css::style::XStyle> SwXTextTableStyle::m_aCellStyles[STYLE_COUNT]
private

Definition at line 270 of file unostyle.hxx.

Referenced by getByName(), replaceByName(), and UpdateCellStylesMapping().

◆ m_bPhysical

bool SwXTextTableStyle::m_bPhysical
private

If true, then it points to a core object, if false, then this is a created, but not-yet-inserted format.

Definition at line 244 of file unostyle.hxx.

Referenced by isInUse(), and SetPhysical().

◆ m_pDocShell

SwDocShell* SwXTextTableStyle::m_pDocShell
private

◆ m_pTableAutoFormat

SwTableAutoFormat* SwXTextTableStyle::m_pTableAutoFormat
private

◆ m_pTableAutoFormat_Impl

std::unique_ptr<SwTableAutoFormat> SwXTextTableStyle::m_pTableAutoFormat_Impl
private

Stores SwTableAutoFormat when this is not a physical style.

Definition at line 242 of file unostyle.hxx.

Referenced by SetPhysical(), and SwXTextTableStyle().


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