Files
libreoffice/svx/source/engine3d/float3d.cxx

3289 lines
105 KiB
C++
Raw Normal View History

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
re-base on ALv2 code. Includes: Patch contributed by Christian Lippka impress212: #i113063# patch: dubios self assign in svx/source/dialog/framelink.cxx http://svn.apache.org/viewvc?view=revision&revision=1167619 Patches contributed by Mathias Bauer gnumake4 work variously http://svn.apache.org/viewvc?view=revision&revision=1394707 http://svn.apache.org/viewvc?view=revision&revision=1394326 cws mba34issues01: #i117712#: fix several resource errors introduced by IAccessible2 implementation http://svn.apache.org/viewvc?view=revision&revision=1172343 cws mba34issues01: #i117719#: use correct resource ID http://svn.apache.org/viewvc?view=revision&revision=1172351 Patch contributed by Andre Fischer Do not add targets for junit tests when junit is disabled. http://svn.apache.org/viewvc?view=revision&revision=1241508 Patches contributed by Armin Le-Grand #118804# corrected GraphicExporter behaviour on shortcut when pixel graphic is requested http://svn.apache.org/viewvc?view=revision&revision=1240195 fix for #118525#: Using primitives for chart sub-geometry visualisation http://svn.apache.org/viewvc?view=revision&revision=1226879 #118485# - Styles for OLEs are not saved. http://svn.apache.org/viewvc?view=revision&revision=1182166 #118524: apply patch, followup fixes to 118485 http://svn.apache.org/viewvc?view=revision&revision=1186077 13f79535-47bb-0310-9956-ffa450edef68 Patch contributed by Regina Henschel linecap: Reintegrating finished LineCap feature http://svn.apache.org/viewvc?view=revision&revision=1232507 Patch contributed by Wang Lei (leiw) #i118760# split the first table cell vertically, then undo&redo, the Presentation app will crash http://svn.apache.org/viewvc?view=revision&revision=1301361 cleanup globlmn hacks, undo dependent fixmes.
2012-11-21 22:06:52 +00:00
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
2000-09-18 16:07:07 +00:00
#include <sfx2/dispatch.hxx>
#include <sfx2/module.hxx>
#include <sfx2/viewfrm.hxx>
#include <svl/eitem.hxx>
2000-09-18 16:07:07 +00:00
#include <svtools/colrdlg.hxx>
#include <vcl/msgbox.hxx>
#include <sfx2/viewsh.hxx>
#include <tools/shl.hxx>
#include <svx/xflclit.hxx>
#include <svx/svdmodel.hxx>
#include <svx/globl3d.hxx>
#include <svx/view3d.hxx>
#include <svx/obj3d.hxx>
#include <svx/sphere3d.hxx>
#include <svx/scene3d.hxx>
#include <svx/camera3d.hxx>
#include <svx/fmmodel.hxx>
#include <svx/fmpage.hxx>
#include <svx/polysc3d.hxx>
#include <editeng/eeitem.hxx>
#include <svl/style.hxx>
#include <svx/dlgutil.hxx>
2000-09-18 16:07:07 +00:00
#include <svx/dialmgr.hxx>
#include <svx/viewpt3d.hxx>
2000-09-18 16:07:07 +00:00
#include <svx/svxids.hrc>
#include <svx/dialogs.hrc>
2000-09-18 16:07:07 +00:00
#include <editeng/colritem.hxx>
#include <svx/e3ditem.hxx>
#include <svx/gallery.hxx>
#include <svl/whiter.hxx>
2000-09-18 16:07:07 +00:00
#include <svx/float3d.hxx>
2000-09-18 16:07:07 +00:00
#include "float3d.hrc"
SFX_IMPL_DOCKINGWINDOW_WITHID( Svx3DChildWindow, SID_3D_WIN )
2000-09-18 16:07:07 +00:00
2002-06-03 08:01:44 +00:00
struct Svx3DWinImpl
{
SfxItemPool* pPool;
};
namespace {
/** Get the dispatcher from the current view frame, or, if that is not
available, from the given bindings.
@param pBindings
May be NULL.
@returns NULL when both the current view frame is NULL and the given
bindings are NULL.
*/
SfxDispatcher* LocalGetDispatcher (const SfxBindings* pBindings)
{
SfxDispatcher* pDispatcher = NULL;
if (SfxViewFrame::Current() != NULL)
pDispatcher = SfxViewFrame::Current()->GetDispatcher();
else if (pBindings != NULL)
pDispatcher = pBindings->GetDispatcher();
return pDispatcher;
}
}
2000-09-18 16:07:07 +00:00
/*************************************************************************
|* Svx3DWin - FloatingWindow
\************************************************************************/
2010-12-11 23:23:07 +01:00
Svx3DWin::Svx3DWin( SfxBindings* pInBindings,
2000-09-18 16:07:07 +00:00
SfxChildWindow *pCW, Window* pParent ) :
SfxDockingWindow ( pInBindings, pCW, pParent,
SVX_RES( RID_SVXFLOAT_3D ) ),
aBtnGeo ( this, SVX_RES( BTN_GEO ) ),
aBtnRepresentation ( this, SVX_RES( BTN_REPRESENTATION ) ),
aBtnLight ( this, SVX_RES( BTN_LIGHT ) ),
aBtnTexture ( this, SVX_RES( BTN_TEXTURE ) ),
aBtnMaterial ( this, SVX_RES( BTN_MATERIAL ) ),
aBtnUpdate ( this, SVX_RES( BTN_UPDATE ) ),
aBtnAssign ( this, SVX_RES( BTN_ASSIGN ) ),
aFLGeometrie ( this, SVX_RES( FL_GEOMETRIE ) ),
2000-09-18 16:07:07 +00:00
2011-04-07 15:47:21 +03:00
// Geometry
2000-09-18 16:07:07 +00:00
aFtPercentDiagonal ( this, SVX_RES( FT_PERCENT_DIAGONAL ) ),
aMtrPercentDiagonal ( this, SVX_RES( MTR_PERCENT_DIAGONAL ) ),
aFtBackscale ( this, SVX_RES( FT_BACKSCALE ) ),
aMtrBackscale ( this, SVX_RES( MTR_BACKSCALE ) ),
aFtEndAngle ( this, SVX_RES( FT_END_ANGLE ) ),
aMtrEndAngle ( this, SVX_RES( MTR_END_ANGLE ) ),
aFtDepth ( this, SVX_RES( FT_DEPTH ) ),
aMtrDepth ( this, SVX_RES( MTR_DEPTH ) ),
aFLSegments ( this, SVX_RES( FL_SEGMENTS ) ),
2000-09-18 16:07:07 +00:00
aFtHorizontal ( this, SVX_RES( FT_HORIZONTAL ) ),
aNumHorizontal ( this, SVX_RES( NUM_HORIZONTAL ) ),
aFtVertical ( this, SVX_RES( FT_VERTICAL ) ),
aNumVertical ( this, SVX_RES( NUM_VERTICAL ) ),
aFLNormals ( this, SVX_RES( FL_NORMALS ) ),
2000-09-18 16:07:07 +00:00
aBtnNormalsObj ( this, SVX_RES( BTN_NORMALS_OBJ ) ),
aBtnNormalsFlat ( this, SVX_RES( BTN_NORMALS_FLAT ) ),
aBtnNormalsSphere ( this, SVX_RES( BTN_NORMALS_SPHERE ) ),
aBtnNormalsInvert ( this, SVX_RES( BTN_NORMALS_INVERT ) ),
aBtnTwoSidedLighting( this, SVX_RES( BTN_TWO_SIDED_LIGHTING ) ),
2000-09-18 16:07:07 +00:00
aBtnDoubleSided ( this, SVX_RES( BTN_DOUBLE_SIDED ) ),
2011-04-07 15:47:21 +03:00
// Representation
aFLRepresentation ( this, SVX_RES( FL_REPRESENTATION ) ),
2000-09-18 16:07:07 +00:00
aFtShademode ( this, SVX_RES( FT_SHADEMODE ) ),
aLbShademode ( this, SVX_RES( LB_SHADEMODE ) ),
aFLShadow ( this, SVX_RES( FL_SHADOW ) ),
2000-09-18 16:07:07 +00:00
aBtnShadow3d ( this, SVX_RES( BTN_SHADOW_3D ) ),
aFtSlant ( this, SVX_RES( FT_SLANT ) ),
aMtrSlant ( this, SVX_RES( MTR_SLANT ) ),
aFtDistance ( this, SVX_RES( FT_DISTANCE ) ),
aMtrDistance ( this, SVX_RES( MTR_DISTANCE ) ),
aFtFocalLeng ( this, SVX_RES( FT_FOCAL_LENGTH ) ),
aMtrFocalLength ( this, SVX_RES( MTR_FOCAL_LENGTH ) ),
2001-06-14 17:08:42 +00:00
aFLCamera ( this, SVX_RES( FL_CAMERA ) ),
aFLLight ( this, SVX_RES( FL_LIGHT ) ),
2000-09-18 16:07:07 +00:00
2011-04-07 15:47:21 +03:00
// Lighting
2000-09-18 16:07:07 +00:00
aBtnLight1 ( this, SVX_RES( BTN_LIGHT_1 ) ),
aBtnLight2 ( this, SVX_RES( BTN_LIGHT_2 ) ),
aBtnLight3 ( this, SVX_RES( BTN_LIGHT_3 ) ),
aBtnLight4 ( this, SVX_RES( BTN_LIGHT_4 ) ),
aBtnLight5 ( this, SVX_RES( BTN_LIGHT_5 ) ),
aBtnLight6 ( this, SVX_RES( BTN_LIGHT_6 ) ),
aBtnLight7 ( this, SVX_RES( BTN_LIGHT_7 ) ),
aBtnLight8 ( this, SVX_RES( BTN_LIGHT_8 ) ),
aFTLightsource ( this, SVX_RES( FT_LIGHTSOURCE ) ),
2000-09-18 16:07:07 +00:00
aLbLight1 ( this, SVX_RES( LB_LIGHT_1 ) ),
aLbLight2 ( this, SVX_RES( LB_LIGHT_2 ) ),
aLbLight3 ( this, SVX_RES( LB_LIGHT_3 ) ),
aLbLight4 ( this, SVX_RES( LB_LIGHT_4 ) ),
aLbLight5 ( this, SVX_RES( LB_LIGHT_5 ) ),
aLbLight6 ( this, SVX_RES( LB_LIGHT_6 ) ),
aLbLight7 ( this, SVX_RES( LB_LIGHT_7 ) ),
aLbLight8 ( this, SVX_RES( LB_LIGHT_8 ) ),
2000-09-18 16:07:07 +00:00
aBtnLightColor ( this, SVX_RES( BTN_LIGHT_COLOR ) ),
2011-04-07 15:47:21 +03:00
// Keyboard shortcuts activate the next control, so the
// order needed to be changed here
aFTAmbientlight ( this, SVX_RES( FT_AMBIENTLIGHT ) ), // Text label
aLbAmbientlight ( this, SVX_RES( LB_AMBIENTLIGHT ) ), // ListBox
aBtnAmbientColor ( this, SVX_RES( BTN_AMBIENT_COLOR ) ), // color button
aFLTexture ( this, SVX_RES( FL_TEXTURE ) ),
2000-09-18 16:07:07 +00:00
2010-10-21 10:32:34 +01:00
// Textures
2000-09-18 16:07:07 +00:00
aFtTexKind ( this, SVX_RES( FT_TEX_KIND ) ),
aBtnTexLuminance ( this, SVX_RES( BTN_TEX_LUMINANCE ) ),
aBtnTexColor ( this, SVX_RES( BTN_TEX_COLOR ) ),
aFtTexMode ( this, SVX_RES( FT_TEX_MODE ) ),
aBtnTexReplace ( this, SVX_RES( BTN_TEX_REPLACE ) ),
aBtnTexModulate ( this, SVX_RES( BTN_TEX_MODULATE ) ),
aBtnTexBlend ( this, SVX_RES( BTN_TEX_BLEND ) ),
aFtTexProjectionX ( this, SVX_RES( FT_TEX_PROJECTION_X ) ),
aBtnTexObjectX ( this, SVX_RES( BTN_TEX_OBJECT_X ) ),
2000-09-18 16:07:07 +00:00
aBtnTexParallelX ( this, SVX_RES( BTN_TEX_PARALLEL_X ) ),
aBtnTexCircleX ( this, SVX_RES( BTN_TEX_CIRCLE_X ) ),
aFtTexProjectionY ( this, SVX_RES( FT_TEX_PROJECTION_Y ) ),
aBtnTexObjectY ( this, SVX_RES( BTN_TEX_OBJECT_Y ) ),
2000-09-18 16:07:07 +00:00
aBtnTexParallelY ( this, SVX_RES( BTN_TEX_PARALLEL_Y ) ),
aBtnTexCircleY ( this, SVX_RES( BTN_TEX_CIRCLE_Y ) ),
aFtTexFilter ( this, SVX_RES( FT_TEX_FILTER ) ),
aBtnTexFilter ( this, SVX_RES( BTN_TEX_FILTER ) ),
aFLMaterial ( this, SVX_RES( FL_MATERIAL ) ),
2000-09-18 16:07:07 +00:00
// Material
aFtMatFavorites ( this, SVX_RES( FT_MAT_FAVORITES ) ),
aLbMatFavorites ( this, SVX_RES( LB_MAT_FAVORITES ) ),
aFtMatColor ( this, SVX_RES( FT_MAT_COLOR ) ),
aLbMatColor ( this, SVX_RES( LB_MAT_COLOR ) ),
aBtnMatColor ( this, SVX_RES( BTN_MAT_COLOR ) ),
aFtMatEmission ( this, SVX_RES( FT_MAT_EMISSION ) ),
aLbMatEmission ( this, SVX_RES( LB_MAT_EMISSION ) ),
aBtnEmissionColor ( this, SVX_RES( BTN_EMISSION_COLOR ) ),
aFLMatSpecular ( this, SVX_RES( FL_MAT_SPECULAR ) ),
2000-09-18 16:07:07 +00:00
aFtMatSpecular ( this, SVX_RES( FT_MAT_SPECULAR ) ),
aLbMatSpecular ( this, SVX_RES( LB_MAT_SPECULAR ) ),
aBtnSpecularColor ( this, SVX_RES( BTN_SPECULAR_COLOR ) ),
aFtMatSpecularIntensity( this, SVX_RES( FT_MAT_SPECULAR_INTENSITY ) ),
aMtrMatSpecularIntensity( this, SVX_RES( MTR_MAT_SPECULAR_INTENSITY ) ),
aCtlPreview ( this, SVX_RES( CTL_PREVIEW ) ),
aCtlLightPreview ( this, SVX_RES( CTL_LIGHT_PREVIEW ) ),
2000-09-18 16:07:07 +00:00
2011-04-07 15:47:21 +03:00
// Lower Range
2000-09-18 16:07:07 +00:00
aBtnConvertTo3D ( this, SVX_RES( BTN_CHANGE_TO_3D ) ),
aBtnLatheObject ( this, SVX_RES( BTN_LATHE_OBJ ) ),
aBtnPerspective ( this, SVX_RES( BTN_PERSPECTIVE ) ),
2000-09-18 16:07:07 +00:00
aImgLightOn ( SVX_RES( RID_SVXIMAGE_LIGHT_ON ) ),
aImgLightOff ( SVX_RES( RID_SVXIMAGE_LIGHT_OFF ) ),
bUpdate ( sal_False ),
eViewType ( VIEWTYPE_GEO ),
2000-09-18 16:07:07 +00:00
pModel ( NULL ),
pVDev ( NULL ),
p3DView ( NULL ),
pBindings ( pInBindings ),
pControllerItem(0L),
pConvertTo3DItem(0L),
pConvertTo3DLatheItem(0L),
2002-06-03 08:01:44 +00:00
mpImpl ( new Svx3DWinImpl() ),
mpRemember2DAttributes(NULL),
bOnly3DChanged ( sal_False )
2000-09-18 16:07:07 +00:00
{
OUString accname(SVX_RESSTR(RID_SVXFLOAT3D_COLOR_LIGHT_PRE));
aCtlLightPreview.SetAccessibleName(accname);
aCtlPreview.SetAccessibleName(accname);
aLbAmbientlight.SetAccessibleName(aFTAmbientlight.GetDisplayText());
2002-06-03 08:01:44 +00:00
mpImpl->pPool = NULL;
2000-09-18 16:07:07 +00:00
FreeResource();
2011-04-07 15:47:21 +03:00
// Set Metric
eFUnit = pInBindings->GetDispatcher()->GetModule()->GetFieldUnit();
2000-09-18 16:07:07 +00:00
aMtrDepth.SetUnit( eFUnit );
aMtrDistance.SetUnit( eFUnit );
aMtrFocalLength.SetUnit( eFUnit );
pControllerItem = new Svx3DCtrlItem(SID_3D_STATE, pBindings);
2000-09-18 16:07:07 +00:00
pConvertTo3DItem = new SvxConvertTo3DItem(SID_CONVERT_TO_3D, pBindings);
pConvertTo3DLatheItem = new SvxConvertTo3DItem(SID_CONVERT_TO_3D_LATHE_FAST, pBindings);
aBtnAssign.SetClickHdl( LINK( this, Svx3DWin, ClickAssignHdl ) );
aBtnUpdate.SetClickHdl( LINK( this, Svx3DWin, ClickUpdateHdl ) );
Link aLink( LINK( this, Svx3DWin, ClickViewTypeHdl ) );
aBtnGeo.SetClickHdl( aLink );
aBtnRepresentation.SetClickHdl( aLink );
aBtnLight.SetClickHdl( aLink );
aBtnTexture.SetClickHdl( aLink );
aBtnMaterial.SetClickHdl( aLink );
aLink = LINK( this, Svx3DWin, ClickHdl );
aBtnPerspective.SetClickHdl( aLink );
aBtnConvertTo3D.SetClickHdl( aLink );
aBtnLatheObject.SetClickHdl( aLink );
2011-04-07 15:47:21 +03:00
// Geometry
2000-09-18 16:07:07 +00:00
aBtnNormalsObj.SetClickHdl( aLink );
aBtnNormalsFlat.SetClickHdl( aLink );
aBtnNormalsSphere.SetClickHdl( aLink );
aBtnTwoSidedLighting.SetClickHdl( aLink );
aBtnNormalsInvert.SetClickHdl( aLink );
aBtnDoubleSided.SetClickHdl( aLink );
2011-04-07 15:47:21 +03:00
// Representation
2000-09-18 16:07:07 +00:00
aBtnShadow3d.SetClickHdl( aLink );
2011-04-07 15:47:21 +03:00
// Lighting
2000-09-18 16:07:07 +00:00
aBtnLight1.SetClickHdl( aLink );
aBtnLight2.SetClickHdl( aLink );
aBtnLight3.SetClickHdl( aLink );
aBtnLight4.SetClickHdl( aLink );
aBtnLight5.SetClickHdl( aLink );
aBtnLight6.SetClickHdl( aLink );
aBtnLight7.SetClickHdl( aLink );
aBtnLight8.SetClickHdl( aLink );
2010-10-21 10:32:34 +01:00
// Textures
2000-09-18 16:07:07 +00:00
aBtnTexLuminance.SetClickHdl( aLink );
aBtnTexColor.SetClickHdl( aLink );
aBtnTexReplace.SetClickHdl( aLink );
aBtnTexModulate.SetClickHdl( aLink );
aBtnTexParallelX.SetClickHdl( aLink );
aBtnTexCircleX.SetClickHdl( aLink );
aBtnTexObjectX.SetClickHdl( aLink );
aBtnTexParallelY.SetClickHdl( aLink );
aBtnTexCircleY.SetClickHdl( aLink );
aBtnTexObjectY.SetClickHdl( aLink );
aBtnTexFilter.SetClickHdl( aLink );
// Material
aLink = LINK( this, Svx3DWin, ClickColorHdl );
aBtnLightColor.SetClickHdl( aLink );
aBtnAmbientColor.SetClickHdl( aLink );
aBtnMatColor.SetClickHdl( aLink );
aBtnEmissionColor.SetClickHdl( aLink );
aBtnSpecularColor.SetClickHdl( aLink );
aLink = LINK( this, Svx3DWin, SelectHdl );
aLbMatFavorites.SetSelectHdl( aLink );
aLbMatColor.SetSelectHdl( aLink );
aLbMatEmission.SetSelectHdl( aLink );
aLbMatSpecular.SetSelectHdl( aLink );
aLbLight1.SetSelectHdl( aLink );
aLbLight2.SetSelectHdl( aLink );
aLbLight3.SetSelectHdl( aLink );
aLbLight4.SetSelectHdl( aLink );
aLbLight5.SetSelectHdl( aLink );
aLbLight6.SetSelectHdl( aLink );
aLbLight7.SetSelectHdl( aLink );
aLbLight8.SetSelectHdl( aLink );
aLbAmbientlight.SetSelectHdl( aLink );
aLbShademode.SetSelectHdl( aLink );
aLink = LINK( this, Svx3DWin, ModifyHdl );
aMtrMatSpecularIntensity.SetModifyHdl( aLink );
aNumHorizontal.SetModifyHdl( aLink );
aNumVertical.SetModifyHdl( aLink );
aMtrSlant.SetModifyHdl( aLink );
2011-04-07 15:47:21 +03:00
// Preview callback
2000-09-18 16:07:07 +00:00
aLink = LINK( this, Svx3DWin, ChangeLightCallbackHdl );
2008-10-17 08:40:10 +00:00
aCtlLightPreview.SetUserInteractiveChangeCallback(aLink);
2000-09-18 16:07:07 +00:00
aLink = LINK( this, Svx3DWin, ChangeSelectionCallbackHdl );
2008-10-17 08:40:10 +00:00
aCtlLightPreview.SetUserSelectionChangeCallback(aLink);
2000-09-18 16:07:07 +00:00
aSize = GetOutputSizePixel();
SetMinOutputSizePixel( aSize );
Construct();
2011-04-07 15:47:21 +03:00
// Initiation of the initialization of the ColorLBs
SfxDispatcher* pDispatcher = LocalGetDispatcher(pBindings);
if (pDispatcher != NULL)
{
SfxBoolItem aItem( SID_3D_INIT, true );
pDispatcher->Execute(
SID_3D_INIT, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD, &aItem, 0L );
}
2000-09-18 16:07:07 +00:00
Reset();
aBtnNormalsObj.SetAccessibleRelationMemberOf( &aFLNormals );
aBtnNormalsFlat.SetAccessibleRelationMemberOf( &aFLNormals );
aBtnNormalsSphere.SetAccessibleRelationMemberOf( &aFLNormals );
aBtnNormalsInvert.SetAccessibleRelationMemberOf( &aFLNormals );
aBtnTwoSidedLighting.SetAccessibleRelationMemberOf( &aFLNormals );
aBtnDoubleSided.SetAccessibleRelationMemberOf( &aFLNormals );
aBtnLight1.SetAccessibleRelationMemberOf( &aFLLight );
aBtnLight2.SetAccessibleRelationMemberOf( &aFLLight );
aBtnLight3.SetAccessibleRelationMemberOf( &aFLLight );
aBtnLight4.SetAccessibleRelationMemberOf( &aFLLight );
aBtnLight5.SetAccessibleRelationMemberOf( &aFLLight );
aBtnLight6.SetAccessibleRelationMemberOf( &aFLLight );
aBtnLight7.SetAccessibleRelationMemberOf( &aFLLight );
aBtnLight8.SetAccessibleRelationMemberOf( &aFLLight );
aBtnLight1.SetAccessibleRelationLabeledBy( &aFTLightsource );
aBtnLight2.SetAccessibleRelationLabeledBy( &aFTLightsource );
aBtnLight3.SetAccessibleRelationLabeledBy( &aFTLightsource );
aBtnLight4.SetAccessibleRelationLabeledBy( &aFTLightsource );
aBtnLight5.SetAccessibleRelationLabeledBy( &aFTLightsource );
aBtnLight6.SetAccessibleRelationLabeledBy( &aFTLightsource );
aBtnLight7.SetAccessibleRelationLabeledBy( &aFTLightsource );
aBtnLight8.SetAccessibleRelationLabeledBy( &aFTLightsource );
aBtnLightColor.SetAccessibleRelationMemberOf( &aFLLight );
aBtnLightColor.SetAccessibleRelationLabeledBy( &aFTLightsource );
aBtnAmbientColor.SetAccessibleRelationMemberOf( &aFLLight );
aBtnAmbientColor.SetAccessibleRelationLabeledBy( &aFTAmbientlight );
aBtnSpecularColor.SetAccessibleRelationLabeledBy( &aFtMatSpecular );
aBtnMatColor.SetAccessibleRelationLabeledBy( &aFtMatColor );
aBtnEmissionColor.SetAccessibleRelationLabeledBy( &aFtMatEmission );
aBtnTexLuminance.SetAccessibleRelationLabeledBy( &aFtTexKind );
aBtnTexColor.SetAccessibleRelationLabeledBy( &aFtTexKind );
aBtnTexReplace.SetAccessibleRelationLabeledBy( &aFtTexMode );
aBtnTexModulate.SetAccessibleRelationLabeledBy( &aFtTexMode );
aBtnTexBlend.SetAccessibleRelationLabeledBy( &aFtTexMode );
aBtnTexObjectX.SetAccessibleRelationLabeledBy( &aFtTexProjectionX );
aBtnTexParallelX.SetAccessibleRelationLabeledBy( &aFtTexProjectionX );
aBtnTexCircleX.SetAccessibleRelationLabeledBy( &aFtTexProjectionX );
aBtnTexObjectY.SetAccessibleRelationLabeledBy( &aFtTexProjectionY );
aBtnTexParallelY.SetAccessibleRelationLabeledBy( &aFtTexProjectionY );
aBtnTexCircleY.SetAccessibleRelationLabeledBy( &aFtTexProjectionY );
aBtnTexFilter.SetAccessibleRelationLabeledBy( &aFtTexFilter );
aCtlLightPreview.SetAccessibleRelationLabeledBy( &aCtlLightPreview );
aBtnNormalsObj.SetAccessibleRelationMemberOf(&aFLNormals);
aBtnNormalsFlat.SetAccessibleRelationMemberOf(&aFLNormals);
aBtnNormalsSphere.SetAccessibleRelationMemberOf(&aFLNormals);
aBtnNormalsInvert.SetAccessibleRelationMemberOf(&aFLNormals);
aBtnTwoSidedLighting.SetAccessibleRelationMemberOf(&aFLNormals);
aBtnShadow3d.SetAccessibleRelationMemberOf(&aFLShadow);
aBtnLight1.SetAccessibleRelationMemberOf(&aFLLight);
aBtnLight2.SetAccessibleRelationMemberOf(&aFLLight);
aBtnLight3.SetAccessibleRelationMemberOf(&aFLLight);
aBtnLight4.SetAccessibleRelationMemberOf(&aFLLight);
aBtnLight5.SetAccessibleRelationMemberOf(&aFLLight);
aBtnLight6.SetAccessibleRelationMemberOf(&aFLLight);
aBtnLight7.SetAccessibleRelationMemberOf(&aFLLight);
aBtnLight8.SetAccessibleRelationMemberOf(&aFLLight);
aBtnTexLuminance.SetAccessibleRelationMemberOf(&aFLTexture);
aBtnTexColor.SetAccessibleRelationMemberOf(&aFLTexture);
aBtnTexReplace.SetAccessibleRelationMemberOf(&aFLTexture);
aBtnTexModulate.SetAccessibleRelationMemberOf(&aFLTexture);
aBtnTexBlend.SetAccessibleRelationMemberOf(&aFLTexture);
aBtnTexObjectX.SetAccessibleRelationMemberOf(&aFLTexture);
aBtnTexParallelX.SetAccessibleRelationMemberOf(&aFLTexture);
aBtnTexCircleX.SetAccessibleRelationMemberOf(&aFLTexture);
aBtnTexObjectY.SetAccessibleRelationMemberOf(&aFLTexture);
aBtnTexParallelY.SetAccessibleRelationMemberOf(&aFLTexture);
aBtnTexCircleY.SetAccessibleRelationMemberOf(&aFLTexture);
aBtnTexFilter.SetAccessibleRelationMemberOf(&aFLTexture);
aBtnMatColor.SetAccessibleRelationMemberOf(&aFLMaterial);
aBtnEmissionColor.SetAccessibleRelationMemberOf(&aFLMaterial);
aBtnSpecularColor.SetAccessibleRelationMemberOf(&aFLMatSpecular);
2000-09-18 16:07:07 +00:00
}
// -----------------------------------------------------------------------
2010-12-11 23:23:07 +01:00
Svx3DWin::~Svx3DWin()
2000-09-18 16:07:07 +00:00
{
delete p3DView;
delete pVDev;
delete pModel;
delete pControllerItem;
delete pConvertTo3DItem;
delete pConvertTo3DLatheItem;
delete mpRemember2DAttributes;
2002-06-03 08:01:44 +00:00
delete mpImpl;
2000-09-18 16:07:07 +00:00
}
// -----------------------------------------------------------------------
void Svx3DWin::Construct()
{
aBtnGeo.Check();
Link aLink( LINK( this, Svx3DWin, ClickViewTypeHdl ) );
aLink.Call( &aBtnGeo );
2000-09-18 16:07:07 +00:00
aCtlLightPreview.Hide();
}
// -----------------------------------------------------------------------
void Svx3DWin::Reset()
{
2011-04-07 15:47:21 +03:00
// Various initializations, default is AllAttributes
2000-09-18 16:07:07 +00:00
aLbShademode.SelectEntryPos( 0 );
aMtrMatSpecularIntensity.SetValue( 50 );
aBtnLight1.Check();
ClickUpdateHdl( NULL );
2011-04-07 15:47:21 +03:00
// Select nothing, to avoid errors when selecting the first
2008-10-17 08:40:10 +00:00
aCtlLightPreview.GetSvx3DLightControl().SelectLight(0);
aCtlLightPreview.CheckSelection();
2000-09-18 16:07:07 +00:00
}
bool Svx3DWin::GetUILightState( const ImageButton& rBtn ) const
2002-06-03 08:01:44 +00:00
{
return (rBtn.GetModeImage() == aImgLightOn);
2002-06-03 08:01:44 +00:00
}
void Svx3DWin::SetUILightState( ImageButton& aBtn, bool bState )
{
aBtn.SetModeImage( bState ? aImgLightOn : aImgLightOff );
2002-06-03 08:01:44 +00:00
}
2000-09-18 16:07:07 +00:00
// -----------------------------------------------------------------------
void Svx3DWin::Update( SfxItemSet& rAttrs )
{
// remember 2d attributes
if(mpRemember2DAttributes)
mpRemember2DAttributes->ClearItem();
else
mpRemember2DAttributes = new SfxItemSet(*rAttrs.GetPool(),
SDRATTR_START, SDRATTR_SHADOW_LAST,
SDRATTR_3D_FIRST, SDRATTR_3D_LAST,
0, 0);
SfxWhichIter aIter(*mpRemember2DAttributes);
sal_uInt16 nWhich(aIter.FirstWhich());
while(nWhich)
{
SfxItemState eState = rAttrs.GetItemState(nWhich, false);
if(SFX_ITEM_DONTCARE == eState)
mpRemember2DAttributes->InvalidateItem(nWhich);
else if(SFX_ITEM_SET == eState)
mpRemember2DAttributes->Put(rAttrs.Get(nWhich, sal_False));
nWhich = aIter.NextWhich();
}
// construct field values
2000-09-18 16:07:07 +00:00
const SfxPoolItem* pItem;
2011-04-07 15:47:21 +03:00
// Possible determine PoolUnit
2002-06-03 08:01:44 +00:00
if( !mpImpl->pPool )
2000-09-18 16:07:07 +00:00
{
2002-06-03 08:01:44 +00:00
mpImpl->pPool = rAttrs.GetPool();
2011-04-07 15:47:21 +03:00
DBG_ASSERT( mpImpl->pPool, "Where is the Pool? ");
2002-06-03 08:01:44 +00:00
ePoolUnit = mpImpl->pPool->GetMetric( SID_ATTR_LINE_WIDTH );
2000-09-18 16:07:07 +00:00
}
eFUnit = GetModuleFieldUnit( rAttrs );
2000-09-18 16:07:07 +00:00
2011-04-07 15:47:21 +03:00
// Segment Number Can be changed? and other states
SfxItemState eState = rAttrs.GetItemState( SID_ATTR_3D_INTERN, false, &pItem );
2000-09-18 16:07:07 +00:00
if( SFX_ITEM_SET == eState )
{
sal_uInt32 nState = ( ( const SfxUInt32Item* )pItem )->GetValue();
bool bExtrude = ( nState & 2 );
bool bSphere = ( nState & 4 );
bool bCube = ( nState & 8 );
2000-09-18 16:07:07 +00:00
bool bChart = ( nState & 32 ); // Chart
2000-09-18 16:07:07 +00:00
if( !bChart )
{
2011-04-07 15:47:21 +03:00
// For cube objects are no segments set
2000-09-18 16:07:07 +00:00
aFtHorizontal.Enable( !bCube );
aNumHorizontal.Enable( !bCube );
aFtVertical.Enable( !bCube );
aNumVertical.Enable( !bCube );
2001-06-14 17:08:42 +00:00
aFLSegments.Enable( !bCube );
2000-09-18 16:07:07 +00:00
aFtPercentDiagonal.Enable( !bCube && !bSphere );
aMtrPercentDiagonal.Enable( !bCube && !bSphere );
aFtBackscale.Enable( !bCube && !bSphere );
aMtrBackscale.Enable( !bCube && !bSphere );
aFtDepth.Enable( !bCube && !bSphere );
aMtrDepth.Enable( !bCube && !bSphere );
if( bCube )
{
aNumHorizontal.SetEmptyFieldValue();
aNumVertical.SetEmptyFieldValue();
}
if( bCube || bSphere )
{
aMtrPercentDiagonal.SetEmptyFieldValue();
aMtrBackscale.SetEmptyFieldValue();
aMtrDepth.SetEmptyFieldValue();
}
2011-04-07 15:47:21 +03:00
// There is a final angle only for Lathe objects.
2000-09-18 16:07:07 +00:00
aFtEndAngle.Enable( !bExtrude && !bCube && !bSphere );
aMtrEndAngle.Enable( !bExtrude && !bCube && !bSphere );
if( bExtrude || bCube || bSphere )
aMtrEndAngle.SetEmptyFieldValue();
}
else
{
2011-04-07 15:47:21 +03:00
// Geometry
aFtHorizontal.Enable( false );
aNumHorizontal.Enable( false );
2000-09-18 16:07:07 +00:00
aNumHorizontal.SetEmptyFieldValue();
aFtVertical.Enable( false );
aNumVertical.Enable( false );
2000-09-18 16:07:07 +00:00
aNumVertical.SetEmptyFieldValue();
aFLSegments.Enable( false );
aFtEndAngle.Enable( false );
aMtrEndAngle.Enable( false );
2000-09-18 16:07:07 +00:00
aMtrEndAngle.SetEmptyFieldValue();
aFtDepth.Enable( false );
aMtrDepth.Enable( false );
2000-09-18 16:07:07 +00:00
aMtrDepth.SetEmptyFieldValue();
2011-04-07 15:47:21 +03:00
// Representation
aBtnShadow3d.Enable( false );
aFtSlant.Enable( false );
aMtrSlant.Enable( false );
aFLShadow.Enable( false );
2000-09-18 16:07:07 +00:00
aFtDistance.Enable( false );
aMtrDistance.Enable( false );
2000-09-18 16:07:07 +00:00
aMtrDistance.SetEmptyFieldValue();
aFtFocalLeng.Enable( false );
aMtrFocalLength.Enable( false );
2000-09-18 16:07:07 +00:00
aMtrFocalLength.SetEmptyFieldValue();
aFLCamera.Enable( false );
2000-09-18 16:07:07 +00:00
2011-04-07 15:47:21 +03:00
//Lower Range
aBtnConvertTo3D.Enable( false );
aBtnLatheObject.Enable( false );
2000-09-18 16:07:07 +00:00
}
}
2011-04-07 15:47:21 +03:00
// Bitmap fill ? -> Status
sal_Bool bBitmap(sal_False);
eState = rAttrs.GetItemState(XATTR_FILLSTYLE);
if(eState != SFX_ITEM_DONTCARE)
2000-09-18 16:07:07 +00:00
{
XFillStyle eXFS = (XFillStyle)((const XFillStyleItem&)rAttrs.Get(XATTR_FILLSTYLE)).GetValue();
bBitmap = (eXFS == XFILL_BITMAP || eXFS == XFILL_GRADIENT || eXFS == XFILL_HATCH);
2000-09-18 16:07:07 +00:00
}
2000-09-18 16:07:07 +00:00
aFtTexKind.Enable( bBitmap );
aBtnTexLuminance.Enable( bBitmap );
aBtnTexColor.Enable( bBitmap );
aFtTexMode.Enable( bBitmap );
aBtnTexReplace.Enable( bBitmap );
aBtnTexModulate.Enable( bBitmap );
aBtnTexBlend.Enable( bBitmap );
aFtTexProjectionX.Enable( bBitmap );
aBtnTexParallelX.Enable( bBitmap );
aBtnTexCircleX.Enable( bBitmap );
aBtnTexObjectX.Enable( bBitmap );
aFtTexProjectionY.Enable( bBitmap );
aBtnTexParallelY.Enable( bBitmap );
aBtnTexCircleY.Enable( bBitmap );
aBtnTexObjectY.Enable( bBitmap );
aFtTexFilter.Enable( bBitmap );
aBtnTexFilter.Enable( bBitmap );
2001-06-14 17:08:42 +00:00
aFLTexture.Enable( bBitmap );
2000-09-18 16:07:07 +00:00
2011-04-07 15:47:21 +03:00
// Geometry
// Number of segments (horizontal)
2000-09-18 16:07:07 +00:00
if( aNumHorizontal.IsEnabled() )
{
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_HORZ_SEGS);
if(eState != SFX_ITEM_DONTCARE)
2000-09-18 16:07:07 +00:00
{
sal_uInt32 nValue = ((const Svx3DHorizontalSegmentsItem&)rAttrs.Get(SDRATTR_3DOBJ_HORZ_SEGS)).GetValue();
if(nValue != (sal_uInt32 )aNumHorizontal.GetValue())
2000-09-18 16:07:07 +00:00
{
aNumHorizontal.SetValue( nValue );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
else if( aNumHorizontal.IsEmptyFieldValue() )
aNumHorizontal.SetValue( nValue );
}
else
{
if( !aNumHorizontal.IsEmptyFieldValue() )
{
aNumHorizontal.SetEmptyFieldValue();
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
}
2011-04-07 15:47:21 +03:00
//Number of segments (vertical)
2000-09-18 16:07:07 +00:00
if( aNumVertical.IsEnabled() )
{
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_VERT_SEGS);
if( eState != SFX_ITEM_DONTCARE )
2000-09-18 16:07:07 +00:00
{
sal_uInt32 nValue = ((const Svx3DVerticalSegmentsItem&)rAttrs.Get(SDRATTR_3DOBJ_VERT_SEGS)).GetValue();
if( nValue != (sal_uInt32) aNumVertical.GetValue() )
2000-09-18 16:07:07 +00:00
{
aNumVertical.SetValue( nValue );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
else if( aNumVertical.IsEmptyFieldValue() )
aNumVertical.SetValue( nValue );
}
else
{
if( !aNumVertical.IsEmptyFieldValue() )
{
aNumVertical.SetEmptyFieldValue();
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
}
2011-04-07 15:47:21 +03:00
// Depth
2000-09-18 16:07:07 +00:00
if( aMtrDepth.IsEnabled() )
{
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_DEPTH);
if( eState != SFX_ITEM_DONTCARE )
2000-09-18 16:07:07 +00:00
{
sal_uInt32 nValue = ((const Svx3DDepthItem&)rAttrs.Get(SDRATTR_3DOBJ_DEPTH)).GetValue();
sal_uInt32 nValue2 = GetCoreValue( aMtrDepth, ePoolUnit );
2000-09-18 16:07:07 +00:00
if( nValue != nValue2 )
{
if( eFUnit != aMtrDepth.GetUnit() )
SetFieldUnit( aMtrDepth, eFUnit );
SetMetricValue( aMtrDepth, nValue, ePoolUnit );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
else if( aMtrDepth.IsEmptyFieldValue() )
aMtrDepth.SetValue( aMtrDepth.GetValue() );
}
else
{
if( !aMtrDepth.IsEmptyFieldValue() )
{
aMtrDepth.SetEmptyFieldValue();
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
}
2011-04-07 15:47:21 +03:00
// Double walled / Double sided
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_DOUBLE_SIDED);
if( eState != SFX_ITEM_DONTCARE )
2000-09-18 16:07:07 +00:00
{
bool bValue = ((const Svx3DDoubleSidedItem&)rAttrs.Get(SDRATTR_3DOBJ_DOUBLE_SIDED)).GetValue();
2000-09-18 16:07:07 +00:00
if( bValue != aBtnDoubleSided.IsChecked() )
{
aBtnDoubleSided.Check( bValue );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
else if( aBtnDoubleSided.GetState() == STATE_DONTKNOW )
aBtnDoubleSided.Check( bValue );
}
else
{
if( aBtnDoubleSided.GetState() != STATE_DONTKNOW )
{
aBtnDoubleSided.SetState( STATE_DONTKNOW );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
2011-04-07 15:47:21 +03:00
// Edge rounding
2000-09-18 16:07:07 +00:00
if( aMtrPercentDiagonal.IsEnabled() )
{
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_PERCENT_DIAGONAL);
if( eState != SFX_ITEM_DONTCARE )
2000-09-18 16:07:07 +00:00
{
sal_uInt16 nValue = ((const Svx3DPercentDiagonalItem&)rAttrs.Get(SDRATTR_3DOBJ_PERCENT_DIAGONAL)).GetValue();
2000-09-18 16:07:07 +00:00
if( nValue != aMtrPercentDiagonal.GetValue() )
{
aMtrPercentDiagonal.SetValue( nValue );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
else if( aMtrPercentDiagonal.IsEmptyFieldValue() )
aMtrPercentDiagonal.SetValue( nValue );
}
else
{
if( !aMtrPercentDiagonal.IsEmptyFieldValue() )
{
aMtrPercentDiagonal.SetEmptyFieldValue();
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
}
2011-04-07 15:47:21 +03:00
// Depth scaling
2000-09-18 16:07:07 +00:00
if( aMtrBackscale.IsEnabled() )
{
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_BACKSCALE);
if( eState != SFX_ITEM_DONTCARE )
2000-09-18 16:07:07 +00:00
{
sal_uInt16 nValue = ((const Svx3DBackscaleItem&)rAttrs.Get(SDRATTR_3DOBJ_BACKSCALE)).GetValue();
2000-09-18 16:07:07 +00:00
if( nValue != aMtrBackscale.GetValue() )
{
aMtrBackscale.SetValue( nValue );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
else if( aMtrBackscale.IsEmptyFieldValue() )
aMtrBackscale.SetValue( nValue );
}
else
{
if( !aMtrBackscale.IsEmptyFieldValue() )
{
aMtrBackscale.SetEmptyFieldValue();
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
}
2011-04-07 15:47:21 +03:00
// End angle
2000-09-18 16:07:07 +00:00
if( aMtrEndAngle.IsEnabled() )
{
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_END_ANGLE);
if( eState != SFX_ITEM_DONTCARE )
2000-09-18 16:07:07 +00:00
{
sal_Int32 nValue = ((const Svx3DEndAngleItem&)rAttrs.Get(SDRATTR_3DOBJ_END_ANGLE)).GetValue();
2000-09-18 16:07:07 +00:00
if( nValue != aMtrEndAngle.GetValue() )
{
aMtrEndAngle.SetValue( nValue );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
else
{
if( !aMtrEndAngle.IsEmptyFieldValue() )
{
aMtrEndAngle.SetEmptyFieldValue();
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
}
2011-04-07 15:47:21 +03:00
// Normal type
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_NORMALS_KIND);
if( eState != SFX_ITEM_DONTCARE )
2000-09-18 16:07:07 +00:00
{
sal_uInt16 nValue = ((const Svx3DNormalsKindItem&)rAttrs.Get(SDRATTR_3DOBJ_NORMALS_KIND)).GetValue();
2000-09-18 16:07:07 +00:00
if( ( !aBtnNormalsObj.IsChecked() && nValue == 0 ) ||
( !aBtnNormalsFlat.IsChecked() && nValue == 1 ) ||
( !aBtnNormalsSphere.IsChecked() && nValue == 2 ) )
{
aBtnNormalsObj.Check( nValue == 0 );
aBtnNormalsFlat.Check( nValue == 1 );
aBtnNormalsSphere.Check( nValue == 2 );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
else
{
if( aBtnNormalsObj.IsChecked() ||
aBtnNormalsFlat.IsChecked() ||
aBtnNormalsSphere.IsChecked() )
{
aBtnNormalsObj.Check( false );
aBtnNormalsFlat.Check( false );
aBtnNormalsSphere.Check( false );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
2011-04-07 15:47:21 +03:00
// Normal inverted
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_NORMALS_INVERT);
if( eState != SFX_ITEM_DONTCARE )
2000-09-18 16:07:07 +00:00
{
bool bValue = ((const Svx3DNormalsInvertItem&)rAttrs.Get(SDRATTR_3DOBJ_NORMALS_INVERT)).GetValue();
2000-09-18 16:07:07 +00:00
if( bValue != aBtnNormalsInvert.IsChecked() )
{
aBtnNormalsInvert.Check( bValue );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
else if( aBtnNormalsInvert.GetState() == STATE_DONTKNOW )
aBtnNormalsInvert.Check( bValue );
}
else
{
if( aBtnNormalsInvert.GetState() != STATE_DONTKNOW )
{
aBtnNormalsInvert.SetState( STATE_DONTKNOW );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
2011-04-07 15:47:21 +03:00
// 2-sided lighting
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_TWO_SIDED_LIGHTING);
if( eState != SFX_ITEM_DONTCARE )
2000-09-18 16:07:07 +00:00
{
bool bValue = ((const Svx3DTwoSidedLightingItem&)rAttrs.Get(SDRATTR_3DSCENE_TWO_SIDED_LIGHTING)).GetValue();
2000-09-18 16:07:07 +00:00
if( bValue != aBtnTwoSidedLighting.IsChecked() )
{
aBtnTwoSidedLighting.Check( bValue );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
else if( aBtnTwoSidedLighting.GetState() == STATE_DONTKNOW )
aBtnTwoSidedLighting.Check( bValue );
}
else
{
if( aBtnTwoSidedLighting.GetState() != STATE_DONTKNOW )
{
aBtnTwoSidedLighting.SetState( STATE_DONTKNOW );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
2011-04-07 15:47:21 +03:00
// Representation
2000-09-18 16:07:07 +00:00
// Shademode
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_SHADE_MODE);
if( eState != SFX_ITEM_DONTCARE )
2000-09-18 16:07:07 +00:00
{
sal_uInt16 nValue = ((const Svx3DShadeModeItem&)rAttrs.Get(SDRATTR_3DSCENE_SHADE_MODE)).GetValue();
2000-09-18 16:07:07 +00:00
if( nValue != aLbShademode.GetSelectEntryPos() )
{
aLbShademode.SelectEntryPos( nValue );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
else
{
if( aLbShademode.GetSelectEntryCount() != 0 )
{
aLbShademode.SetNoSelection();
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
2011-04-07 15:47:21 +03:00
// 3D-Shadow
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_SHADOW_3D);
if( eState != SFX_ITEM_DONTCARE )
2000-09-18 16:07:07 +00:00
{
bool bValue = ((const Svx3DShadow3DItem&)rAttrs.Get(SDRATTR_3DOBJ_SHADOW_3D)).GetValue();
2000-09-18 16:07:07 +00:00
if( bValue != aBtnShadow3d.IsChecked() )
{
aBtnShadow3d.Check( bValue );
aFtSlant.Enable( bValue );
aMtrSlant.Enable( bValue );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
else if( aBtnShadow3d.GetState() == STATE_DONTKNOW )
aBtnShadow3d.Check( bValue );
}
else
{
if( aBtnShadow3d.GetState() != STATE_DONTKNOW )
{
aBtnShadow3d.SetState( STATE_DONTKNOW );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
2011-04-07 15:47:21 +03:00
// Inclination (Shadow)
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_SHADOW_SLANT);
if( eState != SFX_ITEM_DONTCARE )
2000-09-18 16:07:07 +00:00
{
sal_uInt16 nValue = ((const Svx3DShadowSlantItem&)rAttrs.Get(SDRATTR_3DSCENE_SHADOW_SLANT)).GetValue();
2000-09-18 16:07:07 +00:00
if( nValue != aMtrSlant.GetValue() )
{
aMtrSlant.SetValue( nValue );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
else
{
if( !aMtrSlant.IsEmptyFieldValue() )
{
aMtrSlant.SetEmptyFieldValue();
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
2011-04-07 15:47:21 +03:00
// Distance
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_DISTANCE);
if( eState != SFX_ITEM_DONTCARE )
2000-09-18 16:07:07 +00:00
{
sal_uInt32 nValue = ((const Svx3DDistanceItem&)rAttrs.Get(SDRATTR_3DSCENE_DISTANCE)).GetValue();
sal_uInt32 nValue2 = GetCoreValue( aMtrDistance, ePoolUnit );
2000-09-18 16:07:07 +00:00
if( nValue != nValue2 )
{
if( eFUnit != aMtrDistance.GetUnit() )
SetFieldUnit( aMtrDistance, eFUnit );
SetMetricValue( aMtrDistance, nValue, ePoolUnit );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
else
{
if( !aMtrDepth.IsEmptyFieldValue() )
{
aMtrDepth.SetEmptyFieldValue();
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
2011-04-07 15:47:21 +03:00
// Focal length
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_FOCAL_LENGTH);
if( eState != SFX_ITEM_DONTCARE )
2000-09-18 16:07:07 +00:00
{
sal_uInt32 nValue = ((const Svx3DFocalLengthItem&)rAttrs.Get(SDRATTR_3DSCENE_FOCAL_LENGTH)).GetValue();
sal_uInt32 nValue2 = GetCoreValue( aMtrFocalLength, ePoolUnit );
2000-09-18 16:07:07 +00:00
if( nValue != nValue2 )
{
if( eFUnit != aMtrFocalLength.GetUnit() )
SetFieldUnit( aMtrFocalLength, eFUnit );
SetMetricValue( aMtrFocalLength, nValue, ePoolUnit );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
else
{
if( !aMtrFocalLength.IsEmptyFieldValue() )
{
aMtrFocalLength.SetEmptyFieldValue();
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
2011-04-07 15:47:21 +03:00
// Lighting
2000-09-18 16:07:07 +00:00
Color aColor;
basegfx::B3DVector aVector;
2011-04-07 15:47:21 +03:00
// Light 1 (Color)
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_1);
if( eState != SFX_ITEM_DONTCARE )
2000-09-18 16:07:07 +00:00
{
aColor = ((const Svx3DLightcolor1Item&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_1)).GetValue();
2000-09-18 16:07:07 +00:00
ColorLB* pLb = &aLbLight1;
if( aColor != pLb->GetSelectEntryColor() )
{
LBSelectColor( pLb, aColor );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
else
{
if( aLbLight1.GetSelectEntryCount() != 0 )
{
aLbLight1.SetNoSelection();
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
2011-04-07 15:47:21 +03:00
// Light 1 (on/off)
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTON_1);
if( eState != SFX_ITEM_DONTCARE )
2000-09-18 16:07:07 +00:00
{
bool bOn = ((const Svx3DLightOnOff1Item&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_1)).GetValue();
2002-06-03 08:01:44 +00:00
if( ( bOn && !GetUILightState( aBtnLight1 )) ||
( !bOn && GetUILightState( aBtnLight1 )) )
2000-09-18 16:07:07 +00:00
{
2002-06-03 08:01:44 +00:00
SetUILightState( aBtnLight1, bOn );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
if( aBtnLight1.GetState() == STATE_DONTKNOW )
aBtnLight1.Check( aBtnLight1.IsChecked() );
}
else
{
if( aBtnLight1.GetState() != STATE_DONTKNOW )
{
aBtnLight1.SetState( STATE_DONTKNOW );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
2011-04-07 15:47:21 +03:00
// Light 1 (direction)
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTDIRECTION_1);
if( eState != SFX_ITEM_DONTCARE )
2000-09-18 16:07:07 +00:00
{
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
2011-04-07 15:47:21 +03:00
//Light 2 (color)
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_2);
if( eState != SFX_ITEM_DONTCARE )
2000-09-18 16:07:07 +00:00
{
aColor = ((const Svx3DLightcolor2Item&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_2)).GetValue();
2000-09-18 16:07:07 +00:00
ColorLB* pLb = &aLbLight2;
if( aColor != pLb->GetSelectEntryColor() )
{
LBSelectColor( pLb, aColor );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
else
{
if( aLbLight2.GetSelectEntryCount() != 0 )
{
aLbLight2.SetNoSelection();
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
2011-04-07 15:47:21 +03:00
// Light 2 (on/off)
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTON_2);
if( eState != SFX_ITEM_DONTCARE )
2000-09-18 16:07:07 +00:00
{
bool bOn = ((const Svx3DLightOnOff2Item&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_2)).GetValue();
2002-06-03 08:01:44 +00:00
if( ( bOn && !GetUILightState( aBtnLight2 )) ||
( !bOn && GetUILightState( aBtnLight2 )) )
2000-09-18 16:07:07 +00:00
{
2002-06-03 08:01:44 +00:00
SetUILightState( aBtnLight2, bOn );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
if( aBtnLight2.GetState() == STATE_DONTKNOW )
aBtnLight2.Check( aBtnLight2.IsChecked() );
}
else
{
if( aBtnLight2.GetState() != STATE_DONTKNOW )
{
aBtnLight2.SetState( STATE_DONTKNOW );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
2011-04-07 15:47:21 +03:00
//Light 2 (Direction)
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTDIRECTION_2);
if( eState != SFX_ITEM_DONTCARE )
2000-09-18 16:07:07 +00:00
{
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
2011-04-07 15:47:21 +03:00
//Light 3 (color)
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_3);
if( eState != SFX_ITEM_DONTCARE )
2000-09-18 16:07:07 +00:00
{
aColor = ((const Svx3DLightcolor3Item&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_3)).GetValue();
2000-09-18 16:07:07 +00:00
ColorLB* pLb = &aLbLight3;
if( aColor != pLb->GetSelectEntryColor() )
{
LBSelectColor( pLb, aColor );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
else
{
if( aLbLight3.GetSelectEntryCount() != 0 )
{
aLbLight3.SetNoSelection();
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
2011-04-07 15:47:21 +03:00
// Ligh 3 (on/off)
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTON_3);
if( eState != SFX_ITEM_DONTCARE )
2000-09-18 16:07:07 +00:00
{
bool bOn = ((const Svx3DLightOnOff3Item&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_3)).GetValue();
2002-06-03 08:01:44 +00:00
if( ( bOn && !GetUILightState( aBtnLight3)) ||
( !bOn && GetUILightState( aBtnLight3)) )
2000-09-18 16:07:07 +00:00
{
2002-06-03 08:01:44 +00:00
SetUILightState( aBtnLight3, bOn );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
if( aBtnLight3.GetState() == STATE_DONTKNOW )
aBtnLight3.Check( aBtnLight3.IsChecked() );
}
else
{
if( aBtnLight3.GetState() != STATE_DONTKNOW )
{
aBtnLight3.SetState( STATE_DONTKNOW );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
2011-04-07 15:47:21 +03:00
// Light 3 (Direction)
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTDIRECTION_3);
if( eState != SFX_ITEM_DONTCARE )
2000-09-18 16:07:07 +00:00
{
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
2011-04-07 15:47:21 +03:00
// Light 4 (Color)
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_4);
if( eState != SFX_ITEM_DONTCARE )
2000-09-18 16:07:07 +00:00
{
aColor = ((const Svx3DLightcolor4Item&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_4)).GetValue();
2000-09-18 16:07:07 +00:00
ColorLB* pLb = &aLbLight4;
if( aColor != pLb->GetSelectEntryColor() )
{
LBSelectColor( pLb, aColor );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
else
{
if( aLbLight4.GetSelectEntryCount() != 0 )
{
aLbLight4.SetNoSelection();
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
2011-04-07 15:47:21 +03:00
// Light 4 (on/off)
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTON_4);
if( eState != SFX_ITEM_DONTCARE )
2000-09-18 16:07:07 +00:00
{
bool bOn = ((const Svx3DLightOnOff4Item&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_4)).GetValue();
2002-06-03 08:01:44 +00:00
if( ( bOn && !GetUILightState( aBtnLight4 )) ||
( !bOn && GetUILightState( aBtnLight4 )) )
2000-09-18 16:07:07 +00:00
{
2002-06-03 08:01:44 +00:00
SetUILightState( aBtnLight4, bOn );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
if( aBtnLight4.GetState() == STATE_DONTKNOW )
aBtnLight4.Check( aBtnLight4.IsChecked() );
}
else
{
if( aBtnLight4.GetState() != STATE_DONTKNOW )
{
aBtnLight4.SetState( STATE_DONTKNOW );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
2011-04-07 15:47:21 +03:00
// Light 4 (direction)
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTDIRECTION_4);
if( eState != SFX_ITEM_DONTCARE )
2000-09-18 16:07:07 +00:00
{
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
2011-04-07 15:47:21 +03:00
// Light 5 (color)
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_5);
if( eState != SFX_ITEM_DONTCARE )
2000-09-18 16:07:07 +00:00
{
aColor = ((const Svx3DLightcolor5Item&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_5)).GetValue();
2000-09-18 16:07:07 +00:00
ColorLB* pLb = &aLbLight5;
if( aColor != pLb->GetSelectEntryColor() )
{
LBSelectColor( pLb, aColor );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
else
{
if( aLbLight5.GetSelectEntryCount() != 0 )
{
aLbLight5.SetNoSelection();
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
2011-04-07 15:47:21 +03:00
// Light 5 (on/off)
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTON_5);
if( eState != SFX_ITEM_DONTCARE )
2000-09-18 16:07:07 +00:00
{
bool bOn = ((const Svx3DLightOnOff5Item&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_5)).GetValue();
2002-06-03 08:01:44 +00:00
if( ( bOn && !GetUILightState( aBtnLight5 )) ||
( !bOn && GetUILightState( aBtnLight5 )) )
2000-09-18 16:07:07 +00:00
{
2002-06-03 08:01:44 +00:00
SetUILightState( aBtnLight5, bOn );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
if( aBtnLight5.GetState() == STATE_DONTKNOW )
aBtnLight5.Check( aBtnLight5.IsChecked() );
}
else
{
if( aBtnLight5.GetState() != STATE_DONTKNOW )
{
aBtnLight5.SetState( STATE_DONTKNOW );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
2011-04-07 15:47:21 +03:00
// Light 5 (direction)
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTDIRECTION_5);
if( eState != SFX_ITEM_DONTCARE )
2000-09-18 16:07:07 +00:00
{
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
2011-04-07 15:47:21 +03:00
// Light 6 (color)
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_6);
if( eState != SFX_ITEM_DONTCARE )
2000-09-18 16:07:07 +00:00
{
aColor = ((const Svx3DLightcolor6Item&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_6)).GetValue();
2000-09-18 16:07:07 +00:00
ColorLB* pLb = &aLbLight6;
if( aColor != pLb->GetSelectEntryColor() )
{
LBSelectColor( pLb, aColor );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
else
{
if( aLbLight6.GetSelectEntryCount() != 0 )
{
aLbLight6.SetNoSelection();
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
2011-04-07 15:47:21 +03:00
// Light 6 (on/off)
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTON_6);
if( eState != SFX_ITEM_DONTCARE )
2000-09-18 16:07:07 +00:00
{
bool bOn = ((const Svx3DLightOnOff6Item&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_6)).GetValue();
2002-06-03 08:01:44 +00:00
if( ( bOn && !GetUILightState( aBtnLight6 )) ||
( !bOn && GetUILightState( aBtnLight6 )) )
2000-09-18 16:07:07 +00:00
{
2002-06-03 08:01:44 +00:00
SetUILightState( aBtnLight6, bOn );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
if( aBtnLight6.GetState() == STATE_DONTKNOW )
aBtnLight6.Check( aBtnLight6.IsChecked() );
}
else
{
if( aBtnLight6.GetState() != STATE_DONTKNOW )
{
aBtnLight6.SetState( STATE_DONTKNOW );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
2011-04-07 15:47:21 +03:00
// Light 6 (direction)
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTDIRECTION_6);
if( eState != SFX_ITEM_DONTCARE )
2000-09-18 16:07:07 +00:00
{
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
2011-04-07 15:47:21 +03:00
// Light 7 (color)
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_7);
if( eState != SFX_ITEM_DONTCARE )
2000-09-18 16:07:07 +00:00
{
aColor = ((const Svx3DLightcolor7Item&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_7)).GetValue();
2000-09-18 16:07:07 +00:00
ColorLB* pLb = &aLbLight7;
if( aColor != pLb->GetSelectEntryColor() )
{
LBSelectColor( pLb, aColor );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
else
{
if( aLbLight7.GetSelectEntryCount() != 0 )
{
aLbLight7.SetNoSelection();
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
2011-04-07 15:47:21 +03:00
// Light 7 (on/off)
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTON_7);
if( eState != SFX_ITEM_DONTCARE )
2000-09-18 16:07:07 +00:00
{
bool bOn = ((const Svx3DLightOnOff7Item&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_7)).GetValue();
2002-06-03 08:01:44 +00:00
if( ( bOn && !GetUILightState( aBtnLight7 )) ||
( !bOn && GetUILightState( aBtnLight7 )) )
2000-09-18 16:07:07 +00:00
{
2002-06-03 08:01:44 +00:00
SetUILightState( aBtnLight7 , bOn );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
if( aBtnLight7.GetState() == STATE_DONTKNOW )
aBtnLight7.Check( aBtnLight7.IsChecked() );
}
else
{
if( aBtnLight7.GetState() != STATE_DONTKNOW )
{
aBtnLight7.SetState( STATE_DONTKNOW );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
2011-04-07 15:47:21 +03:00
// Light 7 (direction)
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTDIRECTION_7);
if( eState != SFX_ITEM_DONTCARE )
2000-09-18 16:07:07 +00:00
{
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
2011-04-07 15:47:21 +03:00
// Light 8 (color)
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_8);
if( eState != SFX_ITEM_DONTCARE )
2000-09-18 16:07:07 +00:00
{
aColor = ((const Svx3DLightcolor8Item&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_8)).GetValue();
2000-09-18 16:07:07 +00:00
ColorLB* pLb = &aLbLight8;
if( aColor != pLb->GetSelectEntryColor() )
{
LBSelectColor( pLb, aColor );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
else
{
if( aLbLight8.GetSelectEntryCount() != 0 )
{
aLbLight8.SetNoSelection();
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
2011-04-07 15:47:21 +03:00
// Light 8 (on/off)
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTON_8);
if( eState != SFX_ITEM_DONTCARE )
2000-09-18 16:07:07 +00:00
{
bool bOn = ((const Svx3DLightOnOff8Item&)rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_8)).GetValue();
2002-06-03 08:01:44 +00:00
if( ( bOn && !GetUILightState( aBtnLight8 )) ||
( !bOn && GetUILightState( aBtnLight8 )) )
2000-09-18 16:07:07 +00:00
{
2002-06-03 08:01:44 +00:00
SetUILightState( aBtnLight8, bOn );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
if( aBtnLight8.GetState() == STATE_DONTKNOW )
aBtnLight8.Check( aBtnLight8.IsChecked() );
}
else
{
if( aBtnLight8.GetState() != STATE_DONTKNOW )
{
aBtnLight8.SetState( STATE_DONTKNOW );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
2011-04-07 15:47:21 +03:00
// Light 8 (direction)
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTDIRECTION_8);
if( eState != SFX_ITEM_DONTCARE )
2000-09-18 16:07:07 +00:00
{
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
2011-04-07 15:47:21 +03:00
// Ambient light
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_AMBIENTCOLOR);
if( eState != SFX_ITEM_DONTCARE )
2000-09-18 16:07:07 +00:00
{
aColor = ((const Svx3DAmbientcolorItem&)rAttrs.Get(SDRATTR_3DSCENE_AMBIENTCOLOR)).GetValue();
2000-09-18 16:07:07 +00:00
ColorLB* pLb = &aLbAmbientlight;
if( aColor != pLb->GetSelectEntryColor() )
{
LBSelectColor( pLb, aColor );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
else
{
if( aLbAmbientlight.GetSelectEntryCount() != 0 )
{
aLbAmbientlight.SetNoSelection();
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
2010-10-21 10:32:34 +01:00
// Textures
2000-09-18 16:07:07 +00:00
// Art
if( bBitmap )
{
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_TEXTURE_KIND);
if( eState != SFX_ITEM_DONTCARE )
2000-09-18 16:07:07 +00:00
{
sal_uInt16 nValue = ((const Svx3DTextureKindItem&)rAttrs.Get(SDRATTR_3DOBJ_TEXTURE_KIND)).GetValue();
2000-09-18 16:07:07 +00:00
if( ( !aBtnTexLuminance.IsChecked() && nValue == 1 ) ||
( !aBtnTexColor.IsChecked() && nValue == 3 ) )
2000-09-18 16:07:07 +00:00
{
aBtnTexLuminance.Check( nValue == 1 );
aBtnTexColor.Check( nValue == 3 );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
else
{
if( aBtnTexLuminance.IsChecked() ||
aBtnTexColor.IsChecked() )
{
aBtnTexLuminance.Check( false );
aBtnTexColor.Check( false );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
2011-04-07 15:47:21 +03:00
// Mode
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_TEXTURE_MODE);
if( eState != SFX_ITEM_DONTCARE )
2000-09-18 16:07:07 +00:00
{
sal_uInt16 nValue = ((const Svx3DTextureModeItem&)rAttrs.Get(SDRATTR_3DOBJ_TEXTURE_MODE)).GetValue();
2000-09-18 16:07:07 +00:00
if( ( !aBtnTexReplace.IsChecked() && nValue == 1 ) ||
( !aBtnTexModulate.IsChecked() && nValue == 2 ) )
2000-09-18 16:07:07 +00:00
{
aBtnTexReplace.Check( nValue == 1 );
aBtnTexModulate.Check( nValue == 2 );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
else
{
if( aBtnTexReplace.IsChecked() ||
aBtnTexModulate.IsChecked() )
{
aBtnTexReplace.Check( false );
aBtnTexModulate.Check( false );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
2011-04-07 15:47:21 +03:00
// Projection X
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_TEXTURE_PROJ_X);
if( eState != SFX_ITEM_DONTCARE )
2000-09-18 16:07:07 +00:00
{
sal_uInt16 nValue = ((const Svx3DTextureProjectionXItem&)rAttrs.Get(SDRATTR_3DOBJ_TEXTURE_PROJ_X)).GetValue();
2000-09-18 16:07:07 +00:00
if( ( !aBtnTexObjectX.IsChecked() && nValue == 0 ) ||
( !aBtnTexParallelX.IsChecked() && nValue == 1 ) ||
( !aBtnTexCircleX.IsChecked() && nValue == 2 ) )
{
aBtnTexObjectX.Check( nValue == 0 );
aBtnTexParallelX.Check( nValue == 1 );
aBtnTexCircleX.Check( nValue == 2 );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
else
{
if( aBtnTexObjectX.IsChecked() ||
aBtnTexParallelX.IsChecked() ||
aBtnTexCircleX.IsChecked() )
{
aBtnTexObjectX.Check( false );
aBtnTexParallelX.Check( false );
aBtnTexCircleX.Check( false );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
2011-04-07 15:47:21 +03:00
// Projection Y
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_TEXTURE_PROJ_Y);
if( eState != SFX_ITEM_DONTCARE )
2000-09-18 16:07:07 +00:00
{
sal_uInt16 nValue = ((const Svx3DTextureProjectionYItem&)rAttrs.Get(SDRATTR_3DOBJ_TEXTURE_PROJ_Y)).GetValue();
2000-09-18 16:07:07 +00:00
if( ( !aBtnTexObjectY.IsChecked() && nValue == 0 ) ||
( !aBtnTexParallelY.IsChecked() && nValue == 1 ) ||
( !aBtnTexCircleY.IsChecked() && nValue == 2 ) )
{
aBtnTexObjectY.Check( nValue == 0 );
aBtnTexParallelY.Check( nValue == 1 );
aBtnTexCircleY.Check( nValue == 2 );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
else
{
if( aBtnTexObjectY.IsChecked() ||
aBtnTexParallelY.IsChecked() ||
aBtnTexCircleY.IsChecked() )
{
aBtnTexObjectY.Check( false );
aBtnTexParallelY.Check( false );
aBtnTexCircleY.Check( false );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
// Filter
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_TEXTURE_FILTER);
if( eState != SFX_ITEM_DONTCARE )
2000-09-18 16:07:07 +00:00
{
bool bValue = ((const Svx3DTextureFilterItem&)rAttrs.Get(SDRATTR_3DOBJ_TEXTURE_FILTER)).GetValue();
2000-09-18 16:07:07 +00:00
if( bValue != aBtnTexFilter.IsChecked() )
{
aBtnTexFilter.Check( bValue );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
if( aBtnTexFilter.GetState() == STATE_DONTKNOW )
aBtnTexFilter.Check( bValue );
}
else
{
if( aBtnTexFilter.GetState() != STATE_DONTKNOW )
{
aBtnTexFilter.SetState( STATE_DONTKNOW );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
}
2011-04-07 15:47:21 +03:00
// Material Favorites
aLbMatFavorites.SelectEntryPos( 0 );
2000-09-18 16:07:07 +00:00
2011-04-07 15:47:21 +03:00
// Object color
eState = rAttrs.GetItemState(XATTR_FILLCOLOR);
if( eState != SFX_ITEM_DONTCARE )
2000-09-18 16:07:07 +00:00
{
aColor = ((const XFillColorItem&)rAttrs.Get(XATTR_FILLCOLOR)).GetColorValue();
2000-09-18 16:07:07 +00:00
ColorLB* pLb = &aLbMatColor;
if( aColor != pLb->GetSelectEntryColor() )
{
LBSelectColor( pLb, aColor );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
else
{
if( aLbMatColor.GetSelectEntryCount() != 0 )
{
aLbMatColor.SetNoSelection();
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
2011-04-07 15:47:21 +03:00
// Self-luminous color
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_MAT_EMISSION);
if( eState != SFX_ITEM_DONTCARE )
2000-09-18 16:07:07 +00:00
{
aColor = ((const Svx3DMaterialEmissionItem&)rAttrs.Get(SDRATTR_3DOBJ_MAT_EMISSION)).GetValue();
2000-09-18 16:07:07 +00:00
ColorLB* pLb = &aLbMatEmission;
if( aColor != pLb->GetSelectEntryColor() )
{
LBSelectColor( pLb, aColor );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
else
{
if( aLbMatEmission.GetSelectEntryCount() != 0 )
{
aLbMatEmission.SetNoSelection();
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
2011-04-07 15:47:21 +03:00
// Specular
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_MAT_SPECULAR);
if( eState != SFX_ITEM_DONTCARE )
2000-09-18 16:07:07 +00:00
{
aColor = ((const Svx3DMaterialSpecularItem&)rAttrs.Get(SDRATTR_3DOBJ_MAT_SPECULAR)).GetValue();
2000-09-18 16:07:07 +00:00
ColorLB* pLb = &aLbMatSpecular;
if( aColor != pLb->GetSelectEntryColor() )
{
LBSelectColor( pLb, aColor );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
else
{
if( aLbMatSpecular.GetSelectEntryCount() != 0 )
{
aLbMatSpecular.SetNoSelection();
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
2011-04-07 15:47:21 +03:00
// Specular Intensity
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY);
if( eState != SFX_ITEM_DONTCARE )
2000-09-18 16:07:07 +00:00
{
sal_uInt16 nValue = ((const Svx3DMaterialSpecularIntensityItem&)rAttrs.Get(SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY)).GetValue();
2000-09-18 16:07:07 +00:00
if( nValue != aMtrMatSpecularIntensity.GetValue() )
{
aMtrMatSpecularIntensity.SetValue( nValue );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
else
{
if( !aMtrMatSpecularIntensity.IsEmptyFieldValue() )
{
aMtrMatSpecularIntensity.SetEmptyFieldValue();
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
2011-04-07 15:47:21 +03:00
// Other
// Perspective
eState = rAttrs.GetItemState(SDRATTR_3DSCENE_PERSPECTIVE);
if( eState != SFX_ITEM_DONTCARE )
2000-09-18 16:07:07 +00:00
{
ProjectionType ePT = (ProjectionType)((const Svx3DPerspectiveItem&)rAttrs.Get(SDRATTR_3DSCENE_PERSPECTIVE)).GetValue();
2000-09-18 16:07:07 +00:00
if( ( !aBtnPerspective.IsChecked() && ePT == PR_PERSPECTIVE ) ||
( aBtnPerspective.IsChecked() && ePT == PR_PARALLEL ) )
{
aBtnPerspective.Check( ePT == PR_PERSPECTIVE );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
if( aBtnPerspective.GetState() == STATE_DONTKNOW )
aBtnPerspective.Check( ePT == PR_PERSPECTIVE );
}
else
{
if( aBtnPerspective.GetState() != STATE_DONTKNOW )
{
aBtnPerspective.SetState( STATE_DONTKNOW );
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
}
if( !bUpdate && !bOnly3DChanged )
{
2011-04-07 15:47:21 +03:00
// however the 2D attributes may be different. Compare these and decide
2000-09-18 16:07:07 +00:00
bUpdate = sal_True;
2000-09-18 16:07:07 +00:00
}
if( bUpdate || bOnly3DChanged )
{
2011-04-07 15:47:21 +03:00
// Update preview
SfxItemSet aSet(rAttrs);
// set LineStyle hard to XLINE_NONE when it's not set so that
// the default (XLINE_SOLID) is not used for 3d preview
if(SFX_ITEM_SET != aSet.GetItemState(XATTR_LINESTYLE, false))
aSet.Put(XLineStyleItem(XLINE_NONE));
// set FillColor hard to WHITE when it's SFX_ITEM_DONTCARE so that
// the default (Blue7) is not used for 3d preview
if(SFX_ITEM_DONTCARE == aSet.GetItemState(XATTR_FILLCOLOR, false))
aSet.Put(XFillColorItem(OUString(), Color(COL_WHITE)));
aCtlPreview.Set3DAttributes(aSet);
2008-10-17 08:40:10 +00:00
aCtlLightPreview.GetSvx3DLightControl().Set3DAttributes(aSet);
// try to select light corresponding to active button
sal_uInt32 nNumber(0xffffffff);
if(aBtnLight1.IsChecked())
nNumber = 0;
else if(aBtnLight2.IsChecked())
nNumber = 1;
else if(aBtnLight3.IsChecked())
nNumber = 2;
else if(aBtnLight4.IsChecked())
nNumber = 3;
else if(aBtnLight5.IsChecked())
nNumber = 4;
else if(aBtnLight6.IsChecked())
nNumber = 5;
else if(aBtnLight7.IsChecked())
nNumber = 6;
else if(aBtnLight8.IsChecked())
nNumber = 7;
if(nNumber != 0xffffffff)
{
aCtlLightPreview.GetSvx3DLightControl().SelectLight(nNumber);
}
2000-09-18 16:07:07 +00:00
}
// handle state of converts possible
aBtnConvertTo3D.Enable(pConvertTo3DItem->GetState());
aBtnLatheObject.Enable(pConvertTo3DLatheItem->GetState());
}
// -----------------------------------------------------------------------
void Svx3DWin::GetAttr( SfxItemSet& rAttrs )
{
// get remembered 2d attributes from the dialog
if(mpRemember2DAttributes)
{
SfxWhichIter aIter(*mpRemember2DAttributes);
sal_uInt16 nWhich(aIter.FirstWhich());
while(nWhich)
{
SfxItemState eState = mpRemember2DAttributes->GetItemState(nWhich, false);
if(SFX_ITEM_DONTCARE == eState)
rAttrs.InvalidateItem(nWhich);
else if(SFX_ITEM_SET == eState)
rAttrs.Put(mpRemember2DAttributes->Get(nWhich, sal_False));
nWhich = aIter.NextWhich();
}
}
2000-09-18 16:07:07 +00:00
2011-04-07 15:47:21 +03:00
//Others must stand as the front on all sides
// Perspective
2000-09-18 16:07:07 +00:00
if( aBtnPerspective.GetState() != STATE_DONTKNOW )
{
sal_uInt16 nValue;
2000-09-18 16:07:07 +00:00
if( aBtnPerspective.IsChecked() )
nValue = PR_PERSPECTIVE;
else
nValue = PR_PARALLEL;
rAttrs.Put(Svx3DPerspectiveItem(nValue));
2000-09-18 16:07:07 +00:00
}
else
rAttrs.InvalidateItem(SDRATTR_3DSCENE_PERSPECTIVE);
2000-09-18 16:07:07 +00:00
2011-04-07 15:47:21 +03:00
// Geometry
// Possible determine PoolUnit (in this case this has not happened in Update() )
2002-06-03 08:01:44 +00:00
if( !mpImpl->pPool )
2000-09-18 16:07:07 +00:00
{
2011-04-07 15:47:21 +03:00
OSL_FAIL( "No Pool in GetAttr()! May be incompatible to drviewsi.cxx ?" );
2002-06-03 08:01:44 +00:00
mpImpl->pPool = rAttrs.GetPool();
2011-04-07 15:47:21 +03:00
DBG_ASSERT( mpImpl->pPool, "Where is the Pool?" );
2002-06-03 08:01:44 +00:00
ePoolUnit = mpImpl->pPool->GetMetric( SID_ATTR_LINE_WIDTH );
2000-09-18 16:07:07 +00:00
eFUnit = GetModuleFieldUnit( rAttrs );
2000-09-18 16:07:07 +00:00
}
2011-04-07 15:47:21 +03:00
// Number of segments (horizontal)
2000-09-18 16:07:07 +00:00
if( !aNumHorizontal.IsEmptyFieldValue() )
{
sal_uInt32 nValue = static_cast<sal_uInt32>(aNumHorizontal.GetValue());
rAttrs.Put(Svx3DHorizontalSegmentsItem(nValue));
2000-09-18 16:07:07 +00:00
}
else
rAttrs.InvalidateItem(SDRATTR_3DOBJ_HORZ_SEGS);
2000-09-18 16:07:07 +00:00
2011-04-07 15:47:21 +03:00
// Number of segments (vertical)
2000-09-18 16:07:07 +00:00
if( !aNumVertical.IsEmptyFieldValue() )
{
sal_uInt32 nValue = static_cast<sal_uInt32>(aNumVertical.GetValue());
rAttrs.Put(Svx3DVerticalSegmentsItem(nValue));
2000-09-18 16:07:07 +00:00
}
else
rAttrs.InvalidateItem(SDRATTR_3DOBJ_VERT_SEGS);
2000-09-18 16:07:07 +00:00
2011-04-07 15:47:21 +03:00
// Depth
2000-09-18 16:07:07 +00:00
if( !aMtrDepth.IsEmptyFieldValue() )
{
sal_uInt32 nValue = GetCoreValue( aMtrDepth, ePoolUnit );
rAttrs.Put(Svx3DDepthItem(nValue));
2000-09-18 16:07:07 +00:00
}
else
rAttrs.InvalidateItem(SDRATTR_3DOBJ_DEPTH);
2000-09-18 16:07:07 +00:00
2011-04-07 15:47:21 +03:00
// Double-sided
2000-09-18 16:07:07 +00:00
TriState eState = aBtnDoubleSided.GetState();
if( eState != STATE_DONTKNOW )
{
sal_Bool bValue = STATE_CHECK == eState;
rAttrs.Put(Svx3DDoubleSidedItem(bValue));
2000-09-18 16:07:07 +00:00
}
else
rAttrs.InvalidateItem(SDRATTR_3DOBJ_DOUBLE_SIDED);
2000-09-18 16:07:07 +00:00
2011-04-07 15:47:21 +03:00
// Edge rounding
2000-09-18 16:07:07 +00:00
if( !aMtrPercentDiagonal.IsEmptyFieldValue() )
{
sal_uInt16 nValue = (sal_uInt16) aMtrPercentDiagonal.GetValue();
rAttrs.Put(Svx3DPercentDiagonalItem(nValue));
2000-09-18 16:07:07 +00:00
}
else
rAttrs.InvalidateItem(SDRATTR_3DOBJ_PERCENT_DIAGONAL);
2000-09-18 16:07:07 +00:00
2011-04-07 15:47:21 +03:00
// Depth scale
2000-09-18 16:07:07 +00:00
if( !aMtrBackscale.IsEmptyFieldValue() )
{
sal_uInt16 nValue = (sal_uInt16)aMtrBackscale.GetValue();
rAttrs.Put(Svx3DBackscaleItem(nValue));
2000-09-18 16:07:07 +00:00
}
else
rAttrs.InvalidateItem(SDRATTR_3DOBJ_BACKSCALE);
2000-09-18 16:07:07 +00:00
2011-04-07 15:47:21 +03:00
// End angle
2000-09-18 16:07:07 +00:00
if( !aMtrEndAngle.IsEmptyFieldValue() )
{
sal_uInt16 nValue = (sal_uInt16)aMtrEndAngle.GetValue();
rAttrs.Put(Svx3DEndAngleItem(nValue));
2000-09-18 16:07:07 +00:00
}
else
rAttrs.InvalidateItem(SDRATTR_3DOBJ_END_ANGLE);
2000-09-18 16:07:07 +00:00
2011-04-07 15:47:21 +03:00
// Normal type
sal_uInt16 nValue = 99;
2000-09-18 16:07:07 +00:00
if( aBtnNormalsObj.IsChecked() )
nValue = 0;
else if( aBtnNormalsFlat.IsChecked() )
nValue = 1;
else if( aBtnNormalsSphere.IsChecked() )
nValue = 2;
if( nValue <= 2 )
rAttrs.Put(Svx3DNormalsKindItem(nValue));
2000-09-18 16:07:07 +00:00
else
rAttrs.InvalidateItem(SDRATTR_3DOBJ_NORMALS_KIND);
2000-09-18 16:07:07 +00:00
2011-04-07 15:47:21 +03:00
// Normal inverted
2000-09-18 16:07:07 +00:00
eState = aBtnNormalsInvert.GetState();
if( eState != STATE_DONTKNOW )
{
sal_Bool bValue = STATE_CHECK == eState;
rAttrs.Put(Svx3DNormalsInvertItem(bValue));
2000-09-18 16:07:07 +00:00
}
else
rAttrs.InvalidateItem(SDRATTR_3DOBJ_NORMALS_INVERT);
2000-09-18 16:07:07 +00:00
2011-04-07 15:47:21 +03:00
// 2-sided lighting
2000-09-18 16:07:07 +00:00
eState = aBtnTwoSidedLighting.GetState();
if( eState != STATE_DONTKNOW )
{
sal_Bool bValue = STATE_CHECK == eState;
rAttrs.Put(Svx3DTwoSidedLightingItem(bValue));
2000-09-18 16:07:07 +00:00
}
else
rAttrs.InvalidateItem(SDRATTR_3DSCENE_TWO_SIDED_LIGHTING);
2000-09-18 16:07:07 +00:00
2011-04-07 15:47:21 +03:00
// Representation
// Shade mode
2000-09-18 16:07:07 +00:00
if( aLbShademode.GetSelectEntryCount() )
{
nValue = aLbShademode.GetSelectEntryPos();
rAttrs.Put(Svx3DShadeModeItem(nValue));
2000-09-18 16:07:07 +00:00
}
else
rAttrs.InvalidateItem(SDRATTR_3DSCENE_SHADE_MODE);
2000-09-18 16:07:07 +00:00
2011-04-07 15:47:21 +03:00
// 3D-Shadow
2000-09-18 16:07:07 +00:00
eState = aBtnShadow3d.GetState();
if( eState != STATE_DONTKNOW )
{
sal_Bool bValue = STATE_CHECK == eState;
rAttrs.Put(Svx3DShadow3DItem(bValue));
rAttrs.Put(SdrShadowItem(bValue));
2000-09-18 16:07:07 +00:00
}
else
{
rAttrs.InvalidateItem(SDRATTR_3DOBJ_SHADOW_3D);
rAttrs.InvalidateItem(SDRATTR_SHADOW);
2000-09-18 16:07:07 +00:00
}
2011-04-07 15:47:21 +03:00
// Slant (Shadow)
2000-09-18 16:07:07 +00:00
if( !aMtrSlant.IsEmptyFieldValue() )
{
sal_uInt16 nValue2 = (sal_uInt16) aMtrSlant.GetValue();
rAttrs.Put(Svx3DShadowSlantItem(nValue2));
2000-09-18 16:07:07 +00:00
}
else
rAttrs.InvalidateItem(SDRATTR_3DSCENE_SHADOW_SLANT);
2000-09-18 16:07:07 +00:00
2011-04-07 15:47:21 +03:00
// Distance
2000-09-18 16:07:07 +00:00
if( !aMtrDistance.IsEmptyFieldValue() )
{
sal_uInt32 nValue2 = GetCoreValue( aMtrDistance, ePoolUnit );
rAttrs.Put(Svx3DDistanceItem(nValue2));
2000-09-18 16:07:07 +00:00
}
else
rAttrs.InvalidateItem(SDRATTR_3DSCENE_DISTANCE);
2000-09-18 16:07:07 +00:00
2011-04-07 15:47:21 +03:00
// Focal length
2000-09-18 16:07:07 +00:00
if( !aMtrFocalLength.IsEmptyFieldValue() )
{
sal_uInt32 nValue2 = GetCoreValue( aMtrFocalLength, ePoolUnit );
rAttrs.Put(Svx3DFocalLengthItem(nValue2));
2000-09-18 16:07:07 +00:00
}
else
rAttrs.InvalidateItem(SDRATTR_3DSCENE_FOCAL_LENGTH);
2000-09-18 16:07:07 +00:00
2011-04-07 15:47:21 +03:00
// Lighting
2000-09-18 16:07:07 +00:00
Image aImg;
basegfx::B3DVector aVector;
2000-09-18 16:07:07 +00:00
Color aColor;
2008-10-17 08:40:10 +00:00
const SfxItemSet aLightItemSet(aCtlLightPreview.GetSvx3DLightControl().Get3DAttributes());
2011-04-07 15:47:21 +03:00
// Light 1 color
2000-09-18 16:07:07 +00:00
if( aLbLight1.GetSelectEntryCount() )
{
aColor = aLbLight1.GetSelectEntryColor();
rAttrs.Put(Svx3DLightcolor1Item(aColor));
2000-09-18 16:07:07 +00:00
}
else
rAttrs.InvalidateItem(SDRATTR_3DSCENE_LIGHTCOLOR_1);
2011-04-07 15:47:21 +03:00
// Light 1 (on/off)
2000-09-18 16:07:07 +00:00
eState = aBtnLight1.GetState();
if( eState != STATE_DONTKNOW )
{
sal_Bool bValue = GetUILightState( aBtnLight1 );
rAttrs.Put(Svx3DLightOnOff1Item(bValue));
2000-09-18 16:07:07 +00:00
2011-04-07 15:47:21 +03:00
// Light 1 (direction)
2000-09-18 16:07:07 +00:00
if( bValue )
{
2008-10-17 08:40:10 +00:00
rAttrs.Put(aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_1));
2000-09-18 16:07:07 +00:00
}
}
else
rAttrs.InvalidateItem(SDRATTR_3DSCENE_LIGHTON_1);
2000-09-18 16:07:07 +00:00
2011-04-07 15:47:21 +03:00
// Light 2 color
2000-09-18 16:07:07 +00:00
if( aLbLight2.GetSelectEntryCount() )
{
aColor = aLbLight2.GetSelectEntryColor();
rAttrs.Put(Svx3DLightcolor2Item(aColor));
2000-09-18 16:07:07 +00:00
}
else
rAttrs.InvalidateItem(SDRATTR_3DSCENE_LIGHTCOLOR_2);
2011-04-07 15:47:21 +03:00
// Light 2 (on/off)
2000-09-18 16:07:07 +00:00
eState = aBtnLight2.GetState();
if( eState != STATE_DONTKNOW )
{
sal_Bool bValue = GetUILightState( aBtnLight2 );
rAttrs.Put(Svx3DLightOnOff2Item(bValue));
2000-09-18 16:07:07 +00:00
2011-04-07 15:47:21 +03:00
// Light 2 (direction)
2000-09-18 16:07:07 +00:00
if( bValue )
{
2008-10-17 08:40:10 +00:00
rAttrs.Put(aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_2));
2000-09-18 16:07:07 +00:00
}
}
else
rAttrs.InvalidateItem(SDRATTR_3DSCENE_LIGHTON_2);
2000-09-18 16:07:07 +00:00
2011-04-07 15:47:21 +03:00
// Light 3 color
2000-09-18 16:07:07 +00:00
if( aLbLight3.GetSelectEntryCount() )
{
aColor = aLbLight3.GetSelectEntryColor();
rAttrs.Put(Svx3DLightcolor3Item(aColor));
2000-09-18 16:07:07 +00:00
}
else
rAttrs.InvalidateItem(SDRATTR_3DSCENE_LIGHTCOLOR_3);
2011-04-07 15:47:21 +03:00
// Light 3 (on/off)
2000-09-18 16:07:07 +00:00
eState = aBtnLight3.GetState();
if( eState != STATE_DONTKNOW )
{
sal_Bool bValue = GetUILightState( aBtnLight3 );
rAttrs.Put(Svx3DLightOnOff3Item(bValue));
2000-09-18 16:07:07 +00:00
2011-04-07 15:47:21 +03:00
// Light 3 (direction)
2000-09-18 16:07:07 +00:00
if( bValue )
{
2008-10-17 08:40:10 +00:00
rAttrs.Put(aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_3));
2000-09-18 16:07:07 +00:00
}
}
else
rAttrs.InvalidateItem(SDRATTR_3DSCENE_LIGHTON_3);
2000-09-18 16:07:07 +00:00
2011-04-07 15:47:21 +03:00
// Light 4 color
2000-09-18 16:07:07 +00:00
if( aLbLight4.GetSelectEntryCount() )
{
aColor = aLbLight4.GetSelectEntryColor();
rAttrs.Put(Svx3DLightcolor4Item(aColor));
2000-09-18 16:07:07 +00:00
}
else
rAttrs.InvalidateItem(SDRATTR_3DSCENE_LIGHTCOLOR_4);
2011-04-07 15:47:21 +03:00
// Light 4 (on/off)
2000-09-18 16:07:07 +00:00
eState = aBtnLight4.GetState();
if( eState != STATE_DONTKNOW )
{
sal_Bool bValue = GetUILightState( aBtnLight4 );
rAttrs.Put(Svx3DLightOnOff4Item(bValue));
2000-09-18 16:07:07 +00:00
2011-04-07 15:47:21 +03:00
// Light 4 (direction)
2000-09-18 16:07:07 +00:00
if( bValue )
{
2008-10-17 08:40:10 +00:00
rAttrs.Put(aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_4));
2000-09-18 16:07:07 +00:00
}
}
else
rAttrs.InvalidateItem(SDRATTR_3DSCENE_LIGHTON_4);
2000-09-18 16:07:07 +00:00
2011-04-07 15:47:21 +03:00
// Light 5 color
2000-09-18 16:07:07 +00:00
if( aLbLight5.GetSelectEntryCount() )
{
aColor = aLbLight5.GetSelectEntryColor();
rAttrs.Put(Svx3DLightcolor5Item(aColor));
2000-09-18 16:07:07 +00:00
}
else
rAttrs.InvalidateItem(SDRATTR_3DSCENE_LIGHTCOLOR_5);
2011-04-07 15:47:21 +03:00
// Light 5 (on/off)
2000-09-18 16:07:07 +00:00
eState = aBtnLight5.GetState();
if( eState != STATE_DONTKNOW )
{
sal_Bool bValue = GetUILightState( aBtnLight5 );
rAttrs.Put(Svx3DLightOnOff5Item(bValue));
2000-09-18 16:07:07 +00:00
2011-04-07 15:47:21 +03:00
// Light 5 (direction)
2000-09-18 16:07:07 +00:00
if( bValue )
{
2008-10-17 08:40:10 +00:00
rAttrs.Put(aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_5));
2000-09-18 16:07:07 +00:00
}
}
else
rAttrs.InvalidateItem(SDRATTR_3DSCENE_LIGHTON_5);
2000-09-18 16:07:07 +00:00
2011-04-07 15:47:21 +03:00
// Light 6 color
2000-09-18 16:07:07 +00:00
if( aLbLight6.GetSelectEntryCount() )
{
aColor = aLbLight6.GetSelectEntryColor();
rAttrs.Put(Svx3DLightcolor6Item(aColor));
2000-09-18 16:07:07 +00:00
}
else
rAttrs.InvalidateItem(SDRATTR_3DSCENE_LIGHTCOLOR_6);
2011-04-07 15:47:21 +03:00
// Light 6 (on/off)
2000-09-18 16:07:07 +00:00
eState = aBtnLight6.GetState();
if( eState != STATE_DONTKNOW )
{
sal_Bool bValue = GetUILightState( aBtnLight6 );
rAttrs.Put(Svx3DLightOnOff6Item(bValue));
2000-09-18 16:07:07 +00:00
2011-04-07 15:47:21 +03:00
// Light 6 (direction)
2000-09-18 16:07:07 +00:00
if( bValue )
{
2008-10-17 08:40:10 +00:00
rAttrs.Put(aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_6));
2000-09-18 16:07:07 +00:00
}
}
else
rAttrs.InvalidateItem(SDRATTR_3DSCENE_LIGHTON_6);
2000-09-18 16:07:07 +00:00
2011-04-07 15:47:21 +03:00
// Light 7 color
2000-09-18 16:07:07 +00:00
if( aLbLight7.GetSelectEntryCount() )
{
aColor = aLbLight7.GetSelectEntryColor();
rAttrs.Put(Svx3DLightcolor7Item(aColor));
2000-09-18 16:07:07 +00:00
}
else
rAttrs.InvalidateItem(SDRATTR_3DSCENE_LIGHTCOLOR_7);
2011-04-07 15:47:21 +03:00
// Light 7 (on/off)
2000-09-18 16:07:07 +00:00
eState = aBtnLight7.GetState();
if( eState != STATE_DONTKNOW )
{
sal_Bool bValue = GetUILightState( aBtnLight7 );
rAttrs.Put(Svx3DLightOnOff7Item(bValue));
2000-09-18 16:07:07 +00:00
2011-04-07 15:47:21 +03:00
// Light 7 (direction)
2000-09-18 16:07:07 +00:00
if( bValue )
{
2008-10-17 08:40:10 +00:00
rAttrs.Put(aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_7));
2000-09-18 16:07:07 +00:00
}
}
else
rAttrs.InvalidateItem(SDRATTR_3DSCENE_LIGHTON_7);
2000-09-18 16:07:07 +00:00
2011-04-07 15:47:21 +03:00
// Light 8 color
2000-09-18 16:07:07 +00:00
if( aLbLight8.GetSelectEntryCount() )
{
aColor = aLbLight8.GetSelectEntryColor();
rAttrs.Put(Svx3DLightcolor8Item(aColor));
2000-09-18 16:07:07 +00:00
}
else
rAttrs.InvalidateItem(SDRATTR_3DSCENE_LIGHTCOLOR_8);
2011-04-07 15:47:21 +03:00
// Light 8 (on/off)
2000-09-18 16:07:07 +00:00
eState = aBtnLight8.GetState();
if( eState != STATE_DONTKNOW )
{
sal_Bool bValue = GetUILightState( aBtnLight8 );
rAttrs.Put(Svx3DLightOnOff8Item(bValue));
2000-09-18 16:07:07 +00:00
2011-04-07 15:47:21 +03:00
// Light 8 (direction)
2000-09-18 16:07:07 +00:00
if( bValue )
{
2008-10-17 08:40:10 +00:00
rAttrs.Put(aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_8));
2000-09-18 16:07:07 +00:00
}
}
else
rAttrs.InvalidateItem(SDRATTR_3DSCENE_LIGHTON_8);
2000-09-18 16:07:07 +00:00
2011-04-07 15:47:21 +03:00
// Ambient light
2000-09-18 16:07:07 +00:00
if( aLbAmbientlight.GetSelectEntryCount() )
{
aColor = aLbAmbientlight.GetSelectEntryColor();
rAttrs.Put(Svx3DAmbientcolorItem(aColor));
2000-09-18 16:07:07 +00:00
}
else
rAttrs.InvalidateItem(SDRATTR_3DSCENE_AMBIENTCOLOR);
2000-09-18 16:07:07 +00:00
2010-10-21 10:32:34 +01:00
// Textures
2000-09-18 16:07:07 +00:00
// Art
nValue = 3;
2000-09-18 16:07:07 +00:00
if( aBtnTexLuminance.IsChecked() )
nValue = 1;
else if( aBtnTexColor.IsChecked() )
nValue = 3;
2000-09-18 16:07:07 +00:00
if( nValue == 1 || nValue == 3 )
rAttrs.Put(Svx3DTextureKindItem(nValue));
2000-09-18 16:07:07 +00:00
else
rAttrs.InvalidateItem(SDRATTR_3DOBJ_TEXTURE_KIND);
2000-09-18 16:07:07 +00:00
2011-04-07 15:47:21 +03:00
// Mode
2000-09-18 16:07:07 +00:00
nValue = 99;
if( aBtnTexReplace.IsChecked() )
nValue = 1;
else if( aBtnTexModulate.IsChecked() )
nValue = 2;
2000-09-18 16:07:07 +00:00
if( nValue == 1 || nValue == 2 )
rAttrs.Put(Svx3DTextureModeItem(nValue));
2000-09-18 16:07:07 +00:00
else
rAttrs.InvalidateItem(SDRATTR_3DOBJ_TEXTURE_MODE);
2000-09-18 16:07:07 +00:00
2011-04-07 15:47:21 +03:00
// X projection
2000-09-18 16:07:07 +00:00
nValue = 99;
if( aBtnTexObjectX.IsChecked() )
nValue = 0;
else if( aBtnTexParallelX.IsChecked() )
nValue = 1;
else if( aBtnTexCircleX.IsChecked() )
nValue = 2;
if( nValue <= 2 )
rAttrs.Put(Svx3DTextureProjectionXItem(nValue));
2000-09-18 16:07:07 +00:00
else
rAttrs.InvalidateItem(SDRATTR_3DOBJ_TEXTURE_PROJ_X);
2000-09-18 16:07:07 +00:00
2011-04-07 15:47:21 +03:00
// Y projection
2000-09-18 16:07:07 +00:00
nValue = 99;
if( aBtnTexObjectY.IsChecked() )
nValue = 0;
else if( aBtnTexParallelY.IsChecked() )
nValue = 1;
else if( aBtnTexCircleY.IsChecked() )
nValue = 2;
if( nValue <= 2 )
rAttrs.Put(Svx3DTextureProjectionYItem(nValue));
2000-09-18 16:07:07 +00:00
else
rAttrs.InvalidateItem(SDRATTR_3DOBJ_TEXTURE_PROJ_Y);
2000-09-18 16:07:07 +00:00
// Filter
eState = aBtnTexFilter.GetState();
if( eState != STATE_DONTKNOW )
{
sal_Bool bValue = STATE_CHECK == eState;
rAttrs.Put(Svx3DTextureFilterItem(bValue));
2000-09-18 16:07:07 +00:00
}
else
rAttrs.InvalidateItem(SDRATTR_3DOBJ_TEXTURE_FILTER);
2000-09-18 16:07:07 +00:00
// Material
2011-04-07 15:47:21 +03:00
// Object color
2000-09-18 16:07:07 +00:00
if( aLbMatColor.GetSelectEntryCount() )
{
aColor = aLbMatColor.GetSelectEntryColor();
rAttrs.Put( XFillColorItem( "", aColor) );
2000-09-18 16:07:07 +00:00
}
else
{
rAttrs.InvalidateItem( XATTR_FILLCOLOR );
}
2011-04-07 15:47:21 +03:00
// luminous color
2000-09-18 16:07:07 +00:00
if( aLbMatEmission.GetSelectEntryCount() )
{
aColor = aLbMatEmission.GetSelectEntryColor();
rAttrs.Put(Svx3DMaterialEmissionItem(aColor));
2000-09-18 16:07:07 +00:00
}
else
rAttrs.InvalidateItem(SDRATTR_3DOBJ_MAT_EMISSION);
2000-09-18 16:07:07 +00:00
2011-04-07 15:47:21 +03:00
// Specular
2000-09-18 16:07:07 +00:00
if( aLbMatSpecular.GetSelectEntryCount() )
{
aColor = aLbMatSpecular.GetSelectEntryColor();
rAttrs.Put(Svx3DMaterialSpecularItem(aColor));
2000-09-18 16:07:07 +00:00
}
else
rAttrs.InvalidateItem(SDRATTR_3DOBJ_MAT_SPECULAR);
2000-09-18 16:07:07 +00:00
2011-04-07 15:47:21 +03:00
// Specular intensity
2000-09-18 16:07:07 +00:00
if( !aMtrMatSpecularIntensity.IsEmptyFieldValue() )
{
sal_uInt16 nValue2 = (sal_uInt16) aMtrMatSpecularIntensity.GetValue();
rAttrs.Put(Svx3DMaterialSpecularIntensityItem(nValue2));
2000-09-18 16:07:07 +00:00
}
else
rAttrs.InvalidateItem(SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY);
2000-09-18 16:07:07 +00:00
}
// -----------------------------------------------------------------------
2010-12-11 23:23:07 +01:00
void Svx3DWin::Resize()
2000-09-18 16:07:07 +00:00
{
if ( !IsFloatingMode() ||
!GetFloatingWindow()->IsRollUp() )
{
2011-04-07 15:47:21 +03:00
Size aWinSize( GetOutputSizePixel() ); // why rSize in Resizing()?
2000-09-18 16:07:07 +00:00
if( aWinSize.Height() >= GetMinOutputSizePixel().Height() &&
aWinSize.Width() >= GetMinOutputSizePixel().Width() )
{
Size aDiffSize;
aDiffSize.Width() = aWinSize.Width() - aSize.Width();
aDiffSize.Height() = aWinSize.Height() - aSize.Height();
Point aXPt;
Point aYPt;
aXPt.X() = aDiffSize.Width();
aYPt.Y() = aDiffSize.Height();
Size aObjSize;
// Hide
aBtnUpdate.Hide();
aBtnAssign.Hide();
aBtnConvertTo3D.Hide();
aBtnLatheObject.Hide();
aBtnPerspective.Hide();
aCtlPreview.Hide();
aCtlLightPreview.Hide();
2001-06-14 17:08:42 +00:00
aFLGeometrie.Hide();
aFLRepresentation.Hide();
aFLLight.Hide();
aFLTexture.Hide();
aFLMaterial.Hide();
2000-09-18 16:07:07 +00:00
2011-04-07 15:47:21 +03:00
// Moving / resizing
2000-09-18 16:07:07 +00:00
aBtnUpdate.SetPosPixel( aBtnUpdate.GetPosPixel() + aXPt );
aBtnAssign.SetPosPixel( aBtnAssign.GetPosPixel() + aXPt );
2011-04-07 15:47:21 +03:00
// Preview controls
2000-09-18 16:07:07 +00:00
aObjSize = aCtlPreview.GetOutputSizePixel();
aObjSize.Width() += aDiffSize.Width();
aObjSize.Height() += aDiffSize.Height();
aCtlPreview.SetOutputSizePixel( aObjSize );
aCtlLightPreview.SetOutputSizePixel( aObjSize );
2001-06-14 17:08:42 +00:00
// Groups
aObjSize = aFLGeometrie.GetOutputSizePixel();
2000-09-18 16:07:07 +00:00
aObjSize.Width() += aDiffSize.Width();
2001-06-14 17:08:42 +00:00
aFLGeometrie.SetOutputSizePixel( aObjSize );
aFLSegments.SetOutputSizePixel( aObjSize );
aFLShadow.SetOutputSizePixel( aObjSize );
aFLCamera.SetOutputSizePixel( aObjSize );
aFLRepresentation.SetOutputSizePixel( aObjSize );
aFLLight.SetOutputSizePixel( aObjSize );
aFLTexture.SetOutputSizePixel( aObjSize );
aFLMaterial.SetOutputSizePixel( aObjSize );
2000-09-18 16:07:07 +00:00
2011-04-07 15:47:21 +03:00
// Y-position of the lower buttons
2000-09-18 16:07:07 +00:00
aBtnConvertTo3D.SetPosPixel( aBtnConvertTo3D.GetPosPixel() + aYPt );
aBtnLatheObject.SetPosPixel( aBtnLatheObject.GetPosPixel() + aYPt );
aBtnPerspective.SetPosPixel( aBtnPerspective.GetPosPixel() + aYPt );
// Show
aBtnUpdate.Show();
aBtnAssign.Show();
aBtnConvertTo3D.Show();
aBtnLatheObject.Show();
aBtnPerspective.Show();
if( aBtnGeo.IsChecked() )
ClickViewTypeHdl( &aBtnGeo );
if( aBtnRepresentation.IsChecked() )
ClickViewTypeHdl( &aBtnRepresentation );
if( aBtnLight.IsChecked() )
ClickViewTypeHdl( &aBtnLight );
if( aBtnTexture.IsChecked() )
ClickViewTypeHdl( &aBtnTexture );
if( aBtnMaterial.IsChecked() )
ClickViewTypeHdl( &aBtnMaterial );
aSize = aWinSize;
}
}
SfxDockingWindow::Resize();
}
// -----------------------------------------------------------------------
IMPL_LINK_NOARG(Svx3DWin, ClickUpdateHdl)
2000-09-18 16:07:07 +00:00
{
bUpdate = !aBtnUpdate.IsChecked();
aBtnUpdate.Check( bUpdate );
if( bUpdate )
{
SfxDispatcher* pDispatcher = LocalGetDispatcher(pBindings);
if (pDispatcher != NULL)
{
SfxBoolItem aItem( SID_3D_STATE, true );
pDispatcher->Execute(
SID_3D_STATE, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD, &aItem, 0L );
}
2000-09-18 16:07:07 +00:00
}
else
{
2011-04-07 15:47:21 +03:00
// Controls can be disabled during certain circumstances
2000-09-18 16:07:07 +00:00
}
return( 0L );
}
// -----------------------------------------------------------------------
IMPL_LINK_NOARG(Svx3DWin, ClickAssignHdl)
2000-09-18 16:07:07 +00:00
{
SfxDispatcher* pDispatcher = LocalGetDispatcher(pBindings);
if (pDispatcher != NULL)
{
SfxBoolItem aItem( SID_3D_ASSIGN, true );
pDispatcher->Execute(
SID_3D_ASSIGN, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD, &aItem, 0L );
}
2000-09-18 16:07:07 +00:00
return( 0L );
}
// -----------------------------------------------------------------------
IMPL_LINK( Svx3DWin, ClickViewTypeHdl, void *, pBtn )
{
if( pBtn )
{
2011-04-07 15:47:21 +03:00
// Since the permanent updating of the preview would be too expensive
sal_Bool bUpdatePreview = aBtnLight.IsChecked();
2000-09-18 16:07:07 +00:00
aBtnGeo.Check( &aBtnGeo == pBtn );
aBtnRepresentation.Check( &aBtnRepresentation == pBtn );
aBtnLight.Check( &aBtnLight == pBtn );
aBtnTexture.Check( &aBtnTexture == pBtn );
aBtnMaterial.Check( &aBtnMaterial == pBtn );
if( aBtnGeo.IsChecked() )
eViewType = VIEWTYPE_GEO;
if( aBtnRepresentation.IsChecked() )
eViewType = VIEWTYPE_REPRESENTATION;
if( aBtnLight.IsChecked() )
eViewType = VIEWTYPE_LIGHT;
if( aBtnTexture.IsChecked() )
eViewType = VIEWTYPE_TEXTURE;
if( aBtnMaterial.IsChecked() )
eViewType = VIEWTYPE_MATERIAL;
2011-04-07 15:47:21 +03:00
// Geometry
2000-09-18 16:07:07 +00:00
if( eViewType == VIEWTYPE_GEO )
{
aFtHorizontal.Show();
aNumHorizontal.Show();
aFtVertical.Show();
aNumVertical.Show();
2001-06-14 17:08:42 +00:00
aFLSegments.Show();
2000-09-18 16:07:07 +00:00
aFtPercentDiagonal.Show();
aMtrPercentDiagonal.Show();
aFtBackscale.Show();
aMtrBackscale.Show();
aFtEndAngle.Show();
aMtrEndAngle.Show();
aFtDepth.Show();
aMtrDepth.Show();
2001-06-14 17:08:42 +00:00
aFLGeometrie.Show();
2000-09-18 16:07:07 +00:00
aBtnNormalsObj.Show();
aBtnNormalsFlat.Show();
aBtnNormalsSphere.Show();
aBtnTwoSidedLighting.Show();
aBtnNormalsInvert.Show();
2001-06-14 17:08:42 +00:00
aFLNormals.Show();
2000-09-18 16:07:07 +00:00
aBtnDoubleSided.Show();
}
else
{
aFtHorizontal.Hide();
aNumHorizontal.Hide();
aFtVertical.Hide();
aNumVertical.Hide();
2001-06-14 17:08:42 +00:00
aFLSegments.Hide();
2000-09-18 16:07:07 +00:00
aFtPercentDiagonal.Hide();
aMtrPercentDiagonal.Hide();
aFtBackscale.Hide();
aMtrBackscale.Hide();
aFtEndAngle.Hide();
aMtrEndAngle.Hide();
aFtDepth.Hide();
aMtrDepth.Hide();
2001-06-14 17:08:42 +00:00
aFLGeometrie.Hide();
2000-09-18 16:07:07 +00:00
aBtnNormalsObj.Hide();
aBtnNormalsFlat.Hide();
aBtnNormalsSphere.Hide();
aBtnTwoSidedLighting.Hide();
aBtnNormalsInvert.Hide();
2001-06-14 17:08:42 +00:00
aFLNormals.Hide();
2000-09-18 16:07:07 +00:00
aBtnDoubleSided.Hide();
}
2011-04-07 15:47:21 +03:00
// Representation
2000-09-18 16:07:07 +00:00
if( eViewType == VIEWTYPE_REPRESENTATION )
{
aFtShademode.Show();
aLbShademode.Show();
aBtnShadow3d.Show();
aFtSlant.Show();
aMtrSlant.Show();
2001-06-14 17:08:42 +00:00
aFLShadow.Show();
2000-09-18 16:07:07 +00:00
aFtDistance.Show();
aMtrDistance.Show();
aFtFocalLeng.Show();
aMtrFocalLength.Show();
2001-06-14 17:08:42 +00:00
aFLCamera.Show();
aFLRepresentation.Show();
2000-09-18 16:07:07 +00:00
}
else
{
aFtShademode.Hide();
aLbShademode.Hide();
aBtnShadow3d.Hide();
aFtSlant.Hide();
aMtrSlant.Hide();
2001-06-14 17:08:42 +00:00
aFLShadow.Hide();
2000-09-18 16:07:07 +00:00
aFtDistance.Hide();
aMtrDistance.Hide();
aFtFocalLeng.Hide();
aMtrFocalLength.Hide();
2001-06-14 17:08:42 +00:00
aFLCamera.Hide();
aFLRepresentation.Hide();
2000-09-18 16:07:07 +00:00
}
2011-04-07 15:47:21 +03:00
// Lighting
2000-09-18 16:07:07 +00:00
if( eViewType == VIEWTYPE_LIGHT )
{
aBtnLight1.Show();
aBtnLight2.Show();
aBtnLight3.Show();
aBtnLight4.Show();
aBtnLight5.Show();
aBtnLight6.Show();
aBtnLight7.Show();
aBtnLight8.Show();
aBtnLightColor.Show();
2001-06-14 17:08:42 +00:00
aFTLightsource.Show();
2000-09-18 16:07:07 +00:00
aLbAmbientlight.Show();
aBtnAmbientColor.Show();
2001-06-14 17:08:42 +00:00
aFTAmbientlight.Show();
aFLLight.Show();
2000-09-18 16:07:07 +00:00
ColorLB* pLb = GetLbByButton();
if( pLb )
pLb->Show();
aCtlLightPreview.Show();
aCtlPreview.Hide();
}
else
{
aBtnLight1.Hide();
aBtnLight2.Hide();
aBtnLight3.Hide();
aBtnLight4.Hide();
aBtnLight5.Hide();
aBtnLight6.Hide();
aBtnLight7.Hide();
aBtnLight8.Hide();
aLbLight1.Hide();
aLbLight2.Hide();
aLbLight3.Hide();
aLbLight4.Hide();
aLbLight5.Hide();
aLbLight6.Hide();
aLbLight7.Hide();
aLbLight8.Hide();
aBtnLightColor.Hide();
2001-06-14 17:08:42 +00:00
aFTLightsource.Hide();
2000-09-18 16:07:07 +00:00
aLbAmbientlight.Hide();
aBtnAmbientColor.Hide();
2001-06-14 17:08:42 +00:00
aFTAmbientlight.Hide();
aFLLight.Hide();
2000-09-18 16:07:07 +00:00
if( !aCtlPreview.IsVisible() )
{
aCtlPreview.Show();
aCtlLightPreview.Hide();
}
}
2010-10-21 10:32:34 +01:00
// Textures
2000-09-18 16:07:07 +00:00
if( eViewType == VIEWTYPE_TEXTURE )
{
aFtTexKind.Show();
aBtnTexLuminance.Show();
aBtnTexColor.Show();
aFtTexMode.Show();
aBtnTexReplace.Show();
aBtnTexModulate.Show();
aFtTexProjectionX.Show();
aBtnTexParallelX.Show();
aBtnTexCircleX.Show();
aBtnTexObjectX.Show();
aFtTexProjectionY.Show();
aBtnTexParallelY.Show();
aBtnTexCircleY.Show();
aBtnTexObjectY.Show();
aFtTexFilter.Show();
aBtnTexFilter.Show();
2001-06-14 17:08:42 +00:00
aFLTexture.Show();
2000-09-18 16:07:07 +00:00
}
else
{
aFtTexKind.Hide();
aBtnTexLuminance.Hide();
aBtnTexColor.Hide();
aFtTexMode.Hide();
aBtnTexReplace.Hide();
aBtnTexModulate.Hide();
aBtnTexBlend.Hide();
aFtTexProjectionX.Hide();
aBtnTexParallelX.Hide();
aBtnTexCircleX.Hide();
aBtnTexObjectX.Hide();
aFtTexProjectionY.Hide();
aBtnTexParallelY.Hide();
aBtnTexCircleY.Hide();
aBtnTexObjectY.Hide();
aFtTexFilter.Hide();
aBtnTexFilter.Hide();
2001-06-14 17:08:42 +00:00
aFLTexture.Hide();
2000-09-18 16:07:07 +00:00
}
// Material
if( eViewType == VIEWTYPE_MATERIAL )
{
aFtMatFavorites.Show();
aLbMatFavorites.Show();
aFtMatColor.Show();
aLbMatColor.Show();
aBtnMatColor.Show();
aFtMatEmission.Show();
aLbMatEmission.Show();
aBtnEmissionColor.Show();
aFtMatSpecular.Show();
aLbMatSpecular.Show();
aBtnSpecularColor.Show();
aFtMatSpecularIntensity.Show();
aMtrMatSpecularIntensity.Show();
2001-06-14 17:08:42 +00:00
aFLMatSpecular.Show();
aFLMaterial.Show();
2000-09-18 16:07:07 +00:00
}
else
{
aFtMatFavorites.Hide();
aLbMatFavorites.Hide();
aFtMatColor.Hide();
aLbMatColor.Hide();
aBtnMatColor.Hide();
aFtMatEmission.Hide();
aLbMatEmission.Hide();
aBtnEmissionColor.Hide();
aFtMatSpecular.Hide();
aLbMatSpecular.Hide();
aBtnSpecularColor.Hide();
aFtMatSpecularIntensity.Hide();
aMtrMatSpecularIntensity.Hide();
2001-06-14 17:08:42 +00:00
aFLMatSpecular.Hide();
aFLMaterial.Hide();
2000-09-18 16:07:07 +00:00
}
if( bUpdatePreview && !aBtnLight.IsChecked() )
UpdatePreview();
}
else
{
aBtnGeo.Check( eViewType == VIEWTYPE_GEO );
aBtnRepresentation.Check( eViewType == VIEWTYPE_REPRESENTATION );
aBtnLight.Check( eViewType == VIEWTYPE_LIGHT );
aBtnTexture.Check( eViewType == VIEWTYPE_TEXTURE );
aBtnMaterial.Check( eViewType == VIEWTYPE_MATERIAL );
}
return( 0L );
}
// -----------------------------------------------------------------------
IMPL_LINK( Svx3DWin, ClickHdl, PushButton *, pBtn )
{
bool bUpdatePreview = false;
2000-09-18 16:07:07 +00:00
if( pBtn )
{
sal_uInt16 nSId = 0;
2000-09-18 16:07:07 +00:00
if( pBtn == &aBtnConvertTo3D )
{
nSId = SID_CONVERT_TO_3D;
}
else if( pBtn == &aBtnLatheObject )
{
nSId = SID_CONVERT_TO_3D_LATHE_FAST;
}
2011-04-07 15:47:21 +03:00
// Geometry
2000-09-18 16:07:07 +00:00
else if( pBtn == &aBtnNormalsObj ||
pBtn == &aBtnNormalsFlat ||
pBtn == &aBtnNormalsSphere )
{
aBtnNormalsObj.Check( pBtn == &aBtnNormalsObj );
aBtnNormalsFlat.Check( pBtn == &aBtnNormalsFlat );
aBtnNormalsSphere.Check( pBtn == &aBtnNormalsSphere );
bUpdatePreview = true;
2000-09-18 16:07:07 +00:00
}
else if( pBtn == &aBtnLight1 ||
pBtn == &aBtnLight2 ||
pBtn == &aBtnLight3 ||
pBtn == &aBtnLight4 ||
pBtn == &aBtnLight5 ||
pBtn == &aBtnLight6 ||
pBtn == &aBtnLight7 ||
pBtn == &aBtnLight8 )
{
2011-04-07 15:47:21 +03:00
// Lighting
2000-09-18 16:07:07 +00:00
ColorLB* pLb = GetLbByButton( pBtn );
pLb->Show();
if( pBtn->IsChecked() )
{
2002-06-03 08:01:44 +00:00
SetUILightState( *(ImageButton*)pBtn, !GetUILightState( *(ImageButton*)pBtn ) );
2000-09-18 16:07:07 +00:00
}
else
{
pBtn->Check();
if( pBtn != &aBtnLight1 && aBtnLight1.IsChecked() )
{
aBtnLight1.Check( false );
2000-09-18 16:07:07 +00:00
aLbLight1.Hide();
}
if( pBtn != &aBtnLight2 && aBtnLight2.IsChecked() )
{
aBtnLight2.Check( false );
2000-09-18 16:07:07 +00:00
aLbLight2.Hide();
}
if( pBtn != &aBtnLight3 && aBtnLight3.IsChecked() )
{
aBtnLight3.Check( false );
2000-09-18 16:07:07 +00:00
aLbLight3.Hide();
}
if( pBtn != &aBtnLight4 && aBtnLight4.IsChecked() )
{
aBtnLight4.Check( false );
2000-09-18 16:07:07 +00:00
aLbLight4.Hide();
}
if( pBtn != &aBtnLight5 && aBtnLight5.IsChecked() )
{
aBtnLight5.Check( false );
2000-09-18 16:07:07 +00:00
aLbLight5.Hide();
}
if( pBtn != &aBtnLight6 && aBtnLight6.IsChecked() )
{
aBtnLight6.Check( false );
2000-09-18 16:07:07 +00:00
aLbLight6.Hide();
}
if( pBtn != &aBtnLight7 && aBtnLight7.IsChecked() )
{
aBtnLight7.Check( false );
2000-09-18 16:07:07 +00:00
aLbLight7.Hide();
}
if( pBtn != &aBtnLight8 && aBtnLight8.IsChecked() )
{
aBtnLight8.Check( false );
2000-09-18 16:07:07 +00:00
aLbLight8.Hide();
}
}
sal_Bool bEnable = GetUILightState( *(ImageButton*)pBtn );
2000-09-18 16:07:07 +00:00
aBtnLightColor.Enable( bEnable );
pLb->Enable( bEnable );
ClickLight(*pBtn);
bUpdatePreview = true;
2000-09-18 16:07:07 +00:00
}
2010-10-21 10:32:34 +01:00
// Textures
2000-09-18 16:07:07 +00:00
else if( pBtn == &aBtnTexLuminance ||
pBtn == &aBtnTexColor )
{
aBtnTexLuminance.Check( pBtn == &aBtnTexLuminance );
aBtnTexColor.Check( pBtn == &aBtnTexColor );
bUpdatePreview = true;
2000-09-18 16:07:07 +00:00
}
else if( pBtn == &aBtnTexReplace ||
2011-04-07 15:47:21 +03:00
pBtn == &aBtnTexModulate )
2000-09-18 16:07:07 +00:00
{
aBtnTexReplace.Check( pBtn == &aBtnTexReplace );
aBtnTexModulate.Check( pBtn == &aBtnTexModulate );
bUpdatePreview = true;
2000-09-18 16:07:07 +00:00
}
else if( pBtn == &aBtnTexParallelX ||
pBtn == &aBtnTexCircleX ||
pBtn == &aBtnTexObjectX )
{
aBtnTexParallelX.Check( pBtn == &aBtnTexParallelX );
aBtnTexCircleX.Check( pBtn == &aBtnTexCircleX );
aBtnTexObjectX.Check( pBtn == &aBtnTexObjectX );
bUpdatePreview = true;
2000-09-18 16:07:07 +00:00
}
else if( pBtn == &aBtnTexParallelY ||
pBtn == &aBtnTexCircleY ||
pBtn == &aBtnTexObjectY )
{
aBtnTexParallelY.Check( pBtn == &aBtnTexParallelY );
aBtnTexCircleY.Check( pBtn == &aBtnTexCircleY );
aBtnTexObjectY.Check( pBtn == &aBtnTexObjectY );
bUpdatePreview = true;
2000-09-18 16:07:07 +00:00
}
else if( pBtn == &aBtnShadow3d )
{
pBtn->Check( !pBtn->IsChecked() );
aFtSlant.Enable( pBtn->IsChecked() );
aMtrSlant.Enable( pBtn->IsChecked() );
bUpdatePreview = true;
2000-09-18 16:07:07 +00:00
}
2011-04-07 15:47:21 +03:00
// Other (no groups)
2000-09-18 16:07:07 +00:00
else if( pBtn != NULL )
{
pBtn->Check( !pBtn->IsChecked() );
bUpdatePreview = true;
2000-09-18 16:07:07 +00:00
}
if( nSId > 0 )
{
SfxDispatcher* pDispatcher = LocalGetDispatcher(pBindings);
if (pDispatcher != NULL)
{
SfxBoolItem aItem( nSId, true );
pDispatcher->Execute(
nSId, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD, &aItem, 0L );
}
2000-09-18 16:07:07 +00:00
}
else if( bUpdatePreview )
2000-09-18 16:07:07 +00:00
UpdatePreview();
}
return( 0L );
}
//------------------------------------------------------------------------
IMPL_LINK( Svx3DWin, ClickColorHdl, PushButton *, pBtn )
{
SvColorDialog aColorDlg( this );
ColorLB* pLb;
if( pBtn == &aBtnLightColor )
pLb = GetLbByButton();
else if( pBtn == &aBtnAmbientColor )
pLb = &aLbAmbientlight;
else if( pBtn == &aBtnMatColor )
pLb = &aLbMatColor;
else if( pBtn == &aBtnEmissionColor )
pLb = &aLbMatEmission;
else // if( pBtn == &aBtnSpecularColor )
2000-09-18 16:07:07 +00:00
pLb = &aLbMatSpecular;
Color aColor = pLb->GetSelectEntryColor();
aColorDlg.SetColor( aColor );
if( aColorDlg.Execute() == RET_OK )
{
aColor = aColorDlg.GetColor();
if( LBSelectColor( pLb, aColor ) )
SelectHdl( pLb );
}
return( 0L );
}
// -----------------------------------------------------------------------
IMPL_LINK( Svx3DWin, SelectHdl, void *, p )
{
if( p )
{
bool bUpdatePreview = false;
2000-09-18 16:07:07 +00:00
// Material
if( p == &aLbMatFavorites )
{
Color aColObj( COL_WHITE );
Color aColEmis( COL_BLACK );
Color aColSpec( COL_WHITE );
sal_uInt16 nSpecIntens = 20;
sal_uInt16 nPos = aLbMatFavorites.GetSelectEntryPos();
switch( nPos )
{
case 1: // Metall
{
aColObj = Color(230,230,255);
aColEmis = Color(10,10,30);
aColSpec = Color(200,200,200);
nSpecIntens = 20;
}
break;
case 2: // Gold
{
aColObj = Color(230,255,0);
aColEmis = Color(51,0,0);
aColSpec = Color(255,255,240);
nSpecIntens = 20;
}
break;
2011-04-07 15:47:21 +03:00
case 3: // Chrome
{
aColObj = Color(36,117,153);
aColEmis = Color(18,30,51);
aColSpec = Color(230,230,255);
nSpecIntens = 2;
}
break;
2011-04-07 15:47:21 +03:00
case 4: // Plastic
{
aColObj = Color(255,48,57);
aColEmis = Color(35,0,0);
aColSpec = Color(179,202,204);
nSpecIntens = 60;
}
break;
2011-04-07 15:47:21 +03:00
case 5: // Wood
{
aColObj = Color(153,71,1);
aColEmis = Color(21,22,0);
aColSpec = Color(255,255,153);
nSpecIntens = 75;
}
break;
}
LBSelectColor( &aLbMatColor, aColObj );
LBSelectColor( &aLbMatEmission, aColEmis );
LBSelectColor( &aLbMatSpecular, aColSpec );
aMtrMatSpecularIntensity.SetValue( nSpecIntens );
bUpdatePreview = true;
}
else if( p == &aLbMatColor ||
2000-09-18 16:07:07 +00:00
p == &aLbMatEmission ||
p == &aLbMatSpecular )
{
aLbMatFavorites.SelectEntryPos( 0 );
bUpdatePreview = true;
2000-09-18 16:07:07 +00:00
}
2011-04-07 15:47:21 +03:00
// Lighting
2000-09-18 16:07:07 +00:00
else if( p == &aLbAmbientlight )
{
bUpdatePreview = true;
2000-09-18 16:07:07 +00:00
}
else if( p == &aLbLight1 ||
p == &aLbLight2 ||
p == &aLbLight3 ||
p == &aLbLight4 ||
p == &aLbLight5 ||
p == &aLbLight6 ||
p == &aLbLight7 ||
p == &aLbLight8 )
{
bUpdatePreview = true;
2000-09-18 16:07:07 +00:00
}
else if( p == &aLbShademode )
bUpdatePreview = true;
2000-09-18 16:07:07 +00:00
if( bUpdatePreview )
2000-09-18 16:07:07 +00:00
UpdatePreview();
}
return( 0L );
}
// -----------------------------------------------------------------------
IMPL_LINK( Svx3DWin, ModifyHdl, void*, pField )
{
if( pField )
{
bool bUpdatePreview = false;
2000-09-18 16:07:07 +00:00
// Material
if( pField == &aMtrMatSpecularIntensity )
{
bUpdatePreview = true;
2000-09-18 16:07:07 +00:00
}
else if( pField == &aNumHorizontal )
{
bUpdatePreview = true;
2000-09-18 16:07:07 +00:00
}
else if( pField == &aNumVertical )
{
bUpdatePreview = true;
2000-09-18 16:07:07 +00:00
}
else if( pField == &aMtrSlant )
2008-10-17 08:40:10 +00:00
{
bUpdatePreview = true;
2008-10-17 08:40:10 +00:00
}
2000-09-18 16:07:07 +00:00
if( bUpdatePreview )
2000-09-18 16:07:07 +00:00
UpdatePreview();
}
return( 0L );
}
// -----------------------------------------------------------------------
void Svx3DWin::ClickLight(PushButton& rBtn)
2000-09-18 16:07:07 +00:00
{
sal_uInt16 nLightSource = GetLightSource( &rBtn );
ColorLB* pLb = GetLbByButton( &rBtn );
Color aColor( pLb->GetSelectEntryColor() );
SfxItemSet aLightItemSet(aCtlLightPreview.GetSvx3DLightControl().Get3DAttributes());
const bool bOnOff(GetUILightState( (const ImageButton&)rBtn ));
switch(nLightSource)
{
case 0: aLightItemSet.Put(Svx3DLightcolor1Item(aColor)); aLightItemSet.Put(Svx3DLightOnOff1Item(bOnOff)); break;
case 1: aLightItemSet.Put(Svx3DLightcolor2Item(aColor)); aLightItemSet.Put(Svx3DLightOnOff2Item(bOnOff)); break;
case 2: aLightItemSet.Put(Svx3DLightcolor3Item(aColor)); aLightItemSet.Put(Svx3DLightOnOff3Item(bOnOff)); break;
case 3: aLightItemSet.Put(Svx3DLightcolor4Item(aColor)); aLightItemSet.Put(Svx3DLightOnOff4Item(bOnOff)); break;
case 4: aLightItemSet.Put(Svx3DLightcolor5Item(aColor)); aLightItemSet.Put(Svx3DLightOnOff5Item(bOnOff)); break;
case 5: aLightItemSet.Put(Svx3DLightcolor6Item(aColor)); aLightItemSet.Put(Svx3DLightOnOff6Item(bOnOff)); break;
case 6: aLightItemSet.Put(Svx3DLightcolor7Item(aColor)); aLightItemSet.Put(Svx3DLightOnOff7Item(bOnOff)); break;
default:
case 7: aLightItemSet.Put(Svx3DLightcolor8Item(aColor)); aLightItemSet.Put(Svx3DLightOnOff8Item(bOnOff)); break;
}
aCtlLightPreview.GetSvx3DLightControl().Set3DAttributes(aLightItemSet);
aCtlLightPreview.GetSvx3DLightControl().SelectLight(nLightSource);
aCtlLightPreview.CheckSelection();
2000-09-18 16:07:07 +00:00
}
// -----------------------------------------------------------------------
IMPL_LINK_NOARG(Svx3DWin, ChangeLightCallbackHdl)
2000-09-18 16:07:07 +00:00
{
return( 0L );
}
// -----------------------------------------------------------------------
IMPL_LINK_NOARG(Svx3DWin, ChangeSelectionCallbackHdl)
2000-09-18 16:07:07 +00:00
{
2008-10-17 08:40:10 +00:00
const sal_uInt32 nLight(aCtlLightPreview.GetSvx3DLightControl().GetSelectedLight());
PushButton* pBtn = 0;
2000-09-18 16:07:07 +00:00
2008-10-17 08:40:10 +00:00
switch( nLight )
2000-09-18 16:07:07 +00:00
{
case 0: pBtn = &aBtnLight1; break;
case 1: pBtn = &aBtnLight2; break;
case 2: pBtn = &aBtnLight3; break;
case 3: pBtn = &aBtnLight4; break;
case 4: pBtn = &aBtnLight5; break;
case 5: pBtn = &aBtnLight6; break;
case 6: pBtn = &aBtnLight7; break;
case 7: pBtn = &aBtnLight8; break;
default: break;
2000-09-18 16:07:07 +00:00
}
if( pBtn )
ClickHdl( pBtn );
else
{
2011-04-07 15:47:21 +03:00
// Status: No lamp selected
2000-09-18 16:07:07 +00:00
if( aBtnLight1.IsChecked() )
{
aBtnLight1.Check( false );
aLbLight1.Enable( false );
2000-09-18 16:07:07 +00:00
}
else if( aBtnLight2.IsChecked() )
{
aBtnLight2.Check( false );
aLbLight2.Enable( false );
2000-09-18 16:07:07 +00:00
}
else if( aBtnLight3.IsChecked() )
{
aBtnLight3.Check( false );
aLbLight3.Enable( false );
2000-09-18 16:07:07 +00:00
}
else if( aBtnLight4.IsChecked() )
{
aBtnLight4.Check( false );
aLbLight4.Enable( false );
2000-09-18 16:07:07 +00:00
}
else if( aBtnLight5.IsChecked() )
{
aBtnLight5.Check( false );
aLbLight5.Enable( false );
2000-09-18 16:07:07 +00:00
}
else if( aBtnLight6.IsChecked() )
{
aBtnLight6.Check( false );
aLbLight6.Enable( false );
2000-09-18 16:07:07 +00:00
}
else if( aBtnLight7.IsChecked() )
{
aBtnLight7.Check( false );
aLbLight7.Enable( false );
2000-09-18 16:07:07 +00:00
}
else if( aBtnLight8.IsChecked() )
{
aBtnLight8.Check( false );
aLbLight8.Enable( false );
2000-09-18 16:07:07 +00:00
}
aBtnLightColor.Enable( false );
2000-09-18 16:07:07 +00:00
}
return( 0L );
}
// -----------------------------------------------------------------------
2011-04-07 15:47:21 +03:00
// Method to ensure that the LB is also associated with a color
// returns true if color was added
2000-09-18 16:07:07 +00:00
// -----------------------------------------------------------------------
sal_Bool Svx3DWin::LBSelectColor( ColorLB* pLb, const Color& rColor )
2000-09-18 16:07:07 +00:00
{
sal_Bool bRet = sal_False;
2000-09-18 16:07:07 +00:00
pLb->SetNoSelection();
pLb->SelectEntry( rColor );
if( pLb->GetSelectEntryCount() == 0 )
{
OUString aStr(SVX_RESSTR(RID_SVXFLOAT3D_FIX_R));
2000-09-18 16:07:07 +00:00
aStr += OUString::number((sal_Int32)rColor.GetRed());
aStr += " ";
aStr += SVX_RESSTR(RID_SVXFLOAT3D_FIX_G);
aStr += OUString::number((sal_Int32)rColor.GetGreen());
aStr += " ";
aStr += SVX_RESSTR(RID_SVXFLOAT3D_FIX_B);
aStr += OUString::number((sal_Int32)rColor.GetBlue());
2000-09-18 16:07:07 +00:00
sal_uInt16 nPos = pLb->InsertEntry( rColor, aStr );
2000-09-18 16:07:07 +00:00
pLb->SelectEntryPos( nPos );
bRet = sal_True;
2000-09-18 16:07:07 +00:00
}
return( bRet );
}
// -----------------------------------------------------------------------
void Svx3DWin::UpdatePreview()
{
if( pModel == NULL )
pModel = new FmFormModel();
if(bOnly3DChanged)
{
2011-04-07 15:47:21 +03:00
// Execute slot
SfxDispatcher* pDispatcher = LocalGetDispatcher(pBindings);
if (pDispatcher != NULL)
{
SfxBoolItem aItem( SID_3D_STATE, true );
pDispatcher->Execute(
SID_3D_STATE, SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_RECORD, &aItem, 0L );
}
2011-04-07 15:47:21 +03:00
// Reset Flag
bOnly3DChanged = sal_False;
2000-09-18 16:07:07 +00:00
}
2011-04-07 15:47:21 +03:00
// Get Itemset
SfxItemSet aSet( pModel->GetItemPool(), SDRATTR_START, SDRATTR_END);
2000-09-18 16:07:07 +00:00
2011-04-07 15:47:21 +03:00
// Get Attributes and set the preview
2000-09-18 16:07:07 +00:00
GetAttr( aSet );
aCtlPreview.Set3DAttributes( aSet );
2008-10-17 08:40:10 +00:00
aCtlLightPreview.GetSvx3DLightControl().Set3DAttributes( aSet );
2000-09-18 16:07:07 +00:00
}
//////////////////////////////////////////////////////////////////////////////
2011-04-07 15:47:21 +03:00
// document is to be reloaded, destroy remembered ItemSet
void Svx3DWin::DocumentReload()
{
delete mpRemember2DAttributes;
mpRemember2DAttributes = 0L;
}
2000-09-18 16:07:07 +00:00
// -----------------------------------------------------------------------
void Svx3DWin::InitColorLB( const SdrModel* pDoc )
{
aLbLight1.Fill( pDoc->GetColorList() );
2000-09-18 16:07:07 +00:00
aLbLight2.CopyEntries( aLbLight1 );
aLbLight3.CopyEntries( aLbLight1 );
aLbLight4.CopyEntries( aLbLight1 );
aLbLight5.CopyEntries( aLbLight1 );
aLbLight6.CopyEntries( aLbLight1 );
aLbLight7.CopyEntries( aLbLight1 );
aLbLight8.CopyEntries( aLbLight1 );
aLbAmbientlight.CopyEntries( aLbLight1 );
aLbMatColor.CopyEntries( aLbLight1 );
aLbMatEmission.CopyEntries( aLbLight1 );
aLbMatSpecular.CopyEntries( aLbLight1 );
2011-04-07 15:47:21 +03:00
// First...
2000-09-18 16:07:07 +00:00
Color aColWhite( COL_WHITE );
Color aColBlack( COL_BLACK );
aLbLight1.SelectEntry( aColWhite );
aLbLight2.SelectEntry( aColWhite );
aLbLight3.SelectEntry( aColWhite );
aLbLight4.SelectEntry( aColWhite );
aLbLight5.SelectEntry( aColWhite );
aLbLight6.SelectEntry( aColWhite );
aLbLight7.SelectEntry( aColWhite );
aLbLight8.SelectEntry( aColWhite );
aLbAmbientlight.SelectEntry( aColBlack );
aLbMatColor.SelectEntry( aColWhite );
aLbMatEmission.SelectEntry( aColBlack );
aLbMatSpecular.SelectEntry( aColWhite );
}
// -----------------------------------------------------------------------
sal_uInt16 Svx3DWin::GetLightSource( const PushButton* pBtn )
2000-09-18 16:07:07 +00:00
{
sal_uInt16 nLight = 8;
2000-09-18 16:07:07 +00:00
if( pBtn == NULL )
{
if( aBtnLight1.IsChecked() )
nLight = 0;
else if( aBtnLight2.IsChecked() )
nLight = 1;
else if( aBtnLight3.IsChecked() )
nLight = 2;
else if( aBtnLight4.IsChecked() )
nLight = 3;
else if( aBtnLight5.IsChecked() )
nLight = 4;
else if( aBtnLight6.IsChecked() )
nLight = 5;
else if( aBtnLight7.IsChecked() )
nLight = 6;
else if( aBtnLight8.IsChecked() )
nLight = 7;
}
else
{
if( pBtn == &aBtnLight1 )
nLight = 0;
else if( pBtn == &aBtnLight2 )
nLight = 1;
else if( pBtn == &aBtnLight3 )
nLight = 2;
else if( pBtn == &aBtnLight4 )
nLight = 3;
else if( pBtn == &aBtnLight5 )
nLight = 4;
else if( pBtn == &aBtnLight6 )
nLight = 5;
else if( pBtn == &aBtnLight7 )
nLight = 6;
else if( pBtn == &aBtnLight8 )
nLight = 7;
}
return( nLight );
};
// -----------------------------------------------------------------------
ColorLB* Svx3DWin::GetLbByButton( const PushButton* pBtn )
{
ColorLB* pLb = NULL;
if( pBtn == NULL )
{
if( aBtnLight1.IsChecked() )
pLb = &aLbLight1;
else if( aBtnLight2.IsChecked() )
pLb = &aLbLight2;
else if( aBtnLight3.IsChecked() )
pLb = &aLbLight3;
else if( aBtnLight4.IsChecked() )
pLb = &aLbLight4;
else if( aBtnLight5.IsChecked() )
pLb = &aLbLight5;
else if( aBtnLight6.IsChecked() )
pLb = &aLbLight6;
else if( aBtnLight7.IsChecked() )
pLb = &aLbLight7;
else if( aBtnLight8.IsChecked() )
pLb = &aLbLight8;
}
else
{
if( pBtn == &aBtnLight1 )
pLb = &aLbLight1;
else if( pBtn == &aBtnLight2 )
pLb = &aLbLight2;
else if( pBtn == &aBtnLight3 )
pLb = &aLbLight3;
else if( pBtn == &aBtnLight4 )
pLb = &aLbLight4;
else if( pBtn == &aBtnLight5 )
pLb = &aLbLight5;
else if( pBtn == &aBtnLight6 )
pLb = &aLbLight6;
else if( pBtn == &aBtnLight7 )
pLb = &aLbLight7;
else if( pBtn == &aBtnLight8 )
pLb = &aLbLight8;
}
return( pLb );
};
2011-04-07 15:47:21 +03:00
// Derivation from SfxChildWindow as "containers" for effects
2010-12-11 23:23:07 +01:00
Svx3DChildWindow::Svx3DChildWindow( Window* _pParent,
sal_uInt16 nId,
2000-09-18 16:07:07 +00:00
SfxBindings* pBindings,
SfxChildWinInfo* pInfo ) :
SfxChildWindow( _pParent, nId )
2000-09-18 16:07:07 +00:00
{
Svx3DWin* pWin = new Svx3DWin( pBindings, this, _pParent );
2000-09-18 16:07:07 +00:00
pWindow = pWin;
eChildAlignment = SFX_ALIGN_NOALIGNMENT;
pWin->Initialize( pInfo );
}
Svx3DCtrlItem::Svx3DCtrlItem( sal_uInt16 _nId,
SfxBindings* _pBindings) :
SfxControllerItem( _nId, *_pBindings )
2000-09-18 16:07:07 +00:00
{
}
// -----------------------------------------------------------------------
Merge commit 'ooo/DEV300_m101' into integration/dev300_m101 Conflicts: avmedia/inc/avmedia/mediaitem.hxx avmedia/prj/build.lst avmedia/source/framework/mediaitem.cxx avmedia/source/gstreamer/gstcommon.hxx avmedia/source/gstreamer/gstframegrabber.cxx avmedia/source/gstreamer/gstframegrabber.hxx avmedia/source/gstreamer/gstmanager.cxx avmedia/source/gstreamer/gstmanager.hxx avmedia/source/gstreamer/gstplayer.cxx avmedia/source/gstreamer/gstplayer.hxx avmedia/source/gstreamer/gstuno.cxx avmedia/source/gstreamer/gstwindow.cxx avmedia/source/gstreamer/gstwindow.hxx avmedia/source/gstreamer/makefile.mk avmedia/source/quicktime/quicktimeuno.cxx avmedia/source/viewer/mediawindow.cxx avmedia/source/viewer/mediawindow_impl.cxx avmedia/source/viewer/mediawindow_impl.hxx avmedia/source/viewer/mediawindowbase_impl.cxx avmedia/source/win/winuno.cxx basic/inc/basic/basmgr.hxx basic/inc/basic/mybasic.hxx basic/inc/basic/process.hxx basic/inc/basic/sbmeth.hxx basic/inc/basic/sbmod.hxx basic/inc/basic/sbxdef.hxx basic/inc/basic/sbxvar.hxx basic/source/app/app.cxx basic/source/app/app.hxx basic/source/app/appbased.cxx basic/source/app/appedit.cxx basic/source/app/appwin.cxx basic/source/app/appwin.hxx basic/source/app/brkpnts.cxx basic/source/app/brkpnts.hxx basic/source/app/dialogs.cxx basic/source/app/dialogs.hxx basic/source/app/msgedit.cxx basic/source/app/mybasic.cxx basic/source/app/process.cxx basic/source/app/processw.hxx basic/source/app/textedit.cxx basic/source/basmgr/basicmanagerrepository.cxx basic/source/basmgr/basmgr.cxx basic/source/classes/disas.cxx basic/source/classes/eventatt.cxx basic/source/classes/image.cxx basic/source/classes/sb.cxx basic/source/classes/sbunoobj.cxx basic/source/classes/sbxmod.cxx basic/source/comp/codegen.cxx basic/source/comp/dim.cxx basic/source/comp/exprgen.cxx basic/source/comp/exprnode.cxx basic/source/comp/exprtree.cxx basic/source/comp/sbcomp.cxx basic/source/inc/expr.hxx basic/source/inc/object.hxx basic/source/inc/sbunoobj.hxx basic/source/runtime/dllmgr-x86.cxx basic/source/runtime/iosys.cxx basic/source/runtime/makefile.mk basic/source/runtime/methods.cxx basic/source/runtime/methods1.cxx basic/source/runtime/runtime.cxx basic/source/runtime/stdobj.cxx basic/source/runtime/step0.cxx basic/source/runtime/step1.cxx basic/source/runtime/step2.cxx basic/source/sbx/sbxarray.cxx basic/source/sbx/sbxbase.cxx basic/source/sbx/sbxbool.cxx basic/source/sbx/sbxbyte.cxx basic/source/sbx/sbxcoll.cxx basic/source/sbx/sbxconv.hxx basic/source/sbx/sbxcurr.cxx basic/source/sbx/sbxexec.cxx basic/source/sbx/sbxint.cxx basic/source/sbx/sbxobj.cxx basic/source/sbx/sbxscan.cxx basic/source/sbx/sbxstr.cxx basic/source/sbx/sbxvals.cxx basic/source/sbx/sbxvalue.cxx basic/source/sbx/sbxvar.cxx basic/workben/mgrtest.cxx configmgr/prj/build.lst configmgr/source/access.cxx configmgr/source/configurationprovider.cxx configmgr/source/defaultprovider.cxx configmgr/source/pad.cxx configmgr/source/services.cxx configmgr/source/update.cxx configmgr/source/xmlreader.cxx configmgr/source/xmlreader.hxx connectivity/prj/build.lst connectivity/qa/complex/connectivity/TestCase.java connectivity/source/cpool/Zregistration.cxx connectivity/source/drivers/adabas/Bservices.cxx connectivity/source/drivers/ado/Aservices.cxx connectivity/source/drivers/calc/Cservices.cxx connectivity/source/drivers/calc/makefile.mk connectivity/source/drivers/dbase/DIndex.cxx connectivity/source/drivers/dbase/DIndexIter.cxx connectivity/source/drivers/dbase/DNoException.cxx connectivity/source/drivers/dbase/DTable.cxx connectivity/source/drivers/dbase/Dservices.cxx connectivity/source/drivers/dbase/dindexnode.cxx connectivity/source/drivers/evoab/LNoException.cxx connectivity/source/drivers/evoab/LServices.cxx connectivity/source/drivers/evoab2/NServices.cxx connectivity/source/drivers/file/FNoException.cxx connectivity/source/drivers/file/FPreparedStatement.cxx connectivity/source/drivers/file/FResultSet.cxx connectivity/source/drivers/file/FStatement.cxx connectivity/source/drivers/file/quotedstring.cxx connectivity/source/drivers/flat/ETable.cxx connectivity/source/drivers/flat/Eservices.cxx connectivity/source/drivers/hsqldb/Hservices.cxx connectivity/source/drivers/jdbc/jservices.cxx connectivity/source/drivers/kab/KServices.cxx connectivity/source/drivers/macab/MacabServices.cxx connectivity/source/drivers/mozab/MResultSet.cxx connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx connectivity/source/drivers/mysql/Yservices.cxx connectivity/source/drivers/odbc/OFunctions.cxx connectivity/source/drivers/odbc/oservices.cxx connectivity/source/inc/dbase/DIndexPage.hxx connectivity/source/inc/file/FTable.hxx connectivity/source/manager/mregistration.cxx connectivity/source/parse/PColumn.cxx desktop/prj/build.lst desktop/qa/deployment_misc/test_dp_version.cxx desktop/source/app/app.cxx desktop/source/app/appfirststart.cxx desktop/source/app/cmdlineargs.cxx desktop/source/app/cmdlineargs.hxx desktop/source/app/sofficemain.cxx desktop/source/deployment/gui/dp_gui.hrc desktop/source/deployment/gui/dp_gui_dialog2.cxx desktop/source/deployment/gui/dp_gui_dialog2.hxx desktop/source/deployment/gui/dp_gui_updatedialog.cxx desktop/source/deployment/gui/dp_gui_updatedialog.hxx desktop/source/deployment/manager/dp_extensionmanager.cxx desktop/source/deployment/manager/dp_extensionmanager.hxx desktop/source/deployment/misc/dp_misc.src desktop/source/deployment/registry/component/dp_component.cxx desktop/source/deployment/registry/configuration/dp_configuration.cxx desktop/source/deployment/registry/dp_backend.cxx desktop/source/deployment/registry/help/dp_help.cxx desktop/source/deployment/registry/script/dp_script.cxx desktop/source/migration/pages.cxx desktop/source/migration/pages.hxx desktop/source/migration/wizard.cxx desktop/source/migration/wizard.hrc desktop/source/migration/wizard.hxx desktop/source/migration/wizard.src desktop/source/pkgchk/unopkg/unopkg_shared.h desktop/source/so_comp/services.cxx desktop/source/splash/makefile.mk desktop/source/splash/services_spl.cxx desktop/source/splash/splash.cxx drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx editeng/inc/editeng/adjitem.hxx editeng/inc/editeng/bolnitem.hxx editeng/inc/editeng/borderline.hxx editeng/inc/editeng/boxitem.hxx editeng/inc/editeng/brkitem.hxx editeng/inc/editeng/brshitem.hxx editeng/inc/editeng/bulitem.hxx editeng/inc/editeng/charreliefitem.hxx editeng/inc/editeng/charrotateitem.hxx editeng/inc/editeng/charscaleitem.hxx editeng/inc/editeng/cmapitem.hxx editeng/inc/editeng/colritem.hxx editeng/inc/editeng/crsditem.hxx editeng/inc/editeng/editdata.hxx editeng/inc/editeng/editeng.hxx editeng/inc/editeng/editobj.hxx editeng/inc/editeng/editstat.hxx editeng/inc/editeng/editview.hxx editeng/inc/editeng/emphitem.hxx editeng/inc/editeng/escpitem.hxx editeng/inc/editeng/fhgtitem.hxx editeng/inc/editeng/flstitem.hxx editeng/inc/editeng/fontitem.hxx editeng/inc/editeng/frmdiritem.hxx editeng/inc/editeng/fwdtitem.hxx editeng/inc/editeng/hyznitem.hxx editeng/inc/editeng/kernitem.hxx editeng/inc/editeng/langitem.hxx editeng/inc/editeng/lrspitem.hxx editeng/inc/editeng/lspcitem.hxx editeng/inc/editeng/numitem.hxx editeng/inc/editeng/outliner.hxx editeng/inc/editeng/paravertalignitem.hxx editeng/inc/editeng/pmdlitem.hxx editeng/inc/editeng/postitem.hxx editeng/inc/editeng/protitem.hxx editeng/inc/editeng/shaditem.hxx editeng/inc/editeng/sizeitem.hxx editeng/inc/editeng/svxacorr.hxx editeng/inc/editeng/svxfont.hxx editeng/inc/editeng/svxrtf.hxx editeng/inc/editeng/swafopt.hxx editeng/inc/editeng/tstpitem.hxx editeng/inc/editeng/twolinesitem.hxx editeng/inc/editeng/txtrange.hxx editeng/inc/editeng/udlnitem.hxx editeng/inc/editeng/ulspitem.hxx editeng/inc/editeng/wghtitem.hxx editeng/inc/editeng/writingmodeitem.hxx editeng/inc/editeng/xmlcnitm.hxx editeng/inc/helpid.hrc editeng/inc/pch/precompiled_editeng.hxx editeng/source/editeng/editdbg.cxx editeng/source/editeng/editdoc.cxx editeng/source/editeng/editdoc.hxx editeng/source/editeng/editdoc2.cxx editeng/source/editeng/editeng.cxx editeng/source/editeng/editobj.cxx editeng/source/editeng/editobj2.hxx editeng/source/editeng/editsel.cxx editeng/source/editeng/editundo.cxx editeng/source/editeng/editundo.hxx editeng/source/editeng/editview.cxx editeng/source/editeng/edtspell.hxx editeng/source/editeng/eehtml.cxx editeng/source/editeng/eehtml.hxx editeng/source/editeng/eeobj.cxx editeng/source/editeng/eerdll.cxx editeng/source/editeng/eertfpar.cxx editeng/source/editeng/impedit.cxx editeng/source/editeng/impedit.hxx editeng/source/editeng/impedit2.cxx editeng/source/editeng/impedit3.cxx editeng/source/editeng/impedit4.cxx editeng/source/editeng/impedit5.cxx editeng/source/editeng/makefile.mk editeng/source/items/bulitem.cxx editeng/source/items/charhiddenitem.cxx editeng/source/items/flditem.cxx editeng/source/items/frmitems.cxx editeng/source/items/makefile.mk editeng/source/items/numitem.cxx editeng/source/items/paraitem.cxx editeng/source/items/svxfont.cxx editeng/source/items/textitem.cxx editeng/source/items/writingmodeitem.cxx editeng/source/items/xmlcnitm.cxx editeng/source/misc/SvXMLAutoCorrectImport.cxx editeng/source/misc/svxacorr.cxx editeng/source/misc/txtrange.cxx editeng/source/misc/unolingu.cxx editeng/source/outliner/outleeng.cxx editeng/source/outliner/outliner.cxx editeng/source/outliner/outlundo.hxx editeng/source/outliner/outlvw.cxx editeng/source/outliner/paralist.cxx editeng/source/outliner/paralist.hxx editeng/source/rtf/rtfgrf.cxx editeng/source/rtf/rtfitem.cxx editeng/source/rtf/svxrtf.cxx editeng/source/uno/unoipset.cxx editeng/util/makefile.mk embeddedobj/prj/build.lst embeddedobj/source/commonembedding/miscobj.cxx eventattacher/prj/build.lst fileaccess/source/FileAccess.cxx formula/inc/formula/FormulaCompiler.hxx formula/inc/formula/token.hxx formula/inc/formula/tokenarray.hxx formula/source/core/api/FormulaCompiler.cxx formula/source/core/api/token.cxx formula/source/ui/dlg/FormulaHelper.cxx formula/source/ui/dlg/formula.cxx formula/source/ui/dlg/parawin.cxx formula/source/ui/dlg/structpg.cxx fpicker/prj/d.lst fpicker/source/aqua/FPentry.cxx fpicker/source/office/OfficeControlAccess.cxx fpicker/source/office/iodlg.cxx fpicker/source/office/iodlg.hxx fpicker/source/office/iodlg.src fpicker/source/office/iodlgimp.cxx fpicker/source/unx/gnome/FPentry.cxx fpicker/source/unx/gnome/SalGtkFilePicker.cxx fpicker/source/unx/gnome/SalGtkPicker.cxx fpicker/source/unx/kde4/KDE4FPEntry.cxx fpicker/source/win32/filepicker/FPentry.cxx framework/AllLangResTarget_fwe.mk framework/inc/dispatch/interaction.hxx framework/inc/framework/addonmenu.hxx framework/inc/framework/addonsoptions.hxx framework/inc/framework/bmkmenu.hxx framework/inc/framework/imageproducer.hxx framework/inc/framework/sfxhelperfunctions.hxx framework/inc/framework/statusbarconfiguration.hxx framework/inc/framework/titlehelper.hxx framework/inc/framework/toolboxconfiguration.hxx framework/inc/threadhelp/lockhelper.hxx framework/inc/xml/eventsdocumenthandler.hxx framework/inc/xml/statusbardocumenthandler.hxx framework/inc/xml/toolboxconfiguration.hxx framework/inc/xml/toolboxconfigurationdefines.hxx framework/inc/xml/toolboxdocumenthandler.hxx framework/prj/build.lst framework/qa/complex/ModuleManager/makefile.mk framework/qa/complex/accelerators/makefile.mk framework/qa/complex/framework/recovery/makefile.mk framework/qa/complex/imageManager/_XInitialization.java framework/source/classes/menumanager.cxx framework/source/dispatch/interaction.cxx framework/source/fwe/classes/bmkmenu.cxx framework/source/fwe/helper/actiontriggerhelper.cxx framework/source/fwe/helper/imageproducer.cxx framework/source/fwe/xml/menuconfiguration.cxx framework/source/fwe/xml/toolboxdocumenthandler.cxx framework/source/helper/uiconfigelementwrapperbase.cxx framework/source/helper/uielementwrapperbase.cxx framework/source/inc/pattern/window.hxx framework/source/jobs/jobdata.cxx framework/source/layoutmanager/layoutmanager.cxx framework/source/layoutmanager/panel.hxx framework/source/loadenv/loadenv.cxx framework/source/register/registerservices.cxx framework/source/services/menudocumenthandler.cxx framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx framework/source/uiconfiguration/uiconfigurationmanager.cxx framework/source/uiconfiguration/uiconfigurationmanagerimpl.cxx framework/source/uielement/addonstoolbarmanager.cxx framework/source/uielement/controlmenucontroller.cxx framework/source/uielement/fontsizemenucontroller.cxx framework/source/uielement/imagebuttontoolbarcontroller.cxx framework/source/uielement/macrosmenucontroller.cxx framework/source/uielement/menubarmanager.cxx framework/source/uielement/newmenucontroller.cxx framework/source/uielement/togglebuttontoolbarcontroller.cxx framework/source/uielement/toolbarmanager.cxx framework/source/uielement/toolbarsmenucontroller.cxx framework/test/makefile.mk framework/test/threadtest/makefile.mk framework/test/typecfg/makefile.mk framework/util/guiapps/makefile.mk framework/util/makefile.mk idl/inc/bastype.hxx idl/inc/hash.hxx idl/inc/lex.hxx idl/inc/module.hxx idl/inc/object.hxx idl/inc/slot.hxx idl/inc/types.hxx idl/source/cmptools/hash.cxx idl/source/cmptools/lex.cxx idl/source/objects/basobj.cxx idl/source/objects/bastype.cxx idl/source/objects/module.cxx idl/source/objects/object.cxx idl/source/objects/slot.cxx idl/source/objects/types.cxx idl/source/prj/command.cxx idl/source/prj/database.cxx idl/source/prj/globals.cxx idl/source/prj/svidl.cxx linguistic/inc/linguistic/misc.hxx linguistic/prj/build.lst linguistic/source/convdic.cxx linguistic/source/convdiclist.cxx linguistic/source/dicimp.cxx linguistic/source/dlistimp.cxx linguistic/source/gciterator.cxx linguistic/source/iprcache.cxx linguistic/source/lngopt.cxx linguistic/source/lngprophelp.cxx linguistic/source/lngsvcmgr.cxx linguistic/source/lngsvcmgr.hxx linguistic/source/misc2.cxx linguistic/workben/sprophelp.cxx officecfg/registry/data/org/openoffice/VCL.xcu officecfg/util/makefile.mk oovbaapi/ooo/vba/XApplicationBase.idl oovbaapi/ooo/vba/XVBAAppService.idl oovbaapi/ooo/vba/XVBADocService.idl oovbaapi/ooo/vba/excel/XApplication.idl oovbaapi/ooo/vba/excel/XRange.idl oovbaapi/ooo/vba/excel/XWorkbook.idl oovbaapi/ooo/vba/excel/XWorksheet.idl oovbaapi/ooo/vba/word/XApplication.idl oovbaapi/ooo/vba/word/XGlobals.idl oovbaapi/ooo/vba/word/XTableOfContents.idl readlicense_oo/prj/build.lst scripting/prj/build.lst scripting/prj/d.lst scripting/source/basprov/basprov.cxx scripting/source/basprov/basscript.cxx scripting/source/basprov/basscript.hxx scripting/source/dlgprov/dlgprov.cxx scripting/source/inc/util/util.hxx scripting/source/protocolhandler/scripthandler.cxx scripting/source/provider/ProviderCache.cxx scripting/source/pyprov/makefile.mk scripting/source/runtimemgr/ScriptNameResolverImpl.cxx scripting/source/runtimemgr/ScriptRuntimeManager.cxx scripting/source/runtimemgr/StorageBridge.cxx scripting/source/storage/ScriptMetadataImporter.cxx scripting/source/storage/ScriptSecurityManager.cxx scripting/source/storage/ScriptStorage.cxx scripting/source/storage/ScriptStorageManager.cxx sfx2/inc/about.hxx sfx2/inc/brokenpackageint.hxx sfx2/inc/docvor.hxx sfx2/inc/pch/precompiled_sfx2.hxx sfx2/inc/sfx2/app.hxx sfx2/inc/sfx2/basmgr.hxx sfx2/inc/sfx2/bindings.hxx sfx2/inc/sfx2/childwin.hxx sfx2/inc/sfx2/ctrlitem.hxx sfx2/inc/sfx2/dinfdlg.hxx sfx2/inc/sfx2/dispatch.hxx sfx2/inc/sfx2/docfilt.hxx sfx2/inc/sfx2/evntconf.hxx sfx2/inc/sfx2/fcontnr.hxx sfx2/inc/sfx2/frame.hxx sfx2/inc/sfx2/imagemgr.hxx sfx2/inc/sfx2/imgmgr.hxx sfx2/inc/sfx2/linksrc.hxx sfx2/inc/sfx2/macrconf.hxx sfx2/inc/sfx2/macropg.hxx sfx2/inc/sfx2/mnuitem.hxx sfx2/inc/sfx2/mnumgr.hxx sfx2/inc/sfx2/module.hxx sfx2/inc/sfx2/msg.hxx sfx2/inc/sfx2/objsh.hxx sfx2/inc/sfx2/passwd.hxx sfx2/inc/sfx2/prnmon.hxx sfx2/inc/sfx2/request.hxx sfx2/inc/sfx2/sfx.hrc sfx2/inc/sfx2/sfxbasemodel.hxx sfx2/inc/sfx2/sfxhtml.hxx sfx2/inc/sfx2/sfxresid.hxx sfx2/inc/sfx2/sfxsids.hrc sfx2/inc/sfx2/sfxuno.hxx sfx2/inc/sfx2/shell.hxx sfx2/inc/sfx2/stbitem.hxx sfx2/inc/sfx2/styfitem.hxx sfx2/inc/sfx2/tabdlg.hxx sfx2/inc/sfx2/tbxctrl.hxx sfx2/inc/sfx2/tplpitem.hxx sfx2/inc/sfx2/viewfrm.hxx sfx2/inc/sfx2/viewsh.hxx sfx2/inc/sfxbasic.hxx sfx2/inc/sorgitm.hxx sfx2/prj/build.lst sfx2/qa/complex/docinfo/makefile.mk sfx2/qa/cppunit/makefile.mk sfx2/sdi/makefile.mk sfx2/source/appl/app.cxx sfx2/source/appl/app.hrc sfx2/source/appl/app.src sfx2/source/appl/appbas.cxx sfx2/source/appl/appcfg.cxx sfx2/source/appl/appchild.cxx sfx2/source/appl/appmain.cxx sfx2/source/appl/appmisc.cxx sfx2/source/appl/appopen.cxx sfx2/source/appl/appquit.cxx sfx2/source/appl/appserv.cxx sfx2/source/appl/appuno.cxx sfx2/source/appl/childwin.cxx sfx2/source/appl/fileobj.cxx sfx2/source/appl/helpinterceptor.cxx sfx2/source/appl/imagemgr.cxx sfx2/source/appl/impldde.cxx sfx2/source/appl/impldde.hxx sfx2/source/appl/linkmgr2.cxx sfx2/source/appl/lnkbase2.cxx sfx2/source/appl/makefile.mk sfx2/source/appl/module.cxx sfx2/source/appl/newhelp.cxx sfx2/source/appl/opengrf.cxx sfx2/source/appl/sfxdll.cxx sfx2/source/appl/sfxhelp.cxx sfx2/source/appl/shutdownicon.cxx sfx2/source/appl/shutdowniconunx.cxx sfx2/source/appl/workwin.cxx sfx2/source/bastyp/fltfnc.cxx sfx2/source/bastyp/frmhtml.cxx sfx2/source/bastyp/frmhtmlw.cxx sfx2/source/bastyp/helper.cxx sfx2/source/bastyp/minarray.cxx sfx2/source/bastyp/progress.cxx sfx2/source/bastyp/sfxhtml.cxx sfx2/source/config/evntconf.cxx sfx2/source/control/bindings.cxx sfx2/source/control/ctrlitem.cxx sfx2/source/control/dispatch.cxx sfx2/source/control/macrconf.cxx sfx2/source/control/macro.cxx sfx2/source/control/makefile.mk sfx2/source/control/minfitem.cxx sfx2/source/control/msg.cxx sfx2/source/control/msgpool.cxx sfx2/source/control/objface.cxx sfx2/source/control/request.cxx sfx2/source/control/shell.cxx sfx2/source/control/sorgitm.cxx sfx2/source/dialog/about.cxx sfx2/source/dialog/basedlgs.cxx sfx2/source/dialog/dinfdlg.cxx sfx2/source/dialog/dinfedt.cxx sfx2/source/dialog/dockwin.cxx sfx2/source/dialog/filedlghelper.cxx sfx2/source/dialog/mailmodel.cxx sfx2/source/dialog/mailmodelapi.cxx sfx2/source/dialog/makefile.mk sfx2/source/dialog/mgetempl.cxx sfx2/source/dialog/passwd.cxx sfx2/source/dialog/passwd.hrc sfx2/source/dialog/printopt.cxx sfx2/source/dialog/securitypage.cxx sfx2/source/dialog/splitwin.cxx sfx2/source/dialog/styfitem.cxx sfx2/source/dialog/tabdlg.cxx sfx2/source/dialog/taskpane.cxx sfx2/source/dialog/templdlg.cxx sfx2/source/dialog/tplpitem.cxx sfx2/source/dialog/versdlg.cxx sfx2/source/doc/QuerySaveDocument.cxx sfx2/source/doc/SfxDocumentMetaData.cxx sfx2/source/doc/applet.cxx sfx2/source/doc/doc.hrc sfx2/source/doc/doc.src sfx2/source/doc/docfile.cxx sfx2/source/doc/docinf.cxx sfx2/source/doc/doctempl.cxx sfx2/source/doc/doctemplates.cxx sfx2/source/doc/docvor.cxx sfx2/source/doc/guisaveas.cxx sfx2/source/doc/makefile.mk sfx2/source/doc/objcont.cxx sfx2/source/doc/objitem.cxx sfx2/source/doc/objmisc.cxx sfx2/source/doc/objserv.cxx sfx2/source/doc/printhelper.cxx sfx2/source/doc/sfxacldetect.cxx sfx2/source/doc/sfxbasemodel.cxx sfx2/source/inc/applet.hxx sfx2/source/inc/fltoptint.hxx sfx2/source/inc/sfxlocal.hrc sfx2/source/inc/virtmenu.hxx sfx2/source/inc/workwin.hxx sfx2/source/menu/mnuitem.cxx sfx2/source/menu/objmnctl.cxx sfx2/source/menu/virtmenu.cxx sfx2/source/notify/eventsupplier.cxx sfx2/source/notify/makefile.mk sfx2/source/toolbox/imgmgr.cxx sfx2/source/toolbox/tbxitem.cxx sfx2/source/view/frame.cxx sfx2/source/view/orgmgr.cxx sfx2/source/view/printer.cxx sfx2/source/view/prnmon.cxx sfx2/source/view/viewfrm.cxx sfx2/source/view/viewprn.cxx sfx2/source/view/viewsh.cxx sfx2/util/makefile.mk sfx2/workben/custompanel/makefile.mk shell/source/backends/desktopbe/desktopbackend.cxx shell/source/backends/gconfbe/gconfbackend.cxx shell/source/backends/kde4be/kde4backend.cxx shell/source/backends/kdebe/kdebackend.cxx shell/source/win32/SysShentry.cxx shell/source/win32/shlxthandler/propsheets/propsheets.cxx shell/source/win32/simplemail/smplmailentry.cxx svx/inc/float3d.hrc svx/inc/fmhelp.hrc svx/inc/globlmn_tmpl.hrc svx/inc/helpid.hrc svx/inc/pch/precompiled_svx.hxx svx/inc/sjctrl.hxx svx/inc/srchitem.hxx svx/inc/svdibrow.hxx svx/inc/svx/SmartTagItem.hxx svx/inc/svx/algitem.hxx svx/inc/svx/camera3d.hxx svx/inc/svx/chrtitem.hxx svx/inc/svx/clipfmtitem.hxx svx/inc/svx/ctredlin.hxx svx/inc/svx/dbtoolsclient.hxx svx/inc/svx/deflt3d.hxx svx/inc/svx/dialogs.hrc svx/inc/svx/drawitem.hxx svx/inc/svx/e3ditem.hxx svx/inc/svx/extrud3d.hxx svx/inc/svx/flagsdef.hxx svx/inc/svx/float3d.hxx svx/inc/svx/frmsel.hxx svx/inc/svx/gallery.hxx svx/inc/svx/gallery1.hxx svx/inc/svx/galtheme.hxx svx/inc/svx/grfcrop.hxx svx/inc/svx/hdft.hxx svx/inc/svx/hlnkitem.hxx svx/inc/svx/hyprlink.hxx svx/inc/svx/itemwin.hxx svx/inc/svx/lathe3d.hxx svx/inc/svx/linkwarn.hxx svx/inc/svx/modctrl.hxx svx/inc/svx/msdffdef.hxx svx/inc/svx/obj3d.hxx svx/inc/svx/optgenrl.hxx svx/inc/svx/optgrid.hxx svx/inc/svx/pageitem.hxx svx/inc/svx/paraprev.hxx svx/inc/svx/postattr.hxx svx/inc/svx/rotmodit.hxx svx/inc/svx/ruler.hxx svx/inc/svx/rulritem.hxx svx/inc/svx/scene3d.hxx svx/inc/svx/sdasaitm.hxx svx/inc/svx/sdasitm.hxx svx/inc/svx/sdggaitm.hxx svx/inc/svx/sdmetitm.hxx svx/inc/svx/sdtaaitm.hxx svx/inc/svx/sdtaditm.hxx svx/inc/svx/sdtaitm.hxx svx/inc/svx/sdtakitm.hxx svx/inc/svx/sdtfchim.hxx svx/inc/svx/sdtfsitm.hxx svx/inc/svx/srchdlg.hxx svx/inc/svx/svddrag.hxx svx/inc/svx/svdetc.hxx svx/inc/svx/svdglue.hxx svx/inc/svx/svdhlpln.hxx svx/inc/svx/svdlayer.hxx svx/inc/svx/svdmark.hxx svx/inc/svx/svdmodel.hxx svx/inc/svx/svdoashp.hxx svx/inc/svx/svdobj.hxx svx/inc/svx/svdocirc.hxx svx/inc/svx/svdoedge.hxx svx/inc/svx/svdogrp.hxx svx/inc/svx/svdomeas.hxx svx/inc/svx/svdoole2.hxx svx/inc/svx/svdorect.hxx svx/inc/svx/svdotable.hxx svx/inc/svx/svdotext.hxx svx/inc/svx/svdovirt.hxx svx/inc/svx/svdpage.hxx svx/inc/svx/svdsnpv.hxx svx/inc/svx/svdtrans.hxx svx/inc/svx/svdundo.hxx svx/inc/svx/svimbase.hxx svx/inc/svx/svx3ditems.hxx svx/inc/svx/svxdlg.hxx svx/inc/svx/sxcikitm.hxx svx/inc/svx/sxekitm.hxx svx/inc/svx/sxelditm.hxx svx/inc/svx/sxenditm.hxx svx/inc/svx/sxmkitm.hxx svx/inc/svx/sxmtpitm.hxx svx/inc/svx/sxmuitm.hxx svx/inc/svx/tabarea.hxx svx/inc/svx/tabline.hxx svx/inc/svx/unoprov.hxx svx/inc/svx/viewlayoutitem.hxx svx/inc/svx/xbitmap.hxx svx/inc/svx/xbtmpit.hxx svx/inc/svx/xcolit.hxx svx/inc/svx/xfillit0.hxx svx/inc/svx/xflclit.hxx svx/inc/svx/xflftrit.hxx svx/inc/svx/xflgrit.hxx svx/inc/svx/xflhtit.hxx svx/inc/svx/xftadit.hxx svx/inc/svx/xftsfit.hxx svx/inc/svx/xftshit.hxx svx/inc/svx/xlineit0.hxx svx/inc/svx/xlinjoit.hxx svx/inc/svx/xlnclit.hxx svx/inc/svx/xlndsit.hxx svx/inc/svx/xlnedcit.hxx svx/inc/svx/xlnedit.hxx svx/inc/svx/xlnedwit.hxx svx/inc/svx/xlnstcit.hxx svx/inc/svx/xlnstit.hxx svx/inc/svx/xlnstwit.hxx svx/inc/svx/xlnwtit.hxx svx/inc/svx/xtextit0.hxx svx/inc/svx/zoomitem.hxx svx/inc/svx/zoomslideritem.hxx svx/inc/xpolyimp.hxx svx/inc/zoom_def.hxx svx/prj/d.lst svx/source/accessibility/AccessibleShape.cxx svx/source/accessibility/DescriptionGenerator.cxx svx/source/customshapes/EnhancedCustomShapeEngine.cxx svx/source/customshapes/EnhancedCustomShapeFontWork.cxx svx/source/dialog/_bmpmask.cxx svx/source/dialog/_contdlg.cxx svx/source/dialog/connctrl.cxx svx/source/dialog/contwnd.cxx svx/source/dialog/ctredlin.cxx svx/source/dialog/ctredlin.hrc svx/source/dialog/ctredlin.src svx/source/dialog/dialcontrol.cxx svx/source/dialog/dlgctrl.cxx svx/source/dialog/docrecovery.cxx svx/source/dialog/fntctrl.cxx svx/source/dialog/fontwork.cxx svx/source/dialog/frmsel.cxx svx/source/dialog/graphctl.cxx svx/source/dialog/grfflt.cxx svx/source/dialog/hdft.cxx svx/source/dialog/hyperdlg.cxx svx/source/dialog/hyprdlg.hxx svx/source/dialog/hyprlink.cxx svx/source/dialog/hyprlink.hxx svx/source/dialog/hyprlink.src svx/source/dialog/imapdlg.cxx svx/source/dialog/imapwnd.cxx svx/source/dialog/linkwarn.hrc svx/source/dialog/makefile.mk svx/source/dialog/optgrid.cxx svx/source/dialog/orienthelper.cxx svx/source/dialog/pagectrl.cxx svx/source/dialog/prtqry.cxx svx/source/dialog/rlrcitem.cxx svx/source/dialog/rubydialog.cxx svx/source/dialog/rulritem.cxx svx/source/dialog/simptabl.cxx svx/source/dialog/srchdlg.cxx svx/source/dialog/svxbmpnumvalueset.cxx svx/source/dialog/svxruler.cxx svx/source/dialog/swframeexample.cxx svx/source/engine3d/float3d.cxx svx/source/engine3d/float3d.src svx/source/engine3d/svx3ditems.cxx svx/source/fmcomp/gridctrl.cxx svx/source/fmcomp/trace.cxx svx/source/form/ParseContext.cxx svx/source/form/datanavi.cxx svx/source/form/filtnav.cxx svx/source/form/fmexch.cxx svx/source/form/fmexpl.cxx svx/source/form/fmobjfac.cxx svx/source/form/fmpage.cxx svx/source/form/fmshell.cxx svx/source/form/fmshimp.cxx svx/source/form/fmsrcimp.cxx svx/source/form/fmvwimp.cxx svx/source/form/makefile.mk svx/source/form/tabwin.cxx svx/source/form/tbxform.cxx svx/source/form/typemap.cxx svx/source/gallery2/galbrws1.cxx svx/source/gallery2/galbrws2.cxx svx/source/gallery2/galexpl.cxx svx/source/gallery2/gallery1.cxx svx/source/gallery2/galtheme.cxx svx/source/gallery2/makefile.mk svx/source/gengal/gengal.cxx svx/source/gengal/makefile.mk svx/source/inc/fmgroup.hxx svx/source/intro/about_ooo.hrc svx/source/intro/iso.src svx/source/intro/ooo.src svx/source/items/SmartTagItem.cxx svx/source/items/algitem.cxx svx/source/items/chrtitem.cxx svx/source/items/clipfmtitem.cxx svx/source/items/customshapeitem.cxx svx/source/items/drawitem.cxx svx/source/items/e3ditem.cxx svx/source/items/grfitem.cxx svx/source/items/hlnkitem.cxx svx/source/items/makefile.mk svx/source/items/pageitem.cxx svx/source/items/rotmodit.cxx svx/source/items/viewlayoutitem.cxx svx/source/items/zoomitem.cxx svx/source/items/zoomslideritem.cxx svx/source/src/app.hrc svx/source/stbctrls/makefile.mk svx/source/stbctrls/modctrl.cxx svx/source/stbctrls/xmlsecctrl.cxx svx/source/stbctrls/zoomctrl.cxx svx/source/svdraw/clonelist.cxx svx/source/svdraw/svdattr.cxx svx/source/svdraw/svdcrtv.cxx svx/source/svdraw/svdedtv1.cxx svx/source/svdraw/svdedtv2.cxx svx/source/svdraw/svdedxv.cxx svx/source/svdraw/svdetc.cxx svx/source/svdraw/svdfmtf.cxx svx/source/svdraw/svdfmtf.hxx svx/source/svdraw/svdglue.cxx svx/source/svdraw/svdhdl.cxx svx/source/svdraw/svdhlpln.cxx svx/source/svdraw/svdibrow.cxx svx/source/svdraw/svdlayer.cxx svx/source/svdraw/svdmodel.cxx svx/source/svdraw/svdoashp.cxx svx/source/svdraw/svdobj.cxx svx/source/svdraw/svdocapt.cxx svx/source/svdraw/svdocirc.cxx svx/source/svdraw/svdoedge.cxx svx/source/svdraw/svdograf.cxx svx/source/svdraw/svdogrp.cxx svx/source/svdraw/svdomeas.cxx svx/source/svdraw/svdomedia.cxx svx/source/svdraw/svdopath.cxx svx/source/svdraw/svdotext.cxx svx/source/svdraw/svdotxdr.cxx svx/source/svdraw/svdotxed.cxx svx/source/svdraw/svdotxfl.cxx svx/source/svdraw/svdotxln.cxx svx/source/svdraw/svdotxtr.cxx svx/source/svdraw/svdoutl.cxx svx/source/svdraw/svdpage.cxx svx/source/svdraw/svdpagv.cxx svx/source/svdraw/svdpntv.cxx svx/source/svdraw/svdpoev.cxx svx/source/svdraw/svdsnpv.cxx svx/source/svdraw/svdstr.src svx/source/svdraw/svdtrans.cxx svx/source/svdraw/svdundo.cxx svx/source/svdraw/svdview.cxx svx/source/svdraw/svdxcgv.cxx svx/source/table/svdotable.cxx svx/source/tbxctrls/colorwindow.hxx svx/source/tbxctrls/extrusioncontrols.cxx svx/source/tbxctrls/fillctrl.cxx svx/source/tbxctrls/grafctrl.cxx svx/source/tbxctrls/itemwin.cxx svx/source/tbxctrls/layctrl.cxx svx/source/tbxctrls/lboxctrl.cxx svx/source/tbxctrls/linectrl.cxx svx/source/tbxctrls/tbcontrl.cxx svx/source/tbxctrls/verttexttbxctrl.cxx svx/source/unodraw/unomod.cxx svx/source/unodraw/unopage.cxx svx/source/unodraw/unoprov.cxx svx/source/unodraw/unoshape.cxx svx/source/unodraw/unoshtxt.cxx svx/source/xml/xmlxtexp.cxx svx/source/xoutdev/_xpoly.cxx svx/source/xoutdev/xattr.cxx svx/source/xoutdev/xattr2.cxx svx/source/xoutdev/xattrbmp.cxx svx/source/xoutdev/xtabcolr.cxx svx/util/makefile.mk svx/workben/edittest.cxx sysui/desktop/productversion.mk ucb/prj/build.lst ucb/source/cacher/cacheserv.cxx ucb/source/core/ucb1.component ucb/source/core/ucbserv.cxx ucb/source/core/ucbstore.cxx ucb/source/core/ucbstore.hxx ucb/source/sorter/sortmain.cxx ucb/source/ucp/file/prov.cxx ucb/source/ucp/file/shell.cxx ucb/source/ucp/ftp/ftpservices.cxx ucb/source/ucp/gio/gio_provider.cxx ucb/source/ucp/gvfs/gvfs_provider.cxx ucb/source/ucp/hierarchy/hierarchyservices.cxx ucb/source/ucp/odma/odma_lib.cxx ucb/source/ucp/odma/odma_services.cxx ucb/source/ucp/package/pkgservices.cxx ucb/source/ucp/tdoc/tdoc_services.cxx ucb/source/ucp/webdav/ContentProperties.cxx ucb/source/ucp/webdav/NeonHeadRequest.cxx ucb/source/ucp/webdav/webdavcontent.cxx ucb/source/ucp/webdav/webdavservices.cxx uui/source/iahndl.cxx uui/source/iahndl.hxx uui/source/loginerr.hxx uui/source/nameclashdlg.hxx uui/source/passcrtdlg.cxx uui/source/passworddlg.cxx uui/source/passworddlg.hxx uui/source/services.cxx vbahelper/inc/vbahelper/vbahelper.hxx vbahelper/prj/build.lst vbahelper/prj/d.lst vbahelper/source/msforms/makefile.mk vbahelper/source/msforms/vbauserform.cxx vbahelper/source/vbahelper/makefile.mk vbahelper/source/vbahelper/vbaapplicationbase.cxx vbahelper/source/vbahelper/vbacommandbarcontrol.cxx vbahelper/source/vbahelper/vbadocumentbase.cxx vbahelper/source/vbahelper/vbadocumentsbase.cxx vbahelper/source/vbahelper/vbahelper.cxx vbahelper/util/makefile.mk xmlhelp/source/cxxhelp/provider/databases.cxx xmlhelp/source/cxxhelp/provider/services.cxx xmlhelp/source/treeview/tvfactory.cxx xmloff/JunitTest_xmloff_unoapi.mk xmloff/inc/functional.hxx xmloff/inc/xmloff/formlayerexport.hxx xmloff/inc/xmloff/formlayerimport.hxx xmloff/inc/xmloff/functional.hxx xmloff/inc/xmloff/shapeimport.hxx xmloff/inc/xmloff/xmlcnitm.hxx xmloff/inc/xmloff/xmlnumfi.hxx xmloff/prj/build.lst xmloff/source/chart/SchXMLChartContext.cxx xmloff/source/chart/SchXMLExport.cxx xmloff/source/chart/SchXMLImport.cxx xmloff/source/chart/SchXMLLegendContext.hxx xmloff/source/chart/SchXMLPlotAreaContext.cxx xmloff/source/core/xmluconv.cxx xmloff/source/draw/sdxmlexp.cxx xmloff/source/draw/shapeexport4.cxx xmloff/source/draw/ximp3dobject.cxx xmloff/source/draw/ximp3dscene.cxx xmloff/source/forms/formlayerexport.cxx xmloff/source/forms/formlayerimport.cxx xmloff/source/forms/handler/vcl_time_handler.hxx xmloff/source/forms/layerimport.cxx xmloff/source/forms/layerimport.hxx xmloff/source/forms/property_meta_data.hxx xmloff/source/style/PageHeaderFooterContext.cxx xmloff/source/style/PageMasterStyleMap.cxx xmloff/source/style/prstylei.cxx xmloff/source/style/xmlimppr.cxx xmloff/source/style/xmlnumfi.cxx xmloff/source/style/xmlstyle.cxx xmloff/source/table/tabledesignsimporter.cxx xmloff/source/text/XMLTextNumRuleInfo.cxx xmloff/source/text/XMLTextShapeStyleContext.cxx xmloff/source/text/txtstyle.cxx xmloff/source/transform/ChartOOoTContext.cxx xmloff/source/transform/EventOOoTContext.cxx xmloff/source/transform/TransformerBase.cxx xmloff/util/makefile.mk xmlscript/util/xcr.component
2011-03-12 02:42:58 +01:00
void Svx3DCtrlItem::StateChanged( sal_uInt16 /*nSId*/,
SfxItemState /*eState*/, const SfxPoolItem* /*pItem*/ )
2000-09-18 16:07:07 +00:00
{
}
2011-04-07 15:47:21 +03:00
// ControllerItem for Status Slot SID_CONVERT_TO_3D
2000-09-18 16:07:07 +00:00
SvxConvertTo3DItem::SvxConvertTo3DItem(sal_uInt16 _nId, SfxBindings* _pBindings)
: SfxControllerItem(_nId, *_pBindings),
bState(sal_False)
2000-09-18 16:07:07 +00:00
{
}
void SvxConvertTo3DItem::StateChanged(sal_uInt16 /*_nId*/, SfxItemState eState, const SfxPoolItem* /*pState*/)
2000-09-18 16:07:07 +00:00
{
sal_Bool bNewState = (eState != SFX_ITEM_DISABLED);
2000-09-18 16:07:07 +00:00
if(bNewState != bState)
{
bState = bNewState;
SfxDispatcher* pDispatcher = LocalGetDispatcher(&GetBindings());
if (pDispatcher != NULL)
{
SfxBoolItem aItem( SID_3D_STATE, true );
pDispatcher->Execute(
SID_3D_STATE, SFX_CALLMODE_ASYNCHRON|SFX_CALLMODE_RECORD, &aItem, 0L);
}
2000-09-18 16:07:07 +00:00
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */