diff options
author | Jacobo Aragunde Pérez <jaragunde@igalia.com> | 2014-04-30 19:00:43 +0200 |
---|---|---|
committer | Jacobo Aragunde Pérez <jaragunde@igalia.com> | 2014-05-06 16:32:27 +0200 |
commit | 8d2a5c16c7e487b407aced891da17e5c2486f2ff (patch) | |
tree | e643c2073c2a073cded910039a611f47b4709390 /include/oox | |
parent | 9bb6956197c5caaa150fc8ed52233741749a4060 (diff) |
oox: Integrate Shape3DProperties and Scene3DPropertiesContext
Code for these two classes was already present but it was commented
out or left outside of the build system because it didn't even
compile. I've brought it back and made it compile, but it has no use
yet. The goal is using it to preserve 3D transformations.
At scene3dcontext.cxx I removed the text chunks found in the middle
of the source and corrected some mistakes; I also modified the
conversion of "fov" attribute.
At shape3dproperties.hxx I removed all the struct members because
they seemed to have been copied&pasted from another file, and added
only those members that made sense. Removed useless function
definitions.
Change-Id: I2c00ea638e1a4fb1a3820bc4c322488296d3e6d7
Diffstat (limited to 'include/oox')
-rw-r--r-- | include/oox/drawingml/scene3dcontext.hxx | 1 | ||||
-rw-r--r-- | include/oox/drawingml/shape3dproperties.hxx | 77 |
2 files changed, 6 insertions, 72 deletions
diff --git a/include/oox/drawingml/scene3dcontext.hxx b/include/oox/drawingml/scene3dcontext.hxx index 2ebe581270c0..bbee4e677b9f 100644 --- a/include/oox/drawingml/scene3dcontext.hxx +++ b/include/oox/drawingml/scene3dcontext.hxx @@ -21,6 +21,7 @@ #define INCLUDED_OOX_DRAWINGML_SCENE3DCONTEXT_HXX #include <oox/core/contexthandler2.hxx> +#include "oox/drawingml/shape3dproperties.hxx" namespace oox { namespace drawingml { diff --git a/include/oox/drawingml/shape3dproperties.hxx b/include/oox/drawingml/shape3dproperties.hxx index 24c22afbd744..d39aee8dc400 100644 --- a/include/oox/drawingml/shape3dproperties.hxx +++ b/include/oox/drawingml/shape3dproperties.hxx @@ -36,83 +36,16 @@ namespace drawingml { -struct Shape3DPropertyNames -{ - OUString maFillStyle; - OUString maFillColor; - OUString maFillTransparence; - OUString maFillGradient; - OUString maFillBitmap; - OUString maFillBitmapMode; - OUString maFillBitmapTile; - OUString maFillBitmapStretch; - OUString maFillBitmapLogicalSize; - OUString maFillBitmapSizeX; - OUString maFillBitmapSizeY; - OUString maFillBitmapOffsetX; - OUString maFillBitmapOffsetY; - OUString maFillBitmapRectanglePoint; - bool mbNamedFillGradient; - bool mbNamedFillBitmap; - bool mbTransformGraphic; - - Shape3DPropertyNames(); -}; - - - struct Shape3DProperties { - typedef ::std::map< double, Color > GradientStopMap; - - OptValue< sal_Int32 > moFillType; /// Fill type (OOXML token). - OptValue< bool > moRotateWithShape; /// True = rotate gradient/bitmap with shape. - Color maFillColor; /// Solid fill color and transparence. - GradientStopMap maGradientStops; /// Gradient stops (colors/transparence). - OptValue< sal_Int32 > moGradientPath; /// If set, gradient follows rectangle, circle, or shape. - OptValue< sal_Int32 > moShadeAngle; /// Rotation angle of linear gradients. - OptValue< bool > moShadeScaled; - OptValue< sal_Int32 > moFlipModeToken; - OptValue< com::sun::star::geometry::IntegerRectangle2D > moFillToRect; - OptValue< com::sun::star::geometry::IntegerRectangle2D > moTileRect; - OptValue< sal_Int32 > moPattPreset; /// Preset pattern type. - Color maPattFgColor; /// Pattern foreground color. - Color maPattBgColor; /// Pattern background color. - ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > mxGraphic; - Color maColorChangeFrom; /// Start color of color transformation. - Color maColorChangeTo; /// Destination color of color transformation. - OptValue< sal_Int32 > moBitmapMode; /// Bitmap tile or stretch. - OptValue< sal_Int32 > moTileX; /// Width of bitmap tiles. - OptValue< sal_Int32 > moTileY; /// Height of bitmap tiles. - OptValue< sal_Int32 > moTileSX; - OptValue< sal_Int32 > moTileSY; - OptValue< sal_Int32 > moTileAlign; /// Anchor point inside bitmap. - - static Shape3DPropertyNames DEFAULTNAMES; /// Default fill property names for shape fill. - static Shape3DPropertyNames DEFAULTPICNAMES; /// Default fill property names for pictures. + OptValue< sal_Int32 > mnPreset; + OptValue< float > mfFieldOfVision; + OptValue< float > mfZoom; + OptValue< sal_Int32 > mnLightRigDirection; + OptValue< sal_Int32 > mnLightRigType; /** Overwrites all members that are explicitly set in rSourceProps. */ void assignUsed( const Shape3DProperties& rSourceProps ); - - /** Tries to resolve current settings to a solid color, e.g. returns the - start color of a gradient. */ - Color getBestSolidColor() const; - - /** Writes the properties to the passed property map. */ - void pushToPropMap( - PropertyMap& rPropMap, - const Shape3DPropertyNames& rPropNames, - const ::oox::core::XmlFilterBase& rFilter, - ::oox::core::ModelObjectContainer& rObjContainer, - sal_Int32 nShapeRotation, sal_Int32 nPhClr ) const; - - /** Writes the properties to the passed property set. */ - void pushToPropSet( - PropertySet& rPropSet, - const Shape3DPropertyNames& rPropNames, - const ::oox::core::XmlFilterBase& rFilter, - ::oox::core::ModelObjectContainer& rObjContainer, - sal_Int32 nShapeRotation, sal_Int32 nPhClr ) const; }; |