LibreOffice Module svx (master)  1
float3d.cxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #include <sal/config.h>
21 
22 #include <sfx2/dispatch.hxx>
23 #include <sfx2/module.hxx>
24 #include <sfx2/viewfrm.hxx>
25 #include <svl/eitem.hxx>
26 #include <svl/intitem.hxx>
27 #include <svl/itempool.hxx>
28 #include <svtools/colrdlg.hxx>
29 #include <svx/colorbox.hxx>
30 #include <svx/f3dchild.hxx>
31 #include <svx/xfillit0.hxx>
32 #include <svx/xflclit.hxx>
33 #include <svx/xlineit0.hxx>
34 #include <svx/fmmodel.hxx>
35 #include <svx/dlgutil.hxx>
36 #include <svx/sdshitm.hxx>
37 #include <svx/svx3ditems.hxx>
38 
39 #include <svx/dialmgr.hxx>
40 #include <svx/viewpt3d.hxx>
41 
42 #include <svx/svxids.hrc>
43 #include <svx/strings.hrc>
44 
45 #include <editeng/colritem.hxx>
46 #include <osl/diagnose.h>
47 #include <svx/e3ditem.hxx>
48 #include <svl/whiter.hxx>
49 #include <svtools/unitconv.hxx>
50 
51 #include <svx/float3d.hxx>
52 #include <bitmaps.hlst>
53 
54 using namespace com::sun::star;
55 
57 
59 {
61 };
62 
63 namespace {
71  SfxDispatcher* LocalGetDispatcher (const SfxBindings* pBindings)
72  {
73  SfxDispatcher* pDispatcher = nullptr;
74 
75  if (SfxViewFrame::Current() != nullptr)
76  pDispatcher = SfxViewFrame::Current()->GetDispatcher();
77  else if (pBindings != nullptr)
78  pDispatcher = pBindings->GetDispatcher();
79 
80  return pDispatcher;
81  }
82 }
83 
85  : SfxDockingWindow(pInBindings, pCW, pParent,
86  "Docking3DEffects", "svx/ui/docking3deffects.ui")
87 
88  , m_xBtnGeo(m_xBuilder->weld_toggle_button("geometry"))
89  , m_xBtnRepresentation(m_xBuilder->weld_toggle_button("representation"))
90  , m_xBtnLight(m_xBuilder->weld_toggle_button("light"))
91  , m_xBtnTexture(m_xBuilder->weld_toggle_button("texture"))
92  , m_xBtnMaterial(m_xBuilder->weld_toggle_button("material"))
93  , m_xBtnUpdate(m_xBuilder->weld_toggle_button("update"))
94  , m_xBtnAssign(m_xBuilder->weld_button("assign"))
95 
96  , m_xFLGeometrie(m_xBuilder->weld_container("geoframe"))
97  , m_xFtPercentDiagonal(m_xBuilder->weld_label("diagonalft"))
98  , m_xMtrPercentDiagonal(m_xBuilder->weld_metric_spin_button("diagonal", FieldUnit::PERCENT))
99  , m_xFtBackscale(m_xBuilder->weld_label("scaleddepthft"))
100  , m_xMtrBackscale(m_xBuilder->weld_metric_spin_button("scaleddepth", FieldUnit::PERCENT))
101  , m_xFtEndAngle(m_xBuilder->weld_label("angleft"))
102  , m_xMtrEndAngle(m_xBuilder->weld_metric_spin_button("angle", FieldUnit::DEGREE))
103  , m_xFtDepth(m_xBuilder->weld_label("depthft"))
104  , m_xMtrDepth(m_xBuilder->weld_metric_spin_button("depth", FieldUnit::CM))
105 
106  , m_xFLSegments(m_xBuilder->weld_container("segmentsframe"))
107  , m_xNumHorizontal(m_xBuilder->weld_spin_button("hori"))
108  , m_xNumVertical(m_xBuilder->weld_spin_button("veri"))
109 
110  , m_xFLNormals(m_xBuilder->weld_container("normals"))
111  , m_xBtnNormalsObj(m_xBuilder->weld_toggle_button("objspecific"))
112  , m_xBtnNormalsFlat(m_xBuilder->weld_toggle_button("flat"))
113  , m_xBtnNormalsSphere(m_xBuilder->weld_toggle_button("spherical"))
114  , m_xBtnNormalsInvert(m_xBuilder->weld_toggle_button("invertnormals"))
115  , m_xBtnTwoSidedLighting(m_xBuilder->weld_toggle_button("doublesidedillum"))
116  , m_xBtnDoubleSided(m_xBuilder->weld_toggle_button("doublesided"))
117 
118  , m_xFLRepresentation(m_xBuilder->weld_container("shadingframe"))
119  , m_xLbShademode(m_xBuilder->weld_combo_box("mode"))
120 
121  , m_xFLShadow(m_xBuilder->weld_container("shadowframe"))
122  , m_xBtnShadow3d(m_xBuilder->weld_toggle_button("shadow"))
123  , m_xFtSlant(m_xBuilder->weld_label("slantft"))
124  , m_xMtrSlant(m_xBuilder->weld_metric_spin_button("slant", FieldUnit::DEGREE))
125 
126  , m_xFLCamera(m_xBuilder->weld_container("cameraframe"))
127  , m_xMtrDistance(m_xBuilder->weld_metric_spin_button("distance", FieldUnit::CM))
128  , m_xMtrFocalLength(m_xBuilder->weld_metric_spin_button("focal", FieldUnit::CM))
129 
130  , m_xFLLight(m_xBuilder->weld_container("illumframe"))
131  , m_xBtnLight1(new LightButton(m_xBuilder->weld_toggle_button("light1")))
132  , m_xBtnLight2(new LightButton(m_xBuilder->weld_toggle_button("light2")))
133  , m_xBtnLight3(new LightButton(m_xBuilder->weld_toggle_button("light3")))
134  , m_xBtnLight4(new LightButton(m_xBuilder->weld_toggle_button("light4")))
135  , m_xBtnLight5(new LightButton(m_xBuilder->weld_toggle_button("light5")))
136  , m_xBtnLight6(new LightButton(m_xBuilder->weld_toggle_button("light6")))
137  , m_xBtnLight7(new LightButton(m_xBuilder->weld_toggle_button("light7")))
138  , m_xBtnLight8(new LightButton(m_xBuilder->weld_toggle_button("light8")))
139  , m_xLbLight1(new ColorListBox(m_xBuilder->weld_menu_button("lightcolor1"), GetFrameWeld()))
140  , m_xLbLight2(new ColorListBox(m_xBuilder->weld_menu_button("lightcolor2"), GetFrameWeld()))
141  , m_xLbLight3(new ColorListBox(m_xBuilder->weld_menu_button("lightcolor3"), GetFrameWeld()))
142  , m_xLbLight4(new ColorListBox(m_xBuilder->weld_menu_button("lightcolor4"), GetFrameWeld()))
143  , m_xLbLight5(new ColorListBox(m_xBuilder->weld_menu_button("lightcolor5"), GetFrameWeld()))
144  , m_xLbLight6(new ColorListBox(m_xBuilder->weld_menu_button("lightcolor6"), GetFrameWeld()))
145  , m_xLbLight7(new ColorListBox(m_xBuilder->weld_menu_button("lightcolor7"), GetFrameWeld()))
146  , m_xLbLight8(new ColorListBox(m_xBuilder->weld_menu_button("lightcolor8"), GetFrameWeld()))
147  , m_xBtnLightColor(m_xBuilder->weld_button("colorbutton1"))
148  , m_xLbAmbientlight(new ColorListBox(m_xBuilder->weld_menu_button("ambientcolor"), GetFrameWeld()))
149  , m_xBtnAmbientColor(m_xBuilder->weld_button("colorbutton2"))
150 
151  , m_xFLTexture(m_xBuilder->weld_container("textureframe"))
152  , m_xBtnTexLuminance(m_xBuilder->weld_toggle_button("textype"))
153  , m_xBtnTexColor(m_xBuilder->weld_toggle_button("texcolor"))
154  , m_xBtnTexReplace(m_xBuilder->weld_toggle_button("texreplace"))
155  , m_xBtnTexModulate(m_xBuilder->weld_toggle_button("texmodulate"))
156  , m_xBtnTexBlend(m_xBuilder->weld_toggle_button("texblend"))
157  , m_xBtnTexObjectX(m_xBuilder->weld_toggle_button("texobjx"))
158  , m_xBtnTexParallelX(m_xBuilder->weld_toggle_button("texparallelx"))
159  , m_xBtnTexCircleX(m_xBuilder->weld_toggle_button("texcirclex"))
160  , m_xBtnTexObjectY(m_xBuilder->weld_toggle_button("texobjy"))
161  , m_xBtnTexParallelY(m_xBuilder->weld_toggle_button("texparallely"))
162  , m_xBtnTexCircleY(m_xBuilder->weld_toggle_button("texcircley"))
163  , m_xBtnTexFilter(m_xBuilder->weld_toggle_button("texfilter"))
164 
165  , m_xFLMaterial(m_xBuilder->weld_container("materialframe"))
166  , m_xLbMatFavorites(m_xBuilder->weld_combo_box("favorites"))
167  , m_xLbMatColor(new ColorListBox(m_xBuilder->weld_menu_button("objcolor"), GetFrameWeld()))
168  , m_xBtnMatColor(m_xBuilder->weld_button("colorbutton3"))
169  , m_xLbMatEmission(new ColorListBox(m_xBuilder->weld_menu_button("illumcolor"), GetFrameWeld()))
170  , m_xBtnEmissionColor(m_xBuilder->weld_button("colorbutton4"))
171 
172  , m_xFLMatSpecular(m_xBuilder->weld_container("specframe"))
173  , m_xLbMatSpecular(new ColorListBox(m_xBuilder->weld_menu_button("speccolor"), GetFrameWeld()))
174  , m_xBtnSpecularColor(m_xBuilder->weld_button("colorbutton5"))
175  , m_xMtrMatSpecularIntensity(m_xBuilder->weld_metric_spin_button("intensity", FieldUnit::PERCENT))
176 
177  , m_xCtlPreview(new Svx3DPreviewControl)
178  , m_xCtlPreviewWin(new weld::CustomWeld(*m_xBuilder, "preview", *m_xCtlPreview))
179 
180  , m_xLightPreviewGrid(m_xBuilder->weld_container("lightpreviewgrid"))
181  , m_xHoriScale(m_xBuilder->weld_scale("horiscale"))
182  , m_xVertScale(m_xBuilder->weld_scale("vertscale"))
183  , m_xBtn_Corner(m_xBuilder->weld_button("corner"))
184  , m_xLightPreview(new Svx3DLightControl)
185  , m_xCtlLightPreviewWin(new weld::CustomWeld(*m_xBuilder, "lightpreview", *m_xLightPreview))
186  , m_xCtlLightPreview(new SvxLightCtl3D(*m_xLightPreview, *m_xHoriScale, *m_xVertScale, *m_xBtn_Corner)) // TODO might be other body widget as arg 1
187 
188  , m_xBtnConvertTo3D(m_xBuilder->weld_button("to3d"))
189  , m_xBtnLatheObject(m_xBuilder->weld_button("tolathe"))
190  , m_xBtnPerspective(m_xBuilder->weld_toggle_button("perspective"))
191 
192  , bUpdate(false)
193  , eViewType(ViewType3D::Geo)
194  , pBindings(pInBindings)
195  , mpImpl(new Svx3DWinImpl)
196  , ePoolUnit(MapUnit::MapMM)
197 {
198  SetText(SvxResId(RID_SVXDLG_FLOAT3D_STR_TITLE));
199 
200  weld::DrawingArea* pDrawingArea = m_xCtlPreview->GetDrawingArea();
201  Size aSize(pDrawingArea->get_ref_device().LogicToPixel(Size(83, 76), MapMode(MapUnit::MapAppFont)));
202  pDrawingArea->set_size_request(aSize.Width(), aSize.Height());
203  m_xCtlPreview->SetOutputSizePixel(aSize);
204 
205  m_xLightPreviewGrid->set_size_request(aSize.Width(), aSize.Height());
206  pDrawingArea = m_xLightPreview->GetDrawingArea();
207  pDrawingArea->set_size_request(42, 42); // small to fit to m_xLightPreviewGrid
208 
209  mpImpl->pPool = nullptr;
210 
211  // Set Metric
212  eFUnit = pInBindings->GetDispatcher()->GetModule()->GetFieldUnit();
213 
214  m_xMtrDepth->set_unit( eFUnit );
215  m_xMtrDistance->set_unit( eFUnit );
216  m_xMtrFocalLength->set_unit( eFUnit );
217 
218  pControllerItem.reset( new Svx3DCtrlItem(SID_3D_STATE, pBindings) );
219  pConvertTo3DItem.reset( new SvxConvertTo3DItem(SID_CONVERT_TO_3D, pBindings) );
220  pConvertTo3DLatheItem.reset( new SvxConvertTo3DItem(SID_CONVERT_TO_3D_LATHE_FAST, pBindings) );
221 
222  m_xBtnAssign->connect_clicked( LINK( this, Svx3DWin, ClickAssignHdl ) );
223  m_xBtnUpdate->connect_toggled( LINK( this, Svx3DWin, ClickUpdateHdl ) );
224 
225  Link<weld::Button&,void> aLink( LINK( this, Svx3DWin, ClickViewTypeHdl ) );
226  m_xBtnGeo->connect_clicked( aLink );
227  m_xBtnRepresentation->connect_clicked( aLink );
228  m_xBtnLight->connect_clicked( aLink );
229  m_xBtnTexture->connect_clicked( aLink );
230  m_xBtnMaterial->connect_clicked( aLink );
231 
232  aLink = LINK( this, Svx3DWin, ClickHdl );
233  m_xBtnPerspective->connect_clicked( aLink );
234  m_xBtnConvertTo3D->connect_clicked( aLink );
235  m_xBtnLatheObject->connect_clicked( aLink );
236 
237  // Geometry
238  m_xBtnNormalsObj->connect_clicked( aLink );
239  m_xBtnNormalsFlat->connect_clicked( aLink );
240  m_xBtnNormalsSphere->connect_clicked( aLink );
241  m_xBtnTwoSidedLighting->connect_clicked( aLink );
242  m_xBtnNormalsInvert->connect_clicked( aLink );
243  m_xBtnDoubleSided->connect_clicked( aLink );
244 
245  // Representation
246  m_xBtnShadow3d->connect_clicked( aLink );
247 
248  // Lighting
249  m_xBtnLight1->connect_clicked( aLink );
250  m_xBtnLight2->connect_clicked( aLink );
251  m_xBtnLight3->connect_clicked( aLink );
252  m_xBtnLight4->connect_clicked( aLink );
253  m_xBtnLight5->connect_clicked( aLink );
254  m_xBtnLight6->connect_clicked( aLink );
255  m_xBtnLight7->connect_clicked( aLink );
256  m_xBtnLight8->connect_clicked( aLink );
257 
258  // Textures
259  m_xBtnTexLuminance->connect_clicked( aLink );
260  m_xBtnTexColor->connect_clicked( aLink );
261  m_xBtnTexReplace->connect_clicked( aLink );
262  m_xBtnTexModulate->connect_clicked( aLink );
263  m_xBtnTexParallelX->connect_clicked( aLink );
264  m_xBtnTexCircleX->connect_clicked( aLink );
265  m_xBtnTexObjectX->connect_clicked( aLink );
266  m_xBtnTexParallelY->connect_clicked( aLink );
267  m_xBtnTexCircleY->connect_clicked( aLink );
268  m_xBtnTexObjectY->connect_clicked( aLink );
269  m_xBtnTexFilter->connect_clicked( aLink );
270 
271  // Material
272  aLink = LINK( this, Svx3DWin, ClickColorHdl );
273  m_xBtnLightColor->connect_clicked( aLink );
274  m_xBtnAmbientColor->connect_clicked( aLink );
275  m_xBtnMatColor->connect_clicked( aLink );
276  m_xBtnEmissionColor->connect_clicked( aLink );
277  m_xBtnSpecularColor->connect_clicked( aLink );
278 
279 
280  Link<weld::ComboBox&,void> aLink2 = LINK( this, Svx3DWin, SelectHdl );
281  Link<ColorListBox&,void> aLink4 = LINK( this, Svx3DWin, SelectColorHdl );
282  m_xLbMatFavorites->connect_changed( aLink2 );
283  m_xLbMatColor->SetSelectHdl( aLink4 );
284  m_xLbMatEmission->SetSelectHdl( aLink4 );
285  m_xLbMatSpecular->SetSelectHdl( aLink4 );
286  m_xLbLight1->SetSelectHdl( aLink4 );
287  m_xLbLight2->SetSelectHdl( aLink4 );
288  m_xLbLight3->SetSelectHdl( aLink4 );
289  m_xLbLight4->SetSelectHdl( aLink4 );
290  m_xLbLight5->SetSelectHdl( aLink4 );
291  m_xLbLight6->SetSelectHdl( aLink4 );
292  m_xLbLight7->SetSelectHdl( aLink4 );
293  m_xLbLight8->SetSelectHdl( aLink4 );
294  m_xLbAmbientlight->SetSelectHdl( aLink4 );
295  m_xLbShademode->connect_changed( aLink2 );
296 
297  Link<weld::MetricSpinButton&,void> aLink3 = LINK( this, Svx3DWin, ModifyMetricHdl );
298  Link<weld::SpinButton&,void> aLink5 = LINK( this, Svx3DWin, ModifySpinHdl );
299  m_xMtrMatSpecularIntensity->connect_value_changed( aLink3 );
300  m_xNumHorizontal->connect_value_changed( aLink5 );
301  m_xNumVertical->connect_value_changed( aLink5 );
302  m_xMtrSlant->connect_value_changed( aLink3 );
303 
304  // Preview callback
305  m_xCtlLightPreview->SetUserSelectionChangeCallback(LINK( this, Svx3DWin, ChangeSelectionCallbackHdl ));
306 
307  aSize = GetOutputSizePixel();
308  SetMinOutputSizePixel( aSize );
309 
310  Construct();
311 
312  // Initiation of the initialization of the ColorLBs
313  SfxDispatcher* pDispatcher = LocalGetDispatcher(pBindings);
314  if (pDispatcher != nullptr)
315  {
316  SfxBoolItem aItem( SID_3D_INIT, true );
317  pDispatcher->ExecuteList(SID_3D_INIT,
318  SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, { &aItem });
319  }
320 
321  Reset();
322 
323  //lock down the size of the initial largest default mode as the permanent size
324  aSize = get_preferred_size();
325  set_width_request(aSize.Width());
326  set_height_request(aSize.Height());
327 }
328 
330 {
331  disposeOnce();
332 }
333 
335 {
336  pModel.reset();
337 
338  pControllerItem.reset();
339  pConvertTo3DItem.reset();
340  pConvertTo3DLatheItem.reset();
341 
342  mpImpl.reset();
343 
344  m_xBtnGeo.reset();
345  m_xBtnRepresentation.reset();
346  m_xBtnLight.reset();
347  m_xBtnTexture.reset();
348  m_xBtnMaterial.reset();
349  m_xBtnUpdate.reset();
350  m_xBtnAssign.reset();
351  m_xFLGeometrie.reset();
352  m_xFtPercentDiagonal.reset();
353  m_xMtrPercentDiagonal.reset();
354  m_xFtBackscale.reset();
355  m_xMtrBackscale.reset();
356  m_xFtEndAngle.reset();
357  m_xMtrEndAngle.reset();
358  m_xFtDepth.reset();
359  m_xMtrDepth.reset();
360  m_xFLSegments.reset();
361  m_xNumHorizontal.reset();
362  m_xNumVertical.reset();
363  m_xFLNormals.reset();
364  m_xBtnNormalsObj.reset();
365  m_xBtnNormalsFlat.reset();
366  m_xBtnNormalsSphere.reset();
367  m_xBtnNormalsInvert.reset();
368  m_xBtnTwoSidedLighting.reset();
369  m_xBtnDoubleSided.reset();
370  m_xFLRepresentation.reset();
371  m_xLbShademode.reset();
372  m_xFLShadow.reset();
373  m_xBtnShadow3d.reset();
374  m_xFtSlant.reset();
375  m_xMtrSlant.reset();
376  m_xFLCamera.reset();
377  m_xMtrDistance.reset();
378  m_xMtrFocalLength.reset();
379  m_xFLLight.reset();
380  m_xBtnLight1.reset();
381  m_xBtnLight2.reset();
382  m_xBtnLight3.reset();
383  m_xBtnLight4.reset();
384  m_xBtnLight5.reset();
385  m_xBtnLight6.reset();
386  m_xBtnLight7.reset();
387  m_xBtnLight8.reset();
388  m_xLbLight1.reset();
389  m_xLbLight2.reset();
390  m_xLbLight3.reset();
391  m_xLbLight4.reset();
392  m_xLbLight5.reset();
393  m_xLbLight6.reset();
394  m_xLbLight7.reset();
395  m_xLbLight8.reset();
396  m_xBtnLightColor.reset();
397  m_xLbAmbientlight.reset();
398  m_xBtnAmbientColor.reset();
399  m_xFLTexture.reset();
400  m_xBtnTexLuminance.reset();
401  m_xBtnTexColor.reset();
402  m_xBtnTexReplace.reset();
403  m_xBtnTexModulate.reset();
404  m_xBtnTexBlend.reset();
405  m_xBtnTexObjectX.reset();
406  m_xBtnTexParallelX.reset();
407  m_xBtnTexCircleX.reset();
408  m_xBtnTexObjectY.reset();
409  m_xBtnTexParallelY.reset();
410  m_xBtnTexCircleY.reset();
411  m_xBtnTexFilter.reset();
412  m_xFLMaterial.reset();
413  m_xLbMatFavorites.reset();
414  m_xLbMatColor.reset();
415  m_xBtnMatColor.reset();
416  m_xLbMatEmission.reset();
417  m_xBtnEmissionColor.reset();
418  m_xFLMatSpecular.reset();
419  m_xLbMatSpecular.reset();
420  m_xBtnSpecularColor.reset();
422  m_xCtlPreviewWin.reset();
423  m_xCtlPreview.reset();
424 
425  m_xCtlLightPreview.reset();
426  m_xCtlLightPreviewWin.reset();
427  m_xLightPreview.reset();
428  m_xBtn_Corner.reset();
429  m_xVertScale.reset();
430  m_xHoriScale.reset();
431  m_xLightPreviewGrid.reset();
432 
433  m_xBtnConvertTo3D.reset();
434  m_xBtnLatheObject.reset();
435  m_xBtnPerspective.reset();
436 
438 }
439 
441 {
442  m_xBtnGeo->set_active(true);
443  ClickViewTypeHdl(*m_xBtnGeo);
444  m_xLightPreviewGrid->hide();
445 }
446 
448 {
449  // Various initializations, default is AllAttributes
450  m_xLbShademode->set_active( 0 );
451  m_xMtrMatSpecularIntensity->set_value( 50, FieldUnit::PERCENT );
452 
453  m_xBtnLight1->set_active(true);
454  m_xBtnUpdate->set_active(true);
455  ClickUpdateHdl(*m_xBtnUpdate);
456 
457  // Select nothing, to avoid errors when selecting the first
458  m_xCtlLightPreview->GetSvx3DLightControl().SelectLight(0);
459  m_xCtlLightPreview->CheckSelection();
460 }
461 
462 void Svx3DWin::Update( SfxItemSet const & rAttrs )
463 {
464  // remember 2d attributes
466  mpRemember2DAttributes->ClearItem();
467  else
468  mpRemember2DAttributes = std::make_unique<SfxItemSet>(*rAttrs.GetPool(),
471 
473  sal_uInt16 nWhich(aIter.FirstWhich());
474 
475  while(nWhich)
476  {
477  SfxItemState eState = rAttrs.GetItemState(nWhich, false);
478  if(SfxItemState::DONTCARE == eState)
479  mpRemember2DAttributes->InvalidateItem(nWhich);
480  else if(SfxItemState::SET == eState)
481  mpRemember2DAttributes->Put(rAttrs.Get(nWhich, false));
482 
483  nWhich = aIter.NextWhich();
484  }
485 
486  // construct field values
487  const SfxPoolItem* pItem;
488 
489  // Possible determine PoolUnit
490  if( !mpImpl->pPool )
491  {
492  mpImpl->pPool = rAttrs.GetPool();
493  DBG_ASSERT( mpImpl->pPool, "Where is the Pool? ");
494  ePoolUnit = mpImpl->pPool->GetMetric( SID_ATTR_LINE_WIDTH );
495  }
496  eFUnit = GetModuleFieldUnit( rAttrs );
497 
498 
499  // Segment Number Can be changed? and other states
500  SfxItemState eState = rAttrs.GetItemState( SID_ATTR_3D_INTERN, false, &pItem );
501  if( SfxItemState::SET == eState )
502  {
503  sal_uInt32 nState = static_cast<const SfxUInt32Item*>(pItem)->GetValue();
504  bool bExtrude = ( nState & 2 );
505  bool bSphere = ( nState & 4 );
506  bool bCube = ( nState & 8 );
507 
508  bool bChart = ( nState & 32 ); // Chart
509 
510  if( !bChart )
511  {
512  // For cube objects are no segments set
513  m_xFLSegments->set_sensitive(!bCube);
514 
515  m_xFtPercentDiagonal->set_sensitive( !bCube && !bSphere );
516  m_xMtrPercentDiagonal->set_sensitive( !bCube && !bSphere );
517  m_xFtBackscale->set_sensitive( !bCube && !bSphere );
518  m_xMtrBackscale->set_sensitive( !bCube && !bSphere );
519  m_xFtDepth->set_sensitive( !bCube && !bSphere );
520  m_xMtrDepth->set_sensitive( !bCube && !bSphere );
521  if( bCube )
522  {
523  m_xNumHorizontal->set_text("");
524  m_xNumVertical->set_text("");
525  }
526  if( bCube || bSphere )
527  {
528  m_xMtrPercentDiagonal->set_text("");
529  m_xMtrBackscale->set_text("");
530  m_xMtrDepth->set_text("");
531  }
532 
533  // There is a final angle only for Lathe objects.
534  m_xFtEndAngle->set_sensitive( !bExtrude && !bCube && !bSphere );
535  m_xMtrEndAngle->set_sensitive( !bExtrude && !bCube && !bSphere );
536  if( bExtrude || bCube || bSphere )
537  m_xMtrEndAngle->set_text("");
538  }
539  else
540  {
541  // Geometry
542  m_xNumHorizontal->set_text("");
543  m_xNumVertical->set_text("");
544  m_xFLSegments->set_sensitive( false );
545  m_xFtEndAngle->set_sensitive( false );
546  m_xMtrEndAngle->set_sensitive( false );
547  m_xMtrEndAngle->set_text("");
548  m_xFtDepth->set_sensitive( false );
549  m_xMtrDepth->set_sensitive( false );
550  m_xMtrDepth->set_text("");
551 
552  // Representation
553  m_xFLShadow->set_sensitive(false);
554 
555  m_xMtrDistance->set_text("");
556  m_xMtrFocalLength->set_text("");
557  m_xFLCamera->set_sensitive( false );
558 
559  //Lower Range
560  m_xBtnConvertTo3D->set_sensitive( false );
561  m_xBtnLatheObject->set_sensitive( false );
562  }
563  }
564  // Bitmap fill ? -> Status
565  bool bBitmap(false);
566  eState = rAttrs.GetItemState(XATTR_FILLSTYLE);
567  if(eState != SfxItemState::DONTCARE)
568  {
569  drawing::FillStyle eXFS = rAttrs.Get(XATTR_FILLSTYLE).GetValue();
570  bBitmap = (eXFS == drawing::FillStyle_BITMAP || eXFS == drawing::FillStyle_GRADIENT || eXFS == drawing::FillStyle_HATCH);
571  }
572 
573  m_xFLTexture->set_sensitive(bBitmap);
574 
575  // Geometry
576  // Number of segments (horizontal)
577  if( m_xNumHorizontal->get_sensitive() )
578  {
579  eState = rAttrs.GetItemState(SDRATTR_3DOBJ_HORZ_SEGS);
580  if(eState != SfxItemState::DONTCARE)
581  {
582  sal_uInt32 nValue = rAttrs.Get(SDRATTR_3DOBJ_HORZ_SEGS).GetValue();
583  if (nValue != static_cast<sal_uInt32>(m_xNumHorizontal->get_value()))
584  {
585  m_xNumHorizontal->set_value( nValue );
586  bUpdate = true;
587  }
588  else if( m_xNumHorizontal->get_text().isEmpty() )
589  m_xNumHorizontal->set_value( nValue );
590  }
591  else
592  {
593  if( !m_xNumHorizontal->get_text().isEmpty() )
594  {
595  m_xNumHorizontal->set_text("");
596  bUpdate = true;
597  }
598  }
599  }
600 
601  //Number of segments (vertical)
602  if( m_xNumVertical->get_sensitive() )
603  {
604  eState = rAttrs.GetItemState(SDRATTR_3DOBJ_VERT_SEGS);
605  if( eState != SfxItemState::DONTCARE )
606  {
607  sal_uInt32 nValue = rAttrs.Get(SDRATTR_3DOBJ_VERT_SEGS).GetValue();
608  if( nValue != static_cast<sal_uInt32>(m_xNumVertical->get_value()) )
609  {
610  m_xNumVertical->set_value( nValue );
611  bUpdate = true;
612  }
613  else if( m_xNumVertical->get_text().isEmpty() )
614  m_xNumVertical->set_value( nValue );
615  }
616  else
617  {
618  if( !m_xNumVertical->get_text().isEmpty() )
619  {
620  m_xNumVertical->set_text("");
621  bUpdate = true;
622  }
623  }
624  }
625 
626  // Depth
627  if( m_xMtrDepth->get_sensitive() )
628  {
629  eState = rAttrs.GetItemState(SDRATTR_3DOBJ_DEPTH);
630  if( eState != SfxItemState::DONTCARE )
631  {
632  sal_uInt32 nValue = rAttrs.Get(SDRATTR_3DOBJ_DEPTH).GetValue();
633  sal_uInt32 nValue2 = GetCoreValue(*m_xMtrDepth, ePoolUnit);
634  if( nValue != nValue2 )
635  {
636  if( eFUnit != m_xMtrDepth->get_unit() )
638 
640  bUpdate = true;
641  }
642  else if( m_xMtrDepth->get_text().isEmpty() )
643  m_xMtrDepth->set_value(m_xMtrDepth->get_value(FieldUnit::NONE), FieldUnit::NONE);
644  }
645  else
646  {
647  if( !m_xMtrDepth->get_text().isEmpty() )
648  {
649  m_xMtrDepth->set_text("");
650  bUpdate = true;
651  }
652  }
653  }
654 
655  // Double walled / Double sided
656  eState = rAttrs.GetItemState(SDRATTR_3DOBJ_DOUBLE_SIDED);
657  if( eState != SfxItemState::DONTCARE )
658  {
659  bool bValue = rAttrs.Get(SDRATTR_3DOBJ_DOUBLE_SIDED).GetValue();
660  if( bValue != m_xBtnDoubleSided->get_active() )
661  {
662  m_xBtnDoubleSided->set_active( bValue );
663  bUpdate = true;
664  }
665  else if( m_xBtnDoubleSided->get_state() == TRISTATE_INDET )
666  m_xBtnDoubleSided->set_active( bValue );
667  }
668  else
669  {
670  if( m_xBtnDoubleSided->get_state() != TRISTATE_INDET )
671  {
672  m_xBtnDoubleSided->set_state( TRISTATE_INDET );
673  bUpdate = true;
674  }
675  }
676 
677  // Edge rounding
678  if( m_xMtrPercentDiagonal->get_sensitive() )
679  {
681  if( eState != SfxItemState::DONTCARE )
682  {
683  sal_uInt16 nValue = rAttrs.Get(SDRATTR_3DOBJ_PERCENT_DIAGONAL).GetValue();
684  if( nValue != m_xMtrPercentDiagonal->get_value(FieldUnit::PERCENT) )
685  {
686  m_xMtrPercentDiagonal->set_value(nValue, FieldUnit::PERCENT);
687  bUpdate = true;
688  }
689  else if( m_xMtrPercentDiagonal->get_text().isEmpty() )
690  m_xMtrPercentDiagonal->set_value(nValue, FieldUnit::PERCENT);
691  }
692  else
693  {
694  if( !m_xMtrPercentDiagonal->get_text().isEmpty() )
695  {
696  m_xMtrPercentDiagonal->set_text("");
697  bUpdate = true;
698  }
699  }
700  }
701 
702  // Depth scaling
703  if( m_xMtrBackscale->get_sensitive() )
704  {
705  eState = rAttrs.GetItemState(SDRATTR_3DOBJ_BACKSCALE);
706  if( eState != SfxItemState::DONTCARE )
707  {
708  sal_uInt16 nValue = rAttrs.Get(SDRATTR_3DOBJ_BACKSCALE).GetValue();
709  if( nValue != m_xMtrBackscale->get_value(FieldUnit::PERCENT) )
710  {
711  m_xMtrBackscale->set_value(nValue, FieldUnit::PERCENT);
712  bUpdate = true;
713  }
714  else if( m_xMtrBackscale->get_text().isEmpty() )
715  m_xMtrBackscale->set_value(nValue, FieldUnit::PERCENT);
716  }
717  else
718  {
719  if( !m_xMtrBackscale->get_text().isEmpty() )
720  {
721  m_xMtrBackscale->set_text("");
722  bUpdate = true;
723  }
724  }
725  }
726 
727  // End angle
728  if( m_xMtrEndAngle->get_sensitive() )
729  {
730  eState = rAttrs.GetItemState(SDRATTR_3DOBJ_END_ANGLE);
731  if( eState != SfxItemState::DONTCARE )
732  {
733  sal_Int32 nValue = rAttrs.Get(SDRATTR_3DOBJ_END_ANGLE).GetValue();
734  if( nValue != m_xMtrEndAngle->get_value(FieldUnit::DEGREE) )
735  {
736  m_xMtrEndAngle->set_value(nValue, FieldUnit::DEGREE);
737  bUpdate = true;
738  }
739  }
740  else
741  {
742  if( !m_xMtrEndAngle->get_text().isEmpty() )
743  {
744  m_xMtrEndAngle->set_text("");
745  bUpdate = true;
746  }
747  }
748  }
749 
750  // Normal type
751  eState = rAttrs.GetItemState(SDRATTR_3DOBJ_NORMALS_KIND);
752  if( eState != SfxItemState::DONTCARE )
753  {
754  sal_uInt16 nValue = rAttrs.Get(SDRATTR_3DOBJ_NORMALS_KIND).GetValue();
755 
756  if( ( !m_xBtnNormalsObj->get_active() && nValue == 0 ) ||
757  ( !m_xBtnNormalsFlat->get_active() && nValue == 1 ) ||
758  ( !m_xBtnNormalsSphere->get_active() && nValue == 2 ) )
759  {
760  m_xBtnNormalsObj->set_active( nValue == 0 );
761  m_xBtnNormalsFlat->set_active( nValue == 1 );
762  m_xBtnNormalsSphere->set_active( nValue == 2 );
763  bUpdate = true;
764  }
765  }
766  else
767  {
768  if( m_xBtnNormalsObj->get_active() ||
769  m_xBtnNormalsFlat->get_active() ||
770  m_xBtnNormalsSphere->get_active() )
771  {
772  m_xBtnNormalsObj->set_active( false );
773  m_xBtnNormalsFlat->set_active( false );
774  m_xBtnNormalsSphere->set_active( false );
775  bUpdate = true;
776  }
777  }
778 
779  // Normal inverted
781  if( eState != SfxItemState::DONTCARE )
782  {
783  bool bValue = rAttrs.Get(SDRATTR_3DOBJ_NORMALS_INVERT).GetValue();
784  if( bValue != m_xBtnNormalsInvert->get_active() )
785  {
786  m_xBtnNormalsInvert->set_active( bValue );
787  bUpdate = true;
788  }
789  else if( m_xBtnNormalsInvert->get_state() == TRISTATE_INDET )
790  m_xBtnNormalsInvert->set_active( bValue );
791  }
792  else
793  {
794  if( m_xBtnNormalsInvert->get_state() != TRISTATE_INDET )
795  {
796  m_xBtnNormalsInvert->set_state( TRISTATE_INDET );
797  bUpdate = true;
798  }
799  }
800 
801  // 2-sided lighting
803  if( eState != SfxItemState::DONTCARE )
804  {
805  bool bValue = rAttrs.Get(SDRATTR_3DSCENE_TWO_SIDED_LIGHTING).GetValue();
806  if( bValue != m_xBtnTwoSidedLighting->get_active() )
807  {
808  m_xBtnTwoSidedLighting->set_active( bValue );
809  bUpdate = true;
810  }
811  else if( m_xBtnTwoSidedLighting->get_state() == TRISTATE_INDET )
812  m_xBtnTwoSidedLighting->set_active( bValue );
813  }
814  else
815  {
816  if( m_xBtnTwoSidedLighting->get_state() != TRISTATE_INDET )
817  {
819  bUpdate = true;
820  }
821  }
822 
823  // Representation
824  // Shademode
825  eState = rAttrs.GetItemState(SDRATTR_3DSCENE_SHADE_MODE);
826  if( eState != SfxItemState::DONTCARE )
827  {
828  sal_uInt16 nValue = rAttrs.Get(SDRATTR_3DSCENE_SHADE_MODE).GetValue();
829  if( nValue != m_xLbShademode->get_active() )
830  {
831  m_xLbShademode->set_active( nValue );
832  bUpdate = true;
833  }
834  }
835  else
836  {
837  if( m_xLbShademode->get_active() != 0 )
838  {
839  m_xLbShademode->set_active(-1);
840  bUpdate = true;
841  }
842  }
843 
844  // 3D-Shadow
845  eState = rAttrs.GetItemState(SDRATTR_3DOBJ_SHADOW_3D);
846  if( eState != SfxItemState::DONTCARE )
847  {
848  bool bValue = rAttrs.Get(SDRATTR_3DOBJ_SHADOW_3D).GetValue();
849  if( bValue != m_xBtnShadow3d->get_active() )
850  {
851  m_xBtnShadow3d->set_active( bValue );
852  m_xFtSlant->set_sensitive( bValue );
853  m_xMtrSlant->set_sensitive( bValue );
854  bUpdate = true;
855  }
856  else if( m_xBtnShadow3d->get_state() == TRISTATE_INDET )
857  m_xBtnShadow3d->set_active( bValue );
858  }
859  else
860  {
861  if( m_xBtnShadow3d->get_state() != TRISTATE_INDET )
862  {
863  m_xBtnShadow3d->set_state( TRISTATE_INDET );
864  bUpdate = true;
865  }
866  }
867 
868  // Inclination (Shadow)
870  if( eState != SfxItemState::DONTCARE )
871  {
872  sal_uInt16 nValue = rAttrs.Get(SDRATTR_3DSCENE_SHADOW_SLANT).GetValue();
873  if( nValue != m_xMtrSlant->get_value(FieldUnit::DEGREE) )
874  {
875  m_xMtrSlant->set_value(nValue, FieldUnit::DEGREE);
876  bUpdate = true;
877  }
878  }
879  else
880  {
881  if( !m_xMtrSlant->get_text().isEmpty() )
882  {
883  m_xMtrSlant->set_text("");
884  bUpdate = true;
885  }
886  }
887 
888  // Distance
889  eState = rAttrs.GetItemState(SDRATTR_3DSCENE_DISTANCE);
890  if( eState != SfxItemState::DONTCARE )
891  {
892  sal_uInt32 nValue = rAttrs.Get(SDRATTR_3DSCENE_DISTANCE).GetValue();
893  sal_uInt32 nValue2 = GetCoreValue(*m_xMtrDistance, ePoolUnit);
894  if( nValue != nValue2 )
895  {
896  if( eFUnit != m_xMtrDistance->get_unit() )
898 
900  bUpdate = true;
901  }
902  }
903  else
904  {
905  if( !m_xMtrDepth->get_text().isEmpty() )
906  {
907  m_xMtrDepth->set_text("");
908  bUpdate = true;
909  }
910  }
911 
912  // Focal length
914  if( eState != SfxItemState::DONTCARE )
915  {
916  sal_uInt32 nValue = rAttrs.Get(SDRATTR_3DSCENE_FOCAL_LENGTH).GetValue();
917  sal_uInt32 nValue2 = GetCoreValue(*m_xMtrFocalLength, ePoolUnit);
918  if( nValue != nValue2 )
919  {
920  if( eFUnit != m_xMtrFocalLength->get_unit() )
922 
924  bUpdate = true;
925  }
926  }
927  else
928  {
929  if( !m_xMtrFocalLength->get_text().isEmpty() )
930  {
931  m_xMtrFocalLength->set_text("");
932  bUpdate = true;
933  }
934  }
935 
936 // Lighting
937  Color aColor;
938  // Light 1 (Color)
940  if( eState != SfxItemState::DONTCARE )
941  {
942  aColor = rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_1).GetValue();
943  ColorListBox* pLb = m_xLbLight1.get();
944  if( aColor != pLb->GetSelectEntryColor() )
945  {
946  LBSelectColor( pLb, aColor );
947  bUpdate = true;
948  }
949  }
950  else
951  {
952  if (!m_xLbLight1->IsNoSelection())
953  {
954  m_xLbLight1->SetNoSelection();
955  bUpdate = true;
956  }
957  }
958  // Light 1 (on/off)
959  eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTON_1);
960  if( eState != SfxItemState::DONTCARE )
961  {
962  bool bOn = rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_1).GetValue();
963  if (bOn != m_xBtnLight1->isLightOn())
964  {
965  m_xBtnLight1->switchLightOn(bOn);
966  bUpdate = true;
967  }
968  if( m_xBtnLight1->get_state() == TRISTATE_INDET )
969  m_xBtnLight1->set_active( m_xBtnLight1->get_active() );
970  }
971  else
972  {
973  if( m_xBtnLight1->get_state() != TRISTATE_INDET )
974  {
975  m_xBtnLight1->set_state( TRISTATE_INDET );
976  bUpdate = true;
977  }
978  }
979  // Light 1 (direction)
981  if( eState != SfxItemState::DONTCARE )
982  {
983  bUpdate = true;
984  }
985 
986  //Light 2 (color)
988  if( eState != SfxItemState::DONTCARE )
989  {
990  aColor = rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_2).GetValue();
991  ColorListBox* pLb = m_xLbLight2.get();
992  if( aColor != pLb->GetSelectEntryColor() )
993  {
994  LBSelectColor( pLb, aColor );
995  bUpdate = true;
996  }
997  }
998  else
999  {
1000  if (!m_xLbLight2->IsNoSelection())
1001  {
1002  m_xLbLight2->SetNoSelection();
1003  bUpdate = true;
1004  }
1005  }
1006  // Light 2 (on/off)
1007  eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTON_2);
1008  if( eState != SfxItemState::DONTCARE )
1009  {
1010  bool bOn = rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_2).GetValue();
1011  if (bOn != m_xBtnLight2->isLightOn())
1012  {
1013  m_xBtnLight2->switchLightOn(bOn);
1014  bUpdate = true;
1015  }
1016  if( m_xBtnLight2->get_state() == TRISTATE_INDET )
1017  m_xBtnLight2->set_active( m_xBtnLight2->get_active() );
1018  }
1019  else
1020  {
1021  if( m_xBtnLight2->get_state() != TRISTATE_INDET )
1022  {
1023  m_xBtnLight2->set_state( TRISTATE_INDET );
1024  bUpdate = true;
1025  }
1026  }
1027  //Light 2 (Direction)
1029  if( eState != SfxItemState::DONTCARE )
1030  {
1031  bUpdate = true;
1032  }
1033 
1034  //Light 3 (color)
1035  eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_3);
1036  if( eState != SfxItemState::DONTCARE )
1037  {
1038  aColor = rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_3).GetValue();
1039  ColorListBox* pLb = m_xLbLight3.get();
1040  if( aColor != pLb->GetSelectEntryColor() )
1041  {
1042  LBSelectColor( pLb, aColor );
1043  bUpdate = true;
1044  }
1045  }
1046  else
1047  {
1048  if (!m_xLbLight3->IsNoSelection())
1049  {
1050  m_xLbLight3->SetNoSelection();
1051  bUpdate = true;
1052  }
1053  }
1054  // Light 3 (on/off)
1055  eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTON_3);
1056  if( eState != SfxItemState::DONTCARE )
1057  {
1058  bool bOn = rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_3).GetValue();
1059  if (bOn != m_xBtnLight3->isLightOn())
1060  {
1061  m_xBtnLight3->switchLightOn(bOn);
1062  bUpdate = true;
1063  }
1064  if( m_xBtnLight3->get_state() == TRISTATE_INDET )
1065  m_xBtnLight3->set_active( m_xBtnLight3->get_active() );
1066  }
1067  else
1068  {
1069  if( m_xBtnLight3->get_state() != TRISTATE_INDET )
1070  {
1071  m_xBtnLight3->set_state( TRISTATE_INDET );
1072  bUpdate = true;
1073  }
1074  }
1075  // Light 3 (Direction)
1077  if( eState != SfxItemState::DONTCARE )
1078  {
1079  bUpdate = true;
1080  }
1081 
1082  // Light 4 (Color)
1083  eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_4);
1084  if( eState != SfxItemState::DONTCARE )
1085  {
1086  aColor = rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_4).GetValue();
1087  ColorListBox* pLb = m_xLbLight4.get();
1088  if( aColor != pLb->GetSelectEntryColor() )
1089  {
1090  LBSelectColor( pLb, aColor );
1091  bUpdate = true;
1092  }
1093  }
1094  else
1095  {
1096  if (!m_xLbLight4->IsNoSelection())
1097  {
1098  m_xLbLight4->SetNoSelection();
1099  bUpdate = true;
1100  }
1101  }
1102  // Light 4 (on/off)
1103  eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTON_4);
1104  if( eState != SfxItemState::DONTCARE )
1105  {
1106  bool bOn = rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_4).GetValue();
1107  if (bOn != m_xBtnLight4->isLightOn())
1108  {
1109  m_xBtnLight4->switchLightOn(bOn);
1110  bUpdate = true;
1111  }
1112  if( m_xBtnLight4->get_state() == TRISTATE_INDET )
1113  m_xBtnLight4->set_active( m_xBtnLight4->get_active() );
1114  }
1115  else
1116  {
1117  if( m_xBtnLight4->get_state() != TRISTATE_INDET )
1118  {
1119  m_xBtnLight4->set_state( TRISTATE_INDET );
1120  bUpdate = true;
1121  }
1122  }
1123  // Light 4 (direction)
1125  if( eState != SfxItemState::DONTCARE )
1126  {
1127  bUpdate = true;
1128  }
1129 
1130  // Light 5 (color)
1131  eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_5);
1132  if( eState != SfxItemState::DONTCARE )
1133  {
1134  aColor = rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_5).GetValue();
1135  ColorListBox* pLb = m_xLbLight5.get();
1136  if( aColor != pLb->GetSelectEntryColor() )
1137  {
1138  LBSelectColor( pLb, aColor );
1139  bUpdate = true;
1140  }
1141  }
1142  else
1143  {
1144  if (!m_xLbLight5->IsNoSelection())
1145  {
1146  m_xLbLight5->SetNoSelection();
1147  bUpdate = true;
1148  }
1149  }
1150  // Light 5 (on/off)
1151  eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTON_5);
1152  if( eState != SfxItemState::DONTCARE )
1153  {
1154  bool bOn = rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_5).GetValue();
1155  if (bOn != m_xBtnLight5->isLightOn())
1156  {
1157  m_xBtnLight5->switchLightOn(bOn);
1158  bUpdate = true;
1159  }
1160  if( m_xBtnLight5->get_state() == TRISTATE_INDET )
1161  m_xBtnLight5->set_active( m_xBtnLight5->get_active() );
1162  }
1163  else
1164  {
1165  if( m_xBtnLight5->get_state() != TRISTATE_INDET )
1166  {
1167  m_xBtnLight5->set_state( TRISTATE_INDET );
1168  bUpdate = true;
1169  }
1170  }
1171  // Light 5 (direction)
1173  if( eState != SfxItemState::DONTCARE )
1174  {
1175  bUpdate = true;
1176  }
1177 
1178  // Light 6 (color)
1179  eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_6);
1180  if( eState != SfxItemState::DONTCARE )
1181  {
1182  aColor = rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_6).GetValue();
1183  ColorListBox* pLb = m_xLbLight6.get();
1184  if( aColor != pLb->GetSelectEntryColor() )
1185  {
1186  LBSelectColor( pLb, aColor );
1187  bUpdate = true;
1188  }
1189  }
1190  else
1191  {
1192  if (!m_xLbLight6->IsNoSelection())
1193  {
1194  m_xLbLight6->SetNoSelection();
1195  bUpdate = true;
1196  }
1197  }
1198  // Light 6 (on/off)
1199  eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTON_6);
1200  if( eState != SfxItemState::DONTCARE )
1201  {
1202  bool bOn = rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_6).GetValue();
1203  if (bOn != m_xBtnLight6->isLightOn())
1204  {
1205  m_xBtnLight6->switchLightOn(bOn);
1206  bUpdate = true;
1207  }
1208  if( m_xBtnLight6->get_state() == TRISTATE_INDET )
1209  m_xBtnLight6->set_active( m_xBtnLight6->get_active() );
1210  }
1211  else
1212  {
1213  if( m_xBtnLight6->get_state() != TRISTATE_INDET )
1214  {
1215  m_xBtnLight6->set_state( TRISTATE_INDET );
1216  bUpdate = true;
1217  }
1218  }
1219  // Light 6 (direction)
1221  if( eState != SfxItemState::DONTCARE )
1222  {
1223  bUpdate = true;
1224  }
1225 
1226  // Light 7 (color)
1227  eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_7);
1228  if( eState != SfxItemState::DONTCARE )
1229  {
1230  aColor = rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_7).GetValue();
1231  ColorListBox* pLb = m_xLbLight7.get();
1232  if( aColor != pLb->GetSelectEntryColor() )
1233  {
1234  LBSelectColor( pLb, aColor );
1235  bUpdate = true;
1236  }
1237  }
1238  else
1239  {
1240  if (!m_xLbLight7->IsNoSelection())
1241  {
1242  m_xLbLight7->SetNoSelection();
1243  bUpdate = true;
1244  }
1245  }
1246  // Light 7 (on/off)
1247  eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTON_7);
1248  if( eState != SfxItemState::DONTCARE )
1249  {
1250  bool bOn = rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_7).GetValue();
1251  if (bOn != m_xBtnLight7->isLightOn())
1252  {
1253  m_xBtnLight7->switchLightOn(bOn);
1254  bUpdate = true;
1255  }
1256  if( m_xBtnLight7->get_state() == TRISTATE_INDET )
1257  m_xBtnLight7->set_active( m_xBtnLight7->get_active() );
1258  }
1259  else
1260  {
1261  if( m_xBtnLight7->get_state() != TRISTATE_INDET )
1262  {
1263  m_xBtnLight7->set_state( TRISTATE_INDET );
1264  bUpdate = true;
1265  }
1266  }
1267  // Light 7 (direction)
1269  if( eState != SfxItemState::DONTCARE )
1270  {
1271  bUpdate = true;
1272  }
1273 
1274  // Light 8 (color)
1275  eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTCOLOR_8);
1276  if( eState != SfxItemState::DONTCARE )
1277  {
1278  aColor = rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_8).GetValue();
1279  ColorListBox* pLb = m_xLbLight8.get();
1280  if( aColor != pLb->GetSelectEntryColor() )
1281  {
1282  LBSelectColor( pLb, aColor );
1283  bUpdate = true;
1284  }
1285  }
1286  else
1287  {
1288  if (!m_xLbLight8->IsNoSelection())
1289  {
1290  m_xLbLight8->SetNoSelection();
1291  bUpdate = true;
1292  }
1293  }
1294  // Light 8 (on/off)
1295  eState = rAttrs.GetItemState(SDRATTR_3DSCENE_LIGHTON_8);
1296  if( eState != SfxItemState::DONTCARE )
1297  {
1298  bool bOn = rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_8).GetValue();
1299  if (bOn != m_xBtnLight8->isLightOn())
1300  {
1301  m_xBtnLight8->switchLightOn(bOn);
1302  bUpdate = true;
1303  }
1304  if( m_xBtnLight8->get_state() == TRISTATE_INDET )
1305  m_xBtnLight8->set_active( m_xBtnLight8->get_active() );
1306  }
1307  else
1308  {
1309  if( m_xBtnLight8->get_state() != TRISTATE_INDET )
1310  {
1311  m_xBtnLight8->set_state( TRISTATE_INDET );
1312  bUpdate = true;
1313  }
1314  }
1315  // Light 8 (direction)
1317  if( eState != SfxItemState::DONTCARE )
1318  {
1319  bUpdate = true;
1320  }
1321 
1322  // Ambient light
1323  eState = rAttrs.GetItemState(SDRATTR_3DSCENE_AMBIENTCOLOR);
1324  if( eState != SfxItemState::DONTCARE )
1325  {
1326  aColor = rAttrs.Get(SDRATTR_3DSCENE_AMBIENTCOLOR).GetValue();
1327  ColorListBox* pLb = m_xLbAmbientlight.get();
1328  if( aColor != pLb->GetSelectEntryColor() )
1329  {
1330  LBSelectColor( pLb, aColor );
1331  bUpdate = true;
1332  }
1333  }
1334  else
1335  {
1336  if (!m_xLbAmbientlight->IsNoSelection())
1337  {
1338  m_xLbAmbientlight->SetNoSelection();
1339  bUpdate = true;
1340  }
1341  }
1342 
1343 
1344 // Textures
1345  // Art
1346  if( bBitmap )
1347  {
1348  eState = rAttrs.GetItemState(SDRATTR_3DOBJ_TEXTURE_KIND);
1349  if( eState != SfxItemState::DONTCARE )
1350  {
1351  sal_uInt16 nValue = rAttrs.Get(SDRATTR_3DOBJ_TEXTURE_KIND).GetValue();
1352 
1353  if( ( !m_xBtnTexLuminance->get_active() && nValue == 1 ) ||
1354  ( !m_xBtnTexColor->get_active() && nValue == 3 ) )
1355  {
1356  m_xBtnTexLuminance->set_active( nValue == 1 );
1357  m_xBtnTexColor->set_active( nValue == 3 );
1358  bUpdate = true;
1359  }
1360  }
1361  else
1362  {
1363  if( m_xBtnTexLuminance->get_active() ||
1364  m_xBtnTexColor->get_active() )
1365  {
1366  m_xBtnTexLuminance->set_active( false );
1367  m_xBtnTexColor->set_active( false );
1368  bUpdate = true;
1369  }
1370  }
1371 
1372  // Mode
1373  eState = rAttrs.GetItemState(SDRATTR_3DOBJ_TEXTURE_MODE);
1374  if( eState != SfxItemState::DONTCARE )
1375  {
1376  sal_uInt16 nValue = rAttrs.Get(SDRATTR_3DOBJ_TEXTURE_MODE).GetValue();
1377 
1378  if( ( !m_xBtnTexReplace->get_active() && nValue == 1 ) ||
1379  ( !m_xBtnTexModulate->get_active() && nValue == 2 ) )
1380  {
1381  m_xBtnTexReplace->set_active( nValue == 1 );
1382  m_xBtnTexModulate->set_active( nValue == 2 );
1383  bUpdate = true;
1384  }
1385  }
1386  else
1387  {
1388  if( m_xBtnTexReplace->get_active() ||
1389  m_xBtnTexModulate->get_active() )
1390  {
1391  m_xBtnTexReplace->set_active( false );
1392  m_xBtnTexModulate->set_active( false );
1393  bUpdate = true;
1394  }
1395  }
1396 
1397  // Projection X
1398  eState = rAttrs.GetItemState(SDRATTR_3DOBJ_TEXTURE_PROJ_X);
1399  if( eState != SfxItemState::DONTCARE )
1400  {
1401  sal_uInt16 nValue = rAttrs.Get(SDRATTR_3DOBJ_TEXTURE_PROJ_X).GetValue();
1402 
1403  if( ( !m_xBtnTexObjectX->get_active() && nValue == 0 ) ||
1404  ( !m_xBtnTexParallelX->get_active() && nValue == 1 ) ||
1405  ( !m_xBtnTexCircleX->get_active() && nValue == 2 ) )
1406  {
1407  m_xBtnTexObjectX->set_active( nValue == 0 );
1408  m_xBtnTexParallelX->set_active( nValue == 1 );
1409  m_xBtnTexCircleX->set_active( nValue == 2 );
1410  bUpdate = true;
1411  }
1412  }
1413  else
1414  {
1415  if( m_xBtnTexObjectX->get_active() ||
1416  m_xBtnTexParallelX->get_active() ||
1417  m_xBtnTexCircleX->get_active() )
1418  {
1419  m_xBtnTexObjectX->set_active( false );
1420  m_xBtnTexParallelX->set_active( false );
1421  m_xBtnTexCircleX->set_active( false );
1422  bUpdate = true;
1423  }
1424  }
1425 
1426  // Projection Y
1427  eState = rAttrs.GetItemState(SDRATTR_3DOBJ_TEXTURE_PROJ_Y);
1428  if( eState != SfxItemState::DONTCARE )
1429  {
1430  sal_uInt16 nValue = rAttrs.Get(SDRATTR_3DOBJ_TEXTURE_PROJ_Y).GetValue();
1431 
1432  if( ( !m_xBtnTexObjectY->get_active() && nValue == 0 ) ||
1433  ( !m_xBtnTexParallelY->get_active() && nValue == 1 ) ||
1434  ( !m_xBtnTexCircleY->get_active() && nValue == 2 ) )
1435  {
1436  m_xBtnTexObjectY->set_active( nValue == 0 );
1437  m_xBtnTexParallelY->set_active( nValue == 1 );
1438  m_xBtnTexCircleY->set_active( nValue == 2 );
1439  bUpdate = true;
1440  }
1441  }
1442  else
1443  {
1444  if( m_xBtnTexObjectY->get_active() ||
1445  m_xBtnTexParallelY->get_active() ||
1446  m_xBtnTexCircleY->get_active() )
1447  {
1448  m_xBtnTexObjectY->set_active( false );
1449  m_xBtnTexParallelY->set_active( false );
1450  m_xBtnTexCircleY->set_active( false );
1451  bUpdate = true;
1452  }
1453  }
1454 
1455  // Filter
1456  eState = rAttrs.GetItemState(SDRATTR_3DOBJ_TEXTURE_FILTER);
1457  if( eState != SfxItemState::DONTCARE )
1458  {
1459  bool bValue = rAttrs.Get(SDRATTR_3DOBJ_TEXTURE_FILTER).GetValue();
1460  if( bValue != m_xBtnTexFilter->get_active() )
1461  {
1462  m_xBtnTexFilter->set_active( bValue );
1463  bUpdate = true;
1464  }
1465  if( m_xBtnTexFilter->get_state() == TRISTATE_INDET )
1466  m_xBtnTexFilter->set_active( bValue );
1467  }
1468  else
1469  {
1470  if( m_xBtnTexFilter->get_state() != TRISTATE_INDET )
1471  {
1472  m_xBtnTexFilter->set_state( TRISTATE_INDET );
1473  bUpdate = true;
1474  }
1475  }
1476  }
1477 
1478 
1479  // Material Favorites
1480  m_xLbMatFavorites->set_active( 0 );
1481 
1482  // Object color
1483  eState = rAttrs.GetItemState(XATTR_FILLCOLOR);
1484  if( eState != SfxItemState::DONTCARE )
1485  {
1486  aColor = rAttrs.Get(XATTR_FILLCOLOR).GetColorValue();
1487  ColorListBox* pLb = m_xLbMatColor.get();
1488  if( aColor != pLb->GetSelectEntryColor() )
1489  {
1490  LBSelectColor( pLb, aColor );
1491  bUpdate = true;
1492  }
1493  }
1494  else
1495  {
1496  if (!m_xLbMatColor->IsNoSelection())
1497  {
1498  m_xLbMatColor->SetNoSelection();
1499  bUpdate = true;
1500  }
1501  }
1502 
1503  // Self-luminous color
1504  eState = rAttrs.GetItemState(SDRATTR_3DOBJ_MAT_EMISSION);
1505  if( eState != SfxItemState::DONTCARE )
1506  {
1507  aColor = rAttrs.Get(SDRATTR_3DOBJ_MAT_EMISSION).GetValue();
1508  ColorListBox* pLb = m_xLbMatEmission.get();
1509  if( aColor != pLb->GetSelectEntryColor() )
1510  {
1511  LBSelectColor( pLb, aColor );
1512  bUpdate = true;
1513  }
1514  }
1515  else
1516  {
1517  if (!m_xLbMatEmission->IsNoSelection())
1518  {
1519  m_xLbMatEmission->SetNoSelection();
1520  bUpdate = true;
1521  }
1522  }
1523 
1524  // Specular
1525  eState = rAttrs.GetItemState(SDRATTR_3DOBJ_MAT_SPECULAR);
1526  if( eState != SfxItemState::DONTCARE )
1527  {
1528  aColor = rAttrs.Get(SDRATTR_3DOBJ_MAT_SPECULAR).GetValue();
1529  ColorListBox* pLb = m_xLbMatSpecular.get();
1530  if( aColor != pLb->GetSelectEntryColor() )
1531  {
1532  LBSelectColor( pLb, aColor );
1533  bUpdate = true;
1534  }
1535  }
1536  else
1537  {
1538  if (!m_xLbMatSpecular->IsNoSelection())
1539  {
1540  m_xLbMatSpecular->SetNoSelection();
1541  bUpdate = true;
1542  }
1543  }
1544 
1545  // Specular Intensity
1547  if( eState != SfxItemState::DONTCARE )
1548  {
1549  sal_uInt16 nValue = rAttrs.Get(SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY).GetValue();
1550  if( nValue != m_xMtrMatSpecularIntensity->get_value(FieldUnit::PERCENT) )
1551  {
1552  m_xMtrMatSpecularIntensity->set_value(nValue, FieldUnit::PERCENT);
1553  bUpdate = true;
1554  }
1555  }
1556  else
1557  {
1558  if( !m_xMtrMatSpecularIntensity->get_text().isEmpty() )
1559  {
1560  m_xMtrMatSpecularIntensity->set_text("");
1561  bUpdate = true;
1562  }
1563  }
1564 
1565 
1566 // Other
1567  // Perspective
1568  eState = rAttrs.GetItemState(SDRATTR_3DSCENE_PERSPECTIVE);
1569  if( eState != SfxItemState::DONTCARE )
1570  {
1571  ProjectionType ePT = static_cast<ProjectionType>(rAttrs.Get(SDRATTR_3DSCENE_PERSPECTIVE).GetValue());
1572  if( ( !m_xBtnPerspective->get_active() && ePT == ProjectionType::Perspective ) ||
1573  ( m_xBtnPerspective->get_active() && ePT == ProjectionType::Parallel ) )
1574  {
1575  m_xBtnPerspective->set_active( ePT == ProjectionType::Perspective );
1576  bUpdate = true;
1577  }
1578  if( m_xBtnPerspective->get_state() == TRISTATE_INDET )
1579  m_xBtnPerspective->set_active( ePT == ProjectionType::Perspective );
1580  }
1581  else
1582  {
1583  if( m_xBtnPerspective->get_state() != TRISTATE_INDET )
1584  {
1585  m_xBtnPerspective->set_state( TRISTATE_INDET );
1586  bUpdate = true;
1587  }
1588  }
1589 
1590  if( !bUpdate )
1591  {
1592  // however the 2D attributes may be different. Compare these and decide
1593 
1594  bUpdate = true;
1595  }
1596 
1597  // Update preview
1598  SfxItemSet aSet(rAttrs);
1599 
1600  // set LineStyle hard to drawing::LineStyle_NONE when it's not set so that
1601  // the default (drawing::LineStyle_SOLID) is not used for 3d preview
1602  if(SfxItemState::SET != aSet.GetItemState(XATTR_LINESTYLE, false))
1603  aSet.Put(XLineStyleItem(drawing::LineStyle_NONE));
1604 
1605  // set FillColor hard to WHITE when it's SfxItemState::DONTCARE so that
1606  // the default (Blue7) is not used for 3d preview
1607  if(SfxItemState::DONTCARE == aSet.GetItemState(XATTR_FILLCOLOR, false))
1608  aSet.Put(XFillColorItem(OUString(), COL_WHITE));
1609 
1610  m_xCtlPreview->Set3DAttributes(aSet);
1611  m_xCtlLightPreview->GetSvx3DLightControl().Set3DAttributes(aSet);
1612 
1613  // try to select light corresponding to active button
1614  sal_uInt32 nNumber(0xffffffff);
1615 
1616  if(m_xBtnLight1->get_active())
1617  nNumber = 0;
1618  else if(m_xBtnLight2->get_active())
1619  nNumber = 1;
1620  else if(m_xBtnLight3->get_active())
1621  nNumber = 2;
1622  else if(m_xBtnLight4->get_active())
1623  nNumber = 3;
1624  else if(m_xBtnLight5->get_active())
1625  nNumber = 4;
1626  else if(m_xBtnLight6->get_active())
1627  nNumber = 5;
1628  else if(m_xBtnLight7->get_active())
1629  nNumber = 6;
1630  else if(m_xBtnLight8->get_active())
1631  nNumber = 7;
1632 
1633  if(nNumber != 0xffffffff)
1634  {
1635  m_xCtlLightPreview->GetSvx3DLightControl().SelectLight(nNumber);
1636  }
1637 
1638  // handle state of converts possible
1639  m_xBtnConvertTo3D->set_sensitive(pConvertTo3DItem->GetState());
1640  m_xBtnLatheObject->set_sensitive(pConvertTo3DLatheItem->GetState());
1641 }
1642 
1643 
1645 {
1646  // get remembered 2d attributes from the dialog
1648  {
1650  sal_uInt16 nWhich(aIter.FirstWhich());
1651 
1652  while(nWhich)
1653  {
1654  SfxItemState eState = mpRemember2DAttributes->GetItemState(nWhich, false);
1655  if(SfxItemState::DONTCARE == eState)
1656  rAttrs.InvalidateItem(nWhich);
1657  else if(SfxItemState::SET == eState)
1658  rAttrs.Put(mpRemember2DAttributes->Get(nWhich, false));
1659 
1660  nWhich = aIter.NextWhich();
1661  }
1662  }
1663 
1664 //Others must stand as the front on all sides
1665  // Perspective
1666  if( m_xBtnPerspective->get_state() != TRISTATE_INDET )
1667  {
1669  if( m_xBtnPerspective->get_active() )
1670  nValue = ProjectionType::Perspective;
1671  else
1672  nValue = ProjectionType::Parallel;
1673  rAttrs.Put(Svx3DPerspectiveItem(nValue));
1674  }
1675  else
1677 
1678 // Geometry
1679  // Possible determine PoolUnit (in this case this has not happened in Update() )
1680  if( !mpImpl->pPool )
1681  {
1682  OSL_FAIL( "No Pool in GetAttr()! May be incompatible to drviewsi.cxx ?" );
1683  mpImpl->pPool = rAttrs.GetPool();
1684  DBG_ASSERT( mpImpl->pPool, "Where is the Pool?" );
1685  ePoolUnit = mpImpl->pPool->GetMetric( SID_ATTR_LINE_WIDTH );
1686 
1687  eFUnit = GetModuleFieldUnit( rAttrs );
1688  }
1689 
1690  // Number of segments (horizontal)
1691  if( !m_xNumHorizontal->get_text().isEmpty() )
1692  {
1693  sal_uInt32 nValue = static_cast<sal_uInt32>(m_xNumHorizontal->get_value());
1694  rAttrs.Put(makeSvx3DHorizontalSegmentsItem(nValue));
1695  }
1696  else
1698 
1699  // Number of segments (vertical)
1700  if( !m_xNumVertical->get_text().isEmpty() )
1701  {
1702  sal_uInt32 nValue = static_cast<sal_uInt32>(m_xNumVertical->get_value());
1703  rAttrs.Put(makeSvx3DVerticalSegmentsItem(nValue));
1704  }
1705  else
1707 
1708  // Depth
1709  if( !m_xMtrDepth->get_text().isEmpty() )
1710  {
1711  sal_uInt32 nValue = GetCoreValue(*m_xMtrDepth, ePoolUnit);
1712  rAttrs.Put(makeSvx3DDepthItem(nValue));
1713  }
1714  else
1716 
1717  // Double-sided
1718  TriState eState = m_xBtnDoubleSided->get_state();
1719  if( eState != TRISTATE_INDET )
1720  {
1721  bool bValue = TRISTATE_TRUE == eState;
1722  rAttrs.Put(makeSvx3DDoubleSidedItem(bValue));
1723  }
1724  else
1726 
1727  // Edge rounding
1728  if( !m_xMtrPercentDiagonal->get_text().isEmpty() )
1729  {
1730  sal_uInt16 nValue = static_cast<sal_uInt16>(m_xMtrPercentDiagonal->get_value(FieldUnit::PERCENT));
1731  rAttrs.Put(makeSvx3DPercentDiagonalItem(nValue));
1732  }
1733  else
1735 
1736  // Depth scale
1737  if( !m_xMtrBackscale->get_text().isEmpty() )
1738  {
1739  sal_uInt16 nValue = static_cast<sal_uInt16>(m_xMtrBackscale->get_value(FieldUnit::PERCENT));
1740  rAttrs.Put(makeSvx3DBackscaleItem(nValue));
1741  }
1742  else
1744 
1745  // End angle
1746  if( !m_xMtrEndAngle->get_text().isEmpty() )
1747  {
1748  sal_uInt16 nValue = static_cast<sal_uInt16>(m_xMtrEndAngle->get_value(FieldUnit::DEGREE));
1749  rAttrs.Put(makeSvx3DEndAngleItem(nValue));
1750  }
1751  else
1753 
1754  // Normal type
1755  sal_uInt16 nValue = 99;
1756  if( m_xBtnNormalsObj->get_active() )
1757  nValue = 0;
1758  else if( m_xBtnNormalsFlat->get_active() )
1759  nValue = 1;
1760  else if( m_xBtnNormalsSphere->get_active() )
1761  nValue = 2;
1762 
1763  if( nValue <= 2 )
1764  rAttrs.Put(Svx3DNormalsKindItem(nValue));
1765  else
1767 
1768  // Normal inverted
1769  eState = m_xBtnNormalsInvert->get_state();
1770  if( eState != TRISTATE_INDET )
1771  {
1772  bool bValue = TRISTATE_TRUE == eState;
1773  rAttrs.Put(makeSvx3DNormalsInvertItem(bValue));
1774  }
1775  else
1777 
1778  // 2-sided lighting
1779  eState = m_xBtnTwoSidedLighting->get_state();
1780  if( eState != TRISTATE_INDET )
1781  {
1782  bool bValue = TRISTATE_TRUE == eState;
1783  rAttrs.Put(makeSvx3DTwoSidedLightingItem(bValue));
1784  }
1785  else
1787 
1788 // Representation
1789  // Shade mode
1790  if( m_xLbShademode->get_active() != -1 )
1791  {
1792  nValue = m_xLbShademode->get_active();
1793  rAttrs.Put(Svx3DShadeModeItem(nValue));
1794  }
1795  else
1797 
1798  // 3D-Shadow
1799  eState = m_xBtnShadow3d->get_state();
1800  if( eState != TRISTATE_INDET )
1801  {
1802  bool bValue = TRISTATE_TRUE == eState;
1803  rAttrs.Put(makeSvx3DShadow3DItem(bValue));
1804  rAttrs.Put(makeSdrShadowItem(bValue));
1805  }
1806  else
1807  {
1810  }
1811 
1812  // Slant (Shadow)
1813  if( !m_xMtrSlant->get_text().isEmpty() )
1814  {
1815  sal_uInt16 nValue2 = static_cast<sal_uInt16>(m_xMtrSlant->get_value(FieldUnit::DEGREE));
1816  rAttrs.Put(makeSvx3DShadowSlantItem(nValue2));
1817  }
1818  else
1820 
1821  // Distance
1822  if( !m_xMtrDistance->get_text().isEmpty() )
1823  {
1824  sal_uInt32 nValue2 = GetCoreValue(*m_xMtrDistance, ePoolUnit);
1825  rAttrs.Put(makeSvx3DDistanceItem(nValue2));
1826  }
1827  else
1829 
1830  // Focal length
1831  if( !m_xMtrFocalLength->get_text().isEmpty() )
1832  {
1833  sal_uInt32 nValue2 = GetCoreValue(*m_xMtrFocalLength, ePoolUnit);
1834  rAttrs.Put(makeSvx3DFocalLengthItem(nValue2));
1835  }
1836  else
1838 
1839  // Lighting
1840  Color aColor;
1841  const SfxItemSet aLightItemSet(m_xCtlLightPreview->GetSvx3DLightControl().Get3DAttributes());
1842 
1843  // Light 1 color
1844  if (!m_xLbLight1->IsNoSelection())
1845  {
1846  aColor = m_xLbLight1->GetSelectEntryColor();
1847  rAttrs.Put(makeSvx3DLightcolor1Item(aColor));
1848  }
1849  else
1851  // Light 1 (on/off)
1852  eState = m_xBtnLight1->get_state();
1853  if( eState != TRISTATE_INDET )
1854  {
1855  bool bValue = m_xBtnLight1->isLightOn();
1856  rAttrs.Put(makeSvx3DLightOnOff1Item(bValue));
1857 
1858  // Light 1 (direction)
1859  if( bValue )
1860  {
1861  rAttrs.Put(aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_1));
1862  }
1863  }
1864  else
1866 
1867 
1868  // Light 2 color
1869  if (!m_xLbLight2->IsNoSelection())
1870  {
1871  aColor = m_xLbLight2->GetSelectEntryColor();
1872  rAttrs.Put(makeSvx3DLightcolor2Item(aColor));
1873  }
1874  else
1876  // Light 2 (on/off)
1877  eState = m_xBtnLight2->get_state();
1878  if( eState != TRISTATE_INDET )
1879  {
1880  bool bValue = m_xBtnLight2->isLightOn();
1881  rAttrs.Put(makeSvx3DLightOnOff2Item(bValue));
1882 
1883  // Light 2 (direction)
1884  if( bValue )
1885  {
1886  rAttrs.Put(aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_2));
1887  }
1888  }
1889  else
1891 
1892  // Light 3 color
1893  if (!m_xLbLight3->IsNoSelection())
1894  {
1895  aColor = m_xLbLight3->GetSelectEntryColor();
1896  rAttrs.Put(makeSvx3DLightcolor3Item(aColor));
1897  }
1898  else
1900  // Light 3 (on/off)
1901  eState = m_xBtnLight3->get_state();
1902  if( eState != TRISTATE_INDET )
1903  {
1904  bool bValue = m_xBtnLight3->isLightOn();
1905  rAttrs.Put(makeSvx3DLightOnOff3Item(bValue));
1906 
1907  // Light 3 (direction)
1908  if( bValue )
1909  {
1910  rAttrs.Put(aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_3));
1911  }
1912  }
1913  else
1915 
1916  // Light 4 color
1917  if (!m_xLbLight4->IsNoSelection())
1918  {
1919  aColor = m_xLbLight4->GetSelectEntryColor();
1920  rAttrs.Put(makeSvx3DLightcolor4Item(aColor));
1921  }
1922  else
1924  // Light 4 (on/off)
1925  eState = m_xBtnLight4->get_state();
1926  if( eState != TRISTATE_INDET )
1927  {
1928  bool bValue = m_xBtnLight4->isLightOn();
1929  rAttrs.Put(makeSvx3DLightOnOff4Item(bValue));
1930 
1931  // Light 4 (direction)
1932  if( bValue )
1933  {
1934  rAttrs.Put(aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_4));
1935  }
1936  }
1937  else
1939 
1940  // Light 5 color
1941  if (!m_xLbLight5->IsNoSelection())
1942  {
1943  aColor = m_xLbLight5->GetSelectEntryColor();
1944  rAttrs.Put(makeSvx3DLightcolor5Item(aColor));
1945  }
1946  else
1948  // Light 5 (on/off)
1949  eState = m_xBtnLight5->get_state();
1950  if( eState != TRISTATE_INDET )
1951  {
1952  bool bValue = m_xBtnLight5->isLightOn();
1953  rAttrs.Put(makeSvx3DLightOnOff5Item(bValue));
1954 
1955  // Light 5 (direction)
1956  if( bValue )
1957  {
1958  rAttrs.Put(aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_5));
1959  }
1960  }
1961  else
1963 
1964  // Light 6 color
1965  if (!m_xLbLight6->IsNoSelection())
1966  {
1967  aColor = m_xLbLight6->GetSelectEntryColor();
1968  rAttrs.Put(makeSvx3DLightcolor6Item(aColor));
1969  }
1970  else
1972  // Light 6 (on/off)
1973  eState = m_xBtnLight6->get_state();
1974  if( eState != TRISTATE_INDET )
1975  {
1976  bool bValue = m_xBtnLight6->isLightOn();
1977  rAttrs.Put(makeSvx3DLightOnOff6Item(bValue));
1978 
1979  // Light 6 (direction)
1980  if( bValue )
1981  {
1982  rAttrs.Put(aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_6));
1983  }
1984  }
1985  else
1987 
1988  // Light 7 color
1989  if (!m_xLbLight7->IsNoSelection())
1990  {
1991  aColor = m_xLbLight7->GetSelectEntryColor();
1992  rAttrs.Put(makeSvx3DLightcolor7Item(aColor));
1993  }
1994  else
1996  // Light 7 (on/off)
1997  eState = m_xBtnLight7->get_state();
1998  if( eState != TRISTATE_INDET )
1999  {
2000  bool bValue = m_xBtnLight7->isLightOn();
2001  rAttrs.Put(makeSvx3DLightOnOff7Item(bValue));
2002 
2003  // Light 7 (direction)
2004  if( bValue )
2005  {
2006  rAttrs.Put(aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_7));
2007  }
2008  }
2009  else
2011 
2012  // Light 8 color
2013  if (!m_xLbLight8->IsNoSelection())
2014  {
2015  aColor = m_xLbLight8->GetSelectEntryColor();
2016  rAttrs.Put(makeSvx3DLightcolor8Item(aColor));
2017  }
2018  else
2020  // Light 8 (on/off)
2021  eState = m_xBtnLight8->get_state();
2022  if( eState != TRISTATE_INDET )
2023  {
2024  bool bValue = m_xBtnLight8->isLightOn();
2025  rAttrs.Put(makeSvx3DLightOnOff8Item(bValue));
2026 
2027  // Light 8 (direction)
2028  if( bValue )
2029  {
2030  rAttrs.Put(aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_8));
2031  }
2032  }
2033  else
2035 
2036  // Ambient light
2037  if (!m_xLbAmbientlight->IsNoSelection())
2038  {
2039  aColor = m_xLbAmbientlight->GetSelectEntryColor();
2040  rAttrs.Put(makeSvx3DAmbientcolorItem(aColor));
2041  }
2042  else
2044 
2045 // Textures
2046  // Art
2047  nValue = 99;
2048  if( m_xBtnTexLuminance->get_active() )
2049  nValue = 1;
2050  else if( m_xBtnTexColor->get_active() )
2051  nValue = 3;
2052 
2053  if( nValue == 1 || nValue == 3 )
2054  rAttrs.Put(Svx3DTextureKindItem(nValue));
2055  else
2057 
2058 
2059  // Mode
2060  nValue = 99;
2061  if( m_xBtnTexReplace->get_active() )
2062  nValue = 1;
2063  else if( m_xBtnTexModulate->get_active() )
2064  nValue = 2;
2065 
2066  if( nValue == 1 || nValue == 2 )
2067  rAttrs.Put(Svx3DTextureModeItem(nValue));
2068  else
2070 
2071  // X projection
2072  nValue = 99;
2073  if( m_xBtnTexObjectX->get_active() )
2074  nValue = 0;
2075  else if( m_xBtnTexParallelX->get_active() )
2076  nValue = 1;
2077  else if( m_xBtnTexCircleX->get_active() )
2078  nValue = 2;
2079 
2080  if( nValue <= 2 )
2081  rAttrs.Put(Svx3DTextureProjectionXItem(nValue));
2082  else
2084 
2085  // Y projection
2086  nValue = 99;
2087  if( m_xBtnTexObjectY->get_active() )
2088  nValue = 0;
2089  else if( m_xBtnTexParallelY->get_active() )
2090  nValue = 1;
2091  else if( m_xBtnTexCircleY->get_active() )
2092  nValue = 2;
2093 
2094  if( nValue <= 2 )
2095  rAttrs.Put(Svx3DTextureProjectionYItem(nValue));
2096  else
2098 
2099 
2100  // Filter
2101  eState = m_xBtnTexFilter->get_state();
2102  if( eState != TRISTATE_INDET )
2103  {
2104  bool bValue = TRISTATE_TRUE == eState;
2105  rAttrs.Put(makeSvx3DTextureFilterItem(bValue));
2106  }
2107  else
2109 
2110 
2111 // Material
2112  // Object color
2113  if (!m_xLbMatColor->IsNoSelection())
2114  {
2115  aColor = m_xLbMatColor->GetSelectEntryColor();
2116  rAttrs.Put( XFillColorItem( "", aColor) );
2117  }
2118  else
2119  {
2120  rAttrs.InvalidateItem( XATTR_FILLCOLOR );
2121  }
2122 
2123  // luminous color
2124  if (!m_xLbMatEmission->IsNoSelection())
2125  {
2126  aColor = m_xLbMatEmission->GetSelectEntryColor();
2127  rAttrs.Put(makeSvx3DMaterialEmissionItem(aColor));
2128  }
2129  else
2131 
2132  // Specular
2133  if (!m_xLbMatSpecular->IsNoSelection())
2134  {
2135  aColor = m_xLbMatSpecular->GetSelectEntryColor();
2136  rAttrs.Put(makeSvx3DMaterialSpecularItem(aColor));
2137  }
2138  else
2140 
2141  // Specular intensity
2142  if( !m_xMtrMatSpecularIntensity->get_text().isEmpty() )
2143  {
2144  sal_uInt16 nValue2 = static_cast<sal_uInt16>(m_xMtrMatSpecularIntensity->get_value(FieldUnit::PERCENT));
2146  }
2147  else
2149 }
2150 
2152 {
2153  if ( !IsFloatingMode() ||
2154  !GetFloatingWindow()->IsRollUp() )
2155  {
2156  Size aWinSize( GetOutputSizePixel() ); // why rSize in Resizing()?
2157 
2158  if( aWinSize.Height() >= GetMinOutputSizePixel().Height() &&
2159  aWinSize.Width() >= GetMinOutputSizePixel().Width() )
2160  {
2161  // Hide
2162  m_xBtnUpdate->hide();
2163  m_xBtnAssign->hide();
2164 
2165  m_xBtnConvertTo3D->hide();
2166  m_xBtnLatheObject->hide();
2167  m_xBtnPerspective->hide();
2168 
2169  m_xCtlPreview->Hide();
2170  m_xLightPreviewGrid->hide();
2171 
2172  m_xFLGeometrie->hide();
2173  m_xFLRepresentation->hide();
2174  m_xFLLight->hide();
2175  m_xFLTexture->hide();
2176  m_xFLMaterial->hide();
2177 
2178  // Show
2179  m_xBtnUpdate->show();
2180  m_xBtnAssign->show();
2181 
2182  m_xBtnConvertTo3D->show();
2183  m_xBtnLatheObject->show();
2184  m_xBtnPerspective->show();
2185 
2186  if( m_xBtnGeo->get_active() )
2187  ClickViewTypeHdl(*m_xBtnGeo);
2188  if( m_xBtnRepresentation->get_active() )
2189  ClickViewTypeHdl(*m_xBtnRepresentation);
2190  if( m_xBtnLight->get_active() )
2191  ClickViewTypeHdl(*m_xBtnLight);
2192  if( m_xBtnTexture->get_active() )
2193  ClickViewTypeHdl(*m_xBtnTexture);
2194  if( m_xBtnMaterial->get_active() )
2195  ClickViewTypeHdl(*m_xBtnMaterial);
2196  }
2197  }
2198 
2200 }
2201 
2203 {
2204  bUpdate = m_xBtnUpdate->get_active();
2205 
2206  if( bUpdate )
2207  {
2208  SfxDispatcher* pDispatcher = LocalGetDispatcher(pBindings);
2209  if (pDispatcher != nullptr)
2210  {
2211  SfxBoolItem aItem( SID_3D_STATE, true );
2212  pDispatcher->ExecuteList(SID_3D_STATE,
2213  SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, { &aItem });
2214  }
2215  }
2216  else
2217  {
2218  // Controls can be disabled during certain circumstances
2219  }
2220 }
2221 
2222 IMPL_LINK_NOARG(Svx3DWin, ClickAssignHdl, weld::Button&, void)
2223 {
2224  SfxDispatcher* pDispatcher = LocalGetDispatcher(pBindings);
2225  if (pDispatcher != nullptr)
2226  {
2227  SfxBoolItem aItem( SID_3D_ASSIGN, true );
2228  pDispatcher->ExecuteList(SID_3D_ASSIGN,
2229  SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, { &aItem });
2230  }
2231 }
2232 
2233 IMPL_LINK( Svx3DWin, ClickViewTypeHdl, weld::Button&, rBtn, void )
2234 {
2235  // Since the permanent updating of the preview would be too expensive
2236  bool bUpdatePreview = m_xBtnLight->get_active();
2237 
2238  m_xBtnGeo->set_active(m_xBtnGeo.get() == &rBtn);
2239  m_xBtnRepresentation->set_active(m_xBtnRepresentation.get() == &rBtn);
2240  m_xBtnLight->set_active(m_xBtnLight.get() == &rBtn);
2241  m_xBtnTexture->set_active(m_xBtnTexture.get() == &rBtn);
2242  m_xBtnMaterial->set_active(m_xBtnMaterial.get() == &rBtn);
2243 
2244  if( m_xBtnGeo->get_active() )
2245  eViewType = ViewType3D::Geo;
2246  if( m_xBtnRepresentation->get_active() )
2247  eViewType = ViewType3D::Representation;
2248  if( m_xBtnLight->get_active() )
2249  eViewType = ViewType3D::Light;
2250  if( m_xBtnTexture->get_active() )
2251  eViewType = ViewType3D::Texture;
2252  if( m_xBtnMaterial->get_active() )
2253  eViewType = ViewType3D::Material;
2254 
2255  // Geometry
2256  if( eViewType == ViewType3D::Geo )
2257  {
2258  m_xFLSegments->show();
2259  m_xFLGeometrie->show();
2260  m_xFLNormals->show();
2261  }
2262  else
2263  {
2264  m_xFLSegments->hide();
2265  m_xFLGeometrie->hide();
2266  m_xFLNormals->hide();
2267  }
2268 
2269  // Representation
2270  if( eViewType == ViewType3D::Representation )
2271  {
2272  m_xFLShadow->show();
2273  m_xFLCamera->show();
2274  m_xFLRepresentation->show();
2275  }
2276  else
2277  {
2278  m_xFLShadow->hide();
2279  m_xFLCamera->hide();
2280  m_xFLRepresentation->hide();
2281  }
2282 
2283  // Lighting
2284  if( eViewType == ViewType3D::Light )
2285  {
2286  m_xFLLight->show();
2287 
2288  ColorListBox* pLb = GetCLbByButton();
2289  if( pLb )
2290  pLb->show();
2291 
2292  m_xLightPreviewGrid->show();
2293  m_xCtlPreview->Hide();
2294  }
2295  else
2296  {
2297  m_xFLLight->hide();
2298 
2299  if( !m_xCtlPreview->IsVisible() )
2300  {
2301  m_xCtlPreview->Show();
2302  m_xLightPreviewGrid->hide();
2303  }
2304  }
2305 
2306  // Textures
2307  if (eViewType == ViewType3D::Texture)
2308  m_xFLTexture->show();
2309  else
2310  m_xFLTexture->hide();
2311 
2312  // Material
2313  if( eViewType == ViewType3D::Material )
2314  {
2315  m_xFLMatSpecular->show();
2316  m_xFLMaterial->show();
2317  }
2318  else
2319  {
2320  m_xFLMatSpecular->hide();
2321  m_xFLMaterial->hide();
2322  }
2323  if( bUpdatePreview && !m_xBtnLight->get_active() )
2324  UpdatePreview();
2325 }
2326 
2327 IMPL_LINK( Svx3DWin, ClickHdl, weld::Button&, rBtn, void )
2328 {
2329  bool bUpdatePreview = false;
2330  sal_uInt16 nSId = 0;
2331 
2332  if( &rBtn == m_xBtnConvertTo3D.get() )
2333  {
2334  nSId = SID_CONVERT_TO_3D;
2335  }
2336  else if( &rBtn == m_xBtnLatheObject.get() )
2337  {
2338  nSId = SID_CONVERT_TO_3D_LATHE_FAST;
2339  }
2340  // Geometry
2341  else if( &rBtn == m_xBtnNormalsObj.get() ||
2342  &rBtn == m_xBtnNormalsFlat.get() ||
2343  &rBtn == m_xBtnNormalsSphere.get() )
2344  {
2345  m_xBtnNormalsObj->set_active( &rBtn == m_xBtnNormalsObj.get() );
2346  m_xBtnNormalsFlat->set_active( &rBtn == m_xBtnNormalsFlat.get() );
2347  m_xBtnNormalsSphere->set_active( &rBtn == m_xBtnNormalsSphere.get() );
2348  bUpdatePreview = true;
2349  }
2350  else if( &rBtn == m_xBtnLight1->get_widget() ||
2351  &rBtn == m_xBtnLight2->get_widget() ||
2352  &rBtn == m_xBtnLight3->get_widget() ||
2353  &rBtn == m_xBtnLight4->get_widget() ||
2354  &rBtn == m_xBtnLight5->get_widget() ||
2355  &rBtn == m_xBtnLight6->get_widget() ||
2356  &rBtn == m_xBtnLight7->get_widget() ||
2357  &rBtn == m_xBtnLight8->get_widget() )
2358  {
2359  // Lighting
2360  LightButton* pToggleBtn = GetLbByButton(&rBtn);
2361 
2362  ColorListBox* pLb = GetCLbByButton(pToggleBtn);
2363  pLb->show();
2364 
2365  bool bIsChecked = pToggleBtn->get_prev_active();
2366 
2367  if (pToggleBtn != m_xBtnLight1.get() && m_xBtnLight1->get_active())
2368  {
2369  m_xBtnLight1->set_active( false );
2370  m_xBtnLight1->set_prev_active(false);
2371  m_xLbLight1->hide();
2372  }
2373  if (pToggleBtn != m_xBtnLight2.get() && m_xBtnLight2->get_active())
2374  {
2375  m_xBtnLight2->set_active( false );
2376  m_xBtnLight2->set_prev_active(false);
2377  m_xLbLight2->hide();
2378  }
2379  if( pToggleBtn != m_xBtnLight3.get() && m_xBtnLight3->get_active() )
2380  {
2381  m_xBtnLight3->set_active( false );
2382  m_xBtnLight3->set_prev_active(false);
2383  m_xLbLight3->hide();
2384  }
2385  if( pToggleBtn != m_xBtnLight4.get() && m_xBtnLight4->get_active() )
2386  {
2387  m_xBtnLight4->set_active( false );
2388  m_xBtnLight4->set_prev_active(false);
2389  m_xLbLight4->hide();
2390  }
2391  if( pToggleBtn != m_xBtnLight5.get() && m_xBtnLight5->get_active() )
2392  {
2393  m_xBtnLight5->set_active( false );
2394  m_xBtnLight5->set_prev_active(false);
2395  m_xLbLight5->hide();
2396  }
2397  if( pToggleBtn != m_xBtnLight6.get() && m_xBtnLight6->get_active() )
2398  {
2399  m_xBtnLight6->set_active( false );
2400  m_xBtnLight6->set_prev_active(false);
2401  m_xLbLight6->hide();
2402  }
2403  if( pToggleBtn != m_xBtnLight7.get() && m_xBtnLight7->get_active() )
2404  {
2405  m_xBtnLight7->set_active( false );
2406  m_xBtnLight7->set_prev_active(false);
2407  m_xLbLight7->hide();
2408  }
2409  if( pToggleBtn != m_xBtnLight8.get() && m_xBtnLight8->get_active() )
2410  {
2411  m_xBtnLight8->set_active( false );
2412  m_xBtnLight8->set_prev_active(false);
2413  m_xLbLight8->hide();
2414  }
2415 
2416  //update light button
2417  pToggleBtn->set_active(true);
2418  pToggleBtn->set_prev_active(true);
2419  if (bIsChecked)
2420  pToggleBtn->switchLightOn(!pToggleBtn->isLightOn());
2421 
2422  bool bEnable = pToggleBtn->isLightOn();
2423  m_xBtnLightColor->set_sensitive( bEnable );
2424  pLb->set_sensitive( bEnable );
2425 
2426  ClickLight(*pToggleBtn);
2427  bUpdatePreview = true;
2428  }
2429  // Textures
2430  else if( &rBtn == m_xBtnTexLuminance.get() ||
2431  &rBtn == m_xBtnTexColor.get() )
2432  {
2433  m_xBtnTexLuminance->set_active( &rBtn == m_xBtnTexLuminance.get() );
2434  m_xBtnTexColor->set_active( &rBtn == m_xBtnTexColor.get() );
2435  bUpdatePreview = true;
2436  }
2437  else if( &rBtn == m_xBtnTexReplace.get() ||
2438  &rBtn == m_xBtnTexModulate.get() )
2439  {
2440  m_xBtnTexReplace->set_active( &rBtn == m_xBtnTexReplace.get() );
2441  m_xBtnTexModulate->set_active( &rBtn == m_xBtnTexModulate.get() );
2442  bUpdatePreview = true;
2443  }
2444  else if( &rBtn == m_xBtnTexParallelX.get() ||
2445  &rBtn == m_xBtnTexCircleX.get() ||
2446  &rBtn == m_xBtnTexObjectX.get() )
2447  {
2448  m_xBtnTexParallelX->set_active( &rBtn == m_xBtnTexParallelX.get() );
2449  m_xBtnTexCircleX->set_active( &rBtn == m_xBtnTexCircleX.get() );
2450  m_xBtnTexObjectX->set_active( &rBtn == m_xBtnTexObjectX.get() );
2451  bUpdatePreview = true;
2452  }
2453  else if( &rBtn == m_xBtnTexParallelY.get() ||
2454  &rBtn == m_xBtnTexCircleY.get() ||
2455  &rBtn == m_xBtnTexObjectY.get() )
2456  {
2457  m_xBtnTexParallelY->set_active( &rBtn == m_xBtnTexParallelY.get() );
2458  m_xBtnTexCircleY->set_active( &rBtn == m_xBtnTexCircleY.get() );
2459  m_xBtnTexObjectY->set_active( &rBtn == m_xBtnTexObjectY.get() );
2460  bUpdatePreview = true;
2461  }
2462  else if (&rBtn == m_xBtnShadow3d.get())
2463  {
2464  m_xFtSlant->set_sensitive( m_xBtnShadow3d->get_active() );
2465  m_xMtrSlant->set_sensitive( m_xBtnShadow3d->get_active() );
2466  bUpdatePreview = true;
2467  }
2468  // Other (no groups)
2469  else
2470  {
2471  bUpdatePreview = true;
2472  }
2473 
2474  if( nSId > 0 )
2475  {
2476  SfxDispatcher* pDispatcher = LocalGetDispatcher(pBindings);
2477  if (pDispatcher != nullptr)
2478  {
2479  SfxBoolItem aItem( nSId, true );
2480  pDispatcher->ExecuteList(nSId,
2481  SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, { &aItem });
2482  }
2483  }
2484  else if( bUpdatePreview )
2485  UpdatePreview();
2486 }
2487 
2488 IMPL_LINK( Svx3DWin, ClickColorHdl, weld::Button&, rBtn, void)
2489 {
2490  SvColorDialog aColorDlg;
2491  ColorListBox* pLb;
2492 
2493  if( &rBtn == m_xBtnLightColor.get() )
2494  pLb = GetCLbByButton();
2495  else if( &rBtn == m_xBtnAmbientColor.get() )
2496  pLb = m_xLbAmbientlight.get();
2497  else if( &rBtn == m_xBtnMatColor.get() )
2498  pLb = m_xLbMatColor.get();
2499  else if( &rBtn == m_xBtnEmissionColor.get() )
2500  pLb = m_xLbMatEmission.get();
2501  else // if( &rBtn == m_xBtnSpecularColor.get() )
2502  pLb = m_xLbMatSpecular.get();
2503 
2504  Color aColor = pLb->GetSelectEntryColor();
2505 
2506  aColorDlg.SetColor( aColor );
2507  if( aColorDlg.Execute(GetFrameWeld()) == RET_OK )
2508  {
2509  aColor = aColorDlg.GetColor();
2510  LBSelectColor(pLb, aColor);
2511  SelectColorHdl(*pLb);
2512  }
2513 }
2514 
2515 IMPL_LINK( Svx3DWin, SelectHdl, weld::ComboBox&, rListBox, void )
2516 {
2517  bool bUpdatePreview = false;
2518 
2519  // Material
2520  if (&rListBox == m_xLbMatFavorites.get())
2521  {
2522  Color aColObj( COL_WHITE );
2523  Color aColEmis( COL_BLACK );
2524  Color aColSpec( COL_WHITE );
2525  sal_uInt16 nSpecIntens = 20;
2526 
2527  switch( m_xLbMatFavorites->get_active() )
2528  {
2529  case 1: // Metall
2530  {
2531  aColObj = Color(230,230,255);
2532  aColEmis = Color(10,10,30);
2533  aColSpec = Color(200,200,200);
2534  nSpecIntens = 20;
2535  }
2536  break;
2537 
2538  case 2: // Gold
2539  {
2540  aColObj = Color(230,255,0);
2541  aColEmis = Color(51,0,0);
2542  aColSpec = Color(255,255,240);
2543  nSpecIntens = 20;
2544  }
2545  break;
2546 
2547  case 3: // Chrome
2548  {
2549  aColObj = Color(36,117,153);
2550  aColEmis = Color(18,30,51);
2551  aColSpec = Color(230,230,255);
2552  nSpecIntens = 2;
2553  }
2554  break;
2555 
2556  case 4: // Plastic
2557  {
2558  aColObj = Color(255,48,57);
2559  aColEmis = Color(35,0,0);
2560  aColSpec = Color(179,202,204);
2561  nSpecIntens = 60;
2562  }
2563  break;
2564 
2565  case 5: // Wood
2566  {
2567  aColObj = Color(153,71,1);
2568  aColEmis = Color(21,22,0);
2569  aColSpec = Color(255,255,153);
2570  nSpecIntens = 75;
2571  }
2572  break;
2573  }
2574  LBSelectColor( m_xLbMatColor.get(), aColObj );
2575  LBSelectColor( m_xLbMatEmission.get(), aColEmis );
2576  LBSelectColor( m_xLbMatSpecular.get(), aColSpec );
2577  m_xMtrMatSpecularIntensity->set_value(nSpecIntens, FieldUnit::PERCENT);
2578 
2579  bUpdatePreview = true;
2580  }
2581  else if (&rListBox == m_xLbShademode.get())
2582  bUpdatePreview = true;
2583 
2584  if( bUpdatePreview )
2585  UpdatePreview();
2586 }
2587 
2588 IMPL_LINK( Svx3DWin, SelectColorHdl, ColorListBox&, rListBox, void )
2589 {
2590  bool bUpdatePreview = false;
2591 
2592  if( &rListBox == m_xLbMatColor.get() ||
2593  &rListBox == m_xLbMatEmission.get() ||
2594  &rListBox == m_xLbMatSpecular.get() )
2595  {
2596  m_xLbMatFavorites->set_active( 0 );
2597  bUpdatePreview = true;
2598  }
2599  // Lighting
2600  else if( &rListBox == m_xLbAmbientlight.get() )
2601  {
2602  bUpdatePreview = true;
2603  }
2604  else if( &rListBox == m_xLbLight1.get() ||
2605  &rListBox == m_xLbLight2.get() ||
2606  &rListBox == m_xLbLight3.get() ||
2607  &rListBox == m_xLbLight4.get() ||
2608  &rListBox == m_xLbLight5.get() ||
2609  &rListBox == m_xLbLight6.get() ||
2610  &rListBox == m_xLbLight7.get() ||
2611  &rListBox == m_xLbLight8.get() )
2612  {
2613  bUpdatePreview = true;
2614  }
2615 
2616  if( bUpdatePreview )
2617  UpdatePreview();
2618 }
2619 
2621 {
2622  UpdatePreview();
2623 }
2624 
2625 IMPL_LINK_NOARG( Svx3DWin, ModifySpinHdl, weld::SpinButton&, void )
2626 {
2627  UpdatePreview();
2628 }
2629 
2631 {
2632  sal_uInt16 nLightSource = GetLightSource( &rBtn );
2633  ColorListBox* pLb = GetCLbByButton( &rBtn );
2634  Color aColor( pLb->GetSelectEntryColor() );
2635  SfxItemSet aLightItemSet(m_xCtlLightPreview->GetSvx3DLightControl().Get3DAttributes());
2636  const bool bOnOff(rBtn.isLightOn());
2637 
2638  switch(nLightSource)
2639  {
2640  case 0: aLightItemSet.Put(makeSvx3DLightcolor1Item(aColor)); aLightItemSet.Put(makeSvx3DLightOnOff1Item(bOnOff)); break;
2641  case 1: aLightItemSet.Put(makeSvx3DLightcolor2Item(aColor)); aLightItemSet.Put(makeSvx3DLightOnOff2Item(bOnOff)); break;
2642  case 2: aLightItemSet.Put(makeSvx3DLightcolor3Item(aColor)); aLightItemSet.Put(makeSvx3DLightOnOff3Item(bOnOff)); break;
2643  case 3: aLightItemSet.Put(makeSvx3DLightcolor4Item(aColor)); aLightItemSet.Put(makeSvx3DLightOnOff4Item(bOnOff)); break;
2644  case 4: aLightItemSet.Put(makeSvx3DLightcolor5Item(aColor)); aLightItemSet.Put(makeSvx3DLightOnOff5Item(bOnOff)); break;
2645  case 5: aLightItemSet.Put(makeSvx3DLightcolor6Item(aColor)); aLightItemSet.Put(makeSvx3DLightOnOff6Item(bOnOff)); break;
2646  case 6: aLightItemSet.Put(makeSvx3DLightcolor7Item(aColor)); aLightItemSet.Put(makeSvx3DLightOnOff7Item(bOnOff)); break;
2647  default:
2648  case 7: aLightItemSet.Put(makeSvx3DLightcolor8Item(aColor)); aLightItemSet.Put(makeSvx3DLightOnOff8Item(bOnOff)); break;
2649  }
2650 
2651  m_xCtlLightPreview->GetSvx3DLightControl().Set3DAttributes(aLightItemSet);
2652  m_xCtlLightPreview->GetSvx3DLightControl().SelectLight(nLightSource);
2653  m_xCtlLightPreview->CheckSelection();
2654 }
2655 
2656 IMPL_LINK_NOARG(Svx3DWin, ChangeSelectionCallbackHdl, SvxLightCtl3D*, void)
2657 {
2658  const sal_uInt32 nLight(m_xCtlLightPreview->GetSvx3DLightControl().GetSelectedLight());
2659  weld::Button* pBtn = nullptr;
2660 
2661  switch( nLight )
2662  {
2663  case 0: pBtn = m_xBtnLight1->get_widget(); break;
2664  case 1: pBtn = m_xBtnLight2->get_widget(); break;
2665  case 2: pBtn = m_xBtnLight3->get_widget(); break;
2666  case 3: pBtn = m_xBtnLight4->get_widget(); break;
2667  case 4: pBtn = m_xBtnLight5->get_widget(); break;
2668  case 5: pBtn = m_xBtnLight6->get_widget(); break;
2669  case 6: pBtn = m_xBtnLight7->get_widget(); break;
2670  case 7: pBtn = m_xBtnLight8->get_widget(); break;
2671  default: break;
2672  }
2673 
2674  if (pBtn)
2675  ClickHdl(*pBtn);
2676  else
2677  {
2678  // Status: No lamp selected
2679  if( m_xBtnLight1->get_active() )
2680  {
2681  m_xBtnLight1->set_active( false );
2682  m_xLbLight1->set_sensitive( false );
2683  }
2684  else if( m_xBtnLight2->get_active() )
2685  {
2686  m_xBtnLight2->set_active( false );
2687  m_xLbLight2->set_sensitive( false );
2688  }
2689  else if( m_xBtnLight3->get_active() )
2690  {
2691  m_xBtnLight3->set_active( false );
2692  m_xLbLight3->set_sensitive( false );
2693  }
2694  else if( m_xBtnLight4->get_active() )
2695  {
2696  m_xBtnLight4->set_active( false );
2697  m_xLbLight4->set_sensitive( false );
2698  }
2699  else if( m_xBtnLight5->get_active() )
2700  {
2701  m_xBtnLight5->set_active( false );
2702  m_xLbLight5->set_sensitive( false );
2703  }
2704  else if( m_xBtnLight6->get_active() )
2705  {
2706  m_xBtnLight6->set_active( false );
2707  m_xLbLight6->set_sensitive( false );
2708  }
2709  else if( m_xBtnLight7->get_active() )
2710  {
2711  m_xBtnLight7->set_active( false );
2712  m_xLbLight7->set_sensitive( false );
2713  }
2714  else if( m_xBtnLight8->get_active() )
2715  {
2716  m_xBtnLight8->set_active( false );
2717  m_xLbLight8->set_sensitive( false );
2718  }
2719  m_xBtnLightColor->set_sensitive( false );
2720  }
2721 }
2722 
2723 namespace
2724 {
2725  OUString lcl_makeColorName(const Color& rColor)
2726  {
2727  OUString aStr = SvxResId(RID_SVXFLOAT3D_FIX_R) +
2728  OUString::number(rColor.GetRed()) +
2729  " " +
2730  SvxResId(RID_SVXFLOAT3D_FIX_G) +
2731  OUString::number(rColor.GetGreen()) +
2732  " " +
2733  SvxResId(RID_SVXFLOAT3D_FIX_B) +
2734  OUString::number(rColor.GetBlue());
2735  return aStr;
2736  }
2737 }
2738 
2739 // Method to ensure that the LB is also associated with a color
2740 void Svx3DWin::LBSelectColor( ColorListBox* pLb, const Color& rColor )
2741 {
2742  pLb->SetNoSelection();
2743  pLb->SelectEntry(std::make_pair(rColor, lcl_makeColorName(rColor)));
2744 }
2745 
2747 {
2748  if(!pModel)
2749  {
2750  pModel.reset(new FmFormModel());
2751  }
2752 
2753  // Get Itemset
2754  SfxItemSet aSet( pModel->GetItemPool(), svl::Items<SDRATTR_START, SDRATTR_END>{});
2755 
2756  // Get Attributes and set the preview
2757  GetAttr( aSet );
2758  m_xCtlPreview->Set3DAttributes( aSet );
2759  m_xCtlLightPreview->GetSvx3DLightControl().Set3DAttributes( aSet );
2760 }
2761 
2762 
2763 // document is to be reloaded, destroy remembered ItemSet
2765 {
2766  mpRemember2DAttributes.reset();
2767 }
2768 
2770 {
2771  // First...
2772  Color aColWhite( COL_WHITE );
2773  Color aColBlack( COL_BLACK );
2774  m_xLbLight1->SelectEntry( aColWhite );
2775  m_xLbLight2->SelectEntry( aColWhite );
2776  m_xLbLight3->SelectEntry( aColWhite );
2777  m_xLbLight4->SelectEntry( aColWhite );
2778  m_xLbLight5->SelectEntry( aColWhite );
2779  m_xLbLight6->SelectEntry( aColWhite );
2780  m_xLbLight7->SelectEntry( aColWhite );
2781  m_xLbLight8->SelectEntry( aColWhite );
2782  m_xLbAmbientlight->SelectEntry( aColBlack );
2783  m_xLbMatColor->SelectEntry( aColWhite );
2784  m_xLbMatEmission->SelectEntry( aColBlack );
2785  m_xLbMatSpecular->SelectEntry( aColWhite );
2786 }
2787 
2788 sal_uInt16 Svx3DWin::GetLightSource( const LightButton* pBtn )
2789 {
2790  sal_uInt16 nLight = 8;
2791 
2792  if (pBtn == m_xBtnLight1.get())
2793  nLight = 0;
2794  else if (pBtn == m_xBtnLight2.get())
2795  nLight = 1;
2796  else if( pBtn == m_xBtnLight3.get() )
2797  nLight = 2;
2798  else if( pBtn == m_xBtnLight4.get() )
2799  nLight = 3;
2800  else if( pBtn == m_xBtnLight5.get() )
2801  nLight = 4;
2802  else if( pBtn == m_xBtnLight6.get() )
2803  nLight = 5;
2804  else if( pBtn == m_xBtnLight7.get() )
2805  nLight = 6;
2806  else if( pBtn == m_xBtnLight8.get() )
2807  nLight = 7;
2808 
2809  return nLight;
2810 };
2811 
2813 {
2814  ColorListBox* pLb = nullptr;
2815 
2816  if( pBtn == nullptr )
2817  {
2818  if( m_xBtnLight1->get_active() )
2819  pLb = m_xLbLight1.get();
2820  else if( m_xBtnLight2->get_active() )
2821  pLb = m_xLbLight2.get();
2822  else if( m_xBtnLight3->get_active() )
2823  pLb = m_xLbLight3.get();
2824  else if( m_xBtnLight4->get_active() )
2825  pLb = m_xLbLight4.get();
2826  else if( m_xBtnLight5->get_active() )
2827  pLb = m_xLbLight5.get();
2828  else if( m_xBtnLight6->get_active() )
2829  pLb = m_xLbLight6.get();
2830  else if( m_xBtnLight7->get_active() )
2831  pLb = m_xLbLight7.get();
2832  else if( m_xBtnLight8->get_active() )
2833  pLb = m_xLbLight8.get();
2834  }
2835  else
2836  {
2837  if( pBtn == m_xBtnLight1.get() )
2838  pLb = m_xLbLight1.get();
2839  else if (pBtn == m_xBtnLight2.get())
2840  pLb = m_xLbLight2.get();
2841  else if( pBtn == m_xBtnLight3.get() )
2842  pLb = m_xLbLight3.get();
2843  else if( pBtn == m_xBtnLight4.get() )
2844  pLb = m_xLbLight4.get();
2845  else if( pBtn == m_xBtnLight5.get() )
2846  pLb = m_xLbLight5.get();
2847  else if( pBtn == m_xBtnLight6.get() )
2848  pLb = m_xLbLight6.get();
2849  else if( pBtn == m_xBtnLight7.get() )
2850  pLb = m_xLbLight7.get();
2851  else if( pBtn == m_xBtnLight8.get() )
2852  pLb = m_xLbLight8.get();
2853  }
2854  return pLb;
2855 };
2856 
2858 {
2859  LightButton* pLb = nullptr;
2860 
2861  if( pBtn == m_xBtnLight1->get_widget() )
2862  pLb = m_xBtnLight1.get();
2863  else if (pBtn == m_xBtnLight2->get_widget() )
2864  pLb = m_xBtnLight2.get();
2865  else if( pBtn == m_xBtnLight3->get_widget() )
2866  pLb = m_xBtnLight3.get();
2867  else if( pBtn == m_xBtnLight4->get_widget() )
2868  pLb = m_xBtnLight4.get();
2869  else if( pBtn == m_xBtnLight5->get_widget() )
2870  pLb = m_xBtnLight5.get();
2871  else if( pBtn == m_xBtnLight6->get_widget() )
2872  pLb = m_xBtnLight6.get();
2873  else if( pBtn == m_xBtnLight7->get_widget() )
2874  pLb = m_xBtnLight7.get();
2875  else if( pBtn == m_xBtnLight8->get_widget() )
2876  pLb = m_xBtnLight8.get();
2877 
2878  return pLb;
2879 };
2880 
2881 // Derivation from SfxChildWindow as "containers" for effects
2883  sal_uInt16 nId,
2884  SfxBindings* pBindings,
2885  SfxChildWinInfo* pInfo ) :
2886  SfxChildWindow( _pParent, nId )
2887 {
2888  VclPtr<Svx3DWin> pWin = VclPtr<Svx3DWin>::Create( pBindings, this, _pParent );
2889  SetWindow(pWin);
2890 
2891  pWin->Initialize( pInfo );
2892 }
2893 
2895  SfxBindings* _pBindings) :
2896  SfxControllerItem( _nId, *_pBindings )
2897 {
2898 }
2899 
2900 
2901 void Svx3DCtrlItem::StateChanged( sal_uInt16 /*nSId*/,
2902  SfxItemState /*eState*/, const SfxPoolItem* /*pItem*/ )
2903 {
2904 }
2905 
2906 // ControllerItem for Status Slot SID_CONVERT_TO_3D
2907 
2909 : SfxControllerItem(_nId, *_pBindings),
2910  bState(false)
2911 {
2912 }
2913 
2914 void SvxConvertTo3DItem::StateChanged(sal_uInt16 /*_nId*/, SfxItemState eState, const SfxPoolItem* /*pState*/)
2915 {
2916  bool bNewState = (eState != SfxItemState::DISABLED);
2917  if(bNewState != bState)
2918  {
2919  bState = bNewState;
2920  SfxDispatcher* pDispatcher = LocalGetDispatcher(&GetBindings());
2921  if (pDispatcher != nullptr)
2922  {
2923  SfxBoolItem aItem( SID_3D_STATE, true );
2924  pDispatcher->ExecuteList(SID_3D_STATE,
2925  SfxCallMode::ASYNCHRON|SfxCallMode::RECORD, { &aItem });
2926  }
2927  }
2928 }
2929 
2930 LightButton::LightButton(std::unique_ptr<weld::ToggleButton> xButton)
2931  : m_xButton(std::move(xButton))
2932  , m_bLightOn(false)
2933  , m_bButtonPrevActive(false)
2934 {
2935  m_xButton->set_from_icon_name(RID_SVXBMP_LAMP_OFF);
2936 }
2937 
2939 {
2940  if (m_bLightOn == bOn)
2941  return;
2942  m_bLightOn = bOn;
2943  if (m_bLightOn)
2944  m_xButton->set_from_icon_name(RID_SVXBMP_LAMP_ON);
2945  else
2946  m_xButton->set_from_icon_name(RID_SVXBMP_LAMP_OFF);
2947 }
2948 
2949 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< SfxItemSet > mpRemember2DAttributes
Definition: float3d.hxx:213
SvxColorItem makeSvx3DLightcolor7Item(const Color &rCol)
Definition: svx3ditems.hxx:191
bool m_bLightOn
Definition: float3d.hxx:74
void SetFieldUnit(weld::MetricSpinButton &rField, FieldUnit eUnit, bool bAll)
std::unique_ptr< weld::ToggleButton > m_xBtnTexModulate
Definition: float3d.hxx:155
std::unique_ptr< weld::Container > m_xFLShadow
Definition: float3d.hxx:119
const SfxPoolItem * ExecuteList(sal_uInt16 nSlot, SfxCallMode nCall, std::initializer_list< SfxPoolItem const * > args, std::initializer_list< SfxPoolItem const * > internalargs=std::initializer_list< SfxPoolItem const * >())
std::unique_ptr< weld::ToggleButton > m_xBtnTexFilter
Definition: float3d.hxx:163
constexpr TypedWhichId< SfxBoolItem > SDRATTR_3DSCENE_LIGHTON_4(SDRATTR_3DSCENE_FIRST+16)
FieldUnit
SfxBoolItem makeSvx3DLightOnOff2Item(bool bVal)
Definition: svx3ditems.hxx:207
SfxBoolItem makeSvx3DDoubleSidedItem(bool bVal)
Definition: svx3ditems.hxx:58
constexpr TypedWhichId< SvxB3DVectorItem > SDRATTR_3DSCENE_LIGHTDIRECTION_5(SDRATTR_3DSCENE_FIRST+25)
constexpr TypedWhichId< Svx3DTextureKindItem > SDRATTR_3DOBJ_TEXTURE_KIND(SDRATTR_3DOBJ_FIRST+16)
SVX_DLLPRIVATE ColorListBox * GetCLbByButton(const LightButton *pBtn=nullptr)
Definition: float3d.cxx:2812
constexpr TypedWhichId< Svx3DTextureProjectionXItem > SDRATTR_3DOBJ_TEXTURE_PROJ_X(SDRATTR_3DOBJ_FIRST+9)
sal_uInt8 GetRed() const
constexpr TypedWhichId< SvxColorItem > SDRATTR_3DOBJ_MAT_SPECULAR(SDRATTR_3DOBJ_FIRST+14)
std::unique_ptr< weld::ToggleButton > m_xBtnUpdate
Definition: float3d.hxx:89
IMPL_LINK_NOARG(Svx3DWin, ClickUpdateHdl, weld::ToggleButton &, void)
Definition: float3d.cxx:2202
Svx3DWin(SfxBindings *pBindings, SfxChildWindow *pCW, vcl::Window *pParent)
Definition: float3d.cxx:84
void SetMinOutputSizePixel(const Size &rSize)
constexpr TypedWhichId< SfxUInt32Item > SDRATTR_3DOBJ_VERT_SEGS(SDRATTR_3DOBJ_FIRST+4)
std::unique_ptr< LightButton > m_xBtnLight6
Definition: float3d.hxx:135
std::unique_ptr< weld::ToggleButton > m_xBtnShadow3d
Definition: float3d.hxx:120
constexpr TypedWhichId< SvxB3DVectorItem > SDRATTR_3DSCENE_LIGHTDIRECTION_2(SDRATTR_3DSCENE_FIRST+22)
constexpr TypedWhichId< SfxBoolItem > SDRATTR_3DOBJ_NORMALS_INVERT(SDRATTR_3DOBJ_FIRST+8)
std::unique_ptr< weld::Container > m_xFLNormals
Definition: float3d.hxx:107
virtual void StateChanged(sal_uInt16 nSId, SfxItemState eState, const SfxPoolItem *pState) override
Definition: float3d.cxx:2901
std::string GetValue
std::unique_ptr< weld::ToggleButton > m_xBtnNormalsSphere
Definition: float3d.hxx:110
constexpr TypedWhichId< SvxColorItem > SDRATTR_3DSCENE_LIGHTCOLOR_5(SDRATTR_3DSCENE_FIRST+8)
ProjectionType
Definition: viewpt3d.hxx:38
std::unique_ptr< weld::ToggleButton > m_xBtnMaterial
Definition: float3d.hxx:88
std::unique_ptr< weld::Label > m_xFtBackscale
Definition: float3d.hxx:96
SfxDispatcher * GetDispatcher()
std::unique_ptr< weld::SpinButton > m_xNumVertical
Definition: float3d.hxx:105
constexpr TypedWhichId< XFillStyleItem > XATTR_FILLSTYLE(XATTR_FILL_FIRST)
virtual void StateChanged(sal_uInt16 nSId, SfxItemState eState, const SfxPoolItem *pState) override
Definition: float3d.cxx:2914
std::unique_ptr< weld::Label > m_xFtEndAngle
Definition: float3d.hxx:98
std::unique_ptr< FmFormModel > pModel
Definition: float3d.hxx:200
constexpr OUStringLiteral PERCENT(u"Percent")
void InvalidateItem(sal_uInt16 nWhich)
std::unique_ptr< weld::ToggleButton > m_xBtnTexBlend
Definition: float3d.hxx:156
constexpr TypedWhichId< SfxUInt16Item > SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY(SDRATTR_3DOBJ_FIRST+15)
sal_uInt16 FirstWhich()
std::unique_ptr< weld::ToggleButton > m_xBtnDoubleSided
Definition: float3d.hxx:113
void set_prev_active(bool bPrevActive)
Definition: float3d.hxx:70
constexpr TypedWhichId< SfxBoolItem > SDRATTR_3DOBJ_DOUBLE_SIDED(SDRATTR_3DOBJ_FIRST+6)
std::unique_ptr< ColorListBox > m_xLbAmbientlight
Definition: float3d.hxx:147
void SetWindow(const VclPtr< vcl::Window > &p)
constexpr TypedWhichId< XLineStyleItem > XATTR_LINESTYLE(XATTR_LINE_FIRST)
constexpr TypedWhichId< SfxUInt32Item > SDRATTR_3DOBJ_DEPTH(SDRATTR_3DOBJ_FIRST+2)
std::unique_ptr< weld::ToggleButton > m_xBtnLight
Definition: float3d.hxx:86
std::unique_ptr< weld::Button > m_xBtn_Corner
Definition: float3d.hxx:185
SVX_DLLPRIVATE void Construct()
Definition: float3d.cxx:440
SvxColorItem makeSvx3DLightcolor2Item(const Color &rCol)
Definition: svx3ditems.hxx:171
SfxUInt32Item makeSvx3DVerticalSegmentsItem(sal_uInt32 nVal)
Definition: svx3ditems.hxx:50
void ClickLight(const LightButton &rBtn)
Definition: float3d.cxx:2630
constexpr TypedWhichId< SfxBoolItem > SDRATTR_3DSCENE_LIGHTON_7(SDRATTR_3DSCENE_FIRST+19)
static SVX_DLLPRIVATE void LBSelectColor(ColorListBox *pLb, const Color &rColor)
Definition: float3d.cxx:2740
std::unique_ptr< ColorListBox > m_xLbMatSpecular
Definition: float3d.hxx:175
void InitColorLB()
Definition: float3d.cxx:2769
SfxUInt16Item makeSvx3DMaterialSpecularIntensityItem(sal_uInt16 nVal)
Definition: svx3ditems.hxx:116
TRISTATE_TRUE
class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DNormalsKindItem SfxBoolItem makeSvx3DNormalsInvertItem(bool bVal)
Definition: svx3ditems.hxx:80
constexpr TypedWhichId< SfxBoolItem > SDRATTR_3DSCENE_LIGHTON_2(SDRATTR_3DSCENE_FIRST+14)
constexpr sal_uInt16 SDRATTR_START(XATTR_START)
std::unique_ptr< weld::MetricSpinButton > m_xMtrPercentDiagonal
Definition: float3d.hxx:95
sal_uInt16 NextWhich()
constexpr TypedWhichId< Svx3DTextureModeItem > SDRATTR_3DOBJ_TEXTURE_MODE(SDRATTR_3DOBJ_FIRST+17)
Svx3DCtrlItem(sal_uInt16, SfxBindings *)
Definition: float3d.cxx:2894
std::unique_ptr< weld::Button > m_xBtnAssign
Definition: float3d.hxx:90
FieldUnit GetModuleFieldUnit(const SfxItemSet &rSet)
Definition: dlgutil.cxx:31
std::unique_ptr< weld::Label > m_xFtDepth
Definition: float3d.hxx:100
SfxBoolItem makeSvx3DLightOnOff7Item(bool bVal)
Definition: svx3ditems.hxx:227
SfxUInt16Item makeSvx3DPercentDiagonalItem(sal_uInt16 nVal)
Definition: svx3ditems.hxx:34
constexpr TypedWhichId< SfxUInt32Item > SDRATTR_3DSCENE_DISTANCE(SDRATTR_3DSCENE_FIRST+1)
SfxModule * GetModule() const
constexpr TypedWhichId< SfxUInt16Item > SDRATTR_3DSCENE_SHADOW_SLANT(SDRATTR_3DSCENE_FIRST+29)
void SetNoSelection()
Definition: colorbox.hxx:70
constexpr TypedWhichId< SvxColorItem > SDRATTR_3DSCENE_LIGHTCOLOR_3(SDRATTR_3DSCENE_FIRST+6)
friend class Svx3DCtrlItem
Definition: float3d.hxx:81
std::unique_ptr< weld::MetricSpinButton > m_xMtrDistance
Definition: float3d.hxx:125
std::unique_ptr< weld::ToggleButton > m_xBtnTexCircleY
Definition: float3d.hxx:162
OUString SvxResId(const char *pId)
Definition: dialmgr.cxx:28
short Execute(weld::Window *pParent)
std::unique_ptr< weld::Container > m_xFLSegments
Definition: float3d.hxx:103
SVX_DLLPRIVATE sal_uInt16 GetLightSource(const LightButton *pBtn)
Definition: float3d.cxx:2788
std::unique_ptr< weld::ToggleButton > m_xBtnTwoSidedLighting
Definition: float3d.hxx:112
SfxBoolItem makeSvx3DLightOnOff1Item(bool bVal)
Definition: svx3ditems.hxx:203
class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DTextureKindItem final class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DTextureModeItem final SfxBoolItem makeSvx3DTextureFilterItem(bool bVal)
Definition: svx3ditems.hxx:140
constexpr TypedWhichId< SvxB3DVectorItem > SDRATTR_3DSCENE_LIGHTDIRECTION_7(SDRATTR_3DSCENE_FIRST+27)
std::unique_ptr< Svx3DWinImpl > mpImpl
Definition: float3d.hxx:208
std::unique_ptr< weld::Button > m_xBtnAmbientColor
Definition: float3d.hxx:148
constexpr TypedWhichId< SvxB3DVectorItem > SDRATTR_3DSCENE_LIGHTDIRECTION_6(SDRATTR_3DSCENE_FIRST+26)
SfxItemPool * pPool
Definition: float3d.cxx:60
bool isLightOn() const
Definition: float3d.hxx:54
constexpr TypedWhichId< SfxBoolItem > SDRATTR_3DSCENE_LIGHTON_6(SDRATTR_3DSCENE_FIRST+18)
std::unique_ptr< weld::ToggleButton > m_xButton
Definition: float3d.hxx:73
Svx3DChildWindow(vcl::Window *, sal_uInt16, SfxBindings *, SfxChildWinInfo *)
Definition: float3d.cxx:2882
std::unique_ptr< weld::Button > m_xBtnConvertTo3D
Definition: float3d.hxx:191
virtual OutputDevice & get_ref_device()=0
constexpr TypedWhichId< SfxBoolItem > SDRATTR_3DSCENE_LIGHTON_1(SDRATTR_3DSCENE_FIRST+13)
constexpr TypedWhichId< SdrOnOffItem > SDRATTR_SHADOW(SDRATTR_SHADOW_FIRST+0)
constexpr TypedWhichId< SvxColorItem > SDRATTR_3DSCENE_LIGHTCOLOR_1(SDRATTR_3DSCENE_FIRST+4)
std::unique_ptr< weld::ToggleButton > m_xBtnTexObjectY
Definition: float3d.hxx:160
sal_uInt8 GetBlue() const
TRISTATE_INDET
bool get_active() const
Definition: float3d.hxx:56
SvxColorItem makeSvx3DMaterialSpecularItem(const Color &rCol)
Definition: svx3ditems.hxx:112
constexpr TypedWhichId< SfxUInt32Item > SDRATTR_3DOBJ_HORZ_SEGS(SDRATTR_3DOBJ_FIRST+3)
std::unique_ptr< weld::CustomWeld > m_xCtlLightPreviewWin
Definition: float3d.hxx:187
std::unique_ptr< SvxConvertTo3DItem > pConvertTo3DLatheItem
Definition: float3d.hxx:206
void SetColor(const Color &rColor)
std::unique_ptr< weld::ToggleButton > m_xBtnPerspective
Definition: float3d.hxx:193
std::unique_ptr< weld::ToggleButton > m_xBtnTexCircleX
Definition: float3d.hxx:159
std::unique_ptr< ColorListBox > m_xLbLight3
Definition: float3d.hxx:140
constexpr TypedWhichId< SfxBoolItem > SDRATTR_3DOBJ_TEXTURE_FILTER(SDRATTR_3DOBJ_FIRST+18)
std::unique_ptr< weld::ToggleButton > m_xBtnTexParallelX
Definition: float3d.hxx:158
void SelectEntry(const NamedColor &rColor)
Definition: tbcontrl.cxx:3870
constexpr TypedWhichId< SfxBoolItem > SDRATTR_3DSCENE_LIGHTON_3(SDRATTR_3DSCENE_FIRST+15)
void set_active(bool bActive)
Definition: float3d.hxx:57
bool bUpdate
Definition: float3d.hxx:196
std::unique_ptr< ColorListBox > m_xLbMatEmission
Definition: float3d.hxx:171
std::unique_ptr< weld::MetricSpinButton > m_xMtrEndAngle
Definition: float3d.hxx:99
std::unique_ptr< Svx3DCtrlItem > pControllerItem
Definition: float3d.hxx:203
SfxUInt32Item makeSvx3DFocalLengthItem(sal_uInt32 nVal)
Definition: svx3ditems.hxx:159
SvxConvertTo3DItem(sal_uInt16 nId, SfxBindings *pBindings)
Definition: float3d.cxx:2908
FieldUnit GetFieldUnit() const
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
#define DBG_ASSERT(sCon, aError)
std::unique_ptr< LightButton > m_xBtnLight8
Definition: float3d.hxx:137
std::unique_ptr< LightButton > m_xBtnLight3
Definition: float3d.hxx:132
constexpr TypedWhichId< SvxColorItem > SDRATTR_3DSCENE_LIGHTCOLOR_7(SDRATTR_3DSCENE_FIRST+10)
constexpr TypedWhichId< SvxB3DVectorItem > SDRATTR_3DSCENE_LIGHTDIRECTION_1(SDRATTR_3DSCENE_FIRST+21)
std::unique_ptr< weld::Container > m_xFLMatSpecular
Definition: float3d.hxx:174
std::unique_ptr< weld::Container > m_xFLLight
Definition: float3d.hxx:129
constexpr TypedWhichId< SfxBoolItem > SDRATTR_3DSCENE_LIGHTON_5(SDRATTR_3DSCENE_FIRST+17)
class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DPerspectiveItem SfxUInt32Item makeSvx3DDistanceItem(sal_uInt32 nVal)
Definition: svx3ditems.hxx:155
constexpr TypedWhichId< SfxBoolItem > SDRATTR_3DSCENE_TWO_SIDED_LIGHTING(SDRATTR_3DSCENE_FIRST+3)
SVX_DLLPRIVATE LightButton * GetLbByButton(const weld::Button *pBtn)
Definition: float3d.cxx:2857
std::unique_ptr< weld::Label > m_xFtPercentDiagonal
Definition: float3d.hxx:94
std::unique_ptr< LightButton > m_xBtnLight2
Definition: float3d.hxx:131
std::unique_ptr< LightButton > m_xBtnLight4
Definition: float3d.hxx:133
int GetCoreValue(const weld::MetricSpinButton &rField, MapUnit eUnit)
ViewType3D
Definition: float3d.hxx:32
constexpr TypedWhichId< SvxColorItem > SDRATTR_3DSCENE_AMBIENTCOLOR(SDRATTR_3DSCENE_FIRST+12)
tools::Long Width() const
std::unique_ptr< LightButton > m_xBtnLight1
Definition: float3d.hxx:130
void UpdatePreview()
Definition: float3d.cxx:2746
std::unique_ptr< LightButton > m_xBtnLight7
Definition: float3d.hxx:136
constexpr TypedWhichId< SfxBoolItem > SDRATTR_3DSCENE_LIGHTON_8(SDRATTR_3DSCENE_FIRST+20)
std::unique_ptr< ColorListBox > m_xLbLight4
Definition: float3d.hxx:141
SfxUInt16Item makeSvx3DBackscaleItem(sal_uInt16 nVal)
Definition: svx3ditems.hxx:38
std::unique_ptr< ColorListBox > m_xLbLight5
Definition: float3d.hxx:142
SfxBindings & GetBindings()
constexpr sal_uInt16 SDRATTR_3D_LAST(SDRATTR_3DSCENE_LAST)
std::unique_ptr< weld::ToggleButton > m_xBtnGeo
Definition: float3d.hxx:84
const Size & GetMinOutputSizePixel() const
SVX_DLLPRIVATE void Reset()
Definition: float3d.cxx:447
std::unique_ptr< weld::ToggleButton > m_xBtnNormalsObj
Definition: float3d.hxx:108
std::unique_ptr< ColorListBox > m_xLbLight8
Definition: float3d.hxx:145
IMPL_LINK(Svx3DWin, ClickViewTypeHdl, weld::Button &, rBtn, void)
Definition: float3d.cxx:2233
constexpr TypedWhichId< SvxB3DVectorItem > SDRATTR_3DSCENE_LIGHTDIRECTION_8(SDRATTR_3DSCENE_FIRST+28)
virtual void Resize() override
Definition: float3d.cxx:2151
SfxUInt32Item makeSvx3DHorizontalSegmentsItem(sal_uInt32 nVal)
Definition: svx3ditems.hxx:46
constexpr TypedWhichId< Svx3DPerspectiveItem > SDRATTR_3DSCENE_PERSPECTIVE(SDRATTR_3DSCENE_FIRST+0)
std::unique_ptr< weld::MetricSpinButton > m_xMtrMatSpecularIntensity
Definition: float3d.hxx:177
virtual ~Svx3DWin() override
Definition: float3d.cxx:329
std::unique_ptr< ColorListBox > m_xLbLight7
Definition: float3d.hxx:144
void SetMetricValue(weld::MetricSpinButton &rField, int nCoreValue, MapUnit eUnit)
std::unique_ptr< weld::Container > m_xFLMaterial
Definition: float3d.hxx:167
SfxItemPool * GetPool() const
SvxColorItem makeSvx3DLightcolor1Item(const Color &rCol)
Definition: svx3ditems.hxx:167
const Color & GetColor() const
std::unique_ptr< weld::MetricSpinButton > m_xMtrSlant
Definition: float3d.hxx:122
std::unique_ptr< weld::ToggleButton > m_xBtnRepresentation
Definition: float3d.hxx:85
std::unique_ptr< ColorListBox > m_xLbMatColor
Definition: float3d.hxx:169
Point LogicToPixel(const Point &rLogicPt) const
std::unique_ptr< weld::ToggleButton > m_xBtnTexLuminance
Definition: float3d.hxx:152
sal_uInt8 GetGreen() const
bool get_prev_active() const
Definition: float3d.hxx:69
SfxUInt32Item makeSvx3DDepthItem(sal_uInt32 nVal)
Definition: svx3ditems.hxx:42
SvxColorItem makeSvx3DLightcolor4Item(const Color &rCol)
Definition: svx3ditems.hxx:179
void Update(SfxItemSet const &rSet)
Definition: float3d.cxx:462
SvxColorItem makeSvx3DLightcolor8Item(const Color &rCol)
Definition: svx3ditems.hxx:195
SvxColorItem makeSvx3DMaterialEmissionItem(const Color &rCol)
Definition: svx3ditems.hxx:108
std::unique_ptr< Svx3DPreviewControl > m_xCtlPreview
Definition: float3d.hxx:179
SvxColorItem makeSvx3DAmbientcolorItem(const Color &rCol)
Definition: svx3ditems.hxx:199
void GetAttr(SfxItemSet &rSet)
Definition: float3d.cxx:1644
LightButton(std::unique_ptr< weld::ToggleButton > xButton)
Definition: float3d.cxx:2930
virtual void dispose() override
Definition: float3d.cxx:334
constexpr TypedWhichId< XFillColorItem > XATTR_FILLCOLOR(XATTR_FILL_FIRST+1)
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
constexpr sal_uInt16 SDRATTR_SHADOW_LAST(SDRATTR_SHADOWBLUR)
std::unique_ptr< weld::MetricSpinButton > m_xMtrBackscale
Definition: float3d.hxx:97
std::unique_ptr< weld::MetricSpinButton > m_xMtrFocalLength
Definition: float3d.hxx:126
void Initialize(SfxChildWinInfo *pInfo)
std::unique_ptr< weld::ToggleButton > m_xBtnTexParallelY
Definition: float3d.hxx:161
std::unique_ptr< weld::Button > m_xBtnMatColor
Definition: float3d.hxx:170
void show()
Definition: colorbox.hxx:83
static SfxViewFrame * Current()
std::unique_ptr< weld::ComboBox > m_xLbShademode
Definition: float3d.hxx:117
Color const & GetSelectEntryColor() const
Definition: colorbox.hxx:64
SfxBoolItem makeSvx3DLightOnOff4Item(bool bVal)
Definition: svx3ditems.hxx:215
SfxItemState
std::unique_ptr< Svx3DLightControl > m_xLightPreview
Definition: float3d.hxx:186
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
constexpr TypedWhichId< SfxUInt32Item > SDRATTR_3DSCENE_FOCAL_LENGTH(SDRATTR_3DSCENE_FIRST+2)
std::unique_ptr< SvxConvertTo3DItem > pConvertTo3DItem
Definition: float3d.hxx:205
constexpr TypedWhichId< SfxUInt16Item > SDRATTR_3DOBJ_BACKSCALE(SDRATTR_3DOBJ_FIRST+1)
void DocumentReload()
Definition: float3d.cxx:2764
std::unique_ptr< weld::Scale > m_xVertScale
Definition: float3d.hxx:184
std::unique_ptr< weld::CustomWeld > m_xCtlPreviewWin
Definition: float3d.hxx:180
class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DTextureProjectionXItem class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DTextureProjectionYItem SfxBoolItem makeSvx3DShadow3DItem(bool bVal)
Definition: svx3ditems.hxx:104
std::unique_ptr< weld::Widget > m_xLightPreviewGrid
Definition: float3d.hxx:182
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_WHITE
SfxUInt32Item makeSvx3DEndAngleItem(sal_uInt32 nVal)
Definition: svx3ditems.hxx:54
RET_OK
SfxBoolItem makeSvx3DLightOnOff8Item(bool bVal)
Definition: svx3ditems.hxx:231
static VclPtr< reference_type > Create(Arg &&...arg)
std::unique_ptr< weld::Container > m_xFLRepresentation
Definition: float3d.hxx:116
constexpr TypedWhichId< SvxB3DVectorItem > SDRATTR_3DSCENE_LIGHTDIRECTION_3(SDRATTR_3DSCENE_FIRST+23)
std::unique_ptr< ColorListBox > m_xLbLight1
Definition: float3d.hxx:138
std::unique_ptr< weld::MetricSpinButton > m_xMtrDepth
Definition: float3d.hxx:101
SfxBindings * pBindings
Definition: float3d.hxx:202
SfxBoolItem makeSvx3DLightOnOff3Item(bool bVal)
Definition: svx3ditems.hxx:211
std::unique_ptr< weld::ToggleButton > m_xBtnTexObjectX
Definition: float3d.hxx:157
tools::Long Height() const
constexpr TypedWhichId< SfxUInt16Item > SDRATTR_3DOBJ_PERCENT_DIAGONAL(SDRATTR_3DOBJ_FIRST+0)
void set_sensitive(bool sensitive)
Definition: colorbox.hxx:81
constexpr TypedWhichId< SvxColorItem > SDRATTR_3DSCENE_LIGHTCOLOR_8(SDRATTR_3DSCENE_FIRST+11)
std::unique_ptr< weld::ToggleButton > m_xBtnTexColor
Definition: float3d.hxx:153
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_BLACK
SdrOnOffItem makeSdrShadowItem(bool bShadow)
Definition: sdshitm.hxx:25
constexpr TypedWhichId< SvxColorItem > SDRATTR_3DSCENE_LIGHTCOLOR_6(SDRATTR_3DSCENE_FIRST+9)
std::unique_ptr< weld::Label > m_xFtSlant
Definition: float3d.hxx:121
std::unique_ptr< weld::Button > m_xBtnLightColor
Definition: float3d.hxx:146
std::unique_ptr< weld::ToggleButton > m_xBtnNormalsFlat
Definition: float3d.hxx:109
std::unique_ptr< SvxLightCtl3D > m_xCtlLightPreview
Definition: float3d.hxx:188
std::unique_ptr< weld::Container > m_xFLGeometrie
Definition: float3d.hxx:93
std::unique_ptr< weld::ToggleButton > m_xBtnTexture
Definition: float3d.hxx:87
constexpr sal_uInt16 SDRATTR_3D_FIRST(SDRATTR_GRAF_LAST+1)
SfxBoolItem makeSvx3DTwoSidedLightingItem(bool bVal)
Definition: svx3ditems.hxx:163
std::unique_ptr< ColorListBox > m_xLbLight2
Definition: float3d.hxx:139
SfxDispatcher * GetDispatcher() const
SvxColorItem makeSvx3DLightcolor3Item(const Color &rCol)
Definition: svx3ditems.hxx:175
MapUnit
SfxBoolItem makeSvx3DLightOnOff5Item(bool bVal)
Definition: svx3ditems.hxx:219
MapUnit ePoolUnit
Definition: float3d.hxx:209
constexpr TypedWhichId< Svx3DShadeModeItem > SDRATTR_3DSCENE_SHADE_MODE(SDRATTR_3DSCENE_FIRST+30)
virtual void Resize() override
constexpr TypedWhichId< SfxUInt32Item > SDRATTR_3DOBJ_END_ANGLE(SDRATTR_3DOBJ_FIRST+5)
std::unique_ptr< weld::Button > m_xBtnEmissionColor
Definition: float3d.hxx:172
std::unique_ptr< weld::ToggleButton > m_xBtnTexReplace
Definition: float3d.hxx:154
std::unique_ptr< LightButton > m_xBtnLight5
Definition: float3d.hxx:134
SfxUInt16Item makeSvx3DShadowSlantItem(sal_uInt16 nVal)
Definition: svx3ditems.hxx:267
constexpr TypedWhichId< SvxColorItem > SDRATTR_3DSCENE_LIGHTCOLOR_2(SDRATTR_3DSCENE_FIRST+5)
SvxColorItem makeSvx3DLightcolor6Item(const Color &rCol)
Definition: svx3ditems.hxx:187
virtual void dispose() override
TriState
virtual void set_size_request(int nWidth, int nHeight)=0
constexpr TypedWhichId< Svx3DNormalsKindItem > SDRATTR_3DOBJ_NORMALS_KIND(SDRATTR_3DOBJ_FIRST+7)
void switchLightOn(bool bOn)
Definition: float3d.cxx:2938
sal_Int32 nState
std::unique_ptr< weld::SpinButton > m_xNumHorizontal
Definition: float3d.hxx:104
weld::Window * GetFrameWeld(const SfxFrame *pFrame)
std::unique_ptr< weld::Button > m_xBtnLatheObject
Definition: float3d.hxx:192
aStr
constexpr TypedWhichId< SvxColorItem > SDRATTR_3DOBJ_MAT_EMISSION(SDRATTR_3DOBJ_FIRST+13)
SvxColorItem makeSvx3DLightcolor5Item(const Color &rCol)
Definition: svx3ditems.hxx:183
std::unique_ptr< ColorListBox > m_xLbLight6
Definition: float3d.hxx:143
constexpr TypedWhichId< SvxColorItem > SDRATTR_3DSCENE_LIGHTCOLOR_4(SDRATTR_3DSCENE_FIRST+7)
SFX_IMPL_DOCKINGWINDOW_WITHID(SvxFontWorkChildWindow, SID_FONTWORK)
FieldUnit eFUnit
Definition: float3d.hxx:210
std::unique_ptr< weld::Scale > m_xHoriScale
Definition: float3d.hxx:183
SfxBoolItem makeSvx3DLightOnOff6Item(bool bVal)
Definition: svx3ditems.hxx:223
constexpr TypedWhichId< SvxB3DVectorItem > SDRATTR_3DSCENE_LIGHTDIRECTION_4(SDRATTR_3DSCENE_FIRST+24)
std::unique_ptr< weld::Container > m_xFLTexture
Definition: float3d.hxx:151
std::unique_ptr< weld::ComboBox > m_xLbMatFavorites
Definition: float3d.hxx:168
constexpr TypedWhichId< SfxBoolItem > SDRATTR_3DOBJ_SHADOW_3D(SDRATTR_3DOBJ_FIRST+11)
sal_Int16 nValue
Definition: fmsrccfg.cxx:81
std::unique_ptr< weld::ToggleButton > m_xBtnNormalsInvert
Definition: float3d.hxx:111
std::unique_ptr< weld::Container > m_xFLCamera
Definition: float3d.hxx:124
std::unique_ptr< weld::Button > m_xBtnSpecularColor
Definition: float3d.hxx:176
constexpr TypedWhichId< Svx3DTextureProjectionYItem > SDRATTR_3DOBJ_TEXTURE_PROJ_Y(SDRATTR_3DOBJ_FIRST+10)