1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
27 #ifndef CHART_CHARACTERPROPERTIES_HXX
28 #define CHART_CHARACTERPROPERTIES_HXX
30 #include "PropertyHelper.hxx"
31 #include "FastPropertyIdRanges.hxx"
32 #include "charttoolsdllapi.hxx"
33 #include <com/sun/star/beans/Property.hpp>
34 #include <com/sun/star/beans/XMultiPropertySet.hpp>
35 #include <com/sun/star/awt/FontDescriptor.hpp>
42 // implements services
43 // com.sun.star.style.CharacterProperties
44 // com.sun.star.style.CharacterPropertiesAsian
45 // com.sun.star.style.CharacterPropertiesComplex
46 class OOO_DLLPUBLIC_CHARTTOOLS CharacterProperties
49 // FastProperty Ids for properties
52 // com.sun.star.style.CharacterProperties
53 PROP_CHAR_FONT_NAME
= FAST_PROPERTY_ID_START_CHAR_PROP
, // ?
54 PROP_CHAR_FONT_STYLE_NAME
,
55 PROP_CHAR_FONT_FAMILY
,
56 PROP_CHAR_FONT_CHAR_SET
,
59 // PROP_CHAR_BACKGROUND_COLOR,
60 //-- PROP_CHAR_BACKGROUND_TRANSPARENCY, alpah channnel in COLOR
62 PROP_CHAR_CHAR_HEIGHT
,
64 PROP_CHAR_UNDERLINE_COLOR
,
65 PROP_CHAR_UNDERLINE_HAS_COLOR
,
68 PROP_CHAR_AUTO_KERNING
,
70 // PROP_CHAR_CASE_MAPPING,
71 // PROP_CHAR_ROTATION,
72 //-- PROP_CHAR_ROTATION_IS_FIT_TO_LINE,
73 // PROP_CHAR_SCALE_WIDTH,
74 PROP_CHAR_ESCAPEMENT_HEIGHT
,
76 // PROP_CHAR_CROSSED_OUT,
81 //-- PROP_CHAR_KEEP_TOGETHER,
82 //-- PROP_CHAR_NO_LINE_BREAK,
86 //-- PROP_CHAR_COMBINE_IS_ON,
87 //-- PROP_CHAR_COMBINE_PREFIX,
88 //-- PROP_CHAR_COMBINE_SUFFIX,
91 // PROP_CHAR_RUBY_TEXT,
92 // PROP_CHAR_RUBY_ADJUST,
93 // PROP_CHAR_RUBY_STYLE_NAME,
94 // PROP_CHAR_RUBY_IS_ABOVE,
95 // PROP_CHAR_INHIBIT_HYPHENATION,
97 // Asian (com.sun.star.style.CharacterPropertiesAsian)
98 PROP_CHAR_ASIAN_FONT_NAME
,
99 PROP_CHAR_ASIAN_FONT_STYLE_NAME
,
100 PROP_CHAR_ASIAN_FONT_FAMILY
,
101 PROP_CHAR_ASIAN_CHAR_SET
,
102 PROP_CHAR_ASIAN_FONT_PITCH
,
103 PROP_CHAR_ASIAN_CHAR_HEIGHT
,
104 PROP_CHAR_ASIAN_WEIGHT
,
105 PROP_CHAR_ASIAN_POSTURE
,
106 PROP_CHAR_ASIAN_LOCALE
,
107 //-- PROP_CHAR_ASIAN_USE_SCRIPT_TYPE_DISTANCE,
108 //-- PROP_CHAR_ASIAN_USE_FORBIDDEN_RULES,
109 //-- PROP_CHAR_ASIAN_HANGING_PUNCTUATION_ALLOWED,
111 // Complex Text Layout (com.sun.star.style.CharacterPropertiesComplex)
112 PROP_CHAR_COMPLEX_FONT_NAME
,
113 PROP_CHAR_COMPLEX_FONT_STYLE_NAME
,
114 PROP_CHAR_COMPLEX_FONT_FAMILY
,
115 PROP_CHAR_COMPLEX_CHAR_SET
,
116 PROP_CHAR_COMPLEX_FONT_PITCH
,
117 PROP_CHAR_COMPLEX_CHAR_HEIGHT
,
118 PROP_CHAR_COMPLEX_WEIGHT
,
119 PROP_CHAR_COMPLEX_POSTURE
,
120 PROP_CHAR_COMPLEX_LOCALE
,
121 PROP_PARA_IS_CHARACTER_DISTANCE
,
126 FAST_PROPERTY_ID_END_CHAR_PROP
129 static void AddPropertiesToVector(
130 ::std::vector
< ::com::sun::star::beans::Property
> & rOutProperties
);
132 static void AddDefaultsToMap( ::chart::tPropertyValueMap
& rOutMap
);
134 static bool IsCharacterPropertyHandle( sal_Int32 nHandle
);
136 static ::com::sun::star::awt::FontDescriptor
createFontDescriptorFromPropertySet(
137 const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XMultiPropertySet
> & xMultiPropSet
);
141 CharacterProperties();
146 // CHART_CHARACTERPROPERTIES_HXX