20#ifndef INCLUDED_SDEXT_SOURCE_PDFIMPORT_TREE_STYLE_HXX
21#define INCLUDED_SDEXT_SOURCE_PDFIMPORT_TREE_STYLE_HXX
26#include <unordered_map>
28#include <rtl/ustring.hxx>
29#include <rtl/string.hxx>
71 [](
const size_t& sum,
const PropertyMap::value_type& rEntry) {
72 return sum ^ size_t(rEntry.first.hashCode()) ^ size_t(rEntry.second.hashCode());
118 const std::unordered_map< sal_Int32, RefCountedHashedStyle >*
m_pMap;
120 explicit StyleIdNameSort(
const std::unordered_map< sal_Int32, RefCountedHashedStyle >* pMap ) :
125 const std::unordered_map< sal_Int32, RefCountedHashedStyle >::const_iterator left_it =
127 const std::unordered_map< sal_Int32, RefCountedHashedStyle >::const_iterator right_it =
129 if( left_it ==
m_pMap->end() )
131 else if( right_it ==
m_pMap->end() )
134 return left_it->second.style.Name < right_it->second.style.Name;
void emit(EmitContext &rContext, ElementTreeVisitor &rContainedElemVisitor)
friend struct StyleIdNameSort
sal_Int32 setProperties(sal_Int32 nStyleId, PropertyMap &&rNewProps)
OUString getStyleName(sal_Int32 nStyle) const
sal_Int32 impl_getStyleId(const Style &rStyle, bool bSubStyle)
const PropertyMap * getProperties(sal_Int32 nStyleId) const
sal_Int32 getStandardStyleId(std::string_view rFamily)
std::unordered_map< HashedStyle, sal_Int32, StyleHash > m_aStyleToId
std::unordered_map< sal_Int32, RefCountedHashedStyle > m_aIdToStyle
void impl_emitStyle(sal_Int32 nStyleId, EmitContext &rContext, ElementTreeVisitor &rContainedElemVisitor)
sal_Int32 getStyleId(const Style &rStyle)
std::unordered_map< OUString, OUString > PropertyMap
std::unordered_map< OUString, uno::WeakReference< ucb::XContent > > Contents
To be visited by all tree element types.
Element * ContainedElement
bool operator==(const HashedStyle &rRight) const
std::vector< sal_Int32 > SubStyles
size_t operator()(const StyleContainer::HashedStyle &rStyle) const
StyleIdNameSort(const std::unordered_map< sal_Int32, RefCountedHashedStyle > *pMap)
bool operator()(sal_Int32 nLeft, sal_Int32 nRight)
const std::unordered_map< sal_Int32, RefCountedHashedStyle > * m_pMap
Style(const OString &rName, PropertyMap &&rProps)
std::vector< Style * > SubStyles
Element * ContainedElement