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 Reference

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, const OUString &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 233 of file unostyle.hxx.

Member Enumeration Documentation

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 248 of file unostyle.hxx.

Constructor & Destructor Documentation

SwXTextTableStyle::SwXTextTableStyle ( SwDocShell pDocShell,
SwTableAutoFormat pTableAutoFormat 
)

Definition at line 4274 of file unostyle.cxx.

References UpdateCellStylesMapping().

Referenced by CreateXTextTableStyle().

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

Create non physical style.

Definition at line 4280 of file unostyle.cxx.

References m_pTableAutoFormat, m_pTableAutoFormat_Impl, and UpdateCellStylesMapping().

Member Function Documentation

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

Definition at line 4503 of file unostyle.cxx.

References SAL_WARN.

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

Definition at line 4513 of file unostyle.cxx.

References SAL_WARN.

uno::Reference< style::XStyle > SwXTextTableStyle::CreateXTextTableStyle ( SwDocShell pDocShell,
const OUString &  rTableAutoFormatName 
)
static
uno::Any SAL_CALL SwXTextTableStyle::getByName ( const OUString &  rName)
overridevirtual

Definition at line 4524 of file unostyle.cxx.

References GetCellStyleNameMap(), and m_aCellStyles.

const CellStyleNameMap & SwXTextTableStyle::GetCellStyleNameMap ( )
staticprivate
css::uno::Sequence< OUString > SAL_CALL SwXTextTableStyle::getElementNames ( )
overridevirtual

Definition at line 4535 of file unostyle.cxx.

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

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

Definition at line 4596 of file unostyle.cxx.

References cppu::UnoType< class >::get().

OUString SAL_CALL SwXTextTableStyle::getImplementationName ( )
overridevirtual

Definition at line 4607 of file unostyle.cxx.

OUString SAL_CALL SwXTextTableStyle::getName ( )
overridevirtual
OUString SAL_CALL SwXTextTableStyle::getParentStyle ( )
overridevirtual

Definition at line 4447 of file unostyle.cxx.

css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL SwXTextTableStyle::getPropertySetInfo ( )
overridevirtual
css::uno::Any SAL_CALL SwXTextTableStyle::getPropertyValue ( const OUString &  PropertyName)
overridevirtual
css::uno::Sequence< OUString > SAL_CALL SwXTextTableStyle::getSupportedServiceNames ( )
overridevirtual

Definition at line 4617 of file unostyle.cxx.

SwTableAutoFormat * SwXTextTableStyle::GetTableAutoFormat ( SwDocShell pDocShell,
const OUString &  sName 
)
static

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

Definition at line 4359 of file unostyle.cxx.

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

Referenced by CreateXTextTableStyle(), sw::XStyleFamily::replaceByName(), and SetPhysical().

SwTableAutoFormat * SwXTextTableStyle::GetTableFormat ( )

Returns box format assigned to this style.

Definition at line 4354 of file unostyle.cxx.

References m_pTableAutoFormat.

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

Definition at line 4541 of file unostyle.cxx.

References GetCellStyleNameMap().

sal_Bool SAL_CALL SAL_CALL SwXTextTableStyle::hasElements ( )
overridevirtual

Definition at line 4601 of file unostyle.cxx.

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

Definition at line 4550 of file unostyle.cxx.

References SAL_WARN.

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

Definition at line 4590 of file unostyle.cxx.

References SAL_WARN.

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

Definition at line 4508 of file unostyle.cxx.

References SAL_WARN.

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

Definition at line 4518 of file unostyle.cxx.

References SAL_WARN.

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

Definition at line 4464 of file unostyle.cxx.

References m_pTableAutoFormat, and SwTableAutoFormat::SetName().

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

Definition at line 4452 of file unostyle.cxx.

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

Definition at line 4477 of file unostyle.cxx.

References SAL_WARN.

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

Definition at line 4612 of file unostyle.cxx.

References cppu::supportsService().

void SwXTextTableStyle::UpdateCellStylesMapping ( )
private

Member Data Documentation

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

Definition at line 272 of file unostyle.hxx.

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

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 246 of file unostyle.hxx.

Referenced by isInUse(), and SetPhysical().

SwDocShell* SwXTextTableStyle::m_pDocShell
private
SwTableAutoFormat* SwXTextTableStyle::m_pTableAutoFormat
private
std::unique_ptr<SwTableAutoFormat> SwXTextTableStyle::m_pTableAutoFormat_Impl
private

Stores SwTableAutoFormat when this is not a physical style.

Definition at line 244 of file unostyle.hxx.

Referenced by SetPhysical(), and SwXTextTableStyle().


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