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