LibreOffice Module sd (master) 1
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
SdStyleSheet Class Referencefinal

#include <stlsheet.hxx>

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

Public Member Functions

 SdStyleSheet (const OUString &rDisplayName, SfxStyleSheetBasePool &rPool, SfxStyleFamily eFamily, SfxStyleSearchBits nMask)
 
virtual bool SetParent (const OUString &rParentName) override
 
virtual SfxItemSetGetItemSet () override
 create if necessary and return ItemSets More...
 
virtual bool IsUsed () const override
 A template is used when it is referenced by inserted object or by a used template. More...
 
virtual bool HasFollowSupport () const override
 
virtual bool HasParentSupport () const override
 
virtual bool HasClearParentSupport () const override
 
virtual void SetHelpId (const OUString &r, sal_uLong nId) override
 
bool IsEditable ()
 Checks if a cell style is used in two places at once. More...
 
void AdjustToFontHeight (SfxItemSet &rSet, bool bOnlyMissingItems=true)
 Adjust the bullet width and the left text indent of the provided ItemSets to their font height. More...
 
SdStyleSheetGetRealStyleSheet () const
 Determine the style sheet for which this dummy is for. More...
 
SdStyleSheetGetPseudoStyleSheet () const
 Determine pseudo style sheet which stands for this style sheet. More...
 
void SetApiName (const OUString &rApiName)
 
OUString const & GetApiName () const
 
virtual bool SetName (const OUString &rNewName, bool bReindexNow=true) override
 
virtual void SAL_CALL release () noexcept override
 
virtual OUString SAL_CALL getImplementationName () override
 
virtual sal_Bool SAL_CALL supportsService (const OUString &ServiceName) override
 
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames () override
 
virtual OUString SAL_CALL getName () override
 
virtual void SAL_CALL setName (const OUString &aName) override
 
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 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 void SAL_CALL setPropertyValues (const css::uno::Sequence< OUString > &aPropertyNames, const css::uno::Sequence< css::uno::Any > &aValues) override
 
virtual css::uno::Sequence< css::uno::Any > SAL_CALL getPropertyValues (const css::uno::Sequence< OUString > &aPropertyNames) override
 
virtual void SAL_CALL addPropertiesChangeListener (const css::uno::Sequence< OUString > &aPropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener > &xListener) override
 
virtual void SAL_CALL removePropertiesChangeListener (const css::uno::Reference< css::beans::XPropertiesChangeListener > &xListener) override
 
virtual void SAL_CALL firePropertiesChangeEvent (const css::uno::Sequence< OUString > &aPropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener > &xListener) override
 
virtual css::beans::PropertyState SAL_CALL getPropertyState (const OUString &PropertyName) override
 
virtual css::uno::Sequence< css::beans::PropertyState > SAL_CALL getPropertyStates (const css::uno::Sequence< OUString > &aPropertyName) override
 
virtual void SAL_CALL setPropertyToDefault (const OUString &PropertyName) override
 
virtual css::uno::Any SAL_CALL getPropertyDefault (const OUString &aPropertyName) override
 
virtual void SAL_CALL addModifyListener (const css::uno::Reference< css::util::XModifyListener > &aListener) override
 
virtual void SAL_CALL removeModifyListener (const css::uno::Reference< css::util::XModifyListener > &aListener) override
 
virtual void SAL_CALL dispose () override
 
virtual void SAL_CALL addEventListener (const css::uno::Reference< css::lang::XEventListener > &xListener) override
 
virtual void SAL_CALL removeEventListener (const css::uno::Reference< css::lang::XEventListener > &aListener) override
 
void notifyModifyListener ()
 

Static Public Member Functions

static OUString GetFamilyString (SfxStyleFamily eFamily)
 
static rtl::Reference< SdStyleSheetCreateEmptyUserStyle (SfxStyleSheetBasePool &rPool, SfxStyleFamily eFamily)
 
static void BroadcastSdStyleSheetChange (SfxStyleSheetBase const *pStyleSheet, PresentationObjects ePO, SfxStyleSheetBasePool *pSSPool)
 

Private Member Functions

void setPropertyValue_Impl (const OUString &aPropertyName, const css::uno::Any &aValue)
 
css::uno::Any getPropertyValue_Impl (const OUString &PropertyName)
 
