summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-09-01 16:46:59 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-09-01 16:46:59 +0200
commit148aea32a34fe816c7f1870bfb4cf361a5e81bf0 (patch)
tree7f452968a1d4cf26b062a099b99e6c726ceeb331
parente5d6ae0c2efcf8edb224faa294be6b0baa636137 (diff)
Consistency around SvxB3DVectorItem in svx/svx3ditems.hxx
...similar to what has been done for svx/sdtmfitm.hxx in 68969cc61adecac481ae9656978ef952f435b310 "Consistency around SdrMetricItem." Change-Id: I7f2348d82c76f6f231e34f0dfc4b6ee6fddffe55
-rw-r--r--chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx32
-rw-r--r--include/svx/scene3d.hxx16
-rw-r--r--include/svx/svx3ditems.hxx56
-rw-r--r--svx/source/customshapes/EnhancedCustomShape3d.cxx6
-rw-r--r--svx/source/dialog/dlgctl3d.cxx32
-rw-r--r--svx/source/engine3d/svx3ditems.cxx32
-rw-r--r--svx/source/sdr/primitive2d/sdrattributecreator.cxx16
-rw-r--r--svx/source/svdraw/svdattr.cxx16
8 files changed, 83 insertions, 123 deletions
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
index d3c3986c7ec9..27fb132dd420 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
+++ b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
@@ -351,42 +351,42 @@ IMPL_LINK_NOARG(ThreeD_SceneIllumination_TabPage, PreviewChangeHdl)
pInfo->aLightSource.nDiffuseColor = ((const SvxColorItem&)a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTCOLOR_1)).GetValue().GetColor();
pInfo->aLightSource.bIsEnabled = ((const SfxBoolItem&)a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTON_1)).GetValue();
- pInfo->aLightSource.aDirection = B3DVectorToDirection3D(((const Svx3DLightDirection1Item&)a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_1)).GetValue());
+ pInfo->aLightSource.aDirection = B3DVectorToDirection3D(((const SvxB3DVectorItem&)a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_1)).GetValue());
pInfo = &m_pLightSourceInfoList[1];
pInfo->aLightSource.nDiffuseColor = ((const SvxColorItem&)a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTCOLOR_2)).GetValue().GetColor();
pInfo->aLightSource.bIsEnabled = ((const SfxBoolItem&)a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTON_2)).GetValue();
- pInfo->aLightSource.aDirection = B3DVectorToDirection3D(((const Svx3DLightDirection2Item&)a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_2)).GetValue());
+ pInfo->aLightSource.aDirection = B3DVectorToDirection3D(((const SvxB3DVectorItem&)a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_2)).GetValue());
pInfo = &m_pLightSourceInfoList[2];
pInfo->aLightSource.nDiffuseColor = ((const SvxColorItem&)a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTCOLOR_3)).GetValue().GetColor();
pInfo->aLightSource.bIsEnabled = ((const SfxBoolItem&)a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTON_3)).GetValue();
- pInfo->aLightSource.aDirection = B3DVectorToDirection3D(((const Svx3DLightDirection3Item&)a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_3)).GetValue());
+ pInfo->aLightSource.aDirection = B3DVectorToDirection3D(((const SvxB3DVectorItem&)a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_3)).GetValue());
pInfo = &m_pLightSourceInfoList[3];
pInfo->aLightSource.nDiffuseColor = ((const SvxColorItem&)a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTCOLOR_4)).GetValue().GetColor();
pInfo->aLightSource.bIsEnabled = ((const SfxBoolItem&)a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTON_4)).GetValue();
- pInfo->aLightSource.aDirection = B3DVectorToDirection3D(((const Svx3DLightDirection4Item&)a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_4)).GetValue());
+ pInfo->aLightSource.aDirection = B3DVectorToDirection3D(((const SvxB3DVectorItem&)a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_4)).GetValue());
pInfo = &m_pLightSourceInfoList[4];
pInfo->aLightSource.nDiffuseColor = ((const SvxColorItem&)a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTCOLOR_5)).GetValue().GetColor();
pInfo->aLightSource.bIsEnabled = ((const SfxBoolItem&)a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTON_5)).GetValue();
- pInfo->aLightSource.aDirection = B3DVectorToDirection3D(((const Svx3DLightDirection5Item&)a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_5)).GetValue());
+ pInfo->aLightSource.aDirection = B3DVectorToDirection3D(((const SvxB3DVectorItem&)a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_5)).GetValue());
pInfo = &m_pLightSourceInfoList[5];
pInfo->aLightSource.nDiffuseColor = ((const SvxColorItem&)a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTCOLOR_6)).GetValue().GetColor();
pInfo->aLightSource.bIsEnabled = ((const SfxBoolItem&)a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTON_6)).GetValue();
- pInfo->aLightSource.aDirection = B3DVectorToDirection3D(((const Svx3DLightDirection6Item&)a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_6)).GetValue());
+ pInfo->aLightSource.aDirection = B3DVectorToDirection3D(((const SvxB3DVectorItem&)a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_6)).GetValue());
pInfo = &m_pLightSourceInfoList[6];
pInfo->aLightSource.nDiffuseColor = ((const SvxColorItem&)a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTCOLOR_7)).GetValue().GetColor();
pInfo->aLightSource.bIsEnabled = ((const SfxBoolItem&)a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTON_7)).GetValue();
- pInfo->aLightSource.aDirection = B3DVectorToDirection3D(((const Svx3DLightDirection7Item&)a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_7)).GetValue());
+ pInfo->aLightSource.aDirection = B3DVectorToDirection3D(((const SvxB3DVectorItem&)a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_7)).GetValue());
pInfo = &m_pLightSourceInfoList[7];
pInfo->aLightSource.nDiffuseColor = ((const SvxColorItem&)a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTCOLOR_8)).GetValue().GetColor();
pInfo->aLightSource.bIsEnabled = ((const SfxBoolItem&)a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTON_8)).GetValue();
- pInfo->aLightSource.aDirection = B3DVectorToDirection3D(((const Svx3DLightDirection8Item&)a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_8)).GetValue());
+ pInfo->aLightSource.aDirection = B3DVectorToDirection3D(((const SvxB3DVectorItem&)a3DLightAttributes.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_8)).GetValue());
applyLightSourcesToModel();
@@ -530,42 +530,42 @@ void ThreeD_SceneIllumination_TabPage::updatePreview()
aItemSet.Put(makeSvx3DLightcolor1Item(pInfo->aLightSource.nDiffuseColor));
aItemSet.Put(makeSvx3DLightOnOff1Item(pInfo->aLightSource.bIsEnabled));
- aItemSet.Put(Svx3DLightDirection1Item(Direction3DToB3DVector(pInfo->aLightSource.aDirection)));
+ aItemSet.Put(makeSvx3DLightDirection1Item(Direction3DToB3DVector(pInfo->aLightSource.aDirection)));
pInfo = &m_pLightSourceInfoList[1];
aItemSet.Put(makeSvx3DLightcolor2Item(pInfo->aLightSource.nDiffuseColor));
aItemSet.Put(makeSvx3DLightOnOff2Item(pInfo->aLightSource.bIsEnabled));
- aItemSet.Put(Svx3DLightDirection2Item(Direction3DToB3DVector(pInfo->aLightSource.aDirection)));
+ aItemSet.Put(makeSvx3DLightDirection2Item(Direction3DToB3DVector(pInfo->aLightSource.aDirection)));
pInfo = &m_pLightSourceInfoList[2];
aItemSet.Put(makeSvx3DLightcolor3Item(pInfo->aLightSource.nDiffuseColor));
aItemSet.Put(makeSvx3DLightOnOff3Item(pInfo->aLightSource.bIsEnabled));
- aItemSet.Put(Svx3DLightDirection3Item(Direction3DToB3DVector(pInfo->aLightSource.aDirection)));
+ aItemSet.Put(makeSvx3DLightDirection3Item(Direction3DToB3DVector(pInfo->aLightSource.aDirection)));
pInfo = &m_pLightSourceInfoList[3];
aItemSet.Put(makeSvx3DLightcolor4Item(pInfo->aLightSource.nDiffuseColor));
aItemSet.Put(makeSvx3DLightOnOff4Item(pInfo->aLightSource.bIsEnabled));
- aItemSet.Put(Svx3DLightDirection4Item(Direction3DToB3DVector(pInfo->aLightSource.aDirection)));
+ aItemSet.Put(makeSvx3DLightDirection4Item(Direction3DToB3DVector(pInfo->aLightSource.aDirection)));
pInfo = &m_pLightSourceInfoList[4];
aItemSet.Put(makeSvx3DLightcolor5Item(pInfo->aLightSource.nDiffuseColor));
aItemSet.Put(makeSvx3DLightOnOff5Item(pInfo->aLightSource.bIsEnabled));
- aItemSet.Put(Svx3DLightDirection5Item(Direction3DToB3DVector(pInfo->aLightSource.aDirection)));
+ aItemSet.Put(makeSvx3DLightDirection5Item(Direction3DToB3DVector(pInfo->aLightSource.aDirection)));
pInfo = &m_pLightSourceInfoList[5];
aItemSet.Put(makeSvx3DLightcolor6Item(pInfo->aLightSource.nDiffuseColor));
aItemSet.Put(makeSvx3DLightOnOff6Item(pInfo->aLightSource.bIsEnabled));
- aItemSet.Put(Svx3DLightDirection6Item(Direction3DToB3DVector(pInfo->aLightSource.aDirection)));
+ aItemSet.Put(makeSvx3DLightDirection6Item(Direction3DToB3DVector(pInfo->aLightSource.aDirection)));
pInfo = &m_pLightSourceInfoList[6];
aItemSet.Put(makeSvx3DLightcolor7Item(pInfo->aLightSource.nDiffuseColor));
aItemSet.Put(makeSvx3DLightOnOff7Item(pInfo->aLightSource.bIsEnabled));
- aItemSet.Put(Svx3DLightDirection7Item(Direction3DToB3DVector(pInfo->aLightSource.aDirection)));
+ aItemSet.Put(makeSvx3DLightDirection7Item(Direction3DToB3DVector(pInfo->aLightSource.aDirection)));
pInfo = &m_pLightSourceInfoList[7];
aItemSet.Put(makeSvx3DLightcolor8Item(pInfo->aLightSource.nDiffuseColor));
aItemSet.Put(makeSvx3DLightOnOff8Item(pInfo->aLightSource.bIsEnabled));
- aItemSet.Put(Svx3DLightDirection8Item(Direction3DToB3DVector(pInfo->aLightSource.aDirection)));
+ aItemSet.Put(makeSvx3DLightDirection8Item(Direction3DToB3DVector(pInfo->aLightSource.aDirection)));
// set lights and ambient light
m_pCtl_Preview->GetSvx3DLightControl().Set3DAttributes(aItemSet);
diff --git a/include/svx/scene3d.hxx b/include/svx/scene3d.hxx
index 6631f770a14c..dfcc90e34c71 100644
--- a/include/svx/scene3d.hxx
+++ b/include/svx/scene3d.hxx
@@ -160,21 +160,21 @@ public:
// Light direction:
basegfx::B3DVector GetLightDirection1() const
- { return ((const Svx3DLightDirection1Item&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTDIRECTION_1)).GetValue(); }
+ { return ((const SvxB3DVectorItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTDIRECTION_1)).GetValue(); }
basegfx::B3DVector GetLightDirection2() const
- { return ((const Svx3DLightDirection2Item&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTDIRECTION_2)).GetValue(); }
+ { return ((const SvxB3DVectorItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTDIRECTION_2)).GetValue(); }
basegfx::B3DVector GetLightDirection3() const
- { return ((const Svx3DLightDirection3Item&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTDIRECTION_3)).GetValue(); }
+ { return ((const SvxB3DVectorItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTDIRECTION_3)).GetValue(); }
basegfx::B3DVector GetLightDirection4() const
- { return ((const Svx3DLightDirection4Item&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTDIRECTION_4)).GetValue(); }
+ { return ((const SvxB3DVectorItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTDIRECTION_4)).GetValue(); }
basegfx::B3DVector GetLightDirection5() const
- { return ((const Svx3DLightDirection5Item&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTDIRECTION_5)).GetValue(); }
+ { return ((const SvxB3DVectorItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTDIRECTION_5)).GetValue(); }
basegfx::B3DVector GetLightDirection6() const
- { return ((const Svx3DLightDirection6Item&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTDIRECTION_6)).GetValue(); }
+ { return ((const SvxB3DVectorItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTDIRECTION_6)).GetValue(); }
basegfx::B3DVector GetLightDirection7() const
- { return ((const Svx3DLightDirection7Item&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTDIRECTION_7)).GetValue(); }
+ { return ((const SvxB3DVectorItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTDIRECTION_7)).GetValue(); }
basegfx::B3DVector GetLightDirection8() const
- { return ((const Svx3DLightDirection8Item&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTDIRECTION_8)).GetValue(); }
+ { return ((const SvxB3DVectorItem&)GetObjectItemSet().Get(SDRATTR_3DSCENE_LIGHTDIRECTION_8)).GetValue(); }
// ShadowSlant:
sal_uInt16 GetShadowSlant() const
diff --git a/include/svx/svx3ditems.hxx b/include/svx/svx3ditems.hxx
index 2240066f36cf..4675a9d8bdf7 100644
--- a/include/svx/svx3ditems.hxx
+++ b/include/svx/svx3ditems.hxx
@@ -233,45 +233,37 @@ inline SfxBoolItem makeSvx3DLightOnOff8Item(bool bVal) {
return SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_8, bVal);
}
-class SVX_DLLPUBLIC Svx3DLightDirection1Item : public SvxB3DVectorItem {
-public:
- Svx3DLightDirection1Item(const basegfx::B3DVector& rVec = basegfx::B3DVector(0.57735026918963, 0.57735026918963, 0.57735026918963));
-};
+inline SvxB3DVectorItem makeSvx3DLightDirection1Item(const basegfx::B3DVector& rVec) {
+ return SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_1, rVec);
+}
-class SVX_DLLPUBLIC Svx3DLightDirection2Item : public SvxB3DVectorItem {
-public:
- Svx3DLightDirection2Item(const basegfx::B3DVector& rVec = basegfx::B3DVector(0.0,0.0,1.0));
-};
+inline SvxB3DVectorItem makeSvx3DLightDirection2Item(const basegfx::B3DVector& rVec) {
+ return SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_2, rVec);
+}
-class SVX_DLLPUBLIC Svx3DLightDirection3Item : public SvxB3DVectorItem {
-public:
- Svx3DLightDirection3Item(const basegfx::B3DVector& rVec = basegfx::B3DVector(0.0,0.0,1.0));
-};
+inline SvxB3DVectorItem makeSvx3DLightDirection3Item(const basegfx::B3DVector& rVec) {
+ return SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_3, rVec);
+}
-class SVX_DLLPUBLIC Svx3DLightDirection4Item : public SvxB3DVectorItem {
-public:
- Svx3DLightDirection4Item(const basegfx::B3DVector& rVec = basegfx::B3DVector(0.0,0.0,1.0));
-};
+inline SvxB3DVectorItem makeSvx3DLightDirection4Item(const basegfx::B3DVector& rVec) {
+ return SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_4, rVec);
+}
-class SVX_DLLPUBLIC Svx3DLightDirection5Item : public SvxB3DVectorItem {
-public:
- Svx3DLightDirection5Item(const basegfx::B3DVector& rVec = basegfx::B3DVector(0.0,0.0,1.0));
-};
+inline SvxB3DVectorItem makeSvx3DLightDirection5Item(const basegfx::B3DVector& rVec) {
+ return SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_5, rVec);
+}
-class SVX_DLLPUBLIC Svx3DLightDirection6Item : public SvxB3DVectorItem {
-public:
- Svx3DLightDirection6Item(const basegfx::B3DVector& rVec = basegfx::B3DVector(0.0,0.0,1.0));
-};
+inline SvxB3DVectorItem makeSvx3DLightDirection6Item(const basegfx::B3DVector& rVec) {
+ return SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_6, rVec);
+}
-class SVX_DLLPUBLIC Svx3DLightDirection7Item : public SvxB3DVectorItem {
-public:
- Svx3DLightDirection7Item(const basegfx::B3DVector& rVec = basegfx::B3DVector(0.0,0.0,1.0));
-};
+inline SvxB3DVectorItem makeSvx3DLightDirection7Item(const basegfx::B3DVector& rVec) {
+ return SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_7, rVec);
+}
-class SVX_DLLPUBLIC Svx3DLightDirection8Item : public SvxB3DVectorItem {
-public:
- Svx3DLightDirection8Item(const basegfx::B3DVector& rVec = basegfx::B3DVector(0.0,0.0,1.0));
-};
+inline SvxB3DVectorItem makeSvx3DLightDirection8Item(const basegfx::B3DVector& rVec) {
+ return SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_8, rVec);
+}
inline SfxUInt16Item makeSvx3DShadowSlantItem(sal_uInt16 nVal) {
return SfxUInt16Item(SDRATTR_3DSCENE_SHADOW_SLANT, nVal);
diff --git a/svx/source/customshapes/EnhancedCustomShape3d.cxx b/svx/source/customshapes/EnhancedCustomShape3d.cxx
index eac5e63211a2..92967399c1da 100644
--- a/svx/source/customshapes/EnhancedCustomShape3d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape3d.cxx
@@ -687,7 +687,7 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con
pScene->GetProperties().SetObjectItem( makeSvx3DLightOnOff1Item( true ) );
Color aAmbientSpot1Color( nSpotLight1, nSpotLight1, nSpotLight1 );
pScene->GetProperties().SetObjectItem( makeSvx3DLightcolor1Item( aAmbientSpot1Color ) );
- pScene->GetProperties().SetObjectItem( Svx3DLightDirection1Item( aSpotLight1 ) );
+ pScene->GetProperties().SetObjectItem( makeSvx3DLightDirection1Item( aSpotLight1 ) );
sal_uInt8 nSpotLight2 = (sal_uInt8)( fLight2Intensity * 255.0 );
basegfx::B3DVector aSpotLight2( aSecondLightDirection.DirectionX, -aSecondLightDirection.DirectionY, -aSecondLightDirection.DirectionZ );
@@ -695,14 +695,14 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con
pScene->GetProperties().SetObjectItem( makeSvx3DLightOnOff2Item( true ) );
Color aAmbientSpot2Color( nSpotLight2, nSpotLight2, nSpotLight2 );
pScene->GetProperties().SetObjectItem( makeSvx3DLightcolor2Item( aAmbientSpot2Color ) );
- pScene->GetProperties().SetObjectItem( Svx3DLightDirection2Item( aSpotLight2 ) );
+ pScene->GetProperties().SetObjectItem( makeSvx3DLightDirection2Item( aSpotLight2 ) );
sal_uInt8 nSpotLight3 = 70;
basegfx::B3DVector aSpotLight3( 0.0, 0.0, 1.0 );
pScene->GetProperties().SetObjectItem( makeSvx3DLightOnOff3Item( true ) );
Color aAmbientSpot3Color( nSpotLight3, nSpotLight3, nSpotLight3 );
pScene->GetProperties().SetObjectItem( makeSvx3DLightcolor3Item( aAmbientSpot3Color ) );
- pScene->GetProperties().SetObjectItem( Svx3DLightDirection3Item( aSpotLight3 ) );
+ pScene->GetProperties().SetObjectItem( makeSvx3DLightDirection3Item( aSpotLight3 ) );
double fSpecular = GetDouble( rGeometryItem, "Specularity", 0, NULL ) / 100;
bool bMetal = GetBool( rGeometryItem, "Metal", false );
diff --git a/svx/source/dialog/dlgctl3d.cxx b/svx/source/dialog/dlgctl3d.cxx
index 053fbb0794f4..ca9526734cd3 100644
--- a/svx/source/dialog/dlgctl3d.cxx
+++ b/svx/source/dialog/dlgctl3d.cxx
@@ -778,15 +778,15 @@ void Svx3DLightControl::SetPosition(double fHor, double fVer)
switch(maSelectedLight)
{
- case 0: aSet.Put(Svx3DLightDirection1Item(aDirection)); break;
- case 1: aSet.Put(Svx3DLightDirection2Item(aDirection)); break;
- case 2: aSet.Put(Svx3DLightDirection3Item(aDirection)); break;
- case 3: aSet.Put(Svx3DLightDirection4Item(aDirection)); break;
- case 4: aSet.Put(Svx3DLightDirection5Item(aDirection)); break;
- case 5: aSet.Put(Svx3DLightDirection6Item(aDirection)); break;
- case 6: aSet.Put(Svx3DLightDirection7Item(aDirection)); break;
+ case 0: aSet.Put(makeSvx3DLightDirection1Item(aDirection)); break;
+ case 1: aSet.Put(makeSvx3DLightDirection2Item(aDirection)); break;
+ case 2: aSet.Put(makeSvx3DLightDirection3Item(aDirection)); break;
+ case 3: aSet.Put(makeSvx3DLightDirection4Item(aDirection)); break;
+ case 4: aSet.Put(makeSvx3DLightDirection5Item(aDirection)); break;
+ case 5: aSet.Put(makeSvx3DLightDirection6Item(aDirection)); break;
+ case 6: aSet.Put(makeSvx3DLightDirection7Item(aDirection)); break;
default:
- case 7: aSet.Put(Svx3DLightDirection8Item(aDirection)); break;
+ case 7: aSet.Put(makeSvx3DLightDirection8Item(aDirection)); break;
}
mpScene->SetMergedItemSet(aSet);
@@ -938,14 +938,14 @@ basegfx::B3DVector Svx3DLightControl::GetLightDirection(sal_uInt32 nNum) const
switch(nNum)
{
- case 0 : return ((const Svx3DLightDirection1Item&)aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_1)).GetValue();
- case 1 : return ((const Svx3DLightDirection2Item&)aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_2)).GetValue();
- case 2 : return ((const Svx3DLightDirection3Item&)aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_3)).GetValue();
- case 3 : return ((const Svx3DLightDirection4Item&)aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_4)).GetValue();
- case 4 : return ((const Svx3DLightDirection5Item&)aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_5)).GetValue();
- case 5 : return ((const Svx3DLightDirection6Item&)aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_6)).GetValue();
- case 6 : return ((const Svx3DLightDirection7Item&)aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_7)).GetValue();
- case 7 : return ((const Svx3DLightDirection8Item&)aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_8)).GetValue();
+ case 0 : return ((const SvxB3DVectorItem&)aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_1)).GetValue();
+ case 1 : return ((const SvxB3DVectorItem&)aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_2)).GetValue();
+ case 2 : return ((const SvxB3DVectorItem&)aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_3)).GetValue();
+ case 3 : return ((const SvxB3DVectorItem&)aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_4)).GetValue();
+ case 4 : return ((const SvxB3DVectorItem&)aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_5)).GetValue();
+ case 5 : return ((const SvxB3DVectorItem&)aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_6)).GetValue();
+ case 6 : return ((const SvxB3DVectorItem&)aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_7)).GetValue();
+ case 7 : return ((const SvxB3DVectorItem&)aLightItemSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_8)).GetValue();
}
}
diff --git a/svx/source/engine3d/svx3ditems.cxx b/svx/source/engine3d/svx3ditems.cxx
index 35fa12823c46..82042652c3bf 100644
--- a/svx/source/engine3d/svx3ditems.cxx
+++ b/svx/source/engine3d/svx3ditems.cxx
@@ -85,38 +85,6 @@ Svx3DPerspectiveItem::Svx3DPerspectiveItem(sal_uInt16 nVal)
: SfxUInt16Item(SDRATTR_3DSCENE_PERSPECTIVE, nVal)
{}
-Svx3DLightDirection1Item::Svx3DLightDirection1Item(const basegfx::B3DVector& rVec)
-: SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_1, rVec)
-{}
-
-Svx3DLightDirection2Item::Svx3DLightDirection2Item(const basegfx::B3DVector& rVec)
-: SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_2, rVec)
-{}
-
-Svx3DLightDirection3Item::Svx3DLightDirection3Item(const basegfx::B3DVector& rVec)
-: SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_3, rVec)
-{}
-
-Svx3DLightDirection4Item::Svx3DLightDirection4Item(const basegfx::B3DVector& rVec)
-: SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_4, rVec)
-{}
-
-Svx3DLightDirection5Item::Svx3DLightDirection5Item(const basegfx::B3DVector& rVec)
-: SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_5, rVec)
-{}
-
-Svx3DLightDirection6Item::Svx3DLightDirection6Item(const basegfx::B3DVector& rVec)
-: SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_6, rVec)
-{}
-
-Svx3DLightDirection7Item::Svx3DLightDirection7Item(const basegfx::B3DVector& rVec)
-: SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_7, rVec)
-{}
-
-Svx3DLightDirection8Item::Svx3DLightDirection8Item(const basegfx::B3DVector& rVec)
-: SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_8, rVec)
-{}
-
Svx3DShadeModeItem::Svx3DShadeModeItem(sal_uInt16 nVal)
: SfxUInt16Item(SDRATTR_3DSCENE_SHADE_MODE, nVal)
{}
diff --git a/svx/source/sdr/primitive2d/sdrattributecreator.cxx b/svx/source/sdr/primitive2d/sdrattributecreator.cxx
index 650b6d0c49a8..116b7e8cec4d 100644
--- a/svx/source/sdr/primitive2d/sdrattributecreator.cxx
+++ b/svx/source/sdr/primitive2d/sdrattributecreator.cxx
@@ -924,56 +924,56 @@ namespace drawinglayer
if(((const SfxBoolItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTON_1)).GetValue())
{
const basegfx::BColor aColor(((const SvxColorItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_1)).GetValue().getBColor());
- const basegfx::B3DVector aDirection(((const Svx3DLightDirection1Item&)rSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_1)).GetValue());
+ const basegfx::B3DVector aDirection(((const SvxB3DVectorItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_1)).GetValue());
aLightVector.push_back(attribute::Sdr3DLightAttribute(aColor, aDirection, true));
}
if(((const SfxBoolItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTON_2)).GetValue())
{
const basegfx::BColor aColor(((const SvxColorItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_2)).GetValue().getBColor());
- const basegfx::B3DVector aDirection(((const Svx3DLightDirection2Item&)rSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_2)).GetValue());
+ const basegfx::B3DVector aDirection(((const SvxB3DVectorItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_2)).GetValue());
aLightVector.push_back(attribute::Sdr3DLightAttribute(aColor, aDirection, false));
}
if(((const SfxBoolItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTON_3)).GetValue())
{
const basegfx::BColor aColor(((const SvxColorItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_3)).GetValue().getBColor());
- const basegfx::B3DVector aDirection(((const Svx3DLightDirection3Item&)rSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_3)).GetValue());
+ const basegfx::B3DVector aDirection(((const SvxB3DVectorItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_3)).GetValue());
aLightVector.push_back(attribute::Sdr3DLightAttribute(aColor, aDirection, false));
}
if(((const SfxBoolItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTON_4)).GetValue())
{
const basegfx::BColor aColor(((const SvxColorItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_4)).GetValue().getBColor());
- const basegfx::B3DVector aDirection(((const Svx3DLightDirection4Item&)rSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_4)).GetValue());
+ const basegfx::B3DVector aDirection(((const SvxB3DVectorItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_4)).GetValue());
aLightVector.push_back(attribute::Sdr3DLightAttribute(aColor, aDirection, false));
}
if(((const SfxBoolItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTON_5)).GetValue())
{
const basegfx::BColor aColor(((const SvxColorItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_5)).GetValue().getBColor());
- const basegfx::B3DVector aDirection(((const Svx3DLightDirection5Item&)rSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_5)).GetValue());
+ const basegfx::B3DVector aDirection(((const SvxB3DVectorItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_5)).GetValue());
aLightVector.push_back(attribute::Sdr3DLightAttribute(aColor, aDirection, false));
}
if(((const SfxBoolItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTON_6)).GetValue())
{
const basegfx::BColor aColor(((const SvxColorItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_6)).GetValue().getBColor());
- const basegfx::B3DVector aDirection(((const Svx3DLightDirection6Item&)rSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_6)).GetValue());
+ const basegfx::B3DVector aDirection(((const SvxB3DVectorItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_6)).GetValue());
aLightVector.push_back(attribute::Sdr3DLightAttribute(aColor, aDirection, false));
}
if(((const SfxBoolItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTON_7)).GetValue())
{
const basegfx::BColor aColor(((const SvxColorItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_7)).GetValue().getBColor());
- const basegfx::B3DVector aDirection(((const Svx3DLightDirection7Item&)rSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_7)).GetValue());
+ const basegfx::B3DVector aDirection(((const SvxB3DVectorItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_7)).GetValue());
aLightVector.push_back(attribute::Sdr3DLightAttribute(aColor, aDirection, false));
}
if(((const SfxBoolItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTON_8)).GetValue())
{
const basegfx::BColor aColor(((const SvxColorItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTCOLOR_8)).GetValue().getBColor());
- const basegfx::B3DVector aDirection(((const Svx3DLightDirection8Item&)rSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_8)).GetValue());
+ const basegfx::B3DVector aDirection(((const SvxB3DVectorItem&)rSet.Get(SDRATTR_3DSCENE_LIGHTDIRECTION_8)).GetValue());
aLightVector.push_back(attribute::Sdr3DLightAttribute(aColor, aDirection, false));
}
diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx
index fd64fb05702d..bd78be8d33d4 100644
--- a/svx/source/svdraw/svdattr.cxx
+++ b/svx/source/svdraw/svdattr.cxx
@@ -293,14 +293,14 @@ SdrItemPool::SdrItemPool(
mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTON_6 - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_6, false);
mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTON_7 - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_7, false);
mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTON_8 - SDRATTR_START ] = new SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_8, false);
- mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_1 - SDRATTR_START ] = new Svx3DLightDirection1Item;
- mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_2 - SDRATTR_START ] = new Svx3DLightDirection2Item;
- mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_3 - SDRATTR_START ] = new Svx3DLightDirection3Item;
- mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_4 - SDRATTR_START ] = new Svx3DLightDirection4Item;
- mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_5 - SDRATTR_START ] = new Svx3DLightDirection5Item;
- mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_6 - SDRATTR_START ] = new Svx3DLightDirection6Item;
- mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_7 - SDRATTR_START ] = new Svx3DLightDirection7Item;
- mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_8 - SDRATTR_START ] = new Svx3DLightDirection8Item;
+ mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_1 - SDRATTR_START ] = new SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_1, basegfx::B3DVector(0.57735026918963, 0.57735026918963, 0.57735026918963));
+ mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_2 - SDRATTR_START ] = new SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_2, basegfx::B3DVector(0.0,0.0,1.0));
+ mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_3 - SDRATTR_START ] = new SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_3, basegfx::B3DVector(0.0,0.0,1.0));
+ mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_4 - SDRATTR_START ] = new SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_4, basegfx::B3DVector(0.0,0.0,1.0));
+ mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_5 - SDRATTR_START ] = new SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_5, basegfx::B3DVector(0.0,0.0,1.0));
+ mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_6 - SDRATTR_START ] = new SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_6, basegfx::B3DVector(0.0,0.0,1.0));
+ mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_7 - SDRATTR_START ] = new SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_7, basegfx::B3DVector(0.0,0.0,1.0));
+ mppLocalPoolDefaults[ SDRATTR_3DSCENE_LIGHTDIRECTION_8 - SDRATTR_START ] = new SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_8, basegfx::B3DVector(0.0,0.0,1.0));
mppLocalPoolDefaults[ SDRATTR_3DSCENE_SHADOW_SLANT - SDRATTR_START ] = new SfxUInt16Item(SDRATTR_3DSCENE_SHADOW_SLANT, 0);
mppLocalPoolDefaults[ SDRATTR_3DSCENE_SHADE_MODE - SDRATTR_START ] = new Svx3DShadeModeItem;
mppLocalPoolDefaults[ SDRATTR_CUSTOMSHAPE_ENGINE - SDRATTR_START ] = new SdrCustomShapeEngineItem;