23#include <com/sun/star/beans/XPropertySet.hpp>
35 const uno::Reference<xml::sax::XFastAttributeList>& xAttrList,
36 css::uno::Reference<css::drawing::XDrawPage>
const& xPage)
43 switch (rAttribute.getToken())
47 OUString
aName = rAttribute.toString();
59 uno::Reference<beans::XPropertySet> xPropertySet(
m_xPage, uno::UNO_QUERY);
61 xPropertySet->setPropertyValue(
"Theme",
uno::Any(xTheme));
66 sal_Int32 nElement,
const uno::Reference<xml::sax::XFastAttributeList>& xAttribs)
77 SvXMLImport& rImport,
const uno::Reference<xml::sax::XFastAttributeList>& xAttrList,
84 switch (rAttribute.getToken())
88 OUString
aName = rAttribute.toString();
102uno::Reference<xml::sax::XFastContextHandler>
104 sal_Int32 nElement,
const uno::Reference<xml::sax::XFastAttributeList>& xAttribs)
116 const uno::Reference<xml::sax::XFastAttributeList>& xAttrList,
117 std::shared_ptr<model::ColorSet>& rpColorSet)
125 switch (rAttribute.getToken())
129 aName = rAttribute.toString();
140 if (!
aName.isEmpty())
145 else if (
aName ==
u"light1")
147 else if (
aName ==
u"dark2")
149 else if (
aName ==
u"light2")
151 else if (
aName ==
u"accent1")
153 else if (
aName ==
u"accent2")
155 else if (
aName ==
u"accent3")
157 else if (
aName ==
u"accent4")
159 else if (
aName ==
u"accent5")
161 else if (
aName ==
u"accent6")
163 else if (
aName ==
u"hyperlink")
165 else if (
aName ==
u"followed-hyperlink")
170 rpColorSet->add(
eType, aColor);
This class deliberately does not support XWeak, to improve performance when loading large documents.
SvXMLImport & GetImport()
Imports a color for a color table.
XMLColorContext(SvXMLImport &rImport, css::uno::Reference< css::xml::sax::XFastAttributeList > const &xAttrList, std::shared_ptr< model::ColorSet > &rpColorSet)
Imports the theme colors of a theme.
XMLThemeColorsContext(SvXMLImport &rImport, css::uno::Reference< css::xml::sax::XFastAttributeList > const &xAttrList, model::Theme &mrTheme)
std::shared_ptr< model::ColorSet > m_pColorSet
css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, css::uno::Reference< css::xml::sax::XFastAttributeList > const &xAttribs) override
XMLThemeContext(SvXMLImport &rImport, css::uno::Reference< css::xml::sax::XFastAttributeList > const &xAttrList, css::uno::Reference< css::drawing::XDrawPage > const &xPage)
std::shared_ptr< model::Theme > mpTheme
css::uno::Reference< css::drawing::XDrawPage > m_xPage
css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttribs) override
void setColorSet(std::shared_ptr< model::ColorSet > const &pColorSet)
static bool convertColor(sal_Int32 &rColor, std::u16string_view rValue)
uno::Reference< util::XTheme > createXTheme(std::shared_ptr< model::Theme > const &pTheme)
FastAttributeList & castToFastAttributeList(const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList)
Handling of tokens in XML:
#define XML_ELEMENT(prefix, name)