virtual void Notify (SfxBroadcaster &rBC, const SfxHint &rHint) override
 
virtual ~SdStyleSheet () override
 
void throwIfDisposed ()
 
void disposing ()
 
 SdStyleSheet (const SdStyleSheet &)=delete
 
SdStyleSheetoperator= (const SdStyleSheet &)=delete
 

Static Private Member Functions

static const SfxItemPropertyMapEntrygetPropertyMapEntry (std::u16string_view rPropertyName)
 this is used because our property map is not sorted yet More...
 

Private Attributes

std::mutex m_aMutex
 
bool m_bDisposed = false
 
bool m_bInDispose = false
 
comphelper::OInterfaceContainerHelper4< css::util::XModifyListener > maModifyListeners
 
comphelper::OInterfaceContainerHelper4< css::lang::XEventListener > maEventListeners
 
OUString msApiName
 
rtl::Reference< SfxStyleSheetBasePoolmxPool
 
std::unique_ptr< ModifyListenerForwardermpModifyListenerForwarder
 

Detailed Description

Definition at line 54 of file stlsheet.hxx.

Constructor & Destructor Documentation

◆ SdStyleSheet() [1/2]

SdStyleSheet::SdStyleSheet ( const OUString &  rDisplayName,
SfxStyleSheetBasePool rPool,
SfxStyleFamily  eFamily,
SfxStyleSearchBits  nMask 
)

Definition at line 143 of file stlsheet.cxx.

Referenced by CreateEmptyUserStyle().

◆ ~SdStyleSheet()

SdStyleSheet::~SdStyleSheet ( )
overrideprivatevirtual

Definition at line 150 of file stlsheet.cxx.

◆ SdStyleSheet() [2/2]

SdStyleSheet::SdStyleSheet ( const SdStyleSheet )
privatedelete

Member Function Documentation

◆ addEventListener()

void SAL_CALL SdStyleSheet::addEventListener ( const css::uno::Reference< css::lang::XEventListener > &  xListener)
overridevirtual

◆ addModifyListener()

void SAL_CALL SdStyleSheet::addModifyListener ( const css::uno::Reference< css::util::XModifyListener > &  aListener)
overridevirtual

◆ addPropertiesChangeListener()

void SAL_CALL SdStyleSheet::addPropertiesChangeListener ( const css::uno::Sequence< OUString > &  aPropertyNames,
const css::uno::Reference< css::beans::XPropertiesChangeListener > &  xListener 
)
overridevirtual

Definition at line 1279 of file stlsheet.cxx.

◆ addPropertyChangeListener()

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

Definition at line 1227 of file stlsheet.cxx.

◆ addVetoableChangeListener()

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

Definition at line 1229 of file stlsheet.cxx.

◆ AdjustToFontHeight()

void SdStyleSheet::AdjustToFontHeight ( SfxItemSet rSet,
bool  bOnlyMissingItems = true 
)

Adjust the bullet width and the left text indent of the provided ItemSets to their font height.

The new values are calculated that the ratio to the font height is as in the style sheet.

Parameters
bOnlyMissingItemsIf sal_True, only not set items are completed. With sal_False, are items are overwritten.

Definition at line 541 of file stlsheet.cxx.

References aName, EE_CHAR_FONTHEIGHT(), EE_PARA_BULLET(), EE_PARA_LRSPACE(), EE_PARA_ULSPACE(), SfxItemSet::Get(), SfxStyleSheetBase::GetFamily(), GetItemSet(), SfxItemSet::GetItemState(), SvxULSpaceItem::GetLower(), SfxStyleSheetBase::GetName(), GetRealStyleSheet(), SvxLRSpaceItem::GetTextFirstLineOffset(), SvxLRSpaceItem::GetTextLeft(), SvxULSpaceItem::GetUpper(), SvxBulletItem::GetWidth(), SfxItemSet::Put(), rSet, SvxULSpaceItem::SetLower(), SvxLRSpaceItem::SetTextFirstLineOffset(), SvxLRSpaceItem::SetTextLeft(), SvxULSpaceItem::SetUpper(), SvxBulletItem::SetWidth(), and STR_LAYOUT_OUTLINE.

Referenced by sd::FuPage::ExecuteDialog().

◆ BroadcastSdStyleSheetChange()

