23#include <com/sun/star/beans/XPropertySet.hpp>
34 const uno::Reference<xml::sax::XFastAttributeList>& xAttrList,
35 css::uno::Reference<css::drawing::XDrawPage>
const& xPage)
41 switch (rAttribute.getToken())
45 OUString
aName = rAttribute.toString();
55 uno::Reference<beans::XPropertySet> xPropertySet(
m_xPage, uno::UNO_QUERY);
57 xPropertySet->setPropertyValue(
"Theme",
uno::Any(xTheme));
61 sal_Int32 nElement,
const uno::Reference<xml::sax::XFastAttributeList>& xAttribs)
72 SvXMLImport& rImport,
const uno::Reference<xml::sax::XFastAttributeList>& xAttrList,
79 switch (rAttribute.getToken())
83 OUString
aName = rAttribute.toString();
98 sal_Int32 nElement,
const uno::Reference<xml::sax::XFastAttributeList>& xAttribs)
110 const uno::Reference<xml::sax::XFastAttributeList>& xAttrList,
111 std::unique_ptr<model::ColorSet>& rpColorSet)
119 switch (rAttribute.getToken())
123 aName = rAttribute.toString();
134 if (!
aName.isEmpty())
145 else if (
aName ==
u"accent1")
147 else if (
aName ==
u"accent2")
149 else if (
aName ==
u"accent3")
151 else if (
aName ==
u"accent4")
153 else if (
aName ==
u"accent5")
155 else if (
aName ==
u"accent6")
157 else if (
aName ==
u"hlink")
159 else if (
aName ==
u"folHlink")
164 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::unique_ptr< model::ColorSet > &rpColorSet)
Imports the color table of a theme.
std::unique_ptr< model::ColorSet > mpColorSet
css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, css::uno::Reference< css::xml::sax::XFastAttributeList > const &xAttribs) override
XMLColorTableContext(SvXMLImport &rImport, css::uno::Reference< css::xml::sax::XFastAttributeList > const &xAttrList, model::Theme &mrTheme)
XMLThemeContext(SvXMLImport &rImport, css::uno::Reference< css::xml::sax::XFastAttributeList > const &xAttrList, css::uno::Reference< css::drawing::XDrawPage > const &xPage)
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::unique_ptr< ColorSet > pColorSet)
void SetName(const OUString &rName)
static bool convertColor(sal_Int32 &rColor, std::u16string_view rValue)
FastAttributeList & castToFastAttributeList(const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList)
Handling of tokens in XML:
#define XML_ELEMENT(prefix, name)