1*b1cdbd2cSJim Jagielski /**************************************************************
2*b1cdbd2cSJim Jagielski *
3*b1cdbd2cSJim Jagielski * Licensed to the Apache Software Foundation (ASF) under one
4*b1cdbd2cSJim Jagielski * or more contributor license agreements. See the NOTICE file
5*b1cdbd2cSJim Jagielski * distributed with this work for additional information
6*b1cdbd2cSJim Jagielski * regarding copyright ownership. The ASF licenses this file
7*b1cdbd2cSJim Jagielski * to you under the Apache License, Version 2.0 (the
8*b1cdbd2cSJim Jagielski * "License"); you may not use this file except in compliance
9*b1cdbd2cSJim Jagielski * with the License. You may obtain a copy of the License at
10*b1cdbd2cSJim Jagielski *
11*b1cdbd2cSJim Jagielski * http://www.apache.org/licenses/LICENSE-2.0
12*b1cdbd2cSJim Jagielski *
13*b1cdbd2cSJim Jagielski * Unless required by applicable law or agreed to in writing,
14*b1cdbd2cSJim Jagielski * software distributed under the License is distributed on an
15*b1cdbd2cSJim Jagielski * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*b1cdbd2cSJim Jagielski * KIND, either express or implied. See the License for the
17*b1cdbd2cSJim Jagielski * specific language governing permissions and limitations
18*b1cdbd2cSJim Jagielski * under the License.
19*b1cdbd2cSJim Jagielski *
20*b1cdbd2cSJim Jagielski *************************************************************/
21*b1cdbd2cSJim Jagielski
22*b1cdbd2cSJim Jagielski
23*b1cdbd2cSJim Jagielski
24*b1cdbd2cSJim Jagielski // MARKER(update_precomp.py): autogen include statement, do not remove
25*b1cdbd2cSJim Jagielski #include "precompiled_chart2.hxx"
26*b1cdbd2cSJim Jagielski #include "CharacterProperties.hxx"
27*b1cdbd2cSJim Jagielski #include "ContainerHelper.hxx"
28*b1cdbd2cSJim Jagielski #include "macros.hxx"
29*b1cdbd2cSJim Jagielski
30*b1cdbd2cSJim Jagielski #include <com/sun/star/beans/PropertyAttribute.hpp>
31*b1cdbd2cSJim Jagielski #include <com/sun/star/style/XStyle.hpp>
32*b1cdbd2cSJim Jagielski #include <com/sun/star/awt/FontSlant.hpp>
33*b1cdbd2cSJim Jagielski #include <com/sun/star/lang/Locale.hpp>
34*b1cdbd2cSJim Jagielski
35*b1cdbd2cSJim Jagielski #include <com/sun/star/awt/FontFamily.hpp>
36*b1cdbd2cSJim Jagielski #include <com/sun/star/awt/CharSet.hpp>
37*b1cdbd2cSJim Jagielski #include <com/sun/star/awt/FontPitch.hpp>
38*b1cdbd2cSJim Jagielski #include <com/sun/star/awt/FontUnderline.hpp>
39*b1cdbd2cSJim Jagielski #include <com/sun/star/awt/FontWeight.hpp>
40*b1cdbd2cSJim Jagielski #include <com/sun/star/awt/FontSlant.hpp>
41*b1cdbd2cSJim Jagielski #include <com/sun/star/style/CaseMap.hpp>
42*b1cdbd2cSJim Jagielski #include <com/sun/star/text/FontRelief.hpp>
43*b1cdbd2cSJim Jagielski #include <com/sun/star/text/FontEmphasis.hpp>
44*b1cdbd2cSJim Jagielski #include <com/sun/star/text/RubyAdjust.hpp>
45*b1cdbd2cSJim Jagielski #include <com/sun/star/awt/FontStrikeout.hpp>
46*b1cdbd2cSJim Jagielski #include <com/sun/star/text/WritingMode2.hpp>
47*b1cdbd2cSJim Jagielski #include <com/sun/star/i18n/ScriptType.hpp>
48*b1cdbd2cSJim Jagielski
49*b1cdbd2cSJim Jagielski #include <comphelper/InlineContainer.hxx>
50*b1cdbd2cSJim Jagielski
51*b1cdbd2cSJim Jagielski
52*b1cdbd2cSJim Jagielski // header for struct SvtLinguConfig
53*b1cdbd2cSJim Jagielski #ifndef _SVTOOLS_LINGUCFG_HXX_
54*b1cdbd2cSJim Jagielski #include <unotools/lingucfg.hxx>
55*b1cdbd2cSJim Jagielski #endif
56*b1cdbd2cSJim Jagielski #ifndef INCLUDED_I18NPOOL_MSLANGID_HXX
57*b1cdbd2cSJim Jagielski #include <i18npool/mslangid.hxx>
58*b1cdbd2cSJim Jagielski #endif
59*b1cdbd2cSJim Jagielski #ifndef _SV_OUTDEV_HXX
60*b1cdbd2cSJim Jagielski #include <vcl/outdev.hxx>
61*b1cdbd2cSJim Jagielski #endif
62*b1cdbd2cSJim Jagielski
63*b1cdbd2cSJim Jagielski using namespace ::com::sun::star;
64*b1cdbd2cSJim Jagielski
65*b1cdbd2cSJim Jagielski using ::com::sun::star::beans::Property;
66*b1cdbd2cSJim Jagielski
67*b1cdbd2cSJim Jagielski using ::rtl::OUString;
68*b1cdbd2cSJim Jagielski
69*b1cdbd2cSJim Jagielski namespace chart
70*b1cdbd2cSJim Jagielski {
71*b1cdbd2cSJim Jagielski
AddPropertiesToVector(::std::vector<Property> & rOutProperties)72*b1cdbd2cSJim Jagielski void CharacterProperties::AddPropertiesToVector(
73*b1cdbd2cSJim Jagielski ::std::vector< Property > & rOutProperties )
74*b1cdbd2cSJim Jagielski {
75*b1cdbd2cSJim Jagielski // CharacterProperties
76*b1cdbd2cSJim Jagielski rOutProperties.push_back(
77*b1cdbd2cSJim Jagielski Property( C2U( "CharFontName" ),
78*b1cdbd2cSJim Jagielski PROP_CHAR_FONT_NAME,
79*b1cdbd2cSJim Jagielski ::getCppuType( reinterpret_cast< const OUString * >(0)),
80*b1cdbd2cSJim Jagielski beans::PropertyAttribute::BOUND
81*b1cdbd2cSJim Jagielski | beans::PropertyAttribute::MAYBEDEFAULT ));
82*b1cdbd2cSJim Jagielski rOutProperties.push_back(
83*b1cdbd2cSJim Jagielski Property( C2U( "CharFontStyleName" ),
84*b1cdbd2cSJim Jagielski PROP_CHAR_FONT_STYLE_NAME,
85*b1cdbd2cSJim Jagielski ::getCppuType( reinterpret_cast< const OUString * >(0)),
86*b1cdbd2cSJim Jagielski beans::PropertyAttribute::BOUND
87*b1cdbd2cSJim Jagielski | beans::PropertyAttribute::MAYBEDEFAULT
88*b1cdbd2cSJim Jagielski | beans::PropertyAttribute::MAYBEVOID ));
89*b1cdbd2cSJim Jagielski // CharFontFamily (see awt.FontFamily)
90*b1cdbd2cSJim Jagielski rOutProperties.push_back(
91*b1cdbd2cSJim Jagielski Property( C2U( "CharFontFamily" ),
92*b1cdbd2cSJim Jagielski PROP_CHAR_FONT_FAMILY,
93*b1cdbd2cSJim Jagielski ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)),
94*b1cdbd2cSJim Jagielski beans::PropertyAttribute::BOUND
95*b1cdbd2cSJim Jagielski | beans::PropertyAttribute::MAYBEDEFAULT ));
96*b1cdbd2cSJim Jagielski // CharFontCharSet (see awt.CharSet)
97*b1cdbd2cSJim Jagielski rOutProperties.push_back(
98*b1cdbd2cSJim Jagielski Property( C2U( "CharFontCharSet" ),
99*b1cdbd2cSJim Jagielski PROP_CHAR_FONT_CHAR_SET,
100*b1cdbd2cSJim Jagielski ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)),
101*b1cdbd2cSJim Jagielski beans::PropertyAttribute::BOUND
102*b1cdbd2cSJim Jagielski | beans::PropertyAttribute::MAYBEDEFAULT ));
103*b1cdbd2cSJim Jagielski // CharFontPitch (see awt.FontPitch)
104*b1cdbd2cSJim Jagielski rOutProperties.push_back(
105*b1cdbd2cSJim Jagielski Property( C2U( "CharFontPitch" ),
106*b1cdbd2cSJim Jagielski PROP_CHAR_FONT_PITCH,
107*b1cdbd2cSJim Jagielski ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)),
108*b1cdbd2cSJim Jagielski beans::PropertyAttribute::BOUND
109*b1cdbd2cSJim Jagielski | beans::PropertyAttribute::MAYBEDEFAULT ));
110*b1cdbd2cSJim Jagielski // CharColor
111*b1cdbd2cSJim Jagielski rOutProperties.push_back(
112*b1cdbd2cSJim Jagielski Property( C2U( "CharColor" ),
113*b1cdbd2cSJim Jagielski PROP_CHAR_COLOR,
114*b1cdbd2cSJim Jagielski ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)),
115*b1cdbd2cSJim Jagielski beans::PropertyAttribute::BOUND
116*b1cdbd2cSJim Jagielski | beans::PropertyAttribute::MAYBEDEFAULT ));
117*b1cdbd2cSJim Jagielski // CharBackColor
118*b1cdbd2cSJim Jagielski // rOutProperties.push_back(
119*b1cdbd2cSJim Jagielski // Property( C2U( "CharBackColor" ),
120*b1cdbd2cSJim Jagielski // PROP_CHAR_BACKGROUND_COLOR,
121*b1cdbd2cSJim Jagielski // ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)),
122*b1cdbd2cSJim Jagielski // beans::PropertyAttribute::BOUND
123*b1cdbd2cSJim Jagielski // | beans::PropertyAttribute::MAYBEDEFAULT));
124*b1cdbd2cSJim Jagielski // CharEscapement
125*b1cdbd2cSJim Jagielski rOutProperties.push_back(
126*b1cdbd2cSJim Jagielski Property( C2U( "CharEscapement" ),
127*b1cdbd2cSJim Jagielski PROP_CHAR_ESCAPEMENT,
128*b1cdbd2cSJim Jagielski ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)),
129*b1cdbd2cSJim Jagielski beans::PropertyAttribute::BOUND
130*b1cdbd2cSJim Jagielski | beans::PropertyAttribute::MAYBEVOID ));
131*b1cdbd2cSJim Jagielski // CharHeight
132*b1cdbd2cSJim Jagielski rOutProperties.push_back(
133*b1cdbd2cSJim Jagielski Property( C2U( "CharHeight" ),
134*b1cdbd2cSJim Jagielski PROP_CHAR_CHAR_HEIGHT,
135*b1cdbd2cSJim Jagielski ::getCppuType( reinterpret_cast< const float * >(0)),
136*b1cdbd2cSJim Jagielski beans::PropertyAttribute::BOUND
137*b1cdbd2cSJim Jagielski | beans::PropertyAttribute::MAYBEDEFAULT ));
138*b1cdbd2cSJim Jagielski // CharUnderline (see awt.FontUnderline)
139*b1cdbd2cSJim Jagielski rOutProperties.push_back(
140*b1cdbd2cSJim Jagielski Property( C2U( "CharUnderline" ),
141*b1cdbd2cSJim Jagielski PROP_CHAR_UNDERLINE,
142*b1cdbd2cSJim Jagielski ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)),
143*b1cdbd2cSJim Jagielski beans::PropertyAttribute::BOUND
144*b1cdbd2cSJim Jagielski | beans::PropertyAttribute::MAYBEDEFAULT ));
145*b1cdbd2cSJim Jagielski // CharUnderlineColor
146*b1cdbd2cSJim Jagielski rOutProperties.push_back(
147*b1cdbd2cSJim Jagielski Property( C2U( "CharUnderlineColor" ),
148*b1cdbd2cSJim Jagielski PROP_CHAR_UNDERLINE_COLOR,
149*b1cdbd2cSJim Jagielski ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)),
150*b1cdbd2cSJim Jagielski beans::PropertyAttribute::BOUND
151*b1cdbd2cSJim Jagielski | beans::PropertyAttribute::MAYBEDEFAULT
152*b1cdbd2cSJim Jagielski | beans::PropertyAttribute::MAYBEVOID ));
153*b1cdbd2cSJim Jagielski // CharUnderlineHasColor
154*b1cdbd2cSJim Jagielski rOutProperties.push_back(
155*b1cdbd2cSJim Jagielski Property( C2U( "CharUnderlineHasColor" ),
156*b1cdbd2cSJim Jagielski PROP_CHAR_UNDERLINE_HAS_COLOR,
157*b1cdbd2cSJim Jagielski ::getBooleanCppuType(),
158*b1cdbd2cSJim Jagielski beans::PropertyAttribute::BOUND
159*b1cdbd2cSJim Jagielski | beans::PropertyAttribute::MAYBEDEFAULT ));
160*b1cdbd2cSJim Jagielski // CharOverline (see awt.FontUnderline)
161*b1cdbd2cSJim Jagielski rOutProperties.push_back(
162*b1cdbd2cSJim Jagielski Property( C2U( "CharOverline" ),
163*b1cdbd2cSJim Jagielski PROP_CHAR_OVERLINE,
164*b1cdbd2cSJim Jagielski ::getCppuType( reinterpret_cast< const sal_Int16* >( 0 ) ),
165*b1cdbd2cSJim Jagielski beans::PropertyAttribute::BOUND
166*b1cdbd2cSJim Jagielski | beans::PropertyAttribute::MAYBEDEFAULT ) );
167*b1cdbd2cSJim Jagielski // CharOverlineColor
168*b1cdbd2cSJim Jagielski rOutProperties.push_back(
169*b1cdbd2cSJim Jagielski Property( C2U( "CharOverlineColor" ),
170*b1cdbd2cSJim Jagielski PROP_CHAR_OVERLINE_COLOR,
171*b1cdbd2cSJim Jagielski ::getCppuType( reinterpret_cast< const sal_Int32* >( 0 ) ),
172*b1cdbd2cSJim Jagielski beans::PropertyAttribute::BOUND
173*b1cdbd2cSJim Jagielski | beans::PropertyAttribute::MAYBEDEFAULT
174*b1cdbd2cSJim Jagielski | beans::PropertyAttribute::MAYBEVOID ) );
175*b1cdbd2cSJim Jagielski // CharOverlineHasColor
176*b1cdbd2cSJim Jagielski rOutProperties.push_back(
177*b1cdbd2cSJim Jagielski Property( C2U( "CharOverlineHasColor" ),
178*b1cdbd2cSJim Jagielski PROP_CHAR_OVERLINE_HAS_COLOR,
179*b1cdbd2cSJim Jagielski ::getBooleanCppuType(),
180*b1cdbd2cSJim Jagielski beans::PropertyAttribute::BOUND
181*b1cdbd2cSJim Jagielski | beans::PropertyAttribute::MAYBEDEFAULT ) );
182*b1cdbd2cSJim Jagielski // CharWeight (see awt.FontWeight)
183*b1cdbd2cSJim Jagielski rOutProperties.push_back(
184*b1cdbd2cSJim Jagielski Property( C2U( "CharWeight" ),
185*b1cdbd2cSJim Jagielski PROP_CHAR_WEIGHT,
186*b1cdbd2cSJim Jagielski ::getCppuType( reinterpret_cast< const float * >(0)),
187*b1cdbd2cSJim Jagielski beans::PropertyAttribute::BOUND
188*b1cdbd2cSJim Jagielski | beans::PropertyAttribute::MAYBEDEFAULT ));
189*b1cdbd2cSJim Jagielski // CharPosture
190*b1cdbd2cSJim Jagielski rOutProperties.push_back(
191*b1cdbd2cSJim Jagielski Property( C2U( "CharPosture" ),
192*b1cdbd2cSJim Jagielski PROP_CHAR_POSTURE,
193*b1cdbd2cSJim Jagielski ::getCppuType( reinterpret_cast< const awt::FontSlant * >(0)),
194*b1cdbd2cSJim Jagielski beans::PropertyAttribute::BOUND
195*b1cdbd2cSJim Jagielski | beans::PropertyAttribute::MAYBEDEFAULT ));
196*b1cdbd2cSJim Jagielski rOutProperties.push_back(
197*b1cdbd2cSJim Jagielski Property( C2U( "CharAutoKerning" ),
198*b1cdbd2cSJim Jagielski PROP_CHAR_AUTO_KERNING,
199*b1cdbd2cSJim Jagielski ::getBooleanCppuType(),
200*b1cdbd2cSJim Jagielski beans::PropertyAttribute::BOUND
201*b1cdbd2cSJim Jagielski | beans::PropertyAttribute::MAYBEDEFAULT
202*b1cdbd2cSJim Jagielski | beans::PropertyAttribute::MAYBEVOID ));
203*b1cdbd2cSJim Jagielski rOutProperties.push_back(
204*b1cdbd2cSJim Jagielski Property( C2U( "CharKerning" ),
205*b1cdbd2cSJim Jagielski PROP_CHAR_KERNING,
206*b1cdbd2cSJim Jagielski ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)),
207*b1cdbd2cSJim Jagielski beans::PropertyAttribute::BOUND
208*b1cdbd2cSJim Jagielski | beans::PropertyAttribute::MAYBEDEFAULT
209*b1cdbd2cSJim Jagielski | beans::PropertyAttribute::MAYBEVOID ));
210*b1cdbd2cSJim Jagielski // CharCaseMap (see style.CaseMap)
211*b1cdbd2cSJim Jagielski // rOutProperties.push_back(
212*b1cdbd2cSJim Jagielski // Property( C2U( "CharCaseMap" ),
213*b1cdbd2cSJim Jagielski // PROP_CHAR_CASE_MAPPING,
214*b1cdbd2cSJim Jagielski // ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)),
215*b1cdbd2cSJim Jagielski // beans::PropertyAttribute::BOUND
216*b1cdbd2cSJim Jagielski // | beans::PropertyAttribute::MAYBEDEFAULT ));
217*b1cdbd2cSJim Jagielski
218*b1cdbd2cSJim Jagielski
219*b1cdbd2cSJim Jagielski // CharRotation
220*b1cdbd2cSJim Jagielski // rOutProperties.push_back(
221*b1cdbd2cSJim Jagielski // Property( C2U( "CharRotation" ),
222*b1cdbd2cSJim Jagielski // PROP_CHAR_ROTATION,
223*b1cdbd2cSJim Jagielski // ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)),
224*b1cdbd2cSJim Jagielski // beans::PropertyAttribute::BOUND
225*b1cdbd2cSJim Jagielski // | beans::PropertyAttribute::MAYBEDEFAULT ));
226*b1cdbd2cSJim Jagielski
227*b1cdbd2cSJim Jagielski // // CharScaleWidth
228*b1cdbd2cSJim Jagielski // rOutProperties.push_back(
229*b1cdbd2cSJim Jagielski // Property( C2U( "CharScaleWidth" ),
230*b1cdbd2cSJim Jagielski // PROP_CHAR_SCALE_WIDTH,
231*b1cdbd2cSJim Jagielski // ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)),
232*b1cdbd2cSJim Jagielski // beans::PropertyAttribute::BOUND
233*b1cdbd2cSJim Jagielski // | beans::PropertyAttribute::MAYBEDEFAULT ));
234*b1cdbd2cSJim Jagielski // CharEscapementHeight
235*b1cdbd2cSJim Jagielski rOutProperties.push_back(
236*b1cdbd2cSJim Jagielski Property( C2U( "CharEscapementHeight" ),
237*b1cdbd2cSJim Jagielski PROP_CHAR_ESCAPEMENT_HEIGHT,
238*b1cdbd2cSJim Jagielski ::getCppuType( reinterpret_cast< const sal_Int8 * >(0)),
239*b1cdbd2cSJim Jagielski beans::PropertyAttribute::BOUND
240*b1cdbd2cSJim Jagielski | beans::PropertyAttribute::MAYBEVOID ));
241*b1cdbd2cSJim Jagielski
242*b1cdbd2cSJim Jagielski // CharCrossedOut
243*b1cdbd2cSJim Jagielski // rOutProperties.push_back(
244*b1cdbd2cSJim Jagielski // Property( C2U( "CharCrossedOut" ),
245*b1cdbd2cSJim Jagielski // PROP_CHAR_CROSSED_OUT,
246*b1cdbd2cSJim Jagielski // ::getBooleanCppuType(),
247*b1cdbd2cSJim Jagielski // beans::PropertyAttribute::BOUND
248*b1cdbd2cSJim Jagielski // | beans::PropertyAttribute::MAYBEDEFAULT ));
249*b1cdbd2cSJim Jagielski // CharStrikeout (see awt.FontStrikeout)
250*b1cdbd2cSJim Jagielski rOutProperties.push_back(
251*b1cdbd2cSJim Jagielski Property( C2U( "CharStrikeout" ),
252*b1cdbd2cSJim Jagielski PROP_CHAR_STRIKE_OUT,
253*b1cdbd2cSJim Jagielski ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)),
254*b1cdbd2cSJim Jagielski beans::PropertyAttribute::BOUND
255*b1cdbd2cSJim Jagielski | beans::PropertyAttribute::MAYBEDEFAULT ));
256*b1cdbd2cSJim Jagielski // CharWordMode
257*b1cdbd2cSJim Jagielski rOutProperties.push_back(
258*b1cdbd2cSJim Jagielski Property( C2U( "CharWordMode" ),
259*b1cdbd2cSJim Jagielski PROP_CHAR_WORD_MODE,
260*b1cdbd2cSJim Jagielski ::getBooleanCppuType(),
261*b1cdbd2cSJim Jagielski beans::PropertyAttribute::BOUND
262*b1cdbd2cSJim Jagielski | beans::PropertyAttribute::MAYBEDEFAULT ));
263*b1cdbd2cSJim Jagielski // CharFlash
264*b1cdbd2cSJim Jagielski // rOutProperties.push_back(
265*b1cdbd2cSJim Jagielski // Property( C2U( "CharFlash" ),
266*b1cdbd2cSJim Jagielski // PROP_CHAR_FLASH,
267*b1cdbd2cSJim Jagielski // ::getBooleanCppuType(),
268*b1cdbd2cSJim Jagielski // beans::PropertyAttribute::BOUND
269*b1cdbd2cSJim Jagielski // | beans::PropertyAttribute::MAYBEDEFAULT ));
270*b1cdbd2cSJim Jagielski // CharLocale
271*b1cdbd2cSJim Jagielski rOutProperties.push_back(
272*b1cdbd2cSJim Jagielski Property( C2U( "CharLocale" ),
273*b1cdbd2cSJim Jagielski PROP_CHAR_LOCALE,
274*b1cdbd2cSJim Jagielski ::getCppuType( reinterpret_cast< const lang::Locale * >(0)),
275*b1cdbd2cSJim Jagielski //#i111967# no PropertyChangeEvent is fired on change so far
276*b1cdbd2cSJim Jagielski beans::PropertyAttribute::MAYBEDEFAULT ));
277*b1cdbd2cSJim Jagielski // CharShadowed
278*b1cdbd2cSJim Jagielski rOutProperties.push_back(
279*b1cdbd2cSJim Jagielski Property( C2U( "CharShadowed" ),
280*b1cdbd2cSJim Jagielski PROP_CHAR_SHADOWED,
281*b1cdbd2cSJim Jagielski ::getBooleanCppuType(),
282*b1cdbd2cSJim Jagielski beans::PropertyAttribute::BOUND
283*b1cdbd2cSJim Jagielski | beans::PropertyAttribute::MAYBEDEFAULT ));
284*b1cdbd2cSJim Jagielski // CharContoured
285*b1cdbd2cSJim Jagielski rOutProperties.push_back(
286*b1cdbd2cSJim Jagielski Property( C2U( "CharContoured" ),
287*b1cdbd2cSJim Jagielski PROP_CHAR_CONTOURED,
288*b1cdbd2cSJim Jagielski ::getBooleanCppuType(),
289*b1cdbd2cSJim Jagielski beans::PropertyAttribute::BOUND
290*b1cdbd2cSJim Jagielski | beans::PropertyAttribute::MAYBEDEFAULT ));
291*b1cdbd2cSJim Jagielski // CharRelief (see text.FontRelief)
292*b1cdbd2cSJim Jagielski rOutProperties.push_back(
293*b1cdbd2cSJim Jagielski Property( C2U( "CharRelief" ),
294*b1cdbd2cSJim Jagielski PROP_CHAR_RELIEF,
295*b1cdbd2cSJim Jagielski ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)),
296*b1cdbd2cSJim Jagielski beans::PropertyAttribute::BOUND
297*b1cdbd2cSJim Jagielski | beans::PropertyAttribute::MAYBEDEFAULT ));
298*b1cdbd2cSJim Jagielski
299*b1cdbd2cSJim Jagielski // CharEmphasize (see text.FontEmphasis)
300*b1cdbd2cSJim Jagielski rOutProperties.push_back(
301*b1cdbd2cSJim Jagielski Property( C2U( "CharEmphasis" ),
302*b1cdbd2cSJim Jagielski PROP_CHAR_EMPHASIS,
303*b1cdbd2cSJim Jagielski ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)),
304*b1cdbd2cSJim Jagielski beans::PropertyAttribute::BOUND
305*b1cdbd2cSJim Jagielski | beans::PropertyAttribute::MAYBEDEFAULT ));
306*b1cdbd2cSJim Jagielski // // RubyText
307*b1cdbd2cSJim Jagielski // rOutProperties.push_back(
308*b1cdbd2cSJim Jagielski // Property( C2U( "RubyText" ),
309*b1cdbd2cSJim Jagielski // PROP_CHAR_RUBY_TEXT,
310*b1cdbd2cSJim Jagielski // ::getCppuType( reinterpret_cast< const OUString * >(0)),
311*b1cdbd2cSJim Jagielski // beans::PropertyAttribute::BOUND
312*b1cdbd2cSJim Jagielski // | beans::PropertyAttribute::MAYBEDEFAULT ));
313*b1cdbd2cSJim Jagielski // // RubyAdjust (see text.RubyAdjust)
314*b1cdbd2cSJim Jagielski // rOutProperties.push_back(
315*b1cdbd2cSJim Jagielski // Property( C2U( "RubyAdjust" ),
316*b1cdbd2cSJim Jagielski // PROP_CHAR_RUBY_ADJUST,
317*b1cdbd2cSJim Jagielski // ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)),
318*b1cdbd2cSJim Jagielski // beans::PropertyAttribute::BOUND
319*b1cdbd2cSJim Jagielski // | beans::PropertyAttribute::MAYBEDEFAULT ));
320*b1cdbd2cSJim Jagielski // // RubyCharStyleName
321*b1cdbd2cSJim Jagielski // rOutProperties.push_back(
322*b1cdbd2cSJim Jagielski // Property( C2U( "RubyStyleName" ),
323*b1cdbd2cSJim Jagielski // PROP_CHAR_RUBY_STYLE_NAME,
324*b1cdbd2cSJim Jagielski // ::getCppuType( reinterpret_cast< const OUString * >(0)),
325*b1cdbd2cSJim Jagielski // beans::PropertyAttribute::BOUND
326*b1cdbd2cSJim Jagielski // | beans::PropertyAttribute::MAYBEDEFAULT ));
327*b1cdbd2cSJim Jagielski // // RubyIsAbove
328*b1cdbd2cSJim Jagielski // rOutProperties.push_back(
329*b1cdbd2cSJim Jagielski // Property( C2U( "RubyIsAbove" ),
330*b1cdbd2cSJim Jagielski // PROP_CHAR_RUBY_IS_ABOVE,
331*b1cdbd2cSJim Jagielski // ::getBooleanCppuType(),
332*b1cdbd2cSJim Jagielski // beans::PropertyAttribute::BOUND
333*b1cdbd2cSJim Jagielski // | beans::PropertyAttribute::MAYBEDEFAULT ));
334*b1cdbd2cSJim Jagielski // // CharNoHyphenation
335*b1cdbd2cSJim Jagielski // rOutProperties.push_back(
336*b1cdbd2cSJim Jagielski // Property( C2U( "InhibitHyphenation" ),
337*b1cdbd2cSJim Jagielski // PROP_CHAR_INHIBIT_HYPHENATION,
338*b1cdbd2cSJim Jagielski // ::getBooleanCppuType(),
339*b1cdbd2cSJim Jagielski // beans::PropertyAttribute::BOUND
340*b1cdbd2cSJim Jagielski // | beans::PropertyAttribute::MAYBEDEFAULT ));
341*b1cdbd2cSJim Jagielski
342*b1cdbd2cSJim Jagielski // CharacterPropertiesAsian
343*b1cdbd2cSJim Jagielski // =====
344*b1cdbd2cSJim Jagielski // CharFontNameAsian
345*b1cdbd2cSJim Jagielski rOutProperties.push_back(
346*b1cdbd2cSJim Jagielski Property( C2U( "CharFontNameAsian" ),
347*b1cdbd2cSJim Jagielski PROP_CHAR_ASIAN_FONT_NAME,
348*b1cdbd2cSJim Jagielski ::getCppuType( reinterpret_cast< const OUString * >(0)),
349*b1cdbd2cSJim Jagielski beans::PropertyAttribute::BOUND
350*b1cdbd2cSJim Jagielski | beans::PropertyAttribute::MAYBEDEFAULT ));
351*b1cdbd2cSJim Jagielski // CharFontStyleNameAsian
352*b1cdbd2cSJim Jagielski rOutProperties.push_back(
353*b1cdbd2cSJim Jagielski Property( C2U( "CharFontStyleNameAsian" ),
354*b1cdbd2cSJim Jagielski PROP_CHAR_ASIAN_FONT_STYLE_NAME,
355*b1cdbd2cSJim Jagielski ::getCppuType( reinterpret_cast< const OUString * >(0)),
356*b1cdbd2cSJim Jagielski beans::PropertyAttribute::BOUND
357*b1cdbd2cSJim Jagielski | beans::PropertyAttribute::MAYBEDEFAULT
358*b1cdbd2cSJim Jagielski | beans::PropertyAttribute::MAYBEVOID ));
359*b1cdbd2cSJim Jagielski // CharFontFamilyAsian (see awt.FontFamily)
360*b1cdbd2cSJim Jagielski rOutProperties.push_back(
361*b1cdbd2cSJim Jagielski Property( C2U( "CharFontFamilyAsian" ),
362*b1cdbd2cSJim Jagielski PROP_CHAR_ASIAN_FONT_FAMILY,
363*b1cdbd2cSJim Jagielski ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)),
364*b1cdbd2cSJim Jagielski beans::PropertyAttribute::BOUND
365*b1cdbd2cSJim Jagielski | beans::PropertyAttribute::MAYBEDEFAULT ));
366*b1cdbd2cSJim Jagielski // CharFontCharSetAsian (see awt.CharSet)
367*b1cdbd2cSJim Jagielski rOutProperties.push_back(
368*b1cdbd2cSJim Jagielski Property( C2U( "CharFontCharSetAsian" ),
369*b1cdbd2cSJim Jagielski PROP_CHAR_ASIAN_CHAR_SET,
370*b1cdbd2cSJim Jagielski ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)),
371*b1cdbd2cSJim Jagielski beans::PropertyAttribute::BOUND
372*b1cdbd2cSJim Jagielski | beans::PropertyAttribute::MAYBEDEFAULT ));
373*b1cdbd2cSJim Jagielski // CharFontPitchAsian (see awt.FontPitch)
374*b1cdbd2cSJim Jagielski rOutProperties.push_back(
375*b1cdbd2cSJim Jagielski Property( C2U( "CharFontPitchAsian" ),
376*b1cdbd2cSJim Jagielski PROP_CHAR_ASIAN_FONT_PITCH,
377*b1cdbd2cSJim Jagielski ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)),
378*b1cdbd2cSJim Jagielski beans::PropertyAttribute::BOUND
379*b1cdbd2cSJim Jagielski | beans::PropertyAttribute::MAYBEDEFAULT ));
380*b1cdbd2cSJim Jagielski // CharHeightAsian
381*b1cdbd2cSJim Jagielski rOutProperties.push_back(
382*b1cdbd2cSJim Jagielski Property( C2U( "CharHeightAsian" ),
383*b1cdbd2cSJim Jagielski PROP_CHAR_ASIAN_CHAR_HEIGHT,
384*b1cdbd2cSJim Jagielski ::getCppuType( reinterpret_cast< const float * >(0)),
385*b1cdbd2cSJim Jagielski beans::PropertyAttribute::BOUND
386*b1cdbd2cSJim Jagielski | beans::PropertyAttribute::MAYBEDEFAULT ));
387*b1cdbd2cSJim Jagielski // CharWeightAsian
388*b1cdbd2cSJim Jagielski rOutProperties.push_back(
389*b1cdbd2cSJim Jagielski Property( C2U( "CharWeightAsian" ),
390*b1cdbd2cSJim Jagielski PROP_CHAR_ASIAN_WEIGHT,
391*b1cdbd2cSJim Jagielski ::getCppuType( reinterpret_cast< const float * >(0)),
392*b1cdbd2cSJim Jagielski beans::PropertyAttribute::BOUND
393*b1cdbd2cSJim Jagielski | beans::PropertyAttribute::MAYBEDEFAULT ));
394*b1cdbd2cSJim Jagielski // CharPostureAsian
395*b1cdbd2cSJim Jagielski rOutProperties.push_back(
396*b1cdbd2cSJim Jagielski Property( C2U( "CharPostureAsian" ),
397*b1cdbd2cSJim Jagielski PROP_CHAR_ASIAN_POSTURE,
398*b1cdbd2cSJim Jagielski ::getCppuType( reinterpret_cast< const awt::FontSlant * >(0)),
399*b1cdbd2cSJim Jagielski beans::PropertyAttribute::BOUND
400*b1cdbd2cSJim Jagielski | beans::PropertyAttribute::MAYBEDEFAULT ));
401*b1cdbd2cSJim Jagielski // CharLocaleAsian
402*b1cdbd2cSJim Jagielski rOutProperties.push_back(
403*b1cdbd2cSJim Jagielski Property( C2U( "CharLocaleAsian" ),
404*b1cdbd2cSJim Jagielski PROP_CHAR_ASIAN_LOCALE,
405*b1cdbd2cSJim Jagielski ::getCppuType( reinterpret_cast< const lang::Locale * >(0)),
406*b1cdbd2cSJim Jagielski //#i111967# no PropertyChangeEvent is fired on change so far
407*b1cdbd2cSJim Jagielski beans::PropertyAttribute::MAYBEDEFAULT ));
408*b1cdbd2cSJim Jagielski
409*b1cdbd2cSJim Jagielski // CharacterPropertiesComplex
410*b1cdbd2cSJim Jagielski // ===
411*b1cdbd2cSJim Jagielski // CharFontNameComplex
412*b1cdbd2cSJim Jagielski rOutProperties.push_back(
413*b1cdbd2cSJim Jagielski Property( C2U( "CharFontNameComplex" ),
414*b1cdbd2cSJim Jagielski PROP_CHAR_COMPLEX_FONT_NAME,
415*b1cdbd2cSJim Jagielski ::getCppuType( reinterpret_cast< const OUString * >(0)),
416*b1cdbd2cSJim Jagielski beans::PropertyAttribute::BOUND
417*b1cdbd2cSJim Jagielski | beans::PropertyAttribute::MAYBEDEFAULT ));
418*b1cdbd2cSJim Jagielski // CharFontStyleNameComplex
419*b1cdbd2cSJim Jagielski rOutProperties.push_back(
420*b1cdbd2cSJim Jagielski Property( C2U( "CharFontStyleNameComplex" ),
421*b1cdbd2cSJim Jagielski PROP_CHAR_COMPLEX_FONT_STYLE_NAME,
422*b1cdbd2cSJim Jagielski ::getCppuType( reinterpret_cast< const OUString * >(0)),
423*b1cdbd2cSJim Jagielski beans::PropertyAttribute::BOUND
424*b1cdbd2cSJim Jagielski | beans::PropertyAttribute::MAYBEDEFAULT
425*b1cdbd2cSJim Jagielski | beans::PropertyAttribute::MAYBEVOID ));
426*b1cdbd2cSJim Jagielski // CharFontFamilyComplex (see awt.FontFamily)
427*b1cdbd2cSJim Jagielski rOutProperties.push_back(
428*b1cdbd2cSJim Jagielski Property( C2U( "CharFontFamilyComplex" ),
429*b1cdbd2cSJim Jagielski PROP_CHAR_COMPLEX_FONT_FAMILY,
430*b1cdbd2cSJim Jagielski ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)),
431*b1cdbd2cSJim Jagielski beans::PropertyAttribute::BOUND
432*b1cdbd2cSJim Jagielski | beans::PropertyAttribute::MAYBEDEFAULT ));
433*b1cdbd2cSJim Jagielski // CharFontCharSetComplex (see awt.CharSet)
434*b1cdbd2cSJim Jagielski rOutProperties.push_back(
435*b1cdbd2cSJim Jagielski Property( C2U( "CharFontCharSetComplex" ),
436*b1cdbd2cSJim Jagielski PROP_CHAR_COMPLEX_CHAR_SET,
437*b1cdbd2cSJim Jagielski ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)),
438*b1cdbd2cSJim Jagielski beans::PropertyAttribute::BOUND
439*b1cdbd2cSJim Jagielski | beans::PropertyAttribute::MAYBEDEFAULT ));
440*b1cdbd2cSJim Jagielski // CharFontPitchComplex (see awt.FontPitch)
441*b1cdbd2cSJim Jagielski rOutProperties.push_back(
442*b1cdbd2cSJim Jagielski Property( C2U( "CharFontPitchComplex" ),
443*b1cdbd2cSJim Jagielski PROP_CHAR_COMPLEX_FONT_PITCH,
444*b1cdbd2cSJim Jagielski ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)),
445*b1cdbd2cSJim Jagielski beans::PropertyAttribute::BOUND
446*b1cdbd2cSJim Jagielski | beans::PropertyAttribute::MAYBEDEFAULT ));
447*b1cdbd2cSJim Jagielski // CharHeightComplex
448*b1cdbd2cSJim Jagielski rOutProperties.push_back(
449*b1cdbd2cSJim Jagielski Property( C2U( "CharHeightComplex" ),
450*b1cdbd2cSJim Jagielski PROP_CHAR_COMPLEX_CHAR_HEIGHT,
451*b1cdbd2cSJim Jagielski ::getCppuType( reinterpret_cast< const float * >(0)),
452*b1cdbd2cSJim Jagielski beans::PropertyAttribute::BOUND
453*b1cdbd2cSJim Jagielski | beans::PropertyAttribute::MAYBEDEFAULT ));
454*b1cdbd2cSJim Jagielski // CharWeightComplex
455*b1cdbd2cSJim Jagielski rOutProperties.push_back(
456*b1cdbd2cSJim Jagielski Property( C2U( "CharWeightComplex" ),
457*b1cdbd2cSJim Jagielski PROP_CHAR_COMPLEX_WEIGHT,
458*b1cdbd2cSJim Jagielski ::getCppuType( reinterpret_cast< const float * >(0)),
459*b1cdbd2cSJim Jagielski beans::PropertyAttribute::BOUND
460*b1cdbd2cSJim Jagielski | beans::PropertyAttribute::MAYBEDEFAULT ));
461*b1cdbd2cSJim Jagielski // CharPostureComplex
462*b1cdbd2cSJim Jagielski rOutProperties.push_back(
463*b1cdbd2cSJim Jagielski Property( C2U( "CharPostureComplex" ),
464*b1cdbd2cSJim Jagielski PROP_CHAR_COMPLEX_POSTURE,
465*b1cdbd2cSJim Jagielski ::getCppuType( reinterpret_cast< const awt::FontSlant * >(0)),
466*b1cdbd2cSJim Jagielski beans::PropertyAttribute::BOUND
467*b1cdbd2cSJim Jagielski | beans::PropertyAttribute::MAYBEDEFAULT ));
468*b1cdbd2cSJim Jagielski // CharLocaleComplex
469*b1cdbd2cSJim Jagielski rOutProperties.push_back(
470*b1cdbd2cSJim Jagielski Property( C2U( "CharLocaleComplex" ),
471*b1cdbd2cSJim Jagielski PROP_CHAR_COMPLEX_LOCALE,
472*b1cdbd2cSJim Jagielski ::getCppuType( reinterpret_cast< const lang::Locale * >(0)),
473*b1cdbd2cSJim Jagielski //#i111967# no PropertyChangeEvent is fired on change so far
474*b1cdbd2cSJim Jagielski beans::PropertyAttribute::MAYBEDEFAULT ));
475*b1cdbd2cSJim Jagielski
476*b1cdbd2cSJim Jagielski // Writing Mode left to right vs right to left
477*b1cdbd2cSJim Jagielski rOutProperties.push_back(
478*b1cdbd2cSJim Jagielski Property( C2U( "WritingMode" ),
479*b1cdbd2cSJim Jagielski PROP_WRITING_MODE,
480*b1cdbd2cSJim Jagielski ::getCppuType( reinterpret_cast< const sal_Int16 * >(0)), /*com::sun::star::text::WritingMode2*/
481*b1cdbd2cSJim Jagielski beans::PropertyAttribute::BOUND
482*b1cdbd2cSJim Jagielski | beans::PropertyAttribute::MAYBEDEFAULT ));
483*b1cdbd2cSJim Jagielski
484*b1cdbd2cSJim Jagielski rOutProperties.push_back(
485*b1cdbd2cSJim Jagielski Property( C2U( "ParaIsCharacterDistance" ),
486*b1cdbd2cSJim Jagielski PROP_PARA_IS_CHARACTER_DISTANCE,
487*b1cdbd2cSJim Jagielski ::getBooleanCppuType(),
488*b1cdbd2cSJim Jagielski beans::PropertyAttribute::BOUND
489*b1cdbd2cSJim Jagielski | beans::PropertyAttribute::MAYBEDEFAULT ));
490*b1cdbd2cSJim Jagielski }
491*b1cdbd2cSJim Jagielski
AddDefaultsToMap(::chart::tPropertyValueMap & rOutMap)492*b1cdbd2cSJim Jagielski void CharacterProperties::AddDefaultsToMap(
493*b1cdbd2cSJim Jagielski ::chart::tPropertyValueMap & rOutMap )
494*b1cdbd2cSJim Jagielski {
495*b1cdbd2cSJim Jagielski const float fDefaultFontHeight = 13.0;
496*b1cdbd2cSJim Jagielski
497*b1cdbd2cSJim Jagielski SvtLinguConfig aLinguConfig;
498*b1cdbd2cSJim Jagielski lang::Locale aDefaultLocale;
499*b1cdbd2cSJim Jagielski aLinguConfig.GetProperty(C2U("DefaultLocale")) >>= aDefaultLocale;
500*b1cdbd2cSJim Jagielski lang::Locale aDefaultLocale_CJK;
501*b1cdbd2cSJim Jagielski aLinguConfig.GetProperty(C2U("DefaultLocale_CJK")) >>= aDefaultLocale_CJK;
502*b1cdbd2cSJim Jagielski lang::Locale aDefaultLocale_CTL;
503*b1cdbd2cSJim Jagielski aLinguConfig.GetProperty(C2U("DefaultLocale_CTL")) >>= aDefaultLocale_CTL;
504*b1cdbd2cSJim Jagielski
505*b1cdbd2cSJim Jagielski using namespace ::com::sun::star::i18n::ScriptType;
506*b1cdbd2cSJim Jagielski LanguageType nLang;
507*b1cdbd2cSJim Jagielski nLang = MsLangId::resolveSystemLanguageByScriptType(MsLangId::convertLocaleToLanguage(aDefaultLocale), LATIN);
508*b1cdbd2cSJim Jagielski Font aFont = OutputDevice::GetDefaultFont( DEFAULTFONT_LATIN_SPREADSHEET, nLang, DEFAULTFONT_FLAGS_ONLYONE, 0 );
509*b1cdbd2cSJim Jagielski nLang = MsLangId::resolveSystemLanguageByScriptType(MsLangId::convertLocaleToLanguage( aDefaultLocale_CJK), ASIAN);
510*b1cdbd2cSJim Jagielski Font aFontCJK = OutputDevice::GetDefaultFont( DEFAULTFONT_CJK_SPREADSHEET, nLang, DEFAULTFONT_FLAGS_ONLYONE, 0 );
511*b1cdbd2cSJim Jagielski nLang = MsLangId::resolveSystemLanguageByScriptType(MsLangId::convertLocaleToLanguage( aDefaultLocale_CTL), COMPLEX);
512*b1cdbd2cSJim Jagielski Font aFontCTL = OutputDevice::GetDefaultFont( DEFAULTFONT_CTL_SPREADSHEET, nLang, DEFAULTFONT_FLAGS_ONLYONE, 0 );
513*b1cdbd2cSJim Jagielski
514*b1cdbd2cSJim Jagielski ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_FONT_NAME, OUString( aFont.GetName() ) );
515*b1cdbd2cSJim Jagielski ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_FONT_STYLE_NAME, OUString(aFont.GetStyleName()) );
516*b1cdbd2cSJim Jagielski ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_FONT_FAMILY, sal_Int16(aFont.GetFamily()) );//awt::FontFamily::SWISS
517*b1cdbd2cSJim Jagielski ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_FONT_CHAR_SET, sal_Int16(aFont.GetCharSet()) );//use awt::CharSet::DONTKNOW instead of SYSTEM to avoid assertion issue 50249
518*b1cdbd2cSJim Jagielski ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_FONT_PITCH, sal_Int16(aFont.GetPitch()) );//awt::FontPitch::VARIABLE
519*b1cdbd2cSJim Jagielski ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_CHAR_COLOR, -1 ); //automatic color (COL_AUTO)
520*b1cdbd2cSJim Jagielski ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_CHAR_HEIGHT, fDefaultFontHeight );
521*b1cdbd2cSJim Jagielski ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_UNDERLINE, awt::FontUnderline::NONE );
522*b1cdbd2cSJim Jagielski ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_CHAR_UNDERLINE_COLOR, -1 ); //automatic color (COL_AUTO)
523*b1cdbd2cSJim Jagielski ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_UNDERLINE_HAS_COLOR, false );
524*b1cdbd2cSJim Jagielski ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_OVERLINE, awt::FontUnderline::NONE );
525*b1cdbd2cSJim Jagielski ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_CHAR_OVERLINE_COLOR, -1 ); //automatic color (COL_AUTO)
526*b1cdbd2cSJim Jagielski ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_OVERLINE_HAS_COLOR, false );
527*b1cdbd2cSJim Jagielski ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_WEIGHT, awt::FontWeight::NORMAL );
528*b1cdbd2cSJim Jagielski ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_POSTURE, awt::FontSlant_NONE );
529*b1cdbd2cSJim Jagielski ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_AUTO_KERNING, true );
530*b1cdbd2cSJim Jagielski ::chart::PropertyHelper::setPropertyValueDefault< sal_Int16 >( rOutMap, PROP_CHAR_KERNING, 0 );
531*b1cdbd2cSJim Jagielski
532*b1cdbd2cSJim Jagielski // ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_CASE_MAPPING, style::CaseMap::NONE );
533*b1cdbd2cSJim Jagielski // ::chart::PropertyHelper::setPropertyValueDefault< sal_Int16 >( rOutMap, PROP_CHAR_ROTATION, 0 );
534*b1cdbd2cSJim Jagielski // ::chart::PropertyHelper::setPropertyValueDefault< sal_Int16 >( rOutMap, PROP_CHAR_SCALE_WIDTH, 71 );
535*b1cdbd2cSJim Jagielski
536*b1cdbd2cSJim Jagielski // ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_CROSSED_OUT, false );
537*b1cdbd2cSJim Jagielski ::chart::PropertyHelper::setPropertyValueDefault< sal_Int16 >( rOutMap, PROP_CHAR_STRIKE_OUT, awt::FontStrikeout::NONE );
538*b1cdbd2cSJim Jagielski ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_WORD_MODE, false );
539*b1cdbd2cSJim Jagielski // ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_FLASH, false );
540*b1cdbd2cSJim Jagielski
541*b1cdbd2cSJim Jagielski ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_LOCALE, aDefaultLocale );
542*b1cdbd2cSJim Jagielski ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_SHADOWED, false );
543*b1cdbd2cSJim Jagielski ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_CONTOURED, false );
544*b1cdbd2cSJim Jagielski ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_RELIEF, text::FontRelief::NONE );
545*b1cdbd2cSJim Jagielski
546*b1cdbd2cSJim Jagielski ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_EMPHASIS, text::FontEmphasis::NONE );
547*b1cdbd2cSJim Jagielski
548*b1cdbd2cSJim Jagielski // ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_RUBY_ADJUST, text::RubyAdjust_INDENT_BLOCK );
549*b1cdbd2cSJim Jagielski // ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_RUBY_STYLE_NAME, ?? );
550*b1cdbd2cSJim Jagielski // ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_RUBY_IS_ABOVE, true );
551*b1cdbd2cSJim Jagielski // ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_INHIBIT_HYPHENATION, false );
552*b1cdbd2cSJim Jagielski
553*b1cdbd2cSJim Jagielski // Asian (com.sun.star.style.CharacterPropertiesAsian)
554*b1cdbd2cSJim Jagielski ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_ASIAN_CHAR_HEIGHT, fDefaultFontHeight );
555*b1cdbd2cSJim Jagielski ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_ASIAN_WEIGHT, awt::FontWeight::NORMAL );
556*b1cdbd2cSJim Jagielski ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_ASIAN_POSTURE, awt::FontSlant_NONE );
557*b1cdbd2cSJim Jagielski ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_ASIAN_LOCALE, aDefaultLocale_CJK );
558*b1cdbd2cSJim Jagielski ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_ASIAN_FONT_NAME, OUString( aFontCJK.GetName() ) );
559*b1cdbd2cSJim Jagielski ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_ASIAN_FONT_STYLE_NAME, OUString(aFontCJK.GetStyleName()) );
560*b1cdbd2cSJim Jagielski ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_ASIAN_FONT_FAMILY, sal_Int16(aFontCJK.GetFamily()) );
561*b1cdbd2cSJim Jagielski ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_ASIAN_CHAR_SET, sal_Int16(aFontCJK.GetCharSet()) );
562*b1cdbd2cSJim Jagielski ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_ASIAN_FONT_PITCH, sal_Int16(aFontCJK.GetPitch()) );
563*b1cdbd2cSJim Jagielski
564*b1cdbd2cSJim Jagielski // Complex Text Layout (com.sun.star.style.CharacterPropertiesComplex)
565*b1cdbd2cSJim Jagielski ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_COMPLEX_CHAR_HEIGHT, fDefaultFontHeight );
566*b1cdbd2cSJim Jagielski ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_COMPLEX_WEIGHT, awt::FontWeight::NORMAL );
567*b1cdbd2cSJim Jagielski ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_COMPLEX_POSTURE, awt::FontSlant_NONE );
568*b1cdbd2cSJim Jagielski ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_COMPLEX_LOCALE, aDefaultLocale_CTL );
569*b1cdbd2cSJim Jagielski ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_COMPLEX_FONT_NAME, OUString( aFontCTL.GetName() ) );
570*b1cdbd2cSJim Jagielski ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_COMPLEX_FONT_STYLE_NAME, OUString(aFontCTL.GetStyleName()) );
571*b1cdbd2cSJim Jagielski ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_COMPLEX_FONT_FAMILY, sal_Int16(aFontCTL.GetFamily()) );
572*b1cdbd2cSJim Jagielski ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_COMPLEX_CHAR_SET, sal_Int16(aFontCTL.GetCharSet()) );
573*b1cdbd2cSJim Jagielski ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_COMPLEX_FONT_PITCH, sal_Int16(aFontCTL.GetPitch()) );
574*b1cdbd2cSJim Jagielski
575*b1cdbd2cSJim Jagielski ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_WRITING_MODE, sal_Int16( com::sun::star::text::WritingMode2::PAGE ) );
576*b1cdbd2cSJim Jagielski ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_PARA_IS_CHARACTER_DISTANCE, sal_True );
577*b1cdbd2cSJim Jagielski }
578*b1cdbd2cSJim Jagielski
IsCharacterPropertyHandle(sal_Int32 nHandle)579*b1cdbd2cSJim Jagielski bool CharacterProperties::IsCharacterPropertyHandle( sal_Int32 nHandle )
580*b1cdbd2cSJim Jagielski {
581*b1cdbd2cSJim Jagielski return ( FAST_PROPERTY_ID_START_CHAR_PROP <= nHandle &&
582*b1cdbd2cSJim Jagielski nHandle < CharacterProperties::FAST_PROPERTY_ID_END_CHAR_PROP );
583*b1cdbd2cSJim Jagielski }
584*b1cdbd2cSJim Jagielski
createFontDescriptorFromPropertySet(const uno::Reference<beans::XMultiPropertySet> & xMultiPropSet)585*b1cdbd2cSJim Jagielski awt::FontDescriptor CharacterProperties::createFontDescriptorFromPropertySet(
586*b1cdbd2cSJim Jagielski const uno::Reference< beans::XMultiPropertySet > & xMultiPropSet )
587*b1cdbd2cSJim Jagielski {
588*b1cdbd2cSJim Jagielski awt::FontDescriptor aResult;
589*b1cdbd2cSJim Jagielski // Note: keep this sorted!
590*b1cdbd2cSJim Jagielski ::comphelper::MakeVector< OUString > aPropNames
591*b1cdbd2cSJim Jagielski ( C2U("CharFontCharSet")); // CharSet
592*b1cdbd2cSJim Jagielski aPropNames
593*b1cdbd2cSJim Jagielski ( C2U("CharFontFamily")) // Family
594*b1cdbd2cSJim Jagielski ( C2U("CharFontName")) // Name
595*b1cdbd2cSJim Jagielski ( C2U("CharFontPitch")) // Pitch
596*b1cdbd2cSJim Jagielski ( C2U("CharFontStyleName")) // StyleName
597*b1cdbd2cSJim Jagielski ( C2U("CharHeight")) // Height
598*b1cdbd2cSJim Jagielski ( C2U("CharPosture")) // Slant
599*b1cdbd2cSJim Jagielski ( C2U("CharStrikeout")) // Strikeout
600*b1cdbd2cSJim Jagielski ( C2U("CharUnderline")) // Underline
601*b1cdbd2cSJim Jagielski ( C2U("CharWeight")) // Weight
602*b1cdbd2cSJim Jagielski ( C2U("CharWordMode")) // WordLineMode
603*b1cdbd2cSJim Jagielski ;
604*b1cdbd2cSJim Jagielski
605*b1cdbd2cSJim Jagielski uno::Sequence< OUString > aPropNameSeq( ContainerHelper::ContainerToSequence( aPropNames ));
606*b1cdbd2cSJim Jagielski uno::Sequence< uno::Any > aValues( xMultiPropSet->getPropertyValues( aPropNameSeq ));
607*b1cdbd2cSJim Jagielski
608*b1cdbd2cSJim Jagielski sal_Int32 i=0;
609*b1cdbd2cSJim Jagielski // Note keep this sorted according to the list above (comments are the fieldnames)
610*b1cdbd2cSJim Jagielski aValues[ i++ ] >>= aResult.CharSet;
611*b1cdbd2cSJim Jagielski aValues[ i++ ] >>= aResult.Family;
612*b1cdbd2cSJim Jagielski aValues[ i++ ] >>= aResult.Name;
613*b1cdbd2cSJim Jagielski aValues[ i++ ] >>= aResult.Pitch;
614*b1cdbd2cSJim Jagielski aValues[ i++ ] >>= aResult.StyleName;
615*b1cdbd2cSJim Jagielski float fCharHeight = 0;
616*b1cdbd2cSJim Jagielski aValues[ i++ ] >>= fCharHeight;
617*b1cdbd2cSJim Jagielski aResult.Height = static_cast< sal_Int16 >( fCharHeight );
618*b1cdbd2cSJim Jagielski aValues[ i++ ] >>= aResult.Slant;
619*b1cdbd2cSJim Jagielski aValues[ i++ ] >>= aResult.Strikeout;
620*b1cdbd2cSJim Jagielski aValues[ i++ ] >>= aResult.Underline;
621*b1cdbd2cSJim Jagielski aValues[ i++ ] >>= aResult.Weight;
622*b1cdbd2cSJim Jagielski aValues[ i++ ] >>= aResult.WordLineMode;
623*b1cdbd2cSJim Jagielski OSL_ASSERT( i == aValues.getLength());
624*b1cdbd2cSJim Jagielski
625*b1cdbd2cSJim Jagielski return aResult;
626*b1cdbd2cSJim Jagielski }
627*b1cdbd2cSJim Jagielski
628*b1cdbd2cSJim Jagielski } // namespace chart
629