21#include <com/sun/star/awt/FontFamily.hpp>
22#include <com/sun/star/awt/FontPitch.hpp>
26#include <oox/token/tokens.hxx>
29using ::oox::core::XmlFilterBase;
35sal_Int16 lclGetFontPitch( sal_Int32 nOoxValue )
37 using namespace ::com::sun::star::awt::FontPitch;
38 static const sal_Int16 spnFontPitch[] = {
DONTKNOW,
FIXED, VARIABLE };
42sal_Int16 lclGetFontFamily( sal_Int32 nOoxValue )
44 using namespace ::com::sun::star::awt::FontFamily;
45 static const sal_Int16 spnFontFamily[] = {
DONTKNOW, ROMAN, SWISS, MODERN,
SCRIPT, DECORATIVE };
83 return pFont->implGetFontData( rFontName, rnFontPitch, rnFontFamily );
91 return !rFontName.isEmpty();
104 rnFontPitch = lclGetFontPitch(extractValue<sal_Int16>(nOoxPitchFamily, 0, 4));
105 rnFontFamily = lclGetFontFamily(extractValue<sal_Int16>(nOoxPitchFamily, 4, 4));
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...
std::optional< sal_Int32 > getInteger(sal_Int32 nAttrToken) const
Returns the 32-bit signed integer value of the specified attribute (decimal).
virtual const ::oox::drawingml::Theme * getCurrentTheme() const =0
Has to be implemented by each filter, returns the current theme.
bool implGetFontData(OUString &rFontName, sal_Int16 &rnFontPitch, sal_Int16 &rnFontFamily) const
void assignIfUsed(const TextFont &rTextFont)
Overwrites this text font with the passed text font, if it is used.
void setAttributes(const AttributeList &rAttribs)
Sets attributes from the passed attribute list.
static void resolvePitch(sal_Int32 nOoxPitch, sal_Int16 &rnFontPitch, sal_Int16 &rnFontFamily)
void fillThemeFont(model::ThemeFont &rThemeFont) const
bool getFontData(OUString &rFontName, sal_Int16 &rnFontPitch, sal_Int16 &rnFontFamily, const ::oox::core::XmlFilterBase &rFilter) const
Returns the font name, pitch, and family; tries to resolve theme placeholder names,...
#define STATIC_ARRAY_SELECT(array, index, def)
Expands to the 'index'-th element of a STATIC data array, or to 'def', if 'index' is out of the array...
const sal_uInt8 WINDOWS_CHARSET_ANSI
const sal_uInt8 WINDOWS_CHARSET_DEFAULT