summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/svx/scene3d.hxx2
-rw-r--r--include/svx/svx3ditems.hxx2
-rw-r--r--include/svx/viewpt3d.hxx2
-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
9 files changed, 17 insertions, 17 deletions
diff --git a/include/svx/scene3d.hxx b/include/svx/scene3d.hxx
index f8642e02b540..be92d7ae5982 100644
--- a/include/svx/scene3d.hxx
+++ b/include/svx/scene3d.hxx
@@ -101,7 +101,7 @@ public:
sal_uInt32 RemapOrdNum(sal_uInt32 nOrdNum) const;
- // Perspective: enum ProjectionType { PR_PARALLEL, PR_PERSPECTIVE }
+ // Perspective: enum ProjectionType { ProjectionType::Parallel, ProjectionType::Perspective }
ProjectionType GetPerspective() const
{ return (ProjectionType) static_cast<const Svx3DPerspectiveItem&>(GetObjectItemSet().Get(SDRATTR_3DSCENE_PERSPECTIVE)).GetValue(); }
diff --git a/include/svx/svx3ditems.hxx b/include/svx/svx3ditems.hxx
index 5a784bcb5023..c2472c976749 100644
--- a/include/svx/svx3ditems.hxx
+++ b/include/svx/svx3ditems.hxx
@@ -145,7 +145,7 @@ inline SfxBoolItem makeSvx3DTextureFilterItem(bool bVal) {
// Svx3D _3DSCENE_ Items
class SVX_DLLPUBLIC Svx3DPerspectiveItem : public SfxUInt16Item {
public:
- Svx3DPerspectiveItem(sal_uInt16 nVal = (sal_uInt16)PR_PERSPECTIVE);
+ Svx3DPerspectiveItem(ProjectionType nVal = ProjectionType::Perspective);
// use drawing::ProjectionMode
SVX_DLLPRIVATE virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
diff --git a/include/svx/viewpt3d.hxx b/include/svx/viewpt3d.hxx
index 9595a4b4d319..f085dd45f76a 100644
--- a/include/svx/viewpt3d.hxx
+++ b/include/svx/viewpt3d.hxx
@@ -35,7 +35,7 @@ namespace basegfx { class B3DRange; } // end of namespace basegfx
|*
\************************************************************************/
-enum ProjectionType { PR_PARALLEL, PR_PERSPECTIVE };
+enum class ProjectionType { Parallel, Perspective };
/*************************************************************************
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)));