31#include <oox/token/namespaces.hxx>
32#include <oox/token/tokens.hxx>
42class FillStyleListContext :
public ContextHandler2
45 FillStyleListContext( ContextHandler2Helper
const & rParent,
FillStyleList& rFillStyleList );
46 virtual ContextHandlerRef onCreateContext( sal_Int32 nElement,
const AttributeList& rAttribs )
override;
54FillStyleListContext::FillStyleListContext( ContextHandler2Helper
const & rParent,
FillStyleList& rFillStyleList ) :
55 ContextHandler2( rParent ),
60ContextHandlerRef FillStyleListContext::onCreateContext( sal_Int32 nElement,
const AttributeList& rAttribs )
64 case A_TOKEN( noFill ):
65 case A_TOKEN( solidFill ):
66 case A_TOKEN( gradFill ):
67 case A_TOKEN( blipFill ):
68 case A_TOKEN( pattFill ):
69 case A_TOKEN( grpFill ):
71 return FillPropertiesContext::createFillContext( *
this, nElement, rAttribs, *
mrFillStyleList.back() );
78class LineStyleListContext :
public ContextHandler2
81 LineStyleListContext( ContextHandler2Helper
const & rParent,
LineStyleList& rLineStyleList );
82 virtual ContextHandlerRef onCreateContext( sal_Int32 nElement,
const AttributeList& rAttribs )
override;
90LineStyleListContext::LineStyleListContext( ContextHandler2Helper
const & rParent,
LineStyleList& rLineStyleList ) :
91 ContextHandler2( rParent ),
96ContextHandlerRef LineStyleListContext::onCreateContext( sal_Int32 nElement,
const AttributeList& rAttribs )
102 return new LinePropertiesContext( *
this, rAttribs, *
mrLineStyleList.back() );
109class EffectStyleListContext :
public ContextHandler2
112 EffectStyleListContext( ContextHandler2Helper
const & rParent,
EffectStyleList& rEffectStyleList );
113 virtual ContextHandlerRef onCreateContext( sal_Int32 nElement,
const AttributeList& rAttribs )
override;
121EffectStyleListContext::EffectStyleListContext( ContextHandler2Helper
const & rParent,
EffectStyleList& rEffectStyleList ) :
122 ContextHandler2( rParent ),
127ContextHandlerRef EffectStyleListContext::onCreateContext( sal_Int32 nElement,
const AttributeList& )
131 case A_TOKEN( effectStyle ):
135 case A_TOKEN( effectLst ):
145class FontSchemeContext :
public ContextHandler2
148 FontSchemeContext(ContextHandler2Helper
const & rParent,
FontScheme& rFontScheme,
149 std::map<sal_Int32, std::vector<std::pair<OUString, OUString>>>& rSupplementalFontMap);
150 virtual ContextHandlerRef onCreateContext( sal_Int32 nElement,
const AttributeList& rAttribs )
override;
151 virtual void onEndElement()
override;
162FontSchemeContext::FontSchemeContext(ContextHandler2Helper
const & rParent,
FontScheme& rFontScheme,
163 std::map<sal_Int32, std::vector<std::pair<OUString, OUString>>>& rSupplementalFontMap)
164 : ContextHandler2(rParent)
170ContextHandlerRef FontSchemeContext::onCreateContext( sal_Int32 nElement,
const AttributeList& rAttribs )
174 case A_TOKEN( majorFont ):
179 case A_TOKEN( minorFont ):
184 case A_TOKEN( latin ):
186 mxCharProps->maLatinFont.setAttributes( rAttribs );
190 mxCharProps->maAsianFont.setAttributes( rAttribs );
194 mxCharProps->maComplexFont.setAttributes( rAttribs );
197 OUString aScript = rAttribs.getStringDefaulted(XML_script);
198 OUString aTypeface = rAttribs.getStringDefaulted(XML_typeface);
205void FontSchemeContext::onEndElement()
207 switch( getCurrentElement() )
209 case A_TOKEN( majorFont ):
210 case A_TOKEN( minorFont ):
216ThemeElementsContext::ThemeElementsContext( ContextHandler2Helper
const & rParent,
Theme& rTheme ) :
227 case A_TOKEN( clrScheme ):
233 case A_TOKEN( fontScheme ):
240 case A_TOKEN( fmtScheme ):
247 case A_TOKEN( fillStyleLst ):
249 case A_TOKEN( lnStyleLst ):
251 case A_TOKEN( effectStyleLst ):
253 case A_TOKEN( bgFillStyleLst ):
Provides access to attribute values of an element.
OUString getStringDefaulted(sal_Int32 nAttrToken) const
Returns the string value of the specified attribute, returns an empty string if attribute not present...
bool hasAttribute(sal_Int32 nAttrToken) const
Returns true, if the specified attribute is present.
void SetName(const OUString &rName)
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const ::oox::AttributeList &rAttribs) override
void setFormatSchemeName(OUString const &rName)
std::map< sal_Int32, std::vector< std::pair< OUString, OUString > > > & getSupplementalFontMap()
FillStyleList & getFillStyleList()
LineStyleList & getLineStyleList()
EffectStyleList & getEffectStyleList()
ClrScheme & getClrScheme()
FillStyleList & getBgFillStyleList()
FontScheme & getFontScheme()
void setFontSchemeName(OUString const &rName)
if(aStr !=aBuf) UpdateName_Impl(m_xFollowLb.get()
std::shared_ptr< T > make_shared(Args &&... args)
::rtl::Reference< ContextHandler > ContextHandlerRef
RefVector< LineProperties > LineStyleList
RefVector< FillProperties > FillStyleList
std::shared_ptr< TextCharacterProperties > TextCharacterPropertiesPtr
RefMap< sal_Int32, TextCharacterProperties > FontScheme
RefVector< EffectProperties > EffectStyleList
std::map< sal_Int32, std::vector< std::pair< OUString, OUString > > > & mrSupplementalFontMap
FillStyleList & mrFillStyleList
EffectStyleList & mrEffectStyleList
LineStyleList & mrLineStyleList
FontScheme & mrFontScheme
TextCharacterPropertiesPtr mxCharProps