void SdStyleSheet::BroadcastSdStyleSheetChange ( SfxStyleSheetBase const *  pStyleSheet,
PresentationObjects  ePO,
SfxStyleSheetBasePool pSSPool 
)
static

◆ CreateEmptyUserStyle()

rtl::Reference< SdStyleSheet > SdStyleSheet::CreateEmptyUserStyle ( SfxStyleSheetBasePool rPool,
SfxStyleFamily  eFamily 
)
static

Definition at line 716 of file stlsheet.cxx.

References aName, SfxStyleSheetBasePool::Find(), nIndex, and SdStyleSheet().

Referenced by SdStyleFamily::createInstance().

◆ dispose()

void SAL_CALL SdStyleSheet::dispose ( void  )
overridevirtual

◆ disposing()

void SdStyleSheet::disposing ( )
private

Definition at line 797 of file stlsheet.cxx.

References mxPool.

Referenced by dispose().

◆ firePropertiesChangeEvent()

void SAL_CALL SdStyleSheet::firePropertiesChangeEvent ( const css::uno::Sequence< OUString > &  aPropertyNames,
const css::uno::Reference< css::beans::XPropertiesChangeListener > &  xListener 
)
overridevirtual

Definition at line 1281 of file stlsheet.cxx.

◆ GetApiName()

OUString const & SdStyleSheet::GetApiName ( ) const

◆ GetFamilyString()

OUString SdStyleSheet::GetFamilyString ( SfxStyleFamily  eFamily)
static

Definition at line 696 of file stlsheet.cxx.

Referenced by SdStyleFamily::getName(), getPropertyDefault(), and getPropertyValue_Impl().

◆ getImplementationName()

OUString SAL_CALL SdStyleSheet::getImplementationName ( )
overridevirtual

Definition at line 867 of file stlsheet.cxx.

◆ GetItemSet()

SfxItemSet & SdStyleSheet::GetItemSet ( )
overridevirtual

◆ getName()

OUString SAL_CALL SdStyleSheet::getName ( )
overridevirtual

Definition at line 904 of file stlsheet.cxx.

References GetApiName(), and throwIfDisposed().

◆ getParentStyle()

OUString SAL_CALL SdStyleSheet::getParentStyle ( )
overridevirtual

Definition at line 934 of file stlsheet.cxx.

References GetApiName(), mxPool, and throwIfDisposed().

◆ getPropertyDefault()

Any SAL_CALL SdStyleSheet::getPropertyDefault ( const OUString &  aPropertyName)
overridevirtual

◆ getPropertyMapEntry()

const SfxItemPropertyMapEntry * SdStyleSheet::getPropertyMapEntry ( std::u16string_view  rPropertyName)
staticprivate

this is used because our property map is not sorted yet

Exceptions
css::uno::RuntimeException

Definition at line 1504 of file stlsheet.cxx.

References SvxItemPropertySet::getPropertyMapEntry(), and GetStylePropertySet().

Referenced by getPropertyDefault(), getPropertyState(), getPropertyValue_Impl(), setPropertyToDefault(), and setPropertyValue_Impl().

◆ getPropertySetInfo()

Reference< XPropertySetInfo > SdStyleSheet::getPropertySetInfo ( )
overridevirtual

◆ getPropertyState()

PropertyState SAL_CALL SdStyleSheet::getPropertyState ( const OUString &  PropertyName)
overridevirtual

◆ getPropertyStates()

Sequence< PropertyState > SAL_CALL SdStyleSheet::getPropertyStates ( const css::uno::Sequence< OUString > &  aPropertyName)
overridevirtual

Definition at line 1431 of file stlsheet.cxx.

References nCount, and throwIfDisposed().

◆ getPropertyValue()

Any SAL_CALL SdStyleSheet::getPropertyValue ( const OUString &  PropertyName)
overridevirtual

Definition at line 1219 of file stlsheet.cxx.

References Any, getPropertyValue_Impl(), and throwIfDisposed().

◆ getPropertyValue_Impl()

css::uno::Any SdStyleSheet::getPropertyValue_Impl ( const OUString &  PropertyName)
private

◆ getPropertyValues()

css::uno::Sequence< css::uno::Any > SAL_CALL SdStyleSheet::getPropertyValues ( const css::uno::Sequence< OUString > &  aPropertyNames)
overridevirtual

