1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 #ifndef CHART_CHARACTERPROPERTIES_HXX 28 #define CHART_CHARACTERPROPERTIES_HXX 29 30 #include "PropertyHelper.hxx" 31 #include "FastPropertyIdRanges.hxx" 32 #include "charttoolsdllapi.hxx" 33 #include <com/sun/star/beans/Property.hpp> 34 #include <com/sun/star/beans/XMultiPropertySet.hpp> 35 #include <com/sun/star/awt/FontDescriptor.hpp> 36 37 #include <vector> 38 39 namespace chart 40 { 41 42 // implements services 43 // com.sun.star.style.CharacterProperties 44 // com.sun.star.style.CharacterPropertiesAsian 45 // com.sun.star.style.CharacterPropertiesComplex 46 class OOO_DLLPUBLIC_CHARTTOOLS CharacterProperties 47 { 48 public: 49 // FastProperty Ids for properties 50 enum 51 { 52 // com.sun.star.style.CharacterProperties 53 PROP_CHAR_FONT_NAME = FAST_PROPERTY_ID_START_CHAR_PROP, // ? 54 PROP_CHAR_FONT_STYLE_NAME, 55 PROP_CHAR_FONT_FAMILY, 56 PROP_CHAR_FONT_CHAR_SET, 57 PROP_CHAR_FONT_PITCH, 58 PROP_CHAR_COLOR, 59 // PROP_CHAR_BACKGROUND_COLOR, 60 //-- PROP_CHAR_BACKGROUND_TRANSPARENCY, alpah channnel in COLOR 61 PROP_CHAR_ESCAPEMENT, 62 PROP_CHAR_CHAR_HEIGHT, 63 PROP_CHAR_UNDERLINE, 64 PROP_CHAR_UNDERLINE_COLOR, 65 PROP_CHAR_UNDERLINE_HAS_COLOR, 66 PROP_CHAR_OVERLINE, 67 PROP_CHAR_OVERLINE_COLOR, 68 PROP_CHAR_OVERLINE_HAS_COLOR, 69 PROP_CHAR_WEIGHT, 70 PROP_CHAR_POSTURE, 71 PROP_CHAR_AUTO_KERNING, 72 PROP_CHAR_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, 78 79 // PROP_CHAR_CROSSED_OUT, 80 PROP_CHAR_STRIKE_OUT, 81 PROP_CHAR_WORD_MODE, 82 // PROP_CHAR_FLASH, 83 PROP_CHAR_LOCALE, 84 //-- PROP_CHAR_KEEP_TOGETHER, 85 //-- PROP_CHAR_NO_LINE_BREAK, 86 PROP_CHAR_SHADOWED, 87 PROP_CHAR_CONTOURED, 88 PROP_CHAR_RELIEF, 89 //-- PROP_CHAR_COMBINE_IS_ON, 90 //-- PROP_CHAR_COMBINE_PREFIX, 91 //-- PROP_CHAR_COMBINE_SUFFIX, 92 93 PROP_CHAR_EMPHASIS, 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, 99 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, 113 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, 125 126 PROP_WRITING_MODE, 127 128 // don't use 129 FAST_PROPERTY_ID_END_CHAR_PROP 130 }; 131 132 static void AddPropertiesToVector( 133 ::std::vector< ::com::sun::star::beans::Property > & rOutProperties ); 134 135 static void AddDefaultsToMap( ::chart::tPropertyValueMap & rOutMap ); 136 137 static bool IsCharacterPropertyHandle( sal_Int32 nHandle ); 138 139 static ::com::sun::star::awt::FontDescriptor createFontDescriptorFromPropertySet( 140 const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XMultiPropertySet > & xMultiPropSet ); 141 142 private: 143 // not implemented 144 CharacterProperties(); 145 }; 146 147 } // namespace chart 148 149 // CHART_CHARACTERPROPERTIES_HXX 150 #endif 151