diff options
-rw-r--r-- | xmloff/inc/xexptran.hxx | 60 | ||||
-rw-r--r-- | xmloff/inc/xmlkywd.hxx | 49 | ||||
-rw-r--r-- | xmloff/inc/xmlnmspe.hxx | 13 | ||||
-rw-r--r-- | xmloff/source/core/xmlexp.cxx | 6 | ||||
-rw-r--r-- | xmloff/source/core/xmlimp.cxx | 7 | ||||
-rw-r--r-- | xmloff/source/core/xmluconv.cxx | 71 | ||||
-rw-r--r-- | xmloff/source/draw/makefile.mk | 6 | ||||
-rw-r--r-- | xmloff/source/draw/sdpropls.cxx | 139 | ||||
-rw-r--r-- | xmloff/source/draw/sdpropls.hxx | 12 |
9 files changed, 332 insertions, 31 deletions
diff --git a/xmloff/inc/xexptran.hxx b/xmloff/inc/xexptran.hxx index 875491d698ed..718b5ffdc882 100644 --- a/xmloff/inc/xexptran.hxx +++ b/xmloff/inc/xexptran.hxx @@ -2,9 +2,9 @@ * * $RCSfile: xexptran.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 17:07:01 $ + * last change: $Author: aw $ $Date: 2000-11-24 16:46:35 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -90,29 +90,38 @@ #include <com/sun/star/drawing/FlagSequence.hpp> #endif +#ifndef _COM_SUN_STAR_DRAWING_HOMOGENMATRIX_HPP_ +#include <com/sun/star/drawing/HomogenMatrix.hpp> +#endif + ////////////////////////////////////////////////////////////////////////////// -struct ImpSdXMLExpTransObjBase; +struct ImpSdXMLExpTransObj2DBase; +struct ImpSdXMLExpTransObj3DBase; class SvXMLUnitConverter; +class Vector3D; +class Matrix3D; +class Matrix4D; ////////////////////////////////////////////////////////////////////////////// -DECLARE_LIST(ImpSdXMLExpTransObjBaseList, ImpSdXMLExpTransObjBase*); +DECLARE_LIST(ImpSdXMLExpTransObj2DBaseList, ImpSdXMLExpTransObj2DBase*); +DECLARE_LIST(ImpSdXMLExpTransObj3DBaseList, ImpSdXMLExpTransObj3DBase*); ////////////////////////////////////////////////////////////////////////////// -class SdXMLImExTransform +class SdXMLImExTransform2D { - ImpSdXMLExpTransObjBaseList maList; - rtl::OUString msString; + ImpSdXMLExpTransObj2DBaseList maList; + rtl::OUString msString; void EmptyList(); - ImpSdXMLExpTransObjBase* FindObject(sal_uInt16 nType, sal_uInt32 nInd = 0L); + ImpSdXMLExpTransObj2DBase* FindObject(sal_uInt16 nType, sal_uInt32 nInd = 0L); public: - SdXMLImExTransform() {} - SdXMLImExTransform(const rtl::OUString& rNew, const SvXMLUnitConverter& rConv); - ~SdXMLImExTransform() { EmptyList(); } + SdXMLImExTransform2D() {} + SdXMLImExTransform2D(const rtl::OUString& rNew, const SvXMLUnitConverter& rConv); + ~SdXMLImExTransform2D() { EmptyList(); } void AddRotate(double fNew); void AddScale(const Vector2D& rNew); @@ -130,6 +139,35 @@ public: ////////////////////////////////////////////////////////////////////////////// +class SdXMLImExTransform3D +{ + ImpSdXMLExpTransObj3DBaseList maList; + rtl::OUString msString; + + void EmptyList(); + +public: + SdXMLImExTransform3D() {} + SdXMLImExTransform3D(const rtl::OUString& rNew, const SvXMLUnitConverter& rConv); + ~SdXMLImExTransform3D() { EmptyList(); } + + void AddRotateX(double fNew); + void AddRotateY(double fNew); + void AddRotateZ(double fNew); + void AddScale(const Vector3D& rNew); + void AddTranslate(const Vector3D& rNew); + void AddMatrix(const Matrix3D& rNew); + + void AddHomogenMatrix(const com::sun::star::drawing::HomogenMatrix& xHomMat); + + sal_Bool NeedsAction() const { return (sal_Bool)(maList.Count() > 0L); } + void GetFullTransform(Matrix4D& rFullTrans); + BOOL GetFullHomogenTransform(com::sun::star::drawing::HomogenMatrix& xHomMat); + const rtl::OUString& GetExportString(const SvXMLUnitConverter& rConv); +}; + +////////////////////////////////////////////////////////////////////////////// + class SdXMLImExViewBox { rtl::OUString msString; diff --git a/xmloff/inc/xmlkywd.hxx b/xmloff/inc/xmlkywd.hxx index e69637661f87..e05f4bd0c1e9 100644 --- a/xmloff/inc/xmlkywd.hxx +++ b/xmloff/inc/xmlkywd.hxx @@ -2,9 +2,9 @@ * * $RCSfile: xmlkywd.hxx,v $ * - * $Revision: 1.49 $ + * $Revision: 1.50 $ * - * last change: $Author: bm $ $Date: 2000-11-24 09:44:19 $ + * last change: $Author: aw $ $Date: 2000-11-24 16:48:48 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -108,6 +108,8 @@ XML_CONSTASCII_ACTION( sXML_n_table, "http://openoffice.org/2000/table" ); XML_CONSTASCII_ACTION( sXML_n_table_old, "http://sun.com/xmlns/staroffice/table" ); XML_CONSTASCII_ACTION( sXML_np_draw, "draw" ); XML_CONSTASCII_ACTION( sXML_n_draw, "http://openoffice.org/2000/drawing" ); +XML_CONSTASCII_ACTION( sXML_np_dr3d, "dr3d" ); +XML_CONSTASCII_ACTION( sXML_n_dr3d, "http://openoffice.org/2000/dr3d" ); XML_CONSTASCII_ACTION( sXML_n_draw_old, "http://sun.com/xmlns/staroffice/draw" ); XML_CONSTASCII_ACTION( sXML_np_presentation, "presentation" ); XML_CONSTASCII_ACTION( sXML_n_presentation, "http://openoffice.org/2000/presentation" ); @@ -1476,5 +1478,48 @@ XML_CONSTASCII_ACTION( sXML_year, "year" ); XML_CONSTASCII_ACTION( sXML_zindex, "z-index" ); XML_CONSTASCII_ACTION( sXML_zero_values, "zero-values" ); +XML_CONSTASCII_ACTION( sXML_horizontal_segments, "horizontal-segments" ); +XML_CONSTASCII_ACTION( sXML_vertical_segments, "vertical-segments" ); +XML_CONSTASCII_ACTION( sXML_edge_rounding, "edge-rounding" ); +XML_CONSTASCII_ACTION( sXML_back_scale, "back-scale" ); +XML_CONSTASCII_ACTION( sXML_end_angle, "end-angle" ); +XML_CONSTASCII_ACTION( sXML_depth, "depth" ); +XML_CONSTASCII_ACTION( sXML_backface_culling, "backface-culling" ); +XML_CONSTASCII_ACTION( sXML_normals_kind, "normals-kind" ); +XML_CONSTASCII_ACTION( sXML_normals_direction, "normals-direction" ); +XML_CONSTASCII_ACTION( sXML_tex_generation_mode_x, "texture-generation-mode-x" ); +XML_CONSTASCII_ACTION( sXML_tex_generation_mode_y, "texture-generation-mode-y" ); +XML_CONSTASCII_ACTION( sXML_tex_kind, "texture-kind" ); +XML_CONSTASCII_ACTION( sXML_tex_filter, "texture-filter" ); +XML_CONSTASCII_ACTION( sXML_tex_mode, "texture-mode" ); +XML_CONSTASCII_ACTION( sXML_emissive_color, "emissive-color" ); +XML_CONSTASCII_ACTION( sXML_specular_color, "specular-color" ); +XML_CONSTASCII_ACTION( sXML_diffuse_color, "diffuse-color" ); +XML_CONSTASCII_ACTION( sXML_shininess, "shininess" ); +XML_CONSTASCII_ACTION( sXML_flat, "flat" ); +XML_CONSTASCII_ACTION( sXML_sphere, "sphere" ); +XML_CONSTASCII_ACTION( sXML_intensity, "intensity" ); +XML_CONSTASCII_ACTION( sXML_modulate, "modulate" ); +XML_CONSTASCII_ACTION( sXML_blend, "blend" ); +XML_CONSTASCII_ACTION( sXML_enabled, "enabled" ); +XML_CONSTASCII_ACTION( sXML_disabled, "disabled" ); +XML_CONSTASCII_ACTION( sXML_double_sided, "double-sided" ); +XML_CONSTASCII_ACTION( sXML_normal, "normal" ); +XML_CONSTASCII_ACTION( sXML_inverse, "inverse" ); +XML_CONSTASCII_ACTION( sXML_attractive, "attractive"); +XML_CONSTASCII_ACTION( sXML_correct, "correct"); + +XML_CONSTASCII_ACTION( sXML_perspective, "perspective"); +XML_CONSTASCII_ACTION( sXML_projection, "projection"); +XML_CONSTASCII_ACTION( sXML_focal_length, "focal-length"); +XML_CONSTASCII_ACTION( sXML_shadow_slant, "shadow-slant"); +XML_CONSTASCII_ACTION( sXML_phong, "phong"); +XML_CONSTASCII_ACTION( sXML_gouraud, "gouraud"); +XML_CONSTASCII_ACTION( sXML_draft, "draft"); +XML_CONSTASCII_ACTION( sXML_shade_mode, "shade-mode"); +XML_CONSTASCII_ACTION( sXML_ambient_color, "ambient-color"); +XML_CONSTASCII_ACTION( sXML_lighting_mode, "lighting-mode"); +XML_CONSTASCII_ACTION( sXML_specular, "specular"); +XML_CONSTASCII_ACTION( sXML_light, "light"); #endif diff --git a/xmloff/inc/xmlnmspe.hxx b/xmloff/inc/xmlnmspe.hxx index b8f53fbcccb5..9f7fa3ac813f 100644 --- a/xmloff/inc/xmlnmspe.hxx +++ b/xmloff/inc/xmlnmspe.hxx @@ -2,9 +2,9 @@ * * $RCSfile: xmlnmspe.hxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: ab $ $Date: 2000-11-21 11:57:24 $ + * last change: $Author: aw $ $Date: 2000-11-24 16:51:23 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -90,11 +90,12 @@ XML_NAMESPACE( NUMBER, 9U ) XML_NAMESPACE( PRESENTATION, 10U ) XML_NAMESPACE( SVG, 11U ) XML_NAMESPACE( CHART, 12U ) -XML_NAMESPACE( MATH, 13U ) -XML_NAMESPACE( FORM, 14U ) -XML_NAMESPACE( SCRIPT, 15U ) +XML_NAMESPACE( DR3D, 13U ) +XML_NAMESPACE( MATH, 14U ) +XML_NAMESPACE( FORM, 15U ) +XML_NAMESPACE( SCRIPT, 16U ) -#define _XML_OLD_NAMESPACE_BASE 16U +#define _XML_OLD_NAMESPACE_BASE 17U // namespaces used in the technical preview (SO 5.2) XML_OLD_NAMESPACE( FO, 0U ) diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx index e377eed341d0..e9bd70ecea98 100644 --- a/xmloff/source/core/xmlexp.cxx +++ b/xmloff/source/core/xmlexp.cxx @@ -2,9 +2,9 @@ * * $RCSfile: xmlexp.cxx,v $ * - * $Revision: 1.13 $ + * $Revision: 1.14 $ * - * last change: $Author: mib $ $Date: 2000-11-20 11:09:30 $ + * last change: $Author: aw $ $Date: 2000-11-24 16:55:29 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -165,6 +165,8 @@ void SvXMLExport::_InitCtor() sXML_n_text, XML_NAMESPACE_TEXT ); pNamespaceMap->AddAtIndex( XML_NAMESPACE_DRAW, sXML_np_draw, sXML_n_draw, XML_NAMESPACE_DRAW ); + pNamespaceMap->AddAtIndex( XML_NAMESPACE_DR3D, sXML_np_dr3d, + sXML_n_dr3d, XML_NAMESPACE_DR3D ); pNamespaceMap->AddAtIndex( XML_NAMESPACE_SVG, sXML_np_svg, sXML_n_svg, XML_NAMESPACE_SVG ); pNamespaceMap->AddAtIndex( XML_NAMESPACE_CHART, sXML_np_chart, diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx index e60ada7bc15c..a7c2ea15604f 100644 --- a/xmloff/source/core/xmlimp.cxx +++ b/xmloff/source/core/xmlimp.cxx @@ -2,9 +2,9 @@ * * $RCSfile: xmlimp.cxx,v $ * - * $Revision: 1.8 $ + * $Revision: 1.9 $ * - * last change: $Author: sab $ $Date: 2000-11-16 18:16:04 $ + * last change: $Author: aw $ $Date: 2000-11-24 16:56:12 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -118,6 +118,7 @@ sal_Char __READONLY_DATA sXML_np__style[] = "_style"; sal_Char __READONLY_DATA sXML_np__text[] = "_text"; sal_Char __READONLY_DATA sXML_np__table[] = "_table"; sal_Char __READONLY_DATA sXML_np__draw[] = "_draw"; +sal_Char __READONLY_DATA sXML_np__dr3d[] = "_dr3d"; sal_Char __READONLY_DATA sXML_np__fo[] = "_fo"; sal_Char __READONLY_DATA sXML_np__xlink[] = "_xlink"; sal_Char __READONLY_DATA sXML_np__dc[] = "_dc"; @@ -160,6 +161,8 @@ void SvXMLImport::_InitCtor() sXML_n_table, XML_NAMESPACE_TABLE ); pNamespaceMap->AddAtIndex( XML_NAMESPACE_DRAW_IDX, sXML_np__draw, sXML_n_draw, XML_NAMESPACE_DRAW ); + pNamespaceMap->AddAtIndex( XML_NAMESPACE_DR3D_IDX, sXML_np__dr3d, + sXML_n_dr3d, XML_NAMESPACE_DR3D ); pNamespaceMap->AddAtIndex( XML_NAMESPACE_FO_IDX, sXML_np__fo, sXML_n_fo, XML_NAMESPACE_FO ); pNamespaceMap->AddAtIndex( XML_NAMESPACE_XLINK_IDX, sXML_np__xlink, diff --git a/xmloff/source/core/xmluconv.cxx b/xmloff/source/core/xmluconv.cxx index 31fcaca4e058..e843252b6535 100644 --- a/xmloff/source/core/xmluconv.cxx +++ b/xmloff/source/core/xmluconv.cxx @@ -2,9 +2,9 @@ * * $RCSfile: xmluconv.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: cl $ $Date: 2000-11-12 15:57:00 $ + * last change: $Author: aw $ $Date: 2000-11-24 16:57:13 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -103,6 +103,10 @@ #include <com/sun/star/util/XNumberFormatsSupplier.hpp> #endif +#ifndef _SVX_VECTOR3D_HXX +#include <goodies/vector3d.hxx> +#endif + using namespace rtl; const sal_Int8 XML_MAXDIGITSCOUNT_TIME = 11; @@ -1284,3 +1288,66 @@ sal_Bool SvXMLTokenEnumerator::getNextToken( OUString& rToken ) return sal_True; } +// --- + +/** convert string to vector3D */ +sal_Bool SvXMLUnitConverter::convertVector3D( Vector3D& rVector, + const OUString& rValue ) +{ + if(!rValue.getLength() || rValue[0] != '(') + return sal_False; + + sal_Int32 nPos(1L); + sal_Int32 nFound = rValue.indexOf(sal_Unicode(' '), nPos); + + if(nFound == -1 || nFound <= nPos) + return sal_False; + + OUString aContentX = rValue.copy(nPos, nFound - nPos); + + nPos = nFound + 1; + nFound = rValue.indexOf(sal_Unicode(' '), nPos); + + if(nFound == -1 || nFound <= nPos) + return sal_False; + + OUString aContentY = rValue.copy(nPos, nFound - nPos); + + nPos = nFound + 1; + nFound = rValue.indexOf(sal_Unicode(')'), nPos); + + if(nFound == -1 || nFound <= nPos) + return sal_False; + + OUString aContentZ = rValue.copy(nPos, nFound - nPos); + + int nErr; + + rVector.X() = SolarMath::StringToDouble(aContentX, sal_Unicode(','), sal_Unicode('.'),nErr); + + if(nErr) + return sal_False; + + rVector.Y() = SolarMath::StringToDouble(aContentY, sal_Unicode(','), sal_Unicode('.'),nErr); + + if(nErr) + return sal_False; + + rVector.Z() = SolarMath::StringToDouble(aContentZ, sal_Unicode(','), sal_Unicode('.'),nErr); + + return (nErr == 0L); +} + +/** convert vector3D to string */ +void SvXMLUnitConverter::convertVector3D( OUStringBuffer &rBuffer, + const Vector3D& rVector ) +{ + rBuffer.append(sal_Unicode('(')); + convertNumber(rBuffer, rVector.X()); + rBuffer.append(sal_Unicode(' ')); + convertNumber(rBuffer, rVector.Y()); + rBuffer.append(sal_Unicode(' ')); + convertNumber(rBuffer, rVector.Z()); + rBuffer.append(sal_Unicode(')')); +} + diff --git a/xmloff/source/draw/makefile.mk b/xmloff/source/draw/makefile.mk index a60c263837c7..c894bf77b019 100644 --- a/xmloff/source/draw/makefile.mk +++ b/xmloff/source/draw/makefile.mk @@ -2,9 +2,9 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.1.1.1 $ +# $Revision: 1.2 $ # -# last change: $Author: hr $ $Date: 2000-09-18 17:07:03 $ +# last change: $Author: aw $ $Date: 2000-11-24 16:58:29 $ # # The Contents of this file are made available subject to the terms of # either of the following licenses @@ -81,6 +81,8 @@ SLOFILES = \ $(SLO)$/ximpbody.obj \ $(SLO)$/ximpshap.obj \ $(SLO)$/ximpgrp.obj \ + $(SLO)$/ximp3dscene.obj \ + $(SLO)$/ximp3dobject.obj \ $(SLO)$/ximpnote.obj \ $(SLO)$/sdpropls.obj \ $(SLO)$/propimp0.obj \ diff --git a/xmloff/source/draw/sdpropls.cxx b/xmloff/source/draw/sdpropls.cxx index 4720a9fa6cf9..2a943cc01a8e 100644 --- a/xmloff/source/draw/sdpropls.cxx +++ b/xmloff/source/draw/sdpropls.cxx @@ -2,9 +2,9 @@ * * $RCSfile: sdpropls.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: cl $ $Date: 2000-11-23 19:25:32 $ + * last change: $Author: aw $ $Date: 2000-11-24 16:59:46 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -109,6 +109,22 @@ #include <xmlnmspe.hxx> #endif +#ifndef _COM_SUN_STAR_DRAWING_NORMALSKIND_HPP_ +#include <com/sun/star/drawing/NormalsKind.hpp> +#endif + +#ifndef _COM_SUN_STAR_DRAWING_TEXTUREPROJECTIONMODE_HPP_ +#include <com/sun/star/drawing/TextureProjectionMode.hpp> +#endif + +#ifndef _COM_SUN_STAR_DRAWING_TEXTUREKIND_HPP_ +#include <com/sun/star/drawing/TextureKind.hpp> +#endif + +#ifndef _COM_SUN_STAR_DRAWING_TEXTUREMODE_HPP_ +#include <com/sun/star/drawing/TextureMode.hpp> +#endif + using namespace ::rtl; using namespace ::com::sun::star; @@ -216,6 +232,36 @@ const XMLPropertyMapEntry aXMLSDProperties[] = // ?? { "ParaTopMarginRelative", XML_NAMESPACE_FO, sXML_margin_top, XML_TYPE_PERCENT, CTF_PARATOPMARGIN_REL }, { "ParaBottomMargin", XML_NAMESPACE_FO, sXML_margin_bottom, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_PARABOTTOMMARGIN }, // ?? { "ParaBottomMarginRelative",XML_NAMESPACE_FO, sXML_margin_bottom, XML_TYPE_PERCENT, CTF_PARABOTTOMMARGIN_REL }, + + // 3D geometry attributes + { "D3DHorizontalSegments", XML_NAMESPACE_DR3D, sXML_horizontal_segments, XML_TYPE_NUMBER, 0 }, + { "D3DVerticalSegments", XML_NAMESPACE_DR3D, sXML_vertical_segments, XML_TYPE_NUMBER, 0 }, + { "D3DPercentDiagonal", XML_NAMESPACE_DR3D, sXML_edge_rounding, XML_TYPE_PERCENT, 0 }, + { "D3DBackscale", XML_NAMESPACE_DR3D, sXML_back_scale, XML_TYPE_PERCENT, 0 }, + { "D3DEndAngle", XML_NAMESPACE_DR3D, sXML_end_angle, XML_TYPE_NUMBER, 0 }, + { "D3DDepth", XML_NAMESPACE_DR3D, sXML_depth, XML_TYPE_MEASURE, 0 }, + { "D3DDoubleSided", XML_NAMESPACE_DR3D, sXML_backface_culling, XML_SD_TYPE_BACKFACE_CULLING, 0 }, + + // 3D lighting attributes + { "D3DNormalsKind", XML_NAMESPACE_DR3D, sXML_normals_kind, XML_SD_TYPE_NORMALS_KIND, 0 }, + { "D3DNormalsInvert", XML_NAMESPACE_DR3D, sXML_normals_direction, XML_SD_TYPE_NORMALS_DIRECTION, 0 }, + + // 3D texture attributes + { "D3DTextureProjectionX", XML_NAMESPACE_DR3D, sXML_tex_generation_mode_x, XML_SD_TYPE_TEX_GENERATION_MODE_X, 0 }, + { "D3DTextureProjectionY", XML_NAMESPACE_DR3D, sXML_tex_generation_mode_y, XML_SD_TYPE_TEX_GENERATION_MODE_Y, 0 }, + { "D3DTextureKind", XML_NAMESPACE_DR3D, sXML_tex_kind, XML_SD_TYPE_TEX_KIND, 0 }, + { "D3DTextureMode", XML_NAMESPACE_DR3D, sXML_tex_mode, XML_SD_TYPE_TEX_MODE, 0 }, + { "D3DTextureFilter", XML_NAMESPACE_DR3D, sXML_tex_filter, XML_TYPE_BOOL, 0 }, + + // 3D material attributes + { "D3DMaterialColor", XML_NAMESPACE_DR3D, sXML_diffuse_color, XML_TYPE_COLOR, 0 }, + { "D3DMaterialEmission", XML_NAMESPACE_DR3D, sXML_emissive_color, XML_TYPE_COLOR, 0 }, + { "D3DMaterialSpecular", XML_NAMESPACE_DR3D, sXML_specular_color, XML_TYPE_COLOR, 0 }, + { "D3DMaterialSpecularIntensity", XML_NAMESPACE_DR3D, sXML_shininess, XML_TYPE_PERCENT, 0 }, + + // 3D shadow attributes + { "D3DShadow3D", XML_NAMESPACE_DR3D, sXML_shadow, XML_TYPE_BOOL, 0 }, + { 0L } }; @@ -346,6 +392,51 @@ SvXMLEnumMapEntry aXML_FadeEffect_EnumMap[] = { NULL, 0 } }; +////////////////////////////////////////////////////////////////////////////// +// 3D EnumMaps + +SvXMLEnumMapEntry aXML_NormalsKind_EnumMap[] = +{ + { sXML_object, drawing::NormalsKind_SPECIFIC }, + { sXML_flat, drawing::NormalsKind_FLAT }, + { sXML_sphere, drawing::NormalsKind_SPHERE }, + { NULL, 0 } +}; + +SvXMLEnumMapEntry aXML_TexGenerationX_EnumMap[] = +{ + { sXML_object, drawing::TextureProjectionMode_OBJECTSPECIFIC }, + { sXML_parallel, drawing::TextureProjectionMode_PARALLEL }, + { sXML_sphere, drawing::TextureProjectionMode_SPHERE }, + { NULL, 0 } +}; + +SvXMLEnumMapEntry aXML_TexGenerationY_EnumMap[] = +{ + { sXML_object, drawing::TextureProjectionMode_OBJECTSPECIFIC }, + { sXML_parallel, drawing::TextureProjectionMode_PARALLEL }, + { sXML_sphere, drawing::TextureProjectionMode_SPHERE }, + { NULL, 0 } +}; + +SvXMLEnumMapEntry aXML_TexKind_EnumMap[] = +{ + { sXML_luminance, drawing::TextureKind_LUMINANCE }, +// { sXML_intensity, drawing::TextureKind_INTENSITY }, + { sXML_color, drawing::TextureKind_COLOR }, + { NULL, 0 } +}; + +SvXMLEnumMapEntry aXML_TexMode_EnumMap[] = +{ + { sXML_replace, drawing::TextureMode_REPLACE }, + { sXML_modulate, drawing::TextureMode_MODULATE }, + { sXML_blend, drawing::TextureMode_BLEND }, + { NULL, 0 } +}; + +////////////////////////////////////////////////////////////////////////////// + XMLSdPropHdlFactory::~XMLSdPropHdlFactory() { } @@ -430,6 +521,50 @@ const XMLPropertyHandler* XMLSdPropHdlFactory::GetPropertyHandler( sal_Int32 nTy // { // break; // } + + ////////////////////////////////////////////////////////////////// + // 3D Properties + + case XML_SD_TYPE_BACKFACE_CULLING: + { + const OUString aTrueStr( OUString::createFromAscii(sXML_enabled) ); + const OUString aFalseStr( OUString::createFromAscii(sXML_disabled) ); + pHdl = new XMLNamedBoolPropertyHdl( aTrueStr, aFalseStr ); + break; + } + + case XML_SD_TYPE_NORMALS_KIND: + { + pHdl = new XMLEnumPropertyHdl( aXML_NormalsKind_EnumMap, ::getCppuType((const drawing::NormalsKind*)0) ); + break; + } + case XML_SD_TYPE_NORMALS_DIRECTION: + { + const OUString aTrueStr( OUString::createFromAscii(sXML_normal) ); + const OUString aFalseStr( OUString::createFromAscii(sXML_inverse) ); + pHdl = new XMLNamedBoolPropertyHdl( aTrueStr, aFalseStr ); + break; + } + case XML_SD_TYPE_TEX_GENERATION_MODE_X: + { + pHdl = new XMLEnumPropertyHdl( aXML_TexGenerationX_EnumMap, ::getCppuType((const drawing::TextureProjectionMode*)0) ); + break; + } + case XML_SD_TYPE_TEX_GENERATION_MODE_Y: + { + pHdl = new XMLEnumPropertyHdl( aXML_TexGenerationY_EnumMap, ::getCppuType((const drawing::TextureProjectionMode*)0) ); + break; + } + case XML_SD_TYPE_TEX_KIND: + { + pHdl = new XMLEnumPropertyHdl( aXML_TexKind_EnumMap, ::getCppuType((const drawing::TextureKind*)0) ); + break; + } + case XML_SD_TYPE_TEX_MODE: + { + pHdl = new XMLEnumPropertyHdl( aXML_TexMode_EnumMap, ::getCppuType((const drawing::TextureMode*)0) ); + break; + } } if(pHdl) diff --git a/xmloff/source/draw/sdpropls.hxx b/xmloff/source/draw/sdpropls.hxx index 29902311dc09..d6171671a833 100644 --- a/xmloff/source/draw/sdpropls.hxx +++ b/xmloff/source/draw/sdpropls.hxx @@ -2,9 +2,9 @@ * * $RCSfile: sdpropls.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: pw $ $Date: 2000-10-26 14:32:06 $ + * last change: $Author: aw $ $Date: 2000-11-24 17:00:21 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -106,6 +106,14 @@ extern const XMLPropertyMapEntry aXMLSDPresPageProps[]; #define XML_SD_TYPE_COLORMODE (XML_SD_TYPES_START + 15 ) #define XML_SD_TYPE_TEXT_CROSSEDOUT (XML_SD_TYPES_START + 16 ) +// 3D property types +#define XML_SD_TYPE_BACKFACE_CULLING (XML_SD_TYPES_START + 17 ) +#define XML_SD_TYPE_NORMALS_KIND (XML_SD_TYPES_START + 18 ) +#define XML_SD_TYPE_NORMALS_DIRECTION (XML_SD_TYPES_START + 19 ) +#define XML_SD_TYPE_TEX_GENERATION_MODE_X (XML_SD_TYPES_START + 20 ) +#define XML_SD_TYPE_TEX_GENERATION_MODE_Y (XML_SD_TYPES_START + 21 ) +#define XML_SD_TYPE_TEX_KIND (XML_SD_TYPES_START + 22 ) +#define XML_SD_TYPE_TEX_MODE (XML_SD_TYPES_START + 23 ) ////////////////////////////////////////////////////////////////////////////// // factory for own graphic properties |