Author: regina Date: Tue Feb 11 14:40:00 2014 New Revision: 1567151 URL: http://svn.apache.org/r1567151 Log: #123879 dr3d rotation angle is degree in ODF1.2 but radiant in AOO core
Modified: openoffice/trunk/main/xmloff/source/draw/xexptran.cxx Modified: openoffice/trunk/main/xmloff/source/draw/xexptran.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/xmloff/source/draw/xexptran.cxx?rev=1567151&r1=1567150&r2=1567151&view=diff ============================================================================== --- openoffice/trunk/main/xmloff/source/draw/xexptran.cxx (original) +++ openoffice/trunk/main/xmloff/source/draw/xexptran.cxx Tue Feb 11 14:40:00 2014 @@ -32,6 +32,7 @@ #include <basegfx/matrix/b2dhommatrix.hxx> #include <basegfx/tuple/b3dtuple.hxx> #include <basegfx/matrix/b3dhommatrix.hxx> +#include <basegfx/numeric/ftools.hxx> #include <tools/string.hxx> using ::rtl::OUString; @@ -904,21 +905,21 @@ const OUString& SdXMLImExTransform3D::Ge case IMP_SDXMLEXP_TRANSOBJ3D_ROTATE_X : { aNewString += OUString::createFromAscii("rotatex ("); - Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj3DRotateX*)pObj)->mfRotateX); + Imp_PutDoubleChar(aNewString, rConv, basegfx::rad2deg( ((ImpSdXMLExpTransObj3DRotateX*)pObj)->mfRotateX) ); aNewString += aClosingBrace; break; } case IMP_SDXMLEXP_TRANSOBJ3D_ROTATE_Y : { aNewString += OUString::createFromAscii("rotatey ("); - Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj3DRotateY*)pObj)->mfRotateY); + Imp_PutDoubleChar(aNewString, rConv, basegfx::rad2deg( ((ImpSdXMLExpTransObj3DRotateY*)pObj)->mfRotateY) ); aNewString += aClosingBrace; break; } case IMP_SDXMLEXP_TRANSOBJ3D_ROTATE_Z : { aNewString += OUString::createFromAscii("rotatez ("); - Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj3DRotateZ*)pObj)->mfRotateZ); + Imp_PutDoubleChar(aNewString, rConv, basegfx::rad2deg( ((ImpSdXMLExpTransObj3DRotateZ*)pObj)->mfRotateZ) ); aNewString += aClosingBrace; break; } @@ -1062,7 +1063,7 @@ void SdXMLImExTransform3D::SetString(con Imp_SkipSpacesAndOpeningBraces(aStr, nPos, nLen); fValue = Imp_GetDoubleChar(aStr, nPos, nLen, rConv, fValue); if(fValue != 0.0) - maList.push_back(new ImpSdXMLExpTransObj3DRotateX(fValue)); + maList.push_back(new ImpSdXMLExpTransObj3DRotateX(basegfx::deg2rad(fValue))); Imp_SkipSpacesAndClosingBraces(aStr, nPos, nLen); } @@ -1074,7 +1075,7 @@ void SdXMLImExTransform3D::SetString(con Imp_SkipSpacesAndOpeningBraces(aStr, nPos, nLen); fValue = Imp_GetDoubleChar(aStr, nPos, nLen, rConv, fValue); if(fValue != 0.0) - maList.push_back(new ImpSdXMLExpTransObj3DRotateY(fValue)); + maList.push_back(new ImpSdXMLExpTransObj3DRotateY(basegfx::deg2rad(fValue))); Imp_SkipSpacesAndClosingBraces(aStr, nPos, nLen); } @@ -1086,7 +1087,7 @@ void SdXMLImExTransform3D::SetString(con Imp_SkipSpacesAndOpeningBraces(aStr, nPos, nLen); fValue = Imp_GetDoubleChar(aStr, nPos, nLen, rConv, fValue); if(fValue != 0.0) - maList.push_back(new ImpSdXMLExpTransObj3DRotateZ(fValue)); + maList.push_back(new ImpSdXMLExpTransObj3DRotateZ(basegfx::deg2rad(fValue))); Imp_SkipSpacesAndClosingBraces(aStr, nPos, nLen); }