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

2965 lines
90 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 <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"
using namespace com::sun::star;
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;
}
}
Svx3DWin::Svx3DWin(SfxBindings* pInBindings, SfxChildWindow *pCW, vcl::Window* pParent)
: SfxDockingWindow (pInBindings, pCW, pParent,
"Docking3DEffects", "svx/ui/docking3deffects.ui")
, aImgLightOn(SVX_RES(RID_SVXIMAGE_LIGHT_ON))
, aImgLightOff(SVX_RES(RID_SVXIMAGE_LIGHT_OFF))
, bUpdate(false)
, eViewType(VIEWTYPE_GEO)
, pModel(NULL)
, pVDev(NULL)
, p3DView(NULL)
, pBindings(pInBindings)
, pControllerItem(0)
, pConvertTo3DItem(0)
, pConvertTo3DLatheItem(0)
, mpImpl(new Svx3DWinImpl())
, mpRemember2DAttributes(NULL)
, bOnly3DChanged(false)
2000-09-18 16:07:07 +00:00
{
get(m_pBtnGeo, "geometry");
get(m_pBtnRepresentation, "representation");
get(m_pBtnLight, "light");
get(m_pBtnTexture, "texture");
get(m_pBtnMaterial, "material");
get(m_pBtnUpdate, "update");
get(m_pBtnAssign, "assign");
get(m_pFLGeometrie, "geoframe");
get(m_pFtPercentDiagonal, "diagonalft");
get(m_pMtrPercentDiagonal, "diagonal");
get(m_pFtBackscale, "scaleddepthft");
get(m_pMtrBackscale, "scaleddepth");
get(m_pFtEndAngle, "angleft");
get(m_pMtrEndAngle, "angle");
get(m_pFtDepth, "depthft");
get(m_pMtrDepth, "depth");
get(m_pFLSegments, "segmentsframe");
get(m_pNumHorizontal, "hori");
get(m_pNumVertical, "veri");
get(m_pFLNormals, "normals");
get(m_pBtnNormalsObj, "objspecific");
get(m_pBtnNormalsFlat, "flat");
get(m_pBtnNormalsSphere, "spherical");
get(m_pBtnNormalsInvert, "invertnormals");
get(m_pBtnTwoSidedLighting, "doublesidedillum");
get(m_pBtnDoubleSided, "doublesided");
get(m_pFLRepresentation, "shadingframe");
get(m_pLbShademode, "mode");
get(m_pFLShadow, "shadowframe");
get(m_pBtnShadow3d, "shadow");
get(m_pFtSlant, "slantft");
get(m_pMtrSlant, "slant");
get(m_pFLCamera, "cameraframe");
get(m_pMtrDistance, "distance");
get(m_pMtrFocalLength, "focal");
get(m_pFLLight, "illumframe");
get(m_pBtnLight1, "light1");
get(m_pBtnLight2, "light2");
get(m_pBtnLight3, "light3");
get(m_pBtnLight4, "light4");
get(m_pBtnLight5, "light5");
get(m_pBtnLight6, "light6");
get(m_pBtnLight7, "light7");
get(m_pBtnLight8, "light8");
get(m_pLbLight1, "lightcolor1");
get(m_pLbLight2, "lightcolor2");
get(m_pLbLight3, "lightcolor3");
get(m_pLbLight4, "lightcolor4");
get(m_pLbLight5, "lightcolor5");
get(m_pLbLight6, "lightcolor6");
get(m_pLbLight7, "lightcolor7");
get(m_pLbLight8, "lightcolor8");
get(m_pBtnLightColor, "colorbutton1");
get(m_pLbAmbientlight, "ambientcolor");
get(m_pBtnAmbientColor, "colorbutton2");
get(m_pFLTexture, "textureframe");
get(m_pBtnTexLuminance, "textype");
get(m_pBtnTexColor, "texcolor");
get(m_pBtnTexReplace, "texreplace");
get(m_pBtnTexModulate, "texmodulate");
get(m_pBtnTexBlend, "texblend");
get(m_pBtnTexObjectX, "texobjx");
get(m_pBtnTexParallelX, "texparallelx");
get(m_pBtnTexCircleX, "texcirclex");
get(m_pBtnTexObjectY, "texobjy");
get(m_pBtnTexParallelY, "texparallely");
get(m_pBtnTexCircleY, "texcircley");
get(m_pBtnTexFilter, "texfilter");
get(m_pFLMaterial, "materialframe");
get(m_pLbMatFavorites, "favorites");
get(m_pLbMatColor, "objcolor");
get(m_pBtnMatColor, "colorbutton3");
get(m_pLbMatEmission, "illumcolor");
get(m_pBtnEmissionColor, "colorbutton4");
get(m_pFLMatSpecular, "specframe");
get(m_pLbMatSpecular, "speccolor");
get(m_pBtnSpecularColor, "colorbutton5");
get(m_pMtrMatSpecularIntensity, "intensity");
get(m_pCtlPreview, "preview");
get(m_pCtlLightPreview, "lightpreview");
Size aSize(LogicToPixel(Size(83, 76), MAP_APPFONT));
m_pCtlPreview->set_width_request(aSize.Width());
m_pCtlLightPreview->set_width_request(aSize.Width());
m_pCtlPreview->set_height_request(aSize.Height());
m_pCtlLightPreview->set_height_request(aSize.Height());
get(m_pBtnConvertTo3D, "to3d");
get(m_pBtnLatheObject, "tolathe");
get(m_pBtnPerspective, "perspective");
2002-06-03 08:01:44 +00:00
mpImpl->pPool = NULL;
2000-09-18 16:07:07 +00:00
2011-04-07 15:47:21 +03:00
// Set Metric
eFUnit = pInBindings->GetDispatcher()->GetModule()->GetFieldUnit();
m_pMtrDepth->SetUnit( eFUnit );
m_pMtrDistance->SetUnit( eFUnit );
m_pMtrFocalLength->SetUnit( eFUnit );
2000-09-18 16:07:07 +00:00
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);
m_pBtnAssign->SetClickHdl( LINK( this, Svx3DWin, ClickAssignHdl ) );
m_pBtnUpdate->SetClickHdl( LINK( this, Svx3DWin, ClickUpdateHdl ) );
2000-09-18 16:07:07 +00:00
Link aLink( LINK( this, Svx3DWin, ClickViewTypeHdl ) );
m_pBtnGeo->SetClickHdl( aLink );
m_pBtnRepresentation->SetClickHdl( aLink );
m_pBtnLight->SetClickHdl( aLink );
m_pBtnTexture->SetClickHdl( aLink );
m_pBtnMaterial->SetClickHdl( aLink );
2000-09-18 16:07:07 +00:00
aLink = LINK( this, Svx3DWin, ClickHdl );
m_pBtnPerspective->SetClickHdl( aLink );
m_pBtnConvertTo3D->SetClickHdl( aLink );
m_pBtnLatheObject->SetClickHdl( aLink );
2000-09-18 16:07:07 +00:00
2011-04-07 15:47:21 +03:00
// Geometry
m_pBtnNormalsObj->SetClickHdl( aLink );
m_pBtnNormalsFlat->SetClickHdl( aLink );
m_pBtnNormalsSphere->SetClickHdl( aLink );
m_pBtnTwoSidedLighting->SetClickHdl( aLink );
m_pBtnNormalsInvert->SetClickHdl( aLink );
m_pBtnDoubleSided->SetClickHdl( aLink );
2000-09-18 16:07:07 +00:00
2011-04-07 15:47:21 +03:00
// Representation
m_pBtnShadow3d->SetClickHdl( aLink );
2000-09-18 16:07:07 +00:00
2011-04-07 15:47:21 +03:00
// Lighting
m_pBtnLight1->SetClickHdl( aLink );
m_pBtnLight2->SetClickHdl( aLink );
m_pBtnLight3->SetClickHdl( aLink );
m_pBtnLight4->SetClickHdl( aLink );
m_pBtnLight5->SetClickHdl( aLink );
m_pBtnLight6->SetClickHdl( aLink );
m_pBtnLight7->SetClickHdl( aLink );
m_pBtnLight8->SetClickHdl( aLink );
2000-09-18 16:07:07 +00:00
2010-10-21 10:32:34 +01:00
// Textures
m_pBtnTexLuminance->SetClickHdl( aLink );
m_pBtnTexColor->SetClickHdl( aLink );
m_pBtnTexReplace->SetClickHdl( aLink );
m_pBtnTexModulate->SetClickHdl( aLink );
m_pBtnTexParallelX->SetClickHdl( aLink );
m_pBtnTexCircleX->SetClickHdl( aLink );
m_pBtnTexObjectX->SetClickHdl( aLink );
m_pBtnTexParallelY->SetClickHdl( aLink );
m_pBtnTexCircleY->SetClickHdl( aLink );
m_pBtnTexObjectY->SetClickHdl( aLink );
m_pBtnTexFilter->SetClickHdl( aLink );
2000-09-18 16:07:07 +00:00
// Material
aLink = LINK( this, Svx3DWin, ClickColorHdl );
m_pBtnLightColor->SetClickHdl( aLink );
m_pBtnAmbientColor->SetClickHdl( aLink );
m_pBtnMatColor->SetClickHdl( aLink );
m_pBtnEmissionColor->SetClickHdl( aLink );
m_pBtnSpecularColor->SetClickHdl( aLink );
2000-09-18 16:07:07 +00:00
aLink = LINK( this, Svx3DWin, SelectHdl );
m_pLbMatFavorites->SetSelectHdl( aLink );
m_pLbMatColor->SetSelectHdl( aLink );
m_pLbMatEmission->SetSelectHdl( aLink );
m_pLbMatSpecular->SetSelectHdl( aLink );
m_pLbLight1->SetSelectHdl( aLink );
m_pLbLight2->SetSelectHdl( aLink );
m_pLbLight3->SetSelectHdl( aLink );
m_pLbLight4->SetSelectHdl( aLink );
m_pLbLight5->SetSelectHdl( aLink );
m_pLbLight6->SetSelectHdl( aLink );
m_pLbLight7->SetSelectHdl( aLink );
m_pLbLight8->SetSelectHdl( aLink );
m_pLbAmbientlight->SetSelectHdl( aLink );
m_pLbShademode->SetSelectHdl( aLink );
2000-09-18 16:07:07 +00:00
aLink = LINK( this, Svx3DWin, ModifyHdl );
m_pMtrMatSpecularIntensity->SetModifyHdl( aLink );
m_pNumHorizontal->SetModifyHdl( aLink );
m_pNumVertical->SetModifyHdl( aLink );
m_pMtrSlant->SetModifyHdl( aLink );
2000-09-18 16:07:07 +00:00
2011-04-07 15:47:21 +03:00
// Preview callback
2000-09-18 16:07:07 +00:00
aLink = LINK( this, Svx3DWin, ChangeLightCallbackHdl );
m_pCtlLightPreview->SetUserInteractiveChangeCallback(aLink);
2000-09-18 16:07:07 +00:00
aLink = LINK( this, Svx3DWin, ChangeSelectionCallbackHdl );
m_pCtlLightPreview->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, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, &aItem, 0L );
}
2000-09-18 16:07:07 +00:00
Reset();
//lock down the size of the initial largest default mode as the permanent size
aSize = get_preferred_size();
set_width_request(aSize.Width());
set_height_request(aSize.Height());
2000-09-18 16:07:07 +00:00
}
2010-12-11 23:23:07 +01:00
Svx3DWin::~Svx3DWin()
{
disposeOnce();
}
void Svx3DWin::dispose()
2000-09-18 16:07:07 +00:00
{
delete p3DView;
pVDev.disposeAndClear();
2000-09-18 16:07:07 +00:00
delete pModel;
delete pControllerItem;
delete pConvertTo3DItem;
delete pConvertTo3DLatheItem;
delete mpRemember2DAttributes;
2002-06-03 08:01:44 +00:00
delete mpImpl;
m_pBtnGeo.clear();
m_pBtnRepresentation.clear();
m_pBtnLight.clear();
m_pBtnTexture.clear();
m_pBtnMaterial.clear();
m_pBtnUpdate.clear();
m_pBtnAssign.clear();
SfxDockingWindow::dispose();
2000-09-18 16:07:07 +00:00
}
2000-09-18 16:07:07 +00:00
void Svx3DWin::Construct()
{
m_pBtnGeo->Check();
Link aLink( LINK( this, Svx3DWin, ClickViewTypeHdl ) );
aLink.Call(m_pBtnGeo);
m_pCtlLightPreview->Hide();
2000-09-18 16:07:07 +00:00
}
2000-09-18 16:07:07 +00:00
void Svx3DWin::Reset()
{
2011-04-07 15:47:21 +03:00
// Various initializations, default is AllAttributes
m_pLbShademode->SelectEntryPos( 0 );
m_pMtrMatSpecularIntensity->SetValue( 50 );
2000-09-18 16:07:07 +00:00
m_pBtnLight1->Check();
2000-09-18 16:07:07 +00:00
ClickUpdateHdl( NULL );
2011-04-07 15:47:21 +03:00
// Select nothing, to avoid errors when selecting the first
m_pCtlLightPreview->GetSvx3DLightControl().SelectLight(0);
m_pCtlLightPreview->CheckSelection();
2000-09-18 16:07:07 +00:00
}
bool Svx3DWin::GetUILightState(const PushButton& 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(PushButton& rBtn, bool bState)
2002-06-03 08:01:44 +00:00
{
rBtn.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(SfxItemState::DONTCARE == eState)
mpRemember2DAttributes->InvalidateItem(nWhich);
else if(SfxItemState::SET == eState)
mpRemember2DAttributes->Put(rAttrs.Get(nWhich, 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 );
if( SfxItemState::SET == eState )
2000-09-18 16:07:07 +00:00
{
sal_uInt32 nState = static_cast<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
m_pFLSegments->Enable(!bCube);
m_pFtPercentDiagonal->Enable( !bCube && !bSphere );
m_pMtrPercentDiagonal->Enable( !bCube && !bSphere );
m_pFtBackscale->Enable( !bCube && !bSphere );
m_pMtrBackscale->Enable( !bCube && !bSphere );
m_pFtDepth->Enable( !bCube && !bSphere );
m_pMtrDepth->Enable( !bCube && !bSphere );
2000-09-18 16:07:07 +00:00
if( bCube )
{
m_pNumHorizontal->SetEmptyFieldValue();
m_pNumVertical->SetEmptyFieldValue();
2000-09-18 16:07:07 +00:00
}
if( bCube || bSphere )
{
m_pMtrPercentDiagonal->SetEmptyFieldValue();
m_pMtrBackscale->SetEmptyFieldValue();
m_pMtrDepth->SetEmptyFieldValue();
2000-09-18 16:07:07 +00:00
}
2011-04-07 15:47:21 +03:00
// There is a final angle only for Lathe objects.
m_pFtEndAngle->Enable( !bExtrude && !bCube && !bSphere );
m_pMtrEndAngle->Enable( !bExtrude && !bCube && !bSphere );
2000-09-18 16:07:07 +00:00
if( bExtrude || bCube || bSphere )
m_pMtrEndAngle->SetEmptyFieldValue();
2000-09-18 16:07:07 +00:00
}
else
{
2011-04-07 15:47:21 +03:00
// Geometry
m_pNumHorizontal->SetEmptyFieldValue();
m_pNumVertical->SetEmptyFieldValue();
m_pFLSegments->Enable( false );
m_pFtEndAngle->Enable( false );
m_pMtrEndAngle->Enable( false );
m_pMtrEndAngle->SetEmptyFieldValue();
m_pFtDepth->Enable( false );
m_pMtrDepth->Enable( false );
m_pMtrDepth->SetEmptyFieldValue();
2000-09-18 16:07:07 +00:00
2011-04-07 15:47:21 +03:00
// Representation
m_pFLShadow->Enable(false);
m_pMtrDistance->SetEmptyFieldValue();
m_pMtrFocalLength->SetEmptyFieldValue();
m_pFLCamera->Enable( false );
2000-09-18 16:07:07 +00:00
2011-04-07 15:47:21 +03:00
//Lower Range
m_pBtnConvertTo3D->Enable( false );
m_pBtnLatheObject->Enable( false );
2000-09-18 16:07:07 +00:00
}
}
2011-04-07 15:47:21 +03:00
// Bitmap fill ? -> Status
bool bBitmap(false);
eState = rAttrs.GetItemState(XATTR_FILLSTYLE);
if(eState != SfxItemState::DONTCARE)
2000-09-18 16:07:07 +00:00
{
drawing::FillStyle eXFS = (drawing::FillStyle)static_cast<const XFillStyleItem&>(rAttrs.Get(XATTR_FILLSTYLE)).GetValue();
bBitmap = (eXFS == drawing::FillStyle_BITMAP || eXFS == drawing::FillStyle_GRADIENT || eXFS == drawing::FillStyle_HATCH);
2000-09-18 16:07:07 +00:00
}
m_pFLTexture->Enable(bBitmap);
2000-09-18 16:07:07 +00:00
2011-04-07 15:47:21 +03:00
// Geometry
// Number of segments (horizontal)
if( m_pNumHorizontal->IsEnabled() )
2000-09-18 16:07:07 +00:00
{
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_HORZ_SEGS);
if(eState != SfxItemState::DONTCARE)
2000-09-18 16:07:07 +00:00
{
sal_uInt32 nValue = static_cast<const SfxUInt32Item&>(rAttrs.Get(SDRATTR_3DOBJ_HORZ_SEGS)).GetValue();
if(nValue != (sal_uInt32 )m_pNumHorizontal->GetValue())
2000-09-18 16:07:07 +00:00
{
m_pNumHorizontal->SetValue( nValue );
bUpdate = true;
2000-09-18 16:07:07 +00:00
}
else if( m_pNumHorizontal->IsEmptyFieldValue() )
m_pNumHorizontal->SetValue( nValue );
2000-09-18 16:07:07 +00:00
}
else
{
if( !m_pNumHorizontal->IsEmptyFieldValue() )
2000-09-18 16:07:07 +00:00
{
m_pNumHorizontal->SetEmptyFieldValue();
bUpdate = true;
2000-09-18 16:07:07 +00:00
}
}
}
2011-04-07 15:47:21 +03:00
//Number of segments (vertical)
if( m_pNumVertical->IsEnabled() )
2000-09-18 16:07:07 +00:00
{
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_VERT_SEGS);
if( eState != SfxItemState::DONTCARE )
2000-09-18 16:07:07 +00:00
{
sal_uInt32 nValue = static_cast<const SfxUInt32Item&>(rAttrs.Get(SDRATTR_3DOBJ_VERT_SEGS)).GetValue();
if( nValue != (sal_uInt32) m_pNumVertical->GetValue() )
2000-09-18 16:07:07 +00:00
{
m_pNumVertical->SetValue( nValue );
bUpdate = true;
2000-09-18 16:07:07 +00:00
}
else if( m_pNumVertical->IsEmptyFieldValue() )
m_pNumVertical->SetValue( nValue );
2000-09-18 16:07:07 +00:00
}
else
{
if( !m_pNumVertical->IsEmptyFieldValue() )
2000-09-18 16:07:07 +00:00
{
m_pNumVertical->SetEmptyFieldValue();
bUpdate = true;
2000-09-18 16:07:07 +00:00
}
}
}
2011-04-07 15:47:21 +03:00
// Depth
if( m_pMtrDepth->IsEnabled() )
2000-09-18 16:07:07 +00:00
{
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_DEPTH);
if( eState != SfxItemState::DONTCARE )
2000-09-18 16:07:07 +00:00
{
sal_uInt32 nValue = static_cast<const SfxUInt32Item&>(rAttrs.Get(SDRATTR_3DOBJ_DEPTH)).GetValue();
sal_uInt32 nValue2 = GetCoreValue(*m_pMtrDepth, ePoolUnit);
2000-09-18 16:07:07 +00:00
if( nValue != nValue2 )
{
if( eFUnit != m_pMtrDepth->GetUnit() )
SetFieldUnit(*m_pMtrDepth, eFUnit);
2000-09-18 16:07:07 +00:00
SetMetricValue(*m_pMtrDepth, nValue, ePoolUnit);
bUpdate = true;
2000-09-18 16:07:07 +00:00
}
else if( m_pMtrDepth->IsEmptyFieldValue() )
m_pMtrDepth->SetValue( m_pMtrDepth->GetValue() );
2000-09-18 16:07:07 +00:00
}
else
{
if( !m_pMtrDepth->IsEmptyFieldValue() )
2000-09-18 16:07:07 +00:00
{
m_pMtrDepth->SetEmptyFieldValue();
bUpdate = 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 != SfxItemState::DONTCARE )
2000-09-18 16:07:07 +00:00
{
bool bValue = static_cast<const SfxBoolItem&>(rAttrs.Get(SDRATTR_3DOBJ_DOUBLE_SIDED)).GetValue();
if( bValue != m_pBtnDoubleSided->IsChecked() )
2000-09-18 16:07:07 +00:00
{
m_pBtnDoubleSided->Check( bValue );
bUpdate = true;
2000-09-18 16:07:07 +00:00
}
else if( m_pBtnDoubleSided->GetState() == TRISTATE_INDET )
m_pBtnDoubleSided->Check( bValue );
2000-09-18 16:07:07 +00:00
}
else
{
if( m_pBtnDoubleSided->GetState() != TRISTATE_INDET )
2000-09-18 16:07:07 +00:00
{
m_pBtnDoubleSided->SetState( TRISTATE_INDET );
bUpdate = true;
2000-09-18 16:07:07 +00:00
}
}
2011-04-07 15:47:21 +03:00
// Edge rounding
if( m_pMtrPercentDiagonal->IsEnabled() )
2000-09-18 16:07:07 +00:00
{
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_PERCENT_DIAGONAL);
if( eState != SfxItemState::DONTCARE )
2000-09-18 16:07:07 +00:00
{
sal_uInt16 nValue = static_cast<const SfxUInt16Item&>(rAttrs.Get(SDRATTR_3DOBJ_PERCENT_DIAGONAL)).GetValue();
if( nValue != m_pMtrPercentDiagonal->GetValue() )
2000-09-18 16:07:07 +00:00
{
m_pMtrPercentDiagonal->SetValue( nValue );
bUpdate = true;
2000-09-18 16:07:07 +00:00
}
else if( m_pMtrPercentDiagonal->IsEmptyFieldValue() )
m_pMtrPercentDiagonal->SetValue( nValue );
2000-09-18 16:07:07 +00:00
}
else
{
if( !m_pMtrPercentDiagonal->IsEmptyFieldValue() )
2000-09-18 16:07:07 +00:00
{
m_pMtrPercentDiagonal->SetEmptyFieldValue();
bUpdate = true;
2000-09-18 16:07:07 +00:00
}
}
}
2011-04-07 15:47:21 +03:00
// Depth scaling
if( m_pMtrBackscale->IsEnabled() )
2000-09-18 16:07:07 +00:00
{
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_BACKSCALE);
if( eState != SfxItemState::DONTCARE )
2000-09-18 16:07:07 +00:00
{
sal_uInt16 nValue = static_cast<const SfxUInt16Item&>(rAttrs.Get(SDRATTR_3DOBJ_BACKSCALE)).GetValue();
if( nValue != m_pMtrBackscale->GetValue() )
2000-09-18 16:07:07 +00:00
{
m_pMtrBackscale->SetValue( nValue );
bUpdate = true;
2000-09-18 16:07:07 +00:00
}
else if( m_pMtrBackscale->IsEmptyFieldValue() )
m_pMtrBackscale->SetValue( nValue );
2000-09-18 16:07:07 +00:00
}
else
{
if( !m_pMtrBackscale->IsEmptyFieldValue() )
2000-09-18 16:07:07 +00:00
{
m_pMtrBackscale->SetEmptyFieldValue();
bUpdate = true;
2000-09-18 16:07:07 +00:00
}
}
}
2011-04-07 15:47:21 +03:00
// End angle
if( m_pMtrEndAngle->IsEnabled() )
2000-09-18 16:07:07 +00:00
{
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_END_ANGLE);
if( eState != SfxItemState::DONTCARE )
2000-09-18 16:07:07 +00:00
{
sal_Int32 nValue = static_cast<const SfxUInt32Item&>(rAttrs.Get(SDRATTR_3DOBJ_END_ANGLE)).GetValue();
if( nValue != m_pMtrEndAngle->GetValue() )
2000-09-18 16:07:07 +00:00
{
m_pMtrEndAngle->SetValue( nValue );
bUpdate = true;
2000-09-18 16:07:07 +00:00
}
}
else
{
if( !m_pMtrEndAngle->IsEmptyFieldValue() )
2000-09-18 16:07:07 +00:00
{
m_pMtrEndAngle->SetEmptyFieldValue();
bUpdate = 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 != SfxItemState::DONTCARE )
2000-09-18 16:07:07 +00:00
{
sal_uInt16 nValue = static_cast<const Svx3DNormalsKindItem&>(rAttrs.Get(SDRATTR_3DOBJ_NORMALS_KIND)).GetValue();
2000-09-18 16:07:07 +00:00
if( ( !m_pBtnNormalsObj->IsChecked() && nValue == 0 ) ||
( !m_pBtnNormalsFlat->IsChecked() && nValue == 1 ) ||
( !m_pBtnNormalsSphere->IsChecked() && nValue == 2 ) )
2000-09-18 16:07:07 +00:00
{
m_pBtnNormalsObj->Check( nValue == 0 );
m_pBtnNormalsFlat->Check( nValue == 1 );
m_pBtnNormalsSphere->Check( nValue == 2 );
bUpdate = true;
2000-09-18 16:07:07 +00:00
}
}
else
{
if( m_pBtnNormalsObj->IsChecked() ||
m_pBtnNormalsFlat->IsChecked() ||
m_pBtnNormalsSphere->IsChecked() )
2000-09-18 16:07:07 +00:00
{
m_pBtnNormalsObj->Check( false );
m_pBtnNormalsFlat->Check( false );
m_pBtnNormalsSphere->Check( false );
bUpdate = 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 != SfxItemState::DONTCARE )
2000-09-18 16:07:07 +00:00
{
bool bValue = static_cast<const SfxBoolItem&>(rAttrs.Get(SDRATTR_3DOBJ_NORMALS_INVERT)).GetValue();
if( bValue != m_pBtnNormalsInvert->IsChecked() )
2000-09-18 16:07:07 +00:00
{
m_pBtnNormalsInvert->Check( bValue );
bUpdate = true;
2000-09-18 16:07:07 +00:00
}
else if( m_pBtnNormalsInvert->GetState() == TRISTATE_INDET )
m_pBtnNormalsInvert->Check( bValue );
2000-09-18 16:07:07 +00:00
}
else
{
if( m_pBtnNormalsInvert->GetState() != TRISTATE_INDET )
2000-09-18 16:07:07 +00:00
{
m_pBtnNormalsInvert->SetState( TRISTATE_INDET );
bUpdate = 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 != SfxItemState::DONTCARE )
2000-09-18 16:07:07 +00:00
{
bool bValue = static_cast<const SfxBoolItem&>(rAttrs.Get(SDRATTR_3DSCENE_TWO_SIDED_LIGHTING)).GetValue();
if( bValue != m_pBtnTwoSidedLighting->IsChecked() )
2000-09-18 16:07:07 +00:00
{
m_pBtnTwoSidedLighting->Check( bValue );
bUpdate = true;
2000-09-18 16:07:07 +00:00
}
else if( m_pBtnTwoSidedLighting->GetState() == TRISTATE_INDET )
m_pBtnTwoSidedLighting->Check( bValue );
2000-09-18 16:07:07 +00:00
}
else
{
if( m_pBtnTwoSidedLighting->GetState() != TRISTATE_INDET )
2000-09-18 16:07:07 +00:00
{
m_pBtnTwoSidedLighting->SetState( TRISTATE_INDET );
bUpdate = 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 != SfxItemState::DONTCARE )
2000-09-18 16:07:07 +00:00
{
sal_uInt16 nValue = static_cast<const Svx3DShadeModeItem&>(rAttrs.Get(SDRATTR_3DSCENE_SHADE_MODE)).GetValue();
if( nValue != m_pLbShademode->GetSelectEntryPos() )
2000-09-18 16:07:07 +00:00
{
m_pLbShademode->SelectEntryPos( nValue );
bUpdate = true;
2000-09-18 16:07:07 +00:00
}
}
else
{
if( m_pLbShademode->GetSelectEntryCount() != 0 )
2000-09-18 16:07:07 +00:00
{
m_pLbShademode->SetNoSelection();
bUpdate = 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 != SfxItemState::DONTCARE )
2000-09-18 16:07:07 +00:00
{
bool bValue = static_cast<const SfxBoolItem&>(rAttrs.Get(SDRATTR_3DOBJ_SHADOW_3D)).GetValue();
if( bValue != m_pBtnShadow3d->IsChecked() )
2000-09-18 16:07:07 +00:00
{
m_pBtnShadow3d->Check( bValue );
m_pFtSlant->Enable( bValue );
m_pMtrSlant->Enable( bValue );
bUpdate = true;
2000-09-18 16:07:07 +00:00
}
else if( m_pBtnShadow3d->GetState() == TRISTATE_INDET )
m_pBtnShadow3d->Check( bValue );
2000-09-18 16:07:07 +00:00
}
else
{
if( m_pBtnShadow3d->GetState() != TRISTATE_INDET )
2000-09-18 16:07:07 +00:00
{
m_pBtnShadow3d->SetState( TRISTATE_INDET );
bUpdate = 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 != SfxItemState::DONTCARE )
2000-09-18 16:07:07 +00:00
{
sal_uInt16 nValue = static_cast<const SfxUInt16Item&>(rAttrs.Get(SDRATTR_3DSCENE_SHADOW_SLANT)).GetValue();
if( nValue != m_pMtrSlant->GetValue() )
2000-09-18 16:07:07 +00:00
{
m_pMtrSlant->SetValue( nValue );
bUpdate = true;
2000-09-18 16:07:07 +00:00
}
}
else
{
if( !m_pMtrSlant->IsEmptyFieldValue() )
2000-09-18 16:07:07 +00:00
{
m_pMtrSlant->SetEmptyFieldValue();
bUpdate = 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 != SfxItemState::DONTCARE )
2000-09-18 16:07:07 +00:00
{
sal_uInt32 nValue = static_cast<const SfxUInt32Item&>(rAttrs.Get(SDRATTR_3DSCENE_DISTANCE)).GetValue();
sal_uInt32 nValue2 = GetCoreValue(*m_pMtrDistance, ePoolUnit);
2000-09-18 16:07:07 +00:00
if( nValue != nValue2 )
{
if( eFUnit != m_pMtrDistance->GetUnit() )
SetFieldUnit(*m_pMtrDistance, eFUnit);
2000-09-18 16:07:07 +00:00
SetMetricValue(*m_pMtrDistance, nValue, ePoolUnit);
bUpdate = true;
2000-09-18 16:07:07 +00:00
}
}
else
{
if( !m_pMtrDepth->IsEmptyFieldValue() )
2000-09-18 16:07:07 +00:00
{
m_pMtrDepth->SetEmptyFieldValue();
bUpdate = 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 != SfxItemState::DONTCARE )
2000-09-18 16:07:07 +00:00
{
sal_uInt32 nValue = static_cast<const SfxUInt32Item&>(rAttrs.Get(SDRATTR_3DSCENE_FOCAL_LENGTH)).GetValue();
sal_uInt32 nValue2 = GetCoreValue(*m_pMtrFocalLength, ePoolUnit);
2000-09-18 16:07:07 +00:00
if( nValue != nValue2 )
{
if( eFUnit != m_pMtrFocalLength->GetUnit() )
SetFieldUnit(*m_pMtrFocalLength, eFUnit);
2000-09-18 16:07:07 +00:00
SetMetricValue(*m_pMtrFocalLength, nValue, ePoolUnit);
bUpdate = true;
2000-09-18 16:07:07 +00:00
}
}
else
{
if( !m_pMtrFocalLength->IsEmptyFieldValue() )
2000-09-18 16:07:07 +00:00
{
m_pMtrFocalLength->SetEmptyFieldValue();
bUpdate = 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 != SfxItemState::DONTCARE )
2000-09-18 16:07:07 +00:00
{
aColor = static_cast<const SvxColorItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_1)).GetValue();
ColorLB* pLb = m_pLbLight1;
2000-09-18 16:07:07 +00:00
if( aColor != pLb->GetSelectEntryColor() )
{
LBSelectColor( pLb, aColor );
bUpdate = true;
2000-09-18 16:07:07 +00:00
}
}
else
{
if( m_pLbLight1->GetSelectEntryCount() != 0 )
2000-09-18 16:07:07 +00:00
{
m_pLbLight1->SetNoSelection();
bUpdate = 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 != SfxItemState::DONTCARE )
2000-09-18 16:07:07 +00:00
{
bool bOn = static_cast<const SfxBoolItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_1)).GetValue();
if( ( bOn && !GetUILightState(*m_pBtnLight1)) ||
( !bOn && GetUILightState(*m_pBtnLight1)) )
2000-09-18 16:07:07 +00:00
{
SetUILightState(*m_pBtnLight1, bOn);
bUpdate = true;
2000-09-18 16:07:07 +00:00
}
if( m_pBtnLight1->GetState() == TRISTATE_INDET )
m_pBtnLight1->Check( m_pBtnLight1->IsChecked() );
2000-09-18 16:07:07 +00:00
}
else
{
if( m_pBtnLight1->GetState() != TRISTATE_INDET )
2000-09-18 16:07:07 +00:00
{
m_pBtnLight1->SetState( TRISTATE_INDET );
bUpdate = 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 != SfxItemState::DONTCARE )
2000-09-18 16:07:07 +00:00
{
bUpdate = 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 != SfxItemState::DONTCARE )
2000-09-18 16:07:07 +00:00
{
aColor = static_cast<const SvxColorItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_2)).GetValue();
ColorLB* pLb = m_pLbLight2;
2000-09-18 16:07:07 +00:00
if( aColor != pLb->GetSelectEntryColor() )
{
LBSelectColor( pLb, aColor );
bUpdate = true;
2000-09-18 16:07:07 +00:00
}
}
else
{
if( m_pLbLight2->GetSelectEntryCount() != 0 )
2000-09-18 16:07:07 +00:00
{
m_pLbLight2->SetNoSelection();
bUpdate = 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 != SfxItemState::DONTCARE )
2000-09-18 16:07:07 +00:00
{
bool bOn = static_cast<const SfxBoolItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_2)).GetValue();
if( ( bOn && !GetUILightState(*m_pBtnLight2)) ||
( !bOn && GetUILightState(*m_pBtnLight2)) )
2000-09-18 16:07:07 +00:00
{
SetUILightState(*m_pBtnLight2, bOn);
bUpdate = true;
2000-09-18 16:07:07 +00:00
}
if( m_pBtnLight2->GetState() == TRISTATE_INDET )
m_pBtnLight2->Check( m_pBtnLight2->IsChecked() );
2000-09-18 16:07:07 +00:00
}
else
{
if( m_pBtnLight2->GetState() != TRISTATE_INDET )
2000-09-18 16:07:07 +00:00
{
m_pBtnLight2->SetState( TRISTATE_INDET );
bUpdate = 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 != SfxItemState::DONTCARE )
2000-09-18 16:07:07 +00:00
{
bUpdate = 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 != SfxItemState::DONTCARE )
2000-09-18 16:07:07 +00:00
{
aColor = static_cast<const SvxColorItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_3)).GetValue();
ColorLB* pLb = m_pLbLight3;
2000-09-18 16:07:07 +00:00
if( aColor != pLb->GetSelectEntryColor() )
{
LBSelectColor( pLb, aColor );
bUpdate = true;
2000-09-18 16:07:07 +00:00
}
}
else
{
if( m_pLbLight3->GetSelectEntryCount() != 0 )
2000-09-18 16:07:07 +00:00
{
m_pLbLight3->SetNoSelection();
bUpdate = 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 != SfxItemState::DONTCARE )
2000-09-18 16:07:07 +00:00
{
bool bOn = static_cast<const SfxBoolItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_3)).GetValue();
if( ( bOn && !GetUILightState(*m_pBtnLight3)) ||
( !bOn && GetUILightState(*m_pBtnLight3)) )
2000-09-18 16:07:07 +00:00
{
SetUILightState(*m_pBtnLight3, bOn);
bUpdate = true;
2000-09-18 16:07:07 +00:00
}
if( m_pBtnLight3->GetState() == TRISTATE_INDET )
m_pBtnLight3->Check( m_pBtnLight3->IsChecked() );
2000-09-18 16:07:07 +00:00
}
else
{
if( m_pBtnLight3->GetState() != TRISTATE_INDET )
2000-09-18 16:07:07 +00:00
{
m_pBtnLight3->SetState( TRISTATE_INDET );
bUpdate = 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 != SfxItemState::DONTCARE )
2000-09-18 16:07:07 +00:00
{
bUpdate = 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 != SfxItemState::DONTCARE )
2000-09-18 16:07:07 +00:00
{
aColor = static_cast<const SvxColorItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_4)).GetValue();
ColorLB* pLb = m_pLbLight4;
2000-09-18 16:07:07 +00:00
if( aColor != pLb->GetSelectEntryColor() )
{
LBSelectColor( pLb, aColor );
bUpdate = true;
2000-09-18 16:07:07 +00:00
}
}
else
{
if( m_pLbLight4->GetSelectEntryCount() != 0 )
2000-09-18 16:07:07 +00:00
{
m_pLbLight4->SetNoSelection();
bUpdate = 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 != SfxItemState::DONTCARE )
2000-09-18 16:07:07 +00:00
{
bool bOn = static_cast<const SfxBoolItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_4)).GetValue();
if( ( bOn && !GetUILightState(*m_pBtnLight4)) ||
( !bOn && GetUILightState(*m_pBtnLight4)) )
2000-09-18 16:07:07 +00:00
{
SetUILightState(*m_pBtnLight4, bOn);
bUpdate = true;
2000-09-18 16:07:07 +00:00
}
if( m_pBtnLight4->GetState() == TRISTATE_INDET )
m_pBtnLight4->Check( m_pBtnLight4->IsChecked() );
2000-09-18 16:07:07 +00:00
}
else
{
if( m_pBtnLight4->GetState() != TRISTATE_INDET )
2000-09-18 16:07:07 +00:00
{
m_pBtnLight4->SetState( TRISTATE_INDET );
bUpdate = 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 != SfxItemState::DONTCARE )
2000-09-18 16:07:07 +00:00
{
bUpdate = 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 != SfxItemState::DONTCARE )
2000-09-18 16:07:07 +00:00
{
aColor = static_cast<const SvxColorItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_5)).GetValue();
ColorLB* pLb = m_pLbLight5;
2000-09-18 16:07:07 +00:00
if( aColor != pLb->GetSelectEntryColor() )
{
LBSelectColor( pLb, aColor );
bUpdate = true;
2000-09-18 16:07:07 +00:00
}
}
else
{
if( m_pLbLight5->GetSelectEntryCount() != 0 )
2000-09-18 16:07:07 +00:00
{
m_pLbLight5->SetNoSelection();
bUpdate = 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 != SfxItemState::DONTCARE )
2000-09-18 16:07:07 +00:00
{
bool bOn = static_cast<const SfxBoolItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_5)).GetValue();
if( ( bOn && !GetUILightState(*m_pBtnLight5)) ||
( !bOn && GetUILightState(*m_pBtnLight5)) )
2000-09-18 16:07:07 +00:00
{
SetUILightState(*m_pBtnLight5, bOn);
bUpdate = true;
2000-09-18 16:07:07 +00:00
}
if( m_pBtnLight5->GetState() == TRISTATE_INDET )
m_pBtnLight5->Check( m_pBtnLight5->IsChecked() );
2000-09-18 16:07:07 +00:00
}
else
{
if( m_pBtnLight5->GetState() != TRISTATE_INDET )
2000-09-18 16:07:07 +00:00
{
m_pBtnLight5->SetState( TRISTATE_INDET );
bUpdate = 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 != SfxItemState::DONTCARE )
2000-09-18 16:07:07 +00:00
{
bUpdate = 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 != SfxItemState::DONTCARE )
2000-09-18 16:07:07 +00:00
{
aColor = static_cast<const SvxColorItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_6)).GetValue();
ColorLB* pLb = m_pLbLight6;
2000-09-18 16:07:07 +00:00
if( aColor != pLb->GetSelectEntryColor() )
{
LBSelectColor( pLb, aColor );
bUpdate = true;
2000-09-18 16:07:07 +00:00
}
}
else
{
if( m_pLbLight6->GetSelectEntryCount() != 0 )
2000-09-18 16:07:07 +00:00
{
m_pLbLight6->SetNoSelection();
bUpdate = 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 != SfxItemState::DONTCARE )
2000-09-18 16:07:07 +00:00
{
bool bOn = static_cast<const SfxBoolItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_6)).GetValue();
if( ( bOn && !GetUILightState(*m_pBtnLight6)) ||
( !bOn && GetUILightState(*m_pBtnLight6)) )
2000-09-18 16:07:07 +00:00
{
SetUILightState(*m_pBtnLight6, bOn);
bUpdate = true;
2000-09-18 16:07:07 +00:00
}
if( m_pBtnLight6->GetState() == TRISTATE_INDET )
m_pBtnLight6->Check( m_pBtnLight6->IsChecked() );
2000-09-18 16:07:07 +00:00
}
else
{
if( m_pBtnLight6->GetState() != TRISTATE_INDET )
2000-09-18 16:07:07 +00:00
{
m_pBtnLight6->SetState( TRISTATE_INDET );
bUpdate = 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 != SfxItemState::DONTCARE )
2000-09-18 16:07:07 +00:00
{
bUpdate = 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 != SfxItemState::DONTCARE )
2000-09-18 16:07:07 +00:00
{
aColor = static_cast<const SvxColorItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_7)).GetValue();
ColorLB* pLb = m_pLbLight7;
2000-09-18 16:07:07 +00:00
if( aColor != pLb->GetSelectEntryColor() )
{
LBSelectColor( pLb, aColor );
bUpdate = true;
2000-09-18 16:07:07 +00:00
}
}
else
{
if( m_pLbLight7->GetSelectEntryCount() != 0 )
2000-09-18 16:07:07 +00:00
{
m_pLbLight7->SetNoSelection();
bUpdate = 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 != SfxItemState::DONTCARE )
2000-09-18 16:07:07 +00:00
{
bool bOn = static_cast<const SfxBoolItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_7)).GetValue();
if( ( bOn && !GetUILightState(*m_pBtnLight7)) ||
( !bOn && GetUILightState(*m_pBtnLight7)) )
2000-09-18 16:07:07 +00:00
{
SetUILightState(*m_pBtnLight7 , bOn);
bUpdate = true;
2000-09-18 16:07:07 +00:00
}
if( m_pBtnLight7->GetState() == TRISTATE_INDET )
m_pBtnLight7->Check( m_pBtnLight7->IsChecked() );
2000-09-18 16:07:07 +00:00
}
else
{
if( m_pBtnLight7->GetState() != TRISTATE_INDET )
2000-09-18 16:07:07 +00:00
{
m_pBtnLight7->SetState( TRISTATE_INDET );
bUpdate = 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 != SfxItemState::DONTCARE )
2000-09-18 16:07:07 +00:00
{
bUpdate = 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 != SfxItemState::DONTCARE )
2000-09-18 16:07:07 +00:00
{
aColor = static_cast<const SvxColorItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_8)).GetValue();
ColorLB* pLb = m_pLbLight8;
2000-09-18 16:07:07 +00:00
if( aColor != pLb->GetSelectEntryColor() )
{
LBSelectColor( pLb, aColor );
bUpdate = true;
2000-09-18 16:07:07 +00:00
}
}
else
{
if( m_pLbLight8->GetSelectEntryCount() != 0 )
2000-09-18 16:07:07 +00:00
{
m_pLbLight8->SetNoSelection();
bUpdate = 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 != SfxItemState::DONTCARE )
2000-09-18 16:07:07 +00:00
{
bool bOn = static_cast<const SfxBoolItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_8)).GetValue();
if( ( bOn && !GetUILightState(*m_pBtnLight8)) ||
( !bOn && GetUILightState(*m_pBtnLight8)) )
2000-09-18 16:07:07 +00:00
{
SetUILightState(*m_pBtnLight8, bOn);
bUpdate = true;
2000-09-18 16:07:07 +00:00
}
if( m_pBtnLight8->GetState() == TRISTATE_INDET )
m_pBtnLight8->Check( m_pBtnLight8->IsChecked() );
2000-09-18 16:07:07 +00:00
}
else
{
if( m_pBtnLight8->GetState() != TRISTATE_INDET )
2000-09-18 16:07:07 +00:00
{
m_pBtnLight8->SetState( TRISTATE_INDET );
bUpdate = 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 != SfxItemState::DONTCARE )
2000-09-18 16:07:07 +00:00
{
bUpdate = 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 != SfxItemState::DONTCARE )
2000-09-18 16:07:07 +00:00
{
aColor = static_cast<const SvxColorItem&>(rAttrs.Get(SDRATTR_3DSCENE_AMBIENTCOLOR)).GetValue();
ColorLB* pLb = m_pLbAmbientlight;
2000-09-18 16:07:07 +00:00
if( aColor != pLb->GetSelectEntryColor() )
{
LBSelectColor( pLb, aColor );
bUpdate = true;
2000-09-18 16:07:07 +00:00
}
}
else
{
if( m_pLbAmbientlight->GetSelectEntryCount() != 0 )
2000-09-18 16:07:07 +00:00
{
m_pLbAmbientlight->SetNoSelection();
bUpdate = 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 != SfxItemState::DONTCARE )
2000-09-18 16:07:07 +00:00
{
sal_uInt16 nValue = static_cast<const Svx3DTextureKindItem&>(rAttrs.Get(SDRATTR_3DOBJ_TEXTURE_KIND)).GetValue();
2000-09-18 16:07:07 +00:00
if( ( !m_pBtnTexLuminance->IsChecked() && nValue == 1 ) ||
( !m_pBtnTexColor->IsChecked() && nValue == 3 ) )
2000-09-18 16:07:07 +00:00
{
m_pBtnTexLuminance->Check( nValue == 1 );
m_pBtnTexColor->Check( nValue == 3 );
bUpdate = true;
2000-09-18 16:07:07 +00:00
}
}
else
{
if( m_pBtnTexLuminance->IsChecked() ||
m_pBtnTexColor->IsChecked() )
2000-09-18 16:07:07 +00:00
{
m_pBtnTexLuminance->Check( false );
m_pBtnTexColor->Check( false );
bUpdate = 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 != SfxItemState::DONTCARE )
2000-09-18 16:07:07 +00:00
{
sal_uInt16 nValue = static_cast<const Svx3DTextureModeItem&>(rAttrs.Get(SDRATTR_3DOBJ_TEXTURE_MODE)).GetValue();
2000-09-18 16:07:07 +00:00
if( ( !m_pBtnTexReplace->IsChecked() && nValue == 1 ) ||
( !m_pBtnTexModulate->IsChecked() && nValue == 2 ) )
2000-09-18 16:07:07 +00:00
{
m_pBtnTexReplace->Check( nValue == 1 );
m_pBtnTexModulate->Check( nValue == 2 );
bUpdate = true;
2000-09-18 16:07:07 +00:00
}
}
else
{
if( m_pBtnTexReplace->IsChecked() ||
m_pBtnTexModulate->IsChecked() )
2000-09-18 16:07:07 +00:00
{
m_pBtnTexReplace->Check( false );
m_pBtnTexModulate->Check( false );
bUpdate = 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 != SfxItemState::DONTCARE )
2000-09-18 16:07:07 +00:00
{
sal_uInt16 nValue = static_cast<const Svx3DTextureProjectionXItem&>(rAttrs.Get(SDRATTR_3DOBJ_TEXTURE_PROJ_X)).GetValue();
2000-09-18 16:07:07 +00:00
if( ( !m_pBtnTexObjectX->IsChecked() && nValue == 0 ) ||
( !m_pBtnTexParallelX->IsChecked() && nValue == 1 ) ||
( !m_pBtnTexCircleX->IsChecked() && nValue == 2 ) )
2000-09-18 16:07:07 +00:00
{
m_pBtnTexObjectX->Check( nValue == 0 );
m_pBtnTexParallelX->Check( nValue == 1 );
m_pBtnTexCircleX->Check( nValue == 2 );
bUpdate = true;
2000-09-18 16:07:07 +00:00
}
}
else
{
if( m_pBtnTexObjectX->IsChecked() ||
m_pBtnTexParallelX->IsChecked() ||
m_pBtnTexCircleX->IsChecked() )
2000-09-18 16:07:07 +00:00
{
m_pBtnTexObjectX->Check( false );
m_pBtnTexParallelX->Check( false );
m_pBtnTexCircleX->Check( false );
bUpdate = 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 != SfxItemState::DONTCARE )
2000-09-18 16:07:07 +00:00
{
sal_uInt16 nValue = static_cast<const Svx3DTextureProjectionYItem&>(rAttrs.Get(SDRATTR_3DOBJ_TEXTURE_PROJ_Y)).GetValue();
2000-09-18 16:07:07 +00:00
if( ( !m_pBtnTexObjectY->IsChecked() && nValue == 0 ) ||
( !m_pBtnTexParallelY->IsChecked() && nValue == 1 ) ||
( !m_pBtnTexCircleY->IsChecked() && nValue == 2 ) )
2000-09-18 16:07:07 +00:00
{
m_pBtnTexObjectY->Check( nValue == 0 );
m_pBtnTexParallelY->Check( nValue == 1 );
m_pBtnTexCircleY->Check( nValue == 2 );
bUpdate = true;
2000-09-18 16:07:07 +00:00
}
}
else
{
if( m_pBtnTexObjectY->IsChecked() ||
m_pBtnTexParallelY->IsChecked() ||
m_pBtnTexCircleY->IsChecked() )
2000-09-18 16:07:07 +00:00
{
m_pBtnTexObjectY->Check( false );
m_pBtnTexParallelY->Check( false );
m_pBtnTexCircleY->Check( false );
bUpdate = true;
2000-09-18 16:07:07 +00:00
}
}
// Filter
eState = rAttrs.GetItemState(SDRATTR_3DOBJ_TEXTURE_FILTER);
if( eState != SfxItemState::DONTCARE )
2000-09-18 16:07:07 +00:00
{
bool bValue = static_cast<const SfxBoolItem&>(rAttrs.Get(SDRATTR_3DOBJ_TEXTURE_FILTER)).GetValue();
if( bValue != m_pBtnTexFilter->IsChecked() )
2000-09-18 16:07:07 +00:00
{
m_pBtnTexFilter->Check( bValue );
bUpdate = true;
2000-09-18 16:07:07 +00:00
}
if( m_pBtnTexFilter->GetState() == TRISTATE_INDET )
m_pBtnTexFilter->Check( bValue );
2000-09-18 16:07:07 +00:00
}
else
{
if( m_pBtnTexFilter->GetState() != TRISTATE_INDET )
2000-09-18 16:07:07 +00:00
{
m_pBtnTexFilter->SetState( TRISTATE_INDET );
bUpdate = true;
2000-09-18 16:07:07 +00:00
}
}
}
2011-04-07 15:47:21 +03:00
// Material Favorites
m_pLbMatFavorites->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 != SfxItemState::DONTCARE )
2000-09-18 16:07:07 +00:00
{
aColor = static_cast<const XFillColorItem&>(rAttrs.Get(XATTR_FILLCOLOR)).GetColorValue();
ColorLB* pLb = m_pLbMatColor;
2000-09-18 16:07:07 +00:00
if( aColor != pLb->GetSelectEntryColor() )
{
LBSelectColor( pLb, aColor );
bUpdate = true;
2000-09-18 16:07:07 +00:00
}
}
else
{
if( m_pLbMatColor->GetSelectEntryCount() != 0 )
2000-09-18 16:07:07 +00:00
{
m_pLbMatColor->SetNoSelection();
bUpdate = 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 != SfxItemState::DONTCARE )
2000-09-18 16:07:07 +00:00
{
aColor = static_cast<const SvxColorItem&>(rAttrs.Get(SDRATTR_3DOBJ_MAT_EMISSION)).GetValue();
ColorLB* pLb = m_pLbMatEmission;
2000-09-18 16:07:07 +00:00
if( aColor != pLb->GetSelectEntryColor() )
{
LBSelectColor( pLb, aColor );
bUpdate = true;
2000-09-18 16:07:07 +00:00
}
}
else
{
if( m_pLbMatEmission->GetSelectEntryCount() != 0 )
2000-09-18 16:07:07 +00:00
{
m_pLbMatEmission->SetNoSelection();
bUpdate = 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 != SfxItemState::DONTCARE )
2000-09-18 16:07:07 +00:00
{
aColor = static_cast<const SvxColorItem&>(rAttrs.Get(SDRATTR_3DOBJ_MAT_SPECULAR)).GetValue();
ColorLB* pLb = m_pLbMatSpecular;
2000-09-18 16:07:07 +00:00
if( aColor != pLb->GetSelectEntryColor() )
{
LBSelectColor( pLb, aColor );
bUpdate = true;
2000-09-18 16:07:07 +00:00
}
}
else
{
if( m_pLbMatSpecular->GetSelectEntryCount() != 0 )
2000-09-18 16:07:07 +00:00
{
m_pLbMatSpecular->SetNoSelection();
bUpdate = 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 != SfxItemState::DONTCARE )
2000-09-18 16:07:07 +00:00
{
sal_uInt16 nValue = static_cast<const SfxUInt16Item&>(rAttrs.Get(SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY)).GetValue();
if( nValue != m_pMtrMatSpecularIntensity->GetValue() )
2000-09-18 16:07:07 +00:00
{
m_pMtrMatSpecularIntensity->SetValue( nValue );
bUpdate = true;
2000-09-18 16:07:07 +00:00
}
}
else
{
if( !m_pMtrMatSpecularIntensity->IsEmptyFieldValue() )
2000-09-18 16:07:07 +00:00
{
m_pMtrMatSpecularIntensity->SetEmptyFieldValue();
bUpdate = 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 != SfxItemState::DONTCARE )
2000-09-18 16:07:07 +00:00
{
ProjectionType ePT = (ProjectionType)static_cast<const Svx3DPerspectiveItem&>(rAttrs.Get(SDRATTR_3DSCENE_PERSPECTIVE)).GetValue();
if( ( !m_pBtnPerspective->IsChecked() && ePT == PR_PERSPECTIVE ) ||
( m_pBtnPerspective->IsChecked() && ePT == PR_PARALLEL ) )
2000-09-18 16:07:07 +00:00
{
m_pBtnPerspective->Check( ePT == PR_PERSPECTIVE );
bUpdate = true;
2000-09-18 16:07:07 +00:00
}
if( m_pBtnPerspective->GetState() == TRISTATE_INDET )
m_pBtnPerspective->Check( ePT == PR_PERSPECTIVE );
2000-09-18 16:07:07 +00:00
}
else
{
if( m_pBtnPerspective->GetState() != TRISTATE_INDET )
2000-09-18 16:07:07 +00:00
{
m_pBtnPerspective->SetState( TRISTATE_INDET );
bUpdate = 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 = 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 drawing::LineStyle_NONE when it's not set so that
// the default (drawing::LineStyle_SOLID) is not used for 3d preview
if(SfxItemState::SET != aSet.GetItemState(XATTR_LINESTYLE, false))
aSet.Put(XLineStyleItem(drawing::LineStyle_NONE));
// set FillColor hard to WHITE when it's SfxItemState::DONTCARE so that
// the default (Blue7) is not used for 3d preview
if(SfxItemState::DONTCARE == aSet.GetItemState(XATTR_FILLCOLOR, false))
aSet.Put(XFillColorItem(OUString(), Color(COL_WHITE)));
m_pCtlPreview->Set3DAttributes(aSet);
m_pCtlLightPreview->GetSvx3DLightControl().Set3DAttributes(aSet);
2008-10-17 08:40:10 +00:00
// try to select light corresponding to active button
sal_uInt32 nNumber(0xffffffff);
if(m_pBtnLight1->IsChecked())
2008-10-17 08:40:10 +00:00
nNumber = 0;
else if(m_pBtnLight2->IsChecked())
2008-10-17 08:40:10 +00:00
nNumber = 1;
else if(m_pBtnLight3->IsChecked())
2008-10-17 08:40:10 +00:00
nNumber = 2;
else if(m_pBtnLight4->IsChecked())
2008-10-17 08:40:10 +00:00
nNumber = 3;
else if(m_pBtnLight5->IsChecked())
2008-10-17 08:40:10 +00:00
nNumber = 4;
else if(m_pBtnLight6->IsChecked())
2008-10-17 08:40:10 +00:00
nNumber = 5;
else if(m_pBtnLight7->IsChecked())
2008-10-17 08:40:10 +00:00
nNumber = 6;
else if(m_pBtnLight8->IsChecked())
2008-10-17 08:40:10 +00:00
nNumber = 7;
if(nNumber != 0xffffffff)
{
m_pCtlLightPreview->GetSvx3DLightControl().SelectLight(nNumber);
2008-10-17 08:40:10 +00:00
}
2000-09-18 16:07:07 +00:00
}
// handle state of converts possible
m_pBtnConvertTo3D->Enable(pConvertTo3DItem->GetState());
m_pBtnLatheObject->Enable(pConvertTo3DLatheItem->GetState());
2000-09-18 16:07:07 +00:00
}
2000-09-18 16:07:07 +00:00
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(SfxItemState::DONTCARE == eState)
rAttrs.InvalidateItem(nWhich);
else if(SfxItemState::SET == eState)
rAttrs.Put(mpRemember2DAttributes->Get(nWhich, 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
if( m_pBtnPerspective->GetState() != TRISTATE_INDET )
2000-09-18 16:07:07 +00:00
{
sal_uInt16 nValue;
if( m_pBtnPerspective->IsChecked() )
2000-09-18 16:07:07 +00:00
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)
if( !m_pNumHorizontal->IsEmptyFieldValue() )
2000-09-18 16:07:07 +00:00
{
sal_uInt32 nValue = static_cast<sal_uInt32>(m_pNumHorizontal->GetValue());
rAttrs.Put(makeSvx3DHorizontalSegmentsItem(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)
if( !m_pNumVertical->IsEmptyFieldValue() )
2000-09-18 16:07:07 +00:00
{
sal_uInt32 nValue = static_cast<sal_uInt32>(m_pNumVertical->GetValue());
rAttrs.Put(makeSvx3DVerticalSegmentsItem(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
if( !m_pMtrDepth->IsEmptyFieldValue() )
2000-09-18 16:07:07 +00:00
{
sal_uInt32 nValue = GetCoreValue(*m_pMtrDepth, ePoolUnit);
rAttrs.Put(makeSvx3DDepthItem(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
TriState eState = m_pBtnDoubleSided->GetState();
if( eState != TRISTATE_INDET )
2000-09-18 16:07:07 +00:00
{
bool bValue = TRISTATE_TRUE == eState;
rAttrs.Put(makeSvx3DDoubleSidedItem(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
if( !m_pMtrPercentDiagonal->IsEmptyFieldValue() )
2000-09-18 16:07:07 +00:00
{
sal_uInt16 nValue = (sal_uInt16) m_pMtrPercentDiagonal->GetValue();
rAttrs.Put(makeSvx3DPercentDiagonalItem(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
if( !m_pMtrBackscale->IsEmptyFieldValue() )
2000-09-18 16:07:07 +00:00
{
sal_uInt16 nValue = (sal_uInt16)m_pMtrBackscale->GetValue();
rAttrs.Put(makeSvx3DBackscaleItem(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
if( !m_pMtrEndAngle->IsEmptyFieldValue() )
2000-09-18 16:07:07 +00:00
{
sal_uInt16 nValue = (sal_uInt16)m_pMtrEndAngle->GetValue();
rAttrs.Put(makeSvx3DEndAngleItem(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;
if( m_pBtnNormalsObj->IsChecked() )
2000-09-18 16:07:07 +00:00
nValue = 0;
else if( m_pBtnNormalsFlat->IsChecked() )
2000-09-18 16:07:07 +00:00
nValue = 1;
else if( m_pBtnNormalsSphere->IsChecked() )
2000-09-18 16:07:07 +00:00
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
eState = m_pBtnNormalsInvert->GetState();
if( eState != TRISTATE_INDET )
2000-09-18 16:07:07 +00:00
{
bool bValue = TRISTATE_TRUE == eState;
rAttrs.Put(makeSvx3DNormalsInvertItem(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
eState = m_pBtnTwoSidedLighting->GetState();
if( eState != TRISTATE_INDET )
2000-09-18 16:07:07 +00:00
{
bool bValue = TRISTATE_TRUE == eState;
rAttrs.Put(makeSvx3DTwoSidedLightingItem(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
if( m_pLbShademode->GetSelectEntryCount() )
2000-09-18 16:07:07 +00:00
{
nValue = m_pLbShademode->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
eState = m_pBtnShadow3d->GetState();
if( eState != TRISTATE_INDET )
2000-09-18 16:07:07 +00:00
{
bool bValue = TRISTATE_TRUE == eState;
rAttrs.Put(makeSvx3DShadow3DItem(bValue));
rAttrs.Put(makeSdrShadowItem(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)
if( !m_pMtrSlant->IsEmptyFieldValue() )
2000-09-18 16:07:07 +00:00
{
sal_uInt16 nValue2 = (sal_uInt16) m_pMtrSlant->GetValue();
rAttrs.Put(makeSvx3DShadowSlantItem(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
if( !m_pMtrDistance->IsEmptyFieldValue() )
2000-09-18 16:07:07 +00:00
{
sal_uInt32 nValue2 = GetCoreValue(*m_pMtrDistance, ePoolUnit);
rAttrs.Put(makeSvx3DDistanceItem(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
if( !m_pMtrFocalLength->IsEmptyFieldValue() )
2000-09-18 16:07:07 +00:00
{
sal_uInt32 nValue2 = GetCoreValue(*m_pMtrFocalLength, ePoolUnit);
rAttrs.Put(makeSvx3DFocalLengthItem(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;
const SfxItemSet aLightItemSet(m_pCtlLightPreview->GetSvx3DLightControl().Get3DAttributes());
2008-10-17 08:40:10 +00:00
2011-04-07 15:47:21 +03:00
// Light 1 color
if( m_pLbLight1->GetSelectEntryCount() )
2000-09-18 16:07:07 +00:00
{
aColor = m_pLbLight1->GetSelectEntryColor();
rAttrs.Put(makeSvx3DLightcolor1Item(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)
eState = m_pBtnLight1->GetState();
if( eState != TRISTATE_INDET )
2000-09-18 16:07:07 +00:00
{
bool bValue = GetUILightState(*m_pBtnLight1);
rAttrs.Put(makeSvx3DLightOnOff1Item(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
if( m_pLbLight2->GetSelectEntryCount() )
2000-09-18 16:07:07 +00:00
{
aColor = m_pLbLight2->GetSelectEntryColor();
rAttrs.Put(makeSvx3DLightcolor2Item(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)
eState = m_pBtnLight2->GetState();
if( eState != TRISTATE_INDET )
2000-09-18 16:07:07 +00:00
{
bool bValue = GetUILightState(*m_pBtnLight2);
rAttrs.Put(makeSvx3DLightOnOff2Item(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
if( m_pLbLight3->GetSelectEntryCount() )
2000-09-18 16:07:07 +00:00
{
aColor = m_pLbLight3->GetSelectEntryColor();
rAttrs.Put(makeSvx3DLightcolor3Item(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)
eState = m_pBtnLight3->GetState();
if( eState != TRISTATE_INDET )
2000-09-18 16:07:07 +00:00
{
bool bValue = GetUILightState(*m_pBtnLight3);
rAttrs.Put(makeSvx3DLightOnOff3Item(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
if( m_pLbLight4->GetSelectEntryCount() )
2000-09-18 16:07:07 +00:00
{
aColor = m_pLbLight4->GetSelectEntryColor();
rAttrs.Put(makeSvx3DLightcolor4Item(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)
eState = m_pBtnLight4->GetState();
if( eState != TRISTATE_INDET )
2000-09-18 16:07:07 +00:00
{
bool bValue = GetUILightState(*m_pBtnLight4);
rAttrs.Put(makeSvx3DLightOnOff4Item(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
if( m_pLbLight5->GetSelectEntryCount() )
2000-09-18 16:07:07 +00:00
{
aColor = m_pLbLight5->GetSelectEntryColor();
rAttrs.Put(makeSvx3DLightcolor5Item(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)
eState = m_pBtnLight5->GetState();
if( eState != TRISTATE_INDET )
2000-09-18 16:07:07 +00:00
{
bool bValue = GetUILightState(*m_pBtnLight5);
rAttrs.Put(makeSvx3DLightOnOff5Item(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
if( m_pLbLight6->GetSelectEntryCount() )
2000-09-18 16:07:07 +00:00
{
aColor = m_pLbLight6->GetSelectEntryColor();
rAttrs.Put(makeSvx3DLightcolor6Item(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)
eState = m_pBtnLight6->GetState();
if( eState != TRISTATE_INDET )
2000-09-18 16:07:07 +00:00
{
bool bValue = GetUILightState(*m_pBtnLight6);
rAttrs.Put(makeSvx3DLightOnOff6Item(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
if( m_pLbLight7->GetSelectEntryCount() )
2000-09-18 16:07:07 +00:00
{
aColor = m_pLbLight7->GetSelectEntryColor();
rAttrs.Put(makeSvx3DLightcolor7Item(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)
eState = m_pBtnLight7->GetState();
if( eState != TRISTATE_INDET )
2000-09-18 16:07:07 +00:00
{
bool bValue = GetUILightState(*m_pBtnLight7);
rAttrs.Put(makeSvx3DLightOnOff7Item(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
if( m_pLbLight8->GetSelectEntryCount() )
2000-09-18 16:07:07 +00:00
{
aColor = m_pLbLight8->GetSelectEntryColor();
rAttrs.Put(makeSvx3DLightcolor8Item(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)
eState = m_pBtnLight8->GetState();
if( eState != TRISTATE_INDET )
2000-09-18 16:07:07 +00:00
{
bool bValue = GetUILightState(*m_pBtnLight8);
rAttrs.Put(makeSvx3DLightOnOff8Item(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
if( m_pLbAmbientlight->GetSelectEntryCount() )
2000-09-18 16:07:07 +00:00
{
aColor = m_pLbAmbientlight->GetSelectEntryColor();
rAttrs.Put(makeSvx3DAmbientcolorItem(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 = 99;
if( m_pBtnTexLuminance->IsChecked() )
2000-09-18 16:07:07 +00:00
nValue = 1;
else if( m_pBtnTexColor->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( m_pBtnTexReplace->IsChecked() )
2000-09-18 16:07:07 +00:00
nValue = 1;
else if( m_pBtnTexModulate->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( m_pBtnTexObjectX->IsChecked() )
2000-09-18 16:07:07 +00:00
nValue = 0;
else if( m_pBtnTexParallelX->IsChecked() )
2000-09-18 16:07:07 +00:00
nValue = 1;
else if( m_pBtnTexCircleX->IsChecked() )
2000-09-18 16:07:07 +00:00
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( m_pBtnTexObjectY->IsChecked() )
2000-09-18 16:07:07 +00:00
nValue = 0;
else if( m_pBtnTexParallelY->IsChecked() )
2000-09-18 16:07:07 +00:00
nValue = 1;
else if( m_pBtnTexCircleY->IsChecked() )
2000-09-18 16:07:07 +00:00
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 = m_pBtnTexFilter->GetState();
if( eState != TRISTATE_INDET )
2000-09-18 16:07:07 +00:00
{
bool bValue = TRISTATE_TRUE == eState;
rAttrs.Put(makeSvx3DTextureFilterItem(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
if( m_pLbMatColor->GetSelectEntryCount() )
2000-09-18 16:07:07 +00:00
{
aColor = m_pLbMatColor->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
if( m_pLbMatEmission->GetSelectEntryCount() )
2000-09-18 16:07:07 +00:00
{
aColor = m_pLbMatEmission->GetSelectEntryColor();
rAttrs.Put(makeSvx3DMaterialEmissionItem(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
if( m_pLbMatSpecular->GetSelectEntryCount() )
2000-09-18 16:07:07 +00:00
{
aColor = m_pLbMatSpecular->GetSelectEntryColor();
rAttrs.Put(makeSvx3DMaterialSpecularItem(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
if( !m_pMtrMatSpecularIntensity->IsEmptyFieldValue() )
2000-09-18 16:07:07 +00:00
{
sal_uInt16 nValue2 = (sal_uInt16) m_pMtrMatSpecularIntensity->GetValue();
rAttrs.Put(makeSvx3DMaterialSpecularIntensityItem(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() )
{
// Hide
m_pBtnUpdate->Hide();
m_pBtnAssign->Hide();
2000-09-18 16:07:07 +00:00
m_pBtnConvertTo3D->Hide();
m_pBtnLatheObject->Hide();
m_pBtnPerspective->Hide();
2000-09-18 16:07:07 +00:00
m_pCtlPreview->Hide();
m_pCtlLightPreview->Hide();
2000-09-18 16:07:07 +00:00
m_pFLGeometrie->Hide();
m_pFLRepresentation->Hide();
m_pFLLight->Hide();
m_pFLTexture->Hide();
m_pFLMaterial->Hide();
2000-09-18 16:07:07 +00:00
// Show
m_pBtnUpdate->Show();
m_pBtnAssign->Show();
2000-09-18 16:07:07 +00:00
m_pBtnConvertTo3D->Show();
m_pBtnLatheObject->Show();
m_pBtnPerspective->Show();
2000-09-18 16:07:07 +00:00
if( m_pBtnGeo->IsChecked() )
ClickViewTypeHdl(m_pBtnGeo);
if( m_pBtnRepresentation->IsChecked() )
ClickViewTypeHdl(m_pBtnRepresentation);
if( m_pBtnLight->IsChecked() )
ClickViewTypeHdl(m_pBtnLight);
if( m_pBtnTexture->IsChecked() )
ClickViewTypeHdl(m_pBtnTexture);
if( m_pBtnMaterial->IsChecked() )
ClickViewTypeHdl(m_pBtnMaterial);
2000-09-18 16:07:07 +00:00
}
}
SfxDockingWindow::Resize();
}
IMPL_LINK_NOARG(Svx3DWin, ClickUpdateHdl)
2000-09-18 16:07:07 +00:00
{
bUpdate = !m_pBtnUpdate->IsChecked();
m_pBtnUpdate->Check( bUpdate );
2000-09-18 16:07:07 +00:00
if( bUpdate )
{
SfxDispatcher* pDispatcher = LocalGetDispatcher(pBindings);
if (pDispatcher != NULL)
{
SfxBoolItem aItem( SID_3D_STATE, true );
pDispatcher->Execute(
SID_3D_STATE, SfxCallMode::ASYNCHRON | SfxCallMode::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;
2000-09-18 16:07:07 +00:00
}
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, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, &aItem, 0L );
}
2000-09-18 16:07:07 +00:00
return 0L;
2000-09-18 16:07:07 +00:00
}
2000-09-18 16:07:07 +00:00
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
bool bUpdatePreview = m_pBtnLight->IsChecked();
2000-09-18 16:07:07 +00:00
m_pBtnGeo->Check(m_pBtnGeo == pBtn);
m_pBtnRepresentation->Check(m_pBtnRepresentation == pBtn);
m_pBtnLight->Check(m_pBtnLight == pBtn);
m_pBtnTexture->Check(m_pBtnTexture == pBtn);
m_pBtnMaterial->Check(m_pBtnMaterial == pBtn);
2000-09-18 16:07:07 +00:00
if( m_pBtnGeo->IsChecked() )
2000-09-18 16:07:07 +00:00
eViewType = VIEWTYPE_GEO;
if( m_pBtnRepresentation->IsChecked() )
2000-09-18 16:07:07 +00:00
eViewType = VIEWTYPE_REPRESENTATION;
if( m_pBtnLight->IsChecked() )
2000-09-18 16:07:07 +00:00
eViewType = VIEWTYPE_LIGHT;
if( m_pBtnTexture->IsChecked() )
2000-09-18 16:07:07 +00:00
eViewType = VIEWTYPE_TEXTURE;
if( m_pBtnMaterial->IsChecked() )
2000-09-18 16:07:07 +00:00
eViewType = VIEWTYPE_MATERIAL;
2011-04-07 15:47:21 +03:00
// Geometry
2000-09-18 16:07:07 +00:00
if( eViewType == VIEWTYPE_GEO )
{
m_pFLSegments->Show();
m_pFLGeometrie->Show();
m_pFLNormals->Show();
2000-09-18 16:07:07 +00:00
}
else
{
m_pFLSegments->Hide();
m_pFLGeometrie->Hide();
m_pFLNormals->Hide();
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
if( eViewType == VIEWTYPE_REPRESENTATION )
{
m_pFLShadow->Show();
m_pFLCamera->Show();
m_pFLRepresentation->Show();
2000-09-18 16:07:07 +00:00
}
else
{
m_pFLShadow->Hide();
m_pFLCamera->Hide();
m_pFLRepresentation->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 )
{
m_pFLLight->Show();
2000-09-18 16:07:07 +00:00
ColorLB* pLb = GetLbByButton();
if( pLb )
pLb->Show();
m_pCtlLightPreview->Show();
m_pCtlPreview->Hide();
2000-09-18 16:07:07 +00:00
}
else
{
m_pFLLight->Hide();
if( !m_pCtlPreview->IsVisible() )
2000-09-18 16:07:07 +00:00
{
m_pCtlPreview->Show();
m_pCtlLightPreview->Hide();
2000-09-18 16:07:07 +00:00
}
}
2010-10-21 10:32:34 +01:00
// Textures
if (eViewType == VIEWTYPE_TEXTURE)
m_pFLTexture->Show();
2000-09-18 16:07:07 +00:00
else
m_pFLTexture->Hide();
2000-09-18 16:07:07 +00:00
// Material
if( eViewType == VIEWTYPE_MATERIAL )
{
m_pFLMatSpecular->Show();
m_pFLMaterial->Show();
2000-09-18 16:07:07 +00:00
}
else
{
m_pFLMatSpecular->Hide();
m_pFLMaterial->Hide();
}
if( bUpdatePreview && !m_pBtnLight->IsChecked() )
2000-09-18 16:07:07 +00:00
UpdatePreview();
}
else
{
m_pBtnGeo->Check( eViewType == VIEWTYPE_GEO );
m_pBtnRepresentation->Check( eViewType == VIEWTYPE_REPRESENTATION );
m_pBtnLight->Check( eViewType == VIEWTYPE_LIGHT );
m_pBtnTexture->Check( eViewType == VIEWTYPE_TEXTURE );
m_pBtnMaterial->Check( eViewType == VIEWTYPE_MATERIAL );
}
return 0L;
2000-09-18 16:07:07 +00:00
}
2000-09-18 16:07:07 +00:00
IMPL_LINK( Svx3DWin, ClickHdl, PushButton *, pBtn )
{
if( pBtn )
{
bool bUpdatePreview = false;
sal_uInt16 nSId = 0;
2000-09-18 16:07:07 +00:00
if( pBtn == m_pBtnConvertTo3D )
2000-09-18 16:07:07 +00:00
{
nSId = SID_CONVERT_TO_3D;
}
else if( pBtn == m_pBtnLatheObject )
2000-09-18 16:07:07 +00:00
{
nSId = SID_CONVERT_TO_3D_LATHE_FAST;
}
2011-04-07 15:47:21 +03:00
// Geometry
else if( pBtn == m_pBtnNormalsObj ||
pBtn == m_pBtnNormalsFlat ||
pBtn == m_pBtnNormalsSphere )
2000-09-18 16:07:07 +00:00
{
m_pBtnNormalsObj->Check( pBtn == m_pBtnNormalsObj );
m_pBtnNormalsFlat->Check( pBtn == m_pBtnNormalsFlat );
m_pBtnNormalsSphere->Check( pBtn == m_pBtnNormalsSphere );
bUpdatePreview = true;
2000-09-18 16:07:07 +00:00
}
else if( pBtn == m_pBtnLight1 ||
pBtn == m_pBtnLight2 ||
pBtn == m_pBtnLight3 ||
pBtn == m_pBtnLight4 ||
pBtn == m_pBtnLight5 ||
pBtn == m_pBtnLight6 ||
pBtn == m_pBtnLight7 ||
pBtn == m_pBtnLight8 )
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
ColorLB* pLb = GetLbByButton( pBtn );
pLb->Show();
if( pBtn->IsChecked() )
{
SetUILightState( *static_cast<ImageButton*>(pBtn), !GetUILightState( *static_cast<ImageButton*>(pBtn) ) );
2000-09-18 16:07:07 +00:00
}
else
{
pBtn->Check();
if (pBtn != m_pBtnLight1 && m_pBtnLight1->IsChecked())
2000-09-18 16:07:07 +00:00
{
m_pBtnLight1->Check( false );
m_pLbLight1->Hide();
2000-09-18 16:07:07 +00:00
}
if (pBtn != m_pBtnLight2 && m_pBtnLight2->IsChecked())
2000-09-18 16:07:07 +00:00
{
m_pBtnLight2->Check( false );
m_pLbLight2->Hide();
2000-09-18 16:07:07 +00:00
}
if( pBtn != m_pBtnLight3 && m_pBtnLight3->IsChecked() )
2000-09-18 16:07:07 +00:00
{
m_pBtnLight3->Check( false );
m_pLbLight3->Hide();
2000-09-18 16:07:07 +00:00
}
if( pBtn != m_pBtnLight4 && m_pBtnLight4->IsChecked() )
2000-09-18 16:07:07 +00:00
{
m_pBtnLight4->Check( false );
m_pLbLight4->Hide();
2000-09-18 16:07:07 +00:00
}
if( pBtn != m_pBtnLight5 && m_pBtnLight5->IsChecked() )
2000-09-18 16:07:07 +00:00
{
m_pBtnLight5->Check( false );
m_pLbLight5->Hide();
2000-09-18 16:07:07 +00:00
}
if( pBtn != m_pBtnLight6 && m_pBtnLight6->IsChecked() )
2000-09-18 16:07:07 +00:00
{
m_pBtnLight6->Check( false );
m_pLbLight6->Hide();
2000-09-18 16:07:07 +00:00
}
if( pBtn != m_pBtnLight7 && m_pBtnLight7->IsChecked() )
2000-09-18 16:07:07 +00:00
{
m_pBtnLight7->Check( false );
m_pLbLight7->Hide();
2000-09-18 16:07:07 +00:00
}
if( pBtn != m_pBtnLight8 && m_pBtnLight8->IsChecked() )
2000-09-18 16:07:07 +00:00
{
m_pBtnLight8->Check( false );
m_pLbLight8->Hide();
2000-09-18 16:07:07 +00:00
}
}
bool bEnable = GetUILightState( *static_cast<ImageButton*>(pBtn) );
m_pBtnLightColor->Enable( bEnable );
2000-09-18 16:07:07 +00:00
pLb->Enable( bEnable );
ClickLight(*pBtn);
bUpdatePreview = true;
2000-09-18 16:07:07 +00:00
}
2010-10-21 10:32:34 +01:00
// Textures
else if( pBtn == m_pBtnTexLuminance ||
pBtn == m_pBtnTexColor )
2000-09-18 16:07:07 +00:00
{
m_pBtnTexLuminance->Check( pBtn == m_pBtnTexLuminance );
m_pBtnTexColor->Check( pBtn == m_pBtnTexColor );
bUpdatePreview = true;
2000-09-18 16:07:07 +00:00
}
else if( pBtn == m_pBtnTexReplace ||
pBtn == m_pBtnTexModulate )
2000-09-18 16:07:07 +00:00
{
m_pBtnTexReplace->Check( pBtn == m_pBtnTexReplace );
m_pBtnTexModulate->Check( pBtn == m_pBtnTexModulate );
bUpdatePreview = true;
2000-09-18 16:07:07 +00:00
}
else if( pBtn == m_pBtnTexParallelX ||
pBtn == m_pBtnTexCircleX ||
pBtn == m_pBtnTexObjectX )
2000-09-18 16:07:07 +00:00
{
m_pBtnTexParallelX->Check( pBtn == m_pBtnTexParallelX );
m_pBtnTexCircleX->Check( pBtn == m_pBtnTexCircleX );
m_pBtnTexObjectX->Check( pBtn == m_pBtnTexObjectX );
bUpdatePreview = true;
2000-09-18 16:07:07 +00:00
}
else if( pBtn == m_pBtnTexParallelY ||
pBtn == m_pBtnTexCircleY ||
pBtn == m_pBtnTexObjectY )
2000-09-18 16:07:07 +00:00
{
m_pBtnTexParallelY->Check( pBtn == m_pBtnTexParallelY );
m_pBtnTexCircleY->Check( pBtn == m_pBtnTexCircleY );
m_pBtnTexObjectY->Check( pBtn == m_pBtnTexObjectY );
bUpdatePreview = true;
2000-09-18 16:07:07 +00:00
}
else if (pBtn == m_pBtnShadow3d)
2000-09-18 16:07:07 +00:00
{
pBtn->Check( !pBtn->IsChecked() );
m_pFtSlant->Enable( pBtn->IsChecked() );
m_pMtrSlant->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, SfxCallMode::ASYNCHRON | SfxCallMode::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;
2000-09-18 16:07:07 +00:00
}
2000-09-18 16:07:07 +00:00
IMPL_LINK( Svx3DWin, ClickColorHdl, PushButton *, pBtn )
{
SvColorDialog aColorDlg( this );
ColorLB* pLb;
if( pBtn == m_pBtnLightColor )
2000-09-18 16:07:07 +00:00
pLb = GetLbByButton();
else if( pBtn == m_pBtnAmbientColor )
pLb = m_pLbAmbientlight;
else if( pBtn == m_pBtnMatColor )
pLb = m_pLbMatColor;
else if( pBtn == m_pBtnEmissionColor )
pLb = m_pLbMatEmission;
else // if( pBtn == m_pBtnSpecularColor )
pLb = m_pLbMatSpecular;
2000-09-18 16:07:07 +00:00
Color aColor = pLb->GetSelectEntryColor();
aColorDlg.SetColor( aColor );
if( aColorDlg.Execute() == RET_OK )
{
aColor = aColorDlg.GetColor();
if( LBSelectColor( pLb, aColor ) )
SelectHdl( pLb );
}
return 0L;
2000-09-18 16:07:07 +00:00
}
2000-09-18 16:07:07 +00:00
IMPL_LINK( Svx3DWin, SelectHdl, void *, p )
{
if( p )
{
bool bUpdatePreview = false;
2000-09-18 16:07:07 +00:00
// Material
if (p == m_pLbMatFavorites)
{
Color aColObj( COL_WHITE );
Color aColEmis( COL_BLACK );
Color aColSpec( COL_WHITE );
sal_uInt16 nSpecIntens = 20;
sal_uInt16 nPos = m_pLbMatFavorites->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( m_pLbMatColor, aColObj );
LBSelectColor( m_pLbMatEmission, aColEmis );
LBSelectColor( m_pLbMatSpecular, aColSpec );
m_pMtrMatSpecularIntensity->SetValue( nSpecIntens );
bUpdatePreview = true;
}
else if( p == m_pLbMatColor ||
p == m_pLbMatEmission ||
p == m_pLbMatSpecular )
2000-09-18 16:07:07 +00:00
{
m_pLbMatFavorites->SelectEntryPos( 0 );
bUpdatePreview = true;
2000-09-18 16:07:07 +00:00
}
2011-04-07 15:47:21 +03:00
// Lighting
else if( p == m_pLbAmbientlight )
2000-09-18 16:07:07 +00:00
{
bUpdatePreview = true;
2000-09-18 16:07:07 +00:00
}
else if( p == m_pLbLight1 ||
p == m_pLbLight2 ||
p == m_pLbLight3 ||
p == m_pLbLight4 ||
p == m_pLbLight5 ||
p == m_pLbLight6 ||
p == m_pLbLight7 ||
p == m_pLbLight8 )
2000-09-18 16:07:07 +00:00
{
bUpdatePreview = true;
2000-09-18 16:07:07 +00:00
}
else if (p == m_pLbShademode)
bUpdatePreview = true;
2000-09-18 16:07:07 +00:00
if( bUpdatePreview )
2000-09-18 16:07:07 +00:00
UpdatePreview();
}
return 0L;
2000-09-18 16:07:07 +00:00
}
2000-09-18 16:07:07 +00:00
IMPL_LINK( Svx3DWin, ModifyHdl, void*, pField )
{
if( pField )
{
bool bUpdatePreview = false;
2000-09-18 16:07:07 +00:00
// Material
if( pField == m_pMtrMatSpecularIntensity )
2000-09-18 16:07:07 +00:00
{
bUpdatePreview = true;
2000-09-18 16:07:07 +00:00
}
else if (pField == m_pNumHorizontal)
2000-09-18 16:07:07 +00:00
{
bUpdatePreview = true;
2000-09-18 16:07:07 +00:00
}
else if (pField == m_pNumVertical)
2000-09-18 16:07:07 +00:00
{
bUpdatePreview = true;
2000-09-18 16:07:07 +00:00
}
else if (pField == m_pMtrSlant)
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;
2000-09-18 16:07:07 +00:00
}
2000-09-18 16:07:07 +00:00
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(m_pCtlLightPreview->GetSvx3DLightControl().Get3DAttributes());
const bool bOnOff(GetUILightState( static_cast<const ImageButton&>(rBtn) ));
switch(nLightSource)
{
case 0: aLightItemSet.Put(makeSvx3DLightcolor1Item(aColor)); aLightItemSet.Put(makeSvx3DLightOnOff1Item(bOnOff)); break;
case 1: aLightItemSet.Put(makeSvx3DLightcolor2Item(aColor)); aLightItemSet.Put(makeSvx3DLightOnOff2Item(bOnOff)); break;
case 2: aLightItemSet.Put(makeSvx3DLightcolor3Item(aColor)); aLightItemSet.Put(makeSvx3DLightOnOff3Item(bOnOff)); break;
case 3: aLightItemSet.Put(makeSvx3DLightcolor4Item(aColor)); aLightItemSet.Put(makeSvx3DLightOnOff4Item(bOnOff)); break;
case 4: aLightItemSet.Put(makeSvx3DLightcolor5Item(aColor)); aLightItemSet.Put(makeSvx3DLightOnOff5Item(bOnOff)); break;
case 5: aLightItemSet.Put(makeSvx3DLightcolor6Item(aColor)); aLightItemSet.Put(makeSvx3DLightOnOff6Item(bOnOff)); break;
case 6: aLightItemSet.Put(makeSvx3DLightcolor7Item(aColor)); aLightItemSet.Put(makeSvx3DLightOnOff7Item(bOnOff)); break;
default:
case 7: aLightItemSet.Put(makeSvx3DLightcolor8Item(aColor)); aLightItemSet.Put(makeSvx3DLightOnOff8Item(bOnOff)); break;
}
m_pCtlLightPreview->GetSvx3DLightControl().Set3DAttributes(aLightItemSet);
m_pCtlLightPreview->GetSvx3DLightControl().SelectLight(nLightSource);
m_pCtlLightPreview->CheckSelection();
2000-09-18 16:07:07 +00:00
}
2000-09-18 16:07:07 +00:00
IMPL_LINK_NOARG(Svx3DWin, ChangeLightCallbackHdl)
2000-09-18 16:07:07 +00:00
{
return 0L;
2000-09-18 16:07:07 +00:00
}
2000-09-18 16:07:07 +00:00
IMPL_LINK_NOARG(Svx3DWin, ChangeSelectionCallbackHdl)
2000-09-18 16:07:07 +00:00
{
const sal_uInt32 nLight(m_pCtlLightPreview->GetSvx3DLightControl().GetSelectedLight());
2008-10-17 08:40:10 +00:00
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 = m_pBtnLight1; break;
case 1: pBtn = m_pBtnLight2; break;
case 2: pBtn = m_pBtnLight3; break;
case 3: pBtn = m_pBtnLight4; break;
case 4: pBtn = m_pBtnLight5; break;
case 5: pBtn = m_pBtnLight6; break;
case 6: pBtn = m_pBtnLight7; break;
case 7: pBtn = m_pBtnLight8; 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
if( m_pBtnLight1->IsChecked() )
2000-09-18 16:07:07 +00:00
{
m_pBtnLight1->Check( false );
m_pLbLight1->Enable( false );
2000-09-18 16:07:07 +00:00
}
else if( m_pBtnLight2->IsChecked() )
2000-09-18 16:07:07 +00:00
{
m_pBtnLight2->Check( false );
m_pLbLight2->Enable( false );
2000-09-18 16:07:07 +00:00
}
else if( m_pBtnLight3->IsChecked() )
2000-09-18 16:07:07 +00:00
{
m_pBtnLight3->Check( false );
m_pLbLight3->Enable( false );
2000-09-18 16:07:07 +00:00
}
else if( m_pBtnLight4->IsChecked() )
2000-09-18 16:07:07 +00:00
{
m_pBtnLight4->Check( false );
m_pLbLight4->Enable( false );
2000-09-18 16:07:07 +00:00
}
else if( m_pBtnLight5->IsChecked() )
2000-09-18 16:07:07 +00:00
{
m_pBtnLight5->Check( false );
m_pLbLight5->Enable( false );
2000-09-18 16:07:07 +00:00
}
else if( m_pBtnLight6->IsChecked() )
2000-09-18 16:07:07 +00:00
{
m_pBtnLight6->Check( false );
m_pLbLight6->Enable( false );
2000-09-18 16:07:07 +00:00
}
else if( m_pBtnLight7->IsChecked() )
2000-09-18 16:07:07 +00:00
{
m_pBtnLight7->Check( false );
m_pLbLight7->Enable( false );
2000-09-18 16:07:07 +00:00
}
else if( m_pBtnLight8->IsChecked() )
2000-09-18 16:07:07 +00:00
{
m_pBtnLight8->Check( false );
m_pLbLight8->Enable( false );
2000-09-18 16:07:07 +00:00
}
m_pBtnLightColor->Enable( false );
2000-09-18 16:07:07 +00:00
}
return 0L;
2000-09-18 16:07:07 +00:00
}
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
bool Svx3DWin::LBSelectColor( ColorLB* pLb, const Color& rColor )
2000-09-18 16:07:07 +00:00
{
bool bRet = 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 = true;
2000-09-18 16:07:07 +00:00
}
return bRet;
2000-09-18 16:07:07 +00:00
}
2000-09-18 16:07:07 +00:00
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, SfxCallMode::SYNCHRON | SfxCallMode::RECORD, &aItem, 0L );
}
2011-04-07 15:47:21 +03:00
// Reset Flag
bOnly3DChanged = 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 );
m_pCtlPreview->Set3DAttributes( aSet );
m_pCtlLightPreview->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 )
{
m_pLbLight1->Fill( pDoc->GetColorList() );
m_pLbLight2->CopyEntries( *m_pLbLight1 );
m_pLbLight3->CopyEntries( *m_pLbLight1 );
m_pLbLight4->CopyEntries( *m_pLbLight1 );
m_pLbLight5->CopyEntries( *m_pLbLight1 );
m_pLbLight6->CopyEntries( *m_pLbLight1 );
m_pLbLight7->CopyEntries( *m_pLbLight1 );
m_pLbLight8->CopyEntries( *m_pLbLight1 );
m_pLbAmbientlight->CopyEntries( *m_pLbLight1 );
m_pLbMatColor->CopyEntries( *m_pLbLight1 );
m_pLbMatEmission->CopyEntries( *m_pLbLight1 );
m_pLbMatSpecular->CopyEntries( *m_pLbLight1 );
2000-09-18 16:07:07 +00:00
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 );
m_pLbLight1->SelectEntry( aColWhite );
m_pLbLight2->SelectEntry( aColWhite );
m_pLbLight3->SelectEntry( aColWhite );
m_pLbLight4->SelectEntry( aColWhite );
m_pLbLight5->SelectEntry( aColWhite );
m_pLbLight6->SelectEntry( aColWhite );
m_pLbLight7->SelectEntry( aColWhite );
m_pLbLight8->SelectEntry( aColWhite );
m_pLbAmbientlight->SelectEntry( aColBlack );
m_pLbMatColor->SelectEntry( aColWhite );
m_pLbMatEmission->SelectEntry( aColBlack );
m_pLbMatSpecular->SelectEntry( aColWhite );
2000-09-18 16:07:07 +00:00
}
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( m_pBtnLight1->IsChecked() )
2000-09-18 16:07:07 +00:00
nLight = 0;
else if( m_pBtnLight2->IsChecked() )
2000-09-18 16:07:07 +00:00
nLight = 1;
else if( m_pBtnLight3->IsChecked() )
2000-09-18 16:07:07 +00:00
nLight = 2;
else if( m_pBtnLight4->IsChecked() )
2000-09-18 16:07:07 +00:00
nLight = 3;
else if( m_pBtnLight5->IsChecked() )
2000-09-18 16:07:07 +00:00
nLight = 4;
else if( m_pBtnLight6->IsChecked() )
2000-09-18 16:07:07 +00:00
nLight = 5;
else if( m_pBtnLight7->IsChecked() )
2000-09-18 16:07:07 +00:00
nLight = 6;
else if( m_pBtnLight8->IsChecked() )
2000-09-18 16:07:07 +00:00
nLight = 7;
}
else
{
if (pBtn == m_pBtnLight1)
2000-09-18 16:07:07 +00:00
nLight = 0;
else if (pBtn == m_pBtnLight2)
2000-09-18 16:07:07 +00:00
nLight = 1;
else if( pBtn == m_pBtnLight3 )
2000-09-18 16:07:07 +00:00
nLight = 2;
else if( pBtn == m_pBtnLight4 )
2000-09-18 16:07:07 +00:00
nLight = 3;
else if( pBtn == m_pBtnLight5 )
2000-09-18 16:07:07 +00:00
nLight = 4;
else if( pBtn == m_pBtnLight6 )
2000-09-18 16:07:07 +00:00
nLight = 5;
else if( pBtn == m_pBtnLight7 )
2000-09-18 16:07:07 +00:00
nLight = 6;
else if( pBtn == m_pBtnLight8 )
2000-09-18 16:07:07 +00:00
nLight = 7;
}
return nLight;
2000-09-18 16:07:07 +00:00
};
2000-09-18 16:07:07 +00:00
ColorLB* Svx3DWin::GetLbByButton( const PushButton* pBtn )
{
ColorLB* pLb = NULL;
if( pBtn == NULL )
{
if( m_pBtnLight1->IsChecked() )
pLb = m_pLbLight1;
else if( m_pBtnLight2->IsChecked() )
pLb = m_pLbLight2;
else if( m_pBtnLight3->IsChecked() )
pLb = m_pLbLight3;
else if( m_pBtnLight4->IsChecked() )
pLb = m_pLbLight4;
else if( m_pBtnLight5->IsChecked() )
pLb = m_pLbLight5;
else if( m_pBtnLight6->IsChecked() )
pLb = m_pLbLight6;
else if( m_pBtnLight7->IsChecked() )
pLb = m_pLbLight7;
else if( m_pBtnLight8->IsChecked() )
pLb = m_pLbLight8;
}
else
{
if( pBtn == m_pBtnLight1 )
pLb = m_pLbLight1;
else if (pBtn == m_pBtnLight2)
pLb = m_pLbLight2;
else if( pBtn == m_pBtnLight3 )
pLb = m_pLbLight3;
else if( pBtn == m_pBtnLight4 )
pLb = m_pLbLight4;
else if( pBtn == m_pBtnLight5 )
pLb = m_pLbLight5;
else if( pBtn == m_pBtnLight6 )
pLb = m_pLbLight6;
else if( pBtn == m_pBtnLight7 )
pLb = m_pLbLight7;
else if( pBtn == m_pBtnLight8 )
pLb = m_pLbLight8;
2000-09-18 16:07:07 +00:00
}
return pLb;
2000-09-18 16:07:07 +00:00
};
2011-04-07 15:47:21 +03:00
// Derivation from SfxChildWindow as "containers" for effects
Svx3DChildWindow::Svx3DChildWindow( vcl::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
{
VclPtr<Svx3DWin> pWin = VclPtr<Svx3DWin>::Create( pBindings, this, _pParent );
2000-09-18 16:07:07 +00:00
pWindow = pWin;
eChildAlignment = SfxChildAlignment::NOALIGNMENT;
2000-09-18 16:07:07 +00:00
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(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
{
bool bNewState = (eState != SfxItemState::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, SfxCallMode::ASYNCHRON|SfxCallMode::RECORD, &aItem, 0L);
}
2000-09-18 16:07:07 +00:00
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */