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