summaryrefslogtreecommitdiff
path: root/oox/inc/oox/drawingml
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@suse.com>2012-03-02 17:05:57 +0000
committerMichael Meeks <michael.meeks@suse.com>2012-03-02 17:10:24 +0000
commitf291fb57d087de41385a22dfacd8b694d8b9abc7 (patch)
treeaa68c465d1671086949938845284363a5f72a8a2 /oox/inc/oox/drawingml
parentb52ccb87d8f768c2a9cecccbcf50623646ccbc11 (diff)
customshapes: re-work generation to create many small methods
each custom shape now has a virtual constructor we can call to construct it, this shrinks the function size, and helps the optimiser much accelerating compile time. It may even help improve import time too.
Diffstat (limited to 'oox/inc/oox/drawingml')
-rw-r--r--oox/inc/oox/drawingml/customshapeproperties.hxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/oox/inc/oox/drawingml/customshapeproperties.hxx b/oox/inc/oox/drawingml/customshapeproperties.hxx
index 004d7713d354..a36a022ed5a2 100644
--- a/oox/inc/oox/drawingml/customshapeproperties.hxx
+++ b/oox/inc/oox/drawingml/customshapeproperties.hxx
@@ -112,6 +112,12 @@ struct Path2D
Path2D() : w( 0 ), h( 0 ), fill( XML_norm ), stroke( sal_True ), extrusionOk( sal_True ) {};
};
+
+class CustomShapeProvider {
+public:
+ virtual PropertyMap getProperties() = 0;
+};
+
class CustomShapeProperties
{
public:
@@ -160,7 +166,7 @@ private:
sal_Bool mbMirroredY;
sal_Int32 mnTextRotateAngle;
- typedef boost::unordered_map< sal_Int32, PropertyMap > PresetsMap;
+ typedef boost::unordered_map< sal_Int32, CustomShapeProvider * > PresetsMap;
static PresetsMap maPresetsMap;
static void initializePresetsMap();