summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-08-17 14:02:09 +0200
committerNoel Grandin <noel@peralex.com>2016-08-18 08:49:02 +0200
commit65a4c406e9c0f2953547fbe006ff38644f489fc8 (patch)
tree7ed2f3cf8f11ea68a63afe8dd20761fff556a393 /svx
parent4a4c1bf4423a8b426c56c8d2b7013d6b5109309e (diff)
convert ProjectionType to scoped enum
Change-Id: Iaab8f2ac68964272e3ea00195b3b05c520a1388d
Diffstat (limited to 'svx')
-rw-r--r--svx/source/customshapes/EnhancedCustomShape3d.cxx4
-rw-r--r--svx/source/engine3d/float3d.cxx14
-rw-r--r--svx/source/engine3d/scene3d.cxx2
-rw-r--r--svx/source/engine3d/svx3ditems.cxx4
-rw-r--r--svx/source/engine3d/viewpt3d2.cxx2
-rw-r--r--svx/source/sdr/properties/e3dsceneproperties.cxx2
6 files changed, 14 insertions, 14 deletions
diff --git a/svx/source/customshapes/EnhancedCustomShape3d.cxx b/svx/source/customshapes/EnhancedCustomShape3d.cxx
index f4f1ed2ed981..10c372d7e48d 100644
--- a/svx/source/customshapes/EnhancedCustomShape3d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape3d.cxx
@@ -320,7 +320,7 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con
const Any* pAny = rGeometryItem.GetPropertyValueByName( "Extrusion", "ProjectionMode" );
if ( pAny )
*pAny >>= eProjectionMode;
- ProjectionType eProjectionType( eProjectionMode == drawing::ProjectionMode_PARALLEL ? PR_PARALLEL : PR_PERSPECTIVE );
+ ProjectionType eProjectionType( eProjectionMode == drawing::ProjectionMode_PARALLEL ? ProjectionType::Parallel : ProjectionType::Perspective );
// pShape2d Convert in scenes which include 3D Objects
E3dDefaultAttributes a3DDefaultAttr;
a3DDefaultAttr.SetDefaultLatheCharacterMode( true );
@@ -614,7 +614,7 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con
aNewTransform.rotate( 0.0, -fYRotate, 0.0 );
if( fXRotate != 0.0 )
aNewTransform.rotate( -fXRotate, 0.0, 0.0 );
- if ( eProjectionType == PR_PARALLEL )
+ if ( eProjectionType == ProjectionType::Parallel )
{
double fSkew, fAlpha;
GetSkew( rGeometryItem, fSkew, fAlpha );
diff --git a/svx/source/engine3d/float3d.cxx b/svx/source/engine3d/float3d.cxx
index 962b6c42c22a..d204893fb70c 100644
--- a/svx/source/engine3d/float3d.cxx
+++ b/svx/source/engine3d/float3d.cxx
@@ -1578,14 +1578,14 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
if( eState != SfxItemState::DONTCARE )
{
ProjectionType ePT = (ProjectionType)static_cast<const Svx3DPerspectiveItem&>(rAttrs.Get(SDRATTR_3DSCENE_PERSPECTIVE)).GetValue();
- if( ( !m_pBtnPerspective->IsChecked() && ePT == PR_PERSPECTIVE ) ||
- ( m_pBtnPerspective->IsChecked() && ePT == PR_PARALLEL ) )
+ if( ( !m_pBtnPerspective->IsChecked() && ePT == ProjectionType::Perspective ) ||
+ ( m_pBtnPerspective->IsChecked() && ePT == ProjectionType::Parallel ) )
{
- m_pBtnPerspective->Check( ePT == PR_PERSPECTIVE );
+ m_pBtnPerspective->Check( ePT == ProjectionType::Perspective );
bUpdate = true;
}
if( m_pBtnPerspective->GetState() == TRISTATE_INDET )
- m_pBtnPerspective->Check( ePT == PR_PERSPECTIVE );
+ m_pBtnPerspective->Check( ePT == ProjectionType::Perspective );
}
else
{
@@ -1674,11 +1674,11 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs )
// Perspective
if( m_pBtnPerspective->GetState() != TRISTATE_INDET )
{
- sal_uInt16 nValue;
+ ProjectionType nValue;
if( m_pBtnPerspective->IsChecked() )
- nValue = PR_PERSPECTIVE;
+ nValue = ProjectionType::Perspective;
else
- nValue = PR_PARALLEL;
+ nValue = ProjectionType::Parallel;
rAttrs.Put(Svx3DPerspectiveItem(nValue));
}
else
diff --git a/svx/source/engine3d/scene3d.cxx b/svx/source/engine3d/scene3d.cxx
index f71dbbe97f8d..7942684f7451 100644
--- a/svx/source/engine3d/scene3d.cxx
+++ b/svx/source/engine3d/scene3d.cxx
@@ -345,7 +345,7 @@ void E3dScene::SetCamera(const Camera3D& rNewCamera)
GetCameraSet().SetViewportValues(aVRP, aVPN, aVUV);
// Set perspective
- GetCameraSet().SetPerspective(aCamera.GetProjection() == PR_PERSPECTIVE);
+ GetCameraSet().SetPerspective(aCamera.GetProjection() == ProjectionType::Perspective);
GetCameraSet().SetViewportRectangle((Rectangle&)aCamera.GetDeviceWindow());
ImpCleanup3DDepthMapper();
diff --git a/svx/source/engine3d/svx3ditems.cxx b/svx/source/engine3d/svx3ditems.cxx
index a17f4ccb7b82..346dd7db2577 100644
--- a/svx/source/engine3d/svx3ditems.cxx
+++ b/svx/source/engine3d/svx3ditems.cxx
@@ -78,8 +78,8 @@ Svx3DTextureModeItem::Svx3DTextureModeItem(sal_uInt16 nVal)
: SfxUInt16Item(SDRATTR_3DOBJ_TEXTURE_MODE, nVal)
{}
-Svx3DPerspectiveItem::Svx3DPerspectiveItem(sal_uInt16 nVal)
-: SfxUInt16Item(SDRATTR_3DSCENE_PERSPECTIVE, nVal)
+Svx3DPerspectiveItem::Svx3DPerspectiveItem(ProjectionType nVal)
+: SfxUInt16Item(SDRATTR_3DSCENE_PERSPECTIVE, (sal_uInt16)nVal)
{}
Svx3DShadeModeItem::Svx3DShadeModeItem(sal_uInt16 nVal)
diff --git a/svx/source/engine3d/viewpt3d2.cxx b/svx/source/engine3d/viewpt3d2.cxx
index b4d21899570e..8ff54c05ff75 100644
--- a/svx/source/engine3d/viewpt3d2.cxx
+++ b/svx/source/engine3d/viewpt3d2.cxx
@@ -27,7 +27,7 @@ Viewport3D::Viewport3D() :
aVUV(0, 1, 1),
aPRP(0, 0, 2),
fVPD(-3),
- eProjection(PR_PERSPECTIVE),
+ eProjection(ProjectionType::Perspective),
aDeviceRect(Point(0,0), Size(-1,-1)),
aViewPoint (0, 0, 5000),
bTfValid(false),
diff --git a/svx/source/sdr/properties/e3dsceneproperties.cxx b/svx/source/sdr/properties/e3dsceneproperties.cxx
index 44530ee1ba8f..44c28b5bc8b1 100644
--- a/svx/source/sdr/properties/e3dsceneproperties.cxx
+++ b/svx/source/sdr/properties/e3dsceneproperties.cxx
@@ -307,7 +307,7 @@ namespace sdr
Camera3D aSceneCam(rObj.GetCamera());
// ProjectionType
- mpItemSet->Put(Svx3DPerspectiveItem((sal_uInt16)aSceneCam.GetProjection()));
+ mpItemSet->Put(Svx3DPerspectiveItem(aSceneCam.GetProjection()));
// CamPos
mpItemSet->Put(makeSvx3DDistanceItem((sal_uInt32)(aSceneCam.GetPosition().getZ() + 0.5)));