Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
9fb3b992
Kaydet (Commit)
9fb3b992
authored
Nis 22, 2015
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
convert PREVIEW_OBJECTTYPE constants to scoped enum
Change-Id: I5c370627bc8ccf1de2ae7f3764cf2236215d5379
üst
c97b81ea
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
18 deletions
+17
-18
dlgctl3d.hxx
include/svx/dlgctl3d.hxx
+5
-6
dlgctl3d.cxx
svx/source/dialog/dlgctl3d.cxx
+12
-12
No files found.
include/svx/dlgctl3d.hxx
Dosyayı görüntüle @
9fb3b992
...
@@ -33,8 +33,7 @@ class E3dView;
...
@@ -33,8 +33,7 @@ class E3dView;
class
E3dPolyScene
;
class
E3dPolyScene
;
class
E3dObject
;
class
E3dObject
;
#define PREVIEW_OBJECTTYPE_SPHERE 0x0000
enum
class
SvxPreviewObjectType
{
SPHERE
,
CUBE
};
#define PREVIEW_OBJECTTYPE_CUBE 0x0001
class
SVX_DLLPUBLIC
SAL_WARN_UNUSED
Svx3DPreviewControl
:
public
Control
class
SVX_DLLPUBLIC
SAL_WARN_UNUSED
Svx3DPreviewControl
:
public
Control
{
{
...
@@ -44,7 +43,7 @@ protected:
...
@@ -44,7 +43,7 @@ protected:
E3dView
*
mp3DView
;
E3dView
*
mp3DView
;
E3dPolyScene
*
mpScene
;
E3dPolyScene
*
mpScene
;
E3dObject
*
mp3DObj
;
E3dObject
*
mp3DObj
;
sal_uInt16
mnObjectType
;
SvxPreviewObjectType
mnObjectType
;
void
Construct
();
void
Construct
();
...
@@ -59,8 +58,8 @@ public:
...
@@ -59,8 +58,8 @@ public:
virtual
Size
GetOptimalSize
()
const
SAL_OVERRIDE
;
virtual
Size
GetOptimalSize
()
const
SAL_OVERRIDE
;
void
Reset
();
void
Reset
();
virtual
void
SetObjectType
(
sal_uInt16
nType
);
virtual
void
SetObjectType
(
SvxPreviewObjectType
nType
);
sal_uInt16
GetObjectType
()
const
{
return
mnObjectType
;
}
SvxPreviewObjectType
GetObjectType
()
const
{
return
mnObjectType
;
}
SfxItemSet
Get3DAttributes
()
const
;
SfxItemSet
Get3DAttributes
()
const
;
virtual
void
Set3DAttributes
(
const
SfxItemSet
&
rAttr
);
virtual
void
Set3DAttributes
(
const
SfxItemSet
&
rAttr
);
};
};
...
@@ -111,7 +110,7 @@ public:
...
@@ -111,7 +110,7 @@ public:
virtual
void
Tracking
(
const
TrackingEvent
&
rTEvt
)
SAL_OVERRIDE
;
virtual
void
Tracking
(
const
TrackingEvent
&
rTEvt
)
SAL_OVERRIDE
;
virtual
void
Resize
()
SAL_OVERRIDE
;
virtual
void
Resize
()
SAL_OVERRIDE
;
virtual
void
SetObjectType
(
sal_uInt16
nType
)
SAL_OVERRIDE
;
virtual
void
SetObjectType
(
SvxPreviewObjectType
nType
)
SAL_OVERRIDE
;
// register user callback
// register user callback
void
SetUserInteractiveChangeCallback
(
Link
aNew
)
{
maUserInteractiveChangeCallback
=
aNew
;
}
void
SetUserInteractiveChangeCallback
(
Link
aNew
)
{
maUserInteractiveChangeCallback
=
aNew
;
}
...
...
svx/source/dialog/dlgctl3d.cxx
Dosyayı görüntüle @
9fb3b992
...
@@ -48,7 +48,7 @@ Svx3DPreviewControl::Svx3DPreviewControl(vcl::Window* pParent, WinBits nStyle)
...
@@ -48,7 +48,7 @@ Svx3DPreviewControl::Svx3DPreviewControl(vcl::Window* pParent, WinBits nStyle)
mp3DView
(
0
),
mp3DView
(
0
),
mpScene
(
0
),
mpScene
(
0
),
mp3DObj
(
0
),
mp3DObj
(
0
),
mnObjectType
(
PREVIEW_OBJECTTYPE_
SPHERE
)
mnObjectType
(
SvxPreviewObjectType
::
SPHERE
)
{
{
Construct
();
Construct
();
...
@@ -103,7 +103,7 @@ void Svx3DPreviewControl::Construct()
...
@@ -103,7 +103,7 @@ void Svx3DPreviewControl::Construct()
mpScene
=
new
E3dPolyScene
(
mp3DView
->
Get3DDefaultAttributes
());
mpScene
=
new
E3dPolyScene
(
mp3DView
->
Get3DDefaultAttributes
());
// initially create object
// initially create object
SetObjectType
(
PREVIEW_OBJECTTYPE_
SPHERE
);
SetObjectType
(
SvxPreviewObjectType
::
SPHERE
);
// camera and perspective
// camera and perspective
Camera3D
&
rCamera
=
(
Camera3D
&
)
mpScene
->
GetCamera
();
Camera3D
&
rCamera
=
(
Camera3D
&
)
mpScene
->
GetCamera
();
...
@@ -177,18 +177,18 @@ void Svx3DPreviewControl::MouseButtonDown(const MouseEvent& rMEvt)
...
@@ -177,18 +177,18 @@ void Svx3DPreviewControl::MouseButtonDown(const MouseEvent& rMEvt)
if
(
rMEvt
.
IsShift
()
&&
rMEvt
.
IsMod1
()
)
if
(
rMEvt
.
IsShift
()
&&
rMEvt
.
IsMod1
()
)
{
{
if
(
PREVIEW_OBJECTTYPE_
SPHERE
==
GetObjectType
())
if
(
SvxPreviewObjectType
::
SPHERE
==
GetObjectType
())
{
{
SetObjectType
(
PREVIEW_OBJECTTYPE_
CUBE
);
SetObjectType
(
SvxPreviewObjectType
::
CUBE
);
}
}
else
else
{
{
SetObjectType
(
PREVIEW_OBJECTTYPE_
SPHERE
);
SetObjectType
(
SvxPreviewObjectType
::
SPHERE
);
}
}
}
}
}
}
void
Svx3DPreviewControl
::
SetObjectType
(
sal_uInt16
nType
)
void
Svx3DPreviewControl
::
SetObjectType
(
SvxPreviewObjectType
nType
)
{
{
if
(
mnObjectType
!=
nType
||
!
mp3DObj
)
if
(
mnObjectType
!=
nType
||
!
mp3DObj
)
{
{
...
@@ -205,7 +205,7 @@ void Svx3DPreviewControl::SetObjectType(sal_uInt16 nType)
...
@@ -205,7 +205,7 @@ void Svx3DPreviewControl::SetObjectType(sal_uInt16 nType)
switch
(
nType
)
switch
(
nType
)
{
{
case
PREVIEW_OBJECTTYPE_
SPHERE
:
case
SvxPreviewObjectType
:
:
SPHERE
:
{
{
mp3DObj
=
new
E3dSphereObj
(
mp3DObj
=
new
E3dSphereObj
(
mp3DView
->
Get3DDefaultAttributes
(),
mp3DView
->
Get3DDefaultAttributes
(),
...
@@ -214,7 +214,7 @@ void Svx3DPreviewControl::SetObjectType(sal_uInt16 nType)
...
@@ -214,7 +214,7 @@ void Svx3DPreviewControl::SetObjectType(sal_uInt16 nType)
}
}
break
;
break
;
case
PREVIEW_OBJECTTYPE_
CUBE
:
case
SvxPreviewObjectType
:
:
CUBE
:
{
{
mp3DObj
=
new
E3dCubeObj
(
mp3DObj
=
new
E3dCubeObj
(
mp3DView
->
Get3DDefaultAttributes
(),
mp3DView
->
Get3DDefaultAttributes
(),
...
@@ -713,7 +713,7 @@ void Svx3DLightControl::Resize()
...
@@ -713,7 +713,7 @@ void Svx3DLightControl::Resize()
mpScene
->
SetSnapRect
(
Rectangle
(
Point
(
0
,
0
),
aSize
));
mpScene
->
SetSnapRect
(
Rectangle
(
Point
(
0
,
0
),
aSize
));
}
}
void
Svx3DLightControl
::
SetObjectType
(
sal_uInt16
nType
)
void
Svx3DLightControl
::
SetObjectType
(
SvxPreviewObjectType
nType
)
{
{
// call parent
// call parent
Svx3DPreviewControl
::
SetObjectType
(
nType
);
Svx3DPreviewControl
::
SetObjectType
(
nType
);
...
@@ -1251,13 +1251,13 @@ IMPL_LINK_NOARG(SvxLightCtl3D, ScrollBarMove)
...
@@ -1251,13 +1251,13 @@ IMPL_LINK_NOARG(SvxLightCtl3D, ScrollBarMove)
IMPL_LINK_NOARG
(
SvxLightCtl3D
,
ButtonPress
)
IMPL_LINK_NOARG
(
SvxLightCtl3D
,
ButtonPress
)
{
{
if
(
PREVIEW_OBJECTTYPE_
SPHERE
==
GetSvx3DLightControl
().
GetObjectType
())
if
(
SvxPreviewObjectType
::
SPHERE
==
GetSvx3DLightControl
().
GetObjectType
())
{
{
GetSvx3DLightControl
().
SetObjectType
(
PREVIEW_OBJECTTYPE_
CUBE
);
GetSvx3DLightControl
().
SetObjectType
(
SvxPreviewObjectType
::
CUBE
);
}
}
else
else
{
{
GetSvx3DLightControl
().
SetObjectType
(
PREVIEW_OBJECTTYPE_
SPHERE
);
GetSvx3DLightControl
().
SetObjectType
(
SvxPreviewObjectType
::
SPHERE
);
}
}
return
0
;
return
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment