summaryrefslogtreecommitdiff
path: root/oox/inc/oox/drawingml
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2009-09-17 11:09:25 +0000
committerIvo Hinkelmann <ihi@openoffice.org>2009-09-17 11:09:25 +0000
commitff30491fc477a39f8f5509298fbd84449f7665b3 (patch)
tree26dafa8aecb931b9b6cd006ee45a5c50f0b047a6 /oox/inc/oox/drawingml
parent63ced9a41da5eef5bb6ad45eb5b474bdc7ab955a (diff)
CWS-TOOLING: integrate CWS dr69
2009-09-09 11:45:28 +0200 dr r275979 : suncc failure 2009-09-09 11:33:34 +0200 dr r275977 : gcc warning 2009-09-09 11:09:02 +0200 er r275976 : #i87171# reworked name check for creating defined names 2009-09-09 10:38:02 +0200 dr r275973 : adapt changes in oox base class 2009-09-09 10:21:03 +0200 dr r275969 : remove faulty pagesize stuff 2009-09-09 10:20:13 +0200 dr r275968 : remove faulty pagesize stuff 2009-09-08 20:24:39 +0200 nn r275958 : #i104899# interpret cells when creating chart listener after loading 2009-09-08 16:05:37 +0200 er r275937 : ScXMLDDELinkContext::EndElement: Excel writes bad ODF <table:dde-link> <table:table> without <table:table-column>'s table:number-columns-repeated attribute; be lenient ... 2009-09-08 13:14:54 +0200 er r275925 : #i103315# handle external references in Excel's ODF msoxl namespace 2009-09-07 17:37:18 +0200 dr r275907 : #i104753# crash when deleting cell with note 2009-09-07 14:02:29 +0200 dr r275896 : #i103520# reworked sheet name buffer to resolve internal hyperlinks, fix almost all remaining problems with external links in BIFF, fix auto color import for BIFF 2009-09-06 20:01:05 +0200 er r275862 : #i35913# fix regression introduced by integration of CWS fhawfixes1; patch from <wsfulton> 2009-09-05 18:32:00 +0200 er r275847 : #i104156# merge #i103918# from uncloned dr68ooo311 2009-09-05 18:19:23 +0200 er r275846 : #i104156# merge #i103317# from uncloned dr68ooo311 2009-09-05 17:32:12 +0200 er r275844 : #i104484# glueState: correct casts in range bounds; patch from <cmc> slightly modified 2009-09-03 17:26:38 +0200 dr r275764 : #i103520# handle apostrophs in sheet names in internal URLs 2009-09-03 17:21:26 +0200 dr r275763 : #i95271# show text formatting in temp notes 2009-09-03 12:24:52 +0200 dr r275747 : unused declaration 2009-09-02 21:33:03 +0200 dr r275727 : #i96438# cleanup color handling in xls filter, extend VML color parser 2009-09-02 15:39:57 +0200 dr r275715 : #158571# #i96438# accept also VML colors in the form '#RRGGBB [xyz]' 2009-09-02 15:16:36 +0200 dr r275714 : #158571# #i96438# set note text 2009-09-02 14:59:33 +0200 dr r275713 : #158571# #i96438# load custom line dashes from DrawingML and VML 2009-09-02 11:53:35 +0200 dr r275702 : #158571# #i96438# import VML fill gradients 2009-08-31 19:28:10 +0200 dr r275632 : #158571# #i96438# more vml formatting 2009-08-31 14:29:30 +0200 dr r275606 : #158571# #i96438# changed handling of xml token ids/names 2009-08-28 18:25:26 +0200 dr r275545 : #158571# #i96438# preparations for and basic support of VML shape formatting, load spreadsheet cell notes position, formatting, and visibility 2009-08-25 19:08:31 +0200 dr r275378 : #i103390# dump BIFF STYLEEXT 2009-08-25 18:28:50 +0200 dr r275377 : #i103390# improve built-in style handling 2009-08-25 18:27:38 +0200 dr r275376 : #i103390# improve built-in style handling 2009-08-04 18:49:40 +0200 dr r274629 : CWS-TOOLING: rebase CWS dr69 to trunk@274622 (milestone: DEV300:m54)
Diffstat (limited to 'oox/inc/oox/drawingml')
-rw-r--r--oox/inc/oox/drawingml/color.hxx32
-rw-r--r--oox/inc/oox/drawingml/customshapeproperties.hxx2
-rw-r--r--oox/inc/oox/drawingml/drawingmltypes.hxx8
-rw-r--r--oox/inc/oox/drawingml/fillproperties.hxx22
-rw-r--r--oox/inc/oox/drawingml/lineproperties.hxx17
5 files changed, 56 insertions, 25 deletions
diff --git a/oox/inc/oox/drawingml/color.hxx b/oox/inc/oox/drawingml/color.hxx
index 91fddf0be69f..b1de124adad5 100644
--- a/oox/inc/oox/drawingml/color.hxx
+++ b/oox/inc/oox/drawingml/color.hxx
@@ -34,10 +34,11 @@
#include <vector>
#include <boost/shared_ptr.hpp>
#include <sal/types.h>
+#include <rtl/instance.hxx>
+#include <rtl/ustring.hxx>
+#include "oox/helper/helper.hxx"
-namespace oox { namespace core {
- class XmlFilterBase;
-} }
+namespace oox { namespace core { class FilterBase; } }
namespace oox {
namespace drawingml {
@@ -50,6 +51,11 @@ public:
Color();
~Color();
+ /** Returns the RGB value for the passed DrawingML color token, or nDefaultRgb on error. */
+ static sal_Int32 getDmlPresetColor( sal_Int32 nToken, sal_Int32 nDefaultRgb );
+ /** Returns the RGB value for the passed VML color token, or nDefaultRgb on error. */
+ static sal_Int32 getVmlPresetColor( sal_Int32 nToken, sal_Int32 nDefaultRgb );
+
/** Sets the color to unused state. */
void setUnused();
/** Sets an RGB value (hexadecimal RRGGBB) from the a:srgbClr element. */
@@ -64,6 +70,8 @@ public:
void setSchemeClr( sal_Int32 nToken );
/** Sets a system color from the a:sysClr element. */
void setSysClr( sal_Int32 nToken, sal_Int32 nLastRgb );
+ /** Sets a palette color index. */
+ void setPaletteClr( sal_Int32 nPaletteIdx );
/** Inserts the passed color transformation. */
void addTransformation( sal_Int32 nElement, sal_Int32 nValue = -1 );
@@ -71,17 +79,21 @@ public:
void addChartTintTransformation( double fTint );
/** Inserts Excel specific color tint (-1.0...0.0 = shade, 0.0...1.0 = tint). */
void addExcelTintTransformation( double fTint );
+ /** Removes all color transformations. */
+ void clearTransformations();
+ /** Removes transparence from the color. */
+ void clearTransparence();
/** Overwrites this color with the passed color, if it is used. */
inline void assignIfUsed( const Color& rColor ) { if( rColor.isUsed() ) *this = rColor; }
- /** Removes transparence from the color. */
- void clearTransparence();
/** Returns true, if the color is initialized. */
bool isUsed() const { return meMode != COLOR_UNUSED; }
+ /** Returns true, if the color is a placeholder color in theme style lists. */
+ bool isPlaceHolder() const { return meMode == COLOR_PH; }
/** Returns the final RGB color value.
@param nPhClr Actual color for the phClr placeholder color used in theme style lists. */
- sal_Int32 getColor( const ::oox::core::XmlFilterBase& rFilter, sal_Int32 nPhClr = -1 ) const;
+ sal_Int32 getColor( const ::oox::core::FilterBase& rFilter, sal_Int32 nPhClr = API_RGB_TRANSPARENT ) const;
/** Returns true, if the color has a transparence set. */
bool hasTransparence() const;
@@ -89,6 +101,9 @@ public:
sal_Int16 getTransparence() const;
private:
+ /** Internal helper for getColor(). */
+ void setResolvedRgb( sal_Int32 nRgb ) const;
+
/** Converts the color components to RGB values. */
void toRgb() const;
/** Converts the color components to CRGB values (gamma corrected percentage). */
@@ -104,8 +119,9 @@ private:
COLOR_CRGB, /// Relative RGB (r/g/b: 0...100000).
COLOR_HSL, /// HSL (hue: 0...21600000, sat/lum: 0...100000).
COLOR_SCHEME, /// Color from scheme.
- COLOR_PH, /// Placeholder color in theme style lists.
+ COLOR_PALETTE, /// Color from application defined palette.
COLOR_SYSTEM, /// Color from system palette.
+ COLOR_PH, /// Placeholder color in theme style lists.
COLOR_FINAL /// Finalized RGB color.
};
@@ -120,7 +136,7 @@ private:
mutable ColorMode meMode; /// Current color mode.
mutable TransformVec maTransforms; /// Color transformations.
- mutable sal_Int32 mnC1; /// Red, red%, hue, scheme token, system token, or final RGB.
+ mutable sal_Int32 mnC1; /// Red, red%, hue, scheme token, palette index, system token, or final RGB.
mutable sal_Int32 mnC2; /// Green, green%, saturation, or system default RGB.
mutable sal_Int32 mnC3; /// Blue, blue%, or luminance.
sal_Int32 mnAlpha; /// Alpha value (color opacity).
diff --git a/oox/inc/oox/drawingml/customshapeproperties.hxx b/oox/inc/oox/drawingml/customshapeproperties.hxx
index 17a308a6331c..9857a75e4836 100644
--- a/oox/inc/oox/drawingml/customshapeproperties.hxx
+++ b/oox/inc/oox/drawingml/customshapeproperties.hxx
@@ -72,7 +72,7 @@ public:
virtual ~CustomShapeProperties();
void apply( const CustomShapePropertiesPtr& );
- void pushToPropSet( const ::oox::core::XmlFilterBase& rFilterBase,
+ void pushToPropSet( const ::oox::core::FilterBase& rFilterBase,
const ::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySet > & xPropSet,
const ::com::sun::star::uno::Reference < ::com::sun::star::drawing::XShape > & xShape) const;
diff --git a/oox/inc/oox/drawingml/drawingmltypes.hxx b/oox/inc/oox/drawingml/drawingmltypes.hxx
index fbec84c4b81c..41365f8df086 100644
--- a/oox/inc/oox/drawingml/drawingmltypes.hxx
+++ b/oox/inc/oox/drawingml/drawingmltypes.hxx
@@ -43,6 +43,14 @@ namespace drawingml {
// ============================================================================
+const sal_Int32 PER_PERCENT = 1000;
+const sal_Int32 MAX_PERCENT = 100 * PER_PERCENT;
+
+const sal_Int32 PER_DEGREE = 60000;
+const sal_Int32 MAX_DEGREE = 360 * PER_DEGREE;
+
+// ============================================================================
+
struct LineProperties;
typedef ::boost::shared_ptr< LineProperties > LinePropertiesPtr;
diff --git a/oox/inc/oox/drawingml/fillproperties.hxx b/oox/inc/oox/drawingml/fillproperties.hxx
index 9190b87e0e53..9504da617083 100644
--- a/oox/inc/oox/drawingml/fillproperties.hxx
+++ b/oox/inc/oox/drawingml/fillproperties.hxx
@@ -159,18 +159,20 @@ struct FillProperties
/** Writes the properties to the passed property map. */
void pushToPropMap(
PropertyMap& rPropMap,
- const FillPropertyIds& rPropIds,
- const ::oox::core::XmlFilterBase& rFilter,
+ const ::oox::core::FilterBase& rFilter,
ModelObjectHelper& rModelObjHelper,
- sal_Int32 nShapeRotation, sal_Int32 nPhClr ) const;
+ const FillPropertyIds& rPropIds = DEFAULT_IDS,
+ sal_Int32 nShapeRotation = 0,
+ sal_Int32 nPhClr = API_RGB_TRANSPARENT ) const;
/** Writes the properties to the passed property set. */
void pushToPropSet(
PropertySet& rPropSet,
- const FillPropertyIds& rPropIds,
- const ::oox::core::XmlFilterBase& rFilter,
+ const ::oox::core::FilterBase& rFilter,
ModelObjectHelper& rModelObjHelper,
- sal_Int32 nShapeRotation, sal_Int32 nPhClr ) const;
+ const FillPropertyIds& rPropIds = DEFAULT_IDS,
+ sal_Int32 nShapeRotation = 0,
+ sal_Int32 nPhClr = API_RGB_TRANSPARENT ) const;
};
// ============================================================================
@@ -185,14 +187,14 @@ struct GraphicProperties
/** Writes the properties to the passed property map. */
void pushToPropMap(
PropertyMap& rPropMap,
- const ::oox::core::XmlFilterBase& rFilter,
- sal_Int32 nPhClr ) const;
+ const ::oox::core::FilterBase& rFilter,
+ sal_Int32 nPhClr = API_RGB_TRANSPARENT ) const;
/** Writes the properties to the passed property set. */
void pushToPropSet(
PropertySet& rPropSet,
- const ::oox::core::XmlFilterBase& rFilter,
- sal_Int32 nPhClr ) const;
+ const ::oox::core::FilterBase& rFilter,
+ sal_Int32 nPhClr = API_RGB_TRANSPARENT ) const;
};
// ============================================================================
diff --git a/oox/inc/oox/drawingml/lineproperties.hxx b/oox/inc/oox/drawingml/lineproperties.hxx
index 2aa9ac7fedeb..db337c520092 100644
--- a/oox/inc/oox/drawingml/lineproperties.hxx
+++ b/oox/inc/oox/drawingml/lineproperties.hxx
@@ -86,11 +86,16 @@ struct LineArrowProperties
struct LineProperties
{
+ typedef ::std::pair< sal_Int32, sal_Int32 > DashStop;
+ typedef ::std::vector< DashStop > DashStopVector;
+
LineArrowProperties maStartArrow; /// Start line arrow style.
LineArrowProperties maEndArrow; /// End line arrow style.
FillProperties maLineFill; /// Line fill (solid, gradient, ...).
+ DashStopVector maCustomDash; /// User-defined line dash style.
OptValue< sal_Int32 > moLineWidth; /// Line width (EMUs).
OptValue< sal_Int32 > moPresetDash; /// Preset dash (OOXML token).
+ OptValue< sal_Int32 > moLineCompound; /// Line compound type (OOXML token).
OptValue< sal_Int32 > moLineCap; /// Line cap (OOXML token).
OptValue< sal_Int32 > moLineJoint; /// Line joint type (OOXML token).
@@ -102,18 +107,18 @@ struct LineProperties
/** Writes the properties to the passed property map. */
void pushToPropMap(
PropertyMap& rPropMap,
- const LinePropertyIds& rPropIds,
- const ::oox::core::XmlFilterBase& rFilter,
+ const ::oox::core::FilterBase& rFilter,
ModelObjectHelper& rModelObjHelper,
- sal_Int32 nPhClr ) const;
+ const LinePropertyIds& rPropIds = DEFAULT_IDS,
+ sal_Int32 nPhClr = API_RGB_TRANSPARENT ) const;
/** Writes the properties to the passed property map. */
void pushToPropSet(
PropertySet& rPropSet,
- const LinePropertyIds& rPropIds,
- const ::oox::core::XmlFilterBase& rFilter,
+ const ::oox::core::FilterBase& rFilter,
ModelObjectHelper& rModelObjHelper,
- sal_Int32 nPhClr ) const;
+ const LinePropertyIds& rPropIds = DEFAULT_IDS,
+ sal_Int32 nPhClr = API_RGB_TRANSPARENT ) const;
};
// ============================================================================