1*de7b3f82SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*de7b3f82SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*de7b3f82SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*de7b3f82SAndrew Rist  * distributed with this work for additional information
6*de7b3f82SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*de7b3f82SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*de7b3f82SAndrew Rist  * "License"); you may not use this file except in compliance
9*de7b3f82SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*de7b3f82SAndrew Rist  *
11*de7b3f82SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*de7b3f82SAndrew Rist  *
13*de7b3f82SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*de7b3f82SAndrew Rist  * software distributed under the License is distributed on an
15*de7b3f82SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*de7b3f82SAndrew Rist  * KIND, either express or implied.  See the License for the
17*de7b3f82SAndrew Rist  * specific language governing permissions and limitations
18*de7b3f82SAndrew Rist  * under the License.
19*de7b3f82SAndrew Rist  *
20*de7b3f82SAndrew Rist  *************************************************************/
21*de7b3f82SAndrew Rist 
22*de7b3f82SAndrew Rist 
23cdf0e10cSrcweir #ifndef CHART_CHARACTERPROPERTIES_HXX
24cdf0e10cSrcweir #define CHART_CHARACTERPROPERTIES_HXX
25cdf0e10cSrcweir 
26cdf0e10cSrcweir #include "PropertyHelper.hxx"
27cdf0e10cSrcweir #include "FastPropertyIdRanges.hxx"
28cdf0e10cSrcweir #include "charttoolsdllapi.hxx"
29cdf0e10cSrcweir #include <com/sun/star/beans/Property.hpp>
30cdf0e10cSrcweir #include <com/sun/star/beans/XMultiPropertySet.hpp>
31cdf0e10cSrcweir #include <com/sun/star/awt/FontDescriptor.hpp>
32cdf0e10cSrcweir 
33cdf0e10cSrcweir #include <vector>
34cdf0e10cSrcweir 
35cdf0e10cSrcweir namespace chart
36cdf0e10cSrcweir {
37cdf0e10cSrcweir 
38cdf0e10cSrcweir // implements services
39cdf0e10cSrcweir //   com.sun.star.style.CharacterProperties
40cdf0e10cSrcweir //   com.sun.star.style.CharacterPropertiesAsian
41cdf0e10cSrcweir //   com.sun.star.style.CharacterPropertiesComplex
42cdf0e10cSrcweir class OOO_DLLPUBLIC_CHARTTOOLS CharacterProperties
43cdf0e10cSrcweir {
44cdf0e10cSrcweir public:
45cdf0e10cSrcweir     // FastProperty Ids for properties
46cdf0e10cSrcweir     enum
47cdf0e10cSrcweir     {
48cdf0e10cSrcweir         // com.sun.star.style.CharacterProperties
49cdf0e10cSrcweir         PROP_CHAR_FONT_NAME = FAST_PROPERTY_ID_START_CHAR_PROP, // ?
50cdf0e10cSrcweir         PROP_CHAR_FONT_STYLE_NAME,
51cdf0e10cSrcweir         PROP_CHAR_FONT_FAMILY,
52cdf0e10cSrcweir         PROP_CHAR_FONT_CHAR_SET,
53cdf0e10cSrcweir         PROP_CHAR_FONT_PITCH,
54cdf0e10cSrcweir         PROP_CHAR_COLOR,
55cdf0e10cSrcweir //         PROP_CHAR_BACKGROUND_COLOR,
56cdf0e10cSrcweir //--         PROP_CHAR_BACKGROUND_TRANSPARENCY, alpah channnel in COLOR
57cdf0e10cSrcweir         PROP_CHAR_ESCAPEMENT,
58cdf0e10cSrcweir         PROP_CHAR_CHAR_HEIGHT,
59cdf0e10cSrcweir         PROP_CHAR_UNDERLINE,
60cdf0e10cSrcweir         PROP_CHAR_UNDERLINE_COLOR,
61cdf0e10cSrcweir         PROP_CHAR_UNDERLINE_HAS_COLOR,
62cdf0e10cSrcweir         PROP_CHAR_OVERLINE,
63cdf0e10cSrcweir         PROP_CHAR_OVERLINE_COLOR,
64cdf0e10cSrcweir         PROP_CHAR_OVERLINE_HAS_COLOR,
65cdf0e10cSrcweir         PROP_CHAR_WEIGHT,
66cdf0e10cSrcweir         PROP_CHAR_POSTURE,
67cdf0e10cSrcweir         PROP_CHAR_AUTO_KERNING,
68cdf0e10cSrcweir         PROP_CHAR_KERNING,
69cdf0e10cSrcweir //         PROP_CHAR_CASE_MAPPING,
70cdf0e10cSrcweir //         PROP_CHAR_ROTATION,
71cdf0e10cSrcweir //--         PROP_CHAR_ROTATION_IS_FIT_TO_LINE,
72cdf0e10cSrcweir //        PROP_CHAR_SCALE_WIDTH,
73cdf0e10cSrcweir         PROP_CHAR_ESCAPEMENT_HEIGHT,
74cdf0e10cSrcweir 
75cdf0e10cSrcweir //         PROP_CHAR_CROSSED_OUT,
76cdf0e10cSrcweir         PROP_CHAR_STRIKE_OUT,
77cdf0e10cSrcweir         PROP_CHAR_WORD_MODE,
78cdf0e10cSrcweir //         PROP_CHAR_FLASH,
79cdf0e10cSrcweir         PROP_CHAR_LOCALE,
80cdf0e10cSrcweir //--         PROP_CHAR_KEEP_TOGETHER,
81cdf0e10cSrcweir //--         PROP_CHAR_NO_LINE_BREAK,
82cdf0e10cSrcweir         PROP_CHAR_SHADOWED,
83cdf0e10cSrcweir         PROP_CHAR_CONTOURED,
84cdf0e10cSrcweir         PROP_CHAR_RELIEF,
85cdf0e10cSrcweir //--         PROP_CHAR_COMBINE_IS_ON,
86cdf0e10cSrcweir //--         PROP_CHAR_COMBINE_PREFIX,
87cdf0e10cSrcweir //--         PROP_CHAR_COMBINE_SUFFIX,
88cdf0e10cSrcweir 
89cdf0e10cSrcweir         PROP_CHAR_EMPHASIS,
90cdf0e10cSrcweir //         PROP_CHAR_RUBY_TEXT,
91cdf0e10cSrcweir //         PROP_CHAR_RUBY_ADJUST,
92cdf0e10cSrcweir //         PROP_CHAR_RUBY_STYLE_NAME,
93cdf0e10cSrcweir //         PROP_CHAR_RUBY_IS_ABOVE,
94cdf0e10cSrcweir //         PROP_CHAR_INHIBIT_HYPHENATION,
95cdf0e10cSrcweir 
96cdf0e10cSrcweir         // Asian (com.sun.star.style.CharacterPropertiesAsian)
97cdf0e10cSrcweir         PROP_CHAR_ASIAN_FONT_NAME,
98cdf0e10cSrcweir         PROP_CHAR_ASIAN_FONT_STYLE_NAME,
99cdf0e10cSrcweir         PROP_CHAR_ASIAN_FONT_FAMILY,
100cdf0e10cSrcweir         PROP_CHAR_ASIAN_CHAR_SET,
101cdf0e10cSrcweir         PROP_CHAR_ASIAN_FONT_PITCH,
102cdf0e10cSrcweir         PROP_CHAR_ASIAN_CHAR_HEIGHT,
103cdf0e10cSrcweir         PROP_CHAR_ASIAN_WEIGHT,
104cdf0e10cSrcweir         PROP_CHAR_ASIAN_POSTURE,
105cdf0e10cSrcweir         PROP_CHAR_ASIAN_LOCALE,
106cdf0e10cSrcweir //--         PROP_CHAR_ASIAN_USE_SCRIPT_TYPE_DISTANCE,
107cdf0e10cSrcweir //--         PROP_CHAR_ASIAN_USE_FORBIDDEN_RULES,
108cdf0e10cSrcweir //--         PROP_CHAR_ASIAN_HANGING_PUNCTUATION_ALLOWED,
109cdf0e10cSrcweir 
110cdf0e10cSrcweir         // Complex Text Layout (com.sun.star.style.CharacterPropertiesComplex)
111cdf0e10cSrcweir         PROP_CHAR_COMPLEX_FONT_NAME,
112cdf0e10cSrcweir         PROP_CHAR_COMPLEX_FONT_STYLE_NAME,
113cdf0e10cSrcweir         PROP_CHAR_COMPLEX_FONT_FAMILY,
114cdf0e10cSrcweir         PROP_CHAR_COMPLEX_CHAR_SET,
115cdf0e10cSrcweir         PROP_CHAR_COMPLEX_FONT_PITCH,
116cdf0e10cSrcweir         PROP_CHAR_COMPLEX_CHAR_HEIGHT,
117cdf0e10cSrcweir         PROP_CHAR_COMPLEX_WEIGHT,
118cdf0e10cSrcweir         PROP_CHAR_COMPLEX_POSTURE,
119cdf0e10cSrcweir         PROP_CHAR_COMPLEX_LOCALE,
120cdf0e10cSrcweir         PROP_PARA_IS_CHARACTER_DISTANCE,
121cdf0e10cSrcweir 
122cdf0e10cSrcweir         PROP_WRITING_MODE,
123cdf0e10cSrcweir 
124cdf0e10cSrcweir         // don't use
125cdf0e10cSrcweir         FAST_PROPERTY_ID_END_CHAR_PROP
126cdf0e10cSrcweir     };
127cdf0e10cSrcweir 
128cdf0e10cSrcweir     static void AddPropertiesToVector(
129cdf0e10cSrcweir         ::std::vector< ::com::sun::star::beans::Property > & rOutProperties );
130cdf0e10cSrcweir 
131cdf0e10cSrcweir     static void AddDefaultsToMap( ::chart::tPropertyValueMap & rOutMap );
132cdf0e10cSrcweir 
133cdf0e10cSrcweir     static bool IsCharacterPropertyHandle( sal_Int32 nHandle );
134cdf0e10cSrcweir 
135cdf0e10cSrcweir     static ::com::sun::star::awt::FontDescriptor createFontDescriptorFromPropertySet(
136cdf0e10cSrcweir         const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XMultiPropertySet > & xMultiPropSet );
137cdf0e10cSrcweir 
138cdf0e10cSrcweir private:
139cdf0e10cSrcweir     // not implemented
140cdf0e10cSrcweir     CharacterProperties();
141cdf0e10cSrcweir };
142cdf0e10cSrcweir 
143cdf0e10cSrcweir } //  namespace chart
144cdf0e10cSrcweir 
145cdf0e10cSrcweir // CHART_CHARACTERPROPERTIES_HXX
146cdf0e10cSrcweir #endif
147