Definition at line 1264 of file stlsheet.cxx.

References Any, getPropertyValue_Impl(), i, nCount, and throwIfDisposed().

◆ GetPseudoStyleSheet()

SdStyleSheet * SdStyleSheet::GetPseudoStyleSheet ( ) const

Determine pseudo style sheet which stands for this style sheet.

Definition at line 466 of file stlsheet.cxx.

References aName, DBG_ASSERT, nPos, SD_LT_SEPARATOR, SdResId(), STR_LAYOUT_BACKGROUND, STR_LAYOUT_BACKGROUNDOBJECTS, STR_LAYOUT_NOTES, STR_LAYOUT_OUTLINE, STR_LAYOUT_SUBTITLE, and STR_LAYOUT_TITLE.

Referenced by getPropertyValue_Impl().

◆ GetRealStyleSheet()

SdStyleSheet * SdStyleSheet::GetRealStyleSheet ( ) const

◆ getSupportedServiceNames()

Sequence< OUString > SAL_CALL SdStyleSheet::getSupportedServiceNames ( )
overridevirtual

Definition at line 877 of file stlsheet.cxx.

◆ HasClearParentSupport()

bool SdStyleSheet::HasClearParentSupport ( ) const
overridevirtual

Definition at line 605 of file stlsheet.cxx.

◆ HasFollowSupport()

bool SdStyleSheet::HasFollowSupport ( ) const
overridevirtual

Definition at line 595 of file stlsheet.cxx.

◆ HasParentSupport()

bool SdStyleSheet::HasParentSupport ( ) const
overridevirtual

Definition at line 600 of file stlsheet.cxx.

◆ IsEditable()

bool SdStyleSheet::IsEditable ( )

Checks if a cell style is used in two places at once.

Typically we modify the formatting of a single place, so such style shouldn't be edited directly.

Definition at line 331 of file stlsheet.cxx.

References comphelper::OInterfaceContainerHelper4< class ListenerT >::getLength(), m_aMutex, and maModifyListeners.

◆ isInUse()

sal_Bool SAL_CALL SdStyleSheet::isInUse ( )
overridevirtual

Definition at line 927 of file stlsheet.cxx.

References IsUsed(), and throwIfDisposed().

◆ IsUsed()

bool SdStyleSheet::IsUsed ( ) const
overridevirtual

A template is used when it is referenced by inserted object or by a used template.

Definition at line 282 of file stlsheet.cxx.

References Exception, comphelper::OInterfaceContainerHelper4< class ListenerT >::getElements(), comphelper::OInterfaceContainerHelper4< class ListenerT >::getLength(), m_aMutex, and maModifyListeners.

Referenced by isInUse().

◆ isUserDefined()

sal_Bool SAL_CALL SdStyleSheet::isUserDefined ( )
overridevirtual

Definition at line 920 of file stlsheet.cxx.

References throwIfDisposed().

◆ Notify()

void SdStyleSheet::Notify ( SfxBroadcaster rBC,
const SfxHint rHint 
)
overrideprivatevirtual

Definition at line 515 of file stlsheet.cxx.

References SfxHint::GetId(), GetRealStyleSheet(), and SfxStyleSheet::Notify().

◆ notifyModifyListener()

void SdStyleSheet::notifyModifyListener ( )

◆ operator=()

SdStyleSheet & SdStyleSheet::operator= ( const SdStyleSheet )
privatedelete

◆ release()

void SAL_CALL SdStyleSheet::release ( )
overridevirtualnoexcept

Definition at line 731 of file stlsheet.cxx.

References dispose(), m_bDisposed, m_refCount, and TOOLS_WARN_EXCEPTION.

◆ removeEventListener()

void SAL_CALL SdStyleSheet::removeEventListener ( const css::uno::Reference< css::lang::XEventListener > &  aListener)
overridevirtual

◆ removeModifyListener()

void SAL_CALL SdStyleSheet::removeModifyListener ( const css::uno::Reference< css::util::XModifyListener > &  aListener)
overridevirtual

◆ removePropertiesChangeListener()

void SAL_CALL SdStyleSheet::removePropertiesChangeListener ( const css::uno::Reference< css::beans::XPropertiesChangeListener > &  xListener)
overridevirtual

Definition at line 1280 of file stlsheet.cxx.

