29#include <com/sun/star/awt/FontRelief.hpp>
30#include <com/sun/star/awt/FontEmphasisMark.hpp>
31#include <com/sun/star/beans/PropertyAttribute.hpp>
47 Any lcl_extractFontDescriptorAggregate( sal_Int32 _nHandle,
const FontDescriptor& _rFont )
53 aValue <<= _rFont.Name;
57 aValue <<= _rFont.StyleName;
61 aValue <<= _rFont.Family;
65 aValue <<= _rFont.CharSet;
69 aValue <<= _rFont.CharacterWidth;
73 aValue <<= _rFont.Kerning;
77 aValue <<= _rFont.Orientation;
81 aValue <<= _rFont.Pitch;
85 aValue <<= _rFont.Type;
89 aValue <<= _rFont.Width;
93 aValue <<= static_cast<float>( _rFont.Height );
97 aValue <<= _rFont.Weight;
101 aValue <<= _rFont.Slant;
105 aValue <<= _rFont.Underline;
109 aValue <<= _rFont.Strikeout;
113 aValue <<= _rFont.WordLineMode;
117 OSL_FAIL(
"lcl_extractFontDescriptorAggregate: invalid handle!" );
127 ,m_bToolkitCompatibleDefaults( _bToolkitCompatibleDefaults )
193 sal_Int32
nPos = _rProps.getLength();
194 _rProps.realloc(
nPos + 21 );
195 Property* pProperties = _rProps.getArray();
205 css::beans::PropertyAttribute::MAYBEDEFAULT);
220 css::beans::PropertyAttribute::MAYBEDEFAULT);
249 _rValue = lcl_extractFontDescriptorAggregate( _nHandle,
m_aFont );
256 sal_Int32 _nHandle,
const Any& _rValue )
258 bool bModified =
false;
349 OSL_FAIL(
"FontControlModel::convertFastPropertyValue: no font aggregate!" );
356 FontDescriptor & rFont,
357 sal_Int32 nHandle,
const Any& rValue)
362 rValue >>= rFont.Name;
366 rValue >>= rFont.StyleName;
370 rValue >>= rFont.Family;
374 rValue >>= rFont.CharSet;
378 rValue >>= rFont.CharacterWidth;
382 rValue >>= rFont.Kerning;
386 rValue >>= rFont.Orientation;
390 rValue >>= rFont.Pitch;
394 rValue >>= rFont.Type;
398 rValue >>= rFont.Width;
405 rFont.Height =
static_cast<sal_Int16
>(nHeight);
410 rValue >>= rFont.Weight;
414 rValue >>= rFont.Slant;
418 rValue >>= rFont.Underline;
422 rValue >>= rFont.Strikeout;
427 bool bWordLineMode =
false;
428 rValue >>= bWordLineMode;
429 rFont.WordLineMode = bWordLineMode;
441 sal_Int32 nHandle,
const Any& rValue)
446 FontDescriptor font(
getFont());
497 bool bHandled =
false;
507 aReturn <<= css::awt::FontEmphasisMark::NONE;
512 aReturn <<= css::awt::FontRelief::NONE;
523 return Any( FontDescriptor(aEmpty) );
524 return lcl_extractFontDescriptorAggregate( _nHandle, aEmpty );
530 aReturn <<= ::comphelper::getDefaultFont();
539 aReturn <<= OUString();
547 aReturn <<= sal_Int16(1);
557 aReturn <<= sal_Int16(0);
564 aReturn <<= float(0);
568 OSL_FAIL(
"FontControlModel::getPropertyDefaultByHandle: invalid property!" );
static bool isFontAggregateProperty(sal_Int32 _nPropertyHandle)
const css::awt::FontDescriptor & getFont() const
FontControlModel(bool _bToolkitCompatibleDefaults)
sal_Int16 m_nFontEmphasis
Color getTextColor() const
static void describeFontRelatedProperties(css::uno::Sequence< css::beans::Property > &_rProps)
appends (!) the description of all font related properties to the given sequence
bool convertFastPropertyValue(css::uno::Any &_rConvertedValue, css::uno::Any &_rOldValue, sal_Int32 _nHandle, const css::uno::Any &_rValue)
static bool isFontRelatedProperty(sal_Int32 _nPropertyHandle)
Color getTextLineColor() const
void setFastPropertyValue_NoBroadcast_impl(::cppu::OPropertySetHelper &rBase, void(::cppu::OPropertySetHelper::*pSet)(sal_Int32, css::uno::Any const &), sal_Int32 nHandle, const css::uno::Any &rValue)
void getFastPropertyValue(css::uno::Any &_rValue, sal_Int32 _nHandle) const
css::uno::Any getPropertyDefaultByHandle(sal_Int32 _nHandle) const
css::uno::Any m_aTextColor
css::uno::Any m_aTextLineColor
css::awt::FontDescriptor m_aFont
bool m_bToolkitCompatibleDefaults
constexpr ::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
constexpr OUStringLiteral PROPERTY_FONT_PITCH
constexpr OUStringLiteral PROPERTY_FONT_FAMILY
constexpr OUStringLiteral PROPERTY_FONT_ORIENTATION
constexpr OUStringLiteral PROPERTY_FONT_SLANT
constexpr OUStringLiteral PROPERTY_FONT_CHARWIDTH
constexpr OUStringLiteral PROPERTY_FONT_WEIGHT
constexpr OUStringLiteral PROPERTY_FONT_HEIGHT
constexpr OUStringLiteral PROPERTY_FONTRELIEF
constexpr OUStringLiteral PROPERTY_FONT_UNDERLINE
constexpr OUStringLiteral PROPERTY_FONT_STRIKEOUT
constexpr OUStringLiteral PROPERTY_FONT_WORDLINEMODE
constexpr OUStringLiteral PROPERTY_FONT_KERNING
constexpr OUStringLiteral PROPERTY_FONTEMPHASISMARK
constexpr OUStringLiteral PROPERTY_TEXTCOLOR
constexpr OUStringLiteral PROPERTY_FONT_CHARSET
constexpr OUStringLiteral PROPERTY_FONT
constexpr OUStringLiteral PROPERTY_FONT_TYPE
constexpr OUStringLiteral PROPERTY_FONT_STYLENAME
constexpr OUStringLiteral PROPERTY_TEXTLINECOLOR
constexpr OUStringLiteral PROPERTY_FONT_NAME
constexpr OUStringLiteral PROPERTY_FONT_WIDTH
#define SAL_WARN(area, stream)
bool tryPropertyValue(Any &_rConvertedValue, Any &_rOldValue, const Any &_rValueToSet, const Any &_rCurrentValue, const Type &_rExpectedType)
std::enable_if< std::is_enum< ENUMTYPE >::value, bool >::type tryPropertyValueEnum(css::uno::Any &_rConvertedValue, css::uno::Any &_rOldValue, const css::uno::Any &_rValueToSet, const ENUMTYPE &_rCurrentValue)
ListBox is a bit confusing / different from other form components, so here are a few notes:
static void setFastPropertyValue_NoBroadcast_implimpl(FontDescriptor &rFont, sal_Int32 nHandle, const Any &rValue)
#define PROPERTY_ID_FONT_UNDERLINE
#define PROPERTY_ID_FONT_SLANT
#define PROPERTY_ID_FONTEMPHASISMARK
#define PROPERTY_ID_FONT_HEIGHT
#define PROPERTY_ID_FONTRELIEF
#define PROPERTY_ID_FONT_CHARWIDTH
#define PROPERTY_ID_FONT_WEIGHT
#define PROPERTY_ID_FONT_WIDTH
#define PROPERTY_ID_FONT_KERNING
#define PROPERTY_ID_FONT_NAME
#define PROPERTY_ID_FONT_STRIKEOUT
#define PROPERTY_ID_FONT_WORDLINEMODE
#define PROPERTY_ID_FONT_CHARSET
#define PROPERTY_ID_TEXTLINECOLOR
#define PROPERTY_ID_TEXTCOLOR
#define PROPERTY_ID_FONT_TYPE
#define PROPERTY_ID_FONT_FAMILY
#define PROPERTY_ID_FONT_STYLENAME
#define PROPERTY_ID_FONT_PITCH
#define PROPERTY_ID_FONT_ORIENTATION