LibreOffice Module writerfilter (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
writerfilter::dmapper::StyleSheetTable Class Reference

#include <StyleSheetTable.hxx>

Inheritance diagram for writerfilter::dmapper::StyleSheetTable:
[legend]
Collaboration diagram for writerfilter::dmapper::StyleSheetTable:
[legend]

Public Member Functions

 StyleSheetTable (DomainMapper &rDMapper, css::uno::Reference< css::text::XTextDocument > const &xTextDocument, bool bIsNewDoc)
 
virtual ~StyleSheetTable () override
 
void ReApplyInheritedOutlineLevelFromChapterNumbering ()
 
void ApplyNumberingStyleNameToParaStyles ()
 
void ApplyStyleSheets (const FontTablePtr &rFontTable)
 
StyleSheetEntryPtr FindStyleSheetByISTD (const OUString &sIndex)
 
StyleSheetEntryPtr FindStyleSheetByConvertedStyleName (std::u16string_view rIndex)
 
StyleSheetEntryPtr FindDefaultParaStyle ()
 
OUString ConvertStyleName (const OUString &rWWName, bool bExtendedSearch=false)
 
OUString CloneTOCStyle (FontTablePtr const &rFontTable, StyleSheetEntryPtr const pStyle, OUString const &rName)
 
void ApplyClonedTOCStyles ()
 Replace the applied en-US Word built-in styles that were referenced from TOC fields (also STYLEREF and likely AUTOTEXTLIST) with the localised clones. More...
 
OUString getOrCreateCharStyle (PropertyValueVector_t &rCharProperties, bool bAlwaysCreate)
 
void SetDefaultParaProps (PropertyIds eId, const css::uno::Any &rAny)
 
PropertyMapPtr const & GetDefaultParaProps () const
 
PropertyMapPtr const & GetDefaultCharProps () const
 Returns the default character properties. More...
 
const StyleSheetEntryPtrGetCurrentEntry () const
 
- Public Member Functions inherited from writerfilter::LoggedProperties
 LoggedProperties (const std::string &sPrefix)
 
virtual ~LoggedProperties () override
 
void attribute (Id name, Value &val) override
 Receives an attribute. More...
 
void sprm (Sprm &sprm) override
 Receives a SPRM. More...
 
virtual void attribute (Id name, Value &val)=0
 Receives an attribute. More...
 
virtual void sprm (Sprm &sprm)=0
 Receives a SPRM. More...
 
- Public Member Functions inherited from SvRefBase
 SvRefBase ()
 
 SvRefBase (const SvRefBase &)
 
SvRefBaseoperator= (const SvRefBase &)
 
void RestoreNoDelete ()
 
void AddNextRef ()
 
void AddFirstRef ()
 
void ReleaseRef ()
 
unsigned int GetRefCount () const
 
- Public Member Functions inherited from writerfilter::LoggedTable
 LoggedTable (const std::string &sPrefix)
 
virtual ~LoggedTable () override
 
void entry (int pos, writerfilter::Reference< Properties >::Pointer_t ref) override
 Receives an entry of the table. More...
 
virtual void entry (int pos, writerfilter::Reference< Properties >::Pointer_t ref)=0
 Receives an entry of the table. More...
 

Private Member Functions

virtual void lcl_attribute (Id Name, Value &val) override
 
virtual void lcl_sprm (Sprm &sprm) override
 
virtual void lcl_entry (writerfilter::Reference< Properties >::Pointer_t ref) override
 
void applyDefaults (bool bParaProperties)
 
void ApplyStyleSheetsImpl (const FontTablePtr &rFontTable, std::vector< StyleSheetEntryPtr > const &rEntries)
 

Private Attributes

std::unique_ptr< StyleSheetTable_Implm_pImpl
 

Additional Inherited Members

- Public Types inherited from writerfilter::Table
typedef tools::SvRef< TablePointer_t
 
virtual void lcl_attribute (Id name, Value &val)=0
 
virtual void lcl_sprm (Sprm &sprm)=0
 
- Protected Member Functions inherited from writerfilter::Properties
 ~Properties () override
 
- Protected Member Functions inherited from SvRefBase
virtual ~SvRefBase () COVERITY_NOEXCEPT_FALSE
 
virtual void lcl_entry (writerfilter::Reference< Properties >::Pointer_t ref)=0
 
- Protected Member Functions inherited from writerfilter::Table
 ~Table () override
 

Detailed Description

Definition at line 84 of file StyleSheetTable.hxx.

Constructor & Destructor Documentation

◆ StyleSheetTable()

writerfilter::dmapper::StyleSheetTable::StyleSheetTable ( DomainMapper rDMapper,
css::uno::Reference< css::text::XTextDocument > const &  xTextDocument,
bool  bIsNewDoc 
)

Definition at line 385 of file StyleSheetTable.cxx.

References m_pImpl.

◆ ~StyleSheetTable()

writerfilter::dmapper::StyleSheetTable::~StyleSheetTable ( )
overridevirtual

Definition at line 395 of file StyleSheetTable.cxx.

Member Function Documentation

◆ ApplyClonedTOCStyles()

void writerfilter::dmapper::StyleSheetTable::ApplyClonedTOCStyles ( )

Replace the applied en-US Word built-in styles that were referenced from TOC fields (also STYLEREF and likely AUTOTEXTLIST) with the localised clones.

With the style cloned, and the clone referenced, the ToX should work in Writer and also, when exported to DOCX, in Word.

Definition at line 1052 of file StyleSheetTable.cxx.

References m_pImpl, SAL_INFO, and xFrame.

◆ applyDefaults()

void writerfilter::dmapper::StyleSheetTable::applyDefaults ( bool  bParaProperties)
private

◆ ApplyNumberingStyleNameToParaStyles()

void writerfilter::dmapper::StyleSheetTable::ApplyNumberingStyleNameToParaStyles ( )

◆ ApplyStyleSheets()

void writerfilter::dmapper::StyleSheetTable::ApplyStyleSheets ( const FontTablePtr rFontTable)

Definition at line 1090 of file StyleSheetTable.cxx.

References ApplyStyleSheetsImpl(), and m_pImpl.

◆ ApplyStyleSheetsImpl()

void writerfilter::dmapper::StyleSheetTable::ApplyStyleSheetsImpl ( const FontTablePtr rFontTable,
std::vector< StyleSheetEntryPtr > const &  rEntries 
)
private

Definition at line 1095 of file StyleSheetTable.cxx.

References comphelper::containerToSequence(), ConvertStyleName(), DBG_UNHANDLED_EXCEPTION, FindStyleSheetByISTD(), writerfilter::dmapper::StyleSheetEntry::GetInteropGrabBag(), writerfilter::dmapper::ParagraphProperties::GetListId(), writerfilter::dmapper::StyleSheetPropertyMap::GetOutlineLevel(), writerfilter::dmapper::getPropertyName(), i, m_pImpl, writerfilter::dmapper::StyleSheetEntry::m_pProperties, comphelper::makePropertyValue(), writerfilter::dmapper::PROP_CHAR_FONT_NAME, writerfilter::dmapper::PROP_CHAR_FONT_NAME_ASIAN, writerfilter::dmapper::PROP_CHAR_FONT_NAME_COMPLEX, writerfilter::dmapper::PROP_CHAR_HEIGHT, writerfilter::dmapper::PROP_CHAR_HEIGHT_ASIAN, writerfilter::dmapper::PROP_CHAR_HEIGHT_COMPLEX, writerfilter::dmapper::PROP_CHAR_POSTURE, writerfilter::dmapper::PROP_CHAR_POSTURE_ASIAN, writerfilter::dmapper::PROP_CHAR_POSTURE_COMPLEX, writerfilter::dmapper::PROP_CHAR_PROP_HEIGHT, writerfilter::dmapper::PROP_CHAR_PROP_HEIGHT_ASIAN, writerfilter::dmapper::PROP_CHAR_PROP_HEIGHT_COMPLEX, writerfilter::dmapper::PROP_CHAR_WEIGHT, writerfilter::dmapper::PROP_CHAR_WEIGHT_ASIAN, writerfilter::dmapper::PROP_CHAR_WEIGHT_COMPLEX, writerfilter::dmapper::PROP_CHARACTER_STYLES, writerfilter::dmapper::PROP_OUTLINE_LEVEL, writerfilter::dmapper::PROP_PARA_BOTTOM_MARGIN, writerfilter::dmapper::PROP_PARA_LEFT_MARGIN, writerfilter::dmapper::PROP_PARAGRAPH_STYLES, writerfilter::dmapper::PROP_SERVICE_CHAR_STYLE, writerfilter::dmapper::PROP_SERVICE_PARA_STYLE, writerfilter::dmapper::ParagraphPropertiesPropertyMap::props(), SAL_WARN, writerfilter::dmapper::StyleSheetTable_Impl::SetPropertiesToDefault(), writerfilter::dmapper::STYLE_TYPE_CHAR, writerfilter::dmapper::STYLE_TYPE_LIST, writerfilter::dmapper::STYLE_TYPE_PARA, writerfilter::dmapper::STYLE_TYPE_TABLE, writerfilter::dmapper::STYLE_TYPE_UNKNOWN, TOOLS_WARN_EXCEPTION, and WW_OUTLINE_MAX.

Referenced by ApplyStyleSheets(), and CloneTOCStyle().

◆ CloneTOCStyle()

OUString writerfilter::dmapper::StyleSheetTable::CloneTOCStyle ( FontTablePtr const &  rFontTable,
StyleSheetEntryPtr const  pStyle,
OUString const &  rName 
)

Definition at line 1075 of file StyleSheetTable.cxx.

References ApplyStyleSheetsImpl(), ConvertStyleName(), m_pImpl, and styles.

◆ ConvertStyleName()

OUString writerfilter::dmapper::StyleSheetTable::ConvertStyleName ( const OUString &  rWWName,
bool  bExtendedSearch = false 
)

◆ FindDefaultParaStyle()

StyleSheetEntryPtr writerfilter::dmapper::StyleSheetTable::FindDefaultParaStyle ( )

Definition at line 1505 of file StyleSheetTable.cxx.

References FindStyleSheetByISTD(), and m_pImpl.

◆ FindStyleSheetByConvertedStyleName()

StyleSheetEntryPtr writerfilter::dmapper::StyleSheetTable::FindStyleSheetByConvertedStyleName ( std::u16string_view  rIndex)

Definition at line 1490 of file StyleSheetTable.cxx.

References m_pImpl.

◆ FindStyleSheetByISTD()

StyleSheetEntryPtr writerfilter::dmapper::StyleSheetTable::FindStyleSheetByISTD ( const OUString &  sIndex)

◆ GetCurrentEntry()

const StyleSheetEntryPtr & writerfilter::dmapper::StyleSheetTable::GetCurrentEntry ( ) const

Definition at line 1510 of file StyleSheetTable.cxx.

References m_pImpl.

◆ GetDefaultCharProps()

PropertyMapPtr const & writerfilter::dmapper::StyleSheetTable::GetDefaultCharProps ( ) const

Returns the default character properties.

Definition at line 409 of file StyleSheetTable.cxx.

References m_pImpl.

◆ GetDefaultParaProps()

PropertyMapPtr const & writerfilter::dmapper::StyleSheetTable::GetDefaultParaProps ( ) const

Definition at line 404 of file StyleSheetTable.cxx.

References m_pImpl.

◆ getOrCreateCharStyle()

OUString writerfilter::dmapper::StyleSheetTable::getOrCreateCharStyle ( PropertyValueVector_t rCharProperties,
bool  bAlwaysCreate 
)

◆ lcl_attribute()

void writerfilter::dmapper::StyleSheetTable::lcl_attribute ( Id  Name,
Value val 
)
overrideprivatevirtual

◆ lcl_entry()

void writerfilter::dmapper::StyleSheetTable::lcl_entry ( writerfilter::Reference< Properties >::Pointer_t  ref)
overrideprivatevirtual

◆ lcl_sprm()

void writerfilter::dmapper::StyleSheetTable::lcl_sprm ( Sprm sprm)
overrideprivatevirtual

◆ ReApplyInheritedOutlineLevelFromChapterNumbering()

void writerfilter::dmapper::StyleSheetTable::ReApplyInheritedOutlineLevelFromChapterNumbering ( )

◆ SetDefaultParaProps()

void writerfilter::dmapper::StyleSheetTable::SetDefaultParaProps ( PropertyIds  eId,
const css::uno::Any &  rAny 
)

Definition at line 399 of file StyleSheetTable.cxx.

References m_pImpl, and writerfilter::dmapper::NO_GRAB_BAG.

Referenced by applyDefaults(), and lcl_sprm().

Member Data Documentation

◆ m_pImpl

std::unique_ptr<StyleSheetTable_Impl> writerfilter::dmapper::StyleSheetTable::m_pImpl
private

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