◆ removePropertyChangeListener()

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

Definition at line 1228 of file stlsheet.cxx.

◆ removeVetoableChangeListener()

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

Definition at line 1230 of file stlsheet.cxx.

◆ SetApiName()

void SdStyleSheet::SetApiName ( const OUString &  rApiName)

Definition at line 156 of file stlsheet.cxx.

References msApiName.

Referenced by SdStyleFamily::insertByName().

◆ SetHelpId()

void SdStyleSheet::SetHelpId ( const OUString &  r,
sal_uLong  nId 
)
overridevirtual

Definition at line 687 of file stlsheet.cxx.

References msApiName, nId, and SfxStyleSheetBase::SetHelpId().

◆ setName()

void SAL_CALL SdStyleSheet::setName ( const OUString &  aName)
overridevirtual

Definition at line 911 of file stlsheet.cxx.

References SetName(), and throwIfDisposed().

◆ SetName()

bool SdStyleSheet::SetName ( const OUString &  rNewName,
bool  bReindexNow = true 
)
overridevirtual

Definition at line 891 of file stlsheet.cxx.

References msApiName.

Referenced by SdStyleFamily::insertByName(), and setName().

◆ SetParent()

bool SdStyleSheet::SetParent ( const OUString &  rParentName)
overridevirtual

◆ setParentStyle()

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

Definition at line 948 of file stlsheet.cxx.

References GetName(), master, msApiName, mxPool, name, SD_LT_SEPARATOR, SetParent(), and throwIfDisposed().

◆ setPropertyToDefault()

void SAL_CALL SdStyleSheet::setPropertyToDefault ( const OUString &  PropertyName)
overridevirtual

◆ setPropertyValue()

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

Definition at line 1210 of file stlsheet.cxx.

References setPropertyValue_Impl(), and throwIfDisposed().

◆ setPropertyValue_Impl()

void SdStyleSheet::setPropertyValue_Impl ( const OUString &  aPropertyName,
const css::uno::Any &  aValue 
)
private

◆ setPropertyValues()

void SAL_CALL SdStyleSheet::setPropertyValues ( const css::uno::Sequence< OUString > &  aPropertyNames,
const css::uno::Sequence< css::uno::Any > &  aValues 
)
overridevirtual

◆ supportsService()

sal_Bool SAL_CALL SdStyleSheet::supportsService ( const OUString &  ServiceName)
overridevirtual

Definition at line 872 of file stlsheet.cxx.

References ServiceName, and cppu::supportsService().

◆ throwIfDisposed()

void SdStyleSheet::throwIfDisposed ( )
private

Member Data Documentation

◆ m_aMutex

std::mutex SdStyleSheet::m_aMutex
mutableprivate

◆ m_bDisposed

bool SdStyleSheet::m_bDisposed = false
private

Definition at line 157 of file stlsheet.hxx.

Referenced by addEventListener(), addModifyListener(), dispose(), and release().

◆ m_bInDispose

bool SdStyleSheet::m_bInDispose = false
private

Definition at line 158 of file stlsheet.hxx.

Referenced by addEventListener(), addModifyListener(), and dispose().

◆ maEventListeners

comphelper::OInterfaceContainerHelper4<css::lang::XEventListener> SdStyleSheet::maEventListeners
private

Definition at line 160 of file stlsheet.hxx.

Referenced by addEventListener(), dispose(), and removeEventListener().

◆ maModifyListeners

comphelper::OInterfaceContainerHelper4<css::util::XModifyListener> SdStyleSheet::maModifyListeners
private

◆ mpModifyListenerForwarder

std::unique_ptr< ModifyListenerForwarder > SdStyleSheet::mpModifyListenerForwarder
private

Definition at line 164 of file stlsheet.hxx.

Referenced by addModifyListener().

◆ msApiName

OUString SdStyleSheet::msApiName
private

Definition at line 161 of file stlsheet.hxx.

Referenced by GetApiName(), SetApiName(), SetHelpId(), SetName(), and setParentStyle().

◆ mxPool

rtl::Reference< SfxStyleSheetBasePool > SdStyleSheet::mxPool
private

Definition at line 162 of file stlsheet.hxx.

Referenced by disposing(), getParentStyle(), setParentStyle(), and throwIfDisposed().


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