chart2/source/controller/dialogs/tp_PointGeometry.cxx | 2 include/svx/extrud3d.hxx | 2 include/svx/lathe3d.hxx | 6 +- include/svx/scene3d.hxx | 4 - include/svx/sphere3d.hxx | 4 - include/svx/svx3ditems.hxx | 40 +++++++----------- sd/source/ui/func/fucon3d.cxx | 2 svx/source/engine3d/extrud3d.cxx | 2 svx/source/engine3d/float3d.cxx | 24 +++++----- svx/source/engine3d/lathe3d.cxx | 4 - svx/source/engine3d/svx3ditems.cxx | 24 ---------- svx/source/engine3d/view3d1.cxx | 4 - svx/source/sdr/primitive2d/sdrattributecreator.cxx | 2 svx/source/sdr/properties/e3dsceneproperties.cxx | 4 - svx/source/svdraw/svdattr.cxx | 12 ++--- svx/source/unodraw/unoshap3.cxx | 2 16 files changed, 54 insertions(+), 84 deletions(-)
New commits: commit bebe30e917ebd3bd0ce43efca737caa478fddaee Author: Stephan Bergmann <sberg...@redhat.com> Date: Mon Sep 1 13:37:27 2014 +0200 Consistency around SfxUInt32Item in svx/svx3ditems.hxx ...similar to what has been done for svx/sdtmfitm.hxx in 68969cc61adecac481ae9656978ef952f435b310 "Consistency around SdrMetricItem." Change-Id: I3193eab34a34c051002adeedd8b368e26f55f7a3 diff --git a/chart2/source/controller/dialogs/tp_PointGeometry.cxx b/chart2/source/controller/dialogs/tp_PointGeometry.cxx index 5bd37ab..5456b69 100644 --- a/chart2/source/controller/dialogs/tp_PointGeometry.cxx +++ b/chart2/source/controller/dialogs/tp_PointGeometry.cxx @@ -60,7 +60,7 @@ bool SchLayoutTabPage::FillItemSet(SfxItemSet* rOutAttrs) nSegs=4; rOutAttrs->Put(SfxInt32Item(SCHATTR_STYLE_SHAPE,nShape)); - rOutAttrs->Put(Svx3DHorizontalSegmentsItem(nSegs)); + rOutAttrs->Put(makeSvx3DHorizontalSegmentsItem(nSegs)); } return true; } diff --git a/include/svx/extrud3d.hxx b/include/svx/extrud3d.hxx index 844d94e..053f0e9 100644 --- a/include/svx/extrud3d.hxx +++ b/include/svx/extrud3d.hxx @@ -59,7 +59,7 @@ public: // BackScale: 0..100, before 0.0..1.0 sal_uInt32 GetExtrudeDepth() const - { return ((const Svx3DDepthItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_DEPTH)).GetValue(); } + { return ((const SfxUInt32Item&)GetObjectItemSet().Get(SDRATTR_3DOBJ_DEPTH)).GetValue(); } // #107245# GetSmoothNormals() for bExtrudeSmoothed bool GetSmoothNormals() const diff --git a/include/svx/lathe3d.hxx b/include/svx/lathe3d.hxx index 6eb3854..c1bbf1b 100644 --- a/include/svx/lathe3d.hxx +++ b/include/svx/lathe3d.hxx @@ -52,11 +52,11 @@ private: // HorizontalSegments: sal_uInt32 GetHorizontalSegments() const - { return ((const Svx3DHorizontalSegmentsItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_HORZ_SEGS)).GetValue(); } + { return ((const SfxUInt32Item&)GetObjectItemSet().Get(SDRATTR_3DOBJ_HORZ_SEGS)).GetValue(); } // VerticalSegments: sal_uInt32 GetVerticalSegments() const - { return ((const Svx3DVerticalSegmentsItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_VERT_SEGS)).GetValue(); } + { return ((const SfxUInt32Item&)GetObjectItemSet().Get(SDRATTR_3DOBJ_VERT_SEGS)).GetValue(); } // PercentDiagonal: 0..100, before 0.0..0.5 sal_uInt16 GetPercentDiagonal() const @@ -68,7 +68,7 @@ private: // EndAngle: 0..10000 sal_uInt32 GetEndAngle() const - { return ((const Svx3DEndAngleItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_END_ANGLE)).GetValue(); } + { return ((const SfxUInt32Item&)GetObjectItemSet().Get(SDRATTR_3DOBJ_END_ANGLE)).GetValue(); } // #107245# GetSmoothNormals() for bLatheSmoothed bool GetSmoothNormals() const diff --git a/include/svx/scene3d.hxx b/include/svx/scene3d.hxx index eb19807..e7a7419 100644 --- a/include/svx/scene3d.hxx +++ b/include/svx/scene3d.hxx @@ -108,11 +108,11 @@ public: // Distance: double GetDistance() const - { return (double)((const Svx3DDistanceItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_DISTANCE)).GetValue(); } + { return (double)((const SfxUInt32Item&)GetObjectItemSet().Get(SDRATTR_3DSCENE_DISTANCE)).GetValue(); } // Focal length: before cm, now 1/10th mm (*100) double GetFocalLength() const - { return ((const Svx3DFocalLengthItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_FOCAL_LENGTH)).GetValue(); } + { return ((const SfxUInt32Item&)GetObjectItemSet().Get(SDRATTR_3DSCENE_FOCAL_LENGTH)).GetValue(); } // Two sided lighting: bool GetTwoSidedLighting() const diff --git a/include/svx/sphere3d.hxx b/include/svx/sphere3d.hxx index 0023d6f..348fbc5 100644 --- a/include/svx/sphere3d.hxx +++ b/include/svx/sphere3d.hxx @@ -49,11 +49,11 @@ public: // horizontal segments: sal_uInt32 GetHorizontalSegments() const - { return ((const Svx3DHorizontalSegmentsItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_HORZ_SEGS)).GetValue(); } + { return ((const SfxUInt32Item&)GetObjectItemSet().Get(SDRATTR_3DOBJ_HORZ_SEGS)).GetValue(); } // VerticalSegments: sal_uInt32 GetVerticalSegments() const - { return ((const Svx3DVerticalSegmentsItem&)GetObjectItemSet().Get(SDRATTR_3DOBJ_VERT_SEGS)).GetValue(); } + { return ((const SfxUInt32Item&)GetObjectItemSet().Get(SDRATTR_3DOBJ_VERT_SEGS)).GetValue(); } virtual sal_uInt16 GetObjIdentifier() const SAL_OVERRIDE; virtual SdrObject* DoConvertToPolyObj(bool bBezier, bool bAddText) const SAL_OVERRIDE; diff --git a/include/svx/svx3ditems.hxx b/include/svx/svx3ditems.hxx index 9e63e24..8878bc1 100644 --- a/include/svx/svx3ditems.hxx +++ b/include/svx/svx3ditems.hxx @@ -40,25 +40,21 @@ public: SVX_DLLPUBLIC Svx3DBackscaleItem(sal_uInt16 nVal = 100); }; -class Svx3DDepthItem : public SfxUInt32Item { -public: - SVX_DLLPUBLIC Svx3DDepthItem(sal_uInt32 nVal = 1000); -}; +inline SfxUInt32Item makeSvx3DDepthItem(sal_uInt32 nVal) { + return SfxUInt32Item(SDRATTR_3DOBJ_DEPTH, nVal); +} -class SVX_DLLPUBLIC Svx3DHorizontalSegmentsItem : public SfxUInt32Item { -public: - Svx3DHorizontalSegmentsItem(sal_uInt32 nVal = 24); -}; +inline SfxUInt32Item makeSvx3DHorizontalSegmentsItem(sal_uInt32 nVal) { + return SfxUInt32Item(SDRATTR_3DOBJ_HORZ_SEGS, nVal); +} -class Svx3DVerticalSegmentsItem : public SfxUInt32Item { -public: - SVX_DLLPUBLIC Svx3DVerticalSegmentsItem(sal_uInt32 nVal = 24); -}; +inline SfxUInt32Item makeSvx3DVerticalSegmentsItem(sal_uInt32 nVal) { + return SfxUInt32Item(SDRATTR_3DOBJ_VERT_SEGS, nVal); +} -class Svx3DEndAngleItem : public SfxUInt32Item { -public: - SVX_DLLPUBLIC Svx3DEndAngleItem(sal_uInt32 nVal = 3600); -}; +inline SfxUInt32Item makeSvx3DEndAngleItem(sal_uInt32 nVal) { + return SfxUInt32Item(SDRATTR_3DOBJ_END_ANGLE, nVal); +} class SVX_DLLPUBLIC Svx3DDoubleSidedItem : public SfxBoolItem { public: @@ -170,14 +166,12 @@ public: SVX_DLLPRIVATE virtual SfxPoolItem* Clone(SfxItemPool* pPool = NULL) const SAL_OVERRIDE; }; -class Svx3DDistanceItem : public SfxUInt32Item { -public: - SVX_DLLPUBLIC Svx3DDistanceItem(sal_uInt32 nVal = 100); -}; +inline SfxUInt32Item makeSvx3DDistanceItem(sal_uInt32 nVal) { + return SfxUInt32Item(SDRATTR_3DSCENE_DISTANCE, nVal); +} -class Svx3DFocalLengthItem : public SfxUInt32Item { -public: - SVX_DLLPUBLIC Svx3DFocalLengthItem(sal_uInt32 nVal = 100); +inline SfxUInt32Item makeSvx3DFocalLengthItem(sal_uInt32 nVal) { + return SfxUInt32Item(SDRATTR_3DSCENE_FOCAL_LENGTH, nVal); }; class Svx3DTwoSidedLightingItem : public SfxBoolItem { diff --git a/sd/source/ui/func/fucon3d.cxx b/sd/source/ui/func/fucon3d.cxx index b1cb4d3..8a6ac35 100644 --- a/sd/source/ui/func/fucon3d.cxx +++ b/sd/source/ui/func/fucon3d.cxx @@ -227,7 +227,7 @@ E3dCompoundObject* FuConstruct3dObject::ImpCreateBasic3DShape() aInnerPoly.setClosed(true); p3DObj = new E3dLatheObj(mpView->Get3DDefaultAttributes(), ::basegfx::B2DPolyPolygon(aInnerPoly)); - p3DObj->SetMergedItem(Svx3DHorizontalSegmentsItem(4)); + p3DObj->SetMergedItem(makeSvx3DHorizontalSegmentsItem(4)); break; } } diff --git a/svx/source/engine3d/extrud3d.cxx b/svx/source/engine3d/extrud3d.cxx index 9219be6..fbab773 100644 --- a/svx/source/engine3d/extrud3d.cxx +++ b/svx/source/engine3d/extrud3d.cxx @@ -72,7 +72,7 @@ E3dExtrudeObj::E3dExtrudeObj(E3dDefaultAttributes& rDefault, const basegfx::B2DP SetDefaultAttributes(rDefault); // set extrude depth - GetProperties().SetObjectItemDirect(Svx3DDepthItem((sal_uInt32)(fDepth + 0.5))); + GetProperties().SetObjectItemDirect(makeSvx3DDepthItem((sal_uInt32)(fDepth + 0.5))); } E3dExtrudeObj::E3dExtrudeObj() diff --git a/svx/source/engine3d/float3d.cxx b/svx/source/engine3d/float3d.cxx index d0c259d..e37855f 100644 --- a/svx/source/engine3d/float3d.cxx +++ b/svx/source/engine3d/float3d.cxx @@ -632,7 +632,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) eState = rAttrs.GetItemState(SDRATTR_3DOBJ_HORZ_SEGS); if(eState != SFX_ITEM_DONTCARE) { - sal_uInt32 nValue = ((const Svx3DHorizontalSegmentsItem&)rAttrs.Get(SDRATTR_3DOBJ_HORZ_SEGS)).GetValue(); + sal_uInt32 nValue = ((const SfxUInt32Item&)rAttrs.Get(SDRATTR_3DOBJ_HORZ_SEGS)).GetValue(); if(nValue != (sal_uInt32 )aNumHorizontal.GetValue()) { aNumHorizontal.SetValue( nValue ); @@ -657,7 +657,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) eState = rAttrs.GetItemState(SDRATTR_3DOBJ_VERT_SEGS); if( eState != SFX_ITEM_DONTCARE ) { - sal_uInt32 nValue = ((const Svx3DVerticalSegmentsItem&)rAttrs.Get(SDRATTR_3DOBJ_VERT_SEGS)).GetValue(); + sal_uInt32 nValue = ((const SfxUInt32Item&)rAttrs.Get(SDRATTR_3DOBJ_VERT_SEGS)).GetValue(); if( nValue != (sal_uInt32) aNumVertical.GetValue() ) { aNumVertical.SetValue( nValue ); @@ -682,7 +682,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) eState = rAttrs.GetItemState(SDRATTR_3DOBJ_DEPTH); if( eState != SFX_ITEM_DONTCARE ) { - sal_uInt32 nValue = ((const Svx3DDepthItem&)rAttrs.Get(SDRATTR_3DOBJ_DEPTH)).GetValue(); + sal_uInt32 nValue = ((const SfxUInt32Item&)rAttrs.Get(SDRATTR_3DOBJ_DEPTH)).GetValue(); sal_uInt32 nValue2 = GetCoreValue( aMtrDepth, ePoolUnit ); if( nValue != nValue2 ) { @@ -783,7 +783,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) eState = rAttrs.GetItemState(SDRATTR_3DOBJ_END_ANGLE); if( eState != SFX_ITEM_DONTCARE ) { - sal_Int32 nValue = ((const Svx3DEndAngleItem&)rAttrs.Get(SDRATTR_3DOBJ_END_ANGLE)).GetValue(); + sal_Int32 nValue = ((const SfxUInt32Item&)rAttrs.Get(SDRATTR_3DOBJ_END_ANGLE)).GetValue(); if( nValue != aMtrEndAngle.GetValue() ) { aMtrEndAngle.SetValue( nValue ); @@ -942,7 +942,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_DISTANCE); if( eState != SFX_ITEM_DONTCARE ) { - sal_uInt32 nValue = ((const Svx3DDistanceItem&)rAttrs.Get(SDRATTR_3DSCENE_DISTANCE)).GetValue(); + sal_uInt32 nValue = ((const SfxUInt32Item&)rAttrs.Get(SDRATTR_3DSCENE_DISTANCE)).GetValue(); sal_uInt32 nValue2 = GetCoreValue( aMtrDistance, ePoolUnit ); if( nValue != nValue2 ) { @@ -966,7 +966,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_FOCAL_LENGTH); if( eState != SFX_ITEM_DONTCARE ) { - sal_uInt32 nValue = ((const Svx3DFocalLengthItem&)rAttrs.Get(SDRATTR_3DSCENE_FOCAL_LENGTH)).GetValue(); + sal_uInt32 nValue = ((const SfxUInt32Item&)rAttrs.Get(SDRATTR_3DSCENE_FOCAL_LENGTH)).GetValue(); sal_uInt32 nValue2 = GetCoreValue( aMtrFocalLength, ePoolUnit ); if( nValue != nValue2 ) { @@ -1756,7 +1756,7 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs ) if( !aNumHorizontal.IsEmptyFieldValue() ) { sal_uInt32 nValue = static_cast<sal_uInt32>(aNumHorizontal.GetValue()); - rAttrs.Put(Svx3DHorizontalSegmentsItem(nValue)); + rAttrs.Put(makeSvx3DHorizontalSegmentsItem(nValue)); } else rAttrs.InvalidateItem(SDRATTR_3DOBJ_HORZ_SEGS); @@ -1765,7 +1765,7 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs ) if( !aNumVertical.IsEmptyFieldValue() ) { sal_uInt32 nValue = static_cast<sal_uInt32>(aNumVertical.GetValue()); - rAttrs.Put(Svx3DVerticalSegmentsItem(nValue)); + rAttrs.Put(makeSvx3DVerticalSegmentsItem(nValue)); } else rAttrs.InvalidateItem(SDRATTR_3DOBJ_VERT_SEGS); @@ -1774,7 +1774,7 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs ) if( !aMtrDepth.IsEmptyFieldValue() ) { sal_uInt32 nValue = GetCoreValue( aMtrDepth, ePoolUnit ); - rAttrs.Put(Svx3DDepthItem(nValue)); + rAttrs.Put(makeSvx3DDepthItem(nValue)); } else rAttrs.InvalidateItem(SDRATTR_3DOBJ_DEPTH); @@ -1811,7 +1811,7 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs ) if( !aMtrEndAngle.IsEmptyFieldValue() ) { sal_uInt16 nValue = (sal_uInt16)aMtrEndAngle.GetValue(); - rAttrs.Put(Svx3DEndAngleItem(nValue)); + rAttrs.Put(makeSvx3DEndAngleItem(nValue)); } else rAttrs.InvalidateItem(SDRATTR_3DOBJ_END_ANGLE); @@ -1887,7 +1887,7 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs ) if( !aMtrDistance.IsEmptyFieldValue() ) { sal_uInt32 nValue2 = GetCoreValue( aMtrDistance, ePoolUnit ); - rAttrs.Put(Svx3DDistanceItem(nValue2)); + rAttrs.Put(makeSvx3DDistanceItem(nValue2)); } else rAttrs.InvalidateItem(SDRATTR_3DSCENE_DISTANCE); @@ -1896,7 +1896,7 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs ) if( !aMtrFocalLength.IsEmptyFieldValue() ) { sal_uInt32 nValue2 = GetCoreValue( aMtrFocalLength, ePoolUnit ); - rAttrs.Put(Svx3DFocalLengthItem(nValue2)); + rAttrs.Put(makeSvx3DFocalLengthItem(nValue2)); } else rAttrs.InvalidateItem(SDRATTR_3DSCENE_FOCAL_LENGTH); diff --git a/svx/source/engine3d/lathe3d.cxx b/svx/source/engine3d/lathe3d.cxx index 939e947..1950a7e 100644 --- a/svx/source/engine3d/lathe3d.cxx +++ b/svx/source/engine3d/lathe3d.cxx @@ -82,7 +82,7 @@ E3dLatheObj::E3dLatheObj(E3dDefaultAttributes& rDefault, const basegfx::B2DPolyP nSegCnt -= 1; } - GetProperties().SetObjectItemDirect(Svx3DVerticalSegmentsItem(nSegCnt)); + GetProperties().SetObjectItemDirect(makeSvx3DVerticalSegmentsItem(nSegCnt)); } } @@ -139,7 +139,7 @@ void E3dLatheObj::SetPolyPoly2D(const basegfx::B2DPolyPolygon& rNew) nSegCnt -= 1; } - GetProperties().SetObjectItemDirect(Svx3DVerticalSegmentsItem(nSegCnt)); + GetProperties().SetObjectItemDirect(makeSvx3DVerticalSegmentsItem(nSegCnt)); } ActionChanged(); diff --git a/svx/source/engine3d/svx3ditems.cxx b/svx/source/engine3d/svx3ditems.cxx index 68ca6f81..ee743cf 100644 --- a/svx/source/engine3d/svx3ditems.cxx +++ b/svx/source/engine3d/svx3ditems.cxx @@ -40,22 +40,6 @@ Svx3DBackscaleItem::Svx3DBackscaleItem(sal_uInt16 nVal) : SfxUInt16Item(SDRATTR_3DOBJ_BACKSCALE, nVal) {} -Svx3DDepthItem::Svx3DDepthItem(sal_uInt32 nVal) -: SfxUInt32Item(SDRATTR_3DOBJ_DEPTH, nVal) -{} - -Svx3DHorizontalSegmentsItem::Svx3DHorizontalSegmentsItem(sal_uInt32 nVal) -: SfxUInt32Item(SDRATTR_3DOBJ_HORZ_SEGS, nVal) -{} - -Svx3DVerticalSegmentsItem::Svx3DVerticalSegmentsItem(sal_uInt32 nVal) -: SfxUInt32Item(SDRATTR_3DOBJ_VERT_SEGS, nVal) -{} - -Svx3DEndAngleItem::Svx3DEndAngleItem(sal_uInt32 nVal) -: SfxUInt32Item(SDRATTR_3DOBJ_END_ANGLE, nVal) -{} - Svx3DDoubleSidedItem::Svx3DDoubleSidedItem(bool bVal) : SfxBoolItem(SDRATTR_3DOBJ_DOUBLE_SIDED, bVal) {} @@ -140,14 +124,6 @@ Svx3DPerspectiveItem::Svx3DPerspectiveItem(sal_uInt16 nVal) : SfxUInt16Item(SDRATTR_3DSCENE_PERSPECTIVE, nVal) {} -Svx3DDistanceItem::Svx3DDistanceItem(sal_uInt32 nVal) -: SfxUInt32Item(SDRATTR_3DSCENE_DISTANCE, nVal) -{} - -Svx3DFocalLengthItem::Svx3DFocalLengthItem(sal_uInt32 nVal) -: SfxUInt32Item(SDRATTR_3DSCENE_FOCAL_LENGTH, nVal) -{} - Svx3DTwoSidedLightingItem::Svx3DTwoSidedLightingItem(bool bVal) : SfxBoolItem(SDRATTR_3DSCENE_TWO_SIDED_LIGHTING, bVal) {} diff --git a/svx/source/engine3d/view3d1.cxx b/svx/source/engine3d/view3d1.cxx index 414faa5..6dd827d 100644 --- a/svx/source/engine3d/view3d1.cxx +++ b/svx/source/engine3d/view3d1.cxx @@ -142,8 +142,8 @@ SfxItemSet E3dView::Get3DAttributes(E3dScene* pInScene, bool /*bOnly3DAttr*/) co aSet.Put(XLineStyleItem (XLINE_NONE)); // new defaults for distance and focal length - aSet.Put(Svx3DDistanceItem(100)); - aSet.Put(Svx3DFocalLengthItem(10000)); + aSet.Put(makeSvx3DDistanceItem(100)); + aSet.Put(makeSvx3DFocalLengthItem(10000)); } // return ItemSet diff --git a/svx/source/sdr/primitive2d/sdrattributecreator.cxx b/svx/source/sdr/primitive2d/sdrattributecreator.cxx index 47019b7..bcb6495 100644 --- a/svx/source/sdr/primitive2d/sdrattributecreator.cxx +++ b/svx/source/sdr/primitive2d/sdrattributecreator.cxx @@ -888,7 +888,7 @@ namespace drawinglayer } // get distance - const double fDistance(((const Svx3DDistanceItem&)rSet.Get(SDRATTR_3DSCENE_DISTANCE)).GetValue()); + const double fDistance(((const SfxUInt32Item&)rSet.Get(SDRATTR_3DSCENE_DISTANCE)).GetValue()); // get shadow slant const double fShadowSlant(F_PI180 * ((const Svx3DShadowSlantItem&)rSet.Get(SDRATTR_3DSCENE_SHADOW_SLANT)).GetValue()); diff --git a/svx/source/sdr/properties/e3dsceneproperties.cxx b/svx/source/sdr/properties/e3dsceneproperties.cxx index 48dff57..9005d48 100644 --- a/svx/source/sdr/properties/e3dsceneproperties.cxx +++ b/svx/source/sdr/properties/e3dsceneproperties.cxx @@ -310,10 +310,10 @@ namespace sdr mpItemSet->Put(Svx3DPerspectiveItem((sal_uInt16)aSceneCam.GetProjection())); // CamPos - mpItemSet->Put(Svx3DDistanceItem((sal_uInt32)(aSceneCam.GetPosition().getZ() + 0.5))); + mpItemSet->Put(makeSvx3DDistanceItem((sal_uInt32)(aSceneCam.GetPosition().getZ() + 0.5))); // FocalLength - mpItemSet->Put(Svx3DFocalLengthItem((sal_uInt32)((aSceneCam.GetFocalLength() * 100.0) + 0.5))); + mpItemSet->Put(makeSvx3DFocalLengthItem((sal_uInt32)((aSceneCam.GetFocalLength() * 100.0) + 0.5))); } } // end of namespace properties } // end of namespace sdr diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx index 4dd3f77..228398c 100644 --- a/svx/source/svdraw/svdattr.cxx +++ b/svx/source/svdraw/svdattr.cxx @@ -249,10 +249,10 @@ SdrItemPool::SdrItemPool( mppLocalPoolDefaults[ SDRATTR_GRAFCROP - SDRATTR_START] = new SdrGrafCropItem; mppLocalPoolDefaults[ SDRATTR_3DOBJ_PERCENT_DIAGONAL - SDRATTR_START ] = new Svx3DPercentDiagonalItem; mppLocalPoolDefaults[ SDRATTR_3DOBJ_BACKSCALE - SDRATTR_START ] = new Svx3DBackscaleItem; - mppLocalPoolDefaults[ SDRATTR_3DOBJ_DEPTH - SDRATTR_START ] = new Svx3DDepthItem; - mppLocalPoolDefaults[ SDRATTR_3DOBJ_HORZ_SEGS - SDRATTR_START ] = new Svx3DHorizontalSegmentsItem; - mppLocalPoolDefaults[ SDRATTR_3DOBJ_VERT_SEGS - SDRATTR_START ] = new Svx3DVerticalSegmentsItem; - mppLocalPoolDefaults[ SDRATTR_3DOBJ_END_ANGLE - SDRATTR_START ] = new Svx3DEndAngleItem; + mppLocalPoolDefaults[ SDRATTR_3DOBJ_DEPTH - SDRATTR_START ] = new SfxUInt32Item(SDRATTR_3DOBJ_DEPTH, 1000); + mppLocalPoolDefaults[ SDRATTR_3DOBJ_HORZ_SEGS - SDRATTR_START ] = new SfxUInt32Item(SDRATTR_3DOBJ_HORZ_SEGS, 24); + mppLocalPoolDefaults[ SDRATTR_3DOBJ_VERT_SEGS - SDRATTR_START ] = new SfxUInt32Item(SDRATTR_3DOBJ_VERT_SEGS, 24); + mppLocalPoolDefaults[ SDRATTR_3DOBJ_END_ANGLE - SDRATTR_START ] = new SfxUInt32Item(SDRATTR_3DOBJ_END_ANGLE, 3600); mppLocalPoolDefaults[ SDRATTR_3DOBJ_DOUBLE_SIDED - SDRATTR_START ] = new Svx3DDoubleSidedItem; mppLocalPoolDefaults[ SDRATTR_3DOBJ_NORMALS_KIND - SDRATTR_START ] = new Svx3DNormalsKindItem; mppLocalPoolDefaults[ SDRATTR_3DOBJ_NORMALS_INVERT - SDRATTR_START ] = new Svx3DNormalsInvertItem; @@ -273,8 +273,8 @@ SdrItemPool::SdrItemPool( mppLocalPoolDefaults[ SDRATTR_3DOBJ_CLOSE_BACK - SDRATTR_START ] = new Svx3DCloseBackItem; mppLocalPoolDefaults[ SDRATTR_3DOBJ_REDUCED_LINE_GEOMETRY - SDRATTR_START ] = new Svx3DReducedLineGeometryItem; mppLocalPoolDefaults[ SDRATTR_3DSCENE_PERSPECTIVE - SDRATTR_START ] = new Svx3DPerspectiveItem; - mppLocalPoolDefaults[ SDRATTR_3DSCENE_DISTANCE - SDRATTR_START ] = new Svx3DDistanceItem; - mppLocalPoolDefaults[ SDRATTR_3DSCENE_FOCAL_LENGTH - SDRATTR_START ] = new Svx3DFocalLengthItem; + mppLocalPoolDefaults[ SDRATTR_3DSCENE_DISTANCE - SDRATTR_START ] = new SfxUInt32Item(SDRATTR_3DSCENE_DISTANCE, 100); + mppLocalPoolDefaults[ SDRATTR_3DSCENE_FOCAL_LENGTH - SDRATTR_START ] = new SfxUInt32Item(SDRATTR_3DSCENE_FOCAL_LENGTH, 100); mppLocalPoolDefaults[ SDRATTR_3DSCENE_TWO_SIDED_LIGHTING - SDRATTR_START ] = new Svx3DTwoSidedLightingItem; mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_1 - SDRATTR_START ] = new Svx3DLightcolor1Item; mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTCOLOR_2 - SDRATTR_START ] = new Svx3DLightcolor2Item; diff --git a/svx/source/unodraw/unoshap3.cxx b/svx/source/unodraw/unoshap3.cxx index 309b98c..3891eb8 100644 --- a/svx/source/unodraw/unoshap3.cxx +++ b/svx/source/unodraw/unoshap3.cxx @@ -840,7 +840,7 @@ bool Svx3DLatheObject::setPropertyValueImpl( const OUString& rName, const SfxIte if(nPrevVerticalSegs != nPostVerticalSegs) { // restore the vertical segment count - static_cast<E3dLatheObj*>(mpObj.get())->SetMergedItem(Svx3DVerticalSegmentsItem(nPrevVerticalSegs)); + static_cast<E3dLatheObj*>(mpObj.get())->SetMergedItem(makeSvx3DVerticalSegmentsItem(nPrevVerticalSegs)); } return true; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits