[Libreoffice-commits] .: 6 commits - offapi/com oox/inc oox/Library_oox.mk oox/source svx/inc svx/source tools/source
Radek DoulÃk
rodo at kemper.freedesktop.org
Wed Oct 5 08:43:25 PDT 2011
offapi/com/sun/star/drawing/EnhancedCustomShapeSegmentCommand.idl | 4
oox/Library_oox.mk | 1
oox/inc/oox/drawingml/customshapeproperties.hxx | 17
oox/source/drawingml/customshapegeometry.cxx | 367
oox/source/drawingml/customshapepresets.cxx |92382 ++++++++++
oox/source/drawingml/customshapeproperties.cxx | 1836
oox/source/drawingml/diagram/diagramlayoutatoms.cxx | 20
oox/source/drawingml/diagram/layoutnodecontext.cxx | 3
oox/source/drawingml/graphicshapecontext.cxx | 6
oox/source/drawingml/shape.cxx | 1
oox/source/dump/dumperbase.cxx | 3
oox/source/helper/propertymap.cxx | 15
oox/source/token/tokens.txt | 8
svx/inc/svx/EnhancedCustomShape2d.hxx | 6
svx/source/customshapes/EnhancedCustomShape2d.cxx | 110
svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx | 24
tools/source/generic/poly.cxx | 10
17 files changed, 92696 insertions(+), 2117 deletions(-)
New commits:
commit e36f591dfeb89fded172f4770157bc6cb6dc7454
Author: Radek Doulik <rodo at novell.com>
Date: Wed Oct 5 17:29:58 2011 +0200
custom shapes import improvements
- added new presets generated from definition included in ISO standard
- added missing variables (cd3, hd10, ...)
- added ifelse shortcut ?:
- removed GetAdjAngle because it would make problems with constant vs. equation
defined angles, move conversion to the functions using them
- implemented arcTo path segment (command)
- removed GetTextShapeType as we don't use vml's presets for drawingml
anymore
- use token number for preset type instead of string, as we don't
convert to old vml's preset types anymore
- enhanced custom shape properties dump code
diff --git a/oox/Library_oox.mk b/oox/Library_oox.mk
index 1a3dcee..8de35c9 100644
--- a/oox/Library_oox.mk
+++ b/oox/Library_oox.mk
@@ -125,6 +125,7 @@ $(eval $(call gb_Library_add_exception_objects,oox,\
oox/source/drawingml/color \
oox/source/drawingml/connectorshapecontext \
oox/source/drawingml/customshapegeometry \
+ oox/source/drawingml/customshapepresets \
oox/source/drawingml/customshapeproperties \
oox/source/drawingml/diagram/constraintlistcontext \
oox/source/drawingml/diagram/datamodelcontext \
diff --git a/oox/inc/oox/drawingml/customshapeproperties.hxx b/oox/inc/oox/drawingml/customshapeproperties.hxx
index 413b2a7..47098dd 100644
--- a/oox/inc/oox/drawingml/customshapeproperties.hxx
+++ b/oox/inc/oox/drawingml/customshapeproperties.hxx
@@ -30,6 +30,7 @@
#define OOX_DRAWINGML_CUSTOMSHAPEPROPERTIES_HXX
#include <boost/shared_ptr.hpp>
+#include <boost/unordered_map.hpp>
#include <vector>
#include <map>
#include <com/sun/star/drawing/EnhancedCustomShapeParameterPair.hpp>
@@ -123,8 +124,9 @@ public:
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;
- const rtl::OUString& getShapePresetType() const { return maShapePresetType; }
- void setShapePresetType( const rtl::OUString& rShapePresetType ){ maShapePresetType = rShapePresetType; };
+ sal_Int32 getShapePresetType() const { return mnShapePresetType; }
+ ::rtl::OUString getShapePresetTypeName() const;
+ void setShapePresetType( sal_Int32 nShapePresetType ){ mnShapePresetType = nShapePresetType; };
std::vector< CustomShapeGuide >& getAdjustmentGuideList(){ return maAdjustmentGuideList; };
std::vector< CustomShapeGuide >& getGuideList(){ return maGuideList; };
@@ -140,9 +142,11 @@ public:
static sal_Int32 SetCustomShapeGuideValue( std::vector< CustomShapeGuide >& rGuideList, const CustomShapeGuide& rGuide );
static sal_Int32 GetCustomShapeGuideValue( const std::vector< CustomShapeGuide >& rGuideList, const rtl::OUString& rFormulaName );
+ sal_Int32 getArcNum() { return mnArcNum++; }
+
private:
- rtl::OUString maShapePresetType;
+ sal_Int32 mnShapePresetType;
std::vector< CustomShapeGuide > maAdjustmentGuideList;
std::vector< CustomShapeGuide > maGuideList;
std::vector< AdjustHandle > maAdjustHandleList;
@@ -154,6 +158,13 @@ private:
maSegments;
sal_Bool mbMirroredX;
sal_Bool mbMirroredY;
+
+ typedef boost::unordered_map< sal_Int32, PropertyMap > PresetsMap;
+
+ static PresetsMap maPresetsMap;
+ static void initializePresetsMap();
+
+ sal_Int32 mnArcNum;
};
} }
diff --git a/oox/source/drawingml/customshapegeometry.cxx b/oox/source/drawingml/customshapegeometry.cxx
index 9c22186..c996656 100644
--- a/oox/source/drawingml/customshapegeometry.cxx
+++ b/oox/source/drawingml/customshapegeometry.cxx
@@ -50,6 +50,7 @@ enum FormularCommand
FC_PLUSMINUS,
FC_PLUSDIV,
FC_IFELSE,
+ FC_IFELSE1,
FC_ABS,
FC_AT2,
FC_CAT2,
@@ -76,6 +77,7 @@ static FormularCommandNameTable pFormularCommandNameTable[] =
{ "+-", FC_PLUSMINUS },
{ "+/", FC_PLUSDIV },
{ "ifelse", FC_IFELSE },
+ { "?:", FC_IFELSE1 },
{ "abs", FC_ABS },
{ "at2", FC_AT2 },
{ "cat2", FC_CAT2 },
@@ -231,14 +233,14 @@ rtl::OUString GetFormulaParameter( const EnhancedCustomShapeParameter& rParamete
// ---------------------------------------------------------------------
-static EnhancedCustomShapeParameter GetAdjCoordinate( CustomShapeProperties& rCustomShapeProperties, const::rtl::OUString& rValue, sal_Bool bNoSymbols, bool bAbs = false )
+static EnhancedCustomShapeParameter GetAdjCoordinate( CustomShapeProperties& rCustomShapeProperties, const::rtl::OUString& rValue, sal_Bool bNoSymbols = sal_True )
{
com::sun::star::drawing::EnhancedCustomShapeParameter aRet;
if ( rValue.getLength() )
{
sal_Bool bConstant = sal_True;
- sal_Int32 nConstant = 0;
- sal_Char nVal = 0;
+ sal_Int32 nConstant = -1;
+ sal_Int32 nIntVal = 0;
// first check if its a constant value
switch( AttributeConversion::decodeToken( rValue ) )
@@ -248,6 +250,7 @@ static EnhancedCustomShapeParameter GetAdjCoordinate( CustomShapeProperties& rCu
case XML_5cd8 : nConstant = 225 * 60000; break;
case XML_7cd8 : nConstant = 315 * 60000; break;
case XML_cd2 : nConstant = 180 * 60000; break;
+ case XML_cd3 : nConstant = 120 * 60000; break;
case XML_cd4 : nConstant = 90 * 60000; break;
case XML_cd8 : nConstant = 45 * 60000; break;
@@ -269,22 +272,26 @@ static EnhancedCustomShapeParameter GetAdjCoordinate( CustomShapeProperties& rCu
break;
- case XML_hd8 : // !!PASSTHROUGH INTENDED
- nVal += 2; // */ h 1.0 8.0
- case XML_hd6 : // */ h 1.0 6.0
- nVal++;
- case XML_hd5 : // */ h 1.0 5.0
- nVal++;
- case XML_hd4 : // */ h 1.0 4.0
- nVal += 2;
- case XML_hd2 : // */ h 1.0 2.0
- case XML_vc : // */ h 1.0 2.0
+ case XML_hd10 : // !!PASSTHROUGH INTENDED
+ nIntVal += 2; // */ h 1.0 10.0
+ case XML_hd8 : // */ h 1.0 8.0
+ nIntVal += 2;
+ case XML_hd6 : // */ h 1.0 6.0
+ nIntVal++;
+ case XML_hd5 : // */ h 1.0 5.0
+ nIntVal++;
+ case XML_hd4 : // */ h 1.0 4.0
+ nIntVal++;
+ case XML_hd3 : // */ h 1.0 3.0
+ nIntVal++;
+ case XML_hd2 : // */ h 1.0 2.0
+ case XML_vc : // */ h 1.0 2.0
{
- nVal += '2';
+ nIntVal += 2;
CustomShapeGuide aGuide;
aGuide.maName = rValue;
- aGuide.maFormula = CREATE_OUSTRING( "height/" ) + rtl::OUString( nVal );
+ aGuide.maFormula = CREATE_OUSTRING( "height/" ) + rtl::OUString::valueOf( nIntVal );
aRet.Value = Any( CustomShapeProperties::SetCustomShapeGuideValue( rCustomShapeProperties.getGuideList(), aGuide ) );
aRet.Type = EnhancedCustomShapeParameterType::EQUATION;
@@ -319,19 +326,23 @@ static EnhancedCustomShapeParameter GetAdjCoordinate( CustomShapeProperties& rCu
aRet.Type = EnhancedCustomShapeParameterType::EQUATION;
}
break;
- case XML_ssd8 : // */ ss 1.0 8.0
- nVal += 2;
- case XML_ssd6 : // */ ss 1.0 6.0
- nVal += 2;
- case XML_ssd4 : // */ ss 1.0 4.0
- nVal += 2;
- case XML_ssd2 : // */ ss 1.0 2.0
+ case XML_ssd32 : // */ ss 1.0 32.0
+ nIntVal += 16;
+ case XML_ssd16 : // */ ss 1.0 16.0
+ nIntVal += 8;
+ case XML_ssd8 : // */ ss 1.0 8.0
+ nIntVal += 2;
+ case XML_ssd6 : // */ ss 1.0 6.0
+ nIntVal += 2;
+ case XML_ssd4 : // */ ss 1.0 4.0
+ nIntVal += 2;
+ case XML_ssd2 : // */ ss 1.0 2.0
{
- nVal += '2';
+ nIntVal += '2';
CustomShapeGuide aGuide;
aGuide.maName = rValue;
- aGuide.maFormula = CREATE_OUSTRING( "min(width,height)/" ) + rtl::OUString( nVal );
+ aGuide.maFormula = CREATE_OUSTRING( "min(width,height)/" ) + rtl::OUString::valueOf( nIntVal );
aRet.Value = Any( CustomShapeProperties::SetCustomShapeGuideValue( rCustomShapeProperties.getGuideList(), aGuide ) );
aRet.Type = EnhancedCustomShapeParameterType::EQUATION;
@@ -355,24 +366,30 @@ static EnhancedCustomShapeParameter GetAdjCoordinate( CustomShapeProperties& rCu
}
break;
+ case XML_wd32 : // */ w 1.0 32.0
+ nIntVal += 20;
+ case XML_wd12 : // */ w 1.0 12.0
+ nIntVal += 2;
case XML_wd10 : // */ w 1.0 10.0
- nVal += 2;
+ nIntVal += 2;
case XML_wd8 : // */ w 1.0 8.0
- nVal += 2;
+ nIntVal += 2;
case XML_wd6 : // */ w 1.0 6.0
- nVal++;
+ nIntVal++;
case XML_wd5 : // */ w 1.0 5.0
- nVal++;
+ nIntVal++;
case XML_wd4 : // */ w 1.0 4.0
- nVal += 2;
+ nIntVal++;
+ case XML_wd3 : // */ w 1.0 3.0
+ nIntVal++;
case XML_hc : // */ w 1.0 2.0
case XML_wd2 : // */ w 1.0 2.0
{
- nVal += '2';
+ nIntVal += 2;
CustomShapeGuide aGuide;
aGuide.maName = rValue;
- aGuide.maFormula = CREATE_OUSTRING( "width/" ) + rtl::OUString( nVal );
+ aGuide.maFormula = CREATE_OUSTRING( "width/" ) + rtl::OUString::valueOf( nIntVal );
aRet.Value = Any( CustomShapeProperties::SetCustomShapeGuideValue( rCustomShapeProperties.getGuideList(), aGuide ) );
aRet.Type = EnhancedCustomShapeParameterType::EQUATION;
@@ -385,8 +402,7 @@ static EnhancedCustomShapeParameter GetAdjCoordinate( CustomShapeProperties& rCu
}
if ( bConstant )
{
- if ( nConstant )
- {
+ if (nConstant != -1) {
aRet.Value = Any( nConstant );
aRet.Type = EnhancedCustomShapeParameterType::NORMAL;
}
@@ -401,7 +417,7 @@ static EnhancedCustomShapeParameter GetAdjCoordinate( CustomShapeProperties& rCu
}
if ( ( n >= '0' ) && ( n <= '9' ) )
{ // seems to be a ST_Coordinate
- aRet.Value = Any( (sal_Int32)(rValue.toInt32() / ( bAbs ? 1 : 5 ) ) );
+ aRet.Value = Any( (sal_Int32)(rValue.toInt32() ) );
aRet.Type = EnhancedCustomShapeParameterType::NORMAL;
}
else
@@ -421,7 +437,10 @@ static EnhancedCustomShapeParameter GetAdjCoordinate( CustomShapeProperties& rCu
aRet.Type = EnhancedCustomShapeParameterType::EQUATION;
}
else
+ {
+ OSL_TRACE("error: unhandled value '%s'", OUStringToOString( rValue, RTL_TEXTENCODING_ASCII_US ).getStr());
aRet.Value = Any( rValue );
+ }
}
}
}
@@ -429,19 +448,6 @@ static EnhancedCustomShapeParameter GetAdjCoordinate( CustomShapeProperties& rCu
return aRet;
}
-static EnhancedCustomShapeParameter GetAdjAngle( CustomShapeProperties& rCustomShapeProperties, const ::rtl::OUString& rValue )
-{
- EnhancedCustomShapeParameter aAngle( GetAdjCoordinate( rCustomShapeProperties, rValue, sal_True ) );
- if ( aAngle.Type == EnhancedCustomShapeParameterType::NORMAL )
- {
- sal_Int32 nValue = 0;
- aAngle.Value >>= nValue;
- double fValue = ( static_cast< double >( nValue ) / 60000.0 ) * 360.0;
- aAngle.Value <<= fValue;
- }
- return aAngle;
-}
-
// ---------------------------------------------------------------------
// CT_GeomGuideList
class GeomGuideListContext : public ContextHandler
@@ -521,6 +527,7 @@ static rtl::OUString convertToOOEquation( CustomShapeProperties& rCustomShapePro
}
break;
case FC_IFELSE :
+ case FC_IFELSE1 :
{
if ( nParameters == 3 )
aEquation = CREATE_OUSTRING( "if(" ) + sParameters[ 0 ] + CREATE_OUSTRING( "," )
@@ -536,22 +543,22 @@ static rtl::OUString convertToOOEquation( CustomShapeProperties& rCustomShapePro
case FC_AT2 :
{
if ( nParameters == 2 )
- aEquation = CREATE_OUSTRING( "atan2(" ) + sParameters[ 0 ] + CREATE_OUSTRING( "," )
- + sParameters[ 1 ] + CREATE_OUSTRING( ")" );
+ aEquation = CREATE_OUSTRING( "(10800000*atan2(" ) + sParameters[ 1 ] + CREATE_OUSTRING( "," )
+ + sParameters[ 0 ] + CREATE_OUSTRING( "))/pi" );
}
break;
case FC_CAT2 :
{
if ( nParameters == 3 )
- aEquation = sParameters[ 0 ] + CREATE_OUSTRING( "*(cos(arctan(" ) +
- sParameters[ 1 ] + CREATE_OUSTRING( "," ) + sParameters[ 2 ] + CREATE_OUSTRING( ")))" );
+ aEquation = sParameters[ 0 ] + CREATE_OUSTRING( "*(cos(atan2(" ) +
+ sParameters[ 2 ] + CREATE_OUSTRING( "," ) + sParameters[ 1 ] + CREATE_OUSTRING( ")))" );
}
break;
case FC_COS :
{
if ( nParameters == 2 )
- aEquation = sParameters[ 0 ] + CREATE_OUSTRING( "*cos(" ) +
- sParameters[ 1 ] + CREATE_OUSTRING( ")" );
+ aEquation = sParameters[ 0 ] + CREATE_OUSTRING( "*cos(pi*(" ) +
+ sParameters[ 1 ] + CREATE_OUSTRING( ")/10800000)" );
}
break;
case FC_MAX :
@@ -589,15 +596,15 @@ static rtl::OUString convertToOOEquation( CustomShapeProperties& rCustomShapePro
case FC_SAT2 :
{
if ( nParameters == 3 )
- aEquation = sParameters[ 0 ] + CREATE_OUSTRING( "*(sin(arctan(" ) +
- sParameters[ 1 ] + CREATE_OUSTRING( "," ) + sParameters[ 2 ] + CREATE_OUSTRING( ")))" );
+ aEquation = sParameters[ 0 ] + CREATE_OUSTRING( "*(sin(atan2(" ) +
+ sParameters[ 2 ] + CREATE_OUSTRING( "," ) + sParameters[ 1 ] + CREATE_OUSTRING( ")))" );
}
break;
case FC_SIN :
{
if ( nParameters == 2 )
- aEquation = sParameters[ 0 ] + CREATE_OUSTRING( "*sin(" ) +
- sParameters[ 1 ] + CREATE_OUSTRING( ")" );
+ aEquation = sParameters[ 0 ] + CREATE_OUSTRING( "*sin(pi*(" ) +
+ sParameters[ 1 ] + CREATE_OUSTRING( ")/10800000)" );
}
break;
case FC_SQRT :
@@ -609,8 +616,8 @@ static rtl::OUString convertToOOEquation( CustomShapeProperties& rCustomShapePro
case FC_TAN :
{
if ( nParameters == 2 )
- aEquation = sParameters[ 0 ] + CREATE_OUSTRING( "*tan(" ) +
- sParameters[ 1 ] + CREATE_OUSTRING( ")" );
+ aEquation = sParameters[ 0 ] + CREATE_OUSTRING( "*tan(pi*(" ) +
+ sParameters[ 1 ] + CREATE_OUSTRING( ")/10800000)" );
}
break;
case FC_VAL :
@@ -657,8 +664,8 @@ public:
AdjPoint2DContext::AdjPoint2DContext( ContextHandler& rParent, const Reference< XFastAttributeList >& xAttribs, CustomShapeProperties& rCustomShapeProperties, EnhancedCustomShapeParameterPair& rAdjPoint2D )
: ContextHandler( rParent )
{
- rAdjPoint2D.First = GetAdjCoordinate( rCustomShapeProperties, xAttribs->getOptionalValue( XML_x ), sal_True, true );
- rAdjPoint2D.Second = GetAdjCoordinate( rCustomShapeProperties, xAttribs->getOptionalValue( XML_y ), sal_True, true );
+ rAdjPoint2D.First = GetAdjCoordinate( rCustomShapeProperties, xAttribs->getOptionalValue( XML_x ), sal_True );
+ rAdjPoint2D.Second = GetAdjCoordinate( rCustomShapeProperties, xAttribs->getOptionalValue( XML_y ), sal_True );
}
// ---------------------------------------------------------------------
@@ -753,11 +760,11 @@ PolarAdjustHandleContext::PolarAdjustHandleContext( ContextHandler& rParent, con
}
if ( aAttribs.hasAttribute( XML_minAng ) )
{
- mrAdjustHandle.min2 = GetAdjAngle( mrCustomShapeProperties, aAttribs.getString( XML_minAng, aEmptyDefault ) );
+ mrAdjustHandle.min2 = GetAdjCoordinate( mrCustomShapeProperties, aAttribs.getString( XML_minAng, aEmptyDefault ) );
}
if ( aAttribs.hasAttribute( XML_maxAng ) )
{
- mrAdjustHandle.max2 = GetAdjAngle( mrCustomShapeProperties, aAttribs.getString( XML_maxAng, aEmptyDefault ) );
+ mrAdjustHandle.max2 = GetAdjCoordinate( mrCustomShapeProperties, aAttribs.getString( XML_maxAng, aEmptyDefault ) );
}
}
@@ -825,7 +832,7 @@ ConnectionSiteContext::ConnectionSiteContext( ContextHandler& rParent, const Ref
, mrConnectionSite( rConnectionSite )
, mrCustomShapeProperties( rCustomShapeProperties )
{
- mrConnectionSite.ang = GetAdjAngle( mrCustomShapeProperties, xAttribs->getOptionalValue( XML_ang ) );
+ mrConnectionSite.ang = GetAdjCoordinate( mrCustomShapeProperties, xAttribs->getOptionalValue( XML_ang ) );
}
Reference< XFastContextHandler > ConnectionSiteContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& xAttribs ) throw (SAXException, RuntimeException)
@@ -1058,28 +1065,43 @@ Reference< XFastContextHandler > Path2DContext::createFastChildContext( sal_Int3
break;
case A_TOKEN( arcTo ) : // CT_Path2DArcTo
{
- if ( !mrSegments.empty() && ( mrSegments.back().Command == EnhancedCustomShapeSegmentCommand::ARCTO ) )
+ if ( !mrSegments.empty() && ( mrSegments.back().Command == EnhancedCustomShapeSegmentCommand::ARCANGLETO ) )
mrSegments.back().Count++;
else
{
EnhancedCustomShapeSegment aSegment;
- aSegment.Command = EnhancedCustomShapeSegmentCommand::ARCTO;
+ aSegment.Command = EnhancedCustomShapeSegmentCommand::ARCANGLETO;
aSegment.Count = 1;
mrSegments.push_back( aSegment );
}
- EnhancedCustomShapeParameter aWidth = GetAdjCoordinate( mrCustomShapeProperties, xAttribs->getOptionalValue( XML_wR ), sal_True );
- EnhancedCustomShapeParameter aHeight = GetAdjCoordinate( mrCustomShapeProperties, xAttribs->getOptionalValue( XML_hR ), sal_True );
- EnhancedCustomShapeParameter aStartAngle = GetAdjAngle( mrCustomShapeProperties, xAttribs->getOptionalValue( XML_stAng ) );
- EnhancedCustomShapeParameter swAngle = GetAdjAngle( mrCustomShapeProperties, xAttribs->getOptionalValue( XML_swAng ) );
-
- EnhancedCustomShapeParameterPair aPt1; // TODO: conversion from (wr hr stAng swAng)
- EnhancedCustomShapeParameterPair aPt2; // to (x1 y1 x2 y2 x3 y3 x y) needed
- EnhancedCustomShapeParameterPair aPt3;
- EnhancedCustomShapeParameterPair aPt;
- mrPath2D.parameter.push_back( aPt1 );
- mrPath2D.parameter.push_back( aPt2 );
- mrPath2D.parameter.push_back( aPt3 );
- mrPath2D.parameter.push_back( aPt );
+
+ EnhancedCustomShapeParameterPair aScale;
+ EnhancedCustomShapeParameterPair aAngles;
+
+ aScale.First = GetAdjCoordinate( mrCustomShapeProperties, xAttribs->getOptionalValue( XML_wR ), sal_True );
+ aScale.Second = GetAdjCoordinate( mrCustomShapeProperties, xAttribs->getOptionalValue( XML_hR ), sal_True );
+
+ CustomShapeGuide aGuide;
+ sal_Int32 nArcNum = mrCustomShapeProperties.getArcNum();
+
+ // start angle
+ aGuide.maName = CREATE_OUSTRING("arctosa") + rtl::OUString::valueOf( nArcNum );
+ aGuide.maFormula = CREATE_OUSTRING( "(")
+ + GetFormulaParameter( GetAdjCoordinate( mrCustomShapeProperties, xAttribs->getOptionalValue( XML_stAng ) ) )
+ + CREATE_OUSTRING( ")/60000.0" );
+ aAngles.First.Value = Any( CustomShapeProperties::SetCustomShapeGuideValue( mrCustomShapeProperties.getGuideList(), aGuide ) );
+ aAngles.First.Type = EnhancedCustomShapeParameterType::EQUATION;
+
+ // swing angle
+ aGuide.maName = CREATE_OUSTRING("arctosw") + rtl::OUString::valueOf( nArcNum );
+ aGuide.maFormula = CREATE_OUSTRING( "(")
+ + GetFormulaParameter( GetAdjCoordinate( mrCustomShapeProperties, xAttribs->getOptionalValue( XML_swAng ) ) )
+ + CREATE_OUSTRING( ")/60000.0" );
+ aAngles.Second.Value = Any( CustomShapeProperties::SetCustomShapeGuideValue( mrCustomShapeProperties.getGuideList(), aGuide ) );
+ aAngles.Second.Type = EnhancedCustomShapeParameterType::EQUATION;
+
+ mrPath2D.parameter.push_back( aScale );
+ mrPath2D.parameter.push_back( aAngles );
}
break;
case A_TOKEN( quadBezTo ) :
@@ -1798,179 +1820,6 @@ OUString GetShapePresetType( sal_Int32 nType )
return sType;
}
-static OUString GetTextShapeType( sal_Int32 nType )
-{
- OSL_ASSERT((nType & sal_Int32(0xFFFF0000))==0);
- OUString sType;
- switch( nType )
- {
- case XML_textNoShape: // TODO
- case XML_textPlain: {
- static const OUString sTextPlain = CREATE_OUSTRING( "fontwork-plain-text" );
- sType = sTextPlain;
- } break;
- case XML_textStop: {
- static const OUString sTextStop = CREATE_OUSTRING( "fontwork-stop" );
- sType = sTextStop;
- } break;
- case XML_textTriangle: {
- static const OUString sTextTriangle = CREATE_OUSTRING( "fontwork-triangle-up" );
- sType = sTextTriangle;
- } break;
- case XML_textTriangleInverted: {
- static const OUString sTextTriangleInverted = CREATE_OUSTRING( "fontwork-triangle-down" );
- sType = sTextTriangleInverted;
- } break;
- case XML_textChevron: {
- static const OUString sTextChevron = CREATE_OUSTRING( "fontwork-chevron-up" );
- sType = sTextChevron;
- } break;
- case XML_textChevronInverted: {
- static const OUString sTextChevronInverted = CREATE_OUSTRING( "fontwork-chevron-down" );
- sType = sTextChevronInverted;
- } break;
- case XML_textRingInside: {
- static const OUString sTextRingInside = CREATE_OUSTRING( "mso-spt142" );
- sType = sTextRingInside;
- } break;
- case XML_textRingOutside: {
- static const OUString sTextRingOutside = CREATE_OUSTRING( "mso-spt143" );
- sType = sTextRingOutside;
- } break;
- case XML_textArchUp: {
- static const OUString sTextArchUp = CREATE_OUSTRING( "fontwork-arch-up-curve" );
- sType = sTextArchUp;
- } break;
- case XML_textArchDown: {
- static const OUString sTextArchDown = CREATE_OUSTRING( "fontwork-arch-down-curve" );
- sType = sTextArchDown;
- } break;
- case XML_textCircle: {
- static const OUString sTextCircle = CREATE_OUSTRING( "fontwork-circle-curve" );
- sType = sTextCircle;
- } break;
- case XML_textButton: {
- static const OUString sTextButton = CREATE_OUSTRING( "fontwork-open-circle-curve" );
- sType = sTextButton;
- } break;
- case XML_textArchUpPour: {
- static const OUString sTextArchUpPour = CREATE_OUSTRING( "fontwork-arch-up-pour" );
- sType = sTextArchUpPour;
- } break;
- case XML_textArchDownPour: {
- static const OUString sTextArchDownPour = CREATE_OUSTRING( "fontwork-arch-down-pour" );
- sType = sTextArchDownPour;
- } break;
- case XML_textCirclePour: {
- static const OUString sTextCirclePour = CREATE_OUSTRING( "fontwork-circle-pour" );
- sType = sTextCirclePour;
- } break;
- case XML_textButtonPour: {
- static const OUString sTextButtonPour = CREATE_OUSTRING( "fontwork-open-circle-pour" );
- sType = sTextButtonPour;
- } break;
- case XML_textCurveUp: {
- static const OUString sTextCurveUp = CREATE_OUSTRING( "fontwork-curve-up" );
- sType = sTextCurveUp;
- } break;
- case XML_textCurveDown: {
- static const OUString sTextCurveDown = CREATE_OUSTRING( "fontwork-curve-down" );
- sType = sTextCurveDown;
- } break;
- case XML_textCanUp: {
- static const OUString sTextCanUp = CREATE_OUSTRING( "mso-spt174" );
- sType = sTextCanUp;
- } break;
- case XML_textCanDown: {
- static const OUString sTextCanDown = CREATE_OUSTRING( "mso-spt175" );
- sType = sTextCanDown;
- } break;
- case XML_textWave1: {
- static const OUString sTextWave1 = CREATE_OUSTRING( "fontwork-wave" );
- sType = sTextWave1;
- } break;
- case XML_textWave2: {
- static const OUString sTextWave2 = CREATE_OUSTRING( "mso-spt157" );
- sType = sTextWave2;
- } break;
- case XML_textDoubleWave1: {
- static const OUString sTextDoubleWave1 = CREATE_OUSTRING( "mso-spt158" );
- sType = sTextDoubleWave1;
- } break;
- case XML_textWave4: {
- static const OUString sTextWave4 = CREATE_OUSTRING( "mso-spt159" );
- sType = sTextWave4;
- } break;
- case XML_textInflate: {
- static const OUString sTextInflate = CREATE_OUSTRING( "fontwork-inflate" );
- sType = sTextInflate;
- } break;
- case XML_textDeflate: {
- static const OUString sTextDeflate = CREATE_OUSTRING( "mso-spt161" );
- sType = sTextDeflate;
- } break;
- case XML_textInflateBottom: {
- static const OUString sTextInflateBottom = CREATE_OUSTRING( "mso-spt162" );
- sType = sTextInflateBottom;
- } break;
- case XML_textDeflateBottom: {
- static const OUString sTextDeflateBottom = CREATE_OUSTRING( "mso-spt163" );
- sType = sTextDeflateBottom;
- } break;
- case XML_textInflateTop: {
- static const OUString sTextInflateTop = CREATE_OUSTRING( "mso-spt164" );
- sType = sTextInflateTop;
- } break;
- case XML_textDeflateTop: {
- static const OUString sTextDeflateTop = CREATE_OUSTRING( "mso-spt165" );
- sType = sTextDeflateTop;
- } break;
- case XML_textDeflateInflate: {
- static const OUString sTextDeflateInflate = CREATE_OUSTRING( "mso-spt166" );
- sType = sTextDeflateInflate;
- } break;
- case XML_textDeflateInflateDeflate: {
- static const OUString sTextDeflateInflateDeflate = CREATE_OUSTRING( "mso-spt167" );
- sType = sTextDeflateInflateDeflate;
- } break;
- case XML_textFadeRight: {
- static const OUString sTextFadeRight = CREATE_OUSTRING( "fontwork-fade-right" );
- sType = sTextFadeRight;
- } break;
- case XML_textFadeLeft: {
- static const OUString sTextFadeLeft = CREATE_OUSTRING( "fontwork-fade-left" );
- sType = sTextFadeLeft;
- } break;
- case XML_textFadeUp: {
- static const OUString sTextFadeUp = CREATE_OUSTRING( "fontwork-fade-up" );
- sType = sTextFadeUp;
- } break;
- case XML_textFadeDown: {
- static const OUString sTextFadeDown = CREATE_OUSTRING( "fontwork-fade-down" );
- sType = sTextFadeDown;
- } break;
- case XML_textSlantUp: {
- static const OUString sTextSlantUp = CREATE_OUSTRING( "fontwork-slant-up" );
- sType = sTextSlantUp;
- } break;
- case XML_textSlantDown: {
- static const OUString sTextSlantDown = CREATE_OUSTRING( "fontwork-slant-down" );
- sType = sTextSlantDown;
- } break;
- case XML_textCascadeUp: {
- static const OUString sTextCascadeUp = CREATE_OUSTRING( "fontwork-fade-up-and-right" );
- sType = sTextCascadeUp;
- } break;
- case XML_textCascadeDown: {
- static const OUString sTextCascadeDown = CREATE_OUSTRING( "fontwork-fade-up-and-left" );
- sType = sTextCascadeDown;
- } break;
- default:
- break;
- }
- return sType;
-}
-
// ---------------------------------------------------------------------
// CT_CustomGeometry2D
CustomShapeGeometryContext::CustomShapeGeometryContext( ContextHandler& rParent, const Reference< XFastAttributeList >& /* xAttribs */, CustomShapeProperties& rCustomShapeProperties )
@@ -2028,12 +1877,9 @@ PresetShapeGeometryContext::PresetShapeGeometryContext( ContextHandler& rParent,
: ContextHandler( rParent )
, mrCustomShapeProperties( rCustomShapeProperties )
{
- OUString sShapeType;
sal_Int32 nShapeType = xAttribs->getOptionalValueToken( XML_prst, FastToken::DONTKNOW );
- if ( nShapeType != FastToken::DONTKNOW )
- sShapeType = GetShapePresetType( nShapeType );
- OSL_ENSURE( sShapeType.getLength(), "oox::drawingml::CustomShapeCustomGeometryContext::CustomShapeCustomGeometryContext(), unknown shape type" );
- mrCustomShapeProperties.setShapePresetType( sShapeType );
+ OSL_ENSURE( nShapeType != FastToken::DONTKNOW, "oox::drawingml::CustomShapeCustomGeometryContext::CustomShapeCustomGeometryContext(), unknown shape type" );
+ mrCustomShapeProperties.setShapePresetType( nShapeType );
}
Reference< XFastContextHandler > PresetShapeGeometryContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& ) throw (SAXException, RuntimeException)
@@ -2050,12 +1896,9 @@ PresetTextShapeContext::PresetTextShapeContext( ContextHandler& rParent, const R
: ContextHandler( rParent )
, mrCustomShapeProperties( rCustomShapeProperties )
{
- OUString sShapeType;
sal_Int32 nShapeType = xAttribs->getOptionalValueToken( XML_prst, FastToken::DONTKNOW );
- if ( nShapeType != FastToken::DONTKNOW )
- sShapeType = GetTextShapeType( nShapeType );
- OSL_ENSURE( sShapeType.getLength(), "oox::drawingml::CustomShapeCustomGeometryContext::CustomShapeCustomGeometryContext(), unknown shape type" );
- mrCustomShapeProperties.setShapePresetType( sShapeType );
+ OSL_ENSURE( nShapeType != FastToken::DONTKNOW, "oox::drawingml::CustomShapeCustomGeometryContext::CustomShapeCustomGeometryContext(), unknown shape type" );
+ mrCustomShapeProperties.setShapePresetType( nShapeType );
}
Reference< XFastContextHandler > PresetTextShapeContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& ) throw (SAXException, RuntimeException)
diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx
index a10aa0d..68b05fe 100644
--- a/oox/source/drawingml/customshapeproperties.cxx
+++ b/oox/source/drawingml/customshapeproperties.cxx
@@ -30,6 +30,7 @@
#include "oox/helper/helper.hxx"
#include "oox/helper/propertymap.hxx"
#include "oox/helper/propertyset.hxx"
+#include "oox/token/tokenmap.hxx"
#include <com/sun/star/awt/Rectangle.hpp>
#include <com/sun/star/beans/XMultiPropertySet.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
@@ -50,14 +51,21 @@ using namespace ::com::sun::star::drawing;
namespace oox { namespace drawingml {
CustomShapeProperties::CustomShapeProperties()
-: mbMirroredX ( sal_False )
+: mnShapePresetType ( -1 )
+, mbMirroredX ( sal_False )
, mbMirroredY ( sal_False )
+, mnArcNum ( 0 )
{
}
CustomShapeProperties::~CustomShapeProperties()
{
}
+::rtl::OUString CustomShapeProperties::getShapePresetTypeName() const
+{
+ return StaticTokenMap::get().getUnicodeTokenName( mnShapePresetType );
+}
+
sal_Int32 CustomShapeProperties::SetCustomShapeGuideValue( std::vector< CustomShapeGuide >& rGuideList, const CustomShapeGuide& rGuide )
{
sal_uInt32 nIndex = 0;
@@ -91,1823 +99,27 @@ void CustomShapeProperties::apply( const CustomShapePropertiesPtr& /* rSourceCus
// not sure if this needs to be implemented
}
+CustomShapeProperties::PresetsMap CustomShapeProperties::maPresetsMap;
+
void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase& /* rFilterBase */,
const Reference < XPropertySet >& xPropSet, const Reference < XShape > & xShape ) const
{
- if ( maShapePresetType.getLength() )
- {
- OSL_TRACE("preset: %s", USS(maShapePresetType));
-
- static OUString sLeftRightArrow = CREATE_OUSTRING("left-right-arrow");
- static OUString sRightArrow = CREATE_OUSTRING("right-arrow");
- static OUString sStripedRightArrow = CREATE_OUSTRING("striped-right-arrow");
- static OUString sWedgeRoundedRectCallout = CREATE_OUSTRING("round-rectangular-callout");
-
-if ( maShapePresetType.equals( sWedgeRoundedRectCallout ) ) {
- PropertyMap aPropertyMap;
-
- Sequence< EnhancedCustomShapeAdjustmentValue > aAdjSequence (3);
- {
- Any aAny ((sal_Int32) -4166);
- aAdjSequence [0].Value = aAny;
- }
- {
- Any aAny ((sal_Int32) 12500);
- aAdjSequence [1].Value = aAny;
- }
- {
- Any aAny ((sal_Int32) 3333);
- aAdjSequence [2].Value = aAny;
- }
- aPropertyMap [PROP_AdjustmentValues] <<= aAdjSequence;
-
- Sequence< OUString > aStringSequence (43);
- aStringSequence[0] = CREATE_OUSTRING ("width*$0 /20000");
- aStringSequence[1] = CREATE_OUSTRING ("height*$1 /20000");
- aStringSequence[2] = CREATE_OUSTRING ("width/2");
- aStringSequence[3] = CREATE_OUSTRING ("?2 +?0 -0");
- aStringSequence[4] = CREATE_OUSTRING ("height/2");
- aStringSequence[5] = CREATE_OUSTRING ("?4 +?1 -0");
- aStringSequence[6] = CREATE_OUSTRING ("?0 *height/width");
- aStringSequence[7] = CREATE_OUSTRING ("abs(?1 )");
- aStringSequence[8] = CREATE_OUSTRING ("abs(?6 )");
- aStringSequence[9] = CREATE_OUSTRING ("?7 +0-?8 ");
- aStringSequence[10] = CREATE_OUSTRING ("");
- aStringSequence[11] = CREATE_OUSTRING ("");
- aStringSequence[12] = CREATE_OUSTRING ("width*?10 /2");
- aStringSequence[13] = CREATE_OUSTRING ("width*?11 /2");
- aStringSequence[14] = CREATE_OUSTRING ("");
- aStringSequence[15] = CREATE_OUSTRING ("");
- aStringSequence[16] = CREATE_OUSTRING ("height*?14 /2");
- aStringSequence[17] = CREATE_OUSTRING ("height*?15 /2");
- aStringSequence[18] = CREATE_OUSTRING ("");
- aStringSequence[19] = CREATE_OUSTRING ("");
- aStringSequence[20] = CREATE_OUSTRING ("");
- aStringSequence[21] = CREATE_OUSTRING ("");
- aStringSequence[22] = CREATE_OUSTRING ("");
- aStringSequence[23] = CREATE_OUSTRING ("");
- aStringSequence[24] = CREATE_OUSTRING ("");
- aStringSequence[25] = CREATE_OUSTRING ("");
- aStringSequence[26] = CREATE_OUSTRING ("");
- aStringSequence[27] = CREATE_OUSTRING ("");
- aStringSequence[28] = CREATE_OUSTRING ("");
- aStringSequence[29] = CREATE_OUSTRING ("");
- aStringSequence[30] = CREATE_OUSTRING ("");
- aStringSequence[31] = CREATE_OUSTRING ("");
- aStringSequence[32] = CREATE_OUSTRING ("");
- aStringSequence[33] = CREATE_OUSTRING ("");
- aStringSequence[34] = CREATE_OUSTRING ("min(width,height)");
- aStringSequence[35] = CREATE_OUSTRING ("?34 *$2 /20000");
- aStringSequence[36] = CREATE_OUSTRING ("width+0-?35 ");
- aStringSequence[37] = CREATE_OUSTRING ("height+0-?35 ");
- aStringSequence[38] = CREATE_OUSTRING ("?35 *5857/20000");
- aStringSequence[39] = CREATE_OUSTRING ("width+0-?38 ");
- aStringSequence[40] = CREATE_OUSTRING ("height+0-?38 ");
- aStringSequence[41] = CREATE_OUSTRING ("height");
- aStringSequence[42] = CREATE_OUSTRING ("width");
- aPropertyMap [PROP_Equations] <<= aStringSequence;
-
- Sequence< Sequence < PropertyValue > > aPropSequenceSequence (1);
- {
- Sequence< PropertyValue > aPropSequence (7);
- {
- aPropSequence [0].Name = CREATE_OUSTRING ("Position");
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 3);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 5);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.Second = aParameter;
- }
- aPropSequence [0].Value = makeAny (aParameterPair);
- }
- {
- aPropSequence [1].Name = CREATE_OUSTRING ("RangeXMaximum");
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 429496729);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::NORMAL;
- aPropSequence [1].Value = makeAny (aParameter);
- }
- {
- aPropSequence [2].Name = CREATE_OUSTRING ("RangeXMinimum");
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) -429496729);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::NORMAL;
- aPropSequence [2].Value = makeAny (aParameter);
- }
- {
- aPropSequence [3].Name = CREATE_OUSTRING ("RangeYMaximum");
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 429496729);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::NORMAL;
- aPropSequence [3].Value = makeAny (aParameter);
- }
- {
- aPropSequence [4].Name = CREATE_OUSTRING ("RangeYMinimum");
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) -429496729);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::NORMAL;
- aPropSequence [4].Value = makeAny (aParameter);
- }
- {
- aPropSequence [5].Name = CREATE_OUSTRING ("RefX");
- Any aAny ((sal_Int32) 0);
- aPropSequence [5].Value = makeAny (aAny);
- }
- {
- aPropSequence [6].Name = CREATE_OUSTRING ("RefY");
- Any aAny ((sal_Int32) 1);
- aPropSequence [6].Value = makeAny (aAny);
- }
- aPropSequenceSequence [0] = aPropSequence;
- }
- aPropertyMap [PROP_Handles] <<= aPropSequenceSequence;
-
- aPropertyMap [PROP_MirroredX] <<= Any ((sal_Bool) sal_False);
-
- aPropertyMap [PROP_MirroredY] <<= Any ((sal_Bool) sal_False);
-
- Sequence< PropertyValue > aPropSequence (2);
- {
- aPropSequence [0].Name = CREATE_OUSTRING ("Coordinates");
- Sequence< EnhancedCustomShapeParameterPair > aParameterPairSeq (32);
- {
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 35);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.Second = aParameter;
- }
- aParameterPairSeq [0] = aParameterPair;
- }
- {
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- aParameterPair.Second = aParameter;
- }
- aParameterPairSeq [1] = aParameterPair;
- }
- {
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- aParameterPair.Second = aParameter;
- }
- aParameterPairSeq [2] = aParameterPair;
- }
- {
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- aParameterPair.Second = aParameter;
- }
- aParameterPairSeq [3] = aParameterPair;
- }
- {
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- aParameterPair.Second = aParameter;
- }
- aParameterPairSeq [4] = aParameterPair;
- }
- {
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 12);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- aParameterPair.Second = aParameter;
- }
- aParameterPairSeq [5] = aParameterPair;
- }
- {
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 21);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 29);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.Second = aParameter;
- }
- aParameterPairSeq [6] = aParameterPair;
- }
- {
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 13);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- aParameterPair.Second = aParameter;
- }
- aParameterPairSeq [7] = aParameterPair;
- }
- {
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 36);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- aParameterPair.Second = aParameter;
- }
- aParameterPairSeq [8] = aParameterPair;
- }
- {
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- aParameterPair.Second = aParameter;
- }
- aParameterPairSeq [9] = aParameterPair;
- }
- {
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- aParameterPair.Second = aParameter;
- }
- aParameterPairSeq [10] = aParameterPair;
- }
- {
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- aParameterPair.Second = aParameter;
- }
- aParameterPairSeq [11] = aParameterPair;
- }
- {
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- aParameterPair.Second = aParameter;
- }
- aParameterPairSeq [12] = aParameterPair;
- }
- {
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 42);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 16);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.Second = aParameter;
- }
- aParameterPairSeq [13] = aParameterPair;
- }
- {
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 23);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 31);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.Second = aParameter;
- }
- aParameterPairSeq [14] = aParameterPair;
- }
- {
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 42);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 17);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.Second = aParameter;
- }
- aParameterPairSeq [15] = aParameterPair;
- }
- {
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 42);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 37);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.Second = aParameter;
- }
- aParameterPairSeq [16] = aParameterPair;
- }
- {
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- aParameterPair.Second = aParameter;
- }
- aParameterPairSeq [17] = aParameterPair;
- }
- {
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- aParameterPair.Second = aParameter;
- }
- aParameterPairSeq [18] = aParameterPair;
- }
- {
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- aParameterPair.Second = aParameter;
- }
- aParameterPairSeq [19] = aParameterPair;
- }
- {
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- aParameterPair.Second = aParameter;
- }
- aParameterPairSeq [20] = aParameterPair;
- }
- {
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 13);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 41);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.Second = aParameter;
- }
- aParameterPairSeq [21] = aParameterPair;
- }
- {
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 25);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 33);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.Second = aParameter;
- }
- aParameterPairSeq [22] = aParameterPair;
- }
- {
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 12);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 41);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.Second = aParameter;
- }
- aParameterPairSeq [23] = aParameterPair;
- }
- {
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 35);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 41);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.Second = aParameter;
- }
- aParameterPairSeq [24] = aParameterPair;
- }
- {
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- aParameterPair.Second = aParameter;
- }
- aParameterPairSeq [25] = aParameterPair;
- }
- {
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- aParameterPair.Second = aParameter;
- }
- aParameterPairSeq [26] = aParameterPair;
- }
- {
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- aParameterPair.Second = aParameter;
- }
- aParameterPairSeq [27] = aParameterPair;
- }
- {
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- aParameterPair.Second = aParameter;
- }
- aParameterPairSeq [28] = aParameterPair;
- }
- {
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 17);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.Second = aParameter;
- }
- aParameterPairSeq [29] = aParameterPair;
- }
- {
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 19);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 27);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.Second = aParameter;
- }
- aParameterPairSeq [30] = aParameterPair;
- }
- {
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 16);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.Second = aParameter;
- }
- aParameterPairSeq [31] = aParameterPair;
- }
- aPropSequence [0].Value = makeAny (aParameterPairSeq);
- }
- {
- aPropSequence [1].Name = CREATE_OUSTRING ("Segments");
- Sequence< EnhancedCustomShapeSegment > aSegmentSeq (11);
- {
- EnhancedCustomShapeSegment aSegment;
- aSegment.Command = 1;
- aSegment.Count = 1;
- aSegmentSeq [0] = aSegment;
- }
- {
- EnhancedCustomShapeSegment aSegment;
- aSegment.Command = 10;
- aSegment.Count = 1;
- aSegmentSeq [1] = aSegment;
- }
- {
- EnhancedCustomShapeSegment aSegment;
- aSegment.Command = 2;
- aSegment.Count = 4;
- aSegmentSeq [2] = aSegment;
- }
- {
- EnhancedCustomShapeSegment aSegment;
- aSegment.Command = 10;
- aSegment.Count = 1;
- aSegmentSeq [3] = aSegment;
- }
- {
- EnhancedCustomShapeSegment aSegment;
- aSegment.Command = 2;
- aSegment.Count = 4;
- aSegmentSeq [4] = aSegment;
- }
- {
- EnhancedCustomShapeSegment aSegment;
- aSegment.Command = 10;
- aSegment.Count = 1;
- aSegmentSeq [5] = aSegment;
- }
- {
- EnhancedCustomShapeSegment aSegment;
- aSegment.Command = 2;
- aSegment.Count = 4;
- aSegmentSeq [6] = aSegment;
- }
- {
- EnhancedCustomShapeSegment aSegment;
- aSegment.Command = 10;
- aSegment.Count = 1;
- aSegmentSeq [7] = aSegment;
- }
- {
- EnhancedCustomShapeSegment aSegment;
- aSegment.Command = 2;
- aSegment.Count = 3;
- aSegmentSeq [8] = aSegment;
- }
- {
- EnhancedCustomShapeSegment aSegment;
- aSegment.Command = 4;
- aSegment.Count = 0;
- aSegmentSeq [9] = aSegment;
- }
- {
- EnhancedCustomShapeSegment aSegment;
- aSegment.Command = 5;
- aSegment.Count = 0;
- aSegmentSeq [10] = aSegment;
- }
- aPropSequence [1].Value = makeAny (aSegmentSeq);
- }
- aPropertyMap [PROP_Path] <<= aPropSequence;
-
- awt::Rectangle aRectangle;
- aRectangle.X = 0;
- aRectangle.Y = 0;
- aRectangle.Width = 4663800;
- aRectangle.Height = 283680;
- aPropertyMap [PROP_ViewBox] <<= aRectangle;
-
- aPropertyMap [ PROP_Type ] <<= CREATE_OUSTRING("ooxml-wedge-round-rect-callout");
-
- Sequence< PropertyValue > aSeq = aPropertyMap.makePropertyValueSequence();
- PropertySet aPropSet( xPropSet );
- aPropSet.setProperty( PROP_CustomShapeGeometry, aSeq );
- OSL_TRACE("created ooxml preset for ooxml-wedge-round-rect-callout");
- }
- else if ( maShapePresetType.equals( sLeftRightArrow ) ) {
- PropertyMap aPropertyMap;
-
- Sequence< EnhancedCustomShapeAdjustmentValue > aAdjSequence (2);
- {
- Any aAny ((sal_Int32) 10000);
- aAdjSequence [0].Value = aAny;
- }
- {
- Any aAny ((sal_Int32) 10000);
- aAdjSequence [1].Value = aAny;
- }
- aPropertyMap [PROP_AdjustmentValues] <<= aAdjSequence;
-
- Sequence< OUString > aStringSequence (16);
- aStringSequence[0] = CREATE_OUSTRING ("min(width,height)");
- aStringSequence[1] = CREATE_OUSTRING ("10000*width/?0 ");
- aStringSequence[2] = CREATE_OUSTRING ("if(0-$0 ,0,if(20000-$0 ,$0 ,20000))");
- aStringSequence[3] = CREATE_OUSTRING ("if(0-$1 ,0,if(?1 -$1 ,$1 ,?1 ))");
- aStringSequence[4] = CREATE_OUSTRING ("?0 *?3 /20000");
- aStringSequence[5] = CREATE_OUSTRING ("width+0-?4 ");
- aStringSequence[6] = CREATE_OUSTRING ("height*?2 /40000");
- aStringSequence[7] = CREATE_OUSTRING ("height/2");
- aStringSequence[8] = CREATE_OUSTRING ("?7 +0-?6 ");
- aStringSequence[9] = CREATE_OUSTRING ("?7 +?6 -0");
- aStringSequence[10] = CREATE_OUSTRING ("height/2");
- aStringSequence[11] = CREATE_OUSTRING ("?8 *?4 /?10 ");
- aStringSequence[12] = CREATE_OUSTRING ("?4 +0-?11 ");
- aStringSequence[13] = CREATE_OUSTRING ("?5 +?11 -0");
- aStringSequence[14] = CREATE_OUSTRING ("width");
- aStringSequence[15] = CREATE_OUSTRING ("height");
- aPropertyMap [PROP_Equations] <<= aStringSequence;
-
- Sequence< Sequence < PropertyValue > > aPropSequenceSequence (2);
- {
- Sequence< PropertyValue > aPropSequence (4);
- {
- aPropSequence [0].Name = CREATE_OUSTRING ("Position");
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 5);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 8);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.Second = aParameter;
- }
- aPropSequence [0].Value = makeAny (aParameterPair);
- }
- {
- aPropSequence [1].Name = CREATE_OUSTRING ("RangeYMaximum");
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 20000);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::NORMAL;
- aPropSequence [1].Value = makeAny (aParameter);
- }
- {
- aPropSequence [2].Name = CREATE_OUSTRING ("RangeYMinimum");
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 0);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::NORMAL;
- aPropSequence [2].Value = makeAny (aParameter);
- }
- {
- aPropSequence [3].Name = CREATE_OUSTRING ("RefY");
- Any aAny ((sal_Int32) 0);
- aPropSequence [3].Value = makeAny (aAny);
- }
- aPropSequenceSequence [0] = aPropSequence;
- }
- {
- Sequence< PropertyValue > aPropSequence (4);
- {
- aPropSequence [0].Name = CREATE_OUSTRING ("Position");
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 4);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- aParameterPair.Second = aParameter;
- }
- aPropSequence [0].Value = makeAny (aParameterPair);
- }
- {
- aPropSequence [1].Name = CREATE_OUSTRING ("RangeXMaximum");
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 1);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aPropSequence [1].Value = makeAny (aParameter);
- }
- {
- aPropSequence [2].Name = CREATE_OUSTRING ("RangeXMinimum");
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 0);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::NORMAL;
- aPropSequence [2].Value = makeAny (aParameter);
- }
- {
- aPropSequence [3].Name = CREATE_OUSTRING ("RefX");
- Any aAny ((sal_Int32) 1);
- aPropSequence [3].Value = makeAny (aAny);
- }
- aPropSequenceSequence [1] = aPropSequence;
- }
- aPropertyMap [PROP_Handles] <<= aPropSequenceSequence;
-
- aPropertyMap [PROP_MirroredX] <<= Any ((sal_Bool) sal_False);
-
- aPropertyMap [PROP_MirroredY] <<= Any ((sal_Bool) sal_False);
-
- Sequence< PropertyValue > aPropSequence (2);
- {
- aPropSequence [0].Name = CREATE_OUSTRING ("Coordinates");
- Sequence< EnhancedCustomShapeParameterPair > aParameterPairSeq (10);
- {
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 7);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.Second = aParameter;
- }
- aParameterPairSeq [0] = aParameterPair;
- }
- {
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 4);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- aParameterPair.Second = aParameter;
- }
- aParameterPairSeq [1] = aParameterPair;
- }
- {
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 4);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 8);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.Second = aParameter;
- }
- aParameterPairSeq [2] = aParameterPair;
- }
- {
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 5);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 8);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.Second = aParameter;
- }
- aParameterPairSeq [3] = aParameterPair;
- }
- {
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 5);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- aParameterPair.Second = aParameter;
- }
- aParameterPairSeq [4] = aParameterPair;
- }
- {
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 14);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 7);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.Second = aParameter;
- }
- aParameterPairSeq [5] = aParameterPair;
- }
- {
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 5);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 15);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.Second = aParameter;
- }
- aParameterPairSeq [6] = aParameterPair;
- }
- {
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 5);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 9);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.Second = aParameter;
- }
- aParameterPairSeq [7] = aParameterPair;
- }
- {
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 4);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 9);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.Second = aParameter;
- }
- aParameterPairSeq [8] = aParameterPair;
- }
- {
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 4);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 15);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.Second = aParameter;
- }
- aParameterPairSeq [9] = aParameterPair;
- }
- aPropSequence [0].Value = makeAny (aParameterPairSeq);
- }
+ if ( mnShapePresetType >= 0 )
{
- aPropSequence [1].Name = CREATE_OUSTRING ("Segments");
- Sequence< EnhancedCustomShapeSegment > aSegmentSeq (4);
- {
- EnhancedCustomShapeSegment aSegment;
- aSegment.Command = 1;
- aSegment.Count = 1;
- aSegmentSeq [0] = aSegment;
- }
- {
- EnhancedCustomShapeSegment aSegment;
- aSegment.Command = 2;
- aSegment.Count = 9;
- aSegmentSeq [1] = aSegment;
- }
- {
- EnhancedCustomShapeSegment aSegment;
- aSegment.Command = 4;
- aSegment.Count = 0;
- aSegmentSeq [2] = aSegment;
- }
- {
- EnhancedCustomShapeSegment aSegment;
- aSegment.Command = 5;
- aSegment.Count = 0;
- aSegmentSeq [3] = aSegment;
- }
- aPropSequence [1].Value = makeAny (aSegmentSeq);
- }
- aPropertyMap [PROP_Path] <<= aPropSequence;
+ OSL_TRACE("preset: %d", mnShapePresetType);
- awt::Rectangle aRectangle;
- aRectangle.X = 0;
- aRectangle.Y = 0;
- aRectangle.Width = 4663800;
- aRectangle.Height = 283680;
- aPropertyMap [PROP_ViewBox] <<= aRectangle;
+ if (maPresetsMap.empty())
+ initializePresetsMap();
- aPropertyMap [ PROP_Type ] <<= CREATE_OUSTRING("ooxml-left-right-arrow");
+ if (maPresetsMap.find(mnShapePresetType) != maPresetsMap.end()) {
+ OSL_TRACE("found property map for preset: %s (%d)", USS(getShapePresetTypeName()), mnShapePresetType);
- Sequence< PropertyValue > aSeq = aPropertyMap.makePropertyValueSequence();
+ Sequence< PropertyValue > aSeq = maPresetsMap[ mnShapePresetType ].makePropertyValueSequence();
PropertySet aPropSet( xPropSet );
aPropSet.setProperty( PROP_CustomShapeGeometry, aSeq );
- OSL_TRACE("created ooxml preset for ooxml-left-right-arrow");
-
- } else if ( maShapePresetType.equals( sStripedRightArrow ) ) {
- PropertyMap aPropertyMap;
-
- Sequence< EnhancedCustomShapeAdjustmentValue > aAdjSequence (2);
- {
- Any aAny ((sal_Int32) 10000);
- aAdjSequence [0].Value = aAny;
- }
- {
- Any aAny ((sal_Int32) 10000);
- aAdjSequence [1].Value = aAny;
- }
- aPropertyMap [PROP_AdjustmentValues] <<= aAdjSequence;
-
- Sequence< OUString > aStringSequence (17);
- aStringSequence[0] = CREATE_OUSTRING ("min(width,height)");
- aStringSequence[1] = CREATE_OUSTRING ("16875*width/?0 ");
- aStringSequence[2] = CREATE_OUSTRING ("if(0-$0 ,0,if(20000-$0 ,$0 ,20000))");
- aStringSequence[3] = CREATE_OUSTRING ("if(0-$1 ,0,if(?1 -$1 ,$1 ,?1 ))");
- aStringSequence[4] = CREATE_OUSTRING ("?0 *1/6");
- aStringSequence[5] = CREATE_OUSTRING ("?0 *?3 /20000");
- aStringSequence[6] = CREATE_OUSTRING ("width+0-?5 ");
- aStringSequence[7] = CREATE_OUSTRING ("height*?2 /40000");
- aStringSequence[8] = CREATE_OUSTRING ("height/2");
- aStringSequence[9] = CREATE_OUSTRING ("?8 +0-?7 ");
- aStringSequence[10] = CREATE_OUSTRING ("?8 +?7 -0");
- aStringSequence[11] = CREATE_OUSTRING ("height/2");
- aStringSequence[12] = CREATE_OUSTRING ("?7 *?5 /?11 ");
- aStringSequence[13] = CREATE_OUSTRING ("width+0-?12 ");
- aStringSequence[14] = CREATE_OUSTRING ("height");
- aStringSequence[15] = CREATE_OUSTRING ("width");
- aStringSequence[16] = CREATE_OUSTRING ("min(width,height)/8");
- aPropertyMap [PROP_Equations] <<= aStringSequence;
-
- Sequence< Sequence < PropertyValue > > aPropSequenceSequence (2);
- {
- Sequence< PropertyValue > aPropSequence (4);
- {
- aPropSequence [0].Name = CREATE_OUSTRING ("Position");
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 9);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.Second = aParameter;
- }
- aPropSequence [0].Value = makeAny (aParameterPair);
- }
- {
- aPropSequence [1].Name = CREATE_OUSTRING ("RangeYMaximum");
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 20000);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::NORMAL;
- aPropSequence [1].Value = makeAny (aParameter);
- }
- {
- aPropSequence [2].Name = CREATE_OUSTRING ("RangeYMinimum");
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 0);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::NORMAL;
- aPropSequence [2].Value = makeAny (aParameter);
- }
- {
- aPropSequence [3].Name = CREATE_OUSTRING ("RefY");
- Any aAny ((sal_Int32) 0);
- aPropSequence [3].Value = makeAny (aAny);
- }
- aPropSequenceSequence [0] = aPropSequence;
- }
- {
- Sequence< PropertyValue > aPropSequence (4);
- {
- aPropSequence [0].Name = CREATE_OUSTRING ("Position");
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 6);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- aParameterPair.Second = aParameter;
- }
- aPropSequence [0].Value = makeAny (aParameterPair);
- }
- {
- aPropSequence [1].Name = CREATE_OUSTRING ("RangeXMaximum");
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 1);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aPropSequence [1].Value = makeAny (aParameter);
- }
- {
- aPropSequence [2].Name = CREATE_OUSTRING ("RangeXMinimum");
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 0);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::NORMAL;
- aPropSequence [2].Value = makeAny (aParameter);
- }
- {
- aPropSequence [3].Name = CREATE_OUSTRING ("RefX");
- Any aAny ((sal_Int32) 1);
- aPropSequence [3].Value = makeAny (aAny);
- }
- aPropSequenceSequence [1] = aPropSequence;
- }
- aPropertyMap [PROP_Handles] <<= aPropSequenceSequence;
-
- aPropertyMap [PROP_MirroredX] <<= Any ((sal_Bool) sal_False);
-
- aPropertyMap [PROP_MirroredY] <<= Any ((sal_Bool) sal_False);
-
- Sequence< PropertyValue > aPropSequence (2);
- {
- aPropSequence [0].Name = CREATE_OUSTRING ("Coordinates");
- Sequence< EnhancedCustomShapeParameterPair > aParameterPairSeq (15);
- {
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 9);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.Second = aParameter;
- }
- aParameterPairSeq [0] = aParameterPair;
- }
- {
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- OUString str = CREATE_OUSTRING ("ssd32");
- aParameter.Value = makeAny (str);
- aParameter.Type = EnhancedCustomShapeParameterType::NORMAL;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 9);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.Second = aParameter;
- }
- aParameterPairSeq [1] = aParameterPair;
- }
- {
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- OUString str = CREATE_OUSTRING ("ssd32");
- aParameter.Value = makeAny (str);
- aParameter.Type = EnhancedCustomShapeParameterType::NORMAL;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 10);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.Second = aParameter;
- }
- aParameterPairSeq [2] = aParameterPair;
}
+ else
{
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 10);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.Second = aParameter;
- }
- aParameterPairSeq [3] = aParameterPair;
- }
- {
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- OUString str = CREATE_OUSTRING ("ssd16");
- aParameter.Value = makeAny (str);
- aParameter.Type = EnhancedCustomShapeParameterType::NORMAL;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 9);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.Second = aParameter;
- }
- aParameterPairSeq [4] = aParameterPair;
- }
- {
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 16);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 9);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.Second = aParameter;
- }
- aParameterPairSeq [5] = aParameterPair;
- }
- {
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 16);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 10);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.Second = aParameter;
- }
- aParameterPairSeq [6] = aParameterPair;
- }
- {
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- OUString str = CREATE_OUSTRING ("ssd16");
- aParameter.Value = makeAny (str);
- aParameter.Type = EnhancedCustomShapeParameterType::NORMAL;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 10);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.Second = aParameter;
- }
- aParameterPairSeq [7] = aParameterPair;
- }
- {
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 4);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 9);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.Second = aParameter;
- }
- aParameterPairSeq [8] = aParameterPair;
- }
- {
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 6);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 9);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.Second = aParameter;
- }
- aParameterPairSeq [9] = aParameterPair;
- }
- {
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 6);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- aParameterPair.Second = aParameter;
- }
- aParameterPairSeq [10] = aParameterPair;
- }
- {
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 15);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 8);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.Second = aParameter;
- }
- aParameterPairSeq [11] = aParameterPair;
- }
- {
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 6);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 14);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.Second = aParameter;
- }
- aParameterPairSeq [12] = aParameterPair;
- }
- {
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 6);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 10);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.Second = aParameter;
- }
- aParameterPairSeq [13] = aParameterPair;
- }
- {
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 4);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 10);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.Second = aParameter;
- }
- aParameterPairSeq [14] = aParameterPair;
- }
- aPropSequence [0].Value = makeAny (aParameterPairSeq);
- }
- {
- aPropSequence [1].Name = CREATE_OUSTRING ("Segments");
- Sequence< EnhancedCustomShapeSegment > aSegmentSeq (10);
- {
- EnhancedCustomShapeSegment aSegment;
- aSegment.Command = 1;
- aSegment.Count = 1;
- aSegmentSeq [0] = aSegment;
- }
- {
- EnhancedCustomShapeSegment aSegment;
- aSegment.Command = 2;
- aSegment.Count = 3;
- aSegmentSeq [1] = aSegment;
- }
- {
- EnhancedCustomShapeSegment aSegment;
- aSegment.Command = 4;
- aSegment.Count = 0;
- aSegmentSeq [2] = aSegment;
- }
- {
- EnhancedCustomShapeSegment aSegment;
- aSegment.Command = 1;
- aSegment.Count = 1;
- aSegmentSeq [3] = aSegment;
- }
- {
- EnhancedCustomShapeSegment aSegment;
- aSegment.Command = 2;
- aSegment.Count = 3;
- aSegmentSeq [4] = aSegment;
- }
- {
- EnhancedCustomShapeSegment aSegment;
- aSegment.Command = 4;
- aSegment.Count = 0;
- aSegmentSeq [5] = aSegment;
- }
- {
- EnhancedCustomShapeSegment aSegment;
- aSegment.Command = 1;
- aSegment.Count = 1;
- aSegmentSeq [6] = aSegment;
- }
- {
- EnhancedCustomShapeSegment aSegment;
- aSegment.Command = 2;
- aSegment.Count = 6;
- aSegmentSeq [7] = aSegment;
- }
- {
- EnhancedCustomShapeSegment aSegment;
- aSegment.Command = 4;
- aSegment.Count = 0;
- aSegmentSeq [8] = aSegment;
- }
- {
- EnhancedCustomShapeSegment aSegment;
- aSegment.Command = 5;
- aSegment.Count = 0;
- aSegmentSeq [9] = aSegment;
- }
- aPropSequence [1].Value = makeAny (aSegmentSeq);
- }
- aPropertyMap [PROP_Path] <<= aPropSequence;
-
- awt::Rectangle aRectangle;
- aRectangle.X = 0;
- aRectangle.Y = 0;
- aRectangle.Width = 4663800;
- aRectangle.Height = 283680;
- aPropertyMap [PROP_ViewBox] <<= aRectangle;
-
- aPropertyMap [ PROP_Type ] <<= CREATE_OUSTRING("ooxml-striped-right-arrow");
-
- Sequence< PropertyValue > aSeq = aPropertyMap.makePropertyValueSequence();
- PropertySet aPropSet( xPropSet );
- aPropSet.setProperty( PROP_CustomShapeGeometry, aSeq );
- OSL_TRACE("created ooxml preset for ooxml-striped-right-arrow");
-
- } else if ( maShapePresetType.equals( sRightArrow ) ) {
- PropertyMap aPropertyMap;
-
- Sequence< EnhancedCustomShapeAdjustmentValue > aAdjSequence (2);
- {
- Any aAny ((sal_Int32) 18000);
- aAdjSequence [0].Value = aAny;
- }
- {
- Any aAny ((sal_Int32) 10000);
- aAdjSequence [1].Value = aAny;
- }
- aPropertyMap [PROP_AdjustmentValues] <<= aAdjSequence;
-
- Sequence< OUString > aStringSequence (15);
- aStringSequence[0] = CREATE_OUSTRING ("min(width,height)");
- aStringSequence[1] = CREATE_OUSTRING ("20000*width/?0 ");
- aStringSequence[2] = CREATE_OUSTRING ("if(0-$0 ,0,if(20000-$0 ,$0 ,20000))");
- aStringSequence[3] = CREATE_OUSTRING ("if(0-$1 ,0,if(?1 -$1 ,$1 ,?1 ))");
- aStringSequence[4] = CREATE_OUSTRING ("?0 *?3 /20000");
- aStringSequence[5] = CREATE_OUSTRING ("width+0-?4 ");
- aStringSequence[6] = CREATE_OUSTRING ("height*?2 /40000");
- aStringSequence[7] = CREATE_OUSTRING ("height/2");
- aStringSequence[8] = CREATE_OUSTRING ("?7 +0-?6 ");
- aStringSequence[9] = CREATE_OUSTRING ("?7 +?6 -0");
- aStringSequence[10] = CREATE_OUSTRING ("height/2");
- aStringSequence[11] = CREATE_OUSTRING ("?8 *?4 /?10 ");
- aStringSequence[12] = CREATE_OUSTRING ("?5 +?11 -0");
- aStringSequence[13] = CREATE_OUSTRING ("height");
- aStringSequence[14] = CREATE_OUSTRING ("width");
- aPropertyMap [PROP_Equations] <<= aStringSequence;
-
- Sequence< Sequence < PropertyValue > > aPropSequenceSequence (2);
- {
- Sequence< PropertyValue > aPropSequence (4);
- {
- aPropSequence [0].Name = CREATE_OUSTRING ("Position");
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 8);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.Second = aParameter;
- }
- aPropSequence [0].Value = makeAny (aParameterPair);
- }
- {
- aPropSequence [1].Name = CREATE_OUSTRING ("RangeYMaximum");
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 20000);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::NORMAL;
- aPropSequence [1].Value = makeAny (aParameter);
- }
- {
- aPropSequence [2].Name = CREATE_OUSTRING ("RangeYMinimum");
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 0);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::NORMAL;
- aPropSequence [2].Value = makeAny (aParameter);
- }
- {
- aPropSequence [3].Name = CREATE_OUSTRING ("RefY");
- Any aAny ((sal_Int32) 0);
- aPropSequence [3].Value = makeAny (aAny);
- }
- aPropSequenceSequence [0] = aPropSequence;
- }
- {
- Sequence< PropertyValue > aPropSequence (4);
- {
- aPropSequence [0].Name = CREATE_OUSTRING ("Position");
- EnhancedCustomShapeParameterPair aParameterPair;
- {
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 5);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aParameterPair.First = aParameter;
- }
- {
- EnhancedCustomShapeParameter aParameter;
- aParameterPair.Second = aParameter;
- }
- aPropSequence [0].Value = makeAny (aParameterPair);
- }
- {
- aPropSequence [1].Name = CREATE_OUSTRING ("RangeXMaximum");
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 1);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
- aPropSequence [1].Value = makeAny (aParameter);
- }
- {
- aPropSequence [2].Name = CREATE_OUSTRING ("RangeXMinimum");
- EnhancedCustomShapeParameter aParameter;
- Any aAny ((sal_Int32) 0);
- aParameter.Value = aAny;
- aParameter.Type = EnhancedCustomShapeParameterType::NORMAL;
- aPropSequence [2].Value = makeAny (aParameter);
- }
- {
- aPropSequence [3].Name = CREATE_OUSTRING ("RefX");
- Any aAny ((sal_Int32) 1);
- aPropSequence [3].Value = makeAny (aAny);
- }
- aPropSequenceSequence [1] = aPropSequence;
- }
- aPropertyMap [PROP_Handles] <<= aPropSequenceSequence;
-
- aPropertyMap [PROP_MirroredX] <<= Any ((sal_Bool) sal_False);
-
- aPropertyMap [PROP_MirroredY] <<= Any ((sal_Bool) sal_False);
-
- Sequence< PropertyValue > aPropSequence (2);
- {
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list