LibreOffice Module svx (master) 1
dlgctl3d.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
21#include <svx/dlgctl3d.hxx>
22#include <svx/strings.hrc>
23#include <svx/view3d.hxx>
24#include <svx/fmmodel.hxx>
25#include <svl/itempool.hxx>
26#include <svx/fmpage.hxx>
27#include <svx/sphere3d.hxx>
28#include <svx/cube3d.hxx>
29#include <svx/scene3d.hxx>
30#include <vcl/svapp.hxx>
33#include <polygn3d.hxx>
34#include <svx/xfillit0.hxx>
35#include <svx/xflclit.hxx>
36#include <svx/xlineit0.hxx>
37#include <svx/xlnclit.hxx>
38#include <svx/xlnwtit.hxx>
39#include <helpids.h>
40#include <svx/dialmgr.hxx>
41#include <tools/helpers.hxx>
42#include <vcl/settings.hxx>
43
44using namespace com::sun::star;
45
47 : mnObjectType(SvxPreviewObjectType::SPHERE)
48{
49}
50
52{
53 Size aSize(pDrawingArea->get_ref_device().LogicToPixel(Size(80, 100), MapMode(MapUnit::MapAppFont)));
54 pDrawingArea->set_size_request(aSize.Width(), aSize.Height());
55 CustomWidgetController::SetDrawingArea(pDrawingArea);
56 SetOutputSizePixel(aSize);
57
58 Construct();
59}
60
62{
63 mp3DObj.clear();
64 mxFmPage.clear();
65 mpScene.clear();
66 mp3DView.reset();
67 mpModel.reset();
68}
69
71{
72 // Do never mirror the preview window. This explicitly includes right
73 // to left writing environments.
74 EnableRTL (false);
76 rDevice.SetMapMode(MapMode(MapUnit::Map100thMM));
77
78 // Model
79 mpModel.reset(new FmFormModel());
80 mpModel->GetItemPool().FreezeIdRanges();
81
82 // Page
83 mxFmPage = new FmFormPage( *mpModel );
84 mpModel->InsertPage( mxFmPage.get(), 0 );
85
86 // 3D View
87 mp3DView.reset(new E3dView(*mpModel, &rDevice));
88 mp3DView->SetBufferedOutputAllowed(true);
89 mp3DView->SetBufferedOverlayAllowed(true);
90
91 // 3D Scene
92 mpScene = new E3dScene(*mpModel);
93
94 // initially create object
96
97 // camera and perspective
98 Camera3D rCamera = mpScene->GetCamera();
99 const basegfx::B3DRange& rVolume = mpScene->GetBoundVolume();
100 double fW = rVolume.getWidth();
101 double fH = rVolume.getHeight();
102 double fCamZ = rVolume.getMaxZ() + ((fW + fH) / 2.0);
103
104 rCamera.SetAutoAdjustProjection(false);
105 rCamera.SetViewWindow(- fW / 2, - fH / 2, fW, fH);
106 basegfx::B3DPoint aLookAt;
107 double fDefaultCamPosZ = mp3DView->GetDefaultCamPosZ();
108 basegfx::B3DPoint aCamPos(0.0, 0.0, fCamZ < fDefaultCamPosZ ? fDefaultCamPosZ : fCamZ);
109 rCamera.SetPosAndLookAt(aCamPos, aLookAt);
110 double fDefaultCamFocal = mp3DView->GetDefaultCamFocal();
111 rCamera.SetFocalLength(fDefaultCamFocal);
112
113 mpScene->SetCamera( rCamera );
114 mxFmPage->InsertObject( mpScene.get() );
115
116 basegfx::B3DHomMatrix aRotation;
117 aRotation.rotate(basegfx::deg2rad( 25 ), 0.0, 0.0);
118 aRotation.rotate(0.0, basegfx::deg2rad( 40 ), 0.0);
119 mpScene->SetTransform(aRotation * mpScene->GetTransform());
120
121 // invalidate SnapRects of objects
122 mpScene->SetBoundAndSnapRectsDirty();
123
125 XATTR_FILL_FIRST, XATTR_FILLBITMAP> aSet( mpModel->GetItemPool() );
126 aSet.Put( XLineStyleItem( drawing::LineStyle_NONE ) );
127 aSet.Put( XFillStyleItem( drawing::FillStyle_SOLID ) );
128 aSet.Put( XFillColorItem( "", COL_WHITE ) );
129
130 mpScene->SetMergedItemSet(aSet);
131
132 // PageView
133 SdrPageView* pPageView = mp3DView->ShowSdrPage( mxFmPage.get() );
134 mp3DView->hideMarkHandles();
135
136 // mark scene
137 mp3DView->MarkObj( mpScene.get(), pPageView );
138}
139
141{
142 // size of page
143 Size aSize(GetOutputSizePixel());
144 aSize = GetDrawingArea()->get_ref_device().PixelToLogic(aSize);
145 mxFmPage->SetSize(aSize);
146
147 // set size
148 Size aObjSize( aSize.Width()*5/6, aSize.Height()*5/6 );
149 Point aObjPoint( (aSize.Width() - aObjSize.Width()) / 2,
150 (aSize.Height() - aObjSize.Height()) / 2);
151 tools::Rectangle aRect( aObjPoint, aObjSize);
152 mpScene->SetSnapRect( aRect );
153}
154
156{
157 mp3DView->CompleteRedraw(&rRenderContext, vcl::Region(rRect));
158}
159
161{
162 if (rMEvt.IsShift() && rMEvt.IsMod1())
163 {
165 {
167 }
168 else
169 {
171 }
172 }
173 return false;
174}
175
177{
178 if(mnObjectType == nType && mp3DObj)
179 return;
180
183
184 if( mp3DObj )
185 {
186 aSet.Put(mp3DObj->GetMergedItemSet());
187 mpScene->RemoveObject( mp3DObj->GetOrdNum() );
188 mp3DObj.clear();
189 }
190
191 switch( nType )
192 {
194 {
195 mp3DObj = new E3dSphereObj(
196 *mpModel,
197 mp3DView->Get3DDefaultAttributes(),
198 basegfx::B3DPoint( 0, 0, 0 ),
199 basegfx::B3DVector( 5000, 5000, 5000 ));
200 }
201 break;
202
204 {
205 mp3DObj = new E3dCubeObj(
206 *mpModel,
207 mp3DView->Get3DDefaultAttributes(),
208 basegfx::B3DPoint( -2500, -2500, -2500 ),
209 basegfx::B3DVector( 5000, 5000, 5000 ));
210 }
211 break;
212 }
213
214 if (mp3DObj)
215 {
216 mpScene->InsertObject( mp3DObj.get() );
217 mp3DObj->SetMergedItemSet(aSet);
218 }
219
220 Invalidate();
221}
222
224{
225 return mp3DObj->GetMergedItemSet();
226}
227
229{
230 mp3DObj->SetMergedItemSet(rAttr, true);
231 Resize();
232 Invalidate();
233}
234
235#define RADIUS_LAMP_PREVIEW_SIZE (4500.0)
236#define RADIUS_LAMP_SMALL (600.0)
237#define RADIUS_LAMP_BIG (1000.0)
238#define NO_LIGHT_SELECTED (0xffffffff)
239#define MAX_NUMBER_LIGHTS (8)
240
241const sal_Int32 g_nInteractionStartDistance = 5 * 5 * 2;
242
244: maSelectedLight(NO_LIGHT_SELECTED),
245 maLightObjects(MAX_NUMBER_LIGHTS, nullptr),
246 mfRotateX(-20.0),
247 mfRotateY(45.0),
248 mfRotateZ(0.0),
249 mfSaveActionStartHor(0.0),
250 mfSaveActionStartVer(0.0),
251 mfSaveActionStartRotZ(0.0),
252 mbMouseMoved(false),
253 mbMouseCaptured(false),
254 mbGeometrySelected(false)
255{
256}
257
259{
261 Construct2();
262}
263
265{
266 {
267 // hide all page stuff, use control background (normally gray)
268 const Color aDialogColor(Application::GetSettings().GetStyleSettings().GetDialogColor());
269 mp3DView->SetPageVisible(false);
270 mp3DView->SetApplicationBackgroundColor(aDialogColor);
271 mp3DView->SetApplicationDocumentColor(aDialogColor);
272 }
273
274 {
275 // create invisible expansion object
276 const double fMaxExpansion(RADIUS_LAMP_BIG + RADIUS_LAMP_PREVIEW_SIZE);
278 *mpModel,
279 mp3DView->Get3DDefaultAttributes(),
280 basegfx::B3DPoint(-fMaxExpansion, -fMaxExpansion, -fMaxExpansion),
281 basegfx::B3DVector(2.0 * fMaxExpansion, 2.0 * fMaxExpansion, 2.0 * fMaxExpansion));
282 mpScene->InsertObject( mpExpansionObject.get() );
283 SfxItemSet aSet(mpModel->GetItemPool());
284 aSet.Put( XLineStyleItem( drawing::LineStyle_NONE ) );
285 aSet.Put( XFillStyleItem( drawing::FillStyle_NONE ) );
286 mpExpansionObject->SetMergedItemSet(aSet);
287 }
288
289 {
290 // create lamp control object (Yellow lined object)
291 // base circle
294 basegfx::B3DHomMatrix aTransform;
295
296 aTransform.rotate(M_PI_2, 0.0, 0.0);
297 aTransform.translate(0.0, -RADIUS_LAMP_PREVIEW_SIZE, 0.0);
298 a3DCircle.transform(aTransform);
299
300 // create object for it
301 mpLampBottomObject = new E3dPolygonObj(
302 *mpModel,
303 basegfx::B3DPolyPolygon(a3DCircle));
304 mpScene->InsertObject( mpLampBottomObject.get() );
305
306 // half circle with stand
307 basegfx::B2DPolygon a2DHalfCircle;
311 basegfx::B2DPoint(0.0, 0.0), RADIUS_LAMP_PREVIEW_SIZE, RADIUS_LAMP_PREVIEW_SIZE, 2 * M_PI - M_PI_2, M_PI_2));
313
314 // create object for it
315 mpLampShaftObject = new E3dPolygonObj(
316 *mpModel,
317 basegfx::B3DPolyPolygon(a3DHalfCircle));
318 mpScene->InsertObject( mpLampShaftObject.get() );
319
320 // initially invisible
321 SfxItemSet aSet(mpModel->GetItemPool());
322 aSet.Put( XLineStyleItem( drawing::LineStyle_NONE ) );
323 aSet.Put( XFillStyleItem( drawing::FillStyle_NONE ) );
324
325 mpLampBottomObject->SetMergedItemSet(aSet);
326 mpLampShaftObject->SetMergedItemSet(aSet);
327 }
328
329 {
330 // change camera settings
331 Camera3D rCamera = mpScene->GetCamera();
332 const basegfx::B3DRange& rVolume = mpScene->GetBoundVolume();
333 double fW = rVolume.getWidth();
334 double fH = rVolume.getHeight();
335 double fCamZ = rVolume.getMaxZ() + ((fW + fH) / 2.0);
336
337 rCamera.SetAutoAdjustProjection(false);
338 rCamera.SetViewWindow(- fW / 2, - fH / 2, fW, fH);
339 basegfx::B3DPoint aLookAt;
340 double fDefaultCamPosZ = mp3DView->GetDefaultCamPosZ();
341 basegfx::B3DPoint aCamPos(0.0, 0.0, fCamZ < fDefaultCamPosZ ? fDefaultCamPosZ : fCamZ);
342 rCamera.SetPosAndLookAt(aCamPos, aLookAt);
343 double fDefaultCamFocal = mp3DView->GetDefaultCamFocal();
344 rCamera.SetFocalLength(fDefaultCamFocal);
345
346 mpScene->SetCamera( rCamera );
347
348 basegfx::B3DHomMatrix aNeutral;
349 mpScene->SetTransform(aNeutral);
350 }
351
352 // invalidate SnapRects of objects
353 mpScene->SetBoundAndSnapRectsDirty();
354}
355
357{
358 for(sal_uInt32 a(0); a < MAX_NUMBER_LIGHTS; a++)
359 {
360 // get rid of possible existing light object
361 if(maLightObjects[a])
362 {
363 mpScene->RemoveObject(maLightObjects[a]->GetOrdNum());
364 maLightObjects[a] = nullptr;
365 }
366
367 if(GetLightOnOff(a))
368 {
369 const bool bIsSelectedLight(a == maSelectedLight);
371 aDirection.normalize();
373
374 const double fLampSize(bIsSelectedLight ? RADIUS_LAMP_BIG : RADIUS_LAMP_SMALL);
376 *mpModel,
377 mp3DView->Get3DDefaultAttributes(),
378 basegfx::B3DPoint( 0, 0, 0 ),
379 basegfx::B3DVector( fLampSize, fLampSize, fLampSize));
380 mpScene->InsertObject(pNewLight.get());
381
382 basegfx::B3DHomMatrix aTransform;
383 aTransform.translate(aDirection.getX(), aDirection.getY(), aDirection.getZ());
384 pNewLight->SetTransform(aTransform);
385
386 SfxItemSet aSet(mpModel->GetItemPool());
387 aSet.Put( XLineStyleItem( drawing::LineStyle_NONE ) );
388 aSet.Put( XFillStyleItem( drawing::FillStyle_SOLID ) );
389 aSet.Put( XFillColorItem(OUString(), GetLightColor(a)));
390 pNewLight->SetMergedItemSet(aSet);
391
392 maLightObjects[a] = pNewLight.get();
393 }
394 }
395}
396
398{
400 {
401 // make mpLampBottomObject/mpLampShaftObject invisible
402 SfxItemSet aSet(mpModel->GetItemPool());
403 aSet.Put( XLineStyleItem( drawing::LineStyle_NONE ) );
404 aSet.Put( XFillStyleItem( drawing::FillStyle_NONE ) );
405 mpLampBottomObject->SetMergedItemSet(aSet);
406 mpLampShaftObject->SetMergedItemSet(aSet);
407 }
408 else
409 {
411 aDirection.normalize();
412
413 // make mpLampBottomObject/mpLampShaftObject visible (yellow hairline)
414 SfxItemSet aSet(mpModel->GetItemPool());
415 aSet.Put( XLineStyleItem( drawing::LineStyle_SOLID ) );
416 aSet.Put( XLineColorItem(OUString(), COL_YELLOW));
417 aSet.Put( XLineWidthItem(0));
418 aSet.Put( XFillStyleItem( drawing::FillStyle_NONE ) );
419 mpLampBottomObject->SetMergedItemSet(aSet);
420 mpLampShaftObject->SetMergedItemSet(aSet);
421
422 // adapt transformation of mpLampShaftObject
423 basegfx::B3DHomMatrix aTransform;
424 double fRotateY(0.0);
425
427 {
428 fRotateY = atan2(-aDirection.getZ(), aDirection.getX());
429 }
430
431 aTransform.rotate(0.0, fRotateY, 0.0);
432 mpLampShaftObject->SetTransform(aTransform);
433
434 // adapt transformation of selected light
435 E3dObject* pSelectedLight = maLightObjects[sal_Int32(maSelectedLight)];
436
437 if(pSelectedLight)
438 {
439 aTransform.identity();
440 aTransform.translate(
444 pSelectedLight->SetTransform(aTransform);
445 }
446 }
447}
448
450{
451 if(!mpScene)
452 return;
453
454 const Point aPosLogic(GetDrawingArea()->get_ref_device().PixelToLogic(aPosPixel));
455 const basegfx::B2DPoint aPoint(aPosLogic.X(), aPosLogic.Y());
456 std::vector< const E3dCompoundObject* > aResult;
458
459 if(aResult.empty())
460 return;
461
462 // exclude expansion object which will be part of
463 // the hits. It's invisible, but for HitTest, it's included
464 const E3dCompoundObject* pResult = nullptr;
465
466 for(auto const & b: aResult)
467 {
468 if(b && b != mpExpansionObject.get())
469 {
470 pResult = b;
471 break;
472 }
473 }
474
475 if(pResult == mp3DObj.get())
476 {
478 {
479 mbGeometrySelected = true;
483 Invalidate();
484
486 {
488 }
489 }
490 }
491 else
492 {
493 sal_uInt32 aNewSelectedLight(NO_LIGHT_SELECTED);
494
495 for(sal_uInt32 a(0); a < MAX_NUMBER_LIGHTS; a++)
496 {
497 if(maLightObjects[a] && maLightObjects[a] == pResult)
498 {
499 aNewSelectedLight = a;
500 }
501 }
502
503 if(aNewSelectedLight != maSelectedLight)
504 {
505 SelectLight(aNewSelectedLight);
506
508 {
510 }
511 }
512 }
513}
514
516{
517 Svx3DPreviewControl::Paint(rRenderContext, rRect);
518}
519
521{
522 if (!HasFocus())
523 return tools::Rectangle();
524 Size aFocusSize = GetOutputSizePixel();
525 aFocusSize.AdjustWidth( -4 );
526 aFocusSize.AdjustHeight( -4 );
527 return tools::Rectangle(Point(2, 2), aFocusSize);
528}
529
531{
532 bool bCallParent(true);
533
534 // switch state
535 if(rMEvt.IsLeft())
536 {
538 {
539 mbMouseMoved = false;
540 bCallParent = false;
542 CaptureMouse();
543 mbMouseCaptured = true;
544 }
545 else
546 {
547 // Single click without moving much trying to do a selection
548 TrySelection(rMEvt.GetPosPixel());
549 bCallParent = false;
550 }
551 }
552
553 // call parent
554 if (bCallParent)
556 return true;
557}
558
560{
561 if (!mbMouseCaptured)
562 return false;
563
564 Point aDeltaPos = rMEvt.GetPosPixel() - maActionStartPoint;
565
566 if(!mbMouseMoved)
567 {
568 if(sal_Int32(aDeltaPos.X() * aDeltaPos.X() + aDeltaPos.Y() * aDeltaPos.Y()) > g_nInteractionStartDistance)
569 {
571 {
573 }
574 else
575 {
576 // interaction start, save values
578 }
579
580 mbMouseMoved = true;
581 }
582 }
583
584 if(mbMouseMoved)
585 {
587 {
588 double fNewRotX = mfSaveActionStartVer - basegfx::deg2rad(aDeltaPos.Y());
589 double fNewRotY = mfSaveActionStartHor + basegfx::deg2rad(aDeltaPos.X());
590
591 // cut horizontal
592 while(fNewRotY < 0.0)
593 {
594 fNewRotY += 2 * M_PI;
595 }
596
597 while(fNewRotY >= 2 * M_PI)
598 {
599 fNewRotY -= 2 * M_PI;
600 }
601
602 // cut vertical
603 if(fNewRotX < -M_PI_2)
604 {
605 fNewRotX = -M_PI_2;
606 }
607
608 if(fNewRotX > M_PI_2)
609 {
610 fNewRotX = M_PI_2;
611 }
612
613 SetRotation(fNewRotX, fNewRotY, mfSaveActionStartRotZ);
614
616 {
618 }
619 }
620 else
621 {
622 // interaction in progress
623 double fNewPosHor = mfSaveActionStartHor + static_cast<double>(aDeltaPos.X());
624 double fNewPosVer = mfSaveActionStartVer - static_cast<double>(aDeltaPos.Y());
625
626 // cut horizontal
627 fNewPosHor = NormAngle360(fNewPosHor);
628
629 // cut vertical
630 if(fNewPosVer < -90.0)
631 {
632 fNewPosVer = -90.0;
633 }
634
635 if(fNewPosVer > 90.0)
636 {
637 fNewPosVer = 90.0;
638 }
639
640 SetPosition(fNewPosHor, fNewPosVer);
641
643 {
645 }
646 }
647 }
648 return true;
649}
650
652{
653 if (!mbMouseCaptured)
654 return false;
655 ReleaseMouse();
656 mbMouseCaptured = false;
657
658 if (mbMouseMoved)
659 {
660 // was change interactively
661 }
662 else
663 {
664 // simple click without much movement, try selection
665 TrySelection(rMEvt.GetPosPixel());
666 }
667
668 return true;
669}
670
672{
673 // set size of page
674 const Size aSize(GetDrawingArea()->get_ref_device().PixelToLogic(GetOutputSizePixel()));
675 mxFmPage->SetSize(aSize);
676
677 // set position and size of scene
678 mpScene->SetSnapRect(tools::Rectangle(Point(0, 0), aSize));
679}
680
682{
683 // call parent
685
686 // apply object rotation
687 if(mp3DObj)
688 {
689 basegfx::B3DHomMatrix aObjectRotation;
690 aObjectRotation.rotate(mfRotateX, mfRotateY, mfRotateZ);
691 mp3DObj->SetTransform(aObjectRotation);
692 }
693}
694
696{
698}
699
700void Svx3DLightControl::GetPosition(double& rHor, double& rVer)
701{
702 if(IsSelectionValid())
703 {
705 aDirection.normalize();
706 rHor = basegfx::rad2deg(atan2(-aDirection.getX(), -aDirection.getZ()) + M_PI); // 0..360.0
707 rVer = basegfx::rad2deg(atan2(aDirection.getY(), aDirection.getXZLength())); // -90.0..90.0
708 }
710 {
711 rHor = basegfx::rad2deg(mfRotateY); // 0..360.0
712 rVer = basegfx::rad2deg(mfRotateX); // -90.0..90.0
713 }
714}
715
716void Svx3DLightControl::SetPosition(double fHor, double fVer)
717{
718 if(IsSelectionValid())
719 {
720 // set selected light's direction
721 fHor = basegfx::deg2rad(fHor) - M_PI; // -PI..PI
722 fVer = basegfx::deg2rad(fVer); // -PI2..PI2
723 basegfx::B3DVector aDirection(cos(fVer) * -sin(fHor), sin(fVer), cos(fVer) * -cos(fHor));
724 aDirection.normalize();
725
727 {
728 // set changed light direction at SdrScene
729 SfxItemSet aSet(mpModel->GetItemPool());
730
731 switch(maSelectedLight)
732 {
733 case 0: aSet.Put(makeSvx3DLightDirection1Item(aDirection)); break;
734 case 1: aSet.Put(makeSvx3DLightDirection2Item(aDirection)); break;
735 case 2: aSet.Put(makeSvx3DLightDirection3Item(aDirection)); break;
736 case 3: aSet.Put(makeSvx3DLightDirection4Item(aDirection)); break;
737 case 4: aSet.Put(makeSvx3DLightDirection5Item(aDirection)); break;
738 case 5: aSet.Put(makeSvx3DLightDirection6Item(aDirection)); break;
739 case 6: aSet.Put(makeSvx3DLightDirection7Item(aDirection)); break;
740 default:
741 case 7: aSet.Put(makeSvx3DLightDirection8Item(aDirection)); break;
742 }
743
744 mpScene->SetMergedItemSet(aSet);
745
746 // correct 3D light's and LampFrame's geometries
748 Invalidate();
749 }
750 }
751 if(!IsGeometrySelected())
752 return;
753
754 if(mfRotateX == fVer && mfRotateY == fHor)
755 return;
756
759
760 if(mp3DObj)
761 {
762 basegfx::B3DHomMatrix aObjectRotation;
763 aObjectRotation.rotate(mfRotateX, mfRotateY, mfRotateZ);
764 mp3DObj->SetTransform(aObjectRotation);
765
766 Invalidate();
767 }
768}
769
770void Svx3DLightControl::SetRotation(double fRotX, double fRotY, double fRotZ)
771{
772 if(!IsGeometrySelected())
773 return;
774
775 if(fRotX == mfRotateX && fRotY == mfRotateY && fRotZ == mfRotateZ)
776 return;
777
778 mfRotateX = fRotX;
779 mfRotateY = fRotY;
780 mfRotateZ = fRotZ;
781
782 if(mp3DObj)
783 {
784 basegfx::B3DHomMatrix aObjectRotation;
785 aObjectRotation.rotate(mfRotateX, mfRotateY, mfRotateZ);
786 mp3DObj->SetTransform(aObjectRotation);
787
788 Invalidate();
789 }
790}
791
792void Svx3DLightControl::GetRotation(double& rRotX, double& rRotY, double& rRotZ)
793{
794 rRotX = mfRotateX;
795 rRotY = mfRotateY;
796 rRotZ = mfRotateZ;
797}
798
800{
801 // call parent
803
805 {
806 // selected light is no more active, select new one
808 }
809
810 // local updates
813 Invalidate();
814}
815
816void Svx3DLightControl::SelectLight(sal_uInt32 nLightNumber)
817{
818 if(nLightNumber > 7)
819 {
820 nLightNumber = NO_LIGHT_SELECTED;
821 }
822
823 if(NO_LIGHT_SELECTED != nLightNumber)
824 {
825 if(!GetLightOnOff(nLightNumber))
826 {
827 nLightNumber = NO_LIGHT_SELECTED;
828 }
829 }
830
831 if(nLightNumber != maSelectedLight)
832 {
833 maSelectedLight = nLightNumber;
834 mbGeometrySelected = false;
837 Invalidate();
838 }
839}
840
841bool Svx3DLightControl::GetLightOnOff(sal_uInt32 nNum) const
842{
843 if(nNum <= 7)
844 {
845 const SfxItemSet aLightItemSet(Get3DAttributes());
846
847 switch(nNum)
848 {
849 case 0 : return aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTON_1).GetValue();
850 case 1 : return aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTON_2).GetValue();
851 case 2 : return aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTON_3).GetValue();
852 case 3 : return aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTON_4).GetValue();
853 case 4 : return aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTON_5).GetValue();
854 case 5 : return aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTON_6).GetValue();
855 case 6 : return aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTON_7).GetValue();
856 case 7 : return aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTON_8).GetValue();
857 }
858 }
859
860 return false;
861}
862
864{
865 if(nNum <= 7)
866 {
867 const SfxItemSet aLightItemSet(Get3DAttributes());
868
869 switch(nNum)
870 {
871 case 0 : return aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_1).GetValue();
872 case 1 : return aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_2).GetValue();
873 case 2 : return aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_3).GetValue();
874 case 3 : return aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_4).GetValue();
875 case 4 : return aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_5).GetValue();
876 case 5 : return aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_6).GetValue();
877 case 6 : return aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_7).GetValue();
878 case 7 : return aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_8).GetValue();
879 }
880 }
881
882 return COL_BLACK;
883}
884
886{
887 if(nNum <= 7)
888 {
889 const SfxItemSet aLightItemSet(Get3DAttributes());
890
891 switch(nNum)
892 {
893 case 0 : return aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_1).GetValue();
894 case 1 : return aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_2).GetValue();
895 case 2 : return aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_3).GetValue();
896 case 3 : return aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_4).GetValue();
897 case 4 : return aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_5).GetValue();
898 case 5 : return aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_6).GetValue();
899 case 6 : return aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_7).GetValue();
900 case 7 : return aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_8).GetValue();
901 }
902 }
903
904 return basegfx::B3DVector();
905}
906
908 weld::Scale& rVert, weld::Button& rSwitcher)
909 : mrLightControl(rLightControl)
910 , mrHorScroller(rHori)
911 , mrVerScroller(rVert)
912 , mrSwitcher(rSwitcher)
913{
914 // init members
915 Init();
916}
917
919{
920 Size aSize(mrLightControl.GetDrawingArea()->get_ref_device().LogicToPixel(Size(80, 100), MapMode(MapUnit::MapAppFont)));
922
923 // #i58240# set HelpIDs for scrollbars and switcher
928
929 // Light preview
931 mrLightControl.SetChangeCallback( LINK(this, SvxLightCtl3D, InternalInteractiveChange) );
932 mrLightControl.SetSelectionChangeCallback( LINK(this, SvxLightCtl3D, InternalSelectionChange) );
933
934 // Horiz Scrollbar
936 mrHorScroller.set_range(0, 36000);
937 mrHorScroller.connect_value_changed( LINK(this, SvxLightCtl3D, ScrollBarMove) );
938
939 // Vert Scrollbar
941 mrVerScroller.set_range(0, 18000);
942 mrVerScroller.connect_value_changed( LINK(this, SvxLightCtl3D, ScrollBarMove) );
943
944 // Switch Button
946 mrSwitcher.connect_clicked( LINK(this, SvxLightCtl3D, ButtonPress) );
947
949 pArea->connect_key_press(Link<const KeyEvent&, bool>()); //acknowledge we first remove the old one
951
952 pArea->connect_focus_in(Link<weld::Widget&, void>()); //acknowledge we first remove the old one
953 pArea->connect_focus_in(LINK(this, SvxLightCtl3D, FocusIn));
954
955 // check selection
957}
958
960{
961 const bool bSelectionValid(mrLightControl.IsSelectionValid() || mrLightControl.IsGeometrySelected());
962 mrHorScroller.set_sensitive(bSelectionValid);
963 mrVerScroller.set_sensitive(bSelectionValid);
964
965 if (bSelectionValid)
966 {
967 double fHor(0.0), fVer(0.0);
968 mrLightControl.GetPosition(fHor, fVer);
969 mrHorScroller.set_value( sal_Int32(fHor * 100.0) );
970 mrVerScroller.set_value( 18000 - sal_Int32((fVer + 90.0) * 100.0) );
971 }
972}
973
974void SvxLightCtl3D::move( double fDeltaHor, double fDeltaVer )
975{
976 double fHor(0.0), fVer(0.0);
977
978 mrLightControl.GetPosition(fHor, fVer);
979 fHor += fDeltaHor;
980 fVer += fDeltaVer;
981
982 if( fVer > 90.0 )
983 return;
984
985 if ( fVer < -90.0 )
986 return;
987
988 mrLightControl.SetPosition(fHor, fVer);
989 mrHorScroller.set_value( sal_Int32(fHor * 100.0) );
990 mrVerScroller.set_value( 18000 - sal_Int32((fVer + 90.0) * 100.0) );
991
993 {
995 }
996}
997
998IMPL_LINK(SvxLightCtl3D, KeyInput, const KeyEvent&, rKEvt, bool)
999{
1000 const vcl::KeyCode aCode(rKEvt.GetKeyCode());
1001
1002 if (aCode.GetModifier())
1003 return false;
1004
1005 bool bHandled = true;
1006
1007 switch ( aCode.GetCode() )
1008 {
1009 case KEY_SPACE:
1010 {
1011 break;
1012 }
1013 case KEY_LEFT:
1014 {
1015 move( -4.0, 0.0 ); // #i58242# changed move direction in X
1016 break;
1017 }
1018 case KEY_RIGHT:
1019 {
1020 move( 4.0, 0.0 ); // #i58242# changed move direction in X
1021 break;
1022 }
1023 case KEY_UP:
1024 {
1025 move( 0.0, 4.0 );
1026 break;
1027 }
1028 case KEY_DOWN:
1029 {
1030 move( 0.0, -4.0 );
1031 break;
1032 }
1033 case KEY_PAGEUP:
1034 {
1035 sal_Int32 nLight(mrLightControl.GetSelectedLight() - 1);
1036
1037 while((nLight >= 0) && !mrLightControl.GetLightOnOff(nLight))
1038 {
1039 nLight--;
1040 }
1041
1042 if(nLight < 0)
1043 {
1044 nLight = 7;
1045
1046 while((nLight >= 0) && !mrLightControl.GetLightOnOff(nLight))
1047 {
1048 nLight--;
1049 }
1050 }
1051
1052 if(nLight >= 0)
1053 {
1054 mrLightControl.SelectLight(nLight);
1056
1057 if(maUserSelectionChangeCallback.IsSet())
1058 {
1059 maUserSelectionChangeCallback.Call(this);
1060 }
1061 }
1062
1063 break;
1064 }
1065 case KEY_PAGEDOWN:
1066 {
1067 sal_Int32 nLight(mrLightControl.GetSelectedLight() - 1);
1068
1069 while(nLight <= 7 && !mrLightControl.GetLightOnOff(nLight))
1070 {
1071 nLight++;
1072 }
1073
1074 if(nLight > 7)
1075 {
1076 nLight = 0;
1077
1078 while(nLight <= 7 && !mrLightControl.GetLightOnOff(nLight))
1079 {
1080 nLight++;
1081 }
1082 }
1083
1084 if(nLight <= 7)
1085 {
1086 mrLightControl.SelectLight(nLight);
1088
1089 if(maUserSelectionChangeCallback.IsSet())
1090 {
1091 maUserSelectionChangeCallback.Call(this);
1092 }
1093 }
1094
1095 break;
1096 }
1097 default:
1098 {
1099 bHandled = false;
1100 break;
1101 }
1102 }
1103 return bHandled;
1104}
1105
1107{
1108 if (mrLightControl.IsEnabled())
1109 {
1111 }
1112}
1113
1115{
1116 const sal_Int32 nHor(mrHorScroller.get_value());
1117 const sal_Int32 nVer(mrVerScroller.get_value());
1118
1119 mrLightControl.SetPosition(
1120 static_cast<double>(nHor) / 100.0,
1121 static_cast<double>((18000 - nVer) - 9000) / 100.0);
1122
1123 if (maUserInteractiveChangeCallback.IsSet())
1124 {
1125 maUserInteractiveChangeCallback.Call(this);
1126 }
1127}
1128
1130{
1131 if(SvxPreviewObjectType::SPHERE == GetSvx3DLightControl().GetObjectType())
1132 {
1133 GetSvx3DLightControl().SetObjectType(SvxPreviewObjectType::CUBE);
1134 }
1135 else
1136 {
1137 GetSvx3DLightControl().SetObjectType(SvxPreviewObjectType::SPHERE);
1138 }
1139}
1140
1141IMPL_LINK_NOARG(SvxLightCtl3D, InternalInteractiveChange, Svx3DLightControl*, void)
1142{
1143 double fHor(0.0), fVer(0.0);
1144
1145 mrLightControl.GetPosition(fHor, fVer);
1146 mrHorScroller.set_value( sal_Int32(fHor * 100.0) );
1147 mrVerScroller.set_value( 18000 - sal_Int32((fVer + 90.0) * 100.0) );
1148
1149 if(maUserInteractiveChangeCallback.IsSet())
1150 {
1151 maUserInteractiveChangeCallback.Call(this);
1152 }
1153}
1154
1155IMPL_LINK_NOARG(SvxLightCtl3D, InternalSelectionChange, Svx3DLightControl*, void)
1156{
1158
1159 if(maUserSelectionChangeCallback.IsSet())
1160 {
1161 maUserSelectionChangeCallback.Call(this);
1162 }
1163}
1164
1165/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
static const AllSettings & GetSettings()
void SetAutoAdjustProjection(bool bAdjust)
Definition: camera3d.hxx:62
void SetFocalLength(double fLen)
Definition: camera3d.cxx:172
void SetPosAndLookAt(const basegfx::B3DPoint &rNewPos, const basegfx::B3DPoint &rNewLookAt)
Definition: camera3d.cxx:69
void SetViewWindow(double fX, double fY, double fW, double fH)
Definition: camera3d.cxx:41
virtual void SetTransform(const basegfx::B3DHomMatrix &rMatrix)
Definition: obj3d.cxx:364
SphereObject with diameter r3DSize.
Definition: sphere3d.hxx:36
Derived class of SdrView to edit 3D objects.
Definition: view3d.hxx:42
bool IsMod1() const
const Point & GetPosPixel() const
bool IsLeft() const
bool IsShift() const
SAL_WARN_UNUSED_RESULT Point PixelToLogic(const Point &rDevicePt) const
void SetMapMode()
SAL_WARN_UNUSED_RESULT Point LogicToPixel(const Point &rLogicPt) const
constexpr tools::Long Y() const
constexpr tools::Long X() const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
constexpr tools::Long Height() const
tools::Long AdjustHeight(tools::Long n)
tools::Long AdjustWidth(tools::Long n)
constexpr tools::Long Width() const
sal_uInt32 maSelectedLight
Definition: dlgctl3d.hxx:72
virtual bool MouseMove(const MouseEvent &rMEvt) override
Definition: dlgctl3d.cxx:559
virtual void SetObjectType(SvxPreviewObjectType nType) override
Definition: dlgctl3d.cxx:681
void ConstructLightObjects()
Definition: dlgctl3d.cxx:356
Link< Svx3DLightControl *, void > maChangeCallback
Definition: dlgctl3d.hxx:68
rtl::Reference< E3dObject > mpExpansionObject
Definition: dlgctl3d.hxx:75
bool IsSelectionValid()
Definition: dlgctl3d.cxx:695
void SetChangeCallback(Link< Svx3DLightControl *, void > aNew)
Definition: dlgctl3d.hxx:114
double mfSaveActionStartVer
Definition: dlgctl3d.hxx:88
Point maActionStartPoint
Definition: dlgctl3d.hxx:86
bool mbGeometrySelected
Definition: dlgctl3d.hxx:93
std::vector< E3dObject * > maLightObjects
Definition: dlgctl3d.hxx:78
void SetPosition(double fHor, double fVer)
Definition: dlgctl3d.cxx:716
void SetSelectionChangeCallback(Link< Svx3DLightControl *, void > aNew)
Definition: dlgctl3d.hxx:115
void AdaptToSelectedLight()
Definition: dlgctl3d.cxx:397
virtual void Resize() override
Definition: dlgctl3d.cxx:671
void GetRotation(double &rRotX, double &rRotY, double &rRotZ)
Definition: dlgctl3d.cxx:792
virtual bool MouseButtonDown(const MouseEvent &rMEvt) override
Definition: dlgctl3d.cxx:530
double mfSaveActionStartHor
Definition: dlgctl3d.hxx:87
virtual tools::Rectangle GetFocusRect() override
Definition: dlgctl3d.cxx:520
double mfSaveActionStartRotZ
Definition: dlgctl3d.hxx:89
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
Definition: dlgctl3d.cxx:515
virtual void Set3DAttributes(const SfxItemSet &rAttr) override
Definition: dlgctl3d.cxx:799
bool IsGeometrySelected() const
Definition: dlgctl3d.hxx:119
void TrySelection(Point aPosPixel)
Definition: dlgctl3d.cxx:449
rtl::Reference< E3dObject > mpLampBottomObject
Definition: dlgctl3d.hxx:76
bool GetLightOnOff(sal_uInt32 nNum) const
Definition: dlgctl3d.cxx:841
void GetPosition(double &rHor, double &rVer)
Definition: dlgctl3d.cxx:700
virtual void SetDrawingArea(weld::DrawingArea *pDrawingArea) override
Definition: dlgctl3d.cxx:258
rtl::Reference< E3dObject > mpLampShaftObject
Definition: dlgctl3d.hxx:77
virtual bool MouseButtonUp(const MouseEvent &rMEvt) override
Definition: dlgctl3d.cxx:651
Link< Svx3DLightControl *, void > maSelectionChangeCallback
Definition: dlgctl3d.hxx:69
Color GetLightColor(sal_uInt32 nNum) const
Definition: dlgctl3d.cxx:863
void SelectLight(sal_uInt32 nLightNumber)
Definition: dlgctl3d.cxx:816
basegfx::B3DVector GetLightDirection(sal_uInt32 nNum) const
Definition: dlgctl3d.cxx:885
void SetRotation(double fRotX, double fRotY, double fRotZ)
Definition: dlgctl3d.cxx:770
virtual void Resize() override
Definition: dlgctl3d.cxx:140
virtual bool MouseButtonDown(const MouseEvent &rMEvt) override
Definition: dlgctl3d.cxx:160
virtual ~Svx3DPreviewControl() override
Definition: dlgctl3d.cxx:61
SvxPreviewObjectType GetObjectType() const
Definition: dlgctl3d.hxx:60
std::unique_ptr< FmFormModel > mpModel
Definition: dlgctl3d.hxx:41
virtual void SetObjectType(SvxPreviewObjectType nType)
Definition: dlgctl3d.cxx:176
std::unique_ptr< E3dView > mp3DView
Definition: dlgctl3d.hxx:43
virtual void SetDrawingArea(weld::DrawingArea *pDrawingArea) override
Definition: dlgctl3d.cxx:51
rtl::Reference< E3dObject > mp3DObj
Definition: dlgctl3d.hxx:45
rtl::Reference< E3dScene > mpScene
Definition: dlgctl3d.hxx:44
rtl::Reference< FmFormPage > mxFmPage
Definition: dlgctl3d.hxx:42
virtual void Set3DAttributes(const SfxItemSet &rAttr)
Definition: dlgctl3d.cxx:228
SfxItemSet const & Get3DAttributes() const
Definition: dlgctl3d.cxx:223
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
Definition: dlgctl3d.cxx:155
SvxPreviewObjectType mnObjectType
Definition: dlgctl3d.hxx:46
weld::Scale & mrHorScroller
Definition: dlgctl3d.hxx:143
Svx3DLightControl & mrLightControl
Definition: dlgctl3d.hxx:142
Link< SvxLightCtl3D *, void > maUserInteractiveChangeCallback
Definition: dlgctl3d.hxx:148
weld::Button & mrSwitcher
Definition: dlgctl3d.hxx:145
SvxLightCtl3D(Svx3DLightControl &rLightControl, weld::Scale &rHori, weld::Scale &rVert, weld::Button &rButton)
Definition: dlgctl3d.cxx:907
void move(double fDeltaHor, double fDeltaVer)
Definition: dlgctl3d.cxx:974
weld::Scale & mrVerScroller
Definition: dlgctl3d.hxx:144
void CheckSelection()
Definition: dlgctl3d.cxx:959
void append(const basegfx::B2DPoint &rPoint, sal_uInt32 nCount)
void rotate(double fAngleX, double fAngleY, double fAngleZ)
void translate(double fX, double fY, double fZ)
void transform(const B3DHomMatrix &rMatrix)
double getHeight() const
double getMaxZ() const
double getWidth() const
sal_uInt16 GetCode() const
sal_uInt16 GetModifier() const
void connect_clicked(const Link< Button &, void > &rLink)
void set_size_request(int nWidth, int nHeight)
weld::DrawingArea * GetDrawingArea() const
void EnableRTL(bool bEnable)
void SetOutputSizePixel(const Size &rSize)
Size const & GetOutputSizePixel() const
virtual OutputDevice & get_ref_device()=0
virtual void set_range(int min, int max)=0
void connect_value_changed(const Link< Scale &, void > &rLink)
virtual void set_value(int value)=0
virtual void show()=0
virtual void set_help_id(const OUString &rName)=0
virtual void set_accessible_name(const OUString &rName)=0
virtual void set_sensitive(bool sensitive)=0
virtual void set_size_request(int nWidth, int nHeight)=0
virtual void connect_key_press(const Link< const KeyEvent &, bool > &rLink)
virtual void connect_focus_in(const Link< Widget &, void > &rLink)
constexpr ::Color COL_WHITE(0xFF, 0xFF, 0xFF)
constexpr ::Color COL_YELLOW(0xFF, 0xFF, 0x00)
constexpr ::Color COL_BLACK(0x00, 0x00, 0x00)
bool mbMouseCaptured
OUString SvxResId(TranslateId aId)
Definition: dialmgr.cxx:24
#define RADIUS_LAMP_SMALL
Definition: dlgctl3d.cxx:236
IMPL_LINK_NOARG(SvxLightCtl3D, FocusIn, weld::Widget &, void)
Definition: dlgctl3d.cxx:1106
const sal_Int32 g_nInteractionStartDistance
Definition: dlgctl3d.cxx:241
#define NO_LIGHT_SELECTED
Definition: dlgctl3d.cxx:238
#define RADIUS_LAMP_PREVIEW_SIZE
Definition: dlgctl3d.cxx:235
#define RADIUS_LAMP_BIG
Definition: dlgctl3d.cxx:237
IMPL_LINK(SvxLightCtl3D, KeyInput, const KeyEvent &, rKEvt, bool)
Definition: dlgctl3d.cxx:998
#define MAX_NUMBER_LIGHTS
Definition: dlgctl3d.cxx:239
SvxPreviewObjectType
Definition: dlgctl3d.hxx:36
void getAllHit3DObjectsSortedFrontToBack(const basegfx::B2DPoint &rPoint, const E3dScene &rScene, ::std::vector< const E3dCompoundObject * > &o_rResult)
support for getting all from a 2d position hit objects in a 3d scene in a depth sorted array
T NormAngle360(T angle)
constexpr OUStringLiteral HID_CTRL3D_HSCROLL
Definition: helpids.h:26
constexpr OUStringLiteral HID_CTRL3D_SWITCHER
Definition: helpids.h:27
constexpr OUStringLiteral HID_CTRL3D_VSCROLL
Definition: helpids.h:28
uno_Any a
constexpr sal_uInt16 KEY_LEFT
constexpr sal_uInt16 KEY_PAGEDOWN
constexpr sal_uInt16 KEY_UP
constexpr sal_uInt16 KEY_RIGHT
constexpr sal_uInt16 KEY_DOWN
constexpr sal_uInt16 KEY_SPACE
constexpr sal_uInt16 KEY_PAGEUP
bool equalZero(const T &rfVal)
B3DPolygon createB3DPolygonFromB2DPolygon(const B2DPolygon &rCandidate, double fZCoordinate)
B2DPolygon createPolygonFromCircle(const B2DPoint &rCenter, double fRadius)
B2DPolygon createPolygonFromEllipseSegment(const B2DPoint &rCenter, double fRadiusX, double fRadiusY, double fStart, double fEnd)
constexpr double rad2deg(double v)
constexpr double deg2rad(double v)
QPRO_FUNC_TYPE nType
constexpr TypedWhichId< SfxBoolItem > SDRATTR_3DSCENE_LIGHTON_8(SDRATTR_3DSCENE_FIRST+20)
constexpr TypedWhichId< SfxBoolItem > SDRATTR_3DSCENE_LIGHTON_4(SDRATTR_3DSCENE_FIRST+16)
constexpr TypedWhichId< SvxB3DVectorItem > SDRATTR_3DSCENE_LIGHTDIRECTION_1(SDRATTR_3DSCENE_FIRST+21)
constexpr TypedWhichId< SvxB3DVectorItem > SDRATTR_3DSCENE_LIGHTDIRECTION_3(SDRATTR_3DSCENE_FIRST+23)
constexpr TypedWhichId< SfxBoolItem > SDRATTR_3DSCENE_LIGHTON_1(SDRATTR_3DSCENE_FIRST+13)
constexpr TypedWhichId< SvxB3DVectorItem > SDRATTR_3DSCENE_LIGHTDIRECTION_2(SDRATTR_3DSCENE_FIRST+22)
constexpr TypedWhichId< SvxColorItem > SDRATTR_3DSCENE_LIGHTCOLOR_1(SDRATTR_3DSCENE_FIRST+4)
constexpr TypedWhichId< SfxBoolItem > SDRATTR_3DSCENE_LIGHTON_3(SDRATTR_3DSCENE_FIRST+15)
constexpr TypedWhichId< SvxColorItem > SDRATTR_3DSCENE_LIGHTCOLOR_5(SDRATTR_3DSCENE_FIRST+8)
constexpr TypedWhichId< SfxBoolItem > SDRATTR_3DSCENE_LIGHTON_5(SDRATTR_3DSCENE_FIRST+17)
constexpr TypedWhichId< SvxB3DVectorItem > SDRATTR_3DSCENE_LIGHTDIRECTION_7(SDRATTR_3DSCENE_FIRST+27)
constexpr TypedWhichId< SvxB3DVectorItem > SDRATTR_3DSCENE_LIGHTDIRECTION_6(SDRATTR_3DSCENE_FIRST+26)
constexpr TypedWhichId< SvxColorItem > SDRATTR_3DSCENE_LIGHTCOLOR_6(SDRATTR_3DSCENE_FIRST+9)
constexpr TypedWhichId< SvxColorItem > SDRATTR_3DSCENE_LIGHTCOLOR_4(SDRATTR_3DSCENE_FIRST+7)
constexpr TypedWhichId< SvxColorItem > SDRATTR_3DSCENE_LIGHTCOLOR_7(SDRATTR_3DSCENE_FIRST+10)
constexpr TypedWhichId< SfxBoolItem > SDRATTR_3DSCENE_LIGHTON_6(SDRATTR_3DSCENE_FIRST+18)
constexpr TypedWhichId< SfxBoolItem > SDRATTR_3DSCENE_LIGHTON_2(SDRATTR_3DSCENE_FIRST+14)
constexpr TypedWhichId< SvxColorItem > SDRATTR_3DSCENE_LIGHTCOLOR_8(SDRATTR_3DSCENE_FIRST+11)
constexpr TypedWhichId< SvxB3DVectorItem > SDRATTR_3DSCENE_LIGHTDIRECTION_8(SDRATTR_3DSCENE_FIRST+28)
constexpr TypedWhichId< SvxB3DVectorItem > SDRATTR_3DSCENE_LIGHTDIRECTION_4(SDRATTR_3DSCENE_FIRST+24)
constexpr TypedWhichId< SvxB3DVectorItem > SDRATTR_3DSCENE_LIGHTDIRECTION_5(SDRATTR_3DSCENE_FIRST+25)
constexpr TypedWhichId< SvxColorItem > SDRATTR_3DSCENE_LIGHTCOLOR_2(SDRATTR_3DSCENE_FIRST+5)
constexpr TypedWhichId< SvxColorItem > SDRATTR_3DSCENE_LIGHTCOLOR_3(SDRATTR_3DSCENE_FIRST+6)
constexpr TypedWhichId< SfxBoolItem > SDRATTR_3DSCENE_LIGHTON_7(SDRATTR_3DSCENE_FIRST+19)
SvxB3DVectorItem makeSvx3DLightDirection6Item(const basegfx::B3DVector &rVec)
Definition: svx3ditems.hxx:255
SvxB3DVectorItem makeSvx3DLightDirection3Item(const basegfx::B3DVector &rVec)
Definition: svx3ditems.hxx:243
SvxB3DVectorItem makeSvx3DLightDirection5Item(const basegfx::B3DVector &rVec)
Definition: svx3ditems.hxx:251
SvxB3DVectorItem makeSvx3DLightDirection8Item(const basegfx::B3DVector &rVec)
Definition: svx3ditems.hxx:263
SvxB3DVectorItem makeSvx3DLightDirection4Item(const basegfx::B3DVector &rVec)
Definition: svx3ditems.hxx:247
SvxB3DVectorItem makeSvx3DLightDirection1Item(const basegfx::B3DVector &rVec)
Definition: svx3ditems.hxx:235
SvxB3DVectorItem makeSvx3DLightDirection2Item(const basegfx::B3DVector &rVec)
Definition: svx3ditems.hxx:239
SvxB3DVectorItem makeSvx3DLightDirection7Item(const basegfx::B3DVector &rVec)
Definition: svx3ditems.hxx:259
css::drawing::Direction3D aDirection
void CheckSelection(struct ESelection &rSel, SvxTextForwarder const *pForwarder) noexcept
constexpr sal_uInt16 XATTR_FILL_FIRST(XATTRSET_LINE+1)
constexpr TypedWhichId< XFillBitmapItem > XATTR_FILLBITMAP(XATTR_FILL_FIRST+4)
constexpr TypedWhichId< XLineStyleItem > XATTR_LINESTYLE(XATTR_LINE_FIRST)