1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: CharacterProperties.hxx,v $
10 * $Revision: 1.4.72.1 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef CHART_CHARACTERPROPERTIES_HXX
31 #define CHART_CHARACTERPROPERTIES_HXX
33 #include "PropertyHelper.hxx"
34 #include "FastPropertyIdRanges.hxx"
35 #include "charttoolsdllapi.hxx"
36 #include <com/sun/star/beans/Property.hpp>
37 #include <com/sun/star/beans/XMultiPropertySet.hpp>
38 #include <com/sun/star/awt/FontDescriptor.hpp>
45 // implements services
46 // com.sun.star.style.CharacterProperties
47 // com.sun.star.style.CharacterPropertiesAsian
48 // com.sun.star.style.CharacterPropertiesComplex
49 class OOO_DLLPUBLIC_CHARTTOOLS CharacterProperties
52 // FastProperty Ids for properties
55 // com.sun.star.style.CharacterProperties
56 PROP_CHAR_FONT_NAME
= FAST_PROPERTY_ID_START_CHAR_PROP
, // ?
57 PROP_CHAR_FONT_STYLE_NAME
,
58 PROP_CHAR_FONT_FAMILY
,
59 PROP_CHAR_FONT_CHAR_SET
,
62 // PROP_CHAR_BACKGROUND_COLOR,
63 //-- PROP_CHAR_BACKGROUND_TRANSPARENCY, alpah channnel in COLOR
65 PROP_CHAR_CHAR_HEIGHT
,
67 PROP_CHAR_UNDERLINE_COLOR
,
68 PROP_CHAR_UNDERLINE_HAS_COLOR
,
71 PROP_CHAR_AUTO_KERNING
,
73 // PROP_CHAR_CASE_MAPPING,
74 // PROP_CHAR_ROTATION,
75 //-- PROP_CHAR_ROTATION_IS_FIT_TO_LINE,
76 // PROP_CHAR_SCALE_WIDTH,
77 PROP_CHAR_ESCAPEMENT_HEIGHT
,
79 // PROP_CHAR_CROSSED_OUT,
84 //-- PROP_CHAR_KEEP_TOGETHER,
85 //-- PROP_CHAR_NO_LINE_BREAK,
89 //-- PROP_CHAR_COMBINE_IS_ON,
90 //-- PROP_CHAR_COMBINE_PREFIX,
91 //-- PROP_CHAR_COMBINE_SUFFIX,
94 // PROP_CHAR_RUBY_TEXT,
95 // PROP_CHAR_RUBY_ADJUST,
96 // PROP_CHAR_RUBY_STYLE_NAME,
97 // PROP_CHAR_RUBY_IS_ABOVE,
98 // PROP_CHAR_INHIBIT_HYPHENATION,
100 // Asian (com.sun.star.style.CharacterPropertiesAsian)
101 PROP_CHAR_ASIAN_FONT_NAME
,
102 PROP_CHAR_ASIAN_FONT_STYLE_NAME
,
103 PROP_CHAR_ASIAN_FONT_FAMILY
,
104 PROP_CHAR_ASIAN_CHAR_SET
,
105 PROP_CHAR_ASIAN_FONT_PITCH
,
106 PROP_CHAR_ASIAN_CHAR_HEIGHT
,
107 PROP_CHAR_ASIAN_WEIGHT
,
108 PROP_CHAR_ASIAN_POSTURE
,
109 PROP_CHAR_ASIAN_LOCALE
,
110 //-- PROP_CHAR_ASIAN_USE_SCRIPT_TYPE_DISTANCE,
111 //-- PROP_CHAR_ASIAN_USE_FORBIDDEN_RULES,
112 //-- PROP_CHAR_ASIAN_HANGING_PUNCTUATION_ALLOWED,
114 // Complex Text Layout (com.sun.star.style.CharacterPropertiesComplex)
115 PROP_CHAR_COMPLEX_FONT_NAME
,
116 PROP_CHAR_COMPLEX_FONT_STYLE_NAME
,
117 PROP_CHAR_COMPLEX_FONT_FAMILY
,
118 PROP_CHAR_COMPLEX_CHAR_SET
,
119 PROP_CHAR_COMPLEX_FONT_PITCH
,
120 PROP_CHAR_COMPLEX_CHAR_HEIGHT
,
121 PROP_CHAR_COMPLEX_WEIGHT
,
122 PROP_CHAR_COMPLEX_POSTURE
,
123 PROP_CHAR_COMPLEX_LOCALE
,
124 PROP_PARA_IS_CHARACTER_DISTANCE
,
129 FAST_PROPERTY_ID_END_CHAR_PROP
132 static void AddPropertiesToVector(
133 ::std::vector
< ::com::sun::star::beans::Property
> & rOutProperties
);
135 static void AddDefaultsToMap( ::chart::tPropertyValueMap
& rOutMap
);
137 static bool IsCharacterPropertyHandle( sal_Int32 nHandle
);
139 static ::com::sun::star::awt::FontDescriptor
createFontDescriptorFromPropertySet(
140 const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XMultiPropertySet
> & xMultiPropSet
);
144 CharacterProperties();
149 // CHART_CHARACTERPROPERTIES_HXX