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