21#include <oox/token/tokens.hxx>
23#include <com/sun/star/beans/PropertyValues.hpp>
24#include <com/sun/star/beans/XPropertySet.hpp>
25#include <com/sun/star/drawing/XDrawPage.hpp>
40template<
typename Type >
41const Type* lclGetStyleElement(
const RefVector< Type >& rVector, sal_Int32 nIndex )
43 return (rVector.empty() || (nIndex < 1)) ? nullptr :
44 rVector.get( ::std::min(
static_cast< sal_Int32
>( nIndex - 1 ),
static_cast< sal_Int32
>( rVector.size() - 1 ) ) ).get();
78 if( (rName.size() == 6) && (rName[ 0 ] ==
'+') && (rName[ 3 ] ==
'-') )
80 if( (rName[ 1 ] ==
'm') && (rName[ 2 ] ==
'j') )
82 else if( (rName[ 1 ] ==
'm') && (rName[ 2 ] ==
'n') )
86 if( (rName[ 4 ] ==
'l') && (rName[ 5 ] ==
't') )
88 if( (rName[ 4 ] ==
'e') && (rName[ 5 ] ==
'a') )
90 if( (rName[ 4 ] ==
'c') && (rName[ 5 ] ==
's') )
96 if (rName ==
u"majorHAnsi" || rName ==
u"majorAscii" || rName ==
u"majorBidi" || rName ==
u"majorEastAsia")
98 else if (rName ==
u"minorHAnsi" || rName ==
u"minorAscii" || rName ==
u"minorBidi" || rName ==
u"minorEastAsia")
102 if (rName ==
u"majorAscii" || rName ==
u"majorHAnsi" || rName ==
u"minorAscii" || rName ==
u"minorHAnsi")
104 else if (rName ==
u"minorBidi" || rName ==
u"majorBidi")
106 else if (rName ==
u"minorEastAsia" || rName ==
u"majorEastAsia")
112void Theme::addTheme(
const css::uno::Reference<css::drawing::XDrawPage>& xDrawPage)
const
114 SAL_WARN_IF(!xDrawPage.is(),
"oox",
"DrawPage is not set");
118 SAL_WARN_IF(!pPage,
"oox",
"Can't get SdrPage from XDrawPage");
void SetTheme(std::shared_ptr< model::Theme > const &pTheme)
SdrPageProperties & getSdrPageProperties()
mapped_type get(key_type nKey) const
Returns a reference to the object associated to the passed key, or an empty reference on error.
const EffectProperties * getEffectStyle(sal_Int32 nIndex) const
EffectStyleList maEffectStyleList
const FillProperties * getFillStyle(sal_Int32 nIndex) const
Returns the fill properties of the passed one-based themed style index.
FillStyleList maBgFillStyleList
const LineProperties * getLineStyle(sal_Int32 nIndex) const
Returns the line properties of the passed one-based themed style index.
std::shared_ptr< model::Theme > const & getTheme() const
void addTheme(const css::uno::Reference< css::drawing::XDrawPage > &xDrawPage) const
const TextCharacterProperties * getFontStyle(sal_Int32 nSchemeType) const
Returns theme font properties by scheme type (major/minor).
LineStyleList maLineStyleList
FillStyleList maFillStyleList
const TextFont * resolveFont(std::u16string_view rName) const
Returns theme font by placeholder name, e.g.
#define SAL_WARN_IF(condition, area, stream)
SVXCORE_DLLPUBLIC SdrPage * GetSdrPageFromXDrawPage(const css::uno::Reference< css::drawing::XDrawPage > &xDrawPage) noexcept