summaryrefslogtreecommitdiff
path: root/svx/source/dialog/dlgctl3d.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/dialog/dlgctl3d.cxx')
-rw-r--r--svx/source/dialog/dlgctl3d.cxx21
1 files changed, 15 insertions, 6 deletions
diff --git a/svx/source/dialog/dlgctl3d.cxx b/svx/source/dialog/dlgctl3d.cxx
index 8923ca6776..9d6644f5fb 100644
--- a/svx/source/dialog/dlgctl3d.cxx
+++ b/svx/source/dialog/dlgctl3d.cxx
@@ -511,8 +511,17 @@ void Svx3DLightControl::TrySelection(Point aPosPixel)
if(aResult.size())
{
- // take the frontmost one
- const E3dCompoundObject* pResult = aResult[0];
+ // exclude expansion object which will be part of
+ // the hits. It's invisible, but for HitTest, it's included
+ const E3dCompoundObject* pResult = 0;
+
+ for(sal_uInt32 b(0); !pResult && b < aResult.size(); b++)
+ {
+ if(aResult[b] && aResult[b] != mpExpansionObject)
+ {
+ pResult = aResult[b];
+ }
+ }
if(pResult == mp3DObj)
{
@@ -777,8 +786,8 @@ void Svx3DLightControl::GetPosition(double& rHor, double& rVer)
}
if(IsGeometrySelected())
{
- rHor = mfRotateY;
- rVer = mfRotateX;
+ rHor = mfRotateY / F_PI180; // 0..360.0
+ rVer = mfRotateX / F_PI180; // -90.0..90.0
}
}
@@ -821,8 +830,8 @@ void Svx3DLightControl::SetPosition(double fHor, double fVer)
{
if(mfRotateX != fVer || mfRotateY != fHor)
{
- mfRotateX = fVer;
- mfRotateY = fHor;
+ mfRotateX = fVer * F_PI180;
+ mfRotateY = fHor * F_PI180;
if(mp3DObj)
{