LibreOffice Module sd (master) 1
fucon3d.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 <fucon3d.hxx>
21
22#include <svx/svxids.hrc>
23#include <sfx2/dispatch.hxx>
24#include <sfx2/viewfrm.hxx>
25#include <tools/poly.hxx>
26
27#include <svx/xlineit0.hxx>
28#include <svx/scene3d.hxx>
29#include <svx/sphere3d.hxx>
30#include <svx/cube3d.hxx>
31#include <svx/lathe3d.hxx>
32#include <svx/camera3d.hxx>
33
34#include <vcl/weld.hxx>
35
36#include <app.hrc>
37
38#include <View.hxx>
39#include <Window.hxx>
40#include <ViewShell.hxx>
41#include <drawdoc.hxx>
42#include <ViewShellBase.hxx>
43#include <ToolBarManager.hxx>
44#include <svx/svx3ditems.hxx>
45
47
48using namespace com::sun::star;
49
50namespace sd {
51
52
54 ViewShell* pViewSh,
55 ::sd::Window* pWin,
56 ::sd::View* pView,
57 SdDrawDocument* pDoc,
58 SfxRequest& rReq)
59 : FuConstruct(pViewSh, pWin, pView, pDoc, rReq)
60{
61}
62
64{
66 rtl::Reference<FuPoor> xFunc( pFunc = new FuConstruct3dObject( pViewSh, pWin, pView, pDoc, rReq ) );
67 xFunc->DoExecute(rReq);
69 return xFunc;
70}
71
73{
78}
79
81{
83
84 switch (nSlotId)
85 {
86 default:
87 case SID_3D_CUBE:
88 {
89 p3DObj = new E3dCubeObj(
92 ::basegfx::B3DPoint(-2500, -2500, -2500),
93 ::basegfx::B3DVector(5000, 5000, 5000));
94 break;
95 }
96
97 case SID_3D_SPHERE:
98 {
99 p3DObj = new E3dSphereObj(
102 ::basegfx::B3DPoint(0, 0, 0),
103 ::basegfx::B3DVector(5000, 5000, 5000));
104 break;
105 }
106
107 case SID_3D_SHELL:
108 {
109 XPolygon aXPoly(Point (0, 1250), 2500, 2500, 0_deg100, 9000_deg100, false);
110 aXPoly.Scale(5.0, 5.0);
111
112 ::basegfx::B2DPolygon aB2DPolygon(aXPoly.getB2DPolygon());
113 if(aB2DPolygon.areControlPointsUsed())
114 {
115 aB2DPolygon = ::basegfx::utils::adaptiveSubdivideByAngle(aB2DPolygon);
116 }
117 p3DObj = new E3dLatheObj(
120 ::basegfx::B2DPolyPolygon(aB2DPolygon));
121
122 /* this is an open object, therefore it has to be handled double-
123 sided by default */
124 p3DObj->SetMergedItem(makeSvx3DDoubleSidedItem(true));
125 break;
126 }
127
128 case SID_3D_HALF_SPHERE:
129 {
130 XPolygon aXPoly(Point (0, 1250), 2500, 2500, 0_deg100, 9000_deg100, false);
131 aXPoly.Scale(5.0, 5.0);
132
133 aXPoly.Insert(0, Point (2400*5, 1250*5), PolyFlags::Normal);
134 aXPoly.Insert(0, Point (2000*5, 1250*5), PolyFlags::Normal);
135 aXPoly.Insert(0, Point (1500*5, 1250*5), PolyFlags::Normal);
136 aXPoly.Insert(0, Point (1000*5, 1250*5), PolyFlags::Normal);
137 aXPoly.Insert(0, Point (500*5, 1250*5), PolyFlags::Normal);
138 aXPoly.Insert(0, Point (250*5, 1250*5), PolyFlags::Normal);
139 aXPoly.Insert(0, Point (50*5, 1250*5), PolyFlags::Normal);
140 aXPoly.Insert(0, Point (0, 1250*5), PolyFlags::Normal);
141
142 ::basegfx::B2DPolygon aB2DPolygon(aXPoly.getB2DPolygon());
143 if(aB2DPolygon.areControlPointsUsed())
144 {
145 aB2DPolygon = ::basegfx::utils::adaptiveSubdivideByAngle(aB2DPolygon);
146 }
147 p3DObj = new E3dLatheObj(
150 ::basegfx::B2DPolyPolygon(aB2DPolygon));
151 break;
152 }
153
154 case SID_3D_TORUS:
155 {
156 ::basegfx::B2DPolygon aB2DPolygon(::basegfx::utils::createPolygonFromCircle(::basegfx::B2DPoint(1000.0, 0.0), 500.0));
157 if(aB2DPolygon.areControlPointsUsed())
158 {
159 aB2DPolygon = ::basegfx::utils::adaptiveSubdivideByAngle(aB2DPolygon);
160 }
161 p3DObj = new E3dLatheObj(
164 ::basegfx::B2DPolyPolygon(aB2DPolygon));
165 break;
166 }
167
168 case SID_3D_CYLINDER:
169 {
170 ::basegfx::B2DPolygon aInnerPoly;
171
172 aInnerPoly.append(::basegfx::B2DPoint(0, 1000*5));
173 aInnerPoly.append(::basegfx::B2DPoint(50*5, 1000*5));
174 aInnerPoly.append(::basegfx::B2DPoint(100*5, 1000*5));
175 aInnerPoly.append(::basegfx::B2DPoint(200*5, 1000*5));
176 aInnerPoly.append(::basegfx::B2DPoint(300*5, 1000*5));
177 aInnerPoly.append(::basegfx::B2DPoint(400*5, 1000*5));
178 aInnerPoly.append(::basegfx::B2DPoint(450*5, 1000*5));
179 aInnerPoly.append(::basegfx::B2DPoint(500*5, 1000*5));
180 aInnerPoly.append(::basegfx::B2DPoint(500*5, -1000*5));
181 aInnerPoly.append(::basegfx::B2DPoint(450*5, -1000*5));
182 aInnerPoly.append(::basegfx::B2DPoint(400*5, -1000*5));
183 aInnerPoly.append(::basegfx::B2DPoint(300*5, -1000*5));
184 aInnerPoly.append(::basegfx::B2DPoint(200*5, -1000*5));
185 aInnerPoly.append(::basegfx::B2DPoint(100*5, -1000*5));
186 aInnerPoly.append(::basegfx::B2DPoint(50*5, -1000*5));
187 aInnerPoly.append(::basegfx::B2DPoint(0, -1000*5));
188 aInnerPoly.setClosed(true);
189
190 p3DObj = new E3dLatheObj(
193 ::basegfx::B2DPolyPolygon(aInnerPoly));
194 break;
195 }
196
197 case SID_3D_CONE:
198 {
199 ::basegfx::B2DPolygon aInnerPoly;
200
201 aInnerPoly.append(::basegfx::B2DPoint(0, -1000*5));
202 aInnerPoly.append(::basegfx::B2DPoint(25*5, -900*5));
203 aInnerPoly.append(::basegfx::B2DPoint(50*5, -800*5));
204 aInnerPoly.append(::basegfx::B2DPoint(100*5, -600*5));
205 aInnerPoly.append(::basegfx::B2DPoint(200*5, -200*5));
206 aInnerPoly.append(::basegfx::B2DPoint(300*5, 200*5));
207 aInnerPoly.append(::basegfx::B2DPoint(400*5, 600*5));
208 aInnerPoly.append(::basegfx::B2DPoint(500*5, 1000*5));
209 aInnerPoly.append(::basegfx::B2DPoint(400*5, 1000*5));
210 aInnerPoly.append(::basegfx::B2DPoint(300*5, 1000*5));
211 aInnerPoly.append(::basegfx::B2DPoint(200*5, 1000*5));
212 aInnerPoly.append(::basegfx::B2DPoint(100*5, 1000*5));
213 aInnerPoly.append(::basegfx::B2DPoint(50*5, 1000*5));
214 aInnerPoly.append(::basegfx::B2DPoint(0, 1000*5));
215 aInnerPoly.setClosed(true);
216
217 p3DObj = new E3dLatheObj(
220 ::basegfx::B2DPolyPolygon(aInnerPoly));
221 break;
222 }
223
224 case SID_3D_PYRAMID:
225 {
226 ::basegfx::B2DPolygon aInnerPoly;
227
228 aInnerPoly.append(::basegfx::B2DPoint(0, -1000*5));
229 aInnerPoly.append(::basegfx::B2DPoint(25*5, -900*5));
230 aInnerPoly.append(::basegfx::B2DPoint(50*5, -800*5));
231 aInnerPoly.append(::basegfx::B2DPoint(100*5, -600*5));
232 aInnerPoly.append(::basegfx::B2DPoint(200*5, -200*5));
233 aInnerPoly.append(::basegfx::B2DPoint(300*5, 200*5));
234 aInnerPoly.append(::basegfx::B2DPoint(400*5, 600*5));
235 aInnerPoly.append(::basegfx::B2DPoint(500*5, 1000*5));
236 aInnerPoly.append(::basegfx::B2DPoint(400*5, 1000*5));
237 aInnerPoly.append(::basegfx::B2DPoint(300*5, 1000*5));
238 aInnerPoly.append(::basegfx::B2DPoint(200*5, 1000*5));
239 aInnerPoly.append(::basegfx::B2DPoint(100*5, 1000*5));
240 aInnerPoly.append(::basegfx::B2DPoint(50*5, 1000*5));
241 aInnerPoly.append(::basegfx::B2DPoint(0, 1000*5));
242 aInnerPoly.setClosed(true);
243
244 p3DObj = new E3dLatheObj(
247 ::basegfx::B2DPolyPolygon(aInnerPoly));
248 p3DObj->SetMergedItem(makeSvx3DHorizontalSegmentsItem(4));
249 break;
250 }
251 }
252
253 return p3DObj;
254}
255
257{
258 Camera3D aCamera = pScene->GetCamera ();
259
260 // get transformed BoundVolume of the new object
261 basegfx::B3DRange aBoundVol;
262 basegfx::B3DRange aObjVol(p3DObj->GetBoundVolume());
263 aObjVol.transform(p3DObj->GetTransform());
264 aBoundVol.expand(aObjVol);
265 double fDeepth(aBoundVol.getDepth());
266
267 aCamera.SetPRP(::basegfx::B3DPoint(0.0, 0.0, 1000.0));
268 aCamera.SetPosition(::basegfx::B3DPoint(0.0, 0.0, mpView->GetDefaultCamPosZ() + fDeepth / 2));
270 pScene->SetCamera(aCamera);
271 basegfx::B3DHomMatrix aTransformation;
272
273 switch (nSlotId)
274 {
275 case SID_3D_CUBE:
276 {
277 aTransformation.rotate(basegfx::deg2rad(20), 0.0, 0.0);
278 }
279 break;
280
281 case SID_3D_SPHERE:
282 {
283 }
284 break;
285
286 case SID_3D_SHELL:
287 case SID_3D_HALF_SPHERE:
288 {
289 aTransformation.rotate(basegfx::deg2rad(200), 0.0, 0.0);
290 }
291 break;
292
293 case SID_3D_CYLINDER:
294 case SID_3D_CONE:
295 case SID_3D_PYRAMID:
296 {
297 }
298 break;
299
300 case SID_3D_TORUS:
301 {
302 aTransformation.rotate(basegfx::deg2rad(90), 0.0, 0.0);
303 }
304 break;
305
306 default:
307 {
308 }
309 break;
310 }
311
312 pScene->SetTransform(aTransformation * pScene->GetTransform());
313
314 SfxItemSet aAttr (mpViewShell->GetPool());
315 pScene->SetMergedItemSetAndBroadcast(aAttr);
316}
317
319{
320 bool bReturn = FuConstruct::MouseButtonDown(rMEvt);
321
322 if ( rMEvt.IsLeft() && !mpView->IsAction() )
323 {
324 Point aPnt( mpWindow->PixelToLogic( rMEvt.GetPosPixel() ) );
325
326 mpWindow->CaptureMouse();
327 sal_uInt16 nDrgLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(mpView->GetDragThresholdPixels(),0)).Width() );
328
330
332 rtl::Reference<E3dScene> pScene = mpView->SetCurrent3DObj(p3DObj.get());
333
334 ImpPrepareBasic3DShape(p3DObj.get(), pScene.get());
335 bReturn = mpView->BegCreatePreparedObject(aPnt, nDrgLog, pScene.get());
336
337 SdrObject* pObj = mpView->GetCreateObj();
338
339 if (pObj)
340 {
341 SfxItemSet aAttr(mpDoc->GetPool());
342 SetStyleSheet(aAttr, pObj);
343
344 // extract LineStyle
345 aAttr.Put(XLineStyleItem (drawing::LineStyle_NONE));
346
347 pObj->SetMergedItemSet(aAttr);
348 }
349 }
350
351 return bReturn;
352}
353
355{
357 return false;
358
359 bool bReturn = false;
360
361 if ( mpView->IsCreateObj() && rMEvt.IsLeft() )
362 {
363 if( mpView->EndCreateObj( SdrCreateCmd::ForceEnd ) )
364 {
365 bReturn = true;
366 }
367 else
368 {
369 //Drag was too small to create object, so insert default object at click pos
370 Point aClickPos(mpWindow->PixelToLogic(rMEvt.GetPosPixel()));
371 sal_uInt32 nDefaultObjectSize(1000);
372 sal_Int32 nCenterOffset(-sal_Int32(nDefaultObjectSize / 2));
373 aClickPos.AdjustX(nCenterOffset);
374 aClickPos.AdjustY(nCenterOffset);
375
377
378 if(mpView->IsSnapEnabled())
379 aClickPos = mpView->GetSnapPos(aClickPos, pPV);
380
381 ::tools::Rectangle aNewObjectRectangle(aClickPos, Size(nDefaultObjectSize, nDefaultObjectSize));
382 rtl::Reference<SdrObject> pObjDefault = CreateDefaultObject(nSlotId, aNewObjectRectangle);
383
384 bReturn = mpView->InsertObjectAtView(pObjDefault.get(), *pPV);
385 }
386 }
387 bReturn = FuConstruct::MouseButtonUp(rMEvt) || bReturn;
388
389 if (!bPermanent)
390 mpViewShell->GetViewFrame()->GetDispatcher()->Execute(SID_OBJECT_SELECT, SfxCallMode::ASYNCHRON);
391
392 return bReturn;
393}
394
396{
397 mpView->SetCurrentObj(SdrObjKind::NONE);
398
400}
401
402rtl::Reference<SdrObject> FuConstruct3dObject::CreateDefaultObject(const sal_uInt16 nID, const ::tools::Rectangle& rRectangle)
403{
404
406
407 // E3dView::SetCurrent3DObj part
408 // get transformed BoundVolume of the object
409 basegfx::B3DRange aObjVol(p3DObj->GetBoundVolume());
410 aObjVol.transform(p3DObj->GetTransform());
411 basegfx::B3DRange aVolume(aObjVol);
412 double fW(aVolume.getWidth());
413 double fH(aVolume.getHeight());
414 ::tools::Rectangle a3DRect(0, 0, static_cast<::tools::Long>(fW), static_cast<::tools::Long>(fH));
416
417 // copied code from E3dView::InitScene
418 double fCamZ(aVolume.getMaxZ() + ((fW + fH) / 4.0));
419 Camera3D aCam(pScene->GetCamera());
420 aCam.SetAutoAdjustProjection(false);
421 aCam.SetViewWindow(- fW / 2, - fH / 2, fW, fH);
422 ::basegfx::B3DPoint aLookAt;
423 double fDefaultCamPosZ = mpView->GetDefaultCamPosZ();
424 ::basegfx::B3DPoint aCamPos(0.0, 0.0, fCamZ < fDefaultCamPosZ ? fDefaultCamPosZ : fCamZ);
425 aCam.SetPosAndLookAt(aCamPos, aLookAt);
427 pScene->SetCamera(aCam);
428 pScene->InsertObject(p3DObj.get());
429 pScene->NbcSetSnapRect(a3DRect);
430 ImpPrepareBasic3DShape(p3DObj.get(), pScene.get());
431 SfxItemSet aAttr(mpDoc->GetPool());
432 SetStyleSheet(aAttr, p3DObj.get());
433 aAttr.Put(XLineStyleItem (drawing::LineStyle_NONE));
434 p3DObj->SetMergedItemSet(aAttr);
435
436 // make object interactive at once
437 pScene->SetBoundAndSnapRectsDirty();
438
439 // Take care of restrictions for the rectangle
440 ::tools::Rectangle aRect(rRectangle);
441
442 switch(nID)
443 {
444 case SID_3D_CUBE:
445 case SID_3D_SPHERE:
446 case SID_3D_TORUS:
447 {
448 // force quadratic
449 ImpForceQuadratic(aRect);
450 break;
451 }
452
453 case SID_3D_SHELL:
454 case SID_3D_HALF_SPHERE:
455 {
456 // force horizontal layout
457 break;
458 }
459
460 case SID_3D_CYLINDER:
461 case SID_3D_CONE:
462 case SID_3D_PYRAMID:
463 {
464 // force vertical layout
465 break;
466 }
467 }
468
469 // use changed rectangle, not original one
470 pScene->SetLogicRect(aRect);
471
472 return pScene;
473}
474
475} // end of namespace sd
476
477/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void SetAutoAdjustProjection(bool bAdjust)
void SetPosition(const basegfx::B3DPoint &rNewPos)
void SetFocalLength(double fLen)
void SetPosAndLookAt(const basegfx::B3DPoint &rNewPos, const basegfx::B3DPoint &rNewLookAt)
void SetViewWindow(double fX, double fY, double fW, double fH)
const basegfx::B3DRange & GetBoundVolume() const
const basegfx::B3DHomMatrix & GetTransform() const
virtual void SetTransform(const basegfx::B3DHomMatrix &rMatrix) override
void SetCamera(const Camera3D &rNewCamera)
const Camera3D & GetCamera() const
E3dDefaultAttributes & Get3DDefaultAttributes()
rtl::Reference< E3dScene > SetCurrent3DObj(E3dObject *p3DObj)
double GetDefaultCamFocal()
double GetDefaultCamPosZ()
const Point & GetPosPixel() const
bool IsLeft() const
tools::Long AdjustY(tools::Long nVertMove)
tools::Long AdjustX(tools::Long nHorzMove)
SAL_DLLPRIVATE SfxItemPool & GetPool()
Definition: drawdoc.hxx:237
bool IsCreateObj() const
bool BegCreatePreparedObject(const Point &rPnt, sal_Int16 nMinMov, SdrObject *pPreparedFactoryObject)
bool EndCreateObj(SdrCreateCmd eCmd)
virtual bool IsAction() const override
void SetCurrentObj(SdrObjKind nIdent, SdrInventor nInvent=SdrInventor::Default)
SdrObject * GetCreateObj() const
sal_Int32 GetDragThresholdPixels() const
bool InsertObjectAtView(SdrObject *pObj, SdrPageView &rPV, SdrInsertFlags nOptions=SdrInsertFlags::NONE)
void SetMergedItemSet(const SfxItemSet &rSet, bool bClearAllItems=false)
void SetMergedItemSetAndBroadcast(const SfxItemSet &rSet, bool bClearAllItems=false)
SdrModel & getSdrModelFromSdrView() const
SdrPageView * GetSdrPageView() const
bool IsSnapEnabled() const
Point GetSnapPos(const Point &rPnt, const SdrPageView *pPV) const
const SfxPoolItem * Execute(sal_uInt16 nSlot, SfxCallMode nCall=SfxCallMode::SLOT, const SfxPoolItem **pArgs=nullptr, sal_uInt16 nModi=0, const SfxPoolItem **pInternalArgs=nullptr)
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
SfxItemPool & GetPool() const
SfxDispatcher * GetDispatcher()
void SetPRP(const basegfx::B3DPoint &rNewPRP)
void Insert(sal_uInt16 nPos, const Point &rPt, PolyFlags eFlags)
void Scale(double fSx, double fSy)
basegfx::B2DPolygon getB2DPolygon() const
bool areControlPointsUsed() const
void append(const basegfx::B2DPoint &rPoint, sal_uInt32 nCount)
void setClosed(bool bNew)
void rotate(double fAngleX, double fAngleY, double fAngleZ)
BASEGFX_DLLPUBLIC void transform(const B3DHomMatrix &rMatrix)
double getHeight() const
double getMaxZ() const
void expand(const B3DTuple &rTuple)
double getDepth() const
double getWidth() const
virtual void DoExecute(SfxRequest &rReq) override
Definition: fucon3d.cxx:72
virtual rtl::Reference< SdrObject > CreateDefaultObject(const sal_uInt16 nID, const ::tools::Rectangle &rRectangle) override
Definition: fucon3d.cxx:402
static rtl::Reference< FuPoor > Create(ViewShell *pViewSh, ::sd::Window *pWin, ::sd::View *pView, SdDrawDocument *pDoc, SfxRequest &rReq, bool bPermanent)
Definition: fucon3d.cxx:63
virtual bool MouseButtonDown(const MouseEvent &rMEvt) override
Definition: fucon3d.cxx:318
rtl::Reference< E3dCompoundObject > ImpCreateBasic3DShape()
Definition: fucon3d.cxx:80
void ImpPrepareBasic3DShape(E3dCompoundObject const *p3DObj, E3dScene *pScene)
Definition: fucon3d.cxx:256
virtual bool MouseButtonUp(const MouseEvent &rMEvt) override
Definition: fucon3d.cxx:354
FuConstruct3dObject(ViewShell *pViewSh, ::sd::Window *pWin, ::sd::View *pView, SdDrawDocument *pDoc, SfxRequest &rReq)
Definition: fucon3d.cxx:53
virtual void Activate() override
activates the function
Definition: fucon3d.cxx:395
virtual bool MouseButtonUp(const MouseEvent &rMEvt) override
Definition: fuconstr.cxx:128
virtual bool MouseButtonDown(const MouseEvent &rMEvt) override
Definition: fuconstr.cxx:64
virtual void Activate() override
activates the function
Definition: fuconstr.cxx:221
void SetStyleSheet(SfxItemSet &rAttr, SdrObject *pObj)
set style sheet for the object to be created
Definition: fuconstr.cxx:249
bool IsIgnoreUnexpectedMouseButtonUp()
Definition: fuconstr.cxx:233
bool bPermanent
Definition: fudraw.hxx:76
void SetPermanent(bool bSet)
Definition: fudraw.hxx:52
SdDrawDocument * mpDoc
Definition: fupoor.hxx:148
VclPtr< ::sd::Window > mpWindow
Definition: fupoor.hxx:146
static void ImpForceQuadratic(::tools::Rectangle &rRect)
Definition: fupoor.cxx:1018
ViewShell * mpViewShell
Definition: fupoor.hxx:145
sal_uInt16 nSlotId
Definition: fupoor.hxx:150
::sd::View * mpView
Definition: fupoor.hxx:144
virtual void DoExecute(SfxRequest &rReq)
Definition: fupoor.cxx:1129
static constexpr OUStringLiteral msDrawingObjectToolBar
std::shared_ptr< ToolBarManager > const & GetToolBarManager() const
Base class of the stacked shell hierarchy.
Definition: ViewShell.hxx:92
SD_DLLPUBLIC weld::Window * GetFrameWeld() const
Definition: viewshel.cxx:1582
SD_DLLPUBLIC ViewShellBase & GetViewShellBase() const
Definition: viewshel.cxx:1397
SD_DLLPUBLIC SfxViewFrame * GetViewFrame() const
Definition: viewshel.cxx:118
An SdWindow contains the actual working area of ViewShell.
Definition: Window.hxx:45
constexpr double deg2rad(double v)
constexpr int nCenterOffset
long Long
SfxBoolItem makeSvx3DDoubleSidedItem(bool bVal)
SfxUInt32Item makeSvx3DHorizontalSegmentsItem(sal_uInt32 nVal)