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 31*cdf0e10cSrcweir #include "SceneProperties.hxx" 32*cdf0e10cSrcweir #include "macros.hxx" 33*cdf0e10cSrcweir #include "ChartTypeHelper.hxx" 34*cdf0e10cSrcweir #include "ThreeDHelper.hxx" 35*cdf0e10cSrcweir #include <com/sun/star/beans/PropertyAttribute.hpp> 36*cdf0e10cSrcweir #include <com/sun/star/drawing/HomogenMatrix.hpp> 37*cdf0e10cSrcweir #include <com/sun/star/drawing/ShadeMode.hpp> 38*cdf0e10cSrcweir #include <com/sun/star/drawing/Direction3D.hpp> 39*cdf0e10cSrcweir #include <com/sun/star/drawing/ProjectionMode.hpp> 40*cdf0e10cSrcweir #include <com/sun/star/drawing/CameraGeometry.hpp> 41*cdf0e10cSrcweir 42*cdf0e10cSrcweir // for F_PI 43*cdf0e10cSrcweir #include <tools/solar.h> 44*cdf0e10cSrcweir 45*cdf0e10cSrcweir using namespace ::com::sun::star; 46*cdf0e10cSrcweir 47*cdf0e10cSrcweir using ::com::sun::star::beans::Property; 48*cdf0e10cSrcweir 49*cdf0e10cSrcweir namespace chart 50*cdf0e10cSrcweir { 51*cdf0e10cSrcweir 52*cdf0e10cSrcweir void SceneProperties::AddPropertiesToVector( 53*cdf0e10cSrcweir ::std::vector< Property > & rOutProperties ) 54*cdf0e10cSrcweir { 55*cdf0e10cSrcweir // transformation matrix 56*cdf0e10cSrcweir rOutProperties.push_back( 57*cdf0e10cSrcweir Property( C2U( "D3DTransformMatrix" ), 58*cdf0e10cSrcweir PROP_SCENE_TRANSF_MATRIX, 59*cdf0e10cSrcweir ::getCppuType( reinterpret_cast< const drawing::HomogenMatrix * >(0)), 60*cdf0e10cSrcweir beans::PropertyAttribute::BOUND 61*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEVOID 62*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEDEFAULT )); 63*cdf0e10cSrcweir 64*cdf0e10cSrcweir // distance: deprecated ( this is not used by the chart view; it's only here for compatibility with old chart ) 65*cdf0e10cSrcweir rOutProperties.push_back( 66*cdf0e10cSrcweir Property( C2U( "D3DSceneDistance" ), 67*cdf0e10cSrcweir PROP_SCENE_DISTANCE, 68*cdf0e10cSrcweir ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), 69*cdf0e10cSrcweir beans::PropertyAttribute::BOUND 70*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEVOID 71*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEDEFAULT )); 72*cdf0e10cSrcweir 73*cdf0e10cSrcweir // focalLength: deprecated ( this is not used by the chart view; it's only here for compatibility with old chart ) 74*cdf0e10cSrcweir rOutProperties.push_back( 75*cdf0e10cSrcweir Property( C2U( "D3DSceneFocalLength" ), 76*cdf0e10cSrcweir PROP_SCENE_FOCAL_LENGTH, 77*cdf0e10cSrcweir ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), 78*cdf0e10cSrcweir beans::PropertyAttribute::BOUND 79*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEVOID 80*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEDEFAULT )); 81*cdf0e10cSrcweir 82*cdf0e10cSrcweir // shadowSlant 83*cdf0e10cSrcweir rOutProperties.push_back( 84*cdf0e10cSrcweir Property( C2U( "D3DSceneShadowSlant" ), 85*cdf0e10cSrcweir PROP_SCENE_SHADOW_SLANT, 86*cdf0e10cSrcweir ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), 87*cdf0e10cSrcweir beans::PropertyAttribute::BOUND 88*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEVOID 89*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEDEFAULT )); 90*cdf0e10cSrcweir 91*cdf0e10cSrcweir // shadeMode 92*cdf0e10cSrcweir rOutProperties.push_back( 93*cdf0e10cSrcweir Property( C2U( "D3DSceneShadeMode" ), 94*cdf0e10cSrcweir PROP_SCENE_SHADE_MODE, 95*cdf0e10cSrcweir ::getCppuType( reinterpret_cast< const drawing::ShadeMode * >(0)), 96*cdf0e10cSrcweir beans::PropertyAttribute::BOUND 97*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEVOID 98*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEDEFAULT )); 99*cdf0e10cSrcweir 100*cdf0e10cSrcweir // ambientColor 101*cdf0e10cSrcweir rOutProperties.push_back( 102*cdf0e10cSrcweir Property( C2U( "D3DSceneAmbientColor" ), 103*cdf0e10cSrcweir PROP_SCENE_AMBIENT_COLOR, 104*cdf0e10cSrcweir ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), 105*cdf0e10cSrcweir beans::PropertyAttribute::BOUND 106*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEVOID 107*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEDEFAULT )); 108*cdf0e10cSrcweir 109*cdf0e10cSrcweir // lightingMode 110*cdf0e10cSrcweir rOutProperties.push_back( 111*cdf0e10cSrcweir Property( C2U( "D3DSceneTwoSidedLighting" ), 112*cdf0e10cSrcweir PROP_SCENE_TWO_SIDED_LIGHTING, 113*cdf0e10cSrcweir ::getBooleanCppuType(), 114*cdf0e10cSrcweir beans::PropertyAttribute::BOUND 115*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEVOID 116*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEDEFAULT )); 117*cdf0e10cSrcweir 118*cdf0e10cSrcweir // camera geometry 119*cdf0e10cSrcweir rOutProperties.push_back( 120*cdf0e10cSrcweir Property( C2U( "D3DCameraGeometry" ), 121*cdf0e10cSrcweir PROP_SCENE_CAMERA_GEOMETRY, 122*cdf0e10cSrcweir ::getCppuType( reinterpret_cast< const drawing::CameraGeometry * >(0)), 123*cdf0e10cSrcweir beans::PropertyAttribute::BOUND 124*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEVOID 125*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEDEFAULT )); 126*cdf0e10cSrcweir 127*cdf0e10cSrcweir // perspective 128*cdf0e10cSrcweir rOutProperties.push_back( 129*cdf0e10cSrcweir Property( C2U( "D3DScenePerspective" ), 130*cdf0e10cSrcweir PROP_SCENE_PERSPECTIVE, 131*cdf0e10cSrcweir ::getCppuType( reinterpret_cast< const drawing::ProjectionMode * >(0)), 132*cdf0e10cSrcweir beans::PropertyAttribute::BOUND 133*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEVOID 134*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEDEFAULT )); 135*cdf0e10cSrcweir 136*cdf0e10cSrcweir 137*cdf0e10cSrcweir // Light Sources 138*cdf0e10cSrcweir // ------------- 139*cdf0e10cSrcweir // light source 1 140*cdf0e10cSrcweir rOutProperties.push_back( 141*cdf0e10cSrcweir Property( C2U( "D3DSceneLightColor1" ), 142*cdf0e10cSrcweir PROP_SCENE_LIGHT_COLOR_1, 143*cdf0e10cSrcweir ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), 144*cdf0e10cSrcweir beans::PropertyAttribute::BOUND 145*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEVOID 146*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEDEFAULT )); 147*cdf0e10cSrcweir rOutProperties.push_back( 148*cdf0e10cSrcweir Property( C2U( "D3DSceneLightDirection1" ), 149*cdf0e10cSrcweir PROP_SCENE_LIGHT_DIRECTION_1, 150*cdf0e10cSrcweir ::getCppuType( reinterpret_cast< const drawing::Direction3D * >(0)), 151*cdf0e10cSrcweir beans::PropertyAttribute::BOUND 152*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEVOID 153*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEDEFAULT )); 154*cdf0e10cSrcweir rOutProperties.push_back( 155*cdf0e10cSrcweir Property( C2U( "D3DSceneLightOn1" ), 156*cdf0e10cSrcweir PROP_SCENE_LIGHT_ON_1, 157*cdf0e10cSrcweir ::getBooleanCppuType(), 158*cdf0e10cSrcweir beans::PropertyAttribute::BOUND 159*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEVOID 160*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEDEFAULT )); 161*cdf0e10cSrcweir // light source 2 162*cdf0e10cSrcweir rOutProperties.push_back( 163*cdf0e10cSrcweir Property( C2U( "D3DSceneLightColor2" ), 164*cdf0e10cSrcweir PROP_SCENE_LIGHT_COLOR_2, 165*cdf0e10cSrcweir ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), 166*cdf0e10cSrcweir beans::PropertyAttribute::BOUND 167*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEVOID 168*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEDEFAULT )); 169*cdf0e10cSrcweir rOutProperties.push_back( 170*cdf0e10cSrcweir Property( C2U( "D3DSceneLightDirection2" ), 171*cdf0e10cSrcweir PROP_SCENE_LIGHT_DIRECTION_2, 172*cdf0e10cSrcweir ::getCppuType( reinterpret_cast< const drawing::Direction3D * >(0)), 173*cdf0e10cSrcweir beans::PropertyAttribute::BOUND 174*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEVOID 175*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEDEFAULT )); 176*cdf0e10cSrcweir rOutProperties.push_back( 177*cdf0e10cSrcweir Property( C2U( "D3DSceneLightOn2" ), 178*cdf0e10cSrcweir PROP_SCENE_LIGHT_ON_2, 179*cdf0e10cSrcweir ::getBooleanCppuType(), 180*cdf0e10cSrcweir beans::PropertyAttribute::BOUND 181*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEVOID 182*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEDEFAULT )); 183*cdf0e10cSrcweir // light source 3 184*cdf0e10cSrcweir rOutProperties.push_back( 185*cdf0e10cSrcweir Property( C2U( "D3DSceneLightColor3" ), 186*cdf0e10cSrcweir PROP_SCENE_LIGHT_COLOR_3, 187*cdf0e10cSrcweir ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), 188*cdf0e10cSrcweir beans::PropertyAttribute::BOUND 189*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEVOID 190*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEDEFAULT )); 191*cdf0e10cSrcweir rOutProperties.push_back( 192*cdf0e10cSrcweir Property( C2U( "D3DSceneLightDirection3" ), 193*cdf0e10cSrcweir PROP_SCENE_LIGHT_DIRECTION_3, 194*cdf0e10cSrcweir ::getCppuType( reinterpret_cast< const drawing::Direction3D * >(0)), 195*cdf0e10cSrcweir beans::PropertyAttribute::BOUND 196*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEVOID 197*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEDEFAULT )); 198*cdf0e10cSrcweir rOutProperties.push_back( 199*cdf0e10cSrcweir Property( C2U( "D3DSceneLightOn3" ), 200*cdf0e10cSrcweir PROP_SCENE_LIGHT_ON_3, 201*cdf0e10cSrcweir ::getBooleanCppuType(), 202*cdf0e10cSrcweir beans::PropertyAttribute::BOUND 203*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEVOID 204*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEDEFAULT )); 205*cdf0e10cSrcweir // light source 4 206*cdf0e10cSrcweir rOutProperties.push_back( 207*cdf0e10cSrcweir Property( C2U( "D3DSceneLightColor4" ), 208*cdf0e10cSrcweir PROP_SCENE_LIGHT_COLOR_4, 209*cdf0e10cSrcweir ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), 210*cdf0e10cSrcweir beans::PropertyAttribute::BOUND 211*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEVOID 212*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEDEFAULT )); 213*cdf0e10cSrcweir rOutProperties.push_back( 214*cdf0e10cSrcweir Property( C2U( "D3DSceneLightDirection4" ), 215*cdf0e10cSrcweir PROP_SCENE_LIGHT_DIRECTION_4, 216*cdf0e10cSrcweir ::getCppuType( reinterpret_cast< const drawing::Direction3D * >(0)), 217*cdf0e10cSrcweir beans::PropertyAttribute::BOUND 218*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEVOID 219*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEDEFAULT )); 220*cdf0e10cSrcweir rOutProperties.push_back( 221*cdf0e10cSrcweir Property( C2U( "D3DSceneLightOn4" ), 222*cdf0e10cSrcweir PROP_SCENE_LIGHT_ON_4, 223*cdf0e10cSrcweir ::getBooleanCppuType(), 224*cdf0e10cSrcweir beans::PropertyAttribute::BOUND 225*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEVOID 226*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEDEFAULT )); 227*cdf0e10cSrcweir // light source 5 228*cdf0e10cSrcweir rOutProperties.push_back( 229*cdf0e10cSrcweir Property( C2U( "D3DSceneLightColor5" ), 230*cdf0e10cSrcweir PROP_SCENE_LIGHT_COLOR_5, 231*cdf0e10cSrcweir ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), 232*cdf0e10cSrcweir beans::PropertyAttribute::BOUND 233*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEVOID 234*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEDEFAULT )); 235*cdf0e10cSrcweir rOutProperties.push_back( 236*cdf0e10cSrcweir Property( C2U( "D3DSceneLightDirection5" ), 237*cdf0e10cSrcweir PROP_SCENE_LIGHT_DIRECTION_5, 238*cdf0e10cSrcweir ::getCppuType( reinterpret_cast< const drawing::Direction3D * >(0)), 239*cdf0e10cSrcweir beans::PropertyAttribute::BOUND 240*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEVOID 241*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEDEFAULT )); 242*cdf0e10cSrcweir rOutProperties.push_back( 243*cdf0e10cSrcweir Property( C2U( "D3DSceneLightOn5" ), 244*cdf0e10cSrcweir PROP_SCENE_LIGHT_ON_5, 245*cdf0e10cSrcweir ::getBooleanCppuType(), 246*cdf0e10cSrcweir beans::PropertyAttribute::BOUND 247*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEVOID 248*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEDEFAULT )); 249*cdf0e10cSrcweir // light source 6 250*cdf0e10cSrcweir rOutProperties.push_back( 251*cdf0e10cSrcweir Property( C2U( "D3DSceneLightColor6" ), 252*cdf0e10cSrcweir PROP_SCENE_LIGHT_COLOR_6, 253*cdf0e10cSrcweir ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), 254*cdf0e10cSrcweir beans::PropertyAttribute::BOUND 255*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEVOID 256*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEDEFAULT )); 257*cdf0e10cSrcweir rOutProperties.push_back( 258*cdf0e10cSrcweir Property( C2U( "D3DSceneLightDirection6" ), 259*cdf0e10cSrcweir PROP_SCENE_LIGHT_DIRECTION_6, 260*cdf0e10cSrcweir ::getCppuType( reinterpret_cast< const drawing::Direction3D * >(0)), 261*cdf0e10cSrcweir beans::PropertyAttribute::BOUND 262*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEVOID 263*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEDEFAULT )); 264*cdf0e10cSrcweir rOutProperties.push_back( 265*cdf0e10cSrcweir Property( C2U( "D3DSceneLightOn6" ), 266*cdf0e10cSrcweir PROP_SCENE_LIGHT_ON_6, 267*cdf0e10cSrcweir ::getBooleanCppuType(), 268*cdf0e10cSrcweir beans::PropertyAttribute::BOUND 269*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEVOID 270*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEDEFAULT )); 271*cdf0e10cSrcweir // light source 7 272*cdf0e10cSrcweir rOutProperties.push_back( 273*cdf0e10cSrcweir Property( C2U( "D3DSceneLightColor7" ), 274*cdf0e10cSrcweir PROP_SCENE_LIGHT_COLOR_7, 275*cdf0e10cSrcweir ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), 276*cdf0e10cSrcweir beans::PropertyAttribute::BOUND 277*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEVOID 278*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEDEFAULT )); 279*cdf0e10cSrcweir rOutProperties.push_back( 280*cdf0e10cSrcweir Property( C2U( "D3DSceneLightDirection7" ), 281*cdf0e10cSrcweir PROP_SCENE_LIGHT_DIRECTION_7, 282*cdf0e10cSrcweir ::getCppuType( reinterpret_cast< const drawing::Direction3D * >(0)), 283*cdf0e10cSrcweir beans::PropertyAttribute::BOUND 284*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEVOID 285*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEDEFAULT )); 286*cdf0e10cSrcweir rOutProperties.push_back( 287*cdf0e10cSrcweir Property( C2U( "D3DSceneLightOn7" ), 288*cdf0e10cSrcweir PROP_SCENE_LIGHT_ON_7, 289*cdf0e10cSrcweir ::getBooleanCppuType(), 290*cdf0e10cSrcweir beans::PropertyAttribute::BOUND 291*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEVOID 292*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEDEFAULT )); 293*cdf0e10cSrcweir // light source 8 294*cdf0e10cSrcweir rOutProperties.push_back( 295*cdf0e10cSrcweir Property( C2U( "D3DSceneLightColor8" ), 296*cdf0e10cSrcweir PROP_SCENE_LIGHT_COLOR_8, 297*cdf0e10cSrcweir ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), 298*cdf0e10cSrcweir beans::PropertyAttribute::BOUND 299*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEVOID 300*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEDEFAULT )); 301*cdf0e10cSrcweir rOutProperties.push_back( 302*cdf0e10cSrcweir Property( C2U( "D3DSceneLightDirection8" ), 303*cdf0e10cSrcweir PROP_SCENE_LIGHT_DIRECTION_8, 304*cdf0e10cSrcweir ::getCppuType( reinterpret_cast< const drawing::Direction3D * >(0)), 305*cdf0e10cSrcweir beans::PropertyAttribute::BOUND 306*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEVOID 307*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEDEFAULT )); 308*cdf0e10cSrcweir rOutProperties.push_back( 309*cdf0e10cSrcweir Property( C2U( "D3DSceneLightOn8" ), 310*cdf0e10cSrcweir PROP_SCENE_LIGHT_ON_8, 311*cdf0e10cSrcweir ::getBooleanCppuType(), 312*cdf0e10cSrcweir beans::PropertyAttribute::BOUND 313*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEVOID 314*cdf0e10cSrcweir | beans::PropertyAttribute::MAYBEDEFAULT )); 315*cdf0e10cSrcweir } 316*cdf0e10cSrcweir 317*cdf0e10cSrcweir void SceneProperties::AddDefaultsToMap( 318*cdf0e10cSrcweir ::chart::tPropertyValueMap & rOutMap ) 319*cdf0e10cSrcweir { 320*cdf0e10cSrcweir // Identity Matrix 321*cdf0e10cSrcweir drawing::HomogenMatrix aMtx; 322*cdf0e10cSrcweir aMtx.Line1.Column1 = aMtx.Line2.Column2 = 323*cdf0e10cSrcweir aMtx.Line3.Column3 = aMtx.Line4.Column4 = 1.0; 324*cdf0e10cSrcweir aMtx.Line1.Column2 = aMtx.Line1.Column3 = aMtx.Line1.Column4 = 325*cdf0e10cSrcweir aMtx.Line2.Column1 = aMtx.Line2.Column3 = aMtx.Line2.Column4 = 326*cdf0e10cSrcweir aMtx.Line3.Column1 = aMtx.Line3.Column2 = aMtx.Line3.Column4 = 327*cdf0e10cSrcweir aMtx.Line4.Column1 = aMtx.Line4.Column2 = aMtx.Line4.Column3 = 0.0; 328*cdf0e10cSrcweir 329*cdf0e10cSrcweir ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_SCENE_TRANSF_MATRIX, aMtx ); 330*cdf0e10cSrcweir ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_SCENE_DISTANCE, 4200 ); 331*cdf0e10cSrcweir ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_SCENE_FOCAL_LENGTH, 8000 ); 332*cdf0e10cSrcweir 333*cdf0e10cSrcweir // PROP_SCENE_SHADOW_SLANT; 334*cdf0e10cSrcweir ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_SCENE_SHADE_MODE, drawing::ShadeMode_SMOOTH ); 335*cdf0e10cSrcweir 336*cdf0e10cSrcweir ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( 337*cdf0e10cSrcweir rOutMap, PROP_SCENE_AMBIENT_COLOR, ChartTypeHelper::getDefaultAmbientLightColor(ThreeDLookScheme_Simple,0)); 338*cdf0e10cSrcweir 339*cdf0e10cSrcweir ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_SCENE_TWO_SIDED_LIGHTING, true ); 340*cdf0e10cSrcweir 341*cdf0e10cSrcweir drawing::Position3D vrp( 0.0, 0.0, 1.0 ); 342*cdf0e10cSrcweir drawing::Direction3D vpn( 0.0, 0.0, 1.0 ); 343*cdf0e10cSrcweir drawing::Direction3D vup( 0.0, 1.0, 0.0 ); 344*cdf0e10cSrcweir drawing::CameraGeometry aDefaultCameraGeometry( vrp, vpn, vup ); 345*cdf0e10cSrcweir 346*cdf0e10cSrcweir ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_SCENE_CAMERA_GEOMETRY, aDefaultCameraGeometry ); 347*cdf0e10cSrcweir ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_SCENE_PERSPECTIVE, drawing::ProjectionMode_PERSPECTIVE ); 348*cdf0e10cSrcweir 349*cdf0e10cSrcweir // Light Sources 350*cdf0e10cSrcweir // ------------- 351*cdf0e10cSrcweir ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_SCENE_LIGHT_ON_1, false ); 352*cdf0e10cSrcweir ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_SCENE_LIGHT_ON_2, true ); 353*cdf0e10cSrcweir ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_SCENE_LIGHT_ON_3, false ); 354*cdf0e10cSrcweir ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_SCENE_LIGHT_ON_4, false ); 355*cdf0e10cSrcweir ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_SCENE_LIGHT_ON_5, false ); 356*cdf0e10cSrcweir ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_SCENE_LIGHT_ON_6, false ); 357*cdf0e10cSrcweir ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_SCENE_LIGHT_ON_7, false ); 358*cdf0e10cSrcweir ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_SCENE_LIGHT_ON_8, false ); 359*cdf0e10cSrcweir 360*cdf0e10cSrcweir uno::Any aDefaultLightDirection( uno::makeAny( drawing::Direction3D( 0.0, 0.0, 1.0 ) ) ); 361*cdf0e10cSrcweir ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_SCENE_LIGHT_DIRECTION_1, aDefaultLightDirection ); 362*cdf0e10cSrcweir ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_SCENE_LIGHT_DIRECTION_2, ChartTypeHelper::getDefaultSimpleLightDirection(0)); 363*cdf0e10cSrcweir ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_SCENE_LIGHT_DIRECTION_3, aDefaultLightDirection ); 364*cdf0e10cSrcweir ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_SCENE_LIGHT_DIRECTION_4, aDefaultLightDirection ); 365*cdf0e10cSrcweir ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_SCENE_LIGHT_DIRECTION_5, aDefaultLightDirection ); 366*cdf0e10cSrcweir ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_SCENE_LIGHT_DIRECTION_6, aDefaultLightDirection ); 367*cdf0e10cSrcweir ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_SCENE_LIGHT_DIRECTION_7, aDefaultLightDirection ); 368*cdf0e10cSrcweir ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_SCENE_LIGHT_DIRECTION_8, aDefaultLightDirection ); 369*cdf0e10cSrcweir 370*cdf0e10cSrcweir uno::Any aDefaultLightColor; 371*cdf0e10cSrcweir aDefaultLightColor <<= ChartTypeHelper::getDefaultDirectLightColor(ThreeDLookScheme_Simple,0); 372*cdf0e10cSrcweir ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_SCENE_LIGHT_COLOR_1, aDefaultLightColor ); 373*cdf0e10cSrcweir ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_SCENE_LIGHT_COLOR_2, aDefaultLightColor ); 374*cdf0e10cSrcweir ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_SCENE_LIGHT_COLOR_3, aDefaultLightColor ); 375*cdf0e10cSrcweir ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_SCENE_LIGHT_COLOR_4, aDefaultLightColor ); 376*cdf0e10cSrcweir ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_SCENE_LIGHT_COLOR_5, aDefaultLightColor ); 377*cdf0e10cSrcweir ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_SCENE_LIGHT_COLOR_6, aDefaultLightColor ); 378*cdf0e10cSrcweir ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_SCENE_LIGHT_COLOR_7, aDefaultLightColor ); 379*cdf0e10cSrcweir ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_SCENE_LIGHT_COLOR_8, aDefaultLightColor ); 380*cdf0e10cSrcweir } 381*cdf0e10cSrcweir 382*cdf0e10cSrcweir } // namespace chart 383