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